1/*! For license information please see 94861.57eb6da3448eeda6.js.LICENSE.txt */ 2export const __rspack_esm_id=94861;export const __rspack_esm_ids=[94861];export const __webpack_modules__={80570(e,t,a){a(64979);let i=!1;try{i="true"===window.localStorage.getItem("disableViewTransition")}catch{}const o=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e};a.d(t,{},{D:e=>{i=e},J:e=>{if(!document.startViewTransition||i)return e(!1),Promise.resolve();let t=!1;try{const a=document.startViewTransition(()=>{t=!0,e(!0)});return a.ready.catch(o),a.finished.catch(o)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),t?Promise.reject(a):(e(!1),Promise.resolve())}}})},50878(e,t,a){a.a(e,async function(e,i){try{var o=a(28861),s=a(63018),r=a(11467),n=a(82476),l=a(85152),d=a(78813),h=a(17414),c=(a(60721),a(96007)),p=a(25395),u=e([h,c,p]);[h,c,p]=u.then?(await u)():u;const g="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",v="(max-width: 870px), (max-height: 500px)";class m extends r.WF{connectedCallback(){super.connectedCallback(),this._unsubMediaQuery=(0,l.m)(v,e=>{this._modeSet&&!this.allowModeChange||(this.mode=e?"bottom-sheet":"dialog",this._modeSet=!0)})}get _defaultAriaLabelledBy(){return this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)}_renderCloseButton(e){return this.hideCloseButton?r.qy`<span slot=${e}></span>`:r.qy` <slot name="headerNavigationIcon" slot=${e}> <ha-icon-button data-dialog="close" .label=${this._i18n?.localize?.("ui.common.close")??"Close"} .path=${g}></ha-icon-button> </slot> `}_renderHeaderContent(){return r.qy` <ha-dialog-header .subtitlePosition=${this.headerSubtitlePosition}> ${this._renderCloseButton("navigationIcon")} ${void 0!==this.headerTitle?r.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:r.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?r.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:r.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> `}disconnectedCallback(){super.disconnectedCallback(),this._unsubMediaQuery?.(),this._unsubMediaQuery=void 0,this._modeSet=!1}render(){return"bottom-sheet"===this.mode?r.qy` <ha-bottom-sheet .ariaLabelledBy=${this._defaultAriaLabelledBy} .ariaDescribedBy=${this.ariaDescribedBy} .flexContent=${this.flexContent} .open=${this.open} .preventScrimClose=${this.preventScrimClose}> ${this.withoutHeader?r.s6:r.qy` <slot name="header" slot="header">${this._renderHeaderContent()}</slot> `} <slot></slot> <slot name="footer" slot="footer"></slot> </ha-bottom-sheet> `:r.qy` <ha-dialog .open=${this.open} .type=${this.type} .width=${this.width} .preventScrimClose=${this.preventScrimClose} .ariaLabelledBy=${this.ariaLabelledBy} .ariaDescribedBy=${this.ariaDescribedBy} .headerTitle=${this.headerTitle} .headerSubtitle=${this.headerSubtitle} .headerSubtitlePosition=${this.headerSubtitlePosition} .flexContent=${this.flexContent} .withoutHeader=${this.withoutHeader}> ${this._renderCloseButton("headerNavigationIcon")} <slot name="headerTitle" slot="headerTitle"></slot> <slot name="headerSubtitle" slot="headerSubtitle"></slot> <slot name="headerActionItems" slot="headerActionItems"></slot> <slot></slot> <slot name="footer" slot="footer"></slot> </ha-dialog> `}static get styles(){return[r.AH`ha-bottom-sheet{--ha-bottom-sheet-border-radius:var(--ha-border-radius-2xl);--ha-bottom-sheet-surface-background:var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default)));--ha-bottom-sheet-padding:0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);--ha-bottom-sheet-content-padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6))}`]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.allowModeChange=!1,this.withoutHeader=!1,this.hideCloseButton=!1,this.flexContent=!1,this.mode="dialog",this._modeSet=!1}}(0,o.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],m.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],m.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],m.prototype,"open",void 0),(0,o.Cg)([(0,n.MZ)({reflect:!0})],m.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],m.prototype,"width",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],m.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-title"})],m.prototype,"headerTitle",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],m.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],m.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"allow-mode-change"})],m.prototype,"allowModeChange",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],m.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"hide-close-button"})],m.prototype,"hideCloseButton",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],m.prototype,"flexContent",void 0),(0,o.Cg)([(0,n.wk)()],m.prototype,"mode",void 0),(0,o.Cg)([(0,n.wk)(),(0,s.Fg)({context:d.D5,subscribe:!0})],m.prototype,"_i18n",void 0),m=(0,o.Cg)([(0,n.EM)("ha-adaptive-dialog")],m),a.d(t,{r:()=>m}),i()}catch(e){i(e)}})},17414(e,t,a){a.a(e,async function(e,t){try{a(18111),a(13579),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var i=a(28861),o=a(91409),s=a(63018),r=a(11467),n=a(82476),l=a(62228),d=a(62944),h=a(78813),c=a(96309),p=a(7578),u=a(20455),g=e([o]);o=(g.then?(await g)():g)[0];const v=300,m=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"]),b=new Set(["volume-slider-container","forecast"]);class f extends((0,c.V)(r.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 r.qy` <wa-drawer id="drawer" placement="bottom" .open=${this._drawerOpen} .lightDismiss=${!this.preventScrimClose} .ariaLabelledby=${this.ariaLabelledBy} .ariaDescribedby=${this.ariaDescribedBy} @keydown=${this._handleKeyDown} @wa-show=${this._handleShow} @wa-after-show=${this._handleAfterShow} @wa-hide=${this._handleHide} @wa-after-hide=${this._handleAfterHide} @click=${this._handleCloseAction} without-header @touchstart=${this._handleTouchStart}> <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> ${this.renderScrollableFades()} </div> <slot name="footer"></slot> </wa-drawer> `}_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 ${v}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},v)}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,r.AH`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height,auto);--show-duration:${v}ms;--hide-duration:${v}ms}
2wa-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)));transform:var(--dialog-transform);transition:var(--dialog-transition);align-items:center}@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:all 1ms}}wa-drawer::part(dialog)::backdrop{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);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))));width:100%;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));position:relative}:host([flexcontent]) wa-drawer::part(body){flex-direction:column;display:flex}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{top:0;pointer-events:none;z-index:1;justify-content:center;align-items:center;width:100%;padding-bottom:2px;display:flex;position:absolute;inset-inline-start:0}.handle-wrapper .handle{justify-content:center;align-items:center;width:200px;height:16px;display:flex}.handle-wrapper .handle:after{content:"";border-radius:var(--ha-border-radius-md);
2background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px;height:4px}.content-wrapper{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{max-width:100%;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;flex-direction:column;flex:1;display:flex}slot[name=footer]{padding:0;display:block}::slotted([slot=footer]){padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);box-sizing:border-box;justify-content:flex-end;align-items:center;width:100%;display:flex}: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(()=>{const e=this._autofocusElement;this._hassConfig?.auth.external&&(0,u.V)(this._hassConfig.auth.external)?e&&(e.id||(e.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})):e?.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 e of t){if(e===this._drawer)break;if(e instanceof HTMLElement&&(e.scrollTop>0||m.has(e.localName)||Array.from(e.classList).some(e=>b.has(e))))return}e.stopPropagation(),this._startResizing(e.touches[0].clientY)},this._handleTouchMove=e=>{const t=e.touches[0].clientY,a=this._gestureRecognizer.move(t);a<0&&(e.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*a}px)`)}))},this._handleTouchEnd=()=>{this._unregisterResizeHandlers(),this._isDragging=!1;const e=this._gestureRecognizer.end();if(e.isSwipe)return void(e.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const t=this._drawer.shadowRoot?.querySelector('[part="body"]'),a=t?.offsetHeight||0;a>0&&e.delta<0&&Math.abs(e.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,i.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],f.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],f.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"open",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],f.prototype,"flexContent",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],f.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_drawerOpen",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_sliderInteractionActive",void 0),(0,i.Cg)([(0,n.wk)(),(0,s.Fg)({context:h.WF,subscribe:!0})],f.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.P)("#drawer")],f.prototype,"_drawer",void 0),(0,i.Cg)([(0,n.P)("#body")],f.prototype,"_bodyElement",void 0),(0,i.Cg)([(0,n.P)("[autofocus]")],f.prototype,"_autofocusElement",void 0),f=(0,i.Cg)([(0,n.EM)("ha-bottom-sheet")],f),t()}catch(e){t(e)}})},60721(e,t,a){var i=a(28861),o=a(11467),s=a(82476);class r extends o.WF{render(){const e=o.qy`<div class="header-title"> <slot name="title"></slot> </div>`,t=o.qy`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`;return o.qy` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${"above"===this.subtitlePosition?o.qy`${t}${e}
2`:o.qy`${e}${t}`} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `}static get styles(){return[o.AH`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,#0000001f)}.header-bar{padding:0 var(--ha-space-1);box-sizing:border-box;flex-direction:row;align-items:center;display:flex}.header-content{padding:10px var(--ha-space-1);min-height:var(--ha-space-12);text-overflow:ellipsis;white-space:nowrap;flex-direction:column;flex:1;justify-content:center;min-width:0;display:flex;overflow:hidden}.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 (width>=450px) and (height>=500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon,.header-action-items{min-width:var(--ha-space-2);flex-direction:row;flex:none;height:100%;display:flex}`]}constructor(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,i.Cg)([(0,s.MZ)({type:String,attribute:"subtitle-position"})],r.prototype,"subtitlePosition",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],r.prototype,"showBorder",void 0),r=(0,i.Cg)([(0,s.EM)("ha-dialog-header")],r)},25395(e,t,a){a.a(e,async function(e,t){try{var i=a(28861),o=a(82471),s=a(63018),r=a(11467),n=a(82476),l=a(16635),d=a(62228),h=a(80570),c=a(78813),p=a(96309),u=a(7578),g=a(20455),v=(a(60721),a(96007)),m=e([o,v]);[o,v]=m.then?(await m)():m;const b="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 f extends((0,p.V)(r.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(){return r.qy` <wa-dialog .open=${this._open} .lightDismiss=${!this.preventScrimClose} without-header aria-labelledby=${(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0))} aria-describedby=${(0,l.J)(this.ariaDescribedBy)} @keydown=${this._handleKeyDown} @wa-hide=${this._handleHide} @wa-show=${this._handleShow} @wa-after-show=${this._handleAfterShow} @wa-after-hide=${this._handleAfterHide}> ${this.withoutHeader?r.s6:r.qy`<slot name="header"> <ha-dialog-header .subtitlePosition=${this.headerSubtitlePosition} .showBorder=${this._bodyScrolled}> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label=${this._i18n?.localize?.("ui.common.close")??"Close"} .path=${b}></ha-icon-button> </slot> ${void 0!==this.headerTitle?r.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:r.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?r.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:r.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll=${this._handleBodyScroll}> <slot></slot> </div> ${this.renderScrollableFades()} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,h.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.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){if(e.eventPhase!==Event.AT_TARGET)return;const t=e.detail?.source===e.target.dialog;this.preventScrimClose&&t&&this.open&&e.preventDefault()}static get styles(){return[...super.styles,u.dp,r.AH`wa-dialog{--full-width:var(--ha-dialog-width-full,min(95vw, var(--safe-width)));
2--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,.2s);--hide-duration:var(--ha-dialog-hide-duration,.2s);--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:0s;--hide-duration:0s}}: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([width=full]) wa-dialog,:host([fullscreen]) 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{padding:0;overflow:hidden}wa-dialog::part(dialog){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)));flex-direction:column;display:flex;overflow:hidden}wa-dialog::part(dialog)::backdrop{backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media (width<=450px),(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);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);margin-top:0;margin-bottom:0;transform:none}}.header-title-container{align-items:center;display:flex}.header-title{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));text-overflow:ellipsis;white-space:nowrap;margin:0;margin-right:var(--ha-space-3);overflow:hidden}wa-dialog::part(body){flex-direction:column;max-width:100%;padding:0;display:flex;overflow:hidden}.content-wrapper{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.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));flex-grow:1;overflow:auto}:host([flexcontent]) .body{flex-direction:column;flex:1;max-width:100%;display:flex}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){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%;display:flex}`]}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._handleShow=async e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{if(this._hassConfig?.auth.external&&(0,g.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}})))}this.querySelector("[autofocus]")?.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,i.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],f.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],f.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],f.prototype,"open",void 0),(0,i.Cg)([(0,n.MZ)({reflect:!0})],f.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],f.prototype,"width",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],f.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"header-title"})],f.prototype,"headerTitle",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],f.prototype,"headerSubtitle",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],f.prototype,"headerSubtitlePosition",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],f.prototype,"flexContent",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],f.prototype,"withoutHeader",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_open",void 0),(0,i.Cg)([(0,n.P)(".body")],f.prototype,"bodyContainer",void 0),(0,i.Cg)([(0,n.wk)(),(0,s.Fg)({context:c.D5,subscribe:!0})],f.prototype,"_i18n",void 0),(0,i.Cg)([(0,n.wk)(),(0,s.Fg)({context:c.WF,subscribe:!0})],f.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_bodyScrolled",void 0),(0,i.Cg)([(0,n.Ls)({passive:!0})],f.prototype,"_handleBodyScroll",null),f=(0,i.Cg)([(0,n.EM)("ha-dialog")],f),t()}catch(e){t(e)}})},81961(e,t,a){var i=a(28861),o=a(11467),s=a(82476),r=a(62228),n=a(59155);class l extends n.x{connectedCallback(){super.connectedCallback(),this.hasAttribute("ha-list-item")||this.setAttribute("ha-list-item",""),this.hasAttribute("role")||this.setAttribute("role",this.defaultRole),(0,r.r)(this,"ha-list-item-register",{item:this})}disconnectedCallback(){super.disconnectedCallback(),(0,r.r)(this,"ha-list-item-unregister",{item:this})}activate(){this.click()}constructor(...e){super(...e),this.interactive=!1,this.defaultRole="listitem"}}l.styles=[n.x.styles,o.AH`:host{--ha-list-item-focus-radius:var(--ha-border-radius-sm);--ha-list-item-focus-width:2px;--ha-list-item-focus-width-start:var(--ha-space-2);--ha-list-item-focus-offset:-2px;--ha-list-item-focus-background:var(--ha-color-fill-neutral-quiet-hover)}:host(:focus){outline:none}.base{border-radius:var(--ha-list-item-focus-radius);outline:var(--ha-list-item-focus-width) solid transparent;outline-offset:var(--ha-list-item-focus-offset);transition:outline-color var(--ha-animation-duration-fast) ease-out, background-color var(--ha-animation-duration-fast) ease-out}@keyframes ha-list-item-focus-in{0%{outline-width:var(--ha-list-item-focus-width-start);outline-offset:calc(-1 * var(--ha-list-item-focus-width-start))}to{outline-width:var(--ha-list-item-focus-width);outline-offset:var(--ha-list-item-focus-offset)}}:host(:focus-visible) .base{outline-color:var(--ha-color-focus);background-color:var(--ha-list-item-focus-background);animation:ha-list-item-focus-in var(--ha-animation-duration-normal) ease-in}`],(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],l.prototype,"interactive",void 0),l=(0,i.Cg)([(0,s.EM)("ha-list-item-base")],l),a.d(t,{o:()=>l})},94648(e,t,a){var i=a(28861),o=a(11467),s=a(82476),r=a(16635),n=(a(38753),a(81961));class l extends n.o{activate(){this._item?.click()}_renderBase(e){return void 0!==this.href?o.qy`<a part="base" class="base interactive" id="item" href=${(0,r.J)(this.disabled?void 0:this.href)} target=${(0,r.J)(this.target)} rel=${(0,r.J)(this.rel)} download=${(0,r.J)(this.download)} tabindex="-1" aria-disabled=${this.disabled?"true":"false"}> ${this._renderRipple()}${e} </a>`:o.qy`<button part="base" class="base interactive" id="item" type="button" ?disabled=${this.disabled} tabindex="-1"> ${this._renderRipple()}${e} </button>`}_renderRipple(){return o.qy`<ha-ripple part="ripple" for="item" ?disabled=${this.disabled}></ha-ripple>`}constructor(...e){super(...e),this.interactive=!0}}l.styles=[n.o.styles,o.AH`:host{cursor:pointer;--ha-ripple-color:var(--primary-text-color)}:host([disabled]){cursor:default}.base.interactive{width:100%;color:inherit;font:inherit;text-align:inherit;appearance:none;cursor:inherit;background:0 0;border:none;text-decoration:none}:host([disabled]) .base.interactive{color:var(--disabled-text-color)}`],(0,i.Cg)([(0,s.MZ)({type:String})],l.prototype,"href",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],l.prototype,"target",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],l.prototype,"rel",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],l.prototype,"download",void 0),(0,i.Cg)([(0,s.P)("#item")],l.prototype,"_item",void 0),l=(0,i.Cg)([(0,s.EM)("ha-list-item-button")],l),a.d(t,{f:()=>l})},59155(e,t,a){a(18111),a(13579);var i=a(28861),o=a(77195),s=a(11467),r=a(82476);
2class n extends s.WF{_onSlotChange(e){return t=>{const a=t.target.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&""!==e.textContent?.trim());"start"===e?this._hasStart=a:this._hasEnd=a}}render(){return this._renderBase(this._renderInner())}_renderBase(e){return s.qy`<div part="base" class="base" id="item">${e}</div>`}_renderInner(){const e=this._slotController.test("content");return s.qy` <div part="start" class="start" ?hidden=${!this._hasStart}> <slot name="start" @slotchange=${this._onSlotChange("start")}></slot> </div> <div part="content" class="content"> ${e?s.qy`<slot name="content"></slot>`:this._renderDefaultContent()} </div> <div part="end" class="end" ?hidden=${!this._hasEnd}> <slot name="end" @slotchange=${this._onSlotChange("end")}></slot> </div> `}_renderDefaultContent(){const e=this._slotController.test("headline"),t=this._slotController.test("supporting-text"),a=e||void 0!==this.headline,i=t||void 0!==this.supportingText;return s.qy` ${a?s.qy`<div part="headline" class="headline"> <slot name="headline">${this.headline??s.s6}</slot> </div>`:s.s6} ${i?s.qy`<div part="supporting-text" class="supporting"> <slot name="supporting-text">${this.supportingText??s.s6}</slot> </div>`:s.s6} `}constructor(...e){super(...e),this.disabled=!1,this._slotController=new o.X(this,"headline","supporting-text","content"),this._hasStart=!1,this._hasEnd=!1}}n.styles=s.AH`:host{color:var(--primary-text-color);font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);display:block}:host([disabled]){color:var(--disabled-text-color);pointer-events:none}.base{align-items:center;gap:var(--ha-row-item-gap,var(--ha-space-4));padding-block:var(--ha-row-item-padding-block,var(--ha-space-3));padding-inline:var(--ha-row-item-padding-inline,var(--ha-space-4));min-height:var(--ha-row-item-min-height,48px);box-sizing:border-box;flex-direction:row;display:flex;position:relative}.content{flex-direction:column;flex:auto;justify-content:center;min-width:0;display:flex}.start,.end{flex:none;align-items:center;display:flex}.start[hidden],.end[hidden]{display:none}.headline{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.supporting{color:var(--secondary-text-color);font-size:var(--ha-font-size-s);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}`,(0,i.Cg)([(0,r.MZ)({type:String})],n.prototype,"headline",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"supporting-text"})],n.prototype,"supportingText",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),(0,i.Cg)([(0,r.wk)()],n.prototype,"_hasStart",void 0),(0,i.Cg)([(0,r.wk)()],n.prototype,"_hasEnd",void 0),n=(0,i.Cg)([(0,r.EM)("ha-row-item")],n),a.d(t,{x:()=>n})},97536(e,t,a){a.d(t,{N:()=>c});a(74423),a(18111),a(22489),a(7588);var i=a(28861),o=a(11467),s=a(82476),r=a(47902);a(44114);const n=e=>{const t=[];let a=e;for(;a;){t.push(a);const e=a.parentNode;if(e instanceof ShadowRoot)a=e.host;else if(e)a=e;else{const e=a.getRootNode();a=e instanceof ShadowRoot?e.host:null}}return t.reverse()},l=(e,t)=>{if(e===t)return 0;const a=n(e),i=n(t);let o=0;for(;o<a.length&&o<i.length&&a[o]===i[o];)o++;return 0===o?0:o===a.length?-1:o===i.length?1:a[o].compareDocumentPosition(i[o])&Node.DOCUMENT_POSITION_FOLLOWING?-1:1};var d=a(62228),h=a(7578);class c extends o.WF{connectedCallback(){super.connectedCallback(),this.hasAttribute("ha-list")||this.setAttribute("ha-list",""),!this.hasAttribute("role")&&this.hostRole&&this.setAttribute("role",this.hostRole),this._unbindKeys=(0,r.Tc)(this,{ArrowDown:this._onForward,ArrowUp:this._onBack,Home:this._onHome,End:this._onEnd,PageDown:this._onPageDown,PageUp:this._onPageUp,Enter:this.onActivate,Space:this.onActivate},{ignore:this._ignoreKeyEvent}),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("ha-list-item-register",this.onItemRegister),this.addEventListener("ha-list-item-unregister",this.onItemUnregister)}disconnectedCallback(){super.disconnectedCallback(),this._unbindKeys?.(),this._unbindKeys=void 0,this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("ha-list-item-register",this.onItemRegister),this.removeEventListener("ha-list-item-unregister",this.onItemUnregister)}focus(e){this.itemCount?this.focusItemAtIndex(this.activeItemIndex>=0?this.activeItemIndex:0):super.focus(e)}focusItemAtIndex(e){e<0||this.setActiveItemIndex(e,!0)}getActiveItemIndex(){return this.activeItemIndex}setActiveItemIndex(e,t=!1){this.hasFocusableItem?(this.activeItemIndex=Math.max(0,Math.min(this.itemCount-1,e)),this.isFocusable(this.activeItemIndex)||(this.activeItemIndex=this.firstFocusableIndex),this.applyActive(t)):this.activeItemIndex=-1}updateListItems(){this.recomputeFocusableIndexes(),(this.activeItemIndex>=this.itemCount||!this.hasFocusableItem||this.activeItemIndex<0)&&(this.activeItemIndex=this.firstFocusableIndex),this.applyActive(!1)}recomputeFocusableIndexes(){let e=-1,t=-1;for(let a=0;a<this.itemCount;a++)this.isFocusable(a)&&(-1===e&&(e=a),t=a);this.firstFocusableIndex=e,this.lastFocusableIndex=t,this.hasFocusableItem=-1!==e}render(){return o.qy`<div part="base" class="base ha-scrollbar"> <slot></slot> </div>`}isFocusable(e){const t=this.items[e];return!!t&&t.interactive&&!t.disabled}
2applyActive(e){this.items.forEach((e,t)=>{e.interactive&&!e.disabled?e.tabIndex=t===this.activeItemIndex?0:-1:e.removeAttribute("tabindex")}),e&&this.activeItemIndex>=0&&this.items[this.activeItemIndex]?.focus()}getPageSize(){return 10}moveFocus(e,t){this.hasFocusableItem&&(e.preventDefault(),t<0||t===this.activeItemIndex||(this.activeItemIndex=t,this.applyActive(!0)))}get itemCount(){return this.items.length}_stepIndex(e,t,a=1){const i=this.itemCount;if(!i||!this.hasFocusableItem)return e;let o=e,s=e,r=0;for(let e=0;e<i&&r<a;e++){if(s+=t,s<0||s>=i){if(!this.wrapFocus)return o;s=(s+i)%i}this.isFocusable(s)&&(o=s,r++)}return o}constructor(...e){super(...e),this.wrapFocus=!1,this.ariaLabel=null,this.items=[],this.hostRole="list",this.activeItemIndex=-1,this.firstFocusableIndex=-1,this.lastFocusableIndex=-1,this.hasFocusableItem=!1,this.onItemRegister=e=>{e.stopPropagation();const t=e.detail.item;if(this.items.includes(t))return;const a=[...this.items,t];a.sort(l),this.items=a,this.updateListItems()},this.onItemUnregister=e=>{e.stopPropagation();const t=e.detail.item;this.items.includes(t)&&(this.items=this.items.filter(e=>e!==t),this.updateListItems())},this.onFocusIn=e=>{const t=e.composedPath();for(let e=0;e<this.items.length;e++)if(t.includes(this.items[e]))return void(e!==this.activeItemIndex&&(this.activeItemIndex=e,this.applyActive(!1)))},this._ignoreKeyEvent=e=>{if(e.repeat&&("Enter"===e.key||" "===e.key))return!0;if(e.isComposing)return!0;const t=e.target;return!!t&&t!==e.currentTarget&&t.matches("[contenteditable],input,select,textarea")},this._onForward=e=>{this.moveFocus(e,this._stepIndex(this.activeItemIndex,1))},this._onBack=e=>{this.moveFocus(e,this._stepIndex(this.activeItemIndex,-1))},this._onHome=e=>{this.moveFocus(e,this.firstFocusableIndex)},this._onEnd=e=>{this.moveFocus(e,this.lastFocusableIndex)},this._onPageDown=e=>{this.moveFocus(e,this._stepIndex(this.activeItemIndex,1,this.getPageSize()))},this._onPageUp=e=>{this.moveFocus(e,this._stepIndex(this.activeItemIndex,-1,this.getPageSize()))},this.onActivate=e=>{if(!this.isFocusable(this.activeItemIndex))return;e.preventDefault();const t=this.items[this.activeItemIndex];t.activate(),(0,d.r)(this,"ha-list-activated",{index:this.activeItemIndex,item:t})}}}c.styles=[h.dp,o.AH`:host{display:block}.base{gap:var(--ha-list-gap,0);padding:var(--ha-list-padding,0);flex-direction:column;margin:0;list-style:none;display:flex;overflow-x:hidden}`],(0,i.Cg)([(0,s.MZ)({type:Boolean,attribute:"wrap-focus"})],c.prototype,"wrapFocus",void 0),(0,i.Cg)([(0,s.MZ)({type:String,attribute:"aria-label",reflect:!0})],c.prototype,"ariaLabel",void 0),c=(0,i.Cg)([(0,s.EM)("ha-list-base")],c)},22137(e,t,a){a(18111),a(61701);var i=a(28861),o=a(11467),s=a(82476),r=a(62228),n=(a(7407),a(47551),a(94648),a(97536),a(7346));class l extends o.WF{render(){return this.sections.length?o.qy`${this.sections.map((e,t)=>this._renderSection(e,t))}`:o.s6}_renderSection(e,t){return e.actions.length||e.empty||e.emptyKey?o.qy` <h3 class="section-header"> ${this._localizeValue(e.title,e.titleKey)} </h3> ${e.actions.length?o.qy`<ha-list-base> ${e.actions.map((e,a)=>this._renderActionItem(e,t,a))} </ha-list-base>`:o.qy`<h4 class="empty"> ${this._localizeValue(e.empty,e.emptyKey)} </h4>`} `:o.s6}_renderActionItem(e,t,a){return o.qy` <ha-list-item-button .disabled=${!1===e.enabled} data-section-index=${t} data-action-index=${a} .headline=${this._localizeValue(e.name,e.nameKey)} .supportingText=${this._localizeValue(e.description,e.descriptionKey)} @click=${this._actionSelected}> ${e.icon?o.qy`<ha-icon class="start-icon" slot="start" .icon=${e.icon}></ha-icon>`:e.iconPath?o.qy`<ha-svg-icon class="start-icon" slot="start" .path=${e.iconPath}></ha-svg-icon>`:o.s6} <ha-svg-icon class="plus" slot="end" .path=${"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}></ha-svg-icon> </ha-list-item-button> `}_localizeValue(e,t){return e||(t?this._localize(t):void 0)}_actionSelected(e){const t=this.sections[Number(e.currentTarget.dataset.sectionIndex)]?.actions[Number(e.currentTarget.dataset.actionIndex)];t&&!1!==t.enabled&&(0,r.r)(this,"add-to-list-action-selected",{action:t})}constructor(...e){super(...e),this.sections=[]}}l.styles=o.AH`:host{display:block}.section-header{padding:var(--ha-space-2) var(--ha-space-6) var(--ha-space-1);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-medium);color:var(--secondary-text-color);margin:0}.empty{padding:var(--ha-space-2) var(--ha-space-6) var(--ha-space-1);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);color:var(--secondary-text-color);margin:0}
2ha-list-item-button{--ha-row-item-padding-inline:var(--ha-space-5)}ha-icon,ha-svg-icon{align-items:center;display:flex}.start-icon{color:var(--ha-color-text-secondary)}.plus{color:var(--primary-color)}ha-list-item-button[disabled] .start-icon,ha-list-item-button[disabled] .plus{color:var(--disabled-text-color)}`,(0,i.Cg)([(0,s.wk)(),(0,n.IW)()],l.prototype,"_localize",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],l.prototype,"sections",void 0),l=(0,i.Cg)([(0,s.EM)("ha-add-to-action-list")],l)},96309(e,t,a){var i=a(28861),o=a(73885),s=a(11467),r=a(5633),n=a(82476);a.d(t,{},{V:e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){super.firstUpdated?.(e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){super.updated?.(e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return s.qy` <div class=${(0,r.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled})}></div> <div class=${(0,r.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable})}></div> `}static get styles(){const e=Object.getPrototypeOf(this);var t;return[...void 0===(t=e?.styles??[])?[]:Array.isArray(t)?t:[t],s.AH`.fade-top,.fade-bottom{height:var(--ha-space-2);pointer-events:none;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom, var(--ha-color-shadow-scrollable-fade), transparent);transition:opacity .18s ease-in-out;position:absolute;left:0;right:0}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-top.visible,.fade-bottom.visible{opacity:1}.fade-top.rounded,.fade-bottom.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(){this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),this._resize.unobserve?.(this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:i=0,scrollTop:o=0}=e;this._contentScrollable=a-i>o+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{const t=e.currentTarget;this._contentScrolled=(t.scrollTop??0)>this.scrollFadeThreshold,this._updateScrollableState(t)},this._resize=new o.P(this,{target:null,callback:e=>{const t=e[0]?.target;t&&this._updateScrollableState(t)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,i.Cg)([(0,n.wk)()],t.prototype,"_contentScrolled",void 0),(0,i.Cg)([(0,n.wk)()],t.prototype,"_contentScrollable",void 0),t}})},53404(e,t,a){a.a(e,async function(e,i){try{a.r(t);a(44114);var o=a(28861),s=a(11467),r=a(63018),n=a(82476),l=a(70381),d=a(62228),h=a(50878),c=a(78813),p=a(32373),u=(a(22137),a(90437)),g=a(7578),v=e([h]);h=(v.then?(await v)():v)[0];const m="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z",b="M12,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,2M10,16.5L16,12L10,7.5V16.5Z",f="M14 10H3V12H14V10M14 6H3V8H14V6M3 16H10V14H3V16M21.5 11.5L23 13L16 20L11.5 15.5L13 14L16 17L21.5 11.5Z",y="M17.5 15.5C17.5 16.61 16.61 17.5 15.5 17.5S13.5 16.61 13.5 15.5 14.4 13.5 15.5 13.5 17.5 14.4 17.5 15.5M8.5 13.5C7.4 13.5 6.5 14.4 6.5 15.5S7.4 17.5 8.5 17.5 10.5 16.61 10.5 15.5 9.61 13.5 8.5 13.5M23 15V18C23 18.55 22.55 19 22 19H21V20C21 21.11 20.11 22 19 22H5C3.9 22 3 21.11 3 20V19H2C1.45 19 1 18.55 1 18V15C1 14.45 1.45 14 2 14H3C3 10.13 6.13 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2S14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C17.87 7 21 10.13 21 14H22C22.55 14 23 14.45 23 15M21 16H19V14C19 11.24 16.76 9 14 9H10C7.24 9 5 11.24 5 14V16H3V17H5V20H19V17H21V16Z",
2w="M15,20A1,1 0 0,0 16,19V4H8A1,1 0 0,0 7,5V16H5V5A3,3 0 0,1 8,2H19A3,3 0 0,1 22,5V6H20V5A1,1 0 0,0 19,4A1,1 0 0,0 18,5V9L18,19A3,3 0 0,1 15,22H5A3,3 0 0,1 2,19V18H13A2,2 0 0,0 15,20M9,6H14V8H9V6M9,10H14V12H9V10M9,14H14V16H9V14Z";class _ extends s.WF{showDialog(e){this._params=e,this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._params=void 0,(0,d.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params?s.qy` <ha-adaptive-dialog .open=${this._open} header-title=${this._i18n.localize("ui.dialogs.more_info_control.add_to.title",{target:(0,l.A)(this._areas[this._params.areaId])||this._params.areaId})} @closed=${this._dialogClosed}> ${this._renderOptions()} </ha-adaptive-dialog> `:s.s6}_renderOptions(){if(!this._params)return s.s6;const e=[{title:this._i18n.localize("ui.panel.config.devices.automation.automations_heading"),actions:[{type:"automation",key:"automation_trigger",iconPath:y,name:this._i18n.localize("ui.dialogs.more_info_control.add_to.action_options.automation_trigger")},{type:"automation",key:"automation_condition",iconPath:f,name:this._i18n.localize("ui.dialogs.more_info_control.add_to.action_options.automation_condition")},{type:"automation",key:"automation_action",iconPath:b,name:this._i18n.localize("ui.dialogs.more_info_control.add_to.action_options.automation_action")}]},{title:this._i18n.localize("ui.panel.config.devices.script.scripts_heading"),actions:[{type:"automation",key:"script_action",iconPath:w,name:this._i18n.localize("ui.dialogs.more_info_control.add_to.action_options.script_action")}]}];return this._params.canCreateScene&&this._params.entityIds.length&&e.push({title:this._i18n.localize("ui.panel.config.devices.scene.scenes_heading"),actions:[{type:"scene",iconPath:m,name:this._i18n.localize("ui.dialogs.more_info_control.add_to.action_options.scene")}]}),s.qy` <ha-add-to-action-list .sections=${e} @add-to-list-action-selected=${this._handleActionSelected}></ha-add-to-action-list> `}_handleActionSelected(e){if(!this._params)return;const{action:t}=e.detail;"scene"!==t.type?(this.closeDialog(),(0,u.B8)(t.key,{area_id:this._params.areaId})):this._handleCreateScene()}_handleCreateScene(){this._params&&(this.closeDialog(),(0,p.Tx)({entities:(0,u.S6)(this._params.entityIds)},this._params.areaId))}static get styles(){return[g.RF,g.nA,s.AH`ha-adaptive-dialog{--dialog-content-padding:0}`]}constructor(...e){super(...e),this._open=!1}}(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.D5,subscribe:!0})],_.prototype,"_i18n",void 0),(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.wn,subscribe:!0})],_.prototype,"_areas",void 0),(0,o.Cg)([(0,n.wk)()],_.prototype,"_params",void 0),(0,o.Cg)([(0,n.wk)()],_.prototype,"_open",void 0),_=(0,o.Cg)([(0,n.EM)("dialog-area-add-to")],_),i()}catch(e){i(e)}})},20455(e,t,a){var i=a(37184);a.d(t,{},{V:e=>!!e&&i.n})},37184(e,t,a){const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);a.d(t,{},{n:i})},82471(e,t,a){a.a(e,async function(e,t){try{var i=a(11467),o=a(82476),s=a(5633),r=a(16635),n=a(35142),l=a(72075),d=a(2919),h=a(17946),c=a(6764),p=a(86614),u=a(23948),g=a(63127),v=a(77195),m=a(71704),b=a(7922),f=a(88571),y=a(32559),w=a(6027),_=e([y,f]);[y,f]=_.then?(await _)():_;var x=Object.defineProperty,C=Object.getOwnPropertyDescriptor,S=(e,t,a,i)=>{for(var o,s=i>1?void 0:i?C(t,a):t,r=e.length-1;r>=0;r--)(o=e[r])&&(s=(i?o(t,a,s):o(s))||s);return i&&s&&x(t,a,s),s};let k=class extends b.A{firstUpdated(){this.open&&(this.addOpenListeners(),this.dialog.showModal(),(0,g.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,g.I7)(this),this.removeOpenListeners()}async requestClose(e){const t=new d.L({source:e});if(this.dispatchEvent(t),t.defaultPrevented)return this.open=!0,void(0,c.Ud)(this.dialog,"pulse");this.removeOpenListeners(),await(0,c.Ud)(this.dialog,"hide"),this.open=!1,this.dialog.close(),(0,g.I7)(this);const a=this.originalTrigger;"function"==typeof a?.focus&&setTimeout(()=>a.focus()),this.dispatchEvent(new n.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,p.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,p.Fw)(this)}handleDialogCancel(e){e.preventDefault(),!this.dialog.classList.contains("hide")&&e.target===this.dialog&&(0,p.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(e){const t=e.target.closest('[data-dialog="close"]');t&&(e.stopPropagation(),this.requestClose(t))}async handleDialogPointerDown(e){e.target===this.dialog&&(this.lightDismiss?this.requestClose(this.dialog):await(0,c.Ud)(this.dialog,"pulse"))}handleOpenChange(){this.open&&!this.dialog.open?this.show():!this.open&&this.dialog.open&&(this.open=!0,this.requestClose(this.dialog))}async show(){const e=new h.k;this.dispatchEvent(e),e.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,g.JG)(this),requestAnimationFrame(()=>{const e=this.querySelector("[autofocus]");e&&"function"==typeof e.focus?e.focus():this.dialog.focus()}),await(0,c.Ud)(this.dialog,"show"),this.dispatchEvent(new l.q))}render(){const e=!this.withoutHeader,t=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return i.qy` <dialog aria-labelledby=${this.ariaLabelledby??"title"} aria-describedby=${(0,r.J)(this.ariaDescribedby)} part="dialog" class=${(0,s.H)({dialog:!0,open:this.open})} @cancel=${this.handleDialogCancel} @click=${this.handleDialogClick} @pointerdown=${this.handleDialogPointerDown}> ${e?i.qy` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(8203)} </slot> </h2> <div part="header-actions" class="header-actions"> <slot name="header-actions"></slot> <wa-button part="close-button" exportparts="base:close-button__base" class="close" appearance="plain" @click="${e=>this.requestClose(e.target)}"> <wa-icon name="xmark" label=${this.localize.term("close")} library="system" variant="solid"></wa-icon> </wa-button>
2 </div> </header> `:""} <div part="body" class="body"><slot></slot></div> ${t?i.qy` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `:""} </dialog> `}constructor(){super(...arguments),this.localize=new f.c(this),this.hasSlotController=new v.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.withoutHeader=!1,this.lightDismiss=!1,this.withFooter=!1,this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.open&&(0,p.a0)(this)&&(e.preventDefault(),e.stopPropagation(),this.requestClose(this.dialog))}}};k.css=w.A,S([(0,o.P)(".dialog")],k.prototype,"dialog",2),S([(0,o.MZ)({type:Boolean,reflect:!0})],k.prototype,"open",2),S([(0,o.MZ)({reflect:!0})],k.prototype,"label",2),S([(0,o.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],k.prototype,"withoutHeader",2),S([(0,o.MZ)({attribute:"light-dismiss",type:Boolean})],k.prototype,"lightDismiss",2),S([(0,o.MZ)({attribute:"aria-labelledby"})],k.prototype,"ariaLabelledby",2),S([(0,o.MZ)({attribute:"aria-describedby"})],k.prototype,"ariaDescribedby",2),S([(0,o.MZ)({attribute:"with-footer",type:Boolean})],k.prototype,"withFooter",2),S([(0,m.w)("open",{waitUntilFirstUpdate:!0})],k.prototype,"handleOpenChange",1),k=S([(0,o.EM)("wa-dialog")],k),i.S$||(document.addEventListener("click",e=>{const t=e.target.closest("[data-dialog]");if(t instanceof Element){const[e,a]=(0,u.v)(t.getAttribute("data-dialog")||"");if("open"===e&&a?.length){const e=t.getRootNode().getElementById(a);"wa-dialog"===e?.localName?e.open=!0:console.warn(`A dialog with an ID of "${a}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),t()}catch(e){t(e)}})},6027(e,t,a){var i=a(11467).AH`:host{--width:31rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:.2s;--hide-duration:.2s;display:none}:host([open]){display:block}.dialog{width:var(--width);max-width:calc(100% - var(--wa-space-2xl));max-height:calc(100% - var(--wa-space-2xl));color:inherit;background-color:var(--wa-color-surface-raised);border-radius:var(--wa-panel-border-radius);box-shadow:var(--wa-shadow-l);border:none;flex-direction:column;margin:auto;padding:0;display:flex;inset:0}.dialog.show{animation:show-dialog var(--show-duration) ease}.dialog.show::backdrop{animation:show-backdrop var(--show-duration,.2s) ease}.dialog.hide{animation:show-dialog var(--hide-duration) ease reverse}.dialog.hide::backdrop{animation:show-backdrop var(--hide-duration,.2s) ease reverse}.dialog.pulse{animation:.25s pulse}.dialog:focus{outline:none}@media screen and (width<=420px){.dialog{max-height:80vh}}.open{opacity:1;display:flex}.header{flex-wrap:nowrap;flex:none;padding-block-start:calc(var(--spacing) - var(--wa-form-control-padding-block));padding-block-end:0;padding-inline-start:var(--spacing);padding-inline-end:calc(var(--spacing) - var(--wa-form-control-padding-block));display:flex}.title{font-family:inherit;font-size:var(--wa-font-size-l);font-weight:var(--wa-font-weight-heading);line-height:var(--wa-line-height-condensed);flex:auto;align-self:center;margin:0}.header-actions{justify-content:end;align-self:start;gap:var(--wa-space-2xs);flex-wrap:wrap;flex-shrink:0;padding-inline-start:var(--spacing);display:flex}.header-actions wa-button,.header-actions ::slotted(wa-button){flex:none;align-items:center;display:flex}.body{padding:var(--spacing);-webkit-overflow-scrolling:touch;flex:auto;display:block;overflow:auto}.body:focus{outline:none}.body:focus-visible{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.footer{gap:var(--wa-space-xs);padding:var(--spacing);flex-wrap:wrap;flex:none;justify-content:end;padding-block-start:0;display:flex}.footer ::slotted(wa-button:not(:first-of-type)){margin-inline-start:var(--wa-spacing-xs)}.dialog::backdrop{background-color:var(--wa-color-overlay-modal,#00000040);backdrop-filter:var(--backdrop-filter)}@keyframes pulse{0%{scale:1}50%{scale:1.02}to{scale:1}}@keyframes show-dialog{0%{opacity:0;scale:.8}to{opacity:1;scale:1}}@keyframes show-backdrop{0%{opacity:0}to{opacity:1}}@media (forced-colors:active){.dialog{border:1px solid #fff}}`;a.d(t,{A:()=>i})}}; 3//# sourceMappingURL=94861.57eb6da3448eeda6.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.