iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 8.92 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["97406"],{37394:function(e,a,t){t.d(a,{n:()=>i});t(52247),t(71695),t(40251),t(47021);class c extends Error{constructor(e,...a){super(...a),this.timeout=void 0,Error.captureStackTrace&&Error.captureStackTrace(this,c),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const i=(e,a)=>{const t=new Promise(((a,t)=>{setTimeout((()=>{t(new c(e))}),e)}));return Promise.race([a,t])}},65981:function(e,a,t){t.r(a),t.d(a,{HaIcon:()=>$});var c=t(61701),i=t(72621),s=(t(19083),t(71695),t(40251),t(61006),t(47021),t(57243)),o=t(50778),r=t(36522),n=t(22381),f=t(80654),d=(t(92745),t(9359),t(31526),t(27608)),l=t(27486),b=t(37394);const u=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}'),h=(0,l.Z)((async()=>{const e=(0,d.MT)("hass-icon-db","mdi-icon-store");{const a=await(0,d.U2)("_version",e);a?a!==u.version&&(await(0,d.ZH)(e),(0,d.t8)("_version",u.version,e)):(0,d.t8)("_version",u.version,e)}return e})),v=["mdi","hass","hassio","hademo"];let m=[];t(37583);let w,p,y,k=e=>e;const _={},g={},I=(0,n.D)((()=>(async e=>{const a=Object.keys(e),t=await Promise.all(Object.values(e));(await h())("readwrite",(c=>{t.forEach(((t,i)=>{Object.entries(t).forEach((([e,a])=>{c.put(a,e)})),delete e[a[i]]}))}))})(g)),2e3),P={};let $=(0,c.Z)([(0,o.Mo)("ha-icon")],(function(e,a){class c extends a{constructor(...a){super(...a),e(this)}}return{F:c,d:[{kind:"field",decorators:[(0,o.Cb)()],key:"icon",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_path",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_secondaryPath",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_viewBox",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_legacy",value(){return!1}},{kind:"method",key:"willUpdate",value:function(e){(0,i.Z)(c,"willUpdate",this,3)([e]),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}},{kind:"method",key:"render",value:function(){return this.icon?this._legacy?(0,s.dy)(w||(w=k` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,s.dy)(p||(p=k`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):s.Ld}},{kind:"method",key:"_loadIcon",value:async function(){if(!this.icon)return;const e=this.icon,[a,c]=this.icon.split(":",2);let i,s=c;if(!a||!s)return;if(!v.includes(a)){const t=f.g[a];return t?void(t&&"function"==typeof t.getIcon&&this._setCustomPath(t.getIcon(s),e)):void(this._legacy=!0)}if(this._legacy=!1,s in _){const e=_[s];let t;e.newName?(t=`Icon ${a}:${s} was renamed to ${a}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,s=e.newName):t=`Icon ${a}:${s} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(t),(0,r.B)(this,"write_log",{level:"warning",message:t})}if(s in P)return void(this._path=P[s]);if("home-assistant"===s){const a=(await t.e("48348").then(t.bind(t,30511))).mdiHomeAssistant;return this.icon===e&&(this._path=a),void(P[s]=a)}try{i=await(e=>new Promise(((a,t)=>{if(m.push([e,a,t]),m.length>1)return;const c=h();(0,b.n)(1e3,(async()=>{(await c)("readonly",(e=>{for(const[a,t,c]of m)(0,d.RV)(e.get(a)).then((e=>t(e))).catch((e=>c(e)));m=[]}))})()).catch((e=>{for(const[,,a]of m)a(e);m=[]}))})))(s)}catch(l){i=void 0}if(i)return this.icon===e&&(this._path=i),void(P[s]=i);const o=(e=>{let a;for(const t of u.parts){if(void 0!==t.start&&e<t.start)break;a=t}return a.file})(s);if(o in g)return void this._setPath(g[o],s,e);const n=fetch(`/static/mdi/${o}.json`).then((e=>e.json()));g[o]=n,this._setPath(n,s,e),I()}},{kind:"method",key:"_setCustomPath",value:async function(e,a){const t=await e;this.icon===a&&(this._path=t.path,this._secondaryPath=t.secondaryPath,this._viewBox=t.viewBox)}},{kind:"method",key:"_setPath",value:async function(e,a,t){const c=await e;this.icon===t&&(this._path=c[a]),P[a]=c[a]}},{kind:"field",static:!0,key:"styles",value(){return(0,s.iv)(y||(y=k`:host{fill:currentcolor}`))}}]}}),s.oi)},80654:function(e,a,t){t.d(a,{g:()=>o});const c=window;"customIconsets"in c||(c.customIconsets={});const i=c.customIconsets,s=window;"customIcons"in s||(s.customIcons={});const o=new Proxy(s.customIcons,{get:(e,a)=>{var t;return null!==(t=e[a])&&void 0!==t?t:i[a]?{getIcon:i[a]}:void 0}})},27608:function(e,a,t){t.d(a,{MT:()=>i,RV:()=>c,U2:()=>r,ZH:()=>f,t8:()=>n});t(71695),t(92745),t(9359),t(31526),t(70104),t(40251),t(47021);function c(e){return new Promise(((a,t)=>{e.oncomplete=e.onsuccess=()=>a(e.result),e.onabort=e.onerror=()=>t(e.error)}))}function i(e,a){const t=indexedDB.open(e);t.onupgradeneeded=()=>t.result.createObjectStore(a);const i=c(t);return(e,t)=>i.then((c=>t(c.transaction(a,e).objectStore(a))))}let s;function o(){return s||(s=i("keyval-store","keyval")),s}function r(e,a=o()){return a("readonly",(a=>c(a.get(e))))}function n(e,a,t=o()){return t("readwrite",(t=>(t.put(a,e),c(t.transaction))))}function f(e=o()){return e("readwrite",(e=>(e.clear(),c(e.transaction))))}}}]);
//# sourceMappingURL=97406.1259c4b03194ed69.js.map