iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 8.8 kB
JavaScript
/*! For license information please see chunk.d24404e98d7bf40a7267.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[2002],{43453:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});n(43437);var i=/\.splices$/,r=/\.length$/,o=/\.?#?([0-9]+)$/,a={properties:{data:{type:Object,notify:!0,value:function(){return this.zeroValue}},sequentialTransactions:{type:Boolean,value:!1},log:{type:Boolean,value:!1}},observers:["__dataChanged(data.*)"],created:function(){this.__initialized=!1,this.__syncingToMemory=!1,this.__initializingStoredValue=null,this.__transactionQueueAdvances=Promise.resolve()},ready:function(){this._initializeStoredValue()},get isNew(){return!0},get transactionsComplete(){return this.__transactionQueueAdvances},get zeroValue(){},saveValue:function(e){return Promise.resolve()},reset:function(){},destroy:function(){return this.data=this.zeroValue,this.saveValue()},initializeStoredValue:function(){return this.isNew?Promise.resolve():this._getStoredValue("data").then(function(e){if(this._log("Got stored value!",e,this.data),null==e)return this._setStoredValue("data",this.data||this.zeroValue);this.syncToMemory((function(){this.set("data",e)}))}.bind(this))},getStoredValue:function(e){return Promise.resolve()},setStoredValue:function(e,t){return Promise.resolve(t)},memoryPathToStoragePath:function(e){return e},storagePathToMemoryPath:function(e){return e},syncToMemory:function(e){this.__syncingToMemory||(this._group("Sync to memory."),this.__syncingToMemory=!0,e.call(this),this.__syncingToMemory=!1,this._groupEnd("Sync to memory."))},valueIsEmpty:function(e){return Array.isArray(e)?0===e.length:Object.prototype.isPrototypeOf(e)?0===Object.keys(e).length:null==e},_getStoredValue:function(e){return this.getStoredValue(this.memoryPathToStoragePath(e))},_setStoredValue:function(e,t){return this.setStoredValue(this.memoryPathToStoragePath(e),t)},_enqueueTransaction:function(e){if(this.sequentialTransactions)e=e.bind(this);else{var t=e.call(this);e=function(){return t}}return this.__transactionQueueAdvances=this.__transactionQueueAdvances.then(e).catch(function(e){this._error("Error performing queued transaction.",e)}.bind(this))},_log:function(){if(this.log){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.log.apply(console,t)}},_error:function(){if(this.log){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.error.apply(console,t)}},_group:function(){if(this.log){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.group.apply(console,t)}},_groupEnd:function(){if(this.log){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];console.groupEnd.apply(console,t)}},_initializeStoredValue:function(){if(this.__initializingStoredValue)return null;this._group("Initializing stored value.");var e=this.__initializingStoredValue=this.initializeStoredValue().then(function(){this.__initialized=!0,this.__initializingStoredValue=null,this._groupEnd("Initializing stored value.")}.bind(this)).catch(function(e){this.__initializingStoredValue=null,this._groupEnd("Initializing stored value.")}.bind(this));return this._enqueueTransaction((function(){return e}))},__dataChanged:function(e){if(!this.isNew&&!this.__syncingToMemory&&this.__initialized&&!this.__pathCanBeIgnored(e.path)){var t=this.__normalizeMemoryPath(e.path),n=e.value,i=n&&n.indexSplices;this._enqueueTransaction((function(){return this._log("Setting",t+":",i||n),i&&this.__pathIsSplices(t)&&(t=this.__parentPath(t),n=this.get(t)),this._setStoredValue(t,n)}))}},__normalizeMemoryPath:function(e){for(var t=e.split("."),n=[],i=[],r=[],o=0;o<t.length;++o)i.push(t[o]),/^#/.test(t[o])?r.push(this.get(n).indexOf(this.get(i))):r.push(t[o]),n.push(t[o]);return r.join(".")},__parentPath:function(e){var t=e.split(".");return t.slice(0,t.length-1).join(".")},__pathCanBeIgnored:function(e){return r.test(e)&&Array.isArray(this.get(this.__parentPath(e)))},__pathIsSplices:function(e){return i.test(e)&&Array.isArray(this.get(this.__parentPath(e)))},__pathRefersToArray:function(e){return(i.test(e)||r.test(e))&&Array.isArray(this.get(this.__parentPath(e)))},__pathTailToIndex:function(e){var t=e.split(".").pop();return window.parseInt(t.replace(o,"$1"),10)}}},25782:function(e,t,n){"use strict";n(43437),n(65660),n(47686),n(97968);var i=n(9672),r=n(50856),o=n(33760);function a(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style include="paper-item-shared-styles"></style>\n <style>\n :host {\n @apply --layout-horizontal;\n @apply --layout-center;\n @apply --paper-font-subhead;\n\n @apply --paper-item;\n @apply --paper-icon-item;\n }\n\n .content-icon {\n @apply --layout-horizontal;\n @apply --layout-center;\n\n width: var(--paper-item-icon-width, 56px);\n @apply --paper-item-icon;\n }\n </style>\n\n <div id="contentIcon" class="content-icon">\n <slot name="item-icon"></slot>\n </div>\n <slot></slot>\n']);return a=function(){return e},e}(0,i.k)({_template:(0,r.d)(a()),is:"paper-icon-item",behaviors:[o.U]})},33760:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});n(43437);var i=n(51644),r=n(26110),o=[i.P,r.a,{hostAttributes:{role:"option",tabindex:"0"}}]},89194:function(e,t,n){"use strict";n(43437),n(65660),n(1656),n(47686);var i=n(9672),r=n(50856);function o(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n <style>\n :host {\n overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */\n @apply --layout-vertical;\n @apply --layout-center-justified;\n @apply --layout-flex;\n }\n\n :host([two-line]) {\n min-height: var(--paper-item-body-two-line-min-height, 72px);\n }\n\n :host([three-line]) {\n min-height: var(--paper-item-body-three-line-min-height, 88px);\n }\n\n :host > ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n :host > ::slotted([secondary]) {\n @apply --paper-font-body1;\n\n color: var(--paper-item-body-secondary-color, var(--secondary-text-color));\n\n @apply --paper-item-body-secondary;\n }\n </style>\n\n <slot></slot>\n"]);return o=function(){return e},e}(0,i.k)({_template:(0,r.d)(o()),is:"paper-item-body"})},97968:function(e,t,n){"use strict";n(65660),n(15495),n(1656),n(47686);var i=document.createElement("template");i.setAttribute("style","display: none;"),i.innerHTML="<dom-module id=\"paper-item-shared-styles\">\n <template>\n <style>\n :host, .paper-item {\n display: block;\n position: relative;\n min-height: var(--paper-item-min-height, 48px);\n padding: 0px 16px;\n }\n\n .paper-item {\n @apply --paper-font-subhead;\n border:none;\n outline: none;\n background: white;\n width: 100%;\n text-align: left;\n }\n\n :host([hidden]), .paper-item[hidden] {\n display: none !important;\n }\n\n :host(.iron-selected), .paper-item.iron-selected {\n font-weight: var(--paper-item-selected-weight, bold);\n\n @apply --paper-item-selected;\n }\n\n :host([disabled]), .paper-item[disabled] {\n color: var(--paper-item-disabled-color, var(--disabled-text-color));\n\n @apply --paper-item-disabled;\n }\n\n :host(:focus), .paper-item:focus {\n position: relative;\n outline: 0;\n\n @apply --paper-item-focused;\n }\n\n :host(:focus):before, .paper-item:focus:before {\n @apply --layout-fit;\n\n background: currentColor;\n content: '';\n opacity: var(--dark-divider-opacity);\n pointer-events: none;\n\n @apply --paper-item-focused-before;\n }\n </style>\n </template>\n</dom-module>",document.head.appendChild(i.content)},53973:function(e,t,n){"use strict";n(43437),n(65660),n(97968);var i=n(9672),r=n(50856),o=n(33760);function a(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style include="paper-item-shared-styles">\n :host {\n @apply --layout-horizontal;\n @apply --layout-center;\n @apply --paper-font-subhead;\n\n @apply --paper-item;\n }\n </style>\n <slot></slot>\n']);return a=function(){return e},e}(0,i.k)({_template:(0,r.d)(a()),is:"paper-item",behaviors:[o.U]})}}]);
//# sourceMappingURL=chunk.d24404e98d7bf40a7267.js.map