iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
28 lines • 47 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[14771],{72487:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{CA:function(){return S},Mi:function(){return T},Pm:function(){return $},Wq:function(){return w},Yq:function(){return d},bl:function(){return L},c2:function(){return _},fr:function(){return v},gu:function(){return k},kz:function(){return c},m9:function(){return j},sl:function(){return g},ur:function(){return E},zB:function(){return p}});a(18111),a(20116);var o=a(74487),r=a(22786),n=a(46927),s=a(8480),l=t([o,s]);[o,s]=l.then?(await l)():l;(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)}));const d=(t,e,a)=>h(e,a.time_zone).format(t),h=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),c=(t,e,a)=>u(e,a.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),p=(t,e,a)=>{var i,o,r,s;const l=m(e,a.time_zone);if(e.date_format===n.ow.language||e.date_format===n.ow.system)return l.format(t);const d=l.formatToParts(t),h=null===(i=d.find(t=>"literal"===t.type))||void 0===i?void 0:i.value,c=null===(o=d.find(t=>"day"===t.type))||void 0===o?void 0:o.value,u=null===(r=d.find(t=>"month"===t.type))||void 0===r?void 0:r.value,p=null===(s=d.find(t=>"year"===t.type))||void 0===s?void 0:s.value,g=d[d.length-1];let f="literal"===(null==g?void 0:g.type)?null==g?void 0:g.value:"";"bg"===e.language&&e.date_format===n.ow.YMD&&(f="");return{[n.ow.DMY]:`${c}${h}${u}${h}${p}${f}`,[n.ow.MDY]:`${u}${h}${c}${h}${p}${f}`,[n.ow.YMD]:`${p}${h}${u}${h}${c}${f}`}[e.date_format]},m=(0,r.A)((t,e)=>{const a=t.date_format===n.ow.system?void 0:t.language;return t.date_format===n.ow.language||(t.date_format,n.ow.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),g=(t,e,a)=>f(e,a.time_zone).format(t),f=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),v=(t,e,a)=>y(e,a.time_zone).format(t),y=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),w=(t,e,a)=>b(e,a.time_zone).format(t),b=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),_=(t,e,a)=>x(e,a.time_zone).format(t),x=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),$=(t,e,a)=>C(e,a.time_zone).format(t),C=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),S=(t,e,a)=>z(e,a.time_zone).format(t),z=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),k=(t,e,a)=>A(e,a.time_zone).format(t),A=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),T=(t,e,a)=>M(e,a.time_zone).format(t),M=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),E=(t,e,a)=>I(e,a.time_zone).format(t),I=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),L=(t,e,a)=>{const i=(0,s.wj)(e.time_zone,a.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:i}).format(t)},j=(t,e,a,i)=>`${L(t,a,i)}/${L(e,a,i)}`;i()}catch(d){i(d)}})},95747:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{CL:function(){return w},GH:function(){return x},Rl:function(){return p},ZS:function(){return v},aQ:function(){return g},r6:function(){return c},yg:function(){return b}});var o=a(74487),r=a(22786),n=a(72487),s=a(30162),l=a(8480),d=a(69543),h=t([o,l,n,s]);[o,l,n,s]=h.then?(await h)():h;const c=(t,e,a)=>u(e,a.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),p=t=>m().format(t),m=(0,r.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),g=(t,e,a)=>f(e,a.time_zone).format(t),f=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),v=(t,e,a)=>y(e,a.time_zone).format(t),y=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),w=(t,e,a)=>(new Date).getFullYear()===t.getFullYear()?v(t,e,a):g(t,e,a),b=(t,e,a)=>_(e,a.time_zone).format(t),_=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,d.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,d.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),x=(t,e,a)=>`${(0,n.zB)(t,e,a)}, ${(0,s.fU)(t,e,a)}`;i()}catch(c){i(c)}})},30162:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{LW:function(){return g},Xs:function(){return p},fU:function(){return d},ie:function(){return c}});var o=a(74487),r=a(22786),n=a(8480),s=a(69543),l=t([o,n]);[o,n]=l.then?(await l)():l;const d=(t,e,a)=>h(e,a.time_zone).format(t),h=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),c=(t,e,a)=>u(e,a.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),p=(t,e,a)=>m(e,a.time_zone).format(t),m=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),g=(t,e,a)=>f(e,a.time_zone).format(t),f=(0,r.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(t.time_zone,e)}));i()}catch(d){i(d)}})},8480:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{fL:function(){return p},n2:function(){return m},wj:function(){return g}});var o,r,n,s=a(74487),l=a(29079),d=a(46927),h=t([s]);s=(h.then?(await h)():h)[0];const c=null===(o=Intl.DateTimeFormat)||void 0===o||null===(r=(n=o.call(Intl)).resolvedOptions)||void 0===r?void 0:r.call(n).timeZone,u=c&&("UTC"===c||"Etc/UTC"===c||c in l)?c:void 0,p=14881==a.j?void 0!==u:null,m=null!=u?u:"UTC",g=(t,e)=>t===d.Wj.local&&u?m:e;i()}catch(c){i(c)}})},69543:function(t,e,a){a.d(e,{J:function(){return r}});a(74423);var i=a(22786),o=a(46927);const r=(0,i.A)(t=>{if(t.time_format===o.Hg.language||t.time_format===o.Hg.system){const e=t.time_format===o.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===o.Hg.am_pm})},93421:function(t,e,a){a.d(e,{IW:function(){return h},dH:function(){return d},fI:function(){return l}});a(44114),a(62953);var i=a(35211),o=a(22792),r=a(32172);const n=(t,e)=>{let a=t;for(const i of e){if(null==a)return;a=a[i]}return a},s=(t,e,a)=>{const o=(0,r.p)({transformer:function(t){return a.call(this,t)},watch:e?[e]:[]}),n=(0,i.Fg)({context:t,subscribe:!0});return(t,e)=>{o(t,e),n(t,e)}},l=t=>s(o.iN,t.entityIdPath[0],function(e){const a=n(this,t.entityIdPath);return"string"==typeof a?null==e?void 0:e[a]:void 0}),d=t=>s(o.X1,t.entityIdPath[0],function(e){const a=n(this,t.entityIdPath);return"string"==typeof a?null==e?void 0:e[a]:void 0}),h=()=>s(o.D5,void 0,({localize:t})=>t)},32172:function(t,e,a){a.d(e,{p:function(){return i}});a(16280),a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);function i(t){return(e,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const i=String(a),o=e;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const t=o._transformers;o._transformers=new Map,t.forEach((t,e)=>o._transformers.set(e,t))}}else{o._transformers=new Map,o._watching=new Map;const t=o.willUpdate;o.willUpdate=function(e){t.call(this,e);const a=new Set;e.forEach((t,e)=>{const i=this._watching.get(e);void 0!==i&&i.forEach(t=>a.add(t))}),a.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}o._transformers.set(a,t.transformer),t.watch&&t.watch.forEach(t=>{let e=o._watching.get(t);e||(e=new Set,o._watching.set(t,e)),e.add(a)});const r=Object.getOwnPropertyDescriptor(e,a);let n;if(void 0===r)n={get(){return this[`__transform_${i}`]},set(t){const e=this[`__transform_${i}`],a=this._transformers.get(i);this[`__transform_${i}`]=a?a.call(this,t):t,this[`__original_${i}`]=t,this.requestUpdate(i,e)},configurable:!0,enumerable:!0};else{const t=r.set;n=Object.assign(Object.assign({},r),{},{set(e){const a=this[`__transform_${i}`],o=this._transformers.get(i);this[`__transform_${i}`]=o?o.call(this,e):e,this[`__original_${i}`]=e,this.requestUpdate(i,a),null==t||t.call(this,e)}})}Object.defineProperty(e,a,n)}}},63130:function(t,e,a){a.d(e,{l:function(){return o}});a(3362);var i=a(50248);const o=async(t,e)=>{var a;if(navigator.clipboard)try{return void(await navigator.clipboard.writeText(t))}catch(n){}const o=e||(null===(a=(0,i.n)())||void 0===a?void 0:a.getRootNode())||document.body,r=document.createElement("textarea");r.value=t,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",o.appendChild(r),r.select(),document.execCommand("copy"),o.removeChild(r)}},14748:function(t,e,a){a.d(e,{G:function(){return i}});a(3362);const i=(t,e,a)=>{let i;const o=async()=>{try{await e(t)}finally{i=setTimeout(()=>o(),a)}};return o(),()=>clearTimeout(i)}},64481:function(t,e,a){a.d(e,{D:function(){return o},J:function(){return n}});a(16280),a(3362),a(55815),a(64979),a(79739);let i=!1;try{i="true"===window.localStorage.getItem("disableViewTransition")}catch(s){}const o=t=>{i=t},r=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},n=t=>{if(!document.startViewTransition||i)return t(!1),Promise.resolve();let e=!1;try{const a=document.startViewTransition(()=>{e=!0,t(!0)});return a.ready.catch(r),a.finished.catch(r)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),e?Promise.reject(a):(t(!1),Promise.resolve())}}},38962:function(t,e,a){a.a(t,async function(t,i){try{a.r(e);a(62953);var o=a(40445),r=a(5124),n=a(67576),s=a(6412),l=a(93421),d=a(1087),h=a(26300),c=(a(67094),t([h]));h=(c.then?(await c)():c)[0];let u,p,m,g,f=t=>t;const v="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",y={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};class w extends r.WF{render(){var t;return(0,r.qy)(u||(u=f` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,s.H)({[this.alertType]:!0}),this.title?"":"no-title",y[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,r.qy)(p||(p=f`<div class="title">${0}</div>`),this.title):r.s6,this.dismissable?(0,r.qy)(m||(m=f`<ha-icon-button ="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(t=this._localize)||void 0===t?void 0:t.call(this,"ui.common.dismiss_alert"),v):r.s6)}_dismissClicked(){(0,d.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}w.styles=(0,r.AH)(g||(g=f`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`)),(0,o.Cg)([(0,n.MZ)()],w.prototype,"title",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"alert-type"})],w.prototype,"alertType",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"dismissable",void 0),(0,o.Cg)([(0,n.wk)(),(0,l.IW)()],w.prototype,"_localize",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"narrow",void 0),w=(0,o.Cg)([(0,n.EM)("ha-alert")],w),i()}catch(u){i(u)}})},13513:function(t,e,a){a(62953);var i=a(40445),o=a(5124),r=a(67576),n=a(36240);let s,l,d=t=>t;class h extends o.WF{render(){const t=(0,n.gN)((0,n.NN)((0,n.S8)(this.value,this.min,this.max),this.min,this.max));return(0,o.JW)(s||(s=d` <svg> <g> <rect/> <rect width="${0}%"/> </g> </svg> `),t)}constructor(...t){super(...t),this.min=0,this.max=100}}h.styles=(0,o.AH)(l||(l=d`rect{height:100%}rect:first-child{width:100%;fill:var(--ha-bar-background-color,var(--secondary-background-color))}rect:last-child{fill:var(--ha-bar-primary-color,var(--primary-color))}svg{border-radius:var(--ha-bar-border-radius,var(--ha-border-radius-sm));height:12px;width:100%}`)),(0,i.Cg)([(0,r.MZ)({type:Number})],h.prototype,"min",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],h.prototype,"max",void 0),(0,i.Cg)([(0,r.MZ)({type:Number})],h.prototype,"value",void 0),h=(0,i.Cg)([(0,r.EM)("ha-bar")],h)},93444:function(t,e,a){var i=a(40445),o=a(5124),r=a(67576);let n,s,l=t=>t;class d extends o.WF{render(){return(0,o.qy)(n||(n=l` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,o.AH)(s||(s=l`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}d=(0,i.Cg)([(0,r.EM)("ha-dialog-footer")],d)},76538:function(t,e,a){a(62953);var i=a(40445),o=a(5124),r=a(67576);let n,s,l,d,h,c,u=t=>t;class p extends o.WF{render(){const t=(0,o.qy)(n||(n=u`<div class="header-title"> <slot name="title"></slot> </div>`)),e=(0,o.qy)(s||(s=u`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,o.qy)(l||(l=u` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,o.qy)(d||(d=u`${0}${0}`),e,t):(0,o.qy)(h||(h=u`${0}${0}`),t,e))}static get styles(){return[(0,o.AH)(c||(c=u`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))} all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`))]}constructor(...t){super(...t),this.subtitlePosition="below",this.showBorder=!1}}(0,i.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],p.prototype,"subtitlePosition",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],p.prototype,"showBorder",void 0),p=(0,i.Cg)([(0,r.EM)("ha-dialog-header")],p)},72554:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953),a(49255);var i=a(40445),o=a(93900),r=a(35211),n=a(5124),s=a(67576),l=a(63672),d=a(1087),h=a(64481),c=a(22792),u=a(59992),p=a(14503),m=a(22348),g=(a(76538),a(26300)),f=t([o,g,u]);[o,g,u]=f.then?(await f)():f;let v,y,w,b,_,x,$,C=t=>t;const S="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class z extends((0,u.V)(n.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(t){super.updated(t),t.has("open")&&(this._open=this.open)}render(){var t,e,a;return(0,n.qy)(v||(v=C` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" ="${0}" -hide="${0}" -show="${0}" -after-show="${0}" -after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" ="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,l.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?n.s6:(0,n.qy)(y||(y=C`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(t=null===(e=this._i18n)||void 0===e||null===(a=e.localize)||void 0===a?void 0:a.call(e,"ui.common.close"))&&void 0!==t?t:"Close",S,void 0!==this.headerTitle?(0,n.qy)(w||(w=C`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,n.qy)(b||(b=C`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,n.qy)(_||(_=C`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,n.qy)(x||(x=C`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(t){this._open?(0,h.J)(()=>{this._setFullscreen(t.detail)}):this._setFullscreen(t.detail)}_setFullscreen(t){this.toggleAttribute("fullscreen",t)}_handleBodyScroll(t){this._bodyScrolled=t.target.scrollTop>0}_handleKeyDown(t){"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)}_handleHide(t){var e;const a=(null===(e=t.detail)||void 0===e?void 0:e.source)===t.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&t.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,p.dp,(0,n.AH)($||($=C`wa-dialog{--full-width:var(
--ha-dialog-width-full,
min(95vw, var(--safe-width))
);--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
--ha-dialog-surface-background,
var(--card-background-color, var(--ha-color-surface-default))
);--wa-panel-border-radius:var(
--ha-dialog-border-radius,
var(--ha-border-radius-3xl)
);max-width:var(--ha-dialog-max-width,var(--safe-width))} (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)} all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
--ha-dialog-header-title-font-size,
var(--ha-font-size-2xl)
);line-height:var(
--ha-dialog-header-title-line-height,
var(--ha-line-height-condensed)
);font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}constructor(...t){super(...t),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var t,e;if(null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,m.V)(this._hassConfig.auth.external)){const t=this.querySelector("[autofocus]");return void(null!==t&&(t.id||(t.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})))}null===(e=this.querySelector("[autofocus]"))||void 0===e||e.focus()}))},this._handleAfterShow=t=>{t.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,i.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],z.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],z.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],z.prototype,"open",void 0),(0,i.Cg)([(0,s.MZ)({reflect:!0})],z.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:String,reflect:!0,attribute:"width"})],z.prototype,"width",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],z.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"header-title"})],z.prototype,"headerTitle",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"header-subtitle"})],z.prototype,"headerSubtitle",void 0),(0,i.Cg)([(0,s.MZ)({type:String,attribute:"header-subtitle-position"})],z.prototype,"headerSubtitlePosition",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],z.prototype,"flexContent",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,attribute:"without-header"})],z.prototype,"withoutHeader",void 0),(0,i.Cg)([(0,s.wk)()],z.prototype,"_open",void 0),(0,i.Cg)([(0,s.P)(".body")],z.prototype,"bodyContainer",void 0),(0,i.Cg)([(0,s.wk)(),(0,r.Fg)({context:c.D5,subscribe:!0})],z.prototype,"_i18n",void 0),(0,i.Cg)([(0,s.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],z.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,s.wk)()],z.prototype,"_bodyScrolled",void 0),(0,i.Cg)([(0,s.Ls)({passive:!0})],z.prototype,"_handleBodyScroll",null),z=(0,i.Cg)([(0,s.EM)("ha-dialog")],z),e()}catch(v){e(v)}})},98:function(t,e,a){var i=a(40445),o=a(5124),r=a(67576),n=a(6412),s=a(36240);a(13513),a(8034);let l,d,h=t=>t;class c extends o.WF{render(){var t;const e=(0,s.gN)(this.value);return(0,o.qy)(l||(l=h` <ha-settings-row> <span slot="heading"> ${0} </span> <div slot="description" .title="${0}"> <span class="value"> <div>${0} %</div> </span> <ha-bar class="${0}" .value="${0}"></ha-bar> </div> </ha-settings-row> `),this.heading,null!==(t=this.tooltip)&&void 0!==t?t:"",e,(0,n.H)({"target-warning":e>50,"target-critical":e>85}),this.value)}}c.styles=(0,o.AH)(d||(d=h`ha-settings-row{padding:0;height:54px;width:100%}ha-settings-row>div[slot=description]{white-space:normal;color:var(--secondary-text-color);display:flex;justify-content:space-between}ha-bar{--ha-bar-primary-color:var(--metric-bar-ok-color, var(--success-color))}.target-warning{--ha-bar-primary-color:var(
--metric-bar-warning-color,
var(--warning-color)
)}.target-critical{--ha-bar-primary-color:var(
--metric-bar-critical-color,
var(--error-color)
)}.value{width:48px;padding-right:4px;padding-inline-end:4px;padding-inline-start:initial;flex-shrink:0}.value>div{direction:ltr;text-align:var(--float-start)}`)),(0,i.Cg)([(0,r.MZ)({type:Number})],c.prototype,"value",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],c.prototype,"heading",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],c.prototype,"tooltip",void 0),c=(0,i.Cg)([(0,r.EM)("ha-metric")],c)},8034:function(t,e,a){a(27495),a(62953);var i=a(40445),o=a(92070),r=a(5124),n=a(67576);let s,l,d,h=t=>t;class c extends r.WF{render(){const t=this._hasSlotController.test("description");return(0,r.qy)(s||(s=h` <div class="prefix-wrap"> <slot name="prefix"></slot> <div class="body" part="heading" ?two-line="${0}" ?three-line="${0}"> <slot name="heading"></slot> ${0} </div> </div> <div class="content"> <slot></slot> </div> `),!this.threeLine&&t,this.threeLine,t?(0,r.qy)(l||(l=h`<span class="secondary"><slot name="description"></slot></span>`)):r.s6)}constructor(...t){super(...t),this.narrow=!1,this.slim=!1,this.threeLine=!1,this.wrapHeading=!1,this.empty=!1,this._hasSlotController=new o.X(this,"description")}}c.styles=(0,r.AH)(d||(d=h`:host{display:flex;padding:0 var(--ha-space-4);align-content:normal;align-self:auto;align-items:center}.body{padding-top:var(--settings-row-body-padding-top,var(--ha-space-2));padding-bottom:var(--settings-row-body-padding-bottom,var(--ha-space-2));padding-left:0;padding-inline-start:0;padding-right:var(--ha-space-4);padding-inline-end:var(--ha-space-4);overflow:hidden;display:var(--layout-vertical_-_display,flex);flex-direction:var(--layout-vertical_-_flex-direction,column);justify-content:var(--layout-center-justified_-_justify-content,center);flex:var(--layout-flex_-_flex,1);flex-basis:var(--layout-flex_-_flex-basis,0.000000001px)}.body[three-line]{min-height:88px}:host(:not([wrap-heading])) body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body>.secondary{display:block;padding-top:var(--ha-space-1);font-family:var(
--mdc-typography-body2-font-family,
var(--mdc-typography-font-family, var(--ha-font-family-body))
);font-size:var(--mdc-typography-body2-font-size, var(--ha-font-size-s));-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-weight:var(--mdc-typography-body2-font-weight,var(--ha-font-weight-normal));line-height:normal;color:var(--secondary-text-color)}.body[two-line]{min-height:calc(72px - 16px);flex:1}.content{display:contents}:host(:not([narrow])) .content{display:var(--settings-row-content-display,flex);justify-content:flex-end;flex:1;min-width:0;padding:var(--settings-row-content-padding-block,var(--ha-space-4)) 0}:host([empty]) .content{display:none}.content ::slotted(*){width:var(--settings-row-content-width)}:host([narrow]){align-items:normal;flex-direction:column;border-top:1px solid var(--divider-color);padding-bottom:var(--ha-space-2)}::slotted(ha-switch){padding:var(--settings-row-switch-padding-block,var(--ha-space-4)) 0}.secondary{white-space:normal}.prefix-wrap{flex:var(--settings-row-prefix-flex,1);display:var(--settings-row-prefix-display)}:host([narrow]) .prefix-wrap{display:flex;align-items:center}:host([slim]),:host([slim]) .content,:host([slim]) ::slotted(ha-switch){padding:0}:host([slim]) .body{min-height:0}`)),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"slim",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"three-line"})],c.prototype,"threeLine",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"wrap-heading",reflect:!0})],c.prototype,"wrapHeading",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"empty",void 0),c=(0,i.Cg)([(0,n.EM)("ha-settings-row")],c)},65829:function(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{HaSpinner:function(){return c}});var o=a(40445),r=a(55262),n=a(5124),s=a(67576),l=t([r]);r=(l.then?(await l)():l)[0];let d,h=t=>t;class c extends r.A{updated(t){if(super.updated(t),t.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[r.A.styles,(0,n.AH)(d||(d=h`:host{--indicator-color:var(
--ha-spinner-indicator-color,
var(--primary-color)
);--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}(0,o.Cg)([(0,s.MZ)()],c.prototype,"size",void 0),c=(0,o.Cg)([(0,s.EM)("ha-spinner")],c),i()}catch(d){i(d)}})},47351:function(t,e,a){a.d(e,{PS:function(){return i},Tv:function(){return n},VR:function(){return o},lE:function(){return s}});a(74423),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);const i=t=>t.data,o=t=>"object"==typeof t?"object"==typeof t.body?t.body.message||"Unknown error, see supervisor logs":t.body||t.message||"Unknown error, see supervisor logs":t,r=new Set([502,503,504]),n=t=>!!(t&&t.status_code&&r.has(t.status_code))||!(!t||!t.message||!t.message.includes("ERR_CONNECTION_CLOSED")&&!t.message.includes("ERR_CONNECTION_RESET")),s=async(t,e)=>t({type:"supervisor/api",endpoint:`/${e}/stats`,method:"get"})},6892:function(t,e,a){a.d(e,{q:function(){return r}});a(3362);var i=a(62384),o=a(47351);const r=async t=>(0,i.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/resolution/info",method:"get"}):(0,o.PS)(await t.callApi("GET","hassio/resolution/info"))},33212:function(t,e,a){a.d(e,{G:function(){return i}});const i=(t,e)=>{let a={};const i=t.connection.subscribeMessage(t=>"initial"===t.type?(a=t.data,void e(a)):"finish"===t.type?(i.then(t=>t()),void e(void 0)):(a=Object.assign(Object.assign({},a),{},{[t.domain]:Object.assign(Object.assign({},a[t.domain]),{},{info:Object.assign(Object.assign({},a[t.domain].info),{},{[t.key]:t.success?t.data:{error:!0,value:t.error.msg}})})}),void e(a)),{type:"system_health/info"});return i}},59992:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{V:function(){return m}});a(62953);var o=a(40445),r=a(88696),n=a(5124),s=a(6412),l=a(67576),d=t([r]);r=(d.then?(await d)():d)[0];let h,c,u=t=>t;const p=t=>void 0===t?[]:Array.isArray(t)?t:[t],m=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,n.qy)(h||(h=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...p(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,n.AH)(c||(c=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:i=0,scrollTop:o=0}=t;this._contentScrollable=a-i>o+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const a=t.currentTarget;this._contentScrolled=(null!==(e=a.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:t=>{var e;const a=null===(e=t[0])||void 0===e?void 0:e.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrollable",void 0),e};i()}catch(h){i(h)}})},2814:function(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{UNHEALTHY_REASON_URL:function(){return W},UNSUPPORTED_REASON_URL:function(){return R}});a(44114),a(26910),a(18111),a(61701),a(3362),a(62953);var o=a(40445),r=a(5124),n=a(67576),s=a(36312),l=a(95747),d=a(1087),h=a(63130),c=a(14748),u=a(38962),p=a(18350),m=a(72554),g=(a(93444),a(98),a(65829)),f=a(47351),v=a(6892),y=a(95350),w=a(33212),b=a(65063),_=a(14503),x=a(36918),$=a(81619),C=t([u,p,m,g,l]);[u,p,m,g,l]=C.then?(await C)():C;let S,z,k,A,T,M,E,I,L,j,Z,D,F,q,H,P,N,O,B,V,J=t=>t;const U=(t,e)=>"homeassistant"===t?-1:"homeassistant"===e?1:t<e?-1:e<t?1:0,R={},W={privileged:"/more-info/unsupported/privileged"};class G extends r.WF{showDialog(){this._open=!0,this.hass.loadBackendTranslation("system_health"),this._subscribe()}closeDialog(){this._open=!1}_dialogClosed(){this._open=!1,this._unsubscribe(),(0,d.r)(this,"dialog-closed",{dialog:this.localName})}_subscribe(){(0,s.x)(this.hass.config,"system_health")&&(this._systemHealthSubscription=(0,w.G)(this.hass,t=>{t?this._systemInfo=t:this._systemHealthSubscription=void 0})),(0,s.x)(this.hass.config,"hassio")&&(this._hassIOSubscription=(0,c.G)(this.hass,async()=>{this._supervisorStats=await(0,f.lE)(this.hass.callWS,"supervisor"),this._coreStats=await(0,f.lE)(this.hass.callWS,"core")},1e4),(0,v.q)(this.hass).then(t=>{this._resolutionInfo=t}))}_unsubscribe(){var t,e;null===(t=this._systemHealthSubscription)||void 0===t||t.then(t=>t()),this._systemHealthSubscription=void 0,null===(e=this._hassIOSubscription)||void 0===e||e.call(this),this._hassIOSubscription=void 0,this._systemInfo=void 0,this._resolutionInfo=void 0,this._coreStats=void 0,this._supervisorStats=void 0}render(){if(!this._open)return r.s6;const t=this._getSections();return(0,r.qy)(S||(S=J` <ha-dialog .open="${0}" header-title="${0}" ="${0}"> <div> ${0} <div>${0}</div> ${0} </div> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" ="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this._open,this.hass.localize("ui.panel.config.repairs.system_information"),this._dialogClosed,this._resolutionInfo?(0,r.qy)(z||(z=J`${0} ${0} `),this._resolutionInfo.unhealthy.length?(0,r.qy)(k||(k=J`<ha-alert alert-type="error"> ${0} <ha-button appearance="plain" size="small" variant="danger" slot="action" ="${0}"> ${0} </ha-button></ha-alert>`),this.hass.localize("ui.dialogs.unhealthy.title"),this._unhealthyDialog,this.hass.localize("ui.panel.config.common.learn_more")):"",this._resolutionInfo.unsupported.length?(0,r.qy)(A||(A=J`<ha-alert alert-type="warning"> ${0} <ha-button appearance="plain" size="small" variant="warning" slot="action" ="${0}"> ${0} </ha-button> </ha-alert>`),this.hass.localize("ui.dialogs.unsupported.title"),this._unsupportedDialog,this.hass.localize("ui.panel.config.common.learn_more")):""):"",t,this._coreStats||this._supervisorStats?(0,r.qy)(T||(T=J` <div> ${0} ${0} </div> `),this._coreStats?(0,r.qy)(M||(M=J` <h3> ${0} </h3> <ha-metric .heading="${0}" .value="${0}"></ha-metric> <ha-metric .heading="${0}" .value="${0}"></ha-metric> `),this.hass.localize("ui.panel.config.system_health.core_stats"),this.hass.localize("ui.panel.config.system_health.cpu_usage"),this._coreStats.cpu_percent,this.hass.localize("ui.panel.config.system_health.ram_usage"),this._coreStats.memory_percent):"",this._supervisorStats?(0,r.qy)(E||(E=J` <h3> ${0} </h3> <ha-metric .heading="${0}" .value="${0}"></ha-metric> <ha-metric .heading="${0}" .value="${0}"></ha-metric> `),this.hass.localize("ui.panel.config.system_health.supervisor_stats"),this.hass.localize("ui.panel.config.system_health.cpu_usage"),this._supervisorStats.cpu_percent,this.hass.localize("ui.panel.config.system_health.ram_usage"),this._supervisorStats.memory_percent):""):"",this._copyInfo,this.hass.localize("ui.panel.config.repairs.copy"))}async _unsupportedDialog(){await(0,b.showAlertDialog)(this,{title:this.hass.localize("ui.dialogs.unsupported.title"),text:(0,r.qy)(I||(I=J`${0} <br><br> <ul> ${0} </ul>`),this.hass.localize("ui.dialogs.unsupported.description"),this._resolutionInfo.unsupported.map(t=>(0,r.qy)(L||(L=J` <li> <a href="${0}" target="_blank" rel="noreferrer"> ${0} </a> </li> `),(0,x.o)(this.hass,R[t]||`/more-info/unsupported/${t}`),this.hass.localize(`ui.dialogs.unsupported.reasons.${t}`)||t)))})}async _unhealthyDialog(){await(0,b.showAlertDialog)(this,{title:this.hass.localize("ui.dialogs.unhealthy.title"),text:(0,r.qy)(j||(j=J`${0} <br><br> <ul> ${0} </ul>`),this.hass.localize("ui.dialogs.unhealthy.description"),this._resolutionInfo.unhealthy.map(t=>(0,r.qy)(Z||(Z=J` <li> <a href="${0}" target="_blank" rel="noreferrer"> ${0} </a> </li> `),(0,x.o)(this.hass,W[t]||`/more-info/unhealthy/${t}`),this.hass.localize(`ui.dialogs.unhealthy.reasons.${t}`)||t)))})}_getSections(){const t=[];if(this._systemInfo){const e=Object.keys(this._systemInfo).sort(U);for(const a of e){const e=this._systemInfo[a],i=[];for(const t of Object.keys(e.info)){let o;if(e.info[t]&&"object"==typeof e.info[t]){const a=e.info[t];"pending"===a.type?o=(0,r.qy)(F||(F=J` <ha-spinner size="small"></ha-spinner> `)):"failed"===a.type?o=(0,r.qy)(q||(q=J` <span class="error">${0}</span>${0} `),a.error,a.more_info?(0,r.qy)(H||(H=J` – <a href="${0}" target="_blank" rel="noreferrer noopener"> ${0} </a> `),a.more_info,this.hass.localize("ui.panel.config.info.system_health.more_info")):""):"date"===a.type&&(o=(0,l.r6)(new Date(a.value),this.hass.locale,this.hass.config))}else o=e.info[t];i.push((0,r.qy)(P||(P=J` <tr> <td> ${0} </td> <td>${0}</td> </tr> `),this.hass.localize(`component.${a}.system_health.info.${t}`)||t,o))}"homeassistant"!==a&&t.push((0,r.qy)(N||(N=J` <div class="card-header"> <h3>${0}</h3> ${0} </div> `),(0,y.p$)(this.hass.localize,a),e.manage_url?(0,r.qy)(O||(O=J` <ha-button appearance="plain" size="small" class="manage" href="${0}"> ${0} </ha-button> `),e.manage_url,this.hass.localize("ui.panel.config.info.system_health.manage")):"")),t.push((0,r.qy)(B||(B=J` <table> ${0} </table> `),i))}}else t.push((0,r.qy)(D||(D=J` <div class="loading-container"> <ha-spinner></ha-spinner> </div> `)));return t}async _copyInfo(){let t;const e=[];for(const a of Object.keys(this._systemInfo).sort(U)){const i=this._systemInfo[a];let o=!0;const r=[""+("homeassistant"!==a?`<details><summary>${(0,y.p$)(this.hass.localize,a)}</summary>\n`:"")];for(const t of Object.keys(i.info)){let e;if(i.info[t]&&"object"==typeof i.info[t]){const a=i.info[t];"pending"===a.type?e="pending":"failed"===a.type?e=`failed to load: ${a.error}`:"date"===a.type&&(e=(0,l.r6)(new Date(a.value),this.hass.locale,this.hass.config))}else e=i.info[t];o?(r.push(`${t} | ${e}\n-- | --`),o=!1):r.push(`${t} | ${e}`)}"homeassistant"===a?t=r.join("\n"):(e.push(r.join("\n")),"homeassistant"!==a&&e.push("</details>"))}await(0,h.l)(`## System Information\n${t}\n\n${e.join("\n\n")}`),(0,$.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")})}constructor(...t){super(...t),this._open=!1}}G.styles=[_.nA,(0,r.AH)(V||(V=J`ha-alert{margin-bottom:16px;display:block}table{width:100%}td:first-child{width:45%}td:last-child{direction:ltr}.loading-container{display:flex;align-items:center;justify-content:center}.card-header{justify-content:space-between;display:flex;align-items:center}.error{color:var(--error-color)}`))],(0,o.Cg)([(0,n.MZ)({attribute:!1})],G.prototype,"hass",void 0),(0,o.Cg)([(0,n.wk)()],G.prototype,"_systemInfo",void 0),(0,o.Cg)([(0,n.wk)()],G.prototype,"_resolutionInfo",void 0),(0,o.Cg)([(0,n.wk)()],G.prototype,"_supervisorStats",void 0),(0,o.Cg)([(0,n.wk)()],G.prototype,"_coreStats",void 0),(0,o.Cg)([(0,n.wk)()],G.prototype,"_open",void 0),G=(0,o.Cg)([(0,n.EM)("dialog-system-information")],G),i()}catch(S){i(S)}})},36240:function(t,e,a){a.d(e,{NN:function(){return o},S8:function(){return i},gN:function(){return r}});const i=(t,e,a)=>isNaN(t)||isNaN(e)||isNaN(a)?0:t>a?a:t<e?e:t,o=(t,e,a)=>100*(t-e)/(a-e),r=t=>Math.round(10*t)/10},36918:function(t,e,a){a.d(e,{o:function(){return i}});const i=(t,e)=>`https://www.iobroker.net/#${t.language&&t.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},22348:function(t,e,a){a.d(e,{V:function(){return o}});var i=a(37177);const o=t=>!!t&&i.n},37177:function(t,e,a){a.d(e,{n:function(){return i}});a(27495);const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);