UNPKG

iobroker.lovelace

Version:

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

90 lines 52.9 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[16499],{26218:function(e,t,o){o.d(t,{a:function(){return r}});o(16280);const a=(0,o(77796).n)(e=>{history.replaceState({scrollPosition:e},"")},300);function r(e){return(t,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const r=t.connectedCallback;t.connectedCallback=function(){r.call(this);const t=this[o];t&&this.updateComplete.then(()=>{const o=this.renderRoot.querySelector(e);o&&setTimeout(()=>{o.scrollTop=t},0)})};const i=Object.getOwnPropertyDescriptor(t,o);let s;if(void 0===i)s={get(){var e;return this[`__${String(o)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},set(e){a(e),this[`__${String(o)}`]=e},configurable:!0,enumerable:!0};else{const e=i.set;s=Object.assign(Object.assign({},i),{},{set(t){a(t),this[`__${String(o)}`]=t,null==e||e.call(this,t)}})}Object.defineProperty(t,o,s)}}},93905:function(e,t,o){o.d(t,{I:function(){return i}});o(16280),o(44114),o(18111),o(7588),o(69112),o(33110);class a{addFromStorage(e){if(!this._storage[e]){const t=this.storage.getItem(e);t&&(this._storage[e]=JSON.parse(t))}}subscribeChanges(e,t){return this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t],()=>{this.unsubscribeChanges(e,t)}}unsubscribeChanges(e,t){if(!(e in this._listeners))return;const o=this._listeners[e].indexOf(t);-1!==o&&this._listeners[e].splice(o,1)}hasKey(e){return e in this._storage}getValue(e){return this._storage[e]}setValue(e,t){const o=this._storage[e];this._storage[e]=t;try{void 0===t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify(t))}catch(a){}finally{this._listeners[e]&&this._listeners[e].forEach(e=>e(o,t))}}constructor(e=window.localStorage){this._storage={},this._listeners={},this.storage=e,this.storage===window.localStorage&&window.addEventListener("storage",e=>{e.key&&this.hasKey(e.key)&&(this._storage[e.key]=e.newValue?JSON.parse(e.newValue):e.newValue,this._listeners[e.key]&&this._listeners[e.key].forEach(t=>t(e.oldValue?JSON.parse(e.oldValue):e.oldValue,this._storage[e.key])))})}}const r={};function i(e){return(t,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const i=e.storage||"localStorage";let s;i&&i in r?s=r[i]:(s=new a(window[i]),r[i]=s);const n=e.key||String(o);s.addFromStorage(n);const l=!1!==e.subscribe?e=>s.subscribeChanges(n,(t,a)=>{e.requestUpdate(o,t)}):void 0,c=()=>s.hasKey(n)?e.deserializer?e.deserializer(s.getValue(n)):s.getValue(n):void 0,h=(t,a)=>{let r;e.state&&(r=c()),s.setValue(n,e.serializer?e.serializer(a):a),e.state&&t.requestUpdate(o,r)},d=t.performUpdate;if(t.performUpdate=function(){this.__initialized=!0,d.call(this)},e.subscribe){const e=t.connectedCallback,o=t.disconnectedCallback;t.connectedCallback=function(){e.call(this);const t=this;t.__unbsubLocalStorage||(t.__unbsubLocalStorage=null==l?void 0:l(this))},t.disconnectedCallback=function(){var e;o.call(this);const t=this;null===(e=t.__unbsubLocalStorage)||void 0===e||e.call(t),t.__unbsubLocalStorage=void 0}}const p=Object.getOwnPropertyDescriptor(t,o);let u;if(void 0===p)u={get(){return c()},set(e){(this.__initialized||void 0===c())&&h(this,e)},configurable:!0,enumerable:!0};else{const e=p.set;u=Object.assign(Object.assign({},p),{},{get(){return c()},set(t){(this.__initialized||void 0===c())&&h(this,t),null==e||e.call(this,t)}})}Object.defineProperty(t,o,u)}}},68348:function(e,t,o){o.d(t,{u:function(){return a}});o(18111),o(13579);const a=e=>{var t,o;if(e.some(e=>"tagName"in e&&("HA-MENU"===e.tagName||"HA-CODE-EDITOR"===e.tagName)))return!1;const a=e[0];if("TEXTAREA"===a.tagName||"HA-SELECT"===(null===(t=a.parentElement)||void 0===t?void 0:t.tagName)||"HA-DROPDOWN"===(null===(o=a.parentElement)||void 0===o?void 0:o.tagName))return!1;if("INPUT"!==a.tagName)return!0;switch(a.type){case"button":case"checkbox":case"hidden":case"radio":case"range":return!0;default:return!1}}},76830:function(e,t,o){o.d(t,{d:function(){return a}});o(18111),o(20116);const a=(e,t=!0)=>{if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)return;const o=e.composedPath().find(e=>"A"===e.tagName);if(!o||o.target||o.hasAttribute("download")||"external"===o.getAttribute("rel"))return;let a=o.href;if(!a||-1!==a.indexOf("mailto:"))return;const r=window.location,i=r.origin||r.protocol+"//"+r.host;return a.startsWith(i)&&(a=a.slice(i.length),"#"!==a)?(t&&e.preventDefault(),a):void 0}},25995:function(e,t,o){o.d(t,{Vw:function(){return s},kG:function(){return i},y6:function(){return r}});o(3362);const a=(e,t,o)=>new Promise((a,r)=>{const i=document.createElement(e);let s="src",n="body";switch(i.onload=()=>a(t),i.onerror=()=>r(t),e){case"script":i.async=!0,o&&(i.type=o);break;case"link":i.type="text/css",i.rel="stylesheet",s="href",n="head"}i[s]=t,document[n].appendChild(i)}),r=e=>a("link",e),i=e=>a("script",e),s=e=>a("script",e,"module")},77796:function(e,t,o){o.d(t,{n:function(){return a}});o(62953);const a=(e,t,o=!0,a=!0)=>{let r,i=0;const s=(...s)=>{const n=()=>{i=!1===o?0:Date.now(),r=void 0,e(...s)},l=Date.now();i||!1!==o||(i=l);const c=t-(l-i);c<=0||c>t?(r&&(clearTimeout(r),r=void 0),i=l,e(...s)):r||!1===a||(r=window.setTimeout(n,c))};return s.cancel=()=>{clearTimeout(r),r=void 0,i=0},s}},64481:function(e,t,o){o.d(t,{D:function(){return r},J:function(){return s}});o(16280),o(3362),o(55815),o(64979),o(79739);let a=!1;try{a="true"===window.localStorage.getItem("disableViewTransition")}catch(n){}const r=e=>{a=e},i=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e},s=e=>{if(!document.startViewTransition||a)return e(!1),Promise.resolve();let t=!1;try{const o=document.startViewTransition(()=>{t=!0,e(!0)});return o.ready.catch(i),o.finished.catch(i)}catch(o){return console.warn("View transition failed, falling back to direct execution.",o),t?Promise.reject(o):(e(!1),Promise.resolve())}}},34296:function(e,t,o){o(62953);var a=o(40445),r=o(96229),i=o(26069),s=o(91735),n=o(42034),l=o(5124),c=o(67576);let h,d,p,u,v=e=>e;class g extends r.k{renderOutline(){return this.filled?(0,l.qy)(h||(h=v`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,l.qy)(d||(d=v` <span class="leading icon" aria-hidden="true"> ${0} </span> <span class="label">${0}</span> <span class="touch"></span> <span class="trailing leading icon" aria-hidden="true"> ${0} </span> `),this.renderLeadingIcon(),this.label,this.renderTrailingIcon())}renderTrailingIcon(){return(0,l.qy)(p||(p=v`<slot name="trailing-icon"></slot>`))}constructor(...e){super(...e),this.filled=!1,this.active=!1}}g.styles=[s.R,n.R,i.R,(0,l.AH)(u||(u=v`:host{--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-surface:var(--primary-text-color);--md-assist-chip-container-shape:var(
          --ha-assist-chip-container-shape,
          16px
        );--md-assist-chip-outline-color:var(--outline-color);--md-assist-chip-label-text-weight:400}.filled{display:flex;pointer-events:none;border-radius:inherit;inset:0;position:absolute;background-color:var(--ha-assist-chip-filled-container-color)}::slotted([slot=icon]),::slotted([slot=trailing-icon]){display:flex;--mdc-icon-size:var(--md-input-chip-icon-size, 18px);font-size:var(--_label-text-size)!important}.trailing.icon ::slotted(*),.trailing.icon svg{margin-inline-end:unset;margin-inline-start:var(--_icon-label-space)}::before{background:var(--ha-assist-chip-container-color,transparent);opacity:var(--ha-assist-chip-container-opacity, 1)}:where(.active)::before{background:var(--ha-assist-chip-active-container-color);opacity:var(--ha-assist-chip-active-container-opacity)}.label{font-family:var(--ha-font-family-body)}`))],(0,a.Cg)([(0,c.MZ)({type:Boolean,reflect:!0})],g.prototype,"filled",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean})],g.prototype,"active",void 0),g=(0,a.Cg)([(0,c.EM)("ha-assist-chip")],g)},76776:function(e,t,o){o(62953);var a=o(40445),r=o(5124),i=o(67576);let s,n,l,c=e=>e;class h extends r.WF{render(){return(0,r.qy)(s||(s=c` ${0} <slot></slot> `),this.header?(0,r.qy)(n||(n=c`<h1 class="card-header">${0}</h1>`),this.header):r.s6)}constructor(...e){super(...e),this.raised=!1}}h.styles=(0,r.AH)(l||(l=c`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
    :host
      ::slotted(
        .card-content:not(:nth-child(1 of .card-content, .card-header))
      ),
    slot:not(:first-child)::slotted(.card-content) {
      padding-top: 0;
      margin-top: calc(var(--ha-space-2) * -1);
    }
    :host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`)),(0,a.Cg)([(0,i.MZ)()],h.prototype,"header",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],h.prototype,"raised",void 0),h=(0,a.Cg)([(0,i.EM)("ha-card")],h)},9503:function(e,t,o){var a=o(40445),r=o(97577),i=o(5124),s=o(67576);let n,l=e=>e;class c extends r.A{get value(){var e;return null!==(e=this._value)&&void 0!==e?e:null}set value(e){this._value=e}static get styles(){return[r.A.styles,(0,i.AH)(n||(n=l`: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))}`))]}}c=(0,a.Cg)([(0,s.EM)("ha-checkbox")],c)},70947:function(e,t,o){o(62953);var a=o(40445),r=o(50759),i=(o(38625),o(5124)),s=o(67576);o(67094);let n,l,c=e=>e;class h extends r.A{renderCheckboxIcon(){return(0,i.qy)(n||(n=c` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[r.A.styles,(0,i.AH)(l||(l=c`: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,s.MZ)({type:Boolean,reflect:!0})],h.prototype,"selected",void 0),h=(0,a.Cg)([(0,s.EM)("ha-dropdown-item")],h)},29823:function(e,t,o){o.a(e,async function(e,t){try{o(3362),o(62953);var a=o(40445),r=o(52254),i=o(5124),s=o(67576),n=e([r]);r=(n.then?(await n)():n)[0];let l,c=e=>e;class h extends r.A{get anchorElement(){var e;return null===(e=this.popup)||void 0===e?void 0:e.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[r.A.styles,(0,i.AH)(l||(l=c`: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,s.MZ)({attribute:!1})],h.prototype,"dropdownTag",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"dropdownItemTag",void 0),h=(0,a.Cg)([(0,s.EM)("ha-dropdown")],h),t()}catch(l){t(l)}})},90248:function(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaIconButtonArrowPrev:function(){return v}});o(62953);var r=o(40445),i=o(5124),s=o(67576),n=o(63091),l=o(26300),c=e([l]);l=(c.then?(await c)():c)[0];let h,d=e=>e;const p="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",u="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class v extends i.WF{render(){var e;return(0,i.qy)(h||(h=d` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===n.G.document.dir?u:p}}(0,r.Cg)([(0,s.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],v.prototype,"disabled",void 0),(0,r.Cg)([(0,s.MZ)()],v.prototype,"label",void 0),(0,r.Cg)([(0,s.MZ)()],v.prototype,"href",void 0),(0,r.Cg)([(0,s.MZ)()],v.prototype,"target",void 0),(0,r.Cg)([(0,s.MZ)()],v.prototype,"rel",void 0),(0,r.Cg)([(0,s.MZ)()],v.prototype,"download",void 0),(0,r.Cg)([(0,s.wk)()],v.prototype,"_icon",void 0),v=(0,r.Cg)([(0,s.EM)("ha-icon-button-arrow-prev")],v),a()}catch(h){a(h)}})},26300:function(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaIconButton:function(){return g}});o(62953);var r=o(40445),i=o(5124),s=o(67576),n=o(63672),l=o(18350),c=(o(67094),e([l]));l=(c.then?(await c)():c)[0];let h,d,p,u,v=e=>e;class g extends i.WF{render(){return(0,i.qy)(h||(h=v` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,n.J)(this.label),(0,n.J)(this.hideTitle?void 0:this.label),(0,n.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,i.qy)(d||(d=v`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,i.qy)(p||(p=v`<span><slot></slot></span>`)))}constructor(...e){super(...e),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}g.shadowRootOptions={mode:"open",delegatesFocus:!0},g.styles=(0,i.AH)(u||(u=v`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
        --ha-icon-button-padding-inline,
        --ha-space-2
      );--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,r.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],g.prototype,"disabled",void 0),(0,r.Cg)([(0,s.MZ)({type:String})],g.prototype,"path",void 0),(0,r.Cg)([(0,s.MZ)({type:String})],g.prototype,"label",void 0),(0,r.Cg)([(0,s.MZ)({type:String,attribute:"aria-haspopup"})],g.prototype,"ariaHasPopup",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"hide-title",type:Boolean})],g.prototype,"hideTitle",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],g.prototype,"selected",void 0),(0,r.Cg)([(0,s.MZ)()],g.prototype,"href",void 0),(0,r.Cg)([(0,s.MZ)()],g.prototype,"target",void 0),(0,r.Cg)([(0,s.MZ)()],g.prototype,"rel",void 0),(0,r.Cg)([(0,s.MZ)()],g.prototype,"download",void 0),g=(0,r.Cg)([(0,s.EM)("ha-icon-button")],g),a()}catch(h){a(h)}})},2054:function(e,t,o){o.a(e,async function(e,t){try{o(16280),o(62953);var a=o(40445),r=o(5124),i=o(67576),s=o(1087),n=o(44249),l=o(26300),c=e([l]);l=(c.then?(await c)():c)[0];let h,d,p,u=e=>e;const v="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class g extends r.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 r.s6;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,r.qy)(h||(h=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),v,this._toggleMenu,e?(0,r.qy)(d||(d=u`<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===(null==t?void 0:t.kioskMode)&&(o||"always_hidden"===(null==t?void 0:t.dockedSidebar)),r=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===r||(this._show=r||this._alwaysVisible,r?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,n.V)(this.hass.connection,e=>{this._hasNotifications=e.length>0})}_toggleMenu(){(0,s.r)(this,"hass-toggle-menu")}constructor(...e){super(...e),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}g.styles=(0,r.AH)(p||(p=u`: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,i.MZ)({type:Boolean})],g.prototype,"narrow",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,a.Cg)([(0,i.wk)()],g.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,i.wk)()],g.prototype,"_show",void 0),g=(0,a.Cg)([(0,i.EM)("ha-menu-button")],g),t()}catch(h){t(h)}})},54276:function(e,t,o){o(62953);var a=o(40445),r=o(76482),i=o(91382),s=o(96245),n=o(5124),l=o(67576);let c;class h extends i.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){null==e||e.removeEventListener("touchend",this._handleTouchEnd),null==t||t.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new r.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}h.styles=[s.R,(0,n.AH)(c||(c=(e=>e)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
          --ha-ripple-hover-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        );--md-ripple-pressed-color:var(
          --ha-ripple-pressed-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        )}`))],h=(0,a.Cg)([(0,l.EM)("ha-ripple")],h)},65829:function(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaSpinner:function(){return d}});var r=o(40445),i=o(55262),s=o(5124),n=o(67576),l=e([i]);i=(l.then?(await l)():l)[0];let c,h=e=>e;class d extends i.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[i.A.styles,(0,s.AH)(c||(c=h`:host{--indicator-color:var(
            --ha-spinner-indicator-color,
            var(--primary-color)
          );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}(0,r.Cg)([(0,n.MZ)()],d.prototype,"size",void 0),d=(0,r.Cg)([(0,n.EM)("ha-spinner")],d),a()}catch(c){a(c)}})},67094:function(e,t,o){o.r(t),o.d(t,{HaSvgIcon:function(){return d}});var a=o(40445),r=o(5124),i=o(67576);let s,n,l,c,h=e=>e;class d extends r.WF{render(){return(0,r.JW)(s||(s=h` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,r.JW)(n||(n=h`<path class="primary-path" d="${0}"></path>`),this.path):r.s6,this.secondaryPath?(0,r.JW)(l||(l=h`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):r.s6)}}d.styles=(0,r.AH)(c||(c=h`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,a.Cg)([(0,i.MZ)()],d.prototype,"path",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"secondaryPath",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"viewBox",void 0),d=(0,a.Cg)([(0,i.EM)("ha-svg-icon")],d)},34127:function(e,t,o){o.a(e,async function(e,t){try{o(62953);var a=o(40445),r=o(52630),i=o(5124),s=o(67576),n=e([r]);r=(n.then?(await n)():n)[0];let l,c=e=>e;class h extends r.A{static get styles(){return[r.A.styles,(0,i.AH)(l||(l=c`:host{--wa-tooltip-background-color:var(
            --ha-tooltip-background-color,
            var(--ha-color-surface-default)
          );--wa-tooltip-content-color:var(
            --ha-tooltip-text-color,
            var(--primary-text-color)
          );--wa-tooltip-font-family:var(
            --ha-tooltip-font-family,
            var(--ha-font-family-body)
          );--wa-tooltip-font-size:var(
            --ha-tooltip-font-size,
            var(--ha-font-size-m)
          );--wa-tooltip-font-weight:var(
            --ha-tooltip-font-weight,
            var(--ha-font-weight-medium)
          );--wa-tooltip-line-height:var(
            --ha-tooltip-line-height,
            var(--ha-line-height-condensed)
          );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
            --ha-tooltip-border-radius,
            var(--ha-border-radius-md)
          );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`))]}constructor(...e){super(...e),this.showDelay=350,this.hideDelay=150}}(0,a.Cg)([(0,s.MZ)({attribute:"show-delay",type:Number})],h.prototype,"showDelay",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"hide-delay",type:Number})],h.prototype,"hideDelay",void 0),h=(0,a.Cg)([(0,s.EM)("ha-tooltip")],h),t()}catch(l){t(l)}})},36866:function(e,t,o){o.a(e,async function(e,t){try{o(62953);var a=o(40445),r=o(5124),i=o(67576),s=o(91485),n=e([s]);s=(n.then?(await n)():n)[0];let l,c,h=e=>e;const d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class p extends s.U{willUpdate(e){var t,o;(super.willUpdate(e),this.label||this.placeholder||this.hasUpdated&&!e.has("_i18n"))||(this.placeholder=(null===(t=this.i18n)||void 0===t||null===(o=t.localize)||void 0===o?void 0:o.call(t,"ui.common.search"))||"Search")}renderStartDefault(){return(0,r.qy)(l||(l=h`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),d)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}p.styles=[...s.U.styles,(0,r.AH)(c||(c=h`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],p=(0,a.Cg)([(0,i.EM)("ha-input-search")],p),t()}catch(l){t(l)}})},25612:function(e,t,o){o.d(t,{KQ:function(){return n},Uh:function(){return i},Zg:function(){return r},kZ:function(){return a},o8:function(){return s}});const a=e=>e.sendMessagePromise({type:"lovelace/resources"}),r=(e,t)=>e.callWS(Object.assign({type:"lovelace/resources/create"},t)),i=(e,t,o)=>e.callWS(Object.assign({type:"lovelace/resources/update",resource_id:t},o)),s=(e,t)=>e.callWS({type:"lovelace/resources/delete",resource_id:t}),n=e=>e.callWS({type:"lovelace/info"})},44249:function(e,t,o){o.d(t,{V:function(){return a}});o(62953);const a=(e,t)=>{const o=new r,a=e.subscribeMessage(e=>t(o.processMessage(e)),{type:"persistent_notification/subscribe"});return()=>{a.then(e=>null==e?void 0:e())}};class r{processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications=Object.assign(Object.assign({},this.notifications),e.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},23296:function(e,t,o){o.a(e,async function(e,a){try{o.r(t);o(62953);var r=o(40445),i=o(5124),s=o(67576),n=o(91926),l=o(65829),c=o(90248),h=o(2054),d=o(14503),p=e([l,c,h]);[l,c,h]=p.then?(await p)():p;let u,v,g,b,f,m,y=e=>e;class w extends i.WF{render(){var e;return(0,i.qy)(u||(u=y` ${0} <div class="content"> <ha-spinner></ha-spinner> ${0} </div> `),this.noToolbar?"":(0,i.qy)(v||(v=y`<div class="toolbar"> ${0} </div>`),this.rootnav||null!==(e=history.state)&&void 0!==e&&e.root?(0,i.qy)(g||(g=y` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):(0,i.qy)(b||(b=y` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._handleBack)),this.message?(0,i.qy)(f||(f=y`<div id="loading-text">${0}</div>`),this.message):i.s6)}_handleBack(){(0,n.OE)()}static get styles(){return[d.RF,(0,i.AH)(m||(m=y`:host{display:block;height:100%;background-color:var(--primary-background-color)}.toolbar{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);padding:8px 12px;pointer-events:none;background-color:var(--app-header-background-color);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto}.content{height:calc(100% - var(--header-height));display:flex;flex-direction:column;align-items:center;justify-content:center}#loading-text{max-width:350px;margin-top:16px}`))]}constructor(...e){super(...e),this.noToolbar=!1,this.rootnav=!1,this.narrow=!1}}(0,r.Cg)([(0,s.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,attribute:"no-toolbar"})],w.prototype,"noToolbar",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"rootnav",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"narrow",void 0),(0,r.Cg)([(0,s.MZ)()],w.prototype,"message",void 0),w=(0,r.Cg)([(0,s.EM)("hass-loading-screen")],w),a()}catch(u){a(u)}})},81310:function(e,t,o){o.a(e,async function(e,t){try{o(62953);var a=o(40445),r=o(5124),i=o(67576),s=o(6412),n=o(26218),l=o(91926),c=o(90248),h=o(2054),d=o(14503),p=e([c,h]);[c,h]=p.then?(await p)():p;let u,v,g,b,f,m=e=>e;class y extends r.WF{render(){var e;return(0,r.qy)(u||(u=m` <div class="toolbar ${0}"> <div class="toolbar-content"> ${0} <div class="main-title"> <slot name="header">${0}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${0}" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,s.H)({narrow:this.narrow}),this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?(0,r.qy)(v||(v=m` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,r.qy)(g||(g=m` <ha-icon-button-arrow-prev href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,r.qy)(b||(b=m` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,(0,s.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable}),this._saveScrollPos)}_saveScrollPos(e){this._savedScrollPos=e.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.OE)()}static get styles(){return[d.dp,(0,r.AH)(f||(f=m`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`))]}constructor(...e){super(...e),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,a.Cg)([(0,i.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,a.Cg)([(0,i.MZ)()],y.prototype,"header",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean,attribute:"main-page"})],y.prototype,"mainPage",void 0),(0,a.Cg)([(0,i.MZ)({type:String,attribute:"back-path"})],y.prototype,"backPath",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],y.prototype,"backCallback",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],y.prototype,"narrow",void 0),(0,a.Cg)([(0,i.MZ)({type:Boolean})],y.prototype,"scrollable",void 0),(0,a.Cg)([(0,n.a)(".content")],y.prototype,"_savedScrollPos",void 0),(0,a.Cg)([(0,i.Ls)({passive:!0})],y.prototype,"_saveScrollPos",null),y=(0,a.Cg)([(0,i.EM)("hass-subpage")],y),t()}catch(u){t(u)}})},59992:function(e,t,o){o.a(e,async function(e,a){try{o.d(t,{V:function(){return v}});o(62953);var r=o(40445),i=o(88696),s=o(5124),n=o(6412),l=o(67576),c=e([i]);i=(c.then?(await c)():c)[0];let h,d,p=e=>e;const u=e=>void 0===e?[]:Array.isArray(e)?e:[e],v=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,s.qy)(h||(h=p` <div class="${0}"></div> <div class="${0}"></div> `),(0,n.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,n.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...u(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,s.AH)(d||(d=p`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:o=0,clientHeight:a=0,scrollTop:r=0}=e;this._contentScrollable=o-a>r+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const o=e.currentTarget;this._contentScrolled=(null!==(t=o.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(o)},this._resize=new i.P(this,{target:null,callback:e=>{var t;const o=null===(t=e[0])||void 0===t?void 0:t.target;o&&this._updateScrollableState(o)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,r.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,r.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};a()}catch(h){a(h)}})},89192:function(e,t,o){o.a(e,async function(e,a){try{o.r(t),o.d(t,{HaConfigLovelaceResources:function(){return Z}});o(26910),o(18111),o(22489),o(20116),o(61701),o(3362),o(62953);var r=o(40445),i=o(5124),s=o(67576),n=o(22786),l=o(52220),c=(o(76776),o(18350)),h=o(26300),d=(o(67094),o(25612)),p=o(65063),u=o(23296),v=o(81310),g=o(72553),b=o(14503),f=o(35697),m=o(68370),y=o(11223),w=o(93905),x=e([c,h,u,v,g]);[c,h,u,v,g]=x.then?(await x)():x;let _,k,C,z,M,$,S,A=e=>e;const H="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",E="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",T="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";class Z extends i.WF{render(){var e;if(!this.hass||void 0===this._resources)return(0,i.qy)(_||(_=A` <hass-loading-screen></hass-loading-screen> `));if(this.hass.config.safe_mode)return(0,i.qy)(k||(k=A` <hass-subpage .hass="${0}" .narrow="${0}" back-path="/config" .header="${0}"> <div class="content"> <ha-card outlined> <div class="card-content"> <h2> ${0} </h2> <p> ${0} </p> </div> </ha-card> </div> </hass-subpage> `),this.hass,this.narrow,this.hass.localize("ui.panel.config.lovelace.resources.caption"),this.hass.localize("ui.panel.config.lovelace.resources.unavailable"),this.hass.localize("ui.panel.config.lovelace.resources.unavailable_safe_mode"));const t="yaml"===(null===(e=this._lovelaceInfo)||void 0===e?void 0:e.resource_mode);return(0,i.qy)(C||(C=A` <hass-tabs-subpage-data-table .hass="${0}" .narrow="${0}" .route="${0}" .tabs="${0}" .columns="${0}" .data="${0}" .noDataText="${0}" .initialSorting="${0}" .columnOrder="${0}" .hiddenColumns="${0}" @columns-changed="${0}" @sorting-changed="${0}" .filter="${0}" @search-changed="${0}" @row-click="${0}" has-fab clickable> ${0} <ha-button slot="fab" size="large" @click="${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> ${0} </ha-button> </hass-tabs-subpage-data-table> `),this.hass,this.narrow,this.route,m.lovelaceResourcesTabs,this._columns(this.hass.language,this.hass.localize),this._resources,this.hass.localize("ui.panel.config.lovelace.resources.picker.no_resources"),this._activeSorting,this._activeColumnOrder,this._activeHiddenColumns,this._handleColumnsChanged,this._handleSortingChanged,this._filter,this._handleSearchChange,this._editResource,t?(0,i.qy)(z||(z=A` <ha-icon-button slot="toolbar-icon" .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> `),this.hass.localize("ui.panel.config.lovelace.resources.reload_resources"),T,this._handleReloadResources):"",this._addResource,E,this.hass.localize("ui.panel.config.lovelace.resources.picker.add_resource"))}firstUpdated(e){super.firstUpdated(e),this._fetchData()}async _fetchData(){const[e,t]=await Promise.all([(0,d.kZ)(this.hass.connection),(0,d.KQ)(this.hass)]);this._resources=e,this._lovelaceInfo=t}_editResource(e){var t;if("storage"!==(null===(t=this._lovelaceInfo)||void 0===t?void 0:t.resource_mode))return void(0,p.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.lovelace.resources.cant_edit_yaml")});const o=e.detail.id,a=this._resources.find(e=>e.id===o);this._openDialog(a)}_addResource(){var e;"storage"===(null===(e=this._lovelaceInfo)||void 0===e?void 0:e.resource_mode)?this._openDialog():(0,p.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.lovelace.resources.cant_edit_yaml")})}async _openDialog(e){(0,y.D)(this,{resource:e,createResource:async e=>{const t=await(0,d.Zg)(this.hass,e);this._resources=this._resources.concat(t).sort((e,t)=>(0,l.xL)(e.url,t.url,this.hass.locale.language)),(0,f.n)([t],this.hass)},updateResource:async t=>{const o=await(0,d.Uh)(this.hass,e.id,t);this._resources=this._resources.map(t=>t===e?o:t),(0,f.n)([o],this.hass)}})}_handleSortingChanged(e){this._activeSorting=e.detail}_handleSearchChange(e){this._filter=e.detail.value}_handleColumnsChanged(e){this._activeColumnOrder=e.detail.columnOrder,this._activeHiddenColumns=e.detail.hiddenColumns}_handleReloadResources(){this.hass.callService("lovelace","reload_resources"),(0,p.dk)(this,{title:this.hass.localize("ui.panel.config.lovelace.resources.reload_refresh_header"),text:this.hass.localize("ui.panel.config.lovelace.resources.reload_refresh_body"),confirmText:this.hass.localize("ui.common.refresh"),dismissText:this.hass.localize("ui.common.not_now"),confirm:()=>location.reload()})}static get styles(){return[b.RF,(0,i.AH)(M||(M=A`.content{padding:28px 20px 0;max-width:1040px;margin:0 auto}h2{margin-top:0;margin-bottom:12px}p{margin:0}`))]}constructor(...e){super(...e),this.isWide=!1,this.narrow=!1,this._resources=[],this._filter="",this._columns=(0,n.A)((e,t)=>({url:{main:!0,title:t("ui.panel.config.lovelace.resources.picker.headers.url"),sortable:!0,filterable:!0,direction:"asc",flex:2,forceLTR:!0},type:{title:t("ui.panel.config.lovelace.resources.picker.headers.type"),sortable:!0,filterable:!0,template:e=>(0,i.qy)($||($=A` ${0} `),this.hass.localize(`ui.panel.config.lovelace.resources.types.${e.type}`)||e.type)},delete:{title:"",label:t("ui.panel.config.lovelace.resources.picker.headers.delete"),type:"icon-button",minWidth:"48px",maxWidth:"48px",showNarrow:!0,template:e=>(0,i.qy)(S||(S=A`<ha-icon-button @click="${0}" .label="${0}" .path="${0}" .resource="${0}"></ha-icon-button>`),this._removeResource,this.hass.localize("ui.common.delete"),H,e)}})),this._removeResource=async e=>{var t;if("storage"!==(null===(t=this._lovelaceInfo)||void 0===t?void 0:t.resource_mode))return(0,p.showAlertDialog)(this,{text:this.hass.localize("ui.panel.config.lovelace.resources.cant_edit_yaml")}),!1;const o=e.currentTarget.resource;if(!(await(0,p.dk)(this,{title:this.hass.localize("ui.panel.config.lovelace.resources.confirm_delete_title"),text:this.hass.localize("ui.panel.config.lovelace.resources.confirm_delete_text",{url:o.url}),dismissText:this.hass.localize("ui.common.cancel"),confirmText:this.hass.localize("ui.common.delete"),destructive:!0})))return!1;try{return await(0,d.o8)(this.hass,o.id),this._resources=this._resources.filter(({id:e})=>e!==o.id),(0,p.dk)(this,{title:this.hass.localize("ui.panel.config.lovelace.resources.refresh_header"),text:this.hass.localize("ui.panel.config.lovelace.resources.refresh_body"),confirmText:this.hass.localize("ui.common.refresh"),dismissText:this.hass.localize("ui.common.not_now"),confirm:()=>location.reload()}),!0}catch(a){return!1}}}}(0,r.Cg)([(0,s.MZ)({attribute:!1})],Z.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"is-wide",type:Boolean})],Z.prototype,"isWide",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],Z.prototype,"narrow",void 0),(0,r.Cg)([(0,s.MZ)({attribute:!1})],Z.prototype,"route",void 0),(0,r.Cg)([(0,s.wk)()],Z.prototype,"_resources",void 0),(0,r.Cg)([(0,s.wk)()],Z.prototype,"_lovelaceInfo",void 0),(0,r.Cg)([(0,s.wk)(),(0,w.I)({storage:"sessionStorage",key:"lovelace-resources-table-search",state:!0,subscribe:!1})],Z.prototype,"_filter",void 0),(0,r.Cg)([(0,w.I)({key:"lovelace-resources-table-sort",state:!1,subscribe:!1})],Z.prototype,"_activeSorting",void 0),(0,r.Cg)([(0,w.I)({key:"lovelace-resources-table-column-order",state:!1,subscribe:!1})],Z.prototype,"_activeColumnOrder",void 0),(0,r.Cg)([(0,w.I)({key:"lovelace-resources-table-hidden-columns",state:!1,subscribe:!1})],Z.prototype,"_activeHiddenColumns",void 0),Z=(0,r.Cg)([(0,s.EM)("ha-config-lovelace-resources")],Z),a()}catch(_){a(_)}})},11223:function(e,t,o){o.d(t,{D:function(){return i}});o(3362),o(62953);var a=o(1087);const r=()=>o.e(34006).then(o.bind(o,84309)),i=(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-lovelace-resource-detail",dialogImport:r,dialogParams:t})}},35697:function(e,t,o){o.d(t,{$:function(){return l},n:function(){return n}});o(18111),o(22489),o(7588),o(61701),o(3362),o(96167),o(62953),o(3296),o(27208),o(48408),o(14603),o(47566),o(98721);var a=o(25995);const r={},i={},s=(e,t)=>{const o=new URL(e.url,t.auth.data.hassUrl).toString();switch(e.type){case"css":{if(o in r)return r[o];const e=(0,a.y6)(o);return r[o]=e,e}case"js":{if(o in i)return i[o];const e=(0,a.kG)(o);return i[o]=e,e}case"module":return(0,a.Vw)(o);default:return void console.warn(`Unknown resource type specified: ${e.type}`)}},n=(e,t)=>{e.forEach(e=>{s(e,t)})},l=async(e,t)=>{const o=e.map(e=>s(e,t)).filter(e=>void 0!==e);await Promise.allSettled(o)}},69235:function(e,t,o){o.a(e,async function(e,t){try{o(3362),o(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await o.e(71055).then(o.bind(o,52370))).default),t()}catch(a){t(a)}},1)},14503:function(e,t,o){o.d(t,{RF:function(){return p},dp:function(){return g},kO:function(){return v},nA:function(){return u},og:function(){return d}});var a=o(5124);let r,i,s,n,l,c,h=e=>e;const d=(0,a.AH)(r||(r=h`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),p=(0,a.AH)(i||(i=h`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),d),u=(0,a.AH)(s||(s=h`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),v=(0,a.AH)(n||(n=h`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--mdc-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    );--ha-dialog-max-height:calc(
      100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
          --safe-area-inset-y,
          0px
        )
    )}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),g=(0,a.AH)(l||(l=h`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,a.AH)(c||(c=h`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},85614:function(e,t,o){o.d(t,{i:function(){return a}});o(3362),o(62953);const a=async()=>{await Promise.all([o.e(38085),o.e(22309)]).then(o.bind(o,40772))}},22348:function(e,t,o){o.d(t,{V:function(){return r}});var a=o(37177);const r=e=>!!e&&a.n},37177:function(e,t,o){o.d(t,{n:function(){return a}});o(27495);const a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);