iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
39 lines • 51 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[48603],{93421:function(t,e,o){o.d(e,{IW:function(){return d},dH:function(){return c},fI:function(){return l}});o(44114),o(62953);var a=o(35211),i=o(22792),n=o(32172);const r=(t,e)=>{let o=t;for(const a of e){if(null==o)return;o=o[a]}return o},s=(t,e,o)=>{const i=(0,n.p)({transformer:function(t){return o.call(this,t)},watch:e?[e]:[]}),r=(0,a.Fg)({context:t,subscribe:!0});return(t,e)=>{i(t,e),r(t,e)}},l=t=>s(i.iN,t.entityIdPath[0],function(e){const o=r(this,t.entityIdPath);return"string"==typeof o?null==e?void 0:e[o]:void 0}),c=t=>s(i.X1,t.entityIdPath[0],function(e){const o=r(this,t.entityIdPath);return"string"==typeof o?null==e?void 0:e[o]:void 0}),d=()=>s(i.D5,void 0,({localize:t})=>t)},26218:function(t,e,o){o.d(e,{a:function(){return i}});o(16280);const a=(0,o(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const i=e.connectedCallback;e.connectedCallback=function(){i.call(this);const e=this[o];e&&this.updateComplete.then(()=>{const o=this.renderRoot.querySelector(t);o&&setTimeout(()=>{o.scrollTop=e},0)})};const n=Object.getOwnPropertyDescriptor(e,o);let r;if(void 0===n)r={get(){var t;return this[`__${String(o)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){a(t),this[`__${String(o)}`]=t},configurable:!0,enumerable:!0};else{const t=n.set;r=Object.assign(Object.assign({},n),{},{set(e){a(e),this[`__${String(o)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,o,r)}}},32172:function(t,e,o){o.d(e,{p:function(){return a}});o(16280),o(18111),o(7588),o(45367),o(92731),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);function a(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const a=String(o),i=e;if(i._transformers){if(!i.hasOwnProperty("_transformers")){const t=i._transformers;i._transformers=new Map,t.forEach((t,e)=>i._transformers.set(e,t))}}else{i._transformers=new Map,i._watching=new Map;const t=i.willUpdate;i.willUpdate=function(e){t.call(this,e);const o=new Set;e.forEach((t,e)=>{const a=this._watching.get(e);void 0!==a&&a.forEach(t=>o.add(t))}),o.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}i._transformers.set(o,t.transformer),t.watch&&t.watch.forEach(t=>{let e=i._watching.get(t);e||(e=new Set,i._watching.set(t,e)),e.add(o)});const n=Object.getOwnPropertyDescriptor(e,o);let r;if(void 0===n)r={get(){return this[`__transform_${a}`]},set(t){const e=this[`__transform_${a}`],o=this._transformers.get(a);this[`__transform_${a}`]=o?o.call(this,t):t,this[`__original_${a}`]=t,this.requestUpdate(a,e)},configurable:!0,enumerable:!0};else{const t=n.set;r=Object.assign(Object.assign({},n),{},{set(e){const o=this[`__transform_${a}`],i=this._transformers.get(a);this[`__transform_${a}`]=i?i.call(this,e):e,this[`__original_${a}`]=e,this.requestUpdate(a,o),null==t||t.call(this,e)}})}Object.defineProperty(e,o,r)}}},77796:function(t,e,o){o.d(e,{n:function(){return a}});o(62953);const a=(t,e,o=!0,a=!0)=>{let i,n=0;const r=(...r)=>{const s=()=>{n=!1===o?0:Date.now(),i=void 0,t(...r)},l=Date.now();n||!1!==o||(n=l);const c=e-(l-n);c<=0||c>e?(i&&(clearTimeout(i),i=void 0),n=l,t(...r)):i||!1===a||(i=window.setTimeout(s,c))};return r.cancel=()=>{clearTimeout(i),i=void 0,n=0},r}},38962:function(t,e,o){o.a(t,async function(t,a){try{o.r(e);o(62953);var i=o(40445),n=o(5124),r=o(67576),s=o(6412),l=o(93421),c=o(1087),d=o(26300),h=(o(67094),t([d]));d=(h.then?(await h)():h)[0];let p,u,g,f,v=t=>t;const m="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",b={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 y extends n.WF{render(){var t;return(0,n.qy)(p||(p=v` <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",b[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,n.qy)(u||(u=v`<div class="title">${0}</div>`),this.title):n.s6,this.dismissable?(0,n.qy)(g||(g=v`<ha-icon-button @click="${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"),m):n.s6)}_dismissClicked(){(0,c.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}y.styles=(0,n.AH)(f||(f=v`.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,i.Cg)([(0,r.MZ)()],y.prototype,"title",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"alert-type"})],y.prototype,"alertType",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"dismissable",void 0),(0,i.Cg)([(0,r.wk)(),(0,l.IW)()],y.prototype,"_localize",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"narrow",void 0),y=(0,i.Cg)([(0,r.EM)("ha-alert")],y),a()}catch(p){a(p)}})},76776:function(t,e,o){o(62953);var a=o(40445),i=o(5124),n=o(67576);let r,s,l,c=t=>t;class d extends i.WF{render(){return(0,i.qy)(r||(r=c` ${0} <slot></slot> `),this.header?(0,i.qy)(s||(s=c`<h1 class="card-header">${0}</h1>`),this.header):i.s6)}constructor(...t){super(...t),this.raised=!1}}d.styles=(0,i.AH)(l||(l=c`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
:host
::slotted(
.card-content:not(:nth-child(1 of .card-content, .card-header))
),
slot:not(:first-child)::slotted(.card-content) {
padding-top: 0;
margin-top: calc(var(--ha-space-2) * -1);
}
:host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`)),(0,a.Cg)([(0,n.MZ)()],d.prototype,"header",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"raised",void 0),d=(0,a.Cg)([(0,n.EM)("ha-card")],d)},90248:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButtonArrowPrev:function(){return g}});o(62953);var i=o(40445),n=o(5124),r=o(67576),s=o(63091),l=o(26300),c=t([l]);l=(c.then?(await c)():c)[0];let d,h=t=>t;const p="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",u="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class g extends n.WF{render(){var t;return(0,n.qy)(d||(d=h` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?u:p}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],g.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"href",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"target",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"rel",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"download",void 0),(0,i.Cg)([(0,r.wk)()],g.prototype,"_icon",void 0),g=(0,i.Cg)([(0,r.EM)("ha-icon-button-arrow-prev")],g),a()}catch(d){a(d)}})},26300:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButton:function(){return f}});o(62953);var i=o(40445),n=o(5124),r=o(67576),s=o(63672),l=o(18350),c=(o(67094),t([l]));l=(c.then?(await c)():c)[0];let d,h,p,u,g=t=>t;class f extends n.WF{render(){return(0,n.qy)(d||(d=g` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,n.qy)(h||(h=g`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,n.qy)(p||(p=g`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}f.shadowRootOptions={mode:"open",delegatesFocus:!0},f.styles=(0,n.AH)(u||(u=g`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
--ha-icon-button-padding-inline,
--ha-space-2
);--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],f.prototype,"path",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],f.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"aria-haspopup"})],f.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"hide-title",type:Boolean})],f.prototype,"hideTitle",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"selected",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"href",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"target",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"rel",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"download",void 0),f=(0,i.Cg)([(0,r.EM)("ha-icon-button")],f),a()}catch(d){a(d)}})},43661:function(t,e,o){o.r(e),o.d(e,{HaIconNext:function(){return s}});o(62953);var a=o(40445),i=o(67576),n=o(63091),r=o(67094);class s extends r.HaSvgIcon{constructor(...t){super(...t),this.path="rtl"===n.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,a.Cg)([(0,i.MZ)()],s.prototype,"path",void 0),s=(0,a.Cg)([(0,i.EM)("ha-icon-next")],s)},2846:function(t,e,o){o.d(e,{G:function(){return p},J:function(){return h}});var a=o(40445),i=o(58168),n=o(82553),r=o(5124),s=o(67576);o(54276);let l,c,d=t=>t;const h=[n.R,(0,r.AH)(l||(l=d`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`))];class p extends i.n{renderRipple(){return"text"===this.type?r.s6:(0,r.qy)(c||(c=d`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled&&"link"!==this.type)}}p.styles=h,p=(0,a.Cg)([(0,s.EM)("ha-md-list-item")],p)},17308:function(t,e,o){var a=o(40445),i=o(49838),n=o(11245),r=o(5124),s=o(67576);let l;class c extends i.B{}c.styles=[n.R,(0,r.AH)(l||(l=(t=>t)`:host{--md-sys-color-surface:var(--card-background-color)}`))],c=(0,a.Cg)([(0,s.EM)("ha-md-list")],c)},2054:function(t,e,o){o.a(t,async function(t,e){try{o(16280),o(62953);var a=o(40445),i=o(5124),n=o(67576),r=o(1087),s=o(44249),l=o(26300),c=t([l]);l=(c.then?(await c)():c)[0];let d,h,p,u=t=>t;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends i.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return i.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,i.qy)(d||(d=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,t?(0,i.qy)(h||(h=u`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,o=t.has("narrow")?t.get("narrow"):this.narrow,a=!1===(null==e?void 0:e.kioskMode)&&(o||"always_hidden"===(null==e?void 0:e.dockedSidebar)),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===i||(this._show=i||this._alwaysVisible,i?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,r.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,i.AH)(p||(p=u`: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:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,a.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,n.wk)()],f.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,n.wk)()],f.prototype,"_show",void 0),f=(0,a.Cg)([(0,n.EM)("ha-menu-button")],f),e()}catch(d){e(d)}})},54276:function(t,e,o){o(62953);var a=o(40445),i=o(76482),n=o(91382),r=o(96245),s=o(5124),l=o(67576);let c;class d extends n.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[r.R,(0,s.AH)(c||(c=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`))],d=(0,a.Cg)([(0,l.EM)("ha-ripple")],d)},67094:function(t,e,o){o.r(e),o.d(e,{HaSvgIcon:function(){return h}});var a=o(40445),i=o(5124),n=o(67576);let r,s,l,c,d=t=>t;class h extends i.WF{render(){return(0,i.JW)(r||(r=d` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,i.JW)(s||(s=d`<path class="primary-path" d="${0}"></path>`),this.path):i.s6,this.secondaryPath?(0,i.JW)(l||(l=d`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):i.s6)}}h.styles=(0,i.AH)(c||(c=d`: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)}`)),(0,a.Cg)([(0,n.MZ)()],h.prototype,"path",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"secondaryPath",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"viewBox",void 0),h=(0,a.Cg)([(0,n.EM)("ha-svg-icon")],h)},16869:function(t,e,o){o.d(e,{B:function(){return n},g:function(){return i}});var a;o(74423),o(27495);const i=window.externalAppV2||window.externalApp||(null===(a=window.webkit)||void 0===a||null===(a=a.messageHandlers)||void 0===a?void 0:a.getExternalAuth)||location.search.includes("external_auth=1"),n=window.externalApp||window.externalAppV2},7749:function(t,e,o){o.d(e,{HH:function(){return a},TY:function(){return i},lu:function(){return n},mu:function(){return r}});const a=(t,e)=>t.callApi("POST","config/config_entries/options/flow",{handler:e}),i=(t,e)=>t.callApi("GET",`config/config_entries/options/flow/${e}`),n=(t,e,o)=>t.callApi("POST",`config/config_entries/options/flow/${e}`,o),r=(t,e)=>t.callApi("DELETE",`config/config_entries/options/flow/${e}`)},44249:function(t,e,o){o.d(e,{V:function(){return a}});o(62953);const a=(t,e)=>{const o=new i,a=t.subscribeMessage(t=>e(o.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{a.then(t=>null==t?void 0:t())}};class i{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},84621:function(t,e,o){o.d(e,{$:function(){return x},A2:function(){return E},C2:function(){return a},Iu:function(){return C},Ky:function(){return d},Lj:function(){return c},Mo:function(){return V},On:function(){return s},P0:function(){return z},PA:function(){return l},Qo:function(){return k},RW:function(){return $},Uc:function(){return r},Ui:function(){return b},VC:function(){return A},VK:function(){return S},Yf:function(){return O},ZU:function(){return n},cm:function(){return f},f7:function(){return L},hi:function(){return w},i_:function(){return u},jm:function(){return Z},kH:function(){return h},ks:function(){return p},oM:function(){return g},p7:function(){return H},pl:function(){return v},rv:function(){return m},sb:function(){return T},tg:function(){return M},tv:function(){return _},xU:function(){return i},zt:function(){return y}});const a=(t,e,o)=>t.connection.subscribeMessage(t=>o(t),{type:"zha/devices/reconfigure",ieee:e}),i=t=>t.callWS({type:"zha/topology/update"}),n=(t,e,o,a,i)=>t.callWS({type:"zha/devices/clusters/attributes",ieee:e,endpoint_id:o,cluster_id:a,cluster_type:i}),r=t=>t.callWS({type:"zha/devices"}),s=(t,e)=>t.callWS({type:"zha/device",ieee:e}),l=(t,e)=>t.callWS({type:"zha/devices/bindable",ieee:e}),c=(t,e,o)=>t.callWS({type:"zha/devices/bind",source_ieee:e,target_ieee:o}),d=(t,e,o)=>t.callWS({type:"zha/devices/unbind",source_ieee:e,target_ieee:o}),h=(t,e,o,a)=>t.callWS({type:"zha/groups/bind",source_ieee:e,group_id:o,bindings:a}),p=(t,e,o,a)=>t.callWS({type:"zha/groups/unbind",source_ieee:e,group_id:o,bindings:a}),u=(t,e)=>t.callWS(Object.assign(Object.assign({},e),{},{type:"zha/devices/clusters/attributes/value"})),g=(t,e,o,a,i)=>t.callWS({type:"zha/devices/clusters/commands",ieee:e,endpoint_id:o,cluster_id:a,cluster_type:i}),f=(t,e)=>t.callWS({type:"zha/devices/clusters",ieee:e}),v=t=>t.callWS({type:"zha/groups"}),m=(t,e)=>t.callWS({type:"zha/group/remove",group_ids:e}),b=(t,e)=>t.callWS({type:"zha/group",group_id:e}),y=t=>t.callWS({type:"zha/devices/groupable"}),w=(t,e,o)=>t.callWS({type:"zha/group/members/add",group_id:e,members:o}),_=(t,e,o)=>t.callWS({type:"zha/group/members/remove",group_id:e,members:o}),x=(t,e,o,a)=>t.callWS({type:"zha/group/add",group_name:e,group_id:o,members:a}),k=t=>t.callWS({type:"zha/configuration"}),$=(t,e)=>t.callWS({type:"zha/configuration/update",data:e}),z=t=>t.callWS({type:"zha/network/settings"}),C=t=>t.callWS({type:"zha/network/backups/create"}),H=(t,e)=>t.callWS({type:"zha/network/change_channel",new_channel:e}),M="INITIALIZED",V="INTERVIEW_COMPLETE",L="CONFIGURED",S=["PAIRED",L,V],A=["device_joined","raw_device_initialized","device_fully_initialized"],Z="log_output",E="zha_channel_bind",T="zha_channel_configure_reporting",O="zha_channel_cfg_done"},29094:function(t,e,o){o.d(e,{g:function(){return n}});o(3362),o(62953);var a=o(1087);const i=()=>Promise.all([o.e(72850),o.e(39763),o.e(32450),o.e(46095),o.e(7305),o.e(92769),o.e(3283),o.e(80131),o.e(98470),o.e(54066),o.e(84038),o.e(62364),o.e(62574),o.e(26092),o.e(39005),o.e(28501),o.e(29792)]).then(o.bind(o,78314)),n=(t,e,o)=>{(0,a.r)(t,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:i,dialogParams:Object.assign(Object.assign({},e),{},{flowConfig:o,dialogParentElement:t})})}},70241:function(t,e,o){o.d(e,{Q:function(){return g}});o(3362),o(62953);var a=o(5124),i=o(95350),n=o(7749),r=o(29094);let s,l,c,d,h,p,u=t=>t;const g=(t,e,o)=>(0,r.g)(t,Object.assign({startFlowHandler:e.entry_id,domain:e.domain},o),{flowType:"options_flow",showDevices:!1,createFlow:async(t,o)=>{const[a]=await Promise.all([(0,n.HH)(t,o),t.loadFragmentTranslation("config"),t.loadBackendTranslation("options",e.domain),t.loadBackendTranslation("selector",e.domain)]);return a},fetchFlow:async(t,o)=>{const[a]=await Promise.all([(0,n.TY)(t,o),t.loadFragmentTranslation("config"),t.loadBackendTranslation("options",e.domain),t.loadBackendTranslation("selector",e.domain)]);return a},handleFlowStep:n.lu,deleteFlow:n.mu,renderAbortDescription(t,o){const i=t.localize(`component.${o.translation_domain||e.domain}.options.abort.${o.reason}`,o.description_placeholders);return i?(0,a.qy)(s||(s=u` <ha-markdown breaks allow-svg .content="${0}"></ha-markdown> `),i):o.reason},renderShowFormStepHeader(t,o){return t.localize(`component.${o.translation_domain||e.domain}.options.step.${o.step_id}.title`,o.description_placeholders)||t.localize("ui.dialogs.options_flow.form.header")},renderShowFormStepDescription(t,o){const i=t.localize(`component.${o.translation_domain||e.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return i?(0,a.qy)(l||(l=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderShowFormStepFieldLabel(t,o,a,i){var n;if("expandable"===a.type)return t.localize(`component.${e.domain}.options.step.${o.step_id}.sections.${a.name}.name`,o.description_placeholders)||a.name;const r=null!=i&&null!==(n=i.path)&&void 0!==n&&n[0]?`sections.${i.path[0]}.`:"";return t.localize(`component.${e.domain}.options.step.${o.step_id}.${r}data.${a.name}`,o.description_placeholders)||a.name},renderShowFormStepFieldHelper(t,o,i,n){var r;if("expandable"===i.type)return t.localize(`component.${o.translation_domain||e.domain}.options.step.${o.step_id}.sections.${i.name}.description`,o.description_placeholders);const s=null!=n&&null!==(r=n.path)&&void 0!==r&&r[0]?`sections.${n.path[0]}.`:"",l=t.localize(`component.${o.translation_domain||e.domain}.options.step.${o.step_id}.${s}data_description.${i.name}`,o.description_placeholders);return l?(0,a.qy)(c||(c=u`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(t,o,a){return t.localize(`component.${o.translation_domain||e.domain}.options.error.${a}`,o.description_placeholders)||a},renderShowFormStepFieldLocalizeValue(t,o,a){return t.localize(`component.${e.domain}.selector.${a}`)},renderShowFormStepSubmitButton(t,o){return t.localize(`component.${e.domain}.options.step.${o.step_id}.submit`)||t.localize("ui.panel.config.integrations.config_flow."+(!1===o.last_step?"next":"submit"))},renderExternalStepHeader(t,e){return""},renderExternalStepDescription(t,e){return""},renderCreateEntryDescription(t,e){return(0,a.qy)(d||(d=u` <p>${0}</p> `),t.localize("ui.dialogs.options_flow.success.description"))},renderShowFormProgressHeader(t,o){return t.localize(`component.${e.domain}.options.step.${o.step_id}.title`)||t.localize(`component.${e.domain}.title`)},renderShowFormProgressDescription(t,o){const i=t.localize(`component.${o.translation_domain||e.domain}.options.progress.${o.progress_action}`,o.description_placeholders);return i?(0,a.qy)(h||(h=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuHeader(t,o){return t.localize(`component.${e.domain}.options.step.${o.step_id}.title`)||t.localize(`component.${e.domain}.title`)},renderMenuDescription(t,o){const i=t.localize(`component.${o.translation_domain||e.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return i?(0,a.qy)(p||(p=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuOption(t,o,a){return t.localize(`component.${o.translation_domain||e.domain}.options.step.${o.step_id}.menu_options.${a}`,o.description_placeholders)},renderMenuOptionDescription(t,o,a){return t.localize(`component.${o.translation_domain||e.domain}.options.step.${o.step_id}.menu_option_descriptions.${a}`,o.description_placeholders)},renderLoadingDescription(t,o){return t.localize(`component.${e.domain}.options.loading`)||("loading_flow"===o||"loading_step"===o?t.localize(`ui.dialogs.options_flow.loading.${o}`,{integration:(0,i.p$)(t.localize,e.domain)}):"")}})},81310:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),i=o(5124),n=o(67576),r=o(6412),s=o(26218),l=o(91926),c=o(90248),d=o(2054),h=o(14503),p=t([c,d]);[c,d]=p.then?(await p)():p;let u,g,f,v,m,b=t=>t;class y extends i.WF{render(){var t;return(0,i.qy)(u||(u=b` <div class="toolbar ${0}"> <div class="toolbar-content"> ${0} <div class="main-title"> <slot name="header">${0}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${0}" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,r.H)({narrow:this.narrow}),this.mainPage||null!==(t=history.state)&&void 0!==t&&t.root?(0,i.qy)(g||(g=b` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,i.qy)(f||(f=b` <ha-icon-button-arrow-prev href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,i.qy)(v||(v=b` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,(0,r.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable}),this._saveScrollPos)}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.OE)()}static get styles(){return[h.dp,(0,i.AH)(m||(m=b`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`))]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,a.Cg)([(0,n.MZ)()],y.prototype,"header",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,attribute:"main-page"})],y.prototype,"mainPage",void 0),(0,a.Cg)([(0,n.MZ)({type:String,attribute:"back-path"})],y.prototype,"backPath",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"backCallback",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],y.prototype,"narrow",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"scrollable",void 0),(0,a.Cg)([(0,s.a)(".content")],y.prototype,"_savedScrollPos",void 0),(0,a.Cg)([(0,n.Ls)({passive:!0})],y.prototype,"_saveScrollPos",null),y=(0,a.Cg)([(0,n.EM)("hass-subpage")],y),e()}catch(u){e(u)}})},63670:function(t,e,o){o.a(t,async function(t,a){try{o.r(e);o(74423),o(18111),o(22489),o(20116),o(61701),o(33110),o(3362),o(96167),o(27495),o(25440),o(62953);var i=o(40445),n=o(5124),r=o(67576),s=o(88518),l=o(38962),c=o(18350),d=(o(76776),o(43661),o(17308),o(2846),o(67094),o(77423)),h=o(84621),p=o(70241),u=o(65063),g=o(81310),f=o(14503),v=o(44144),m=o(30039),b=t([l,c,g]);[l,c,g]=b.then?(await b)():b;let y,w,_,x,k,$,z,C,H,M=t=>t;const V="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",L="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",S="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",A="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",Z="M22,4A2,2 0 0,1 24,6V16A2,2 0 0,1 22,18H6A2,2 0 0,1 4,16V4A2,2 0 0,1 6,2H12L14,4H22M2,6V20H20V22H2A2,2 0 0,1 0,20V11H0V6H2M6,6V16H22V6H6Z",E="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",T="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",O="M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z",P="M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z",W="M2 3V9H4.95L6.95 15H6V21H12V16.41L17.41 11H22V5H16V9.57L10.59 15H9.06L7.06 9H8V3M4 5H6V7H4M18 7H20V9H18M8 17H10V19H8Z";class j extends n.WF{firstUpdated(t){super.firstUpdated(t),this.hass&&(this.hass.loadBackendTranslation("config_panel","zha",!1),this._fetchConfigEntry(),this._fetchConfiguration(),this._fetchDevicesAndGroups())}render(){const t=(this._configEntry?Object.values(this.hass.devices).filter(t=>t.config_entries.includes(this._configEntry.entry_id)):[]).length;let e=0;for(const a of Object.values(this.hass.entities))"zha"===a.platform&&e++;const o=this._offlineDevices<t||0===t;return(0,n.qy)(y||(y=M` <hass-subpage .hass="${0}" .narrow="${0}" .header="${0}" back-path="/config" has-fab> <div class="container"> ${0} ${0} ${0} ${0} </div> <a href="/config/zha/add" slot="fab"> <ha-button size="large"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </a> </hass-subpage> `),this.hass,this.narrow,this.hass.localize("ui.panel.config.zha.network.caption"),this._renderNetworkStatus(o,t),this._renderMyNetworkCard(t,e),this._renderNavigationCard(),this._renderBackupCard(),T,this.hass.localize("ui.panel.config.zha.add_device"))}_renderNetworkStatus(t,e){var o;return(0,n.qy)(w||(w=M` <ha-card class="content network-status"> ${0} <div class="card-content"> <div class="heading"> <div class="icon ${0}"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> <div class="details"> ${0}<br> <small> ${0} </small> <small class="offline"> ${0} </small> </div> <img class="logo" alt="Zigbee" crossorigin="anonymous" referrerpolicy="no-referrer" src="${0}"> </div> </div> </ha-card> `),this._error?(0,n.qy)(_||(_=M`<ha-alert alert-type="error">${0}</ha-alert>`),this._error):n.s6,t?"success":"error",t?L:V,this.hass.localize("ui.panel.config.zha.configuration_page.status_"+(t?"online":"offline")),this.hass.localize("ui.panel.config.zha.configuration_page.devices",{count:e}),this._asyncDataLoaded&&this._offlineDevices>0?(0,n.qy)(x||(x=M`(${0})`),this.hass.localize("ui.panel.config.zha.configuration_page.devices_offline",{count:this._offlineDevices})):n.s6,(0,v.MR)({domain:"zha",type:"icon",darkOptimized:null===(o=this.hass.themes)||void 0===o?void 0:o.darkMode},this.hass.auth.data.hassUrl))}_renderMyNetworkCard(t,e){var o,a;return(0,n.qy)(k||(k=M` <ha-card class="nav-card"> <div class="card-header"> ${0} <ha-button appearance="filled" href="/config/zha/visualization"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </div> <div class="card-content"> <ha-md-list> <ha-md-list-item type="link" href="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item type="link" href="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item type="link" href="/config/zha/groups"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline" class="${0}"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> </ha-md-list> </div> </ha-card> `),this.hass.localize("ui.panel.config.zha.configuration_page.my_network_title"),W,this.hass.localize("ui.panel.config.zha.configuration_page.show_map"),`/config/devices/dashboard?historyBack=1&config_entry=${null===(o=this._configEntry)||void 0===o?void 0:o.entry_id}`,S,this.hass.localize("ui.panel.config.zha.configuration_page.device_count",{count:t}),`/config/entities/dashboard?historyBack=1&config_entry=${null===(a=this._configEntry)||void 0===a?void 0:a.entry_id}`,O,this.hass.localize("ui.panel.config.zha.configuration_page.entity_count",{count:e}),Z,this._asyncDataLoaded&&void 0!==this._totalGroups?"fade-in":"",this._asyncDataLoaded&&void 0!==this._totalGroups?this.hass.localize("ui.panel.config.zha.configuration_page.group_count",{count:this._totalGroups}):this.hass.localize("ui.panel.config.zha.groups.groups.caption"))}_renderNavigationCard(){const t=this._configuration?Object.keys(this._configuration.schemas).filter(t=>"zha_options"!==t):[];return(0,n.qy)($||($=M` <ha-card class="nav-card"> <div class="card-content"> <ha-md-list> <ha-md-list-item type="link" href="/config/zha/options"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item type="link" href="/config/zha/network-info"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> ${0} </ha-md-list> </div> </ha-card> `),P,this.hass.localize("ui.panel.config.zha.configuration_page.options_title"),this.hass.localize("ui.panel.config.zha.configuration_page.options_description"),E,this.hass.localize("ui.panel.config.zha.configuration_page.network_info_title"),this.hass.localize("ui.panel.config.zha.configuration_page.network_info_description"),t.map(t=>(0,n.qy)(z||(z=M` <ha-md-list-item type="link" href="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> `),`/config/zha/section/${t}`,P,this.hass.localize(`component.zha.config_panel.${t}.title`)||t)))}_renderBackupCard(){return(0,n.qy)(C||(C=M` <ha-card class="nav-card"> <div class="card-content"> <ha-md-list> <ha-md-list-item> <span slot="headline"> ${0} </span> <span slot="supporting-text"> ${0} </span> <ha-button appearance="plain" slot="end" size="small" @click="${0}"> <ha-svg-icon .path="${0}" slot="start"></ha-svg-icon> ${0} </ha-button> </ha-md-list-item> <ha-md-list-item> <span slot="headline"> ${0} </span> <span slot="supporting-text"> ${0} </span> <ha-button appearance="plain" slot="end" size="small" @click="${0}"> ${0} </ha-button> </ha-md-list-item> </ha-md-list> </div> </ha-card> `),this.hass.localize("ui.panel.config.zha.configuration_page.download_backup"),this.hass.localize("ui.panel.config.zha.configuration_page.download_backup_description"),this._createAndDownloadBackup,A,this.hass.localize("ui.panel.config.zha.configuration_page.download_backup_action"),this.hass.localize("ui.panel.config.zha.configuration_page.migrate_radio"),this.hass.localize("ui.panel.config.zha.configuration_page.migrate_radio_description"),this._openOptionFlow,this.hass.localize("ui.panel.config.zha.configuration_page.migrate_radio_action"))}async _fetchConfigEntry(){const t=await(0,d.VN)(this.hass,{domain:"zha"});this._configEntry=t.find(t=>null===t.disabled_by&&"ignore"!==t.source)}async _fetchConfiguration(){this._configuration=await(0,h.Qo)(this.hass)}async _createAndDownloadBackup(){let t;try{t=await(0,h.Iu)(this.hass)}catch(a){return void(0,u.showAlertDialog)(this,{title:"Failed to create backup",text:a.message,warning:!0})}t.is_complete||await(0,u.showAlertDialog)(this,{title:"Backup is incomplete",text:"A backup has been created but it is incomplete and cannot be restored. This is a coordinator firmware limitation."});const e="data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(t.backup,null,4));let o=`ZHA backup ${new Date(Date.parse(t.backup.backup_time)).toISOString().replace(/:/g,"-")}`;t.is_complete||(o=`Incomplete ${o}`),(0,m.R)(e,`${o}.json`)}_openOptionFlow(){this._configEntry&&(0,p.Q)(this,this._configEntry)}async _fetchDevicesAndGroups(){const[t,e]=await Promise.allSettled([(0,h.Uc)(this.hass),(0,h.pl)(this.hass)]);var o;"fulfilled"===t.status?this._offlineDevices=t.value.filter(t=>!t.available).length:this._error=(null===(o=t.reason)||void 0===o?void 0:o.message)||t.reason;"fulfilled"===e.status&&(this._totalGroups=e.value.length),this._asyncDataLoaded=!0}static get styles(){return[f.RF,s.R,(0,n.AH)(H||(H=M`ha-card{margin:auto;margin-top:var(--ha-space-4);max-width:600px}.nav-card .card-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:var(--ha-space-2)}.nav-card{overflow:hidden}.nav-card .card-content{padding:0}.content{margin-top:var(--ha-space-6)}ha-md-list{background:0 0;padding:0}ha-md-list-item{--md-item-overflow:visible}ha-button[size=small] ha-svg-icon{--mdc-icon-size:16px}.network-status div.heading{display:flex;align-items:center;column-gap:var(--ha-space-4)}.network-status div.heading .logo{height:40px;width:40px;margin-inline-start:auto;object-fit:contain}.network-status div.heading .icon{position:relative;border-radius:var(--ha-border-radius-2xl);width:40px;height:40px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;--icon-color:var(--primary-color)}.network-status div.heading .icon.success{--icon-color:var(--success-color)}.network-status div.heading .icon.error{--icon-color:var(--error-color)}.network-status div.heading .icon::before{display:block;content:"";position:absolute;inset:0;background-color:var(--icon-color);opacity:.2}.network-status div.heading .icon ha-svg-icon{color:var(--icon-color);width:24px;height:24px}.network-status div.heading .details{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);color:var(--primary-text-color)}.network-status small{font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);letter-spacing:.25px;color:var(--secondary-text-color)}.fade-in,.network-status small.offline{animation:fade-in var(--ha-animation-duration-slow) ease-in}.container{padding:var(--ha-space-2) var(--ha-space-4) calc(var(--ha-space-20) + var(--safe-area-inset-bottom,0px))}`))]}constructor(...t){super(...t),this.narrow=!1,this.isWide=!1,this._offlineDevices=0,this._asyncDataLoaded=!1}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],j.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],j.prototype,"route",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],j.prototype,"narrow",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"is-wide",type:Boolean})],j.prototype,"isWide",void 0),(0,i.Cg)([(0,r.wk)()],j.prototype,"_configEntry",void 0),(0,i.Cg)([(0,r.wk)()],j.prototype,"_configuration",void 0),(0,i.Cg)([(0,r.wk)()],j.prototype,"_offlineDevices",void 0),(0,i.Cg)([(0,r.wk)()],j.prototype,"_totalGroups",void 0),(0,i.Cg)([(0,r.wk)()],j.prototype,"_asyncDataLoaded",void 0),(0,i.Cg)([(0,r.wk)()],j.prototype,"_error",void 0),j=(0,i.Cg)([(0,r.EM)("zha-config-dashboard")],j),a()}catch(y){a(y)}})},14503:function(t,e,o){o.d(e,{RF:function(){return p},dp:function(){return f},kO:function(){return g},nA:function(){return u},og:function(){return h}});var a=o(5124);let i,n,r,s,l,c,d=t=>t;const h=(0,a.AH)(i||(i=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),p=(0,a.AH)(n||(n=d`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .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}`),h),u=(0,a.AH)(r||(r=d`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,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-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),g=(0,a.AH)(s||(s=d`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--mdc-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),f=(0,a.AH)(l||(l=d`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,a.AH)(c||(c=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},30039:function(t,e,o){o.d(e,{R:function(){return i}});o(62953),o(3296),o(27208),o(48408),o(14603),o(47566),o(98721);var a=o(16869);const i=(t,e="")=>{const o=document.createElement("a");o.target="_blank",o.href=t,o.download=e,o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click")),document.body.removeChild(o),t.startsWith("blob:")&&(a.B?setTimeout(()=>URL.revokeObjectURL(t),1e4):URL.revokeObjectURL(t))}}}]);