iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
24 lines (20 loc) • 12.3 kB
JavaScript
/*! For license information please see chunk.f8a28842a34423263b4c.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[5906,9577],{18601:(t,e,n)=>{"use strict";n.d(e,{qN:()=>s.q,Wg:()=>i});var s=n(78220);class i extends s.H{click(){this.formElement&&(this.formElement.focus(),this.formElement.click())}setAriaLabel(t){this.formElement&&this.formElement.setAttribute("aria-label",t)}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}i.shadowRootOptions={mode:"open",delegatesFocus:!0}},63207:(t,e,n)=>{"use strict";n(65660),n(15112);var s=n(9672),i=n(87156),r=n(50856),o=n(65233);(0,s.k)({_template:r.d`
<style>
:host {
--layout-inline;
--layout-center-center;
position: relative;
vertical-align: middle;
fill: var(--iron-icon-fill-color, currentcolor);
stroke: var(--iron-icon-stroke-color, none);
width: var(--iron-icon-width, 24px);
height: var(--iron-icon-height, 24px);
--iron-icon;
}
:host([hidden]) {
display: none;
}
</style>
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:o.XY.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(t){var e=(t||"").split(":");this._iconName=e.pop(),this._iconsetName=e.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(t){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&(0,i.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,i.vz)(this.root).appendChild(this._img))}})},15112:(t,e,n)=>{"use strict";n.d(e,{P:()=>i});n(65233);var s=n(9672);class i{constructor(t){i[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)}get value(){var t=this.type,e=this.key;if(t&&e)return i.types[t]&&i.types[t][e]}set value(t){var e=this.type,n=this.key;e&&n&&(e=i.types[e]=i.types[e]||{},null==t?delete e[n]:e[n]=t)}get list(){if(this.type){var t=i.types[this.type];return t?Object.keys(t).map((function(t){return r[this.type][t]}),this):[]}}byKey(t){return this.key=t,this.value}}i[" "]=function(){},i.types={};var r=i.types;(0,s.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(t,e,n){var s=new i({type:t,key:e});return void 0!==n&&n!==s.value?s.value=n:this.value!==s.value&&(this.value=s.value),s},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(t){t&&(this.value=this)},byKey:function(t){return new i({type:this.type,key:t}).value}})},91107:(t,e,n)=>{"use strict";n.d(e,{Ud:()=>h});const s=Symbol("Comlink.proxy"),i=Symbol("Comlink.endpoint"),r=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.thrown"),a=t=>"object"==typeof t&&null!==t||"function"==typeof t,c=new Map([["proxy",{canHandle:t=>a(t)&&t[s],serialize(t){const{port1:e,port2:n}=new MessageChannel;return l(t,e),[n,[n]]},deserialize:t=>(t.start(),h(t))}],["throw",{canHandle:t=>a(t)&&o in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function l(t,e=self){e.addEventListener("message",(function n(i){if(!i||!i.data)return;const{id:r,type:a,path:c}=Object.assign({path:[]},i.data),h=(i.data.argumentList||[]).map(m);let d;try{const e=c.slice(0,-1).reduce(((t,e)=>t[e]),t),n=c.reduce(((t,e)=>t[e]),t);switch(a){case"GET":d=n;break;case"SET":e[c.slice(-1)[0]]=m(i.data.value),d=!0;break;case"APPLY":d=n.apply(e,h);break;case"CONSTRUCT":d=function(t){return Object.assign(t,{[s]:!0})}(new n(...h));break;case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel;l(t,n),d=function(t,e){return v.set(t,e),t}(e,[e])}break;case"RELEASE":d=void 0;break;default:return}}catch(t){d={value:t,[o]:0}}Promise.resolve(d).catch((t=>({value:t,[o]:0}))).then((t=>{const[s,i]=y(t);e.postMessage(Object.assign(Object.assign({},s),{id:r}),i),"RELEASE"===a&&(e.removeEventListener("message",n),u(e))}))})),e.start&&e.start()}function u(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function h(t,e){return p(t,[],e)}function d(t){if(t)throw new Error("Proxy has been released and is not useable")}function p(t,e=[],n=function(){}){let s=!1;const o=new Proxy(n,{get(n,i){if(d(s),i===r)return()=>g(t,{type:"RELEASE",path:e.map((t=>t.toString()))}).then((()=>{u(t),s=!0}));if("then"===i){if(0===e.length)return{then:()=>o};const n=g(t,{type:"GET",path:e.map((t=>t.toString()))}).then(m);return n.then.bind(n)}return p(t,[...e,i])},set(n,i,r){d(s);const[o,a]=y(r);return g(t,{type:"SET",path:[...e,i].map((t=>t.toString())),value:o},a).then(m)},apply(n,r,o){d(s);const a=e[e.length-1];if(a===i)return g(t,{type:"ENDPOINT"}).then(m);if("bind"===a)return p(t,e.slice(0,-1));const[c,l]=f(o);return g(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:c},l).then(m)},construct(n,i){d(s);const[r,o]=f(i);return g(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:r},o).then(m)}});return o}function f(t){const e=t.map(y);return[e.map((t=>t[0])),(n=e.map((t=>t[1])),Array.prototype.concat.apply([],n))];var n}const v=new WeakMap;function y(t){for(const[e,n]of c)if(n.canHandle(t)){const[s,i]=n.serialize(t);return[{type:"HANDLER",name:e,value:s},i]}return[{type:"RAW",value:t},v.get(t)||[]]}function m(t){switch(t.type){case"HANDLER":return c.get(t.name).deserialize(t.value);case"RAW":return t.value}}function g(t,e,n){return new Promise((s=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===i&&(t.removeEventListener("message",e),s(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:i},e),n)}))}},3239:(t,e,n)=>{"use strict";function s(t){if(!t||"object"!=typeof t)return t;if("[object Date]"==Object.prototype.toString.call(t))return new Date(t.getTime());if(Array.isArray(t))return t.map(s);var e={};return Object.keys(t).forEach((function(n){e[n]=s(t[n])})),e}n.d(e,{Z:()=>s})},98626:(t,e,n)=>{"use strict";function s(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function i(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const i=s(n);return(t,n)=>i.then((s=>n(s.transaction(e,t).objectStore(e))))}let r;function o(){return r||(r=i("keyval-store","keyval")),r}function a(t,e=o()){return e("readonly",(e=>s(e.get(t))))}function c(t,e,n=o()){return n("readwrite",(n=>(n.put(e,t),s(n.transaction))))}function l(t=o()){return t("readwrite",(t=>(t.clear(),s(t.transaction))))}n.d(e,{ZH:()=>l,MT:()=>i,U2:()=>a,RV:()=>s,t8:()=>c})},78389:(t,e,n)=>{"use strict";n.d(e,{s:()=>d});var s=n(99602),i=n(55122),r=n(57724);const o=(t,e)=>{var n,s;const i=t.N;if(void 0===i)return!1;for(const t of i)null===(s=(n=t).O)||void 0===s||s.call(n,e,!1),o(t,e);return!0},a=t=>{let e,n;do{if(void 0===(e=t.M))break;n=e.N,n.delete(t),t=e}while(0===(null==n?void 0:n.size))},c=t=>{for(let e;e=t.M;t=e){let n=e.N;if(void 0===n)e.N=n=new Set;else if(n.has(t))break;n.add(t),h(e)}};function l(t){void 0!==this.N?(a(this),this.M=t,c(this)):this.M=t}function u(t,e=!1,n=0){const s=this.H,i=this.N;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(s))for(let t=n;t<s.length;t++)o(s[t],!1),a(s[t]);else null!=s&&(o(s,!1),a(s));else o(this,t)}const h=t=>{var e,n,s,r;t.type==i.pX.CHILD&&(null!==(e=(s=t).P)&&void 0!==e||(s.P=u),null!==(n=(r=t).Q)&&void 0!==n||(r.Q=l))};class d extends i.Xe{constructor(){super(...arguments),this.isConnected=!0,this.ut=s.Jb,this.N=void 0}T(t,e,n){super.T(t,e,n),c(this)}O(t,e=!0){this.at(t),e&&(o(this,t),a(this))}at(t){var e,n;t!==this.isConnected&&(t?(this.isConnected=!0,this.ut!==s.Jb&&(this.setValue(this.ut),this.ut=s.Jb),null===(e=this.reconnected)||void 0===e||e.call(this)):(this.isConnected=!1,null===(n=this.disconnected)||void 0===n||n.call(this)))}S(t,e){if(!this.isConnected)throw Error(`AsyncDirective ${this.constructor.name} was rendered while its tree was disconnected.`);return super.S(t,e)}setValue(t){if(this.isConnected)if((0,r.OR)(this.Σdt))this.Σdt.I(t,this);else{const e=[...this.Σdt.H];e[this.Σct]=t,this.Σdt.I(e,this,0)}else this.ut=t}disconnected(){}reconnected(){}}},57724:(t,e,n)=>{"use strict";n.d(e,{E_:()=>v,i9:()=>p,_Y:()=>l,pt:()=>r,OR:()=>a,hN:()=>o,ws:()=>f,fk:()=>u,hl:()=>d});var s=n(99602);const{et:i}=s.Vm,r=t=>null===t||"object"!=typeof t&&"function"!=typeof t,o=(t,e)=>{var n,s;return void 0===e?void 0!==(null===(n=t)||void 0===n?void 0:n._$litType$):(null===(s=t)||void 0===s?void 0:s._$litType$)===e},a=t=>void 0===t.strings,c=()=>document.createComment(""),l=(t,e,n)=>{var s;const r=t.A.parentNode,o=void 0===e?t.B:e.A;if(void 0===n){const e=r.insertBefore(c(),o),s=r.insertBefore(c(),o);n=new i(e,s,t,t.options)}else{const e=n.B.nextSibling,i=n.M!==t;if(i&&(null===(s=n.Q)||void 0===s||s.call(n,t),n.M=t),e!==o||i){let t=n.A;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return n},u=(t,e,n=t)=>(t.I(e,n),t),h={},d=(t,e=h)=>t.H=e,p=t=>t.H,f=t=>{var e;null===(e=t.P)||void 0===e||e.call(t,!1,!0);let n=t.A;const s=t.B.nextSibling;for(;n!==s;){const t=n.nextSibling;n.remove(),n=t}},v=t=>{t.R()}},24731:(t,e,n)=>{"use strict";n.d(e,{s:()=>s.s});var s=n(78389)},19967:(t,e,n)=>{"use strict";n.d(e,{Xe:()=>s.Xe,pX:()=>s.pX,XM:()=>s.XM});var s=n(55122)},76666:(t,e,n)=>{"use strict";n.d(e,{$:()=>s.$});var s=n(81471)},82816:(t,e,n)=>{"use strict";n.d(e,{o:()=>s.o});var s=n(49629)},13690:(t,e,n)=>{"use strict";n.d(e,{r:()=>a});var s=n(99602),i=n(55122),r=n(57724);const o=(t,e,n)=>{const s=new Map;for(let i=e;i<=n;i++)s.set(t[i],i);return s},a=(0,i.XM)(class extends i.Xe{constructor(t){if(super(t),t.type!==i.pX.CHILD)throw Error("repeat() can only be used in text expressions")}Mt(t,e,n){let s;void 0===n?n=e:void 0!==e&&(s=e);const i=[],r=[];let o=0;for(const e of t)i[o]=s?s(e,o):o,r[o]=n(e,o),o++;return{values:r,keys:i}}render(t,e,n){return this.Mt(t,e,n).values}update(t,[e,n,i]){var a;const c=(0,r.i9)(t),{values:l,keys:u}=this.Mt(e,n,i);if(!c)return this.Pt=u,l;const h=null!==(a=this.Pt)&&void 0!==a?a:this.Pt=[],d=[];let p,f,v=0,y=c.length-1,m=0,g=l.length-1;for(;v<=y&&m<=g;)if(null===c[v])v++;else if(null===c[y])y--;else if(h[v]===u[m])d[m]=(0,r.fk)(c[v],l[m]),v++,m++;else if(h[y]===u[g])d[g]=(0,r.fk)(c[y],l[g]),y--,g--;else if(h[v]===u[g])d[g]=(0,r.fk)(c[v],l[g]),(0,r._Y)(t,d[g+1],c[v]),v++,g--;else if(h[y]===u[m])d[m]=(0,r.fk)(c[y],l[m]),(0,r._Y)(t,c[v],c[y]),y--,m++;else if(void 0===p&&(p=o(u,m,g),f=o(h,v,y)),p.has(h[v]))if(p.has(h[y])){const e=f.get(u[m]),n=void 0!==e?c[e]:null;if(null===n){const e=(0,r._Y)(t,c[v]);(0,r.fk)(e,l[m]),d[m]=e}else d[m]=(0,r.fk)(n,l[m]),(0,r._Y)(t,c[v],n),c[e]=null;m++}else(0,r.ws)(c[y]),y--;else(0,r.ws)(c[v]),v++;for(;m<=g;){const e=(0,r._Y)(t,d[g+1]);(0,r.fk)(e,l[m]),d[m++]=e}for(;v<=y;){const t=c[v++];null!==t&&(0,r.ws)(t)}return this.Pt=u,(0,r.hl)(t,d),s.Jb}})},92483:(t,e,n)=>{"use strict";n.d(e,{V:()=>s.V});var s=n(79865)}}]);
//# sourceMappingURL=chunk.f8a28842a34423263b4c.js.map