UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

36 lines 102 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[86499],{93421:function(t,e,i){i.d(e,{IW:function(){return h},dH:function(){return d},fI:function(){return l}});i(44114),i(62953);var s=i(35211),a=i(22792),o=i(32172);const n=(t,e)=>{let i=t;for(const s of e){if(null==i)return;i=i[s]}return i},r=(t,e,i)=>{const a=(0,o.p)({transformer:function(t){return i.call(this,t)},watch:e?[e]:[]}),n=(0,s.Fg)({context:t,subscribe:!0});return(t,e)=>{a(t,e),n(t,e)}},l=t=>r(a.iN,t.entityIdPath[0],function(e){const i=n(this,t.entityIdPath);return"string"==typeof i?null==e?void 0:e[i]:void 0}),d=t=>r(a.X1,t.entityIdPath[0],function(e){const i=n(this,t.entityIdPath);return"string"==typeof i?null==e?void 0:e[i]:void 0}),h=()=>r(a.D5,void 0,({localize:t})=>t)},32172:function(t,e,i){i.d(e,{p:function(){return s}});i(16280),i(18111),i(7588),i(45367),i(92731),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);function s(t){return(e,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const s=String(i),a=e;if(a._transformers){if(!a.hasOwnProperty("_transformers")){const t=a._transformers;a._transformers=new Map,t.forEach((t,e)=>a._transformers.set(e,t))}}else{a._transformers=new Map,a._watching=new Map;const t=a.willUpdate;a.willUpdate=function(e){t.call(this,e);const i=new Set;e.forEach((t,e)=>{const s=this._watching.get(e);void 0!==s&&s.forEach(t=>i.add(t))}),i.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}a._transformers.set(i,t.transformer),t.watch&&t.watch.forEach(t=>{let e=a._watching.get(t);e||(e=new Set,a._watching.set(t,e)),e.add(i)});const o=Object.getOwnPropertyDescriptor(e,i);let n;if(void 0===o)n={get(){return this[`__transform_${s}`]},set(t){const e=this[`__transform_${s}`],i=this._transformers.get(s);this[`__transform_${s}`]=i?i.call(this,t):t,this[`__original_${s}`]=t,this.requestUpdate(s,e)},configurable:!0,enumerable:!0};else{const t=o.set;n=Object.assign(Object.assign({},o),{},{set(e){const i=this[`__transform_${s}`],a=this._transformers.get(s);this[`__transform_${s}`]=a?a.call(this,e):e,this[`__original_${s}`]=e,this.requestUpdate(s,i),null==t||t.call(this,e)}})}Object.defineProperty(e,i,n)}}},66033:function(t,e,i){i.d(e,{L:function(){return s}});const s=(t,e)=>{const i=t.floor_id;return{area:t,floor:(i?e[i]:void 0)||null}}},64481:function(t,e,i){i.d(e,{D:function(){return a},J:function(){return n}});i(16280),i(3362),i(55815),i(64979),i(79739);let s=!1;try{s="true"===window.localStorage.getItem("disableViewTransition")}catch(r){}const a=t=>{s=t},o=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},n=t=>{if(!document.startViewTransition||s)return t(!1),Promise.resolve();let e=!1;try{const i=document.startViewTransition(()=>{e=!0,t(!0)});return i.ready.catch(o),i.finished.catch(o)}catch(i){return console.warn("View transition failed, falling back to direct execution.",i),e?Promise.reject(i):(t(!1),Promise.resolve())}}},82474:function(t,e,i){i.a(t,async function(t,e){try{i(13609),i(18111),i(20116),i(61701),i(3362),i(62953);var s=i(40445),a=i(5124),o=i(67576),n=i(22786),r=i(1087),l=i(74705),d=i(78649),h=i(53756),c=i(95350),p=i(24367),u=i(19711),_=(i(75064),i(38508)),v=(i(47680),i(67094),i(74281)),g=t([_,v]);[_,v]=g.then?(await g)():g;let m,y,f,b,w,$,C,x,k,A,M,z,I,L,Z,B=t=>t;const E="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",q="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",H="___create-new-entity___";class D extends a.WF{willUpdate(t){var e;this._pendingEntityId&&t.has("hass")&&this.hass.states!==(null===(e=t.get("hass"))||void 0===e?void 0:e.states)&&this.hass.states[this._pendingEntityId]&&(this._setValue(this._pendingEntityId),this._pendingEntityId=void 0)}firstUpdated(t){super.firstUpdated(t),this.hass.loadBackendTranslation("title")}_findExtraOption(t){var e;return t?null===(e=this.extraOptions)||void 0===e?void 0:e.find(e=>e.id===t):void 0}_renderExtraOptionStart(t){const e=t.entity_id?this.hass.states[t.entity_id]:void 0;return e?(0,a.qy)(m||(m=B` <state-badge slot="start" .stateObj="${0}" .hass="${0}"></state-badge> `),e,this.hass):t.icon_path?(0,a.qy)(y||(y=B` <ha-svg-icon slot="start" .path="${0}" style="margin:0 4px"></ha-svg-icon> `),t.icon_path):t.icon?(0,a.qy)(f||(f=B`<ha-icon slot="start" .icon="${0}"></ha-icon>`),t.icon):a.s6}get _showEntityId(){var t;return this.showEntityId||(null===(t=this.hass.userData)||void 0===t?void 0:t.showEntityIdPicker)}_shouldHideClearIcon(){var t;return!(null===(t=this._findExtraOption(this.value))||void 0===t||!t.hide_clear)}render(){var t,e;const i=null!==(t=this.placeholder)&&void 0!==t?t:this.hass.localize("ui.components.entity.entity-picker.placeholder");return(0,a.qy)(b||(b=B` <ha-generic-picker .hass="${0}" .disabled="${0}" .autofocus="${0}" .allowCustomValue="${0}" .required="${0}" .label="${0}" .placeholder="${0}" .helper="${0}" .value="${0}" .searchLabel="${0}" .notFoundLabel="${0}" .rowRenderer="${0}" .getItems="${0}" .getAdditionalItems="${0}" .hideClearIcon="${0}" .searchFn="${0}" .valueRenderer="${0}" .searchKeys="${0}" use-top-label .addButtonLabel="${0}" .unknownItemText="${0}" @value-changed="${0}"> </ha-generic-picker> `),this.hass,this.disabled,this.autofocus,this.allowCustomEntity,this.required,this.label,i,this.helper,this.addButton?void 0:this.value,this.searchLabel,this._notFoundLabel,this._rowRenderer,this._getItems,this._getAdditionalItems,this.hideClearIcon||this._shouldHideClearIcon(),this._searchFn,this._valueRenderer,h.t,this.addButton?null!==(e=this.addButtonLabel)&&void 0!==e?e:this.hass.localize("ui.components.entity.entity-picker.add"):void 0,this.hass.localize("ui.components.entity.entity-picker.unknown"),this._valueChanged)}async open(){var t;await this.updateComplete,await(null===(t=this._picker)||void 0===t?void 0:t.open())}_valueChanged(t){t.stopPropagation();const e=t.detail.value;if(e){if(e.startsWith(H)){const t=e.substring(H.length);return void(0,u.$)(this,{domain:t,dialogClosedCallback:t=>{t.entityId&&(this.hass.states[t.entityId]?this._setValue(t.entityId):this._pendingEntityId=t.entityId)}})}((0,d.n)(e)||this._findExtraOption(e))&&this._setValue(e)}else this._setValue(void 0)}_setValue(t){this.value=t,(0,r.r)(this,"value-changed",{value:t}),(0,r.r)(this,"change")}constructor(...t){super(...t),this.autofocus=!1,this.disabled=!1,this.required=!1,this.showEntityId=!1,this.hideClearIcon=!1,this.addButton=!1,this._valueRenderer=t=>{const e=t||"",i=this._findExtraOption(e);if(i)return(0,a.qy)(w||(w=B` ${0} <span slot="headline">${0}</span> ${0} `),this._renderExtraOptionStart(i),i.primary,i.secondary?(0,a.qy)($||($=B`<span slot="supporting-text">${0}</span>`),i.secondary):a.s6);const s=this.hass.states[e];if(!s)return(0,a.qy)(C||(C=B` <ha-svg-icon slot="start" .path="${0}" style="margin:0 4px"></ha-svg-icon> <span slot="headline">${0}</span> `),q,e);const{primary:o,secondary:n}=(0,l.Bj)(this.hass,s);return(0,a.qy)(x||(x=B` <state-badge .hass="${0}" .stateObj="${0}" slot="start"></state-badge> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> `),this.hass,s,o,n)},this._rowRenderer=(t,e)=>{const i=this._showEntityId;return(0,a.qy)(k||(k=B` <ha-combo-box-item type="button" compact="compact" .borderTop="${0}"> ${0} <span slot="headline">${0}</span> ${0} ${0} ${0} </ha-combo-box-item> `),0!==e,t.icon_path?(0,a.qy)(A||(A=B` <ha-svg-icon slot="start" style="margin:0 4px" .path="${0}"></ha-svg-icon> `),t.icon_path):(0,a.qy)(M||(M=B` <state-badge slot="start" .stateObj="${0}" .hass="${0}"></state-badge> `),t.stateObj,this.hass),t.primary,t.secondary?(0,a.qy)(z||(z=B`<span slot="supporting-text">${0}</span>`),t.secondary):a.s6,t.stateObj&&i?(0,a.qy)(I||(I=B` <span slot="supporting-text" class="code"> ${0} </span> `),t.stateObj.entity_id):a.s6,t.domain_name&&!i?(0,a.qy)(L||(L=B` <div slot="trailing-supporting-text" class="domain"> ${0} </div> `),t.domain_name):a.s6)},this._getAdditionalItems=()=>this._getCreateItems(this.hass.localize,this.createDomains),this._getCreateItems=(0,n.A)((t,e)=>null!=e&&e.length?(this.hass.loadFragmentTranslation("config"),e.map(e=>{const i=t("ui.components.entity.entity-picker.create_helper",{domain:(0,p.z)(e)?t(`ui.panel.config.helpers.types.${e}`)||e:(0,c.p$)(t,e)});return{id:H+e,primary:i,secondary:t("ui.components.entity.entity-picker.new_entity"),icon_path:E}})):[]),this._getEntitiesMemoized=(0,n.A)(h.w),this._getItems=()=>{var t;const e=this._getEntitiesMemoized(this.hass,this.includeDomains,this.excludeDomains,this.entityFilter,this.includeDeviceClasses,this.includeUnitOfMeasurement,this.includeEntities,this.excludeEntities,this.value);if(null!==(t=this.extraOptions)&&void 0!==t&&t.length){return[...this.extraOptions.map(t=>Object.assign(Object.assign({},t),{},{stateObj:t.entity_id?this.hass.states[t.entity_id]:void 0})),...e]}return e},this._searchFn=(t,e)=>{const i=e.findIndex(e=>{var i;return(null===(i=e.stateObj)||void 0===i?void 0:i.entity_id)===t});if(-1===i)return e;const[s]=e.splice(i,1);return e.unshift(s),e},this._notFoundLabel=t=>this.hass.localize("ui.components.entity.entity-picker.no_match",{term:(0,a.qy)(Z||(Z=B`<b>‘${0}’</b>`),t)})}}(0,s.Cg)([(0,o.MZ)({attribute:!1})],D.prototype,"hass",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean})],D.prototype,"autofocus",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean})],D.prototype,"disabled",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean})],D.prototype,"required",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean,attribute:"allow-custom-entity"})],D.prototype,"allowCustomEntity",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean,attribute:"show-entity-id"})],D.prototype,"showEntityId",void 0),(0,s.Cg)([(0,o.MZ)()],D.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)()],D.prototype,"value",void 0),(0,s.Cg)([(0,o.MZ)()],D.prototype,"helper",void 0),(0,s.Cg)([(0,o.MZ)()],D.prototype,"placeholder",void 0),(0,s.Cg)([(0,o.MZ)({type:String,attribute:"search-label"})],D.prototype,"searchLabel",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],D.prototype,"createDomains",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"include-domains"})],D.prototype,"includeDomains",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"exclude-domains"})],D.prototype,"excludeDomains",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"include-device-classes"})],D.prototype,"includeDeviceClasses",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"include-unit-of-measurement"})],D.prototype,"includeUnitOfMeasurement",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"include-entities"})],D.prototype,"includeEntities",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"exclude-entities"})],D.prototype,"excludeEntities",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],D.prototype,"entityFilter",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],D.prototype,"extraOptions",void 0),(0,s.Cg)([(0,o.MZ)({attribute:"hide-clear-icon",type:Boolean})],D.prototype,"hideClearIcon",void 0),(0,s.Cg)([(0,o.MZ)({attribute:"add-button",type:Boolean})],D.prototype,"addButton",void 0),(0,s.Cg)([(0,o.MZ)({attribute:"add-button-label"})],D.prototype,"addButtonLabel",void 0),(0,s.Cg)([(0,o.P)("ha-generic-picker")],D.prototype,"_picker",void 0),(0,s.Cg)([(0,o.wk)()],D.prototype,"_pendingEntityId",void 0),D=(0,s.Cg)([(0,o.EM)("ha-entity-picker")],D),e()}catch(m){e(m)}})},38962:function(t,e,i){i.a(t,async function(t,s){try{i.r(e);i(62953);var a=i(40445),o=i(5124),n=i(67576),r=i(6412),l=i(93421),d=i(1087),h=i(26300),c=(i(67094),t([h]));h=(c.then?(await c)():c)[0];let p,u,_,v,g=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",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 f extends o.WF{render(){var t;return(0,o.qy)(p||(p=g` <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,r.H)({[this.alertType]:!0}),this.title?"":"no-title",y[this.alertType],(0,r.H)({content:!0,narrow:this.narrow}),this.title?(0,o.qy)(u||(u=g`<div class="title">${0}</div>`),this.title):o.s6,this.dismissable?(0,o.qy)(_||(_=g`<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):o.s6)}_dismissClicked(){(0,d.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}f.styles=(0,o.AH)(v||(v=g`.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,a.Cg)([(0,n.MZ)()],f.prototype,"title",void 0),(0,a.Cg)([(0,n.MZ)({attribute:"alert-type"})],f.prototype,"alertType",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"dismissable",void 0),(0,a.Cg)([(0,n.wk)(),(0,l.IW)()],f.prototype,"_localize",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"narrow",void 0),f=(0,a.Cg)([(0,n.EM)("ha-alert")],f),s()}catch(p){s(p)}})},66086:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(18111),i(22489),i(61701),i(3362),i(62953);var s=i(40445),a=i(5124),o=i(67576),n=i(22786),r=i(1087),l=i(65522),d=i(55931),h=i(66033),c=i(49852),p=i(53641),u=i(65063),_=i(34023),v=(i(75064),i(38508)),g=i(26300),m=(i(67094),t([v,g]));[v,g]=m.then?(await m)():m;let y,f,b,w,$,C,x,k=t=>t;const A="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",M="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.11 2.9 22 4 22H20C21.11 22 22 21.11 22 20V4C22 2.9 21.11 2 20 2M4 6L6 4H10.9L4 10.9V6M4 13.7L13.7 4H18.6L4 18.6V13.7M20 18L18 20H13.1L20 13.1V18M20 10.3L10.3 20H5.4L20 5.4V10.3Z",z="___ADD_NEW___";class I extends a.WF{willUpdate(t){var e;this._pendingAreaId&&t.has("hass")&&this.hass.areas!==(null===(e=t.get("hass"))||void 0===e?void 0:e.areas)&&this.hass.areas[this._pendingAreaId]&&(this._setValue(this._pendingAreaId),this._pendingAreaId=void 0)}async open(){var t;await this.updateComplete,await(null===(t=this._picker)||void 0===t?void 0:t.open())}render(){var t;const e=null!==(t=this.label)&&void 0!==t?t:this.hass.localize("ui.components.area-picker.area"),i=this._computeValueRenderer(this.hass.areas);let s=e;if(this.value&&e){const t=this.hass.areas[this.value];if(t){const{floor:e}=(0,h.L)(t,this.hass.floors);e&&(s=void 0)}}return(0,a.qy)(y||(y=k` <ha-generic-picker .hass="${0}" .autofocus="${0}" .label="${0}" .helper="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .disabled="${0}" .required="${0}" .value="${0}" .getItems="${0}" .getAdditionalItems="${0}" .valueRenderer="${0}" .addButtonLabel="${0}" .searchKeys="${0}" .unknownItemText="${0}" @value-changed="${0}"> </ha-generic-picker> `),this.hass,this.autofocus,s,this.helper,this._notFoundLabel,this.hass.localize("ui.components.area-picker.no_areas"),this.disabled,this.required,this.value,this._getItems,this._getAdditionalItems,i,this.addButtonLabel,c.P,this.hass.localize("ui.components.area-picker.unknown"),this._valueChanged)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;if(e){if(e.startsWith(z)){this.hass.loadFragmentTranslation("config");const t=e.substring(z.length);return void(0,_.J)(this,{suggestedName:t,createEntry:async t=>{try{const e=await(0,p.L3)(this.hass,t);this.hass.areas[e.area_id]?this._setValue(e.area_id):this._pendingAreaId=e.area_id}catch(e){(0,u.showAlertDialog)(this,{title:this.hass.localize("ui.components.area-picker.failed_create_area"),text:e.message})}}})}this._setValue(e)}else this._setValue(void 0)}_setValue(t){this.value=t,(0,r.r)(this,"value-changed",{value:t}),(0,r.r)(this,"change")}constructor(...t){super(...t),this.noAdd=!1,this.disabled=!1,this.required=!1,this._getAreasMemoized=(0,n.A)(c.j),this._computeValueRenderer=(0,n.A)(t=>t=>{const e=this.hass.areas[t];if(!e)return(0,a.qy)(f||(f=k` <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <span slot="headline">${0}</span> `),M,e);const{floor:i}=(0,h.L)(e,this.hass.floors),s=e?(0,l.A)(e):void 0,o=i?(0,d.X)(i):void 0,n=e.icon;return(0,a.qy)(b||(b=k` ${0} <span slot="headline">${0}</span> ${0} `),n?(0,a.qy)(w||(w=k`<ha-icon slot="start" .icon="${0}"></ha-icon>`),n):(0,a.qy)($||($=k`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),M),s,o?(0,a.qy)(C||(C=k`<span slot="supporting-text">${0}</span>`),o):a.s6)}),this._getItems=()=>this._getAreasMemoized(this.hass.areas,this.hass.floors,this.hass.devices,this.hass.entities,this.hass.states,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.excludeAreas),this._allAreaNames=(0,n.A)(t=>Object.values(t).map(t=>{var e;return null===(e=(0,l.A)(t))||void 0===e?void 0:e.toLowerCase()}).filter(Boolean)),this._getAdditionalItems=t=>{if(this.noAdd)return[];const e=this._allAreaNames(this.hass.areas);return t&&!e.includes(t.toLowerCase())?[{id:z+t,primary:this.hass.localize("ui.components.area-picker.add_new_suggestion",{name:t}),icon_path:A}]:[{id:z,primary:this.hass.localize("ui.components.area-picker.add_new"),icon_path:A}]},this._notFoundLabel=t=>this.hass.localize("ui.components.area-picker.no_match",{term:(0,a.qy)(x||(x=k`<b>‘${0}’</b>`),t)})}}(0,s.Cg)([(0,o.MZ)({attribute:!1})],I.prototype,"hass",void 0),(0,s.Cg)([(0,o.MZ)()],I.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)()],I.prototype,"value",void 0),(0,s.Cg)([(0,o.MZ)()],I.prototype,"helper",void 0),(0,s.Cg)([(0,o.MZ)()],I.prototype,"placeholder",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean,attribute:"no-add"})],I.prototype,"noAdd",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"include-domains"})],I.prototype,"includeDomains",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"exclude-domains"})],I.prototype,"excludeDomains",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"include-device-classes"})],I.prototype,"includeDeviceClasses",void 0),(0,s.Cg)([(0,o.MZ)({type:Array,attribute:"exclude-areas"})],I.prototype,"excludeAreas",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],I.prototype,"deviceFilter",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],I.prototype,"entityFilter",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean})],I.prototype,"disabled",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean})],I.prototype,"required",void 0),(0,s.Cg)([(0,o.MZ)({attribute:"add-button-label"})],I.prototype,"addButtonLabel",void 0),(0,s.Cg)([(0,o.P)("ha-generic-picker")],I.prototype,"_picker",void 0),(0,s.Cg)([(0,o.wk)()],I.prototype,"_pendingAreaId",void 0),I=(0,s.Cg)([(0,o.EM)("ha-area-picker")],I),e()}catch(y){e(y)}})},986:function(t,e,i){i.a(t,async function(t,e){try{i(44114),i(18111),i(20116),i(7588),i(45367),i(92731),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(42762),i(62953);var s=i(40445),a=i(35211),o=i(5124),n=i(67576),r=i(89784),l=i(22786),d=i(78870),h=i(1087),c=i(22792),p=(i(75064),i(38508)),u=(i(47680),i(67094),t([p]));p=(u.then?(await u)():u)[0];let _,v,g,m,y,f,b,w,$,C,x,k,A=t=>t;const M="M20.65,20.87L18.3,18.5L12,12.23L8.44,8.66L7,7.25L4.27,4.5L3,5.77L5.78,8.55C3.23,11.69 3.42,16.31 6.34,19.24C7.9,20.8 9.95,21.58 12,21.58C13.79,21.58 15.57,21 17.03,19.8L19.73,22.5L21,21.23L20.65,20.87M12,19.59C10.4,19.59 8.89,18.97 7.76,17.83C6.62,16.69 6,15.19 6,13.59C6,12.27 6.43,11 7.21,10L12,14.77V19.59M12,5.1V9.68L19.25,16.94C20.62,14 20.09,10.37 17.65,7.93L12,2.27L8.3,5.97L9.71,7.38L12,5.1Z",z="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z";class I extends o.WF{render(){var t,e,i,s;const a=null!==(t=null!==(e=this.value)&&void 0!==e?e:this.defaultColor)&&void 0!==t?t:"";return(0,o.qy)(_||(_=A` <ha-generic-picker .disabled="${0}" .required="${0}" .hideClearIcon="${0}" .label="${0}" .helper="${0}" .value="${0}" .getItems="${0}" .rowRenderer="${0}" .valueRenderer="${0}" @value-changed="${0}" .notFoundLabel="${0}" .getAdditionalItems="${0}"> </ha-generic-picker> `),this.disabled,this.required,!this.value&&!!this.defaultColor,this.label,this.helper,a,this._getItems,this._rowRenderer,this._valueRenderer,this._valueChanged,null===(i=this._i18n)||void 0===i||null===(s=i.localize)||void 0===s?void 0:s.call(i,"ui.components.color-picker.no_colors_found"),this._getAdditionalItems)}_renderItemIcon(t){var e,i;if(t.icon_path)return(0,o.qy)(v||(v=A`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),t.icon_path);if(t.icon)return(0,o.qy)(g||(g=A`<ha-icon slot="start" .icon="${0}"></ha-icon>`),t.icon);const s=null!==(e=null===(i=this._extraOptionsColorMap(this.extraOptions))||void 0===i?void 0:i.get(t.id))&&void 0!==e?e:t.id;return(0,o.qy)(m||(m=A`<span slot="start">${0}</span>`),this._renderColorCircle(s))}_renderColorCircle(t){return(0,o.qy)(y||(y=A` <span style="${0}"></span> `),(0,r.W)({"--circle-color":(0,d.MP)(t),display:"block","background-color":"var(--circle-color, var(--divider-color))",border:"1px solid var(--outline-color)","border-radius":"var(--ha-border-radius-pill)",width:"20px",height:"20px","box-sizing":"border-box"}))}_valueChanged(t){t.stopPropagation();const e=t.detail.value,i=e&&e===this.defaultColor?void 0:null!=e?e:void 0;this.value=i,(0,h.r)(this,"value-changed",{value:this.value})}constructor(...t){super(...t),this.includeState=!1,this.includeNone=!1,this.disabled=!1,this._extraOptionsColorMap=(0,l.A)(t=>{if(!t)return;const e=new Map;for(const i of t)i.display_color&&e.set(i.value,i.display_color);return e.size>0?e:void 0}),this.required=!1,this._getAdditionalItems=t=>{var e,i;if(!t||""===t.trim())return[];return this._getColors(this.includeNone,this.includeState,this.extraOptions,this.defaultColor,this.value).find(e=>e.id===t)?[]:[{id:t,primary:(null===(e=this._i18n)||void 0===e||null===(i=e.localize)||void 0===i?void 0:i.call(e,"ui.components.color-picker.custom_color"))||"Custom color",secondary:t}]},this._getItems=()=>this._getColors(this.includeNone,this.includeState,this.extraOptions,this.defaultColor,this.value),this._getColors=(0,l.A)((t,e,i,s,a)=>{var o,n;const r=[],l=(null===(o=this._i18n)||void 0===o||null===(n=o.localize)||void 0===n?void 0:n.call(o,"ui.components.color-picker.default"))||"Default",h=(t,e)=>e&&l?`${t} (${l})`:t;if(t){var c,p;const t=(null===(c=this._i18n)||void 0===c||null===(p=c.localize)||void 0===p?void 0:p.call(c,"ui.components.color-picker.none"))||"None";r.push({id:"none",primary:h(t,"none"===s),icon_path:M})}if(e){var u,_;const t=(null===(u=this._i18n)||void 0===u||null===(_=u.localize)||void 0===_?void 0:_.call(u,"ui.components.color-picker.state"))||"State";r.push({id:"state",primary:h(t,"state"===s),icon_path:z})}i&&i.forEach(t=>{r.push(Object.assign({id:t.value,primary:h(t.label,s===t.value)},t.icon?{icon:t.icon}:{}))}),Array.from(d.lt).forEach(t=>{var e,i;const a=(null===(e=this._i18n)||void 0===e||null===(i=e.localize)||void 0===i?void 0:i.call(e,`ui.components.color-picker.colors.${t}`))||t;r.push({id:t,primary:h(a,s===t)})});const v=new Set(r.map(t=>t.id));return a&&a.length>0&&!v.has(a)&&r.push({id:a,primary:a}),r}),this._rowRenderer=t=>(0,o.qy)(f||(f=A` <ha-combo-box-item type="button" compact="compact"> ${0} <span slot="headline">${0}</span> ${0} </ha-combo-box-item> `),this._renderItemIcon(t),t.primary,t.secondary?(0,o.qy)(b||(b=A`<span slot="supporting-text">${0}</span>`),t.secondary):o.s6),this._valueRenderer=t=>{var e,i,s,a,n,r,l,d,h;if("none"===t)return(0,o.qy)(w||(w=A` <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <span slot="headline"> ${0} </span> `),M,(null===(r=this._i18n)||void 0===r||null===(l=r.localize)||void 0===l?void 0:l.call(r,"ui.components.color-picker.none"))||"None");if("state"===t)return(0,o.qy)($||($=A` <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <span slot="headline"> ${0} </span> `),z,(null===(d=this._i18n)||void 0===d||null===(h=d.localize)||void 0===h?void 0:h.call(d,"ui.components.color-picker.state"))||"State");const c=null===(e=this.extraOptions)||void 0===e?void 0:e.find(e=>e.value===t),p=(null==c?void 0:c.label)||(null===(i=this._i18n)||void 0===i||null===(s=i.localize)||void 0===s?void 0:s.call(i,`ui.components.color-picker.colors.${t}`))||t,u=null!==(a=null===(n=this._extraOptionsColorMap(this.extraOptions))||void 0===n?void 0:n.get(t))&&void 0!==a?a:t,_=null!=c&&c.icon?(0,o.qy)(C||(C=A`<ha-icon slot="start" .icon="${0}"></ha-icon>`),c.icon):(0,o.qy)(x||(x=A`<span slot="start">${0}</span>`),this._renderColorCircle(u));return(0,o.qy)(k||(k=A` ${0} <span slot="headline">${0}</span> `),_,p)}}}(0,s.Cg)([(0,n.MZ)()],I.prototype,"label",void 0),(0,s.Cg)([(0,n.MZ)()],I.prototype,"helper",void 0),(0,s.Cg)([(0,n.MZ)()],I.prototype,"value",void 0),(0,s.Cg)([(0,n.MZ)({type:String,attribute:"default_color"})],I.prototype,"defaultColor",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,attribute:"include_state"})],I.prototype,"includeState",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,attribute:"include_none"})],I.prototype,"includeNone",void 0),(0,s.Cg)([(0,n.MZ)({attribute:!1})],I.prototype,"extraOptions",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean})],I.prototype,"disabled",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean})],I.prototype,"required",void 0),(0,s.Cg)([(0,n.wk)(),(0,a.Fg)({context:c.D5,subscribe:!0})],I.prototype,"_i18n",void 0),I=(0,s.Cg)([(0,n.EM)("ha-color-picker")],I),e()}catch(_){e(_)}})},70947:function(t,e,i){i(62953);var s=i(40445),a=i(50759),o=(i(38625),i(5124)),n=i(67576);i(67094);let r,l,d=t=>t;class h extends a.A{renderCheckboxIcon(){return(0,o.qy)(r||(r=d` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[a.A.styles,(0,o.AH)(l||(l=d`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...t){super(...t),this.selected=!1}}(0,s.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],h.prototype,"selected",void 0),h=(0,s.Cg)([(0,n.EM)("ha-dropdown-item")],h)},29823:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);var s=i(40445),a=i(52254),o=i(5124),n=i(67576),r=t([a]);a=(r.then?(await r)():r)[0];let l,d=t=>t;class h extends a.A{get anchorElement(){var t;return null===(t=this.popup)||void 0===t?void 0:t.anchor}set anchorElement(t){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=t)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!0)}async hideMenu(){const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!1),await super.hideMenu()}static get styles(){return[a.A.styles,(0,o.AH)(l||(l=d`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
            --card-background-color,
            var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
          )}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...t){super(...t),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,s.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"dropdownTag",void 0),(0,s.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"dropdownItemTag",void 0),h=(0,s.Cg)([(0,n.EM)("ha-dropdown")],h),e()}catch(l){e(l)}})},90248:function(t,e,i){i.a(t,async function(t,s){try{i.r(e),i.d(e,{HaIconButtonArrowPrev:function(){return _}});i(62953);var a=i(40445),o=i(5124),n=i(67576),r=i(63091),l=i(26300),d=t([l]);l=(d.then?(await d)():d)[0];let h,c=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 _ extends o.WF{render(){var t;return(0,o.qy)(h||(h=c` <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"===r.G.document.dir?u:p}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],_.prototype,"disabled",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"label",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"href",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"target",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"rel",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"download",void 0),(0,a.Cg)([(0,n.wk)()],_.prototype,"_icon",void 0),_=(0,a.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],_),s()}catch(h){s(h)}})},3059:function(t,e,i){i.a(t,async function(t,s){try{i.r(e),i.d(e,{HaIconButtonNext:function(){return _}});i(62953);var a=i(40445),o=i(5124),n=i(67576),r=i(63091),l=i(26300),d=t([l]);l=(d.then?(await d)():d)[0];let h,c=t=>t;const p="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",u="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";class _ extends o.WF{render(){var t;return(0,o.qy)(h||(h=c` <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.next"))||"Next",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===r.G.document.dir?p:u}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],_.prototype,"disabled",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"label",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"href",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"target",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"rel",void 0),(0,a.Cg)([(0,n.MZ)()],_.prototype,"download",void 0),(0,a.Cg)([(0,n.wk)()],_.prototype,"_icon",void 0),_=(0,a.Cg)([(0,n.EM)("ha-icon-button-next")],_),s()}catch(h){s(h)}})},26300:function(t,e,i){i.a(t,async function(t,s){try{i.r(e),i.d(e,{HaIconButton:function(){return v}});i(62953);var a=i(40445),o=i(5124),n=i(67576),r=i(63672),l=i(18350),d=(i(67094),t([l]));l=(d.then?(await d)():d)[0];let h,c,p,u,_=t=>t;class v extends o.WF{render(){return(0,o.qy)(h||(h=_` <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,r.J)(this.label),(0,r.J)(this.hideTitle?void 0:this.label),(0,r.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,o.qy)(c||(c=_`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,o.qy)(p||(p=_`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}v.shadowRootOptions={mode:"open",delegatesFocus:!0},v.styles=(0,o.AH)(u||(u=_`: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,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],v.prototype,"disabled",void 0),(0,a.Cg)([(0,n.MZ)({type:String})],v.prototype,"path",void 0),(0,a.Cg)([(0,n.MZ)({type:String})],v.prototype,"label",void 0),(0,a.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],v.prototype,"ariaHasPopup",void 0),(0,a.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],v.prototype,"hideTitle",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],v.prototype,"selected",void 0),(0,a.Cg)([(0,n.MZ)()],v.prototype,"href",void 0),(0,a.Cg)([(0,n.MZ)()],v.prototype,"target",void 0),(0,a.Cg)([(0,n.MZ)()],v.prototype,"rel",void 0),(0,a.Cg)([(0,n.MZ)()],v.prototype,"download",void 0),v=(0,a.Cg)([(0,n.EM)("ha-icon-button")],v),s()}catch(h){s(h)}})},64138:function(t,e,i){i.a(t,async function(t,s){try{i.r(e),i.d(e,{HaIconPicker:function(){return $}});i(74423),i(44114),i(26910),i(18111),i(22489),i(7588),i(61701),i(13579),i(3362),i(27495),i(25440),i(62953);var a=i(40445),o=i(5124),n=i(67576),r=i(22786),l=i(1087),d=i(700),h=(i(75064),i(38508)),c=(i(47680),t([h]));h=(c.then?(await c)():c)[0];let p,u,_,v=t=>t,g=[],m=!1;const y=(t,e)=>{var i;const s=`${e}:${t.name}`,a=t.name,o=a.split("-"),n=null!==(i=t.keywords)&&void 0!==i?i:[],r={iconName:a};return o.forEach((t,e)=>{r[`part${e}`]=t}),n.forEach((t,e)=>{r[`keyword${e}`]=t}),{id:s,primary:s,icon:s,search_labels:r,sorting_label:s}},f=async()=>{m=!0;const t=await i.e(81340).then(i.t.bind(i,25143,19));g=t.default.map(t=>y(t,"mdi"));const e=[];Object.keys(d.y).forEach(t=>{e.push(b(t))}),(await Promise.all(e)).forEach(t=>{g.push(...t)})},b=async t=>{try{const e=d.y[t].getIconList;if("function"!=typeof e)return[];return(await e()).map(e=>y(e,t))}catch(e){return console.warn(`Unable to load icon list for ${t} iconset`),[]}},w=t=>(0,o.qy)(p||(p=v` <ha-combo-box-item type="button"> <ha-icon .icon="${0}" slot="start"></ha-icon> ${0} </ha-combo-box-item> `),t.id,t.id);class $ extends o.WF{render(){return(0,o.qy)(u||(u=v` <ha-generic-picker allow-custom-value .getItems="${0}" .helper="${0}" .disabled="${0}" .required="${0}" .errorMessage="${0}" .invalid="${0}" .rowRenderer="${0}" .icon="${0}" .label="${0}" .value="${0}" .searchFn="${0}" @value-changed="${0}"> <slot name="start"></slot> </ha-generic-picker> `),this._getIconPickerItems,this.helper,this.disabled,this.required,this.errorMessage,this.invalid,w,this._icon,this.label,this._value,this._filterIcons,this._valueChanged)}firstUpdated(){m||f().then(()=>{this._getIconPickerItems=()=>g,this.requestUpdate()})}_valueChanged(t){t.stopPropagation(),this._setValue(t.detail.value)}_setValue(t){this.value=t,(0,l.r)(this,"value-changed",{value:this._value},{bubbles:!1,composed:!1})}get _icon(){var t;return null!==(t=this.value)&&void 0!==t&&t.length?this.value:this.placeholder}get _value(){return this.value||""}constructor(...t){super(...t),this.disabled=!1,this.required=!1,this.invalid=!1,this._getIconPickerItems=()=>g,this._filterIcons=(0,r.A)((t,e,i)=>{const s=t.toLowerCase().replace(/\s+/g,"-"),a=null!=i&&i.length?i:e;if(!s.length)return a;const o=[];for(const n of a){const t=(n.id.split(":")[1]||n.id).toLowerCase().split("-"),e=n.search_labels?Object.values(n.search_labels).filter(t=>null!==t).map(t=>t.toLowerCase()):[],i=n.id.toLowerCase();t.includes(s)?o.push({item:n,rank:1}):e.includes(s)?o.push({item:n,rank:2}):i.includes(s)?o.push({item:n,rank:3}):e.some(t=>t.includes(s))&&o.push({item:n,rank:4})}return o.sort((t,e)=>t.rank-e.rank).map(t=>t.item)})}}$.styles=(0,o.AH)(_||(_=v`ha-generic-picker{width:100%;display:block}`)),(0,a.Cg)([(0,n.MZ)()],$.prototype,"value",void 0),(0,a.Cg)([(0,n.MZ)()],$.prototype,"label",void 0),(0,a.Cg)([(0,n.MZ)()],$.prototype,"helper",void 0),(0,a.Cg)([(0,n.MZ)()],$.prototype,"placeholder",void 0),(0,a.Cg)([(0,n.MZ)({attribute:"error-message"})],$.prototype,"errorMessage",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],$.prototype,"disabled",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],$.prototype,"required",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],$.prototype,"invalid",void 0),$=(0,a.Cg)([(0,n.EM)("ha-icon-picker")],$),s()}catch(p){s(p)}})},23430:function(t,e,i){i.a(t,async function(t,s){try{i.d(e,{l:function(){return v}});i(89463),i(42762),i(62953);var a=i(40445),o=i(5124),n=i(67576),r=i(78870),l=i(79622),d=i(86836),h=i(34127),c=t([h]);h=(c.then?(await c)():c)[0];let p,u,_=t=>t;const v=t=>{const e=t?(0,r.MP)(t):void 0;return e?`--ha-label-background-color: ${e};\n       --primary-text-color: ${(0,l.gJ)(t)};`:"--ha-label-background-color: rgba(var(--rgb-primary-text-color), 0.15);"};class g extends o.WF{willUpdate(t){super.willUpdate(t),t.has("color")&&(this.style.cssText=v(this.color))}render(){var t;return(0,o.qy)(p||(p=_` <ha-tooltip .for="${0}" .disabled="${0}"> ${0} </ha-tooltip> <div class="container" .id="${0}"> <span class="content"> <slot name="icon"></slot> <slot></slot> </span> </div> `),this._elementId,!(null!==(t=this.description)&&void 0!==t&&t.trim()),this.description,this._elementId)}static get styles(){return[(0,o.AH)(u||(u=_`:host{--ha-label-text-color:var(--primary-text-color);--ha-label-icon-color:var(--primary-text-color);--ha-label-background-opacity:1;border:1px solid var(--outline-color);position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-condensed);letter-spacing:.1px;height:32px;border-radius:var(--ha-border-radius-xl);color:var(--ha-label-text-color);--mdc-icon-size:12px;text-wrap:nowrap}.content>*{position:relative;display:inline-flex;flex-direction:row;align-items:center}:host:before{position:absolute;content:"";inset:0;border-radius:inherit;background-color:var(--ha-label-background-color);opacity:var(--ha-label-background-opacity)}::slotted([slot=icon]){margin-right:8px;margin-left:-8px;margin-inline-start:-8px;margin-inline-end:8px;display:flex}.container{display:flex;align-items:center;position:relative;height:100%;padding:0 16px}span{display:inline-flex}:host([dense]){height:20px;border-radius:var(--ha-border-radius-md)}:host([dense]) .container{padding:0 12px}:host([dense]) ::slotted([slot=icon]){margin-right:4px;margin-left:-4px;margin-inline-start:-4px;margin-inline-end:4px}`))]}constructor(...t){super(...t),this.dense=!1,this._elementId="label-"+(0,d.L)()}}(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],g.prototype,"dense",void 0),(0,a.Cg)([(0,n.MZ)()],g.prototype,"color",void 0),(0,a.Cg)([(0,n.MZ)({attribute:"description"})],g.prototype,"description",void 0),g=(0,a.Cg)([(0,n.EM)("ha-label")],g),s()}catch(p){s(p)}})},28732:function(t,e,i){var s=i(40445),a=i(27686),o=i(7731),n=i(5124),r=i(67576);let l,d,h,c=t=>t;class p extends a.J{renderRipple(){return this.noninteractive?"":super.renderRipple()}static get styles(){return[o.R,(0,n.AH)(l||(l=c`: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,n.AH)(d||(d=c`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,n.AH)(h||(h=c``))]}}p=(0,s.Cg)([(0,r.EM)("ha-list-item")],p)},54276:function(t,e,i){i(62953);var s=i(40445),a=i(76482),o=i(91382),n=i(96245),r=i(5124),l=i(67576);let d;class h extends o.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 a.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}h.styles=[n.R,(0,r.AH)(d||(d=(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))
        )}`))],h=(0,s.Cg)([(0,l.EM)("ha-ripple")],h)},65829:function(t,e,i){i.a(t,async function(t,s){try{i.r(e),i.d(e,{HaSpinner:function(){return c}});var a=i(40445),o=i(55262),n=i(5124),r=i(67576),l=t([o]);o=(l.then?(await l)():l)[0];let d,h=t=>t;class c extends o.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[o.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,a.Cg)([(0,r.MZ)()],c.prototype,"size",void 0),c=(0,a.Cg)([(0,r.EM)("ha-spinner")],c),s()}catch(d){s(d)}})},67094:function(t,e,i){i.r(e),i.d(e,{HaSvgIcon:function(){return c}});var s=i(40445),a=i(5124),o=i(67576);let n,r,l,d,h=t=>t;class c extends a.WF{render(){return(0,a.JW)(n||(n=h` <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,a.JW)(r||(r=h`<path class="primary-path" d="${0}"></path>`),this.path):a.s6,this.secondaryPath?(0,a.JW)(l||(l=h`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):a.s6)}}c.styles=(0,a.AH)(d||(d=h`: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,s.Cg)([(0,o.MZ)()],c.prototype,"path",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],c.prototype,"secondaryPath",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],c.prototype,"viewBox",void 0),c=(0,s.Cg)([(0,o.EM)("ha-svg-icon")],c)},49852:function(t,e,i){i.d(e,{P:function(){return d},j:function(){return l}});i(74423),i(18111),i(81148),i(22489),i(61701),i(13579);var s=i(65522),a=i(71727),o=i(55931),n=i(66033),r=i(58594);const l=(t,e,i,l,d,h,c,p,u,_,v,g="")=>{let m,y,f={};const b=Object.values(t),w=Object.values(i),$=Object.values(l);(h||c||p||u||_)&&(f=(0,r.g2)($),m=w,y=$.filter(t=>t.area_id),h&&(m=m.filter(t=>{const e=f[t.id];return!(!e||!e.length)&&f[t.id].some(t=>h.includes((0,a.m)(t.entity_id)))}),y=y.filter(t=>h.includes((0,a.m)(t.entity_id)))),c&&(m=m.filter(t=>{const e=f[t.id];return!e||!e.length||$.every(t=>!c.includes((0,a.m)(t.entity_id)))}),y=y.filter(t=>!c.includes((0,a.m)(t.entity_id)))),p&&(m=m.filter(t=>{const e=f[t.id];return!(!e||!e.length)&&f[t.id].some(t=>{const e=d[t.entity_id];return!!e&&(e.attributes.device_class&&p.includes(e.attributes.device_class))})}),y=y.filter(t=>{const e=d[t.entity_id];return e.attributes.device_class&&p.includes(e.attributes.device_class)})),u&&(m=m.filter(t=>u(t))),_&&(m=m.filter(t=>{const e=f[t.id];return!(!e||!e.length)&&f[t.id].some(t=>{const e=d[t.entity_id];return!!e&&_(e)})}),y=y.filter(t=>{const e=d[t.entity_id];return!!e&&_(e)})));let C,x=b;m&&(C=m.filter(t=>t.area_id).map(t=>t.area_id)),y&&(C=(null!=C?C:[]).concat(y.filter(t=>t.area_id).map(t=>t.area_id))),C&&(x=x.filter(t=>C.includes(t.area_id))),v&&(x=x.filter(t=>!v.includes(t.area_id)));return x.map(t=>{const{floor:i}=(0,n.L)(t,e),a=i?(0,o.X)(i):void 0,r=(0,s.A)(t);return{id:`${g}${t.area_id}`,primary:r||t.area_id,secondary:a,icon:t.icon||void 0,icon_path:t.icon?void 0:"M20 2H4C2.9 2 2 2.9 2 4V20C2 21.11 2.9 22 4 22H20C21.11 22 22 21.11 22 20V4C22 2.9 21.11 2 20 2M4 6L6 4H10.9L4 10.9V6M4 13.7L13.7 4H18.6L4 18.6V13.7M20 18L18 20H13.1L20 13.1V18M20 10.3L10.3 20H5.4L20 5.4V10.3Z",search_labels:{areaId:t.area_id,aliases:t.aliases.join(" ")}}})},d=[{name:"primary",weight:10},{name:"search_labels.aliases",weight:8},{name:"secondary",weight:6},{name:"search_labels.domain",weight:4},{name:"search_labels.areaId",weight:2}]},26571:function(t,e,i){i.d(e,{Al:function(){return o},KY:function(){return a},PN:function(){return l},dG:function(){return h},jm:function(){return d},m7:function(){return v},sR:function(){return c},t1:function(){return r},t2:function(){return u},x:function(){return _},yu:function(){return p}});var s=i(95350);const a=["bluetooth","dhcp","discovery","esphome","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],o=66649!=i.j?["reauth"]:null,n={"HA-Frontend-Base":`${location.protocol}//${location.host}`},r=(t,e,i)=>t.callApi("POST","config/config_entries/flow",{handler:e,entry_id:i},n),l=(t,e)=>t.callApi("GET",`config/config_entries/flow/${e}`,void 0,n),d=(t,e,i)=>t.callApi("POST",`config/config_entries/flow/${e}`,i,n),h=(t,e,i)=>t.callWS({type:"config_entries/ignore_flow",flow_id:e,title:i}),c=(t,e)=>t.callApi("DELETE",`config/config_entries/flow/${e}`),p=(t,e)=>t.callApi("GET","config/config_entries/flow_handlers"+(e?`?type=${e}`:"")),u=t=>t.sendMessagePromise({type:"config_entries/flow/progress"}),_=(t,e)=>t.connection.subscribeMessage(t=>e(t),{type:"config_entries/flow/subscribe"}),v=(t,e)=>e.context.title_placeholders&&0!==Object.keys(e.context.title_placeholders).length?t(`component.${e.handler}.config.flow_title`,e.context.title_placeholders)||("name"in e.context.title_placeholders?e.context.title_placeholders.name:(0,s.p$)(t,e.handler)):(0,s.p$)(t,e.handler)},53756:function(t,e,i){i.d(e,{t:function(){return l},w:function(){return d}});i(74423),i(18111),i(22489),i(61701),i(62953);var s=i(71727),a=i(74705),o=i(28978),n=i(15638),r=i(95350);const l=[{name:"search_labels.entityName",weight:10},{name:"search_labels.friendlyName",weight:8},{name:"search_labels.deviceName",weight:7},{name:"search_labels.areaName",weight:6},{name:"search_labels.domainName",weight:6},{name:"search_labels.entityId",weight:3}],d=(t,e,i,l,d,h,c,p,u,_="")=>{let v,g=Object.keys(t.states);return c&&(g=g.filter(t=>c.includes(t))),p&&(g=g.filter(t=>!p.includes(t))),e&&(g=g.filter(t=>e.includes((0,s.m)(t)))),i&&(g=g.filter(t=>!i.includes((0,s.m)(t)))),v=g.map(e=>{const i=t.states[e],l=(0,o.u)(i),[d,h,c]=(0,a.Cf)(i,[{type:"entity"},{type:"device"},{type:"area"}],t.entities,t.devices,t.areas,t.floors),p=(0,r.p$)(t.localize,(0,s.m)(e)),u=(0,n.qC)(t.language,t.translationMetadata.translations),v=d||h||e,g=[c,d?h:void 0].filter(Boolean).join(u?" ◂ ":" ▸ ");return{id:`${_}${e}`,primary:v,secondary:g,domain_name:p,sorting_label:[v,g].filter(Boolean).join("_"),search_labels:{entityName:d||null,deviceName:h||null,areaName:c||null,domainName:p||null,friendlyName:l||null,entityId:e},stateObj:i}}),d&&(v=v.filter(t=>{var e;return t.id===u||(null===(e=t.stateObj)||void 0===e?void 0:e.attributes.device_class)&&d.includes(t.stateObj.attributes.device_class)})),h&&(v=v.filter(t=>{var e;return t.id===u||(null===(e=t.stateObj)||void 0===e?void 0:e.attributes.unit_of_measurement)&&h.includes(t.stateObj.attributes.unit_of_measurement)})),l&&(v=v.filter(t=>t.id===u||t.stateObj&&l(t.stateObj))),v}},70407:function(t,e,i){i.d(e,{Y:function(){return s},e:function(){return a}});const s=(t,e)=>t.callWS({type:"number/device_class_convertible_units",device_class:e}),a=["%","A","B","B/s","BTU/(h⋅ft²)","Beaufort","CCF","EB","EiB","GB","GB/s","GHz","GJ","GW","GWh","Gbit","Gbit/s","Gcal","GiB","GiB/s","Hz","J","K","KiB","KiB/s","L","L/h","L/min","L/s","MB","MB/s","MCF","MHz","MJ","MV","MW","MWh","Mbit","Mbit/s","Mcal","MiB","MiB/s","PB","Pa","PiB","S/cm","TB","TW","TWh","TiB","V","VA","W","W/m²","Wh","Wh/km","YB","YiB","ZB","ZiB","ac","bar","bit","bit/s","cal","cbar","cm","cm²","d","dB","dBA","dBm","fl. oz.","ft","ft/s","ft²","ft³","ft³/min","g","g/m³","gal","gal/d","gal/h","gal/min","h","hPa","ha","in","in/d","in/h","in/s","inHg","inH₂O","in²","kB","kB/s","kHz","kJ","kPa","kV","kVA","kW","kWh","kWh/100km","kbit","kbit/s","kcal","kg","km","km/h","km/kWh","km²","kn","kvar","kvarh","lb","lx","m","m/min","m/s","mA","mHz","mL","mL/s","mPa","mS/cm","mV","mVA","mW","mWh","mbar","mg","mg/dL","mg/m³","mi","mi/kWh","min","mi²","mm","mm/d","mm/h","mm/s","mmHg","mmol/L","mm²","mph","ms","mvar","m²","m³","m³/h","m³/min","m³/s","nmi","oz","ppb","ppm","psi","s","st","var","varh","yd","yd²","°","°C","°F","μA","μS/cm","μV","μg","μg/m³","μs"]},7749:function(t,e,i){i.d(e,{HH:function(){return s},TY:function(){return a},lu:function(){return o},mu:function(){return n}});const s=(t,e)=>t.callApi("POST","config/config_entries/options/flow",{handler:e}),a=(t,e)=>t.callApi("GET",`config/config_entries/options/flow/${e}`),o=(t,e,i)=>t.callApi("POST",`config/config_entries/options/flow/${e}`,i),n=(t,e)=>t.callApi("DELETE",`config/config_entries/options/flow/${e}`)},29094:function(t,e,i){i.d(e,{g:function(){return o}});i(3362),i(62953);var s=i(1087);const a=()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(3283),i.e(80131),i.e(98470),i.e(54066),i.e(84038),i.e(62364),i.e(62574),i.e(26092),i.e(39005),i.e(28501),i.e(29792)]).then(i.bind(i,78314)),o=(t,e,i)=>{(0,s.r)(t,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:a,dialogParams:Object.assign(Object.assign({},e),{},{flowConfig:i,dialogParentElement:t})})}},70241:function(t,e,i){i.d(e,{Q:function(){return _}});i(3362),i(62953);var s=i(5124),a=i(95350),o=i(7749),n=i(29094);let r,l,d,h,c,p,u=t=>t;const _=(t,e,i)=>(0,n.g)(t,Object.assign({startFlowHandler:e.entry_id,domain:e.domain},i),{flowType:"options_flow",showDevices:!1,createFlow:async(t,i)=>{const[s]=await Promise.all([(0,o.HH)(t,i),t.loadFragmentTranslation("config"),t.loadBackendTranslation("options",e.domain),t.loadBackendTranslation("selector",e.domain)]);return s},fetchFlow:async(t,i)=>{const[s]=await Promise.all([(0,o.TY)(t,i),t.loadFragmentTranslation("config"),t.loadBackendTranslation("options",e.domain),t.loadBackendTranslation("selector",e.domain)]);return s},handleFlowStep:o.lu,deleteFlow:o.mu,renderAbortDescription(t,i){const a=t.localize(`component.${i.translation_domain||e.domain}.options.abort.${i.reason}`,i.description_placeholders);return a?(0,s.qy)(r||(r=u` <ha-markdown breaks allow-svg .content="${0}"></ha-markdown> `),a):i.reason},renderShowFormStepHeader(t,i){return t.localize(`component.${i.translation_domain||e.domain}.options.step.${i.step_id}.title`,i.description_placeholders)||t.localize("ui.dialogs.options_flow.form.header")},renderShowFormStepDescription(t,i){const a=t.localize(`component.${i.translation_domain||e.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return a?(0,s.qy)(l||(l=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),a):""},renderShowFormStepFieldLabel(t,i,s,a){var o;if("expandable"===s.type)return t.localize(`component.${e.domain}.options.step.${i.step_id}.sections.${s.name}.name`,i.description_placeholders)||s.name;const n=null!=a&&null!==(o=a.path)&&void 0!==o&&o[0]?`sections.${a.path[0]}.`:"";return t.localize(`component.${e.domain}.options.step.${i.step_id}.${n}data.${s.name}`,i.description_placeholders)||s.name},renderShowFormStepFieldHelper(t,i,a,o){var n;if("expandable"===a.type)return t.localize(`component.${i.translation_domain||e.domain}.options.step.${i.step_id}.sections.${a.name}.description`,i.description_placeholders);const r=null!=o&&null!==(n=o.path)&&void 0!==n&&n[0]?`sections.${o.path[0]}.`:"",l=t.localize(`component.${i.translation_domain||e.domain}.options.step.${i.step_id}.${r}data_description.${a.name}`,i.description_placeholders);return l?(0,s.qy)(d||(d=u`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(t,i,s){return t.localize(`component.${i.translation_domain||e.domain}.options.error.${s}`,i.description_placeholders)||s},renderShowFormStepFieldLocalizeValue(t,i,s){return t.localize(`component.${e.domain}.selector.${s}`)},renderShowFormStepSubmitButton(t,i){return t.localize(`component.${e.domain}.options.step.${i.step_id}.submit`)||t.localize("ui.panel.config.integrations.config_flow."+(!1===i.last_step?"next":"submit"))},renderExternalStepHeader(t,e){return""},renderExternalStepDescription(t,e){return""},renderCreateEntryDescription(t,e){return(0,s.qy)(h||(h=u` <p>${0}</p> `),t.localize("ui.dialogs.options_flow.success.description"))},renderShowFormProgressHeader(t,i){return t.localize(`component.${e.domain}.options.step.${i.step_id}.title`)||t.localize(`component.${e.domain}.title`)},renderShowFormProgressDescription(t,i){const a=t.localize(`component.${i.translation_domain||e.domain}.options.progress.${i.progress_action}`,i.description_placeholders);return a?(0,s.qy)(c||(c=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),a):""},renderMenuHeader(t,i){return t.localize(`component.${e.domain}.options.step.${i.step_id}.title`)||t.localize(`component.${e.domain}.title`)},renderMenuDescription(t,i){const a=t.localize(`component.${i.translation_domain||e.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return a?(0,s.qy)(p||(p=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),a):""},renderMenuOption(t,i,s){return t.localize(`component.${i.translation_domain||e.domain}.options.step.${i.step_id}.menu_options.${s}`,i.description_placeholders)},renderMenuOptionDescription(t,i,s){return t.localize(`component.${i.translation_domain||e.domain}.options.step.${i.step_id}.menu_option_descriptions.${s}`,i.description_placeholders)},renderLoadingDescription(t,i){return t.localize(`component.${e.domain}.options.loading`)||("loading_flow"===i||"loading_step"===i?t.localize(`ui.dialogs.options_flow.loading.${i}`,{integration:(0,a.p$)(t.localize,e.domain)}):"")}})},18047:function(t,e,i){i.d(e,{b:function(){return o}});i(3362),i(62953);var s=i(1087);const a=()=>Promise.all([i.e(34174),i.e(49217)]).then(i.bind(i,64480)),o=(t,e,i)=>{(0,s.r)(t,"show-child-view",{viewTag:"ha-more-info-view-vacuum-segment-mapping",viewImport:a,viewTitle:e("ui.dialogs.vacuum_segment_mapping.title"),viewParams:{entityId:i}})}},37288:function(t,e,i){i.d(e,{C:function(){return o}});i(3362),i(62953);var s=i(1087);const a=()=>Promise.all([i.e(81566),i.e(5331)]).then(i.bind(i,66983)),o=(t,e)=>{(0,s.r)(t,"show-child-view",{viewTag:"ha-more-info-view-voice-assistants",viewImport:a,viewTitle:e,viewParams:{}})}},8872:function(t,e,i){i.d(e,{F:function(){return a},_:function(){return o}});i(3362),i(62953);var s=i(1087);const a=()=>Promise.all([i.e(92769),i.e(3283),i.e(33192),i.e(26092),i.e(39005),i.e(66201),i.e(90108)]).then(i.bind(i,22756)),o=(t,e)=>{(0,s.r)(t,"show-dialog",{dialogTag:"dialog-device-registry-detail",dialogImport:a,dialogParams:e})}},72373:function(t,e,i){i.a(t,async function(t,s){try{i.d(e,{T:function(){return Bt}});i(74423),i(44114),i(26910),i(18111),i(22489),i(20116),i(61701),i(33110),i(3362),i(84864),i(57465),i(27495),i(42762),i(62953);var a=i(40445),o=(i(68825),i(5124)),n=i(67576),r=i(91450),l=i(22786),d=i(36312),h=i(1087),c=i(71727),p=i(68246),u=i(82286),_=i(20058),v=i(52220),g=i(22533),m=i(63130),y=i(38962),f=i(66086),b=i(986),w=(i(70947),i(82474)),$=(i(47680),i(3059)),C=i(64138),x=i(50176),k=(i(28732),i(2846),i(606)),A=i(93367),M=i(59646),z=i(91485),I=i(10897),L=i(77423),Z=i(26571),B=i(58594),E=i(59241),q=i(85694),H=i(95350),D=i(70407),O=i(7749),V=i(64808),P=i(24717),S=i(43248),T=i(70241),F=i(65063),j=i(18047),U=i(37288),N=i(42269),W=i(14503),R=i(81619),J=i(8872),G=t([y,f,b,w,$,C,x,k,A,M,z,_,q]);[y,f,b,w,$,C,x,k,A,M,z,_,q]=G.then?(await G)():G;let Y,K,X,Q,tt,et,it,st,at,ot,nt,rt,lt,dt,ht,ct,pt,ut,_t,vt,gt,mt,yt,ft,bt,wt,$t,Ct,xt,kt,At,Mt,zt,It=t=>t;const Lt="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",Zt="M13,3A9,9 0 0,0 4,12H1L4.89,15.89L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3Z",Bt={cover:[["awning","blind","curtain","damper","door","garage","gate","shade","shutter","window"]],binary_sensor:[["lock"],["window","door","garage_door","opening"],["battery","battery_charging"],["cold","gas","heat"],["running","motion","moving","occupancy","presence","vibration"],["power","plug","light"],["smoke","safety","sound","problem","tamper","carbon_monoxide","moisture"],["connectivity"],["update"]]},Et=["cover","fan","light","lock","siren","valve"],qt=["cover","lock","valve"],Ht=[0,1,2,3,4,5,6],Dt=["router","bluetooth","bluetooth_le"],Ot=["zone"];class Vt extends o.WF{_currentState(){var t,e,i;return{name:this._name.trim()||null,icon:this._icon.trim()||null,entityId:this._entityId.trim(),areaId:null!==(t=this._areaId)&&void 0!==t?t:null,labels:null!==(e=this._labels)&&void 0!==e?e:[],deviceClass:this._deviceClass,disabledBy:this._disabledBy,hiddenBy:this._hiddenBy,unitOfMeasurement:this._unit_of_measurement,precision:this._precision,defaultCode:this._defaultCode,calendarColor:null!==(i=this._calendarColor)&&void 0!==i?i:null,precipitationUnit:this._precipitation_unit,pressureUnit:this._pressure_unit,temperatureUnit:this._temperature_unit,visibilityUnit:this._visibility_unit,windSpeedUnit:this._wind_speed_unit,switchAsDomain:this._switchAsDomain,switchAsInvert:this._switchAsInvert}}willUpdate(t){var e,i;if(super.willUpdate(t),!t.has("entry")||(null===(e=t.get("entry"))||void 0===e?void 0:e.id)===this.entry.id)return;this._name=this.entry.name||"",this._icon=this.entry.icon||"",this._deviceClass=this.entry.device_class||this.entry.original_device_class,this._origEntityId=this.entry.entity_id,this._areaId=this.entry.area_id,this._labels=this.entry.labels,this._entityId=this.entry.entity_id,this._disabledBy=this.entry.disabled_by,this._hiddenBy=this.entry.hidden_by,this._device=this.entry.device_id?this.hass.devices[this.entry.device_id]:void 0,this._switchAsInvert=!0===(null===(i=this.entry.options)||void 0===i||null===(i=i.switch_as_x)||void 0===i?void 0:i.invert);const s=(0,c.m)(this.entry.entity_id);if("camera"===s&&(0,d.x)(this.hass.config,"stream")){const t=this.hass.states[this.entry.entity_id];t&&(0,u.$)(t,2)&&this._fetchCameraPrefs()}if("number"===s||"sensor"===s){var a;const t=this.hass.states[this.entry.entity_id];this._unit_of_measurement=null==t||null===(a=t.attributes)||void 0===a?void 0:a.unit_of_measurement}var o,n,r,l,h,p;"sensor"===s&&(this._precision=null===(o=this.entry.options)||void 0===o||null===(o=o.sensor)||void 0===o?void 0:o.display_precision);"lock"===s&&(this._defaultCode=null===(n=this.entry.options)||void 0===n||null===(n=n.lock)||void 0===n?void 0:n.default_code);"alarm_control_panel"===s&&(this._defaultCode=null===(r=this.entry.options)||void 0===r||null===(r=r.alarm_control_panel)||void 0===r?void 0:r.default_code);"calendar"===s&&(this._calendarColor=null===(l=this.entry.options)||void 0===l||null===(l=l.calendar)||void 0===l?void 0:l.color);"device_tracker"===s&&(this._associatedZone=null!==(h=null===(p=this.entry.options)||void 0===p||null===(p=p.device_tracker)||void 0===p?void 0:p.associated_zone)&&void 0!==h?h:"zone.home");if("weather"===s){var _,v,g,m,y;const t=this.hass.states[this.entry.entity_id];this._precipitation_unit=null==t||null===(_=t.attributes)||void 0===_?void 0:_.precipitation_unit,this._pressure_unit=null==t||null===(v=t.attributes)||void 0===v?void 0:v.pressure_unit,this._temperature_unit=null==t||null===(g=t.attributes)||void 0===g?void 0:g.temperature_unit,this._visibility_unit=null==t||null===(m=t.attributes)||void 0===m?void 0:m.visibility_unit,this._wind_speed_unit=null==t||null===(y=t.attributes)||void 0===y?void 0:y.wind_speed_unit}this._initialStateJson=JSON.stringify(this._currentState()),this._lastDirty=!1;const f=Bt[s];if(f&&!this._hideDeviceClassOverride(s)){this._deviceClassOptions=[[],[]];for(const t of f)t.includes(this.entry.original_device_class)?this._deviceClassOptions[0]=t:this._deviceClassOptions[1].push(...t)}else this._deviceClassOptions=void 0}_hideDeviceClassOverride(t){return"binary_sensor"===t&&"template"===this.entry.platform&&!!this.entry.config_entry_id}_precisionLabel(t,e){const i=Number(e),s=isNaN(i)?0:e;return(0,_.ZV)(s,this.hass.locale,{minimumFractionDigits:t,maximumFractionDigits:t})}_isInvalidDefaultCode(t,e){return!(!t||!e)&&!RegExp(t).test(e)}async updated(t){if(t.has("_deviceClass")){const t=(0,c.m)(this.entry.entity_id);if("number"===t&&this._deviceClass){const{units:t}=await(0,D.Y)(this.hass,this._deviceClass);this._numberDeviceClassConvertibleUnits=t}else this._numberDeviceClassConvertibleUnits=[];if("sensor"===t){const{numeric_device_classes:t}=await(0,V.KL)(this.hass);this._sensorNumericalDeviceClasses=t}else this._sensorNumericalDeviceClasses=[];if("sensor"===t&&this._deviceClass){const{units:t}=await(0,V.j4)(this.hass,this._deviceClass);this._sensorDeviceClassConvertibleUnits=t}else this._sensorDeviceClassConvertibleUnits=[]}if(t.has("_entityId")){const t=(0,c.m)(this.entry.entity_id);if("switch"===t&&this.hass.loadBackendTranslation("title",Et,!1),"weather"===t){const{units:t}=await(0,S.VB)(this.hass);this._weatherConvertibleUnits=t}else this._weatherConvertibleUnits=void 0}var e;t.has("helperConfigEntry")&&("switch_as_x"===(null===(e=this.helperConfigEntry)||void 0===e?void 0:e.domain)?(this._switchAsDomain=(0,c.m)(this.entry.entity_id),this.hass.loadBackendTranslation("title",Et,!1)):(this._switchAsDomain="switch",this._switchAsInvert=!1),this._initialStateJson=JSON.stringify(this._currentState()),this._lastDirty=!1);if(this._initialStateJson){const t=this.dirty;t!==this._lastDirty&&(this._lastDirty=t,(0,h.r)(this,"change"))}}render(){var t,e,i,s,a,n,l,d,h,_,v,g,m,y,f,b,w;if(this.entry.entity_id!==this._origEntityId)return o.s6;const $=this.hass.states[this.entry.entity_id],C=(0,c.m)(this.entry.entity_id),x="lock"===C&&this._isInvalidDefaultCode(null==$||null===(t=$.attributes)||void 0===t?void 0:t.code_format,this._defaultCode),k=null!==(e=null===(i=this.entry.options)||void 0===i||null===(i=i.sensor)||void 0===i?void 0:i.suggested_display_precision)&&void 0!==e?e:void 0;return(0,o.qy)(Y||(Y=It` ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} <ha-input class="entityId" .value="${0}" inset-label .label="${0}" .disabled="${0}" required @input="${0}" autocapitalize="none" autocomplete="off" .autocorrect="${0}" .spellcheck="${0}"> <span class="input-prefix" slot="start">${0}</span> <ha-icon-button slot="end" @click="${0}" .path="${0}"></ha-icon-button> <ha-icon-button slot="end" @click="${0}" .path="${0}"></ha-icon-button> </ha-input> ${0} <ha-labels-picker .hass="${0}" .value="${0}" .disabled="${0}" @value-changed="${0}"></ha-labels-picker> ${0} ${0} <ha-list-item class="menu-item" twoline hasMeta .disabled="${0}" @click="${0}"> <span>${0}</span> <span slot="secondary"> ${0} </span> <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> ${0} ${0} <ha-md-list-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" .disabled="${0}" @change="${0}"></ha-switch> </ha-md-list-item> ${0} <ha-md-list-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" .disabled="${0}" @change="${0}"></ha-switch> </ha-md-list-item> ${0} `),this.hideName?o.s6:(0,o.qy)(K||(K=It`<ha-input inset-label class="name" .value="${0}" .label="${0}" .disabled="${0}" @input="${0}"> ${0} </ha-input>`),this._name,this.hass.localize("ui.dialogs.entity_registry.editor.name"),this.disabled,this._nameChanged,this._device?(0,o.qy)(X||(X=It`<span slot="hint">${0}</span>`),this.hass.localize("ui.dialogs.entity_registry.editor.device_name_tip",{link:(0,o.qy)(Q||(Q=It`<button class="link" @click="${0}"> ${0} </button>`),this._resetNameAndOpenDeviceSettings,this.hass.localize("ui.dialogs.entity_registry.editor.open_device_settings"))})):o.s6),this.hideIcon?o.s6:(0,o.qy)(tt||(tt=It` <ha-icon-picker .value="${0}" @value-changed="${0}" .label="${0}" .placeholder="${0}" .disabled="${0}"> ${0} </ha-icon-picker> `),this._icon,this._iconChanged,this.hass.localize("ui.dialogs.entity_registry.editor.icon"),this.entry.original_icon||(null==$?void 0:$.attributes.icon)||$&&(0,r.T)((0,q.fq)(this.hass.entities,this.hass.config,this.hass.connection,$))||(0,r.T)((0,q.u7)(this.hass,this.entry)),this.disabled,this._icon||null!=$&&$.attributes.icon||!$?o.s6:(0,o.qy)(et||(et=It` <ha-state-icon slot="start" .stateObj="${0}"></ha-state-icon> `),$)),"switch"===C?(0,o.qy)(it||(it=It`<ha-select .label="${0}" @selected="${0}" value="${0}"> <ha-dropdown-item value="switch" .selected="${0}"> ${0} </ha-dropdown-item> <ha-dropdown-item value="outlet" .selected="${0}"> ${0} </ha-dropdown-item> <wa-divider></wa-divider> ${0} </ha-select>`),this.hass.localize("ui.dialogs.entity_registry.editor.device_class"),this._switchAsDomainChanged,this._switchAsLabel(this._switchAsDomain,this._deviceClass),"switch"===this._switchAsDomain&&(!this._deviceClass||"switch"===this._deviceClass),(0,H.p$)(this.hass.localize,"switch"),"switch"===this._switchAsDomain&&"outlet"===this._deviceClass,this.hass.localize("ui.dialogs.entity_registry.editor.device_classes.switch.outlet"),this._switchAsDomainsSorted(Et,this.hass.localize).map(t=>(0,o.qy)(st||(st=It` <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> `),t.domain,this._switchAsDomain===t.domain,t.label))):"switch_as_x"===(null===(s=this.helperConfigEntry)||void 0===s?void 0:s.domain)?(0,o.qy)(at||(at=It`<ha-select .label="${0}" .value="${0}" @selected="${0}"> <ha-dropdown-item value="switch" .selected="${0}"> ${0} </ha-dropdown-item> <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> <wa-divider></wa-divider> ${0} </ha-select> ${0} `),this.hass.localize("ui.dialogs.entity_registry.editor.switch_as_x"),this._switchAsLabel(this._switchAsDomain),this._switchAsDomainChanged,"switch"===this._switchAsDomain,(0,H.p$)(this.hass.localize,"switch"),C,this._switchAsDomain===C,(0,H.p$)(this.hass.localize,C),this._switchAsDomainsSorted(Et,this.hass.localize).map(t=>C===t.domain?o.s6:(0,o.qy)(ot||(ot=It` <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> `),t.domain,this._switchAsDomain===t.domain,t.label)),qt.includes(this._switchAsDomain)?(0,o.qy)(nt||(nt=It` <ha-md-list-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" @change="${0}"></ha-switch> </ha-md-list-item> `),this.hass.localize("ui.dialogs.entity_registry.editor.invert.label"),this.hass.localize(`ui.dialogs.entity_registry.editor.invert.descriptions.${this._switchAsDomain}`),!(null===(a=this.entry.options)||void 0===a||null===(a=a.switch_as_x)||void 0===a||!a.invert),this._switchAsInvertChanged):o.s6):o.s6,this._deviceClassOptions&&!this._hideDeviceClassOverride(C)?(0,o.qy)(rt||(rt=It` <ha-select .label="${0}" .value="${0}" clearable @selected="${0}"> ${0} ${0} ${0} </ha-select> `),this.hass.localize("ui.dialogs.entity_registry.editor.device_class"),this._deviceClass?this.hass.localize(`ui.dialogs.entity_registry.editor.device_classes.${C}.${this._deviceClass}`):void 0,this._deviceClassChanged,this._deviceClassesSorted(C,this._deviceClassOptions[0],this.hass.localize).map(t=>(0,o.qy)(lt||(lt=It` <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> `),t.deviceClass,t.deviceClass===this._deviceClass,t.label)),this._deviceClassOptions[0].length&&this._deviceClassOptions[1].length?(0,o.qy)(dt||(dt=It`<wa-divider></wa-divider>`)):o.s6,this._deviceClassesSorted(C,this._deviceClassOptions[1],this.hass.localize).map(t=>(0,o.qy)(ht||(ht=It` <ha-dropdown-item .value="${0}" .selected="${0}"> ${0} </ha-dropdown-item> `),t.deviceClass,t.deviceClass===this._deviceClass,t.label))):o.s6,"number"===C&&this._deviceClass&&null!=$&&$.attributes.unit_of_measurement&&null!==(n=this._numberDeviceClassConvertibleUnits)&&void 0!==n&&n.includes(null==$?void 0:$.attributes.unit_of_measurement)?(0,o.qy)(ct||(ct=It` <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> `),this.hass.localize("ui.dialogs.entity_registry.editor.unit_of_measurement"),this._unit_of_measurement||$.attributes.unit_of_measurement,this._unitChanged,this._numberDeviceClassConvertibleUnits):o.s6,"lock"===C?(0,o.qy)(pt||(pt=It` <ha-input .validationMessage="${0}" .value="${0}" .label="${0}" type="password" .invalid="${0}" .disabled="${0}" @input="${0}" password-toggle></ha-input> `),this.hass.localize("ui.dialogs.entity_registry.editor.default_code_error"),null==this._defaultCode?"":this._defaultCode,this.hass.localize("ui.dialogs.entity_registry.editor.default_code"),x,this.disabled,this._defaultcodeChanged):o.s6,"alarm_control_panel"===C?(0,o.qy)(ut||(ut=It` <ha-input .value="${0}" .label="${0}" type="password" .disabled="${0}" @input="${0}" password-toggle></ha-input> `),null==this._defaultCode?"":this._defaultCode,this.hass.localize("ui.dialogs.entity_registry.editor.default_code"),this.disabled,this._defaultcodeChanged):o.s6,"calendar"===C?(0,o.qy)(_t||(_t=It` <ha-color-picker .hass="${0}" .value="${0}" .label="${0}" .disabled="${0}" @value-changed="${0}"></ha-color-picker> `),this.hass,null!==(l=this._calendarColor)&&void 0!==l?l:"",this.hass.localize("ui.dialogs.entity_registry.editor.calendar_color"),this.disabled,this._calendarColorChanged):o.s6,"device_tracker"===C&&Dt.includes(null==$||null===(d=$.attributes)||void 0===d?void 0:d.source_type)?(0,o.qy)(vt||(vt=It` <ha-entity-picker .hass="${0}" .value="${0}" .label="${0}" .includeDomains="${0}" .disabled="${0}" @value-changed="${0}"></ha-entity-picker> `),this.hass,this._associatedZone,this.hass.localize("ui.dialogs.entity_registry.editor.associated_zone"),Ot,this.disabled,this._associatedZoneChanged):o.s6,"sensor"===C&&this._deviceClass&&null!=$&&$.attributes.unit_of_measurement&&null!==(h=this._sensorDeviceClassConvertibleUnits)&&void 0!==h&&h.includes(null==$?void 0:$.attributes.unit_of_measurement)?(0,o.qy)(gt||(gt=It` <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> `),this.hass.localize("ui.dialogs.entity_registry.editor.unit_of_measurement"),this._unit_of_measurement||$.attributes.unit_of_measurement,this._unitChanged,this._sensorDeviceClassConvertibleUnits):o.s6,"sensor"===C&&(this._deviceClass&&null!==(_=this._sensorNumericalDeviceClasses)&&void 0!==_&&_.includes(this._deviceClass)||null!=$&&$.attributes.unit_of_measurement||null!=$&&$.attributes.state_class)?(0,o.qy)(mt||(mt=It` <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> `),this.hass.localize("ui.dialogs.entity_registry.editor.precision"),null==this._precision?"default":this._precision.toString(),this._precisionChanged,[{value:"default",label:this.hass.localize("ui.dialogs.entity_registry.editor.precision_default",{value:this._precisionLabel(k,null==$?void 0:$.state)})},...Ht.map(t=>({value:t.toString(),label:this._precisionLabel(t,null==$?void 0:$.state)}))]):o.s6,"weather"===C?(0,o.qy)(yt||(yt=It` <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> <ha-select .label="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> `),this.hass.localize("ui.dialogs.entity_registry.editor.precipitation_unit"),this._precipitation_unit||void 0,this._precipitationUnitChanged,null===(v=this._weatherConvertibleUnits)||void 0===v?void 0:v.precipitation_unit,this.hass.localize("ui.dialogs.entity_registry.editor.pressure_unit"),this._pressure_unit||void 0,this._pressureUnitChanged,null===(g=this._weatherConvertibleUnits)||void 0===g?void 0:g.pressure_unit,this.hass.localize("ui.dialogs.entity_registry.editor.temperature_unit"),this._temperature_unit||void 0,this._temperatureUnitChanged,null===(m=this._weatherConvertibleUnits)||void 0===m?void 0:m.temperature_unit,this.hass.localize("ui.dialogs.entity_registry.editor.visibility_unit"),this._visibility_unit||void 0,this._visibilityUnitChanged,null===(y=this._weatherConvertibleUnits)||void 0===y?void 0:y.visibility_unit,this.hass.localize("ui.dialogs.entity_registry.editor.wind_speed_unit"),this._wind_speed_unit||void 0,this._windSpeedUnitChanged,null===(f=this._weatherConvertibleUnits)||void 0===f?void 0:f.wind_speed_unit):o.s6,(0,p.Y)(this._entityId),this.hass.localize("ui.dialogs.entity_registry.editor.entity_id"),this.disabled,this._entityIdChanged,!1,!1,C+".",this._restoreEntityId,Zt,this._copyEntityId,Lt,this.entry.device_id?o.s6:(0,o.qy)(ft||(ft=It`<ha-area-picker .hass="${0}" .value="${0}" .disabled="${0}" @value-changed="${0}"></ha-area-picker>`),this.hass,this._areaId,this.disabled,this._areaPicked),this.hass,this._labels,!!this.disabled,this._labelsChanged,this._cameraPrefs?(0,o.qy)(bt||(bt=It` <ha-md-list-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" .disabled="${0}" @change="${0}"></ha-switch> </ha-md-list-item> <ha-md-list-item> <span slot="headline">${0}</span> <span slot="supporting-text">${0}</span> <ha-select slot="supporting-text" .label="${0}" .disabled="${0}" @selected="${0}" .options="${0}" .value="${0}"> </ha-select> </ha-md-list-item> `),this.hass.localize("ui.dialogs.entity_registry.editor.stream.preload_stream"),this.hass.localize("ui.dialogs.entity_registry.editor.stream.preload_stream_description"),this._cameraPrefs.preload_stream,this.disabled,this._handleCameraPrefsChanged,this.hass.localize("ui.dialogs.entity_registry.editor.stream.stream_orientation"),this.hass.localize("ui.dialogs.entity_registry.editor.stream.stream_orientation_description"),this.hass.localize("ui.dialogs.entity_registry.editor.stream.stream_orientation"),this.disabled,this._handleCameraOrientationChanged,I.sd.map(t=>({value:t.toString(),label:this.hass.localize("ui.dialogs.entity_registry.editor.stream.stream_orientation_"+t.toString())})),this._cameraPrefs.orientation.toString()):o.s6,this.helperConfigEntry&&this.helperConfigEntry.supports_options&&"switch_as_x"!==this.helperConfigEntry.domain?(0,o.qy)(wt||(wt=It` <ha-list-item class="menu-item" twoline hasMeta .disabled="${0}" @click="${0}"> <span>${0}</span> <span slot="secondary">${0}</span> <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> `),this.disabled,this._showOptionsFlow,this.hass.localize("ui.dialogs.entity_registry.editor.configure_state",{integration:(0,H.p$)(this.hass.localize,this.helperConfigEntry.domain)}),this.hass.localize("ui.dialogs.entity_registry.editor.configure_state_secondary",{integration:(0,H.p$)(this.hass.localize,this.helperConfigEntry.domain)})):o.s6,this.disabled,this._handleVoiceAssistantsClicked,this.hass.localize("ui.dialogs.entity_registry.editor.voice_assistants"),this.entry.aliases.filter(t=>null!==t).length?this.entry.aliases.filter(t=>null!==t).join(", "):this.hass.localize("ui.dialogs.entity_registry.editor.no_aliases"),"vacuum"===C&&$&&(0,u.$)($,P.Ri.CLEAN_AREA)?(0,o.qy)($t||($t=It` <ha-list-item class="menu-item" twoline hasMeta .disabled="${0}" @click="${0}"> <span>${0}</span> <span slot="secondary"> ${0} </span> <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> `),this.disabled,this._handleVacuumSegmentMappingClicked,this.hass.localize("ui.dialogs.vacuum_segment_mapping.title"),this.hass.localize("ui.dialogs.vacuum_segment_mapping.description")):o.s6,this._disabledBy&&"user"!==this._disabledBy&&"integration"!==this._disabledBy?(0,o.qy)(Ct||(Ct=It`<ha-alert alert-type="warning">${0}</ha-alert>`),this.hass.localize("ui.dialogs.entity_registry.editor.enabled_cause",{cause:this.hass.localize(`config_entry.disabled_by.${this._disabledBy}`)})):o.s6,this.hass.localize("ui.dialogs.entity_registry.editor.enabled_label"),this.hass.localize("ui.dialogs.entity_registry.editor.enabled_description"),!this._disabledBy,this.disabled||(null===(b=this._device)||void 0===b?void 0:b.disabled_by)||this._disabledBy&&"user"!==this._disabledBy&&"integration"!==this._disabledBy,this._enabledChanged,this._hiddenBy&&"user"!==this._hiddenBy?(0,o.qy)(xt||(xt=It`<ha-alert alert-type="warning">${0}</ha-alert>`),this.hass.localize("ui.dialogs.entity_registry.editor.hidden_cause",{cause:this.hass.localize(`config_entry.hidden_by.${this._hiddenBy}`)})):o.s6,this.hass.localize("ui.dialogs.entity_registry.editor.visible_label"),this.hass.localize("ui.dialogs.entity_registry.editor.hidden_explanation"),!this._disabledBy&&!this._hiddenBy,this.disabled||this._disabledBy,this._hiddenChanged,this.entry.device_id?(0,o.qy)(kt||(kt=It` <ha-md-list-item> <span slot="headline">${0} ${0}</span> <span slot="supporting-text">${0}</span> <ha-switch slot="end" .checked="${0}" .disabled="${0}" @change="${0}"></ha-switch> </ha-md-list-item> ${0} `),this.hass.localize("ui.dialogs.entity_registry.editor.use_device_area"),this.hass.devices[this.entry.device_id].area_id?`(${null===(w=this.hass.areas[this.hass.devices[this.entry.device_id].area_id])||void 0===w?void 0:w.name})`:o.s6,this.hass.localize("ui.dialogs.entity_registry.editor.change_device_settings",{link:(0,o.qy)(At||(At=It`<button class="link" @click="${0}"> ${0} </button>`),this._openDeviceSettings,this.hass.localize("ui.dialogs.entity_registry.editor.change_device_area_link"))}),!this._areaId||this._noDeviceArea,this.disabled,this._useDeviceAreaChanged,this._areaId||this._noDeviceArea?(0,o.qy)(Mt||(Mt=It`<ha-area-picker .hass="${0}" .value="${0}" .disabled="${0}" @value-changed="${0}"></ha-area-picker>`),this.hass,this._areaId,this.disabled,this._areaPicked):o.s6):o.s6)}get dirty(){return JSON.stringify(this._currentState())!==this._initialStateJson}async updateEntry(){var t,e,i,s,a,o,n,r,l,d,h,p,u,_;let v=!0,m=this;for(;"home-assistant"!==(null===(y=m)||void 0===y?void 0:y.localName);){var y;m=m.getRootNode().host}const f={name:this._name.trim()||null,icon:this._icon.trim()||null,area_id:this._areaId||null,labels:this._labels||[],new_entity_id:this._entityId.trim()};var b;this._deviceClass!==(this.entry.device_class||this.entry.original_device_class)&&(f.device_class=null!==(b=this._deviceClass)&&void 0!==b?b:null);const w=this.hass.states[this.entry.entity_id],$=(0,c.m)(this.entry.entity_id);var C,x,k,A;(this.entry.disabled_by===this._disabledBy||null!==this._disabledBy&&"user"!==this._disabledBy||(f.disabled_by=this._disabledBy),this.entry.hidden_by===this._hiddenBy||null!==this._hiddenBy&&"user"!==this._hiddenBy||(f.hidden_by=this._hiddenBy),"number"!==$&&"sensor"!==$||(null==w||null===(t=w.attributes)||void 0===t?void 0:t.unit_of_measurement)===this._unit_of_measurement)||(f.options_domain=$,f.options=(null===(C=this.entry.options)||void 0===C?void 0:C[$])||{},f.options.unit_of_measurement=this._unit_of_measurement);"sensor"===$&&(null===(e=this.entry.options)||void 0===e||null===(e=e[$])||void 0===e?void 0:e.display_precision)!==this._precision&&(f.options_domain=$,f.options=f.options||(null===(x=this.entry.options)||void 0===x?void 0:x[$])||{},f.options.display_precision=this._precision);"lock"===$&&(null===(i=this.entry.options)||void 0===i||null===(i=i[$])||void 0===i?void 0:i.default_code)!==this._defaultCode&&(f.options_domain=$,f.options=(null===(k=this.entry.options)||void 0===k?void 0:k[$])||{},f.options.default_code=this._defaultCode);"alarm_control_panel"===$&&(null===(s=this.entry.options)||void 0===s||null===(s=s[$])||void 0===s?void 0:s.default_code)!==this._defaultCode&&(f.options_domain=$,f.options=(null===(A=this.entry.options)||void 0===A?void 0:A[$])||{},f.options.default_code=this._defaultCode);if("calendar"===$){var M,z,I;var B;if((null!==(M=null===(z=this.entry.options)||void 0===z||null===(z=z.calendar)||void 0===z?void 0:z.color)&&void 0!==M?M:null)!==(null!==(I=this._calendarColor)&&void 0!==I?I:null))f.options_domain=$,f.options=(null===(B=this.entry.options)||void 0===B?void 0:B.calendar)||{},f.options.color=this._calendarColor}"device_tracker"===$&&void 0!==this._associatedZone&&(null!==(a=null===(o=this.entry.options)||void 0===o||null===(o=o.device_tracker)||void 0===o?void 0:o.associated_zone)&&void 0!==a?a:"zone.home")!==this._associatedZone&&(f.options_domain="device_tracker",f.options={associated_zone:this._associatedZone}),"weather"!==$||(null==w||null===(n=w.attributes)||void 0===n?void 0:n.precipitation_unit)===this._precipitation_unit&&(null==w||null===(r=w.attributes)||void 0===r?void 0:r.pressure_unit)===this._pressure_unit&&(null==w||null===(l=w.attributes)||void 0===l?void 0:l.temperature_unit)===this._temperature_unit&&(null==w||null===(d=w.attributes)||void 0===d?void 0:d.visbility_unit)===this._visibility_unit&&(null==w||null===(h=w.attributes)||void 0===h?void 0:h.wind_speed_unit)===this._wind_speed_unit||(f.options_domain="weather",f.options={precipitation_unit:this._precipitation_unit,pressure_unit:this._pressure_unit,temperature_unit:this._temperature_unit,visibility_unit:this._visibility_unit,wind_speed_unit:this._wind_speed_unit});const q=await(0,E.G_)(this.hass,this.entry.entity_id,f);if(q.require_restart&&(0,F.showAlertDialog)(this,{text:this.hass.localize("ui.dialogs.entity_registry.editor.enabled_restart_confirm")}),q.reload_delay&&(0,F.showAlertDialog)(this,{text:this.hass.localize("ui.dialogs.entity_registry.editor.enabled_delay_confirm",{delay:q.reload_delay})}),"switch"===$&&"switch"!==this._switchAsDomain){if(await(0,F.dk)(this,{text:this.hass.localize("ui.dialogs.entity_registry.editor.switch_as_x_confirm",{domain:(0,g.i)((0,H.p$)(this.hass.localize,this._switchAsDomain),this.hass.locale.language)})})){var D;const t=await(0,Z.t1)(this.hass,"switch_as_x"),e=await(0,Z.jm)(this.hass,t.flow_id,{entity_id:this._entityId.trim(),invert:this._switchAsInvert,target_domain:this._switchAsDomain});if(null!==(D=e.result)&&void 0!==D&&D.entry_id)try{const t=await this._waitForEntityRegistryUpdate(e.result.entry_id);(0,N.p)(m,{entityId:t.entity_id}),v=!1}catch(T){}}}else if("switch_as_x"===(null===(p=this.helperConfigEntry)||void 0===p?void 0:p.domain)&&this._switchAsDomain!==$){if(await(0,F.dk)(this,{text:"switch"===this._switchAsDomain?this.hass.localize("ui.dialogs.entity_registry.editor.switch_as_x_remove_confirm",{domain:(0,g.i)((0,H.p$)(this.hass.localize,$),this.hass.locale.language)}):this.hass.localize("ui.dialogs.entity_registry.editor.switch_as_x_change_confirm",{domain_1:(0,g.i)((0,H.p$)(this.hass.localize,$),this.hass.locale.language),domain_2:(0,g.i)((0,H.p$)(this.hass.localize,this._switchAsDomain),this.hass.locale.language)})})){var V;const t=null===(V=this.entry.options)||void 0===V||null===(V=V.switch_as_x)||void 0===V?void 0:V.entity_id;if(await(0,L.eM)(this.hass,this.helperConfigEntry.entry_id),t)if("switch"===this._switchAsDomain)(0,N.p)(m,{entityId:t}),v=!1;else{var P;const e=await(0,Z.t1)(this.hass,"switch_as_x"),i=await(0,Z.jm)(this.hass,e.flow_id,{entity_id:t,invert:this._switchAsInvert,target_domain:this._switchAsDomain});if(null!==(P=i.result)&&void 0!==P&&P.entry_id)try{const t=await this._waitForEntityRegistryUpdate(i.result.entry_id);(0,N.p)(m,{entityId:t.entity_id}),v=!1}catch(T){}}else;}}else if("switch_as_x"===(null===(u=this.helperConfigEntry)||void 0===u?void 0:u.domain)&&this._switchAsDomain===$&&this._switchAsInvert!==(null===(_=this.entry.options)||void 0===_||null===(_=_.switch_as_x)||void 0===_?void 0:_.invert)){var S;if(null===(S=this.entry.options)||void 0===S||null===(S=S.switch_as_x)||void 0===S?void 0:S.entity_id){const t=await(0,O.HH)(this.hass,this.helperConfigEntry.entry_id);await(0,O.lu)(this.hass,t.flow_id,{invert:this._switchAsInvert})}else;}return{close:v,entry:q.entity_entry}}async _waitForEntityRegistryUpdate(t){return new Promise((e,i)=>{var s;const a=setTimeout(i,5e3),o=(0,E.Bz)(this.hass.connection,i=>{const s=i.find(e=>e.config_entry_id===t);s&&(clearTimeout(a),o(),e(s))});null===(s=this.hass.connection._entityRegistry)||void 0===s||s.refresh()})}_nameChanged(t){(0,h.r)(this,"change"),this._name=t.target.value}_iconChanged(t){(0,h.r)(this,"change"),this._icon=t.detail.value}async _restoreEntityId(){const t=await(0,E.BM)(this.hass,[this._origEntityId]);this._entityId=t[this._origEntityId]||this._origEntityId}async _copyEntityId(){await(0,m.l)(this._entityId),(0,R.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")})}_entityIdChanged(t){(0,h.r)(this,"change"),this._entityId=`${(0,c.m)(this._origEntityId)}.${t.target.value}`}_deviceClassChanged(t){(0,h.r)(this,"change"),this._deviceClass=t.detail.value}_unitChanged(t){(0,h.r)(this,"change"),this._unit_of_measurement=t.detail.value}_defaultcodeChanged(t){(0,h.r)(this,"change"),this._defaultCode=""===t.target.value?null:t.target.value}_calendarColorChanged(t){(0,h.r)(this,"change"),this._calendarColor=t.detail.value||null}_associatedZoneChanged(t){(0,h.r)(this,"change"),this._associatedZone=t.detail.value||"zone.home"}_precipitationUnitChanged(t){(0,h.r)(this,"change"),this._precipitation_unit=t.detail.value}_precisionChanged(t){(0,h.r)(this,"change"),this._precision="default"===t.detail.value?null:Number(t.detail.value)}_pressureUnitChanged(t){(0,h.r)(this,"change"),this._pressure_unit=t.detail.value}_temperatureUnitChanged(t){(0,h.r)(this,"change"),this._temperature_unit=t.detail.value}_visibilityUnitChanged(t){(0,h.r)(this,"change"),this._visibility_unit=t.detail.value}_windSpeedUnitChanged(t){(0,h.r)(this,"change"),this._wind_speed_unit=t.detail.value}_switchAsDomainChanged(t){const e=t.detail.value;""!==e&&(this._switchAsDomain="outlet"===e?"switch":e,("switch"===(0,c.m)(this.entry.entity_id)&&"outlet"===e||"switch"===e)&&(this._deviceClass=e))}_switchAsInvertChanged(t){this._switchAsInvert=t.target.checked}_useDeviceAreaChanged(t){this._noDeviceArea=!t.target.checked,this._noDeviceArea||(this._areaId=void 0)}_areaPicked(t){(0,h.r)(this,"change"),this._areaId=t.detail.value}_labelsChanged(t){this._labels=t.detail.value}async _fetchCameraPrefs(){(await(0,I._Z)(this.hass,this.entry.entity_id)).frontend_stream_types.includes("hls")?this._cameraPrefs=await(0,I.y3)(this.hass,this.entry.entity_id):this._cameraPrefs=void 0}async _handleCameraPrefsChanged(t){const e=t.currentTarget;try{this._cameraPrefs=await(0,I.FX)(this.hass,this.entry.entity_id,{preload_stream:e.checked})}catch(i){(0,F.showAlertDialog)(this,{text:i.message}),e.checked=!e.checked}}async _handleCameraOrientationChanged(t){try{this._cameraPrefs=await(0,I.FX)(this.hass,this.entry.entity_id,{orientation:Number(t.detail.value)})}catch(e){(0,F.showAlertDialog)(this,{text:e.message})}}_enabledChanged(t){t.target.checked?this._disabledBy=null:this._disabledBy="user"}_hiddenChanged(t){t.target.checked?this._hiddenBy=null:this._hiddenBy="user"}_resetNameAndOpenDeviceSettings(){this._name=this.entry.name||"",(0,h.r)(this,"change"),this._openDeviceSettings()}_openDeviceSettings(){(0,J._)(this,{device:this._device,updateEntry:async t=>{await(0,B.FB)(this.hass,this._device.id,t)}})}_handleVoiceAssistantsClicked(){(0,U.C)(this,this.hass.localize("ui.dialogs.entity_registry.editor.voice_assistants"))}_handleVacuumSegmentMappingClicked(){(0,j.b)(this,this.hass.localize,this.entry.entity_id)}async _showOptionsFlow(){(0,T.Q)(this,this.helperConfigEntry,{manifest:await(0,H.QC)(this.hass,this.helperConfigEntry.domain)})}static get styles(){return[W.RF,(0,o.AH)(zt||(zt=It`:host{display:block}.input-prefix{color:var(--secondary-text-color);margin:var(--ha-space-3) 0 0}ha-input.entityId,ha-input.name{--ha-icon-button-size:36px;--mdc-icon-size:20px}ha-input.name{--ha-input-start-max-width:35%}ha-input.entityId ha-icon-button:last-child{margin-inline-start:0}ha-md-list-item ha-select{width:auto}ha-area-picker,ha-icon-picker,ha-input,ha-select{display:block;margin:var(--ha-space-2) 0;width:100%}.menu-item{border-radius:var(--ha-border-radius-sm);margin-top:3px;margin-bottom:3px;overflow:hidden;--mdc-list-side-padding:13px}.entityId{direction:ltr}`))]}constructor(...t){super(...t),this.hideName=!1,this.hideIcon=!1,this.disabled=!1,this._switchAsDomain="switch",this._switchAsInvert=!1,this._lastDirty=!1,this._switchAsDomainsSorted=(0,l.A)((t,e)=>t.map(t=>({domain:t,label:(0,H.p$)(e,t)})).sort((t,e)=>(0,v.xL)(t.label,e.label,this.hass.locale.language))),this._deviceClassesSorted=(0,l.A)((t,e,i)=>e.map(e=>({deviceClass:e,label:i(`ui.dialogs.entity_registry.editor.device_classes.${t}.${e}`)})).sort((t,e)=>(0,v.xL)(t.label,e.label,this.hass.locale.language))),this._switchAsLabel=(0,l.A)((t,e)=>{if("switch"!==t){const e=this._switchAsDomainsSorted(Et,this.hass.localize);for(const i of e)if(i.domain===t)return i.label}return e&&"switch"!==e?"outlet"===e?this.hass.localize("ui.dialogs.entity_registry.editor.device_classes.switch.outlet"):t:(0,H.p$)(this.hass.localize,"switch")})}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],Vt.prototype,"hass",void 0),(0,a.Cg)([(0,n.MZ)({type:Object})],Vt.prototype,"entry",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,attribute:"hide-name"})],Vt.prototype,"hideName",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,attribute:"hide-icon"})],Vt.prototype,"hideIcon",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],Vt.prototype,"disabled",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],Vt.prototype,"helperConfigEntry",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_name",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_icon",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_entityId",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_deviceClass",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_switchAsDomain",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_switchAsInvert",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_areaId",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_labels",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_disabledBy",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_hiddenBy",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_device",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_unit_of_measurement",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_precision",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_precipitation_unit",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_pressure_unit",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_temperature_unit",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_visibility_unit",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_wind_speed_unit",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_cameraPrefs",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_numberDeviceClassConvertibleUnits",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_sensorDeviceClassConvertibleUnits",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_sensorNumericalDeviceClasses",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_weatherConvertibleUnits",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_defaultCode",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_calendarColor",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_associatedZone",void 0),(0,a.Cg)([(0,n.wk)()],Vt.prototype,"_noDeviceArea",void 0),Vt=(0,a.Cg)([(0,n.EM)("entity-registry-settings-editor")],Vt),s()}catch(Y){s(Y)}})},19711:function(t,e,i){i.d(e,{$:function(){return o}});i(3362),i(62953);var s=i(1087);const a=()=>Promise.all([i.e(80131),i.e(70183),i.e(47677)]).then(i.bind(i,79029)),o=(t,e)=>{(0,s.r)(t,"show-dialog",{dialogTag:"dialog-helper-detail",dialogImport:a,dialogParams:e})}},69569:function(t,e,i){i.d(e,{f:function(){return o}});i(3362),i(62953);var s=i(1087);const a=()=>Promise.all([i.e(92769),i.e(3283),i.e(37941),i.e(26092),i.e(39005),i.e(13231)]).then(i.bind(i,427)),o=(t,e)=>{(0,s.r)(t,"show-dialog",{dialogTag:"dialog-label-detail",dialogImport:a,dialogParams:e})}},69235:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await i.e(71055).then(i.bind(i,52370))).default),e()}catch(s){e(s)}},1)},14503:function(t,e,i){i.d(e,{RF:function(){return p},dp:function(){return v},kO:function(){return _},nA:function(){return u},og:function(){return c}});var s=i(5124);let a,o,n,r,l,d,h=t=>t;const c=(0,s.AH)(a||(a=h`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,s.AH)(o||(o=h`: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}`),c),u=(0,s.AH)(n||(n=h`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)}`)),_=(0,s.AH)(r||(r=h`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}}`)),v=(0,s.AH)(l||(l=h`.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,s.AH)(d||(d=h`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]);