diff --git a/README.md b/README.md index 10754da5..ba95a618 100644 --- a/README.md +++ b/README.md @@ -211,8 +211,8 @@ In den Template-Dateien können folgende Eigenschaften definiert werden. Die Zuw "leftLong": ["reading:value:set_param"], "leftLongRelease": ["reading:value:set_param"], "leftMenu": ["text:set_param"], - "text": ["reading:value:text"], - "text2": ["reading:value:text"], + "text": ["reading:value:text:align"], + "text2": ["reading:value:text:align"], "slider": ["reading:value:set_param:current:min:max:steps"], "midBtn": ["reading:value:icon:disabled"], "midClick": ["reading:value:set_param"], @@ -271,8 +271,8 @@ Es werden die Icons aus der [Material Designs Icon Bibliothek](https://materiald |main|leftLong|reading:wert:cmd|defniert welches FHEM-Kommando bei langem Halten der linken Taste abgesendet wird. [siehe auch](#hinweis-zur-definition-von-fhem-Kommandos)| |main|leftLongRelease|reading:wert:cmd|defniert welches FHEM-Kommando beim loslassen nach langem Halten der linken Taste abgesendet wird. [siehe auch](#hinweis-zur-definition-von-fhem-Kommandos)| |main|leftMenu|text:cmd|definiert für das **linke Menü** die Texte und FHEM-Kommandos. Wenn dieses Element zugewiesen wird, klappt bei Klick auf die linke Taste ein Menü auf. *Hinweis:* leftClick, leftLong und leftLongRelease stehen bei Zuweisung des Menüs nicht zur Verfügung.| -|main|text|reading:wert:text|definiert den **ersten Text** der in der Mitte angezeigt wird| -|main|text2|reading:wert:text|definiert den **zweiten Text** der in der Mitte angezeigt wird *Hinweis:* bei Verwendung von Tasten sollte auf die Anzeige eines zweiten Wertes verzichtet werden, da die Breite des Templates im Normalfall nicht ausreicht| +|main|text|reading:wert:text:align|definiert den **ersten Text** der in der Mitte angezeigt wird. Der Text wird im Standard zentriert ausgegeben und kann mit `left` bzw. `right` unter *align* ausgerichtet werden.| +|main|text2|reading:wert:text:align|definiert den **zweiten Text** der in der Mitte angezeigt wird. Der Text wird im Standard zentriert ausgegeben und kann mit `left` bzw. `right` unter *align* ausgerichtet werden. *Hinweis:* bei Verwendung von Tasten sollte auf die Anzeige eines zweiten Wertes verzichtet werden, da die Breite des Templates im Normalfall nicht ausreicht| |main|slider|reading:wert:cmd:current:min:max:steps|stellt einen **Slider** in der Mitte dar. Über das Element `text` kann der Slider mit einem zusätzlichen Label versehen werden. *Wichtig:* `cmd` muss die Ersetzung *%v* (den aktuellen Wert des Sliders) enthalten. `current` sollte nur die Ersetzung *%n* enthalten, damit der Slider den aktuellen Wert des Readings anzeigt. `min` und `max` begrenzen die Sliderwerte. `steps` definiert die Schritte in denen der Slider die Werte verändert. *Beispiel:* `["pct::pct %v:%n:0:100:1"]` verbindet das Reading `pct` mit einem Slider und begrenzt die Werte auf 0-100 und verändert die Werte jeweils um 1| |main|midtBtn|reading:wert:icon:disabled:color (alternativ: icon)|definiert welches *Icon* auf der mittlerren Taste angezeigt wird. Optional kann das Flag *disabled* und die Farbe des Icons gesetzt werden. Icon Bibliothek [siehe](https://materialdesignicons.com/)| |main|midClick|reading:wert:cmd|defniert welches FHEM-Kommando bei Klick auf die mittlere Taste abgesendet wird. [siehe auch](#hinweis-zur-definition-von-fhem-Kommandos)| @@ -1018,7 +1018,7 @@ Da *sysmon* kein Standard-Template ist, könnt ihr nur ausgewählte Eigenschafte subTitle: ["reading:value:text"], "main": [ { - "name": string, + "name": ["reading:value:text"], "bar": ["reading:value:level:color:min:max"], "subText": ["reading:value:text"] } diff --git a/package.json b/package.json index 4f7e750d..1624b762 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fhemapp", - "version": "3.32.0", + "version": "3.33.0", "private": true, "author": "jemu75", "scripts": { diff --git a/src/components/TemplDefault.vue b/src/components/TemplDefault.vue index a1b4d175..dc7f4b02 100644 --- a/src/components/TemplDefault.vue +++ b/src/components/TemplDefault.vue @@ -141,7 +141,7 @@
{{ level.text }} @@ -150,7 +150,7 @@
{{ level.text2 }} @@ -654,7 +654,9 @@ leftMenu: [], leftMenuIdx: -1, text: '', + textAlign: '', text2: '', + text2Align: '', midBtn: '', midBtnDisabled: false, midBtnColor: '', @@ -692,8 +694,10 @@ let mainRightMenu = this.createMenu(this.item.Options.setup.main[idx].rightMenu); this.main[lvl].text = mainText[0] || ''; + this.main[lvl].textAlign = mainText[1] || 'center'; this.main[lvl].text2 = mainText2[0] || ''; - + this.main[lvl].text2Align = mainText2[1] || 'center'; + this.main[lvl].leftBtn = mainLeftBtn[0] || ''; this.main[lvl].midBtn = mainMidBtn[0] || ''; this.main[lvl].rightBtn = mainRightBtn[0] || ''; diff --git a/src/components/TemplSysmon.vue b/src/components/TemplSysmon.vue index 26572bf4..f9a27b37 100644 --- a/src/components/TemplSysmon.vue +++ b/src/components/TemplSysmon.vue @@ -312,13 +312,13 @@ doList() { for(var el of this.setup.main) { - let idx = this.vals.list.map((e) => e.name).indexOf(el.name); - + let name = this.$fhem.handleVals(this.item, el.name); let bar = this.$fhem.handleVals(this.item, el.bar); let subText = this.$fhem.handleVals(this.item, el.subText); + let idx = this.vals.list.map((e) => e.name).indexOf(name[0] || ''); let listItem = { - name: el.name, + name: name[0] || '', isBar: bar.length > 0 ? true : false, value: bar[0] || 0, color: bar[1] || 'success', diff --git a/www/fhemapp/css/997.8ecd64f4.css b/www/fhemapp/css/289.8ecd64f4.css similarity index 100% rename from www/fhemapp/css/997.8ecd64f4.css rename to www/fhemapp/css/289.8ecd64f4.css diff --git a/www/fhemapp/css/658.b79779ed.css b/www/fhemapp/css/897.b79779ed.css similarity index 100% rename from www/fhemapp/css/658.b79779ed.css rename to www/fhemapp/css/897.b79779ed.css diff --git a/www/fhemapp/index.html b/www/fhemapp/index.html index 108359da..ca998763 100644 --- a/www/fhemapp/index.html +++ b/www/fhemapp/index.html @@ -1 +1 @@ -fhemapp
\ No newline at end of file +fhemapp
\ No newline at end of file diff --git a/www/fhemapp/js/289-legacy.70352cc3.js b/www/fhemapp/js/289-legacy.70352cc3.js new file mode 100644 index 00000000..ce1c48b7 --- /dev/null +++ b/www/fhemapp/js/289-legacy.70352cc3.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[289],{1830:function(t,s,e){e.d(s,{Z:function(){return b}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"text-center"},["zzz"!=t.item.Options.sortby?e("v-chip",{attrs:{small:"",color:"secondary"}},[e("v-icon",{attrs:{left:""}},[t._v(" mdi-sort-ascending ")]),t._v(" "+t._s(t.item.Options.sortby)+" ")],1):t._e(),e("v-btn",{attrs:{href:t.toFhem(),target:"_blank",small:"",icon:""}},[e("v-icon",{attrs:{small:""}},[t._v(" mdi-link ")])],1),e("v-dialog",{attrs:{"max-width":"90%",scrollable:""},scopedSlots:t._u([{key:"activator",fn:function(s){var i=s.on,a=s.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),i),[e("v-icon",{attrs:{small:""}},[t._v(" mdi-code-json ")])],1)]}}]),model:{value:t.dialog,callback:function(s){t.dialog=s},expression:"dialog"}},[e("v-card",{staticClass:"secondary lighten-1"},[e("v-card-title",{staticClass:"secondary"},[e("v-btn",{attrs:{icon:""},on:{click:function(s){t.deep=t.deep>1?1:5}}},[e("v-icon",[t._v("mdi-file-tree-outline")])],1),e("v-spacer"),t._v(" "+t._s(t.item.Name)+" "),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(s){t.dialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[e("div",{ref:"jsonContent",staticClass:"select"},[e("vue-json-pretty",{attrs:{"show-line":!1,deep:t.deep,data:t.item}})],1)])],1)],1)],1)},a=[],n=e(4566),o=e.n(n),l={name:"JsonList",props:{item:{type:Object,default:function(){return{name:"json"}}}},data:function(){return{dialog:!1,deep:1}},components:{VueJsonPretty:o()},methods:{toFhem:function(){var t=this.$fhem.createURL([{param:"detail",value:this.item.Name}]);return t}}},r=l,c=e(1001),h=e(3453),u=e.n(h),m=e(3150),d=e(2371),v=e(7118),p=e(5424),f=e(4497),g=e(6428),_=e(9762),x=(0,c.Z)(r,i,a,!1,null,"4fc9ba56",null),b=x.exports;u()(x,{VBtn:m.Z,VCard:d.Z,VCardText:v.ZB,VCardTitle:v.EB,VChip:p.Z,VDialog:f.Z,VIcon:g.Z,VSpacer:_.Z})},5193:function(t,s,e){e.r(s),e.d(s,{default:function(){return k}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("v-col",{class:t.setup.size},[e("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[e("v-progress-linear",{attrs:{height:"7",value:t.getLevel,color:t.vals.status.color,"background-color":"secondary darken-1"}}),e("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.vals.title)+" "),e("v-spacer"),t.app.options.debugMode?e("jsonList",{attrs:{item:t.item}}):t._e()],1),e("v-divider"),t.item.Options.status.isActive?t._e():e("div",[e("v-card-text",[e("v-row",{attrs:{align:"center"}},[e("v-col",{attrs:{align:"center"}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),e("v-divider")],1),t.item.Options.status.isActive?e("div",[e("v-card-subtitle",[t._v(" "+t._s(t.vals.subTitle)+" ")]),e("v-card-text",[e("v-row",t._l(t.vals.list,(function(s){return e("v-col",{key:s.name,staticClass:"col-12 col-md-4 col-lg-4"},[e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(s.name)+" ")]),s.isBar?e("v-progress-linear",{attrs:{height:"7",value:s.value,color:s.color,min:s.min,max:s.max,"background-color":"secondary lighten-4"}}):t._e(),e("div",[t._v(t._s(s.subText))])],1)})),1)],1),t.setup.fhemBtns?e("v-card-actions",[e("v-btn",{staticClass:"mr-2",on:{click:function(s){return t.goTo()}}},[e("v-icon",[t._v("mdi-format-list-bulleted")])],1),e("v-spacer"),e("v-btn",{attrs:{disabled:!t.update},on:{click:t.fhemUpdate}},[t._v(" "+t._s(t.updateText)+" ")]),e("v-btn",{attrs:{disabled:!t.restart},on:{click:t.fhemRestart}},[t._v(" "+t._s(t.$t("templates.sysmon.restartBtn"))+" ")])],1):t._e()],1):t._e(),e("v-divider"),e("v-system-bar",{attrs:{color:"secondary darken-1"}},[e("v-icon",{staticClass:"ml-0"},[t._v(" "+t._s(t.vals.info.left1Icon)+" ")]),t._v(t._s(t.vals.info.left1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.left2Icon)+" ")]),t._v(t._s(t.vals.info.left2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.mid1Icon))]),t._v(t._s(t.vals.info.mid1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.mid2Icon)+" ")]),t._v(t._s(t.vals.info.mid2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.right1Icon))]),t._v(t._s(t.vals.info.right1Text)+" "),e("v-icon",{staticClass:"ml-2 mr-0"},[t._v(" "+t._s(t.vals.info.right2Icon)+" ")]),t._v(t._s(t.vals.info.right2Text)+" ")],1),e("v-dialog",{attrs:{"max-width":"420px"},model:{value:t.updateDialog,callback:function(s){t.updateDialog=s},expression:"updateDialog"}},[e("v-card",{attrs:{color:"secondary lighten-2"}},[e("v-card-title",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.header"))+" "),e("v-spacer"),e("v-btn",{attrs:{icon:"",small:""},on:{click:function(s){t.updateDialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.text"))+" ")]),e("v-card-actions",[e("v-spacer"),e("v-btn",{on:{click:function(s){return t.fhemRestart()}}},[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.restartBtn"))+" ")])],1)],1)],1)],1)],1)},a=[],n=e(6198),o=e(2032),l=(e(5666),e(8309),e(1249),e(561),e(1539),e(1830)),r={components:{jsonList:l.Z},props:{item:{type:Object,default:function(){return{name:"sysmon"}}}},data:function(){return{name:"sysmon",app:{options:{updateProcess:!1,debugMode:!1}},setup:{size:"col-12 col-sm-12 col-md-6 col-lg-6",status:{bar:[],error:[],min:0,max:100},subTitle:[],main:[],fhemBtns:!0,info:{left1:[],left2:[],mid1:[],mid2:[],right1:[],right2:[]}},vals:{title:"",subTitle:"",status:{level:0,color:"success"},list:[],info:{left1Icon:"",left1Text:"",left2Icon:"",left2Text:"",mid1Icon:"",mid1Text:"",mid2Icon:"",mid2Text:"",right1Icon:"",right1Text:"",right2Icon:"",right2Text:""}},restart:!0,update:!0,updateText:"",updateDialog:!1}},computed:{getLevel:function(){var t=100/(this.setup.status.max-this.setup.status.min),s=(this.vals.status.level-this.setup.status.min)*t;return this.vals.status.invert?100-s:s}},watch:{item:{immediate:!0,deep:!0,handler:function(t){var s=this.$fhem.getEl(t,"Attributes","alias")||t.Name;this.vals.title=this.$fhem.getEl(t,"Options","name")||s,this.setValues(),this.doList()}},setup:{deep:!0,handler:function(){this.setValues(),this.doList()}},"app.options.updateProcess":function(t){t||(this.updateDialog=!0,this.updateText=this.$t("templates.sysmon.updateBtn[1]"),this.restart=!0)}},mounted:function(){this.app.options=this.$fhem.app.options,this.fhemUpdateCheck();var t=this.$fhem.getEl(this.item,"Options","setup","size"),s=this.$fhem.getEl(this.item,"Options","setup","subTitle"),e=this.$fhem.getEl(this.item,"Options","setup","fhemBtns"),i=this.$fhem.getEl(this.item,"Options","setup","status"),a=this.$fhem.getEl(this.item,"Options","setup","main"),n=this.$fhem.getEl(this.item,"Options","setup","info");t&&(this.setup.size=t),s&&(this.setup.subTitle=s),i&&Object.assign(this.setup.status,i),a&&Object.assign(this.setup.main,a),n&&Object.assign(this.setup.info,n),this.setup.fhemBtns=e},methods:{setValues:function(){var t=this.$fhem.handleVals(this.item,this.setup.status.bar),s=this.$fhem.handleVals(this.item,this.setup.status.error),e=this.$fhem.handleVals(this.item,this.setup.subTitle),i=this.$fhem.handleVals(this.item,this.setup.info.left1),a=this.$fhem.handleVals(this.item,this.setup.info.left2),n=this.$fhem.handleVals(this.item,this.setup.info.mid1),o=this.$fhem.handleVals(this.item,this.setup.info.mid2),l=this.$fhem.handleVals(this.item,this.setup.info.right1),r=this.$fhem.handleVals(this.item,this.setup.info.right2);this.vals.status.level=t[0]||"100",this.vals.status.color=t[1]||"success",this.vals.subTitle=e[0]||"",this.vals.info.left1Icon=i[1]||"",this.vals.info.left1Text=i[0]||"",this.vals.info.left2Icon=a[1]||"",this.vals.info.left2Text=a[0]||"",this.vals.info.mid1Icon=n[1]||"",this.vals.info.mid1Text=n[0]||"",this.vals.info.mid2Icon=o[1]||"",this.vals.info.mid2Text=o[0]||"",this.vals.info.right1Icon=l[1]||"",this.vals.info.right1Text=l[0]||"",this.vals.info.right2Icon=r[1]||"",this.vals.info.right2Text=r[0]||"",s.length>0&&(this.vals.status.level=s[0]||"100",this.vals.status.color=s[1]||"error")},doList:function(){var t,s=(0,o.Z)(this.setup.main);try{for(s.s();!(t=s.n()).done;){var e=t.value,i=this.$fhem.handleVals(this.item,e.name),a=this.$fhem.handleVals(this.item,e.bar),n=this.$fhem.handleVals(this.item,e.subText),l=this.vals.list.map((function(t){return t.name})).indexOf(i[0]||""),r={name:i[0]||"",isBar:a.length>0,value:a[0]||0,color:a[1]||"success",min:a[2]||0,max:a[3]||100,subText:n[0]||""};r.isBar&&"success"!=r.color&&(this.vals.status.color=r.color),-1!=l?this.vals.list.splice(l,1,r):this.vals.list.push(r)}}catch(c){s.e(c)}finally{s.f()}},fhemRestart:function(){this.restart=!1,this.updateDialog=!1,this.$fhem.request({param:"cmd",value:"shutdown restart"})},fhemUpdateCheck:function(){var t=this;return(0,n.Z)(regeneratorRuntime.mark((function s(){var e;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return e=new Promise((function(s,e){t.restart=!1,t.update=!1,t.updateText=t.$t("templates.sysmon.updateBtn[0]"),t.$fhem.checkUpdate().then((function(e){e?(t.updateText=t.$t("templates.sysmon.updateBtn[2]"),t.update=!0):t.updateText=t.$t("templates.sysmon.updateBtn[1]"),s(e)})).catch((function(s){t.$fhem.log({lvl:1,msg:"Update check failed.",meta:s}),e()})).finally((function(){t.restart=!0}))})),s.abrupt("return",e);case 2:case"end":return s.stop()}}),s)})))()},fhemUpdate:function(){this.restart=!1,this.update=!1,this.updateText=this.$t("templates.sysmon.updateBtn[3]"),this.app.options.updateProcess=!0,this.$fhem.request({param:"cmd",value:"update"})},goTo:function(){this.$router.push("syslog")}}},c=r,h=e(1001),u=e(3453),m=e.n(u),d=e(3150),v=e(2371),p=e(7118),f=e(2102),g=e(4497),_=e(1418),x=e(6428),b=e(7003),T=e(2877),$=e(9762),V=e(2691),y=(0,h.Z)(c,i,a,!1,null,null,null),k=y.exports;m()(y,{VBtn:d.Z,VCard:v.Z,VCardActions:p.h7,VCardSubtitle:p.Qq,VCardText:p.ZB,VCardTitle:p.EB,VCol:f.Z,VDialog:g.Z,VDivider:_.Z,VIcon:x.Z,VProgressLinear:b.Z,VRow:T.Z,VSpacer:$.Z,VSystemBar:V.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/289.acdc7a20.js b/www/fhemapp/js/289.acdc7a20.js new file mode 100644 index 00000000..fce067bd --- /dev/null +++ b/www/fhemapp/js/289.acdc7a20.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[289],{1830:function(t,s,e){e.d(s,{Z:function(){return b}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"text-center"},["zzz"!=t.item.Options.sortby?e("v-chip",{attrs:{small:"",color:"secondary"}},[e("v-icon",{attrs:{left:""}},[t._v(" mdi-sort-ascending ")]),t._v(" "+t._s(t.item.Options.sortby)+" ")],1):t._e(),e("v-btn",{attrs:{href:t.toFhem(),target:"_blank",small:"",icon:""}},[e("v-icon",{attrs:{small:""}},[t._v(" mdi-link ")])],1),e("v-dialog",{attrs:{"max-width":"90%",scrollable:""},scopedSlots:t._u([{key:"activator",fn:function(s){var i=s.on,a=s.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),i),[e("v-icon",{attrs:{small:""}},[t._v(" mdi-code-json ")])],1)]}}]),model:{value:t.dialog,callback:function(s){t.dialog=s},expression:"dialog"}},[e("v-card",{staticClass:"secondary lighten-1"},[e("v-card-title",{staticClass:"secondary"},[e("v-btn",{attrs:{icon:""},on:{click:function(s){t.deep=t.deep>1?1:5}}},[e("v-icon",[t._v("mdi-file-tree-outline")])],1),e("v-spacer"),t._v(" "+t._s(t.item.Name)+" "),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(s){t.dialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[e("div",{ref:"jsonContent",staticClass:"select"},[e("vue-json-pretty",{attrs:{"show-line":!1,deep:t.deep,data:t.item}})],1)])],1)],1)],1)},a=[],l=e(4566),n=e.n(l),o={name:"JsonList",props:{item:{type:Object,default:()=>({name:"json"})}},data(){return{dialog:!1,deep:1}},components:{VueJsonPretty:n()},methods:{toFhem(){let t=this.$fhem.createURL([{param:"detail",value:this.item.Name}]);return t}}},r=o,h=e(1001),c=e(3453),m=e.n(c),d=e(3150),v=e(2371),u=e(7118),p=e(5424),f=e(4497),g=e(6428),_=e(9762),x=(0,h.Z)(r,i,a,!1,null,"4fc9ba56",null),b=x.exports;m()(x,{VBtn:d.Z,VCard:v.Z,VCardText:u.ZB,VCardTitle:u.EB,VChip:p.Z,VDialog:f.Z,VIcon:g.Z,VSpacer:_.Z})},5193:function(t,s,e){e.r(s),e.d(s,{default:function(){return V}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("v-col",{class:t.setup.size},[e("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[e("v-progress-linear",{attrs:{height:"7",value:t.getLevel,color:t.vals.status.color,"background-color":"secondary darken-1"}}),e("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.vals.title)+" "),e("v-spacer"),t.app.options.debugMode?e("jsonList",{attrs:{item:t.item}}):t._e()],1),e("v-divider"),t.item.Options.status.isActive?t._e():e("div",[e("v-card-text",[e("v-row",{attrs:{align:"center"}},[e("v-col",{attrs:{align:"center"}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),e("v-divider")],1),t.item.Options.status.isActive?e("div",[e("v-card-subtitle",[t._v(" "+t._s(t.vals.subTitle)+" ")]),e("v-card-text",[e("v-row",t._l(t.vals.list,(function(s){return e("v-col",{key:s.name,staticClass:"col-12 col-md-4 col-lg-4"},[e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(s.name)+" ")]),s.isBar?e("v-progress-linear",{attrs:{height:"7",value:s.value,color:s.color,min:s.min,max:s.max,"background-color":"secondary lighten-4"}}):t._e(),e("div",[t._v(t._s(s.subText))])],1)})),1)],1),t.setup.fhemBtns?e("v-card-actions",[e("v-btn",{staticClass:"mr-2",on:{click:function(s){return t.goTo()}}},[e("v-icon",[t._v("mdi-format-list-bulleted")])],1),e("v-spacer"),e("v-btn",{attrs:{disabled:!t.update},on:{click:t.fhemUpdate}},[t._v(" "+t._s(t.updateText)+" ")]),e("v-btn",{attrs:{disabled:!t.restart},on:{click:t.fhemRestart}},[t._v(" "+t._s(t.$t("templates.sysmon.restartBtn"))+" ")])],1):t._e()],1):t._e(),e("v-divider"),e("v-system-bar",{attrs:{color:"secondary darken-1"}},[e("v-icon",{staticClass:"ml-0"},[t._v(" "+t._s(t.vals.info.left1Icon)+" ")]),t._v(t._s(t.vals.info.left1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.left2Icon)+" ")]),t._v(t._s(t.vals.info.left2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.mid1Icon))]),t._v(t._s(t.vals.info.mid1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.mid2Icon)+" ")]),t._v(t._s(t.vals.info.mid2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.right1Icon))]),t._v(t._s(t.vals.info.right1Text)+" "),e("v-icon",{staticClass:"ml-2 mr-0"},[t._v(" "+t._s(t.vals.info.right2Icon)+" ")]),t._v(t._s(t.vals.info.right2Text)+" ")],1),e("v-dialog",{attrs:{"max-width":"420px"},model:{value:t.updateDialog,callback:function(s){t.updateDialog=s},expression:"updateDialog"}},[e("v-card",{attrs:{color:"secondary lighten-2"}},[e("v-card-title",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.header"))+" "),e("v-spacer"),e("v-btn",{attrs:{icon:"",small:""},on:{click:function(s){t.updateDialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.text"))+" ")]),e("v-card-actions",[e("v-spacer"),e("v-btn",{on:{click:function(s){return t.fhemRestart()}}},[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.restartBtn"))+" ")])],1)],1)],1)],1)],1)},a=[],l=e(1830),n={components:{jsonList:l.Z},props:{item:{type:Object,default:()=>({name:"sysmon"})}},data:()=>({name:"sysmon",app:{options:{updateProcess:!1,debugMode:!1}},setup:{size:"col-12 col-sm-12 col-md-6 col-lg-6",status:{bar:[],error:[],min:0,max:100},subTitle:[],main:[],fhemBtns:!0,info:{left1:[],left2:[],mid1:[],mid2:[],right1:[],right2:[]}},vals:{title:"",subTitle:"",status:{level:0,color:"success"},list:[],info:{left1Icon:"",left1Text:"",left2Icon:"",left2Text:"",mid1Icon:"",mid1Text:"",mid2Icon:"",mid2Text:"",right1Icon:"",right1Text:"",right2Icon:"",right2Text:""}},restart:!0,update:!0,updateText:"",updateDialog:!1}),computed:{getLevel(){let t=100/(this.setup.status.max-this.setup.status.min),s=(this.vals.status.level-this.setup.status.min)*t;return this.vals.status.invert?100-s:s}},watch:{item:{immediate:!0,deep:!0,handler(t){let s=this.$fhem.getEl(t,"Attributes","alias")||t.Name;this.vals.title=this.$fhem.getEl(t,"Options","name")||s,this.setValues(),this.doList()}},setup:{deep:!0,handler(){this.setValues(),this.doList()}},"app.options.updateProcess"(t){t||(this.updateDialog=!0,this.updateText=this.$t("templates.sysmon.updateBtn[1]"),this.restart=!0)}},mounted(){this.app.options=this.$fhem.app.options,this.fhemUpdateCheck();let t=this.$fhem.getEl(this.item,"Options","setup","size"),s=this.$fhem.getEl(this.item,"Options","setup","subTitle"),e=this.$fhem.getEl(this.item,"Options","setup","fhemBtns"),i=this.$fhem.getEl(this.item,"Options","setup","status"),a=this.$fhem.getEl(this.item,"Options","setup","main"),l=this.$fhem.getEl(this.item,"Options","setup","info");t&&(this.setup.size=t),s&&(this.setup.subTitle=s),i&&Object.assign(this.setup.status,i),a&&Object.assign(this.setup.main,a),l&&Object.assign(this.setup.info,l),this.setup.fhemBtns=e},methods:{setValues(){let t=this.$fhem.handleVals(this.item,this.setup.status.bar),s=this.$fhem.handleVals(this.item,this.setup.status.error),e=this.$fhem.handleVals(this.item,this.setup.subTitle),i=this.$fhem.handleVals(this.item,this.setup.info.left1),a=this.$fhem.handleVals(this.item,this.setup.info.left2),l=this.$fhem.handleVals(this.item,this.setup.info.mid1),n=this.$fhem.handleVals(this.item,this.setup.info.mid2),o=this.$fhem.handleVals(this.item,this.setup.info.right1),r=this.$fhem.handleVals(this.item,this.setup.info.right2);this.vals.status.level=t[0]||"100",this.vals.status.color=t[1]||"success",this.vals.subTitle=e[0]||"",this.vals.info.left1Icon=i[1]||"",this.vals.info.left1Text=i[0]||"",this.vals.info.left2Icon=a[1]||"",this.vals.info.left2Text=a[0]||"",this.vals.info.mid1Icon=l[1]||"",this.vals.info.mid1Text=l[0]||"",this.vals.info.mid2Icon=n[1]||"",this.vals.info.mid2Text=n[0]||"",this.vals.info.right1Icon=o[1]||"",this.vals.info.right1Text=o[0]||"",this.vals.info.right2Icon=r[1]||"",this.vals.info.right2Text=r[0]||"",s.length>0&&(this.vals.status.level=s[0]||"100",this.vals.status.color=s[1]||"error")},doList(){for(var t of this.setup.main){let s=this.$fhem.handleVals(this.item,t.name),e=this.$fhem.handleVals(this.item,t.bar),i=this.$fhem.handleVals(this.item,t.subText),a=this.vals.list.map((t=>t.name)).indexOf(s[0]||""),l={name:s[0]||"",isBar:e.length>0,value:e[0]||0,color:e[1]||"success",min:e[2]||0,max:e[3]||100,subText:i[0]||""};l.isBar&&"success"!=l.color&&(this.vals.status.color=l.color),-1!=a?this.vals.list.splice(a,1,l):this.vals.list.push(l)}},fhemRestart(){this.restart=!1,this.updateDialog=!1,this.$fhem.request({param:"cmd",value:"shutdown restart"})},async fhemUpdateCheck(){let t=new Promise(((t,s)=>{this.restart=!1,this.update=!1,this.updateText=this.$t("templates.sysmon.updateBtn[0]"),this.$fhem.checkUpdate().then((s=>{s?(this.updateText=this.$t("templates.sysmon.updateBtn[2]"),this.update=!0):this.updateText=this.$t("templates.sysmon.updateBtn[1]"),t(s)})).catch((t=>{this.$fhem.log({lvl:1,msg:"Update check failed.",meta:t}),s()})).finally((()=>{this.restart=!0}))}));return t},fhemUpdate(){this.restart=!1,this.update=!1,this.updateText=this.$t("templates.sysmon.updateBtn[3]"),this.app.options.updateProcess=!0,this.$fhem.request({param:"cmd",value:"update"})},goTo(){this.$router.push("syslog")}}},o=n,r=e(1001),h=e(3453),c=e.n(h),m=e(3150),d=e(2371),v=e(7118),u=e(2102),p=e(4497),f=e(1418),g=e(6428),_=e(7003),x=e(2877),b=e(9762),T=e(2691),$=(0,r.Z)(o,i,a,!1,null,null,null),V=$.exports;c()($,{VBtn:m.Z,VCard:d.Z,VCardActions:v.h7,VCardSubtitle:v.Qq,VCardText:v.ZB,VCardTitle:v.EB,VCol:u.Z,VDialog:p.Z,VDivider:f.Z,VIcon:g.Z,VProgressLinear:_.Z,VRow:x.Z,VSpacer:b.Z,VSystemBar:T.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/658-legacy.5954720d.js b/www/fhemapp/js/658-legacy.5954720d.js deleted file mode 100644 index 21586dda..00000000 --- a/www/fhemapp/js/658-legacy.5954720d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[658],{1152:function(t,i,e){e.d(i,{Z:function(){return b}});var n=e(3796),s=e(8932),l=e(4367),o=(e(9653),e(9826),e(1539),e(1038),e(8783),e(2222),e(3210),e(6699),e(2023),e(3242)),a=e(5795),r=e(4561),c=e(5907),h=e(5936),u=e(423),d=e(3712),m=e(2936),v=e(8085),f=e(5600),p=e(549),g=e(3325),x=e(1824),_=e(4589),C=e(1439),k=(0,g.Z)(c.Z,r.Z,h.Z,u.Z,d.Z,m.Z,v.Z),b=k.extend({name:"v-menu",directives:{ClickOutside:f.Z,Resize:p.Z},provide:function(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data:function(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile:function(){return this.tiles[this.listIndex]},calculatedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?(0,_.kb)(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight:function(){var t=this.auto?"200px":(0,_.kb)(this.maxHeight);return t||"0"},calculatedMaxWidth:function(){return(0,_.kb)(this.maxWidth)||"0"},calculatedMinWidth:function(){if(this.minWidth)return(0,_.kb)(this.minWidth)||"0";var t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),i=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return(0,_.kb)(Math.min(i,t))||"0"},calculatedTop:function(){var t=this.auto?(0,_.kb)(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles:function(){return Boolean(this.tiles.find((function(t){return t.tabIndex>-1})))},styles:function(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive:function(t){t||(this.listIndex=-1)},isContentActive:function(t){this.hasJustFocused=t},listIndex:function(t,i){if(t in this.tiles){var e=this.tiles[t];e.classList.add("v-list-item--highlighted");var n=this.$refs.content.scrollTop,s=this.$refs.content.clientHeight;n>e.offsetTop-8?(0,C.Z)(e.offsetTop-e.clientHeight,{appOffset:!1,duration:300,container:this.$refs.content}):n+s0&&i.leftBtn?e("v-col",{staticClass:"col-3",attrs:{align:"center"}},[e("v-menu",{attrs:{bottom:"",right:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,l=n.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),s),[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.leftBtn)+" ")])],1)]}}],null,!0)},[e("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[e("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:i.leftMenuIdx,callback:function(e){t.$set(i,"leftMenuIdx",e)},expression:"level.leftMenuIdx"}},t._l(i.leftMenu,(function(i,n){return e("v-list-item",{key:n,on:{click:function(e){return t.sendCmd(i.cmd)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(i.name)+" ")])],1),i.active?e("v-list-item-icon",[e("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),i.leftBtn&&!i.slider?e("v-divider",{attrs:{vertical:""}}):t._e(),i.midBtn||i.slider?t._e():e("v-col",{attrs:{align:"center"}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(i.text)+" ")])]),!i.text2||i.midBtn||i.slider?t._e():e("v-col",{attrs:{align:"center"}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(i.text2)+" ")])]),0===i.midMenu.length&&i.midBtn?e("v-col",{staticClass:"headline",attrs:{align:"center"}},[e("v-btn",{attrs:{small:"",icon:"",disabled:i.midBtnDisabled,color:i.midBtnColor},on:{touchstart:function(e){return t.clickStart(i.idx,"mid","touch")},touchend:function(e){return t.clickEnd(i.idx,"mid","touch")},mousedown:function(e){return t.clickStart(i.idx,"mid","mouse")},mouseup:function(e){return t.clickEnd(i.idx,"mid","mouse")}}},[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.midBtn)+" ")])],1)],1):t._e(),i.midMenu.length>0&&i.midBtn?e("v-col",{staticClass:"headline",attrs:{align:"center"}},[e("v-menu",{attrs:{bottom:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,l=n.attrs;return[i.text?e("v-btn",t._g(t._b({staticClass:"headline font-weight-bold",attrs:{block:"",plain:""}},"v-btn",l,!1),s),[t._v(" "+t._s(i.text)+" ")]):t._e(),i.text?t._e():e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),s),[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.midBtn)+" ")])],1)]}}],null,!0)},[e("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[e("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:i.midMenuIdx,callback:function(e){t.$set(i,"midMenuIdx",e)},expression:"level.midMenuIdx"}},t._l(i.midMenu,(function(i,n){return e("v-list-item",{key:n,on:{click:function(e){return t.sendCmd(i.cmd)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(i.name)+" ")])],1),i.active?e("v-list-item-icon",[e("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),i.slider?e("v-col",{attrs:{align:"center"}},[e("v-slider",{attrs:{min:i.sliderMin,max:i.sliderMax,label:i.text,"hide-details":"","thumb-label":"","thumb-size":"48",color:"success",step:i.sliderStep},on:{change:function(e){return t.setSlider(i.idx,i.sliderCurrent)}},scopedSlots:t._u([{key:"thumb-label",fn:function(n){var s=n.value;return[e("div",{staticClass:"text-h6"},[t._v(" "+t._s(t.sliderVal(i.idx,s))+" ")])]}}],null,!0),model:{value:i.sliderCurrent,callback:function(e){t.$set(i,"sliderCurrent",e)},expression:"level.sliderCurrent"}})],1):t._e(),i.rightBtn&&!i.slider?e("v-divider",{attrs:{vertical:""}}):t._e(),0===i.rightMenu.length&&i.rightBtn?e("v-col",{staticClass:"col-3",attrs:{align:"center"}},[e("v-btn",{attrs:{small:"",icon:"",disabled:i.rightBtnDisabled,color:i.rightBtnColor},on:{touchstart:function(e){return t.clickStart(i.idx,"right","touch")},touchend:function(e){return t.clickEnd(i.idx,"right","touch")},mousedown:function(e){return t.clickStart(i.idx,"right","mouse")},mouseup:function(e){return t.clickEnd(i.idx,"right","mouse")}}},[i.slider?e("div",[e("v-icon",[t._v(" "+t._s(i.rightBtn)+" ")])],1):t._e(),i.slider?t._e():e("div",[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.rightBtn)+" ")])],1)])],1):t._e(),i.rightMenu.length>0&&i.rightBtn?e("v-col",{staticClass:"col-3",attrs:{align:"center"}},[e("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,l=n.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),s),[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.rightBtn)+" ")])],1)]}}],null,!0)},[e("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[e("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:i.rightMenuIdx,callback:function(e){t.$set(i,"rightMenuIdx",e)},expression:"level.rightMenuIdx"}},t._l(i.rightMenu,(function(i,n){return e("v-list-item",{key:n,on:{click:function(e){return t.sendCmd(i.cmd)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(i.name)+" ")])],1),i.active?e("v-list-item-icon",[e("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e()],1)],1),e("v-divider")],1)})),0):t._e(),e("v-system-bar",{attrs:{color:"secondary darken-1"}},[e("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),e("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),e("v-spacer"),e("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),e("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),e("v-spacer"),e("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),e("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},s=[],l=e(2032),o=e(8932),a=(e(4916),e(3123),e(4723),e(3210),e(5306),e(9600),e(4553),e(6977),e(561),e(7601),e(2222),e(1249),e(1830)),r={components:{jsonList:a.Z},props:{item:{type:Object,default:function(){return{name:"default"}}}},data:function(){return{name:"default",app:{options:{debugMode:!1}},main:[],lvlMax:1,lvlIcon:null,timer:!1,long:!1,pendingClick:0,touchFirst:!1}},watch:{item:{immediate:!1,deep:!0,handler:function(){this.setVals()}}},created:function(){this.app.options=this.$fhem.app.options,this.lvlMax=this.item.Options.setup.main.length,this.lvlIcon=this.lvlMax>1?this.item.Options.setup.expand?"mdi-arrow-expand":"mdi-swap-vertical":null,this.setLvl(this.$fhem.getEl(this.item,"Options","setup","expanded")&&this.$fhem.getEl(this.item,"Options","setup","expand")?-1:0),this.setVals()},methods:{sendCmd:function(t,i){var e=this;i?(this.pendingClick&&(clearTimeout(this.pendingClick),this.pendingClick=0),this.pendingClick=setTimeout((function(){e.$fhem.request(t)}),1e3)):this.$fhem.request(t)},updateReading:function(t){var i=t.split(" ");4===i.length&&this.$fhem.getEl(this.item,"Readings",i[2],"Value")&&(this.item.Readings[i[2]].Value=i[3])},createCmd:function(t){var i="";if(t.match("set")){var e=t.trim().split(" ");if(e[1]&&e[1].match("Connected")){var n=e[1].replace("Connected.","");e[1]=this.$fhem.getEl(this.item,"Connected",n,"Internals","NAME"),e[1]?i=e.join(" "):this.$fhem.log({lvl:1,msg:"Connected Device not found. "+this.item.Options})}else i=t}else i="set "+this.item.Name+" "+t;return i},clickStart:function(t,i,e){var n=this;this.long=!1,this.$fhem.log({lvl:5,msg:"ClickStart: type "+i+":"+e}),this.touchFirst&&"mouse"===e||("touch"===e&&(this.touchFirst=!0),this.timer=setInterval((function(){n.long=!0;var e=n.item.Options.setup.main[t][i+"Long"];if(n.$fhem.log({lvl:5,msg:"ClickEvent: Long ["+e+"]"}),e){var s=n.$fhem.handleVals(n.item,e);if(s[0]){var l=n.createCmd(s[0]);n.sendCmd(l),n.timer=clearInterval(n.timer)}}}),1e3))},clickEnd:function(t,i,e){if(this.$fhem.log({lvl:5,msg:"ClickEnd: type "+i+":"+e}),!this.touchFirst||"mouse"!==e){"touch"===e&&(this.touchFirst=!0),this.timer=clearInterval(this.timer);var n=this.item.Options.setup.main[t][i+(this.long?"LongRelease":"Click")];if(this.$fhem.log({lvl:5,msg:"ClickEvent: "+(this.long?"LongRelease":"Click")+" ["+n+"]"}),n){var s=this.$fhem.handleVals(this.item,n);if(s[0]){var l=this.item.Options.setup.expand?t:0;this.main[l].sliderPrevent=!1;var o=this.createCmd(s[0]),a=-1!=n.findIndex((function(t){return t.match("%i")}));!this.long&&a&&this.updateReading(o),this.sendCmd(o,a)}}}},sliderVal:function(t,i){var e=this.item.Options.setup.main[t].slider,n=i;if(e){var s=this.$fhem.handleVals(this.item,e),l=s[4]&&s[4].match(".")?1:0;n=i.toFixed(l)}return n},setSlider:function(t,i){var e=this.item.Options.setup.main[t].slider;if(e){var n=this.$fhem.handleVals(this.item,e);if(n[0]){var s=this.item.Options.setup.expand?t:0;this.main[s].sliderPrevent=!0;var l=this.createCmd(n[0]),o=n[4]&&n[4].match(".")?1:0;l=l.replace("%v",i.toFixed(o)),this.sendCmd(l)}}},checkMenu:function(t){var i=!1;if(t){var e,n=t.split(" ");n[0].match("set")&&n.splice(0,2),1===n.length&&n.splice(0,0,"state");var s=/\./.test(n[0])?n[0].split("."):["Readings",n[0],"Value"],l=(e=this.$fhem).getEl.apply(e,[this.item].concat((0,o.Z)(s)));l&&l===n[1]&&(i=!0)}return i},createMenu:function(t){var i=[];if(t&&t.length>0){var e,n=(0,l.Z)(t);try{for(n.s();!(e=n.n()).done;){var s=e.value,o=s.split(":");if(o.length>1){var a=this.createCmd(o[1].replace(/:/g,":")),r=this.checkMenu(a);i.push({name:o[0],cmd:a,active:r})}}}catch(c){n.e(c)}finally{n.f()}}return i},lvlBtn:function(){var t=0;this.item.Options.setup.expand?(t=this.main.length>1?0:-1,this.lvlIcon=-1===t?"mdi-arrow-collapse":"mdi-arrow-expand"):(t=this.main[0].idx+1,t>this.lvlMax-1&&(t=0)),this.setLvl(t),this.setVals()},setLvl:function(t){var i=-1!=t?t:0,e=-1!=t?t:this.lvlMax-1;this.main.splice(0);for(var n=i;n<=e;n++){var s={idx:n,leftBtn:"",leftBtnDisabled:!1,leftBtnColor:"",leftMenu:[],leftMenuIdx:-1,text:"",text2:"",midBtn:"",midBtnDisabled:!1,midBtnColor:"",midMenu:[],midMenuIdx:-1,slider:!1,sliderCurrent:0,sliderPrevent:!1,sliderMin:0,sliderMax:100,sliderStep:1,rightBtn:"",rightBtnDisabled:!1,rightBtnColor:"",rightMenu:[],rightMenuIdx:-1};this.main.push(s)}},setVals:function(){for(var t in this.main){var i=this.main[t].idx,e=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].text),n=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].text2),s=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].slider),l=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].leftBtn),o=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].midBtn),a=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].rightBtn),r=this.createMenu(this.item.Options.setup.main[i].leftMenu),c=this.createMenu(this.item.Options.setup.main[i].midMenu),h=this.createMenu(this.item.Options.setup.main[i].rightMenu);this.main[t].text=e[0]||"",this.main[t].text2=n[0]||"",this.main[t].leftBtn=l[0]||"",this.main[t].midBtn=o[0]||"",this.main[t].rightBtn=a[0]||"",this.main[t].leftBtnDisabled=!!l[1],this.main[t].midBtnDisabled=!!o[1],this.main[t].rightBtnDisabled=!!a[1],this.main[t].leftBtnColor=l[2]||"",this.main[t].midBtnColor=o[2]||"",this.main[t].rightBtnColor=a[2]||"",this.main[t].leftMenu=r,this.main[t].leftMenuIdx=r.map((function(t){return t.active})).indexOf(!0),this.main[t].midMenu=c,this.main[t].midMenuIdx=c.map((function(t){return t.active})).indexOf(!0),this.main[t].rightMenu=h,this.main[t].rightMenuIdx=h.map((function(t){return t.active})).indexOf(!0),this.main[t].slider=!!s[0],this.main[t].sliderMin=s[2]||0,this.main[t].sliderMax=s[3]||100,this.main[t].sliderStep=s[4]||1,this.main[t].sliderPrevent?this.main[t].sliderCurrent===s[1]&&(this.main[t].sliderPrevent=!1,this.main[t].sliderCurrent=s[1]||0):this.main[t].sliderCurrent=s[1]||0}}}},c=r,h=e(1001),u=e(3453),d=e.n(u),m=e(3150),v=e(2371),f=e(7118),p=e(2102),g=e(1418),x=e(6428),_=e(6816),C=e(7620),k=e(1960),b=e(3249),I=e(459),O=e(1152),M=e(7003),T=e(2877),B=e(7611),y=e(9762),$=e(2691),Z=(0,h.Z)(c,n,s,!1,null,null,null),A=Z.exports;d()(Z,{VBtn:m.Z,VCard:v.Z,VCardText:f.ZB,VCardTitle:f.EB,VCol:p.Z,VDivider:g.Z,VIcon:x.Z,VList:_.Z,VListItem:C.Z,VListItemContent:k.km,VListItemGroup:b.Z,VListItemIcon:I.Z,VListItemTitle:k.V9,VMenu:O.Z,VProgressLinear:M.Z,VRow:T.Z,VSlider:B.Z,VSpacer:y.Z,VSystemBar:$.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/658.4364c54d.js b/www/fhemapp/js/658.4364c54d.js deleted file mode 100644 index 8685541a..00000000 --- a/www/fhemapp/js/658.4364c54d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[658],{1152:function(t,e,i){i.d(e,{Z:function(){return _}});var s=i(3242),n=i(5795),l=i(4561),o=i(5907),a=i(5936),r=i(423),c=i(3712),h=i(2936),d=i(8085),u=i(5600),m=i(549),v=i(3325),f=i(1824),p=i(4589),g=i(1439);const x=(0,v.Z)(o.Z,l.Z,a.Z,r.Z,c.Z,h.Z,d.Z);var _=x.extend({name:"v-menu",directives:{ClickOutside:u.Z,Resize:m.Z},provide(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile(){return this.tiles[this.listIndex]},calculatedLeft(){const t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?(0,p.kb)(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight(){const t=this.auto?"200px":(0,p.kb)(this.maxHeight);return t||"0"},calculatedMaxWidth(){return(0,p.kb)(this.maxWidth)||"0"},calculatedMinWidth(){if(this.minWidth)return(0,p.kb)(this.minWidth)||"0";const t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),e=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return(0,p.kb)(Math.min(e,t))||"0"},calculatedTop(){const t=this.auto?(0,p.kb)(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles(){return Boolean(this.tiles.find((t=>t.tabIndex>-1)))},styles(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive(t){t||(this.listIndex=-1)},isContentActive(t){this.hasJustFocused=t},listIndex(t,e){if(t in this.tiles){const e=this.tiles[t];e.classList.add("v-list-item--highlighted");const i=this.$refs.content.scrollTop,s=this.$refs.content.clientHeight;i>e.offsetTop-8?(0,g.Z)(e.offsetTop-e.clientHeight,{appOffset:!1,duration:300,container:this.$refs.content}):i+s{this.startTransition().then((()=>{this.$refs.content&&(this.calculatedTopAuto=this.calcTopAuto(),this.auto&&(this.$refs.content.scrollTop=this.calcScrollPosition()))}))}))},calcScrollPosition(){const t=this.$refs.content,e=t.querySelector(".v-list-item--active"),i=t.scrollHeight-t.offsetHeight;return e?Math.min(i,Math.max(0,e.offsetTop-t.offsetHeight/2+e.offsetHeight/2)):t.scrollTop},calcLeftAuto(){return parseInt(this.dimensions.activator.left-2*this.defaultOffset)},calcTopAuto(){const t=this.$refs.content,e=t.querySelector(".v-list-item--active");if(e||(this.selectedIndex=null),this.offsetY||!e)return this.computedTop;this.selectedIndex=Array.from(this.tiles).indexOf(e);const i=e.offsetTop-this.calcScrollPosition(),s=t.querySelector(".v-list-item").offsetTop;return this.computedTop-i-s-1},changeListIndex(t){if(this.getTiles(),this.isActive&&this.hasClickableTiles)if(t.keyCode!==p.Do.tab){if(t.keyCode===p.Do.down)this.nextTile();else if(t.keyCode===p.Do.up)this.prevTile();else if(t.keyCode===p.Do.end)this.lastTile();else if(t.keyCode===p.Do.home)this.firstTile();else{if(t.keyCode!==p.Do.enter||-1===this.listIndex)return;this.tiles[this.listIndex].click()}t.preventDefault()}else this.isActive=!1},closeConditional(t){const e=t.target;return this.isActive&&!this._isDestroyed&&this.closeOnClick&&!this.$refs.content.contains(e)},genActivatorAttributes(){const t=n.Z.options.methods.genActivatorAttributes.call(this);return this.activeTile&&this.activeTile.id?{...t,"aria-activedescendant":this.activeTile.id}:t},genActivatorListeners(){const t=a.Z.options.methods.genActivatorListeners.call(this);return this.disableKeys||(t.keydown=this.onKeyDown),t},genTransition(){const t=this.genContent();return this.transition?this.$createElement("transition",{props:{name:this.transition}},[t]):t},genDirectives(){const t=[{name:"show",value:this.isContentActive}];return!this.openOnHover&&this.closeOnClick&&t.push({name:"click-outside",value:{handler:()=>{this.isActive=!1},closeConditional:this.closeConditional,include:()=>[this.$el,...this.getOpenDependentElements()]}}),t},genContent(){const t={attrs:{...this.getScopeIdAttrs(),role:"role"in this.$attrs?this.$attrs.role:"menu"},staticClass:"v-menu__content",class:{...this.rootThemeClasses,...this.roundedClasses,"v-menu__content--auto":this.auto,"v-menu__content--fixed":this.activatorFixed,menuable__content__active:this.isActive,[this.contentClass.trim()]:!0},style:this.styles,directives:this.genDirectives(),ref:"content",on:{click:t=>{const e=t.target;e.getAttribute("disabled")||this.closeOnContentClick&&(this.isActive=!1)},keydown:this.onKeyDown}};return this.$listeners.scroll&&(t.on=t.on||{},t.on.scroll=this.$listeners.scroll),!this.disabled&&this.openOnHover&&(t.on=t.on||{},t.on.mouseenter=this.mouseEnterHandler),this.openOnHover&&(t.on=t.on||{},t.on.mouseleave=this.mouseLeaveHandler),this.$createElement("div",t,this.getContentSlot())},getTiles(){this.$refs.content&&(this.tiles=Array.from(this.$refs.content.querySelectorAll(".v-list-item, .v-divider, .v-subheader")))},mouseEnterHandler(){this.runDelay("open",(()=>{this.hasJustFocused||(this.hasJustFocused=!0)}))},mouseLeaveHandler(t){this.runDelay("close",(()=>{var e;null!=(e=this.$refs.content)&&e.contains(t.relatedTarget)||requestAnimationFrame((()=>{this.isActive=!1,this.callDeactivate()}))}))},nextTile(){const t=this.tiles[this.listIndex+1];if(!t){if(!this.tiles.length)return;return this.listIndex=-1,void this.nextTile()}this.listIndex++,-1===t.tabIndex&&this.nextTile()},prevTile(){const t=this.tiles[this.listIndex-1];if(!t){if(!this.tiles.length)return;return this.listIndex=this.tiles.length,void this.prevTile()}this.listIndex--,-1===t.tabIndex&&this.prevTile()},lastTile(){const t=this.tiles[this.tiles.length-1];t&&(this.listIndex=this.tiles.length-1,-1===t.tabIndex&&this.prevTile())},firstTile(){const t=this.tiles[0];t&&(this.listIndex=0,-1===t.tabIndex&&this.nextTile())},onKeyDown(t){if(t.keyCode===p.Do.esc){setTimeout((()=>{this.isActive=!1}));const t=this.getActivator();this.$nextTick((()=>t&&t.focus()))}else!this.isActive&&[p.Do.up,p.Do.down].includes(t.keyCode)&&(this.isActive=!0);this.$nextTick((()=>this.changeListIndex(t)))},onResize(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.updateDimensions,100))}},render(t){const e={staticClass:"v-menu",class:{"v-menu--attached":""===this.attach||!0===this.attach||"attach"===this.attach},directives:[{arg:"500",name:"resize",value:this.onResize}]};return t("div",e,[!this.activator&&this.genActivator(),this.showLazyContent((()=>[this.$createElement(s.Z,{props:{root:!0,light:this.light,dark:this.dark}},[this.genTransition()])]))])}})},3561:function(t,e,i){i.r(e),i.d(e,{default:function(){return $}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.item.Options.show?i("v-col",{class:t.item.Options.setup.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.item.Options.status.level,color:t.item.Options.status.color,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.name)+" "),i("v-spacer"),t.lvlIcon&&t.item.Options.status.isActive?i("v-btn",{attrs:{small:"",icon:""},on:{click:function(e){return t.lvlBtn()}}},[i("v-icon",{attrs:{small:""}},[t._v(" "+t._s(t.lvlIcon)+" ")])],1):t._e(),t.app.options.debugMode?i("jsonList",{attrs:{item:t.item}}):t._e()],1),i("v-divider"),t.item.Options.status.isActive?t._e():i("div",[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),i("v-divider")],1),t.item.Options.status.isActive?i("div",t._l(t.main,(function(e){return i("div",{key:e.idx},[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[0==e.leftMenu.length&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",color:e.leftBtnColor,disabled:e.leftBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"left","touch")},touchend:function(i){return t.clickEnd(e.idx,"left","touch")},mousedown:function(i){return t.clickStart(e.idx,"left","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"left","mouse")}}},[e.slider?i("div",[i("v-icon",[t._v(" "+t._s(e.leftBtn)+" ")])],1):t._e(),e.slider?t._e():i("div",[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)])],1):t._e(),e.leftMenu.length>0&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",right:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,l=s.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.leftMenuIdx,callback:function(i){t.$set(e,"leftMenuIdx",i)},expression:"level.leftMenuIdx"}},t._l(e.leftMenu,(function(e,s){return i("v-list-item",{key:s,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.leftBtn&&!e.slider?i("v-divider",{attrs:{vertical:""}}):t._e(),e.midBtn||e.slider?t._e():i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text)+" ")])]),!e.text2||e.midBtn||e.slider?t._e():i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text2)+" ")])]),0===e.midMenu.length&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.midBtnDisabled,color:e.midBtnColor},on:{touchstart:function(i){return t.clickStart(e.idx,"mid","touch")},touchend:function(i){return t.clickEnd(e.idx,"mid","touch")},mousedown:function(i){return t.clickStart(e.idx,"mid","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"mid","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)],1):t._e(),e.midMenu.length>0&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,l=s.attrs;return[e.text?i("v-btn",t._g(t._b({staticClass:"headline font-weight-bold",attrs:{block:"",plain:""}},"v-btn",l,!1),n),[t._v(" "+t._s(e.text)+" ")]):t._e(),e.text?t._e():i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.midMenuIdx,callback:function(i){t.$set(e,"midMenuIdx",i)},expression:"level.midMenuIdx"}},t._l(e.midMenu,(function(e,s){return i("v-list-item",{key:s,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.slider?i("v-col",{attrs:{align:"center"}},[i("v-slider",{attrs:{min:e.sliderMin,max:e.sliderMax,label:e.text,"hide-details":"","thumb-label":"","thumb-size":"48",color:"success",step:e.sliderStep},on:{change:function(i){return t.setSlider(e.idx,e.sliderCurrent)}},scopedSlots:t._u([{key:"thumb-label",fn:function(s){var n=s.value;return[i("div",{staticClass:"text-h6"},[t._v(" "+t._s(t.sliderVal(e.idx,n))+" ")])]}}],null,!0),model:{value:e.sliderCurrent,callback:function(i){t.$set(e,"sliderCurrent",i)},expression:"level.sliderCurrent"}})],1):t._e(),e.rightBtn&&!e.slider?i("v-divider",{attrs:{vertical:""}}):t._e(),0===e.rightMenu.length&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.rightBtnDisabled,color:e.rightBtnColor},on:{touchstart:function(i){return t.clickStart(e.idx,"right","touch")},touchend:function(i){return t.clickEnd(e.idx,"right","touch")},mousedown:function(i){return t.clickStart(e.idx,"right","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"right","mouse")}}},[e.slider?i("div",[i("v-icon",[t._v(" "+t._s(e.rightBtn)+" ")])],1):t._e(),e.slider?t._e():i("div",[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)])],1):t._e(),e.rightMenu.length>0&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,l=s.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.rightMenuIdx,callback:function(i){t.$set(e,"rightMenuIdx",i)},expression:"level.rightMenuIdx"}},t._l(e.rightMenu,(function(e,s){return i("v-list-item",{key:s,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e()],1)],1),i("v-divider")],1)})),0):t._e(),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),i("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},n=[],l=i(1830),o={components:{jsonList:l.Z},props:{item:{type:Object,default:()=>({name:"default"})}},data:()=>({name:"default",app:{options:{debugMode:!1}},main:[],lvlMax:1,lvlIcon:null,timer:!1,long:!1,pendingClick:0,touchFirst:!1}),watch:{item:{immediate:!1,deep:!0,handler(){this.setVals()}}},created(){this.app.options=this.$fhem.app.options,this.lvlMax=this.item.Options.setup.main.length,this.lvlIcon=this.lvlMax>1?this.item.Options.setup.expand?"mdi-arrow-expand":"mdi-swap-vertical":null,this.setLvl(this.$fhem.getEl(this.item,"Options","setup","expanded")&&this.$fhem.getEl(this.item,"Options","setup","expand")?-1:0),this.setVals()},methods:{sendCmd(t,e){e?(this.pendingClick&&(clearTimeout(this.pendingClick),this.pendingClick=0),this.pendingClick=setTimeout((()=>{this.$fhem.request(t)}),1e3)):this.$fhem.request(t)},updateReading(t){let e=t.split(" ");4===e.length&&this.$fhem.getEl(this.item,"Readings",e[2],"Value")&&(this.item.Readings[e[2]].Value=e[3])},createCmd(t){let e="";if(t.match("set")){let i=t.trim().split(" ");if(i[1]&&i[1].match("Connected")){let t=i[1].replace("Connected.","");i[1]=this.$fhem.getEl(this.item,"Connected",t,"Internals","NAME"),i[1]?e=i.join(" "):this.$fhem.log({lvl:1,msg:"Connected Device not found. "+this.item.Options})}else e=t}else e="set "+this.item.Name+" "+t;return e},clickStart(t,e,i){this.long=!1,this.$fhem.log({lvl:5,msg:"ClickStart: type "+e+":"+i}),this.touchFirst&&"mouse"===i||("touch"===i&&(this.touchFirst=!0),this.timer=setInterval((()=>{this.long=!0;let i=this.item.Options.setup.main[t][e+"Long"];if(this.$fhem.log({lvl:5,msg:"ClickEvent: Long ["+i+"]"}),i){let t=this.$fhem.handleVals(this.item,i);if(t[0]){let e=this.createCmd(t[0]);this.sendCmd(e),this.timer=clearInterval(this.timer)}}}),1e3))},clickEnd(t,e,i){if(this.$fhem.log({lvl:5,msg:"ClickEnd: type "+e+":"+i}),this.touchFirst&&"mouse"===i)return;"touch"===i&&(this.touchFirst=!0),this.timer=clearInterval(this.timer);let s=this.item.Options.setup.main[t][e+(this.long?"LongRelease":"Click")];if(this.$fhem.log({lvl:5,msg:"ClickEvent: "+(this.long?"LongRelease":"Click")+" ["+s+"]"}),s){let e=this.$fhem.handleVals(this.item,s);if(e[0]){let i=this.item.Options.setup.expand?t:0;this.main[i].sliderPrevent=!1;let n=this.createCmd(e[0]),l=-1!=s.findIndex((t=>t.match("%i")));!this.long&&l&&this.updateReading(n),this.sendCmd(n,l)}}},sliderVal(t,e){let i=this.item.Options.setup.main[t].slider,s=e;if(i){let t=this.$fhem.handleVals(this.item,i),n=t[4]&&t[4].match(".")?1:0;s=e.toFixed(n)}return s},setSlider(t,e){let i=this.item.Options.setup.main[t].slider;if(i){let s=this.$fhem.handleVals(this.item,i);if(s[0]){let i=this.item.Options.setup.expand?t:0;this.main[i].sliderPrevent=!0;let n=this.createCmd(s[0]),l=s[4]&&s[4].match(".")?1:0;n=n.replace("%v",e.toFixed(l)),this.sendCmd(n)}}},checkMenu(t){let e=!1;if(t){let i=t.split(" ");i[0].match("set")&&i.splice(0,2),1===i.length&&i.splice(0,0,"state");let s=/\./.test(i[0])?i[0].split("."):["Readings",i[0],"Value"],n=this.$fhem.getEl(this.item,...s);n&&n===i[1]&&(e=!0)}return e},createMenu(t){let e=[];if(t&&t.length>0)for(let i of t){let t=i.split(":");if(t.length>1){let i=this.createCmd(t[1].replace(/:/g,":")),s=this.checkMenu(i);e.push({name:t[0],cmd:i,active:s})}}return e},lvlBtn(){let t=0;this.item.Options.setup.expand?(t=this.main.length>1?0:-1,this.lvlIcon=-1===t?"mdi-arrow-collapse":"mdi-arrow-expand"):(t=this.main[0].idx+1,t>this.lvlMax-1&&(t=0)),this.setLvl(t),this.setVals()},setLvl(t){let e=-1!=t?t:0,i=-1!=t?t:this.lvlMax-1;this.main.splice(0);for(let s=e;s<=i;s++){let t={idx:s,leftBtn:"",leftBtnDisabled:!1,leftBtnColor:"",leftMenu:[],leftMenuIdx:-1,text:"",text2:"",midBtn:"",midBtnDisabled:!1,midBtnColor:"",midMenu:[],midMenuIdx:-1,slider:!1,sliderCurrent:0,sliderPrevent:!1,sliderMin:0,sliderMax:100,sliderStep:1,rightBtn:"",rightBtnDisabled:!1,rightBtnColor:"",rightMenu:[],rightMenuIdx:-1};this.main.push(t)}},setVals(){for(const t in this.main){let e=this.main[t].idx,i=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text),s=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text2),n=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].slider),l=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].leftBtn),o=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].midBtn),a=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].rightBtn),r=this.createMenu(this.item.Options.setup.main[e].leftMenu),c=this.createMenu(this.item.Options.setup.main[e].midMenu),h=this.createMenu(this.item.Options.setup.main[e].rightMenu);this.main[t].text=i[0]||"",this.main[t].text2=s[0]||"",this.main[t].leftBtn=l[0]||"",this.main[t].midBtn=o[0]||"",this.main[t].rightBtn=a[0]||"",this.main[t].leftBtnDisabled=!!l[1],this.main[t].midBtnDisabled=!!o[1],this.main[t].rightBtnDisabled=!!a[1],this.main[t].leftBtnColor=l[2]||"",this.main[t].midBtnColor=o[2]||"",this.main[t].rightBtnColor=a[2]||"",this.main[t].leftMenu=r,this.main[t].leftMenuIdx=r.map((t=>t.active)).indexOf(!0),this.main[t].midMenu=c,this.main[t].midMenuIdx=c.map((t=>t.active)).indexOf(!0),this.main[t].rightMenu=h,this.main[t].rightMenuIdx=h.map((t=>t.active)).indexOf(!0),this.main[t].slider=!!n[0],this.main[t].sliderMin=n[2]||0,this.main[t].sliderMax=n[3]||100,this.main[t].sliderStep=n[4]||1,this.main[t].sliderPrevent?this.main[t].sliderCurrent===n[1]&&(this.main[t].sliderPrevent=!1,this.main[t].sliderCurrent=n[1]||0):this.main[t].sliderCurrent=n[1]||0}}}},a=o,r=i(1001),c=i(3453),h=i.n(c),d=i(3150),u=i(2371),m=i(7118),v=i(2102),f=i(1418),p=i(6428),g=i(6816),x=i(7620),_=i(1960),C=i(3249),k=i(459),b=i(1152),I=i(7003),O=i(2877),M=i(7611),T=i(9762),B=i(2691),y=(0,r.Z)(a,s,n,!1,null,null,null),$=y.exports;h()(y,{VBtn:d.Z,VCard:u.Z,VCardText:m.ZB,VCardTitle:m.EB,VCol:v.Z,VDivider:f.Z,VIcon:p.Z,VList:g.Z,VListItem:x.Z,VListItemContent:_.km,VListItemGroup:C.Z,VListItemIcon:k.Z,VListItemTitle:_.V9,VMenu:b.Z,VProgressLinear:I.Z,VRow:O.Z,VSlider:M.Z,VSpacer:T.Z,VSystemBar:B.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/775-legacy.1fbe1eec.js b/www/fhemapp/js/775-legacy.1fbe1eec.js new file mode 100644 index 00000000..0adf4871 --- /dev/null +++ b/www/fhemapp/js/775-legacy.1fbe1eec.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[775],{3775:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",e._l(e.app.data.deviceList,(function(e){return n(e.Options.component,{key:e.Internals.FUUID,tag:"component",attrs:{item:e}})})),1)],1)},s=[],a=(n(1539),n(8783),n(3948),n(8309),n(4916),n(4723),n(7327),n(3123),{name:"DevicesView",components:{templ_default:function(){return Promise.all([n.e(121),n.e(288),n.e(322),n.e(897)]).then(n.bind(n,9216))},templ_panel:function(){return Promise.all([n.e(121),n.e(337)]).then(n.bind(n,2965))},templ_chart:function(){return Promise.all([n.e(121),n.e(288),n.e(285),n.e(387)]).then(n.bind(n,387))},templ_weather:function(){return n.e(947).then(n.bind(n,9285))},templ_scenes:function(){return n.e(869).then(n.bind(n,1869))},templ_sonos:function(){return Promise.all([n.e(121),n.e(288),n.e(322),n.e(475)]).then(n.bind(n,400))},templ_sysmon:function(){return Promise.all([n.e(121),n.e(289)]).then(n.bind(n,5193))},templ_hmlan:function(){return n.e(438).then(n.bind(n,7438))},templ_cam:function(){return Promise.all([n.e(121),n.e(396)]).then(n.bind(n,8519))},templ_iframe:function(){return Promise.all([n.e(121),n.e(154)]).then(n.bind(n,2756))}},data:function(){return{app:{session:{connect:!1},options:{mobileHeader:!1},data:{deviceList:[],header:""}}}},watch:{$route:function(){this.subscribe()},"app.session.ready":function(e){e&&this.subscribe()}},mounted:function(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data},methods:{setHeader:function(){(this.app.options.mobileHeader||"page"===this.app.options.mobileHeaderContent)&&("Devices"===this.$route.name?this.$route.params.filter.match("device=")?this.$fhem.app.appBar.mobileHeader="":this.$fhem.app.appBar.mobileHeader=this.$route.params.filter.split("=")[1]:this.$fhem.app.appBar.mobileHeader=this.$route.name)},subscribe:function(){var e=this.$route.params.filter||this.$route.path;this.setHeader(),this.$fhem.getDevices(e)}}}),r=a,o=n(1001),p=n(3453),u=n.n(p),h=n(2877),l=(0,o.Z)(r,i,s,!1,null,null,null),m=l.exports;u()(l,{VRow:h.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/775-legacy.80cc0bc3.js b/www/fhemapp/js/775-legacy.80cc0bc3.js deleted file mode 100644 index 0c881f2a..00000000 --- a/www/fhemapp/js/775-legacy.80cc0bc3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[775],{3775:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("v-row",e._l(e.app.data.deviceList,(function(e){return n(e.Options.component,{key:e.Internals.FUUID,tag:"component",attrs:{item:e}})})),1)],1)},s=[],a=(n(1539),n(8783),n(3948),n(8309),n(4916),n(4723),n(7327),n(3123),{name:"DevicesView",components:{templ_default:function(){return Promise.all([n.e(121),n.e(288),n.e(322),n.e(658)]).then(n.bind(n,3561))},templ_panel:function(){return Promise.all([n.e(121),n.e(337)]).then(n.bind(n,2965))},templ_chart:function(){return Promise.all([n.e(121),n.e(288),n.e(285),n.e(387)]).then(n.bind(n,387))},templ_weather:function(){return n.e(947).then(n.bind(n,9285))},templ_scenes:function(){return n.e(869).then(n.bind(n,1869))},templ_sonos:function(){return Promise.all([n.e(121),n.e(288),n.e(322),n.e(475)]).then(n.bind(n,400))},templ_sysmon:function(){return Promise.all([n.e(121),n.e(997)]).then(n.bind(n,214))},templ_hmlan:function(){return n.e(438).then(n.bind(n,7438))},templ_cam:function(){return Promise.all([n.e(121),n.e(396)]).then(n.bind(n,8519))},templ_iframe:function(){return Promise.all([n.e(121),n.e(154)]).then(n.bind(n,2756))}},data:function(){return{app:{session:{connect:!1},options:{mobileHeader:!1},data:{deviceList:[],header:""}}}},watch:{$route:function(){this.subscribe()},"app.session.ready":function(e){e&&this.subscribe()}},mounted:function(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data},methods:{setHeader:function(){(this.app.options.mobileHeader||"page"===this.app.options.mobileHeaderContent)&&("Devices"===this.$route.name?this.$route.params.filter.match("device=")?this.$fhem.app.appBar.mobileHeader="":this.$fhem.app.appBar.mobileHeader=this.$route.params.filter.split("=")[1]:this.$fhem.app.appBar.mobileHeader=this.$route.name)},subscribe:function(){var e=this.$route.params.filter||this.$route.path;this.setHeader(),this.$fhem.getDevices(e)}}}),r=a,o=n(1001),p=n(3453),u=n.n(p),h=n(2877),l=(0,o.Z)(r,i,s,!1,null,null,null),m=l.exports;u()(l,{VRow:h.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/775.85bdb8ac.js b/www/fhemapp/js/775.85bdb8ac.js new file mode 100644 index 00000000..264a628e --- /dev/null +++ b/www/fhemapp/js/775.85bdb8ac.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[775],{3775:function(e,t,s){s.r(t),s.d(t,{default:function(){return d}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("v-row",e._l(e.app.data.deviceList,(function(e){return s(e.Options.component,{key:e.Internals.FUUID,tag:"component",attrs:{item:e}})})),1)],1)},a=[],n={name:"DevicesView",components:{templ_default:()=>Promise.all([s.e(121),s.e(288),s.e(322),s.e(897)]).then(s.bind(s,9216)),templ_panel:()=>Promise.all([s.e(121),s.e(337)]).then(s.bind(s,2965)),templ_chart:()=>Promise.all([s.e(121),s.e(288),s.e(285),s.e(387)]).then(s.bind(s,387)),templ_weather:()=>s.e(947).then(s.bind(s,9285)),templ_scenes:()=>s.e(869).then(s.bind(s,1869)),templ_sonos:()=>Promise.all([s.e(121),s.e(288),s.e(322),s.e(475)]).then(s.bind(s,400)),templ_sysmon:()=>Promise.all([s.e(121),s.e(289)]).then(s.bind(s,5193)),templ_hmlan:()=>s.e(438).then(s.bind(s,7438)),templ_cam:()=>Promise.all([s.e(121),s.e(396)]).then(s.bind(s,8519)),templ_iframe:()=>Promise.all([s.e(121),s.e(154)]).then(s.bind(s,2756))},data:()=>({app:{session:{connect:!1},options:{mobileHeader:!1},data:{deviceList:[],header:""}}}),watch:{$route(){this.subscribe()},"app.session.ready"(e){e&&this.subscribe()}},mounted(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data},methods:{setHeader(){(this.app.options.mobileHeader||"page"===this.app.options.mobileHeaderContent)&&("Devices"===this.$route.name?this.$route.params.filter.match("device=")?this.$fhem.app.appBar.mobileHeader="":this.$fhem.app.appBar.mobileHeader=this.$route.params.filter.split("=")[1]:this.$fhem.app.appBar.mobileHeader=this.$route.name)},subscribe(){let e=this.$route.params.filter||this.$route.path;this.setHeader(),this.$fhem.getDevices(e)}}},p=n,o=s(1001),r=s(3453),h=s.n(r),l=s(2877),m=(0,o.Z)(p,i,a,!1,null,null,null),d=m.exports;h()(m,{VRow:l.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/775.a58a8438.js b/www/fhemapp/js/775.a58a8438.js deleted file mode 100644 index bb05cfd0..00000000 --- a/www/fhemapp/js/775.a58a8438.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[775],{3775:function(e,t,s){s.r(t),s.d(t,{default:function(){return d}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("v-row",e._l(e.app.data.deviceList,(function(e){return s(e.Options.component,{key:e.Internals.FUUID,tag:"component",attrs:{item:e}})})),1)],1)},a=[],n={name:"DevicesView",components:{templ_default:()=>Promise.all([s.e(121),s.e(288),s.e(322),s.e(658)]).then(s.bind(s,3561)),templ_panel:()=>Promise.all([s.e(121),s.e(337)]).then(s.bind(s,2965)),templ_chart:()=>Promise.all([s.e(121),s.e(288),s.e(285),s.e(387)]).then(s.bind(s,387)),templ_weather:()=>s.e(947).then(s.bind(s,9285)),templ_scenes:()=>s.e(869).then(s.bind(s,1869)),templ_sonos:()=>Promise.all([s.e(121),s.e(288),s.e(322),s.e(475)]).then(s.bind(s,400)),templ_sysmon:()=>Promise.all([s.e(121),s.e(997)]).then(s.bind(s,214)),templ_hmlan:()=>s.e(438).then(s.bind(s,7438)),templ_cam:()=>Promise.all([s.e(121),s.e(396)]).then(s.bind(s,8519)),templ_iframe:()=>Promise.all([s.e(121),s.e(154)]).then(s.bind(s,2756))},data:()=>({app:{session:{connect:!1},options:{mobileHeader:!1},data:{deviceList:[],header:""}}}),watch:{$route(){this.subscribe()},"app.session.ready"(e){e&&this.subscribe()}},mounted(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data},methods:{setHeader(){(this.app.options.mobileHeader||"page"===this.app.options.mobileHeaderContent)&&("Devices"===this.$route.name?this.$route.params.filter.match("device=")?this.$fhem.app.appBar.mobileHeader="":this.$fhem.app.appBar.mobileHeader=this.$route.params.filter.split("=")[1]:this.$fhem.app.appBar.mobileHeader=this.$route.name)},subscribe(){let e=this.$route.params.filter||this.$route.path;this.setHeader(),this.$fhem.getDevices(e)}}},p=n,o=s(1001),r=s(3453),h=s.n(r),l=s(2877),m=(0,o.Z)(p,i,a,!1,null,null,null),d=m.exports;h()(m,{VRow:l.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/897-legacy.dccd00c4.js b/www/fhemapp/js/897-legacy.dccd00c4.js new file mode 100644 index 00000000..6b839e9c --- /dev/null +++ b/www/fhemapp/js/897-legacy.dccd00c4.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[897],{1152:function(t,i,e){e.d(i,{Z:function(){return b}});var n=e(3796),s=e(8932),l=e(4367),o=(e(9653),e(9826),e(1539),e(1038),e(8783),e(2222),e(3210),e(6699),e(2023),e(3242)),a=e(5795),r=e(4561),c=e(5907),h=e(5936),u=e(423),d=e(3712),m=e(2936),v=e(8085),f=e(5600),p=e(549),g=e(3325),x=e(1824),_=e(4589),C=e(1439),k=(0,g.Z)(c.Z,r.Z,h.Z,u.Z,d.Z,m.Z,v.Z),b=k.extend({name:"v-menu",directives:{ClickOutside:f.Z,Resize:p.Z},provide:function(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data:function(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile:function(){return this.tiles[this.listIndex]},calculatedLeft:function(){var t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?(0,_.kb)(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight:function(){var t=this.auto?"200px":(0,_.kb)(this.maxHeight);return t||"0"},calculatedMaxWidth:function(){return(0,_.kb)(this.maxWidth)||"0"},calculatedMinWidth:function(){if(this.minWidth)return(0,_.kb)(this.minWidth)||"0";var t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),i=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return(0,_.kb)(Math.min(i,t))||"0"},calculatedTop:function(){var t=this.auto?(0,_.kb)(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles:function(){return Boolean(this.tiles.find((function(t){return t.tabIndex>-1})))},styles:function(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive:function(t){t||(this.listIndex=-1)},isContentActive:function(t){this.hasJustFocused=t},listIndex:function(t,i){if(t in this.tiles){var e=this.tiles[t];e.classList.add("v-list-item--highlighted");var n=this.$refs.content.scrollTop,s=this.$refs.content.clientHeight;n>e.offsetTop-8?(0,C.Z)(e.offsetTop-e.clientHeight,{appOffset:!1,duration:300,container:this.$refs.content}):n+s0&&i.leftBtn?e("v-col",{staticClass:"col-3",attrs:{align:"center"}},[e("v-menu",{attrs:{bottom:"",right:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,l=n.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),s),[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.leftBtn)+" ")])],1)]}}],null,!0)},[e("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[e("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:i.leftMenuIdx,callback:function(e){t.$set(i,"leftMenuIdx",e)},expression:"level.leftMenuIdx"}},t._l(i.leftMenu,(function(i,n){return e("v-list-item",{key:n,on:{click:function(e){return t.sendCmd(i.cmd)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(i.name)+" ")])],1),i.active?e("v-list-item-icon",[e("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),i.leftBtn&&!i.slider?e("v-divider",{attrs:{vertical:""}}):t._e(),i.midBtn||i.slider?t._e():e("v-col",{attrs:{align:i.textAlign}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(i.text)+" ")])]),!i.text2||i.midBtn||i.slider?t._e():e("v-col",{attrs:{align:i.text2Align}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(i.text2)+" ")])]),0===i.midMenu.length&&i.midBtn?e("v-col",{staticClass:"headline",attrs:{align:"center"}},[e("v-btn",{attrs:{small:"",icon:"",disabled:i.midBtnDisabled,color:i.midBtnColor},on:{touchstart:function(e){return t.clickStart(i.idx,"mid","touch")},touchend:function(e){return t.clickEnd(i.idx,"mid","touch")},mousedown:function(e){return t.clickStart(i.idx,"mid","mouse")},mouseup:function(e){return t.clickEnd(i.idx,"mid","mouse")}}},[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.midBtn)+" ")])],1)],1):t._e(),i.midMenu.length>0&&i.midBtn?e("v-col",{staticClass:"headline",attrs:{align:"center"}},[e("v-menu",{attrs:{bottom:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,l=n.attrs;return[i.text?e("v-btn",t._g(t._b({staticClass:"headline font-weight-bold",attrs:{block:"",plain:""}},"v-btn",l,!1),s),[t._v(" "+t._s(i.text)+" ")]):t._e(),i.text?t._e():e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),s),[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.midBtn)+" ")])],1)]}}],null,!0)},[e("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[e("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:i.midMenuIdx,callback:function(e){t.$set(i,"midMenuIdx",e)},expression:"level.midMenuIdx"}},t._l(i.midMenu,(function(i,n){return e("v-list-item",{key:n,on:{click:function(e){return t.sendCmd(i.cmd)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(i.name)+" ")])],1),i.active?e("v-list-item-icon",[e("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),i.slider?e("v-col",{attrs:{align:"center"}},[e("v-slider",{attrs:{min:i.sliderMin,max:i.sliderMax,label:i.text,"hide-details":"","thumb-label":"","thumb-size":"48",color:"success",step:i.sliderStep},on:{change:function(e){return t.setSlider(i.idx,i.sliderCurrent)}},scopedSlots:t._u([{key:"thumb-label",fn:function(n){var s=n.value;return[e("div",{staticClass:"text-h6"},[t._v(" "+t._s(t.sliderVal(i.idx,s))+" ")])]}}],null,!0),model:{value:i.sliderCurrent,callback:function(e){t.$set(i,"sliderCurrent",e)},expression:"level.sliderCurrent"}})],1):t._e(),i.rightBtn&&!i.slider?e("v-divider",{attrs:{vertical:""}}):t._e(),0===i.rightMenu.length&&i.rightBtn?e("v-col",{staticClass:"col-3",attrs:{align:"center"}},[e("v-btn",{attrs:{small:"",icon:"",disabled:i.rightBtnDisabled,color:i.rightBtnColor},on:{touchstart:function(e){return t.clickStart(i.idx,"right","touch")},touchend:function(e){return t.clickEnd(i.idx,"right","touch")},mousedown:function(e){return t.clickStart(i.idx,"right","mouse")},mouseup:function(e){return t.clickEnd(i.idx,"right","mouse")}}},[i.slider?e("div",[e("v-icon",[t._v(" "+t._s(i.rightBtn)+" ")])],1):t._e(),i.slider?t._e():e("div",[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.rightBtn)+" ")])],1)])],1):t._e(),i.rightMenu.length>0&&i.rightBtn?e("v-col",{staticClass:"col-3",attrs:{align:"center"}},[e("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(n){var s=n.on,l=n.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),s),[e("v-icon",{attrs:{large:""}},[t._v(" "+t._s(i.rightBtn)+" ")])],1)]}}],null,!0)},[e("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[e("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:i.rightMenuIdx,callback:function(e){t.$set(i,"rightMenuIdx",e)},expression:"level.rightMenuIdx"}},t._l(i.rightMenu,(function(i,n){return e("v-list-item",{key:n,on:{click:function(e){return t.sendCmd(i.cmd)}}},[e("v-list-item-content",[e("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(i.name)+" ")])],1),i.active?e("v-list-item-icon",[e("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e()],1)],1),e("v-divider")],1)})),0):t._e(),e("v-system-bar",{attrs:{color:"secondary darken-1"}},[e("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),e("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),e("v-spacer"),e("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),e("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),e("v-spacer"),e("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),e("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},s=[],l=e(2032),o=e(8932),a=(e(4916),e(3123),e(4723),e(3210),e(5306),e(9600),e(4553),e(6977),e(561),e(7601),e(2222),e(1249),e(1830)),r={components:{jsonList:a.Z},props:{item:{type:Object,default:function(){return{name:"default"}}}},data:function(){return{name:"default",app:{options:{debugMode:!1}},main:[],lvlMax:1,lvlIcon:null,timer:!1,long:!1,pendingClick:0,touchFirst:!1}},watch:{item:{immediate:!1,deep:!0,handler:function(){this.setVals()}}},created:function(){this.app.options=this.$fhem.app.options,this.lvlMax=this.item.Options.setup.main.length,this.lvlIcon=this.lvlMax>1?this.item.Options.setup.expand?"mdi-arrow-expand":"mdi-swap-vertical":null,this.setLvl(this.$fhem.getEl(this.item,"Options","setup","expanded")&&this.$fhem.getEl(this.item,"Options","setup","expand")?-1:0),this.setVals()},methods:{sendCmd:function(t,i){var e=this;i?(this.pendingClick&&(clearTimeout(this.pendingClick),this.pendingClick=0),this.pendingClick=setTimeout((function(){e.$fhem.request(t)}),1e3)):this.$fhem.request(t)},updateReading:function(t){var i=t.split(" ");4===i.length&&this.$fhem.getEl(this.item,"Readings",i[2],"Value")&&(this.item.Readings[i[2]].Value=i[3])},createCmd:function(t){var i="";if(t.match("set")){var e=t.trim().split(" ");if(e[1]&&e[1].match("Connected")){var n=e[1].replace("Connected.","");e[1]=this.$fhem.getEl(this.item,"Connected",n,"Internals","NAME"),e[1]?i=e.join(" "):this.$fhem.log({lvl:1,msg:"Connected Device not found. "+this.item.Options})}else i=t}else i="set "+this.item.Name+" "+t;return i},clickStart:function(t,i,e){var n=this;this.long=!1,this.$fhem.log({lvl:5,msg:"ClickStart: type "+i+":"+e}),this.touchFirst&&"mouse"===e||("touch"===e&&(this.touchFirst=!0),this.timer=setInterval((function(){n.long=!0;var e=n.item.Options.setup.main[t][i+"Long"];if(n.$fhem.log({lvl:5,msg:"ClickEvent: Long ["+e+"]"}),e){var s=n.$fhem.handleVals(n.item,e);if(s[0]){var l=n.createCmd(s[0]);n.sendCmd(l),n.timer=clearInterval(n.timer)}}}),1e3))},clickEnd:function(t,i,e){if(this.$fhem.log({lvl:5,msg:"ClickEnd: type "+i+":"+e}),!this.touchFirst||"mouse"!==e){"touch"===e&&(this.touchFirst=!0),this.timer=clearInterval(this.timer);var n=this.item.Options.setup.main[t][i+(this.long?"LongRelease":"Click")];if(this.$fhem.log({lvl:5,msg:"ClickEvent: "+(this.long?"LongRelease":"Click")+" ["+n+"]"}),n){var s=this.$fhem.handleVals(this.item,n);if(s[0]){var l=this.item.Options.setup.expand?t:0;this.main[l].sliderPrevent=!1;var o=this.createCmd(s[0]),a=-1!=n.findIndex((function(t){return t.match("%i")}));!this.long&&a&&this.updateReading(o),this.sendCmd(o,a)}}}},sliderVal:function(t,i){var e=this.item.Options.setup.main[t].slider,n=i;if(e){var s=this.$fhem.handleVals(this.item,e),l=s[4]&&s[4].match(".")?1:0;n=i.toFixed(l)}return n},setSlider:function(t,i){var e=this.item.Options.setup.main[t].slider;if(e){var n=this.$fhem.handleVals(this.item,e);if(n[0]){var s=this.item.Options.setup.expand?t:0;this.main[s].sliderPrevent=!0;var l=this.createCmd(n[0]),o=n[4]&&n[4].match(".")?1:0;l=l.replace("%v",i.toFixed(o)),this.sendCmd(l)}}},checkMenu:function(t){var i=!1;if(t){var e,n=t.split(" ");n[0].match("set")&&n.splice(0,2),1===n.length&&n.splice(0,0,"state");var s=/\./.test(n[0])?n[0].split("."):["Readings",n[0],"Value"],l=(e=this.$fhem).getEl.apply(e,[this.item].concat((0,o.Z)(s)));l&&l===n[1]&&(i=!0)}return i},createMenu:function(t){var i=[];if(t&&t.length>0){var e,n=(0,l.Z)(t);try{for(n.s();!(e=n.n()).done;){var s=e.value,o=s.split(":");if(o.length>1){var a=this.createCmd(o[1].replace(/:/g,":")),r=this.checkMenu(a);i.push({name:o[0],cmd:a,active:r})}}}catch(c){n.e(c)}finally{n.f()}}return i},lvlBtn:function(){var t=0;this.item.Options.setup.expand?(t=this.main.length>1?0:-1,this.lvlIcon=-1===t?"mdi-arrow-collapse":"mdi-arrow-expand"):(t=this.main[0].idx+1,t>this.lvlMax-1&&(t=0)),this.setLvl(t),this.setVals()},setLvl:function(t){var i=-1!=t?t:0,e=-1!=t?t:this.lvlMax-1;this.main.splice(0);for(var n=i;n<=e;n++){var s={idx:n,leftBtn:"",leftBtnDisabled:!1,leftBtnColor:"",leftMenu:[],leftMenuIdx:-1,text:"",textAlign:"",text2:"",text2Align:"",midBtn:"",midBtnDisabled:!1,midBtnColor:"",midMenu:[],midMenuIdx:-1,slider:!1,sliderCurrent:0,sliderPrevent:!1,sliderMin:0,sliderMax:100,sliderStep:1,rightBtn:"",rightBtnDisabled:!1,rightBtnColor:"",rightMenu:[],rightMenuIdx:-1};this.main.push(s)}},setVals:function(){for(var t in this.main){var i=this.main[t].idx,e=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].text),n=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].text2),s=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].slider),l=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].leftBtn),o=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].midBtn),a=this.$fhem.handleVals(this.item,this.item.Options.setup.main[i].rightBtn),r=this.createMenu(this.item.Options.setup.main[i].leftMenu),c=this.createMenu(this.item.Options.setup.main[i].midMenu),h=this.createMenu(this.item.Options.setup.main[i].rightMenu);this.main[t].text=e[0]||"",this.main[t].textAlign=e[1]||"center",this.main[t].text2=n[0]||"",this.main[t].text2Align=n[1]||"center",this.main[t].leftBtn=l[0]||"",this.main[t].midBtn=o[0]||"",this.main[t].rightBtn=a[0]||"",this.main[t].leftBtnDisabled=!!l[1],this.main[t].midBtnDisabled=!!o[1],this.main[t].rightBtnDisabled=!!a[1],this.main[t].leftBtnColor=l[2]||"",this.main[t].midBtnColor=o[2]||"",this.main[t].rightBtnColor=a[2]||"",this.main[t].leftMenu=r,this.main[t].leftMenuIdx=r.map((function(t){return t.active})).indexOf(!0),this.main[t].midMenu=c,this.main[t].midMenuIdx=c.map((function(t){return t.active})).indexOf(!0),this.main[t].rightMenu=h,this.main[t].rightMenuIdx=h.map((function(t){return t.active})).indexOf(!0),this.main[t].slider=!!s[0],this.main[t].sliderMin=s[2]||0,this.main[t].sliderMax=s[3]||100,this.main[t].sliderStep=s[4]||1,this.main[t].sliderPrevent?this.main[t].sliderCurrent===s[1]&&(this.main[t].sliderPrevent=!1,this.main[t].sliderCurrent=s[1]||0):this.main[t].sliderCurrent=s[1]||0}}}},c=r,h=e(1001),u=e(3453),d=e.n(u),m=e(3150),v=e(2371),f=e(7118),p=e(2102),g=e(1418),x=e(6428),_=e(6816),C=e(7620),k=e(1960),b=e(3249),I=e(459),O=e(1152),M=e(7003),T=e(2877),B=e(7611),y=e(9762),$=e(2691),A=(0,h.Z)(c,n,s,!1,null,null,null),Z=A.exports;d()(A,{VBtn:m.Z,VCard:v.Z,VCardText:f.ZB,VCardTitle:f.EB,VCol:p.Z,VDivider:g.Z,VIcon:x.Z,VList:_.Z,VListItem:C.Z,VListItemContent:k.km,VListItemGroup:b.Z,VListItemIcon:I.Z,VListItemTitle:k.V9,VMenu:O.Z,VProgressLinear:M.Z,VRow:T.Z,VSlider:B.Z,VSpacer:y.Z,VSystemBar:$.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/897.1dda7a71.js b/www/fhemapp/js/897.1dda7a71.js new file mode 100644 index 00000000..727032f9 --- /dev/null +++ b/www/fhemapp/js/897.1dda7a71.js @@ -0,0 +1 @@ +"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[897],{1152:function(t,e,i){i.d(e,{Z:function(){return _}});var s=i(3242),n=i(5795),l=i(4561),o=i(5907),a=i(5936),r=i(423),c=i(3712),h=i(2936),d=i(8085),m=i(5600),u=i(549),v=i(3325),f=i(1824),p=i(4589),g=i(1439);const x=(0,v.Z)(o.Z,l.Z,a.Z,r.Z,c.Z,h.Z,d.Z);var _=x.extend({name:"v-menu",directives:{ClickOutside:m.Z,Resize:u.Z},provide(){return{isInMenu:!0,theme:this.theme}},props:{auto:Boolean,closeOnClick:{type:Boolean,default:!0},closeOnContentClick:{type:Boolean,default:!0},disabled:Boolean,disableKeys:Boolean,maxHeight:{type:[Number,String],default:"auto"},offsetX:Boolean,offsetY:Boolean,openOnHover:Boolean,origin:{type:String,default:"top left"},transition:{type:[Boolean,String],default:"v-menu-transition"}},data(){return{calculatedTopAuto:0,defaultOffset:8,hasJustFocused:!1,listIndex:-1,resizeTimeout:0,selectedIndex:null,tiles:[]}},computed:{activeTile(){return this.tiles[this.listIndex]},calculatedLeft(){const t=Math.max(this.dimensions.content.width,parseFloat(this.calculatedMinWidth));return this.auto?(0,p.kb)(this.calcXOverflow(this.calcLeftAuto(),t))||"0":this.calcLeft(t)||"0"},calculatedMaxHeight(){const t=this.auto?"200px":(0,p.kb)(this.maxHeight);return t||"0"},calculatedMaxWidth(){return(0,p.kb)(this.maxWidth)||"0"},calculatedMinWidth(){if(this.minWidth)return(0,p.kb)(this.minWidth)||"0";const t=Math.min(this.dimensions.activator.width+Number(this.nudgeWidth)+(this.auto?16:0),Math.max(this.pageWidth-24,0)),e=isNaN(parseInt(this.calculatedMaxWidth))?t:parseInt(this.calculatedMaxWidth);return(0,p.kb)(Math.min(e,t))||"0"},calculatedTop(){const t=this.auto?(0,p.kb)(this.calcYOverflow(this.calculatedTopAuto)):this.calcTop();return t||"0"},hasClickableTiles(){return Boolean(this.tiles.find((t=>t.tabIndex>-1)))},styles(){return{maxHeight:this.calculatedMaxHeight,minWidth:this.calculatedMinWidth,maxWidth:this.calculatedMaxWidth,top:this.calculatedTop,left:this.calculatedLeft,transformOrigin:this.origin,zIndex:this.zIndex||this.activeZIndex}}},watch:{isActive(t){t||(this.listIndex=-1)},isContentActive(t){this.hasJustFocused=t},listIndex(t,e){if(t in this.tiles){const e=this.tiles[t];e.classList.add("v-list-item--highlighted");const i=this.$refs.content.scrollTop,s=this.$refs.content.clientHeight;i>e.offsetTop-8?(0,g.Z)(e.offsetTop-e.clientHeight,{appOffset:!1,duration:300,container:this.$refs.content}):i+s{this.startTransition().then((()=>{this.$refs.content&&(this.calculatedTopAuto=this.calcTopAuto(),this.auto&&(this.$refs.content.scrollTop=this.calcScrollPosition()))}))}))},calcScrollPosition(){const t=this.$refs.content,e=t.querySelector(".v-list-item--active"),i=t.scrollHeight-t.offsetHeight;return e?Math.min(i,Math.max(0,e.offsetTop-t.offsetHeight/2+e.offsetHeight/2)):t.scrollTop},calcLeftAuto(){return parseInt(this.dimensions.activator.left-2*this.defaultOffset)},calcTopAuto(){const t=this.$refs.content,e=t.querySelector(".v-list-item--active");if(e||(this.selectedIndex=null),this.offsetY||!e)return this.computedTop;this.selectedIndex=Array.from(this.tiles).indexOf(e);const i=e.offsetTop-this.calcScrollPosition(),s=t.querySelector(".v-list-item").offsetTop;return this.computedTop-i-s-1},changeListIndex(t){if(this.getTiles(),this.isActive&&this.hasClickableTiles)if(t.keyCode!==p.Do.tab){if(t.keyCode===p.Do.down)this.nextTile();else if(t.keyCode===p.Do.up)this.prevTile();else if(t.keyCode===p.Do.end)this.lastTile();else if(t.keyCode===p.Do.home)this.firstTile();else{if(t.keyCode!==p.Do.enter||-1===this.listIndex)return;this.tiles[this.listIndex].click()}t.preventDefault()}else this.isActive=!1},closeConditional(t){const e=t.target;return this.isActive&&!this._isDestroyed&&this.closeOnClick&&!this.$refs.content.contains(e)},genActivatorAttributes(){const t=n.Z.options.methods.genActivatorAttributes.call(this);return this.activeTile&&this.activeTile.id?{...t,"aria-activedescendant":this.activeTile.id}:t},genActivatorListeners(){const t=a.Z.options.methods.genActivatorListeners.call(this);return this.disableKeys||(t.keydown=this.onKeyDown),t},genTransition(){const t=this.genContent();return this.transition?this.$createElement("transition",{props:{name:this.transition}},[t]):t},genDirectives(){const t=[{name:"show",value:this.isContentActive}];return!this.openOnHover&&this.closeOnClick&&t.push({name:"click-outside",value:{handler:()=>{this.isActive=!1},closeConditional:this.closeConditional,include:()=>[this.$el,...this.getOpenDependentElements()]}}),t},genContent(){const t={attrs:{...this.getScopeIdAttrs(),role:"role"in this.$attrs?this.$attrs.role:"menu"},staticClass:"v-menu__content",class:{...this.rootThemeClasses,...this.roundedClasses,"v-menu__content--auto":this.auto,"v-menu__content--fixed":this.activatorFixed,menuable__content__active:this.isActive,[this.contentClass.trim()]:!0},style:this.styles,directives:this.genDirectives(),ref:"content",on:{click:t=>{const e=t.target;e.getAttribute("disabled")||this.closeOnContentClick&&(this.isActive=!1)},keydown:this.onKeyDown}};return this.$listeners.scroll&&(t.on=t.on||{},t.on.scroll=this.$listeners.scroll),!this.disabled&&this.openOnHover&&(t.on=t.on||{},t.on.mouseenter=this.mouseEnterHandler),this.openOnHover&&(t.on=t.on||{},t.on.mouseleave=this.mouseLeaveHandler),this.$createElement("div",t,this.getContentSlot())},getTiles(){this.$refs.content&&(this.tiles=Array.from(this.$refs.content.querySelectorAll(".v-list-item, .v-divider, .v-subheader")))},mouseEnterHandler(){this.runDelay("open",(()=>{this.hasJustFocused||(this.hasJustFocused=!0)}))},mouseLeaveHandler(t){this.runDelay("close",(()=>{var e;null!=(e=this.$refs.content)&&e.contains(t.relatedTarget)||requestAnimationFrame((()=>{this.isActive=!1,this.callDeactivate()}))}))},nextTile(){const t=this.tiles[this.listIndex+1];if(!t){if(!this.tiles.length)return;return this.listIndex=-1,void this.nextTile()}this.listIndex++,-1===t.tabIndex&&this.nextTile()},prevTile(){const t=this.tiles[this.listIndex-1];if(!t){if(!this.tiles.length)return;return this.listIndex=this.tiles.length,void this.prevTile()}this.listIndex--,-1===t.tabIndex&&this.prevTile()},lastTile(){const t=this.tiles[this.tiles.length-1];t&&(this.listIndex=this.tiles.length-1,-1===t.tabIndex&&this.prevTile())},firstTile(){const t=this.tiles[0];t&&(this.listIndex=0,-1===t.tabIndex&&this.nextTile())},onKeyDown(t){if(t.keyCode===p.Do.esc){setTimeout((()=>{this.isActive=!1}));const t=this.getActivator();this.$nextTick((()=>t&&t.focus()))}else!this.isActive&&[p.Do.up,p.Do.down].includes(t.keyCode)&&(this.isActive=!0);this.$nextTick((()=>this.changeListIndex(t)))},onResize(){this.isActive&&(this.$refs.content.offsetWidth,this.updateDimensions(),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.updateDimensions,100))}},render(t){const e={staticClass:"v-menu",class:{"v-menu--attached":""===this.attach||!0===this.attach||"attach"===this.attach},directives:[{arg:"500",name:"resize",value:this.onResize}]};return t("div",e,[!this.activator&&this.genActivator(),this.showLazyContent((()=>[this.$createElement(s.Z,{props:{root:!0,light:this.light,dark:this.dark}},[this.genTransition()])]))])}})},9216:function(t,e,i){i.r(e),i.d(e,{default:function(){return $}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.item.Options.show?i("v-col",{class:t.item.Options.setup.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.item.Options.status.level,color:t.item.Options.status.color,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.name)+" "),i("v-spacer"),t.lvlIcon&&t.item.Options.status.isActive?i("v-btn",{attrs:{small:"",icon:""},on:{click:function(e){return t.lvlBtn()}}},[i("v-icon",{attrs:{small:""}},[t._v(" "+t._s(t.lvlIcon)+" ")])],1):t._e(),t.app.options.debugMode?i("jsonList",{attrs:{item:t.item}}):t._e()],1),i("v-divider"),t.item.Options.status.isActive?t._e():i("div",[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[i("v-col",{attrs:{align:"center"}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),i("v-divider")],1),t.item.Options.status.isActive?i("div",t._l(t.main,(function(e){return i("div",{key:e.idx},[i("v-card-text",[i("v-row",{attrs:{align:"center"}},[0==e.leftMenu.length&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",color:e.leftBtnColor,disabled:e.leftBtnDisabled},on:{touchstart:function(i){return t.clickStart(e.idx,"left","touch")},touchend:function(i){return t.clickEnd(e.idx,"left","touch")},mousedown:function(i){return t.clickStart(e.idx,"left","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"left","mouse")}}},[e.slider?i("div",[i("v-icon",[t._v(" "+t._s(e.leftBtn)+" ")])],1):t._e(),e.slider?t._e():i("div",[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)])],1):t._e(),e.leftMenu.length>0&&e.leftBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",right:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,l=s.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.leftBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.leftMenuIdx,callback:function(i){t.$set(e,"leftMenuIdx",i)},expression:"level.leftMenuIdx"}},t._l(e.leftMenu,(function(e,s){return i("v-list-item",{key:s,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.leftBtn&&!e.slider?i("v-divider",{attrs:{vertical:""}}):t._e(),e.midBtn||e.slider?t._e():i("v-col",{attrs:{align:e.textAlign}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text)+" ")])]),!e.text2||e.midBtn||e.slider?t._e():i("v-col",{attrs:{align:e.text2Align}},[i("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(e.text2)+" ")])]),0===e.midMenu.length&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.midBtnDisabled,color:e.midBtnColor},on:{touchstart:function(i){return t.clickStart(e.idx,"mid","touch")},touchend:function(i){return t.clickEnd(e.idx,"mid","touch")},mousedown:function(i){return t.clickStart(e.idx,"mid","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"mid","mouse")}}},[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)],1):t._e(),e.midMenu.length>0&&e.midBtn?i("v-col",{staticClass:"headline",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,l=s.attrs;return[e.text?i("v-btn",t._g(t._b({staticClass:"headline font-weight-bold",attrs:{block:"",plain:""}},"v-btn",l,!1),n),[t._v(" "+t._s(e.text)+" ")]):t._e(),e.text?t._e():i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.midBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.midMenuIdx,callback:function(i){t.$set(e,"midMenuIdx",i)},expression:"level.midMenuIdx"}},t._l(e.midMenu,(function(e,s){return i("v-list-item",{key:s,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e(),e.slider?i("v-col",{attrs:{align:"center"}},[i("v-slider",{attrs:{min:e.sliderMin,max:e.sliderMax,label:e.text,"hide-details":"","thumb-label":"","thumb-size":"48",color:"success",step:e.sliderStep},on:{change:function(i){return t.setSlider(e.idx,e.sliderCurrent)}},scopedSlots:t._u([{key:"thumb-label",fn:function(s){var n=s.value;return[i("div",{staticClass:"text-h6"},[t._v(" "+t._s(t.sliderVal(e.idx,n))+" ")])]}}],null,!0),model:{value:e.sliderCurrent,callback:function(i){t.$set(e,"sliderCurrent",i)},expression:"level.sliderCurrent"}})],1):t._e(),e.rightBtn&&!e.slider?i("v-divider",{attrs:{vertical:""}}):t._e(),0===e.rightMenu.length&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-btn",{attrs:{small:"",icon:"",disabled:e.rightBtnDisabled,color:e.rightBtnColor},on:{touchstart:function(i){return t.clickStart(e.idx,"right","touch")},touchend:function(i){return t.clickEnd(e.idx,"right","touch")},mousedown:function(i){return t.clickStart(e.idx,"right","mouse")},mouseup:function(i){return t.clickEnd(e.idx,"right","mouse")}}},[e.slider?i("div",[i("v-icon",[t._v(" "+t._s(e.rightBtn)+" ")])],1):t._e(),e.slider?t._e():i("div",[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)])],1):t._e(),e.rightMenu.length>0&&e.rightBtn?i("v-col",{staticClass:"col-3",attrs:{align:"center"}},[i("v-menu",{attrs:{bottom:"",left:"",transition:"slide-y-transition"},scopedSlots:t._u([{key:"activator",fn:function(s){var n=s.on,l=s.attrs;return[i("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",l,!1),n),[i("v-icon",{attrs:{large:""}},[t._v(" "+t._s(e.rightBtn)+" ")])],1)]}}],null,!0)},[i("v-list",{attrs:{dense:"",color:"secondary lighten-2"}},[i("v-list-item-group",{attrs:{"active-class":"success--text"},model:{value:e.rightMenuIdx,callback:function(i){t.$set(e,"rightMenuIdx",i)},expression:"level.rightMenuIdx"}},t._l(e.rightMenu,(function(e,s){return i("v-list-item",{key:s,on:{click:function(i){return t.sendCmd(e.cmd)}}},[i("v-list-item-content",[i("v-list-item-title",{staticClass:"text-subtitle-1"},[t._v(" "+t._s(e.name)+" ")])],1),e.active?i("v-list-item-icon",[i("v-icon",[t._v("mdi-check")])],1):t._e()],1)})),1)],1)],1)],1):t._e()],1)],1),i("v-divider")],1)})),0):t._e(),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",{staticClass:"ml-0",attrs:{color:t.item.Options.info.left1IconColor}},[t._v(" "+t._s(t.item.Options.info.left1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.left2IconColor}},[t._v(" "+t._s(t.item.Options.info.left2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.left2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.mid1IconColor}},[t._v(" "+t._s(t.item.Options.info.mid1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid1Text)+" ")]),i("v-icon",{staticClass:"ml-2",attrs:{color:t.item.Options.info.mid2IconColor}},[t._v(" "+t._s(t.item.Options.info.mid2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.mid2Text)+" ")]),i("v-spacer"),i("v-icon",{attrs:{color:t.item.Options.info.right1IconColor}},[t._v(" "+t._s(t.item.Options.info.right1Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right1Text)+" ")]),i("v-icon",{staticClass:"ml-2 mr-0",attrs:{color:t.item.Options.info.right2IconColor}},[t._v(" "+t._s(t.item.Options.info.right2Icon)+" ")]),i("div",{staticClass:"text-truncate"},[t._v(" "+t._s(t.item.Options.info.right2Text)+" ")])],1)],1)],1):t._e()},n=[],l=i(1830),o={components:{jsonList:l.Z},props:{item:{type:Object,default:()=>({name:"default"})}},data:()=>({name:"default",app:{options:{debugMode:!1}},main:[],lvlMax:1,lvlIcon:null,timer:!1,long:!1,pendingClick:0,touchFirst:!1}),watch:{item:{immediate:!1,deep:!0,handler(){this.setVals()}}},created(){this.app.options=this.$fhem.app.options,this.lvlMax=this.item.Options.setup.main.length,this.lvlIcon=this.lvlMax>1?this.item.Options.setup.expand?"mdi-arrow-expand":"mdi-swap-vertical":null,this.setLvl(this.$fhem.getEl(this.item,"Options","setup","expanded")&&this.$fhem.getEl(this.item,"Options","setup","expand")?-1:0),this.setVals()},methods:{sendCmd(t,e){e?(this.pendingClick&&(clearTimeout(this.pendingClick),this.pendingClick=0),this.pendingClick=setTimeout((()=>{this.$fhem.request(t)}),1e3)):this.$fhem.request(t)},updateReading(t){let e=t.split(" ");4===e.length&&this.$fhem.getEl(this.item,"Readings",e[2],"Value")&&(this.item.Readings[e[2]].Value=e[3])},createCmd(t){let e="";if(t.match("set")){let i=t.trim().split(" ");if(i[1]&&i[1].match("Connected")){let t=i[1].replace("Connected.","");i[1]=this.$fhem.getEl(this.item,"Connected",t,"Internals","NAME"),i[1]?e=i.join(" "):this.$fhem.log({lvl:1,msg:"Connected Device not found. "+this.item.Options})}else e=t}else e="set "+this.item.Name+" "+t;return e},clickStart(t,e,i){this.long=!1,this.$fhem.log({lvl:5,msg:"ClickStart: type "+e+":"+i}),this.touchFirst&&"mouse"===i||("touch"===i&&(this.touchFirst=!0),this.timer=setInterval((()=>{this.long=!0;let i=this.item.Options.setup.main[t][e+"Long"];if(this.$fhem.log({lvl:5,msg:"ClickEvent: Long ["+i+"]"}),i){let t=this.$fhem.handleVals(this.item,i);if(t[0]){let e=this.createCmd(t[0]);this.sendCmd(e),this.timer=clearInterval(this.timer)}}}),1e3))},clickEnd(t,e,i){if(this.$fhem.log({lvl:5,msg:"ClickEnd: type "+e+":"+i}),this.touchFirst&&"mouse"===i)return;"touch"===i&&(this.touchFirst=!0),this.timer=clearInterval(this.timer);let s=this.item.Options.setup.main[t][e+(this.long?"LongRelease":"Click")];if(this.$fhem.log({lvl:5,msg:"ClickEvent: "+(this.long?"LongRelease":"Click")+" ["+s+"]"}),s){let e=this.$fhem.handleVals(this.item,s);if(e[0]){let i=this.item.Options.setup.expand?t:0;this.main[i].sliderPrevent=!1;let n=this.createCmd(e[0]),l=-1!=s.findIndex((t=>t.match("%i")));!this.long&&l&&this.updateReading(n),this.sendCmd(n,l)}}},sliderVal(t,e){let i=this.item.Options.setup.main[t].slider,s=e;if(i){let t=this.$fhem.handleVals(this.item,i),n=t[4]&&t[4].match(".")?1:0;s=e.toFixed(n)}return s},setSlider(t,e){let i=this.item.Options.setup.main[t].slider;if(i){let s=this.$fhem.handleVals(this.item,i);if(s[0]){let i=this.item.Options.setup.expand?t:0;this.main[i].sliderPrevent=!0;let n=this.createCmd(s[0]),l=s[4]&&s[4].match(".")?1:0;n=n.replace("%v",e.toFixed(l)),this.sendCmd(n)}}},checkMenu(t){let e=!1;if(t){let i=t.split(" ");i[0].match("set")&&i.splice(0,2),1===i.length&&i.splice(0,0,"state");let s=/\./.test(i[0])?i[0].split("."):["Readings",i[0],"Value"],n=this.$fhem.getEl(this.item,...s);n&&n===i[1]&&(e=!0)}return e},createMenu(t){let e=[];if(t&&t.length>0)for(let i of t){let t=i.split(":");if(t.length>1){let i=this.createCmd(t[1].replace(/:/g,":")),s=this.checkMenu(i);e.push({name:t[0],cmd:i,active:s})}}return e},lvlBtn(){let t=0;this.item.Options.setup.expand?(t=this.main.length>1?0:-1,this.lvlIcon=-1===t?"mdi-arrow-collapse":"mdi-arrow-expand"):(t=this.main[0].idx+1,t>this.lvlMax-1&&(t=0)),this.setLvl(t),this.setVals()},setLvl(t){let e=-1!=t?t:0,i=-1!=t?t:this.lvlMax-1;this.main.splice(0);for(let s=e;s<=i;s++){let t={idx:s,leftBtn:"",leftBtnDisabled:!1,leftBtnColor:"",leftMenu:[],leftMenuIdx:-1,text:"",textAlign:"",text2:"",text2Align:"",midBtn:"",midBtnDisabled:!1,midBtnColor:"",midMenu:[],midMenuIdx:-1,slider:!1,sliderCurrent:0,sliderPrevent:!1,sliderMin:0,sliderMax:100,sliderStep:1,rightBtn:"",rightBtnDisabled:!1,rightBtnColor:"",rightMenu:[],rightMenuIdx:-1};this.main.push(t)}},setVals(){for(const t in this.main){let e=this.main[t].idx,i=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text),s=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].text2),n=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].slider),l=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].leftBtn),o=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].midBtn),a=this.$fhem.handleVals(this.item,this.item.Options.setup.main[e].rightBtn),r=this.createMenu(this.item.Options.setup.main[e].leftMenu),c=this.createMenu(this.item.Options.setup.main[e].midMenu),h=this.createMenu(this.item.Options.setup.main[e].rightMenu);this.main[t].text=i[0]||"",this.main[t].textAlign=i[1]||"center",this.main[t].text2=s[0]||"",this.main[t].text2Align=s[1]||"center",this.main[t].leftBtn=l[0]||"",this.main[t].midBtn=o[0]||"",this.main[t].rightBtn=a[0]||"",this.main[t].leftBtnDisabled=!!l[1],this.main[t].midBtnDisabled=!!o[1],this.main[t].rightBtnDisabled=!!a[1],this.main[t].leftBtnColor=l[2]||"",this.main[t].midBtnColor=o[2]||"",this.main[t].rightBtnColor=a[2]||"",this.main[t].leftMenu=r,this.main[t].leftMenuIdx=r.map((t=>t.active)).indexOf(!0),this.main[t].midMenu=c,this.main[t].midMenuIdx=c.map((t=>t.active)).indexOf(!0),this.main[t].rightMenu=h,this.main[t].rightMenuIdx=h.map((t=>t.active)).indexOf(!0),this.main[t].slider=!!n[0],this.main[t].sliderMin=n[2]||0,this.main[t].sliderMax=n[3]||100,this.main[t].sliderStep=n[4]||1,this.main[t].sliderPrevent?this.main[t].sliderCurrent===n[1]&&(this.main[t].sliderPrevent=!1,this.main[t].sliderCurrent=n[1]||0):this.main[t].sliderCurrent=n[1]||0}}}},a=o,r=i(1001),c=i(3453),h=i.n(c),d=i(3150),m=i(2371),u=i(7118),v=i(2102),f=i(1418),p=i(6428),g=i(6816),x=i(7620),_=i(1960),C=i(3249),k=i(459),b=i(1152),I=i(7003),O=i(2877),M=i(7611),T=i(9762),B=i(2691),y=(0,r.Z)(a,s,n,!1,null,null,null),$=y.exports;h()(y,{VBtn:d.Z,VCard:m.Z,VCardText:u.ZB,VCardTitle:u.EB,VCol:v.Z,VDivider:f.Z,VIcon:p.Z,VList:g.Z,VListItem:x.Z,VListItemContent:_.km,VListItemGroup:C.Z,VListItemIcon:k.Z,VListItemTitle:_.V9,VMenu:b.Z,VProgressLinear:I.Z,VRow:O.Z,VSlider:M.Z,VSpacer:T.Z,VSystemBar:B.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/997-legacy.64da21ee.js b/www/fhemapp/js/997-legacy.64da21ee.js deleted file mode 100644 index 672802b8..00000000 --- a/www/fhemapp/js/997-legacy.64da21ee.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[997],{1830:function(t,s,e){e.d(s,{Z:function(){return b}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"text-center"},["zzz"!=t.item.Options.sortby?e("v-chip",{attrs:{small:"",color:"secondary"}},[e("v-icon",{attrs:{left:""}},[t._v(" mdi-sort-ascending ")]),t._v(" "+t._s(t.item.Options.sortby)+" ")],1):t._e(),e("v-btn",{attrs:{href:t.toFhem(),target:"_blank",small:"",icon:""}},[e("v-icon",{attrs:{small:""}},[t._v(" mdi-link ")])],1),e("v-dialog",{attrs:{"max-width":"90%",scrollable:""},scopedSlots:t._u([{key:"activator",fn:function(s){var i=s.on,a=s.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),i),[e("v-icon",{attrs:{small:""}},[t._v(" mdi-code-json ")])],1)]}}]),model:{value:t.dialog,callback:function(s){t.dialog=s},expression:"dialog"}},[e("v-card",{staticClass:"secondary lighten-1"},[e("v-card-title",{staticClass:"secondary"},[e("v-btn",{attrs:{icon:""},on:{click:function(s){t.deep=t.deep>1?1:5}}},[e("v-icon",[t._v("mdi-file-tree-outline")])],1),e("v-spacer"),t._v(" "+t._s(t.item.Name)+" "),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(s){t.dialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[e("div",{ref:"jsonContent",staticClass:"select"},[e("vue-json-pretty",{attrs:{"show-line":!1,deep:t.deep,data:t.item}})],1)])],1)],1)],1)},a=[],n=e(4566),o=e.n(n),l={name:"JsonList",props:{item:{type:Object,default:function(){return{name:"json"}}}},data:function(){return{dialog:!1,deep:1}},components:{VueJsonPretty:o()},methods:{toFhem:function(){var t=this.$fhem.createURL([{param:"detail",value:this.item.Name}]);return t}}},r=l,c=e(1001),h=e(3453),u=e.n(h),m=e(3150),d=e(2371),v=e(7118),p=e(5424),f=e(4497),g=e(6428),_=e(9762),x=(0,c.Z)(r,i,a,!1,null,"4fc9ba56",null),b=x.exports;u()(x,{VBtn:m.Z,VCard:d.Z,VCardText:v.ZB,VCardTitle:v.EB,VChip:p.Z,VDialog:f.Z,VIcon:g.Z,VSpacer:_.Z})},214:function(t,s,e){e.r(s),e.d(s,{default:function(){return k}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("v-col",{class:t.setup.size},[e("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[e("v-progress-linear",{attrs:{height:"7",value:t.getLevel,color:t.vals.status.color,"background-color":"secondary darken-1"}}),e("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.vals.title)+" "),e("v-spacer"),t.app.options.debugMode?e("jsonList",{attrs:{item:t.item}}):t._e()],1),e("v-divider"),t.item.Options.status.isActive?t._e():e("div",[e("v-card-text",[e("v-row",{attrs:{align:"center"}},[e("v-col",{attrs:{align:"center"}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),e("v-divider")],1),t.item.Options.status.isActive?e("div",[e("v-card-subtitle",[t._v(" "+t._s(t.vals.subTitle)+" ")]),e("v-card-text",[e("v-row",t._l(t.vals.list,(function(s){return e("v-col",{key:s.name,staticClass:"col-12 col-md-4 col-lg-4"},[e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(s.name)+" ")]),s.isBar?e("v-progress-linear",{attrs:{height:"7",value:s.value,color:s.color,min:s.min,max:s.max,"background-color":"secondary lighten-4"}}):t._e(),e("div",[t._v(t._s(s.subText))])],1)})),1)],1),t.setup.fhemBtns?e("v-card-actions",[e("v-btn",{staticClass:"mr-2",on:{click:function(s){return t.goTo()}}},[e("v-icon",[t._v("mdi-format-list-bulleted")])],1),e("v-spacer"),e("v-btn",{attrs:{disabled:!t.update},on:{click:t.fhemUpdate}},[t._v(" "+t._s(t.updateText)+" ")]),e("v-btn",{attrs:{disabled:!t.restart},on:{click:t.fhemRestart}},[t._v(" "+t._s(t.$t("templates.sysmon.restartBtn"))+" ")])],1):t._e()],1):t._e(),e("v-divider"),e("v-system-bar",{attrs:{color:"secondary darken-1"}},[e("v-icon",{staticClass:"ml-0"},[t._v(" "+t._s(t.vals.info.left1Icon)+" ")]),t._v(t._s(t.vals.info.left1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.left2Icon)+" ")]),t._v(t._s(t.vals.info.left2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.mid1Icon))]),t._v(t._s(t.vals.info.mid1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.mid2Icon)+" ")]),t._v(t._s(t.vals.info.mid2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.right1Icon))]),t._v(t._s(t.vals.info.right1Text)+" "),e("v-icon",{staticClass:"ml-2 mr-0"},[t._v(" "+t._s(t.vals.info.right2Icon)+" ")]),t._v(t._s(t.vals.info.right2Text)+" ")],1),e("v-dialog",{attrs:{"max-width":"420px"},model:{value:t.updateDialog,callback:function(s){t.updateDialog=s},expression:"updateDialog"}},[e("v-card",{attrs:{color:"secondary lighten-2"}},[e("v-card-title",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.header"))+" "),e("v-spacer"),e("v-btn",{attrs:{icon:"",small:""},on:{click:function(s){t.updateDialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.text"))+" ")]),e("v-card-actions",[e("v-spacer"),e("v-btn",{on:{click:function(s){return t.fhemRestart()}}},[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.restartBtn"))+" ")])],1)],1)],1)],1)],1)},a=[],n=e(6198),o=e(2032),l=(e(5666),e(1249),e(8309),e(561),e(1539),e(1830)),r={components:{jsonList:l.Z},props:{item:{type:Object,default:function(){return{name:"sysmon"}}}},data:function(){return{name:"sysmon",app:{options:{updateProcess:!1,debugMode:!1}},setup:{size:"col-12 col-sm-12 col-md-6 col-lg-6",status:{bar:[],error:[],min:0,max:100},subTitle:[],main:[],fhemBtns:!0,info:{left1:[],left2:[],mid1:[],mid2:[],right1:[],right2:[]}},vals:{title:"",subTitle:"",status:{level:0,color:"success"},list:[],info:{left1Icon:"",left1Text:"",left2Icon:"",left2Text:"",mid1Icon:"",mid1Text:"",mid2Icon:"",mid2Text:"",right1Icon:"",right1Text:"",right2Icon:"",right2Text:""}},restart:!0,update:!0,updateText:"",updateDialog:!1}},computed:{getLevel:function(){var t=100/(this.setup.status.max-this.setup.status.min),s=(this.vals.status.level-this.setup.status.min)*t;return this.vals.status.invert?100-s:s}},watch:{item:{immediate:!0,deep:!0,handler:function(t){var s=this.$fhem.getEl(t,"Attributes","alias")||t.Name;this.vals.title=this.$fhem.getEl(t,"Options","name")||s,this.setValues(),this.doList()}},setup:{deep:!0,handler:function(){this.setValues(),this.doList()}},"app.options.updateProcess":function(t){t||(this.updateDialog=!0,this.updateText=this.$t("templates.sysmon.updateBtn[1]"),this.restart=!0)}},mounted:function(){this.app.options=this.$fhem.app.options,this.fhemUpdateCheck();var t=this.$fhem.getEl(this.item,"Options","setup","size"),s=this.$fhem.getEl(this.item,"Options","setup","subTitle"),e=this.$fhem.getEl(this.item,"Options","setup","fhemBtns"),i=this.$fhem.getEl(this.item,"Options","setup","status"),a=this.$fhem.getEl(this.item,"Options","setup","main"),n=this.$fhem.getEl(this.item,"Options","setup","info");t&&(this.setup.size=t),s&&(this.setup.subTitle=s),i&&Object.assign(this.setup.status,i),a&&Object.assign(this.setup.main,a),n&&Object.assign(this.setup.info,n),this.setup.fhemBtns=e},methods:{setValues:function(){var t=this.$fhem.handleVals(this.item,this.setup.status.bar),s=this.$fhem.handleVals(this.item,this.setup.status.error),e=this.$fhem.handleVals(this.item,this.setup.subTitle),i=this.$fhem.handleVals(this.item,this.setup.info.left1),a=this.$fhem.handleVals(this.item,this.setup.info.left2),n=this.$fhem.handleVals(this.item,this.setup.info.mid1),o=this.$fhem.handleVals(this.item,this.setup.info.mid2),l=this.$fhem.handleVals(this.item,this.setup.info.right1),r=this.$fhem.handleVals(this.item,this.setup.info.right2);this.vals.status.level=t[0]||"100",this.vals.status.color=t[1]||"success",this.vals.subTitle=e[0]||"",this.vals.info.left1Icon=i[1]||"",this.vals.info.left1Text=i[0]||"",this.vals.info.left2Icon=a[1]||"",this.vals.info.left2Text=a[0]||"",this.vals.info.mid1Icon=n[1]||"",this.vals.info.mid1Text=n[0]||"",this.vals.info.mid2Icon=o[1]||"",this.vals.info.mid2Text=o[0]||"",this.vals.info.right1Icon=l[1]||"",this.vals.info.right1Text=l[0]||"",this.vals.info.right2Icon=r[1]||"",this.vals.info.right2Text=r[0]||"",s.length>0&&(this.vals.status.level=s[0]||"100",this.vals.status.color=s[1]||"error")},doList:function(){var t,s=(0,o.Z)(this.setup.main);try{for(s.s();!(t=s.n()).done;){var e=t.value,i=this.vals.list.map((function(t){return t.name})).indexOf(e.name),a=this.$fhem.handleVals(this.item,e.bar),n=this.$fhem.handleVals(this.item,e.subText),l={name:e.name,isBar:a.length>0,value:a[0]||0,color:a[1]||"success",min:a[2]||0,max:a[3]||100,subText:n[0]||""};l.isBar&&"success"!=l.color&&(this.vals.status.color=l.color),-1!=i?this.vals.list.splice(i,1,l):this.vals.list.push(l)}}catch(r){s.e(r)}finally{s.f()}},fhemRestart:function(){this.restart=!1,this.updateDialog=!1,this.$fhem.request({param:"cmd",value:"shutdown restart"})},fhemUpdateCheck:function(){var t=this;return(0,n.Z)(regeneratorRuntime.mark((function s(){var e;return regeneratorRuntime.wrap((function(s){while(1)switch(s.prev=s.next){case 0:return e=new Promise((function(s,e){t.restart=!1,t.update=!1,t.updateText=t.$t("templates.sysmon.updateBtn[0]"),t.$fhem.checkUpdate().then((function(e){e?(t.updateText=t.$t("templates.sysmon.updateBtn[2]"),t.update=!0):t.updateText=t.$t("templates.sysmon.updateBtn[1]"),s(e)})).catch((function(s){t.$fhem.log({lvl:1,msg:"Update check failed.",meta:s}),e()})).finally((function(){t.restart=!0}))})),s.abrupt("return",e);case 2:case"end":return s.stop()}}),s)})))()},fhemUpdate:function(){this.restart=!1,this.update=!1,this.updateText=this.$t("templates.sysmon.updateBtn[3]"),this.app.options.updateProcess=!0,this.$fhem.request({param:"cmd",value:"update"})},goTo:function(){this.$router.push("syslog")}}},c=r,h=e(1001),u=e(3453),m=e.n(u),d=e(3150),v=e(2371),p=e(7118),f=e(2102),g=e(4497),_=e(1418),x=e(6428),b=e(7003),T=e(2877),$=e(9762),V=e(2691),y=(0,h.Z)(c,i,a,!1,null,null,null),k=y.exports;m()(y,{VBtn:d.Z,VCard:v.Z,VCardActions:p.h7,VCardSubtitle:p.Qq,VCardText:p.ZB,VCardTitle:p.EB,VCol:f.Z,VDialog:g.Z,VDivider:_.Z,VIcon:x.Z,VProgressLinear:b.Z,VRow:T.Z,VSpacer:$.Z,VSystemBar:V.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/997.e21ab267.js b/www/fhemapp/js/997.e21ab267.js deleted file mode 100644 index a1686e3d..00000000 --- a/www/fhemapp/js/997.e21ab267.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self["webpackChunkfhemapp"]=self["webpackChunkfhemapp"]||[]).push([[997],{1830:function(t,s,e){e.d(s,{Z:function(){return b}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"text-center"},["zzz"!=t.item.Options.sortby?e("v-chip",{attrs:{small:"",color:"secondary"}},[e("v-icon",{attrs:{left:""}},[t._v(" mdi-sort-ascending ")]),t._v(" "+t._s(t.item.Options.sortby)+" ")],1):t._e(),e("v-btn",{attrs:{href:t.toFhem(),target:"_blank",small:"",icon:""}},[e("v-icon",{attrs:{small:""}},[t._v(" mdi-link ")])],1),e("v-dialog",{attrs:{"max-width":"90%",scrollable:""},scopedSlots:t._u([{key:"activator",fn:function(s){var i=s.on,a=s.attrs;return[e("v-btn",t._g(t._b({attrs:{small:"",icon:""}},"v-btn",a,!1),i),[e("v-icon",{attrs:{small:""}},[t._v(" mdi-code-json ")])],1)]}}]),model:{value:t.dialog,callback:function(s){t.dialog=s},expression:"dialog"}},[e("v-card",{staticClass:"secondary lighten-1"},[e("v-card-title",{staticClass:"secondary"},[e("v-btn",{attrs:{icon:""},on:{click:function(s){t.deep=t.deep>1?1:5}}},[e("v-icon",[t._v("mdi-file-tree-outline")])],1),e("v-spacer"),t._v(" "+t._s(t.item.Name)+" "),e("v-spacer"),e("v-btn",{attrs:{icon:""},on:{click:function(s){t.dialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[e("div",{ref:"jsonContent",staticClass:"select"},[e("vue-json-pretty",{attrs:{"show-line":!1,deep:t.deep,data:t.item}})],1)])],1)],1)],1)},a=[],l=e(4566),n=e.n(l),o={name:"JsonList",props:{item:{type:Object,default:()=>({name:"json"})}},data(){return{dialog:!1,deep:1}},components:{VueJsonPretty:n()},methods:{toFhem(){let t=this.$fhem.createURL([{param:"detail",value:this.item.Name}]);return t}}},r=o,h=e(1001),c=e(3453),m=e.n(c),d=e(3150),v=e(2371),u=e(7118),p=e(5424),f=e(4497),g=e(6428),_=e(9762),x=(0,h.Z)(r,i,a,!1,null,"4fc9ba56",null),b=x.exports;m()(x,{VBtn:d.Z,VCard:v.Z,VCardText:u.ZB,VCardTitle:u.EB,VChip:p.Z,VDialog:f.Z,VIcon:g.Z,VSpacer:_.Z})},214:function(t,s,e){e.r(s),e.d(s,{default:function(){return V}});var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("v-col",{class:t.setup.size},[e("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[e("v-progress-linear",{attrs:{height:"7",value:t.getLevel,color:t.vals.status.color,"background-color":"secondary darken-1"}}),e("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.vals.title)+" "),e("v-spacer"),t.app.options.debugMode?e("jsonList",{attrs:{item:t.item}}):t._e()],1),e("v-divider"),t.item.Options.status.isActive?t._e():e("div",[e("v-card-text",[e("v-row",{attrs:{align:"center"}},[e("v-col",{attrs:{align:"center"}},[e("div",{staticClass:"headline font-weight-bold"},[t._v(" "+t._s(t.item.Options.status.error)+" ")])])],1)],1),e("v-divider")],1),t.item.Options.status.isActive?e("div",[e("v-card-subtitle",[t._v(" "+t._s(t.vals.subTitle)+" ")]),e("v-card-text",[e("v-row",t._l(t.vals.list,(function(s){return e("v-col",{key:s.name,staticClass:"col-12 col-md-4 col-lg-4"},[e("div",{staticClass:"text-truncate"},[t._v(" "+t._s(s.name)+" ")]),s.isBar?e("v-progress-linear",{attrs:{height:"7",value:s.value,color:s.color,min:s.min,max:s.max,"background-color":"secondary lighten-4"}}):t._e(),e("div",[t._v(t._s(s.subText))])],1)})),1)],1),t.setup.fhemBtns?e("v-card-actions",[e("v-btn",{staticClass:"mr-2",on:{click:function(s){return t.goTo()}}},[e("v-icon",[t._v("mdi-format-list-bulleted")])],1),e("v-spacer"),e("v-btn",{attrs:{disabled:!t.update},on:{click:t.fhemUpdate}},[t._v(" "+t._s(t.updateText)+" ")]),e("v-btn",{attrs:{disabled:!t.restart},on:{click:t.fhemRestart}},[t._v(" "+t._s(t.$t("templates.sysmon.restartBtn"))+" ")])],1):t._e()],1):t._e(),e("v-divider"),e("v-system-bar",{attrs:{color:"secondary darken-1"}},[e("v-icon",{staticClass:"ml-0"},[t._v(" "+t._s(t.vals.info.left1Icon)+" ")]),t._v(t._s(t.vals.info.left1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.left2Icon)+" ")]),t._v(t._s(t.vals.info.left2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.mid1Icon))]),t._v(t._s(t.vals.info.mid1Text)+" "),e("v-icon",{staticClass:"ml-2"},[t._v(" "+t._s(t.vals.info.mid2Icon)+" ")]),t._v(t._s(t.vals.info.mid2Text)+" "),e("v-spacer"),e("v-icon",[t._v(t._s(t.vals.info.right1Icon))]),t._v(t._s(t.vals.info.right1Text)+" "),e("v-icon",{staticClass:"ml-2 mr-0"},[t._v(" "+t._s(t.vals.info.right2Icon)+" ")]),t._v(t._s(t.vals.info.right2Text)+" ")],1),e("v-dialog",{attrs:{"max-width":"420px"},model:{value:t.updateDialog,callback:function(s){t.updateDialog=s},expression:"updateDialog"}},[e("v-card",{attrs:{color:"secondary lighten-2"}},[e("v-card-title",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.header"))+" "),e("v-spacer"),e("v-btn",{attrs:{icon:"",small:""},on:{click:function(s){t.updateDialog=!1}}},[e("v-icon",[t._v("mdi-close")])],1)],1),e("v-card-text",[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.text"))+" ")]),e("v-card-actions",[e("v-spacer"),e("v-btn",{on:{click:function(s){return t.fhemRestart()}}},[t._v(" "+t._s(t.$t("templates.sysmon.updateDialog.restartBtn"))+" ")])],1)],1)],1)],1)],1)},a=[],l=e(1830),n={components:{jsonList:l.Z},props:{item:{type:Object,default:()=>({name:"sysmon"})}},data:()=>({name:"sysmon",app:{options:{updateProcess:!1,debugMode:!1}},setup:{size:"col-12 col-sm-12 col-md-6 col-lg-6",status:{bar:[],error:[],min:0,max:100},subTitle:[],main:[],fhemBtns:!0,info:{left1:[],left2:[],mid1:[],mid2:[],right1:[],right2:[]}},vals:{title:"",subTitle:"",status:{level:0,color:"success"},list:[],info:{left1Icon:"",left1Text:"",left2Icon:"",left2Text:"",mid1Icon:"",mid1Text:"",mid2Icon:"",mid2Text:"",right1Icon:"",right1Text:"",right2Icon:"",right2Text:""}},restart:!0,update:!0,updateText:"",updateDialog:!1}),computed:{getLevel(){let t=100/(this.setup.status.max-this.setup.status.min),s=(this.vals.status.level-this.setup.status.min)*t;return this.vals.status.invert?100-s:s}},watch:{item:{immediate:!0,deep:!0,handler(t){let s=this.$fhem.getEl(t,"Attributes","alias")||t.Name;this.vals.title=this.$fhem.getEl(t,"Options","name")||s,this.setValues(),this.doList()}},setup:{deep:!0,handler(){this.setValues(),this.doList()}},"app.options.updateProcess"(t){t||(this.updateDialog=!0,this.updateText=this.$t("templates.sysmon.updateBtn[1]"),this.restart=!0)}},mounted(){this.app.options=this.$fhem.app.options,this.fhemUpdateCheck();let t=this.$fhem.getEl(this.item,"Options","setup","size"),s=this.$fhem.getEl(this.item,"Options","setup","subTitle"),e=this.$fhem.getEl(this.item,"Options","setup","fhemBtns"),i=this.$fhem.getEl(this.item,"Options","setup","status"),a=this.$fhem.getEl(this.item,"Options","setup","main"),l=this.$fhem.getEl(this.item,"Options","setup","info");t&&(this.setup.size=t),s&&(this.setup.subTitle=s),i&&Object.assign(this.setup.status,i),a&&Object.assign(this.setup.main,a),l&&Object.assign(this.setup.info,l),this.setup.fhemBtns=e},methods:{setValues(){let t=this.$fhem.handleVals(this.item,this.setup.status.bar),s=this.$fhem.handleVals(this.item,this.setup.status.error),e=this.$fhem.handleVals(this.item,this.setup.subTitle),i=this.$fhem.handleVals(this.item,this.setup.info.left1),a=this.$fhem.handleVals(this.item,this.setup.info.left2),l=this.$fhem.handleVals(this.item,this.setup.info.mid1),n=this.$fhem.handleVals(this.item,this.setup.info.mid2),o=this.$fhem.handleVals(this.item,this.setup.info.right1),r=this.$fhem.handleVals(this.item,this.setup.info.right2);this.vals.status.level=t[0]||"100",this.vals.status.color=t[1]||"success",this.vals.subTitle=e[0]||"",this.vals.info.left1Icon=i[1]||"",this.vals.info.left1Text=i[0]||"",this.vals.info.left2Icon=a[1]||"",this.vals.info.left2Text=a[0]||"",this.vals.info.mid1Icon=l[1]||"",this.vals.info.mid1Text=l[0]||"",this.vals.info.mid2Icon=n[1]||"",this.vals.info.mid2Text=n[0]||"",this.vals.info.right1Icon=o[1]||"",this.vals.info.right1Text=o[0]||"",this.vals.info.right2Icon=r[1]||"",this.vals.info.right2Text=r[0]||"",s.length>0&&(this.vals.status.level=s[0]||"100",this.vals.status.color=s[1]||"error")},doList(){for(var t of this.setup.main){let s=this.vals.list.map((t=>t.name)).indexOf(t.name),e=this.$fhem.handleVals(this.item,t.bar),i=this.$fhem.handleVals(this.item,t.subText),a={name:t.name,isBar:e.length>0,value:e[0]||0,color:e[1]||"success",min:e[2]||0,max:e[3]||100,subText:i[0]||""};a.isBar&&"success"!=a.color&&(this.vals.status.color=a.color),-1!=s?this.vals.list.splice(s,1,a):this.vals.list.push(a)}},fhemRestart(){this.restart=!1,this.updateDialog=!1,this.$fhem.request({param:"cmd",value:"shutdown restart"})},async fhemUpdateCheck(){let t=new Promise(((t,s)=>{this.restart=!1,this.update=!1,this.updateText=this.$t("templates.sysmon.updateBtn[0]"),this.$fhem.checkUpdate().then((s=>{s?(this.updateText=this.$t("templates.sysmon.updateBtn[2]"),this.update=!0):this.updateText=this.$t("templates.sysmon.updateBtn[1]"),t(s)})).catch((t=>{this.$fhem.log({lvl:1,msg:"Update check failed.",meta:t}),s()})).finally((()=>{this.restart=!0}))}));return t},fhemUpdate(){this.restart=!1,this.update=!1,this.updateText=this.$t("templates.sysmon.updateBtn[3]"),this.app.options.updateProcess=!0,this.$fhem.request({param:"cmd",value:"update"})},goTo(){this.$router.push("syslog")}}},o=n,r=e(1001),h=e(3453),c=e.n(h),m=e(3150),d=e(2371),v=e(7118),u=e(2102),p=e(4497),f=e(1418),g=e(6428),_=e(7003),x=e(2877),b=e(9762),T=e(2691),$=(0,r.Z)(o,i,a,!1,null,null,null),V=$.exports;c()($,{VBtn:m.Z,VCard:d.Z,VCardActions:v.h7,VCardSubtitle:v.Qq,VCardText:v.ZB,VCardTitle:v.EB,VCol:u.Z,VDialog:p.Z,VDivider:f.Z,VIcon:g.Z,VProgressLinear:_.Z,VRow:x.Z,VSpacer:b.Z,VSystemBar:T.Z})}}]); \ No newline at end of file diff --git a/www/fhemapp/js/app-legacy.fa4741e6.js b/www/fhemapp/js/app-legacy.ec76b355.js similarity index 98% rename from www/fhemapp/js/app-legacy.fa4741e6.js rename to www/fhemapp/js/app-legacy.ec76b355.js index e326bf01..aa9baeda 100644 --- a/www/fhemapp/js/app-legacy.fa4741e6.js +++ b/www/fhemapp/js/app-legacy.ec76b355.js @@ -1 +1 @@ -(function(){var t={4376:function(t,e,n){"use strict";n(6992),n(8674),n(9601),n(7727);var a=n(144),s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-app",{staticClass:"noselect"},[a("v-overlay",{attrs:{value:t.app.options.loading}},[a("v-progress-circular",{attrs:{indeterminate:"",size:"64"}})],1),a("v-app-bar",{attrs:{app:"",color:t.appBar.color,dark:"","clipped-left":""}},[t.appBar.drawer?t._e():a("div",[a("v-app-bar-nav-icon",{on:{click:function(e){e.stopPropagation(),t.appBar.drawer=!t.appBar.drawer}}})],1),t.appBar.drawer?a("div",{staticClass:"text-h5"},[a("div",{staticClass:"text-h5 hidden-md-and-down"},[t._v(" "+t._s(t.appBar.clock)+" ")])]):t._e(),a("v-spacer"),t.app.options.mobileHeader||t.app.options.mobileHeaderContent?a("div",{staticClass:"text-h5 hidden-lg-and-up"},[t._v(" "+t._s(t.appBar.mobileHeader)+" ")]):t._e(),a("div",{staticClass:"text-h5 hidden-md-and-down"},[t._v(" "+t._s(t.appBar.header)+" ")]),a("v-spacer"),t.app.options.debugMode?a("v-btn",{attrs:{icon:""},on:{click:function(e){return t.goTo("/syslog")}}},[a("v-icon",[t._v("mdi-format-list-bulleted")])],1):t._e(),t.app.options.reloadBtn?a("v-btn",{attrs:{icon:""},on:{click:function(e){return t.reload()}}},[a("v-icon",[t._v("mdi-reload")])],1):t._e(),t.app.options.homeBtn&&!t.appBar.drawer?a("v-btn",{staticClass:"text-h5",attrs:{icon:""},on:{click:function(e){return t.goTo()}}},[a("v-icon",[t._v("mdi-home")])],1):t._e(),a("v-tooltip",{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function(e){var n=e.on,s=e.attrs;return[a("v-icon",t._g(t._b({staticClass:"ml-3",attrs:{small:"",color:t.status.color},domProps:{textContent:t._s(t.status.icon)}},"v-icon",s,!1),n))]}}])},[a("div",{domProps:{textContent:t._s(t.status.text)}}),a("div",{domProps:{textContent:t._s(t.status.time)}})])],1),a("v-navigation-drawer",{attrs:{app:"",color:"secondary",dark:this.$vuetify.theme.dark,clipped:""},model:{value:t.appBar.drawer,callback:function(e){t.$set(t.appBar,"drawer",e)},expression:"appBar.drawer"}},[a("v-img",{attrs:{src:n(2862)}}),a("v-divider"),a("v-list",{attrs:{nav:""}},[a("v-list-item",{key:"home",attrs:{link:"",to:"/"}},[a("v-list-item-icon",[a("v-icon",[t._v("mdi-home")])],1),a("v-list-item-content",[a("v-list-item-title",{staticClass:"text-left"},[t._v(" "+t._s(t.$t("app.navigation.home"))+" ")])],1)],1),a("v-divider"),t.showGroups?a("v-list-group",{attrs:{color:"secondary lighten-4","prepend-icon":"mdi-lightbulb-group",value:t.app.options.expandGroups},scopedSlots:t._u([{key:"activator",fn:function(){return[a("v-list-item-title",[t._v(t._s(t.$t("app.navigation.group")))])]},proxy:!0}],null,!1,444615855)},t._l(t.app.data.groupList,(function(e){return a("v-chip",{key:e.title,staticClass:"ma-2",attrs:{link:"",to:"/devices/"+e.route}},[t._v(" "+t._s(e.title)+" ")])})),1):t._e(),t.showRooms?a("v-list-group",{attrs:{color:"secondary lighten-4","prepend-icon":"mdi-floor-plan",value:t.app.options.expandRooms},scopedSlots:t._u([{key:"activator",fn:function(){return[a("v-list-item-title",[t._v(t._s(t.$t("app.navigation.room")))])]},proxy:!0}],null,!1,438615151)},t._l(t.app.data.roomList,(function(e){return a("v-chip",{key:e.title,staticClass:"ma-2",attrs:{link:"",to:"/devices/"+e.route}},[t._v(" "+t._s(e.title)+" ")])})),1):t._e(),a("v-divider"),a("v-list-item",{key:"dashboard",attrs:{link:"",to:"/dashboard"}},[a("v-list-item-icon",[a("v-icon",[t._v("mdi-view-dashboard")])],1),a("v-list-item-content",[a("v-list-item-title",{staticClass:"text-left"},[t._v(" "+t._s(t.$t("app.navigation.dashboard"))+" ")])],1)],1),a("v-divider"),a("v-list-item",{key:"system",attrs:{link:"",to:"/system"}},[a("v-list-item-icon",[a("v-icon",[t._v("mdi-tools")])],1),a("v-list-item-content",[a("v-list-item-title",{staticClass:"text-left"},[t._v(" "+t._s(t.$t("app.navigation.system"))+" ")])],1)],1),a("v-divider"),a("v-list-item",[a("v-list-item-content",[a("v-list-item-subtitle",[t._v(" "+t._s(t.version)+" ")])],1)],1)],1)],1),a("v-main",[a("v-container",{attrs:{fluid:""}},[a("Broadcaster"),a("router-view")],1)],1)],1)},r=[],i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-alert",{attrs:{value:t.alert,type:t.type,dense:"",text:"",outlined:""}},[n("v-row",{attrs:{align:"center"}},[n("v-col",[n("div",[t._v(" "+t._s(t.message)+" ")]),n("div",[t._v(" "+t._s(t.meta)+" ")])]),n("v-col",{staticClass:"shrink"},[n("v-btn",{attrs:{icon:"",small:""},on:{click:function(e){return t.clearMessage()}}},[n("v-icon",{attrs:{color:t.type}},[t._v(" mdi-close-circle ")])],1)],1)],1)],1)},o=[],p=(n(561),{name:"BroadCaster",data:function(){return{alert:!1,type:"info",types:["","error","info","info","success","warning"],message:"",meta:"",msgList:[]}},watch:{msgList:function(){this.msgList&&this.msgList.length>0?(this.type=this.types[this.msgList[0].lvl],this.message=this.msgList[0].msg,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted:function(){var t=this;this.$fhem.on("message",(function(e){var n={lvl:5,msg:"no valid message received",meta:""};Object.assign(n,e),t.msgList.unshift(n)}))},methods:{clearMessage:function(){this.msgList.length>0&&this.msgList.splice(0,1)}}}),c=p,l=n(1001),u=n(3453),h=n.n(u),d=n(1234),m=n(3150),f=n(2102),v=n(6428),g=n(2877),b=(0,l.Z)(c,i,o,!1,null,null,null),y=b.exports;h()(b,{VAlert:d.Z,VBtn:m.Z,VCol:f.Z,VIcon:v.Z,VRow:g.Z});var k={components:{Broadcaster:y},data:function(){return{appBar:{color:"",drawer:null,clock:null,header:null},app:{options:{loading:!1,reloadBtn:!1,expandGroups:!1,expandRooms:!1,mobileHeaderContent:!1},session:{connect:!1},data:{roomList:[],groupList:[]}},version:"v"+n(4147).i8,status:{color:"secondary",icon:"mdi-circle",text:"unbekannt",time:""}}},computed:{showRooms:function(){return this.app.data.roomList.length>0},showGroups:function(){return this.app.data.groupList.length>0}},watch:{"app.session.connect":function(t){this.status.color=t?"success":"error",this.status.text=t?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted:function(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.appBar=this.$fhem.app.appBar},methods:{reload:function(){location.reload(!0)},goTo:function(t){var e=t||"/";this.$router.currentRoute.path!=e&&this.$router.push(e)}}},x=k,w=n(7524),O=n(426),C=n(5206),Z=n(5424),R=n(9846),_=n(1418),L=n(7047),j=n(6816),T=n(9443),S=n(7620),E=n(1960),I=n(459),B=n(7877),V=n(5132),D=n(1058),A=n(624),F=n(9762),P=n(9330),N=(0,l.Z)(x,s,r,!1,null,"3b4d7587",null),H=N.exports;h()(N,{VApp:w.Z,VAppBar:O.Z,VAppBarNavIcon:C.Z,VBtn:m.Z,VChip:Z.Z,VContainer:R.Z,VDivider:_.Z,VIcon:v.Z,VImg:L.Z,VList:j.Z,VListGroup:T.Z,VListItem:S.Z,VListItemContent:E.km,VListItemIcon:I.Z,VListItemSubtitle:E.oZ,VListItemTitle:E.V9,VMain:B.Z,VNavigationDrawer:V.Z,VOverlay:D.Z,VProgressCircular:A.Z,VSpacer:F.Z,VTooltip:P.Z});n(1539),n(8783),n(3948);var M=n(8345);a.Z.use(M.Z);var $=[{path:"/",name:"Home",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/system",name:"System",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/dashboard",name:"Dashboard",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/devices/:filter",name:"Devices",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/settings",name:"Settings",component:function(){return n.e(884).then(n.bind(n,6884))}},{path:"/syslog",name:"Syslog",component:function(){return Promise.all([n.e(121),n.e(288),n.e(285),n.e(44)]).then(n.bind(n,4044))}}],U=new M.Z({mode:"hash",base:"",routes:$}),q=U,z=n(9132),G=n(9146),J=n(1846);a.Z.use(z.Z);var X={lang:{locales:{de:G.Z},current:"de"},theme:{dark:!0,themes:{dark:{primary:J.Z.grey.darken4,secondary:J.Z.grey.darken3,success:J.Z.green.accent2,accent:J.Z.green.accent2},light:{primary:J.Z.grey,secondary:J.Z.grey.lighten3,success:J.Z.green.accent3,accent:J.Z.green.accent3}}}},K=new z.Z(X),W=n(7166),Q=n.n(W),Y=(n(4747),n(4916),n(4723),n(7152));function tt(){var t=n(8973),e={};return t.keys().forEach((function(n){var a=n.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){var s=a[1];e[s]=t(n)}})),e}a.Z.use(Y.Z);var et=new Y.Z({locale:"de",fallbackLocale:"en",messages:tt()}),nt=n(2032),at=n(8932),st=n(6198),rt=n(9726),it=n(6133),ot=n(2751),pt=n(796),ct=n(6035),lt=(n(5666),n(7042),n(3123),n(5306),n(7941),n(8309),n(1249),n(2707),n(9600),n(7601),n(6977),n(9714),n(2222),n(4603),n(8450),n(8386),n(2479),n(7187)),ut=n.n(lt),ht=function(t){(0,pt.Z)(n,t);var e=(0,ct.Z)(n);function n(){var t;return(0,it.Z)(this,n),t=e.call(this),t.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem",type:"websocket"},conn:null,connOffset:0,session:{connect:!1,ready:!1,csrf:null,restart:!1,restartCnt:0,logList:[]},options:{lang:"de",debugMode:!1,debugLevel:5,loading:!1,loadCount:0,clockInterval:1e3,clockFormat:{hour:"2-digit",minute:"2-digit"},clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},theme:{dark:!0,themes:{}},appBar:{color:"primary",drawer:!1,clock:null,header:null,mobileHeader:null},templates:[],componentMap:[{name:"panel",component:"templ_panel"},{name:"chart",component:"templ_chart"},{name:"weather",component:"templ_weather"},{name:"sysmon",component:"templ_sysmon"},{name:"hmlan",component:"templ_hmlan"},{name:"sonos",component:"templ_sonos"},{name:"scenes",component:"templ_scenes"},{name:"cam",component:"templ_cam"},{name:"iframe",component:"templ_iframe"}],data:{roomList:[],groupList:[],deviceList:[],routeList:[],header:""},hasConnected:[]},t}return(0,ot.Z)(n,[{key:"loading",set:function(t){t&&this.app.options.loadCount++,!t&&this.app.options.loadCount>0&&this.app.options.loadCount--,this.app.options.loadCount>0&&!this.app.options.loading&&(this.app.options.loading=!0),0===this.app.options.loadCount&&(this.app.options.loading=!1)}},{key:"log",value:function(t){var e=["","mdi-alert-outline","mdi-connection","mdi-send-circle-outline","mdi-sync","mdi-hexagon-multiple-outline"],n=["","error","info","success","success","warning"],a=(new Date).toLocaleTimeString(this.app.options.lang),s=(new Date).getMilliseconds(),r={time:a+":"+("000"+s).slice(-3),msg:t.msg||"",lvl:t.lvl||5,meta:t.meta||null,icon:e[t.lvl||5],color:n[t.lvl||5]};this.app.options.logRecord&&r.lvl<=this.app.options.debugLevel&&(this.app.session.logList.unshift(r),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer)),1==r.lvl&&(this.app.options.loadCount=0,this.app.options.loading=!1,this.emit("message",r))}},{key:"getDate",value:function(t){var e=t?parseInt(t):0;return function(t){return new Date(t.setDate(t.getDate()-e)).toISOString()}(new Date).split("T")[0]}},{key:"getDateTime",value:function(t){var e=t||(new Date).toISOString();return new Date(e.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}},{key:"createURL",value:function(t){var e=this.app.connection,n=e.location?e.location:"",a=e.port?":"+e.port.replace(":",""):"",s=e.path?"/"+e.path.replace("/",""):"",r="";return"object"==(0,rt.Z)(t)&&t.length>0&&t.forEach((function(t){t.param&&t.value&&(r+=r?"&":"?",r+=t.param+"="+encodeURIComponent(t.value))})),n+a+s+r}},{key:"getEl",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a0?s.push.apply(s,(0,at.Z)(e)):s.push(e)),"string"===typeof e&&s.push({param:"cmd",value:e}),r=this.createURL(s),this.log({lvl:3,msg:"Request: "+r}),t.next=9,fetch(r).then((function(t){var e=null;return"csrf"===n&&(e=t.headers.get("x-fhem-csrftoken")),"json"===n&&(e=t.json()),e||(e=t.text()),"object"===(0,rt.Z)(a)?Object.assign(a,{data:e}):e})).catch((function(t){return i.log({lvl:1,msg:"Request failed "+r,meta:t.message})}));case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)})));function e(e,n,a){return t.apply(this,arguments)}return e}()},{key:"getJsonFile",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=new Headers,n.append("pragma","no-cache"),n.append("cache-control","no-cache"),a={method:"GET",headers:n},t.next=6,fetch(e,a).then((function(t){return t.json()})).catch((function(t){return r.log({lvl:1,msg:"Read Json-Data from "+e+" failed.",meta:t})}));case 6:return s=t.sent,s&&this.log({lvl:5,msg:"Json-Data parsed from "+e,meta:s}),t.next=10,s;case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"readConfig",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getJsonFile(e);case 2:if(n=t.sent,n){for(a=0,s=Object.keys(n);a0)){t.next=41;break}n=[],a=[],this.app.data.routeList.splice(0),s=(0,nt.Z)(e.Results),t.prev=8,s.s();case 10:if((r=s.n()).done){t.next=27;break}return i=r.value,t.next=14,this.createOptions(i);case 14:if(o=t.sent,!o.template){t.next=25;break}return t.next=18,this.getTemplate(o);case 18:p=t.sent,p&&this.app.templates.push(p),o.room&&this.createNaviItems(o,n,"room"),o.group&&this.createNaviItems(o,a,"group"),o.home&&this.createRoutes(o,"/"),o.dashboard&&this.createRoutes(o,"/dashboard"),o.system&&this.createRoutes(o,"/system");case 25:t.next=10;break;case 27:t.next=32;break;case 29:t.prev=29,t.t0=t["catch"](8),s.e(t.t0);case 32:return t.prev=32,s.f(),t.finish(32);case 35:n.sort((function(t,e){return t.title>e.title?1:e.title>t.title?-1:0})),a.sort((function(t,e){return t.title>e.title?1:e.title>t.title?-1:0})),this.app.data.roomList=Object.assign([],n),this.app.data.groupList=Object.assign([],a),this.app.session.ready=!0,this.loading=!1;case 41:case"end":return t.stop()}}),t,this,[[8,29,32,35]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"createConnected",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r,i,o,p,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n={},a=this.app.hasConnected.indexOf(e.Name),-1!=a){t.next=30;break}if(this.app.hasConnected.push(e.Name),!("connected"in e.Options)){t.next=28;break}s=Object.keys(e.Options.connected),r=0,i=s;case 7:if(!(re.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0})),this.app.data.deviceList=Object.assign([],r),this.loading=!1),i++;case 39:t.next=15;break;case 41:t.next=46;break;case 43:t.prev=43,t.t0=t["catch"](13),o.e(t.t0);case 46:return t.prev=46,o.f(),t.finish(46);case 49:case"end":return t.stop()}}),t,this,[[13,43,46,49]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"checkUpdate",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(){var e,n,a,s,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]);case 2:if(e=t.sent,n=0,e){a=e.split("\n").splice(2),s=(0,nt.Z)(a);try{for(s.s();!(r=s.n()).done;)i=r.value,i.match("UPD")&&!i.match("excluded")&&n++}catch(o){s.e(o)}finally{s.f()}}return t.abrupt("return",n>0);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"handleLogData",value:function(t){var e=t.split("\n");e.length>3&&e.splice(-3,3);var n,a=[],s=e.length>this.app.options.maxChartPoints?parseInt(e.length/this.app.options.maxChartPoints):1,r=s,i=0,o=1,p=(0,nt.Z)(e);try{for(p.s();!(n=p.n()).done;){var c=n.value,l=c.split(" "),u=Date.parse(l[0].replace("_","T")),h=parseFloat(l[1]);i+=h,(o>=r||o===e.length)&&(o===e.length&&(s-=r-o),a.push({timestamp:u,value:i/s}),r+=s,i=0),o++}}catch(d){p.e(d)}finally{p.f()}return this.log({lvl:5,msg:"handle Chartdata (Lines: "+e.length+")"}),a}},{key:"readLogData",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r,i,o,p,c,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=[],this.loading=!0,!(e.defs&&e.defs.length>0)){t.next=40;break}a=0,s=(0,nt.Z)(e.defs),t.prev=5,s.s();case 7:if((r=s.n()).done){t.next=32;break}return i=r.value,o=/\(.*\)/.exec(i),p=o?i.replace(o[0],"_").split(":"):i.split(":"),c="get ",c+=p[0]?p[0]:e.deviceName,c+=e.from?" - - "+e.from:"",c+=e.to?" "+e.to:"",c+=o?" "+o[0].replace(/\(|\)/g,""):" 4:"+p[1],t.next=18,this.request([{param:"cmd",value:c},{param:"XHR",value:"1"}],"text",{id:a});case 18:if(l=t.sent,!l){t.next=29;break}return t.t0=n,t.t1=l.id,t.t2=this,t.next=25,l.data;case 25:t.t3=t.sent,t.t4=t.t2.handleLogData.call(t.t2,t.t3),t.t5={id:t.t1,data:t.t4},t.t0.push.call(t.t0,t.t5);case 29:a++;case 30:t.next=7;break;case 32:t.next=37;break;case 34:t.prev=34,t.t6=t["catch"](5),s.e(t.t6);case 37:return t.prev=37,s.f(),t.finish(37);case 40:return this.loading=!1,t.abrupt("return",Object.assign(e,{data:n}));case 42:case"end":return t.stop()}}),t,this,[[5,34,37,40]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"replaceVals",value:function(t,e){for(var n=/-?[0-9]/.exec(e),a=[],s=2;s1?c+"Tage ":c>0?c+"Tag ":"";h+=l>0?l+"h ":"",h+=u>0?u+"min":"",r=t[s].replace("%a",h)}if(/%n/.test(t[s])&&n){/%n.[0-9]/.test(t[s])||(t[s]=t[s].replace("%n","%n.0"));var d=/%n../.exec(t[s]),m=d[0].replace("%n.","");r=t[s].replace(d[0],parseFloat(e.slice(n.index)).toFixed(m))}if(/%i/.test(t[s])&&n){var f=parseFloat(t[s].split("%i")[1]);if("isNaN"!=f){var v=f.toString().split(".")[1]||"",g=v.length,b=parseFloat(e.slice(n.index))+f;r=t[s].replace("%i"+f,b.toFixed(g))}}r=r.replace(/:/g,":"),a.push(r)}return a}},{key:"handleVals",value:function(t,e){var n=[];if("string"===typeof e){var a=("::"+e).split(":");n=this.replaceVals(a,"")}if("object"===(0,rt.Z)(t)&&"object"===(0,rt.Z)(e)&&e.length>0){var s,r=(0,nt.Z)(e);try{for(r.s();!(s=r.n()).done;){var i=s.value,o=i.split(":");if(o.length>2){var p=/\./.test(o[0])?o[0].split("."):["Readings",o[0],"Value"],c=this.getEl.apply(this,[t].concat((0,at.Z)(p)))||this.getEl(t,"Readings",o[0],"Value");if(c){var l=!1,u=parseFloat(o[1]);if(isNaN(u))RegExp(o[1]?o[1]:".").test(c)&&(l=!0);else{var h=/-?[0-9]/.exec(c);-1!=h.index&&parseFloat(c.slice(h.index))>=u&&(l=!0)}if(l){n=this.replaceVals(o,c);break}}}}}catch(d){r.e(d)}finally{r.f()}}return n}},{key:"handleTemplate",value:function(t){var e=this.getEl(t,"Options","setup","show"),n=this.getEl(t,"Options","setup","status","bar"),a=this.getEl(t,"Options","setup","status","error"),s=this.getEl(t,"Options","setup","info");if(e){var r=this.handleVals(t,e);t.Options.show="false"!==r[0],r[1]&&(t.Options.setup.size=r[1]),r[2]&&(t.Options.sortby=r[2])}if(n){var i=this.getEl(t,"Options","setup","status","min")||0,o=this.getEl(t,"Options","setup","status","max")||100,p=this.handleVals(t,n),c=100/(o-i),l=(p[0]||"0"-i)*c;t.Options.status.level=p[2]?100-l:l,t.Options.status.color=p[1]||"success"}if(a){var u=this.handleVals(t,a);u.length>0?(t.Options.status.level=u[0]||"100",t.Options.status.color=u[1]||"error",t.Options.status.error=u[2]||"Fehler",t.Options.status.isActive=!1):t.Options.status.isActive=!0}if(s){var h=this.handleVals(t,s.left1),d=this.handleVals(t,s.left2),m=this.handleVals(t,s.mid1),f=this.handleVals(t,s.mid2),v=this.handleVals(t,s.right1),g=this.handleVals(t,s.right2);t.Options.info.left1IconColor=h[2]||"",t.Options.info.left1Icon=h[1]||"",t.Options.info.left1Text=h[0]||"",t.Options.info.left2IconColor=d[2]||"",t.Options.info.left2Icon=d[1]||"",t.Options.info.left2Text=d[0]||"",t.Options.info.mid1IconColor=m[2]||"",t.Options.info.mid1Icon=m[1]||"",t.Options.info.mid1Text=m[0]||"",t.Options.info.mid2IconColor=f[2]||"",t.Options.info.mid2Icon=f[1]||"",t.Options.info.mid2Text=f[0]||"",t.Options.info.right1IconColor=v[2]||"",t.Options.info.right1Icon=v[1]||"",t.Options.info.right1Text=v[0]||"",t.Options.info.right2IconColor=g[2]||"",t.Options.info.right2Icon=g[1]||"",t.Options.info.right2Text=g[0]||""}}},{key:"handleData",value:function(t){var e=JSON.parse(t),n=null;if(!e[2].match("0){var i=this.handleData(r);if(i){var o,p=0,c=(0,nt.Z)(this.app.data.deviceList);try{for(c.s();!(o=c.n()).done;){var l=o.value,u=this.app.data.deviceList[p],h=Object.assign({},u);if(l.Name===i.Name&&("Readings"===i.devicePart&&this.getEl(h,"Readings",i.param,i.paramPart)&&(h.Readings[i.param][i.paramPart]=i.value),"Attributes"===i.devicePart&&this.getEl(h,"Attributes",i.param)&&(h.Attributes[i.param]=i.value),this.handleTemplate(h),this.app.data.deviceList.splice(p,1,h),this.app.data.deviceList.sort((function(t,e){return t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0}))),"Connected"in l)for(var d=0,m=0,f=Object.values(l.Connected);me.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0}))}d++}p++}}catch(b){c.e(b)}finally{c.f()}}}}}catch(b){s.e(b)}finally{s.f()}}},{key:"connOpen",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.app.session.connect=!0,this.app.session.restartCnt=0,this.log({lvl:2,msg:"Connection with FHEM is opened.",meta:this.app.connection}),t.next=5,this.request({},"csrf");case 5:this.app.session.csrf=t.sent,this.log({lvl:2,msg:"Crsf-Token received.",meta:{token:this.app.session.csrf}}),this.loadStructure();case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"connClose",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.ready=!1,this.app.conn=null,this.app.session.restart||(n=0==this.app.session.restartCnt?1:3e3,this.app.session.restart=!0,setTimeout((function(){s.app.session.restart=!1,s.app.session.restartCnt++,s.connStart()}),n),a={info:"Connection ("+this.app.connection.type+") "+(e?"failed.":"was closed."),errCode:e||""},this.log({lvl:2,msg:"Connection with FHEM was closed. Try to Reconnect in "+n/1e3+" seconds...",meta:a}),this.loading=!1);case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"connStart",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(){var e,n,a=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],n=this.createURL(e),"websocket"===this.app.connection.type?(this.app.conn=new WebSocket(n.replace(/^http/i,"ws")),this.app.conn.onopen=function(){return a.connOpen()},this.app.conn.onmessage=function(t){return a.doUpdate(t)},this.app.conn.onclose=function(){return a.connClose()},this.app.conn.onerror=function(t){return a.connClose(t)}):(this.app.conn=new XMLHttpRequest,this.app.conn.open("GET",n,!0),this.app.conn.onreadystatechange=function(){200===a.app.conn.status&&2===a.app.conn.readyState&&a.connOpen(),200===a.app.conn.status&&3===a.app.conn.readyState&&a.doUpdate()},this.app.conn.onerror=function(t){return a.connClose(t)},this.app.conn.send());case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"setClock",value:function(){var t=new Date;this.app.appBar.clock=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat),this.app.appBar.header=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"clock"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat)),"date"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))}},{key:"init",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e,n){var a=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.log({lvl:2,msg:"Starting FHEMApp..."}),this.loading=!0,t.next=4,this.readConfig("./cfg/config.json");case 4:this.connStart(),e&&this.app.theme&&(-1!=this.app.theme.dark&&Object.assign(e.framework.theme,{dark:this.app.theme.dark}),this.app.theme.themes.light&&Object.assign(e.framework.theme.themes.light,this.app.theme.themes.light),this.app.theme.themes.dark&&Object.assign(e.framework.theme.themes.dark,this.app.theme.themes.dark)),n&&this.app.options.lang&&(n.locale=this.app.options.lang),this.setClock(),setInterval((function(){return a.setClock()}),this.app.options.clockInterval);case 9:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()}]),n}(ut()),dt={install:function(t,e,n){t.prototype.$fhem=new ht,t.prototype.$fhem.init(e,n)}};a.Z.use(dt,K,et),a.Z.use(Q()),a.Z.component("apex-chart",Q()),a.Z.config.productionTip=!1,new a.Z({vuetify:K,router:q,i18n:et,render:function(t){return t(H)}}).$mount("#app")},8973:function(t,e,n){var a={"./de.json":9929,"./en.json":790};function s(t){var e=r(t);return n(e)}function r(t){if(!n.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}s.keys=function(){return Object.keys(a)},s.resolve=r,t.exports=s,s.id=8973},2862:function(t,e,n){"use strict";t.exports=n.p+"img/FHEM_Logo.a2a7fc8d.png"},4147:function(t){"use strict";t.exports={i8:"3.32.0"}},9929:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"},"dates":{"from":"von","to":"bis"}},"templates":{"sysmon":{"updateBtn":["prüfe Updates...","system aktuell","update","update läuft.."],"restartBtn":"neustart","updateDialog":{"header":"FHEM Update","text":"Update wurde erfolgreich beendet. FHEM sollte neu gestartet werden.","restartBtn":"jetzt neustarten"}}}}')},790:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"},"dates":{"from":"From","to":"To"}},"templates":{"sysmon":{"updateBtn":["check updates...","up to date","update","update running..."],"restartBtn":"restart","updateDialog":{"header":"FHEM Update","text":"Update was successful finished. FHEM should be restarted now.","restartBtn":"restart now"}}}}')}},e={};function n(a){var s=e[a];if(void 0!==s)return s.exports;var r=e[a]={exports:{}};return t[a].call(r.exports,r,r.exports,n),r.exports}n.m=t,function(){var t=[];n.O=function(e,a,s,r){if(!a){var i=1/0;for(l=0;l=r)&&Object.keys(n.O).every((function(t){return n.O[t](a[p])}))?a.splice(p--,1):(o=!1,r0&&t[l-1][2]>r;l--)t[l]=t[l-1];t[l]=[a,s,r]}}(),function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})}}(),function(){n.f={},n.e=function(t){return Promise.all(Object.keys(n.f).reduce((function(e,a){return n.f[a](t,e),e}),[]))}}(),function(){n.u=function(t){return"js/"+t+"-legacy."+{44:"3af77626",121:"62a3b348",154:"c725f673",285:"39686d97",288:"6d3eb988",322:"c29a322f",337:"ef87a395",387:"c8bf8023",396:"c0fe53a6",438:"e54dc5ad",475:"24b478c9",658:"5954720d",775:"80cc0bc3",869:"8b8fa91e",884:"c1922847",947:"43621317",997:"64da21ee"}[t]+".js"}}(),function(){n.miniCssF=function(t){return"css/"+t+"."+{44:"7086d1d2",154:"8ecd64f4",285:"b6c37c1b",288:"a57bcf5c",337:"b2abc4be",387:"5322d21c",396:"8ecd64f4",438:"85e1c6a8",475:"35328724",658:"b79779ed",869:"5fde8d03",947:"85e1c6a8",997:"8ecd64f4"}[t]+".css"}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){var t={},e="fhemapp:";n.l=function(a,s,r,i){if(t[a])t[a].push(s);else{var o,p;if(void 0!==r)for(var c=document.getElementsByTagName("script"),l=0;l0?(this.type=this.types[this.msgList[0].lvl],this.message=this.msgList[0].msg,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted:function(){var t=this;this.$fhem.on("message",(function(e){var n={lvl:5,msg:"no valid message received",meta:""};Object.assign(n,e),t.msgList.unshift(n)}))},methods:{clearMessage:function(){this.msgList.length>0&&this.msgList.splice(0,1)}}}),c=p,l=n(1001),u=n(3453),h=n.n(u),d=n(1234),m=n(3150),f=n(2102),v=n(6428),g=n(2877),b=(0,l.Z)(c,i,o,!1,null,null,null),y=b.exports;h()(b,{VAlert:d.Z,VBtn:m.Z,VCol:f.Z,VIcon:v.Z,VRow:g.Z});var k={components:{Broadcaster:y},data:function(){return{appBar:{color:"",drawer:null,clock:null,header:null},app:{options:{loading:!1,reloadBtn:!1,expandGroups:!1,expandRooms:!1,mobileHeaderContent:!1},session:{connect:!1},data:{roomList:[],groupList:[]}},version:"v"+n(4147).i8,status:{color:"secondary",icon:"mdi-circle",text:"unbekannt",time:""}}},computed:{showRooms:function(){return this.app.data.roomList.length>0},showGroups:function(){return this.app.data.groupList.length>0}},watch:{"app.session.connect":function(t){this.status.color=t?"success":"error",this.status.text=t?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted:function(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.appBar=this.$fhem.app.appBar},methods:{reload:function(){location.reload(!0)},goTo:function(t){var e=t||"/";this.$router.currentRoute.path!=e&&this.$router.push(e)}}},x=k,w=n(7524),O=n(426),C=n(5206),Z=n(5424),R=n(9846),_=n(1418),L=n(7047),j=n(6816),T=n(9443),S=n(7620),E=n(1960),I=n(459),B=n(7877),V=n(5132),D=n(1058),A=n(624),F=n(9762),P=n(9330),N=(0,l.Z)(x,s,r,!1,null,"3b4d7587",null),H=N.exports;h()(N,{VApp:w.Z,VAppBar:O.Z,VAppBarNavIcon:C.Z,VBtn:m.Z,VChip:Z.Z,VContainer:R.Z,VDivider:_.Z,VIcon:v.Z,VImg:L.Z,VList:j.Z,VListGroup:T.Z,VListItem:S.Z,VListItemContent:E.km,VListItemIcon:I.Z,VListItemSubtitle:E.oZ,VListItemTitle:E.V9,VMain:B.Z,VNavigationDrawer:V.Z,VOverlay:D.Z,VProgressCircular:A.Z,VSpacer:F.Z,VTooltip:P.Z});n(1539),n(8783),n(3948);var M=n(8345);a.Z.use(M.Z);var $=[{path:"/",name:"Home",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/system",name:"System",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/dashboard",name:"Dashboard",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/devices/:filter",name:"Devices",component:function(){return n.e(775).then(n.bind(n,3775))}},{path:"/settings",name:"Settings",component:function(){return n.e(884).then(n.bind(n,6884))}},{path:"/syslog",name:"Syslog",component:function(){return Promise.all([n.e(121),n.e(288),n.e(285),n.e(44)]).then(n.bind(n,4044))}}],U=new M.Z({mode:"hash",base:"",routes:$}),q=U,z=n(9132),G=n(9146),J=n(1846);a.Z.use(z.Z);var X={lang:{locales:{de:G.Z},current:"de"},theme:{dark:!0,themes:{dark:{primary:J.Z.grey.darken4,secondary:J.Z.grey.darken3,success:J.Z.green.accent2,accent:J.Z.green.accent2},light:{primary:J.Z.grey,secondary:J.Z.grey.lighten3,success:J.Z.green.accent3,accent:J.Z.green.accent3}}}},K=new z.Z(X),W=n(7166),Q=n.n(W),Y=(n(4747),n(4916),n(4723),n(7152));function tt(){var t=n(8973),e={};return t.keys().forEach((function(n){var a=n.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){var s=a[1];e[s]=t(n)}})),e}a.Z.use(Y.Z);var et=new Y.Z({locale:"de",fallbackLocale:"en",messages:tt()}),nt=n(2032),at=n(8932),st=n(6198),rt=n(9726),it=n(6133),ot=n(2751),pt=n(796),ct=n(6035),lt=(n(5666),n(7042),n(3123),n(5306),n(7941),n(8309),n(1249),n(2707),n(9600),n(7601),n(6977),n(9714),n(2222),n(4603),n(8450),n(8386),n(2479),n(7187)),ut=n.n(lt),ht=function(t){(0,pt.Z)(n,t);var e=(0,ct.Z)(n);function n(){var t;return(0,it.Z)(this,n),t=e.call(this),t.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem",type:"websocket"},conn:null,connOffset:0,session:{connect:!1,ready:!1,csrf:null,restart:!1,restartCnt:0,logList:[]},options:{lang:"de",debugMode:!1,debugLevel:5,loading:!1,loadCount:0,clockInterval:1e3,clockFormat:{hour:"2-digit",minute:"2-digit"},clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},theme:{dark:!0,themes:{}},appBar:{color:"primary",drawer:!1,clock:null,header:null,mobileHeader:null},templates:[],componentMap:[{name:"panel",component:"templ_panel"},{name:"chart",component:"templ_chart"},{name:"weather",component:"templ_weather"},{name:"sysmon",component:"templ_sysmon"},{name:"hmlan",component:"templ_hmlan"},{name:"sonos",component:"templ_sonos"},{name:"scenes",component:"templ_scenes"},{name:"cam",component:"templ_cam"},{name:"iframe",component:"templ_iframe"}],data:{roomList:[],groupList:[],deviceList:[],routeList:[],header:""},hasConnected:[]},t}return(0,ot.Z)(n,[{key:"loading",set:function(t){t&&this.app.options.loadCount++,!t&&this.app.options.loadCount>0&&this.app.options.loadCount--,this.app.options.loadCount>0&&!this.app.options.loading&&(this.app.options.loading=!0),0===this.app.options.loadCount&&(this.app.options.loading=!1)}},{key:"log",value:function(t){var e=["","mdi-alert-outline","mdi-connection","mdi-send-circle-outline","mdi-sync","mdi-hexagon-multiple-outline"],n=["","error","info","success","success","warning"],a=(new Date).toLocaleTimeString(this.app.options.lang),s=(new Date).getMilliseconds(),r={time:a+":"+("000"+s).slice(-3),msg:t.msg||"",lvl:t.lvl||5,meta:t.meta||null,icon:e[t.lvl||5],color:n[t.lvl||5]};this.app.options.logRecord&&r.lvl<=this.app.options.debugLevel&&(this.app.session.logList.unshift(r),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer)),1==r.lvl&&(this.app.options.loadCount=0,this.app.options.loading=!1,this.emit("message",r))}},{key:"getDate",value:function(t){var e=t?parseInt(t):0;return function(t){return new Date(t.setDate(t.getDate()-e)).toISOString()}(new Date).split("T")[0]}},{key:"getDateTime",value:function(t){var e=t||(new Date).toISOString();return new Date(e.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}},{key:"createURL",value:function(t){var e=this.app.connection,n=e.location?e.location:"",a=e.port?":"+e.port.replace(":",""):"",s=e.path?"/"+e.path.replace("/",""):"",r="";return"object"==(0,rt.Z)(t)&&t.length>0&&t.forEach((function(t){t.param&&t.value&&(r+=r?"&":"?",r+=t.param+"="+encodeURIComponent(t.value))})),n+a+s+r}},{key:"getEl",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a0?s.push.apply(s,(0,at.Z)(e)):s.push(e)),"string"===typeof e&&s.push({param:"cmd",value:e}),r=this.createURL(s),this.log({lvl:3,msg:"Request: "+r}),t.next=9,fetch(r).then((function(t){var e=null;return"csrf"===n&&(e=t.headers.get("x-fhem-csrftoken")),"json"===n&&(e=t.json()),e||(e=t.text()),"object"===(0,rt.Z)(a)?Object.assign(a,{data:e}):e})).catch((function(t){return i.log({lvl:1,msg:"Request failed "+r,meta:t.message})}));case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)})));function e(e,n,a){return t.apply(this,arguments)}return e}()},{key:"getJsonFile",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=new Headers,n.append("pragma","no-cache"),n.append("cache-control","no-cache"),a={method:"GET",headers:n},t.next=6,fetch(e,a).then((function(t){return t.json()})).catch((function(t){return r.log({lvl:1,msg:"Read Json-Data from "+e+" failed.",meta:t})}));case 6:return s=t.sent,s&&this.log({lvl:5,msg:"Json-Data parsed from "+e,meta:s}),t.next=10,s;case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"readConfig",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getJsonFile(e);case 2:if(n=t.sent,n){for(a=0,s=Object.keys(n);a0)){t.next=41;break}n=[],a=[],this.app.data.routeList.splice(0),s=(0,nt.Z)(e.Results),t.prev=8,s.s();case 10:if((r=s.n()).done){t.next=27;break}return i=r.value,t.next=14,this.createOptions(i);case 14:if(o=t.sent,!o.template){t.next=25;break}return t.next=18,this.getTemplate(o);case 18:p=t.sent,p&&this.app.templates.push(p),o.room&&this.createNaviItems(o,n,"room"),o.group&&this.createNaviItems(o,a,"group"),o.home&&this.createRoutes(o,"/"),o.dashboard&&this.createRoutes(o,"/dashboard"),o.system&&this.createRoutes(o,"/system");case 25:t.next=10;break;case 27:t.next=32;break;case 29:t.prev=29,t.t0=t["catch"](8),s.e(t.t0);case 32:return t.prev=32,s.f(),t.finish(32);case 35:n.sort((function(t,e){return t.title>e.title?1:e.title>t.title?-1:0})),a.sort((function(t,e){return t.title>e.title?1:e.title>t.title?-1:0})),this.app.data.roomList=Object.assign([],n),this.app.data.groupList=Object.assign([],a),this.app.session.ready=!0,this.loading=!1;case 41:case"end":return t.stop()}}),t,this,[[8,29,32,35]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"createConnected",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r,i,o,p,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n={},a=this.app.hasConnected.indexOf(e.Name),-1!=a){t.next=30;break}if(this.app.hasConnected.push(e.Name),!("connected"in e.Options)){t.next=28;break}s=Object.keys(e.Options.connected),r=0,i=s;case 7:if(!(re.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0})),this.app.data.deviceList=Object.assign([],r),this.loading=!1),i++;case 39:t.next=15;break;case 41:t.next=46;break;case 43:t.prev=43,t.t0=t["catch"](13),o.e(t.t0);case 46:return t.prev=46,o.f(),t.finish(46);case 49:case"end":return t.stop()}}),t,this,[[13,43,46,49]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"checkUpdate",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(){var e,n,a,s,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]);case 2:if(e=t.sent,n=0,e){a=e.split("\n").splice(2),s=(0,nt.Z)(a);try{for(s.s();!(r=s.n()).done;)i=r.value,i.match("UPD")&&!i.match("excluded")&&n++}catch(o){s.e(o)}finally{s.f()}}return t.abrupt("return",n>0);case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"handleLogData",value:function(t){var e=t.split("\n");e.length>3&&e.splice(-3,3);var n,a=[],s=e.length>this.app.options.maxChartPoints?parseInt(e.length/this.app.options.maxChartPoints):1,r=s,i=0,o=1,p=(0,nt.Z)(e);try{for(p.s();!(n=p.n()).done;){var c=n.value,l=c.split(" "),u=Date.parse(l[0].replace("_","T")),h=parseFloat(l[1]);i+=h,(o>=r||o===e.length)&&(o===e.length&&(s-=r-o),a.push({timestamp:u,value:i/s}),r+=s,i=0),o++}}catch(d){p.e(d)}finally{p.f()}return this.log({lvl:5,msg:"handle Chartdata (Lines: "+e.length+")"}),a}},{key:"readLogData",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s,r,i,o,p,c,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=[],this.loading=!0,!(e.defs&&e.defs.length>0)){t.next=40;break}a=0,s=(0,nt.Z)(e.defs),t.prev=5,s.s();case 7:if((r=s.n()).done){t.next=32;break}return i=r.value,o=/\(.*\)/.exec(i),p=o?i.replace(o[0],"_").split(":"):i.split(":"),c="get ",c+=p[0]?p[0]:e.deviceName,c+=e.from?" - - "+e.from:"",c+=e.to?" "+e.to:"",c+=o?" "+o[0].replace(/\(|\)/g,""):" 4:"+p[1],t.next=18,this.request([{param:"cmd",value:c},{param:"XHR",value:"1"}],"text",{id:a});case 18:if(l=t.sent,!l){t.next=29;break}return t.t0=n,t.t1=l.id,t.t2=this,t.next=25,l.data;case 25:t.t3=t.sent,t.t4=t.t2.handleLogData.call(t.t2,t.t3),t.t5={id:t.t1,data:t.t4},t.t0.push.call(t.t0,t.t5);case 29:a++;case 30:t.next=7;break;case 32:t.next=37;break;case 34:t.prev=34,t.t6=t["catch"](5),s.e(t.t6);case 37:return t.prev=37,s.f(),t.finish(37);case 40:return this.loading=!1,t.abrupt("return",Object.assign(e,{data:n}));case 42:case"end":return t.stop()}}),t,this,[[5,34,37,40]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"replaceVals",value:function(t,e){for(var n=/-?[0-9]/.exec(e),a=[],s=2;s1?c+"Tage ":c>0?c+"Tag ":"";h+=l>0?l+"h ":"",h+=u>0?u+"min":"",r=t[s].replace("%a",h)}if(/%n/.test(t[s])&&n){/%n.[0-9]/.test(t[s])||(t[s]=t[s].replace("%n","%n.0"));var d=/%n../.exec(t[s]),m=d[0].replace("%n.","");r=t[s].replace(d[0],parseFloat(e.slice(n.index)).toFixed(m))}if(/%i/.test(t[s])&&n){var f=parseFloat(t[s].split("%i")[1]);if("isNaN"!=f){var v=f.toString().split(".")[1]||"",g=v.length,b=parseFloat(e.slice(n.index))+f;r=t[s].replace("%i"+f,b.toFixed(g))}}r=r.replace(/:/g,":"),a.push(r)}return a}},{key:"handleVals",value:function(t,e){var n=[];if("string"===typeof e){var a=("::"+e).split(":");n=this.replaceVals(a,"")}if("object"===(0,rt.Z)(t)&&"object"===(0,rt.Z)(e)&&e.length>0){var s,r=(0,nt.Z)(e);try{for(r.s();!(s=r.n()).done;){var i=s.value,o=i.split(":");if(o.length>2){var p=/\./.test(o[0])?o[0].split("."):["Readings",o[0],"Value"],c=this.getEl.apply(this,[t].concat((0,at.Z)(p)))||this.getEl(t,"Readings",o[0],"Value");if(c){var l=!1,u=parseFloat(o[1]);if(isNaN(u))RegExp(o[1]?o[1]:".").test(c)&&(l=!0);else{var h=/-?[0-9]/.exec(c);-1!=h.index&&parseFloat(c.slice(h.index))>=u&&(l=!0)}if(l){n=this.replaceVals(o,c);break}}}}}catch(d){r.e(d)}finally{r.f()}}return n}},{key:"handleTemplate",value:function(t){var e=this.getEl(t,"Options","setup","show"),n=this.getEl(t,"Options","setup","status","bar"),a=this.getEl(t,"Options","setup","status","error"),s=this.getEl(t,"Options","setup","info");if(e){var r=this.handleVals(t,e);t.Options.show="false"!==r[0],r[1]&&(t.Options.setup.size=r[1]),r[2]&&(t.Options.sortby=r[2])}if(n){var i=this.getEl(t,"Options","setup","status","min")||0,o=this.getEl(t,"Options","setup","status","max")||100,p=this.handleVals(t,n),c=100/(o-i),l=(p[0]||"0"-i)*c;t.Options.status.level=p[2]?100-l:l,t.Options.status.color=p[1]||"success"}if(a){var u=this.handleVals(t,a);u.length>0?(t.Options.status.level=u[0]||"100",t.Options.status.color=u[1]||"error",t.Options.status.error=u[2]||"Fehler",t.Options.status.isActive=!1):t.Options.status.isActive=!0}if(s){var h=this.handleVals(t,s.left1),d=this.handleVals(t,s.left2),m=this.handleVals(t,s.mid1),f=this.handleVals(t,s.mid2),v=this.handleVals(t,s.right1),g=this.handleVals(t,s.right2);t.Options.info.left1IconColor=h[2]||"",t.Options.info.left1Icon=h[1]||"",t.Options.info.left1Text=h[0]||"",t.Options.info.left2IconColor=d[2]||"",t.Options.info.left2Icon=d[1]||"",t.Options.info.left2Text=d[0]||"",t.Options.info.mid1IconColor=m[2]||"",t.Options.info.mid1Icon=m[1]||"",t.Options.info.mid1Text=m[0]||"",t.Options.info.mid2IconColor=f[2]||"",t.Options.info.mid2Icon=f[1]||"",t.Options.info.mid2Text=f[0]||"",t.Options.info.right1IconColor=v[2]||"",t.Options.info.right1Icon=v[1]||"",t.Options.info.right1Text=v[0]||"",t.Options.info.right2IconColor=g[2]||"",t.Options.info.right2Icon=g[1]||"",t.Options.info.right2Text=g[0]||""}}},{key:"handleData",value:function(t){var e=JSON.parse(t),n=null;if(!e[2].match("0){var i=this.handleData(r);if(i){var o,p=0,c=(0,nt.Z)(this.app.data.deviceList);try{for(c.s();!(o=c.n()).done;){var l=o.value,u=this.app.data.deviceList[p],h=Object.assign({},u);if(l.Name===i.Name&&("Readings"===i.devicePart&&this.getEl(h,"Readings",i.param,i.paramPart)&&(h.Readings[i.param][i.paramPart]=i.value),"Attributes"===i.devicePart&&this.getEl(h,"Attributes",i.param)&&(h.Attributes[i.param]=i.value),this.handleTemplate(h),this.app.data.deviceList.splice(p,1,h),this.app.data.deviceList.sort((function(t,e){return t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0}))),"Connected"in l)for(var d=0,m=0,f=Object.values(l.Connected);me.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0}))}d++}p++}}catch(b){c.e(b)}finally{c.f()}}}}}catch(b){s.e(b)}finally{s.f()}}},{key:"connOpen",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.app.session.connect=!0,this.app.session.restartCnt=0,this.log({lvl:2,msg:"Connection with FHEM is opened.",meta:this.app.connection}),t.next=5,this.request({},"csrf");case 5:this.app.session.csrf=t.sent,this.log({lvl:2,msg:"Crsf-Token received.",meta:{token:this.app.session.csrf}}),this.loadStructure();case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"connClose",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e){var n,a,s=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.ready=!1,this.app.conn=null,this.app.session.restart||(n=0==this.app.session.restartCnt?1:3e3,this.app.session.restart=!0,setTimeout((function(){s.app.session.restart=!1,s.app.session.restartCnt++,s.connStart()}),n),a={info:"Connection ("+this.app.connection.type+") "+(e?"failed.":"was closed."),errCode:e||""},this.log({lvl:2,msg:"Connection with FHEM was closed. Try to Reconnect in "+n/1e3+" seconds...",meta:a}),this.loading=!1);case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"connStart",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(){var e,n,a=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],n=this.createURL(e),"websocket"===this.app.connection.type?(this.app.conn=new WebSocket(n.replace(/^http/i,"ws")),this.app.conn.onopen=function(){return a.connOpen()},this.app.conn.onmessage=function(t){return a.doUpdate(t)},this.app.conn.onclose=function(){return a.connClose()},this.app.conn.onerror=function(t){return a.connClose(t)}):(this.app.conn=new XMLHttpRequest,this.app.conn.open("GET",n,!0),this.app.conn.onreadystatechange=function(){200===a.app.conn.status&&2===a.app.conn.readyState&&a.connOpen(),200===a.app.conn.status&&3===a.app.conn.readyState&&a.doUpdate()},this.app.conn.onerror=function(t){return a.connClose(t)},this.app.conn.send());case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"setClock",value:function(){var t=new Date;this.app.appBar.clock=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat),this.app.appBar.header=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"clock"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat)),"date"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))}},{key:"init",value:function(){var t=(0,st.Z)(regeneratorRuntime.mark((function t(e,n){var a=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.log({lvl:2,msg:"Starting FHEMApp..."}),this.loading=!0,t.next=4,this.readConfig("./cfg/config.json");case 4:this.connStart(),e&&this.app.theme&&(-1!=this.app.theme.dark&&Object.assign(e.framework.theme,{dark:this.app.theme.dark}),this.app.theme.themes.light&&Object.assign(e.framework.theme.themes.light,this.app.theme.themes.light),this.app.theme.themes.dark&&Object.assign(e.framework.theme.themes.dark,this.app.theme.themes.dark)),n&&this.app.options.lang&&(n.locale=this.app.options.lang),this.setClock(),setInterval((function(){return a.setClock()}),this.app.options.clockInterval);case 9:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()}]),n}(ut()),dt={install:function(t,e,n){t.prototype.$fhem=new ht,t.prototype.$fhem.init(e,n)}};a.Z.use(dt,K,et),a.Z.use(Q()),a.Z.component("apex-chart",Q()),a.Z.config.productionTip=!1,new a.Z({vuetify:K,router:q,i18n:et,render:function(t){return t(H)}}).$mount("#app")},8973:function(t,e,n){var a={"./de.json":9929,"./en.json":790};function s(t){var e=r(t);return n(e)}function r(t){if(!n.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}s.keys=function(){return Object.keys(a)},s.resolve=r,t.exports=s,s.id=8973},2862:function(t,e,n){"use strict";t.exports=n.p+"img/FHEM_Logo.a2a7fc8d.png"},4147:function(t){"use strict";t.exports={i8:"3.33.0"}},9929:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"},"dates":{"from":"von","to":"bis"}},"templates":{"sysmon":{"updateBtn":["prüfe Updates...","system aktuell","update","update läuft.."],"restartBtn":"neustart","updateDialog":{"header":"FHEM Update","text":"Update wurde erfolgreich beendet. FHEM sollte neu gestartet werden.","restartBtn":"jetzt neustarten"}}}}')},790:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"},"dates":{"from":"From","to":"To"}},"templates":{"sysmon":{"updateBtn":["check updates...","up to date","update","update running..."],"restartBtn":"restart","updateDialog":{"header":"FHEM Update","text":"Update was successful finished. FHEM should be restarted now.","restartBtn":"restart now"}}}}')}},e={};function n(a){var s=e[a];if(void 0!==s)return s.exports;var r=e[a]={exports:{}};return t[a].call(r.exports,r,r.exports,n),r.exports}n.m=t,function(){var t=[];n.O=function(e,a,s,r){if(!a){var i=1/0;for(l=0;l=r)&&Object.keys(n.O).every((function(t){return n.O[t](a[p])}))?a.splice(p--,1):(o=!1,r0&&t[l-1][2]>r;l--)t[l]=t[l-1];t[l]=[a,s,r]}}(),function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})}}(),function(){n.f={},n.e=function(t){return Promise.all(Object.keys(n.f).reduce((function(e,a){return n.f[a](t,e),e}),[]))}}(),function(){n.u=function(t){return"js/"+t+"-legacy."+{44:"3af77626",121:"62a3b348",154:"c725f673",285:"39686d97",288:"6d3eb988",289:"70352cc3",322:"c29a322f",337:"ef87a395",387:"c8bf8023",396:"c0fe53a6",438:"e54dc5ad",475:"24b478c9",775:"1fbe1eec",869:"8b8fa91e",884:"c1922847",897:"dccd00c4",947:"43621317"}[t]+".js"}}(),function(){n.miniCssF=function(t){return"css/"+t+"."+{44:"7086d1d2",154:"8ecd64f4",285:"b6c37c1b",288:"a57bcf5c",289:"8ecd64f4",337:"b2abc4be",387:"5322d21c",396:"8ecd64f4",438:"85e1c6a8",475:"35328724",869:"5fde8d03",897:"b79779ed",947:"85e1c6a8"}[t]+".css"}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){var t={},e="fhemapp:";n.l=function(a,s,r,i){if(t[a])t[a].push(s);else{var o,p;if(void 0!==r)for(var c=document.getElementsByTagName("script"),l=0;l({alert:!1,type:"info",types:["","error","info","info","success","warning"],message:"",meta:"",msgList:[]}),watch:{msgList(){this.msgList&&this.msgList.length>0?(this.type=this.types[this.msgList[0].lvl],this.message=this.msgList[0].msg,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted(){this.$fhem.on("message",(t=>{let e={lvl:5,msg:"no valid message received",meta:""};Object.assign(e,t),this.msgList.unshift(e)}))},methods:{clearMessage(){this.msgList.length>0&&this.msgList.splice(0,1)}}},p=l,c=s(1001),h=s(3453),d=s.n(h),u=s(1234),m=s(3150),f=s(2102),g=s(6428),v=s(2877),b=(0,c.Z)(p,i,r,!1,null,null,null),y=b.exports;d()(b,{VAlert:u.Z,VBtn:m.Z,VCol:f.Z,VIcon:g.Z,VRow:v.Z});var O={components:{Broadcaster:y},data:()=>({appBar:{color:"",drawer:null,clock:null,header:null},app:{options:{loading:!1,reloadBtn:!1,expandGroups:!1,expandRooms:!1,mobileHeaderContent:!1},session:{connect:!1},data:{roomList:[],groupList:[]}},version:"v"+s(4147).i8,status:{color:"secondary",icon:"mdi-circle",text:"unbekannt",time:""}}),computed:{showRooms(){return this.app.data.roomList.length>0},showGroups(){return this.app.data.groupList.length>0}},watch:{"app.session.connect"(t){this.status.color=t?"success":"error",this.status.text=t?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.appBar=this.$fhem.app.appBar},methods:{reload(){location.reload(!0)},goTo(t){let e=t||"/";this.$router.currentRoute.path!=e&&this.$router.push(e)}}},w=O,C=s(7524),k=s(426),x=s(5206),_=s(5424),L=s(9846),R=s(1418),j=s(7047),T=s(6816),S=s(9443),Z=s(7620),E=s(1960),I=s(459),B=s(7877),V=s(5132),D=s(1058),F=s(624),P=s(9762),A=s(9330),N=(0,c.Z)(w,n,o,!1,null,"3b4d7587",null),H=N.exports;d()(N,{VApp:C.Z,VAppBar:k.Z,VAppBarNavIcon:x.Z,VBtn:m.Z,VChip:_.Z,VContainer:L.Z,VDivider:R.Z,VIcon:g.Z,VImg:j.Z,VList:T.Z,VListGroup:S.Z,VListItem:Z.Z,VListItemContent:E.km,VListItemIcon:I.Z,VListItemSubtitle:E.oZ,VListItemTitle:E.V9,VMain:B.Z,VNavigationDrawer:V.Z,VOverlay:D.Z,VProgressCircular:F.Z,VSpacer:P.Z,VTooltip:A.Z});var M=s(8345);a.Z.use(M.Z);const $=[{path:"/",name:"Home",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/system",name:"System",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/dashboard",name:"Dashboard",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/devices/:filter",name:"Devices",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/settings",name:"Settings",component:()=>s.e(884).then(s.bind(s,6884))},{path:"/syslog",name:"Syslog",component:()=>Promise.all([s.e(121),s.e(288),s.e(285),s.e(44)]).then(s.bind(s,4044))}],U=new M.Z({mode:"hash",base:"",routes:$});var q=U,z=s(9132),G=s(9146),J=s(1846);a.Z.use(z.Z);const X={lang:{locales:{de:G.Z},current:"de"},theme:{dark:!0,themes:{dark:{primary:J.Z.grey.darken4,secondary:J.Z.grey.darken3,success:J.Z.green.accent2,accent:J.Z.green.accent2},light:{primary:J.Z.grey,secondary:J.Z.grey.lighten3,success:J.Z.green.accent3,accent:J.Z.green.accent3}}}};var K=new z.Z(X),W=s(7166),Q=s.n(W),Y=s(7152);function tt(){const t=s(8973),e={};return t.keys().forEach((s=>{const a=s.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){const n=a[1];e[n]=t(s)}})),e}a.Z.use(Y.Z);var et=new Y.Z({locale:"de",fallbackLocale:"en",messages:tt()}),st=s(7187),at=s.n(st);class nt extends(at()){constructor(){super(),this.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem",type:"websocket"},conn:null,connOffset:0,session:{connect:!1,ready:!1,csrf:null,restart:!1,restartCnt:0,logList:[]},options:{lang:"de",debugMode:!1,debugLevel:5,loading:!1,loadCount:0,clockInterval:1e3,clockFormat:{hour:"2-digit",minute:"2-digit"},clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},theme:{dark:!0,themes:{}},appBar:{color:"primary",drawer:!1,clock:null,header:null,mobileHeader:null},templates:[],componentMap:[{name:"panel",component:"templ_panel"},{name:"chart",component:"templ_chart"},{name:"weather",component:"templ_weather"},{name:"sysmon",component:"templ_sysmon"},{name:"hmlan",component:"templ_hmlan"},{name:"sonos",component:"templ_sonos"},{name:"scenes",component:"templ_scenes"},{name:"cam",component:"templ_cam"},{name:"iframe",component:"templ_iframe"}],data:{roomList:[],groupList:[],deviceList:[],routeList:[],header:""},hasConnected:[]}}set loading(t){t&&this.app.options.loadCount++,!t&&this.app.options.loadCount>0&&this.app.options.loadCount--,this.app.options.loadCount>0&&!this.app.options.loading&&(this.app.options.loading=!0),0===this.app.options.loadCount&&(this.app.options.loading=!1)}log(t){let e=["","mdi-alert-outline","mdi-connection","mdi-send-circle-outline","mdi-sync","mdi-hexagon-multiple-outline"],s=["","error","info","success","success","warning"],a=(new Date).toLocaleTimeString(this.app.options.lang),n=(new Date).getMilliseconds(),o={time:a+":"+("000"+n).slice(-3),msg:t.msg||"",lvl:t.lvl||5,meta:t.meta||null,icon:e[t.lvl||5],color:s[t.lvl||5]};this.app.options.logRecord&&o.lvl<=this.app.options.debugLevel&&(this.app.session.logList.unshift(o),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer)),1==o.lvl&&(this.app.options.loadCount=0,this.app.options.loading=!1,this.emit("message",o))}getDate(t){let e=t?parseInt(t):0;return(t=>new Date(t.setDate(t.getDate()-e)).toISOString())(new Date).split("T")[0]}getDateTime(t){let e=t||(new Date).toISOString();return new Date(e.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}createURL(t){let e=this.app.connection,s=e.location?e.location:"",a=e.port?":"+e.port.replace(":",""):"",n=e.path?"/"+e.path.replace("/",""):"",o="";return"object"==typeof t&&t.length>0&&t.forEach((t=>{t.param&&t.value&&(o+=o?"&":"?",o+=t.param+"="+encodeURIComponent(t.value))})),s+a+n+o}getEl(t,...e){return e.reduce(((t,e)=>t&&t[e]),t)}async request(t,e,s){let a=[];"csrf"!=e&&a.push({param:"fwcsrf",value:this.app.session.csrf}),"json"!==e&&"csrf"!==e||a.push({param:"XHR",value:"1"}),"object"===typeof t&&(t.length>0?a.push(...t):a.push(t)),"string"===typeof t&&a.push({param:"cmd",value:t});let n=this.createURL(a);return this.log({lvl:3,msg:"Request: "+n}),await fetch(n).then((t=>{let a=null;return"csrf"===e&&(a=t.headers.get("x-fhem-csrftoken")),"json"===e&&(a=t.json()),a||(a=t.text()),"object"===typeof s?Object.assign(s,{data:a}):a})).catch((t=>this.log({lvl:1,msg:"Request failed "+n,meta:t.message})))}async getJsonFile(t){let e=new Headers;e.append("pragma","no-cache"),e.append("cache-control","no-cache");let s={method:"GET",headers:e},a=await fetch(t,s).then((t=>t.json())).catch((e=>this.log({lvl:1,msg:"Read Json-Data from "+t+" failed.",meta:e})));return a&&this.log({lvl:5,msg:"Json-Data parsed from "+t,meta:a}),await a}async readConfig(t){let e=await this.getJsonFile(t);if(e){for(const t of Object.keys(e))t in this.app&&Object.assign(this.app[t],e[t]);this.app.options.debugMode&&(this.app.appBar.color="pink darken-4")}else this.log({lvl:2,msg:"No Configuration File found. FHEMApp starting with default settings.",meta:this.app.options})}async createOptions(t){let e=null;if("appOptions"in t.Attributes){try{e=JSON.parse(t.Attributes.appOptions)}catch(s){this.log({lvl:1,msg:"Read `appOptions` from "+t.Name+" failed.",meta:s.message})}e&&(e.device=t.Name,e.name||(e.name=this.getEl(t,"Attributes","alias")||t.Name),e.sortby||this.app.options.ignoreFhemSortby||(e.sortby=this.getEl(t,"Attributes","sortby")||"zzz"),e.room||this.app.options.ignoreFhemRoom||(e.room=this.getEl(t,"Attributes","room")||""),e.group||this.app.options.ignoreFhemGroup||(e.group=this.getEl(t,"Attributes","group")||""),"hidden"===e.room&&(e.room=""),"hidden"===e.group&&(e.group=""),e.sortby||(e.sortby="zzz"),e.setup||(e.setup={}),e.show=!0,e.status={level:null,color:null,isActive:!0,error:null},e.info={left1Icon:null,left1IconColor:null,left1Text:null,left2Icon:null,left2IconColor:null,left2Text:null,mid1Icon:null,mid1IconColor:null,mid1Text:null,mid2Icon:null,mid2IconColor:null,mid2Text:null,right1Icon:null,right1IconColor:null,right1Text:null,right2Icon:null,right2IconColor:null,right2Text:null})}return await e}createRoutes(t,e){let s=this.app.data.routeList.map((t=>t.route)).indexOf(e);-1!=s?this.app.data.routeList[s].deviceList.push(t.device):this.app.data.routeList.push({route:e,deviceList:[t.device]})}createNaviItems(t,e,s){let a=t[s].split(",");for(const n of a){let a=s+"="+n;-1==e.map((t=>t.title)).indexOf(n)&&e.push({title:n,route:a}),this.createRoutes(t,a)}}async getTemplate(t){if(-1==this.app.componentMap.map((t=>t.name)).indexOf(t.template)&&-1==this.app.templates.map((t=>t.name)).indexOf(t.template))return await this.getJsonFile("./cfg/templ_"+t.template+".json")}async loadStructure(){let t=await this.request({param:"cmd",value:"jsonList2 appOptions!= appOptions room group"},"json");if(t&&t.Results.length>0){let e=[],s=[];this.app.data.routeList.splice(0);for(const a of t.Results){let t=await this.createOptions(a);if(t.template){let a=await this.getTemplate(t);a&&this.app.templates.push(a),t.room&&this.createNaviItems(t,e,"room"),t.group&&this.createNaviItems(t,s,"group"),t.home&&this.createRoutes(t,"/"),t.dashboard&&this.createRoutes(t,"/dashboard"),t.system&&this.createRoutes(t,"/system")}}e.sort(((t,e)=>t.title>e.title?1:e.title>t.title?-1:0)),s.sort(((t,e)=>t.title>e.title?1:e.title>t.title?-1:0)),this.app.data.roomList=Object.assign([],e),this.app.data.groupList=Object.assign([],s),this.app.session.ready=!0,this.loading=!1}}async createConnected(t){let e={},s=this.app.hasConnected.indexOf(t.Name);if(-1==s){if(this.app.hasConnected.push(t.Name),"connected"in t.Options){let s=Object.keys(t.Options.connected);for(const a of s){let s=await this.request({param:"cmd",value:"jsonlist2 "+t.Options.connected[a]},"json");if(s&&1==s.Results.length){"PossibleSets"in s.Results[0]&&delete s.Results[0].PossibleSets,"PossibleAttrs"in s.Results[0]&&delete s.Results[0].PossibleAttrs;let t=await this.createOptions(s.Results[0]);t&&(s.Results[0].Options=t),t&&s.Results[0].Options.connected&&(s.Results[0].Connected=await this.createConnected(s.Results[0])),s.Results[0].Options&&this.handleTemplate(s.Results[0]),e[a]=s.Results[0]}}}}else this.log({lvl:1,msg:"FHEM Device "+t.Name+" is defined as connected device, witch is called from himself. ",meta:t});return e}getSetup(t){let e=this.app.templates.map((t=>t.name)).indexOf(t);if(-1!=e){let t=this.app.templates[e],s={};return t.status&&Object.assign(s,{status:t.status}),t.main&&Object.assign(s,{main:t.main}),t.info&&Object.assign(s,{info:t.info}),t.show&&Object.assign(s,{show:t.show}),s.size=t.size||"col-12 col-sm-6 col-md-4 col-lg-4",s.expand=t.expand||!1,s.expanded=t.expanded||!1,s}this.log({lvl:1,msg:"Template Definition "+t+" not found."})}getComponent(t){let e={component:"templ_default"},s=this.app.componentMap.map((t=>t.name)).indexOf(t);if(-1!=s){let t=this.app.componentMap[s].component;t&&(e.component=t)}return e}async getDevices(t){let e=this.app.data.routeList.map((t=>t.route)).indexOf(t);if(this.app.data.deviceList.splice(0),this.app.hasConnected=[],-1!=e||t.match("device=")){let s=-1!=e?this.app.data.routeList[e].deviceList.join(","):t.replace("device=","").split("&")[0];if(s){this.loading=!0;let t=await this.request({param:"cmd",value:"jsonlist2 "+s},"json"),e=[],a=1;for(const s of t.Results){"PossibleSets"in s&&delete s.PossibleSets,"PossibleAttrs"in s&&delete s.PossibleAttrs;let n=await this.createOptions(s),o=this.getComponent(n.template);if(Object.assign(n,o),"templ_default"===n.component){let t=await this.getSetup(n.template);n.setup&&Object.assign(t,n.setup),n.setup=t}s.Options=n,s.Options.connected&&(s.Connected=await this.createConnected(s)),this.handleTemplate(s),e.push(s),a===t.Results.length&&(e.sort(((t,e)=>t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0)),this.app.data.deviceList=Object.assign([],e),this.loading=!1),a++}}}}async checkUpdate(){let t=await this.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]),e=0;if(t){let s=t.split("\n").splice(2);for(const t of s)t.match("UPD")&&!t.match("excluded")&&e++}return e>0}handleLogData(t){let e=t.split("\n");e.length>3&&e.splice(-3,3);let s=[],a=e.length>this.app.options.maxChartPoints?parseInt(e.length/this.app.options.maxChartPoints):1,n=a,o=0,i=1;for(const r of e){let t=r.split(" "),l=Date.parse(t[0].replace("_","T")),p=parseFloat(t[1]);o+=p,(i>=n||i===e.length)&&(i===e.length&&(a-=n-i),s.push({timestamp:l,value:o/a}),n+=a,o=0),i++}return this.log({lvl:5,msg:"handle Chartdata (Lines: "+e.length+")"}),s}async readLogData(t){let e=[];if(this.loading=!0,t.defs&&t.defs.length>0){let s=0;for(const a of t.defs){let n=/\(.*\)/.exec(a),o=n?a.replace(n[0],"_").split(":"):a.split(":"),i="get ";i+=o[0]?o[0]:t.deviceName,i+=t.from?" - - "+t.from:"",i+=t.to?" "+t.to:"",i+=n?" "+n[0].replace(/\(|\)/g,""):" 4:"+o[1];let r=await this.request([{param:"cmd",value:i},{param:"XHR",value:"1"}],"text",{id:s});r&&e.push({id:r.id,data:this.handleLogData(await r.data)}),s++}}return this.loading=!1,Object.assign(t,{data:e})}replaceVals(t,e){let s=/-?[0-9]/.exec(e),a=[];for(var n=2;n1?r+"Tage ":r>0?r+"Tag ":"";c+=l>0?l+"h ":"",c+=p>0?p+"min":"",o=t[n].replace("%a",c)}if(/%n/.test(t[n])&&s){/%n.[0-9]/.test(t[n])||(t[n]=t[n].replace("%n","%n.0"));let a=/%n../.exec(t[n]),i=a[0].replace("%n.","");o=t[n].replace(a[0],parseFloat(e.slice(s.index)).toFixed(i))}if(/%i/.test(t[n])&&s){let a=parseFloat(t[n].split("%i")[1]);if("isNaN"!=a){let i=a.toString().split(".")[1]||"",r=i.length,l=parseFloat(e.slice(s.index))+a;o=t[n].replace("%i"+a,l.toFixed(r))}}o=o.replace(/:/g,":"),a.push(o)}return a}handleVals(t,e){let s=[];if("string"===typeof e){let t=("::"+e).split(":");s=this.replaceVals(t,"")}if("object"===typeof t&&"object"===typeof e&&e.length>0)for(const a of e){let e=a.split(":");if(e.length>2){let a=/\./.test(e[0])?e[0].split("."):["Readings",e[0],"Value"],n=this.getEl(t,...a)||this.getEl(t,"Readings",e[0],"Value");if(n){let t=!1,a=parseFloat(e[1]);if(isNaN(a))RegExp(e[1]?e[1]:".").test(n)&&(t=!0);else{let e=/-?[0-9]/.exec(n);-1!=e.index&&parseFloat(n.slice(e.index))>=a&&(t=!0)}if(t){s=this.replaceVals(e,n);break}}}}return s}handleTemplate(t){let e=this.getEl(t,"Options","setup","show"),s=this.getEl(t,"Options","setup","status","bar"),a=this.getEl(t,"Options","setup","status","error"),n=this.getEl(t,"Options","setup","info");if(e){let s=this.handleVals(t,e);t.Options.show="false"!==s[0],s[1]&&(t.Options.setup.size=s[1]),s[2]&&(t.Options.sortby=s[2])}if(s){let e=this.getEl(t,"Options","setup","status","min")||0,a=this.getEl(t,"Options","setup","status","max")||100,n=this.handleVals(t,s),o=100/(a-e),i=(n[0]||"0"-e)*o;t.Options.status.level=n[2]?100-i:i,t.Options.status.color=n[1]||"success"}if(a){let e=this.handleVals(t,a);e.length>0?(t.Options.status.level=e[0]||"100",t.Options.status.color=e[1]||"error",t.Options.status.error=e[2]||"Fehler",t.Options.status.isActive=!1):t.Options.status.isActive=!0}if(n){let e=this.handleVals(t,n.left1),s=this.handleVals(t,n.left2),a=this.handleVals(t,n.mid1),o=this.handleVals(t,n.mid2),i=this.handleVals(t,n.right1),r=this.handleVals(t,n.right2);t.Options.info.left1IconColor=e[2]||"",t.Options.info.left1Icon=e[1]||"",t.Options.info.left1Text=e[0]||"",t.Options.info.left2IconColor=s[2]||"",t.Options.info.left2Icon=s[1]||"",t.Options.info.left2Text=s[0]||"",t.Options.info.mid1IconColor=a[2]||"",t.Options.info.mid1Icon=a[1]||"",t.Options.info.mid1Text=a[0]||"",t.Options.info.mid2IconColor=o[2]||"",t.Options.info.mid2Icon=o[1]||"",t.Options.info.mid2Text=o[0]||"",t.Options.info.right1IconColor=i[2]||"",t.Options.info.right1Icon=i[1]||"",t.Options.info.right1Text=i[0]||"",t.Options.info.right2IconColor=r[2]||"",t.Options.info.right2Icon=r[1]||"",t.Options.info.right2Text=r[0]||""}}handleData(t){let e=JSON.parse(t),s=null;if(!e[2].match("0){let t=this.handleData(s);if(t){let e=0;for(const s of this.app.data.deviceList){let a=this.app.data.deviceList[e],n=Object.assign({},a);if(s.Name===t.Name&&("Readings"===t.devicePart&&this.getEl(n,"Readings",t.param,t.paramPart)&&(n.Readings[t.param][t.paramPart]=t.value),"Attributes"===t.devicePart&&this.getEl(n,"Attributes",t.param)&&(n.Attributes[t.param]=t.value),this.handleTemplate(n),this.app.data.deviceList.splice(e,1,n),this.app.data.deviceList.sort(((t,e)=>t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0))),"Connected"in s){let a=0;for(const o of Object.values(s.Connected)){if(o.Name===t.Name){let o=Object.keys(s.Connected)[a];"Readings"===t.devicePart&&this.getEl(n.Connected[o],"Readings",t.param,t.paramPart)&&(n.Connected[o].Readings[t.param][t.paramPart]=t.value),"Attributes"===t.devicePart&&this.getEl(n.Connected[o],"Attributes",t.param)&&(n.Connected[o].Attributes[t.param]=t.value),this.handleTemplate(n),this.app.data.deviceList.splice(e,1,n),this.app.data.deviceList.sort(((t,e)=>t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0))}a++}}e++}}}}async connOpen(){this.app.session.connect=!0,this.app.session.restartCnt=0,this.log({lvl:2,msg:"Connection with FHEM is opened.",meta:this.app.connection}),this.app.session.csrf=await this.request({},"csrf"),this.log({lvl:2,msg:"Crsf-Token received.",meta:{token:this.app.session.csrf}}),this.loadStructure()}async connClose(t){if(this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.ready=!1,this.app.conn=null,!this.app.session.restart){let e=0==this.app.session.restartCnt?1:3e3;this.app.session.restart=!0,setTimeout((()=>{this.app.session.restart=!1,this.app.session.restartCnt++,this.connStart()}),e);let s={info:"Connection ("+this.app.connection.type+") "+(t?"failed.":"was closed."),errCode:t||""};this.log({lvl:2,msg:"Connection with FHEM was closed. Try to Reconnect in "+e/1e3+" seconds...",meta:s}),this.loading=!1}}async connStart(){let t=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],e=this.createURL(t);"websocket"===this.app.connection.type?(this.app.conn=new WebSocket(e.replace(/^http/i,"ws")),this.app.conn.onopen=()=>this.connOpen(),this.app.conn.onmessage=t=>this.doUpdate(t),this.app.conn.onclose=()=>this.connClose(),this.app.conn.onerror=t=>this.connClose(t)):(this.app.conn=new XMLHttpRequest,this.app.conn.open("GET",e,!0),this.app.conn.onreadystatechange=()=>{200===this.app.conn.status&&2===this.app.conn.readyState&&this.connOpen(),200===this.app.conn.status&&3===this.app.conn.readyState&&this.doUpdate()},this.app.conn.onerror=t=>this.connClose(t),this.app.conn.send())}setClock(){let t=new Date;this.app.appBar.clock=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat),this.app.appBar.header=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"clock"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat)),"date"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))}async init(t,e){this.log({lvl:2,msg:"Starting FHEMApp..."}),this.loading=!0,await this.readConfig("./cfg/config.json"),this.connStart(),t&&this.app.theme&&(-1!=this.app.theme.dark&&Object.assign(t.framework.theme,{dark:this.app.theme.dark}),this.app.theme.themes.light&&Object.assign(t.framework.theme.themes.light,this.app.theme.themes.light),this.app.theme.themes.dark&&Object.assign(t.framework.theme.themes.dark,this.app.theme.themes.dark)),e&&this.app.options.lang&&(e.locale=this.app.options.lang),this.setClock(),setInterval((()=>this.setClock()),this.app.options.clockInterval)}}var ot={install(t,e,s){t.prototype.$fhem=new nt,t.prototype.$fhem.init(e,s)}};a.Z.use(ot,K,et),a.Z.use(Q()),a.Z.component("apex-chart",Q()),a.Z.config.productionTip=!1,new a.Z({vuetify:K,router:q,i18n:et,render:t=>t(H)}).$mount("#app")},8973:function(t,e,s){var a={"./de.json":9929,"./en.json":790};function n(t){var e=o(t);return s(e)}function o(t){if(!s.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}n.keys=function(){return Object.keys(a)},n.resolve=o,t.exports=n,n.id=8973},2862:function(t,e,s){"use strict";t.exports=s.p+"img/FHEM_Logo.a2a7fc8d.png"},4147:function(t){"use strict";t.exports={i8:"3.32.0"}},9929:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"},"dates":{"from":"von","to":"bis"}},"templates":{"sysmon":{"updateBtn":["prüfe Updates...","system aktuell","update","update läuft.."],"restartBtn":"neustart","updateDialog":{"header":"FHEM Update","text":"Update wurde erfolgreich beendet. FHEM sollte neu gestartet werden.","restartBtn":"jetzt neustarten"}}}}')},790:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"},"dates":{"from":"From","to":"To"}},"templates":{"sysmon":{"updateBtn":["check updates...","up to date","update","update running..."],"restartBtn":"restart","updateDialog":{"header":"FHEM Update","text":"Update was successful finished. FHEM should be restarted now.","restartBtn":"restart now"}}}}')}},e={};function s(a){var n=e[a];if(void 0!==n)return n.exports;var o=e[a]={exports:{}};return t[a].call(o.exports,o,o.exports,s),o.exports}s.m=t,function(){var t=[];s.O=function(e,a,n,o){if(!a){var i=1/0;for(c=0;c=o)&&Object.keys(s.O).every((function(t){return s.O[t](a[l])}))?a.splice(l--,1):(r=!1,o0&&t[c-1][2]>o;c--)t[c]=t[c-1];t[c]=[a,n,o]}}(),function(){s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,{a:e}),e}}(),function(){s.d=function(t,e){for(var a in e)s.o(e,a)&&!s.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})}}(),function(){s.f={},s.e=function(t){return Promise.all(Object.keys(s.f).reduce((function(e,a){return s.f[a](t,e),e}),[]))}}(),function(){s.u=function(t){return"js/"+t+"."+{44:"1ae09cf8",121:"006dace8",154:"cb009208",285:"6fc47f33",288:"6d3eb988",322:"a37a620a",337:"3c817406",387:"06272897",396:"02bb2eaa",438:"27924680",475:"e1a25454",658:"4364c54d",775:"a58a8438",869:"df959138",884:"472374d2",947:"371294c0",997:"e21ab267"}[t]+".js"}}(),function(){s.miniCssF=function(t){return"css/"+t+"."+{44:"7086d1d2",154:"8ecd64f4",285:"b6c37c1b",288:"a57bcf5c",337:"b2abc4be",387:"5322d21c",396:"8ecd64f4",438:"85e1c6a8",475:"35328724",658:"b79779ed",869:"5fde8d03",947:"85e1c6a8",997:"8ecd64f4"}[t]+".css"}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){var t={},e="fhemapp:";s.l=function(a,n,o,i){if(t[a])t[a].push(n);else{var r,l;if(void 0!==o)for(var p=document.getElementsByTagName("script"),c=0;c({alert:!1,type:"info",types:["","error","info","info","success","warning"],message:"",meta:"",msgList:[]}),watch:{msgList(){this.msgList&&this.msgList.length>0?(this.type=this.types[this.msgList[0].lvl],this.message=this.msgList[0].msg,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted(){this.$fhem.on("message",(t=>{let e={lvl:5,msg:"no valid message received",meta:""};Object.assign(e,t),this.msgList.unshift(e)}))},methods:{clearMessage(){this.msgList.length>0&&this.msgList.splice(0,1)}}},p=l,c=s(1001),h=s(3453),d=s.n(h),u=s(1234),m=s(3150),f=s(2102),g=s(6428),v=s(2877),b=(0,c.Z)(p,i,r,!1,null,null,null),y=b.exports;d()(b,{VAlert:u.Z,VBtn:m.Z,VCol:f.Z,VIcon:g.Z,VRow:v.Z});var O={components:{Broadcaster:y},data:()=>({appBar:{color:"",drawer:null,clock:null,header:null},app:{options:{loading:!1,reloadBtn:!1,expandGroups:!1,expandRooms:!1,mobileHeaderContent:!1},session:{connect:!1},data:{roomList:[],groupList:[]}},version:"v"+s(4147).i8,status:{color:"secondary",icon:"mdi-circle",text:"unbekannt",time:""}}),computed:{showRooms(){return this.app.data.roomList.length>0},showGroups(){return this.app.data.groupList.length>0}},watch:{"app.session.connect"(t){this.status.color=t?"success":"error",this.status.text=t?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted(){this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.appBar=this.$fhem.app.appBar},methods:{reload(){location.reload(!0)},goTo(t){let e=t||"/";this.$router.currentRoute.path!=e&&this.$router.push(e)}}},w=O,C=s(7524),k=s(426),x=s(5206),_=s(5424),L=s(9846),R=s(1418),j=s(7047),T=s(6816),S=s(9443),Z=s(7620),E=s(1960),I=s(459),B=s(7877),V=s(5132),D=s(1058),F=s(624),P=s(9762),A=s(9330),N=(0,c.Z)(w,n,o,!1,null,"3b4d7587",null),H=N.exports;d()(N,{VApp:C.Z,VAppBar:k.Z,VAppBarNavIcon:x.Z,VBtn:m.Z,VChip:_.Z,VContainer:L.Z,VDivider:R.Z,VIcon:g.Z,VImg:j.Z,VList:T.Z,VListGroup:S.Z,VListItem:Z.Z,VListItemContent:E.km,VListItemIcon:I.Z,VListItemSubtitle:E.oZ,VListItemTitle:E.V9,VMain:B.Z,VNavigationDrawer:V.Z,VOverlay:D.Z,VProgressCircular:F.Z,VSpacer:P.Z,VTooltip:A.Z});var M=s(8345);a.Z.use(M.Z);const $=[{path:"/",name:"Home",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/system",name:"System",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/dashboard",name:"Dashboard",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/devices/:filter",name:"Devices",component:()=>s.e(775).then(s.bind(s,3775))},{path:"/settings",name:"Settings",component:()=>s.e(884).then(s.bind(s,6884))},{path:"/syslog",name:"Syslog",component:()=>Promise.all([s.e(121),s.e(288),s.e(285),s.e(44)]).then(s.bind(s,4044))}],U=new M.Z({mode:"hash",base:"",routes:$});var q=U,z=s(9132),G=s(9146),J=s(1846);a.Z.use(z.Z);const X={lang:{locales:{de:G.Z},current:"de"},theme:{dark:!0,themes:{dark:{primary:J.Z.grey.darken4,secondary:J.Z.grey.darken3,success:J.Z.green.accent2,accent:J.Z.green.accent2},light:{primary:J.Z.grey,secondary:J.Z.grey.lighten3,success:J.Z.green.accent3,accent:J.Z.green.accent3}}}};var K=new z.Z(X),W=s(7166),Q=s.n(W),Y=s(7152);function tt(){const t=s(8973),e={};return t.keys().forEach((s=>{const a=s.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){const n=a[1];e[n]=t(s)}})),e}a.Z.use(Y.Z);var et=new Y.Z({locale:"de",fallbackLocale:"en",messages:tt()}),st=s(7187),at=s.n(st);class nt extends(at()){constructor(){super(),this.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem",type:"websocket"},conn:null,connOffset:0,session:{connect:!1,ready:!1,csrf:null,restart:!1,restartCnt:0,logList:[]},options:{lang:"de",debugMode:!1,debugLevel:5,loading:!1,loadCount:0,clockInterval:1e3,clockFormat:{hour:"2-digit",minute:"2-digit"},clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},theme:{dark:!0,themes:{}},appBar:{color:"primary",drawer:!1,clock:null,header:null,mobileHeader:null},templates:[],componentMap:[{name:"panel",component:"templ_panel"},{name:"chart",component:"templ_chart"},{name:"weather",component:"templ_weather"},{name:"sysmon",component:"templ_sysmon"},{name:"hmlan",component:"templ_hmlan"},{name:"sonos",component:"templ_sonos"},{name:"scenes",component:"templ_scenes"},{name:"cam",component:"templ_cam"},{name:"iframe",component:"templ_iframe"}],data:{roomList:[],groupList:[],deviceList:[],routeList:[],header:""},hasConnected:[]}}set loading(t){t&&this.app.options.loadCount++,!t&&this.app.options.loadCount>0&&this.app.options.loadCount--,this.app.options.loadCount>0&&!this.app.options.loading&&(this.app.options.loading=!0),0===this.app.options.loadCount&&(this.app.options.loading=!1)}log(t){let e=["","mdi-alert-outline","mdi-connection","mdi-send-circle-outline","mdi-sync","mdi-hexagon-multiple-outline"],s=["","error","info","success","success","warning"],a=(new Date).toLocaleTimeString(this.app.options.lang),n=(new Date).getMilliseconds(),o={time:a+":"+("000"+n).slice(-3),msg:t.msg||"",lvl:t.lvl||5,meta:t.meta||null,icon:e[t.lvl||5],color:s[t.lvl||5]};this.app.options.logRecord&&o.lvl<=this.app.options.debugLevel&&(this.app.session.logList.unshift(o),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer)),1==o.lvl&&(this.app.options.loadCount=0,this.app.options.loading=!1,this.emit("message",o))}getDate(t){let e=t?parseInt(t):0;return(t=>new Date(t.setDate(t.getDate()-e)).toISOString())(new Date).split("T")[0]}getDateTime(t){let e=t||(new Date).toISOString();return new Date(e.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}createURL(t){let e=this.app.connection,s=e.location?e.location:"",a=e.port?":"+e.port.replace(":",""):"",n=e.path?"/"+e.path.replace("/",""):"",o="";return"object"==typeof t&&t.length>0&&t.forEach((t=>{t.param&&t.value&&(o+=o?"&":"?",o+=t.param+"="+encodeURIComponent(t.value))})),s+a+n+o}getEl(t,...e){return e.reduce(((t,e)=>t&&t[e]),t)}async request(t,e,s){let a=[];"csrf"!=e&&a.push({param:"fwcsrf",value:this.app.session.csrf}),"json"!==e&&"csrf"!==e||a.push({param:"XHR",value:"1"}),"object"===typeof t&&(t.length>0?a.push(...t):a.push(t)),"string"===typeof t&&a.push({param:"cmd",value:t});let n=this.createURL(a);return this.log({lvl:3,msg:"Request: "+n}),await fetch(n).then((t=>{let a=null;return"csrf"===e&&(a=t.headers.get("x-fhem-csrftoken")),"json"===e&&(a=t.json()),a||(a=t.text()),"object"===typeof s?Object.assign(s,{data:a}):a})).catch((t=>this.log({lvl:1,msg:"Request failed "+n,meta:t.message})))}async getJsonFile(t){let e=new Headers;e.append("pragma","no-cache"),e.append("cache-control","no-cache");let s={method:"GET",headers:e},a=await fetch(t,s).then((t=>t.json())).catch((e=>this.log({lvl:1,msg:"Read Json-Data from "+t+" failed.",meta:e})));return a&&this.log({lvl:5,msg:"Json-Data parsed from "+t,meta:a}),await a}async readConfig(t){let e=await this.getJsonFile(t);if(e){for(const t of Object.keys(e))t in this.app&&Object.assign(this.app[t],e[t]);this.app.options.debugMode&&(this.app.appBar.color="pink darken-4")}else this.log({lvl:2,msg:"No Configuration File found. FHEMApp starting with default settings.",meta:this.app.options})}async createOptions(t){let e=null;if("appOptions"in t.Attributes){try{e=JSON.parse(t.Attributes.appOptions)}catch(s){this.log({lvl:1,msg:"Read `appOptions` from "+t.Name+" failed.",meta:s.message})}e&&(e.device=t.Name,e.name||(e.name=this.getEl(t,"Attributes","alias")||t.Name),e.sortby||this.app.options.ignoreFhemSortby||(e.sortby=this.getEl(t,"Attributes","sortby")||"zzz"),e.room||this.app.options.ignoreFhemRoom||(e.room=this.getEl(t,"Attributes","room")||""),e.group||this.app.options.ignoreFhemGroup||(e.group=this.getEl(t,"Attributes","group")||""),"hidden"===e.room&&(e.room=""),"hidden"===e.group&&(e.group=""),e.sortby||(e.sortby="zzz"),e.setup||(e.setup={}),e.show=!0,e.status={level:null,color:null,isActive:!0,error:null},e.info={left1Icon:null,left1IconColor:null,left1Text:null,left2Icon:null,left2IconColor:null,left2Text:null,mid1Icon:null,mid1IconColor:null,mid1Text:null,mid2Icon:null,mid2IconColor:null,mid2Text:null,right1Icon:null,right1IconColor:null,right1Text:null,right2Icon:null,right2IconColor:null,right2Text:null})}return await e}createRoutes(t,e){let s=this.app.data.routeList.map((t=>t.route)).indexOf(e);-1!=s?this.app.data.routeList[s].deviceList.push(t.device):this.app.data.routeList.push({route:e,deviceList:[t.device]})}createNaviItems(t,e,s){let a=t[s].split(",");for(const n of a){let a=s+"="+n;-1==e.map((t=>t.title)).indexOf(n)&&e.push({title:n,route:a}),this.createRoutes(t,a)}}async getTemplate(t){if(-1==this.app.componentMap.map((t=>t.name)).indexOf(t.template)&&-1==this.app.templates.map((t=>t.name)).indexOf(t.template))return await this.getJsonFile("./cfg/templ_"+t.template+".json")}async loadStructure(){let t=await this.request({param:"cmd",value:"jsonList2 appOptions!= appOptions room group"},"json");if(t&&t.Results.length>0){let e=[],s=[];this.app.data.routeList.splice(0);for(const a of t.Results){let t=await this.createOptions(a);if(t.template){let a=await this.getTemplate(t);a&&this.app.templates.push(a),t.room&&this.createNaviItems(t,e,"room"),t.group&&this.createNaviItems(t,s,"group"),t.home&&this.createRoutes(t,"/"),t.dashboard&&this.createRoutes(t,"/dashboard"),t.system&&this.createRoutes(t,"/system")}}e.sort(((t,e)=>t.title>e.title?1:e.title>t.title?-1:0)),s.sort(((t,e)=>t.title>e.title?1:e.title>t.title?-1:0)),this.app.data.roomList=Object.assign([],e),this.app.data.groupList=Object.assign([],s),this.app.session.ready=!0,this.loading=!1}}async createConnected(t){let e={},s=this.app.hasConnected.indexOf(t.Name);if(-1==s){if(this.app.hasConnected.push(t.Name),"connected"in t.Options){let s=Object.keys(t.Options.connected);for(const a of s){let s=await this.request({param:"cmd",value:"jsonlist2 "+t.Options.connected[a]},"json");if(s&&1==s.Results.length){"PossibleSets"in s.Results[0]&&delete s.Results[0].PossibleSets,"PossibleAttrs"in s.Results[0]&&delete s.Results[0].PossibleAttrs;let t=await this.createOptions(s.Results[0]);t&&(s.Results[0].Options=t),t&&s.Results[0].Options.connected&&(s.Results[0].Connected=await this.createConnected(s.Results[0])),s.Results[0].Options&&this.handleTemplate(s.Results[0]),e[a]=s.Results[0]}}}}else this.log({lvl:1,msg:"FHEM Device "+t.Name+" is defined as connected device, witch is called from himself. ",meta:t});return e}getSetup(t){let e=this.app.templates.map((t=>t.name)).indexOf(t);if(-1!=e){let t=this.app.templates[e],s={};return t.status&&Object.assign(s,{status:t.status}),t.main&&Object.assign(s,{main:t.main}),t.info&&Object.assign(s,{info:t.info}),t.show&&Object.assign(s,{show:t.show}),s.size=t.size||"col-12 col-sm-6 col-md-4 col-lg-4",s.expand=t.expand||!1,s.expanded=t.expanded||!1,s}this.log({lvl:1,msg:"Template Definition "+t+" not found."})}getComponent(t){let e={component:"templ_default"},s=this.app.componentMap.map((t=>t.name)).indexOf(t);if(-1!=s){let t=this.app.componentMap[s].component;t&&(e.component=t)}return e}async getDevices(t){let e=this.app.data.routeList.map((t=>t.route)).indexOf(t);if(this.app.data.deviceList.splice(0),this.app.hasConnected=[],-1!=e||t.match("device=")){let s=-1!=e?this.app.data.routeList[e].deviceList.join(","):t.replace("device=","").split("&")[0];if(s){this.loading=!0;let t=await this.request({param:"cmd",value:"jsonlist2 "+s},"json"),e=[],a=1;for(const s of t.Results){"PossibleSets"in s&&delete s.PossibleSets,"PossibleAttrs"in s&&delete s.PossibleAttrs;let n=await this.createOptions(s),o=this.getComponent(n.template);if(Object.assign(n,o),"templ_default"===n.component){let t=await this.getSetup(n.template);n.setup&&Object.assign(t,n.setup),n.setup=t}s.Options=n,s.Options.connected&&(s.Connected=await this.createConnected(s)),this.handleTemplate(s),e.push(s),a===t.Results.length&&(e.sort(((t,e)=>t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0)),this.app.data.deviceList=Object.assign([],e),this.loading=!1),a++}}}}async checkUpdate(){let t=await this.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]),e=0;if(t){let s=t.split("\n").splice(2);for(const t of s)t.match("UPD")&&!t.match("excluded")&&e++}return e>0}handleLogData(t){let e=t.split("\n");e.length>3&&e.splice(-3,3);let s=[],a=e.length>this.app.options.maxChartPoints?parseInt(e.length/this.app.options.maxChartPoints):1,n=a,o=0,i=1;for(const r of e){let t=r.split(" "),l=Date.parse(t[0].replace("_","T")),p=parseFloat(t[1]);o+=p,(i>=n||i===e.length)&&(i===e.length&&(a-=n-i),s.push({timestamp:l,value:o/a}),n+=a,o=0),i++}return this.log({lvl:5,msg:"handle Chartdata (Lines: "+e.length+")"}),s}async readLogData(t){let e=[];if(this.loading=!0,t.defs&&t.defs.length>0){let s=0;for(const a of t.defs){let n=/\(.*\)/.exec(a),o=n?a.replace(n[0],"_").split(":"):a.split(":"),i="get ";i+=o[0]?o[0]:t.deviceName,i+=t.from?" - - "+t.from:"",i+=t.to?" "+t.to:"",i+=n?" "+n[0].replace(/\(|\)/g,""):" 4:"+o[1];let r=await this.request([{param:"cmd",value:i},{param:"XHR",value:"1"}],"text",{id:s});r&&e.push({id:r.id,data:this.handleLogData(await r.data)}),s++}}return this.loading=!1,Object.assign(t,{data:e})}replaceVals(t,e){let s=/-?[0-9]/.exec(e),a=[];for(var n=2;n1?r+"Tage ":r>0?r+"Tag ":"";c+=l>0?l+"h ":"",c+=p>0?p+"min":"",o=t[n].replace("%a",c)}if(/%n/.test(t[n])&&s){/%n.[0-9]/.test(t[n])||(t[n]=t[n].replace("%n","%n.0"));let a=/%n../.exec(t[n]),i=a[0].replace("%n.","");o=t[n].replace(a[0],parseFloat(e.slice(s.index)).toFixed(i))}if(/%i/.test(t[n])&&s){let a=parseFloat(t[n].split("%i")[1]);if("isNaN"!=a){let i=a.toString().split(".")[1]||"",r=i.length,l=parseFloat(e.slice(s.index))+a;o=t[n].replace("%i"+a,l.toFixed(r))}}o=o.replace(/:/g,":"),a.push(o)}return a}handleVals(t,e){let s=[];if("string"===typeof e){let t=("::"+e).split(":");s=this.replaceVals(t,"")}if("object"===typeof t&&"object"===typeof e&&e.length>0)for(const a of e){let e=a.split(":");if(e.length>2){let a=/\./.test(e[0])?e[0].split("."):["Readings",e[0],"Value"],n=this.getEl(t,...a)||this.getEl(t,"Readings",e[0],"Value");if(n){let t=!1,a=parseFloat(e[1]);if(isNaN(a))RegExp(e[1]?e[1]:".").test(n)&&(t=!0);else{let e=/-?[0-9]/.exec(n);-1!=e.index&&parseFloat(n.slice(e.index))>=a&&(t=!0)}if(t){s=this.replaceVals(e,n);break}}}}return s}handleTemplate(t){let e=this.getEl(t,"Options","setup","show"),s=this.getEl(t,"Options","setup","status","bar"),a=this.getEl(t,"Options","setup","status","error"),n=this.getEl(t,"Options","setup","info");if(e){let s=this.handleVals(t,e);t.Options.show="false"!==s[0],s[1]&&(t.Options.setup.size=s[1]),s[2]&&(t.Options.sortby=s[2])}if(s){let e=this.getEl(t,"Options","setup","status","min")||0,a=this.getEl(t,"Options","setup","status","max")||100,n=this.handleVals(t,s),o=100/(a-e),i=(n[0]||"0"-e)*o;t.Options.status.level=n[2]?100-i:i,t.Options.status.color=n[1]||"success"}if(a){let e=this.handleVals(t,a);e.length>0?(t.Options.status.level=e[0]||"100",t.Options.status.color=e[1]||"error",t.Options.status.error=e[2]||"Fehler",t.Options.status.isActive=!1):t.Options.status.isActive=!0}if(n){let e=this.handleVals(t,n.left1),s=this.handleVals(t,n.left2),a=this.handleVals(t,n.mid1),o=this.handleVals(t,n.mid2),i=this.handleVals(t,n.right1),r=this.handleVals(t,n.right2);t.Options.info.left1IconColor=e[2]||"",t.Options.info.left1Icon=e[1]||"",t.Options.info.left1Text=e[0]||"",t.Options.info.left2IconColor=s[2]||"",t.Options.info.left2Icon=s[1]||"",t.Options.info.left2Text=s[0]||"",t.Options.info.mid1IconColor=a[2]||"",t.Options.info.mid1Icon=a[1]||"",t.Options.info.mid1Text=a[0]||"",t.Options.info.mid2IconColor=o[2]||"",t.Options.info.mid2Icon=o[1]||"",t.Options.info.mid2Text=o[0]||"",t.Options.info.right1IconColor=i[2]||"",t.Options.info.right1Icon=i[1]||"",t.Options.info.right1Text=i[0]||"",t.Options.info.right2IconColor=r[2]||"",t.Options.info.right2Icon=r[1]||"",t.Options.info.right2Text=r[0]||""}}handleData(t){let e=JSON.parse(t),s=null;if(!e[2].match("0){let t=this.handleData(s);if(t){let e=0;for(const s of this.app.data.deviceList){let a=this.app.data.deviceList[e],n=Object.assign({},a);if(s.Name===t.Name&&("Readings"===t.devicePart&&this.getEl(n,"Readings",t.param,t.paramPart)&&(n.Readings[t.param][t.paramPart]=t.value),"Attributes"===t.devicePart&&this.getEl(n,"Attributes",t.param)&&(n.Attributes[t.param]=t.value),this.handleTemplate(n),this.app.data.deviceList.splice(e,1,n),this.app.data.deviceList.sort(((t,e)=>t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0))),"Connected"in s){let a=0;for(const o of Object.values(s.Connected)){if(o.Name===t.Name){let o=Object.keys(s.Connected)[a];"Readings"===t.devicePart&&this.getEl(n.Connected[o],"Readings",t.param,t.paramPart)&&(n.Connected[o].Readings[t.param][t.paramPart]=t.value),"Attributes"===t.devicePart&&this.getEl(n.Connected[o],"Attributes",t.param)&&(n.Connected[o].Attributes[t.param]=t.value),this.handleTemplate(n),this.app.data.deviceList.splice(e,1,n),this.app.data.deviceList.sort(((t,e)=>t.Options.sortby>e.Options.sortby?1:e.Options.sortby>t.Options.sortby?-1:0))}a++}}e++}}}}async connOpen(){this.app.session.connect=!0,this.app.session.restartCnt=0,this.log({lvl:2,msg:"Connection with FHEM is opened.",meta:this.app.connection}),this.app.session.csrf=await this.request({},"csrf"),this.log({lvl:2,msg:"Crsf-Token received.",meta:{token:this.app.session.csrf}}),this.loadStructure()}async connClose(t){if(this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.ready=!1,this.app.conn=null,!this.app.session.restart){let e=0==this.app.session.restartCnt?1:3e3;this.app.session.restart=!0,setTimeout((()=>{this.app.session.restart=!1,this.app.session.restartCnt++,this.connStart()}),e);let s={info:"Connection ("+this.app.connection.type+") "+(t?"failed.":"was closed."),errCode:t||""};this.log({lvl:2,msg:"Connection with FHEM was closed. Try to Reconnect in "+e/1e3+" seconds...",meta:s}),this.loading=!1}}async connStart(){let t=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],e=this.createURL(t);"websocket"===this.app.connection.type?(this.app.conn=new WebSocket(e.replace(/^http/i,"ws")),this.app.conn.onopen=()=>this.connOpen(),this.app.conn.onmessage=t=>this.doUpdate(t),this.app.conn.onclose=()=>this.connClose(),this.app.conn.onerror=t=>this.connClose(t)):(this.app.conn=new XMLHttpRequest,this.app.conn.open("GET",e,!0),this.app.conn.onreadystatechange=()=>{200===this.app.conn.status&&2===this.app.conn.readyState&&this.connOpen(),200===this.app.conn.status&&3===this.app.conn.readyState&&this.doUpdate()},this.app.conn.onerror=t=>this.connClose(t),this.app.conn.send())}setClock(){let t=new Date;this.app.appBar.clock=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat),this.app.appBar.header=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),"clock"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,this.app.options.clockFormat)),"date"===this.app.options.mobileHeaderContent&&(this.app.appBar.mobileHeader=t.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))}async init(t,e){this.log({lvl:2,msg:"Starting FHEMApp..."}),this.loading=!0,await this.readConfig("./cfg/config.json"),this.connStart(),t&&this.app.theme&&(-1!=this.app.theme.dark&&Object.assign(t.framework.theme,{dark:this.app.theme.dark}),this.app.theme.themes.light&&Object.assign(t.framework.theme.themes.light,this.app.theme.themes.light),this.app.theme.themes.dark&&Object.assign(t.framework.theme.themes.dark,this.app.theme.themes.dark)),e&&this.app.options.lang&&(e.locale=this.app.options.lang),this.setClock(),setInterval((()=>this.setClock()),this.app.options.clockInterval)}}var ot={install(t,e,s){t.prototype.$fhem=new nt,t.prototype.$fhem.init(e,s)}};a.Z.use(ot,K,et),a.Z.use(Q()),a.Z.component("apex-chart",Q()),a.Z.config.productionTip=!1,new a.Z({vuetify:K,router:q,i18n:et,render:t=>t(H)}).$mount("#app")},8973:function(t,e,s){var a={"./de.json":9929,"./en.json":790};function n(t){var e=o(t);return s(e)}function o(t){if(!s.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}n.keys=function(){return Object.keys(a)},n.resolve=o,t.exports=n,n.id=8973},2862:function(t,e,s){"use strict";t.exports=s.p+"img/FHEM_Logo.a2a7fc8d.png"},4147:function(t){"use strict";t.exports={i8:"3.33.0"}},9929:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"},"dates":{"from":"von","to":"bis"}},"templates":{"sysmon":{"updateBtn":["prüfe Updates...","system aktuell","update","update läuft.."],"restartBtn":"neustart","updateDialog":{"header":"FHEM Update","text":"Update wurde erfolgreich beendet. FHEM sollte neu gestartet werden.","restartBtn":"jetzt neustarten"}}}}')},790:function(t){"use strict";t.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"},"dates":{"from":"From","to":"To"}},"templates":{"sysmon":{"updateBtn":["check updates...","up to date","update","update running..."],"restartBtn":"restart","updateDialog":{"header":"FHEM Update","text":"Update was successful finished. FHEM should be restarted now.","restartBtn":"restart now"}}}}')}},e={};function s(a){var n=e[a];if(void 0!==n)return n.exports;var o=e[a]={exports:{}};return t[a].call(o.exports,o,o.exports,s),o.exports}s.m=t,function(){var t=[];s.O=function(e,a,n,o){if(!a){var i=1/0;for(c=0;c=o)&&Object.keys(s.O).every((function(t){return s.O[t](a[l])}))?a.splice(l--,1):(r=!1,o0&&t[c-1][2]>o;c--)t[c]=t[c-1];t[c]=[a,n,o]}}(),function(){s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,{a:e}),e}}(),function(){s.d=function(t,e){for(var a in e)s.o(e,a)&&!s.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})}}(),function(){s.f={},s.e=function(t){return Promise.all(Object.keys(s.f).reduce((function(e,a){return s.f[a](t,e),e}),[]))}}(),function(){s.u=function(t){return"js/"+t+"."+{44:"1ae09cf8",121:"006dace8",154:"cb009208",285:"6fc47f33",288:"6d3eb988",289:"acdc7a20",322:"a37a620a",337:"3c817406",387:"06272897",396:"02bb2eaa",438:"27924680",475:"e1a25454",775:"85bdb8ac",869:"df959138",884:"472374d2",897:"1dda7a71",947:"371294c0"}[t]+".js"}}(),function(){s.miniCssF=function(t){return"css/"+t+"."+{44:"7086d1d2",154:"8ecd64f4",285:"b6c37c1b",288:"a57bcf5c",289:"8ecd64f4",337:"b2abc4be",387:"5322d21c",396:"8ecd64f4",438:"85e1c6a8",475:"35328724",869:"5fde8d03",897:"b79779ed",947:"85e1c6a8"}[t]+".css"}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){var t={},e="fhemapp:";s.l=function(a,n,o,i){if(t[a])t[a].push(n);else{var r,l;if(void 0!==o)for(var p=document.getElementsByTagName("script"),c=0;c