UNPKG

iobroker.lovelace

Version:

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

37 lines 30.7 kB
/*! For license information please see 26184.9d0aea063fe4cfd1.js.LICENSE.txt */ export const __rspack_esm_id=26184;export const __rspack_esm_ids=[26184];export const __webpack_modules__={12451(t,a,e){e.d(a,{O:()=>r,i:()=>i.is});var o=e(5124),i=e(12130);class r extends o.WF{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}},12130(t,a,e){e.d(a,{SE:()=>d,U9:()=>l,hP:()=>o,is:()=>i});e(44114);const o=t=>t.nodeType===Node.ELEMENT_NODE;function i(t){return{addClass:a=>{t.classList.add(a)},removeClass:a=>{t.classList.remove(a)},hasClass:a=>t.classList.contains(a)}}let r=!1;const n=()=>{},s={get passive(){return r=!0,!1}};document.addEventListener("x",n,s),document.removeEventListener("x",n);const l=(t=window.document)=>{let a=t.activeElement;const e=[];if(!a)return e;for(;a&&(e.push(a),a.shadowRoot);)a=a.shadowRoot.activeElement;return e},d=t=>{const a=l();if(!a.length)return!1;const e=a[a.length-1],o=new Event("check-if-focused",{bubbles:!0,composed:!0});let i=[];const r=t=>{i=t.composedPath()};return document.body.addEventListener("check-if-focused",r),e.dispatchEvent(o),document.body.removeEventListener("check-if-focused",r),-1!==i.indexOf(t)}},26218(t,a,e){e.d(a,{a:()=>i});const o=(0,e(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(a,e)=>{if("object"==typeof e)throw new Error("This decorator does not support this compilation type.");const i=a.connectedCallback;a.connectedCallback=function(){i.call(this);const a=this[e];a&&this.updateComplete.then(()=>{const e=this.renderRoot.querySelector(t);e&&setTimeout(()=>{e.scrollTop=a},0)})};const r=Object.getOwnPropertyDescriptor(a,e);let n;if(void 0===r)n={get(){return this[`__${String(e)}`]||history.state?.scrollPosition},set(t){o(t),this[`__${String(e)}`]=t},configurable:!0,enumerable:!0};else{const t=r.set;n={...r,set(a){o(a),this[`__${String(e)}`]=a,t?.call(this,a)}}}Object.defineProperty(a,e,n)}}},77796(t,a,e){e.d(a,{n:()=>o});const o=(t,a,e=!0,o=!0)=>{let i,r=0;const n=(...n)=>{const s=()=>{r=!1===e?0:Date.now(),i=void 0,t(...n)},l=Date.now();r||!1!==e||(r=l);const d=a-(l-r);d<=0||d>a?(i&&(clearTimeout(i),i=void 0),r=l,t(...n)):i||!1===o||(i=window.setTimeout(s,d))};return n.cancel=()=>{clearTimeout(i),i=void 0,r=0},n}},76776(t,a,e){var o=e(62826),i=e(5124),r=e(22441);class n extends i.WF{render(){return i.qy` ${this.header?i.qy`<h1 class="card-header">${this.header}</h1>`:i.s6} <slot></slot> `}constructor(...t){super(...t),this.raised=!1}}n.styles=i.AH`: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,o.Cg)([(0,r.MZ)()],n.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],n.prototype,"raised",void 0),n=(0,o.Cg)([(0,r.EM)("ha-card")],n)},90248(t,a,e){e.a(t,async function(t,o){try{e.r(a),e.d(a,{HaIconButtonArrowPrev:()=>p});var i=e(62826),r=e(5124),n=e(22441),s=e(63091),l=e(26300),d=t([l]);l=(d.then?(await d)():d)[0];const c="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",h="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(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?h:c}}(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),o()}catch(t){o(t)}})},26300(t,a,e){e.a(t,async function(t,o){try{e.r(a),e.d(a,{HaIconButton:()=>c});var i=e(62826),r=e(5124),n=e(22441),s=e(63672),l=e(18350),d=(e(67094),t([l]));l=(d.then?(await d)():d)[0];class c extends r.WF{render(){return r.qy` <ha-button appearance="plain" variant="neutral" aria-label="${(0,s.J)(this.label)}" title="${(0,s.J)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,s.J)(this.ariaHasPopup)}" .disabled="${this.disabled}" .iconTag="${this.path?"ha-svg-icon":"span"}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"> ${this.path?r.qy`<ha-svg-icon aria-hidden="true" .path="${this.path}"></ha-svg-icon>`:r.qy`<span><slot></slot></span>`} </ha-button> `}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}c.shadowRootOptions={mode:"open",delegatesFocus:!0},c.styles=r.AH`: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,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],c.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],c.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],c.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],c.prototype,"hideTitle",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"selected",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"download",void 0),c=(0,i.Cg)([(0,n.EM)("ha-icon-button")],c),o()}catch(t){o(t)}})},43661(t,a,e){e.r(a),e.d(a,{HaIconNext:()=>s});var o=e(62826),i=e(22441),r=e(63091),n=e(67094);class s extends n.HaSvgIcon{constructor(...t){super(...t),this.path="rtl"===r.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,o.Cg)([(0,i.MZ)()],s.prototype,"path",void 0),s=(0,o.Cg)([(0,i.EM)("ha-icon-next")],s)},28732(t,a,e){var o=e(62826),i=e(27686),r=e(7731),n=e(5124),s=e(22441);class l extends i.J{renderRipple(){return this.noninteractive?"":super.renderRipple()}static get styles(){return[r.R,n.AH`:host{padding-left:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-inline-start:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-right:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px));padding-inline-end:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px))}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:48px}span.material-icons:first-of-type{margin-inline-start:0px!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important;direction:var(--direction)!important}span.material-icons:last-of-type{margin-inline-start:auto!important;margin-inline-end:0px!important;direction:var(--direction)!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);align-items:center;flex-shrink:0}:host([graphic=icon]:not([twoline])) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,20px)!important}:host([multiline-secondary]){height:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__text{padding:8px 0}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text{text-overflow:initial;white-space:normal;overflow:auto;display:inline-block;margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text::before{display:none}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text::before{display:none}:host([disabled]){color:var(--disabled-text-color)}:host([noninteractive]){pointer-events:unset}`,"rtl"===document.dir?n.AH`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`:n.AH``]}}l=(0,o.Cg)([(0,s.EM)("ha-list-item")],l)},8630(t,a,e){var o=e(62826),i=e(68618),r=e(11081),n=e(22441);class s extends i.iY{}s.styles=r.R,s=(0,o.Cg)([(0,n.EM)("ha-list")],s)},2054(t,a,e){e.a(t,async function(t,a){try{var o=e(62826),i=e(5124),r=e(22441),n=e(1087),s=e(44249),l=e(26300),d=t([l]);l=(d.then?(await d)():d)[0];const c="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class h 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 t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return i.qy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${c}" @click="${this._toggleMenu}"></ha-icon-button> ${t?i.qy`<div class="dot"></div>`:""} `}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const a=t.has("hass")?t.get("hass"):this.hass,e=t.has("narrow")?t.get("narrow"):this.narrow,o=!1===a?.kioskMode&&(e||"always_hidden"===a?.dockedSidebar),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&o===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,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}}h.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,o.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,o.Cg)([(0,r.wk)()],h.prototype,"_hasNotifications",void 0),(0,o.Cg)([(0,r.wk)()],h.prototype,"_show",void 0),h=(0,o.Cg)([(0,r.EM)("ha-menu-button")],h),a()}catch(t){a(t)}})},65829(t,a,e){e.a(t,async function(t,o){try{e.r(a),e.d(a,{HaSpinner:()=>d});var i=e(62826),r=e(55262),n=e(5124),s=e(22441),l=t([r]);r=(l.then?(await l)():l)[0];class d extends r.A{updated(t){if(super.updated(t),t.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[r.A.styles,n.AH`: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,i.Cg)([(0,s.MZ)()],d.prototype,"size",void 0),d=(0,i.Cg)([(0,s.EM)("ha-spinner")],d),o()}catch(t){o(t)}})},67094(t,a,e){e.r(a),e.d(a,{HaSvgIcon:()=>n});var o=e(62826),i=e(5124),r=e(22441);class n extends i.WF{render(){return i.JW` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?i.JW`<path class="primary-path" d="${this.path}"></path>`:i.s6} ${this.secondaryPath?i.JW`<path class="secondary-path" d="${this.secondaryPath}"></path>`:i.s6} </g> </svg>`}}n.styles=i.AH`: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,o.Cg)([(0,r.MZ)()],n.prototype,"path",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"secondaryPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"viewBox",void 0),n=(0,o.Cg)([(0,r.EM)("ha-svg-icon")],n)},44249(t,a,e){e.d(a,{V:()=>o});const o=(t,a)=>{const e=new i,o=t.subscribeMessage(t=>a(e.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{o.then(t=>t?.())}};class i{processMessage(t){if("removed"===t.type)for(const a of Object.keys(t.notifications))delete this.notifications[a];else this.notifications={...this.notifications,...t.notifications};return Object.values(this.notifications)}constructor(){this.notifications={}}}},23296(t,a,e){e.a(t,async function(t,o){try{e.r(a);var i=e(62826),r=e(5124),n=e(22441),s=e(91926),l=e(65829),d=e(90248),c=e(2054),h=e(14503),p=t([l,d,c]);[l,d,c]=p.then?(await p)():p;class g extends r.WF{render(){return r.qy` ${this.noToolbar?"":r.qy`<div class="toolbar"> ${this.rootnav||history.state?.root?r.qy` <ha-menu-button .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `:r.qy` <ha-icon-button-arrow-prev .hass="${this.hass}" @click="${this._handleBack}"></ha-icon-button-arrow-prev> `} </div>`} <div class="content"> <ha-spinner></ha-spinner> ${this.message?r.qy`<div id="loading-text">${this.message}</div>`:r.s6} </div> `}_handleBack(){(0,s.OE)()}static get styles(){return[h.RF,r.AH`: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(...t){super(...t),this.noToolbar=!1,this.rootnav=!1,this.narrow=!1}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,attribute:"no-toolbar"})],g.prototype,"noToolbar",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],g.prototype,"rootnav",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],g.prototype,"narrow",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"message",void 0),g=(0,i.Cg)([(0,n.EM)("hass-loading-screen")],g),o()}catch(t){o(t)}})},81310(t,a,e){e.a(t,async function(t,a){try{var o=e(62826),i=e(5124),r=e(22441),n=e(6412),s=e(26218),l=e(91926),d=e(90248),c=e(2054),h=e(14503),p=t([d,c]);[d,c]=p.then?(await p)():p;class g extends i.WF{render(){return i.qy` <div class="toolbar ${(0,n.H)({narrow:this.narrow})}"> <div class="toolbar-content"> ${this.mainPage||history.state?.root?i.qy` <ha-menu-button .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `:this.backPath?i.qy` <ha-icon-button-arrow-prev href="${this.backPath}" .hass="${this.hass}"></ha-icon-button-arrow-prev> `:i.qy` <ha-icon-button-arrow-prev .hass="${this.hass}" @click="${this._backTapped}"></ha-icon-button-arrow-prev> `} <div class="main-title"> <slot name="header">${this.header}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${(0,n.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable})}" @scroll="${this._saveScrollPos}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.OE)()}static get styles(){return[h.dp,i.AH`: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(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)()],g.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,attribute:"main-page"})],g.prototype,"mainPage",void 0),(0,o.Cg)([(0,r.MZ)({type:String,attribute:"back-path"})],g.prototype,"backPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"backCallback",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],g.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],g.prototype,"scrollable",void 0),(0,o.Cg)([(0,s.a)(".content")],g.prototype,"_savedScrollPos",void 0),(0,o.Cg)([(0,r.Ls)({passive:!0})],g.prototype,"_saveScrollPos",null),g=(0,o.Cg)([(0,r.EM)("hass-subpage")],g),a()}catch(t){a(t)}})},59729(t,a,e){e.a(t,async function(t,o){try{e.r(a);e(18111),e(22489),e(61701);var i=e(62826),r=e(5124),n=e(22441),s=(e(76776),e(43661),e(8630),e(28732),e(23296)),l=e(81310),d=e(77423),c=e(14503),h=e(91926),p=e(52220),g=t([s,l]);[s,l]=g.then?(await g)():g;class v extends r.WF{async firstUpdated(t){super.firstUpdated(t),await this._fetchConfigEntries()}render(){return this._configEntries?0===this._configEntries.length?r.qy` <hass-subpage header="Z-Wave" .narrow="${this.narrow}" .hass="${this.hass}"> <div class="content"> <ha-card> <div class="card-content"> <p> ${this.hass.localize("ui.panel.config.zwave_js.picker.no_entries")} </p> </div> </ha-card> </div> </hass-subpage> `:r.qy` <hass-subpage header="Z-Wave" .narrow="${this.narrow}" .hass="${this.hass}"> <div class="content"> <ha-card .header="${this.hass.localize("ui.panel.config.zwave_js.picker.title")}"> <ha-list> ${this._configEntries.map(t=>r.qy` <a href="/config/zwave_js/dashboard?config_entry=${t.entry_id}"> <ha-list-item hasMeta> <span>${t.title}</span> <ha-icon-next slot="meta"></ha-icon-next> </ha-list-item> </a> `)} </ha-list> </ha-card> </div> </hass-subpage> `:r.qy`<hass-loading-screen></hass-loading-screen>`}async _fetchConfigEntries(){const t=await(0,d.VN)(this.hass,{domain:"zwave_js"});this._configEntries=t.filter(t=>null===t.disabled_by&&"ignore"!==t.source).sort((t,a)=>(0,p.SH)(t.title,a.title)),1===this._configEntries.length&&(0,h.oo)(`/config/zwave_js/dashboard?config_entry=${this._configEntries[0].entry_id}`,{replace:!0})}static get styles(){return[c.RF,r.AH`.content{padding:24px;display:flex;justify-content:center}ha-card{max-width:600px;width:100%}.card-header{font-size:20px;font-weight:500;padding:16px;padding-bottom:0}a{text-decoration:none;color:inherit}ha-list{--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-4)}`]}constructor(...t){super(...t),this.narrow=!1}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],v.prototype,"narrow",void 0),(0,i.Cg)([(0,n.wk)()],v.prototype,"_configEntries",void 0),v=(0,i.Cg)([(0,n.EM)("zwave_js-config-entry-picker")],v),o()}catch(t){o(t)}})},14503(t,a,e){e.d(a,{RF:()=>r,dp:()=>l,kO:()=>s,nA:()=>n,og:()=>i});var o=e(5124);const i=o.AH`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`,r=o.AH`: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)}${i} .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}`,n=o.AH`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)}`,s=o.AH`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}}`,l=o.AH`.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}`;o.AH`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`},35370(t,a,e){var o=e(26198);t.exports=function(t,a,e){for(var i=0,r=arguments.length>2?e:o(a),n=new t(r);r>i;)n[i]=a[i++];return n}},77957(t,a,e){var o=e(76080),i=e(79504),r=e(47055),n=e(48981),s=e(56969),l=e(26198),d=e(2360),c=e(35370),h=Array,p=i([].push);t.exports=function(t,a,e,i){for(var g,v,u,f=n(t),m=r(f),b=o(a,e),y=d(null),x=l(m),w=0;x>w;w++)u=m[w],(v=s(b(u,w,f)))in y?p(y[v],u):y[v]=[u];if(i&&(g=i(f))!==h)for(v in y)y[v]=c(g,y[v]);return y}},46058(t,a,e){var o=e(46518),i=e(77957),r=e(6469);o({target:"Array",proto:!0},{group:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r("group")},89784(t,a,e){e.d(a,{W:()=>s});e(74423),e(18111),e(18237),e(17642),e(58004),e(33853),e(45876),e(32475),e(15024),e(31698);var o=e(5055),i=e(42017);const r="important",n=" !"+r,s=(0,i.u$)(class extends i.WL{render(t){return Object.keys(t).reduce((a,e)=>{const o=t[e];return null==o?a:a+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(t,[a]){const{style:e}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(a)),this.render(a);for(const t of this.ft)null==a[t]&&(this.ft.delete(t),t.includes("-")?e.removeProperty(t):e[t]=null);for(const t in a){const o=a[t];if(null!=o){this.ft.add(t);const a="string"==typeof o&&o.endsWith(n);t.includes("-")||a?e.setProperty(t,a?o.slice(0,-11):o,a?r:""):e[t]=o}}return o.c0}constructor(t){if(super(t),t.type!==i.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}})}};