iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 14.7 kB
JavaScript
/*! For license information please see chunk.643cac484cbbe1116dd1.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[9753],{39841:function(e,t,n){"use strict";n(65233),n(65660);var i,o,r,s=n(9672),a=n(87156),l=n(50856),h=n(44181);(0,s.k)({_template:(0,l.d)(i||(o=['\n <style>\n :host {\n display: block;\n /**\n * Force app-header-layout to have its own stacking context so that its parent can\n * control the stacking of it relative to other elements (e.g. app-drawer-layout).\n * This could be done using `isolation: isolate`, but that\'s not well supported\n * across browsers.\n */\n position: relative;\n z-index: 0;\n }\n\n #wrapper ::slotted([slot=header]) {\n @apply --layout-fixed-top;\n z-index: 1;\n }\n\n #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) {\n height: 100%;\n }\n\n :host([has-scrolling-region]) #wrapper ::slotted([slot=header]) {\n position: absolute;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) #wrapper #contentContainer {\n @apply --layout-fit;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing #contentContainer {\n position: relative;\n }\n\n :host([fullbleed]) {\n @apply --layout-vertical;\n @apply --layout-fit;\n }\n\n :host([fullbleed]) #wrapper,\n :host([fullbleed]) #wrapper #contentContainer {\n @apply --layout-vertical;\n @apply --layout-flex;\n }\n\n #contentContainer {\n /* Create a stacking context here so that all children appear below the header. */\n position: relative;\n z-index: 0;\n }\n\n @media print {\n :host([has-scrolling-region]) #wrapper #contentContainer {\n overflow-y: visible;\n }\n }\n\n </style>\n\n <div id="wrapper" class="initializing">\n <slot id="headerSlot" name="header"></slot>\n\n <div id="contentContainer">\n <slot></slot>\n </div>\n </div>\n'],r=['\n <style>\n :host {\n display: block;\n /**\n * Force app-header-layout to have its own stacking context so that its parent can\n * control the stacking of it relative to other elements (e.g. app-drawer-layout).\n * This could be done using \\`isolation: isolate\\`, but that\'s not well supported\n * across browsers.\n */\n position: relative;\n z-index: 0;\n }\n\n #wrapper ::slotted([slot=header]) {\n @apply --layout-fixed-top;\n z-index: 1;\n }\n\n #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) {\n height: 100%;\n }\n\n :host([has-scrolling-region]) #wrapper ::slotted([slot=header]) {\n position: absolute;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing ::slotted([slot=header]) {\n position: relative;\n }\n\n :host([has-scrolling-region]) #wrapper #contentContainer {\n @apply --layout-fit;\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n :host([has-scrolling-region]) #wrapper.initializing #contentContainer {\n position: relative;\n }\n\n :host([fullbleed]) {\n @apply --layout-vertical;\n @apply --layout-fit;\n }\n\n :host([fullbleed]) #wrapper,\n :host([fullbleed]) #wrapper #contentContainer {\n @apply --layout-vertical;\n @apply --layout-flex;\n }\n\n #contentContainer {\n /* Create a stacking context here so that all children appear below the header. */\n position: relative;\n z-index: 0;\n }\n\n @media print {\n :host([has-scrolling-region]) #wrapper #contentContainer {\n overflow-y: visible;\n }\n }\n\n </style>\n\n <div id="wrapper" class="initializing">\n <slot id="headerSlot" name="header"></slot>\n\n <div id="contentContainer">\n <slot></slot>\n </div>\n </div>\n'],r||(r=o.slice(0)),i=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})))),is:"app-header-layout",behaviors:[h.Y],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return(0,a.vz)(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var e=this.header;if(this.isAttached&&e){this.$.wrapper.classList.remove("initializing"),e.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var t=e.offsetHeight;this.hasScrollingRegion?(e.style.left="",e.style.right=""):requestAnimationFrame(function(){var t=this.getBoundingClientRect(),n=document.documentElement.clientWidth-t.right;e.style.left=t.left+"px",e.style.right=n+"px"}.bind(this));var n=this.$.contentContainer.style;e.fixed&&!e.condenses&&this.hasScrollingRegion?(n.marginTop=t+"px",n.paddingTop=""):(n.paddingTop=t+"px",n.marginTop="")}}})},63207:function(e,t,n){"use strict";n(65660),n(15112);var i,o,r,s=n(9672),a=n(87156),l=n(50856),h=n(65233);(0,s.k)({_template:(0,l.d)(i||(o=["\n <style>\n :host {\n @apply --layout-inline;\n @apply --layout-center-center;\n position: relative;\n\n vertical-align: middle;\n\n fill: var(--iron-icon-fill-color, currentcolor);\n stroke: var(--iron-icon-stroke-color, none);\n\n width: var(--iron-icon-width, 24px);\n height: var(--iron-icon-height, 24px);\n @apply --iron-icon;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n"],r||(r=o.slice(0)),i=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})))),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:h.XY.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&(0,a.vz)(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,(0,a.vz)(this.root).appendChild(this._img))}})},44285:function(e,t,n){"use strict";n(65233);var i,o,r,s=n(9672),a=n(50856),l=n(42687);(0,s.k)({_template:(0,a.d)(i||(o=['\n <style>\n :host {\n display: inline-block;\n overflow: hidden;\n position: relative;\n }\n\n #baseURIAnchor {\n display: none;\n }\n\n #sizedImgDiv {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n display: none;\n }\n\n #img {\n display: block;\n width: var(--iron-image-width, auto);\n height: var(--iron-image-height, auto);\n }\n\n :host([sizing]) #sizedImgDiv {\n display: block;\n }\n\n :host([sizing]) #img {\n display: none;\n }\n\n #placeholder {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n background-color: inherit;\n opacity: 1;\n\n @apply --iron-image-placeholder;\n }\n\n #placeholder.faded-out {\n transition: opacity 0.5s linear;\n opacity: 0;\n }\n </style>\n\n <a id="baseURIAnchor" href="#"></a>\n <div id="sizedImgDiv" role="img" hidden$="[[_computeImgDivHidden(sizing)]]" aria-hidden$="[[_computeImgDivARIAHidden(alt)]]" aria-label$="[[_computeImgDivARIALabel(alt, src)]]"></div>\n <img id="img" alt$="[[alt]]" hidden$="[[_computeImgHidden(sizing)]]" crossorigin$="[[crossorigin]]" on-load="_imgOnLoad" on-error="_imgOnError">\n <div id="placeholder" hidden$="[[_computePlaceholderHidden(preload, fade, loading, loaded)]]" class$="[[_computePlaceholderClassName(preload, fade, loading, loaded)]]"></div>\n'],r||(r=o.slice(0)),i=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(r)}})))),is:"iron-image",properties:{src:{type:String,value:""},alt:{type:String,value:null},crossorigin:{type:String,value:null},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1},error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)","_loadStateObserver(src, preventLoad)"],created:function(){this._resolvedSrc=""},_imgOnLoad:function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))},_imgOnError:function(){this.$.img.src===this._resolveSrc(this.src)&&(this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!0))},_computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded},_computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""},_computeImgDivHidden:function(){return!this.sizing},_computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0},_computeImgDivARIALabel:function(){return null!==this.alt?this.alt:""===this.src?"":this._resolveSrc(this.src).replace(/[?|#].*/g,"").split("/").pop()},_computeImgHidden:function(){return!!this.sizing},_widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"},_heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"},_loadStateObserver:function(e,t){var n=this._resolveSrc(e);n!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===e||t?(this._setLoading(!1),this._setLoaded(!1),this._setError(!1)):(this._resolvedSrc=n,this.$.img.src=this._resolvedSrc,this.$.sizedImgDiv.style.backgroundImage='url("'+this._resolvedSrc+'")',this._setLoading(!0),this._setLoaded(!1),this._setError(!1)))},_placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?'url("'+this.placeholder+'")':""},_transformChanged:function(){var e=this.$.sizedImgDiv.style,t=this.$.placeholder.style;e.backgroundSize=t.backgroundSize=this.sizing,e.backgroundPosition=t.backgroundPosition=this.sizing?this.position:"",e.backgroundRepeat=t.backgroundRepeat=this.sizing?"no-repeat":""},_resolveSrc:function(e){var t=(0,l.Kk)(e,this.$.baseURIAnchor.href);return t.length>=2&&"/"===t[0]&&"/"!==t[1]&&(t=(location.origin||location.protocol+"//"+location.host)+t),t}})},15112:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});n(65233);var i=n(9672);function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),e[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)}var t,n,i;return t=e,(n=[{key:"value",get:function(){var t=this.type,n=this.key;if(t&&n)return e.types[t]&&e.types[t][n]},set:function(t){var n=this.type,i=this.key;n&&i&&(n=e.types[n]=e.types[n]||{},null==t?delete n[i]:n[i]=t)}},{key:"list",get:function(){if(this.type){var t=e.types[this.type];return t?Object.keys(t).map((function(e){return s[this.type][e]}),this):[]}}},{key:"byKey",value:function(e){return this.key=e,this.value}}])&&o(t.prototype,n),i&&o(t,i),e}();r[" "]=function(){},r.types={};var s=r.types;(0,i.k)({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,n){var i=new r({type:e,key:t});return void 0!==n&&n!==i.value?i.value=n:this.value!==i.value&&(this.value=i.value),i},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new r({type:this.type,key:e}).value}})},98626:function(e,t,n){"use strict";function i(e){return new Promise((function(t,n){e.oncomplete=e.onsuccess=function(){return t(e.result)},e.onabort=e.onerror=function(){return n(e.error)}}))}function o(e,t){var n=indexedDB.open(e);n.onupgradeneeded=function(){return n.result.createObjectStore(t)};var o=i(n);return function(e,n){return o.then((function(i){return n(i.transaction(t,e).objectStore(t))}))}}var r;function s(){return r||(r=o("keyval-store","keyval")),r}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s();return t("readonly",(function(t){return i(t.get(e))}))}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s();return n("readwrite",(function(n){return n.put(t,e),i(n.transaction)}))}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s();return e("readwrite",(function(e){return e.clear(),i(e.transaction)}))}n.d(t,{ZH:function(){return h},MT:function(){return o},U2:function(){return a},RV:function(){return i},t8:function(){return l}})}}]);
//# sourceMappingURL=chunk.643cac484cbbe1116dd1.js.map