UNPKG

iobroker.lovelace

Version:

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

28 lines 72.2 kB
export const __rspack_esm_id=74942;export const __rspack_esm_ids=[74942];export const __webpack_modules__={16629(e,t,o){o.d(t,{E7:()=>p,Mn:()=>i,P9:()=>h,lf:()=>c});o(18111),o(61701);var a=o(63004);const i=e=>{const t=e/100;return[Math.round(r(t)),Math.round(n(t)),Math.round(s(t))]},r=e=>{if(e<=66)return 255;const t=329.698727446*(e-60)**-.1332047592;return(0,a.q)(t,0,255)},n=e=>{let t;return t=e<=66?99.4708025861*Math.log(e)-161.1195681661:288.1221695283*(e-60)**-.0755148492,(0,a.q)(t,0,255)},s=e=>{if(e>=66)return 255;if(e<=19)return 0;const t=138.5177312231*Math.log(e-10)-305.0447927307;return(0,a.q)(t,0,255)},l=(e,t)=>{const o=Math.max(...e),a=Math.max(...t);let i;return i=0===a?0:o/a,t.map(e=>Math.round(e*i))},h=e=>0===e?1e6:Math.floor(1e6/e),d=e=>0===e?1e6:Math.floor(1e6/e),c=(e,t,o)=>{const[a,r,n,s,c]=e,p=d(t??2700),u=d(o??6500),m=p-u;let g;try{g=c/(s+c)}catch(e){g=.5}const v=u+g*m,b=v?h(v):0,[y,w,f]=i(b),_=Math.max(s,c)/255;return l([a,r,n,s,c],[a+y*_,r+w*_,n+f*_])},p=e=>{const[t,o,a,i]=e;return l([t,o,a,i],[t+i,o+i,a+i])}},36312(e,t,o){o.d(t,{x:()=>a});o(74423);const a=(e,t)=>e&&e.components.includes(t)},80785(e,t,o){function a(e){return!!e&&(e instanceof Date&&!isNaN(e.valueOf()))}o.d(t,{A:()=>a})},72487(e,t,o){o.a(e,async function(e,a){try{o.d(t,{CA:()=>M,Mi:()=>A,Pm:()=>k,Wq:()=>w,Yq:()=>h,bl:()=>z,c2:()=>_,fr:()=>b,gu:()=>$,kz:()=>c,m9:()=>S,sl:()=>g,ur:()=>E,zB:()=>u});o(18111),o(20116);var i=o(74487),r=o(22786),n=o(46927),s=o(8480),l=e([i,s]);[i,s]=l.then?(await l)():l;(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)}));const h=(e,t,o)=>d(t,o.time_zone).format(e),d=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),c=(e,t,o)=>p(t,o.time_zone).format(e),p=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),u=(e,t,o)=>{const a=m(t,o.time_zone);if(t.date_format===n.ow.language||t.date_format===n.ow.system)return a.format(e);const i=a.formatToParts(e),r=i.find(e=>"literal"===e.type)?.value,s=i.find(e=>"day"===e.type)?.value,l=i.find(e=>"month"===e.type)?.value,h=i.find(e=>"year"===e.type)?.value,d=i[i.length-1];let c="literal"===d?.type?d?.value:"";"bg"===t.language&&t.date_format===n.ow.YMD&&(c="");return{[n.ow.DMY]:`${s}${r}${l}${r}${h}${c}`,[n.ow.MDY]:`${l}${r}${s}${r}${h}${c}`,[n.ow.YMD]:`${h}${r}${l}${r}${s}${c}`}[t.date_format]},m=(0,r.A)((e,t)=>{const o=e.date_format===n.ow.system?void 0:e.language;return e.date_format===n.ow.language||(e.date_format,n.ow.system),new Intl.DateTimeFormat(o,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})}),g=(e,t,o)=>v(t,o.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(e.time_zone,t)})),b=(e,t,o)=>y(t,o.time_zone).format(e),y=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),w=(e,t,o)=>f(t,o.time_zone).format(e),f=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",timeZone:(0,s.wj)(e.time_zone,t)})),_=(e,t,o)=>C(t,o.time_zone).format(e),C=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",timeZone:(0,s.wj)(e.time_zone,t)})),k=(e,t,o)=>x(t,o.time_zone).format(e),x=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),M=(e,t,o)=>L(t,o.time_zone).format(e),L=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",timeZone:(0,s.wj)(e.time_zone,t)})),$=(e,t,o)=>Z(t,o.time_zone).format(e),Z=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",timeZone:(0,s.wj)(e.time_zone,t)})),A=(e,t,o)=>T(t,o.time_zone).format(e),T=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),E=(e,t,o)=>V(t,o.time_zone).format(e),V=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(e.time_zone,t)})),z=(e,t,o)=>{const a=(0,s.wj)(t.time_zone,o.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:a}).format(e)},S=(e,t,o,a)=>`${z(e,o,a)}/${z(t,o,a)}`;a()}catch(e){a(e)}})},95747(e,t,o){o.a(e,async function(e,a){try{o.d(t,{CL:()=>w,GH:()=>C,Rl:()=>u,ZS:()=>b,aQ:()=>g,r6:()=>c,yg:()=>f});var i=o(74487),r=o(22786),n=o(72487),s=o(30162),l=o(8480),h=o(69543),d=e([i,l,n,s]);[i,l,n,s]=d.then?(await d)():d;const c=(e,t,o)=>p(t,o.time_zone).format(e),p=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),u=e=>m().format(e),m=(0,r.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),g=(e,t,o)=>v(t,o.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),b=(e,t,o)=>y(t,o.time_zone).format(e),y=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),w=(e,t,o)=>(new Date).getFullYear()===e.getFullYear()?b(e,t,o):g(e,t,o),f=(e,t,o)=>_(t,o.time_zone).format(e),_=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,h.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,h.J)(e)?"h12":"h23",timeZone:(0,l.wj)(e.time_zone,t)})),C=(e,t,o)=>`${(0,n.zB)(e,t,o)}, ${(0,s.fU)(e,t,o)}`;a()}catch(e){a(e)}})},30162(e,t,o){o.a(e,async function(e,a){try{o.d(t,{LW:()=>g,Xs:()=>u,fU:()=>h,ie:()=>c});var i=o(74487),r=o(22786),n=o(8480),s=o(69543),l=e([i,n]);[i,n]=l.then?(await l)():l;const h=(e,t,o)=>d(t,o.time_zone).format(e),d=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),c=(e,t,o)=>p(t,o.time_zone).format(e),p=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),u=(e,t,o)=>m(t,o.time_zone).format(e),m=(0,r.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,n.wj)(e.time_zone,t)})),g=(e,t,o)=>v(t,o.time_zone).format(e),v=(0,r.A)((e,t)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(e.time_zone,t)}));a()}catch(e){a(e)}})},8480(e,t,o){o.a(e,async function(e,a){try{o.d(t,{fL:()=>d,n2:()=>c,wj:()=>p});var i=o(74487),r=o(29079),n=o(46927),s=e([i]);i=(s.then?(await s)():s)[0];const l=Intl.DateTimeFormat?.().resolvedOptions?.().timeZone,h=l&&("UTC"===l||"Etc/UTC"===l||l in r)?l:void 0,d=14881==o.j?void 0!==h:null,c=h??"UTC",p=(e,t)=>e===n.Wj.local&&h?c:t;a()}catch(e){a(e)}})},69543(e,t,o){o.d(t,{J:()=>r});o(74423);var a=o(22786),i=o(46927);const r=(0,a.A)(e=>{if(e.time_format===i.Hg.language||e.time_format===i.Hg.system){const t=e.time_format===i.Hg.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===i.Hg.am_pm})},57237(e,t,o){o.d(t,{d:()=>a});const a=e=>e.stopPropagation()},4423(e,t,o){o.d(t,{B:()=>l,r:()=>s});o(44114),o(18111),o(13579),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698);var a=o(44537),i=o(71727),r=o(28455);const n=e=>{if(void 0!==e)return null===e?new Set([null]):new Set((0,a.e)(e))},s=(e,t)=>{const o=t.domain?new Set((0,a.e)(t.domain)):void 0,s=t.hidden_domains?new Set((0,a.e)(t.hidden_domains)):void 0,l=t.device_class?new Set((0,a.e)(t.device_class)):void 0,h=n(t.floor),d=n(t.area),c=n(t.device),p=t.entity_category?new Set((0,a.e)(t.entity_category)):void 0,u=t.label?new Set((0,a.e)(t.label)):void 0,m=t.hidden_platform?new Set((0,a.e)(t.hidden_platform)):void 0;return t=>{const a=e.states[t];if(!a)return!1;if(o||s){const e=(0,i.m)(t);if(o&&!o.has(e))return!1;if(s&&s.has(e))return!1}if(l){const e=a.attributes.device_class||"none";if(!l.has(e))return!1}const{area:n,floor:g,device:v,entity:b}=(0,r.ln)(a,e.entities,e.devices,e.areas,e.floors);if(b&&b.hidden)return!1;if(h){const e=g?.floor_id??null;if(!h.has(e))return!1}if(d){const e=n?.area_id??null;if(!d.has(e))return!1}if(c){const e=v?.id??null;if(!c.has(e))return!1}if(u){if(!b)return!1;if(!b.labels.some(e=>u.has(e)))return!1}if(p){const e=b?.entity_category||"none";if(!p.has(e))return!1}if(m){if(!b)return!1;if(b.platform&&m.has(b.platform))return!1}return!0}},l=(e,t)=>{const o=new Set,a=[];for(const i of t)for(const t of e)i(t)&&!o.has(t)&&(o.add(t),a.push(t));return a}},52943(e,t,o){o.d(t,{Z:()=>a});const a=e=>e.charAt(0).toUpperCase()+e.slice(1)},22682(e,t,o){o.d(t,{$:()=>n});const a="^\\d{4}-(0[1-9]|1[0-2])-([12]\\d|0[1-9]|3[01])",i=new RegExp(a+"$"),r=new RegExp(a),n=(e,t=!1)=>t?r.test(e):i.test(e)},31290(e,t,o){o.d(t,{n:()=>a});const a=e=>e.replace(/^_*(.)|_+(.)/g,(e,t,o)=>t?t.toUpperCase():" "+o.toUpperCase())},58139(e,t,o){o.d(t,{d:()=>a,t:()=>i});const a=async(e,t)=>new Promise(o=>{const a=t(e,e=>{a(),o(e)})}),i=async e=>new Promise(t=>{const o=e.subscribe(e=>{o(),t(e)})})},5745(e,t,o){var a=o(62826),i=o(99731),r=o(22441);class n extends i.Y{}n=(0,a.Cg)([(0,r.EM)("ha-chip-set")],n)},99611(e,t,o){o.a(e,async function(e,t){try{o(18111),o(13579),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698);var a=o(62826),i=o(1126),r=o(35211),n=o(5124),s=o(22441),l=o(1087),h=o(60353),d=o(22792),c=o(59992),p=o(14503),u=o(22348),m=e([i]);i=(m.then?(await m)():m)[0];const g=300,v=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 y extends((0,c.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 n.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 ${g}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},g)}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,n.AH`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${g}ms;--hide-duration:${g}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 h.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||v.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,o=this._gestureRecognizer.move(t);o<0&&(e.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*o}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"]'),o=t?.offsetHeight||0;o>0&&e.delta<0&&Math.abs(e.delta)>.5*o?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"})],y.prototype,"ariaLabelledBy",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],y.prototype,"ariaDescribedBy",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],y.prototype,"open",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],y.prototype,"flexContent",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],y.prototype,"preventScrimClose",void 0),(0,a.Cg)([(0,s.wk)()],y.prototype,"_drawerOpen",void 0),(0,a.Cg)([(0,s.wk)()],y.prototype,"_sliderInteractionActive",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:d.WF,subscribe:!0})],y.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,s.P)("#drawer")],y.prototype,"_drawer",void 0),(0,a.Cg)([(0,s.P)("#body")],y.prototype,"_bodyElement",void 0),(0,a.Cg)([(0,s.P)("[autofocus]")],y.prototype,"_autofocusElement",void 0),y=(0,a.Cg)([(0,s.EM)("ha-bottom-sheet")],y),t()}catch(e){t(e)}})},9503(e,t,o){var a=o(62826),i=o(97577),r=o(5124),n=o(22441);class s extends i.A{get value(){return this._value??null}set value(e){this._value=e}static get styles(){return[i.A.styles,r.AH`:host{--wa-form-control-toggle-size:var(--ha-checkbox-size, 20px);--wa-form-control-border-color:var(
            --ha-checkbox-border-color,
            var(--ha-color-border-neutral-normal)
          );--wa-form-control-background-color:var(
            --ha-checkbox-background-color,
            var(--wa-form-control-background-color)
          );--checked-icon-color:var(
            --ha-checkbox-checked-icon-color,
            var(--wa-color-brand-on-loud)
          );--wa-form-control-activated-color:var(
            --ha-checkbox-checked-background-color,
            var(--ha-color-fill-primary-loud-resting)
          );-webkit-tap-highlight-color:transparent;--checked-icon-scale:var(--ha-checkbox-checked-icon-scale, 0.9);--wa-form-control-required-content:var(
            --ha-checkbox-required-marker,
            var(--ha-input-required-marker, "*")
          );--wa-form-control-required-content-offset:var(
            --ha-checkbox-required-marker-offset,
            0.1rem
          )}[part~=base]{align-items:center;gap:var(--ha-space-2)}[part~=control]{border-radius:var(--ha-checkbox-border-radius,var(--ha-border-radius-sm));border-width:var(--ha-checkbox-border-width,var(--ha-border-width-md));margin-inline-end:0}[part~=label]{line-height:1}#hint{font-size:var(--ha-font-size-xs);color:var(--ha-color-text-secondary)}label:has(input:not(:disabled)):hover{--wa-form-control-border-color:var(
            --ha-checkbox-border-color-hover,
            var(--ha-checkbox-border-color, var(--ha-color-border-neutral-loud))
          )}label:has(input:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-background-color-hover,var(--ha-color-form-background-hover))}label:has(input:checked:not(:disabled)):hover [part~=control],label:has(input:indeterminate:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover));border-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover))}`]}}s=(0,a.Cg)([(0,n.EM)("ha-checkbox")],s)},59174(e,t,o){o.a(e,async function(e,t){try{var a=o(62826),i=o(35211),r=o(5124),n=o(22441),s=o(91450),l=o(22792),h=o(85694),d=o(44144),c=(o(47680),e([h]));h=(c.then?(await c)():c)[0];class p extends r.WF{render(){if(this.icon)return r.qy`<ha-icon .icon="${this.icon}"></ha-icon>`;if(!this.domain)return r.s6;if(!this._connection||!this._hassConfig)return this._renderFallback();const e=(0,h._4)(this._connection.connection,this._hassConfig.config,this.domain,this.deviceClass,this.state).then(e=>e?r.qy`<ha-icon .icon="${e}"></ha-icon>`:this._renderFallback());return r.qy`${(0,s.T)(e)}`}_renderFallback(){if(this.domain&&this.domain in h.l)return r.qy` <ha-svg-icon .path="${h.l[this.domain]}"></ha-svg-icon> `;if(this.brandFallback){const e=(0,d.MR)({domain:this.domain,type:"icon",darkOptimized:this._hassUi?.themes.darkMode},this._hassConfig?.auth.data.hassUrl);return r.qy` <img alt="" src="${e}" crossorigin="anonymous" referrerpolicy="no-referrer"> `}return r.qy`<ha-svg-icon .path="${h.lW}"></ha-svg-icon>`}}p.styles=r.AH`img{width:var(--mdc-icon-size,24px)}`,(0,a.Cg)([(0,n.MZ)()],p.prototype,"domain",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"deviceClass",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"state",void 0),(0,a.Cg)([(0,n.MZ)()],p.prototype,"icon",void 0),(0,a.Cg)([(0,n.MZ)({attribute:"brand-fallback",type:Boolean})],p.prototype,"brandFallback",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.WF,subscribe:!0})],p.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.Wq,subscribe:!0})],p.prototype,"_connection",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.EK,subscribe:!0})],p.prototype,"_hassUi",void 0),p=(0,a.Cg)([(0,n.EM)("ha-domain-icon")],p),t()}catch(e){t(e)}})},70947(e,t,o){var a=o(62826),i=o(50759),r=(o(38625),o(5124)),n=o(22441);o(67094);class s extends i.A{renderCheckboxIcon(){return r.qy` <ha-svg-icon id="check" part="checkmark" .path="${this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"}"></ha-svg-icon> `}static get styles(){return[i.A.styles,r.AH`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`]}constructor(...e){super(...e),this.selected=!1}}(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],s.prototype,"selected",void 0),s=(0,a.Cg)([(0,n.EM)("ha-dropdown-item")],s)},29823(e,t,o){o.a(e,async function(e,t){try{var a=o(62826),i=o(52254),r=o(5124),n=o(22441),s=e([i]);i=(s.then?(await s)():s)[0];class l extends i.A{get anchorElement(){return this.popup?.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[i.A.styles,r.AH`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
            --card-background-color,
            var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
          )}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],l.prototype,"dropdownTag",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],l.prototype,"dropdownItemTag",void 0),l=(0,a.Cg)([(0,n.EM)("ha-dropdown")],l),t()}catch(e){t(e)}})},38508(e,t,o){o.a(e,async function(e,t){try{o(18111),o(13579);var a=o(62826),i=o(61366),r=o(35211),n=o(5124),s=o(22441),l=o(63672),h=o(91335),d=o(1087),c=o(22792),p=o(17894),u=o(22348),m=o(99611),g=o(18350),v=(o(75064),o(3449),o(49639)),b=o(88285),y=(o(67094),e([i,m,g,v,b]));[i,m,g,v,b]=y.then?(await y)():y;const w="M3 16H10V14H3M18 14V10H16V14H12V16H16V20H18V16H22V14M14 6H3V8H14M14 10H3V12H14V10Z";class f extends((0,p.c)(n.WF)){willUpdate(e){e.has("value")&&this._setUnknownValue()}setFieldValue(e){this._comboBox?this._comboBox.setFieldValue(e):this._initialFieldValue=e}render(){const e=this.useTopLabel&&this.value?void 0:this.label;return n.qy`<div class="container"> ${this.useTopLabel&&this.label?n.qy`<label ?disabled="${this.disabled}">${this.label}</label>`:n.s6} <div id="picker"> <slot name="field"> ${this.addButtonLabel&&!this.value?n.qy`<ha-button size="small" appearance="filled" @click="${this.open}" .disabled="${this.disabled}"> <ha-svg-icon .path="${w}" slot="start"></ha-svg-icon> ${this.addButtonLabel} </ha-button>`:n.qy`<ha-picker-field type="button" class="${this._opened?"opened":""}" compact="compact" .unknown="${this._unknownValue}" .unknownItemText="${this.unknownItemText}" aria-label="${(0,l.J)(this.label)}" @click="${this.open}" @clear="${this._clear}" .icon="${this.icon}" .image="${this.image}" .label="${e}" .placeholder="${this.placeholder}" .value="${this.value}" .valueRenderer="${this.valueRenderer}" .required="${this.required}" .disabled="${this.disabled}" .invalid="${this.invalid}" .hideClearIcon="${this.hideClearIcon}"> <slot name="start"></slot> </ha-picker-field>`} </slot> </div> ${this._pickerWrapperOpen||this._opened?this._openedNarrow?n.qy` <ha-bottom-sheet flexcontent .open="${this._pickerWrapperOpen}" @wa-after-show="${this._dialogOpened}" @closed="${this._hidePicker}" role="dialog" aria-modal="true" aria-label="${this.label||"Select option"}"> ${this._renderComboBox(!0)} </ha-bottom-sheet> `:n.qy` <wa-popover .open="${this._pickerWrapperOpen}" style="--body-width:${this._popoverWidth}px" without-arrow distance="-4" .placement="${this.popoverPlacement}" .for="${this.popoverAnchor?null:"picker"}" .anchor="${this.popoverAnchor??null}" auto-size="vertical" auto-size-padding="16" @wa-after-show="${this._dialogOpened}" @wa-after-hide="${this._hidePicker}" trap-focus role="dialog" aria-modal="true" aria-label="${this.label||"Select option"}"> ${this._renderComboBox()} </wa-popover> `:n.s6} </div> ${this._renderHelper()}`}_renderComboBox(e=!1){return this._opened?n.qy` <ha-picker-combo-box id="combo-box" .allowCustomValue="${this.allowCustomValue}" .label="${this.searchLabel}" .value="${this._selectedValue??this.value}" @value-changed="${this._valueChanged}" .rowRenderer="${this.rowRenderer}" .notFoundLabel="${this.notFoundLabel}" .emptyLabel="${this.emptyLabel}" .getItems="${this.getItems}" .getAdditionalItems="${this.getAdditionalItems}" .searchFn="${this.searchFn}" .mode="${e?"dialog":"popover"}" .sections="${this.sections}" .sectionTitleFunction="${this.sectionTitleFunction}" .selectedSection="${this.selectedSection}" .searchKeys="${this.searchKeys}" .customValueLabel="${this.customValueLabel}" .noSort="${this.noSort}"></ha-picker-combo-box> `:n.s6}_renderHelper(){const e=this.invalid&&this.errorMessage,t=!e&&this.helper;return e||t?n.qy`<ha-input-helper-text .disabled="${this.disabled}"> ${e?this.errorMessage:this.helper} </ha-input-helper-text>`:n.s6}refreshItems(){this._comboBox?.refreshItems()}_hidePicker(e){e.stopPropagation(),this._newValue&&((0,d.r)(this,"value-changed",{value:this._newValue}),this._newValue=void 0),this._opened=!1,this._pickerWrapperOpen=!1,this._selectedValue=void 0,this._unsubscribeTinyKeys?.(),(0,d.r)(this,"picker-closed")}_valueChanged(e){e.stopPropagation();const t=e.detail.value;t&&(this._pickerWrapperOpen=!1,this._newValue=t)}_clear(e){e.stopPropagation(),this._setValue(void 0)}_setValue(e){this.value=e,(0,d.r)(this,"value-changed",{value:e})}async open(e,t){e?.stopPropagation(),this.disabled||(this._selectedValue=t?.selectedValue,this._openedNarrow=this._narrow,this._popoverWidth=this._containerElement?.offsetWidth||250,this._pickerWrapperOpen=!0,this._unsubscribeTinyKeys=(0,h.Tc)(this,{Escape:this._handleEscClose}))}connectedCallback(){super.connectedCallback(),this._handleResize(),window.addEventListener("resize",this._handleResize)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleResize),this._unsubscribeTinyKeys?.()}static get styles(){return[n.AH`.container{position:relative;display:block;max-width:100%}label[disabled]{color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}label{display:block;margin:0 0 8px}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}:host([invalid]) ha-input-helper-text{color:var(--mdc-theme-error,var(--error-color,#b00020))}wa-popover{--wa-space-l:0}wa-popover::part(dialog)::backdrop{background:0 0}wa-popover::part(body){width:var(--ha-generic-picker-width,max(var(--body-width),250px));max-width:var(--ha-generic-picker-max-width,var(--ha-generic-picker-width,max(var(--body-width),250px)));max-height:500px;height:70vh;overflow:hidden}@media (max-height:1000px){wa-popover::part(body){max-height:400px}}ha-bottom-sheet{--ha-bottom-sheet-height:90vh;--ha-bottom-sheet-height:calc(100dvh - var(--ha-space-12));--ha-bottom-sheet-max-height:var(--ha-bottom-sheet-height);--ha-bottom-sheet-max-width:600px;--ha-bottom-sheet-padding:0;--ha-bottom-sheet-surface-background:var(--card-background-color);--ha-bottom-sheet-border-radius:var(--ha-border-radius-2xl);--ha-bottom-sheet-content-padding:0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}`]}constructor(...e){super(...e),this.popoverPlacement="bottom",this.useTopLabel=!1,this.noSort=!1,this._opened=!1,this._pickerWrapperOpen=!1,this._popoverWidth=0,this._openedNarrow=!1,this._unknownValue=!1,this._narrow=!1,this.invalid=!1,this._setUnknownValue=()=>{const e=this.getItems();!this.allowCustomValue&&void 0!==this.value&&null!==this.value&&""!==this.value&&e?this._unknownValue=!e.some(e=>"string"!=typeof e&&e.id===this.value):this._unknownValue=!1},this._dialogOpened=()=>{this._opened=!0,(0,d.r)(this,"picker-opened"),requestAnimationFrame(()=>{this._initialFieldValue&&(this._comboBox?.setFieldValue(this._initialFieldValue),this._initialFieldValue=void 0),this._hassConfig?.auth.external&&(0,u.V)(this._hassConfig.auth.external)?this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:"combo-box"}}):this._comboBox?.focus()})},this._handleResize=()=>{this._narrow=window.matchMedia("(max-width: 870px)").matches||window.matchMedia("(max-height: 500px)").matches,!this._openedNarrow&&this._pickerWrapperOpen&&(this._popoverWidth=this._containerElement?.offsetWidth||250)},this._handleEscClose=e=>{e.stopPropagation()}}}f.shadowRootOptions={...n.WF.shadowRootOptions,delegatesFocus:!0},(0,a.Cg)([(0,s.MZ)({type:Boolean,attribute:"allow-custom-value"})],f.prototype,"allowCustomValue",void 0),(0,a.Cg)([(0,s.MZ)({type:String,attribute:"search-label"})],f.prototype,"searchLabel",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"getItems",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"getAdditionalItems",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"rowRenderer",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"searchFn",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"searchKeys",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"notFoundLabel",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"empty-label"})],f.prototype,"emptyLabel",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"popover-placement"})],f.prototype,"popoverPlacement",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"add-button-label"})],f.prototype,"addButtonLabel",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"sections",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"sectionTitleFunction",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"selected-section"})],f.prototype,"selectedSection",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"popoverAnchor",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,attribute:"use-top-label"})],f.prototype,"useTopLabel",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"custom-value-label"})],f.prototype,"customValueLabel",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,attribute:"no-sort"})],f.prototype,"noSort",void 0),(0,a.Cg)([(0,s.P)(".container")],f.prototype,"_containerElement",void 0),(0,a.Cg)([(0,s.P)("ha-picker-combo-box")],f.prototype,"_comboBox",void 0),(0,a.Cg)([(0,s.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],f.prototype,"_hassConfig",void 0),(0,a.Cg)([(0,s.wk)()],f.prototype,"_opened",void 0),(0,a.Cg)([(0,s.wk)()],f.prototype,"_pickerWrapperOpen",void 0),(0,a.Cg)([(0,s.wk)()],f.prototype,"_popoverWidth",void 0),(0,a.Cg)([(0,s.wk)()],f.prototype,"_openedNarrow",void 0),(0,a.Cg)([(0,s.wk)()],f.prototype,"_unknownValue",void 0),(0,a.Cg)([(0,s.wk)()],f.prototype,"_selectedValue",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"error-message"})],f.prototype,"errorMessage",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],f.prototype,"invalid",void 0),f=(0,a.Cg)([(0,s.EM)("ha-generic-picker")],f),t()}catch(e){t(e)}})},90248(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaIconButtonArrowPrev:()=>p});var i=o(62826),r=o(5124),n=o(22441),s=o(63091),l=o(26300),h=e([l]);l=(h.then?(await h)():h)[0];const d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",c="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class p extends r.WF{render(){return r.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===s.G.document.dir?c:d}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"download",void 0),(0,i.Cg)([(0,n.wk)()],p.prototype,"_icon",void 0),p=(0,i.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],p),a()}catch(e){a(e)}})},3449(e,t,o){var a=o(62826),i=o(5124),r=o(22441);class n extends i.WF{render(){return i.qy`<slot></slot>`}constructor(...e){super(...e),this.disabled=!1}}n.styles=i.AH`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var(
        --mdc-typography-caption-letter-spacing,
        .0333333333em
      );line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`,(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),n=(0,a.Cg)([(0,r.EM)("ha-input-helper-text")],n)},2054(e,t,o){o.a(e,async function(e,t){try{var a=o(62826),i=o(5124),r=o(22441),n=o(1087),s=o(44249),l=o(26300),h=e([l]);l=(h.then?(await h)():h)[0];const d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class c extends i.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return i.s6;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return i.qy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${d}" @click="${this._toggleMenu}"></ha-icon-button> ${e?i.qy`<div class="dot"></div>`:""} `}willUpdate(e){if(super.willUpdate(e),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,o=e.has("narrow")?e.get("narrow"):this.narrow,a=!1===t?.kioskMode&&(o||"always_hidden"===t?.dockedSidebar),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===i||(this._show=i||this._alwaysVisible,i?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,e=>{this._hasNotifications=e.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...e){super(...e),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}c.styles=i.AH`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`,(0,a.Cg)([(0,r.MZ)({type:Boolean})],c.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],c.prototype,"hass",void 0),(0,a.Cg)([(0,r.wk)()],c.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,r.wk)()],c.prototype,"_show",void 0),c=(0,a.Cg)([(0,r.EM)("ha-menu-button")],c),t()}catch(e){t(e)}})},88285(e,t,o){o.a(e,async function(e,t){try{var a=o(62826),i=o(35211),r=o(5124),n=o(22441),s=o(63672),l=o(1087),h=o(22792),d=o(17894),c=(o(75064),o(47680),o(26300)),p=e([c]);c=(p.then?(await p)():p)[0];const u="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",m="M7,10L12,15L17,10H7Z";class g extends((0,d.c)(r.WF)){async focus(){await this.updateComplete,await(this.item?.focus())}render(){const e=!!this.value,t=!(!this.value||this.required||this.disabled||this.hideClearIcon),o=this.placeholder??this.label,a=this.label&&e?r.qy`<span slot="overline">${this.label}${this.required?" *":""}</span>`:r.s6,i=e?this.valueRenderer?this.valueRenderer(this.value??""):r.qy`<span slot="headline">${this.value}</span>`:o?r.qy`<span slot="headline" class="placeholder"> ${o}${this.required?" *":""} </span>`:r.s6;return r.qy` <ha-combo-box-item aria-label="${(0,s.J)(this.label||this.placeholder)}" .disabled="${this.disabled}" type="button" compact="compact"> ${this.image?r.qy`<img alt="${this.label??""}" slot="start" .src="${this.image}" crossorigin="anonymous" referrerpolicy="no-referrer">`:this.icon?r.qy`<ha-icon slot="start" .icon="${this.icon}"></ha-icon>`:r.qy`<slot name="start"></slot>`} ${a}${i} ${this.unknown?r.qy`<div slot="supporting-text" class="unknown"> ${this.unknownItemText||this._i18n?.localize("ui.components.combo-box.unknown_item")} </div>`:r.s6} ${t?r.qy` <ha-icon-button class="clear" slot="end" @click="${this._clear}" .path="${u}"></ha-icon-button> `:r.s6} <ha-svg-icon class="arrow" slot="end" .path="${m}"></ha-svg-icon> </ha-combo-box-item> `}_clear(e){e.stopPropagation(),(0,l.r)(this,"clear")}static get styles(){return[r.AH`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`]}constructor(...e){super(...e),this.invalid=!1}}(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],g.prototype,"invalid",void 0),(0,a.Cg)([(0,n.P)("ha-combo-box-item",!0)],g.prototype,"item",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:h.D5,subscribe:!0})],g.prototype,"_i18n",void 0),g=(0,a.Cg)([(0,n.EM)("ha-picker-field")],g),t()}catch(e){t(e)}})},58350(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaNavigationSelector:()=>d});var i=o(62826),r=o(5124),n=o(22441),s=o(1087),l=o(30879),h=e([l]);l=(h.then?(await h)():h)[0];class d extends r.WF{render(){return r.qy` <ha-navigation-picker .hass="${this.hass}" .label="${this.label}" .value="${this.value}" .required="${this.required}" .disabled="${this.disabled}" .helper="${this.helper}" .context="${this.selector.navigation??this.context}" @value-changed="${this._valueChanged}"></ha-navigation-picker> `}_valueChanged(e){(0,s.r)(this,"value-changed",{value:e.detail.value})}constructor(...e){super(...e),this.disabled=!1,this.required=!0}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"selector",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],d.prototype,"helper",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],d.prototype,"required",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"context",void 0),d=(0,i.Cg)([(0,n.EM)("ha-selector-navigation")],d),a()}catch(e){a(e)}})},91485(e,t,o){o.a(e,async function(e,a){try{o.d(t,{U:()=>_});var i=o(62826),r=(o(86137),o(30006)),n=o(92070),s=o(35211),l=o(5124),h=o(22441),d=o(6412),c=o(63672),p=o(57237),u=o(22792),m=o(26300),g=(o(67094),o(34127)),v=o(53305),b=e([r,m,g]);[r,m,g]=b.then?(await b)():b;const y="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",w="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",f="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";class _ extends((0,v.w)(l.WF)){get _formControl(){return this._input}showPicker(){this._input?.showPicker()}stepUp(){this._input?.stepUp()}stepDown(){this._input?.stepDown()}async firstUpdated(e){super.firstUpdated(e),this.insetLabel||(await(this._input?.updateComplete),this._syncStartSlotWidth())}render(){const e=!this.label&&this._hasSlotController.test("label"),t=!this.hint&&this._hasSlotController.test("hint"),o=this._hasSlotController.test("start");return l.qy` <wa-input .type="${this.type}" .value="${this.value??null}" .withClear="${this.withClear}" .placeholder="${this.placeholder}" .readonly="${this.readonly}" .passwordToggle="${this.passwordToggle}" .passwordVisible="${this.passwordVisible}" .withoutSpinButtons="${this.withoutSpinButtons}" .required="${this.required}" .pattern="${this.pattern}" .minlength="${this.minlength}" .maxlength="${this.maxlength}" .min="${this.min}" .max="${this.max}" .step="${this.step}" .autocapitalize="${this.autocapitalize||void 0}" .autocorrect="${this.autocorrect?"on":"off"}" .autocomplete="${this.autocomplete}" .autofocus="${this.autofocus}" .enterkeyhint="${this.enterkeyhint||void 0}" .spellcheck="${this.spellcheck}" .inputmode="${this.inputmode||void 0}" .name="${this.name}" .disabled="${this.disabled}" class="${(0,d.H)({input:!0,invalid:this.invalid||this._invalid,"label-raised":void 0!==this.value&&""!==this.value||this.label&&this.placeholder||o&&this.insetLabel,"no-label":!this.label,"hint-hidden":!(this.hint||t||this.required||this._invalid||this.invalid)})}" @input="${this._handleInput}" @change="${this._handleChange}" @blur="${this._handleBlur}" @wa-invalid="${this._handleInvalid}" exportparts="base:wa-base, hint:wa-hint, input:wa-input"> ${this.label||e?l.qy`<slot name="label" slot="label">${this.label?this._renderLabel(this.label,this.required):l.s6}</slot>`:l.s6} <slot name="start" slot="start" @slotchange="${this._syncStartSlotWidth}"> ${this.renderStartDefault()} </slot> <slot name="end" slot="end"> ${this.renderEndDefault()} </slot> <slot name="clear-button" slot="clear-button"> <ha-icon-button @click="${this._handleClearClick}" .label="${this.i18n?.localize?.("ui.components.input.clear")||"Clear"}" .path="${y}"></ha-icon-button> </slot> <slot name="password-toggle-button" slot="password-toggle-button"> <ha-icon-button @keydown="${p.d}" @click="${this._handlePasswordToggle}" .label="${this.i18n?.localize?.("ui.components.input."+(this.passwordVisible?"hide_password":"show_password"))||(this.passwordVisible?"Hide password":"Show password")}" .path="${this.passwordVisible?f:w}"></ha-icon-button> </slot> <div slot="hint" class="${(0,d.H)({error:this.invalid||this._invalid})}" role="${(0,c.J)(this.invalid||this._invalid?"alert":void 0)}" aria-live="polite"> ${this._invalid||this.invalid?this.validationMessage||this._input?.validationMessage:this.hint||(t?l.qy`<slot name="hint"></slot>`:l.s6)} </div> </wa-input> `}renderStartDefault(){return l.s6}renderEndDefault(){return l.s6}_handleClearClick(){this._input?.clear()}_handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}constructor(...e){super(...e),this.appearance="material",this.type="text",this.withClear=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.withoutSpinButtons=!1,this.autocorrect=!1,this.insetLabel=!1,this._hasSlotController=new n.X(this,"label","hint","input","start"),this._syncStartSlotWidth=()=>{const e=this._input?.shadowRoot?.querySelector('[part~="start"]'),t=e?.offsetWidth??0;t>0&&!this.insetLabel?(this.style.setProperty("--start-slot-width",`calc(${t}px + var(--ha-space-1))`),this.style.setProperty("--input-padding-inline-start","var(--ha-space-1)")):(this.style.removeProperty("--start-slot-width"),this.style.removeProperty("--input-padding-inline-start"))}}}_.styles=[v.N,l.AH`:host{display:flex;align-items:flex-start;padding-top:var(--ha-input-padding-top);padding-bottom:var(--ha-input-padding-bottom,var(--ha-space-2));text-align:var(--ha-input-text-align,start)}:host([appearance=outlined]){padding-bottom:var(--ha-input-padding-bottom)}wa-input::part(label){padding-inline-start:calc(var(--start-slot-width,0px) + var(--ha-space-4));padding-inline-end:var(--ha-space-4);padding-top:var(--ha-space-5)}:host([appearance=material]:focus-within) wa-input::part(label){color:var(--primary-color)}:host(:focus-within) wa-input::part(label),:host([type=date]) wa-input::part(label),wa-input.label-raised::part(label){padding-top:var(--ha-space-3);font-size:var(--ha-font-size-xs)}wa-input::part(base){height:56px;padding:0 var(--ha-space-4)}:host([appearance=outlined]) wa-input.no-label::part(base){height:32px;padding:0 var(--ha-space-2)}:host([appearance=outlined]) wa-input::part(base){border:1px solid var(--ha-color-border-neutral-quiet);background-color:var(--card-background-color);border-radius:var(--ha-border-radius-md);transition:border-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]) ::part(base)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:var(--ha-color-border-neutral-loud);transition:height var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]:focus-within) wa-input::part(base)::after{height:2px;background-color:var(--primary-color)}:host([appearance=material]) wa-input.invalid:not([disabled])::part(base)::after,:host([appearance=material]:focus-within) wa-input.invalid::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-input::part(input){padding-top:var(--ha-space-3);padding-inline-start:var(--input-padding-inline-start,0)}wa-input.no-label::part(input){padding-top:0}:host([type=color]) wa-input::part(input){padding-top:var(--ha-space-6);padding-bottom:2px;cursor:pointer}:host([type=color]) wa-input.no-label::part(input){padding:var(--ha-space-2)}:host([type=color]) wa-input.no-label::part(base){padding:0}wa-input::part(input)::placeholder{color:var(--ha-color-neutral-60)}wa-input::part(base):hover{background-color:var(--ha-color-form-background-hover)}:host([appearance=outlined]) wa-input::part(base):hover{border-color:var(--ha-color-border-neutral-normal)}:host([appearance=outlined]:focus-within) wa-input::part(base){border-color:var(--primary-color)}wa-input:disabled::part(base){background-color:var(--ha-color-form-background-disabled)}wa-input:disabled::part(label){opacity:.5}wa-input::part(end){color:var(--ha-color-text-secondary)}ha-icon-button{display:flex;align-items:center;color:var(--ha-color-text-secondary)}:host([appearance=outlined]) wa-input.no-label{--ha-icon-button-size:24px;--mdc-icon-size:18px}`],(0,i.Cg)([(0,h.MZ)({reflect:!0})],_.prototype,"appearance",void 0),(0,i.Cg)([(0,h.MZ)({reflect:!0})],_.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"with-clear"})],_.prototype,"withClear",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"password-toggle"})],_.prototype,"passwordToggle",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"password-visible"})],_.prototype,"passwordVisible",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"without-spin-buttons"})],_.prototype,"withoutSpinButtons",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"pattern",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"min",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"max",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"step",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],_.prototype,"autocorrect",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"inset-label"})],_.prototype,"insetLabel",void 0),(0,i.Cg)([(0,h.P)("wa-input")],_.prototype,"_input",void 0),(0,i.Cg)([(0,h.wk)(),(0,s.Fg)({context:u.D5,subscribe:!0})],_.prototype,"i18n",void 0),_=(0,i.Cg)([(0,h.EM)("ha-input")],_),a()}catch(e){a(e)}})},53305(e,t,o){o.d(t,{w:()=>l,N:()=>h});var a=o(62826),i=o(5124),r=o(22441),n=o(22786);o(74423);const s=Boolean(globalThis.ElementInternals)&&globalThis.HTMLElement?.prototype.attachInternals?.toString().includes("[native code]"),l=e=>{class t extends e{get _formControl(){throw new Error("_formControl getter must be implemented by subclass")}select(){this._formControl?.select()}setSelectionRange(e,t,o){this._formControl?.setSelectionRange(e,t,o)}setRangeText(e,t,o,a){this._formControl?.setRangeText(e,t,o,a)}checkValidity(){return!s||(this._formControl?.checkValidity()??!0)}reportValidity(){const e=this.checkValidity();return this._invalid=!e,e}_handleInput(){this.value=this._formControl?.value??void 0,this._invalid&&this._formControl?.checkValidity()&&(this._invalid=!1)}_handleChange(){this.value=this._formControl?.value??void 0}_handleBlur(){this.autoValidate&&(this._invalid=!this._formControl?.checkValidity())}_handleInvalid(){this._invalid=!0}constructor(...e){super(...e),this.label="",this.hint="",this.placeholder="",this.readonly=!1,this.required=!1,this.autocapitalize="",this.autofocus=!1,this.spellcheck=!0,this.inputmode="",this.enterkeyhint="",this.disabled=!1,this.validationMessage="",this.autoValidate=!1,this.invalid=!1,this._invalid=!1,this._requiredMarkerCSSVar="--ha-input-required-marker",this._renderLabel=(0,n.A)((e,t)=>{if(!t)return e;let o=getComputedStyle(this).getPropertyValue(this._requiredMarkerCSSVar);return o||(o="*"),o.startsWith('"')&&o.endsWith('"')&&(o=o.slice(1,-1)),o?`${e}${o}`:e})}}return t.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,a.Cg)([(0,r.MZ)()],t.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"hint",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"placeholder",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],t.prototype,"readonly",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],t.prototype,"required",void 0),(0,a.Cg)([(0,r.MZ)({type:Number})],t.prototype,"minlength",void 0),(0,a.Cg)([(0,r.MZ)({type:Number})],t.prototype,"maxlength",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"autocapitalize",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"autocomplete",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],t.prototype,"autofocus",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],t.prototype,"spellcheck",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"inputmode",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"enterkeyhint",void 0),(0,a.Cg)([(0,r.MZ)()],t.prototype,"name",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"validation-message"})],t.prototype,"validationMessage",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"auto-validate"})],t.prototype,"autoValidate",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],t.prototype,"invalid",void 0),(0,a.Cg)([(0,r.wk)()],t.prototype,"_invalid",void 0),t},h=i.AH`.input{flex:1;min-width:0;--wa-transition-fast:var(--wa-transition-normal);position:relative}.input::part(label){position:absolute;top:0;font-weight:var(--ha-font-weight-normal);font-family:var(--ha-font-family-body);transition:all var(--wa-transition-normal) ease-in-out;color:var(--secondary-text-color);line-height:var(--ha-line-height-condensed);z-index:1;pointer-events:none;font-size:var(--ha-font-size-m)}.input.invalid:not([disabled])::part(label),:host(:focus-within) .input.invalid::part(label){color:var(--ha-color-fill-danger-loud-resting)}.input::part(base){background-color:var(--ha-color-form-background);border-top-left-radius:var(--ha-border-radius-sm);border-top-right-radius:var(--ha-border-radius-sm);border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square);border:none;position:relative;transition:background-color var(--wa-transition-normal) ease-in-out}:host(:focus-within) .input::part(base){outline:0}.input::part(hint){min-height:var(--ha-space-5);margin-block-start:0;margin-inline-start:var(--ha-space-3);font-size:var(--ha-font-size-s);display:flex;align-items:center;color:var(--ha-color-text-secondary)}.input.hint-hidden::part(hint){height:0;min-height:0}.error{color:var(--ha-color-on-danger-quiet)}`},38279(e,t,o){o.d(t,{$2:()=>a,VV:()=>r,on:()=>l,sx:()=>n});var a=function(e){return e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",e}({});const i=["auto","heat_cool","heat","cool","dry","fan_only","off"].reduce((e,t,o)=>(e[t]=o,e),{}),r=(e,t)=>i[e]-i[t],n={cooling:"cool",defrosting:"heat",drying:"dry",fan:"fan_only",heating:"heat",idle:"off",off:"off",preheating:"heat"},s={cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",dry:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",fan_only:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",auto:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22C12.4 22 12.7 22 13.1 21.9L15.4 15.3L14.8 14.7C15.5 14 16 13 16 11.9C16 11.2 15.8 10.5 15.4 9.9L17.6 7.7C18.5 9 19 10.4 19 12H20C20.3 12 20.6 12.1 20.8 12.2C20.8 12.2 20.9 12.2 20.9 12.3C21.3 12.5 21.7 12.9 21.9 13.4C22 12.9 22 12.5 22 12C22 6.5 17.5 2 12 2M14 8.6C13.4 8.2 12.7 8 12 8C9.8 8 8 9.8 8 12C8 13.1 8.4 14.1 9.2 14.8L7.1 16.9C5.8 15.7 5 13.9 5 12C5 8.1 8.1 5 12 5C13.6 5 15 5.5 16.2 6.4L14 8.6M20 14H18L14.8 23H16.7L17.4 21H20.6L21.3 23H23.2L20 14M17.8 19.7L19 16L20.2 19.7H17.8Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",heat_cool:"M12.92 1.58L11.18 2.58L12.39 4.67L11.8 6.85L9 7.6L7.38 6L7.42 3.59L5.43 3.59L5.43 5.42L3.59 5.42L3.6 7.42L6 7.42L7.65 9.03L6.9 11.82L4.68 12.4L2.59 11.2L1.59 12.93L3.17 13.84L2.26 15.42L4 16.42L5.19 14.33L7.42 13.75L7.92 14.26L9.32 12.86L8.78 12.32L9.53 9.54L12.32 8.78L12.85 9.32L14.26 7.91L13.73 7.37L14.32 5.19L16.41 4L15.41 2.25L13.83 3.16L12.92 1.58M20.72 4L4 20.72L5.27 22L10.16 17.11C10.63 17.43 11.15 17.68 11.71 17.83C14.38 18.55 17.12 16.96 17.83 14.29C18.22 12.86 17.93 11.36 17.11 10.16L22 5.27L20.72 4M18.74 9C19.18 9.63 19.53 10.38 19.75 11.19C19.97 12 20.03 12.81 19.96 13.61L22.65 10.41L18.74 9M19.32 15.95C19 16.67 18.5 17.35 17.93 17.94C17.34 18.53 16.66 19 15.96 19.34L20.05 20.06L19.32 15.95M9 18.71L10.41 22.66L13.59 19.95C12.81 20 12 19.97 11.19 19.76C10.36 19.54 9.62 19.17 9 18.71Z"},l=e=>s[e]||"M16.95,16.95L14.83,14.83C15.55,14.1 16,13.1 16,12C16,11.26 15.79,10.57 15.43,10L17.6,7.81C18.5,9 19,10.43 19,12C19,13.93 18.22,15.68 16.95,16.95M12,5C13.57,5 15,5.5 16.19,6.4L14,8.56C13.43,8.21 12.74,8 12,8A4,4 0 0,0 8,12C8,13.1 8.45,14.1 9.17,14.83L7.05,16.95C5.78,15.68 5,13.93 5,12A7,7 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},38395(e,t,o){o.d(t,{gh:()=>l,kU:()=>h,q:()=>s});var a=o(35518),i=o(62384),r=o(61557);function n(e){return document.cookie=`ingress_session=${e};path=/api/hassio_ingress/;SameSite=Strict${"https:"===location.protocol?";Secure":""}`,e}const s=async e=>{if((0,i.v)(e.config.version,2021,2,4)){return n((await e.callWS({type:"supervisor/api",endpoint:"/ingress/session",method:"post"})).session)}return n((await e.callApi("POST","hassio/ingress/session")).data.session)},l=e=>(0,a.X)(e,"_ingressPanelInfo",async e=>(await(0,r.uw)(e,{endpoint:"/ingress/panels"})).panels),h=async(e,t)=>{(0,i.v)(e.config.version,2021,2,4)?await e.callWS({type:"supervisor/api",endpoint:"/ingress/validate_session",method:"post",data:{session:t}}):await e.callApi("POST","hassio/ingress/validate_session",{session:t})}},99129(e,t,o){o.d(t,{EG:()=>r,ML:()=>n});var a=o(35518),i=o(35952);const r=(e,t,o)=>e.subscribeEvents(e=>{e.data.url_path===t&&o()},"lovelace_updated"),n=(e,t=null)=>(0,a.X)(e,`_lovelace_${t??""}`,e=>(0,i.Dz)(e,t,!1),(o,a)=>r(e,t,()=>(0,i.Dz)(e,t,!1).then(e=>a.setState(e,!0))))},28918(e,t,o){o.d(t,{H:()=>i,o:()=>a});function a(e){return"boolean"==typeof e?e?{}:void 0:e}function i(e){return"strategy"in e}},91984(e,t,o){o.d(t,{R6:()=>i,TQ:()=>r,cg:()=>n});var a=o(31290);function i(e){return"strategy"in e}const r=(e,t)=>e.title??(e.path?(0,a.n)(e.path):String(t)),n=e=>e.icon??"mdi:view-compact"},44249(e,t,o){o.d(t,{V:()=>a});const a=(e,t)=>{const o=new i,a=e.subscribeMessage(e=>t(o.processMessage(e)),{type:"persistent_notification/subscribe"});return()=>{a.then(e=>e?.())}};class i{processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications={...this.notifications,...e.notifications};return Object.values(this.notifications)}constructor(){this.notifications={}}}},17894(e,t,o){o.d(t,{c:()=>r});var a=o(62826),i=o(22441);const r=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,a.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,a.Cg)([(0,i.MZ)()],t.prototype,"icon",void 0),(0,a.Cg)([(0,i.MZ)()],t.prototype,"image",void 0),(0,a.Cg)([(0,i.MZ)()],t.prototype,"label",void 0),(0,a.Cg)([(0,i.MZ)()],t.prototype,"placeholder",void 0),(0,a.Cg)([(0,i.MZ)()],t.prototype,"helper",void 0),(0,a.Cg)([(0,i.MZ)()],t.prototype,"value",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,a.Cg)([(0,i.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,a.Cg)([(0,i.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},68370(e,t,o){o.r(t),o.d(t,{lovelaceResourcesTabs:()=>l,lovelaceTabs:()=>s});var a=o(62826),i=o(22441),r=o(324);const n="M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z",s=[{path:"/config/lovelace/dashboards",translationKey:"ui.panel.config.lovelace.dashboards.caption",iconPath:n}],l=[{path:"/config/lovelace/resources",translationKey:"ui.panel.config.lovelace.resources.caption",iconPath:n}];class h extends r.a{updatePageEl(e){e.hass=this.hass,e.narrow=this.narrow,e.isWide=this.isWide,e.route=this.routeTail}constructor(...e){super(...e),this.narrow=!1,this.isWide=!1,this.routerOptions={defaultPage:"dashboards",routes:{dashboards:{tag:"ha-config-lovelace-dashboards",load:()=>Promise.all([o.e(4801),o.e(39763),o.e(32450),o.e(46095),o.e(7305),o.e(34995),o.e(83113),o.e(66716),o.e(19112),o.e(30002),o.e(89747),o.e(52487),o.e(94426)]).then(o.bind(o,49406)),cache:!0},resources:{tag:"ha-config-lovelace-resources",load:()=>Promise.all([o.e(4801),o.e(39763),o.e(32450),o.e(46095),o.e(7305),o.e(34995),o.e(83113),o.e(57908),o.e(19112),o.e(30002),o.e(92045)]).then(o.bind(o,89192))}}}}}(0,a.Cg)([(0,i.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean})],h.prototype,"narrow",void 0),(0,a.Cg)([(0,i.MZ)({attribute:"is-wide",type:Boolean})],h.prototype,"isWide",void 0),h=(0,a.Cg)([(0,i.EM)("ha-config-lovelace")],h)},15656(e,t,o){o.d(t,{Nu:()=>h,TG:()=>g,Xd:()=>p,d4:()=>m,uN:()=>c,xC:()=>u});o(18111),o(61701);if(59509==o.j)var a=o(28918);if(59509==o.j)var i=o(35952);if(59509==o.j)var r=o(91984);if(66649!=o.j)var n=o(53338);const s="custom:",l={dashboard:{"original-states":()=>o.e(60134).then(o.bind(o,43845)),map:()=>o.e(74994).then(o.bind(o,56009)),iframe:()=>o.e(1732).then(o.bind(o,38287)),areas:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(20992)]).then(o.bind(o,80821)),home:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(97416)]).then(o.bind(o,67293)),energy:()=>Promise.all([o.e(67218),o.e(92610),o.e(26857),o.e(77183),o.e(19343)]).then(o.bind(o,94429))},view:{"original-states":()=>Promise.all([o.e(67218),o.e(92610),o.e(45688),o.e(77183),o.e(94530)]).then(o.bind(o,16330)),"energy-overview":()=>Promise.all([o.e(67218),o.e(92610),o.e(26857),o.e(77183),o.e(51016)]).then(o.bind(o,3260)),energy:()=>Promise.all([o.e(67218),o.e(92610),o.e(26857),o.e(77183),o.e(20984)]).then(o.bind(o,86242)),water:()=>Promise.all([o.e(67218),o.e(92610),o.e(26857),o.e(77183),o.e(8969)]).then(o.bind(o,88615)),gas:()=>Promise.all([o.e(67218),o.e(92610),o.e(26857),o.e(77183),o.e(17423)]).then(o.bind(o,21733)),power:()=>Promise.all([o.e(67218),o.e(92610),o.e(26857),o.e(77183),o.e(17879)]).then(o.bind(o,60093)),map:()=>o.e(6875).then(o.bind(o,14966)),iframe:()=>o.e(73441).then(o.bind(o,51480)),area:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(35818)]).then(o.bind(o,44979)),"areas-overview":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(94101)]).then(o.bind(o,69140)),"home-overview":()=>Promise.all([o.e(67218),o.e(92610),o.e(99788),o.e(28991),o.e(77183),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(6078)]).then(o.bind(o,8892)),"home-media-players":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(44685)]).then(o.bind(o,24876)),"home-area":()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(3650),o.e(54547)]).then(o.bind(o,47302)),"home-other-devices":()=>o.e(27800).then(o.bind(o,78859)),light:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(2437)]).then(o.bind(o,71776)),security:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(85143)]).then(o.bind(o,31758)),climate:()=>Promise.all([o.e(99788),o.e(59704),o.e(25322),o.e(12009),o.e(20282),o.e(19051)]).then(o.bind(o,73026)),maintenance:()=>o.e(82691).then(o.bind(o,78030))},section:{"common-controls":()=>o.e(8717).then(o.bind(o,44124))}},h=async(e,t)=>{if(t in l[e]){await l[e][t]();const o=`${t}-${e}-strategy`;return customElements.get(o)}if(!t.startsWith(s))throw new Error("Unknown strategy");const o=`ll-strategy-${t.slice(7)}`,a=`ll-strategy-${e}-${t.slice(7)}`;if(!0===await Promise.race([customElements.whenDefined(o),customElements.whenDefined(a),new Promise(e=>{setTimeout(()=>e(!0),5e3)})]))throw new Error(`Timeout waiting for strategy element ${a} to be registered`);return customElements.get(a)??customElements.get(o)},d=async(e,t,o,a)=>{const i=o.type;if(!i)return t("No strategy type found");try{const t=await h(e,i);if((0,n.Xo)(t)){if("dashboard"===e&&"generateDashboard"in t)return await t.generateDashboard({config:{strategy:o,views:[]},hass:a});if("view"===e&&"generateView"in t)return await t.generateView({config:{views:[]},view:{strategy:o},hass:a})}const r=(0,n._V)(o);return await t.generate(r,a)}catch(e){return"timeout"!==e.message&&console.error(e),t(e)}},c=async(e,t)=>{const{strategy:o,...a}=e;return{...a,...await d("dashboard",e=>({views:[{title:"Error",cards:[{type:"markdown",content:`Error loading the dashboard strategy:\n> ${e}`}]}]}),o,t)}},p=async(e,t)=>{const{strategy:o,...a}=e;return{...a,...await d("view",e=>({cards:[{type:"markdown",content:`Error loading the view strategy:\n> ${e}`}]}),o,t)}},u=async(e,t)=>{const{strategy:o,...a}=e;return{...a,...await d("section",e=>({cards:[{type:"markdown",content:`Error loading the section strategy:\n> ${e}`}]}),o,t)}},m=async(e,t)=>{const o=(0,i.Wu)(e)?await c(e,t):{...e};return o.views=await Promise.all(o.views.map(async e=>{const o=(0,r.R6)(e)?await p(e,t):{...e};return o.sections&&(o.sections=await Promise.all(o.sections.map(async e=>(0,a.H)(e)?await u(e,t):{...e}))),o})),o};async function g(e,t){const o=await h("dashboard",t),a=await async function(e,t){const o=t.getCreateSuggestions;if("function"==typeof o)return o.call(t,e)}(e,o);return{strategyClass:o,fieldSuggestions:a}}},53338(e,t,o){o.d(t,{B2:()=>i,Xo:()=>a,_V:()=>r});const a=e=>!("generate"in e),i=e=>2===Object.keys(e).length&&"options"in e&&"object"==typeof e.options,r=e=>{if(!i(e))return e;const t={...e,...e.options};return delete t.options,t}},53580(e,t,o){o.d(t,{mdiHomeAssistant:()=>a});const a="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},88438(e,t,o){o.d(t,{C:()=>a});const a="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}};