diff --git a/package.json b/package.json index eb9f2fa9..fa2b70b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fhemapp", - "version": "3.12.0", + "version": "3.12.1", "private": true, "author": "jemu75", "scripts": { diff --git a/src/components/TemplChart.vue b/src/components/TemplChart.vue index ab259dc0..7694eaa7 100644 --- a/src/components/TemplChart.vue +++ b/src/components/TemplChart.vue @@ -152,11 +152,7 @@ } }, xaxis: { - type: 'datetime', - labels: { - format: 'dd.MM.yy', - datetimeUTC: false - } + type: 'datetime' }, yaxis: [] }, @@ -227,8 +223,6 @@ loadChartData() { this.vals.fromPicker = false; this.vals.toPicker = false; - let priAxisDef = false; - let secAxisDef = false; if(this.item) { this.$fhem.loading = true; @@ -239,6 +233,8 @@ .then((res) => { if(res.defs.length > 0) { let idx = 0; + let priSeriesName = ''; + let secSeriesName = ''; this.chart.options.yaxis.splice(0); this.chart.series.splice(0); @@ -249,29 +245,30 @@ let values = []; let logData = res.data[res.data.map((e) => e.id).indexOf(idx)].data; - let secAxis = parts[4] === 'secondary' ? true : false; - if((!priAxisDef && !secAxis) || (!secAxisDef && secAxis)) { - if(!secAxis) priAxisDef = true; - if(secAxis) secAxisDef = true; - - let yOptions = { - seriesName: parts[2] || '', - opposite: secAxis, - labels: { - formatter: (val) => { - let result = '' - if(val) result = val.toFixed(1) + parts[3] - return result - } + for(const vals of logData) values.push([vals.timestamp, vals.value]); + this.chart.series.push({ name: parts[2], data: values }); + + let secAxis = parts[4] === 'secondary' ? true : false; + let show = false; + + if(!priSeriesName && !secAxis) { priSeriesName = parts[2]; show = true; } + if(!secSeriesName && secAxis) { secSeriesName = parts[2]; show = true; } + + let yOptions = { + seriesName: secAxis ? secSeriesName : priSeriesName, + show: show, + opposite: secAxis, + labels: { + formatter: (val) => { + let result = '' + if(val) result = val.toFixed(1) + parts[3] + return result } } - - this.chart.options.yaxis.push(yOptions); } - for(const vals of logData) values.push([vals.timestamp, vals.value]); - this.chart.series.push({ name: parts[2], data: values }); + this.chart.options.yaxis.push(yOptions); idx ++; } diff --git a/src/plugins/fhem.js b/src/plugins/fhem.js index ac83f171..3be6b57e 100644 --- a/src/plugins/fhem.js +++ b/src/plugins/fhem.js @@ -8,7 +8,7 @@ export default class Fhem extends EventEmitter { connection: { location: window.location.protocol + '//' + window.location.hostname, port: window.location.port, - path: 'fhem' + path: 'fhem' //root path }, socket: null, session: { @@ -51,7 +51,8 @@ export default class Fhem extends EventEmitter { set loading(val) { if(val) this.app.options.loadCount ++; if(!val && this.app.options.loadCount > 0) this.app.options.loadCount --; - this.app.options.loading = this.app.options.loadCount > 0 ? true : false; + if(this.app.options.loadCount > 0 && !this.app.options.loading) this.app.options.loading = true; + if(this.app.options.loadCount === 0) this.app.options.loading = false; } set log(data) { diff --git a/www/fhemapp/index.html b/www/fhemapp/index.html index f32b075c..947d5839 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/app.c1c3dcda.js b/www/fhemapp/js/app.c1c3dcda.js new file mode 100644 index 00000000..20961d21 --- /dev/null +++ b/www/fhemapp/js/app.c1c3dcda.js @@ -0,0 +1 @@ +(function(e){function t(t){for(var a,s,o=t[0],c=t[1],p=t[2],u=0,l=[];u0?(this.type=this.msgList[0].type,this.message=this.msgList[0].message,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted:function(){var e=this;this.$fhem.on("message",(function(t){var n={type:"warning",message:"no valid message received",meta:""};Object.assign(n,t),e.msgList.unshift(n)}))},methods:{clearMessage:function(){this.msgList.length>0&&this.msgList.splice(0,1)}}}),u=p,l=n("2877"),d=n("6544"),h=n.n(d),f=n("0798"),m=n("8336"),v=n("62ad"),g=n("132d"),b=n("0fd9"),y=Object(l["a"])(u,o,c,!1,null,null,null),k=y.exports;h()(y,{VAlert:f["a"],VBtn:m["a"],VCol:v["a"],VIcon:g["a"],VRow:b["a"]});var O={components:{Broadcaster:k},data:function(){return{drawer:null,appBarColor:"primary",app:{options:{loading:!1,reloadBtn:!1,clock:null,date:null},session:{connect:!1},data:{roomList:[],groupList:[],header:""}},version:"v"+n("9224").version,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(e){this.status.color=e?"success":"error",this.status.text=e?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted:function(){var e=this;this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.$fhem.on("connect",(function(){return e.loadRoutes()})),this.$fhem.init(),this.loadRoutes(),this.app.options.debugMode&&(this.appBarColor="pink darken-4")},methods:{loadRoutes:function(){this.app.session.connect&&(this.$fhem.getRoutes("room"),this.$fhem.getRoutes("group"))},reload:function(){location.reload(!0)},goTo:function(e){var t=e||"/";this.$router.currentRoute.path!=t&&this.$router.push(t)}}},w=O,j=n("7496"),L=n("40dc"),x=n("5bc1"),C=n("cc20"),R=n("a523"),_=n("ce7e"),S=n("adda"),P=n("8860"),E=n("56b0"),D=n("da13"),A=n("5d23"),F=n("34c3"),N=n("f6c4"),V=n("f774"),T=n("a797"),$=n("490a"),M=n("2fa4"),I=n("3a2f"),B=Object(l["a"])(w,r,i,!1,null,null,null),H=B.exports;h()(B,{VApp:j["a"],VAppBar:L["a"],VAppBarNavIcon:x["a"],VBtn:m["a"],VChip:C["a"],VContainer:R["a"],VDivider:_["a"],VIcon:g["a"],VImg:S["a"],VList:P["a"],VListGroup:E["a"],VListItem:D["a"],VListItemContent:A["a"],VListItemIcon:F["a"],VListItemSubtitle:A["b"],VListItemTitle:A["c"],VMain:N["a"],VNavigationDrawer:V["a"],VOverlay:T["a"],VProgressCircular:$["a"],VSpacer:M["a"],VTooltip:I["a"]});n("3ca3"),n("ddb0");var q=n("8c4f");s["a"].use(q["a"]);var J=[{path:"/",name:"Home",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/system",name:"System",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/dashboard",name:"Dashboard",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/devices/:filter",name:"Devices",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/edit-devices",name:"EditDevice",component:function(){return Promise.all([n.e("chunk-28a3f15f"),n.e("chunk-07709945"),n.e("chunk-72c6e8d8"),n.e("chunk-085bcd30")]).then(n.bind(null,"f87a"))}},{path:"/syslog",name:"Syslog",component:function(){return Promise.all([n.e("chunk-28a3f15f"),n.e("chunk-07709945"),n.e("chunk-72c6e8d8"),n.e("chunk-2c05d556")]).then(n.bind(null,"beee"))}}],U=new q["a"]({mode:"hash",base:"",routes:J}),z=U,G=n("f309"),X=n("0fe0"),W=n.n(X),K=n("fcf4");s["a"].use(G["a"]);var Z={lang:{locales:{de:W.a},current:"de"},theme:{dark:!0,themes:{dark:{primary:K["a"].grey.darken4,secondary:K["a"].grey.darken3,success:K["a"].green.accent2,accent:K["a"].green.accent2},light:{primary:K["a"].grey,secondary:K["a"].grey.lighten3,success:K["a"].green.accent3,accent:K["a"].green.accent3}}}},Q=new G["a"](Z),Y=n("b85c"),ee=n("1da1"),te=n("53ca"),ne=n("d4ec"),ae=n("bee2"),se=n("262e"),re=n("2caf"),ie=(n("96cf"),n("fb6a"),n("1276"),n("ac1f"),n("5319"),n("13d5"),n("159b"),n("466d"),n("d81d"),n("b680"),n("25f0"),n("99af"),n("4d63"),n("b64b"),n("b0c0"),n("07ac"),n("faa1")),oe=n.n(ie),ce=function(e){Object(se["a"])(n,e);var t=Object(re["a"])(n);function n(){var e;return Object(ne["a"])(this,n),e=t.call(this),e.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem"},socket:null,session:{connect:!1,csrf:null,restart:!1,restartCnt:0,logList:[],logLast:{}},options:{lang:"de",debugMode:!1,debugLevel:3,loading:!1,loadCount:0,clockInterval:5e3,clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},templates:[],componentMap:[],data:{roomList:[],groupList:[],deviceList:[],header:""}},e}return Object(ae["a"])(n,[{key:"loading",set:function(e){e&&this.app.options.loadCount++,!e&&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",set:function(e){var t={type:"info",timestamp:Date.now(),timeFlag:null,debugLevel:this.app.options.debugLevel,message:"",icon:"",color:""};Object.assign(t,e);var n=new Date(t.timestamp).toLocaleTimeString(this.app.options.lang),a=new Date(t.timestamp).getMilliseconds();t.timeFlag=n+":"+("000"+a).slice(-3),"error"===t.type&&(t.icon="mdi-alert-outline",t.color="error"),"status"===t.type&&(t.icon="mdi-connection",t.color="info"),"request"===t.type&&(t.icon="mdi-send-circle-outline",t.color="success"),"warning"===t.type&&(t.icon="mdi-help-circle-outline",t.color="warning"),"info"===t.type&&(t.icon="mdi-sync",t.color="success"),"intern"===t.type&&(t.icon="mdi-hexagon-multiple-outline",t.color="warning"),this.app.session.logLast=t,"error"===t.type&&this.emit("message",{type:t.type,message:t.message,meta:t.meta}),this.app.options.logRecord&&t.debugLevel<=this.app.options.debugLevel&&(this.app.session.logList.unshift(t),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer))}},{key:"getDate",value:function(e){var t=e?parseInt(e):0;return function(e){return new Date(e.setDate(e.getDate()+t)).toISOString()}(new Date).split("T")[0]}},{key:"getDateTime",value:function(e){var t=e||(new Date).toISOString();return new Date(t.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}},{key:"getEl",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&e.forEach((function(e){e.param&&e.value&&(r+=r?"&":"?",r+=e.param+"="+encodeURIComponent(e.value))})),n+a+s+r}},{key:"getCsrfToken",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){n.request({},"csrf").then((function(t){return e(t)})).catch((function(e){return t(e)}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"request",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(t,n,s){var r,i=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=new Promise((function(e,r){var o=[];"csrf"!=n&&o.push({param:"fwcsrf",value:i.app.session.csrf}),"json"!==n&&"csrf"!==n||o.push({param:"XHR",value:"1"}),"object"===Object(te["a"])(t)&&(t.length>0?o.push.apply(o,Object(a["a"])(t)):o.push(t)),"string"===typeof t&&o.push({param:"cmd",value:t});var c=i.createURL(o);i.log={type:"request",message:"Request: "+c,debugLevel:3},fetch(c).then((function(t){if(t.ok)if("csrf"===n){var a=t.headers.get("x-fhem-csrftoken");e("object"===Object(te["a"])(s)?Object.assign(s,{data:a}):a)}else"json"===n?t.json().then((function(t){e("object"===Object(te["a"])(s)?Object.assign(s,{data:t}):t)})):t.text().then((function(t){e("object"===Object(te["a"])(s)?Object.assign(s,{data:t}):t)}))})).catch((function(e){r({error:e,request:c})}))})),e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));function t(t,n,a){return e.apply(this,arguments)}return t}()},{key:"handleLogData",value:function(e){var t=e.split("\n");t.length>3&&t.splice(-3,3);var n,a=[],s=t.length>this.app.options.maxChartPoints?parseInt(t.length/this.app.options.maxChartPoints):1,r=s,i=0,o=1,c=Object(Y["a"])(t);try{for(c.s();!(n=c.n()).done;){var p=n.value,u=p.split(" "),l=Date.parse(u[0].replace("_","T")),d=parseFloat(u[1]);i+=d,(o>=r||o===t.length)&&(o===t.length&&(s-=r-o),a.push({timestamp:l,value:i/s}),r+=s,i=0),o++}}catch(h){c.e(h)}finally{c.f()}return this.log={type:"intern",message:"handle Chartdata (Lines: "+t.length+")",debugLevel:5},a}},{key:"readLogData",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(t){var n,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=new Promise((function(e,n){t.defs&&t.defs.length>0?function(){var s,r=[],i=0,o=Object(Y["a"])(t.defs);try{for(o.s();!(s=o.n()).done;){var c=s.value,p=/\(.*\)/.exec(c),u=p?c.replace(p[0],"_").split(":"):c.split(":"),l="get ";l+=u[0]?u[0]:t.deviceName,l+=t.from?" - - "+t.from:"",l+=t.to?" "+t.to:"",l+=p?" "+p[0].replace(/\(|\)/g,""):" 4:"+u[1],a.log={type:"intern",message:"Loading Chartdata - "+l,debugLevel:5},a.request([{param:"cmd",value:l},{param:"XHR",value:"1"}],"text",{id:i}).then((function(n){r.push({id:n.id,data:a.handleLogData(n.data)}),r.length===t.defs.length&&(Object.assign(t,{data:r}),e(t))})).catch((function(e){a.log={type:"error",message:"Fetch data from FHEM Logfile failed.",meta:e,debugLevel:1},n()})),i++}}catch(d){o.e(d)}finally{o.f()}}():(a.log={type:"error",message:"No Definitions for Chart found.",meta:t,debugLevel:1},n())})),e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"checkUpdate",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){n.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]).then((function(t){var n,a=t.split("\n").splice(2),s=0,r=1,i=Object(Y["a"])(a);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.match("UPD")&&!o.match("excluded")&&s++,r===a.length&&e(s>0),r++}}catch(c){i.e(c)}finally{i.f()}})).catch((function(e){n.log={type:"error",message:"FHEM check for Updates failed.",meta:e,debugLevel:1},t(e)}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getRoutes",value:function(e){var t=this;if(this.app.options.loading=!0,"room"===e||"group"===e){var n=e+"List",a=[];this.app.data[n].splice(0),this.request({param:"cmd",value:"jsonList2 appOptions!= appOptions room group"},"json").then(function(){var n=Object(ee["a"])(regeneratorRuntime.mark((function n(s){var r,i,o,c,p,u,l,d,h,f,m;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=1,i=Object(Y["a"])(s.Results),n.prev=2,i.s();case 4:if((o=i.n()).done){n.next=15;break}return c=o.value,n.next=8,t.createOptions(c);case 8:if(p=n.sent,u=p[e],u&&p.template){l=u.split(","),d=Object(Y["a"])(l);try{for(d.s();!(h=d.n()).done;)f=h.value,m="/devices/"+e+"="+f,-1==a.map((function(e){return e.title})).indexOf(f)&&a.push({title:f,route:m})}catch(v){d.e(v)}finally{d.f()}}r===s.Results.length&&(a.sort((function(e,t){return e.title>t.title?1:t.title>e.title?-1:0})),t.app.data[e+"List"]=Object.assign([],a),t.app.options.loading=!1),r++;case 13:n.next=4;break;case 15:n.next=20;break;case 17:n.prev=17,n.t0=n["catch"](2),i.e(n.t0);case 20:return n.prev=20,i.f(),n.finish(20);case 23:case"end":return n.stop()}}),n,null,[[2,17,20,23]])})));return function(e){return n.apply(this,arguments)}}()).catch((function(n){t.log={type:"error",message:"Loading "+e+"s from FHEM failed.",meta:n,debugLevel:1},t.app.options.loading=!1}))}else this.log={type:"error",message:"Creating Routes failed.",meta:e,debugLevel:1},this.app.options.loading=!1}},{key:"replaceVals",value:function(e,t){for(var n=/-?[0-9]/.exec(t),a=[],s=2;s0){var s,r=Object(Y["a"])(t);try{for(r.s();!(s=r.n()).done;){var i=s.value,o=i.split(":");if(o.length>2){var c=o[0].match(/\./)?o[0].split("."):["Readings",o[0],"Value"],p=this.getEl.apply(this,[e].concat(Object(a["a"])(c)));if(p){var u=!1;if(isNaN(parseFloat(o[1])))RegExp(o[1]?o[1]:".").test(p)&&(u=!0);else{var l=/-?[0-9]/.exec(p);-1!=l.index&&parseFloat(p.slice(l.index))>=parseFloat(o[1])&&(u=!0)}if(u){n=this.replaceVals(o,p);break}}}}}catch(d){r.e(d)}finally{r.f()}}return n}},{key:"handleStates",value:function(e,t,n){var s=this.getEl(e,"Options","states")||n;if(s){var r,i=Object(Y["a"])(s);try{for(i.s();!(r=i.n()).done;){var o=r.value,c=o.split(":");if(c[0]){var p=c[0].match(/\./)?c[0].split("."):["Readings",c[0],"Value"],u=this.getEl.apply(this,[e].concat(Object(a["a"])(p)));if(u){var l=!1;if(isNaN(parseFloat(c[1]))?RegExp(c[1]?c[1]:".").test(u)&&(l=!0):parseFloat(u)>=parseFloat(c[1])&&(l=!0),l){var d={};c[2]&&(d.mainState=c[0]===c[2]?u:c[2]),c[3]&&(d.mainLevel=c[0]===c[3]?u:c[3]),c[4]&&(d.mainColor=c[4]),c[5]&&(d.systemIcon=c[5]),Object.assign(t,d);break}}}else this.log={type:"error",message:"Wrong Definition for Device-States.",meta:e,debugLevel:1}}}catch(h){i.e(h)}finally{i.f()}}return t}},{key:"createConnected",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(t){var n,a,s,r,i,o=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n={},!("connected"in t.Options)){e.next=12;break}a=Object.keys(t.Options.connected),s=0,r=a;case 4:if(!(st.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0})),t.app.data.deviceList=Object.assign([],s),t.app.options.loading=!1),r++;case 29:n.next=5;break;case 31:n.next=36;break;case 33:n.prev=33,n.t0=n["catch"](3),i.e(n.t0);case 36:return n.prev=36,i.f(),n.finish(36);case 39:case"end":return n.stop()}}),n,null,[[3,33,36,39]])})));return function(e){return n.apply(this,arguments)}}()).catch((function(e){t.log={type:"error",message:"Request to FHEM failed.",meta:e,debugLevel:1},t.app.options.loading=!1}))}},{key:"handleData",value:function(e){var t=JSON.parse(e),n=null;if(!t[2].match("0){var n=t.handleData(e);n&&t.app.data.deviceList.forEach((function(e,a){var s=t.app.data.deviceList[a],r=Object.assign({},s);e.Name===n.Name&&("Readings"===n.devicePart&&t.getEl(r,"Readings",n.param,n.paramPart)&&(r.Readings[n.param][n.paramPart]=n.value),"Attributes"===n.devicePart&&t.getEl(r,"Attributes",n.param)&&(r.Attributes[n.param]=n.value),t.app.data.deviceList.splice(a,1,r)),"Connected"in e&&Object.values(e.Connected).forEach((function(s,i){if(s.Name===n.Name){var o=Object.keys(e.Connected)[i];"Readings"===n.devicePart&&t.getEl(r.Connected[o],"Readings",n.param,n.paramPart)&&(r.Connected[o].Readings[n.param][n.paramPart]=n.value),"Attributes"===n.devicePart&&t.getEl(r.Connected[o],"Attributes",n.param)&&(r.Connected[o].Attributes[n.param]=n.value),t.app.data.deviceList.splice(a,1,r)}}))}))}}))}},{key:"connClose",value:function(){var e=this;if(this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.socket=null,!this.app.session.restart){var t=0==this.app.session.restartCnt?1:3e3;this.log={type:"intern",message:"Restart-Sequence is started. (restart counter: "+this.app.session.restartCnt+" - restart on: "+t+" milliseconds)",debugLevel:5},this.app.session.restart=!0,setTimeout((function(){e.app.session.restart=!1,e.app.session.restartCnt++,e.init()}),t),this.log={type:"status",message:"Connection with FHEM was closed. Try to Reconnect in "+t/1e3+" seconds...",debugLevel:2}}}},{key:"connOpen",value:function(){var e=this;this.app.options.loading=!0,this.app.session.restartCnt=0,this.getCsrfToken().then((function(t){e.app.session.csrf=t,e.app.session.connect=!0,e.emit("connect"),e.log={type:"status",message:"Connection with FHEM is opened.",meta:e.session,debugLevel:2},e.app.options.loading=!1})).catch((function(t){e.app.session.csrf=null,e.app.session.connect=!1,e.log={type:"error",message:"Retrieve csrf-Token failed.",meta:t,debugLevel:1}})).finally((function(){return e.app.options.loading=!1}))}},{key:"setClock",value:function(){var e=new Date;this.app.options.clock=e.toLocaleString(this.app.options.lang,{hour:"2-digit",minute:"2-digit"}),this.app.options.date=e.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"})}},{key:"init",value:function(){var e=this,t=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],n=this.createURL(t).replace(/^http/i,"ws");this.app.socket=new WebSocket(n),this.app.socket.onopen=function(){return e.connOpen()},this.app.socket.onmessage=function(t){return e.doUpdate(t)},this.app.socket.onclose=function(){return e.connClose()},this.setClock(),setInterval((function(){return e.setClock()}),this.app.options.clockInterval)}}]),n}(oe.a),pe=n("1321"),ue=n.n(pe),le=n("a925");function de(){var e=n("49f8"),t={};return e.keys().forEach((function(n){var a=n.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){var s=a[1];t[s]=e(n)}})),t}s["a"].use(le["a"]);var he=new le["a"]({locale:"de",fallbackLocale:"en",messages:de()});s["a"].use(ue.a),s["a"].component("apexchart",ue.a),s["a"].config.productionTip=!1,s["a"].prototype.$fhem=new ce,fetch("./cfg/config.json").then((function(e){return e.json()})).catch((function(e){s["a"].prototype.$fhem.log={type:"error",message:"Loading config.json failed.",meta:e,debugLevel:1}})).then((function(e){var t;e&&(e.connection&&Object.assign(s["a"].prototype.$fhem.app.connection,e.connection),e.options&&Object.assign(s["a"].prototype.$fhem.app.options,e.options),e.custom&&e.custom.length>0&&(t=s["a"].prototype.$fhem.app.templates).push.apply(t,Object(a["a"])(e.custom)),e.theme&&(-1!=e.theme.dark&&Object.assign(Q.framework.theme,{dark:e.theme.dark}),e.theme.themes&&(e.theme.themes.light&&Object.assign(Q.framework.theme.themes.light,e.theme.themes.light),e.theme.themes.dark&&Object.assign(Q.framework.theme.themes.dark,e.theme.themes.dark))));he.locale=s["a"].prototype.$fhem.app.options.lang,s["a"].prototype.$fhem.log={type:"status",message:"Config: "+JSON.stringify(e),debugLevel:2},s["a"].prototype.$fhem.log={type:"status",message:"Connection: "+JSON.stringify(s["a"].prototype.$fhem.app.connection),debugLevel:2},new s["a"]({vuetify:Q,router:z,i18n:he,render:function(e){return e(H)}}).$mount("#app")}))},"6ce2":function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"}}}')},9224:function(e){e.exports=JSON.parse('{"name":"fhemapp","version":"3.12.1","private":true,"author":"jemu75","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build","lint":"vue-cli-service lint","i18n:report":"vue-cli-service i18n:report --src \\"./src/**/*.?(js|vue)\\" --locales \\"./src/locales/**/*.json\\""},"dependencies":{"apexcharts":"^3.26.0","core-js":"^3.9.1","typeface-roboto":"^1.1.13","vue":"^2.6.11","vue-apexcharts":"^1.6.0","vue-i18n":"^8.22.3","vue-json-pretty":"^1.7.1","vue-router":"^3.5.1","vuetify":"^2.4.8"},"devDependencies":{"@mdi/font":"^5.9.55","@vue/cli-plugin-babel":"^4.5.12","@vue/cli-plugin-eslint":"^4.5.12","@vue/cli-plugin-router":"^4.5.12","@vue/cli-service":"^4.5.12","babel-eslint":"^10.1.0","eslint":"^6.7.2","eslint-plugin-vue":"^6.2.2","sass":"^1.32.8","sass-loader":"^8.0.0","vue-cli-plugin-i18n":"~2.1.0","vue-cli-plugin-vuetify":"~2.0.9","vue-template-compiler":"^2.6.11","vuetify-loader":"^1.7.2"},"bugs":{"url":"https://github.com/jemu75/fhemApp/issues"},"homepage":"https://github.com/jemu75/fhemApp#readme","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jemu75/fhemApp.git"}}')},c274:function(e,t,n){e.exports=n.p+"img/FHEM_Logo.2d0f7a38.png"},edd4:function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"}}}')}}); \ No newline at end of file diff --git a/www/fhemapp/js/app.fd64212c.js b/www/fhemapp/js/app.fd64212c.js deleted file mode 100644 index 2b73bcc2..00000000 --- a/www/fhemapp/js/app.fd64212c.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){function t(t){for(var a,r,o=t[0],c=t[1],u=t[2],p=0,l=[];p0?(this.type=this.msgList[0].type,this.message=this.msgList[0].message,this.meta=this.msgList[0].meta,this.alert=!0):(this.alert=!1,this.type="info",this.message="",this.meta="")}},mounted:function(){var e=this;this.$fhem.on("message",(function(t){var n={type:"warning",message:"no valid message received",meta:""};Object.assign(n,t),e.msgList.unshift(n)}))},methods:{clearMessage:function(){this.msgList.length>0&&this.msgList.splice(0,1)}}}),p=u,l=n("2877"),d=n("6544"),h=n.n(d),f=n("0798"),m=n("8336"),v=n("62ad"),g=n("132d"),b=n("0fd9"),y=Object(l["a"])(p,o,c,!1,null,null,null),k=y.exports;h()(y,{VAlert:f["a"],VBtn:m["a"],VCol:v["a"],VIcon:g["a"],VRow:b["a"]});var O={components:{Broadcaster:k},data:function(){return{drawer:null,appBarColor:"primary",app:{options:{loading:!1,reloadBtn:!1,clock:null,date:null},session:{connect:!1},data:{roomList:[],groupList:[],header:""}},version:"v"+n("9224").version,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(e){this.status.color=e?"success":"error",this.status.text=e?"online":"offline",this.status.time=this.$fhem.getDateTime()}},mounted:function(){var e=this;this.app.session=this.$fhem.app.session,this.app.options=this.$fhem.app.options,this.app.data=this.$fhem.app.data,this.$fhem.on("connect",(function(){return e.loadRoutes()})),this.$fhem.init(),this.loadRoutes(),this.app.options.debugMode&&(this.appBarColor="pink darken-4")},methods:{loadRoutes:function(){this.app.session.connect&&(this.$fhem.getRoutes("room"),this.$fhem.getRoutes("group"))},reload:function(){location.reload(!0)},goTo:function(e){var t=e||"/";this.$router.currentRoute.path!=t&&this.$router.push(t)}}},w=O,j=n("7496"),L=n("40dc"),x=n("5bc1"),C=n("cc20"),R=n("a523"),_=n("ce7e"),S=n("adda"),P=n("8860"),E=n("56b0"),D=n("da13"),A=n("5d23"),F=n("34c3"),N=n("f6c4"),V=n("f774"),T=n("a797"),$=n("490a"),M=n("2fa4"),I=n("3a2f"),B=Object(l["a"])(w,s,i,!1,null,null,null),H=B.exports;h()(B,{VApp:j["a"],VAppBar:L["a"],VAppBarNavIcon:x["a"],VBtn:m["a"],VChip:C["a"],VContainer:R["a"],VDivider:_["a"],VIcon:g["a"],VImg:S["a"],VList:P["a"],VListGroup:E["a"],VListItem:D["a"],VListItemContent:A["a"],VListItemIcon:F["a"],VListItemSubtitle:A["b"],VListItemTitle:A["c"],VMain:N["a"],VNavigationDrawer:V["a"],VOverlay:T["a"],VProgressCircular:$["a"],VSpacer:M["a"],VTooltip:I["a"]});n("3ca3"),n("ddb0");var q=n("8c4f");r["a"].use(q["a"]);var J=[{path:"/",name:"Home",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/system",name:"System",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/dashboard",name:"Dashboard",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/devices/:filter",name:"Devices",component:function(){return n.e("chunk-2d212bf1").then(n.bind(null,"aa72"))}},{path:"/edit-devices",name:"EditDevice",component:function(){return Promise.all([n.e("chunk-28a3f15f"),n.e("chunk-07709945"),n.e("chunk-72c6e8d8"),n.e("chunk-085bcd30")]).then(n.bind(null,"f87a"))}},{path:"/syslog",name:"Syslog",component:function(){return Promise.all([n.e("chunk-28a3f15f"),n.e("chunk-07709945"),n.e("chunk-72c6e8d8"),n.e("chunk-2c05d556")]).then(n.bind(null,"beee"))}}],U=new q["a"]({mode:"hash",base:"",routes:J}),z=U,G=n("f309"),X=n("0fe0"),W=n.n(X),K=n("fcf4");r["a"].use(G["a"]);var Z={lang:{locales:{de:W.a},current:"de"},theme:{dark:!0,themes:{dark:{primary:K["a"].grey.darken4,secondary:K["a"].grey.darken3,success:K["a"].green.accent2,accent:K["a"].green.accent2},light:{primary:K["a"].grey,secondary:K["a"].grey.lighten3,success:K["a"].green.accent3,accent:K["a"].green.accent3}}}},Q=new G["a"](Z),Y=n("b85c"),ee=n("1da1"),te=n("53ca"),ne=n("d4ec"),ae=n("bee2"),re=n("262e"),se=n("2caf"),ie=(n("96cf"),n("fb6a"),n("1276"),n("ac1f"),n("5319"),n("13d5"),n("159b"),n("466d"),n("d81d"),n("b680"),n("25f0"),n("99af"),n("4d63"),n("b64b"),n("b0c0"),n("07ac"),n("faa1")),oe=n.n(ie),ce=function(e){Object(re["a"])(n,e);var t=Object(se["a"])(n);function n(){var e;return Object(ne["a"])(this,n),e=t.call(this),e.app={connection:{location:window.location.protocol+"//"+window.location.hostname,port:window.location.port,path:"fhem"},socket:null,session:{connect:!1,csrf:null,restart:!1,restartCnt:0,logList:[],logLast:{}},options:{lang:"de",debugMode:!1,debugLevel:3,loading:!1,loadCount:0,clockInterval:5e3,clock:null,date:null,maxChartPoints:100,updateProcess:!1,logRecord:!0,logBuffer:500,ignoreFhemRoom:!1,ignoreFhemGroup:!1,ignoreFhemSortby:!1,mobileHeader:!1},templates:[],componentMap:[],data:{roomList:[],groupList:[],deviceList:[],header:""}},e}return Object(ae["a"])(n,[{key:"loading",set:function(e){e&&this.app.options.loadCount++,!e&&this.app.options.loadCount>0&&this.app.options.loadCount--,this.app.options.loading=this.app.options.loadCount>0}},{key:"log",set:function(e){var t={type:"info",timestamp:Date.now(),timeFlag:null,debugLevel:this.app.options.debugLevel,message:"",icon:"",color:""};Object.assign(t,e);var n=new Date(t.timestamp).toLocaleTimeString(this.app.options.lang),a=new Date(t.timestamp).getMilliseconds();t.timeFlag=n+":"+("000"+a).slice(-3),"error"===t.type&&(t.icon="mdi-alert-outline",t.color="error"),"status"===t.type&&(t.icon="mdi-connection",t.color="info"),"request"===t.type&&(t.icon="mdi-send-circle-outline",t.color="success"),"warning"===t.type&&(t.icon="mdi-help-circle-outline",t.color="warning"),"info"===t.type&&(t.icon="mdi-sync",t.color="success"),"intern"===t.type&&(t.icon="mdi-hexagon-multiple-outline",t.color="warning"),this.app.session.logLast=t,"error"===t.type&&this.emit("message",{type:t.type,message:t.message,meta:t.meta}),this.app.options.logRecord&&t.debugLevel<=this.app.options.debugLevel&&(this.app.session.logList.unshift(t),this.app.session.logList.length>this.app.options.logBuffer&&(this.app.session.logList.length=this.app.options.logBuffer))}},{key:"getDate",value:function(e){var t=e?parseInt(e):0;return function(e){return new Date(e.setDate(e.getDate()+t)).toISOString()}(new Date).split("T")[0]}},{key:"getDateTime",value:function(e){var t=e||(new Date).toISOString();return new Date(t.replace(" ","T")).toLocaleString(this.app.options.lang,{dateStyle:"short",timeStyle:"medium"}).replace(",","")}},{key:"getEl",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0&&e.forEach((function(e){e.param&&e.value&&(s+=s?"&":"?",s+=e.param+"="+encodeURIComponent(e.value))})),n+a+r+s}},{key:"getCsrfToken",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){n.request({},"csrf").then((function(t){return e(t)})).catch((function(e){return t(e)}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"request",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(t,n,r){var s,i=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return s=new Promise((function(e,s){var o=[];"csrf"!=n&&o.push({param:"fwcsrf",value:i.app.session.csrf}),"json"!==n&&"csrf"!==n||o.push({param:"XHR",value:"1"}),"object"===Object(te["a"])(t)&&(t.length>0?o.push.apply(o,Object(a["a"])(t)):o.push(t)),"string"===typeof t&&o.push({param:"cmd",value:t});var c=i.createURL(o);i.log={type:"request",message:"Request: "+c,debugLevel:3},fetch(c).then((function(t){if(t.ok)if("csrf"===n){var a=t.headers.get("x-fhem-csrftoken");e("object"===Object(te["a"])(r)?Object.assign(r,{data:a}):a)}else"json"===n?t.json().then((function(t){e("object"===Object(te["a"])(r)?Object.assign(r,{data:t}):t)})):t.text().then((function(t){e("object"===Object(te["a"])(r)?Object.assign(r,{data:t}):t)}))})).catch((function(e){s({error:e,request:c})}))})),e.abrupt("return",s);case 2:case"end":return e.stop()}}),e)})));function t(t,n,a){return e.apply(this,arguments)}return t}()},{key:"handleLogData",value:function(e){var t=e.split("\n");t.length>3&&t.splice(-3,3);var n,a=[],r=t.length>this.app.options.maxChartPoints?parseInt(t.length/this.app.options.maxChartPoints):1,s=r,i=0,o=1,c=Object(Y["a"])(t);try{for(c.s();!(n=c.n()).done;){var u=n.value,p=u.split(" "),l=Date.parse(p[0].replace("_","T")),d=parseFloat(p[1]);i+=d,(o>=s||o===t.length)&&(o===t.length&&(r-=s-o),a.push({timestamp:l,value:i/r}),s+=r,i=0),o++}}catch(h){c.e(h)}finally{c.f()}return this.log={type:"intern",message:"handle Chartdata (Lines: "+t.length+")",debugLevel:5},a}},{key:"readLogData",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(t){var n,a=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=new Promise((function(e,n){t.defs&&t.defs.length>0?function(){var r,s=[],i=0,o=Object(Y["a"])(t.defs);try{for(o.s();!(r=o.n()).done;){var c=r.value,u=/\(.*\)/.exec(c),p=u?c.replace(u[0],"_").split(":"):c.split(":"),l="get ";l+=p[0]?p[0]:t.deviceName,l+=t.from?" - - "+t.from:"",l+=t.to?" "+t.to:"",l+=u?" "+u[0].replace(/\(|\)/g,""):" 4:"+p[1],a.log={type:"intern",message:"Loading Chartdata - "+l,debugLevel:5},a.request([{param:"cmd",value:l},{param:"XHR",value:"1"}],"text",{id:i}).then((function(n){s.push({id:n.id,data:a.handleLogData(n.data)}),s.length===t.defs.length&&(Object.assign(t,{data:s}),e(t))})).catch((function(e){a.log={type:"error",message:"Fetch data from FHEM Logfile failed.",meta:e,debugLevel:1},n()})),i++}}catch(d){o.e(d)}finally{o.f()}}():(a.log={type:"error",message:"No Definitions for Chart found.",meta:t,debugLevel:1},n())})),e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"checkUpdate",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){n.request([{param:"cmd",value:"update check"},{param:"XHR",value:"1"}]).then((function(t){var n,a=t.split("\n").splice(2),r=0,s=1,i=Object(Y["a"])(a);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.match("UPD")&&!o.match("excluded")&&r++,s===a.length&&e(r>0),s++}}catch(c){i.e(c)}finally{i.f()}})).catch((function(e){n.log={type:"error",message:"FHEM check for Updates failed.",meta:e,debugLevel:1},t(e)}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getRoutes",value:function(e){var t=this;if(this.app.options.loading=!0,"room"===e||"group"===e){var n=e+"List",a=[];this.app.data[n].splice(0),this.request({param:"cmd",value:"jsonList2 appOptions!= appOptions room group"},"json").then(function(){var n=Object(ee["a"])(regeneratorRuntime.mark((function n(r){var s,i,o,c,u,p,l,d,h,f,m;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:s=1,i=Object(Y["a"])(r.Results),n.prev=2,i.s();case 4:if((o=i.n()).done){n.next=15;break}return c=o.value,n.next=8,t.createOptions(c);case 8:if(u=n.sent,p=u[e],p&&u.template){l=p.split(","),d=Object(Y["a"])(l);try{for(d.s();!(h=d.n()).done;)f=h.value,m="/devices/"+e+"="+f,-1==a.map((function(e){return e.title})).indexOf(f)&&a.push({title:f,route:m})}catch(v){d.e(v)}finally{d.f()}}s===r.Results.length&&(a.sort((function(e,t){return e.title>t.title?1:t.title>e.title?-1:0})),t.app.data[e+"List"]=Object.assign([],a),t.app.options.loading=!1),s++;case 13:n.next=4;break;case 15:n.next=20;break;case 17:n.prev=17,n.t0=n["catch"](2),i.e(n.t0);case 20:return n.prev=20,i.f(),n.finish(20);case 23:case"end":return n.stop()}}),n,null,[[2,17,20,23]])})));return function(e){return n.apply(this,arguments)}}()).catch((function(n){t.log={type:"error",message:"Loading "+e+"s from FHEM failed.",meta:n,debugLevel:1},t.app.options.loading=!1}))}else this.log={type:"error",message:"Creating Routes failed.",meta:e,debugLevel:1},this.app.options.loading=!1}},{key:"replaceVals",value:function(e,t){for(var n=/-?[0-9]/.exec(t),a=[],r=2;r0){var r,s=Object(Y["a"])(t);try{for(s.s();!(r=s.n()).done;){var i=r.value,o=i.split(":");if(o.length>2){var c=o[0].match(/\./)?o[0].split("."):["Readings",o[0],"Value"],u=this.getEl.apply(this,[e].concat(Object(a["a"])(c)));if(u){var p=!1;if(isNaN(parseFloat(o[1])))RegExp(o[1]?o[1]:".").test(u)&&(p=!0);else{var l=/-?[0-9]/.exec(u);-1!=l.index&&parseFloat(u.slice(l.index))>=parseFloat(o[1])&&(p=!0)}if(p){n=this.replaceVals(o,u);break}}}}}catch(d){s.e(d)}finally{s.f()}}return n}},{key:"handleStates",value:function(e,t,n){var r=this.getEl(e,"Options","states")||n;if(r){var s,i=Object(Y["a"])(r);try{for(i.s();!(s=i.n()).done;){var o=s.value,c=o.split(":");if(c[0]){var u=c[0].match(/\./)?c[0].split("."):["Readings",c[0],"Value"],p=this.getEl.apply(this,[e].concat(Object(a["a"])(u)));if(p){var l=!1;if(isNaN(parseFloat(c[1]))?RegExp(c[1]?c[1]:".").test(p)&&(l=!0):parseFloat(p)>=parseFloat(c[1])&&(l=!0),l){var d={};c[2]&&(d.mainState=c[0]===c[2]?p:c[2]),c[3]&&(d.mainLevel=c[0]===c[3]?p:c[3]),c[4]&&(d.mainColor=c[4]),c[5]&&(d.systemIcon=c[5]),Object.assign(t,d);break}}}else this.log={type:"error",message:"Wrong Definition for Device-States.",meta:e,debugLevel:1}}}catch(h){i.e(h)}finally{i.f()}}return t}},{key:"createConnected",value:function(){var e=Object(ee["a"])(regeneratorRuntime.mark((function e(t){var n,a,r,s,i,o=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n={},!("connected"in t.Options)){e.next=12;break}a=Object.keys(t.Options.connected),r=0,s=a;case 4:if(!(rt.Options.sortby?1:t.Options.sortby>e.Options.sortby?-1:0})),t.app.data.deviceList=Object.assign([],r),t.app.options.loading=!1),s++;case 29:n.next=5;break;case 31:n.next=36;break;case 33:n.prev=33,n.t0=n["catch"](3),i.e(n.t0);case 36:return n.prev=36,i.f(),n.finish(36);case 39:case"end":return n.stop()}}),n,null,[[3,33,36,39]])})));return function(e){return n.apply(this,arguments)}}()).catch((function(e){t.log={type:"error",message:"Request to FHEM failed.",meta:e,debugLevel:1},t.app.options.loading=!1}))}},{key:"handleData",value:function(e){var t=JSON.parse(e),n=null;if(!t[2].match("0){var n=t.handleData(e);n&&t.app.data.deviceList.forEach((function(e,a){var r=t.app.data.deviceList[a],s=Object.assign({},r);e.Name===n.Name&&("Readings"===n.devicePart&&t.getEl(s,"Readings",n.param,n.paramPart)&&(s.Readings[n.param][n.paramPart]=n.value),"Attributes"===n.devicePart&&t.getEl(s,"Attributes",n.param)&&(s.Attributes[n.param]=n.value),t.app.data.deviceList.splice(a,1,s)),"Connected"in e&&Object.values(e.Connected).forEach((function(r,i){if(r.Name===n.Name){var o=Object.keys(e.Connected)[i];"Readings"===n.devicePart&&t.getEl(s.Connected[o],"Readings",n.param,n.paramPart)&&(s.Connected[o].Readings[n.param][n.paramPart]=n.value),"Attributes"===n.devicePart&&t.getEl(s.Connected[o],"Attributes",n.param)&&(s.Connected[o].Attributes[n.param]=n.value),t.app.data.deviceList.splice(a,1,s)}}))}))}}))}},{key:"connClose",value:function(){var e=this;if(this.app.session.connect=!1,this.app.session.csrf=null,this.app.session.socket=null,!this.app.session.restart){var t=0==this.app.session.restartCnt?1:3e3;this.log={type:"intern",message:"Restart-Sequence is started. (restart counter: "+this.app.session.restartCnt+" - restart on: "+t+" milliseconds)",debugLevel:5},this.app.session.restart=!0,setTimeout((function(){e.app.session.restart=!1,e.app.session.restartCnt++,e.init()}),t),this.log={type:"status",message:"Connection with FHEM was closed. Try to Reconnect in "+t/1e3+" seconds...",debugLevel:2}}}},{key:"connOpen",value:function(){var e=this;this.app.options.loading=!0,this.app.session.restartCnt=0,this.getCsrfToken().then((function(t){e.app.session.csrf=t,e.app.session.connect=!0,e.emit("connect"),e.log={type:"status",message:"Connection with FHEM is opened.",meta:e.session,debugLevel:2},e.app.options.loading=!1})).catch((function(t){e.app.session.csrf=null,e.app.session.connect=!1,e.log={type:"error",message:"Retrieve csrf-Token failed.",meta:t,debugLevel:1}})).finally((function(){return e.app.options.loading=!1}))}},{key:"setClock",value:function(){var e=new Date;this.app.options.clock=e.toLocaleString(this.app.options.lang,{hour:"2-digit",minute:"2-digit"}),this.app.options.date=e.toLocaleString(this.app.options.lang,{weekday:"long",year:"numeric",month:"long",day:"numeric"})}},{key:"init",value:function(){var e=this,t=[{param:"inform",value:"type=status;filter=.*;fmt=JSON"},{param:"XHR",value:"1"}],n=this.createURL(t).replace(/^http/i,"ws");this.app.socket=new WebSocket(n),this.app.socket.onopen=function(){return e.connOpen()},this.app.socket.onmessage=function(t){return e.doUpdate(t)},this.app.socket.onclose=function(){return e.connClose()},this.setClock(),setInterval((function(){return e.setClock()}),this.app.options.clockInterval)}}]),n}(oe.a),ue=n("1321"),pe=n.n(ue),le=n("a925");function de(){var e=n("49f8"),t={};return e.keys().forEach((function(n){var a=n.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){var r=a[1];t[r]=e(n)}})),t}r["a"].use(le["a"]);var he=new le["a"]({locale:"de",fallbackLocale:"en",messages:de()});r["a"].use(pe.a),r["a"].component("apexchart",pe.a),r["a"].config.productionTip=!1,r["a"].prototype.$fhem=new ce,fetch("./cfg/config.json").then((function(e){return e.json()})).catch((function(e){r["a"].prototype.$fhem.log={type:"error",message:"Loading config.json failed.",meta:e,debugLevel:1}})).then((function(e){var t;e&&(e.connection&&Object.assign(r["a"].prototype.$fhem.app.connection,e.connection),e.options&&Object.assign(r["a"].prototype.$fhem.app.options,e.options),e.custom&&e.custom.length>0&&(t=r["a"].prototype.$fhem.app.templates).push.apply(t,Object(a["a"])(e.custom)),e.theme&&(-1!=e.theme.dark&&Object.assign(Q.framework.theme,{dark:e.theme.dark}),e.theme.themes&&(e.theme.themes.light&&Object.assign(Q.framework.theme.themes.light,e.theme.themes.light),e.theme.themes.dark&&Object.assign(Q.framework.theme.themes.dark,e.theme.themes.dark))));he.locale=r["a"].prototype.$fhem.app.options.lang,r["a"].prototype.$fhem.log={type:"status",message:"Config: "+JSON.stringify(e),debugLevel:2},r["a"].prototype.$fhem.log={type:"status",message:"Connection: "+JSON.stringify(r["a"].prototype.$fhem.app.connection),debugLevel:2},new r["a"]({vuetify:Q,router:z,i18n:he,render:function(e){return e(H)}}).$mount("#app")}))},"6ce2":function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Gruppen","room":"Bereiche","dashboard":"Dashboard","system":"System"}}}')},9224:function(e){e.exports=JSON.parse('{"name":"fhemapp","version":"3.12.0","private":true,"author":"jemu75","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build","lint":"vue-cli-service lint","i18n:report":"vue-cli-service i18n:report --src \\"./src/**/*.?(js|vue)\\" --locales \\"./src/locales/**/*.json\\""},"dependencies":{"apexcharts":"^3.26.0","core-js":"^3.9.1","typeface-roboto":"^1.1.13","vue":"^2.6.11","vue-apexcharts":"^1.6.0","vue-i18n":"^8.22.3","vue-json-pretty":"^1.7.1","vue-router":"^3.5.1","vuetify":"^2.4.8"},"devDependencies":{"@mdi/font":"^5.9.55","@vue/cli-plugin-babel":"^4.5.12","@vue/cli-plugin-eslint":"^4.5.12","@vue/cli-plugin-router":"^4.5.12","@vue/cli-service":"^4.5.12","babel-eslint":"^10.1.0","eslint":"^6.7.2","eslint-plugin-vue":"^6.2.2","sass":"^1.32.8","sass-loader":"^8.0.0","vue-cli-plugin-i18n":"~2.1.0","vue-cli-plugin-vuetify":"~2.0.9","vue-template-compiler":"^2.6.11","vuetify-loader":"^1.7.2"},"bugs":{"url":"https://github.com/jemu75/fhemApp/issues"},"homepage":"https://github.com/jemu75/fhemApp#readme","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jemu75/fhemApp.git"}}')},c274:function(e,t,n){e.exports=n.p+"img/FHEM_Logo.2d0f7a38.png"},edd4:function(e){e.exports=JSON.parse('{"app":{"navigation":{"home":"Home","group":"Groups","room":"Area","dashboard":"Dashboard","system":"System"}}}')}}); \ No newline at end of file diff --git a/www/fhemapp/js/chunk-53c4ff2a.159c7677.js b/www/fhemapp/js/chunk-53c4ff2a.159c7677.js new file mode 100644 index 00000000..c91966b3 --- /dev/null +++ b/www/fhemapp/js/chunk-53c4ff2a.159c7677.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-53c4ff2a"],{"02f0":function(t,e,i){},"0ccb":function(t,e,i){var a=i("50c4"),n=i("1148"),s=i("1d80"),r=Math.ceil,o=function(t){return function(e,i,o){var l,h,c=String(s(e)),u=c.length,d=void 0===o?" ":String(o),p=a(i);return p<=u||""==d?c:(l=p-u,h=n.call(d,r(l/d.length)),h.length>l&&(h=h.slice(0,l)),t?c+h:h+c)}};t.exports={start:o(!1),end:o(!0)}},2102:function(t,e,i){},"2af1":function(t,e,i){var a=i("23e7"),n=i("f748");a({target:"Math",stat:!0},{sign:n})},"4d90":function(t,e,i){"use strict";var a=i("23e7"),n=i("0ccb").start,s=i("9a0c");a({target:"String",proto:!0,forced:s},{padStart:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},8308:function(t,e,i){},"9a0c":function(t,e,i){var a=i("342f");t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a)},afd9:function(t,e,i){"use strict";var a=i("5530"),n=(i("a9e3"),i("c7cd"),i("8308"),i("3a66")),s=i("a9ad"),r=i("7560"),o=i("58df"),l=i("80d2");e["a"]=Object(o["a"])(Object(n["a"])("bar",["height","window"]),s["a"],r["a"]).extend({name:"v-system-bar",props:{height:[Number,String],lightsOut:Boolean,window:Boolean},computed:{classes:function(){return Object(a["a"])({"v-system-bar--lights-out":this.lightsOut,"v-system-bar--absolute":this.absolute,"v-system-bar--fixed":!this.absolute&&(this.app||this.fixed),"v-system-bar--window":this.window},this.themeClasses)},computedHeight:function(){return this.height?isNaN(parseInt(this.height))?this.height:parseInt(this.height):this.window?32:24},styles:function(){return{height:Object(l["g"])(this.computedHeight)}}},methods:{updateApplication:function(){return this.$el?this.$el.clientHeight:this.computedHeight}},render:function(t){var e={staticClass:"v-system-bar",class:this.classes,style:this.styles,on:this.$listeners};return t("div",this.setBackgroundColor(this.color,e),Object(l["s"])(this))}})},b009:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-col",{class:t.setup.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.vals.mainLevel,color:t.vals.mainColor,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.vals.title)+" "),i("v-spacer"),i("v-btn",{attrs:{small:"",icon:""},on:{click:t.goTo}},[i("v-icon",{attrs:{small:""}},[t._v(" "+t._s(t.vals.linkIcon)+" ")])],1)],1),i("v-divider"),i("v-card-text",{staticClass:"pa-0"},[t.vals.maxSize?i("v-row",{staticClass:"ma-3",attrs:{align:"center"}},[i("v-col",[i("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","max-width":"290px","min-width":"auto"},scopedSlots:t._u([{key:"activator",fn:function(e){var a=e.on,n=e.attrs;return[i("v-text-field",t._g(t._b({attrs:{readonly:"",label:"von","prepend-icon":"mdi-calendar"},model:{value:t.vals.fromLocale,callback:function(e){t.$set(t.vals,"fromLocale",e)},expression:"vals.fromLocale"}},"v-text-field",n,!1),a))]}}],null,!1,3384966413),model:{value:t.vals.fromPicker,callback:function(e){t.$set(t.vals,"fromPicker",e)},expression:"vals.fromPicker"}},[i("v-date-picker",{attrs:{"no-title":""},on:{input:t.loadChartData},model:{value:t.vals.from,callback:function(e){t.$set(t.vals,"from",e)},expression:"vals.from"}})],1)],1),i("v-col",[i("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"",left:"","max-width":"290px","min-width":"auto"},scopedSlots:t._u([{key:"activator",fn:function(e){var a=e.on,n=e.attrs;return[i("v-text-field",t._g(t._b({attrs:{readonly:"",label:"bis","prepend-icon":"mdi-calendar"},model:{value:t.vals.toLocale,callback:function(e){t.$set(t.vals,"toLocale",e)},expression:"vals.toLocale"}},"v-text-field",n,!1),a))]}}],null,!1,3313857711),model:{value:t.vals.toPicker,callback:function(e){t.$set(t.vals,"toPicker",e)},expression:"vals.toPicker"}},[i("v-date-picker",{attrs:{"no-title":""},on:{input:t.loadChartData},model:{value:t.vals.to,callback:function(e){t.$set(t.vals,"to",e)},expression:"vals.to"}})],1)],1)],1):t._e(),i("apexchart",{attrs:{options:t.chart.options,series:t.chart.series},on:{zoomed:t.afterZoom}})],1),i("v-divider"),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",[t._v(t._s(t.vals.systemIcon))]),i("v-spacer")],1)],1)],1)},n=[],s=i("b85c"),r=(i("4de4"),i("466d"),i("ac1f"),i("1276"),i("a434"),i("5319"),i("d81d"),i("b680"),{props:{item:{type:Object,default:function(){return{name:"chart"}}}},data:function(){return{name:"chart",setup:{size:"col-12 col-sm-12 col-md-6 col-lg-4",daysAgo:-7,daysTo:1},vals:{title:"",mainLevel:0,mainColor:"success",maxSize:!1,linkIcon:"mdi-arrow-expand",fromPicker:!1,from:"",fromLocale:"",toPicker:!1,to:"",systemIcon:"mdi-chart-bar"},chart:{options:{theme:{mode:"dark"},chart:{type:"line",height:"auto",toolbar:{show:!1}},stroke:{curve:"smooth"},tooltip:{x:{format:"ddd dd.MM.yy HH:mm:ss"}},xaxis:{type:"datetime"},yaxis:[]},series:[]}}},watch:{item:{immediate:!0,deep:!0,handler:function(t){var e=this.$fhem.getEl(t,"Attributes","alias")||t.Name;this.vals.title=this.$fhem.getEl(t,"Options","name")||e}},"vals.from":function(t){this.vals.fromLocale=new Date(t).toLocaleString("de-DE",{dateStyle:"medium"})},"vals.to":function(t){this.vals.toLocale=new Date(t).toLocaleString("de-DE",{dateStyle:"medium"})}},created:function(){this.init()},methods:{init:function(){var t=this.$fhem.getEl(this.item,"Options","setup");t&&Object.assign(this.setup,t),this.setup.lineWidth&&(this.chart.options.stroke.width=this.setup.lineWidth),this.$route.params.filter&&this.$route.params.filter.match("&size=max")&&(this.vals.maxSize=!0,this.setup.size="col-12",this.vals.linkIcon="mdi-arrow-collapse"),this.vals.from=this.$fhem.getDate(this.setup.daysAgo),this.vals.to=this.$fhem.getDate(this.setup.daysTo),this.chart.options.chart.height=window.innerHeight>600&&this.vals.maxSize?parseInt(window.innerHeight-320):"auto",this.chart.options.theme.mode=this.$vuetify.theme.dark?"dark":"light",this.loadChartData()},goTo:function(){this.vals.maxSize?this.$router.go(-1):this.$router.push("/devices/device="+this.item.Name+"&size=max")},afterZoom:function(t,e){var i=e.xaxis;this.vals.from=new Date(i.min).toISOString().split("T")[0],this.vals.to=new Date(i.max).toISOString().split("T")[0],this.loadChartData()},loadChartData:function(){var t=this;if(this.vals.fromPicker=!1,this.vals.toPicker=!1,this.item){this.$fhem.loading=!0;var e={deviceName:this.item.Name,from:this.vals.from,to:this.vals.to,defs:this.item.Options.chartDef};this.$fhem.readLogData(e).then((function(e){if(e.defs.length>0){var i=0,a="",n="";t.chart.options.yaxis.splice(0),t.chart.series.splice(0);var r,o=Object(s["a"])(e.defs);try{var l=function(){var o,l=r.value,h=/\(.*\)/.exec(l),c=h?l.replace(h[0],"_").split(":"):l.split(":"),u=[],d=e.data[e.data.map((function(t){return t.id})).indexOf(i)].data,p=Object(s["a"])(d);try{for(p.s();!(o=p.n()).done;){var m=o.value;u.push([m.timestamp,m.value])}}catch(b){p.e(b)}finally{p.f()}t.chart.series.push({name:c[2],data:u});var f="secondary"===c[4],v=!1;a||f||(a=c[2],v=!0),!n&&f&&(n=c[2],v=!0);var g={seriesName:f?n:a,show:v,opposite:f,labels:{formatter:function(t){var e="";return t&&(e=t.toFixed(1)+c[3]),e}}};t.chart.options.yaxis.push(g),i++};for(o.s();!(r=o.n()).done;)l()}catch(h){o.e(h)}finally{o.f()}}t.chart.options=Object.assign({},t.chart.options),t.$fhem.loading=!1}))}else this.$fhem.emit("message",{type:"error",message:"no valid device defined"})}}}),o=r,l=i("2877"),h=i("6544"),c=i.n(h),u=i("8336"),d=i("b0af"),p=i("99d9"),m=i("62ad"),f=i("5530"),v=(i("a9e3"),i("caad"),i("99af"),i("b0c0"),i("d951"),i("9d26")),g=(i("498a"),i("a9ad")),b=i("58df"),y=i("80d2"),k=Object(b["a"])(g["a"]).extend({methods:{genPickerButton:function(t,e,i){var a=this,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=this[t]===e,o=function(i){i.stopPropagation(),a.$emit("update:".concat(Object(y["w"])(t)),e)};return this.$createElement("div",{staticClass:"v-picker__title__btn ".concat(s).trim(),class:{"v-picker__title__btn--active":r,"v-picker__title__btn--readonly":n},on:r||n?void 0:{click:o}},Array.isArray(i)?i:[i])}}}),D=Object(b["a"])(k).extend({name:"v-date-picker-title",props:{date:{type:String,default:""},disabled:Boolean,readonly:Boolean,selectingYear:Boolean,value:{type:String},year:{type:[Number,String],default:""},yearIcon:{type:String}},data:function(){return{isReversing:!1}},computed:{computedTransition:function(){return this.isReversing?"picker-reverse-transition":"picker-transition"}},watch:{value:function(t,e){this.isReversing=t>=0,t=String(t),i=String(i),t.length>e?String(t):(e-=t.length,e>i.length&&(i+=i.repeat(e/i.length)),i.slice(0,e)+String(t))}),M=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return S(t,e,"0")};function O(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:0,length:0},a=function(t){var e=t.trim().split(" ")[0].split("-"),i=Object($["a"])(e,3),a=i[0],n=i[1],s=i[2];return[M(a,4),M(n||1),M(s||1)].join("-")};try{var n=new Intl.DateTimeFormat(t||void 0,e);return function(t){return n.format(new Date("".concat(a(t),"T00:00:00+00:00")))}}catch(s){return i.start||i.length?function(t){return a(t).substr(i.start||0,i.length)}:void 0}}var Y=O,E=function(t,e){var i=t.split("-").map(Number),a=Object($["a"])(i,2),n=a[0],s=a[1];return s+e===0?"".concat(n-1,"-12"):s+e===13?"".concat(n+1,"-01"):"".concat(n,"-").concat(M(s+e))},B=Object(b["a"])(g["a"],x,C["a"]).extend({name:"v-date-picker-header",props:{disabled:Boolean,format:Function,min:String,max:String,nextAriaLabel:String,nextIcon:{type:String,default:"$next"},prevAriaLabel:String,prevIcon:{type:String,default:"$prev"},readonly:Boolean,value:{type:[Number,String],required:!0}},data:function(){return{isReversing:!1}},computed:{formatter:function(){return this.format?this.format:String(this.value).split("-")[1]?Y(this.currentLocale,{month:"long",year:"numeric",timeZone:"UTC"},{length:7}):Y(this.currentLocale,{year:"numeric",timeZone:"UTC"},{length:4})}},watch:{value:function(t,e){this.isReversing=t0?this.nextAriaLabel:this.prevAriaLabel,a=i?this.$vuetify.lang.t(i):void 0,n=this.disabled||t<0&&this.min&&this.calculateChange(t)0&&this.max&&this.calculateChange(t)>this.max;return this.$createElement(w["a"],{attrs:{"aria-label":a},props:{dark:this.dark,disabled:n,icon:!0,light:this.light},on:{click:function(i){i.stopPropagation(),e.$emit("input",e.calculateChange(t))}}},[this.$createElement(v["a"],t<0===!this.$vuetify.rtl?this.prevIcon:this.nextIcon)])},calculateChange:function(t){var e=String(this.value).split("-").map(Number),i=Object($["a"])(e,2),a=i[0],n=i[1];return null==n?"".concat(a+t):E(String(this.value),t)},genHeader:function(){var t=this,e=!this.disabled&&(this.color||"accent"),i=this.$createElement("div",this.setTextColor(e,{key:String(this.value)}),[this.$createElement("button",{attrs:{type:"button"},on:{click:function(){return t.$emit("toggle")}}},[this.$slots.default||this.formatter(String(this.value))])]),a=this.$createElement("transition",{props:{name:this.isReversing===!this.$vuetify.rtl?"tab-reverse-transition":"tab-transition"}},[i]);return this.$createElement("div",{staticClass:"v-date-picker-header__value",class:{"v-date-picker-header__value--disabled":this.disabled}},[a])}},render:function(){return this.$createElement("div",{staticClass:"v-date-picker-header",class:Object(f["a"])({"v-date-picker-header--disabled":this.disabled},this.themeClasses)},[this.genBtn(-1),this.genHeader(),this.genBtn(1)])}}),A=(i("2af1"),i("4d90"),i("2909")),j=(i("2532"),i("c982"),i("c3f0"));i("13d5"),i("b64b"),i("8a79");function F(t,e,i){return Object.keys(t.$listeners).reduce((function(a,n){return n.endsWith(e)&&(a[n.slice(0,-e.length)]=function(e){return t.$emit(n,i,e)}),a}),{})}function I(t,e){return Object.keys(t.$listeners).reduce((function(i,a){return a.endsWith(e)&&(i[a]=t.$listeners[a]),i}),{})}var _=function(t,e){var i=t.split("-"),a=Object($["a"])(i,3),n=a[0],s=a[1],r=void 0===s?1:s,o=a[2],l=void 0===o?1:o;return"".concat(n,"-").concat(M(r),"-").concat(M(l)).substr(0,{date:10,month:7,year:4}[e])};function P(t,e,i,a){return(!a||a(t))&&(!e||t>=e.substr(0,10))&&(!i||t<=i)}var L=i("d9f7"),V=Object(b["a"])(g["a"],x,C["a"]).extend({directives:{Touch:j["a"]},props:{allowedDates:Function,current:String,disabled:Boolean,format:Function,events:{type:[Array,Function,Object],default:function(){return null}},eventColor:{type:[Array,Function,Object,String],default:function(){return"warning"}},min:String,max:String,range:Boolean,readonly:Boolean,scrollable:Boolean,tableDate:{type:String,required:!0},value:[String,Array]},data:function(){return{isReversing:!1,wheelThrottle:null}},computed:{computedTransition:function(){return this.isReversing===!this.$vuetify.rtl?"tab-reverse-transition":"tab-transition"},displayedMonth:function(){return Number(this.tableDate.split("-")[1])-1},displayedYear:function(){return Number(this.tableDate.split("-")[0])}},watch:{tableDate:function(t,e){this.isReversing=t4&&void 0!==arguments[4]&&arguments[4],s=P(t,this.min,this.max,this.allowedDates),r=this.isSelected(t)&&s,o=t===this.current,l=r?this.setBackgroundColor:this.setTextColor,h=(r||o)&&(this.color||"accent");return this.$createElement("button",l(h,{staticClass:"v-btn",class:this.genButtonClasses(s&&!n,e,r,o),attrs:{type:"button"},domProps:{disabled:this.disabled||!s||n},on:this.genButtonEvents(t,s,i)}),[this.$createElement("div",{staticClass:"v-btn__content"},[a(t)]),this.genEvents(t)])},getEventColors:function(t){var e,i=function(t){return Array.isArray(t)?t:[t]},a=[];return e=Array.isArray(this.events)?this.events.includes(t):this.events instanceof Function?this.events(t)||!1:this.events&&this.events[t]||!1,e?(a=!0!==e?i(e):"string"===typeof this.eventColor?[this.eventColor]:"function"===typeof this.eventColor?i(this.eventColor(t)):Array.isArray(this.eventColor)?this.eventColor:i(this.eventColor[t]),a.filter((function(t){return t}))):[]},genEvents:function(t){var e=this,i=this.getEventColors(t);return i.length?this.$createElement("div",{staticClass:"v-date-picker-table__events"},i.map((function(t){return e.$createElement("div",e.setBackgroundColor(t))}))):null},isValidScroll:function(t,e){var i=e(t.deltaY),a=1===i.split("-").length?"year":"month";return 0===t.deltaY||t.deltaY<0&&(!this.min||i>=_(this.min,a))||t.deltaY>0&&(!this.max||i<=_(this.max,a))},wheel:function(t,e){this.$emit("update:table-date",e(t.deltaY))},touch:function(t,e){this.$emit("update:table-date",e(t))},genTable:function(t,e,i){var a=this,n=this.$createElement("transition",{props:{name:this.computedTransition}},[this.$createElement("table",{key:this.tableDate},e)]),s={name:"touch",value:{left:function(t){return t.offsetX<-15&&a.touch(1,i)},right:function(t){return t.offsetX>15&&a.touch(-1,i)}}};return this.$createElement("div",{staticClass:t,class:Object(f["a"])({"v-date-picker-table--disabled":this.disabled},this.themeClasses),on:!this.disabled&&this.scrollable?{wheel:function(t){t.preventDefault(),a.isValidScroll(t,i)&&a.wheelThrottle(t,i)}}:void 0,directives:[s]},[n])},isSelected:function(t){if(Array.isArray(this.value)){if(this.range&&2===this.value.length){var e=Object(A["a"])(this.value).sort(),i=Object($["a"])(e,2),a=i[0],n=i[1];return a<=t&&t<=n}return-1!==this.value.indexOf(t)}return t===this.value}}});function N(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return t<100&&t>=0?(e=new Date(Date.UTC(t,i,a)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC(t,i,a)),e}function W(t,e,i){var a=7+e-i,n=(7+N(t,0,a).getUTCDay()-e)%7;return-n+a-1}function H(t,e,i,a){var n=[0,31,59,90,120,151,181,212,243,273,304,334][e];return e>1&&z(t)&&n++,n+i}function R(t,e,i){var a=W(t,e,i),n=W(t+1,e,i),s=z(t)?366:365;return(s-a+n)/7}function U(t,e,i,a,n){var s=W(t,a,n),r=Math.ceil((H(t,e,i,a)-s)/7);return r<1?r+R(t-1,a,n):r>R(t,a,n)?r-R(t,a,n):r}function z(t){return t%4===0&&t%100!==0||t%400===0}var Z=Object(b["a"])(V).extend({name:"v-date-picker-date-table",props:{firstDayOfWeek:{type:[String,Number],default:0},localeFirstDayOfYear:{type:[String,Number],default:0},showAdjacentMonths:Boolean,showWeek:Boolean,weekdayFormat:Function},computed:{formatter:function(){return this.format||Y(this.currentLocale,{day:"numeric",timeZone:"UTC"},{start:8,length:2})},weekdayFormatter:function(){return this.weekdayFormat||Y(this.currentLocale,{weekday:"narrow",timeZone:"UTC"})},weekDays:function(){var t=this,e=parseInt(this.firstDayOfWeek,10);return this.weekdayFormatter?Object(y["h"])(7).map((function(i){return t.weekdayFormatter("2017-01-".concat(e+i+15))})):Object(y["h"])(7).map((function(t){return["S","M","T","W","T","F","S"][(t+e)%7]}))}},methods:{calculateTableDate:function(t){return E(this.tableDate,Math.sign(t||1))},genTHead:function(){var t=this,e=this.weekDays.map((function(e){return t.$createElement("th",e)}));return this.showWeek&&e.unshift(this.$createElement("th")),this.$createElement("thead",this.genTR(e))},weekDaysBeforeFirstDayOfTheMonth:function(){var t=new Date("".concat(this.displayedYear,"-").concat(M(this.displayedMonth+1),"-01T00:00:00+00:00")),e=t.getUTCDay();return(e-parseInt(this.firstDayOfWeek)+7)%7},getWeekNumber:function(t){return U(this.displayedYear,this.displayedMonth,t,parseInt(this.firstDayOfWeek),parseInt(this.localeFirstDayOfYear))},genWeekNumber:function(t){return this.$createElement("td",[this.$createElement("small",{staticClass:"v-date-picker-table--date__week"},String(t).padStart(2,"0"))])},genTBody:function(){var t=[],e=new Date(this.displayedYear,this.displayedMonth+1,0).getDate(),i=[],a=this.weekDaysBeforeFirstDayOfTheMonth();this.showWeek&&i.push(this.genWeekNumber(this.getWeekNumber(1)));var n=this.displayedMonth?this.displayedYear:this.displayedYear-1,s=(this.displayedMonth+11)%12,r=new Date(this.displayedYear,this.displayedMonth,0).getDate(),o=this.showWeek?8:7;while(a--){var l="".concat(n,"-").concat(M(s+1),"-").concat(M(r-a));i.push(this.$createElement("td",this.showAdjacentMonths?[this.genButton(l,!0,"date",this.formatter,!0)]:[]))}for(a=1;a<=e;a++){var h="".concat(this.displayedYear,"-").concat(M(this.displayedMonth+1),"-").concat(M(a));i.push(this.$createElement("td",[this.genButton(h,!0,"date",this.formatter)])),i.length%o===0&&(t.push(this.genTR(i)),i=[],this.showWeek&&(a=a;n--)t.push(this.genYearItem(n));return t}},render:function(){return this.$createElement("ul",{staticClass:"v-date-picker-years",ref:"years"},this.genYearItems())}})),X=(i("0481"),i("e53c"),i("615b"),i("c995")),G=Object(b["a"])(g["a"],X["a"],C["a"]).extend({name:"v-picker",props:{flat:Boolean,fullWidth:Boolean,landscape:Boolean,noTitle:Boolean,transition:{type:String,default:"fade-transition"},width:{type:[Number,String],default:290}},computed:{computedTitleColor:function(){var t=!this.isDark&&(this.color||"primary");return this.color||t}},methods:{genTitle:function(){return this.$createElement("div",this.setBackgroundColor(this.computedTitleColor,{staticClass:"v-picker__title",class:{"v-picker__title--landscape":this.landscape}}),this.$slots.title)},genBodyTransition:function(){return this.$createElement("transition",{props:{name:this.transition}},this.$slots.default)},genBody:function(){return this.$createElement("div",{staticClass:"v-picker__body",class:Object(f["a"])({"v-picker__body--no-title":this.noTitle},this.themeClasses),style:this.fullWidth?void 0:{width:Object(y["g"])(this.width)}},[this.genBodyTransition()])},genActions:function(){return this.$createElement("div",{staticClass:"v-picker__actions v-card__actions",class:{"v-picker__actions--no-title":this.noTitle}},this.$slots.actions)}},render:function(t){return t("div",{staticClass:"v-picker v-card",class:Object(f["a"])(Object(f["a"])({"v-picker--flat":this.flat,"v-picker--landscape":this.landscape,"v-picker--full-width":this.fullWidth},this.themeClasses),this.elevationClasses)},[this.$slots.title?this.genTitle():null,this.genBody(),this.$slots.actions?this.genActions():null])}}),K=G,Q=Object(b["a"])(g["a"],X["a"],C["a"]).extend({name:"picker",props:{flat:Boolean,fullWidth:Boolean,headerColor:String,landscape:Boolean,noTitle:Boolean,width:{type:[Number,String],default:290}},methods:{genPickerTitle:function(){return null},genPickerBody:function(){return null},genPickerActionsSlot:function(){return this.$scopedSlots.default?this.$scopedSlots.default({save:this.save,cancel:this.cancel}):this.$slots.default},genPicker:function(t){var e=[];if(!this.noTitle){var i=this.genPickerTitle();i&&e.push(i)}var a=this.genPickerBody();return a&&e.push(a),e.push(this.$createElement("template",{slot:"actions"},[this.genPickerActionsSlot()])),this.$createElement(K,{staticClass:t,props:{color:this.headerColor||this.color,dark:this.dark,elevation:this.elevation,flat:this.flat,fullWidth:this.fullWidth,landscape:this.landscape,light:this.light,width:this.width,noTitle:this.noTitle}},e)}}}),tt=(i("53ca"),[0,31,28,31,30,31,30,31,31,30,31,30,31]),et=[0,31,29,31,30,31,30,31,31,30,31,30,31];function it(t,e){return z(t)?et[e]:tt[e]}var at=i("d9bd"),nt=Object(b["a"])(x,Q).extend({name:"v-date-picker",props:{allowedDates:Function,dayFormat:Function,disabled:Boolean,events:{type:[Array,Function,Object],default:function(){return null}},eventColor:{type:[Array,Function,Object,String],default:function(){return"warning"}},firstDayOfWeek:{type:[String,Number],default:0},headerDateFormat:Function,localeFirstDayOfYear:{type:[String,Number],default:0},max:String,min:String,monthFormat:Function,multiple:Boolean,nextIcon:{type:String,default:"$next"},nextMonthAriaLabel:{type:String,default:"$vuetify.datePicker.nextMonthAriaLabel"},nextYearAriaLabel:{type:String,default:"$vuetify.datePicker.nextYearAriaLabel"},pickerDate:String,prevIcon:{type:String,default:"$prev"},prevMonthAriaLabel:{type:String,default:"$vuetify.datePicker.prevMonthAriaLabel"},prevYearAriaLabel:{type:String,default:"$vuetify.datePicker.prevYearAriaLabel"},range:Boolean,reactive:Boolean,readonly:Boolean,scrollable:Boolean,showCurrent:{type:[Boolean,String],default:!0},selectedItemsText:{type:String,default:"$vuetify.datePicker.itemsSelected"},showAdjacentMonths:Boolean,showWeek:Boolean,titleDateFormat:Function,type:{type:String,default:"date",validator:function(t){return["date","month"].includes(t)}},value:[Array,String],weekdayFormat:Function,yearFormat:Function,yearIcon:String},data:function(){var t=this,e=new Date;return{activePicker:this.type.toUpperCase(),inputDay:null,inputMonth:null,inputYear:null,isReversing:!1,now:e,tableDate:function(){if(t.pickerDate)return t.pickerDate;var i=Object(y["H"])(t.value),a=i[i.length-1]||("string"===typeof t.showCurrent?t.showCurrent:"".concat(e.getFullYear(),"-").concat(e.getMonth()+1));return _(a,"date"===t.type?"month":"year")}()}},computed:{multipleValue:function(){return Object(y["H"])(this.value)},isMultiple:function(){return this.multiple||this.range},lastValue:function(){return this.isMultiple?this.multipleValue[this.multipleValue.length-1]:this.value},selectedMonths:function(){return this.value&&"month"!==this.type?this.isMultiple?this.multipleValue.map((function(t){return t.substr(0,7)})):this.value.substr(0,7):this.value},current:function(){return!0===this.showCurrent?_("".concat(this.now.getFullYear(),"-").concat(this.now.getMonth()+1,"-").concat(this.now.getDate()),this.type):this.showCurrent||null},inputDate:function(){return"date"===this.type?"".concat(this.inputYear,"-").concat(M(this.inputMonth+1),"-").concat(M(this.inputDay)):"".concat(this.inputYear,"-").concat(M(this.inputMonth+1))},tableMonth:function(){return Number((this.pickerDate||this.tableDate).split("-")[1])-1},tableYear:function(){return Number((this.pickerDate||this.tableDate).split("-")[0])},minMonth:function(){return this.min?_(this.min,"month"):null},maxMonth:function(){return this.max?_(this.max,"month"):null},minYear:function(){return this.min?_(this.min,"year"):null},maxYear:function(){return this.max?_(this.max,"year"):null},formatters:function(){return{year:this.yearFormat||Y(this.currentLocale,{year:"numeric",timeZone:"UTC"},{length:4}),titleDate:this.titleDateFormat||(this.isMultiple?this.defaultTitleMultipleDateFormatter:this.defaultTitleDateFormatter)}},defaultTitleMultipleDateFormatter:function(){var t=this;return function(e){return e.length?1===e.length?t.defaultTitleDateFormatter(e[0]):t.$vuetify.lang.t(t.selectedItemsText,e.length):"-"}},defaultTitleDateFormatter:function(){var t={year:{year:"numeric",timeZone:"UTC"},month:{month:"long",timeZone:"UTC"},date:{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"}},e=Y(this.currentLocale,t[this.type],{start:0,length:{date:10,month:7,year:4}[this.type]}),i=function(t){return e(t).replace(/([^\d\s])([\d])/g,(function(t,e,i){return"".concat(e," ").concat(i)})).replace(", ",",
")};return this.landscape?i:e}},watch:{tableDate:function(t,e){var i="month"===this.type?"year":"month";this.isReversing=_(t,i)<_(e,i),this.$emit("update:picker-date",t)},pickerDate:function(t){t?this.tableDate=t:this.lastValue&&"date"===this.type?this.tableDate=_(this.lastValue,"month"):this.lastValue&&"month"===this.type&&(this.tableDate=_(this.lastValue,"year"))},value:function(t,e){this.checkMultipleProp(),this.setInputDate(),(this.isMultiple||!this.value||this.pickerDate)&&(!this.isMultiple||!this.multipleValue.length||e&&e.length||this.pickerDate)||(this.tableDate=_(this.inputDate,"month"===this.type?"year":"month"))},type:function(t){if(this.activePicker=t.toUpperCase(),this.value&&this.value.length){var e=this.multipleValue.map((function(e){return _(e,t)})).filter(this.isDateAllowed);this.$emit("input",this.isMultiple?e:e[0])}}},created:function(){this.checkMultipleProp(),this.pickerDate!==this.tableDate&&this.$emit("update:picker-date",this.tableDate),this.setInputDate()},methods:{emitInput:function(t){if(this.range)if(1!==this.multipleValue.length)this.$emit("input",[t]);else{var e=[this.multipleValue[0],t];this.$emit("input",e),this.$emit("change",e)}else{var i=this.multiple?-1===this.multipleValue.indexOf(t)?this.multipleValue.concat([t]):this.multipleValue.filter((function(e){return e!==t})):t;this.$emit("input",i),this.multiple||this.$emit("change",t)}},checkMultipleProp:function(){if(null!=this.value){var t=this.value.constructor.name,e=this.isMultiple?"Array":"String";t!==e&&Object(at["c"])("Value must be ".concat(this.isMultiple?"an":"a"," ").concat(e,", got ").concat(t),this)}},isDateAllowed:function(t){return P(t,this.min,this.max,this.allowedDates)},yearClick:function(t){this.inputYear=t,"month"===this.type?this.tableDate="".concat(t):this.tableDate="".concat(t,"-").concat(M((this.tableMonth||0)+1)),this.activePicker="MONTH",this.reactive&&!this.readonly&&!this.isMultiple&&this.isDateAllowed(this.inputDate)&&this.$emit("input",this.inputDate)},monthClick:function(t){this.inputYear=parseInt(t.split("-")[0],10),this.inputMonth=parseInt(t.split("-")[1],10)-1,"date"===this.type?(this.inputDay&&(this.inputDay=Math.min(this.inputDay,it(this.inputYear,this.inputMonth+1))),this.tableDate=t,this.activePicker="DATE",this.reactive&&!this.readonly&&!this.isMultiple&&this.isDateAllowed(this.inputDate)&&this.$emit("input",this.inputDate)):this.emitInput(this.inputDate)},dateClick:function(t){this.inputYear=parseInt(t.split("-")[0],10),this.inputMonth=parseInt(t.split("-")[1],10)-1,this.inputDay=parseInt(t.split("-")[2],10),this.emitInput(this.inputDate)},genPickerTitle:function(){var t=this;return this.$createElement(D,{props:{date:this.value?this.formatters.titleDate(this.isMultiple?this.multipleValue:this.value):"",disabled:this.disabled,readonly:this.readonly,selectingYear:"YEAR"===this.activePicker,year:this.formatters.year(this.multipleValue.length?"".concat(this.inputYear):this.tableDate),yearIcon:this.yearIcon,value:this.multipleValue[0]},slot:"title",on:{"update:selecting-year":function(e){return t.activePicker=e?"YEAR":t.type.toUpperCase()}}})},genTableHeader:function(){var t=this;return this.$createElement(B,{props:{nextIcon:this.nextIcon,color:this.color,dark:this.dark,disabled:this.disabled,format:this.headerDateFormat,light:this.light,locale:this.locale,min:"DATE"===this.activePicker?this.minMonth:this.minYear,max:"DATE"===this.activePicker?this.maxMonth:this.maxYear,nextAriaLabel:"DATE"===this.activePicker?this.nextMonthAriaLabel:this.nextYearAriaLabel,prevAriaLabel:"DATE"===this.activePicker?this.prevMonthAriaLabel:this.prevYearAriaLabel,prevIcon:this.prevIcon,readonly:this.readonly,value:"DATE"===this.activePicker?"".concat(M(this.tableYear,4),"-").concat(M(this.tableMonth+1)):"".concat(M(this.tableYear,4))},on:{toggle:function(){return t.activePicker="DATE"===t.activePicker?"MONTH":"YEAR"},input:function(e){return t.tableDate=e}}})},genDateTable:function(){var t=this;return this.$createElement(Z,{props:{allowedDates:this.allowedDates,color:this.color,current:this.current,dark:this.dark,disabled:this.disabled,events:this.events,eventColor:this.eventColor,firstDayOfWeek:this.firstDayOfWeek,format:this.dayFormat,light:this.light,locale:this.locale,localeFirstDayOfYear:this.localeFirstDayOfYear,min:this.min,max:this.max,range:this.range,readonly:this.readonly,scrollable:this.scrollable,showAdjacentMonths:this.showAdjacentMonths,showWeek:this.showWeek,tableDate:"".concat(M(this.tableYear,4),"-").concat(M(this.tableMonth+1)),value:this.value,weekdayFormat:this.weekdayFormat},ref:"table",on:Object(f["a"])({input:this.dateClick,"update:table-date":function(e){return t.tableDate=e}},I(this,":date"))})},genMonthTable:function(){var t=this;return this.$createElement(q,{props:{allowedDates:"month"===this.type?this.allowedDates:null,color:this.color,current:this.current?_(this.current,"month"):null,dark:this.dark,disabled:this.disabled,events:"month"===this.type?this.events:null,eventColor:"month"===this.type?this.eventColor:null,format:this.monthFormat,light:this.light,locale:this.locale,min:this.minMonth,max:this.maxMonth,range:this.range,readonly:this.readonly&&"month"===this.type,scrollable:this.scrollable,value:this.selectedMonths,tableDate:"".concat(M(this.tableYear,4))},ref:"table",on:Object(f["a"])({input:this.monthClick,"update:table-date":function(e){return t.tableDate=e}},I(this,":month"))})},genYears:function(){return this.$createElement(J,{props:{color:this.color,format:this.yearFormat,locale:this.locale,min:this.minYear,max:this.maxYear,value:this.tableYear},on:Object(f["a"])({input:this.yearClick},I(this,":year"))})},genPickerBody:function(){var t="YEAR"===this.activePicker?[this.genYears()]:[this.genTableHeader(),"DATE"===this.activePicker?this.genDateTable():this.genMonthTable()];return this.$createElement("div",{key:this.activePicker},t)},setInputDate:function(){if(this.lastValue){var t=this.lastValue.split("-");this.inputYear=parseInt(t[0],10),this.inputMonth=parseInt(t[1],10)-1,"date"===this.type&&(this.inputDay=parseInt(t[2],10))}else this.inputYear=this.inputYear||this.now.getFullYear(),this.inputMonth=null==this.inputMonth?this.inputMonth:this.now.getMonth(),this.inputDay=this.inputDay||this.now.getDate()}},render:function(){return this.genPicker("v-picker--date")}}),st=i("ce7e"),rt=i("132d"),ot=i("e449"),lt=i("8e36"),ht=i("0fd9"),ct=i("2fa4"),ut=i("afd9"),dt=i("8654"),pt=Object(l["a"])(o,a,n,!1,null,null,null);e["default"]=pt.exports;c()(pt,{VBtn:u["a"],VCard:d["a"],VCardText:p["c"],VCardTitle:p["d"],VCol:m["a"],VDatePicker:nt,VDivider:st["a"],VIcon:rt["a"],VMenu:ot["a"],VProgressLinear:lt["a"],VRow:ht["a"],VSpacer:ct["a"],VSystemBar:ut["a"],VTextField:dt["a"]})},c982:function(t,e,i){},d951:function(t,e,i){},e53c:function(t,e,i){}}]); \ No newline at end of file diff --git a/www/fhemapp/js/chunk-53c4ff2a.b45e78db.js b/www/fhemapp/js/chunk-53c4ff2a.b45e78db.js deleted file mode 100644 index 47755db7..00000000 --- a/www/fhemapp/js/chunk-53c4ff2a.b45e78db.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-53c4ff2a"],{"02f0":function(t,e,i){},"0ccb":function(t,e,i){var a=i("50c4"),n=i("1148"),s=i("1d80"),r=Math.ceil,o=function(t){return function(e,i,o){var l,h,c=String(s(e)),u=c.length,d=void 0===o?" ":String(o),p=a(i);return p<=u||""==d?c:(l=p-u,h=n.call(d,r(l/d.length)),h.length>l&&(h=h.slice(0,l)),t?c+h:h+c)}};t.exports={start:o(!1),end:o(!0)}},2102:function(t,e,i){},"2af1":function(t,e,i){var a=i("23e7"),n=i("f748");a({target:"Math",stat:!0},{sign:n})},"4d90":function(t,e,i){"use strict";var a=i("23e7"),n=i("0ccb").start,s=i("9a0c");a({target:"String",proto:!0,forced:s},{padStart:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},8308:function(t,e,i){},"9a0c":function(t,e,i){var a=i("342f");t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a)},afd9:function(t,e,i){"use strict";var a=i("5530"),n=(i("a9e3"),i("c7cd"),i("8308"),i("3a66")),s=i("a9ad"),r=i("7560"),o=i("58df"),l=i("80d2");e["a"]=Object(o["a"])(Object(n["a"])("bar",["height","window"]),s["a"],r["a"]).extend({name:"v-system-bar",props:{height:[Number,String],lightsOut:Boolean,window:Boolean},computed:{classes:function(){return Object(a["a"])({"v-system-bar--lights-out":this.lightsOut,"v-system-bar--absolute":this.absolute,"v-system-bar--fixed":!this.absolute&&(this.app||this.fixed),"v-system-bar--window":this.window},this.themeClasses)},computedHeight:function(){return this.height?isNaN(parseInt(this.height))?this.height:parseInt(this.height):this.window?32:24},styles:function(){return{height:Object(l["g"])(this.computedHeight)}}},methods:{updateApplication:function(){return this.$el?this.$el.clientHeight:this.computedHeight}},render:function(t){var e={staticClass:"v-system-bar",class:this.classes,style:this.styles,on:this.$listeners};return t("div",this.setBackgroundColor(this.color,e),Object(l["s"])(this))}})},b009:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-col",{class:t.setup.size},[i("v-card",{attrs:{dark:this.$vuetify.theme.dark,color:"secondary"}},[i("v-progress-linear",{attrs:{height:"7",value:t.vals.mainLevel,color:t.vals.mainColor,"background-color":"secondary darken-1"}}),i("v-card-title",{staticClass:"text-truncate"},[t._v(" "+t._s(t.vals.title)+" "),i("v-spacer"),i("v-btn",{attrs:{small:"",icon:""},on:{click:t.goTo}},[i("v-icon",{attrs:{small:""}},[t._v(" "+t._s(t.vals.linkIcon)+" ")])],1)],1),i("v-divider"),i("v-card-text",{staticClass:"pa-0"},[t.vals.maxSize?i("v-row",{staticClass:"ma-3",attrs:{align:"center"}},[i("v-col",[i("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"","max-width":"290px","min-width":"auto"},scopedSlots:t._u([{key:"activator",fn:function(e){var a=e.on,n=e.attrs;return[i("v-text-field",t._g(t._b({attrs:{readonly:"",label:"von","prepend-icon":"mdi-calendar"},model:{value:t.vals.fromLocale,callback:function(e){t.$set(t.vals,"fromLocale",e)},expression:"vals.fromLocale"}},"v-text-field",n,!1),a))]}}],null,!1,3384966413),model:{value:t.vals.fromPicker,callback:function(e){t.$set(t.vals,"fromPicker",e)},expression:"vals.fromPicker"}},[i("v-date-picker",{attrs:{"no-title":""},on:{input:t.loadChartData},model:{value:t.vals.from,callback:function(e){t.$set(t.vals,"from",e)},expression:"vals.from"}})],1)],1),i("v-col",[i("v-menu",{attrs:{"close-on-content-click":!1,transition:"scale-transition","offset-y":"",left:"","max-width":"290px","min-width":"auto"},scopedSlots:t._u([{key:"activator",fn:function(e){var a=e.on,n=e.attrs;return[i("v-text-field",t._g(t._b({attrs:{readonly:"",label:"bis","prepend-icon":"mdi-calendar"},model:{value:t.vals.toLocale,callback:function(e){t.$set(t.vals,"toLocale",e)},expression:"vals.toLocale"}},"v-text-field",n,!1),a))]}}],null,!1,3313857711),model:{value:t.vals.toPicker,callback:function(e){t.$set(t.vals,"toPicker",e)},expression:"vals.toPicker"}},[i("v-date-picker",{attrs:{"no-title":""},on:{input:t.loadChartData},model:{value:t.vals.to,callback:function(e){t.$set(t.vals,"to",e)},expression:"vals.to"}})],1)],1)],1):t._e(),i("apexchart",{attrs:{options:t.chart.options,series:t.chart.series},on:{zoomed:t.afterZoom}})],1),i("v-divider"),i("v-system-bar",{attrs:{color:"secondary darken-1"}},[i("v-icon",[t._v(t._s(t.vals.systemIcon))]),i("v-spacer")],1)],1)],1)},n=[],s=i("b85c"),r=(i("4de4"),i("466d"),i("ac1f"),i("1276"),i("a434"),i("5319"),i("d81d"),i("b680"),{props:{item:{type:Object,default:function(){return{name:"chart"}}}},data:function(){return{name:"chart",setup:{size:"col-12 col-sm-12 col-md-6 col-lg-4",daysAgo:-7,daysTo:1},vals:{title:"",mainLevel:0,mainColor:"success",maxSize:!1,linkIcon:"mdi-arrow-expand",fromPicker:!1,from:"",fromLocale:"",toPicker:!1,to:"",systemIcon:"mdi-chart-bar"},chart:{options:{theme:{mode:"dark"},chart:{type:"line",height:"auto",toolbar:{show:!1}},stroke:{curve:"smooth"},tooltip:{x:{format:"ddd dd.MM.yy HH:mm:ss"}},xaxis:{type:"datetime",labels:{format:"dd.MM.yy",datetimeUTC:!1}},yaxis:[]},series:[]}}},watch:{item:{immediate:!0,deep:!0,handler:function(t){var e=this.$fhem.getEl(t,"Attributes","alias")||t.Name;this.vals.title=this.$fhem.getEl(t,"Options","name")||e}},"vals.from":function(t){this.vals.fromLocale=new Date(t).toLocaleString("de-DE",{dateStyle:"medium"})},"vals.to":function(t){this.vals.toLocale=new Date(t).toLocaleString("de-DE",{dateStyle:"medium"})}},created:function(){this.init()},methods:{init:function(){var t=this.$fhem.getEl(this.item,"Options","setup");t&&Object.assign(this.setup,t),this.setup.lineWidth&&(this.chart.options.stroke.width=this.setup.lineWidth),this.$route.params.filter&&this.$route.params.filter.match("&size=max")&&(this.vals.maxSize=!0,this.setup.size="col-12",this.vals.linkIcon="mdi-arrow-collapse"),this.vals.from=this.$fhem.getDate(this.setup.daysAgo),this.vals.to=this.$fhem.getDate(this.setup.daysTo),this.chart.options.chart.height=window.innerHeight>600&&this.vals.maxSize?parseInt(window.innerHeight-320):"auto",this.chart.options.theme.mode=this.$vuetify.theme.dark?"dark":"light",this.loadChartData()},goTo:function(){this.vals.maxSize?this.$router.go(-1):this.$router.push("/devices/device="+this.item.Name+"&size=max")},afterZoom:function(t,e){var i=e.xaxis;this.vals.from=new Date(i.min).toISOString().split("T")[0],this.vals.to=new Date(i.max).toISOString().split("T")[0],this.loadChartData()},loadChartData:function(){var t=this;this.vals.fromPicker=!1,this.vals.toPicker=!1;var e=!1,i=!1;if(this.item){this.$fhem.loading=!0;var a={deviceName:this.item.Name,from:this.vals.from,to:this.vals.to,defs:this.item.Options.chartDef};this.$fhem.readLogData(a).then((function(a){if(a.defs.length>0){var n=0;t.chart.options.yaxis.splice(0),t.chart.series.splice(0);var r,o=Object(s["a"])(a.defs);try{var l=function(){var o=r.value,l=/\(.*\)/.exec(o),h=l?o.replace(l[0],"_").split(":"):o.split(":"),c=[],u=a.data[a.data.map((function(t){return t.id})).indexOf(n)].data,d="secondary"===h[4];if(!e&&!d||!i&&d){d||(e=!0),d&&(i=!0);var p={seriesName:h[2]||"",opposite:d,labels:{formatter:function(t){var e="";return t&&(e=t.toFixed(1)+h[3]),e}}};t.chart.options.yaxis.push(p)}var m,f=Object(s["a"])(u);try{for(f.s();!(m=f.n()).done;){var v=m.value;c.push([v.timestamp,v.value])}}catch(g){f.e(g)}finally{f.f()}t.chart.series.push({name:h[2],data:c}),n++};for(o.s();!(r=o.n()).done;)l()}catch(h){o.e(h)}finally{o.f()}}t.chart.options=Object.assign({},t.chart.options),t.$fhem.loading=!1}))}else this.$fhem.emit("message",{type:"error",message:"no valid device defined"})}}}),o=r,l=i("2877"),h=i("6544"),c=i.n(h),u=i("8336"),d=i("b0af"),p=i("99d9"),m=i("62ad"),f=i("5530"),v=(i("a9e3"),i("caad"),i("99af"),i("b0c0"),i("d951"),i("9d26")),g=(i("498a"),i("a9ad")),y=i("58df"),b=i("80d2"),k=Object(y["a"])(g["a"]).extend({methods:{genPickerButton:function(t,e,i){var a=this,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=this[t]===e,o=function(i){i.stopPropagation(),a.$emit("update:".concat(Object(b["w"])(t)),e)};return this.$createElement("div",{staticClass:"v-picker__title__btn ".concat(s).trim(),class:{"v-picker__title__btn--active":r,"v-picker__title__btn--readonly":n},on:r||n?void 0:{click:o}},Array.isArray(i)?i:[i])}}}),D=Object(y["a"])(k).extend({name:"v-date-picker-title",props:{date:{type:String,default:""},disabled:Boolean,readonly:Boolean,selectingYear:Boolean,value:{type:String},year:{type:[Number,String],default:""},yearIcon:{type:String}},data:function(){return{isReversing:!1}},computed:{computedTransition:function(){return this.isReversing?"picker-reverse-transition":"picker-transition"}},watch:{value:function(t,e){this.isReversing=t>=0,t=String(t),i=String(i),t.length>e?String(t):(e-=t.length,e>i.length&&(i+=i.repeat(e/i.length)),i.slice(0,e)+String(t))}),M=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return S(t,e,"0")};function O(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:0,length:0},a=function(t){var e=t.trim().split(" ")[0].split("-"),i=Object($["a"])(e,3),a=i[0],n=i[1],s=i[2];return[M(a,4),M(n||1),M(s||1)].join("-")};try{var n=new Intl.DateTimeFormat(t||void 0,e);return function(t){return n.format(new Date("".concat(a(t),"T00:00:00+00:00")))}}catch(s){return i.start||i.length?function(t){return a(t).substr(i.start||0,i.length)}:void 0}}var Y=O,E=function(t,e){var i=t.split("-").map(Number),a=Object($["a"])(i,2),n=a[0],s=a[1];return s+e===0?"".concat(n-1,"-12"):s+e===13?"".concat(n+1,"-01"):"".concat(n,"-").concat(M(s+e))},B=Object(y["a"])(g["a"],x,C["a"]).extend({name:"v-date-picker-header",props:{disabled:Boolean,format:Function,min:String,max:String,nextAriaLabel:String,nextIcon:{type:String,default:"$next"},prevAriaLabel:String,prevIcon:{type:String,default:"$prev"},readonly:Boolean,value:{type:[Number,String],required:!0}},data:function(){return{isReversing:!1}},computed:{formatter:function(){return this.format?this.format:String(this.value).split("-")[1]?Y(this.currentLocale,{month:"long",year:"numeric",timeZone:"UTC"},{length:7}):Y(this.currentLocale,{year:"numeric",timeZone:"UTC"},{length:4})}},watch:{value:function(t,e){this.isReversing=t0?this.nextAriaLabel:this.prevAriaLabel,a=i?this.$vuetify.lang.t(i):void 0,n=this.disabled||t<0&&this.min&&this.calculateChange(t)0&&this.max&&this.calculateChange(t)>this.max;return this.$createElement(w["a"],{attrs:{"aria-label":a},props:{dark:this.dark,disabled:n,icon:!0,light:this.light},on:{click:function(i){i.stopPropagation(),e.$emit("input",e.calculateChange(t))}}},[this.$createElement(v["a"],t<0===!this.$vuetify.rtl?this.prevIcon:this.nextIcon)])},calculateChange:function(t){var e=String(this.value).split("-").map(Number),i=Object($["a"])(e,2),a=i[0],n=i[1];return null==n?"".concat(a+t):E(String(this.value),t)},genHeader:function(){var t=this,e=!this.disabled&&(this.color||"accent"),i=this.$createElement("div",this.setTextColor(e,{key:String(this.value)}),[this.$createElement("button",{attrs:{type:"button"},on:{click:function(){return t.$emit("toggle")}}},[this.$slots.default||this.formatter(String(this.value))])]),a=this.$createElement("transition",{props:{name:this.isReversing===!this.$vuetify.rtl?"tab-reverse-transition":"tab-transition"}},[i]);return this.$createElement("div",{staticClass:"v-date-picker-header__value",class:{"v-date-picker-header__value--disabled":this.disabled}},[a])}},render:function(){return this.$createElement("div",{staticClass:"v-date-picker-header",class:Object(f["a"])({"v-date-picker-header--disabled":this.disabled},this.themeClasses)},[this.genBtn(-1),this.genHeader(),this.genBtn(1)])}}),A=(i("2af1"),i("4d90"),i("2909")),j=(i("2532"),i("c982"),i("c3f0"));i("13d5"),i("b64b"),i("8a79");function F(t,e,i){return Object.keys(t.$listeners).reduce((function(a,n){return n.endsWith(e)&&(a[n.slice(0,-e.length)]=function(e){return t.$emit(n,i,e)}),a}),{})}function I(t,e){return Object.keys(t.$listeners).reduce((function(i,a){return a.endsWith(e)&&(i[a]=t.$listeners[a]),i}),{})}var _=function(t,e){var i=t.split("-"),a=Object($["a"])(i,3),n=a[0],s=a[1],r=void 0===s?1:s,o=a[2],l=void 0===o?1:o;return"".concat(n,"-").concat(M(r),"-").concat(M(l)).substr(0,{date:10,month:7,year:4}[e])};function P(t,e,i,a){return(!a||a(t))&&(!e||t>=e.substr(0,10))&&(!i||t<=i)}var L=i("d9f7"),V=Object(y["a"])(g["a"],x,C["a"]).extend({directives:{Touch:j["a"]},props:{allowedDates:Function,current:String,disabled:Boolean,format:Function,events:{type:[Array,Function,Object],default:function(){return null}},eventColor:{type:[Array,Function,Object,String],default:function(){return"warning"}},min:String,max:String,range:Boolean,readonly:Boolean,scrollable:Boolean,tableDate:{type:String,required:!0},value:[String,Array]},data:function(){return{isReversing:!1,wheelThrottle:null}},computed:{computedTransition:function(){return this.isReversing===!this.$vuetify.rtl?"tab-reverse-transition":"tab-transition"},displayedMonth:function(){return Number(this.tableDate.split("-")[1])-1},displayedYear:function(){return Number(this.tableDate.split("-")[0])}},watch:{tableDate:function(t,e){this.isReversing=t4&&void 0!==arguments[4]&&arguments[4],s=P(t,this.min,this.max,this.allowedDates),r=this.isSelected(t)&&s,o=t===this.current,l=r?this.setBackgroundColor:this.setTextColor,h=(r||o)&&(this.color||"accent");return this.$createElement("button",l(h,{staticClass:"v-btn",class:this.genButtonClasses(s&&!n,e,r,o),attrs:{type:"button"},domProps:{disabled:this.disabled||!s||n},on:this.genButtonEvents(t,s,i)}),[this.$createElement("div",{staticClass:"v-btn__content"},[a(t)]),this.genEvents(t)])},getEventColors:function(t){var e,i=function(t){return Array.isArray(t)?t:[t]},a=[];return e=Array.isArray(this.events)?this.events.includes(t):this.events instanceof Function?this.events(t)||!1:this.events&&this.events[t]||!1,e?(a=!0!==e?i(e):"string"===typeof this.eventColor?[this.eventColor]:"function"===typeof this.eventColor?i(this.eventColor(t)):Array.isArray(this.eventColor)?this.eventColor:i(this.eventColor[t]),a.filter((function(t){return t}))):[]},genEvents:function(t){var e=this,i=this.getEventColors(t);return i.length?this.$createElement("div",{staticClass:"v-date-picker-table__events"},i.map((function(t){return e.$createElement("div",e.setBackgroundColor(t))}))):null},isValidScroll:function(t,e){var i=e(t.deltaY),a=1===i.split("-").length?"year":"month";return 0===t.deltaY||t.deltaY<0&&(!this.min||i>=_(this.min,a))||t.deltaY>0&&(!this.max||i<=_(this.max,a))},wheel:function(t,e){this.$emit("update:table-date",e(t.deltaY))},touch:function(t,e){this.$emit("update:table-date",e(t))},genTable:function(t,e,i){var a=this,n=this.$createElement("transition",{props:{name:this.computedTransition}},[this.$createElement("table",{key:this.tableDate},e)]),s={name:"touch",value:{left:function(t){return t.offsetX<-15&&a.touch(1,i)},right:function(t){return t.offsetX>15&&a.touch(-1,i)}}};return this.$createElement("div",{staticClass:t,class:Object(f["a"])({"v-date-picker-table--disabled":this.disabled},this.themeClasses),on:!this.disabled&&this.scrollable?{wheel:function(t){t.preventDefault(),a.isValidScroll(t,i)&&a.wheelThrottle(t,i)}}:void 0,directives:[s]},[n])},isSelected:function(t){if(Array.isArray(this.value)){if(this.range&&2===this.value.length){var e=Object(A["a"])(this.value).sort(),i=Object($["a"])(e,2),a=i[0],n=i[1];return a<=t&&t<=n}return-1!==this.value.indexOf(t)}return t===this.value}}});function N(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return t<100&&t>=0?(e=new Date(Date.UTC(t,i,a)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC(t,i,a)),e}function W(t,e,i){var a=7+e-i,n=(7+N(t,0,a).getUTCDay()-e)%7;return-n+a-1}function H(t,e,i,a){var n=[0,31,59,90,120,151,181,212,243,273,304,334][e];return e>1&&z(t)&&n++,n+i}function R(t,e,i){var a=W(t,e,i),n=W(t+1,e,i),s=z(t)?366:365;return(s-a+n)/7}function U(t,e,i,a,n){var s=W(t,a,n),r=Math.ceil((H(t,e,i,a)-s)/7);return r<1?r+R(t-1,a,n):r>R(t,a,n)?r-R(t,a,n):r}function z(t){return t%4===0&&t%100!==0||t%400===0}var Z=Object(y["a"])(V).extend({name:"v-date-picker-date-table",props:{firstDayOfWeek:{type:[String,Number],default:0},localeFirstDayOfYear:{type:[String,Number],default:0},showAdjacentMonths:Boolean,showWeek:Boolean,weekdayFormat:Function},computed:{formatter:function(){return this.format||Y(this.currentLocale,{day:"numeric",timeZone:"UTC"},{start:8,length:2})},weekdayFormatter:function(){return this.weekdayFormat||Y(this.currentLocale,{weekday:"narrow",timeZone:"UTC"})},weekDays:function(){var t=this,e=parseInt(this.firstDayOfWeek,10);return this.weekdayFormatter?Object(b["h"])(7).map((function(i){return t.weekdayFormatter("2017-01-".concat(e+i+15))})):Object(b["h"])(7).map((function(t){return["S","M","T","W","T","F","S"][(t+e)%7]}))}},methods:{calculateTableDate:function(t){return E(this.tableDate,Math.sign(t||1))},genTHead:function(){var t=this,e=this.weekDays.map((function(e){return t.$createElement("th",e)}));return this.showWeek&&e.unshift(this.$createElement("th")),this.$createElement("thead",this.genTR(e))},weekDaysBeforeFirstDayOfTheMonth:function(){var t=new Date("".concat(this.displayedYear,"-").concat(M(this.displayedMonth+1),"-01T00:00:00+00:00")),e=t.getUTCDay();return(e-parseInt(this.firstDayOfWeek)+7)%7},getWeekNumber:function(t){return U(this.displayedYear,this.displayedMonth,t,parseInt(this.firstDayOfWeek),parseInt(this.localeFirstDayOfYear))},genWeekNumber:function(t){return this.$createElement("td",[this.$createElement("small",{staticClass:"v-date-picker-table--date__week"},String(t).padStart(2,"0"))])},genTBody:function(){var t=[],e=new Date(this.displayedYear,this.displayedMonth+1,0).getDate(),i=[],a=this.weekDaysBeforeFirstDayOfTheMonth();this.showWeek&&i.push(this.genWeekNumber(this.getWeekNumber(1)));var n=this.displayedMonth?this.displayedYear:this.displayedYear-1,s=(this.displayedMonth+11)%12,r=new Date(this.displayedYear,this.displayedMonth,0).getDate(),o=this.showWeek?8:7;while(a--){var l="".concat(n,"-").concat(M(s+1),"-").concat(M(r-a));i.push(this.$createElement("td",this.showAdjacentMonths?[this.genButton(l,!0,"date",this.formatter,!0)]:[]))}for(a=1;a<=e;a++){var h="".concat(this.displayedYear,"-").concat(M(this.displayedMonth+1),"-").concat(M(a));i.push(this.$createElement("td",[this.genButton(h,!0,"date",this.formatter)])),i.length%o===0&&(t.push(this.genTR(i)),i=[],this.showWeek&&(a=a;n--)t.push(this.genYearItem(n));return t}},render:function(){return this.$createElement("ul",{staticClass:"v-date-picker-years",ref:"years"},this.genYearItems())}})),X=(i("0481"),i("e53c"),i("615b"),i("c995")),G=Object(y["a"])(g["a"],X["a"],C["a"]).extend({name:"v-picker",props:{flat:Boolean,fullWidth:Boolean,landscape:Boolean,noTitle:Boolean,transition:{type:String,default:"fade-transition"},width:{type:[Number,String],default:290}},computed:{computedTitleColor:function(){var t=!this.isDark&&(this.color||"primary");return this.color||t}},methods:{genTitle:function(){return this.$createElement("div",this.setBackgroundColor(this.computedTitleColor,{staticClass:"v-picker__title",class:{"v-picker__title--landscape":this.landscape}}),this.$slots.title)},genBodyTransition:function(){return this.$createElement("transition",{props:{name:this.transition}},this.$slots.default)},genBody:function(){return this.$createElement("div",{staticClass:"v-picker__body",class:Object(f["a"])({"v-picker__body--no-title":this.noTitle},this.themeClasses),style:this.fullWidth?void 0:{width:Object(b["g"])(this.width)}},[this.genBodyTransition()])},genActions:function(){return this.$createElement("div",{staticClass:"v-picker__actions v-card__actions",class:{"v-picker__actions--no-title":this.noTitle}},this.$slots.actions)}},render:function(t){return t("div",{staticClass:"v-picker v-card",class:Object(f["a"])(Object(f["a"])({"v-picker--flat":this.flat,"v-picker--landscape":this.landscape,"v-picker--full-width":this.fullWidth},this.themeClasses),this.elevationClasses)},[this.$slots.title?this.genTitle():null,this.genBody(),this.$slots.actions?this.genActions():null])}}),K=G,Q=Object(y["a"])(g["a"],X["a"],C["a"]).extend({name:"picker",props:{flat:Boolean,fullWidth:Boolean,headerColor:String,landscape:Boolean,noTitle:Boolean,width:{type:[Number,String],default:290}},methods:{genPickerTitle:function(){return null},genPickerBody:function(){return null},genPickerActionsSlot:function(){return this.$scopedSlots.default?this.$scopedSlots.default({save:this.save,cancel:this.cancel}):this.$slots.default},genPicker:function(t){var e=[];if(!this.noTitle){var i=this.genPickerTitle();i&&e.push(i)}var a=this.genPickerBody();return a&&e.push(a),e.push(this.$createElement("template",{slot:"actions"},[this.genPickerActionsSlot()])),this.$createElement(K,{staticClass:t,props:{color:this.headerColor||this.color,dark:this.dark,elevation:this.elevation,flat:this.flat,fullWidth:this.fullWidth,landscape:this.landscape,light:this.light,width:this.width,noTitle:this.noTitle}},e)}}}),tt=(i("53ca"),[0,31,28,31,30,31,30,31,31,30,31,30,31]),et=[0,31,29,31,30,31,30,31,31,30,31,30,31];function it(t,e){return z(t)?et[e]:tt[e]}var at=i("d9bd"),nt=Object(y["a"])(x,Q).extend({name:"v-date-picker",props:{allowedDates:Function,dayFormat:Function,disabled:Boolean,events:{type:[Array,Function,Object],default:function(){return null}},eventColor:{type:[Array,Function,Object,String],default:function(){return"warning"}},firstDayOfWeek:{type:[String,Number],default:0},headerDateFormat:Function,localeFirstDayOfYear:{type:[String,Number],default:0},max:String,min:String,monthFormat:Function,multiple:Boolean,nextIcon:{type:String,default:"$next"},nextMonthAriaLabel:{type:String,default:"$vuetify.datePicker.nextMonthAriaLabel"},nextYearAriaLabel:{type:String,default:"$vuetify.datePicker.nextYearAriaLabel"},pickerDate:String,prevIcon:{type:String,default:"$prev"},prevMonthAriaLabel:{type:String,default:"$vuetify.datePicker.prevMonthAriaLabel"},prevYearAriaLabel:{type:String,default:"$vuetify.datePicker.prevYearAriaLabel"},range:Boolean,reactive:Boolean,readonly:Boolean,scrollable:Boolean,showCurrent:{type:[Boolean,String],default:!0},selectedItemsText:{type:String,default:"$vuetify.datePicker.itemsSelected"},showAdjacentMonths:Boolean,showWeek:Boolean,titleDateFormat:Function,type:{type:String,default:"date",validator:function(t){return["date","month"].includes(t)}},value:[Array,String],weekdayFormat:Function,yearFormat:Function,yearIcon:String},data:function(){var t=this,e=new Date;return{activePicker:this.type.toUpperCase(),inputDay:null,inputMonth:null,inputYear:null,isReversing:!1,now:e,tableDate:function(){if(t.pickerDate)return t.pickerDate;var i=Object(b["H"])(t.value),a=i[i.length-1]||("string"===typeof t.showCurrent?t.showCurrent:"".concat(e.getFullYear(),"-").concat(e.getMonth()+1));return _(a,"date"===t.type?"month":"year")}()}},computed:{multipleValue:function(){return Object(b["H"])(this.value)},isMultiple:function(){return this.multiple||this.range},lastValue:function(){return this.isMultiple?this.multipleValue[this.multipleValue.length-1]:this.value},selectedMonths:function(){return this.value&&"month"!==this.type?this.isMultiple?this.multipleValue.map((function(t){return t.substr(0,7)})):this.value.substr(0,7):this.value},current:function(){return!0===this.showCurrent?_("".concat(this.now.getFullYear(),"-").concat(this.now.getMonth()+1,"-").concat(this.now.getDate()),this.type):this.showCurrent||null},inputDate:function(){return"date"===this.type?"".concat(this.inputYear,"-").concat(M(this.inputMonth+1),"-").concat(M(this.inputDay)):"".concat(this.inputYear,"-").concat(M(this.inputMonth+1))},tableMonth:function(){return Number((this.pickerDate||this.tableDate).split("-")[1])-1},tableYear:function(){return Number((this.pickerDate||this.tableDate).split("-")[0])},minMonth:function(){return this.min?_(this.min,"month"):null},maxMonth:function(){return this.max?_(this.max,"month"):null},minYear:function(){return this.min?_(this.min,"year"):null},maxYear:function(){return this.max?_(this.max,"year"):null},formatters:function(){return{year:this.yearFormat||Y(this.currentLocale,{year:"numeric",timeZone:"UTC"},{length:4}),titleDate:this.titleDateFormat||(this.isMultiple?this.defaultTitleMultipleDateFormatter:this.defaultTitleDateFormatter)}},defaultTitleMultipleDateFormatter:function(){var t=this;return function(e){return e.length?1===e.length?t.defaultTitleDateFormatter(e[0]):t.$vuetify.lang.t(t.selectedItemsText,e.length):"-"}},defaultTitleDateFormatter:function(){var t={year:{year:"numeric",timeZone:"UTC"},month:{month:"long",timeZone:"UTC"},date:{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"}},e=Y(this.currentLocale,t[this.type],{start:0,length:{date:10,month:7,year:4}[this.type]}),i=function(t){return e(t).replace(/([^\d\s])([\d])/g,(function(t,e,i){return"".concat(e," ").concat(i)})).replace(", ",",
")};return this.landscape?i:e}},watch:{tableDate:function(t,e){var i="month"===this.type?"year":"month";this.isReversing=_(t,i)<_(e,i),this.$emit("update:picker-date",t)},pickerDate:function(t){t?this.tableDate=t:this.lastValue&&"date"===this.type?this.tableDate=_(this.lastValue,"month"):this.lastValue&&"month"===this.type&&(this.tableDate=_(this.lastValue,"year"))},value:function(t,e){this.checkMultipleProp(),this.setInputDate(),(this.isMultiple||!this.value||this.pickerDate)&&(!this.isMultiple||!this.multipleValue.length||e&&e.length||this.pickerDate)||(this.tableDate=_(this.inputDate,"month"===this.type?"year":"month"))},type:function(t){if(this.activePicker=t.toUpperCase(),this.value&&this.value.length){var e=this.multipleValue.map((function(e){return _(e,t)})).filter(this.isDateAllowed);this.$emit("input",this.isMultiple?e:e[0])}}},created:function(){this.checkMultipleProp(),this.pickerDate!==this.tableDate&&this.$emit("update:picker-date",this.tableDate),this.setInputDate()},methods:{emitInput:function(t){if(this.range)if(1!==this.multipleValue.length)this.$emit("input",[t]);else{var e=[this.multipleValue[0],t];this.$emit("input",e),this.$emit("change",e)}else{var i=this.multiple?-1===this.multipleValue.indexOf(t)?this.multipleValue.concat([t]):this.multipleValue.filter((function(e){return e!==t})):t;this.$emit("input",i),this.multiple||this.$emit("change",t)}},checkMultipleProp:function(){if(null!=this.value){var t=this.value.constructor.name,e=this.isMultiple?"Array":"String";t!==e&&Object(at["c"])("Value must be ".concat(this.isMultiple?"an":"a"," ").concat(e,", got ").concat(t),this)}},isDateAllowed:function(t){return P(t,this.min,this.max,this.allowedDates)},yearClick:function(t){this.inputYear=t,"month"===this.type?this.tableDate="".concat(t):this.tableDate="".concat(t,"-").concat(M((this.tableMonth||0)+1)),this.activePicker="MONTH",this.reactive&&!this.readonly&&!this.isMultiple&&this.isDateAllowed(this.inputDate)&&this.$emit("input",this.inputDate)},monthClick:function(t){this.inputYear=parseInt(t.split("-")[0],10),this.inputMonth=parseInt(t.split("-")[1],10)-1,"date"===this.type?(this.inputDay&&(this.inputDay=Math.min(this.inputDay,it(this.inputYear,this.inputMonth+1))),this.tableDate=t,this.activePicker="DATE",this.reactive&&!this.readonly&&!this.isMultiple&&this.isDateAllowed(this.inputDate)&&this.$emit("input",this.inputDate)):this.emitInput(this.inputDate)},dateClick:function(t){this.inputYear=parseInt(t.split("-")[0],10),this.inputMonth=parseInt(t.split("-")[1],10)-1,this.inputDay=parseInt(t.split("-")[2],10),this.emitInput(this.inputDate)},genPickerTitle:function(){var t=this;return this.$createElement(D,{props:{date:this.value?this.formatters.titleDate(this.isMultiple?this.multipleValue:this.value):"",disabled:this.disabled,readonly:this.readonly,selectingYear:"YEAR"===this.activePicker,year:this.formatters.year(this.multipleValue.length?"".concat(this.inputYear):this.tableDate),yearIcon:this.yearIcon,value:this.multipleValue[0]},slot:"title",on:{"update:selecting-year":function(e){return t.activePicker=e?"YEAR":t.type.toUpperCase()}}})},genTableHeader:function(){var t=this;return this.$createElement(B,{props:{nextIcon:this.nextIcon,color:this.color,dark:this.dark,disabled:this.disabled,format:this.headerDateFormat,light:this.light,locale:this.locale,min:"DATE"===this.activePicker?this.minMonth:this.minYear,max:"DATE"===this.activePicker?this.maxMonth:this.maxYear,nextAriaLabel:"DATE"===this.activePicker?this.nextMonthAriaLabel:this.nextYearAriaLabel,prevAriaLabel:"DATE"===this.activePicker?this.prevMonthAriaLabel:this.prevYearAriaLabel,prevIcon:this.prevIcon,readonly:this.readonly,value:"DATE"===this.activePicker?"".concat(M(this.tableYear,4),"-").concat(M(this.tableMonth+1)):"".concat(M(this.tableYear,4))},on:{toggle:function(){return t.activePicker="DATE"===t.activePicker?"MONTH":"YEAR"},input:function(e){return t.tableDate=e}}})},genDateTable:function(){var t=this;return this.$createElement(Z,{props:{allowedDates:this.allowedDates,color:this.color,current:this.current,dark:this.dark,disabled:this.disabled,events:this.events,eventColor:this.eventColor,firstDayOfWeek:this.firstDayOfWeek,format:this.dayFormat,light:this.light,locale:this.locale,localeFirstDayOfYear:this.localeFirstDayOfYear,min:this.min,max:this.max,range:this.range,readonly:this.readonly,scrollable:this.scrollable,showAdjacentMonths:this.showAdjacentMonths,showWeek:this.showWeek,tableDate:"".concat(M(this.tableYear,4),"-").concat(M(this.tableMonth+1)),value:this.value,weekdayFormat:this.weekdayFormat},ref:"table",on:Object(f["a"])({input:this.dateClick,"update:table-date":function(e){return t.tableDate=e}},I(this,":date"))})},genMonthTable:function(){var t=this;return this.$createElement(q,{props:{allowedDates:"month"===this.type?this.allowedDates:null,color:this.color,current:this.current?_(this.current,"month"):null,dark:this.dark,disabled:this.disabled,events:"month"===this.type?this.events:null,eventColor:"month"===this.type?this.eventColor:null,format:this.monthFormat,light:this.light,locale:this.locale,min:this.minMonth,max:this.maxMonth,range:this.range,readonly:this.readonly&&"month"===this.type,scrollable:this.scrollable,value:this.selectedMonths,tableDate:"".concat(M(this.tableYear,4))},ref:"table",on:Object(f["a"])({input:this.monthClick,"update:table-date":function(e){return t.tableDate=e}},I(this,":month"))})},genYears:function(){return this.$createElement(J,{props:{color:this.color,format:this.yearFormat,locale:this.locale,min:this.minYear,max:this.maxYear,value:this.tableYear},on:Object(f["a"])({input:this.yearClick},I(this,":year"))})},genPickerBody:function(){var t="YEAR"===this.activePicker?[this.genYears()]:[this.genTableHeader(),"DATE"===this.activePicker?this.genDateTable():this.genMonthTable()];return this.$createElement("div",{key:this.activePicker},t)},setInputDate:function(){if(this.lastValue){var t=this.lastValue.split("-");this.inputYear=parseInt(t[0],10),this.inputMonth=parseInt(t[1],10)-1,"date"===this.type&&(this.inputDay=parseInt(t[2],10))}else this.inputYear=this.inputYear||this.now.getFullYear(),this.inputMonth=null==this.inputMonth?this.inputMonth:this.now.getMonth(),this.inputDay=this.inputDay||this.now.getDate()}},render:function(){return this.genPicker("v-picker--date")}}),st=i("ce7e"),rt=i("132d"),ot=i("e449"),lt=i("8e36"),ht=i("0fd9"),ct=i("2fa4"),ut=i("afd9"),dt=i("8654"),pt=Object(l["a"])(o,a,n,!1,null,null,null);e["default"]=pt.exports;c()(pt,{VBtn:u["a"],VCard:d["a"],VCardText:p["c"],VCardTitle:p["d"],VCol:m["a"],VDatePicker:nt,VDivider:st["a"],VIcon:rt["a"],VMenu:ot["a"],VProgressLinear:lt["a"],VRow:ht["a"],VSpacer:ct["a"],VSystemBar:ut["a"],VTextField:dt["a"]})},c982:function(t,e,i){},d951:function(t,e,i){},e53c:function(t,e,i){}}]); \ No newline at end of file