diff --git a/README.md b/README.md index 409c144..ca46f30 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ Ersetzungen bieten die Möglichkeit, Werte innerhalb von Element-Definitionen zu |Ersetzung|Beschreibung| |---|---| |%t(on)|gibt die Übersetzung für die Variable `on` an. (siehe auch [Sprachen](#sprachen))| -|%v|liefert den aktuellen Wert von Slidern +|%v|liefert den aktuellen Wert von Slidern oder Menüeinträgen |\\:|wird zur Ausgabe von `:` innerhalb von Element-Definitionen verwendet| |Beispiel|Reading|Ausgabe|Hinweis| @@ -483,19 +483,21 @@ Zeigt einen Button an, der beim Klicken ein DropDown-Menü öffnet. Wenn dieses ### Level Element Menu menu Definiert die Menüeinträge, die beim Öffnen des DropDown-Menü angezeigt werden. Bei Klick auf einen Menüpunkt wird der hinterlegte Befehl an FHEM gesendet. Im Gegensatz zu normalen Definitionen, werden zur Anzeige der Menüpunkte **alle** Definitionen verwendet, deren Bedingungen zutreffen. -Menüeinträge können auch von FHEM übergeben werden. Dafür muss der Inhalt des FHEM *readings* oder *attributes* folgender Form entsprechen: `Name1:cmd1,Name2:cmd2,...` +Menüeinträge können auch dynamisch von FHEM übergeben werden. Der Rückgabewert vom FHEM Befehl *get* bzw. dem *reading* oder *attribute* muss dabei durch einen der folgenden Zeichen (`,` `|` `\n`) getrennt werden. Bei dynamisch erzeugten Menüeinträgen muss der FHEM *get-Befehl* oder *%s* bei Verwendung eines *reading* bzw. *attribute* in den Parameter `name` eingetragen werden. Im Parameter `cmd` kann dann die Ersetzung **%v** verwendet werden um den aktuellen Menüeinträge über einen *set-Befehl* an FHEM zu übergeben. |Parameter|Default|Beschreibung| |---|---|---| |reading||siehe Parameter [reading](#konfiguration-der-elemente)| |value||siehe Parameter [value](#konfiguration-der-elemente)| -|name||Name der im DropDown-Menü angezeiugt wird [string]| -|cmd||FHEM Befehl, der beim Klick auf den Menüpunkt an FHEM gesendet wird. [string]| +|name||Name der im DropDown-Menü angezeiugt wird. Alternativ FHEM *get-Befehl* [string]| +|cmd||FHEM Befehl, der beim Klick auf den Menüpunkt an FHEM gesendet wird. Bei dynamisch erzeugten Menüeinträgen kann die [Ersetzung](#ersetzungen) **%v** verwendet werden. [string]| +|convert||**regExp** [string] Relevant bei Verwendung dynamisch erzeugter Menüeinträge. Der anstelle von **%v** verwendete Wert wird in einen regulären Ausdruck umgewandelt. Relevant bei SONOS Playern| |Beispiel|Beschreibung| |---|---| |`::30 Minuten:set switch on-for-timer 1800`|Zeigt im Menü den Menüpunkt `30 Minuten` an und sendet bei Klick den Befehl `set switch on-for-timer 1800` an FHEM. Dabei wird im Panel unter dem [Element devices](#element-devices) nach dem Schlüssel `switch` gesucht und falls vorhanden, durch den Name des FHEM Devices ersetzt.| -|`switch-a-dropdown::%s:%s`|übernimmt die Definition der Menüeinträge aus dem FHEM Attribut `dropdown` vom Device `switch`. Dabei wird im Panel unter dem [Element devices](#element-devices) nach dem Schlüssel `switch` gesucht und falls vorhanden, durch den Name des FHEM Devices ersetzt.| +|`::get dev scenes:set dev scene %v`|ermittelt für ein FHEM **lightScene** Device mit dem Devicekey `dev` alle Szenen und generiert dynamische Menüeinträge| +|`player-FavouritesListAlias::%s:set player StartFavourite %v:regExp`|ermittelt für ein FHEM **SONOSplayer** Device alle Favouriten und generiert dynamische Menüeinträge. Über die Konvertierung **regExp** werden die Namen der Favouriten in reguläre Ausdrücke in den *set-Befehlen* umgewandelt.| ### Level Element Info text Zeigt bis zu 3 Texte (text, text2, text3) an. Dabei wird `text` immer über `text2` und `text3` angezeigt. Weiterhin wird `text2` immer links neben `text3` angezeigt. @@ -663,6 +665,7 @@ Mit **FHEMApp** werden verschiedene Standardvorlagen bereitgestellt, die den Ein |Name: *thermostat*
Devicekeys: *thermo, valve*
Readings: *alias, **room**,
group, sortby, measured-temp,
**desired-temp**, humidity,
R-dayTemp, R-nightTemp,
tempState, controlMode,
state (valve), pct (valve)*

Einsatz: Heizungsthermostate
JSON: [thermostat](./public/templates/thermostat.json)|![](./docs/media/template_thermostat.png)| |Name: *temperatur*
Devicekeys: *temp*
Readings: *alias, **room**, group, sortby, **temperature**, humidity*

Einsatz: Temperatursensoren
JSON: [temperatur](./public/templates/temperatur.json)|![](./docs/media/template_temperatur.png)| |Name: *smokedetector*
Devicekeys: *smoke*
Readings: *alias, **room**, group, sortby, **level***

Einsatz: Rauchmelder
JSON: [smokedetector](./public/templates/smokedetector.json)|![](./docs/media/template_smokedetector.png)| -|Name: *motiondetector*
Devicekeys: *sensor*
Readings: *alias, **room**, group, sortby, **motion***

Einsatz: Bewegungsmeldung
JSON: [motiondetector](./public/templates/motiondetector.json)|![](./docs/media/template_motiondetector.png)| +|Name: *motiondetector*
Devicekeys: *sensor*
Readings: *alias, **room**, group, sortby, **motion***

Einsatz: Bewegungsmelder
JSON: [motiondetector](./public/templates/motiondetector.json)|![](./docs/media/template_motiondetector.png)| +|Name: *lightscene*
Devicekeys: *lightscene*
Readings: *alias, **room**, group, sortby, **scene***

Einsatz: Szenarien
JSON: [lightscene](./public/templates/lightscene.json)|![](./docs/media/template_lightscene.png)| |Name: *sonosplayer*
Devicekeys: *player*
Readings: *alias, **room**, group, sortby,
and other readings...*

Einsatz: SONOS Player
JSON: [sonosplayer](./public/templates/sonosplayer.json)|![](./docs/media/template_sonosplayer.png)| |Name: *proplanta*
Devicekeys: *weather*
Readings: *alias, **room**, group, sortby,
and other readings...*

Einsatz: Wettervorhersage (Proplanta)
JSON: [proplanta](./public/templates/proplanta.json)|![](./docs/media/template_proplanta.png)| \ No newline at end of file diff --git a/docs/media/template_lightscene.png b/docs/media/template_lightscene.png new file mode 100644 index 0000000..1076152 Binary files /dev/null and b/docs/media/template_lightscene.png differ diff --git a/public/CHANGELOG.md b/public/CHANGELOG.md index 83fb9e8..2629198 100644 --- a/public/CHANGELOG.md +++ b/public/CHANGELOG.md @@ -1,3 +1,12 @@ +# v4.0.38-beta (21.04.2024) +## Panel +- status now uses the colour variable *primary* analogous to the header of **FHEMApp** +## Panel menu +- add new function for handling FHEM get command +## Settings +- bugfix for adding new languages +## App +- adding default template lightscene # v4.0.37-beta (20.04.2024) ## Settings - Selection of FHEM devices optimised @@ -5,6 +14,7 @@ - adding default templates ## Core - load all default templates on inizialising FHEMApp +- show header after config is loaded # v4.0.36-beta (17.04.2024) ## App - providing default templates diff --git a/public/templates/lightscene.json b/public/templates/lightscene.json new file mode 100644 index 0000000..9718c90 --- /dev/null +++ b/public/templates/lightscene.json @@ -0,0 +1,58 @@ +{ + "name": "lightscene", + "author": "jemu", + "date": "2024-04-16", + "panel": { + "devicekeys": [ + "lightscene:FHEM lightScene device" + ], + "navigation": [ + "lightscene-a-room::Räume->%s", + "lightscene-a-group::Gruppen->%s" + ], + "sortby": [ + "lightscene-a-sortby::%s" + ] + }, + "status": { + "title": [ + "lightscene-a-alias:^.+$:%s", + "lightscene-i-NAME::%s" + ], + "imageUrl": [ + "::images/header_01.png" + ], + "bar": [ + "::100" + ] + }, + "main": [ + { + "level": { + "mid": "info", + "right1": "menu" + }, + "mid": { + "text": [ + "lightscene-state:unknown:individuell", + "lightscene-state::%s" + ], + "divider": ["::true"], + "size": ["::9"] + }, + "right1": { + "btn": [ + "::mdi-dots-vertical" + ], + "menu": [ + "::get lightscene scenes:set lightscene scene %v" + ] + } + } + ], + "info": { + "left1": [ + ":::mdi-movie-open" + ] + } +} \ No newline at end of file diff --git a/public/templates/templates.json b/public/templates/templates.json index 2856ff1..b12bcea 100644 --- a/public/templates/templates.json +++ b/public/templates/templates.json @@ -1,3 +1,3 @@ [ - "switch", "light", "dimmer", "contact", "blind", "thermostat", "temperatur", "smokedetector", "motiondetector", "sonosplayer", "proplanta" + "switch", "light", "dimmer", "contact", "blind", "thermostat", "temperatur", "smokedetector", "motiondetector", "sonosplayer", "proplanta", "lightscene" ] \ No newline at end of file diff --git a/src/components/PanelCard.vue b/src/components/PanelCard.vue index 77e5b21..6e9f044 100644 --- a/src/components/PanelCard.vue +++ b/src/components/PanelCard.vue @@ -60,7 +60,7 @@ function levelClick(init) { let opts = levelOpts.value, idx - + if(init) { opts.activeLevels = levelsActive(item.panel.main) } else { @@ -141,7 +141,7 @@ - + diff --git a/src/components/PanelMainMenu.vue b/src/components/PanelMainMenu.vue index 6116648..c8262d8 100644 --- a/src/components/PanelMainMenu.vue +++ b/src/components/PanelMainMenu.vue @@ -1,5 +1,5 @@ - + {{ item.name }} diff --git a/src/components/SettingsContent.vue b/src/components/SettingsContent.vue index bfd59ad..cbd9c77 100644 --- a/src/components/SettingsContent.vue +++ b/src/components/SettingsContent.vue @@ -107,7 +107,7 @@ {let e=[];if(s.app.panelMaximized)e.push(s.app.panelMaximized);else{for(const t of s.app.panelView)s.handleDefs(s.app.panelList[t].panel.show,["show"],[!0]).show&&e.push(s.app.panelList[t]);e.sort((t,o)=>a(t)>a(o)?1:a(o)>a(t)?-1:0)}return e}),l=c(()=>{let e={cols:12,sm:6,lg:4};return/=maximized$/.test(s.app.currentView)&&(e={cols:12}),e});function a(e){return s.handleDefs(e.panel.sortby,["sortby"],[null]).sortby||"999"}return(e,t)=>{const o=p("v-col"),_=p("v-row");return n(),u(_,{"no-gutters":""},{default:i(()=>[(n(!0),d(v,null,h(m.value,r=>(n(),u(o,{cols:l.value.cols,sm:l.value.sm,lg:l.value.lg,key:r.name,class:"pa-1"},{default:i(()=>[w(x,{panel:r},null,8,["panel"])]),_:2},1032,["cols","sm","lg"]))),128))]),_:1})}}};export{V as default}; +import{u as f,c,r as p,o as n,a as u,w as i,b as d,d as h,F as v,e as w}from"./index-5e6bdbad.js";import{_ as x}from"./PanelCard-b1e8bb33.js";const V={__name:"DevicesView",setup(g){const s=f(),m=c(()=>{let e=[];if(s.app.panelMaximized)e.push(s.app.panelMaximized);else{for(const t of s.app.panelView)s.handleDefs(s.app.panelList[t].panel.show,["show"],[!0]).show&&e.push(s.app.panelList[t]);e.sort((t,o)=>a(t)>a(o)?1:a(o)>a(t)?-1:0)}return e}),l=c(()=>{let e={cols:12,sm:6,lg:4};return/=maximized$/.test(s.app.currentView)&&(e={cols:12}),e});function a(e){return s.handleDefs(e.panel.sortby,["sortby"],[null]).sortby||"999"}return(e,t)=>{const o=p("v-col"),_=p("v-row");return n(),u(_,{"no-gutters":""},{default:i(()=>[(n(!0),d(v,null,h(m.value,r=>(n(),u(o,{cols:l.value.cols,sm:l.value.sm,lg:l.value.lg,key:r.name,class:"pa-1"},{default:i(()=>[w(x,{panel:r},null,8,["panel"])]),_:2},1032,["cols","sm","lg"]))),128))]),_:1})}}};export{V as default}; diff --git a/www/fhemapp4/assets/InternalsView-3dde18b0.js b/www/fhemapp4/assets/InternalsView-17393e3f.js similarity index 90% rename from www/fhemapp4/assets/InternalsView-3dde18b0.js rename to www/fhemapp4/assets/InternalsView-17393e3f.js index e30dd10..745f8e8 100644 --- a/www/fhemapp4/assets/InternalsView-3dde18b0.js +++ b/www/fhemapp4/assets/InternalsView-17393e3f.js @@ -1 +1 @@ -import{u as x,V as C}from"./index-f84634ce.js";import{f as k,u as B,r as e,o as N,a as S,w as o,e as t,j as p,t as i,q as $,h as r}from"./index-d51afd91.js";const O={__name:"InternalsView",setup(I){const n=k(!0),a=B(),{toClipboard:u}=x();function d(){u(JSON.stringify(n.value?a.app.config:a.app,null," "))}return(l,c)=>{const m=e("v-toolbar-title"),v=e("v-toolbar"),f=e("v-switch"),_=e("v-col"),b=e("v-btn"),g=e("v-snackbar"),h=e("v-row"),w=e("v-divider"),V=e("v-card-text"),y=e("v-card");return N(),S(y,null,{default:o(()=>[t(v,null,{default:o(()=>[t(m,null,{default:o(()=>[p(i(l.$t("_app.internals.title")),1)]),_:1})]),_:1}),t(V,null,{default:o(()=>[t(h,{"no-gutters":"",class:"align-center pb-2"},{default:o(()=>[t(_,null,{default:o(()=>[t(f,{label:l.$t("_app.internals.onlyConfig"),modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=s=>n.value=s),color:"blue",density:"comfortable","hide-details":""},null,8,["label","modelValue"])]),_:1}),t(_,{cols:"1",class:"text-right"},{default:o(()=>[t(g,{timeout:2e3,rounded:"pill"},{activator:o(({props:s})=>[t(b,$(s,{variant:"text",icon:"mdi-clipboard-multiple-outline",size:"small",onClick:d}),null,16)]),default:o(()=>[p(" "+i(l.$t("_app.messages.clipboard.text")),1)]),_:1})]),_:1})]),_:1}),t(w,{class:"pb-3"}),t(r(C),{data:n.value?r(a).app.config:r(a).app,deep:1,showLine:!1,showIcon:!0,showLength:!0},null,8,["data"])]),_:1})]),_:1})}}};export{O as default}; +import{u as x,V as C}from"./index-1473c98e.js";import{f as k,u as B,r as e,o as N,a as S,w as o,e as t,j as p,t as i,q as $,h as r}from"./index-5e6bdbad.js";const O={__name:"InternalsView",setup(I){const n=k(!0),a=B(),{toClipboard:u}=x();function d(){u(JSON.stringify(n.value?a.app.config:a.app,null," "))}return(l,c)=>{const m=e("v-toolbar-title"),v=e("v-toolbar"),f=e("v-switch"),_=e("v-col"),b=e("v-btn"),g=e("v-snackbar"),h=e("v-row"),w=e("v-divider"),V=e("v-card-text"),y=e("v-card");return N(),S(y,null,{default:o(()=>[t(v,null,{default:o(()=>[t(m,null,{default:o(()=>[p(i(l.$t("_app.internals.title")),1)]),_:1})]),_:1}),t(V,null,{default:o(()=>[t(h,{"no-gutters":"",class:"align-center pb-2"},{default:o(()=>[t(_,null,{default:o(()=>[t(f,{label:l.$t("_app.internals.onlyConfig"),modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=s=>n.value=s),color:"blue",density:"comfortable","hide-details":""},null,8,["label","modelValue"])]),_:1}),t(_,{cols:"1",class:"text-right"},{default:o(()=>[t(g,{timeout:2e3,rounded:"pill"},{activator:o(({props:s})=>[t(b,$(s,{variant:"text",icon:"mdi-clipboard-multiple-outline",size:"small",onClick:d}),null,16)]),default:o(()=>[p(" "+i(l.$t("_app.messages.clipboard.text")),1)]),_:1})]),_:1})]),_:1}),t(w,{class:"pb-3"}),t(r(C),{data:n.value?r(a).app.config:r(a).app,deep:1,showLine:!1,showIcon:!0,showLength:!0},null,8,["data"])]),_:1})]),_:1})}}};export{O as default}; diff --git a/www/fhemapp4/assets/PanelCard-5296e7c7.js b/www/fhemapp4/assets/PanelCard-5296e7c7.js deleted file mode 100644 index 005a15b..0000000 --- a/www/fhemapp4/assets/PanelCard-5296e7c7.js +++ /dev/null @@ -1,17 +0,0 @@ -import{u as G,c as S,r as y,o as m,b as T,x as q,t as j,k,a as E,w as z,j as W,y as he,F as Z,e as b,z as ne,f as N,q as ae,d as _e,l as Re,A as re,B as ie,C as Me,D as Ve,s as Q,E as ke,G as ge,H as Le,m as Se,I as Pe,J as Te,h as B,K as je,L as Fe,i as Ie,p as Ne,M as Ue,N as He,O as qe,P as Be}from"./index-d51afd91.js";const We={__name:"PanelMainInfo",props:{el:Object,iconmap:Array,devices:Object,height:String},setup(e){const t=e,n=G(),i=S(()=>n.handleDefs(t.el.text,["text","format"],["",!t.el.text2&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),u=S(()=>n.handleDefs(t.el.text2,["text","format"],["",t.el.text&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),s=S(()=>n.handleDefs(t.el.text3,["text","format"],["","text-caption"])),l=S(()=>{let a=n.handleDefs(t.el.icon,["icon","color","size"],["","","x-large"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),r=S(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse","linear"],[0,"success",0,100,!1,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a});return(a,o)=>{const c=y("v-icon"),f=y("v-progress-circular"),C=y("v-progress-linear");return m(),T(Z,null,[e.el.text?(m(),T("div",{key:0,class:q(i.value.format)},j(i.value.text),3)):k("",!0),e.el.icon?(m(),E(c,{key:1,color:l.value.color,size:l.value.size},{default:z(()=>[W(j(l.value.icon),1)]),_:1},8,["color","size"])):k("",!0),e.el.status&&!r.value.linear?(m(),E(f,{key:2,width:"4",modelValue:r.value.level,"onUpdate:modelValue":o[0]||(o[0]=w=>r.value.level=w),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),e.el.status&&r.value.linear?(m(),E(C,{key:3,height:"7",rounded:"",modelValue:r.value.level,"onUpdate:modelValue":o[1]||(o[1]=w=>r.value.level=w),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),he("div",{class:q(e.el.text2?u.value.format:s.value.format)},[e.el.text2?(m(),T("span",{key:0,class:q(u.value.format)},j(u.value.text),3)):k("",!0),e.el.text3?(m(),T("span",{key:1,class:q(s.value.format)},j(s.value.text),3)):k("",!0)],2)],64)}}},Ke={__name:"PanelMainBtn",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=S(()=>{let a=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["",!1,"","text"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),u=S(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse"],[0,"success",0,100,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a}),s={timer:!1,long:!1};function l(a){let o=[],c=a.cmd,f;if(a.type==="cmd"){for(const C of t.devices)o=C.split(":"),f=RegExp(o[0],"g"),f.test(c)&&(c=c.replace(f,o[1]));n.request("text",c)}a.type==="route"&&ne.push({name:"devices",params:{view:a.cmd},query:ne.currentRoute.value.query}),a.type==="url"&&window.open(a.cmd,"_self")}function r(a){let o=n.handleDefs(t.el.click,["cmd","type"],["","cmd"],!1,null,!0),c=n.handleDefs(t.el.longClick,["cmd","type"],["","cmd"],!1,null,!0),f=n.handleDefs(t.el.longRelease,["cmd","type"],["","cmd"],!1,null,!0);a==="mouseStart"&&(s.timer=setTimeout(()=>{s.long=!0,c.cmd&&l(c)},1e3)),a==="mouseEnd"&&(s.long?f.cmd&&l(f):o.cmd&&l(o),clearTimeout(s.timer),s.long=!1)}return(a,o)=>{const c=y("v-progress-linear"),f=y("v-icon"),C=y("v-btn");return m(),T(Z,null,[e.el.status?(m(),E(c,{key:0,height:"4",modelValue:u.value.level,"onUpdate:modelValue":o[0]||(o[0]=w=>u.value.level=w),color:u.value.color,reverse:u.value.reverse},null,8,["modelValue","color","reverse"])):k("",!0),b(C,{icon:"",variant:i.value.variant,disabled:i.value.disabled,color:i.value.color,onMousedown:o[1]||(o[1]=w=>r("mouseStart")),onMouseup:o[2]||(o[2]=w=>r("mouseEnd")),class:"my-2"},{default:z(()=>[b(f,{size:"large"},{default:z(()=>[W(j(i.value.icon),1)]),_:1})]),_:1},8,["variant","disabled","color"])],64)}}},Je={class:"text-white"},Ge={__name:"PanelMainSlider",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=N();function u(a){i.value=a}const s=S(()=>{let a=n.handleDefs(t.el.slider,["cmd","current","color","min","max","steps","reverse","size","vertical"],["",0,"",0,100,10,!1,4,!1],!1,null,!0);return/%v/.test(a.current)&&(a.current=a.current.replace("%v",i.value)),u(a.current),a});let l=null;function r(a){let o=s.value.cmd,c=/\./.exec(s.value.steps),f=0,C=[];c&&(f=s.value.steps.slice(c.index).length-1),o=o.replace("%v",a.toFixed(f));for(const w of t.devices)C=w.split(":"),RegExp(C[0]).test(o)&&(o=o.replace(C[0],C[1]));clearTimeout(l),l=setTimeout(()=>{n.request("text",o)},500)}return(a,o)=>{const c=y("v-slider");return m(),E(c,{modelValue:i.value,"onUpdate:modelValue":[o[0]||(o[0]=f=>i.value=f),o[1]||(o[1]=f=>r(f))],min:s.value.min,max:s.value.max,step:s.value.steps,reverse:s.value.reverse,direction:s.value.vertical?"vertical":"horizontal","track-size":s.value.size,color:s.value.color,"hide-details":"","thumb-label":""},{"thumb-label":z(({modelValue:f})=>[he("div",Je,j(f),1)]),_:1},8,["modelValue","min","max","step","reverse","direction","track-size","color"])}}},Ye={__name:"PanelMainImage",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=N(!1),u=S(()=>n.handleDefs(t.el.image,["source","height"],["",null]));return(s,l)=>{const r=y("v-skeleton-loader"),a=y("v-img");return m(),T(Z,null,[i.value?k("",!0):(m(),E(r,{key:0,type:"image"})),b(a,{src:u.value.source,height:u.value.height,onLoad:l[0]||(l[0]=o=>i.value=!0)},null,8,["src","height"])],64)}}},Ze={__name:"PanelMainMenu",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=S(()=>{let l=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["mdi-dots-vertical",!1,"","text"]);return l.icon&&(l.icon=n.getIcon(l.icon,t.iconmap)),l}),u=S(()=>{let l=[],r=n.handleDefs(t.el.menu,["name","cmd"],["",""],!0,","),a={};for(const o of r)a={name:/:/.test(o.name)?o.name.split(":")[0]:o.name,cmd:/:/.test(o.cmd)?o.cmd.split(":")[1]:o.cmd},l.push(a);return l});function s(l){let r=[];for(const a of t.devices)r=a.split(":"),RegExp(r[0]).test(l)&&(l=l.replace(r[0],r[1]));return n.request("text",l)}return(l,r)=>{const a=y("v-icon"),o=y("v-btn"),c=y("v-list-item-title"),f=y("v-list-item"),C=y("v-list"),w=y("v-menu");return m(),E(w,null,{activator:z(({props:g})=>[b(o,ae(g,{icon:"",variant:i.value.variant,disabled:i.value.disabled||u.value.length<1,color:i.value.color,class:"my-2"}),{default:z(()=>[b(a,{size:"large"},{default:z(()=>[W(j(i.value.icon),1)]),_:1})]),_:2},1040,["variant","disabled","color"])]),default:z(()=>[b(C,null,{default:z(()=>[(m(!0),T(Z,null,_e(u.value,(g,p)=>(m(),E(f,{key:p,value:p,onClick:h=>s(g.cmd)},{default:z(()=>[b(c,null,{default:z(()=>[W(j(g.name),1)]),_:2},1024)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})}}};var de=null;function Xe(e){return de||(de=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),de(e)}var ve=null;function $e(e){ve||(ve=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),ve(e)}function Qe(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function le(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(i){n[i]=t[i]}),n}function Oe(e,t,n){var i=window.getComputedStyle(e,n||null)||{display:"none"};return i[t]}function me(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(Oe(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var et='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',pe=0,se=null;function tt(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=rt.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var i=e.offsetWidth,u=e.offsetHeight,s=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===i&&e.offsetHeight===u)||ue(e)}),l=me(e),r=l.detached,a=l.rendered;e.__resize_observer_triggered__=r===!1&&a===!1,e.__resize_observer__=s,s.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){ue(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(pe||(se=Qe(et)),it(e),e.__resize_rendered__=me(e).rendered,window.MutationObserver){var o=new MutationObserver(e.__resize_mutation_handler__);o.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=o}}e.__resize_listeners__.push(t),pe++}function nt(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",xe),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--pe&&se&&se.parentNode.removeChild(se)}}function at(e){var t=e.__resize_last__,n=t.width,i=t.height,u=e.offsetWidth,s=e.offsetHeight;return u!==n||s!==i?{width:u,height:s}:null}function rt(){var e=me(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(ye(this),this.addEventListener("scroll",xe,!0)),this.__resize_rendered__=t,ue(this))}function xe(){var e=this;ye(this),this.__resize_raf__&&$e(this.__resize_raf__),this.__resize_raf__=Xe(function(){var t=at(e);t&&(e.__resize_last__=t,ue(e))})}function ue(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function it(e){var t=Oe(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=le("div",{className:"resize-triggers"}),i=le("div",{className:"resize-expand-trigger"}),u=le("div"),s=le("div",{className:"resize-contract-trigger"});i.appendChild(u),n.appendChild(i),n.appendChild(s),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:i,expandChild:u,contract:s},ye(e),e.addEventListener("scroll",xe,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function ye(e){var t=e.__resize_triggers__,n=t.expand,i=t.expandChild,u=t.contract,s=u.scrollWidth,l=u.scrollHeight,r=n.offsetWidth,a=n.offsetHeight,o=n.scrollWidth,c=n.scrollHeight;u.scrollLeft=s,u.scrollTop=l,i.style.width=r+1+"px",i.style.height=a+1+"px",n.scrollLeft=o,n.scrollTop=c}var J=function(){return J=Object.assign||function(e){for(var t,n=1,i=arguments.length;n"u"||typeof customElements>"u")return ee=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { - __dispose = null; - - disconnectedCallback() { - if (this.__dispose) { - this.__dispose(); - this.__dispose = null; - } - } -} - -if (customElements.get(tag) == null) { - customElements.define(tag, EChartsElement); -} -`)(Ae)}catch{return ee=!1}return ee=!0}(),_t="ecTheme",mt="ecInitOptions",pt="ecUpdateOptions",ht=Re({name:"echarts",props:J(J({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},st),vt),emits:{},inheritAttrs:!1,setup:function(e,t){var n=t.attrs,i=re(),u=re(),s=re(),l=re(),r=ie(_t,null),a=ie(mt,null),o=ie(pt,null),c=Me(e),f=c.autoresize,C=c.manualUpdate,w=c.loading,g=c.loadingOptions,p=S(function(){return l.value||e.option||null}),h=S(function(){return e.theme||oe(r,{})}),v=S(function(){return e.initOptions||oe(a,{})}),L=S(function(){return e.updateOptions||oe(o,{})}),_=S(function(){return function(A){var D={};for(var F in A)ct(F)||(D[F]=A[F]);return D}(n)}),M=Ve().proxy.$listeners;function x(A){if(u.value){var D=s.value=Pe(u.value,h.value,v.value);e.group&&(D.group=e.group);var F=M;F||(F={},Object.keys(n).filter(function(P){return P.indexOf("on")===0&&P.length>2}).forEach(function(P){var R=P.charAt(2).toLowerCase()+P.slice(3);R.substring(R.length-4)==="Once"&&(R="~".concat(R.substring(0,R.length-4))),F[R]=n[P]})),Object.keys(F).forEach(function(P){var R=F[P];if(R){var U=P.toLowerCase();U.charAt(0)==="~"&&(U=U.substring(1),R.__once__=!0);var I=D;if(U.indexOf("zr:")===0&&(I=D.getZr(),U=U.substring(3)),R.__once__){delete R.__once__;var $=R;R=function(){for(var Y=[],K=0;K(w(),"height: "+(/=maximized$/.test(n.app.currentView)?window.innerHeight-250+"px":t.height)));function c(g){return s.d(g,{dateStyle:u.value?"short":"long"})}function f(g,p){let h;return r.value.from&&p&&(h=r.value.from),r.value.to&&!p&&(h=r.value.to),!h&&!isNaN(g)&&(h=(v=>new Date(v.setDate(v.getDate()+(Number(g)||0))))(new Date)),h||(h=new Date(/.*T.*/.test(g)?g:g+"T00:00:00")),!r.value.from&&p&&(r.value.from=h),!r.value.to&&!p&&(r.value.to=h),h=new Date(h.getTime()-h.getTimezoneOffset()*60*1e3),h.toISOString().split("T")[0]}async function C(){let g=n.handleDefs(t.el.serie,["data","name","digits","suffix","type"],[null,"",0,"","line"],!0),p,h,v=[],L,_,M,x,d,V=[];if(g.length>0)for(const O of g){if(/^get.*/.test(O.data)){d="time",p=O.data.split(" ");for(const A of t.devices)A.split(":")[0]===p[1]&&(p[1]=A.split(":")[1]);if(p[4]=f(p[4],!0),p[5]=f(p[5],!1),h=await n.request("text",p.join(" ")),x=[],v=h.split(` -`),v.length>0)for(const A of v)L=A.split(" "),L.length>1&&(_=new Date(L[0].replace("_","T")),M=parseFloat(L[1]).toFixed(O.digits),x.push([_,M]))}else/^\[.*\]/.test(O.data)?x=n.stringToJson(O.data):x=[n.replacer("%n("+O.digits+")",O.data,!0)];V.push({xAxisType:d,type:O.type,name:O.name,digits:O.digits,suffix:O.suffix,data:x})}return V}async function w(){let g={tooltip:{trigger:"axis"},legend:{data:[],bottom:10},backgroundColor:"rgba(255, 255, 255, 0)",grid:{top:30,bottom:60,left:60,right:60},animationDuration:300,series:[],yAxis:[],xAxis:{}},p=JSON.parse(JSON.stringify(n.getEl(t.el,["options"])||{})),h=JSON.parse(JSON.stringify(n.getEl(t.el,["options2"])||{})),v=Object.assign(g,/=maximized$/.test(n.app.currentView)&&Object.keys(h).length>0?h:p),L;r.value.fromMenu=!1,r.value.toMenu=!1,r.value.loaded=!1,a=await C();for(const[_,M]of Object.entries(a))L={formatter:x=>x.toLocaleString(s.locale.value,{minimumFractionDigits:M.digits,maximumFractionDigits:M.digits})+M.suffix},v.series[_]||(v.series[_]={}),v.yAxis[_]||(v.yAxis[_]={}),v.legend.data||(v.legend.data=[]),v.xAxis.type||(v.xAxis.type=M.xAxisType),v.yAxis[_].type||(v.yAxis[_].type="value"),v.yAxis[_].axisLabel||(v.yAxis[_].axisLabel={}),v.yAxis[_].axisLabel.formatter||(v.yAxis[_].axisLabel.formatter=L.formatter),v.legend.data[_]||(v.legend.data[_]=M.name),v.series[_].name||(v.series[_].name=M.name),v.series[_].type||(v.series[_].type=M.type),v.series[_].data||(v.series[_].data=M.data),v.series[_].detail||(v.series[_].detail={}),v.series[_].detail.formatter||(v.series[_].detail.formatter=L.formatter),v.series[_].tooltip||(v.series[_].tooltip={}),v.series[_].tooltip.valueFormatter||(v.series[_].tooltip.valueFormatter=L.formatter);n.log(7,"Chartdata chart.loaded.",v),l.value=Object.assign({},v),r.value.loaded=!0}return(g,p)=>{const h=y("v-btn"),v=y("v-date-picker"),L=y("v-locale-provider"),_=y("v-menu"),M=y("v-skeleton-loader");return m(),T(Z,null,[/=maximized$/.test(B(n).app.currentView)?(m(),T("div",gt,[b(_,{modelValue:r.value.fromMenu,"onUpdate:modelValue":p[2]||(p[2]=x=>r.value.fromMenu=x),"close-on-content-click":!1},{activator:z(({props:x})=>[b(h,ae(x,{variant:"outlined","append-icon":"mdi-calendar",class:"mr-2"}),{default:z(()=>[W(j(c(r.value.from)),1)]),_:2},1040)]),default:z(()=>[b(L,{locale:B(s).locale.value},{default:z(()=>[b(v,{modelValue:r.value.from,"onUpdate:modelValue":[p[0]||(p[0]=x=>r.value.from=x),p[1]||(p[1]=x=>w())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"]),W(" - "),b(_,{modelValue:r.value.toMenu,"onUpdate:modelValue":p[5]||(p[5]=x=>r.value.toMenu=x),"close-on-content-click":!1},{activator:z(({props:x})=>[b(h,ae(x,{variant:"outlined","append-icon":"mdi-calendar",class:"ml-2"}),{default:z(()=>[W(j(c(r.value.to)),1)]),_:2},1040)]),default:z(()=>[b(L,{locale:B(s).locale.value},{default:z(()=>[b(v,{modelValue:r.value.to,"onUpdate:modelValue":[p[3]||(p[3]=x=>r.value.to=x),p[4]||(p[4]=x=>w())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"])])):k("",!0),he("div",{style:Ue(o.value)},[r.value.loaded?k("",!0):(m(),E(M,{key:0,type:"text, image, text"})),r.value.loaded?(m(),E(B(ht),{key:1,option:l.value,theme:B(i).global.name.value==="dark"?"dark":"light",autoresize:""},null,8,["option","theme"])):k("",!0)],4)],64)}}},yt=180/Math.PI,Ee=e=>{const t=e%360;return t<0?360+t:t},bt=({x:e,y:t},n)=>{const i=n.left+n.width/2,u=n.top+n.height/2;return Math.atan2(t-u,e-i)*yt},fe=()=>{};class wt{constructor(t,n){this.active=!1,this.element=t,this.element.style.willChange="transform",this.initOptions(n),this.updateCSS(),this.bindHandlers(),this.addListeners()}get angle(){return this._angle}set angle(t){this._angle!==t&&(this._angle=Ee(t),this.updateCSS())}initOptions(t){t=t||{},this.onRotate=t.onRotate||fe,this.onDragStart=t.onDragStart||fe,this.onDragStop=t.onDragStop||fe,this._angle=t.angle||0}bindHandlers(){this.onRotationStart=this.onRotationStart.bind(this),this.onRotated=this.onRotated.bind(this),this.onRotationStop=this.onRotationStop.bind(this)}addListeners(){this.element.addEventListener("touchstart",this.onRotationStart,{passive:!0}),document.addEventListener("touchmove",this.onRotated,{passive:!1}),document.addEventListener("touchend",this.onRotationStop,{passive:!0}),document.addEventListener("touchcancel",this.onRotationStop,{passive:!0}),this.element.addEventListener("mousedown",this.onRotationStart,{passive:!0}),document.addEventListener("mousemove",this.onRotated,{passive:!1}),document.addEventListener("mouseup",this.onRotationStop,{passive:!0}),document.addEventListener("mouseleave",this.onRotationStop,{passive:!1})}removeListeners(){this.element.removeEventListener("touchstart",this.onRotationStart),document.removeEventListener("touchmove",this.onRotated),document.removeEventListener("touchend",this.onRotationStop),document.removeEventListener("touchcancel",this.onRotationStop),this.element.removeEventListener("mousedown",this.onRotationStart),document.removeEventListener("mousemove",this.onRotated),document.removeEventListener("mouseup",this.onRotationStop),document.removeEventListener("mouseleave",this.onRotationStop)}destroy(){this.onRotationStop(),this.removeListeners()}onRotationStart(t){(t.type==="touchstart"||t.button===0)&&(this.active=!0,this.onDragStart(t),this.setAngleFromEvent(t))}onRotationStop(){this.active&&(this.active=!1,this.onDragStop()),this.active=!1}onRotated(t){this.active&&(t.preventDefault(),this.setAngleFromEvent(t))}setAngleFromEvent(t){const n=t.targetTouches?t.targetTouches[0]:t,i=bt({x:n.clientX,y:n.clientY},this.element.getBoundingClientRect());this._angle=Ee(i+90),this.updateCSS(),this.onRotate(this._angle)}updateCSS(){this.element.style.transform="rotate("+this._angle+"deg)"}}const zt=["red","yellow","green","cyan","blue","magenta","red"],De={ArrowUp:(e,t)=>e+t,ArrowRight:(e,t)=>e+t,ArrowDown:(e,t)=>e-t,ArrowLeft:(e,t)=>e-t,PageUp:(e,t)=>e+t*10,PageDown:(e,t)=>e-t*10,Home:()=>0,End:()=>359},ce={name:"ColorPicker",emits:["select","input","change"],props:{hue:{default:0},saturation:{default:100},luminosity:{default:50},alpha:{default:1},step:{default:1},mouseScroll:{default:!1},variant:{default:"collapsible"},disabled:{default:!1},initiallyCollapsed:{default:!1},ariaLabel:{default:"color picker"},ariaRoledescription:{default:"radial slider"},ariaValuetext:{default:""},ariaLabelColorWell:{default:"color well"}},setup(e,{emit:t}){const n=N(null),i=N(null);let u=null;const s=e.hue+"deg",l=N(e.hue),r=N(!e.initiallyCollapsed),a=N(!e.initiallyCollapsed),o=N(!1),c=N(!1),f=N(!1),C=S(()=>`hsla(${l.value}, ${e.saturation}%, ${e.luminosity}%, ${e.alpha})`),w=S(()=>zt[Math.round(l.value/60)]);return Q(()=>e.hue,_=>{l.value=_,u.angle=_}),ge(()=>{u=new wt(i.value,{angle:l.value,onRotate(_){l.value=_,t("input",l.value)},onDragStart(){f.value=!0},onDragStop(){f.value=!1,t("change",l.value)}})}),Le(()=>{u.destroy(),u=null}),{rcp:u,el:n,rotator:i,initialAngle:s,angle:l,isPaletteIn:r,isKnobIn:a,isDragging:f,isRippling:c,isPressed:o,color:C,valuetext:w,onKeyDown:_=>{e.disabled||o.value||!a.value||!(_.key in De)||(_.preventDefault(),u.angle=De[_.key](u.angle,e.step),l.value=u.angle,t("input",l.value),t("change",l.value))},onScroll:_=>{o.value||!a.value||(_.preventDefault(),_.deltaY>0?u.angle+=e.step:u.angle-=e.step,l.value=u.angle,t("input",l.value),t("change",l.value))},selectColor:()=>{o.value=!0,r.value&&a.value?(t("select",l.value),c.value=!0):r.value=!0},togglePicker:()=>{e.variant!=="persistent"&&(a.value?a.value=!1:(a.value=!0,r.value=!0)),c.value=!1,o.value=!1},hidePalette:()=>{a.value||(r.value=!1)}}}};function kt(e,t,n,i,u,s){return m(),E("div",{ref:"el",role:"slider","aria-roledescription":n.ariaRoledescription,"aria-label":n.ariaLabel,"aria-expanded":i.isPaletteIn,"aria-valuemin":"0","aria-valuemax":"359","aria-valuenow":i.angle,"aria-valuetext":n.ariaValuetext||i.valuetext,"aria-disabled":n.disabled,class:["rcp",{dragging:i.isDragging,disabled:n.disabled}],tabindex:n.disabled?-1:0,style:{"--rcp-initial-angle":i.initialAngle},onKeyup:t[4]||(t[4]=qe((...l)=>i.selectColor&&i.selectColor(...l),["enter"])),onKeydown:t[5]||(t[5]=(...l)=>i.onKeyDown&&i.onKeyDown(...l))},[b("div",{class:["rcp__palette",i.isPaletteIn?"in":"out"]},null,2),b("div",ae({class:"rcp__rotator",style:{"pointer-events":n.disabled||i.isPressed||!i.isKnobIn?"none":null}},He(n.mouseScroll?{wheel:i.onScroll}:{}),{ref:"rotator"}),[b("div",{class:["rcp__knob",i.isKnobIn?"in":"out"],onTransitionend:t[1]||(t[1]=(...l)=>i.hidePalette&&i.hidePalette(...l))},null,34)],16),b("div",{class:["rcp__ripple",{rippling:i.isRippling}],style:{borderColor:i.color}},null,6),b("button",{type:"button",class:["rcp__well",{pressed:i.isPressed}],"aria-label":n.ariaLabelColorWell,disabled:n.disabled,tabindex:n.disabled?-1:0,style:{backgroundColor:i.color},onAnimationend:t[2]||(t[2]=(...l)=>i.togglePicker&&i.togglePicker(...l)),onClick:t[3]||(t[3]=(...l)=>i.selectColor&&i.selectColor(...l))},null,46,["aria-label","disabled","tabindex"])],46,["aria-roledescription","aria-label","aria-expanded","aria-valuenow","aria-valuetext","aria-disabled","tabindex"])}ce.render=kt;ce.install=function(e){e.component("ColorPicker",ce)};const St={class:"mt-4 mb-2"},Ct={__name:"PanelMainColorpicker",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=S(()=>n.handleDefs(t.el.picker,["cmd","current"],["",!1]));function u(r){let a=s(r,50,100),o=i.value.cmd,c=[];o=o.replace("%v",a);for(const f of t.devices)c=f.split(":"),RegExp(c[0]).test(o)&&(o=o.replace(c[0],c[1]));n.request("text",o)}function s(r,a,o){a/=100;const c=o*Math.min(a,1-a)/100,f=C=>{const w=(C+r/30)%12,g=a-c*Math.max(Math.min(w-3,9-w,1),-1);return Math.round(255*g).toString(16).padStart(2,"0")};return`${f(0)}${f(8)}${f(4)}`}function l(r){r.split(" ").length>1&&(r=r.split(" ").slice(-1)[0]),r=r.replace(/^#/,"");let a=parseInt(r,16),o=a>>16&255,c=a>>8&255,f=a&255;o/=255,c/=255,f/=255;let C=Math.max(o,c,f),w=Math.min(o,c,f),g=C-w,p=(C+w)/2,h=0,v=0;return g!==0&&(C===o?h=((c-f)/g+(c(m(),T("div",St,[b(B(ce),ae(l(i.value.current),{variant:"persistent",onChange:a[0]||(a[0]=o=>u(o))}),null,16)]))}},Et={__name:"PanelMain",props:{main:Object,levels:Array,iconmap:Object,devices:Object},setup(e){const t=G();function n(r,a){return t.handleDefs(r[a].size,["size"],[!1]).size}function i(r){let a="";return["info"].indexOf(r)!==-1&&(a="mx-2"),a}function u(r,a){return r[a]?t.handleDefs(r[a].divider,["show"],[!1]).show:!1}function s(r){return r.level?t.handleDefs(r.level.height,["height"],["64px"]).height:"64px"}function l(r){if(r==="info")return We;if(r==="btn")return Ke;if(r==="slider")return Ge;if(r==="image")return Ye;if(r==="menu")return Ze;if(r==="chart")return xt;if(r==="colorpicker")return Ct}return(r,a)=>{const o=y("v-sheet"),c=y("v-col"),f=y("v-divider"),C=y("v-row"),w=y("v-expand-transition");return m(!0),T(Z,null,_e(e.main,(g,p)=>(m(),T("div",{key:p},[b(w,null,{default:z(()=>[e.levels.indexOf(p)!==-1?(m(),E(C,{key:0,"no-gutters":"",class:"text-center align-center"},{default:z(()=>[b(o,{height:s(g,"level")},null,8,["height"]),(m(),T(Z,null,_e(["left1","left2","mid","right1","right2"],h=>(m(),T(Z,{key:h},[g.level[h]?(m(),E(c,{key:0,cols:n(g,h),class:q(i(g.level[h]))},{default:z(()=>[(m(),E(Be(l(g.level[h])),{el:g[h],iconmap:e.iconmap,devices:e.devices,height:s(g,"level")},null,8,["el","iconmap","devices","height"]))]),_:2},1032,["cols","class"])):k("",!0),u(g,h)?(m(),E(f,{key:1,vertical:""})):k("",!0)],64))),64)),u(g,"level")?(m(),E(f,{key:0})):k("",!0)]),_:2},1024)):k("",!0)]),_:2},1024)]))),128)}}},Lt={__name:"PanelCard",props:{panel:Object},setup(e){const t=e,n=G();let i=n.thread();ge(()=>n.thread(i));function u(x){let d=n.handleDefs(t.panel.status[x],["level","color","min","max","reverse"],[0,"success",0,100,!1]);return d.level=Math.round((d.level-d.min)/(d.max-d.min)*100),d}const s=S(()=>u("bar")),l=S(()=>u("bar2")),r=S(()=>n.handleDefs(t.panel.status.imageUrl,["url"],[""])),a=S(()=>n.handleDefs(t.panel.panel.sortby,["sortby"],[null])),o=S(()=>n.handleDefs(t.panel.status.title,["title"],[""])),c=N(n.handleDefs(t.panel.panel.expandable,["expandable","expanded","maximizable"],[!1,!1,!1]));Q(t.panel.main,x=>{let d=f(x);c.value.activeLevels.join("-")!==d.join("-")&&(c.value.activeLevels=d,C(!0))});function f(x){let d=[];for(const[V,O]of Object.entries(x))n.handleDefs(O.level.show,["show"],[!0]).show&&d.push(Number(V));return d}function C(x){let d=c.value,V;x?d.activeLevels=f(t.panel.main):(d.expandable&&(d.expanded=!d.expanded),d.maximizable&&(d.expanded?ne.push({name:"devices",params:{view:"panel="+t.panel.name+"=maximized"},query:ne.currentRoute.value.query}):ne.back())),d.expanded?d.levels=d.activeLevels:d.expandable||x?d.levels=[d.activeLevels[0]]:(V=d.activeLevels.indexOf(d.levels[0]),d.levels=[d.activeLevels[V+1]>=0?d.activeLevels[V+1]:d.activeLevels[0]]),d.activeLevels.length>1||d.maximizable?d.icon=d.expandable?d.expanded?"mdi-arrow-collapse":"mdi-arrow-expand":d.expanded?"":"mdi-swap-vertical":d.icon=""}function w(x){let d=n.handleDefs(t.panel.info[x],["text","icon","color"],["","",""]);return d.icon&&(d.icon=n.getIcon(d.icon,t.panel.panel.iconmap)),d}function g(x){let d=["left1","left2","mid1","mid2","right1","right2"],V=w(x);return w(d[d.indexOf(x)-1]).text&&V.text&&!V.icon?"ml-1 text-truncate":V.text?"text-truncate":""}const p=S(()=>w("left1")),h=S(()=>w("left2")),v=S(()=>w("mid1")),L=S(()=>w("mid2")),_=S(()=>w("right1")),M=S(()=>w("right2"));return C(!0),(x,d)=>{const V=y("v-progress-linear"),O=y("v-col"),A=y("v-row"),D=y("v-spacer"),F=y("v-btn"),H=y("v-card-title"),P=y("v-img"),R=y("v-sheet"),U=y("v-card-text"),I=y("v-icon"),$=y("v-system-bar"),Y=y("v-layout"),K=y("v-card");return B(n).app.isReady?(m(),E(K,{key:0,variant:"tonal"},{default:z(()=>[b(A,{"no-gutters":""},{default:z(()=>[e.panel.status.bar?(m(),E(O,{key:0},{default:z(()=>[b(V,{height:"7",modelValue:s.value.level,"onUpdate:modelValue":d[0]||(d[0]=X=>s.value.level=X),color:s.value.color,reverse:s.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):k("",!0),e.panel.status.bar2?(m(),E(O,{key:1},{default:z(()=>[b(V,{height:"7",modelValue:l.value.level,"onUpdate:modelValue":d[1]||(d[1]=X=>l.value.level=X),color:l.value.color,reverse:l.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):k("",!0)]),_:1}),b(R,{color:"secondary"},{default:z(()=>[b(P,{src:r.value.url,gradient:r.value.url?B(n).app.header.imageGradient:"",height:"48",cover:""},{default:z(()=>[b(H,null,{default:z(()=>[b(A,{"no-gutters":""},{default:z(()=>[e.panel.status.title?(m(),E(O,{key:0},{default:z(()=>[W(j(o.value.title),1)]),_:1})):k("",!0),b(D),B(n).app.settings.loglevel>6?(m(),E(O,{key:1,class:"text-right"},{default:z(()=>[W(j(a.value.sortby),1)]),_:1})):k("",!0),c.value.icon?(m(),E(O,{key:2,cols:"1",class:"text-right"},{default:z(()=>[b(F,{icon:c.value.icon,size:"small",variant:"plain",density:"compact",onClick:d[2]||(d[2]=X=>C(!1))},null,8,["icon"])]),_:1})):k("",!0)]),_:1})]),_:1})]),_:1},8,["src","gradient"])]),_:1}),b(Et,{main:e.panel.main,levels:c.value.levels,iconmap:e.panel.panel.iconmap,devices:e.panel.panel.devices},null,8,["main","levels","iconmap","devices"]),t.panel.internals?(m(),E(U,{key:0},{default:z(()=>[W(j(t.panel.internals),1)]),_:1})):k("",!0),b(Y,{style:{height:"24px"}},{default:z(()=>[b($,{color:"secondary"},{default:z(()=>[p.value.icon?(m(),E(I,{key:0,icon:p.value.icon,color:p.value.color},null,8,["icon","color"])):k("",!0),p.value.text?(m(),T("span",{key:1,class:q(g("left1"))},j(p.value.text),3)):k("",!0),h.value.icon?(m(),E(I,{key:2,icon:h.value.icon,color:h.value.color},null,8,["icon","color"])):k("",!0),h.value.text?(m(),T("span",{key:3,class:q(g("left2"))},j(h.value.text),3)):k("",!0),b(D),v.value.icon?(m(),E(I,{key:4,icon:v.value.icon,color:v.value.color},null,8,["icon","color"])):k("",!0),v.value.text?(m(),T("span",{key:5,class:q(g("mid1"))},j(v.value.text),3)):k("",!0),L.value.icon?(m(),E(I,{key:6,icon:L.value.icon,color:L.value.color},null,8,["icon","color"])):k("",!0),L.value.text?(m(),T("span",{key:7,class:q(g("mid2"))},j(L.value.text),3)):k("",!0),b(D),_.value.icon?(m(),E(I,{key:8,icon:_.value.icon,color:_.value.color},null,8,["icon","color"])):k("",!0),_.value.text?(m(),T("span",{key:9,class:q(g("right1"))},j(_.value.text),3)):k("",!0),M.value.icon?(m(),E(I,{key:10,icon:M.value.icon,color:M.value.color},null,8,["icon","color"])):k("",!0),M.value.text?(m(),T("span",{key:11,class:q(g("right2"))},j(M.value.text),3)):k("",!0)]),_:1})]),_:1})]),_:1})):k("",!0)}}};export{Lt as _}; diff --git a/www/fhemapp4/assets/PanelCard-b1e8bb33.js b/www/fhemapp4/assets/PanelCard-b1e8bb33.js new file mode 100644 index 0000000..31ea9a4 --- /dev/null +++ b/www/fhemapp4/assets/PanelCard-b1e8bb33.js @@ -0,0 +1,18 @@ +import{u as G,c as C,r as b,o as h,b as T,x as q,t as j,k as S,a as E,w as k,j as W,y as he,F as Y,e as w,z as ne,f as N,s as $,q as ae,d as _e,l as Ae,A as re,B as ie,C as Me,D as Ve,E as ke,G as ge,H as Le,m as Se,I as Pe,J as Te,h as B,K as je,L as Fe,i as Ie,p as Ne,M as Ue,N as He,O as qe,P as Be}from"./index-5e6bdbad.js";const We={__name:"PanelMainInfo",props:{el:Object,iconmap:Array,devices:Object,height:String},setup(e){const t=e,n=G(),i=C(()=>n.handleDefs(t.el.text,["text","format"],["",!t.el.text2&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),s=C(()=>n.handleDefs(t.el.text2,["text","format"],["",t.el.text&&!t.el.text3&&!t.el.icon?"text-h6":"text-caption"])),o=C(()=>n.handleDefs(t.el.text3,["text","format"],["","text-caption"])),u=C(()=>{let a=n.handleDefs(t.el.icon,["icon","color","size"],["","","x-large"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),r=C(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse","linear"],[0,"success",0,100,!1,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a});return(a,l)=>{const c=b("v-icon"),v=b("v-progress-circular"),y=b("v-progress-linear");return h(),T(Y,null,[e.el.text?(h(),T("div",{key:0,class:q(i.value.format)},j(i.value.text),3)):S("",!0),e.el.icon?(h(),E(c,{key:1,color:u.value.color,size:u.value.size},{default:k(()=>[W(j(u.value.icon),1)]),_:1},8,["color","size"])):S("",!0),e.el.status&&!r.value.linear?(h(),E(v,{key:2,width:"4",modelValue:r.value.level,"onUpdate:modelValue":l[0]||(l[0]=z=>r.value.level=z),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):S("",!0),e.el.status&&r.value.linear?(h(),E(y,{key:3,height:"7",rounded:"",modelValue:r.value.level,"onUpdate:modelValue":l[1]||(l[1]=z=>r.value.level=z),color:r.value.color,reverse:r.value.reverse},null,8,["modelValue","color","reverse"])):S("",!0),he("div",{class:q(e.el.text2?s.value.format:o.value.format)},[e.el.text2?(h(),T("span",{key:0,class:q(s.value.format)},j(s.value.text),3)):S("",!0),e.el.text3?(h(),T("span",{key:1,class:q(o.value.format)},j(o.value.text),3)):S("",!0)],2)],64)}}},Ke={__name:"PanelMainBtn",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=C(()=>{let a=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["",!1,"","text"]);return a.icon&&(a.icon=n.getIcon(a.icon,t.iconmap)),a}),s=C(()=>{let a=n.handleDefs(t.el.status,["level","color","min","max","reverse"],[0,"success",0,100,!1]);return a.level=Math.round((a.level-a.min)/(a.max-a.min)*100),a.reverse=!!a.reverse,a}),o={timer:!1,long:!1};function u(a){let l=[],c=a.cmd,v;if(a.type==="cmd"){for(const y of t.devices)l=y.split(":"),v=RegExp(l[0],"g"),v.test(c)&&(c=c.replace(v,l[1]));n.request("text",c)}a.type==="route"&&ne.push({name:"devices",params:{view:a.cmd},query:ne.currentRoute.value.query}),a.type==="url"&&window.open(a.cmd,"_self")}function r(a){let l=n.handleDefs(t.el.click,["cmd","type"],["","cmd"],!1,null,!0),c=n.handleDefs(t.el.longClick,["cmd","type"],["","cmd"],!1,null,!0),v=n.handleDefs(t.el.longRelease,["cmd","type"],["","cmd"],!1,null,!0);a==="mouseStart"&&(o.timer=setTimeout(()=>{o.long=!0,c.cmd&&u(c)},1e3)),a==="mouseEnd"&&(o.long?v.cmd&&u(v):l.cmd&&u(l),clearTimeout(o.timer),o.long=!1)}return(a,l)=>{const c=b("v-progress-linear"),v=b("v-icon"),y=b("v-btn");return h(),T(Y,null,[e.el.status?(h(),E(c,{key:0,height:"4",modelValue:s.value.level,"onUpdate:modelValue":l[0]||(l[0]=z=>s.value.level=z),color:s.value.color,reverse:s.value.reverse},null,8,["modelValue","color","reverse"])):S("",!0),w(y,{icon:"",variant:i.value.variant,disabled:i.value.disabled,color:i.value.color,onMousedown:l[1]||(l[1]=z=>r("mouseStart")),onMouseup:l[2]||(l[2]=z=>r("mouseEnd")),class:"my-2"},{default:k(()=>[w(v,{size:"large"},{default:k(()=>[W(j(i.value.icon),1)]),_:1})]),_:1},8,["variant","disabled","color"])],64)}}},Je={class:"text-white"},Ge={__name:"PanelMainSlider",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=N();function s(a){i.value=a}const o=C(()=>{let a=n.handleDefs(t.el.slider,["cmd","current","color","min","max","steps","reverse","size","vertical"],["",0,"",0,100,10,!1,4,!1],!1,null,!0);return/%v/.test(a.current)&&(a.current=a.current.replace("%v",i.value)),s(a.current),a});let u=null;function r(a){let l=o.value.cmd,c=/\./.exec(o.value.steps),v=0,y=[];c&&(v=o.value.steps.slice(c.index).length-1),l=l.replace("%v",a.toFixed(v));for(const z of t.devices)y=z.split(":"),RegExp(y[0]).test(l)&&(l=l.replace(y[0],y[1]));clearTimeout(u),u=setTimeout(()=>{n.request("text",l)},500)}return(a,l)=>{const c=b("v-slider");return h(),E(c,{modelValue:i.value,"onUpdate:modelValue":[l[0]||(l[0]=v=>i.value=v),l[1]||(l[1]=v=>r(v))],min:o.value.min,max:o.value.max,step:o.value.steps,reverse:o.value.reverse,direction:o.value.vertical?"vertical":"horizontal","track-size":o.value.size,color:o.value.color,"hide-details":"","thumb-label":""},{"thumb-label":k(({modelValue:v})=>[he("div",Je,j(v),1)]),_:1},8,["modelValue","min","max","step","reverse","direction","track-size","color"])}}},Ze={__name:"PanelMainImage",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=N(!1),s=C(()=>n.handleDefs(t.el.image,["source","height"],["",null]));return(o,u)=>{const r=b("v-skeleton-loader"),a=b("v-img");return h(),T(Y,null,[i.value?S("",!0):(h(),E(r,{key:0,type:"image"})),w(a,{src:s.value.source,height:s.value.height,onLoad:u[0]||(u[0]=l=>i.value=!0)},null,8,["src","height"])],64)}}},Ye={__name:"PanelMainMenu",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=N([]);$(t.el,r=>{o()});const s=C(()=>{let r=n.handleDefs(t.el.btn,["icon","disabled","color","variant"],["mdi-dots-vertical",!1,"","text"]);return r.icon&&(r.icon=n.getIcon(r.icon,t.iconmap)),r});async function o(){let r=n.handleDefs(t.el.menu,["name","cmd","convert"],["","",null],!0,","),a,l,c;for(const v of r){a=/^get/.test(v.name)?await u(v.name):v.name;for(const y of[",","|",` +`])RegExp(y).test(a)&&(l=y);for(const y of a.split(l))y&&(c=y,/%v/.test(v.cmd)&&v.convert==="regExp"&&(c=RegExp(y.replace(/[^a-z,^A-Z]/g,"."))),i.value.push({name:y,cmd:v.cmd.replace(/%v/g,c)}))}}async function u(r){let a=[];for(const l of t.devices)a=l.split(":"),RegExp(a[0]).test(r)&&(r=r.replace(a[0],a[1]));return n.request("text",r)}return o(),(r,a)=>{const l=b("v-icon"),c=b("v-btn"),v=b("v-list-item-title"),y=b("v-list-item"),z=b("v-list"),g=b("v-menu");return h(),E(g,null,{activator:k(({props:m})=>[w(c,ae(m,{icon:"",variant:s.value.variant,disabled:s.value.disabled||i.value.length<1,color:s.value.color,class:"my-2"}),{default:k(()=>[w(l,{size:"large"},{default:k(()=>[W(j(s.value.icon),1)]),_:1})]),_:2},1040,["variant","disabled","color"])]),default:k(()=>[w(z,null,{default:k(()=>[(h(!0),T(Y,null,_e(i.value,(m,p)=>(h(),E(y,{key:p,value:p,onClick:f=>u(m.cmd)},{default:k(()=>[w(v,null,{default:k(()=>[W(j(m.name),1)]),_:2},1024)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})}}};var de=null;function Xe(e){return de||(de=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),de(e)}var ve=null;function $e(e){ve||(ve=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),ve(e)}function Qe(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function le(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(i){n[i]=t[i]}),n}function Oe(e,t,n){var i=window.getComputedStyle(e,n||null)||{display:"none"};return i[t]}function me(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(Oe(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var et='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',pe=0,se=null;function tt(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=rt.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var i=e.offsetWidth,s=e.offsetHeight,o=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===i&&e.offsetHeight===s)||ue(e)}),u=me(e),r=u.detached,a=u.rendered;e.__resize_observer_triggered__=r===!1&&a===!1,e.__resize_observer__=o,o.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){ue(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(pe||(se=Qe(et)),it(e),e.__resize_rendered__=me(e).rendered,window.MutationObserver){var l=new MutationObserver(e.__resize_mutation_handler__);l.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=l}}e.__resize_listeners__.push(t),pe++}function nt(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",xe),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--pe&&se&&se.parentNode.removeChild(se)}}function at(e){var t=e.__resize_last__,n=t.width,i=t.height,s=e.offsetWidth,o=e.offsetHeight;return s!==n||o!==i?{width:s,height:o}:null}function rt(){var e=me(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(ye(this),this.addEventListener("scroll",xe,!0)),this.__resize_rendered__=t,ue(this))}function xe(){var e=this;ye(this),this.__resize_raf__&&$e(this.__resize_raf__),this.__resize_raf__=Xe(function(){var t=at(e);t&&(e.__resize_last__=t,ue(e))})}function ue(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function it(e){var t=Oe(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=le("div",{className:"resize-triggers"}),i=le("div",{className:"resize-expand-trigger"}),s=le("div"),o=le("div",{className:"resize-contract-trigger"});i.appendChild(s),n.appendChild(i),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:i,expandChild:s,contract:o},ye(e),e.addEventListener("scroll",xe,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function ye(e){var t=e.__resize_triggers__,n=t.expand,i=t.expandChild,s=t.contract,o=s.scrollWidth,u=s.scrollHeight,r=n.offsetWidth,a=n.offsetHeight,l=n.scrollWidth,c=n.scrollHeight;s.scrollLeft=o,s.scrollTop=u,i.style.width=r+1+"px",i.style.height=a+1+"px",n.scrollLeft=l,n.scrollTop=c}var J=function(){return J=Object.assign||function(e){for(var t,n=1,i=arguments.length;n"u"||typeof customElements>"u")return ee=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { + __dispose = null; + + disconnectedCallback() { + if (this.__dispose) { + this.__dispose(); + this.__dispose = null; + } + } +} + +if (customElements.get(tag) == null) { + customElements.define(tag, EChartsElement); +} +`)(Re)}catch{return ee=!1}return ee=!0}(),_t="ecTheme",mt="ecInitOptions",pt="ecUpdateOptions",ht=Ae({name:"echarts",props:J(J({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},st),vt),emits:{},inheritAttrs:!1,setup:function(e,t){var n=t.attrs,i=re(),s=re(),o=re(),u=re(),r=ie(_t,null),a=ie(mt,null),l=ie(pt,null),c=Me(e),v=c.autoresize,y=c.manualUpdate,z=c.loading,g=c.loadingOptions,m=C(function(){return u.value||e.option||null}),p=C(function(){return e.theme||oe(r,{})}),f=C(function(){return e.initOptions||oe(a,{})}),L=C(function(){return e.updateOptions||oe(l,{})}),_=C(function(){return function(R){var D={};for(var F in R)ct(F)||(D[F]=R[F]);return D}(n)}),M=Ve().proxy.$listeners;function x(R){if(s.value){var D=o.value=Pe(s.value,p.value,f.value);e.group&&(D.group=e.group);var F=M;F||(F={},Object.keys(n).filter(function(P){return P.indexOf("on")===0&&P.length>2}).forEach(function(P){var A=P.charAt(2).toLowerCase()+P.slice(3);A.substring(A.length-4)==="Once"&&(A="~".concat(A.substring(0,A.length-4))),F[A]=n[P]})),Object.keys(F).forEach(function(P){var A=F[P];if(A){var U=P.toLowerCase();U.charAt(0)==="~"&&(U=U.substring(1),A.__once__=!0);var I=D;if(U.indexOf("zr:")===0&&(I=D.getZr(),U=U.substring(3)),A.__once__){delete A.__once__;var Q=A;A=function(){for(var Z=[],K=0;K(z(),"height: "+(/=maximized$/.test(n.app.currentView)?window.innerHeight-250+"px":t.height)));function c(g){return o.d(g,{dateStyle:s.value?"short":"long"})}function v(g,m){let p;return r.value.from&&m&&(p=r.value.from),r.value.to&&!m&&(p=r.value.to),!p&&!isNaN(g)&&(p=(f=>new Date(f.setDate(f.getDate()+(Number(g)||0))))(new Date)),p||(p=new Date(/.*T.*/.test(g)?g:g+"T00:00:00")),!r.value.from&&m&&(r.value.from=p),!r.value.to&&!m&&(r.value.to=p),p=new Date(p.getTime()-p.getTimezoneOffset()*60*1e3),p.toISOString().split("T")[0]}async function y(){let g=n.handleDefs(t.el.serie,["data","name","digits","suffix","type"],[null,"",0,"","line"],!0),m,p,f=[],L,_,M,x,d,V=[];if(g.length>0)for(const O of g){if(/^get.*/.test(O.data)){d="time",m=O.data.split(" ");for(const R of t.devices)R.split(":")[0]===m[1]&&(m[1]=R.split(":")[1]);if(m[4]=v(m[4],!0),m[5]=v(m[5],!1),p=await n.request("text",m.join(" ")),x=[],f=p.split(` +`),f.length>0)for(const R of f)L=R.split(" "),L.length>1&&(_=new Date(L[0].replace("_","T")),M=parseFloat(L[1]).toFixed(O.digits),x.push([_,M]))}else/^\[.*\]/.test(O.data)?x=n.stringToJson(O.data):x=[n.replacer("%n("+O.digits+")",O.data,!0)];V.push({xAxisType:d,type:O.type,name:O.name,digits:O.digits,suffix:O.suffix,data:x})}return V}async function z(){let g={tooltip:{trigger:"axis"},legend:{data:[],bottom:10},backgroundColor:"rgba(255, 255, 255, 0)",grid:{top:30,bottom:60,left:60,right:60},animationDuration:300,series:[],yAxis:[],xAxis:{}},m=JSON.parse(JSON.stringify(n.getEl(t.el,["options"])||{})),p=JSON.parse(JSON.stringify(n.getEl(t.el,["options2"])||{})),f=Object.assign(g,/=maximized$/.test(n.app.currentView)&&Object.keys(p).length>0?p:m),L;r.value.fromMenu=!1,r.value.toMenu=!1,r.value.loaded=!1,a=await y();for(const[_,M]of Object.entries(a))L={formatter:x=>x.toLocaleString(o.locale.value,{minimumFractionDigits:M.digits,maximumFractionDigits:M.digits})+M.suffix},f.series[_]||(f.series[_]={}),f.yAxis[_]||(f.yAxis[_]={}),f.legend.data||(f.legend.data=[]),f.xAxis.type||(f.xAxis.type=M.xAxisType),f.yAxis[_].type||(f.yAxis[_].type="value"),f.yAxis[_].axisLabel||(f.yAxis[_].axisLabel={}),f.yAxis[_].axisLabel.formatter||(f.yAxis[_].axisLabel.formatter=L.formatter),f.legend.data[_]||(f.legend.data[_]=M.name),f.series[_].name||(f.series[_].name=M.name),f.series[_].type||(f.series[_].type=M.type),f.series[_].data||(f.series[_].data=M.data),f.series[_].detail||(f.series[_].detail={}),f.series[_].detail.formatter||(f.series[_].detail.formatter=L.formatter),f.series[_].tooltip||(f.series[_].tooltip={}),f.series[_].tooltip.valueFormatter||(f.series[_].tooltip.valueFormatter=L.formatter);n.log(7,"Chartdata chart.loaded.",f),u.value=Object.assign({},f),r.value.loaded=!0}return(g,m)=>{const p=b("v-btn"),f=b("v-date-picker"),L=b("v-locale-provider"),_=b("v-menu"),M=b("v-skeleton-loader");return h(),T(Y,null,[/=maximized$/.test(B(n).app.currentView)?(h(),T("div",gt,[w(_,{modelValue:r.value.fromMenu,"onUpdate:modelValue":m[2]||(m[2]=x=>r.value.fromMenu=x),"close-on-content-click":!1},{activator:k(({props:x})=>[w(p,ae(x,{variant:"outlined","append-icon":"mdi-calendar",class:"mr-2"}),{default:k(()=>[W(j(c(r.value.from)),1)]),_:2},1040)]),default:k(()=>[w(L,{locale:B(o).locale.value},{default:k(()=>[w(f,{modelValue:r.value.from,"onUpdate:modelValue":[m[0]||(m[0]=x=>r.value.from=x),m[1]||(m[1]=x=>z())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"]),W(" - "),w(_,{modelValue:r.value.toMenu,"onUpdate:modelValue":m[5]||(m[5]=x=>r.value.toMenu=x),"close-on-content-click":!1},{activator:k(({props:x})=>[w(p,ae(x,{variant:"outlined","append-icon":"mdi-calendar",class:"ml-2"}),{default:k(()=>[W(j(c(r.value.to)),1)]),_:2},1040)]),default:k(()=>[w(L,{locale:B(o).locale.value},{default:k(()=>[w(f,{modelValue:r.value.to,"onUpdate:modelValue":[m[3]||(m[3]=x=>r.value.to=x),m[4]||(m[4]=x=>z())],color:"secondary"},null,8,["modelValue"])]),_:1},8,["locale"])]),_:1},8,["modelValue"])])):S("",!0),he("div",{style:Ue(l.value)},[r.value.loaded?S("",!0):(h(),E(M,{key:0,type:"text, image, text"})),r.value.loaded?(h(),E(B(ht),{key:1,option:u.value,theme:B(i).global.name.value==="dark"?"dark":"light",autoresize:""},null,8,["option","theme"])):S("",!0)],4)],64)}}},yt=180/Math.PI,Ee=e=>{const t=e%360;return t<0?360+t:t},bt=({x:e,y:t},n)=>{const i=n.left+n.width/2,s=n.top+n.height/2;return Math.atan2(t-s,e-i)*yt},fe=()=>{};class wt{constructor(t,n){this.active=!1,this.element=t,this.element.style.willChange="transform",this.initOptions(n),this.updateCSS(),this.bindHandlers(),this.addListeners()}get angle(){return this._angle}set angle(t){this._angle!==t&&(this._angle=Ee(t),this.updateCSS())}initOptions(t){t=t||{},this.onRotate=t.onRotate||fe,this.onDragStart=t.onDragStart||fe,this.onDragStop=t.onDragStop||fe,this._angle=t.angle||0}bindHandlers(){this.onRotationStart=this.onRotationStart.bind(this),this.onRotated=this.onRotated.bind(this),this.onRotationStop=this.onRotationStop.bind(this)}addListeners(){this.element.addEventListener("touchstart",this.onRotationStart,{passive:!0}),document.addEventListener("touchmove",this.onRotated,{passive:!1}),document.addEventListener("touchend",this.onRotationStop,{passive:!0}),document.addEventListener("touchcancel",this.onRotationStop,{passive:!0}),this.element.addEventListener("mousedown",this.onRotationStart,{passive:!0}),document.addEventListener("mousemove",this.onRotated,{passive:!1}),document.addEventListener("mouseup",this.onRotationStop,{passive:!0}),document.addEventListener("mouseleave",this.onRotationStop,{passive:!1})}removeListeners(){this.element.removeEventListener("touchstart",this.onRotationStart),document.removeEventListener("touchmove",this.onRotated),document.removeEventListener("touchend",this.onRotationStop),document.removeEventListener("touchcancel",this.onRotationStop),this.element.removeEventListener("mousedown",this.onRotationStart),document.removeEventListener("mousemove",this.onRotated),document.removeEventListener("mouseup",this.onRotationStop),document.removeEventListener("mouseleave",this.onRotationStop)}destroy(){this.onRotationStop(),this.removeListeners()}onRotationStart(t){(t.type==="touchstart"||t.button===0)&&(this.active=!0,this.onDragStart(t),this.setAngleFromEvent(t))}onRotationStop(){this.active&&(this.active=!1,this.onDragStop()),this.active=!1}onRotated(t){this.active&&(t.preventDefault(),this.setAngleFromEvent(t))}setAngleFromEvent(t){const n=t.targetTouches?t.targetTouches[0]:t,i=bt({x:n.clientX,y:n.clientY},this.element.getBoundingClientRect());this._angle=Ee(i+90),this.updateCSS(),this.onRotate(this._angle)}updateCSS(){this.element.style.transform="rotate("+this._angle+"deg)"}}const zt=["red","yellow","green","cyan","blue","magenta","red"],De={ArrowUp:(e,t)=>e+t,ArrowRight:(e,t)=>e+t,ArrowDown:(e,t)=>e-t,ArrowLeft:(e,t)=>e-t,PageUp:(e,t)=>e+t*10,PageDown:(e,t)=>e-t*10,Home:()=>0,End:()=>359},ce={name:"ColorPicker",emits:["select","input","change"],props:{hue:{default:0},saturation:{default:100},luminosity:{default:50},alpha:{default:1},step:{default:1},mouseScroll:{default:!1},variant:{default:"collapsible"},disabled:{default:!1},initiallyCollapsed:{default:!1},ariaLabel:{default:"color picker"},ariaRoledescription:{default:"radial slider"},ariaValuetext:{default:""},ariaLabelColorWell:{default:"color well"}},setup(e,{emit:t}){const n=N(null),i=N(null);let s=null;const o=e.hue+"deg",u=N(e.hue),r=N(!e.initiallyCollapsed),a=N(!e.initiallyCollapsed),l=N(!1),c=N(!1),v=N(!1),y=C(()=>`hsla(${u.value}, ${e.saturation}%, ${e.luminosity}%, ${e.alpha})`),z=C(()=>zt[Math.round(u.value/60)]);return $(()=>e.hue,_=>{u.value=_,s.angle=_}),ge(()=>{s=new wt(i.value,{angle:u.value,onRotate(_){u.value=_,t("input",u.value)},onDragStart(){v.value=!0},onDragStop(){v.value=!1,t("change",u.value)}})}),Le(()=>{s.destroy(),s=null}),{rcp:s,el:n,rotator:i,initialAngle:o,angle:u,isPaletteIn:r,isKnobIn:a,isDragging:v,isRippling:c,isPressed:l,color:y,valuetext:z,onKeyDown:_=>{e.disabled||l.value||!a.value||!(_.key in De)||(_.preventDefault(),s.angle=De[_.key](s.angle,e.step),u.value=s.angle,t("input",u.value),t("change",u.value))},onScroll:_=>{l.value||!a.value||(_.preventDefault(),_.deltaY>0?s.angle+=e.step:s.angle-=e.step,u.value=s.angle,t("input",u.value),t("change",u.value))},selectColor:()=>{l.value=!0,r.value&&a.value?(t("select",u.value),c.value=!0):r.value=!0},togglePicker:()=>{e.variant!=="persistent"&&(a.value?a.value=!1:(a.value=!0,r.value=!0)),c.value=!1,l.value=!1},hidePalette:()=>{a.value||(r.value=!1)}}}};function kt(e,t,n,i,s,o){return h(),E("div",{ref:"el",role:"slider","aria-roledescription":n.ariaRoledescription,"aria-label":n.ariaLabel,"aria-expanded":i.isPaletteIn,"aria-valuemin":"0","aria-valuemax":"359","aria-valuenow":i.angle,"aria-valuetext":n.ariaValuetext||i.valuetext,"aria-disabled":n.disabled,class:["rcp",{dragging:i.isDragging,disabled:n.disabled}],tabindex:n.disabled?-1:0,style:{"--rcp-initial-angle":i.initialAngle},onKeyup:t[4]||(t[4]=qe((...u)=>i.selectColor&&i.selectColor(...u),["enter"])),onKeydown:t[5]||(t[5]=(...u)=>i.onKeyDown&&i.onKeyDown(...u))},[w("div",{class:["rcp__palette",i.isPaletteIn?"in":"out"]},null,2),w("div",ae({class:"rcp__rotator",style:{"pointer-events":n.disabled||i.isPressed||!i.isKnobIn?"none":null}},He(n.mouseScroll?{wheel:i.onScroll}:{}),{ref:"rotator"}),[w("div",{class:["rcp__knob",i.isKnobIn?"in":"out"],onTransitionend:t[1]||(t[1]=(...u)=>i.hidePalette&&i.hidePalette(...u))},null,34)],16),w("div",{class:["rcp__ripple",{rippling:i.isRippling}],style:{borderColor:i.color}},null,6),w("button",{type:"button",class:["rcp__well",{pressed:i.isPressed}],"aria-label":n.ariaLabelColorWell,disabled:n.disabled,tabindex:n.disabled?-1:0,style:{backgroundColor:i.color},onAnimationend:t[2]||(t[2]=(...u)=>i.togglePicker&&i.togglePicker(...u)),onClick:t[3]||(t[3]=(...u)=>i.selectColor&&i.selectColor(...u))},null,46,["aria-label","disabled","tabindex"])],46,["aria-roledescription","aria-label","aria-expanded","aria-valuenow","aria-valuetext","aria-disabled","tabindex"])}ce.render=kt;ce.install=function(e){e.component("ColorPicker",ce)};const St={class:"mt-4 mb-2"},Ct={__name:"PanelMainColorpicker",props:{el:Object,iconmap:Array,devices:Array,height:String},setup(e){const t=e,n=G(),i=C(()=>n.handleDefs(t.el.picker,["cmd","current"],["",!1]));function s(r){let a=o(r,50,100),l=i.value.cmd,c=[];l=l.replace("%v",a);for(const v of t.devices)c=v.split(":"),RegExp(c[0]).test(l)&&(l=l.replace(c[0],c[1]));n.request("text",l)}function o(r,a,l){a/=100;const c=l*Math.min(a,1-a)/100,v=y=>{const z=(y+r/30)%12,g=a-c*Math.max(Math.min(z-3,9-z,1),-1);return Math.round(255*g).toString(16).padStart(2,"0")};return`${v(0)}${v(8)}${v(4)}`}function u(r){r.split(" ").length>1&&(r=r.split(" ").slice(-1)[0]),r=r.replace(/^#/,"");let a=parseInt(r,16),l=a>>16&255,c=a>>8&255,v=a&255;l/=255,c/=255,v/=255;let y=Math.max(l,c,v),z=Math.min(l,c,v),g=y-z,m=(y+z)/2,p=0,f=0;return g!==0&&(y===l?p=((c-v)/g+(c(h(),T("div",St,[w(B(ce),ae(u(i.value.current),{variant:"persistent",onChange:a[0]||(a[0]=l=>s(l))}),null,16)]))}},Et={__name:"PanelMain",props:{main:Object,levels:Array,iconmap:Object,devices:Object},setup(e){const t=G();function n(r,a){return t.handleDefs(r[a].size,["size"],[!1]).size}function i(r){let a="";return["info"].indexOf(r)!==-1&&(a="mx-2"),a}function s(r,a){return r[a]?t.handleDefs(r[a].divider,["show"],[!1]).show:!1}function o(r){return r.level?t.handleDefs(r.level.height,["height"],["64px"]).height:"64px"}function u(r){if(r==="info")return We;if(r==="btn")return Ke;if(r==="slider")return Ge;if(r==="image")return Ze;if(r==="menu")return Ye;if(r==="chart")return xt;if(r==="colorpicker")return Ct}return(r,a)=>{const l=b("v-sheet"),c=b("v-col"),v=b("v-divider"),y=b("v-row"),z=b("v-expand-transition");return h(!0),T(Y,null,_e(e.main,(g,m)=>(h(),T("div",{key:m},[w(z,null,{default:k(()=>[e.levels.indexOf(m)!==-1?(h(),E(y,{key:0,"no-gutters":"",class:"text-center align-center"},{default:k(()=>[w(l,{height:o(g,"level")},null,8,["height"]),(h(),T(Y,null,_e(["left1","left2","mid","right1","right2"],p=>(h(),T(Y,{key:p},[g.level[p]?(h(),E(c,{key:0,cols:n(g,p),class:q(i(g.level[p]))},{default:k(()=>[(h(),E(Be(u(g.level[p])),{el:g[p],iconmap:e.iconmap,devices:e.devices,height:o(g,"level")},null,8,["el","iconmap","devices","height"]))]),_:2},1032,["cols","class"])):S("",!0),s(g,p)?(h(),E(v,{key:1,vertical:""})):S("",!0)],64))),64)),s(g,"level")?(h(),E(v,{key:0})):S("",!0)]),_:2},1024)):S("",!0)]),_:2},1024)]))),128)}}},Lt={__name:"PanelCard",props:{panel:Object},setup(e){const t=e,n=G();let i=n.thread();ge(()=>n.thread(i));function s(x){let d=n.handleDefs(t.panel.status[x],["level","color","min","max","reverse"],[0,"success",0,100,!1]);return d.level=Math.round((d.level-d.min)/(d.max-d.min)*100),d}const o=C(()=>s("bar")),u=C(()=>s("bar2")),r=C(()=>n.handleDefs(t.panel.status.imageUrl,["url"],[""])),a=C(()=>n.handleDefs(t.panel.panel.sortby,["sortby"],[null])),l=C(()=>n.handleDefs(t.panel.status.title,["title"],[""])),c=N(n.handleDefs(t.panel.panel.expandable,["expandable","expanded","maximizable"],[!1,!1,!1]));$(t.panel.main,x=>{let d=v(x);c.value.activeLevels.join("-")!==d.join("-")&&(c.value.activeLevels=d,y(!0))});function v(x){let d=[];for(const[V,O]of Object.entries(x))n.handleDefs(O.level.show,["show"],[!0]).show&&d.push(Number(V));return d}function y(x){let d=c.value,V;x?d.activeLevels=v(t.panel.main):(d.expandable&&(d.expanded=!d.expanded),d.maximizable&&(d.expanded?ne.push({name:"devices",params:{view:"panel="+t.panel.name+"=maximized"},query:ne.currentRoute.value.query}):ne.back())),d.expanded?d.levels=d.activeLevels:d.expandable||x?d.levels=[d.activeLevels[0]]:(V=d.activeLevels.indexOf(d.levels[0]),d.levels=[d.activeLevels[V+1]>=0?d.activeLevels[V+1]:d.activeLevels[0]]),d.activeLevels.length>1||d.maximizable?d.icon=d.expandable?d.expanded?"mdi-arrow-collapse":"mdi-arrow-expand":d.expanded?"":"mdi-swap-vertical":d.icon=""}function z(x){let d=n.handleDefs(t.panel.info[x],["text","icon","color"],["","",""]);return d.icon&&(d.icon=n.getIcon(d.icon,t.panel.panel.iconmap)),d}function g(x){let d=["left1","left2","mid1","mid2","right1","right2"],V=z(x);return z(d[d.indexOf(x)-1]).text&&V.text&&!V.icon?"ml-1 text-truncate":V.text?"text-truncate":""}const m=C(()=>z("left1")),p=C(()=>z("left2")),f=C(()=>z("mid1")),L=C(()=>z("mid2")),_=C(()=>z("right1")),M=C(()=>z("right2"));return y(!0),(x,d)=>{const V=b("v-progress-linear"),O=b("v-col"),R=b("v-row"),D=b("v-spacer"),F=b("v-btn"),H=b("v-card-title"),P=b("v-img"),A=b("v-sheet"),U=b("v-card-text"),I=b("v-icon"),Q=b("v-system-bar"),Z=b("v-layout"),K=b("v-card");return B(n).app.isReady?(h(),E(K,{key:0,variant:"tonal"},{default:k(()=>[w(R,{"no-gutters":""},{default:k(()=>[e.panel.status.bar?(h(),E(O,{key:0},{default:k(()=>[w(V,{height:"7",modelValue:o.value.level,"onUpdate:modelValue":d[0]||(d[0]=X=>o.value.level=X),color:o.value.color,reverse:o.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):S("",!0),e.panel.status.bar2?(h(),E(O,{key:1},{default:k(()=>[w(V,{height:"7",modelValue:u.value.level,"onUpdate:modelValue":d[1]||(d[1]=X=>u.value.level=X),color:u.value.color,reverse:u.value.reverse},null,8,["modelValue","color","reverse"])]),_:1})):S("",!0)]),_:1}),w(A,{color:"primary"},{default:k(()=>[w(P,{src:r.value.url,gradient:r.value.url?B(n).app.header.imageGradient:"",height:"48",cover:""},{default:k(()=>[w(H,null,{default:k(()=>[w(R,{"no-gutters":""},{default:k(()=>[e.panel.status.title?(h(),E(O,{key:0},{default:k(()=>[W(j(l.value.title),1)]),_:1})):S("",!0),w(D),B(n).app.settings.loglevel>6?(h(),E(O,{key:1,class:"text-right"},{default:k(()=>[W(j(a.value.sortby),1)]),_:1})):S("",!0),c.value.icon?(h(),E(O,{key:2,cols:"1",class:"text-right"},{default:k(()=>[w(F,{icon:c.value.icon,size:"small",variant:"plain",density:"compact",onClick:d[2]||(d[2]=X=>y(!1))},null,8,["icon"])]),_:1})):S("",!0)]),_:1})]),_:1})]),_:1},8,["src","gradient"])]),_:1}),w(Et,{main:e.panel.main,levels:c.value.levels,iconmap:e.panel.panel.iconmap,devices:e.panel.panel.devices},null,8,["main","levels","iconmap","devices"]),t.panel.internals?(h(),E(U,{key:0},{default:k(()=>[W(j(t.panel.internals),1)]),_:1})):S("",!0),w(Z,{style:{height:"24px"}},{default:k(()=>[w(Q,{color:"secondary"},{default:k(()=>[m.value.icon?(h(),E(I,{key:0,icon:m.value.icon,color:m.value.color},null,8,["icon","color"])):S("",!0),m.value.text?(h(),T("span",{key:1,class:q(g("left1"))},j(m.value.text),3)):S("",!0),p.value.icon?(h(),E(I,{key:2,icon:p.value.icon,color:p.value.color},null,8,["icon","color"])):S("",!0),p.value.text?(h(),T("span",{key:3,class:q(g("left2"))},j(p.value.text),3)):S("",!0),w(D),f.value.icon?(h(),E(I,{key:4,icon:f.value.icon,color:f.value.color},null,8,["icon","color"])):S("",!0),f.value.text?(h(),T("span",{key:5,class:q(g("mid1"))},j(f.value.text),3)):S("",!0),L.value.icon?(h(),E(I,{key:6,icon:L.value.icon,color:L.value.color},null,8,["icon","color"])):S("",!0),L.value.text?(h(),T("span",{key:7,class:q(g("mid2"))},j(L.value.text),3)):S("",!0),w(D),_.value.icon?(h(),E(I,{key:8,icon:_.value.icon,color:_.value.color},null,8,["icon","color"])):S("",!0),_.value.text?(h(),T("span",{key:9,class:q(g("right1"))},j(_.value.text),3)):S("",!0),M.value.icon?(h(),E(I,{key:10,icon:M.value.icon,color:M.value.color},null,8,["icon","color"])):S("",!0),M.value.text?(h(),T("span",{key:11,class:q(g("right2"))},j(M.value.text),3)):S("",!0)]),_:1})]),_:1})]),_:1})):S("",!0)}}};export{Lt as _}; diff --git a/www/fhemapp4/assets/SettingsView-2d33bec4.js b/www/fhemapp4/assets/SettingsView-fecb7ce1.js similarity index 86% rename from www/fhemapp4/assets/SettingsView-2d33bec4.js rename to www/fhemapp4/assets/SettingsView-fecb7ce1.js index ec6184c..ba3f447 100644 --- a/www/fhemapp4/assets/SettingsView-2d33bec4.js +++ b/www/fhemapp4/assets/SettingsView-fecb7ce1.js @@ -1,4 +1,4 @@ -import{u as qe,f as Ae,g as or,r as j,o as H,a as W,w as E,e as h,h as k,b as Me,F as Ke,d as Ze,i as Nn,j as $e,t as Ve,k as ee,l as Or,m as mt,c as we,n as Cr,v as wr,p as lr,q as ir,s as Dr}from"./index-d51afd91.js";import{c as An,g as Tr,r as Pr,a as Ar,u as $r,V as Vr}from"./index-f84634ce.js";import{_ as Fr}from"./PanelCard-5296e7c7.js";const ue="_app.settings.header.",jr={__name:"SettingsHeader",setup(u){const e=qe(),n={required:r=>!!r||e.replacer("%t(_app.settings.rules.required)")},l=Ae(),a=or({name:"",title:"",icon:"",cmd:""});function i(){e.app.config.header.commands||(e.app.config.header.commands=[]),e.app.config.header.commands.push(JSON.parse(JSON.stringify(a))),l.value.reset()}function t(r){e.app.config.header.commands.splice(r,1)}return(r,o)=>{const s=j("v-btn"),c=j("v-list-item"),p=j("v-text-field"),m=j("v-col"),f=j("v-checkbox"),d=j("v-row"),g=j("v-divider"),y=j("v-form"),S=j("v-list");return H(),W(S,null,{default:E(()=>[h(c,{title:r.$t(ue+"barTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[0]||(o[0]=v=>k(e).help("kopfzeile"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageUrlPlaceholder"),label:r.$t(ue+"imageUrl"),modelValue:k(e).app.config.header.imageUrl,"onUpdate:modelValue":o[1]||(o[1]=v=>k(e).app.config.header.imageUrl=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageGradientPlaceholder"),label:r.$t(ue+"imageGradient"),modelValue:k(e).app.config.header.imageGradient,"onUpdate:modelValue":o[2]||(o[2]=v=>k(e).app.config.header.imageGradient=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTimeHint"),label:r.$t(ue+"showTime"),modelValue:k(e).app.config.header.showTime,"onUpdate:modelValue":o[3]||(o[3]=v=>k(e).app.config.header.showTime=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showDateHint"),label:r.$t(ue+"showDate"),modelValue:k(e).app.config.header.showDate,"onUpdate:modelValue":o[4]||(o[4]=v=>k(e).app.config.header.showDate=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTitleHint"),label:r.$t(ue+"showTitle"),modelValue:k(e).app.config.header.showTitle,"onUpdate:modelValue":o[5]||(o[5]=v=>k(e).app.config.header.showTitle=v)},null,8,["hint","label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"darkModeOverFhem")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[6]||(o[6]=v=>k(e).help("farbschema"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",md:"4",class:"pt-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:"device-reading:value",label:"Definition",modelValue:k(e).app.config.header.darkModeOverFhem,"onUpdate:modelValue":o[7]||(o[7]=v=>k(e).app.config.header.darkModeOverFhem=v)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[8]||(o[8]=v=>k(e).help("optionsmenü"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showDarkMode"),modelValue:k(e).app.config.header.showDarkMode,"onUpdate:modelValue":o[9]||(o[9]=v=>k(e).app.config.header.showDarkMode=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showReloadPage"),modelValue:k(e).app.config.header.showReloadPage,"onUpdate:modelValue":o[10]||(o[10]=v=>k(e).app.config.header.showReloadPage=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showSettings"),modelValue:k(e).app.config.header.showSettings,"onUpdate:modelValue":o[11]||(o[11]=v=>k(e).app.config.header.showSettings=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showUpdate"),modelValue:k(e).app.config.header.showUpdate,"onUpdate:modelValue":o[12]||(o[12]=v=>k(e).app.config.header.showUpdate=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showLanguages"),modelValue:k(e).app.config.header.showLanguages,"onUpdate:modelValue":o[13]||(o[13]=v=>k(e).app.config.header.showLanguages=v)},null,8,["label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsCommandTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[14]||(o[14]=v=>k(e).help("optionsmenü-fhem-befehle"))})]),_:1},8,["title"]),(H(!0),Me(Ke,null,Ze(k(e).app.config.header.commands,(v,b)=>(H(),W(c,{key:b},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:v.name,"onUpdate:modelValue":x=>v.name=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:v.title,"onUpdate:modelValue":x=>v.title=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":v.icon,modelValue:v.icon,"onUpdate:modelValue":x=>v.icon=x},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"10",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:v.cmd,"onUpdate:modelValue":x=>v.cmd=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-delete",onClick:x=>t(b)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),h(c,null,{default:E(()=>[h(y,{ref_key:"form",ref:l},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:a.name,"onUpdate:modelValue":o[15]||(o[15]=v=>a.name=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:a.title,"onUpdate:modelValue":o[16]||(o[16]=v=>a.title=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":a.icon,modelValue:a.icon,"onUpdate:modelValue":o[17]||(o[17]=v=>a.icon=v)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(m,{cols:"9",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:a.cmd,"onUpdate:modelValue":o[18]||(o[18]=v=>a.cmd=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-cancel",onClick:o[19]||(o[19]=v=>l.value.reset())}),h(s,{variant:"text",icon:"mdi-plus",disabled:!a.name||!a.title||!a.cmd,onClick:o[20]||(o[20]=v=>i())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}},ye="_app.settings.navigation.",Rr={__name:"SettingsNavigation",setup(u){const{mobile:e}=Nn(),n=qe(),l=or({path:[],route:["navigation"],items:[],newItem:{name:null,title:null,icon:null,divider:!1,groupAsChips:!1,sort:!1,group:[]}}),a=Ae(),i={required:p=>!!p||n.replacer("%t(_app.settings.rules.required)")};function t(p){typeof p<"u"&&(l.path.push(p,"group"),l.route.push(l.items[p].name)),l.items=n.getEl(n.app.config.navigation,l.path)}function r(){let p=JSON.parse(JSON.stringify(l.newItem));n.getEl(n.app.config.navigation,l.path).push(p),t(),a.value.reset()}function o(p){n.getEl(n.app.config.navigation,l.path).splice(p,1)}function s(p){return(n.getEl(l.items[p],["group"])||[]).length}function c(){l.route.pop(),l.path.splice(-2,2),t()}return t(),(p,m)=>{const f=j("v-btn"),d=j("v-list-item"),g=j("v-text-field"),y=j("v-col"),S=j("v-checkbox"),v=j("v-icon"),b=j("v-badge"),x=j("v-row"),O=j("v-divider"),I=j("v-form"),V=j("v-list");return H(),W(V,null,{default:E(()=>[h(d,{title:p.$t(ye+"title")},{append:E(()=>[h(f,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:m[0]||(m[0]=D=>k(n).help("navigation"))})]),_:1},8,["title"]),l.path.length>0?(H(),W(d,{key:0},{default:E(()=>[h(f,{variant:"text",icon:"mdi-arrow-up-left",onClick:m[1]||(m[1]=D=>c())}),$e(" "+Ve(l.route.join(" > ")),1)]),_:1})):ee("",!0),(H(!0),Me(Ke,null,Ze(l.items,(D,C)=>(H(),W(d,{key:C},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:D.name,"onUpdate:modelValue":w=>D.name=w},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:D.title,"onUpdate:modelValue":w=>D.title=w},null,8,["placeholder","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":D.icon,modelValue:D.icon,"onUpdate:modelValue":w=>D.icon=w},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:D.groupAsChips,"onUpdate:modelValue":w=>D.groupAsChips=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:D.sort,"onUpdate:modelValue":w=>D.sort=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:D.divider,"onUpdate:modelValue":w=>D.divider=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"",onClick:w=>t(C)},{default:E(()=>[s(C)>0?(H(),W(b,{key:0,color:"success",content:s(C)},{default:E(()=>[h(v,{icon:"mdi-arrow-down-right"})]),_:2},1032,["content"])):ee("",!0),s(C)===0?(H(),W(v,{key:1,icon:"mdi-arrow-down-right"})):ee("",!0)]),_:2},1032,["onClick"]),h(f,{variant:"text",icon:"mdi-delete",onClick:w=>o(C)},null,8,["onClick"])]),_:2},1024)]),_:2},1024),k(e)?(H(),W(O,{key:0})):ee("",!0)]),_:2},1024))),128)),h(d,null,{default:E(()=>[h(I,{ref_key:"form",ref:a},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:l.newItem.name,"onUpdate:modelValue":m[2]||(m[2]=D=>l.newItem.name=D)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:l.newItem.title,"onUpdate:modelValue":m[3]||(m[3]=D=>l.newItem.title=D)},null,8,["placeholder","label","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":l.newItem.icon,modelValue:l.newItem.icon,"onUpdate:modelValue":m[4]||(m[4]=D=>l.newItem.icon=D)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:l.newItem.groupAsChips,"onUpdate:modelValue":m[5]||(m[5]=D=>l.newItem.groupAsChips=D)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:l.newItem.sort,"onUpdate:modelValue":m[6]||(m[6]=D=>l.newItem.sort=D)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:l.newItem.divider,"onUpdate:modelValue":m[7]||(m[7]=D=>l.newItem.divider=D)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"mdi-cancel",onClick:m[8]||(m[8]=D=>a.value.reset())}),h(f,{variant:"text",icon:"mdi-plus",disabled:!l.newItem.name,onClick:m[9]||(m[9]=D=>r())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}};function Gt(){return Gt=Object.assign||function(u){for(var e=1;e";return e},lineNumbersCount:function(){var e=this.codeData.split(/\r\n|\n/).length;return e}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var e=this.$refs.pre,n=this.$el.querySelector(".prism-editor__line-numbers"),l=window.getComputedStyle(e);this.$nextTick(function(){var a="border-top-left-radius",i="border-bottom-left-radius";if(n){n.style[a]=l[a],n.style[i]=l[i],e.style[a]="0",e.style[i]="0";var t=["background-color","margin-top","padding-top","font-family","font-size","line-height"];t.forEach(function(r){n.style[r]=l[r]}),n.style["margin-bottom"]="-"+l["padding-top"]}})}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var n=e.value,l=e.selectionStart,a=e.selectionEnd;this._recordChange({value:n,selectionStart:l,selectionEnd:a})}},_getLines:function(e,n){return e.substring(0,n).split(` +import{u as qe,f as Ae,g as or,r as j,o as H,a as W,w as E,e as h,h as k,b as Me,F as Ke,d as Ze,i as Nn,j as $e,t as Ve,k as ee,l as Or,m as mt,c as we,n as Cr,v as wr,p as lr,q as ir,s as Dr}from"./index-5e6bdbad.js";import{c as An,g as Tr,r as Pr,a as Ar,u as $r,V as Vr}from"./index-1473c98e.js";import{_ as Fr}from"./PanelCard-b1e8bb33.js";const ue="_app.settings.header.",jr={__name:"SettingsHeader",setup(u){const e=qe(),n={required:r=>!!r||e.replacer("%t(_app.settings.rules.required)")},l=Ae(),a=or({name:"",title:"",icon:"",cmd:""});function i(){e.app.config.header.commands||(e.app.config.header.commands=[]),e.app.config.header.commands.push(JSON.parse(JSON.stringify(a))),l.value.reset()}function t(r){e.app.config.header.commands.splice(r,1)}return(r,o)=>{const s=j("v-btn"),c=j("v-list-item"),p=j("v-text-field"),m=j("v-col"),f=j("v-checkbox"),d=j("v-row"),g=j("v-divider"),y=j("v-form"),S=j("v-list");return H(),W(S,null,{default:E(()=>[h(c,{title:r.$t(ue+"barTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[0]||(o[0]=v=>k(e).help("kopfzeile"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageUrlPlaceholder"),label:r.$t(ue+"imageUrl"),modelValue:k(e).app.config.header.imageUrl,"onUpdate:modelValue":o[1]||(o[1]=v=>k(e).app.config.header.imageUrl=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"12",lg:"4",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"imageGradientPlaceholder"),label:r.$t(ue+"imageGradient"),modelValue:k(e).app.config.header.imageGradient,"onUpdate:modelValue":o[2]||(o[2]=v=>k(e).app.config.header.imageGradient=v)},null,8,["placeholder","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTimeHint"),label:r.$t(ue+"showTime"),modelValue:k(e).app.config.header.showTime,"onUpdate:modelValue":o[3]||(o[3]=v=>k(e).app.config.header.showTime=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showDateHint"),label:r.$t(ue+"showDate"),modelValue:k(e).app.config.header.showDate,"onUpdate:modelValue":o[4]||(o[4]=v=>k(e).app.config.header.showDate=v)},null,8,["hint","label","modelValue"])]),_:1}),h(m,{cols:"6",lg:"",class:"pt-1"},{default:E(()=>[h(f,{hint:r.$t(ue+"showTitleHint"),label:r.$t(ue+"showTitle"),modelValue:k(e).app.config.header.showTitle,"onUpdate:modelValue":o[5]||(o[5]=v=>k(e).app.config.header.showTitle=v)},null,8,["hint","label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"darkModeOverFhem")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[6]||(o[6]=v=>k(e).help("farbschema"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",md:"4",class:"pt-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:"device-reading:value",label:"Definition",modelValue:k(e).app.config.header.darkModeOverFhem,"onUpdate:modelValue":o[7]||(o[7]=v=>k(e).app.config.header.darkModeOverFhem=v)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[8]||(o[8]=v=>k(e).help("optionsmenü"))})]),_:1},8,["title"]),h(c,null,{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showDarkMode"),modelValue:k(e).app.config.header.showDarkMode,"onUpdate:modelValue":o[9]||(o[9]=v=>k(e).app.config.header.showDarkMode=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showReloadPage"),modelValue:k(e).app.config.header.showReloadPage,"onUpdate:modelValue":o[10]||(o[10]=v=>k(e).app.config.header.showReloadPage=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showSettings"),modelValue:k(e).app.config.header.showSettings,"onUpdate:modelValue":o[11]||(o[11]=v=>k(e).app.config.header.showSettings=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showUpdate"),modelValue:k(e).app.config.header.showUpdate,"onUpdate:modelValue":o[12]||(o[12]=v=>k(e).app.config.header.showUpdate=v)},null,8,["label","modelValue"])]),_:1}),h(m,{cols:"6",lg:""},{default:E(()=>[h(f,{label:r.$t(ue+"showLanguages"),modelValue:k(e).app.config.header.showLanguages,"onUpdate:modelValue":o[13]||(o[13]=v=>k(e).app.config.header.showLanguages=v)},null,8,["label","modelValue"])]),_:1})]),_:1})]),_:1}),h(g),h(c,{title:r.$t(ue+"optionsCommandTitle")},{append:E(()=>[h(s,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:o[14]||(o[14]=v=>k(e).help("optionsmenü-fhem-befehle"))})]),_:1},8,["title"]),(H(!0),Me(Ke,null,Ze(k(e).app.config.header.commands,(v,b)=>(H(),W(c,{key:b},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:v.name,"onUpdate:modelValue":x=>v.name=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:v.title,"onUpdate:modelValue":x=>v.title=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":v.icon,modelValue:v.icon,"onUpdate:modelValue":x=>v.icon=x},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{cols:"10",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:v.cmd,"onUpdate:modelValue":x=>v.cmd=x},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-delete",onClick:x=>t(b)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),h(c,null,{default:E(()=>[h(y,{ref_key:"form",ref:l},{default:E(()=>[h(d,{"no-gutters":""},{default:E(()=>[h(m,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandNamePlaceholder"),label:r.$t(ue+"commandName"),rules:[n.required],modelValue:a.name,"onUpdate:modelValue":o[15]||(o[15]=v=>a.name=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandTitlePlaceholder"),label:r.$t(ue+"commandTitle"),rules:[n.required],modelValue:a.title,"onUpdate:modelValue":o[16]||(o[16]=v=>a.title=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandIconPlaceholder"),label:r.$t(ue+"commandIcon"),"append-inner-icon":a.icon,modelValue:a.icon,"onUpdate:modelValue":o[17]||(o[17]=v=>a.icon=v)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(m,{cols:"9",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(p,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:r.$t(ue+"commandCmdPlaceholder"),label:r.$t(ue+"commandCmd"),rules:[n.required],modelValue:a.cmd,"onUpdate:modelValue":o[18]||(o[18]=v=>a.cmd=v)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(m,{class:"pt-3 text-right"},{default:E(()=>[h(s,{variant:"text",icon:"mdi-cancel",onClick:o[19]||(o[19]=v=>l.value.reset())}),h(s,{variant:"text",icon:"mdi-plus",disabled:!a.name||!a.title||!a.cmd,onClick:o[20]||(o[20]=v=>i())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}},ye="_app.settings.navigation.",Rr={__name:"SettingsNavigation",setup(u){const{mobile:e}=Nn(),n=qe(),l=or({path:[],route:["navigation"],items:[],newItem:{name:null,title:null,icon:null,divider:!1,groupAsChips:!1,sort:!1,group:[]}}),a=Ae(),i={required:p=>!!p||n.replacer("%t(_app.settings.rules.required)")};function t(p){typeof p<"u"&&(l.path.push(p,"group"),l.route.push(l.items[p].name)),l.items=n.getEl(n.app.config.navigation,l.path)}function r(){let p=JSON.parse(JSON.stringify(l.newItem));n.getEl(n.app.config.navigation,l.path).push(p),t(),a.value.reset()}function o(p){n.getEl(n.app.config.navigation,l.path).splice(p,1)}function s(p){return(n.getEl(l.items[p],["group"])||[]).length}function c(){l.route.pop(),l.path.splice(-2,2),t()}return t(),(p,m)=>{const f=j("v-btn"),d=j("v-list-item"),g=j("v-text-field"),y=j("v-col"),S=j("v-checkbox"),v=j("v-icon"),b=j("v-badge"),x=j("v-row"),O=j("v-divider"),I=j("v-form"),V=j("v-list");return H(),W(V,null,{default:E(()=>[h(d,{title:p.$t(ye+"title")},{append:E(()=>[h(f,{color:"info",icon:"mdi-help-circle",variant:"text",onClick:m[0]||(m[0]=D=>k(n).help("navigation"))})]),_:1},8,["title"]),l.path.length>0?(H(),W(d,{key:0},{default:E(()=>[h(f,{variant:"text",icon:"mdi-arrow-up-left",onClick:m[1]||(m[1]=D=>c())}),$e(" "+Ve(l.route.join(" > ")),1)]),_:1})):ee("",!0),(H(!0),Me(Ke,null,Ze(l.items,(D,C)=>(H(),W(d,{key:C},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:D.name,"onUpdate:modelValue":w=>D.name=w},null,8,["placeholder","label","rules","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:D.title,"onUpdate:modelValue":w=>D.title=w},null,8,["placeholder","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":D.icon,modelValue:D.icon,"onUpdate:modelValue":w=>D.icon=w},null,8,["placeholder","label","append-inner-icon","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:D.groupAsChips,"onUpdate:modelValue":w=>D.groupAsChips=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:4,lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:D.sort,"onUpdate:modelValue":w=>D.sort=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:D.divider,"onUpdate:modelValue":w=>D.divider=w},null,8,["hint","label","modelValue","onUpdate:modelValue"])]),_:2},1024),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"",onClick:w=>t(C)},{default:E(()=>[s(C)>0?(H(),W(b,{key:0,color:"success",content:s(C)},{default:E(()=>[h(v,{icon:"mdi-arrow-down-right"})]),_:2},1032,["content"])):ee("",!0),s(C)===0?(H(),W(v,{key:1,icon:"mdi-arrow-down-right"})):ee("",!0)]),_:2},1032,["onClick"]),h(f,{variant:"text",icon:"mdi-delete",onClick:w=>o(C)},null,8,["onClick"])]),_:2},1024)]),_:2},1024),k(e)?(H(),W(O,{key:0})):ee("",!0)]),_:2},1024))),128)),h(d,null,{default:E(()=>[h(I,{ref_key:"form",ref:a},{default:E(()=>[h(x,{"no-gutters":""},{default:E(()=>[h(y,{cols:"12",lg:"2",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"namePlaceholder"),label:p.$t(ye+"name"),rules:[i.required],modelValue:l.newItem.name,"onUpdate:modelValue":m[2]||(m[2]=D=>l.newItem.name=D)},null,8,["placeholder","label","rules","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"title1Placeholder"),label:p.$t(ye+"title1"),modelValue:l.newItem.title,"onUpdate:modelValue":m[3]||(m[3]=D=>l.newItem.title=D)},null,8,["placeholder","label","modelValue"])]),_:1}),h(y,{cols:"12",lg:"3",class:"pt-3 pr-3"},{default:E(()=>[h(g,{density:"compact",variant:"outlined",clearable:"","persistent-placeholder":"",placeholder:p.$t(ye+"iconPlaceholder"),label:p.$t(ye+"icon"),"append-inner-icon":l.newItem.icon,modelValue:l.newItem.icon,"onUpdate:modelValue":m[4]||(m[4]=D=>l.newItem.icon=D)},null,8,["placeholder","label","append-inner-icon","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"groupAsChipsHint"),label:p.$t(ye+"groupAsChips"),modelValue:l.newItem.groupAsChips,"onUpdate:modelValue":m[5]||(m[5]=D=>l.newItem.groupAsChips=D)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"sortHint"),label:p.$t(ye+"sort"),modelValue:l.newItem.sort,"onUpdate:modelValue":m[6]||(m[6]=D=>l.newItem.sort=D)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{cols:"4",lg:"",class:"pt-1"},{default:E(()=>[h(S,{hint:p.$t(ye+"dividerHint"),label:p.$t(ye+"divider"),modelValue:l.newItem.divider,"onUpdate:modelValue":m[7]||(m[7]=D=>l.newItem.divider=D)},null,8,["hint","label","modelValue"])]),_:1}),h(y,{class:"pt-3 text-right"},{default:E(()=>[h(f,{variant:"text",icon:"mdi-cancel",onClick:m[8]||(m[8]=D=>a.value.reset())}),h(f,{variant:"text",icon:"mdi-plus",disabled:!l.newItem.name,onClick:m[9]||(m[9]=D=>r())},null,8,["disabled"])]),_:1})]),_:1})]),_:1},512)]),_:1})]),_:1})}}};function Gt(){return Gt=Object.assign||function(u){for(var e=1;e";return e},lineNumbersCount:function(){var e=this.codeData.split(/\r\n|\n/).length;return e}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(!(!this.lineNumbers||!this.autoStyleLineNumbers)){var e=this.$refs.pre,n=this.$el.querySelector(".prism-editor__line-numbers"),l=window.getComputedStyle(e);this.$nextTick(function(){var a="border-top-left-radius",i="border-bottom-left-radius";if(n){n.style[a]=l[a],n.style[i]=l[i],e.style[a]="0",e.style[i]="0";var t=["background-color","margin-top","padding-top","font-family","font-size","line-height"];t.forEach(function(r){n.style[r]=l[r]}),n.style["margin-bottom"]="-"+l["padding-top"]}})}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var n=e.value,l=e.selectionStart,a=e.selectionEnd;this._recordChange({value:n,selectionStart:l,selectionEnd:a})}},_getLines:function(e,n){return e.substring(0,n).split(` `)},_applyEdits:function(e){var n=this.$refs.textarea,l=this.history.stack[this.history.offset];l&&n&&(this.history.stack[this.history.offset]=Gt({},l,{selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})),this._recordChange(e),this._updateInput(e)},_recordChange:function(e,n){n===void 0&&(n=!1);var l=this.history,a=l.stack,i=l.offset;if(a.length&&i>-1){this.history.stack=a.slice(0,i+1);var t=this.history.stack.length;if(t>zn){var r=t-zn;this.history.stack=a.slice(r,t),this.history.offset=Math.max(this.history.offset-r,0)}}var o=Date.now();if(n){var s=this.history.stack[this.history.offset];if(s&&o-s.timestamp=p&&R<=m&&L.startsWith(s)?L.substring(s.length):L}).join(` `);if(t!==f){var d=c[p];this._applyEdits({value:f,selectionStart:d.startsWith(s)?r-s.length:r,selectionEnd:o-(t.length-f.length)})}}else if(r!==o){var g=this._getLines(t,r),y=g.length-1,S=this._getLines(t,o).length-1,v=g[y];this._applyEdits({value:t.split(` @@ -20,4 +20,4 @@ import{u as qe,f as Ae,g as or,r as j,o as H,a as W,w as E,e as h,h as k,b as Me In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qr="1.14.0";function st(u){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(u)}var ut=st(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Yt=st(/Edge/i),Yn=st(/firefox/i),Ht=st(/safari/i)&&!st(/chrome/i)&&!st(/android/i),pr=st(/iP(ad|od|hone)/i),_r=st(/chrome/i)&&st(/android/i),cr={capture:!1,passive:!1};function ie(u,e,n){u.addEventListener(e,n,!ut&&cr)}function oe(u,e,n){u.removeEventListener(e,n,!ut&&cr)}function pn(u,e){if(e){if(e[0]===">"&&(e=e.substring(1)),u)try{if(u.matches)return u.matches(e);if(u.msMatchesSelector)return u.msMatchesSelector(e);if(u.webkitMatchesSelector)return u.webkitMatchesSelector(e)}catch{return!1}return!1}}function ea(u){return u.host&&u!==document&&u.host.nodeType?u.host:u.parentNode}function nt(u,e,n,l){if(u){n=n||document;do{if(e!=null&&(e[0]===">"?u.parentNode===n&&pn(u,e):pn(u,e))||l&&u===n)return u;if(u===n)break}while(u=ea(u))}return null}var Xn=/\s+/g;function Ee(u,e,n){if(u&&e)if(u.classList)u.classList[n?"add":"remove"](e);else{var l=(" "+u.className+" ").replace(Xn," ").replace(" "+e+" "," ");u.className=(l+(n?" "+e:"")).replace(Xn," ")}}function Y(u,e,n){var l=u&&u.style;if(l){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(u,""):u.currentStyle&&(n=u.currentStyle),e===void 0?n:n[e];!(e in l)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),l[e]=n+(typeof n=="string"?"":"px")}}function xt(u,e){var n="";if(typeof u=="string")n=u;else do{var l=Y(u,"transform");l&&l!=="none"&&(n=l+" "+n)}while(!e&&(u=u.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function fr(u,e,n){if(u){var l=u.getElementsByTagName(e),a=0,i=l.length;if(n)for(;a=i:t=a<=i,!t)return l;if(l===lt())break;l=ft(l,!1)}return!1}function Dt(u,e,n,l){for(var a=0,i=0,t=u.children;i2&&arguments[2]!==void 0?arguments[2]:{},a=l.evt,i=Wr(l,ia);Xt.pluginEvent.bind(Q)(e,n,it({dragEl:G,parentEl:Ie,ghostEl:re,rootEl:be,nextEl:bt,lastDownEl:on,cloneEl:Oe,cloneHidden:ct,dragStarted:Ut,putSortable:Ne,activeSortable:Q.active,originalEvent:a,oldIndex:wt,oldDraggableIndex:kt,newIndex:Ye,newDraggableIndex:pt,hideGhostForTarget:br,unhideGhostForTarget:xr,cloneNowHidden:function(){ct=!0},cloneNowShown:function(){ct=!1},dispatchSortableEvent:function(r){Ge({sortable:n,name:r,originalEvent:a})}},i))};function Ge(u){Mt(it({putSortable:Ne,cloneEl:Oe,targetEl:G,rootEl:be,oldIndex:wt,oldDraggableIndex:kt,newIndex:Ye,newDraggableIndex:pt},u))}var G,Ie,re,be,bt,on,Oe,ct,wt,Ye,kt,pt,qt,Ne,Ct=!1,cn=!1,fn=[],gt,et,In,On,qn,_n,Ut,It,zt,Wt=!1,_t=!1,ln,Ue,Cn=[],Vn=!1,vn=[],gn=typeof document<"u",en=pr,er=Yt||ut?"cssFloat":"float",sa=gn&&!_r&&!pr&&"draggable"in document.createElement("div"),gr=function(){if(gn){if(ut)return!1;var u=document.createElement("x");return u.style.cssText="pointer-events:auto",u.style.pointerEvents==="auto"}}(),hr=function(e,n){var l=Y(e),a=parseInt(l.width)-parseInt(l.paddingLeft)-parseInt(l.paddingRight)-parseInt(l.borderLeftWidth)-parseInt(l.borderRightWidth),i=Dt(e,0,n),t=Dt(e,1,n),r=i&&Y(i),o=t&&Y(t),s=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+xe(i).width,c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+xe(t).width;if(l.display==="flex")return l.flexDirection==="column"||l.flexDirection==="column-reverse"?"vertical":"horizontal";if(l.display==="grid")return l.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&r.float&&r.float!=="none"){var p=r.float==="left"?"left":"right";return t&&(o.clear==="both"||o.clear===p)?"vertical":"horizontal"}return i&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||s>=a&&l[er]==="none"||t&&l[er]==="none"&&s+c>a)?"vertical":"horizontal"},ua=function(e,n,l){var a=l?e.left:e.top,i=l?e.right:e.bottom,t=l?e.width:e.height,r=l?n.left:n.top,o=l?n.right:n.bottom,s=l?n.width:n.height;return a===r||i===o||a+t/2===r+s/2},da=function(e,n){var l;return fn.some(function(a){var i=a[Le].options.emptyInsertThreshold;if(!(!i||Mn(a))){var t=xe(a),r=e>=t.left-i&&e<=t.right+i,o=n>=t.top-i&&n<=t.bottom+i;if(r&&o)return l=a}}),l},yr=function(e){function n(i,t){return function(r,o,s,c){var p=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(i==null&&(t||p))return!0;if(i==null||i===!1)return!1;if(t&&i==="clone")return i;if(typeof i=="function")return n(i(r,o,s,c),t)(r,o,s,c);var m=(t?r:o).options.group.name;return i===!0||typeof i=="string"&&i===m||i.join&&i.indexOf(m)>-1}}var l={},a=e.group;(!a||an(a)!="object")&&(a={name:a}),l.name=a.name,l.checkPull=n(a.pull,!0),l.checkPut=n(a.put),l.revertClone=a.revertClone,e.group=l},br=function(){!gr&&re&&Y(re,"display","none")},xr=function(){!gr&&re&&Y(re,"display","")};gn&&document.addEventListener("click",function(u){if(cn)return u.preventDefault(),u.stopPropagation&&u.stopPropagation(),u.stopImmediatePropagation&&u.stopImmediatePropagation(),cn=!1,!1},!0);var ht=function(e){if(G){e=e.touches?e.touches[0]:e;var n=da(e.clientX,e.clientY);if(n){var l={};for(var a in e)e.hasOwnProperty(a)&&(l[a]=e[a]);l.target=l.rootEl=n,l.preventDefault=void 0,l.stopPropagation=void 0,n[Le]._onDragOver(l)}}},pa=function(e){G&&G.parentNode[Le]._isOutsideThisEl(e.target)};function Q(u,e){if(!(u&&u.nodeType&&u.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(u));this.el=u,this.options=e=Qe({},e),u[Le]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(u.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return hr(u,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,r){t.setData("Text",r.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Q.supportPointer!==!1&&"PointerEvent"in window&&!Ht,emptyInsertThreshold:5};Xt.initializePlugins(this,u,n);for(var l in n)!(l in e)&&(e[l]=n[l]);yr(e);for(var a in this)a.charAt(0)==="_"&&typeof this[a]=="function"&&(this[a]=this[a].bind(this));this.nativeDraggable=e.forceFallback?!1:sa,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?ie(u,"pointerdown",this._onTapStart):(ie(u,"mousedown",this._onTapStart),ie(u,"touchstart",this._onTapStart)),this.nativeDraggable&&(ie(u,"dragover",this),ie(u,"dragenter",this)),fn.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Qe(this,aa())}Q.prototype={constructor:Q,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(It=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,G):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,l=this.el,a=this.options,i=a.preventOnFilter,t=e.type,r=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,o=(r||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||o,c=a.filter;if(ba(l),!G&&!(/mousedown|pointerdown/.test(t)&&e.button!==0||a.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Ht&&o&&o.tagName.toUpperCase()==="SELECT")&&(o=nt(o,a.draggable,l,!1),!(o&&o.animated)&&on!==o)){if(wt=Ce(o),kt=Ce(o,a.draggable),typeof c=="function"){if(c.call(this,e,o,this)){Ge({sortable:n,rootEl:s,name:"filter",targetEl:o,toEl:l,fromEl:l}),Be("filter",n,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(p){if(p=nt(s,p.trim(),l,!1),p)return Ge({sortable:n,rootEl:p,name:"filter",targetEl:o,fromEl:l,toEl:l}),Be("filter",n,{evt:e}),!0}),c)){i&&e.cancelable&&e.preventDefault();return}a.handle&&!nt(s,a.handle,l,!1)||this._prepareDragStart(e,r,o)}}},_prepareDragStart:function(e,n,l){var a=this,i=a.el,t=a.options,r=i.ownerDocument,o;if(l&&!G&&l.parentNode===i){var s=xe(l);if(be=i,G=l,Ie=G.parentNode,bt=G.nextSibling,on=l,qt=t.group,Q.dragged=G,gt={target:G,clientX:(n||e).clientX,clientY:(n||e).clientY},qn=gt.clientX-s.left,_n=gt.clientY-s.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,G.style["will-change"]="all",o=function(){if(Be("delayEnded",a,{evt:e}),Q.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!Yn&&a.nativeDraggable&&(G.draggable=!0),a._triggerDragStart(e,n),Ge({sortable:a,name:"choose",originalEvent:e}),Ee(G,t.chosenClass,!0)},t.ignore.split(",").forEach(function(c){fr(G,c.trim(),wn)}),ie(r,"dragover",ht),ie(r,"mousemove",ht),ie(r,"touchmove",ht),ie(r,"mouseup",a._onDrop),ie(r,"touchend",a._onDrop),ie(r,"touchcancel",a._onDrop),Yn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),Be("delayStart",this,{evt:e}),t.delay&&(!t.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Yt||ut))){if(Q.eventCanceled){this._onDrop();return}ie(r,"mouseup",a._disableDelayedDrag),ie(r,"touchend",a._disableDelayedDrag),ie(r,"touchcancel",a._disableDelayedDrag),ie(r,"mousemove",a._delayedDragTouchMoveHandler),ie(r,"touchmove",a._delayedDragTouchMoveHandler),t.supportPointer&&ie(r,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(o,t.delay)}else o()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&wn(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;oe(e,"mouseup",this._disableDelayedDrag),oe(e,"touchend",this._disableDelayedDrag),oe(e,"touchcancel",this._disableDelayedDrag),oe(e,"mousemove",this._delayedDragTouchMoveHandler),oe(e,"touchmove",this._delayedDragTouchMoveHandler),oe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?ie(document,"pointermove",this._onTouchMove):n?ie(document,"touchmove",this._onTouchMove):ie(document,"mousemove",this._onTouchMove):(ie(G,"dragend",this),ie(be,"dragstart",this._onDragStart));try{document.selection?sn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(Ct=!1,be&&G){Be("dragStarted",this,{evt:n}),this.nativeDraggable&&ie(document,"dragover",pa);var l=this.options;!e&&Ee(G,l.dragClass,!1),Ee(G,l.ghostClass,!0),Q.active=this,e&&this._appendGhost(),Ge({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(et){this._lastX=et.clientX,this._lastY=et.clientY,br();for(var e=document.elementFromPoint(et.clientX,et.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(et.clientX,et.clientY),e!==n);)n=e;if(G.parentNode[Le]._isOutsideThisEl(e),n)do{if(n[Le]){var l=void 0;if(l=n[Le]._onDragOver({clientX:et.clientX,clientY:et.clientY,target:e,rootEl:n}),l&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);xr()}},_onTouchMove:function(e){if(gt){var n=this.options,l=n.fallbackTolerance,a=n.fallbackOffset,i=e.touches?e.touches[0]:e,t=re&&xt(re,!0),r=re&&t&&t.a,o=re&&t&&t.d,s=en&&Ue&&Zn(Ue),c=(i.clientX-gt.clientX+a.x)/(r||1)+(s?s[0]-Cn[0]:0)/(r||1),p=(i.clientY-gt.clientY+a.y)/(o||1)+(s?s[1]-Cn[1]:0)/(o||1);if(!Q.active&&!Ct){if(l&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(Ge({rootEl:Ie,name:"add",toEl:Ie,fromEl:be,originalEvent:e}),Ge({sortable:this,name:"remove",toEl:Ie,originalEvent:e}),Ge({rootEl:Ie,name:"sort",toEl:Ie,fromEl:be,originalEvent:e}),Ge({sortable:this,name:"sort",toEl:Ie,originalEvent:e})),Ne&&Ne.save()):Ye!==wt&&Ye>=0&&(Ge({sortable:this,name:"update",toEl:Ie,originalEvent:e}),Ge({sortable:this,name:"sort",toEl:Ie,originalEvent:e})),Q.active&&((Ye==null||Ye===-1)&&(Ye=wt,pt=kt),Ge({sortable:this,name:"end",toEl:Ie,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Be("nulling",this),be=G=Ie=re=bt=Oe=on=ct=gt=et=Ut=Ye=pt=wt=kt=It=zt=Ne=qt=Q.dragged=Q.ghost=Q.clone=Q.active=null,vn.forEach(function(e){e.checked=!0}),vn.length=In=On=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":G&&(this._onDragOver(e),ca(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,l=this.el.children,a=0,i=l.length,t=this.options;al.right+a||u.clientX<=l.right&&u.clientY>l.bottom&&u.clientX>=l.left:u.clientX>l.right&&u.clientY>l.top||u.clientX<=l.right&&u.clientY>l.bottom+a}function ga(u,e,n,l,a,i,t,r){var o=l?u.clientY:u.clientX,s=l?n.height:n.width,c=l?n.top:n.left,p=l?n.bottom:n.right,m=!1;if(!t){if(r&&lnc+s*i/2:op-ln)return-zt}else if(o>c+s*(1-a)/2&&op-s*i/2)?o>c+s/2?1:-1:0}function ha(u){return Ce(G)1&&(ne.forEach(function(r){i.addAnimationState({target:r,rect:ke?xe(r):t}),Sn(r),r.fromRect=t,l.removeAnimationState(r)}),ke=!1,Oa(!this.options.removeCloneOnHide,a))},dragOverCompleted:function(n){var l=n.sortable,a=n.isOwner,i=n.insertion,t=n.activeSortable,r=n.parentEl,o=n.putSortable,s=this.options;if(i){if(a&&t._hideClone(),Rt=!1,s.animation&&ne.length>1&&(ke||!a&&!t.options.sort&&!o)){var c=xe(he,!1,!0,!0);ne.forEach(function(m){m!==he&&(Qn(m,c),r.appendChild(m))}),ke=!0}if(!a)if(ke||rn(),ne.length>1){var p=nn;t._showClone(l),t.options.animation&&!nn&&p&&We.forEach(function(m){t.addAnimationState({target:m,rect:Nt}),m.fromRect=Nt,m.thisAnimationDuration=null})}else t._showClone(l)}},dragOverAnimationCapture:function(n){var l=n.dragRect,a=n.isOwner,i=n.activeSortable;if(ne.forEach(function(r){r.thisAnimationDuration=null}),i.options.animation&&!a&&i.multiDrag.isMultiDrag){Nt=Qe({},l);var t=xt(he,!0);Nt.top-=t.f,Nt.left-=t.e}},dragOverAnimationComplete:function(){ke&&(ke=!1,rn())},drop:function(n){var l=n.originalEvent,a=n.rootEl,i=n.parentEl,t=n.sortable,r=n.dispatchSortableEvent,o=n.oldIndex,s=n.putSortable,c=s||this.sortable;if(l){var p=this.options,m=i.children;if(!Ot)if(p.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ee(he,p.selectedClass,!~ne.indexOf(he)),~ne.indexOf(he))ne.splice(ne.indexOf(he),1),jt=null,Mt({sortable:t,rootEl:a,name:"deselect",targetEl:he,originalEvt:l});else{if(ne.push(he),Mt({sortable:t,rootEl:a,name:"select",targetEl:he,originalEvt:l}),l.shiftKey&&jt&&t.el.contains(jt)){var f=Ce(jt),d=Ce(he);if(~f&&~d&&f!==d){var g,y;for(d>f?(y=f,g=d):(y=d,g=f+1);y1){var S=xe(he),v=Ce(he,":not(."+this.options.selectedClass+")");if(!Rt&&p.animation&&(he.thisAnimationDuration=null),c.captureAnimationState(),!Rt&&(p.animation&&(he.fromRect=S,ne.forEach(function(x){if(x.thisAnimationDuration=null,x!==he){var O=ke?xe(x):S;x.fromRect=O,c.addAnimationState({target:x,rect:O})}})),rn(),ne.forEach(function(x){m[v]?i.insertBefore(x,m[v]):i.appendChild(x),v++}),o===Ce(he))){var b=!1;ne.forEach(function(x){if(x.sortableIndex!==Ce(x)){b=!0;return}}),b&&r("update")}ne.forEach(function(x){Sn(x)}),c.animateAll()}tt=c}(a===i||s&&s.lastPutMode!=="clone")&&We.forEach(function(x){x.parentNode&&x.parentNode.removeChild(x)})}},nullingGlobal:function(){this.isMultiDrag=Ot=!1,We.length=0},destroyGlobal:function(){this._deselectMultiDrag(),oe(document,"pointerup",this._deselectMultiDrag),oe(document,"mouseup",this._deselectMultiDrag),oe(document,"touchend",this._deselectMultiDrag),oe(document,"keydown",this._checkKeyDown),oe(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof Ot<"u"&&Ot)&&tt===this.sortable&&!(n&&nt(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;ne.length;){var l=ne[0];Ee(l,this.options.selectedClass,!1),ne.shift(),Mt({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:l,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Qe(u,{pluginName:"multiDrag",utils:{select:function(n){var l=n.parentNode[Le];!l||!l.options.multiDrag||~ne.indexOf(n)||(tt&&tt!==l&&(tt.multiDrag._deselectMultiDrag(),tt=l),Ee(n,l.options.selectedClass,!0),ne.push(n))},deselect:function(n){var l=n.parentNode[Le],a=ne.indexOf(n);!l||!l.options.multiDrag||!~a||(Ee(n,l.options.selectedClass,!1),ne.splice(a,1))}},eventProperties:function(){var n=this,l=[],a=[];return ne.forEach(function(i){l.push({multiDragElement:i,index:i.sortableIndex});var t;ke&&i!==he?t=-1:ke?t=Ce(i,":not(."+n.options.selectedClass+")"):t=Ce(i),a.push({multiDragElement:i,index:t})}),{items:Yr(ne),clones:[].concat(We),oldIndicies:l,newIndicies:a}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function Oa(u,e){ne.forEach(function(n,l){var a=e.children[n.sortableIndex+(u?Number(l):0)];a?e.insertBefore(n,a):e.appendChild(n)})}function nr(u,e){We.forEach(function(n,l){var a=e.children[n.sortableIndex+(u?Number(l):0)];a?e.insertBefore(n,a):e.appendChild(n)})}function rn(){ne.forEach(function(u){u!==he&&u.parentNode&&u.parentNode.removeChild(u)})}Q.mount(new xa);Q.mount(Kn,Ln);const Ca=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:Ia,Sortable:Q,Swap:Sa,default:Q},Symbol.toStringTag,{value:"Module"})),wa=Tr(Ca);(function(u,e){(function(l,a){u.exports=a(Pr,wa)})(typeof self<"u"?self:An,function(n,l){return function(a){var i={};function t(r){if(i[r])return i[r].exports;var o=i[r]={i:r,l:!1,exports:{}};return a[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=a,t.c=i,t.d=function(r,o,s){t.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:s})},t.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,o){if(o&1&&(r=t(r)),o&8||o&4&&typeof r=="object"&&r&&r.__esModule)return r;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:r}),o&2&&typeof r!="string")for(var c in r)t.d(s,c,(function(p){return r[p]}).bind(null,c));return s},t.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(o,"a",o),o},t.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},t.p="",t(t.s="fb15")}({"00ee":function(a,i,t){var r=t("b622"),o=r("toStringTag"),s={};s[o]="z",a.exports=String(s)==="[object z]"},"0366":function(a,i,t){var r=t("1c0b");a.exports=function(o,s,c){if(r(o),s===void 0)return o;switch(c){case 0:return function(){return o.call(s)};case 1:return function(p){return o.call(s,p)};case 2:return function(p,m){return o.call(s,p,m)};case 3:return function(p,m,f){return o.call(s,p,m,f)}}return function(){return o.apply(s,arguments)}}},"057f":function(a,i,t){var r=t("fc6a"),o=t("241c").f,s={}.toString,c=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],p=function(m){try{return o(m)}catch{return c.slice()}};a.exports.f=function(f){return c&&s.call(f)=="[object Window]"?p(f):o(r(f))}},"06cf":function(a,i,t){var r=t("83ab"),o=t("d1e7"),s=t("5c6c"),c=t("fc6a"),p=t("c04e"),m=t("5135"),f=t("0cfb"),d=Object.getOwnPropertyDescriptor;i.f=r?d:function(y,S){if(y=c(y),S=p(S,!0),f)try{return d(y,S)}catch{}if(m(y,S))return s(!o.f.call(y,S),y[S])}},"0cfb":function(a,i,t){var r=t("83ab"),o=t("d039"),s=t("cc12");a.exports=!r&&!o(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(a,i,t){var r=t("23e7"),o=t("d58f").left,s=t("a640"),c=t("ae40"),p=s("reduce"),m=c("reduce",{1:0});r({target:"Array",proto:!0,forced:!p||!m},{reduce:function(d){return o(this,d,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(a,i,t){var r=t("c6b6"),o=t("9263");a.exports=function(s,c){var p=s.exec;if(typeof p=="function"){var m=p.call(s,c);if(typeof m!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return m}if(r(s)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return o.call(s,c)}},"159b":function(a,i,t){var r=t("da84"),o=t("fdbc"),s=t("17c2"),c=t("9112");for(var p in o){var m=r[p],f=m&&m.prototype;if(f&&f.forEach!==s)try{c(f,"forEach",s)}catch{f.forEach=s}}},"17c2":function(a,i,t){var r=t("b727").forEach,o=t("a640"),s=t("ae40"),c=o("forEach"),p=s("forEach");a.exports=!c||!p?function(f){return r(this,f,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(a,i,t){var r=t("d066");a.exports=r("document","documentElement")},"1c0b":function(a,i){a.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(a,i,t){var r=t("b622"),o=r("iterator"),s=!1;try{var c=0,p={next:function(){return{done:!!c++}},return:function(){s=!0}};p[o]=function(){return this},Array.from(p,function(){throw 2})}catch{}a.exports=function(m,f){if(!f&&!s)return!1;var d=!1;try{var g={};g[o]=function(){return{next:function(){return{done:d=!0}}}},m(g)}catch{}return d}},"1d80":function(a,i){a.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}},"1dde":function(a,i,t){var r=t("d039"),o=t("b622"),s=t("2d00"),c=o("species");a.exports=function(p){return s>=51||!r(function(){var m=[],f=m.constructor={};return f[c]=function(){return{foo:1}},m[p](Boolean).foo!==1})}},"23cb":function(a,i,t){var r=t("a691"),o=Math.max,s=Math.min;a.exports=function(c,p){var m=r(c);return m<0?o(m+p,0):s(m,p)}},"23e7":function(a,i,t){var r=t("da84"),o=t("06cf").f,s=t("9112"),c=t("6eeb"),p=t("ce4e"),m=t("e893"),f=t("94ca");a.exports=function(d,g){var y=d.target,S=d.global,v=d.stat,b,x,O,I,V,D;if(S?x=r:v?x=r[y]||p(y,{}):x=(r[y]||{}).prototype,x)for(O in g){if(V=g[O],d.noTargetGet?(D=o(x,O),I=D&&D.value):I=x[O],b=f(S?O:y+(v?".":"#")+O,d.forced),!b&&I!==void 0){if(typeof V==typeof I)continue;m(V,I)}(d.sham||I&&I.sham)&&s(V,"sham",!0),c(x,O,V,d)}}},"241c":function(a,i,t){var r=t("ca84"),o=t("7839"),s=o.concat("length","prototype");i.f=Object.getOwnPropertyNames||function(p){return r(p,s)}},"25f0":function(a,i,t){var r=t("6eeb"),o=t("825a"),s=t("d039"),c=t("ad6d"),p="toString",m=RegExp.prototype,f=m[p],d=s(function(){return f.call({source:"a",flags:"b"})!="/a/b"}),g=f.name!=p;(d||g)&&r(RegExp.prototype,p,function(){var S=o(this),v=String(S.source),b=S.flags,x=String(b===void 0&&S instanceof RegExp&&!("flags"in m)?c.call(S):b);return"/"+v+"/"+x},{unsafe:!0})},"2ca0":function(a,i,t){var r=t("23e7"),o=t("06cf").f,s=t("50c4"),c=t("5a34"),p=t("1d80"),m=t("ab13"),f=t("c430"),d="".startsWith,g=Math.min,y=m("startsWith"),S=!f&&!y&&!!function(){var v=o(String.prototype,"startsWith");return v&&!v.writable}();r({target:"String",proto:!0,forced:!S&&!y},{startsWith:function(b){var x=String(p(this));c(b);var O=s(g(arguments.length>1?arguments[1]:void 0,x.length)),I=String(b);return d?d.call(x,I,O):x.slice(O,O+I.length)===I}})},"2d00":function(a,i,t){var r=t("da84"),o=t("342f"),s=r.process,c=s&&s.versions,p=c&&c.v8,m,f;p?(m=p.split("."),f=m[0]+m[1]):o&&(m=o.match(/Edge\/(\d+)/),(!m||m[1]>=74)&&(m=o.match(/Chrome\/(\d+)/),m&&(f=m[1]))),a.exports=f&&+f},"342f":function(a,i,t){var r=t("d066");a.exports=r("navigator","userAgent")||""},"35a1":function(a,i,t){var r=t("f5df"),o=t("3f8c"),s=t("b622"),c=s("iterator");a.exports=function(p){if(p!=null)return p[c]||p["@@iterator"]||o[r(p)]}},"37e8":function(a,i,t){var r=t("83ab"),o=t("9bf2"),s=t("825a"),c=t("df75");a.exports=r?Object.defineProperties:function(m,f){s(m);for(var d=c(f),g=d.length,y=0,S;g>y;)o.f(m,S=d[y++],f[S]);return m}},"3bbe":function(a,i,t){var r=t("861d");a.exports=function(o){if(!r(o)&&o!==null)throw TypeError("Can't set "+String(o)+" as a prototype");return o}},"3ca3":function(a,i,t){var r=t("6547").charAt,o=t("69f3"),s=t("7dd0"),c="String Iterator",p=o.set,m=o.getterFor(c);s(String,"String",function(f){p(this,{type:c,string:String(f),index:0})},function(){var d=m(this),g=d.string,y=d.index,S;return y>=g.length?{value:void 0,done:!0}:(S=r(g,y),d.index+=S.length,{value:S,done:!1})})},"3f8c":function(a,i){a.exports={}},4160:function(a,i,t){var r=t("23e7"),o=t("17c2");r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},"428f":function(a,i,t){var r=t("da84");a.exports=r},"44ad":function(a,i,t){var r=t("d039"),o=t("c6b6"),s="".split;a.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(c){return o(c)=="String"?s.call(c,""):Object(c)}:Object},"44d2":function(a,i,t){var r=t("b622"),o=t("7c73"),s=t("9bf2"),c=r("unscopables"),p=Array.prototype;p[c]==null&&s.f(p,c,{configurable:!0,value:o(null)}),a.exports=function(m){p[c][m]=!0}},"44e7":function(a,i,t){var r=t("861d"),o=t("c6b6"),s=t("b622"),c=s("match");a.exports=function(p){var m;return r(p)&&((m=p[c])!==void 0?!!m:o(p)=="RegExp")}},4930:function(a,i,t){var r=t("d039");a.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},"4d64":function(a,i,t){var r=t("fc6a"),o=t("50c4"),s=t("23cb"),c=function(p){return function(m,f,d){var g=r(m),y=o(g.length),S=s(d,y),v;if(p&&f!=f){for(;y>S;)if(v=g[S++],v!=v)return!0}else for(;y>S;S++)if((p||S in g)&&g[S]===f)return p||S||0;return!p&&-1}};a.exports={includes:c(!0),indexOf:c(!1)}},"4de4":function(a,i,t){var r=t("23e7"),o=t("b727").filter,s=t("1dde"),c=t("ae40"),p=s("filter"),m=c("filter");r({target:"Array",proto:!0,forced:!p||!m},{filter:function(d){return o(this,d,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(a,i,t){var r=t("0366"),o=t("7b0b"),s=t("9bdd"),c=t("e95a"),p=t("50c4"),m=t("8418"),f=t("35a1");a.exports=function(g){var y=o(g),S=typeof this=="function"?this:Array,v=arguments.length,b=v>1?arguments[1]:void 0,x=b!==void 0,O=f(y),I=0,V,D,C,w,T,L;if(x&&(b=r(b,v>2?arguments[2]:void 0,2)),O!=null&&!(S==Array&&c(O)))for(w=O.call(y),T=w.next,D=new S;!(C=T.call(w)).done;I++)L=x?s(w,b,[C.value,I],!0):C.value,m(D,I,L);else for(V=p(y.length),D=new S(V);V>I;I++)L=x?b(y[I],I):y[I],m(D,I,L);return D.length=I,D}},"4fad":function(a,i,t){var r=t("23e7"),o=t("6f53").entries;r({target:"Object",stat:!0},{entries:function(c){return o(c)}})},"50c4":function(a,i,t){var r=t("a691"),o=Math.min;a.exports=function(s){return s>0?o(r(s),9007199254740991):0}},5135:function(a,i){var t={}.hasOwnProperty;a.exports=function(r,o){return t.call(r,o)}},5319:function(a,i,t){var r=t("d784"),o=t("825a"),s=t("7b0b"),c=t("50c4"),p=t("a691"),m=t("1d80"),f=t("8aa5"),d=t("14c3"),g=Math.max,y=Math.min,S=Math.floor,v=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g,x=function(O){return O===void 0?O:String(O)};r("replace",2,function(O,I,V,D){var C=D.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,w=D.REPLACE_KEEPS_$0,T=C?"$":"$0";return[function(N,K){var M=m(this),P=N==null?void 0:N[O];return P!==void 0?P.call(N,M,K):I.call(String(M),N,K)},function(R,N){if(!C&&w||typeof N=="string"&&N.indexOf(T)===-1){var K=V(I,R,this,N);if(K.done)return K.value}var M=o(R),P=String(this),B=typeof N=="function";B||(N=String(N));var te=M.global;if(te){var ge=M.unicode;M.lastIndex=0}for(var fe=[];;){var le=d(M,P);if(le===null||(fe.push(le),!te))break;var Se=String(le[0]);Se===""&&(M.lastIndex=f(P,c(M.lastIndex),ge))}for(var ve="",J=0,pe=0;pe=J&&(ve+=P.slice(J,je)+De,J=je+me.length)}return ve+P.slice(J)}];function L(R,N,K,M,P,B){var te=K+R.length,ge=M.length,fe=b;return P!==void 0&&(P=s(P),fe=v),I.call(B,fe,function(le,Se){var ve;switch(Se.charAt(0)){case"$":return"$";case"&":return R;case"`":return N.slice(0,K);case"'":return N.slice(te);case"<":ve=P[Se.slice(1,-1)];break;default:var J=+Se;if(J===0)return le;if(J>ge){var pe=S(J/10);return pe===0?le:pe<=ge?M[pe-1]===void 0?Se.charAt(1):M[pe-1]+Se.charAt(1):le}ve=M[J-1]}return ve===void 0?"":ve})}})},5692:function(a,i,t){var r=t("c430"),o=t("c6cd");(a.exports=function(s,c){return o[s]||(o[s]=c!==void 0?c:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(a,i,t){var r=t("d066"),o=t("241c"),s=t("7418"),c=t("825a");a.exports=r("Reflect","ownKeys")||function(m){var f=o.f(c(m)),d=s.f;return d?f.concat(d(m)):f}},"5a34":function(a,i,t){var r=t("44e7");a.exports=function(o){if(r(o))throw TypeError("The method doesn't accept regular expressions");return o}},"5c6c":function(a,i){a.exports=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}}},"5db7":function(a,i,t){var r=t("23e7"),o=t("a2bf"),s=t("7b0b"),c=t("50c4"),p=t("1c0b"),m=t("65f0");r({target:"Array",proto:!0},{flatMap:function(d){var g=s(this),y=c(g.length),S;return p(d),S=m(g,0),S.length=o(S,g,g,y,0,1,d,arguments.length>1?arguments[1]:void 0),S}})},6547:function(a,i,t){var r=t("a691"),o=t("1d80"),s=function(c){return function(p,m){var f=String(o(p)),d=r(m),g=f.length,y,S;return d<0||d>=g?c?"":void 0:(y=f.charCodeAt(d),y<55296||y>56319||d+1===g||(S=f.charCodeAt(d+1))<56320||S>57343?c?f.charAt(d):y:c?f.slice(d,d+2):(y-55296<<10)+(S-56320)+65536)}};a.exports={codeAt:s(!1),charAt:s(!0)}},"65f0":function(a,i,t){var r=t("861d"),o=t("e8b5"),s=t("b622"),c=s("species");a.exports=function(p,m){var f;return o(p)&&(f=p.constructor,typeof f=="function"&&(f===Array||o(f.prototype))?f=void 0:r(f)&&(f=f[c],f===null&&(f=void 0))),new(f===void 0?Array:f)(m===0?0:m)}},"69f3":function(a,i,t){var r=t("7f9a"),o=t("da84"),s=t("861d"),c=t("9112"),p=t("5135"),m=t("f772"),f=t("d012"),d=o.WeakMap,g,y,S,v=function(C){return S(C)?y(C):g(C,{})},b=function(C){return function(w){var T;if(!s(w)||(T=y(w)).type!==C)throw TypeError("Incompatible receiver, "+C+" required");return T}};if(r){var x=new d,O=x.get,I=x.has,V=x.set;g=function(C,w){return V.call(x,C,w),w},y=function(C){return O.call(x,C)||{}},S=function(C){return I.call(x,C)}}else{var D=m("state");f[D]=!0,g=function(C,w){return c(C,D,w),w},y=function(C){return p(C,D)?C[D]:{}},S=function(C){return p(C,D)}}a.exports={set:g,get:y,has:S,enforce:v,getterFor:b}},"6eeb":function(a,i,t){var r=t("da84"),o=t("9112"),s=t("5135"),c=t("ce4e"),p=t("8925"),m=t("69f3"),f=m.get,d=m.enforce,g=String(String).split("String");(a.exports=function(y,S,v,b){var x=b?!!b.unsafe:!1,O=b?!!b.enumerable:!1,I=b?!!b.noTargetGet:!1;if(typeof v=="function"&&(typeof S=="string"&&!s(v,"name")&&o(v,"name",S),d(v).source=g.join(typeof S=="string"?S:"")),y===r){O?y[S]=v:c(S,v);return}else x?!I&&y[S]&&(O=!0):delete y[S];O?y[S]=v:o(y,S,v)})(Function.prototype,"toString",function(){return typeof this=="function"&&f(this).source||p(this)})},"6f53":function(a,i,t){var r=t("83ab"),o=t("df75"),s=t("fc6a"),c=t("d1e7").f,p=function(m){return function(f){for(var d=s(f),g=o(d),y=g.length,S=0,v=[],b;y>S;)b=g[S++],(!r||c.call(d,b))&&v.push(m?[b,d[b]]:d[b]);return v}};a.exports={entries:p(!0),values:p(!1)}},"73d9":function(a,i,t){var r=t("44d2");r("flatMap")},7418:function(a,i){i.f=Object.getOwnPropertySymbols},"746f":function(a,i,t){var r=t("428f"),o=t("5135"),s=t("e538"),c=t("9bf2").f;a.exports=function(p){var m=r.Symbol||(r.Symbol={});o(m,p)||c(m,p,{value:s.f(p)})}},7839:function(a,i){a.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(a,i,t){var r=t("1d80");a.exports=function(o){return Object(r(o))}},"7c73":function(a,i,t){var r=t("825a"),o=t("37e8"),s=t("7839"),c=t("d012"),p=t("1be4"),m=t("cc12"),f=t("f772"),d=">",g="<",y="prototype",S="script",v=f("IE_PROTO"),b=function(){},x=function(C){return g+S+d+C+g+"/"+S+d},O=function(C){C.write(x("")),C.close();var w=C.parentWindow.Object;return C=null,w},I=function(){var C=m("iframe"),w="java"+S+":",T;return C.style.display="none",p.appendChild(C),C.src=String(w),T=C.contentWindow.document,T.open(),T.write(x("document.F=Object")),T.close(),T.F},V,D=function(){try{V=document.domain&&new ActiveXObject("htmlfile")}catch{}D=V?O(V):I();for(var C=s.length;C--;)delete D[y][s[C]];return D()};c[v]=!0,a.exports=Object.create||function(w,T){var L;return w!==null?(b[y]=r(w),L=new b,b[y]=null,L[v]=w):L=D(),T===void 0?L:o(L,T)}},"7dd0":function(a,i,t){var r=t("23e7"),o=t("9ed3"),s=t("e163"),c=t("d2bb"),p=t("d44e"),m=t("9112"),f=t("6eeb"),d=t("b622"),g=t("c430"),y=t("3f8c"),S=t("ae93"),v=S.IteratorPrototype,b=S.BUGGY_SAFARI_ITERATORS,x=d("iterator"),O="keys",I="values",V="entries",D=function(){return this};a.exports=function(C,w,T,L,R,N,K){o(T,w,L);var M=function(pe){if(pe===R&&fe)return fe;if(!b&&pe in te)return te[pe];switch(pe){case O:return function(){return new T(this,pe)};case I:return function(){return new T(this,pe)};case V:return function(){return new T(this,pe)}}return function(){return new T(this)}},P=w+" Iterator",B=!1,te=C.prototype,ge=te[x]||te["@@iterator"]||R&&te[R],fe=!b&&ge||M(R),le=w=="Array"&&te.entries||ge,Se,ve,J;if(le&&(Se=s(le.call(new C)),v!==Object.prototype&&Se.next&&(!g&&s(Se)!==v&&(c?c(Se,v):typeof Se[x]!="function"&&m(Se,x,D)),p(Se,P,!0,!0),g&&(y[P]=D))),R==I&&ge&&ge.name!==I&&(B=!0,fe=function(){return ge.call(this)}),(!g||K)&&te[x]!==fe&&m(te,x,fe),y[w]=fe,R)if(ve={values:M(I),keys:N?fe:M(O),entries:M(V)},K)for(J in ve)(b||B||!(J in te))&&f(te,J,ve[J]);else r({target:w,proto:!0,forced:b||B},ve);return ve}},"7f9a":function(a,i,t){var r=t("da84"),o=t("8925"),s=r.WeakMap;a.exports=typeof s=="function"&&/native code/.test(o(s))},"825a":function(a,i,t){var r=t("861d");a.exports=function(o){if(!r(o))throw TypeError(String(o)+" is not an object");return o}},"83ab":function(a,i,t){var r=t("d039");a.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(a,i,t){var r=t("c04e"),o=t("9bf2"),s=t("5c6c");a.exports=function(c,p,m){var f=r(p);f in c?o.f(c,f,s(0,m)):c[f]=m}},"861d":function(a,i){a.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}},8875:function(a,i,t){var r,o,s;(function(c,p){o=[],r=p,s=typeof r=="function"?r.apply(i,o):r,s!==void 0&&(a.exports=s)})(typeof self<"u"?self:this,function(){function c(){var p=Object.getOwnPropertyDescriptor(document,"currentScript");if(!p&&"currentScript"in document&&document.currentScript||p&&p.get!==c&&document.currentScript)return document.currentScript;try{throw new Error}catch(V){var m=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,f=/@([^@]*):(\d+):(\d+)\s*$/ig,d=m.exec(V.stack)||f.exec(V.stack),g=d&&d[1]||!1,y=d&&d[2]||!1,S=document.location.href.replace(document.location.hash,""),v,b,x,O=document.getElementsByTagName("script");g===S&&(v=document.documentElement.outerHTML,b=new RegExp("(?:[^\\n]+?\\n){0,"+(y-2)+"}[^<]* + diff --git a/www/fhemapp4/templates/lightscene.json b/www/fhemapp4/templates/lightscene.json new file mode 100644 index 0000000..9718c90 --- /dev/null +++ b/www/fhemapp4/templates/lightscene.json @@ -0,0 +1,58 @@ +{ + "name": "lightscene", + "author": "jemu", + "date": "2024-04-16", + "panel": { + "devicekeys": [ + "lightscene:FHEM lightScene device" + ], + "navigation": [ + "lightscene-a-room::Räume->%s", + "lightscene-a-group::Gruppen->%s" + ], + "sortby": [ + "lightscene-a-sortby::%s" + ] + }, + "status": { + "title": [ + "lightscene-a-alias:^.+$:%s", + "lightscene-i-NAME::%s" + ], + "imageUrl": [ + "::images/header_01.png" + ], + "bar": [ + "::100" + ] + }, + "main": [ + { + "level": { + "mid": "info", + "right1": "menu" + }, + "mid": { + "text": [ + "lightscene-state:unknown:individuell", + "lightscene-state::%s" + ], + "divider": ["::true"], + "size": ["::9"] + }, + "right1": { + "btn": [ + "::mdi-dots-vertical" + ], + "menu": [ + "::get lightscene scenes:set lightscene scene %v" + ] + } + } + ], + "info": { + "left1": [ + ":::mdi-movie-open" + ] + } +} \ No newline at end of file diff --git a/www/fhemapp4/templates/templates.json b/www/fhemapp4/templates/templates.json index 2856ff1..b12bcea 100644 --- a/www/fhemapp4/templates/templates.json +++ b/www/fhemapp4/templates/templates.json @@ -1,3 +1,3 @@ [ - "switch", "light", "dimmer", "contact", "blind", "thermostat", "temperatur", "smokedetector", "motiondetector", "sonosplayer", "proplanta" + "switch", "light", "dimmer", "contact", "blind", "thermostat", "temperatur", "smokedetector", "motiondetector", "sonosplayer", "proplanta", "lightscene" ] \ No newline at end of file