iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
28 lines • 149 kB
JavaScript
(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[29792],{93421:function(e,t,i){"use strict";i.d(t,{IW:function(){return c},dH:function(){return d},fI:function(){return l}});i(44114),i(62953);var a=i(35211),o=i(22792),r=i(32172);const n=(e,t)=>{let i=e;for(const a of t){if(null==i)return;i=i[a]}return i},s=(e,t,i)=>{const o=(0,r.p)({transformer:function(e){return i.call(this,e)},watch:t?[t]:[]}),n=(0,a.Fg)({context:e,subscribe:!0});return(e,t)=>{o(e,t),n(e,t)}},l=e=>s(o.iN,e.entityIdPath[0],function(t){const i=n(this,e.entityIdPath);return"string"==typeof i?null==t?void 0:t[i]:void 0}),d=e=>s(o.X1,e.entityIdPath[0],function(t){const i=n(this,e.entityIdPath);return"string"==typeof i?null==t?void 0:t[i]:void 0}),c=()=>s(o.D5,void 0,({localize:e})=>e)},32172:function(e,t,i){"use strict";i.d(t,{p:function(){return a}});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 a(e){return(t,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const a=String(i),o=t;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const e=o._transformers;o._transformers=new Map,e.forEach((e,t)=>o._transformers.set(t,e))}}else{o._transformers=new Map,o._watching=new Map;const e=o.willUpdate;o.willUpdate=function(t){e.call(this,t);const i=new Set;t.forEach((e,t)=>{const a=this._watching.get(t);void 0!==a&&a.forEach(e=>i.add(e))}),i.forEach(e=>{this[e]=this[`__original_${String(e)}`]})}}o._transformers.set(i,e.transformer),e.watch&&e.watch.forEach(e=>{let t=o._watching.get(e);t||(t=new Set,o._watching.set(e,t)),t.add(i)});const r=Object.getOwnPropertyDescriptor(t,i);let n;if(void 0===r)n={get(){return this[`__transform_${a}`]},set(e){const t=this[`__transform_${a}`],i=this._transformers.get(a);this[`__transform_${a}`]=i?i.call(this,e):e,this[`__original_${a}`]=e,this.requestUpdate(a,t)},configurable:!0,enumerable:!0};else{const e=r.set;n=Object.assign(Object.assign({},r),{},{set(t){const i=this[`__transform_${a}`],o=this._transformers.get(a);this[`__transform_${a}`]=o?o.call(this,t):t,this[`__original_${a}`]=t,this.requestUpdate(a,i),null==e||e.call(this,t)}})}Object.defineProperty(t,i,n)}}},69558:function(e,t,i){"use strict";i.d(t,{_:function(){return r}});i(16280),i(18111),i(7588),i(62953);var a=i(5124),o=i(54495);const r=(0,o.u$)(class extends o.WL{update(e,[t,i]){return this._element&&this._element.localName===t?(i&&Object.entries(i).forEach(([e,t])=>{this._element[e]=t}),a.c0):this.render(t,i)}render(e,t){return this._element=document.createElement(e),t&&Object.entries(t).forEach(([e,t])=>{this._element[e]=t}),this._element}constructor(e){if(super(e),e.type!==o.OA.CHILD)throw new Error("dynamicElementDirective can only be used in content bindings")}})},76830:function(e,t,i){"use strict";i.d(t,{d:function(){return a}});i(18111),i(20116);const a=(e,t=!0)=>{if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)return;const i=e.composedPath().find(e=>"A"===e.tagName);if(!i||i.target||i.hasAttribute("download")||"external"===i.getAttribute("rel"))return;let a=i.href;if(!a||-1!==a.indexOf("mailto:"))return;const o=window.location,r=o.origin||o.protocol+"//"+o.host;return a.startsWith(r)&&(a=a.slice(r.length),"#"!==a)?(t&&e.preventDefault(),a):void 0}},65522:function(e,t,i){"use strict";i.d(t,{A:function(){return a}});i(42762);const a=e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.trim()}},55931:function(e,t,i){"use strict";i.d(t,{X:function(){return a}});i(42762);const a=e=>{var t;return null===(t=e.name)||void 0===t?void 0:t.trim()}},69093:function(e,t,i){"use strict";i.d(t,{t:function(){return o}});var a=i(71727);const o=e=>(0,a.m)(e.entity_id)},66033:function(e,t,i){"use strict";i.d(t,{L:function(){return a}});const a=(e,t)=>{const i=e.floor_id;return{area:e,floor:(i?t[i]:void 0)||null}}},82286:function(e,t,i){"use strict";i.d(t,{$:function(){return a}});const a=(e,t)=>o(e.attributes,t),o=(e,t)=>0!==(e.supported_features&t)},67258:function(e,t,i){"use strict";i.d(t,{d:function(){return a}});const a=e=>{switch(e.language){case"cs":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}}},64481:function(e,t,i){"use strict";i.d(t,{D:function(){return o},J:function(){return n}});i(16280),i(3362),i(55815),i(64979),i(79739);let a=!1;try{a="true"===window.localStorage.getItem("disableViewTransition")}catch(s){}const o=e=>{a=e},r=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e},n=e=>{if(!document.startViewTransition||a)return e(!1),Promise.resolve();let t=!1;try{const i=document.startViewTransition(()=>{t=!0,e(!0)});return i.ready.catch(r),i.finished.catch(r)}catch(i){return console.warn("View transition failed, falling back to direct execution.",i),t?Promise.reject(i):(e(!1),Promise.resolve())}}},8129:function(e,t,i){"use strict";i.d(t,{l:function(){return a}});i(3362);const a=e=>new Promise(t=>{setTimeout(t,e)})},5745:function(e,t,i){"use strict";var a=i(40445),o=i(99731),r=i(67576);class n extends o.Y{}n=(0,a.Cg)([(0,r.EM)("ha-chip-set")],n)},38962:function(e,t,i){"use strict";i.a(e,async function(e,a){try{i.r(t);i(62953);var o=i(40445),r=i(5124),n=i(67576),s=i(6412),l=i(93421),d=i(1087),c=i(26300),h=(i(67094),e([c]));c=(h.then?(await h)():h)[0];let p,u,f,g,m=e=>e;const v="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",_={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 b extends r.WF{render(){var e;return(0,r.qy)(p||(p=m` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,s.H)({[this.alertType]:!0}),this.title?"":"no-title",_[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,r.qy)(u||(u=m`<div class="title">${0}</div>`),this.title):r.s6,this.dismissable?(0,r.qy)(f||(f=m`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(e=this._localize)||void 0===e?void 0:e.call(this,"ui.common.dismiss_alert"),v):r.s6)}_dismissClicked(){(0,d.r)(this,"alert-dismissed-clicked")}constructor(...e){super(...e),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}b.styles=(0,r.AH)(g||(g=m`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`)),(0,o.Cg)([(0,n.MZ)()],b.prototype,"title",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"alert-type"})],b.prototype,"alertType",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],b.prototype,"dismissable",void 0),(0,o.Cg)([(0,n.wk)(),(0,l.IW)()],b.prototype,"_localize",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],b.prototype,"narrow",void 0),b=(0,o.Cg)([(0,n.EM)("ha-alert")],b),a()}catch(p){a(p)}})},66086:function(e,t,i){"use strict";i.a(e,async function(e,t){try{i(74423),i(18111),i(22489),i(61701),i(3362),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(22786),s=i(1087),l=i(65522),d=i(55931),c=i(66033),h=i(49852),p=i(53641),u=i(65063),f=i(34023),g=(i(75064),i(38508)),m=i(26300),v=(i(67094),e([g,m]));[g,m]=v.then?(await v)():v;let _,b,y,w,$,C,k,x=e=>e;const S="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",E="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",M="___ADD_NEW___";class z extends o.WF{willUpdate(e){var t;this._pendingAreaId&&e.has("hass")&&this.hass.areas!==(null===(t=e.get("hass"))||void 0===t?void 0:t.areas)&&this.hass.areas[this._pendingAreaId]&&(this._setValue(this._pendingAreaId),this._pendingAreaId=void 0)}async open(){var e;await this.updateComplete,await(null===(e=this._picker)||void 0===e?void 0:e.open())}render(){var e;const t=null!==(e=this.label)&&void 0!==e?e:this.hass.localize("ui.components.area-picker.area"),i=this._computeValueRenderer(this.hass.areas);let a=t;if(this.value&&t){const e=this.hass.areas[this.value];if(e){const{floor:t}=(0,c.L)(e,this.hass.floors);t&&(a=void 0)}}return(0,o.qy)(_||(_=x` <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,a,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,h.P,this.hass.localize("ui.components.area-picker.unknown"),this._valueChanged)}_valueChanged(e){e.stopPropagation();const t=e.detail.value;if(t){if(t.startsWith(M)){this.hass.loadFragmentTranslation("config");const e=t.substring(M.length);return void(0,f.J)(this,{suggestedName:e,createEntry:async e=>{try{const t=await(0,p.L3)(this.hass,e);this.hass.areas[t.area_id]?this._setValue(t.area_id):this._pendingAreaId=t.area_id}catch(t){(0,u.showAlertDialog)(this,{title:this.hass.localize("ui.components.area-picker.failed_create_area"),text:t.message})}}})}this._setValue(t)}else this._setValue(void 0)}_setValue(e){this.value=e,(0,s.r)(this,"value-changed",{value:e}),(0,s.r)(this,"change")}constructor(...e){super(...e),this.noAdd=!1,this.disabled=!1,this.required=!1,this._getAreasMemoized=(0,n.A)(h.j),this._computeValueRenderer=(0,n.A)(e=>e=>{const t=this.hass.areas[e];if(!t)return(0,o.qy)(b||(b=x` <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <span slot="headline">${0}</span> `),E,t);const{floor:i}=(0,c.L)(t,this.hass.floors),a=t?(0,l.A)(t):void 0,r=i?(0,d.X)(i):void 0,n=t.icon;return(0,o.qy)(y||(y=x` ${0} <span slot="headline">${0}</span> ${0} `),n?(0,o.qy)(w||(w=x`<ha-icon slot="start" .icon="${0}"></ha-icon>`),n):(0,o.qy)($||($=x`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),E),a,r?(0,o.qy)(C||(C=x`<span slot="supporting-text">${0}</span>`),r):o.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)(e=>Object.values(e).map(e=>{var t;return null===(t=(0,l.A)(e))||void 0===t?void 0:t.toLowerCase()}).filter(Boolean)),this._getAdditionalItems=e=>{if(this.noAdd)return[];const t=this._allAreaNames(this.hass.areas);return e&&!t.includes(e.toLowerCase())?[{id:M+e,primary:this.hass.localize("ui.components.area-picker.add_new_suggestion",{name:e}),icon_path:S}]:[{id:M,primary:this.hass.localize("ui.components.area-picker.add_new"),icon_path:S}]},this._notFoundLabel=e=>this.hass.localize("ui.components.area-picker.no_match",{term:(0,o.qy)(k||(k=x`<b>‘${0}’</b>`),e)})}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],z.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)()],z.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)()],z.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)()],z.prototype,"helper",void 0),(0,a.Cg)([(0,r.MZ)()],z.prototype,"placeholder",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"no-add"})],z.prototype,"noAdd",void 0),(0,a.Cg)([(0,r.MZ)({type:Array,attribute:"include-domains"})],z.prototype,"includeDomains",void 0),(0,a.Cg)([(0,r.MZ)({type:Array,attribute:"exclude-domains"})],z.prototype,"excludeDomains",void 0),(0,a.Cg)([(0,r.MZ)({type:Array,attribute:"include-device-classes"})],z.prototype,"includeDeviceClasses",void 0),(0,a.Cg)([(0,r.MZ)({type:Array,attribute:"exclude-areas"})],z.prototype,"excludeAreas",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],z.prototype,"deviceFilter",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],z.prototype,"entityFilter",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],z.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],z.prototype,"required",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"add-button-label"})],z.prototype,"addButtonLabel",void 0),(0,a.Cg)([(0,r.P)("ha-generic-picker")],z.prototype,"_picker",void 0),(0,a.Cg)([(0,r.wk)()],z.prototype,"_pendingAreaId",void 0),z=(0,a.Cg)([(0,r.EM)("ha-area-picker")],z),t()}catch(_){t(_)}})},99611:function(e,t,i){"use strict";i.a(e,async function(e,t){try{i(18111),i(13579),i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var a=i(40445),o=i(1126),r=i(35211),n=i(5124),s=i(67576),l=i(1087),d=i(60353),c=i(22792),h=i(59992),p=i(14503),u=i(22348),f=e([o,h]);[o,h]=f.then?(await f)():f;let g,m,v=e=>e;const _=300,b=new Set(["ha-control-slider","ha-slider","ha-control-switch","ha-control-circular-slider","ha-hs-color-picker","ha-map","ha-more-info-control-select-container","ha-filter-chip"]),y=new Set(["volume-slider-container","forecast"]);class w extends((0,h.V)(n.WF)){get scrollableElement(){return this._bodyElement}connectedCallback(){super.connectedCallback(),this.addEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.addEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0})}updated(e){super.updated(e),e.has("open")&&(this._drawerOpen=this.open)}render(){return(0,n.qy)(g||(g=v` <wa-drawer id="drawer" placement="bottom" .open="${0}" .lightDismiss="${0}" .ariaLabelledby="${0}" .ariaDescribedby="${0}" @keydown="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-hide="${0}" @wa-after-hide="${0}" @click="${0}" without-header @touchstart="${0}"> <div class="handle-wrapper" aria-hidden="true"> <div class="handle"></div> </div> <slot name="header"></slot> <div class="content-wrapper"> <div id="body" class="body ha-scrollbar"> <slot></slot> </div> ${0} </div> <slot name="footer"></slot> </wa-drawer> `),this._drawerOpen,!this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this._handleKeyDown,this._handleShow,this._handleAfterShow,this._handleHide,this._handleAfterHide,this._handleCloseAction,this._handleTouchStart,this.renderScrollableFades())}_startResizing(e){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(e)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${_}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},_)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,p.dp,(0,n.AH)(m||(m=v`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${0}ms;--hide-duration:${0}ms}wa-drawer::part(dialog){max-height:min(var(--ha-bottom-sheet-max-height,90vh),calc(100vh - max(var(--safe-area-inset-top),48px)));max-height:min(var(--ha-bottom-sheet-max-height,90dvh),calc(100dvh - max(var(--safe-area-inset-top),48px)));align-items:center;transform:var(--dialog-transform);transition:var(--dialog-transition)}@media (prefers-reduced-motion:reduce){wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:1ms;--hide-duration:1ms}wa-drawer::part(dialog){transition:1ms}}wa-drawer::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));background-color:var(--ha-bottom-sheet-scrim-color,var(--mdc-dialog-scrim-color,none))}wa-drawer::part(body){max-width:var(--ha-bottom-sheet-max-width);width:100%;position:relative;border-top-left-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));border-top-right-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));background-color:var(--ha-bottom-sheet-surface-background,var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default))));-webkit-backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));padding:var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left))}:host([flexcontent]) wa-drawer::part(body){display:flex;flex-direction:column}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{position:absolute;top:0;inset-inline-start:0;width:100%;padding-bottom:2px;display:flex;justify-content:center;align-items:center;pointer-events:none;z-index:1}.handle-wrapper .handle{height:16px;width:200px;display:flex;justify-content:center;align-items:center}.handle-wrapper .handle::after{content:"";border-radius:var(--ha-border-radius-md);height:4px;background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{flex:1;max-width:100%;display:flex;flex-direction:column;padding:var(--ha-bottom-sheet-content-padding,var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)));box-sizing:border-box}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}:host([flexcontent]) slot[name=footer]{flex-shrink:0}`),_,_)]}constructor(...e){super(...e),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new d.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,l.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e;const t=this._autofocusElement;null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,u.V)(this._hassConfig.auth.external)?t&&(t.id||(t.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})):null==t||t.focus()})},this._handleAfterShow=()=>{(0,l.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=e=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);e.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,l.r)(this,"closed"))},this._handleHide=e=>{if(e.eventPhase!==Event.AT_TARGET)return;const t=e.detail.source===e.target.drawer;if(this._sliderInteractionActive)return e.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&t&&e.preventDefault(),this._escapePressed=!1},this._handleKeyDown=e=>{"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)},this._handleCloseAction=e=>{e.composedPath().some(e=>e instanceof HTMLElement&&("close"===e.getAttribute("data-dialog")||"close"===e.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=e=>{if(this.preventScrimClose)return;const t=e.composedPath();for(const i of t){if(i===this._drawer)break;if(i instanceof HTMLElement&&(i.scrollTop>0||b.has(i.localName)||Array.from(i.classList).some(e=>y.has(e))))return}e.stopPropagation(),this._startResizing(e.touches[0].clientY)},this._handleTouchMove=e=>{const t=e.touches[0].clientY,i=this._gestureRecognizer.move(t);i<0&&(e.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*i}px)`)}))},this._handleTouchEnd=()=>{var e;this._unregisterResizeHandlers(),this._isDragging=!1;const t=this._gestureRecognizer.end();if(t.isSwipe)return void(t.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const i=null===(e=this._drawer.shadowRoot)||void 0===e?void 0:e.querySelector('[part="body"]'),a=(null==i?void 0:i.offsetHeight)||0;a>0&&t.delta<0&&Math.abs(t.delta)>.5*a?this._drawerOpen=!1:this._animateSnapBack()},this._unregisterResizeHandlers=()=>{document.removeEventListener("touchmove",this._handleTouchMove),document.removeEventListener("touchend",this._handleTouchEnd),document.removeEventListener("touchcancel",this._handleTouchEnd)}}}(0,a.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,a.Cg)([(0,s.wk)()],w.prototype,"_drawerOpen",void 0),(0,a.Cg)([(0,s.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,s.P)("#drawer")],w.prototype,"_drawer",void 0),(0,a.Cg)([(0,s.P)("#body")],w.prototype,"_bodyElement",void 0),(0,a.Cg)([(0,s.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,a.Cg)([(0,s.EM)("ha-bottom-sheet")],w),t()}catch(g){t(g)}})},93444:function(e,t,i){"use strict";var a=i(40445),o=i(5124),r=i(67576);let n,s,l=e=>e;class d extends o.WF{render(){return(0,o.qy)(n||(n=l` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,o.AH)(s||(s=l`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}d=(0,a.Cg)([(0,r.EM)("ha-dialog-footer")],d)},76538:function(e,t,i){"use strict";i(62953);var a=i(40445),o=i(5124),r=i(67576);let n,s,l,d,c,h,p=e=>e;class u extends o.WF{render(){const e=(0,o.qy)(n||(n=p`<div class="header-title"> <slot name="title"></slot> </div>`)),t=(0,o.qy)(s||(s=p`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,o.qy)(l||(l=p` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,o.qy)(d||(d=p`${0}${0}`),t,e):(0,o.qy)(c||(c=p`${0}${0}`),e,t))}static get styles(){return[(0,o.AH)(h||(h=p`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))}@media all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`))]}constructor(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,a.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],u.prototype,"subtitlePosition",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],u.prototype,"showBorder",void 0),u=(0,a.Cg)([(0,r.EM)("ha-dialog-header")],u)},72554:function(e,t,i){"use strict";i.a(e,async function(e,t){try{i(3362),i(62953),i(49255);var a=i(40445),o=i(93900),r=i(35211),n=i(5124),s=i(67576),l=i(63672),d=i(1087),c=i(64481),h=i(22792),p=i(59992),u=i(14503),f=i(22348),g=(i(76538),i(26300)),m=e([o,g,p]);[o,g,p]=m.then?(await m)():m;let v,_,b,y,w,$,C,k=e=>e;const x="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class S extends((0,p.V)(n.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){var e,t,i;return(0,n.qy)(v||(v=k` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" @keydown="${0}" @wa-hide="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,l.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?n.s6:(0,n.qy)(_||(_=k`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(e=null===(t=this._i18n)||void 0===t||null===(i=t.localize)||void 0===i?void 0:i.call(t,"ui.common.close"))&&void 0!==e?e:"Close",x,void 0!==this.headerTitle?(0,n.qy)(b||(b=k`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,n.qy)(y||(y=k`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,n.qy)(w||(w=k`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,n.qy)($||($=k`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,c.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){var t;const i=(null===(t=e.detail)||void 0===t?void 0:t.source)===e.target.dialog;this.preventScrimClose&&this._escapePressed&&i&&e.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,u.dp,(0,n.AH)(C||(C=k`wa-dialog{--full-width:var(
--ha-dialog-width-full,
min(95vw, var(--safe-width))
);--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
--ha-dialog-surface-background,
var(--card-background-color, var(--ha-color-surface-default))
);--wa-panel-border-radius:var(
--ha-dialog-border-radius,
var(--ha-border-radius-3xl)
);max-width:var(--ha-dialog-max-width,var(--safe-width))}@media (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
--ha-dialog-header-title-font-size,
var(--ha-font-size-2xl)
);line-height:var(
--ha-dialog-header-title-line-height,
var(--ha-line-height-condensed)
);font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e,t;if(null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,f.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}null===(t=this.querySelector("[autofocus]"))||void 0===t||t.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,a.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],S.prototype,"ariaLabelledBy",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],S.prototype,"ariaDescribedBy",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],S.prototype,"open",void 0),(0,a.Cg)([(0,s.MZ)({reflect:!0})],S.prototype,"type",void 0),(0,a.Cg)([(0,s.MZ)({type:String,reflect:!0,attribute:"width"})],S.prototype,"width",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],S.prototype,"preventScrimClose",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"header-title"})],S.prototype,"headerTitle",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"header-subtitle"})],S.prototype,"headerSubtitle",void 0),(0,a.Cg)([(0,s.MZ)({type:String,attribute:"header-subtitle-position"})],S.prototype,"headerSubtitlePosition",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],S.prototype,"flexContent",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,attribute:"without-header"})],S.prototype,"withoutHeader",void 0),(0,a.Cg)([(0,s.wk)()],S.prototype,"_open",void 0),(0,a.Cg)([(0,s.P)(".body")],S.prototype,"bodyContainer",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:h.D5,subscribe:!0})],S.prototype,"_i18n",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:h.WF,subscribe:!0})],S.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,s.wk)()],S.prototype,"_bodyScrolled",void 0),(0,a.Cg)([(0,s.Ls)({passive:!0})],S.prototype,"_handleBodyScroll",null),S=(0,a.Cg)([(0,s.EM)("ha-dialog")],S),t()}catch(v){t(v)}})},50043:function(e,t,i){"use strict";i.d(t,{$:function(){return o}});i(89463),i(16280),i(18111),i(7588);const a=(e,t)=>{if("selector"in e&&"choose"in e.selector){const i=Object.keys(e.selector.choose.choices)[0];if(i)return{active_choice:i,[i]:t}}return t},o=e=>{const t={};return e.forEach(e=>{var i,r;if(void 0!==(null===(i=e.description)||void 0===i?void 0:i.suggested_value)&&null!==(null===(r=e.description)||void 0===r?void 0:r.suggested_value))t[e.name]=a(e,e.description.suggested_value);else if("default"in e)t[e.name]=a(e,e.default);else if("expandable"===e.type){const i=o(e.schema);(e.required||Object.keys(i).length)&&(t[e.name]=i)}else if(e.required){if("boolean"===e.type)t[e.name]=!1;else if("string"===e.type)t[e.name]="";else if("integer"===e.type)t[e.name]="valueMin"in e?e.valueMin:0;else if("constant"===e.type)t[e.name]=e.value;else if("float"===e.type)t[e.name]=0;else if("select"===e.type){if(e.options.length){const i=e.options[0];t[e.name]=Array.isArray(i)?i[0]:i}}else if("positive_time_period_dict"===e.type)t[e.name]={hours:0,minutes:0,seconds:0};else if("selector"in e){const i=e.selector;var n;if("device"in i)t[e.name]=null!==(n=i.device)&&void 0!==n&&n.multiple?[]:"";else if("entity"in i){var s;t[e.name]=null!==(s=i.entity)&&void 0!==s&&s.multiple?[]:""}else if("area"in i){var l;t[e.name]=null!==(l=i.area)&&void 0!==l&&l.multiple?[]:""}else if("label"in i){var d;t[e.name]=null!==(d=i.label)&&void 0!==d&&d.multiple?[]:""}else if("boolean"in i)t[e.name]=!1;else if("addon"in i||"attribute"in i||"file"in i||"icon"in i||"serial_port"in i||"template"in i||"text"in i||"theme"in i||"object"in i)t[e.name]="";else if("number"in i){var c,h;t[e.name]=null!==(c=null===(h=i.number)||void 0===h?void 0:h.min)&&void 0!==c?c:0}else if("select"in i){var p;if(null!==(p=i.select)&&void 0!==p&&p.options.length){const a=i.select.options[0],o="string"==typeof a?a:a.value;t[e.name]=i.select.multiple?[o]:o}}else if("country"in i){var u;null!==(u=i.country)&&void 0!==u&&null!==(u=u.countries)&&void 0!==u&&u.length&&(t[e.name]=i.country.countries[0])}else if("language"in i){var f;null!==(f=i.language)&&void 0!==f&&null!==(f=f.languages)&&void 0!==f&&f.length&&(t[e.name]=i.language.languages[0])}else if("duration"in i)t[e.name]={hours:0,minutes:0,seconds:0};else if("time"in i)t[e.name]="00:00:00";else if("date"in i||"datetime"in i){const i=(new Date).toISOString().slice(0,10);t[e.name]=`${i}T00:00:00`}else if("color_rgb"in i)t[e.name]=[0,0,0];else if("color_temp"in i){var g,m;t[e.name]=null!==(g=null===(m=i.color_temp)||void 0===m?void 0:m.min_mireds)&&void 0!==g?g:153}else if("action"in i||"trigger"in i||"condition"in i)t[e.name]=[];else if("media"in i||"target"in i)t[e.name]={};else if("state"in i){var v;t[e.name]=null!==(v=i.state)&&void 0!==v&&v.multiple?[]:""}else if("choose"in i){const a=Object.keys(i.choose.choices)[0];t[e.name]=a?{active_choice:a,[a]:o([{name:a,selector:i.choose.choices[a].selector}])[a]}:{}}else{if(!("numeric_threshold"in i))throw new Error(`Selector ${Object.keys(i)[0]} not supported in initial form data`);{var _,b,y,w;const a="changed"===(null!==(_=null===(b=i.numeric_threshold)||void 0===b?void 0:b.mode)&&void 0!==_?_:"crossed")?"any":"above";t[e.name]="any"===a?{type:a}:{type:a,value:{number:null!==(y=null===(w=i.numeric_threshold)||void 0===w||null===(w=w.number)||void 0===w?void 0:w.min)&&void 0!==y?y:0,active_choice:"number"}}}}}}else;}),t}},52763:function(e,t,i){"use strict";i.a(e,async function(e,a){try{i.d(t,{U:function(){return x}});i(74423),i(18111),i(7588),i(61701),i(3362),i(62953);var o=i(40445),r=i(5124),n=i(67576),s=i(69558),l=i(1087),d=i(38962),c=(i(11399),e([d]));d=(c.then?(await c)():c)[0];let h,p,u,f,g,m,v,_,b,y=e=>e;const w={boolean:()=>i.e(81347).then(i.bind(i,46990)),constant:()=>i.e(65733).then(i.bind(i,90820)),float:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(51868),i.e(62574),i.e(16113)]).then(i.bind(i,20676)),grid:()=>i.e(60761).then(i.bind(i,70208)),expandable:()=>i.e(45001).then(i.bind(i,40003)),integer:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(21543),i.e(86712),i.e(62574),i.e(12145)]).then(i.bind(i,20036)),multi_select:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(80131),i.e(58303),i.e(71739),i.e(78219)]).then(i.bind(i,36182)),positive_time_period_dict:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(67943),i.e(62574),i.e(16508),i.e(21486)]).then(i.bind(i,89422)),select:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(81034),i.e(99463),i.e(62574),i.e(26092),i.e(39005),i.e(35873),i.e(63577)]).then(i.bind(i,63804)),string:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(84725),i.e(62574),i.e(6762)]).then(i.bind(i,54753)),optional_actions:()=>Promise.all([i.e(72850),i.e(39763),i.e(34995),i.e(67395)]).then(i.bind(i,8456))},$=(e,t)=>e?!t.name||t.flatten?e:e[t.name]:void 0,C=(e,t)=>e&&t.name?e[t.name]:null,k=(e,t)=>e&&t.name?e[t.name]:null;class x extends r.WF{getFormProperties(){return{}}reportValidity(){const e=this._root;if(!e)return!0;const t=[...e.children].filter(e=>"ha-alert"!==e.localName);let i,a=!0;var o,r;(this.schema.forEach((e,o)=>{var r;const n=t[o];if(!n)return;let s=!0;if("reportValidity"in n&&"function"==typeof n.reportValidity)s=n.reportValidity();else if(e.required&&(!("type"in e)||!["boolean","constant"].includes(null!==(r=e.type)&&void 0!==r?r:""))&&(!("selector"in e)||!("boolean"in e.selector)&&!("constant"in e.selector))){const t=$(this.data,e);s=null!=t&&""!==t}s||(a=!1,i||(i=n))}),i)&&(null===(o=(r=i).focus)||void 0===o||o.call(r));return a}willUpdate(e){e.has("schema")&&this.schema&&this.schema.forEach(e=>{var t;"selector"in e||null===(t=w[e.type])||void 0===t||t.call(w)})}render(){return(0,r.qy)(h||(h=y` <div class="root" part="root"> ${0} ${0} </div> `),this.error&&this.error.base?(0,r.qy)(p||(p=y` <ha-alert alert-type="error"> ${0} </ha-alert> `),this._computeError(this.error.base,this.schema)):"",this.schema.map(e=>{var t;const i=C(this.error,e),a=k(this.warning,e);return(0,r.qy)(u||(u=y` ${0} ${0} `),i?(0,r.qy)(f||(f=y` <ha-alert own-margin alert-type="error"> ${0} </ha-alert> `),this._computeError(i,e)):a?(0,r.qy)(g||(g=y` <ha-alert own-margin alert-type="warning"> ${0} </ha-alert> `),this._computeWarning(a,e)):"","selector"in e?(0,r.qy)(m||(m=y`<ha-selector .schema="${0}" .hass="${0}" .narrow="${0}" .name="${0}" .selector="${0}" .value="${0}" .label="${0}" .disabled="${0}" .placeholder="${0}" .helper="${0}" .localizeValue="${0}" .required="${0}" .context="${0}"></ha-selector>`),e,this.hass,this.narrow,e.name,e.selector,$(this.data,e),this._computeLabel(e,this.data),e.disabled||this.disabled||!1,e.required?void 0:e.default,this._computeHelper(e),this.localizeValue,e.required||!1,this._generateContext(e)):(0,s._)(this.fieldElementName(e.type),Object.assign({schema:e,data:$(this.data,e),label:this._computeLabel(e,this.data),helper:this._computeHelper(e),disabled:this.disabled||e.disabled||!1,hass:this.hass,localize:null===(t=this.hass)||void 0===t?void 0:t.localize,computeLabel:this.computeLabel,computeHelper:this.computeHelper,localizeValue:this.localizeValue,context:this._generateContext(e)},this.getFormProperties())))}))}fieldElementName(e){return`ha-form-${e}`}_generateContext(e){if(!e.context&&!this.context)return;const t=Object.assign({},this.context);if(e.context)for(const[i,a]of Object.entries(e.context))t[i]=this.data[a];return t}createRenderRoot(){const e=super.createRenderRoot();return this.addValueChangedListener(e),e}addValueChangedListener(e){e.addEventListener("value-changed",e=>{e.stopPropagation();const t=e.target.schema;if(e.target===this)return;const i=!t.name||"flatten"in t&&t.flatten?e.detail.value:{[t.name]:e.detail.value};this.data=Object.assign(Object.assign({},this.data),i),(0,l.r)(this,"value-changed",{value:this.data})})}_computeLabel(e,t){return this.computeLabel?this.computeLabel(e,t):e?e.name:""}_computeHelper(e){return this.computeHelper?this.computeHelper(e):""}_computeError(e,t){return Array.isArray(e)?(0,r.qy)(v||(v=y`<ul> ${0} </ul>`),e.map(e=>(0,r.qy)(_||(_=y`<li> ${0} </li>`),this.computeError?this.computeError(e,t):e))):this.computeError?this.computeError(e,t):e}_computeWarning(e,t){return this.computeWarning?this.computeWarning(e,t):e}constructor(...e){super(...e),this.narrow=!1,this.disabled=!1}}x.shadowRootOptions={mode:"open",delegatesFocus:!0},x.styles=(0,r.AH)(b||(b=y`.root>*{display:block}.root>:not([own-margin]):not(:last-child){margin-bottom:24px}ha-alert[own-margin]{margin-bottom:4px}`)),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],x.prototype,"narrow",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"data",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"schema",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"error",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"warning",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],x.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"computeError",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"computeWarning",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"computeLabel",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"computeHelper",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"localizeValue",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],x.prototype,"context",void 0),(0,o.Cg)([(0,n.P)(".root")],x.prototype,"_root",void 0),x=(0,o.Cg)([(0,n.EM)("ha-form")],x),a()}catch(h){a(h)}})},43661:function(e,t,i){"use strict";i.r(t),i.d(t,{HaIconNext:function(){return s}});i(62953);var a=i(40445),o=i(67576),r=i(63091),n=i(67094);class s extends n.HaSvgIcon{constructor(...e){super(...e),this.path="rtl"===r.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,a.Cg)([(0,o.MZ)()],s.prototype,"path",void 0),s=(0,a.Cg)([(0,o.EM)("ha-icon-next")],s)},47680:function(e,t,i){"use strict";i.r(t),i.d(t,{HaIcon:function(){return S}});i(74423),i(3362),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(1087),s=i(9899),l=i(700),d=(i(44114),i(18111),i(7588),i(96167),i(95192)),c=i(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let p;const u=()=>(p||(p=f().catch(e=>{throw p=void 0,e})),p),f=async()=>{const e=(0,d.y$)("hass-icon-db","mdi-icon-store"),t=await(0,d.Jt)("_version",e);return t?t!==h.version&&(await(0,d.IU)(e),(0,d.hZ)("_version",h.version,e)):(0,d.hZ)("_version",h.version,e),e},g=["mdi","hass","hassio","hademo"];let m=[];i(67094);let v,_,b,y=e=>e;const w={},$={},C=(0,s.s)(()=>(async e=>{const t=Object.keys(e),i=await Promise.allSettled(Object.values(e));(await u())("readwrite",a=>{i.forEach((i,o)=>{"fulfilled"===i.status&&Object.entries(i.value).forEach(([e,t])=>{a.put(t,e)}),delete e[t[o]]})})})($),2e3),k={},x={"home-assistant":()=>i.e(58781).then(i.bind(i,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>i.e(56009).then(i.bind(i,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>i.e(88800).then(i.bind(i,45091)).then(e=>e.mdiEsphomeLogo)};class S extends o.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?(0,o.qy)(v||(v=y` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,o.qy)(_||(_=y`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):o.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,i]=this.icon.split(":",2);let a,o=i;if(!t||!o)return;if(!g.includes(t)){const i=l.y[t];return i?void(i&&"function"==typeof i.getIcon&&this._setCustomPath(i.getIcon(o),e)):void(this._legacy=!0)}if(this._legacy=!1,o in w){const e=w[o];let i;e.newName?(i=`Icon ${t}:${o} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,o=e.newName):i=`Icon ${t}:${o} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(i),(0,n.r)(this,"write_log",{level:"warning",message:i})}if(o in k)return void(this._path=k[o]);if(o in x){const t=await x[o]();return this.icon===e&&(this._path=t),void(k[o]=t)}try{a=await(e=>new Promise((t,i)=>{if(m.push([e,t,i]),m.length>1)return;const a=u();(0,c.h)(1e3,(async()=>{(await a)("readonly",e=>{for(const[t,i,a]of m)(0,d.Yd)(e.get(t)).then(e=>i(e)).catch(e=>a(e));m=[]})})()).catch(e=>{for(const[,,t]of m)t(e);m=[]})}))(o)}catch(p){a=void 0}if(a)return this.icon===e&&(this._path=a),void(k[o]=a);const r=(e=>{let t;for(const i of h.parts){if(void 0!==i.start&&e<i.start)break;t=i}return t.file})(o);if(r in $)return void this._setPath($[r],o,e);const s=fetch(`/static/mdi/${r}.json`).then(e=>e.json());$[r]=s,this._setPath(s,o,e),s.catch(()=>{delete $[r]}),C()}async _setCustomPath(e,t){const i=await e;this.icon===t&&(this._path=i.path,this._secondaryPath=i.secondaryPath,this._viewBox=i.viewBox)}async _setPath(e,t,i){try{const a=await e;this.icon===i&&(this._path=a[t]),k[t]=a[t]}catch(a){}}constructor(...e){super(...e),this._legacy=!1}}S.styles=(0,o.AH)(b||(b=y`:host{fill:currentcolor}`)),(0,a.Cg)([(0,r.MZ)()],S.prototype,"icon",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_path",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_secondaryPath",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_viewBox",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_legacy",void 0),S=(0,a.Cg)([(0,r.EM)("ha-icon")],S)},28732:function(e,t,i){"use strict";var a=i(40445),o=i(27686),r=i(7731),n=i(5124),s=i(67576);let l,d,c,h=e=>e;class p extends o.J{renderRipple(){return this.noninteractive?"":super.renderRipple()}static get styles(){return[r.R,(0,n.AH)(l||(l=h`: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=h`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,n.AH)(c||(c=h``))]}}p=(0,a.Cg)([(0,s.EM)("ha-list-item")],p)},38377:function(e,t,i){"use strict";var a=i(59787),o=(i(74423),i(72712),i(18111),i(22489),i(61701),i(18237),i(3362),i(27495),i(62953),i(40445)),r=i(5124),n=i(67576),s=i(20889),l=i(30015),d=i.n(l),c=i(1087),h=(i(3296),i(27208),i(48408),i(14603),i(47566),i(98721),i(2209));let p;var u=i(996);let f,g=e=>e;const m=e=>(0,r.qy)(f||(f=g`${0}`),e),v=new u.G(1e3),_={reType:(0,a.A)(/((\[!(caution|important|note|tip|warning)\])(?:\s|\\n)?)/i,{input:1,type:3}),typeToHaAlert:{caution:"error",important:"info",note:"info",tip:"success",warning:"warning"}};class b extends r.mN{disconnectedCallback(){if(super.disconnectedCallback(),this.cache){const e=this._computeCacheKey();v.set(e,this.innerHTML)}}createRenderRoot(){return this}update(e){super.update(e),void 0!==this.content&&(this._renderPromise=this._render())}async getUpdateComplete(){return await super.getUpdateComplete(),await this._renderPromise,!0}willUpdate(e){if(!this.innerHTML&&this.cache){const e=this._computeCacheKey();v.has(e)&&((0,r.XX)(m((0,s._)(v.get(e))),this.renderRoot),this._resize())}}_computeCacheKey(){return d()({content:this.content,allowSvg:this.allowSvg,allowDataUrl:this.allowDataUrl,breaks:this.breaks})}async _render(){const e=await(async(e,t,a)=>(p||(p=(0,h.LV)(new Worker(new URL(i.p+i.u(55640),i.b)))),p.renderMarkdown(e,t,a)))(String(this.content),{breaks:this.breaks,gfm:!0},{allowSvg:this.allowSvg,allowDataUrl:this.allowDataUrl});(0,r.XX)(m((0,s._)(e.join(""))),this.renderRoot),this._resize();const t=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT,null);for(;t.nextNode();){const e=t.currentNode;if(e instanceof HTMLAnchorElement&&e.host!==document.location.host)e.target="_blank",e.rel="noreferrer noopener";else if(e instanceof HTMLImageElement)this.lazyImages&&(e.loading="lazy"),e.addEventListener("load",this._resize);else if(e instanceof HTMLQuoteElement){var a;const i=(null===(a=e.firstElementChild)||void 0===a||null===(a=a.firstChild)||void 0===a?void 0:a.textContent)&&_.reType.exec(e.firstElementChild.firstChild.textContent);if(i){const{type:a}=i.groups,o=document.createElement("ha-alert");o.alertType=_.typeToHaAlert[a.toLowerCase()],o.append(...Array.from(e.childNodes).map(e=>{const t=Array.from(e.childNodes);if(!this.breaks&&t.length){var a;const e=t[0];e.nodeType===Node.TEXT_NODE&&e.textContent===i.input&&null!==(a=e.textContent)&&void 0!==a&&a.includes("\n")&&(e.textContent=e.textContent.split("\n").slice(1).join("\n"))}return t}).reduce((e,t)=>e.concat(t),[]).filter(e=>e.textContent&&e.textContent!==i.input)),t.parentNode().replaceChild(o,e)}}else e instanceof HTMLElement&&["ha-alert","ha-qr-code","ha-icon","ha-svg-icon"].includes(e.localName)&&i(62003)(`./${e.localName}`)}}constructor(...e){super(...e),this.allowSvg=!1,this.allowDataUrl=!1,this.breaks=!1,this.lazyImages=!1,this.cache=!1,this._renderPromise=Promise.resolve(),this._resize=()=>(0,c.r)(this,"content-resize")}}(0,o.Cg)([(0,n.MZ)()],b.prototype,"content",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"allow-svg",type:Boolean})],b.prototype,"allowSvg",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"allow-data-url",type:Boolean})],b.prototype,"allowDataUrl",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],b.prototype,"breaks",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"lazy-images"})],b.prototype,"lazyImages",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],b.prototype,"cache",void 0),b=(0,o.Cg)([(0,n.EM)("ha-markdown-element")],b)},3587:function(e,t,i){"use strict";i(3362),i(62953);var a=i(40445),o=i(5124),r=i(67576);i(38377);let n,s,l=e=>e;class d extends o.WF{async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await(null===(e=this._markdownElement)||void 0===e?void 0:e.updateComplete),t}render(){return this.content?(0,o.qy)(n||(n=l`<ha-markdown-element .content="${0}" .allowSvg="${0}" .allowDataUrl="${0}" .breaks="${0}" .lazyImages="${0}" .cache="${0}"></ha-markdown-element>`),this.content,this.allowSvg,this.allowDataUrl,this.breaks,this.lazyImages,this.cache):o.s6}constructor(...e){super(...e),this.allowSvg=!1,this.allowDataUrl=!1,this.breaks=!1,this.lazyImages=!1,this.cache=!1}}d.styles=(0,o.AH)(s||(s=l`:host{display:block}ha-markdown-element{-ms-user-select:text;-webkit-user-select:text;-moz-user-select:text}ha-markdown-element>:first-child{margin-top:0}ha-markdown-element>:last-child{margin-bottom:0}ha-alert{display:block;margin:var(--ha-space-1) 0}a{color:var(--markdown-link-color,var(--primary-color))}img{background-color:var(--markdown-image-background-color);border-radius:var(--markdown-image-border-radius);max-width:100%}p:first-child>img:first-child{vertical-align:top}p:first-child>img:last-child{vertical-align:top}ha-markdown-element>:is(ol,ul){padding-inline-start:var(--markdown-list-indent,revert)}li:has(input[type=checkbox]){list-style:none}li:has(input[type=checkbox])>input[type=checkbox]{margin-left:0}svg{background-color:var(--markdown-svg-background-color,none);color:var(--markdown-svg-color,none)}code,pre{background-color:var(--markdown-code-background-color,none);border-radius:var(--ha-border-radius-sm);color:var(--markdown-code-text-color,inherit)}code{font-size:var(--ha-font-size-s);padding:.2em .4em}pre code{padding:0}pre{padding:var(--ha-space-4);overflow:auto;line-height:var(--ha-line-height-condensed);font-family:var(--ha-font-family-code)}h1,h2,h3,h4,h5,h6{line-height:initial}h2{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-bold)}hr{border-color:var(--divider-color);border-bottom:none;margin:var(--ha-space-4) 0}table[role=presentation]{--markdown-table-border-collapse:separate;--markdown-table-border-width:0;--markdown-table-padding-inline:0;--markdown-table-padding-block:0}table[role=presentation] td,table[role=presentation] th{vertical-align:middle}table[role=presentation] td[valign=top],table[role=presentation] th[valign=top]{vertical-align:top}table[role=presentation] td[valign=middle],table[role=presentation] th[valign=middle]{vertical-align:middle}table[role=presentation] td[valign=bottom],table[role=presentation] th[valign=bottom]{vertical-align:bottom}table[role=presentation] td[valign=baseline],table[role=presentation] th[valign=baseline]{vertical-align:baseline}@supports (border-width:attr(border px,0)){table[role=presentation]{--markdown-table-border-width:attr(border px, 0)}table[role=presentation] td,table[role=presentation] th{vertical-align:attr(valign,middle)}}table[role=presentation][border="0"]{--markdown-table-border-width:0}table[role=presentation][border="1"]{--markdown-table-border-width:1px}table[role=presentation][border="2"]{--markdown-table-border-width:2px}table[role=presentation][border="3"]{--markdown-table-border-width:3px}table{border-collapse:var(--markdown-table-border-collapse,collapse)}div:has(> table){overflow:auto}th{text-align:var(--markdown-table-text-align,start)}td,th{border-width:var(--markdown-table-border-width,1px);border-style:var(--markdown-table-border-style,solid);border-color:var(--markdown-table-border-color,var(--divider-color));padding-inline:var(--markdown-table-padding-inline,0.5em);padding-block:var(--markdown-table-padding-block,0.25em)}blockquote{border-left:4px solid var(--divider-color);margin-inline:0;padding-inline:1em}`)),(0,a.Cg)([(0,r.MZ)()],d.prototype,"content",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"allow-svg",type:Boolean})],d.prototype,"allowSvg",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"allow-data-url",type:Boolean})],d.prototype,"allowDataUrl",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],d.prototype,"breaks",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"lazy-images"})],d.prototype,"lazyImages",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],d.prototype,"cache",void 0),(0,a.Cg)([(0,r.P)("ha-markdown-element")],d.prototype,"_markdownElement",void 0),d=(0,a.Cg)([(0,r.EM)("ha-markdown")],d)},11399:function(e,t,i){"use strict";i(3362),i(27495),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(25440),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(22786),s=i(69558),l=i(95311);let d,c=e=>e;const h={action:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(80131),i.e(72130),i.e(85010),i.e(67218),i.e(98470),i.e(58303),i.e(81034),i.e(23659),i.e(54066),i.e(25950),i.e(64006),i.e(79185),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(34310),i.e(55392),i.e(12009),i.e(20282),i.e(13628),i.e(16508),i.e(28501),i.e(84207),i.e(31863),i.e(283),i.e(30513),i.e(33547)]).then(i.bind(i,6274)),addon:()=>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(26787),i.e(62574),i.e(26092),i.e(39005),i.e(71625),i.e(43305)]).then(i.bind(i,36784)),automation_behavior:()=>Promise.all([i.e(72850),i.e(81034),i.e(99220)]).then(i.bind(i,66034)),app:()=>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(26787),i.e(62574),i.e(26092),i.e(39005),i.e(71625)]).then(i.bind(i,48585)),area:()=>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(83523),i.e(62574),i.e(26092),i.e(39005),i.e(13905)]).then(i.bind(i,81857)),areas_display:()=>Promise.all([i.e(46095),i.e(64657),i.e(68273),i.e(64280),i.e(47956)]).then(i.bind(i,38235)),attribute:()=>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(49168),i.e(62574),i.e(26092),i.e(39005),i.e(58072)]).then(i.bind(i,71498)),assist_pipeline:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(43048),i.e(63071)]).then(i.bind(i,83642)),boolean:()=>Promise.all([i.e(93282),i.e(19623)]).then(i.bind(i,30714)),choose:()=>i.e(93934).then(i.bind(i,58141)),color_rgb:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(7106),i.e(62574),i.e(21332)]).then(i.bind(i,34931)),condition:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(72130),i.e(85010),i.e(67218),i.e(23659),i.e(54066),i.e(25950),i.e(48106),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(34310),i.e(12009),i.e(20282),i.e(13628),i.e(28501),i.e(84207),i.e(283),i.e(77190)]).then(i.bind(i,81539)),config_entry:()=>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(8706),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(81594)]).then(i.bind(i,49347)),conversation_agent:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(20667),i.e(44770)]).then(i.bind(i,94215)),constant:()=>i.e(77057).then(i.bind(i,39032)),country:()=>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(84887),i.e(65799),i.e(62574),i.e(26092),i.e(39005),i.e(64157),i.e(47352)]).then(i.bind(i,94164)),date:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(81178),i.e(62574),i.e(36553)]).then(i.bind(i,94351)),datetime:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(62574),i.e(12466)]).then(i.bind(i,39045)),device:()=>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(23659),i.e(33246),i.e(62574),i.e(26092),i.e(39005),i.e(83128)]).then(i.bind(i,2270)),duration:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(90324),i.e(62574),i.e(16508),i.e(24858)]).then(i.bind(i,79488)),entity:()=>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(69923),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(1535),i.e(34435)]).then(i.bind(i,73863)),entity_name:()=>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(80607),i.e(62574),i.e(26092),i.e(39005),i.e(3067)]).then(i.bind(i,7563)),statistic:()=>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(72224),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(54884),i.e(88493)]).then(i.bind(i,28072)),file:()=>Promise.all([i.e(72850),i.e(49224)]).then(i.bind(i,25078)),floor:()=>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(89100),i.e(54192),i.e(62574),i.e(26092),i.e(39005),i.e(33790),i.e(94628)]).then(i.bind(i,9040)),label:()=>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(79808),i.e(62574),i.e(26092),i.e(39005),i.e(66201),i.e(40231)]).then(i.bind(i,99560)),language:()=>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(82025),i.e(62574),i.e(26092),i.e(39005),i.e(59324)]).then(i.bind(i,15430)),navigation:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(83113),i.e(99788),i.e(54066),i.e(83502),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(19112),i.e(30002),i.e(59704),i.e(25322),i.e(89747),i.e(71572),i.e(12009),i.e(20282),i.e(28501),i.e(46152),i.e(33173)]).then(i.bind(i,58350)),number:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(21543),i.e(62574),i.e(64809)]).then(i.bind(i,31157)),numeric_threshold:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(88992),i.e(99386)]).then(i.bind(i,18719)),object:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(72130),i.e(85010),i.e(42981),i.e(34310),i.e(87352)]).then(i.bind(i,97951)),period:()=>i.e(54234).then(i.bind(i,40929)),qr_code:()=>Promise.all([i.e(72850),i.e(51343),i.e(90791)]).then(i.bind(i,35313)),select:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(81034),i.e(62574),i.e(26092),i.e(39005),i.e(35873),i.e(99457)]).then(i.bind(i,856)),selector:()=>i.e(77810).then(i.bind(i,13897)),serial_port:()=>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(68432),i.e(62574),i.e(26092),i.e(39005),i.e(87464)]).then(i.bind(i,82178)),state:()=>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(19269),i.e(62574),i.e(26092),i.e(39005),i.e(48007)]).then(i.bind(i,12995)),backup_location:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(80131),i.e(83241),i.e(72777)]).then(i.bind(i,16360)),stt:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(98286),i.e(87890)]).then(i.bind(i,42999)),target:()=>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(40420),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(13628),i.e(14351),i.e(24891),i.e(45862)]).then(i.bind(i,84909)),template:()=>Promise.all([i.e(72850),i.e(39763),i.e(72130),i.e(33387),i.e(34310),i.e(15732)]).then(i.bind(i,62166)),text:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(37694),i.e(62574),i.e(55844)]).then(i.bind(i,47971)),time:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(34995),i.e(92351),i.e(62574),i.e(17066)]).then(i.bind(i,42945)),icon:()=>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(86325),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(82568)]).then(i.bind(i,14885)),media:()=>Promise.all([i.e(72850),i.e(33887),i.e(91845),i.e(22308)]).then(i.bind(i,59422)),theme:()=>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(4406),i.e(62574),i.e(26092),i.e(39005),i.e(5127)]).then(i.bind(i,77655)),timezone:()=>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(56253),i.e(12727),i.e(62574),i.e(26092),i.e(39005),i.e(78464),i.e(41460)]).then(i.bind(i,6719)),button_toggle:()=>i.e(7774).then(i.bind(i,79949)),trigger:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(80131),i.e(72130),i.e(85010),i.e(67218),i.e(58303),i.e(81034),i.e(23659),i.e(54066),i.e(25950),i.e(4379),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(34310),i.e(12009),i.e(20282),i.e(13628),i.e(28501),i.e(84207),i.e(31863),i.e(155)]).then(i.bind(i,45078)),tts:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(75905),i.e(56146)]).then(i.bind(i,59447)),tts_voice:()=>Promise.all([i.e(72850),i.e(39763),i.e(46095),i.e(34995),i.e(53524),i.e(58485)]).then(i.bind(i,41188)),location:()=>Promise.all([i.e(72850),i.e(66139),i.e(70622),i.e(73512),i.e(8851),i.e(12122),i.e(76696),i.e(83462)]).then(i.bind(i,21160)),color_temp:()=>Promise.all([i.e(72850),i.e(39763),i.e(99788),i.e(21543),i.e(29628),i.e(59704),i.e(20282),i.e(68611)]).then(i.bind(i,90780)),ui_action:()=>Promise.all([i.e(72850),i.e(39763),i.e(32450),i.e(46095),i.e(7305),i.e(92769),i.e(34995),i.e(3283),i.e(72130),i.e(85010),i.e(83113),i.e(98470),i.e(99788),i.e(54066),i.e(25950),i.e(31746),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(19112),i.e(34310),i.e(30002),i.e(59704),i.e(25322),i.e(55392),i.e(89747),i.e(71572),i.e(36332),i.e(12009),i.e(20282),i.e(28501),i.e(46152),i.e(59800)]).then(i.bind(i,38389)),ui_color:()=>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(46051),i.e(62574),i.e(26092),i.e(39005),i.e(80651)]).then(i.bind(i,52744)),ui_state_content:()=>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(67493),i.e(62574),i.e(26092),i.e(39005),i.e(48408)]).then(i.bind(i,96074))},p=new Set(["ui-action","ui-color"]);class u extends o.WF{reportValidity(){var e,t;return this._selectorElement&&"reportValidity"in this._selectorElement&&"function"==typeof this._selectorElement.reportValidity?null===(e=null===(t=this._selectorElement)||void 0===t?void 0:t.reportValidity())||void 0===e||e:!this.required||void 0!==this.value&&null!==this.value&&""!==this.value}async focus(){var e;await this.updateComplete,null===(e=this._selectorElement)||void 0===e||e.focus()}get _type(){const e=Object.keys(this.selector)[0];return p.has(e)?e.replace("-","_"):e}willUpdate(e){var t;e.has("selector")&&this.selector&&(null===(t=h[this._type])||void 0===t||t.call(h))}render(){return(0,o.qy)(d||(d=c` ${0} `),(0,s._)(`ha-selector-${this._type}`,{hass:this.hass,narrow:this.narrow,name:this.name,selector:this._handleLegacySelector(this.selector),value:this.value,label:this.label,placeholder:this.placeholder,disabled:this.disabled,required:this.required,helper:this.helper,context:this.context,localizeValue:this.localizeValue,id:"selector"}))}constructor(...e){super(...e),this.narrow=!1,this.disabled=!1,this.required=!0,this._handleLegacySelector=(0,n.A)(e=>{if("entity"in e)return(0,l.UU)(e);if("device"in e)return(0,l.tD)(e);const t=Object.keys(this.selector)[0];return p.has(t)?{[t.replace("-","_")]:e[t]}:e})}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)()],u.prototype,"name",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"selector",void 0),(0,a.Cg)([(0,r.MZ)()],u.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)()],u.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)()],u.prototype,"helper",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"localizeValue",void 0),(0,a.Cg)([(0,r.MZ)()],u.prototype,"placeholder",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"required",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"context",void 0),(0,a.Cg)([(0,r.P)("#selector",!0)],u.prototype,"_selectorElement",void 0),u=(0,a.Cg)([(0,r.EM)("ha-selector")],u)},65829:function(e,t,i){"use strict";i.a(e,async function(e,a){try{i.r(t),i.d(t,{HaSpinner:function(){return h}});var o=i(40445),r=i(55262),n=i(5124),s=i(67576),l=e([r]);r=(l.then?(await l)():l)[0];let d,c=e=>e;class h extends r.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[r.A.styles,(0,n.AH)(d||(d=c`:host{--indicator-color:var(
--ha-spinner-indicator-color,
var(--primary-color)
);--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}(0,o.Cg)([(0,s.MZ)()],h.prototype,"size",void 0),h=(0,o.Cg)([(0,s.EM)("ha-spinner")],h),a()}catch(d){a(d)}})},36866:function(e,t,i){"use strict";i.a(e,async function(e,t){try{i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(91485),s=e([n]);n=(s.then?(await s)():s)[0];let l,d,c=e=>e;const h="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class p extends n.U{willUpdate(e){var t,i;(super.willUpdate(e),this.label||this.placeholder||this.hasUpdated&&!e.has("_i18n"))||(this.placeholder=(null===(t=this.i18n)||void 0===t||null===(i=t.localize)||void 0===i?void 0:i.call(t,"ui.common.search"))||"Search")}renderStartDefault(){return(0,o.qy)(l||(l=c`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),h)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}p.styles=[...n.U.styles,(0,o.AH)(d||(d=c`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],p=(0,a.Cg)([(0,r.EM)("ha-input-search")],p),t()}catch(l){t(l)}})},16386:function(e,t,i){"use strict";i.a(e,async function(e,t){try{var a=i(40445),o=i(65686),r=i(5124),n=i(67576),s=e([o]);o=(s.then?(await s)():s)[0];let l,d=e=>e;class c extends o.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-progress-ring-size","16px");break;case"small":this.style.setProperty("--ha-progress-ring-size","28px");break;case"medium":this.style.setProperty("--ha-progress-ring-size","48px");break;case"large":this.style.setProperty("--ha-progress-ring-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[o.A.styles,(0,r.AH)(l||(l=d`:host{--indicator-color:var(
--ha-progress-ring-indicator-color,
var(--primary-color)
);--track-color:var(
--ha-progress-ring-divider-color,
var(--divider-color)
);--track-width:4px;--speed:3.5s;--size:var(--ha-progress-ring-size, 48px)}`))]}}(0,a.Cg)([(0,n.MZ)()],c.prototype,"size",void 0),c=(0,a.Cg)([(0,n.EM)("ha-progress-ring")],c),t()}catch(l){t(l)}})},49852:function(e,t,i){"use strict";i.d(t,{P:function(){return d},j:function(){return l}});i(74423),i(18111),i(81148),i(22489),i(61701),i(13579);var a=i(65522),o=i(71727),r=i(55931),n=i(66033),s=i(58594);const l=(e,t,i,l,d,c,h,p,u,f,g,m="")=>{let v,_,b={};const y=Object.values(e),w=Object.values(i),$=Object.values(l);(c||h||p||u||f)&&(b=(0,s.g2)($),v=w,_=$.filter(e=>e.area_id),c&&(v=v.filter(e=>{const t=b[e.id];return!(!t||!t.length)&&b[e.id].some(e=>c.includes((0,o.m)(e.entity_id)))}),_=_.filter(e=>c.includes((0,o.m)(e.entity_id)))),h&&(v=v.filter(e=>{const t=b[e.id];return!t||!t.length||$.every(e=>!h.includes((0,o.m)(e.entity_id)))}),_=_.filter(e=>!h.includes((0,o.m)(e.entity_id)))),p&&(v=v.filter(e=>{const t=b[e.id];return!(!t||!t.length)&&b[e.id].some(e=>{const t=d[e.entity_id];return!!t&&(t.attributes.device_class&&p.includes(t.attributes.device_class))})}),_=_.filter(e=>{const t=d[e.entity_id];return t.attributes.device_class&&p.includes(t.attributes.device_class)})),u&&(v=v.filter(e=>u(e))),f&&(v=v.filter(e=>{const t=b[e.id];return!(!t||!t.length)&&b[e.id].some(e=>{const t=d[e.entity_id];return!!t&&f(t)})}),_=_.filter(e=>{const t=d[e.entity_id];return!!t&&f(t)})));let C,k=y;v&&(C=v.filter(e=>e.area_id).map(e=>e.area_id)),_&&(C=(null!=C?C:[]).concat(_.filter(e=>e.area_id).map(e=>e.area_id))),C&&(k=k.filter(e=>C.includes(e.area_id))),g&&(k=k.filter(e=>!g.includes(e.area_id)));return k.map(e=>{const{floor:i}=(0,n.L)(e,t),o=i?(0,r.X)(i):void 0,s=(0,a.A)(e);return{id:`${m}${e.area_id}`,primary:s||e.area_id,secondary:o,icon:e.icon||void 0,icon_path:e.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:e.area_id,aliases:e.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}]},53641:function(e,t,i){"use strict";i.d(t,{L3:function(){return o},QI:function(){return d},WT:function(){return s},bQ:function(){return l},ft:function(){return a.f},gs:function(){return r},uG:function(){return n}});i(44114),i(62953);var a=i(29908);const o=(e,t)=>e.callWS(Object.assign({type:"config/area_registry/create"},t)),r=(e,t,i)=>e.callWS(Object.assign({type:"config/area_registry/update",area_id:t},i)),n=(e,t)=>e.callWS({type:"config/area_registry/delete",area_id:t}),s=(e,t)=>e.callWS({type:"config/area_registry/reorder",area_ids:t}),l=e=>{const t={};for(const i of e)i.area_id&&(i.area_id in t||(t[i.area_id]=[]),t[i.area_id].push(i));return t},d=e=>{const t={};for(const i of e)i.area_id&&(i.area_id in t||(t[i.area_id]=[]),t[i.area_id].push(i));return t}},62351:function(e,t,i){"use strict";i.d(t,{KC:function(){return c},Vy:function(){return l},ds:function(){return r},ew:function(){return s},g5:function(){return d},tl:function(){return n}});var a=i(82286),o=i(22675);const r=(e,t,i)=>e.connection.subscribeMessage(i,{type:"assist_satellite/intercept_wake_word",entity_id:t}),n=(e,t)=>e.callWS({type:"assist_satellite/test_connection",entity_id:t}),s=(e,t,i)=>e.callService("assist_satellite","announce",i,{entity_id:t}),l=(e,t)=>e.callWS({type:"assist_satellite/get_configuration",entity_id:t}),d=(e,t,i)=>e.callWS({type:"assist_satellite/set_wake_words",entity_id:t,wake_word_ids:i}),c=e=>e&&e.state!==o.Hh&&(0,a.$)(e,1)},82e3:function(e,t,i){"use strict";i.d(t,{D5:function(){return a},Fy:function(){return h},Gk:function(){return f},Hg:function(){return o},TJ:function(){return n},UQ:function(){return c},Y_:function(){return g},ds:function(){return u},e0:function(){return r},ec:function(){return p},go:function(){return l},n2:function(){return d},sq:function(){return s}});i(74423),i(18111),i(61701),i(33110),i(3362);const a=14881==i.j?`${location.protocol}//${location.host}`:null,o=e=>e.map(e=>{if("string"!==e.type)return e;switch(e.name){case"username":return Object.assign(Object.assign({},e),{},{autocomplete:"username",autofocus:!0});case"password":return Object.assign(Object.assign({},e),{},{autocomplete:"current-password"});case"code":return Object.assign(Object.assign({},e),{},{autocomplete:"one-time-code",autofocus:!0});default:return e}}),r=(e,t)=>e.callWS({type:"auth/sign_path",path:t}),n=()=>fetch("/auth/providers",{credentials:"same-origin"}),s=(e,t,i)=>fetch("/auth/login_flow",{method:"POST",credentials:"same-origin",body:JSON.stringify({client_id:e,handler:i,redirect_uri:t})}),l=(e,t)=>fetch(`/auth/login_flow/${e}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(t)}),d=e=>fetch(`/auth/login_flow/${e}`,{method:"DELETE",credentials:"same-origin"}),c=(e,t,i,a)=>{e.includes("?")?e.endsWith("&")||(e+="&"):e+="?",e+=`code=${encodeURIComponent(t)}`,i&&(e+=`&state=${encodeURIComponent(i)}`),a&&(e+="&storeToken=true"),document.location.assign(e)},h=async(e,t,i,a)=>e.callWS({type:"config/auth_provider/homeassistant/create",user_id:t,username:i,password:a}),p=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:i}),u=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:i}),f=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:t,username:i}),g=(e,t,i)=>e.callWS({type:"auth/delete_all_refresh_tokens",token_type:t,delete_current_token:i})},26571:function(e,t,i){"use strict";i.d(t,{Al:function(){return r},KY:function(){return o},PN:function(){return l},dG:function(){return c},jm:function(){return d},m7:function(){return g},sR:function(){return h},t1:function(){return s},t2:function(){return u},x:function(){return f},yu:function(){return p}});var a=i(95350);const o=["bluetooth","dhcp","discovery","esphome","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],r=66649!=i.j?["reauth"]:null,n={"HA-Frontend-Base":`${location.protocol}//${location.host}`},s=(e,t,i)=>e.callApi("POST","config/config_entries/flow",{handler:t,entry_id:i},n),l=(e,t)=>e.callApi("GET",`config/config_entries/flow/${t}`,void 0,n),d=(e,t,i)=>e.callApi("POST",`config/config_entries/flow/${t}`,i,n),c=(e,t,i)=>e.callWS({type:"config_entries/ignore_flow",flow_id:t,title:i}),h=(e,t)=>e.callApi("DELETE",`config/config_entries/flow/${t}`),p=(e,t)=>e.callApi("GET","config/config_entries/flow_handlers"+(t?`?type=${t}`:"")),u=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),f=(e,t)=>e.connection.subscribeMessage(e=>t(e),{type:"config_entries/flow/subscribe"}),g=(e,t)=>t.context.title_placeholders&&0!==Object.keys(t.context.title_placeholders).length?e(`component.${t.handler}.config.flow_title`,t.context.title_placeholders)||("name"in t.context.title_placeholders?t.context.title_placeholders.name:(0,a.p$)(e,t.handler)):(0,a.p$)(e,t.handler)},700:function(e,t,i){"use strict";i.d(t,{y:function(){return n}});const a=window;"customIconsets"in a||(a.customIconsets={});const o=a.customIconsets,r=window;"customIcons"in r||(r.customIcons={});const n=new Proxy(r.customIcons,{get:(e,t)=>{var i;return null!==(i=e[t])&&void 0!==i?i:o[t]?{getIcon:o[t]}:void 0}})},90944:function(e,t,i){"use strict";i.d(t,{K:function(){return o},P:function(){return a}});const a=(e,t)=>e.subscribeEvents(t,"data_entry_flow_progressed"),o=(e,t)=>e.subscribeEvents(t,"data_entry_flow_progress_update")},22675:function(e,t,i){"use strict";i.d(t,{HV:function(){return r},Hh:function(){return o}});var a=i(23832);const o="unavailable",r="unknown",n=[o,r,"off"];(0,a.g)(n)},7749:function(e,t,i){"use strict";i.d(t,{HH:function(){return a},TY:function(){return o},lu:function(){return r},mu:function(){return n}});const a=(e,t)=>e.callApi("POST","config/config_entries/options/flow",{handler:t}),o=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),r=(e,t,i)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,i),n=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`)},51840:function(e,t,i){"use strict";i.d(t,{F:function(){return r},Q:function(){return o}});i(74423);const a=["generic_camera","template"],o=(e,t,i,a,o,r)=>e.connection.subscribeMessage(r,{type:`${t}/start_preview`,flow_id:i,flow_type:a,user_input:o}),r=e=>a.includes(e)?e:"generic"},95311:function(e,t,i){"use strict";i.d(t,{DF:function(){return m},Lo:function(){return $},MH:function(){return p},MM:function(){return v},Qz:function(){return g},Ru:function(){return b},UU:function(){return y},_7:function(){return f},bZ:function(){return u},m0:function(){return h},tD:function(){return w},vX:function(){return _},wY:function(){return C}});var a=i(86518),o=(i(78350),i(74423),i(44114),i(30237),i(18111),i(22489),i(30531),i(7588),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953),i(44537)),r=i(69093),n=i(82286),s=i(24367),l=i(58594);const d=["domain","integration","device_class"],c=["integration","manufacturer","model"],h=(e,t,i,a,o,r,n)=>{const s=[],l=[],d=[];return Object.values(i).forEach(i=>{i.labels.includes(t)&&g(e,o,a,i.area_id,r,n)&&d.push(i.area_id)}),Object.values(a).forEach(i=>{i.labels.includes(t)&&m(e.states,Object.values(o),i,r,n)&&l.push(i.id)}),Object.values(o).forEach(i=>{i.labels.includes(t)&&v(e.states[i.entity_id],r,n)&&s.push(i.entity_id)}),{areas:d,devices:l,entities:s}},p=(e,t,i,a,o)=>{const r=[];return Object.values(i).forEach(i=>{i.floor_id===t&&g(e,e.entities,e.devices,i.area_id,a,o)&&r.push(i.area_id)}),{areas:r}},u=(e,t,i,a,o,r)=>{const n=[],s=[];return Object.values(i).forEach(i=>{i.area_id===t&&m(e.states,Object.values(a),i,o,r)&&s.push(i.id)}),Object.values(a).forEach(i=>{i.area_id===t&&v(e.states[i.entity_id],o,r)&&n.push(i.entity_id)}),{devices:s,entities:n}},f=(e,t,i,a,o)=>{const r=[];return Object.values(i).forEach(i=>{i.device_id===t&&v(e.states[i.entity_id],a,o)&&r.push(i.entity_id)}),{entities:r}},g=(e,t,i,a,o,r)=>!!Object.values(i).some(i=>!(i.area_id!==a||!m(e.states,Object.values(t),i,o,r)))||Object.values(t).some(t=>!(t.area_id!==a||!v(e.states[t.entity_id],o,r))),m=(e,t,i,a,r)=>{var n,s;const d=r?(0,l.fk)(r,t):void 0;if(null!==(n=a.target)&&void 0!==n&&n.device&&!(0,o.e)(a.target.device).some(e=>_(e,i,d)))return!1;if(null!==(s=a.target)&&void 0!==s&&s.entity){return t.filter(e=>e.device_id===i.id).some(t=>{const i=e[t.entity_id];return v(i,a,r)})}return!0},v=(e,t,i)=>{var a;return!!e&&(null===(a=t.target)||void 0===a||!a.entity||(0,o.e)(t.target.entity).some(t=>b(t,e,i)))},_=(e,t,i)=>{const{manufacturer:a,model:o,model_id:r,integration:n}=e;if(a&&t.manufacturer!==a)return!1;if(o&&t.model!==o)return!1;if(r&&t.model_id!==r)return!1;var s;if(n&&i&&(null==i||null===(s=i[t.id])||void 0===s||!s.has(n)))return!1;return!0},b=(e,t,i)=>{var a;const{domain:s,device_class:l,supported_features:d,unit_of_measurement:c,integration:h}=e;if(s){const e=(0,r.t)(t);if(Array.isArray(s)?!s.includes(e):e!==s)return!1}if(l){const e=t.attributes.device_class;if(e&&Array.isArray(l)?!l.includes(e):e!==l)return!1}if(d&&!(0,o.e)(d).some(e=>(0,n.$)(t,e)))return!1;if(c){const e=t.attributes.unit_of_measurement;if(!e||(Array.isArray(c)?!c.includes(e):e!==c))return!1}return!h||(null==i||null===(a=i[t.entity_id])||void 0===a?void 0:a.domain)===h},y=e=>{if(!e.entity)return{entity:null};if("filter"in e.entity)return e;const t=e.entity,{domain:i,integration:o,device_class:r}=t,n=(0,a.A)(t,d);return i||o||r?{entity:Object.assign(Object.assign({},n),{},{filter:{domain:i,integration:o,device_class:r}})}:{entity:n}},w=e=>{if(!e.device)return{device:null};if("filter"in e.device)return e;const t=e.device,{integration:i,manufacturer:o,model:r}=t,n=(0,a.A)(t,c);return i||o||r?{device:Object.assign(Object.assign({},n),{},{filter:{integration:i,manufacturer:o,model:r}})}:{device:n}},$=e=>{let t;var i;if("target"in e)t=(0,o.e)(null===(i=e.target)||void 0===i?void 0:i.entity);else if("entity"in e){var a,r;if(null!==(a=e.entity)&&void 0!==a&&a.include_entities)return;t=(0,o.e)(null===(r=e.entity)||void 0===r?void 0:r.filter)}if(!t)return;const n=t.flatMap(e=>e.integration||e.device_class||e.supported_features||!e.domain?[]:(0,o.e)(e.domain).filter(e=>(0,s.z)(e)));return[...new Set(n)]},C=(e,t,i,a,r,n={target:{}})=>{if(!t)return[];const s=new Set((0,o.e)(t.entity_id)),l=new Set((0,o.e)(t.device_id)),d=new Set((0,o.e)(t.area_id)),c=new Set((0,o.e)(t.floor_id));return new Set((0,o.e)(t.label_id)).forEach(t=>{const o=h(e,t,r,a,i,n);o.devices.forEach(e=>l.add(e)),o.entities.forEach(e=>s.add(e)),o.areas.forEach(e=>d.add(e))}),c.forEach(t=>{p(e,t,r,n).areas.forEach(e=>d.add(e))}),d.forEach(t=>{const o=u(e,t,a,i,n);o.devices.forEach(e=>l.add(e)),o.entities.forEach(e=>s.add(e))}),l.forEach(t=>{f(e,t,i,n).entities.forEach(e=>s.add(e))}),Array.from(s)}},29908:function(e,t,i){"use strict";i.d(t,{f:function(){return s}});var a=i(90889),o=i(9899);const r=e=>e.sendMessagePromise({type:"config/area_registry/list"}),n=(e,t)=>e.subscribeEvents((0,o.s)(()=>r(e).then(e=>t.setState(e,!0)),500,!0),"area_registry_updated"),s=(e,t)=>(0,a.N)("_areaRegistry",r,n,e,t)},78314:function(e,t,i){"use strict";i.a(e,async function(e,a){try{i.r(t);i(74423),i(18111),i(22489),i(61701),i(13579),i(33110),i(3362),i(62953);var o=i(40445),r=i(5124),n=i(67576),s=i(59455),l=i(22786),d=i(1087),c=i(18350),h=i(72554),p=(i(93444),i(26300)),u=i(90944),f=i(14503),g=i(36918),m=i(65063),v=i(77763),_=i(70241),b=i(26401),y=(i(34753),i(45634)),w=(i(52140),i(57473)),$=i(38387),C=(i(11584),i(39619)),k=e([c,h,p,y,w,$,C]);[c,h,p,y,w,$,C]=k.then?(await k)():k;let x,S,E,M,z,P,A,L,F,D,T,H,q,O,Z,j,U=e=>e;const I="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",B="M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,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,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z";let V=0;class R extends r.WF{async showDialog(e){this._params=e,this._instance=V++,this._open=!0;const t=this._instance;let i;if(e.startFlowHandler){this._loading="loading_flow",this._handler=e.startFlowHandler;try{i=await this._params.flowConfig.createFlow(this.hass,e.startFlowHandler)}catch(a){this.closeDialog();let e=a.message||a.body||"Unknown error";return"string"!=typeof e&&(e=JSON.stringify(e)),void(0,m.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:`${this.hass.localize("ui.panel.config.integrations.config_flow.could_not_load")}: ${e}`})}if(t!==this._instance)return}else{if(!e.continueFlowId)return;this._loading="loading_flow";try{i=await e.flowConfig.fetchFlow(this.hass,e.continueFlowId)}catch(a){this.closeDialog();let e=a.message||a.body||"Unknown error";return"string"!=typeof e&&(e=JSON.stringify(e)),void(0,m.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:`${this.hass.localize("ui.panel.config.integrations.config_flow.could_not_load")}: ${e}`})}}t===this._instance&&(this._processStep(i),this._loading=void 0)}closeDialog(){this._params&&(this._open?this._open=!1:this._dialogClosed())}_dialogClosed(){if(!this._params)return;const e=Boolean(this._step&&["create_entry","abort"].includes(this._step.type));var t;(!this._step||e||this._params.continueFlowId||this._params.flowConfig.deleteFlow(this.hass,this._step.flow_id),this._step&&this._params.dialogClosedCallback)&&this._params.dialogClosedCallback({flowFinished:e,entryId:"result"in this._step?null===(t=this._step.result)||void 0===t?void 0:t.entry_id:void 0});this._loading=void 0,this._step=void 0,this._params=void 0,this._handler=void 0,this._unsubDataEntryFlowProgress&&(this._unsubDataEntryFlowProgress(),this._unsubDataEntryFlowProgress=void 0),this._open=!1,(0,d.r)(this,"dialog-closed",{dialog:this.localName})}_getDialogTitle(){var e;if(this._loading||!this._step||!this._params)return"";switch(this._step.type){case"form":return this._params.flowConfig.renderShowFormStepHeader(this.hass,this._step);case"abort":return this._params.flowConfig.renderAbortHeader?this._params.flowConfig.renderAbortHeader(this.hass,this._step):this.hass.localize(`component.${null!==(e=this._params.domain)&&void 0!==e?e:this._step.handler}.title`);case"progress":return this._params.flowConfig.renderShowFormProgressHeader(this.hass,this._step);case"menu":return this._params.flowConfig.renderMenuHeader(this.hass,this._step);case"create_entry":{var t;const e=this._devices(this._params.flowConfig.showDevices,Object.values(this.hass.devices),null===(t=this._step.result)||void 0===t?void 0:t.entry_id,this._params.carryOverDevices).length;return this.hass.localize("ui.panel.config.integrations.config_flow."+(e?"device_created":"success"))}default:return""}}_getDialogSubtitle(){var e,t,i,a,o,r,n,s;if(this._loading||!this._step||!this._params)return"";switch(this._step.type){case"form":return null===(e=(t=this._params.flowConfig).renderShowFormStepSubheader)||void 0===e?void 0:e.call(t,this.hass,this._step);case"abort":return null===(i=(a=this._params.flowConfig).renderAbortSubheader)||void 0===i?void 0:i.call(a,this.hass,this._step);case"progress":return null===(o=(r=this._params.flowConfig).renderShowFormProgressSubheader)||void 0===o?void 0:o.call(r,this.hass,this._step);case"menu":return null===(n=(s=this._params.flowConfig).renderMenuSubheader)||void 0===n?void 0:n.call(s,this.hass,this._step);default:return""}}render(){var e,t,i,a,o,n,l;if(!this._params)return r.s6;const d=["form","menu","external","progress","data_entry_flow_progressed"].includes(null===(e=this._step)||void 0===e?void 0:e.type)&&(null===(t=this._params.manifest)||void 0===t?void 0:t.is_built_in)||!(null===(i=this._params.manifest)||void 0===i||!i.documentation),c=this._getDialogTitle(),h=this._getDialogSubtitle();return(0,r.qy)(x||(x=U` <ha-dialog .open="${0}" prevent-scrim-close @after-show="${0}" @closed="${0}"> <ha-icon-button slot="headerNavigationIcon" .label="${0}" .path="${0}" data-dialog="close"></ha-icon-button> <div slot="headerTitle" class="dialog-title${0}" title="${0}"> ${0} </div> ${0} ${0} <div> ${0} </div> ${0} </ha-dialog> `),this._open,this._focusFormStep,this._dialogClosed,this.hass.localize("ui.common.close"),I,"form"===(null===(a=this._step)||void 0===a?void 0:a.type)?" form":"",c,c,h?(0,r.qy)(S||(S=U` <div slot="headerSubtitle">${0}</div>`),h):r.s6,d&&!this._loading&&this._step?(0,r.qy)(E||(E=U` <a slot="headerActionItems" class="help" href="${0}" target="_blank" rel="noreferrer noopener"> <ha-icon-button .label="${0}" .path="${0}"> </ha-icon-button></a> `),this._params.manifest.is_built_in?(0,g.o)(this.hass,`/integrations/${this._params.manifest.domain}`):this._params.manifest.documentation,this.hass.localize("ui.common.help"),B):r.s6,this._loading||null===this._step?(0,r.qy)(M||(M=U` <step-flow-loading .flowConfig="${0}" .hass="${0}" .loadingReason="${0}" .handler="${0}" .step="${0}"></step-flow-loading> `),this._params.flowConfig,this.hass,this._loading,this._handler,this._step):void 0===this._step?r.s6:(0,r.qy)(z||(z=U` ${0} `),"form"===this._step.type?(0,r.qy)(P||(P=U` <step-flow-form ${0} autofocus narrow .flowConfig="${0}" .step="${0}" .hass="${0}" @flow-step-footer-state-changed="${0}"></step-flow-form> `),(0,s.K)(this._formStepRef),this._params.flowConfig,this._step,this.hass,this._handleFooterStateChanged):"external"===this._step.type?(0,r.qy)(A||(A=U` <step-flow-external .flowConfig="${0}" .step="${0}" .hass="${0}"></step-flow-external> `),this._params.flowConfig,this._step,this.hass):"abort"===this._step.type?(0,r.qy)(L||(L=U` <step-flow-abort ${0} .params="${0}" .step="${0}" .hass="${0}" .handler="${0}" .domain="${0}"></step-flow-abort> `),(0,s.K)(this._abortStepRef),this._params,this._step,this.hass,this._step.handler,null!==(o=this._params.domain)&&void 0!==o?o:this._step.handler):"progress"===this._step.type?(0,r.qy)(F||(F=U` <step-flow-progress .flowConfig="${0}" .step="${0}" .hass="${0}" .progress="${0}"></step-flow-progress> `),this._params.flowConfig,this._step,this.hass,this._progress):"menu"===this._step.type?(0,r.qy)(D||(D=U` <step-flow-menu .flowConfig="${0}" .step="${0}" .hass="${0}"></step-flow-menu> `),this._params.flowConfig,this._step,this.hass):(0,r.qy)(T||(T=U` <step-flow-create-entry ${0} .flowConfig="${0}" .step="${0}" .hass="${0}" .navigateToResult="${0}" @flow-step-footer-state-changed="${0}" .devices="${0}"></step-flow-create-entry> `),(0,s.K)(this._createEntryStepRef),this._params.flowConfig,this._step,this.hass,null!==(n=this._params.navigateToResult)&&void 0!==n&&n,this._handleFooterStateChanged,this._devices(this._params.flowConfig.showDevices,Object.values(this.hass.devices),null===(l=this._step.result)||void 0===l?void 0:l.entry_id,this._params.carryOverDevices))),this._renderFooter())}_renderFooter(){if(!this._step||this._loading)return r.s6;switch(this._step.type){case"form":return(0,r.qy)(H||(H=U` <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" .loading="${0}" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> `),this._formStepLoading,this._submitFormStep,this._params.flowConfig.renderShowFormStepSubmitButton(this.hass,this._step));case"abort":return"missing_credentials"===this._step.reason?r.s6:(0,r.qy)(q||(q=U` <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> `),this._closeAbortStep,this.hass.localize("ui.panel.config.integrations.config_flow.close"));case"external":return(0,r.qy)(O||(O=U` <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" href="${0}" target="_blank" rel="noreferrer"> ${0} </ha-button> </ha-dialog-footer> `),this._step.url,this.hass.localize("ui.panel.config.integrations.config_flow.external_step.open_site"));case"create_entry":{var e;const t=this._devices(this._params.flowConfig.showDevices,Object.values(this.hass.devices),null===(e=this._step.result)||void 0===e?void 0:e.entry_id,this._params.carryOverDevices);return(0,r.qy)(Z||(Z=U` <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> `),this._finishCreateEntryStep,this.hass.localize("ui.panel.config.integrations.config_flow."+(!t.length||this._createEntryHasPendingUpdates||t.some(e=>e.area_id)?"finish":"finish_skip")))}default:return r.s6}}firstUpdated(e){super.firstUpdated(e),this.addEventListener("flow-update",e=>{const{step:t,stepPromise:i}=e.detail;this._processStep(t||i)})}willUpdate(e){super.willUpdate(e),e.has("_step")&&this._step&&["external","progress"].includes(this._step.type)&&this._subscribeDataEntryFlowProgressed()}async _processStep(e){if(void 0===e)return void this.closeDialog();const t=setTimeout(()=>{this._loading="loading_step"},250);let i;try{i=await e}catch(r){var a;return this.closeDialog(),void(0,m.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.integrations.config_flow.error"),text:null==r||null===(a=r.body)||void 0===a?void 0:a.message})}finally{clearTimeout(t),this._loading=void 0}var o;(this._step=void 0,this._formStepLoading=!1,this._createEntryHasPendingUpdates=!1,await this.updateComplete,this._step=i,"create_entry"!==i.type&&"abort"!==i.type||!i.next_flow)||(this._step=void 0,this._handler=void 0,this._unsubDataEntryFlowProgress&&(this._unsubDataEntryFlowProgress(),this._unsubDataEntryFlowProgress=void 0),"config_flow"===i.next_flow[0]?(0,v.W)(this,{continueFlowId:i.next_flow[1],carryOverDevices:this._devices(this._params.flowConfig.showDevices,Object.values(this.hass.devices),"create_entry"===i.type?null===(o=i.result)||void 0===o?void 0:o.entry_id:void 0,this._params.carryOverDevices).map(e=>e.id),dialogClosedCallback:this._params.dialogClosedCallback}):"options_flow"===i.next_flow[0]?"create_entry"===i.type&&(0,_.Q)(this,i.result,{continueFlowId:i.next_flow[1],navigateToResult:this._params.navigateToResult,dialogClosedCallback:this._params.dialogClosedCallback}):"config_subentries_flow"===i.next_flow[0]?"create_entry"===i.type&&(0,b.a)(this,i.result,"",{continueFlowId:i.next_flow[1],navigateToResult:this._params.navigateToResult,dialogClosedCallback:this._params.dialogClosedCallback}):(this.closeDialog(),(0,m.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.error",{error:`Unsupported next flow type: ${i.next_flow[0]}`})})))}async _subscribeDataEntryFlowProgressed(){if(this._unsubDataEntryFlowProgress)return;this._progress=void 0;const e=[(0,u.P)(this.hass.connection,e=>{var t;e.data.flow_id===(null===(t=this._step)||void 0===t?void 0:t.flow_id)&&(this._processStep(this._params.flowConfig.fetchFlow(this.hass,this._step.flow_id)),this._progress=void 0)}),(0,u.K)(this.hass.connection,e=>{this._progress=Math.ceil(100*e.data.progress)})];this._unsubDataEntryFlowProgress=async()=>{(await Promise.all(e)).map(e=>e())}}static get styles(){return[f.nA,(0,r.AH)(j||(j=U`.dialog-title{overflow:hidden;text-overflow:ellipsis}.dialog-title.form{white-space:normal}.help{color:var(--secondary-text-color)}`))]}constructor(...e){super(...e),this._instance=V,this._open=!1,this._formStepLoading=!1,this._createEntryHasPendingUpdates=!1,this._formStepRef=(0,s._)(),this._abortStepRef=(0,s._)(),this._createEntryStepRef=(0,s._)(),this._devices=(0,l.A)((e,t,i,a)=>e&&i?t.filter(e=>e.config_entries.includes(i)||(null==a?void 0:a.includes(e.id))):[]),this._focusFormStep=async()=>{var e,t;"form"===(null===(e=this._step)||void 0===e?void 0:e.type)&&this._open&&(await this.updateComplete,null===(t=this._formStepRef.value)||void 0===t||t.focus())},this._handleFooterStateChanged=e=>{void 0!==e.detail.loading&&(this._formStepLoading=e.detail.loading),void 0!==e.detail.hasPendingUpdates&&(this._createEntryHasPendingUpdates=e.detail.hasPendingUpdates)},this._submitFormStep=()=>{var e;null===(e=this._formStepRef.value)||void 0===e||e.submit()},this._closeAbortStep=()=>{var e;null===(e=this._abortStepRef.value)||void 0===e||e.close()},this._finishCreateEntryStep=()=>{var e;null===(e=this._createEntryStepRef.value)||void 0===e||e.finish()}}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],R.prototype,"hass",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_params",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_loading",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_progress",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_open",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_step",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_handler",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_formStepLoading",void 0),(0,o.Cg)([(0,n.wk)()],R.prototype,"_createEntryHasPendingUpdates",void 0),R=(0,o.Cg)([(0,n.EM)("dialog-data-entry-flow")],R),a()}catch(x){a(x)}})},77763:function(e,t,i){"use strict";i.d(t,{W:function(){return v}});i(89463),i(3362),i(62953);var a=i(5124),o=i(26571),r=i(95350),n=i(29094);let s,l,d,c,h,p,u,f,g,m=e=>e;const v=(e,t)=>(0,n.g)(e,t,{flowType:"config_flow",showDevices:!0,createFlow:async(e,i)=>{const[a]=await Promise.all([(0,o.t1)(e,i,t.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",i),e.loadBackendTranslation("selector",i),e.loadBackendTranslation("title",i)]);return a},fetchFlow:async(e,t)=>{const[i]=await Promise.all([(0,o.PN)(e,t),e.loadFragmentTranslation("config")]);return await Promise.all([e.loadBackendTranslation("config",i.handler),e.loadBackendTranslation("selector",i.handler),e.loadBackendTranslation("title",i.handler)]),i},handleFlowStep:o.jm,deleteFlow:o.sR,renderAbortDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.abort.${t.reason}`,t.description_placeholders);return i?(0,a.qy)(s||(s=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):t.reason},renderShowFormStepHeader(e,t){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.title`,t.description_placeholders)||e.localize(`component.${t.handler}.title`)},renderShowFormStepDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return i?(0,a.qy)(l||(l=m` <ha-markdown .allowDataUrl="${0}" allow-svg breaks .content="${0}"></ha-markdown> `),"zwave_js"===t.handler,i):""},renderShowFormStepFieldLabel(e,t,i,a){var o;if("expandable"===i.type)return e.localize(`component.${t.handler}.config.step.${t.step_id}.sections.${i.name}.name`,t.description_placeholders)||i.name;const r=null!=a&&null!==(o=a.path)&&void 0!==o&&o[0]?`sections.${a.path[0]}.`:"";return e.localize(`component.${t.handler}.config.step.${t.step_id}.${r}data.${i.name}`,t.description_placeholders)||i.name},renderShowFormStepFieldHelper(e,t,i,o){var r;if("expandable"===i.type)return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.sections.${i.name}.description`,t.description_placeholders);const n=null!=o&&null!==(r=o.path)&&void 0!==r&&r[0]?`sections.${o.path[0]}.`:"",s=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.${n}data_description.${i.name}`,t.description_placeholders);return s?(0,a.qy)(d||(d=m`<ha-markdown breaks .content="${0}"></ha-markdown>`),s):""},renderShowFormStepFieldError(e,t,i){return e.localize(`component.${t.translation_domain||t.translation_domain||t.handler}.config.error.${i}`,t.description_placeholders)||i},renderShowFormStepFieldLocalizeValue(e,t,i){return e.localize(`component.${t.handler}.selector.${i}`)},renderShowFormStepSubmitButton(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===t.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.${t.step_id}.description`,t.description_placeholders);return(0,a.qy)(c||(c=m` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),i?(0,a.qy)(h||(h=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):"")},renderCreateEntryDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.create_entry.${t.description||"default"}`,t.description_placeholders);return(0,a.qy)(p||(p=m` ${0} `),i?(0,a.qy)(u||(u=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):a.s6)},renderShowFormProgressHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderShowFormProgressDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.progress.${t.progress_action}`,t.description_placeholders);return i?(0,a.qy)(f||(f=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderMenuDescription(e,t){const i=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return i?(0,a.qy)(g||(g=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),i):""},renderMenuOption(e,t,i){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_options.${i}`,t.description_placeholders)},renderMenuOptionDescription(e,t,i){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_option_descriptions.${i}`,t.description_placeholders)},renderLoadingDescription(e,t,i,a){if("loading_flow"!==t&&"loading_step"!==t)return"";const o=(null==a?void 0:a.handler)||i;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:o?(0,r.p$)(e.localize,o):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},70241:function(e,t,i){"use strict";i.d(t,{Q:function(){return f}});i(3362),i(62953);var a=i(5124),o=i(95350),r=i(7749),n=i(29094);let s,l,d,c,h,p,u=e=>e;const f=(e,t,i)=>(0,n.g)(e,Object.assign({startFlowHandler:t.entry_id,domain:t.domain},i),{flowType:"options_flow",showDevices:!1,createFlow:async(e,i)=>{const[a]=await Promise.all([(0,r.HH)(e,i),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return a},fetchFlow:async(e,i)=>{const[a]=await Promise.all([(0,r.TY)(e,i),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return a},handleFlowStep:r.lu,deleteFlow:r.mu,renderAbortDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.abort.${i.reason}`,i.description_placeholders);return o?(0,a.qy)(s||(s=u` <ha-markdown breaks allow-svg .content="${0}"></ha-markdown> `),o):i.reason},renderShowFormStepHeader(e,i){return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.title`,i.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header")},renderShowFormStepDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return o?(0,a.qy)(l||(l=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderShowFormStepFieldLabel(e,i,a,o){var r;if("expandable"===a.type)return e.localize(`component.${t.domain}.options.step.${i.step_id}.sections.${a.name}.name`,i.description_placeholders)||a.name;const n=null!=o&&null!==(r=o.path)&&void 0!==r&&r[0]?`sections.${o.path[0]}.`:"";return e.localize(`component.${t.domain}.options.step.${i.step_id}.${n}data.${a.name}`,i.description_placeholders)||a.name},renderShowFormStepFieldHelper(e,i,o,r){var n;if("expandable"===o.type)return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.sections.${o.name}.description`,i.description_placeholders);const s=null!=r&&null!==(n=r.path)&&void 0!==n&&n[0]?`sections.${r.path[0]}.`:"",l=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.${s}data_description.${o.name}`,i.description_placeholders);return l?(0,a.qy)(d||(d=u`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(e,i,a){return e.localize(`component.${i.translation_domain||t.domain}.options.error.${a}`,i.description_placeholders)||a},renderShowFormStepFieldLocalizeValue(e,i,a){return e.localize(`component.${t.domain}.selector.${a}`)},renderShowFormStepSubmitButton(e,i){return e.localize(`component.${t.domain}.options.step.${i.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===i.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return""},renderExternalStepDescription(e,t){return""},renderCreateEntryDescription(e,t){return(0,a.qy)(c||(c=u` <p>${0}</p> `),e.localize("ui.dialogs.options_flow.success.description"))},renderShowFormProgressHeader(e,i){return e.localize(`component.${t.domain}.options.step.${i.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderShowFormProgressDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.progress.${i.progress_action}`,i.description_placeholders);return o?(0,a.qy)(h||(h=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuHeader(e,i){return e.localize(`component.${t.domain}.options.step.${i.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderMenuDescription(e,i){const o=e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.description`,i.description_placeholders);return o?(0,a.qy)(p||(p=u` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuOption(e,i,a){return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.menu_options.${a}`,i.description_placeholders)},renderMenuOptionDescription(e,i,a){return e.localize(`component.${i.translation_domain||t.domain}.options.step.${i.step_id}.menu_option_descriptions.${a}`,i.description_placeholders)},renderLoadingDescription(e,i){return e.localize(`component.${t.domain}.options.loading`)||("loading_flow"===i||"loading_step"===i?e.localize(`ui.dialogs.options_flow.loading.${i}`,{integration:(0,o.p$)(e.localize,t.domain)}):"")}})},26401:function(e,t,i){"use strict";i.d(t,{a:function(){return y}});i(89463),i(3362),i(62953);var a=i(5124),o=i(95350);const r={"HA-Frontend-Base":`${location.protocol}//${location.host}`},n=(e,t,i,a)=>e.callApi("POST","config/config_entries/subentries/flow",{handler:[t,i],subentry_id:a},r),s=(e,t,i)=>e.callApi("POST",`config/config_entries/subentries/flow/${t}`,i,r),l=(e,t)=>e.callApi("DELETE",`config/config_entries/subentries/flow/${t}`);var d=i(29094);let c,h,p,u,f,g,m,v,_,b=e=>e;const y=(e,t,i,y)=>(0,d.g)(e,y,{flowType:"config_subentries_flow",showDevices:!0,createFlow:async(e,a)=>{const[o]=await Promise.all([n(e,a,i,y.subEntryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config_subentries",t.domain),e.loadBackendTranslation("selector",t.domain),e.loadBackendTranslation("title",t.domain)]);return o},fetchFlow:async(e,a)=>{const o=await((e,t)=>e.callApi("GET",`config/config_entries/subentries/flow/${t}`,void 0,r))(e,a);return i=o.handler[1],await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config_subentries",t.domain),await e.loadBackendTranslation("selector",t.domain),o},handleFlowStep:s,deleteFlow:l,renderAbortDescription(e,o){const r=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.abort.${o.reason}`,o.description_placeholders);return r?(0,a.qy)(c||(c=b` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),r):o.reason},renderShowFormStepHeader(e,a){return e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${i}.step.${a.step_id}.title`,a.description_placeholders)||e.localize(`component.${t.domain}.title`)},renderShowFormStepDescription(e,o){const r=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return r?(0,a.qy)(h||(h=b` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),r):""},renderShowFormStepFieldLabel(e,a,o,r){var n;if("expandable"===o.type)return e.localize(`component.${t.domain}.config_subentries.${i}.step.${a.step_id}.sections.${o.name}.name`,a.description_placeholders)||o.name;const s=null!=r&&null!==(n=r.path)&&void 0!==n&&n[0]?`sections.${r.path[0]}.`:"";return e.localize(`component.${t.domain}.config_subentries.${i}.step.${a.step_id}.${s}data.${o.name}`,a.description_placeholders)||o.name},renderShowFormStepFieldHelper(e,o,r,n){var s;if("expandable"===r.type)return e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.sections.${r.name}.description`,o.description_placeholders);const l=null!=n&&null!==(s=n.path)&&void 0!==s&&s[0]?`sections.${n.path[0]}.`:"",d=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.${l}data_description.${r.name}`,o.description_placeholders);return d?(0,a.qy)(p||(p=b`<ha-markdown breaks .content="${0}"></ha-markdown>`),d):""},renderShowFormStepFieldError(e,a,o){return e.localize(`component.${a.translation_domain||a.translation_domain||t.domain}.config_subentries.${i}.error.${o}`,a.description_placeholders)||o},renderShowFormStepFieldLocalizeValue(e,i,a){return e.localize(`component.${t.domain}.selector.${a}`)},renderShowFormStepSubmitButton(e,a){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${a.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===a.last_step?"next":"submit"))},renderExternalStepHeader(e,a){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${a.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,o){const r=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return(0,a.qy)(u||(u=b` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),r?(0,a.qy)(f||(f=b` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),r):"")},renderCreateEntryDescription(e,o){const r=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.create_entry.${o.description||"default"}`,o.description_placeholders);return(0,a.qy)(g||(g=b` ${0} `),r?(0,a.qy)(m||(m=b` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),r):a.s6)},renderShowFormProgressHeader(e,a){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${a.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderShowFormProgressDescription(e,o){const r=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.progress.${o.progress_action}`,o.description_placeholders);return r?(0,a.qy)(v||(v=b` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),r):""},renderMenuHeader(e,a){return e.localize(`component.${t.domain}.config_subentries.${i}.step.${a.step_id}.title`,a.description_placeholders)||e.localize(`component.${t.domain}.title`)},renderMenuDescription(e,o){const r=e.localize(`component.${o.translation_domain||t.domain}.config_subentries.${i}.step.${o.step_id}.description`,o.description_placeholders);return r?(0,a.qy)(_||(_=b` <ha-markdown allowsvg breaks .content="${0}"></ha-markdown> `),r):""},renderMenuOption(e,a,o){return e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${i}.step.${a.step_id}.menu_options.${o}`,a.description_placeholders)},renderMenuOptionDescription(e,a,o){return e.localize(`component.${a.translation_domain||t.domain}.config_subentries.${i}.step.${a.step_id}.menu_option_descriptions.${o}`,a.description_placeholders)},renderLoadingDescription(e,t,i,a){if("loading_flow"!==t&&"loading_step"!==t)return"";const r=(null==a?void 0:a.handler)||i;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:r?(0,o.p$)(e.localize,r):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},34753:function(e,t,i){"use strict";i(3362);var a=i(40445),o=i(5124),r=i(67576),n=i(1087),s=i(41617),l=i(77763),d=i(83358);let c,h=e=>e;class p extends o.WF{firstUpdated(e){super.firstUpdated(e),"missing_credentials"===this.step.reason&&this._handleMissingCreds()}render(){return"missing_credentials"===this.step.reason?o.s6:(0,o.qy)(c||(c=h` <div class="content"> ${0} </div> `),this.params.flowConfig.renderAbortDescription(this.hass,this.step))}async _handleMissingCreds(){(0,s.a)(this.params.dialogParentElement,{selectedDomain:this.domain,manifest:this.params.manifest,applicationCredentialAddedCallback:()=>{(0,l.W)(this.params.dialogParentElement,{dialogClosedCallback:this.params.dialogClosedCallback,startFlowHandler:this.handler,navigateToResult:this.params.navigateToResult})}}),this._flowDone()}_flowDone(){(0,n.r)(this,"flow-update",{step:void 0})}close(){this._flowDone()}static get styles(){return d.G}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"params",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"step",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"domain",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"handler",void 0),p=(0,a.Cg)([(0,r.EM)("step-flow-abort")],p)},45634:function(e,t,i){"use strict";i.a(e,async function(e,t){try{i(16280),i(74423),i(44114),i(18111),i(22489),i(7588),i(61701),i(13579),i(53921),i(3362),i(96167),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(22786),s=i(1087),l=i(37981),d=i(71727),c=i(91926),h=i(66086),p=i(91485),u=i(62351),f=i(77423),g=i(58594),m=i(59241),v=i(95350),_=i(44144),b=i(65063),y=i(81023),w=i(83358),$=e([h,p]);[h,p]=$.then?(await $)():$;let C,k,x,S,E,M,z,P,A=e=>e;class L extends o.WF{firstUpdated(e){super.firstUpdated(e),this._loadDomains()}willUpdate(e){var t;if(!e.has("devices")&&!e.has("hass"))return;if(1!==this.devices.length||this.devices[0].primary_config_entry!==(null===(t=this.step.result)||void 0===t?void 0:t.entry_id)||"voip"===this.step.result.domain)return;const i=this._deviceEntities(this.devices[0].id,Object.values(this.hass.entities),"assist_satellite");i.length&&i.some(e=>(0,u.KC)(this.hass.states[e.entity_id]))&&(this.navigateToResult=!1,this._flowDone(),(0,y.L)(this,{deviceId:this.devices[0].id}))}render(){var e;const t=this.hass.localize,i=this.step.result?Object.assign(Object.assign({},this._domains),{},{[this.step.result.entry_id]:this.step.result.domain}):this._domains;return(0,o.qy)(C||(C=A` <div class="content"> ${0} ${0} ${0} </div> `),this.flowConfig.renderCreateEntryDescription(this.hass,this.step),"not_loaded"===(null===(e=this.step.result)||void 0===e?void 0:e.state)?(0,o.qy)(k||(k=A`<span class="error">${0}</span>`),t("ui.panel.config.integrations.config_flow.not_loaded")):o.s6,0===this.devices.length&&["options_flow","repair_flow"].includes(this.flowConfig.flowType)?o.s6:0===this.devices.length?(0,o.qy)(x||(x=A`<p> ${0} </p>`),t("ui.panel.config.integrations.config_flow.created_config",{name:this.step.title})):(0,o.qy)(S||(S=A` <div class="devices"> ${0} </div> `),this.devices.map(e=>{var a,r,n,s,d,c;return(0,o.qy)(E||(E=A` <div class="device"> <div class="device-info"> ${0} <div class="device-info-details"> <span>${0}</span> ${0} </div> </div> <ha-input .label="${0}" .placeholder="${0}" .value="${0}" @change="${0}" .device="${0}"></ha-input> <ha-area-picker .hass="${0}" .device="${0}" .value="${0}" @value-changed="${0}"></ha-area-picker> </div> `),e.primary_config_entry&&i[e.primary_config_entry]?(0,o.qy)(M||(M=A`<img slot="graphic" alt="${0}" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer">`),(0,v.p$)(this.hass.localize,i[e.primary_config_entry]),(0,_.MR)({domain:i[e.primary_config_entry],type:"icon",darkOptimized:null===(a=this.hass.themes)||void 0===a?void 0:a.darkMode},this.hass.auth.data.hassUrl)):o.s6,e.model||e.manufacturer,e.model?(0,o.qy)(z||(z=A`<span class="secondary"> ${0} </span>`),e.manufacturer):o.s6,t("ui.panel.config.integrations.config_flow.device_name"),(0,l.T)(e,this.hass.localize,this.hass.states),null!==(r=null===(n=this._deviceUpdate[e.id])||void 0===n?void 0:n.name)&&void 0!==r?r:(0,l.xn)(e),this._deviceNameChanged,e.id,this.hass,e.id,null!==(s=null!==(d=null===(c=this._deviceUpdate[e.id])||void 0===c?void 0:c.area)&&void 0!==d?d:e.area_id)&&void 0!==s?s:void 0,this._areaPicked)})))}updated(e){super.updated(e),e.has("_deviceUpdate")&&(0,s.r)(this,"flow-step-footer-state-changed",{hasPendingUpdates:Object.keys(this._deviceUpdate).length>0})}async _loadDomains(){const e=await(0,f.VN)(this.hass);this._domains=Object.fromEntries(e.map(e=>[e.entry_id,e.domain]))}async _flowDone(){if(Object.keys(this._deviceUpdate).length){const e=[],t=Object.entries(this._deviceUpdate).map(([t,i])=>(i.name&&e.push(t),(0,g.FB)(this.hass,t,{name_by_user:i.name,area_id:i.area}).catch(e=>{const t=e instanceof Error?e.message:"Unknown error";(0,b.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.error_saving_device",{error:t})})})));await Promise.allSettled(t);const i=[],a=[];e.forEach(e=>{const t=this._deviceEntities(e,Object.values(this.hass.entities));a.push(...t.map(e=>e.entity_id))});const o=await(0,m.BM)(this.hass,a);Object.entries(o).forEach(([e,t])=>{t&&i.push((0,m.G_)(this.hass,e,{new_entity_id:t}).catch(e=>(0,b.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.integrations.config_flow.error_saving_entity",{error:e.message})})))}),await Promise.allSettled(i)}(0,s.r)(this,"flow-update",{step:void 0}),this.step.result&&this.navigateToResult&&(1===this.devices.length?(0,c.oo)(`/config/devices/device/${this.devices[0].id}`):(0,c.oo)(`/config/integrations/integration/${this.step.result.domain}#config_entry=${this.step.result.entry_id}`))}finish(){return this._flowDone()}async _areaPicked(e){const t=e.currentTarget;if(!t)return;const i=t.device,a=e.detail.value;i in this._deviceUpdate||(this._deviceUpdate[i]={}),this._deviceUpdate[i].area=a,this.requestUpdate("_deviceUpdate")}_deviceNameChanged(e){const t=e.currentTarget;if(!t)return;const i=t.device,a=t.value;i in this._deviceUpdate||(this._deviceUpdate[i]={}),this._deviceUpdate[i].name=a,this.requestUpdate("_deviceUpdate")}static get styles(){return[w.G,(0,o.AH)(P||(P=A`.devices{display:flex;gap:var(--ha-space-2);flex-direction:column}.device{border:1px solid var(--divider-color);padding:6px;border-radius:var(--ha-border-radius-sm);display:inline-block}.device-info{display:flex;align-items:center;gap:var(--ha-space-2)}.device-info img{width:40px;height:40px}.device-info-details{display:flex;flex-direction:column;justify-content:center}.secondary{color:var(--secondary-text-color)}ha-area-picker{display:block}ha-input{margin:var(--ha-space-2) 0}.error{color:var(--error-color)}`))]}constructor(...e){super(...e),this._domains={},this.navigateToResult=!1,this._deviceUpdate={},this._deviceEntities=(0,n.A)((e,t,i)=>t.filter(t=>t.device_id===e&&(!i||(0,d.m)(t.entity_id)===i)))}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],L.prototype,"flowConfig",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],L.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],L.prototype,"step",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],L.prototype,"devices",void 0),(0,a.Cg)([(0,r.wk)()],L.prototype,"_deviceUpdate",void 0),L=(0,a.Cg)([(0,r.EM)("step-flow-create-entry")],L),t()}catch(C){t(C)}})},52140:function(e,t,i){"use strict";var a=i(40445),o=i(5124),r=i(67576),n=i(83358);let s,l=e=>e;class d extends o.WF{render(){return(0,o.qy)(s||(s=l` <div class="content"> ${0} </div> `),this.flowConfig.renderExternalStepDescription(this.hass,this.step))}firstUpdated(e){super.firstUpdated(e),window.open(this.step.url)}static get styles(){return[n.G]}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],d.prototype,"flowConfig",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],d.prototype,"step",void 0),d=(0,a.Cg)([(0,r.EM)("step-flow-external")],d)},57473:function(e,t,i){"use strict";i.a(e,async function(e,t){try{i(74423),i(18111),i(81148),i(20116),i(7588),i(61701),i(3362),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(59455),s=i(22786),l=i(69558),d=i(1087),c=i(76830),h=i(38962),p=i(50043),u=i(52763),f=(i(3587),i(65829)),g=i(82e3),m=i(51840),v=i(14503),_=i(83358),b=e([h,u,f]);[h,u,f]=b.then?(await b)():b;let y,w,$,C,k,x=e=>e;class S extends o.WF{disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}render(){const e=this.step,t=this._stepDataProcessed;return(0,o.qy)(y||(y=x` <div class="content" @click="${0}"> ${0} ${0} ${0} </div> ${0} `),this._clickHandler,this.flowConfig.renderShowFormStepDescription(this.hass,this.step),this._errorMsg?(0,o.qy)(w||(w=x`<ha-alert alert-type="error">${0}</ha-alert>`),this._errorMsg):o.s6,e.data_schema.length?(0,o.qy)($||($=x`<ha-form ${0} ?autofocus="${0}" .hass="${0}" .narrow="${0}" .data="${0}" .disabled="${0}" @value-changed="${0}" .schema="${0}" .error="${0}" .computeLabel="${0}" .computeHelper="${0}" .computeError="${0}" .localizeValue="${0}" .context="${0}"></ha-form>`),(0,n.K)(this._formRef),this.autoFocus,this.hass,this.narrow,t,this._loading,this._stepDataChanged,(0,g.Hg)(this.handleReadOnlyFields(e.data_schema)),this._errors,this._labelCallback,this._helperCallback,this._errorCallback,this._localizeValueCallback,{handler:e.handler}):o.s6,e.preview?(0,o.qy)(C||(C=x`<div class="preview" @set-flow-errors="${0}"> <h3> ${0}: </h3> ${0} </div>`),this._setError,this.hass.localize("ui.panel.config.integrations.config_flow.preview"),(0,l._)(`flow-preview-${(0,m.F)(e.preview)}`,{hass:this.hass,domain:e.preview,flowType:this.flowConfig.flowType,handler:e.handler,stepId:e.step_id,flowId:e.flow_id,stepData:t})):o.s6)}_setError(e){this._previewErrors=e.detail}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyDown)}updated(e){super.updated(e),e.has("_loading")&&(0,d.r)(this,"flow-step-footer-state-changed",{loading:this._loading})}focus(e){var t;null===(t=this._formRef.value)||void 0===t||t.focus()}willUpdate(e){var t;super.willUpdate(e),e.has("step")&&null!==(t=this.step)&&void 0!==t&&t.preview&&i(86174)(`./flow-preview-${(0,m.F)(this.step.preview)}`),(e.has("step")||e.has("_previewErrors")||e.has("_submitErrors"))&&(this._errors=this.step.errors||this._previewErrors||this._submitErrors?Object.assign(Object.assign(Object.assign({},this.step.errors),this._previewErrors),this._submitErrors):void 0)}_clickHandler(e){(0,c.d)(e,!1)&&(0,d.r)(this,"flow-update",{step:void 0})}get _stepDataProcessed(){return void 0!==this._stepData||(this._stepData=(0,p.$)(this.step.data_schema)),this._stepData}async _submitStep(){const e=this._stepData||{},t=(e,i)=>e.every(e=>(!e.required||!["",void 0].includes(i[e.name]))&&("expandable"!==e.type||!e.required&&void 0===i[e.name]||t(e.schema,i[e.name])));if(!(void 0===e?void 0===this.step.data_schema.find(e=>e.required):t(this.step.data_schema,e)))return void(this._errorMsg=this.hass.localize("ui.panel.config.integrations.config_flow.not_all_required_fields"));this._loading=!0,this._errorMsg=void 0,this._submitErrors=void 0;const i=this.step.flow_id,a={};Object.keys(e).forEach(t=>{var i,o,r;const n=e[t],s=[void 0,""].includes(n),l=null===(i=this.step.data_schema)||void 0===i?void 0:i.find(e=>e.name===t),d=null!==(o=null==l?void 0:l.selector)&&void 0!==o?o:{},c=null===(r=Object.values(d)[0])||void 0===r?void 0:r.read_only;s||c||(a[t]=n)});try{const e=await this.flowConfig.handleFlowStep(this.hass,this.step.flow_id,a);if(!this.step||i!==this.step.flow_id)return;this._previewErrors=void 0,(0,d.r)(this,"flow-update",{step:e})}catch(o){o&&o.body?(o.body.message&&(this._errorMsg=o.body.message),o.body.errors&&(this._submitErrors=o.body.errors),o.body.message||o.body.errors||(this._errorMsg="Unknown error occurred")):this._errorMsg="Unknown error occurred"}finally{this._loading=!1}}submit(){return this._submitStep()}_stepDataChanged(e){this._stepData=e.detail.value}static get styles(){return[v.RF,_.G,(0,o.AH)(k||(k=x`.error{color:red}ha-alert,ha-form{margin-top:var(--ha-space-6);display:block}`))]}constructor(...e){super(...e),this.narrow=!1,this.autoFocus=!1,this._loading=!1,this._formRef=(0,n._)(),this.handleReadOnlyFields=(0,s.A)(e=>{function t(e){var t,i;return Object.assign(Object.assign({},e),null!==(t=Object.values(null!==(i=null==e?void 0:e.selector)&&void 0!==i?i:{})[0])&&void 0!==t&&t.read_only?{disabled:!0}:{})}return null==e?void 0:e.map(e=>"expandable"===e.type&&e.schema?Object.assign(Object.assign({},e),{},{schema:e.schema.map(e=>t(e))}):t(e))}),this._handleKeyDown=e=>{"Enter"===e.key&&this._submitStep()},this._labelCallback=(e,t,i)=>this.flowConfig.renderShowFormStepFieldLabel(this.hass,this.step,e,i),this._helperCallback=(e,t)=>this.flowConfig.renderShowFormStepFieldHelper(this.hass,this.step,e,t),this._errorCallback=e=>this.flowConfig.renderShowFormStepFieldError(this.hass,this.step,e),this._localizeValueCallback=e=>this.flowConfig.renderShowFormStepFieldLocalizeValue(this.hass,this.step,e)}}S.shadowRootOptions=Object.assign(Object.assign({},o.WF.shadowRootOptions),{},{delegatesFocus:!0}),(0,a.Cg)([(0,r.MZ)({attribute:!1})],S.prototype,"flowConfig",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],S.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"autofocus"})],S.prototype,"autoFocus",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],S.prototype,"step",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],S.prototype,"hass",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_loading",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_stepData",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_previewErrors",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_submitErrors",void 0),(0,a.Cg)([(0,r.wk)()],S.prototype,"_errorMsg",void 0),S=(0,a.Cg)([(0,r.EM)("step-flow-form")],S),t()}catch(y){t(y)}})},38387:function(e,t,i){"use strict";i.a(e,async function(e,t){try{var a=i(40445),o=i(5124),r=i(67576),n=i(65829),s=e([n]);n=(s.then?(await s)():s)[0];let l,d,c,h=e=>e;class p extends o.WF{render(){const e=this.flowConfig.renderLoadingDescription(this.hass,this.loadingReason,this.handler,this.step);return(0,o.qy)(l||(l=h` <div class="content"> <ha-spinner size="large"></ha-spinner> ${0} </div> `),e?(0,o.qy)(d||(d=h`<div>${0}</div>`),e):o.s6)}}p.styles=(0,o.AH)(c||(c=h`.content{margin-top:0;padding:50px 100px;text-align:center}ha-spinner{margin-bottom:var(--ha-space-4)}`)),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"flowConfig",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"loadingReason",void 0),(0,a.Cg)([(0,r.MZ)()],p.prototype,"handler",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"step",void 0),p=(0,a.Cg)([(0,r.EM)("step-flow-loading")],p),t()}catch(l){t(l)}})},11584:function(e,t,i){"use strict";i(26910),i(18111),i(61701),i(53921),i(62953);var a=i(40445),o=i(5124),r=i(67576),n=i(1087),s=(i(43661),i(28732),i(83358)),l=i(52220);let d,c,h,p,u,f=e=>e;class g extends o.WF{shouldUpdate(e){var t;return e.size>1||!e.has("hass")||this.hass.localize!==(null===(t=e.get("hass"))||void 0===t?void 0:t.localize)}render(){let e,t,i={};if(Array.isArray(this.step.menu_options)){e=this.step.menu_options,t={};for(const a of e)t[a]=this.flowConfig.renderMenuOption(this.hass,this.step,a),i[a]=this.flowConfig.renderMenuOptionDescription(this.hass,this.step,a)}else e=Object.keys(this.step.menu_options),t=this.step.menu_options,i=Object.fromEntries(e.map(e=>[e,this.flowConfig.renderMenuOptionDescription(this.hass,this.step,e)]));this.step.sort&&(e=e.sort((e,i)=>(0,l.xL)(t[e],t[i],this.hass.locale.language)));const a=this.flowConfig.renderMenuDescription(this.hass,this.step);return(0,o.qy)(d||(d=f` ${0} <div class="options"> ${0} </div> `),a?(0,o.qy)(c||(c=f`<div class="content">${0}</div>`),a):o.s6,e.map(e=>(0,o.qy)(h||(h=f` <ha-list-item hasMeta .step="${0}" @click="${0}" ?twoline="${0}" ?multiline-secondary="${0}"> <span>${0}</span> ${0} <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> `),e,this._handleStep,i[e],i[e],t[e],i[e]?(0,o.qy)(p||(p=f`<span slot="secondary"> ${0} </span>`),i[e]):o.s6)))}_handleStep(e){(0,n.r)(this,"flow-update",{stepPromise:this.flowConfig.handleFlowStep(this.hass,this.step.flow_id,{next_step_id:e.currentTarget.step})})}}g.styles=[s.G,(0,o.AH)(u||(u=f`.options{margin-top:var(--ha-space-5);margin-bottom:var(--ha-space-4)}.content{padding-bottom:var(--ha-space-4)}.content+.options{margin-top:var(--ha-space-2)}ha-list-item{--mdc-list-side-padding:var(--ha-space-6)}`))],(0,a.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"flowConfig",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"step",void 0),g=(0,a.Cg)([(0,r.EM)("step-flow-menu")],g)},39619:function(e,t,i){"use strict";i.a(e,async function(e,t){try{var a=i(40445),o=i(5124),r=i(67576),n=i(67258),s=i(65829),l=i(16386),d=i(83358),c=e([s,l]);[s,l]=c.then?(await c)():c;let h,p,u,f,g=e=>e;class m extends o.WF{render(){return(0,o.qy)(h||(h=g` <div class="content"> ${0} ${0} </div> `),this.progress?(0,o.qy)(p||(p=g` <ha-progress-ring .value="${0}" size="large">${0}${0}%</ha-progress-ring> `),this.progress,this.progress,(0,n.d)(this.hass.locale)):(0,o.qy)(u||(u=g`<ha-spinner size="large"></ha-spinner>`)),this.flowConfig.renderShowFormProgressDescription(this.hass,this.step))}static get styles(){return[d.G,(0,o.AH)(f||(f=g`.content{margin-top:0;padding:50px 100px;text-align:center}ha-spinner{margin-bottom:var(--ha-space-4)}`))]}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"flowConfig",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"step",void 0),(0,a.Cg)([(0,r.MZ)({type:Number})],m.prototype,"progress",void 0),m=(0,a.Cg)([(0,r.EM)("step-flow-progress")],m),t()}catch(h){t(h)}})},83358:function(e,t,i){"use strict";i.d(t,{G:function(){return o}});let a;const o=(0,i(5124).AH)(a||(a=(e=>e)`h2{margin:var(--ha-space-6) var(--ha-space-10) 0 0;margin-inline-start:0px;margin-inline-end:var(--ha-space-10);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);-webkit-font-smoothing:var(--ha-font-smoothing);font-family:var(
--mdc-typography-headline6-font-family,
var(--mdc-typography-font-family, var(--ha-font-family-body))
);font-size:var(--mdc-typography-headline6-font-size, var(--ha-font-size-l));line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:var(--mdc-typography-headline6-font-weight,var(--ha-font-weight-medium));letter-spacing:var(--mdc-typography-headline6-letter-spacing, .0125em);text-decoration:var(--mdc-typography-headline6-text-decoration,inherit);text-transform:var(--mdc-typography-headline6-text-transform,inherit);box-sizing:border-box}.content,.preview{margin-top:var(--ha-space-5)}ha-markdown{overflow-wrap:break-word}ha-markdown a{color:var(--primary-color)}ha-markdown img:first-child:last-child{display:block;margin:0 auto}`))},81023:function(e,t,i){"use strict";i.d(t,{L:function(){return r}});i(3362),i(62953);var a=i(1087);const o=()=>Promise.all([i.e(92769),i.e(34995),i.e(3283),i.e(81034),i.e(42635),i.e(94956),i.e(61339),i.e(26092),i.e(39005),i.e(8851),i.e(55076),i.e(92363),i.e(71493)]).then(i.bind(i,85027)),r=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"ha-voice-assistant-setup-dialog",dialogImport:o,dialogParams:t})}},59992:function(e,t,i){"use strict";i.a(e,async function(e,a){try{i.d(t,{V:function(){return f}});i(62953);var o=i(40445),r=i(88696),n=i(5124),s=i(6412),l=i(67576),d=e([r]);r=(d.then?(await d)():d)[0];let c,h,p=e=>e;const u=e=>void 0===e?[]:Array.isArray(e)?e:[e],f=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,n.qy)(c||(c=p` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...u(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,n.AH)(h||(h=p`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:i=0,clientHeight:a=0,scrollTop:o=0}=e;this._contentScrollable=i-a>o+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const i=e.currentTarget;this._contentScrolled=(null!==(t=i.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(i)},this._resize=new r.P(this,{target:null,callback:e=>{var t;const i=null===(t=e[0])||void 0===t?void 0:t.target;i&&this._updateScrollableState(i)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};a()}catch(c){a(c)}})},41617:function(e,t,i){"use strict";i.d(t,{a:function(){return r}});i(3362),i(62953);var a=i(1087);const o=()=>Promise.all([i.e(92769),i.e(3283),i.e(98470),i.e(34873),i.e(26092),i.e(39005),i.e(29407)]).then(i.bind(i,82196)),r=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-add-application-credential",dialogImport:o,dialogParams:t})}},34023:function(e,t,i){"use strict";i.d(t,{E:function(){return o},J:function(){return r}});i(3362),i(62953);var a=i(1087);const o=()=>Promise.all([i.e(32450),i.e(7305),i.e(92769),i.e(3283),i.e(85010),i.e(89100),i.e(33889),i.e(62574),i.e(26092),i.e(39005),i.e(8851),i.e(66201),i.e(52808),i.e(33887),i.e(33790),i.e(61023)]).then(i.bind(i,39803)),r=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-area-registry-detail",dialogImport:o,dialogParams:t})}},24367:function(e,t,i){"use strict";i.d(t,{L:function(){return o},z:function(){return r}});var a=i(23832);const o=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],r=(0,a.g)(o)},85614:function(e,t,i){"use strict";i.d(t,{i:function(){return a}});i(3362),i(62953);const a=async()=>{await Promise.all([i.e(38085),i.e(22309)]).then(i.bind(i,40772))}},996:function(e,t,i){"use strict";i.d(t,{G:function(){return a}});i(45367),i(92731),i(62953);class a{get(e){return this._cache.get(e)}set(e,t){this._cache.set(e,t),this._expiration&&window.setTimeout(()=>this._cache.delete(e),this._expiration)}has(e){return this._cache.has(e)}constructor(e){this._cache=new Map,this._expiration=e}}},36918:function(e,t,i){"use strict";i.d(t,{o:function(){return a}});const a=(e,t)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`},22348:function(e,t,i){"use strict";i.d(t,{V:function(){return o}});var a=i(37177);const o=e=>!!e&&a.n},37177:function(e,t,i){"use strict";i.d(t,{n:function(){return a}});i(27495);const a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(e,t,i){"use strict";i.d(t,{C:function(){return a}});const a="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},46571:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=46571,e.exports=t},62003:function(e,t,i){var a={"./ha-icon-prev":["89133",[61982]],"./ha-icon-button-toolbar":["9882",[39763,41983]],"./ha-alert":["38962",[19695]],"./ha-icon-button-toggle":["62501",[77254]],"./ha-svg-icon.ts":["67094",[]],"./ha-alert.ts":["38962",[19695]],"./ha-icon":["47680",[44889]],"./ha-icon-next.ts":["43661",[63902]],"./ha-qr-code.ts":["60543",[51343,62740]],"./ha-icon-overflow-menu.ts":["75248",[39763,34995,78097]],"./ha-icon-button-toggle.ts":["62501",[77254]],"./ha-icon-button-group":["39826",[13647]],"./ha-svg-icon":["67094",[]],"./ha-icon-button-prev":["45100",[99197]],"./ha-icon-button.ts":["26300",[]],"./ha-icon-overflow-menu":["75248",[39763,34995,78097]],"./ha-icon-button-arrow-next":["99028",[54101]],"./ha-icon-button-prev.ts":["45100",[99197]],"./ha-icon-picker":["64138",[39763,32450,46095,7305,92769,3283,62574,26092,39005,32301]],"./ha-icon-button-toolbar.ts":["9882",[39763,41983]],"./ha-icon-button-arrow-prev.ts":["90248",[17041]],"./ha-icon-button-next":["3059",[81049]],"./ha-icon-next":["43661",[63902]],"./ha-icon-picker.ts":["64138",[39763,32450,46095,7305,92769,3283,62574,26092,39005,32301]],"./ha-icon-prev.ts":["89133",[61982]],"./ha-icon-button-arrow-prev":["90248",[17041]],"./ha-icon-button-next.ts":["3059",[81049]],"./ha-icon.ts":["47680",[44889]],"./ha-qr-code":["60543",[51343,62740]],"./ha-icon-button":["26300",[]],"./ha-icon-button-group.ts":["39826",[13647]],"./ha-icon-button-arrow-next.ts":["99028",[54101]]};function o(e){if(!i.o(a,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=a[e],o=t[0];return Promise.all(t[1].map(i.e)).then(function(){return i(o)})}o.keys=function(){return Object.keys(a)},o.id=62003,e.exports=o},86174:function(e,t,i){var a={"./flow-preview-generic.ts":["72828",[34995,21543,99194,77156,8851,24617,90283,84813]],"./flow-preview-template":["36315",[34995,21543,99194,77156,8851,24617,90283,29160]],"./flow-preview-generic_camera":["25380",[34995,21543,99194,77156,8851,24617,90283,46405]],"./flow-preview-generic_camera.ts":["25380",[34995,21543,99194,77156,8851,24617,90283,46405]],"./flow-preview-generic":["72828",[34995,21543,99194,77156,8851,24617,90283,84813]],"./flow-preview-template.ts":["36315",[34995,21543,99194,77156,8851,24617,90283,29160]]};function o(e){if(!i.o(a,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=a[e],o=t[0];return Promise.all(t[1].map(i.e)).then(function(){return i(o)})}o.keys=function(){return Object.keys(a)},o.id=86174,e.exports=o}}]);