iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
6 lines • 34.5 kB
JavaScript
export const __webpack_ids__=["20651"];export const __webpack_modules__={17803:function(e,t,a){a.d(t,{I:()=>i,_:()=>n});const i=(e,t,a,i)=>{const[n,o,r]=e.split(".",3);return Number(n)>t||Number(n)===t&&(void 0===i?Number(o)>=a:Number(o)>a)||void 0!==i&&Number(n)===t&&Number(o)===a&&Number(r)>=i},n=e=>e.includes("dev")},46467:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{D_:()=>x,NC:()=>y,Nh:()=>g,U8:()=>$,WB:()=>h,mn:()=>f,p6:()=>d,ud:()=>b,yQ:()=>w});a(9359),a(1331);var n=a(16485),o=a(27486),r=a(20382),s=a(11104),c=e([n,s]);[n,s]=c.then?(await c)():c;(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.f)(e.time_zone,t)})));const d=(e,t,a)=>l(t,a.time_zone).format(e),l=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.f)(e.time_zone,t)}))),f=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.f)(e.time_zone,t)}))),h=(e,t,a)=>{const i=m(t,a.time_zone);if(t.date_format===r.t6.language||t.date_format===r.t6.system)return i.format(e);const n=i.formatToParts(e),o=n.find((e=>"literal"===e.type))?.value,s=n.find((e=>"day"===e.type))?.value,c=n.find((e=>"month"===e.type))?.value,d=n.find((e=>"year"===e.type))?.value,l=n.at(n.length-1);let f="literal"===l?.type?l?.value:"";"bg"===t.language&&t.date_format===r.t6.YMD&&(f="");return{[r.t6.DMY]:`${s}${o}${c}${o}${d}${f}`,[r.t6.MDY]:`${c}${o}${s}${o}${d}${f}`,[r.t6.YMD]:`${d}${o}${c}${o}${s}${f}`}[t.date_format]},m=(0,o.Z)(((e,t)=>{const a=e.date_format===r.t6.system?void 0:e.language;return e.date_format===r.t6.language||(e.date_format,r.t6.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.f)(e.time_zone,t)})})),b=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short",timeZone:(0,s.f)(e.time_zone,t)}))),y=(e,t,a)=>v(t,a.time_zone).format(e),v=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric",timeZone:(0,s.f)(e.time_zone,t)}))),g=(e,t,a)=>_(t,a.time_zone).format(e),_=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",timeZone:(0,s.f)(e.time_zone,t)}))),w=(e,t,a)=>k(t,a.time_zone).format(e),k=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",timeZone:(0,s.f)(e.time_zone,t)}))),x=(e,t,a)=>N(t,a.time_zone).format(e),N=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",timeZone:(0,s.f)(e.time_zone,t)}))),$=(e,t,a)=>z(t,a.time_zone).format(e),z=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",timeZone:(0,s.f)(e.time_zone,t)})));i()}catch(e){i(e)}}))},64214:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{DG:()=>h,E8:()=>v,Fu:()=>y,NR:()=>_,o0:()=>f,yD:()=>b});var n=a(16485),o=a(27486),r=a(46467),s=a(33570),c=a(11104),d=a(16922),l=e([n,c,r,s]);[n,c,r,s]=l.then?(await l)():l;const f=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.y)(e)?"h12":"h23",timeZone:(0,c.f)(e.time_zone,t)}))),h=((0,o.Z)((()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}))),(e,t,a)=>m(t,a.time_zone).format(e)),m=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",hour:(0,d.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.y)(e)?"h12":"h23",timeZone:(0,c.f)(e.time_zone,t)}))),b=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",day:"numeric",hour:(0,d.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.y)(e)?"h12":"h23",timeZone:(0,c.f)(e.time_zone,t)}))),y=(e,t,a)=>(new Date).getFullYear()===e.getFullYear()?b(e,t,a):h(e,t,a),v=(e,t,a)=>g(t,a.time_zone).format(e),g=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.y)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,d.y)(e)?"h12":"h23",timeZone:(0,c.f)(e.time_zone,t)}))),_=(e,t,a)=>`${(0,r.WB)(e,t,a)}, ${(0,s.mr)(e,t,a)}`;i()}catch(e){i(e)}}))},33570:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{Vu:()=>f,Zs:()=>b,mr:()=>d,xO:()=>h});var n=a(16485),o=a(27486),r=a(11104),s=a(16922),c=e([n,r]);[n,r]=c.then?(await c)():c;const d=(e,t,a)=>l(t,a.time_zone).format(e),l=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.y)(e)?"h12":"h23",timeZone:(0,r.f)(e.time_zone,t)}))),f=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{hour:(0,s.y)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.y)(e)?"h12":"h23",timeZone:(0,r.f)(e.time_zone,t)}))),h=(e,t,a)=>m(t,a.time_zone).format(e),m=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",hour:(0,s.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.y)(e)?"h12":"h23",timeZone:(0,r.f)(e.time_zone,t)}))),b=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,r.f)(e.time_zone,t)})));i()}catch(e){i(e)}}))},11104:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{f:()=>d});var n=a(16485),o=a(20382),r=e([n]);n=(r.then?(await r)():r)[0];const s=Intl.DateTimeFormat?.().resolvedOptions?.().timeZone,c=s??"UTC",d=(e,t)=>e===o.c_.local&&s?c:t;i()}catch(e){i(e)}}))},16922:function(e,t,a){a.d(t,{y:()=>o});var i=a(27486),n=a(20382);const o=(0,i.Z)((e=>{if(e.time_format===n.zt.language||e.time_format===n.zt.system){const t=e.time_format===n.zt.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===n.zt.am_pm}))},59847:function(e,t,a){a.d(t,{N:()=>n});var i=a(73850);const n=e=>(0,i.M)(e.entity_id)},75278:function(e,t,a){a.d(t,{e:()=>i});const i=(e,t)=>n(e.attributes,t),n=(e,t)=>!!(e.supported_features&t)},50602:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{SL:()=>c,l4:()=>u,sJ:()=>d,uf:()=>f});var n=a(16485),o=a(20382),r=a(34618),s=e([n]);n=(s.then?(await s)():s)[0];const c=e=>d(e.attributes),d=(e,t)=>!!e.unit_of_measurement||!!e.state_class||(t||[]).includes(e.device_class||""),l=e=>{switch(e.number_format){case o.y4.comma_decimal:return["en-US","en"];case o.y4.decimal_comma:return["de","es","it"];case o.y4.space_comma:return["fr","sv","cs"];case o.y4.system:return;default:return e.language}},f=(e,t,a)=>{const i=t?l(t):void 0;return Number.isNaN=Number.isNaN||function e(t){return"number"==typeof t&&e(t)},t?.number_format===o.y4.none||Number.isNaN(Number(e))?Number.isNaN(Number(e))||""===e||t?.number_format!==o.y4.none?"string"==typeof e?e:`${(0,r.N)(e,a?.maximumFractionDigits).toString()}${"currency"===a?.style?` ${a.currency}`:""}`:new Intl.NumberFormat("en-US",h(e,{...a,useGrouping:!1})).format(Number(e)):new Intl.NumberFormat(i,h(e,a)).format(Number(e))},u=(e,t)=>{const a=t?.display_precision;return null!=a?{maximumFractionDigits:a,minimumFractionDigits:a}:Number.isInteger(Number(e?.attributes?.step))&&Number.isInteger(Number(e?.state))?{maximumFractionDigits:0}:void 0},h=(e,t)=>{const a={maximumFractionDigits:2,...t};if("string"!=typeof e)return a;if(!t||void 0===t.minimumFractionDigits&&void 0===t.maximumFractionDigits){const t=e.indexOf(".")>-1?e.split(".")[1].length:0;a.minimumFractionDigits=t,a.maximumFractionDigits=t}return a};i()}catch(e){i(e)}}))},34618:function(e,t,a){a.d(t,{N:()=>i});const i=(e,t=2)=>Math.round(e*10**t)/10**t},23334:function(e,t,a){a.r(t),a.d(t,{HaIconButton:()=>s});var i=a(44249),n=(a(74269),a(57243)),o=a(15093),r=a(20552);a(37583);let s=(0,i.Z)([(0,o.Mo)("ha-icon-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"hide-title",type:Boolean})],key:"hideTitle",value:()=>!1},{kind:"field",decorators:[(0,o.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){this._button?.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value:()=>({mode:"open",delegatesFocus:!0})},{kind:"method",key:"render",value:function(){return n.dy` <mwc-icon-button aria-label="${(0,r.o)(this.label)}" title="${(0,r.o)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,r.o)(this.ariaHasPopup)}" .disabled="${this.disabled}"> ${this.path?n.dy`<ha-svg-icon .path="${this.path}"></ha-svg-icon>`:n.dy`<slot></slot>`} </mwc-icon-button> `}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}`}]}}),n.oi)},65981:function(e,t,a){a.r(t),a.d(t,{HaIcon:()=>w});var i=a(44249),n=a(72621),o=a(57243),r=a(15093),s=a(36522),c=a(22381),d=a(80654),l=(a(92745),a(9359),a(31526),a(27608)),f=a(27486),u=a(37394);const h=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"}]}'),m=(0,f.Z)((async()=>{const e=(0,l.MT)("hass-icon-db","mdi-icon-store");{const t=await(0,l.U2)("_version",e);t?t!==h.version&&(await(0,l.ZH)(e),(0,l.t8)("_version",h.version,e)):(0,l.t8)("_version",h.version,e)}return e})),b=["mdi","hass","hassio","hademo"];let p=[];a(37583);const y={},v={},g=(0,c.D)((()=>(async e=>{const t=Object.keys(e),a=await Promise.all(Object.values(e));(await m())("readwrite",(i=>{a.forEach(((a,n)=>{Object.entries(a).forEach((([e,t])=>{i.put(t,e)})),delete e[t[n]]}))}))})(v)),2e3),_={};let w=(0,i.Z)([(0,r.Mo)("ha-icon")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)()],key:"icon",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_path",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_secondaryPath",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_viewBox",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_legacy",value:()=>!1},{kind:"method",key:"willUpdate",value:function(e){(0,n.Z)(i,"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?o.dy` <iron-icon .icon="${this.icon}"></iron-icon>`:o.dy`<ha-svg-icon .path="${this._path}" .secondaryPath="${this._secondaryPath}" .viewBox="${this._viewBox}"></ha-svg-icon>`:o.Ld}},{kind:"method",key:"_loadIcon",value:async function(){if(!this.icon)return;const e=this.icon,[t,i]=this.icon.split(":",2);let n,o=i;if(!t||!o)return;if(!b.includes(t)){const a=d.g[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(o),e)):void(this._legacy=!0)}if(this._legacy=!1,o in y){const e=y[o];let a;e.newName?(a=`Icon ${t}:${o} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,o=e.newName):a=`Icon ${t}:${o} 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(a),(0,s.B)(this,"write_log",{level:"warning",message:a})}if(o in _)return void(this._path=_[o]);if("home-assistant"===o){const t=(await a.e("48348").then(a.bind(a,30511))).mdiHomeAssistant;return this.icon===e&&(this._path=t),void(_[o]=t)}try{n=await(e=>new Promise(((t,a)=>{if(p.push([e,t,a]),p.length>1)return;const i=m();(0,u.n)(1e3,(async()=>{(await i)("readonly",(e=>{for(const[t,a,i]of p)(0,l.RV)(e.get(t)).then((e=>a(e))).catch((e=>i(e)));p=[]}))})()).catch((e=>{for(const[,,t]of p)t(e);p=[]}))})))(o)}catch(e){n=void 0}if(n)return this.icon===e&&(this._path=n),void(_[o]=n);const r=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(o);if(r in v)return void this._setPath(v[r],o,e);const c=fetch(`/static/mdi/${r}.json`).then((e=>e.json()));v[r]=c,this._setPath(c,o,e),g()}},{kind:"method",key:"_setCustomPath",value:async function(e,t){const a=await e;this.icon===t&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}},{kind:"method",key:"_setPath",value:async function(e,t,a){const i=await e;this.icon===a&&(this._path=i[t]),_[t]=i[t]}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`:host{fill:currentcolor}`}]}}),o.oi)},43344:function(e,t,a){var i=a(44249),n=a(72621),o=a(57243),r=a(15093),s=a(36522),c=a(83716);a(23334);(0,i.Z)([(0,r.Mo)("ha-menu-button")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"hassio",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_hasNotifications",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_show",value:()=>!1},{kind:"field",key:"_alwaysVisible",value:()=>!1},{kind:"field",key:"_attachNotifOnConnect",value:()=>!1},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,n.Z)(a,"connectedCallback",this,3)([]),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(a,"disconnectedCallback",this,3)([]),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return o.Ld;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return o.dy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"}" @click="${this._toggleMenu}"></ha-icon-button> ${e?o.dy`<div class="dot"></div>`:""} `}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(a,"firstUpdated",this,3)([e]),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(e){if((0,n.Z)(a,"willUpdate",this,3)([e]),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,i=(e.has("narrow")?e.get("narrow"):this.narrow)||"always_hidden"===t?.dockedSidebar,o=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&i===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}},{kind:"method",key:"_subscribeNotifications",value:function(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,c.r)(this.hass.connection,(e=>{this._hasNotifications=e.length>0}))}},{kind:"method",key:"_toggleMenu",value:function(){(0,s.B)(this,"hass-toggle-menu")}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:50%;border:2px solid var(--app-header-background-color)}`}]}}),o.oi)},51223:function(e,t,a){a.a(e,(async function(e,t){try{var i=a(44249),n=a(57243),o=a(15093),r=a(94571),s=a(59847),c=a(45729),d=(a(65981),a(37583),e([c]));c=(d.then?(await d)():d)[0];(0,i.Z)([(0,o.Mo)("ha-state-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"stateObj",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"stateValue",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"icon",value:void 0},{kind:"method",key:"render",value:function(){const e=this.icon||this.stateObj&&this.hass?.entities[this.stateObj.entity_id]?.icon||this.stateObj?.attributes.icon;if(e)return n.dy`<ha-icon .icon="${e}"></ha-icon>`;if(!this.stateObj)return n.Ld;if(!this.hass)return this._renderFallback();const t=(0,c.gD)(this.hass,this.stateObj,this.stateValue).then((e=>e?n.dy`<ha-icon .icon="${e}"></ha-icon>`:this._renderFallback()));return n.dy`${(0,r.C)(t)}`}},{kind:"method",key:"_renderFallback",value:function(){const e=(0,s.N)(this.stateObj);return n.dy` <ha-svg-icon .path="${c.Ls[e]||c.Rb}"></ha-svg-icon> `}}]}}),n.oi);t()}catch(e){t(e)}}))},37583:function(e,t,a){a.r(t),a.d(t,{HaSvgIcon:()=>r});var i=a(44249),n=a(57243),o=a(15093);let r=(0,i.Z)([(0,o.Mo)("ha-svg-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return n.YP` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?n.YP`<path class="primary-path" d="${this.path}"></path>`:n.Ld} ${this.secondaryPath?n.YP`<path class="secondary-path" d="${this.secondaryPath}"></path>`:n.Ld} </g> </svg>`}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`}]}}),n.oi)},85366:function(e,t,a){var i=a(44249),n=a(82238),o=a(66575),r=a(57243),s=a(15093);(0,i.Z)([(0,s.Mo)("ha-top-app-bar-fixed")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[o.W,r.iv`.mdc-top-app-bar__row{height:var(--header-height);border-bottom:var(--app-header-border-bottom)}.mdc-top-app-bar--fixed-adjust{padding-top:var(--header-height)}.mdc-top-app-bar{--mdc-typography-headline6-font-weight:400;color:var(--app-header-text-color,var(--mdc-theme-on-primary,#fff));background-color:var(--app-header-background-color,var(--mdc-theme-primary))}.mdc-top-app-bar__title{font-size:20px;padding-inline-start:24px;padding-inline-end:initial}`]}]}}),n.s)},80654:function(e,t,a){a.d(t,{g:()=>r});const i=window;"customIconsets"in i||(i.customIconsets={});const n=i.customIconsets,o=window;"customIcons"in o||(o.customIcons={});const r=new Proxy(o.customIcons,{get:(e,t)=>e[t]??(n[t]?{getIcon:n[t]}:void 0)})},83716:function(e,t,a){a.d(t,{r:()=>i});const i=(e,t)=>{const a=new n,i=e.subscribeMessage((e=>t(a.processMessage(e))),{type:"persistent_notification/subscribe"});return()=>{i.then((e=>e?.()))}};class n{constructor(){this.notifications=void 0,this.notifications={}}processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications={...this.notifications,...e.notifications};return Object.values(this.notifications)}}},69919:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{EX:()=>h,Fj:()=>k,M$:()=>x,SO:()=>m,Sk:()=>p,TN:()=>$,UJ:()=>y,Ym:()=>N,hF:()=>b});a(9359),a(56475),a(70104);var n=a(73358),o=a(73850),r=a(59847),s=a(75278),c=a(50602),d=a(1416),l=a(76131),f=a(72473),u=e([c]);c=(u.then?(await u)():u)[0];let h=function(e){return e[e.INSTALL=1]="INSTALL",e[e.SPECIFIC_VERSION=2]="SPECIFIC_VERSION",e[e.PROGRESS=4]="PROGRESS",e[e.BACKUP=8]="BACKUP",e[e.RELEASE_NOTES=16]="RELEASE_NOTES",e}({});const m=e=>(0,s.e)(e,h.PROGRESS)&&null!==e.attributes.update_percentage,b=(e,t=!1)=>(e.state===n.uo||t&&Boolean(e.attributes.skipped_version))&&(0,s.e)(e,h.INSTALL),p=e=>!!e.attributes.in_progress,y=(e,t)=>e.callWS({type:"update/release_notes",entity_id:t}),v="ioBroker Core",g="ioBroker Supervisor",_="ioBroker Operating System",w=(e,t)=>Object.values(e).filter((e=>"update"===(0,r.N)(e))).sort(((e,a)=>e.attributes.title===v?-3:a.attributes.title===v?3:e.attributes.title===_?-2:a.attributes.title===_?2:e.attributes.title===g?-1:a.attributes.title===g?1:(0,d.fe)(e.attributes.title||e.attributes.friendly_name||"",a.attributes.title||a.attributes.friendly_name||"",t))),k=(e,t=!1)=>w(e).filter((e=>b(e,t))),x=async(e,t)=>{const a=w(t.states,t.locale.language).map((e=>e.entity_id));if(!a.length)return void(0,l.showAlertDialog)(e,{title:t.localize("ui.panel.config.updates.no_update_entities.title"),text:t.localize("ui.panel.config.updates.no_update_entities.description"),warning:!0});(0,f.C)(e,{message:t.localize("ui.panel.config.updates.checking_updates")});let i=0;const n=await t.connection.subscribeEvents((a=>{"update"===(0,o.M)(a.data.entity_id)&&(i++,(0,f.C)(e,{message:t.localize("ui.panel.config.updates.updates_refreshed",{count:i})}))}),"state_changed");await t.callService("homeassistant","update_entity",{entity_id:a}),await new Promise((e=>{setTimeout(e,15e3)})),n(),0===i&&(0,f.C)(e,{message:t.localize("ui.panel.config.updates.no_new_updates")})},N=(e,t)=>{const a=e.state,i=e.attributes;if("off"===a){return i.latest_version&&i.skipped_version===i.latest_version?i.latest_version:t.formatEntityState(e)}if("on"===a&&p(e)){return(0,s.e)(e,h.PROGRESS)&&null!==i.update_percentage?t.localize("ui.card.update.installing_with_progress",{progress:(0,c.uf)(i.update_percentage,t.locale,{maximumFractionDigits:i.display_precision,minimumFractionDigits:i.display_precision})}):t.localize("ui.card.update.installing")}return t.formatEntityState(e)},$=(e,t)=>{const a=e.entity_id,i=t[a]?.domain;if("hassio"!==i)return"generic";const n=e.attributes.title||"";return n===v?"home_assistant":[v,g,_].includes(n)?"generic":"addon"};i()}catch(e){i(e)}}))},87611:function(e,t,a){a.a(e,(async function(e,i){try{a.r(t);var n=a(44249),o=a(72621),r=(a(92745),a(9359),a(31526),a(92519),a(42179),a(89256),a(24931),a(88463),a(57449),a(19814),a(57243)),s=a(15093),c=a(59847),d=a(83523),l=(a(23334),a(43344),a(85366),a(65986)),f=a(28008),u=e([l]);l=(u.then?(await u)():u)[0];const h="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z";(0,n.Z)([(0,s.Mo)("ha-panel-map")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",key:"_entities",value:()=>[]},{kind:"method",key:"render",value:function(){return r.dy` <ha-top-app-bar-fixed> <ha-menu-button slot="navigationIcon" .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> <div slot="title">${this.hass.localize("panel.map")}</div> ${this.hass.user?.is_admin?r.dy`<ha-icon-button slot="actionItems" .label="${this.hass.localize("ui.panel.map.edit_zones")}" .path="${h}" @click="${this._openZonesEditor}"></ha-icon-button>`:""} <ha-map .hass="${this.hass}" .entities="${this._entities}" auto-fit interactive-zones></ha-map> </ha-top-app-bar-fixed> `}},{kind:"method",key:"_openZonesEditor",value:function(){(0,d.c)("/config/zone?historyBack=1")}},{kind:"method",key:"willUpdate",value:function(e){if((0,o.Z)(a,"willUpdate",this,3)([e]),!e.has("hass"))return;const t=e.get("hass");this._getStates(t)}},{kind:"method",key:"_getStates",value:function(e){let t=!1;const a=new Set,i=[];Object.values(this.hass.states).forEach((n=>{"home"!==n.state&&"latitude"in n.attributes&&"longitude"in n.attributes&&(i.push(n.entity_id),"person"===(0,c.N)(n)&&n.attributes.source&&a.add(n.attributes.source),e?.states[n.entity_id]!==n&&(t=!0))})),t&&(this._entities=i.filter((e=>!a.has(e))))}},{kind:"get",static:!0,key:"styles",value:function(){return[f.Qx,r.iv`ha-map{height:calc(100vh - var(--header-height))}`]}}]}}),r.oi);i()}catch(e){i(e)}}))},30511:function(e,t,a){a.r(t),a.d(t,{mdiHomeAssistant:()=>i});const i="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},16485:function(e,t,a){a.a(e,(async function(e,t){try{a(92745);var i=a(61449),n=a(40574),o=a(30532),r=a(41674),s=a(49722),c=a(76632),d=a(7884),l=a(35185),f=a(60933),u=a(44180),h=a(49447);const e=async()=>{const e=(0,u.sS)(),t=[];(0,o.shouldPolyfill)()&&await Promise.all([a.e("80210"),a.e("74055")]).then(a.bind(a,98133)),(0,s.shouldPolyfill)()&&await Promise.all([a.e("83895"),a.e("75297"),a.e("80210"),a.e("60251")]).then(a.bind(a,59095)),(0,i.shouldPolyfill)(e)&&t.push(Promise.all([a.e("83895"),a.e("75297"),a.e("68250")]).then(a.bind(a,80561)).then((()=>(0,h.H)()))),(0,f.shouldPolyfill)()&&t.push(Promise.all([a.e("83895"),a.e("75297"),a.e("65578")]).then(a.bind(a,97995))),(0,n.shouldPolyfill)(e)&&t.push(Promise.all([a.e("83895"),a.e("75297"),a.e("59826")]).then(a.bind(a,31514))),(0,r.shouldPolyfill)(e)&&t.push(Promise.all([a.e("83895"),a.e("75297"),a.e("23649")]).then(a.bind(a,93840))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([a.e("83895"),a.e("75297"),a.e("42831")]).then(a.bind(a,29559))),(0,d.shouldPolyfill)(e)&&t.push(Promise.all([a.e("83895"),a.e("75297"),a.e("57377")]).then(a.bind(a,39030)).then((()=>a.e("61236").then(a.t.bind(a,4121,23))))),(0,l.shouldPolyfill)(e)&&t.push(Promise.all([a.e("83895"),a.e("75297"),a.e("13870")]).then(a.bind(a,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,h.n)(e)))};await e(),t()}catch(e){t(e)}}),1)},28008:function(e,t,a){a.d(t,{$c:()=>s,Qx:()=>o,k1:()=>n,yu:()=>r});var i=a(57243);const n=i.iv`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`,o=i.iv`:host{font-family:var(--paper-font-body1_-_font-family);-webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing);font-size:var(--paper-font-body1_-_font-size);font-weight:var(--paper-font-body1_-_font-weight);line-height:var(--paper-font-body1_-_line-height)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}h1{font-family:var(--paper-font-headline_-_font-family);-webkit-font-smoothing:var(--paper-font-headline_-_-webkit-font-smoothing);white-space:var(--paper-font-headline_-_white-space);overflow:var(--paper-font-headline_-_overflow);text-overflow:var(--paper-font-headline_-_text-overflow);font-size:var(--paper-font-headline_-_font-size);font-weight:var(--paper-font-headline_-_font-weight);line-height:var(--paper-font-headline_-_line-height)}h2{font-family:var(--paper-font-title_-_font-family);-webkit-font-smoothing:var(--paper-font-title_-_-webkit-font-smoothing);white-space:var(--paper-font-title_-_white-space);overflow:var(--paper-font-title_-_overflow);text-overflow:var(--paper-font-title_-_text-overflow);font-size:var(--paper-font-title_-_font-size);font-weight:var(--paper-font-title_-_font-weight);line-height:var(--paper-font-title_-_line-height)}h3{font-family:var(--paper-font-subhead_-_font-family);-webkit-font-smoothing:var(--paper-font-subhead_-_-webkit-font-smoothing);white-space:var(--paper-font-subhead_-_white-space);overflow:var(--paper-font-subhead_-_overflow);text-overflow:var(--paper-font-subhead_-_text-overflow);font-size:var(--paper-font-subhead_-_font-size);font-weight:var(--paper-font-subhead_-_font-weight);line-height:var(--paper-font-subhead_-_line-height)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}${n} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`,r=i.iv`ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between}ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-dialog{--mdc-dialog-min-width:calc(
100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
);--mdc-dialog-max-width:calc(
100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
);--mdc-dialog-min-height:100%;--mdc-dialog-max-height:100%;--vertical-align-dialog:flex-end;--ha-dialog-border-radius:0}}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}.error{color:var(--error-color)}`,s=i.iv`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{-webkit-border-radius:4px;border-radius:4px;background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`;i.iv`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`},79291:function(e,t,a){a.d(t,{T:()=>i});const i="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}};
//# sourceMappingURL=20651.5e33e3cdd9d6e9d0.js.map