"use strict";(self.webpackChunkhacs_frontend=self.webpackChunkhacs_frontend||[]).push([["3943"],{52804:function(e,t,i){i.d(t,{Q:function(){return a}});i(19134),i(97003);const a=e=>e.replace(/^_*(.)|_+(.)/g,((e,t,i)=>t?t.toUpperCase():" "+i.toUpperCase()))},74064:function(e,t,i){var a=i(73577),n=i(72621),o=(i(71695),i(47021),i(65703)),d=i(46289),r=i(57243),l=i(50778);let s,c,h,u=e=>e;(0,a.Z)([(0,l.Mo)("ha-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,n.Z)(i,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[d.W,(0,r.iv)(s||(s=u`:host{padding-left:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-inline-start:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-right:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px));padding-inline-end:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px))}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:48px}span.material-icons:first-of-type{margin-inline-start:0px!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important;direction:var(--direction)!important}span.material-icons:last-of-type{margin-inline-start:auto!important;margin-inline-end:0px!important;direction:var(--direction)!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);align-items:center;flex-shrink:0}:host([graphic=icon]:not([twoline])) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,20px)!important}:host([multiline-secondary]){height:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__text{padding:8px 0}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text{text-overflow:initial;white-space:normal;overflow:auto;display:inline-block;margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text::before{display:none}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text::before{display:none}:host([disabled]){color:var(--disabled-text-color)}:host([noninteractive]){pointer-events:unset}`)),"rtl"===document.dir?(0,r.iv)(c||(c=u`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,r.iv)(h||(h=u``))]}}]}}),o.K)},53486:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(73577),n=(i(19083),i(71695),i(92745),i(19423),i(40251),i(61006),i(39527),i(99790),i(41360),i(13334),i(47021),i(87319),i(57243)),o=i(50778),d=i(11297),r=i(52804),l=i(27357),s=i(69484),c=e([s]);s=(c.then?(await c)():c)[0];let h,u,p,v=e=>e;const m=[],g=e=>(0,n.dy)(h||(h=v` ${0} ${0} `),!!e.title,e.icon,e.title||e.path,e.path),f=(e,t,i)=>{var a,n,o;return{path:`/${e}/${null!==(a=t.path)&&void 0!==a?a:i}`,icon:null!==(n=t.icon)&&void 0!==n?n:"mdi:view-compact",title:null!==(o=t.title)&&void 0!==o?o:t.path?(0,r.Q)(t.path):`${i}`}},k=(e,t)=>{var i;return{path:`/${t.url_path}`,icon:null!==(i=t.icon)&&void 0!==i?i:"mdi:view-dashboard",title:t.url_path===e.defaultPanel?e.localize("panel.states"):e.localize(`panel.${t.title}`)||t.title||(t.url_path?(0,r.Q)(t.url_path):"")}};(0,a.Z)([(0,o.Mo)("ha-navigation-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,o.SB)()],key:"_opened",value(){return!1}},{kind:"field",key:"navigationItemsLoaded",value(){return!1}},{kind:"field",key:"navigationItems",value(){return m}},{kind:"field",decorators:[(0,o.IO)("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"method",key:"render",value:function(){return(0,n.dy)(u||(u=v` `),this.hass,this._value,this.navigationItems,this.label,this.helper,this.disabled,this.required,g,this._openedChanged,this._valueChanged,this._filterChanged)}},{kind:"method",key:"_openedChanged",value:async function(e){this._opened=e.detail.value,this._opened&&!this.navigationItemsLoaded&&this._loadNavigationItems()}},{kind:"method",key:"_loadNavigationItems",value:async function(){this.navigationItemsLoaded=!0;const e=Object.entries(this.hass.panels).map((([e,t])=>Object.assign({id:e},t))),t=e.filter((e=>"lovelace"===e.component_name)),i=await Promise.all(t.map((e=>(0,l.Q2)(this.hass.connection,"lovelace"===e.url_path?null:e.url_path,!0).then((t=>[e.id,t])).catch((t=>[e.id,void 0]))))),a=new Map(i);this.navigationItems=[];for(const n of e){this.navigationItems.push(k(this.hass,n));const e=a.get(n.id);e&&"views"in e&&e.views.forEach(((e,t)=>this.navigationItems.push(f(n.url_path,e,t))))}this.comboBox.filteredItems=this.navigationItems}},{kind:"method",key:"shouldUpdate",value:function(e){return!this._opened||e.has("_opened")}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),this._setValue(e.detail.value)}},{kind:"method",key:"_setValue",value:function(e){this.value=e,(0,d.B)(this,"value-changed",{value:this._value},{bubbles:!1,composed:!1})}},{kind:"method",key:"_filterChanged",value:function(e){const t=e.detail.value.toLowerCase();if(t.length>=2){const e=[];this.navigationItems.forEach((i=>{(i.path.toLowerCase().includes(t)||i.title.toLowerCase().includes(t))&&e.push(i)})),e.length>0?this.comboBox.filteredItems=e:this.comboBox.filteredItems=[]}else this.comboBox.filteredItems=this.navigationItems}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(p||(p=v`ha-icon,ha-svg-icon{color:var(--primary-text-color);position:relative;bottom:0px}[slot=prefix]{margin-right:8px;margin-inline-end:8px;margin-inline-start:initial}`))}}]}}),n.oi);t()}catch(h){t(h)}}))},5808:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaNavigationSelector:function(){return u}});var n=i(73577),o=(i(71695),i(47021),i(57243)),d=i(50778),r=i(11297),l=i(53486),s=e([l]);l=(s.then?(await s)():s)[0];let c,h=e=>e,u=(0,n.Z)([(0,d.Mo)("ha-selector-navigation")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"required",value(){return!0}},{kind:"method",key:"render",value:function(){return(0,o.dy)(c||(c=h` `),this.hass,this.label,this.value,this.required,this.disabled,this.helper,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){(0,r.B)(this,"value-changed",{value:e.detail.value})}}]}}),o.oi);a()}catch(c){a(c)}}))},27357:function(e,t,i){i.d(t,{Q2:function(){return a}});const a=(e,t,i)=>e.sendMessagePromise({type:"lovelace/config",url_path:t,force:i})}}]);
//# sourceMappingURL=3943.58c92e15d1f8db09.js.map