iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
78 lines • 38.3 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[52464],{26218:function(t,e,o){o.d(e,{a:function(){return r}});o(16280);const a=(0,o(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function r(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const r=e.connectedCallback;e.connectedCallback=function(){r.call(this);const e=this[o];e&&this.updateComplete.then(()=>{const o=this.renderRoot.querySelector(t);o&&setTimeout(()=>{o.scrollTop=e},0)})};const i=Object.getOwnPropertyDescriptor(e,o);let n;if(void 0===i)n={get(){var t;return this[`__${String(o)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){a(t),this[`__${String(o)}`]=t},configurable:!0,enumerable:!0};else{const t=i.set;n=Object.assign(Object.assign({},i),{},{set(e){a(e),this[`__${String(o)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,o,n)}}},93905:function(t,e,o){o.d(e,{I:function(){return i}});o(16280),o(44114),o(18111),o(7588),o(69112),o(33110);class a{addFromStorage(t){if(!this._storage[t]){const e=this.storage.getItem(t);e&&(this._storage[t]=JSON.parse(e))}}subscribeChanges(t,e){return this._listeners[t]?this._listeners[t].push(e):this._listeners[t]=[e],()=>{this.unsubscribeChanges(t,e)}}unsubscribeChanges(t,e){if(!(t in this._listeners))return;const o=this._listeners[t].indexOf(e);-1!==o&&this._listeners[t].splice(o,1)}hasKey(t){return t in this._storage}getValue(t){return this._storage[t]}setValue(t,e){const o=this._storage[t];this._storage[t]=e;try{void 0===e?this.storage.removeItem(t):this.storage.setItem(t,JSON.stringify(e))}catch(a){}finally{this._listeners[t]&&this._listeners[t].forEach(t=>t(o,e))}}constructor(t=window.localStorage){this._storage={},this._listeners={},this.storage=t,this.storage===window.localStorage&&window.addEventListener("storage",t=>{t.key&&this.hasKey(t.key)&&(this._storage[t.key]=t.newValue?JSON.parse(t.newValue):t.newValue,this._listeners[t.key]&&this._listeners[t.key].forEach(e=>e(t.oldValue?JSON.parse(t.oldValue):t.oldValue,this._storage[t.key])))})}}const r={};function i(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const i=t.storage||"localStorage";let n;i&&i in r?n=r[i]:(n=new a(window[i]),r[i]=n);const s=t.key||String(o);n.addFromStorage(s);const l=!1!==t.subscribe?t=>n.subscribeChanges(s,(e,a)=>{t.requestUpdate(o,e)}):void 0,c=()=>n.hasKey(s)?t.deserializer?t.deserializer(n.getValue(s)):n.getValue(s):void 0,h=(e,a)=>{let r;t.state&&(r=c()),n.setValue(s,t.serializer?t.serializer(a):a),t.state&&e.requestUpdate(o,r)},d=e.performUpdate;if(e.performUpdate=function(){this.__initialized=!0,d.call(this)},t.subscribe){const t=e.connectedCallback,o=e.disconnectedCallback;e.connectedCallback=function(){t.call(this);const e=this;e.__unbsubLocalStorage||(e.__unbsubLocalStorage=null==l?void 0:l(this))},e.disconnectedCallback=function(){var t;o.call(this);const e=this;null===(t=e.__unbsubLocalStorage)||void 0===t||t.call(e),e.__unbsubLocalStorage=void 0}}const u=Object.getOwnPropertyDescriptor(e,o);let p;if(void 0===u)p={get(){return c()},set(t){(this.__initialized||void 0===c())&&h(this,t)},configurable:!0,enumerable:!0};else{const t=u.set;p=Object.assign(Object.assign({},u),{},{get(){return c()},set(e){(this.__initialized||void 0===c())&&h(this,e),null==t||t.call(this,e)}})}Object.defineProperty(e,o,p)}}},68348:function(t,e,o){o.d(e,{u:function(){return a}});o(18111),o(13579);const a=t=>{var e,o;if(t.some(t=>"tagName"in t&&("HA-MENU"===t.tagName||"HA-CODE-EDITOR"===t.tagName)))return!1;const a=t[0];if("TEXTAREA"===a.tagName||"HA-SELECT"===(null===(e=a.parentElement)||void 0===e?void 0:e.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(t,e,o){o.d(e,{d:function(){return a}});o(18111),o(20116);const a=(t,e=!0)=>{if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)return;const o=t.composedPath().find(t=>"A"===t.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)?(e&&t.preventDefault(),a):void 0}},77796:function(t,e,o){o.d(e,{n:function(){return a}});o(62953);const a=(t,e,o=!0,a=!0)=>{let r,i=0;const n=(...n)=>{const s=()=>{i=!1===o?0:Date.now(),r=void 0,t(...n)},l=Date.now();i||!1!==o||(i=l);const c=e-(l-i);c<=0||c>e?(r&&(clearTimeout(r),r=void 0),i=l,t(...n)):r||!1===a||(r=window.setTimeout(s,c))};return n.cancel=()=>{clearTimeout(r),r=void 0,i=0},n}},64481:function(t,e,o){o.d(e,{D:function(){return r},J:function(){return n}});o(16280),o(3362),o(55815),o(64979),o(79739);let a=!1;try{a="true"===window.localStorage.getItem("disableViewTransition")}catch(s){}const r=t=>{a=t},i=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},n=t=>{if(!document.startViewTransition||a)return t(!1),Promise.resolve();let e=!1;try{const o=document.startViewTransition(()=>{e=!0,t(!0)});return o.ready.catch(i),o.finished.catch(i)}catch(o){return console.warn("View transition failed, falling back to direct execution.",o),e?Promise.reject(o):(t(!1),Promise.resolve())}}},34296:function(t,e,o){o(62953);var a=o(40445),r=o(96229),i=o(26069),n=o(91735),s=o(42034),l=o(5124),c=o(67576);let h,d,u,p,g=t=>t;class v extends r.k{renderOutline(){return this.filled?(0,l.qy)(h||(h=g`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,l.qy)(d||(d=g` <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)(u||(u=g`<slot name="trailing-icon"></slot>`))}constructor(...t){super(...t),this.filled=!1,this.active=!1}}v.styles=[n.R,s.R,i.R,(0,l.AH)(p||(p=g`: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})],v.prototype,"filled",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean})],v.prototype,"active",void 0),v=(0,a.Cg)([(0,c.EM)("ha-assist-chip")],v)},9503:function(t,e,o){var a=o(40445),r=o(97577),i=o(5124),n=o(67576);let s,l=t=>t;class c extends r.A{get value(){var t;return null!==(t=this._value)&&void 0!==t?t:null}set value(t){this._value=t}static get styles(){return[r.A.styles,(0,i.AH)(s||(s=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,n.EM)("ha-checkbox")],c)},70947:function(t,e,o){o(62953);var a=o(40445),r=o(50759),i=(o(38625),o(5124)),n=o(67576);o(67094);let s,l,c=t=>t;class h extends r.A{renderCheckboxIcon(){return(0,i.qy)(s||(s=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(...t){super(...t),this.selected=!1}}(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],h.prototype,"selected",void 0),h=(0,a.Cg)([(0,n.EM)("ha-dropdown-item")],h)},29823:function(t,e,o){o.a(t,async function(t,e){try{o(3362),o(62953);var a=o(40445),r=o(52254),i=o(5124),n=o(67576),s=t([r]);r=(s.then?(await s)():s)[0];let l,c=t=>t;class h extends r.A{get anchorElement(){var t;return null===(t=this.popup)||void 0===t?void 0:t.anchor}set anchorElement(t){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=t)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!0)}async hideMenu(){const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!1),await super.hideMenu()}static get styles(){return[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(...t){super(...t),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"dropdownTag",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],h.prototype,"dropdownItemTag",void 0),h=(0,a.Cg)([(0,n.EM)("ha-dropdown")],h),e()}catch(l){e(l)}})},90248:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButtonArrowPrev:function(){return g}});o(62953);var r=o(40445),i=o(5124),n=o(67576),s=o(63091),l=o(26300),c=t([l]);l=(c.then?(await c)():c)[0];let h,d=t=>t;const u="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",p="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class g extends i.WF{render(){var t;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===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?p:u}}(0,r.Cg)([(0,n.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],g.prototype,"disabled",void 0),(0,r.Cg)([(0,n.MZ)()],g.prototype,"label",void 0),(0,r.Cg)([(0,n.MZ)()],g.prototype,"href",void 0),(0,r.Cg)([(0,n.MZ)()],g.prototype,"target",void 0),(0,r.Cg)([(0,n.MZ)()],g.prototype,"rel",void 0),(0,r.Cg)([(0,n.MZ)()],g.prototype,"download",void 0),(0,r.Cg)([(0,n.wk)()],g.prototype,"_icon",void 0),g=(0,r.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],g),a()}catch(h){a(h)}})},26300:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButton:function(){return v}});o(62953);var r=o(40445),i=o(5124),n=o(67576),s=o(63672),l=o(18350),c=(o(67094),t([l]));l=(c.then?(await c)():c)[0];let h,d,u,p,g=t=>t;class v extends i.WF{render(){return(0,i.qy)(h||(h=g` <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,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.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=g`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,i.qy)(u||(u=g`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}v.shadowRootOptions={mode:"open",delegatesFocus:!0},v.styles=(0,i.AH)(p||(p=g`: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} (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,r.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],v.prototype,"disabled",void 0),(0,r.Cg)([(0,n.MZ)({type:String})],v.prototype,"path",void 0),(0,r.Cg)([(0,n.MZ)({type:String})],v.prototype,"label",void 0),(0,r.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],v.prototype,"ariaHasPopup",void 0),(0,r.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],v.prototype,"hideTitle",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],v.prototype,"selected",void 0),(0,r.Cg)([(0,n.MZ)()],v.prototype,"href",void 0),(0,r.Cg)([(0,n.MZ)()],v.prototype,"target",void 0),(0,r.Cg)([(0,n.MZ)()],v.prototype,"rel",void 0),(0,r.Cg)([(0,n.MZ)()],v.prototype,"download",void 0),v=(0,r.Cg)([(0,n.EM)("ha-icon-button")],v),a()}catch(h){a(h)}})},2054:function(t,e,o){o.a(t,async function(t,e){try{o(16280),o(62953);var a=o(40445),r=o(5124),i=o(67576),n=o(1087),s=o(44249),l=o(26300),c=t([l]);l=(c.then?(await c)():c)[0];let h,d,u,p=t=>t;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class v 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 t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,r.qy)(h||(h=p` <ha-icon-button .label="${0}" .path="${0}" ="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,t?(0,r.qy)(d||(d=p`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,o=t.has("narrow")?t.get("narrow"):this.narrow,a=!1===(null==e?void 0:e.kioskMode)&&(o||"always_hidden"===(null==e?void 0:e.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,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}v.styles=(0,r.AH)(u||(u=p`: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})],v.prototype,"narrow",void 0),(0,a.Cg)([(0,i.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,a.Cg)([(0,i.wk)()],v.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,i.wk)()],v.prototype,"_show",void 0),v=(0,a.Cg)([(0,i.EM)("ha-menu-button")],v),e()}catch(h){e(h)}})},54276:function(t,e,o){o(62953);var a=o(40445),r=o(76482),i=o(91382),n=o(96245),s=o(5124),l=o(67576);let c;class h extends i.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new r.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}h.styles=[n.R,(0,s.AH)(c||(c=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`))],h=(0,a.Cg)([(0,l.EM)("ha-ripple")],h)},67094:function(t,e,o){o.r(e),o.d(e,{HaSvgIcon:function(){return d}});var a=o(40445),r=o(5124),i=o(67576);let n,s,l,c,h=t=>t;class d extends r.WF{render(){return(0,r.JW)(n||(n=h` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,r.JW)(s||(s=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(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),r=o(52630),i=o(5124),n=o(67576),s=t([r]);r=(s.then?(await s)():s)[0];let l,c=t=>t;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(...t){super(...t),this.showDelay=350,this.hideDelay=150}}(0,a.Cg)([(0,n.MZ)({attribute:"show-delay",type:Number})],h.prototype,"showDelay",void 0),(0,a.Cg)([(0,n.MZ)({attribute:"hide-delay",type:Number})],h.prototype,"hideDelay",void 0),h=(0,a.Cg)([(0,n.EM)("ha-tooltip")],h),e()}catch(l){e(l)}})},36866:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),r=o(5124),i=o(67576),n=o(91485),s=t([n]);n=(s.then?(await s)():s)[0];let l,c,h=t=>t;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 u extends n.U{willUpdate(t){var e,o;(super.willUpdate(t),this.label||this.placeholder||this.hasUpdated&&!t.has("_i18n"))||(this.placeholder=(null===(e=this.i18n)||void 0===e||null===(o=e.localize)||void 0===o?void 0:o.call(e,"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"}}u.styles=[...n.U.styles,(0,r.AH)(c||(c=h`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,a.Cg)([(0,i.EM)("ha-input-search")],u),e()}catch(l){e(l)}})},44249:function(t,e,o){o.d(e,{V:function(){return a}});o(62953);const a=(t,e)=>{const o=new r,a=t.subscribeMessage(t=>e(o.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{a.then(t=>null==t?void 0:t())}};class r{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},70610:function(t,e,o){o.d(e,{F:function(){return i}});o(44114),o(3362),o(62953);var a=o(90889);const r=(t,e)=>t.subscribeMessage(t=>{const o=[...e.state||[]];if(t.add)for(const e of t.add){const t=o.findIndex(t=>t.name===e.name);-1===t?o.push(e):o[t]=e}if(t.change)for(const e of t.change){const t=o.findIndex(t=>t.name===e.name);-1!==t&&(o[t]=e)}if(t.remove)for(const e of t.remove){const t=o.findIndex(t=>t.name===e.name);-1!==t&&o.splice(t,1)}e.setState(o,!0)},{type:"zeroconf/subscribe_discovery"}),i=(t,e)=>(0,a.N)("_zeroconfDiscoveryRows",()=>Promise.resolve([]),r,t,e)},59992:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{V:function(){return g}});o(62953);var r=o(40445),i=o(88696),n=o(5124),s=o(6412),l=o(67576),c=t([i]);i=(c.then?(await c)():c)[0];let h,d,u=t=>t;const p=t=>void 0===t?[]:Array.isArray(t)?t:[t],g=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,n.qy)(h||(h=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...p(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,n.AH)(d||(d=u`.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 t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:o=0,clientHeight:a=0,scrollTop:r=0}=t;this._contentScrollable=o-a>r+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const o=t.currentTarget;this._contentScrolled=(null!==(e=o.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(o)},this._resize=new i.P(this,{target:null,callback:t=>{var e;const o=null===(e=t[0])||void 0===e?void 0:e.target;o&&this._updateScrollableState(o)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,r.Cg)([(0,l.wk)()],e.prototype,"_contentScrolled",void 0),(0,r.Cg)([(0,l.wk)()],e.prototype,"_contentScrollable",void 0),e};a()}catch(h){a(h)}})},54706:function(t,e,o){o.d(e,{E:function(){return i}});o(74423),o(18111),o(13579),o(3362),o(62953);var a=o(40445),r=o(67576);const i=t=>{class e extends t{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const t=this.__unsubs.pop();t instanceof Promise?t.then(t=>t()):t()}this.__unsubs=void 0}}updated(t){if(super.updated(t),t.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const e of t.keys())if(this.hassSubscribeRequiredHostProps.includes(e))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){var t;void 0!==this.__unsubs||!this.isConnected||void 0===this.hass||null!==(t=this.hassSubscribeRequiredHostProps)&&void 0!==t&&t.some(t=>void 0===this[t])||(this.__unsubs=this.hassSubscribe())}}return(0,a.Cg)([(0,r.MZ)({attribute:!1})],e.prototype,"hass",void 0),e}},28375:function(t,e,o){o.d(e,{A:function(){return i}});o(3362),o(62953);var a=o(1087);const r=()=>o.e(54750).then(o.bind(o,29517)),i=(t,e)=>{(0,a.r)(t,"show-dialog",{dialogTag:"dialog-zeroconf-device-info",dialogImport:r,dialogParams:e})}},89886:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{ZeroconfConfigPanel:function(){return w}});o(18111),o(20116),o(61701),o(62953);var r=o(40445),i=o(5124),n=o(67576),s=o(22786),l=o(26300),c=o(72553),h=o(14503),d=o(54706),u=o(93905),p=o(70610),g=o(28375),v=t([l,c]);[l,c]=v.then?(await v)():v;let b,f,m,y=t=>t;class w extends((0,d.E)(i.WF)){hassSubscribe(){return[(0,p.F)(this.hass.connection,t=>{this._data=t})]}render(){return(0,i.qy)(b||(b=y` <hass-tabs-subpage-data-table .hass="${0}" .narrow="${0}" .route="${0}" .columns="${0}" .initialGroupColumn="${0}" .initialCollapsedGroups="${0}" -changed="${0}" -changed="${0}" .data="${0}" .noDataText="${0}" -click="${0}" clickable></hass-tabs-subpage-data-table> `),this.hass,this.narrow,this.route,this._columns(this.hass.localize),this._activeGrouping,this._activeCollapsed,this._handleGroupingChanged,this._handleCollapseChanged,this._dataWithIds(this._data),this.hass.localize("ui.panel.config.zeroconf.no_devices_found"),this._handleRowClicked)}_handleRowClicked(t){const e=this._data.find(e=>e.name===t.detail.id);(0,g.A)(this,{entry:e})}_handleGroupingChanged(t){this._activeGrouping=t.detail.value}_handleCollapseChanged(t){this._activeCollapsed=t.detail.value}constructor(...t){super(...t),this.narrow=!1,this.isWide=!1,this._data=[],this._activeGrouping="type",this._activeCollapsed=[],this._columns=(0,s.A)(t=>({name:{title:t("ui.panel.config.zeroconf.name"),sortable:!0,filterable:!0,showNarrow:!0,main:!0,hideable:!1,moveable:!1,direction:"asc",template:t=>(0,i.qy)(f||(f=y`${0}`),t.name.slice(0,-t.type.length-1))},type:{title:t("ui.panel.config.zeroconf.type"),filterable:!0,sortable:!0,groupable:!0},ip_addresses:{title:t("ui.panel.config.zeroconf.ip_addresses"),showNarrow:!0,filterable:!0,sortable:!1,template:t=>(0,i.qy)(m||(m=y`${0}`),t.ip_addresses.join(", "))},port:{title:t("ui.panel.config.zeroconf.port"),filterable:!0,sortable:!0}})),this._dataWithIds=(0,s.A)(t=>t.map(t=>Object.assign(Object.assign({},t),{},{id:t.name})))}}w.styles=h.RF,(0,r.Cg)([(0,n.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,r.Cg)([(0,n.MZ)({attribute:!1})],w.prototype,"route",void 0),(0,r.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"narrow",void 0),(0,r.Cg)([(0,n.MZ)({attribute:"is-wide",type:Boolean})],w.prototype,"isWide",void 0),(0,r.Cg)([(0,n.wk)()],w.prototype,"_data",void 0),(0,r.Cg)([(0,u.I)({key:"zeroconf-discovery-table-grouping",state:!1,subscribe:!1})],w.prototype,"_activeGrouping",void 0),(0,r.Cg)([(0,u.I)({key:"zeroconf-discovery-table-collapsed",state:!1,subscribe:!1})],w.prototype,"_activeCollapsed",void 0),w=(0,r.Cg)([(0,n.EM)("zeroconf-config-panel")],w),a()}catch(b){a(b)}})},69235:function(t,e,o){o.a(t,async function(t,e){try{o(3362),o(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await o.e(71055).then(o.bind(o,52370))).default),e()}catch(a){e(a)}},1)},14503:function(t,e,o){o.d(e,{RF:function(){return u},dp:function(){return v},kO:function(){return g},nA:function(){return p},og:function(){return d}});var a=o(5124);let r,i,n,s,l,c,h=t=>t;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}`)),u=(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} (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),p=(0,a.AH)(n||(n=h`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)} 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)}`)),g=(0,a.AH)(s||(s=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
)
)} all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),v=(0,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(t,e,o){o.d(e,{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(t,e,o){o.d(e,{V:function(){return r}});var a=o(37177);const r=t=>!!t&&a.n},37177:function(t,e,o){o.d(e,{n:function(){return a}});o(27495);const a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);