iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
12 lines • 90.5 kB
JavaScript
export const __webpack_ids__=["16930"];export const __webpack_modules__={17803:function(e,t,i){i.d(t,{I:()=>a,_:()=>n});const a=(e,t,i,a)=>{const[n,o,s]=e.split(".",3);return Number(n)>t||Number(n)===t&&(void 0===a?Number(o)>=i:Number(o)>i)||void 0!==a&&Number(n)===t&&Number(o)===i&&Number(s)>=a},n=e=>e.includes("dev")},31146:function(e,t,i){i.d(t,{i:()=>n});const a=(0,i(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),n=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){a(e),this[`__${String(t.key)}`]=e},get(){return this[`__${String(t.key)}`]||history.state?.scrollPosition},enumerable:!0,configurable:!0},finisher(i){const a=i.prototype.connectedCallback;i.prototype.connectedCallback=function(){a.call(this);const i=this[t.key];i&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=i}),0)}))}}})},87865:function(e,t,i){i.d(t,{v:()=>a});const a=async(e,t)=>{if(navigator.clipboard)try{return void await navigator.clipboard.writeText(e)}catch{}const i=t??document.body,a=document.createElement("textarea");a.value=e,i.appendChild(a),a.select(),document.execCommand("copy"),i.removeChild(a)}},93826:function(e,t,i){i.d(t,{P:()=>a});const a=(e,t,i=!0,a=!0)=>{let n,o=0;const s=(...s)=>{const r=()=>{o=!1===i?0:Date.now(),n=void 0,e(...s)},d=Date.now();o||!1!==i||(o=d);const l=t-(d-o);l<=0||l>t?(n&&(clearTimeout(n),n=void 0),o=d,e(...s)):n||!1===a||(n=window.setTimeout(r,l))};return s.cancel=()=>{clearTimeout(n),n=void 0,o=0},s}},99426:function(e,t,i){i.r(t);var a=i(44249),n=i(57243),o=i(15093),s=i(35359),r=i(36522);i(23334),i(37583);const d={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};(0,a.Z)([(0,o.Mo)("ha-alert")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"title",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({attribute:"alert-type"})],key:"alertType",value:()=>"info"},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"dismissable",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"method",key:"render",value:function(){return n.dy` <div class="issue-type ${(0,s.$)({[this.alertType]:!0})}" role="alert"> <div class="icon ${this.title?"":"no-title"}"> <slot name="icon"> <ha-svg-icon .path="${d[this.alertType]}"></ha-svg-icon> </slot> </div> <div class="${(0,s.$)({content:!0,narrow:this.narrow})}"> <div class="main-content"> ${this.title?n.dy`<div class="title">${this.title}</div>`:n.Ld} <slot></slot> </div> <div class="action"> <slot name="action"> ${this.dismissable?n.dy`<ha-icon-button @click="${this._dismissClicked}" label="Dismiss alert" .path="${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}"></ha-icon-button>`:n.Ld} </slot> </div> </div> </div> `}},{kind:"method",key:"_dismissClicked",value:function(){(0,r.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`}]}}),n.oi)},34273:function(e,t,i){var a=i(44249),n=i(72621),o=(i(9359),i(31526),i(22997),i(57243)),s=i(15093),r=i(5111),d=i(76525);(0,a.Z)([(0,s.Mo)("ha-button-menu")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:d.gA,value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"corner",value:()=>"BOTTOM_START"},{kind:"field",decorators:[(0,s.Cb)({attribute:"menu-corner"})],key:"menuCorner",value:()=>"START"},{kind:"field",decorators:[(0,s.Cb)({type:Number})],key:"x",value:()=>null},{kind:"field",decorators:[(0,s.Cb)({type:Number})],key:"y",value:()=>null},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"multi",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"activatable",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"fixed",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,attribute:"no-anchor"})],key:"noAnchor",value:()=>!1},{kind:"field",decorators:[(0,s.IO)("mwc-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){return this._menu?.items}},{kind:"get",key:"selected",value:function(){return this._menu?.selected}},{kind:"method",key:"focus",value:function(){this._menu?.open?this._menu.focusItemAtIndex(0):this._triggerButton?.focus()}},{kind:"method",key:"render",value:function(){return o.dy` <div @click="${this._handleClick}"> <slot name="trigger" @slotchange="${this._setTriggerAria}"></slot> </div> <mwc-menu .corner="${this.corner}" .menuCorner="${this.menuCorner}" .fixed="${this.fixed}" .multi="${this.multi}" .activatable="${this.activatable}" .y="${this.y}" .x="${this.x}"> <slot></slot> </mwc-menu> `}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),"rtl"===r.E.document.dir&&this.updateComplete.then((()=>{this.querySelectorAll("mwc-list-item").forEach((e=>{const t=document.createElement("style");t.innerHTML="span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}",e.shadowRoot.appendChild(t)}))}))}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchor=this.noAnchor?null:this,this._menu.show())}},{kind:"get",key:"_triggerButton",value:function(){return this.querySelector('ha-icon-button[slot="trigger"], mwc-button[slot="trigger"]')}},{kind:"method",key:"_setTriggerAria",value:function(){this._triggerButton&&(this._triggerButton.ariaHasPopup="menu")}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`}]}}),o.oi)},59826:function(e,t,i){var a=i(44249),n=i(31622),o=i(57243),s=i(15093),r=i(22344);(0,a.Z)([(0,s.Mo)("ha-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[r.W,o.iv`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}:host([destructive]){--mdc-theme-primary:var(--error-color)}`]}]}}),n.Button)},54977:function(e,t,i){var a=i(44249),n=i(57243),o=i(15093);(0,a.Z)([(0,o.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"raised",value:()=>!1},{kind:"field",static:!0,key:"styles",value:()=>n.iv`: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,12px);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, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`},{kind:"method",key:"render",value:function(){return n.dy` ${this.header?n.dy`<h1 class="card-header">${this.header}</h1>`:n.Ld} <slot></slot> `}}]}}),n.oi)},83456:function(e,t,i){var a=i(44249),n=i(92444),o=i(76688),s=i(57243),r=i(15093);(0,a.Z)([(0,r.Mo)("ha-checkbox")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[o.W,s.iv`:host{--mdc-theme-secondary:var(--primary-color)}`]}]}}),n.A)},41307:function(e,t,i){var a=i(44249),n=i(72621),o=i(57243),s=i(15093),r=i(35359),d=i(36522),l=i(76320);i(37583);(0,a.Z)([(0,s.Mo)("ha-expansion-panel")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"expanded",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"outlined",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({attribute:"left-chevron",type:Boolean,reflect:!0})],key:"leftChevron",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({attribute:"no-collapse",type:Boolean,reflect:!0})],key:"noCollapse",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"secondary",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_showContent",value(){return this.expanded}},{kind:"field",decorators:[(0,s.IO)(".container")],key:"_container",value:void 0},{kind:"method",key:"render",value:function(){const e=this.noCollapse?o.Ld:o.dy` <ha-svg-icon .path="${"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}" class="summary-icon ${(0,r.$)({expanded:this.expanded})}"></ha-svg-icon> `;return o.dy` <div class="top ${(0,r.$)({expanded:this.expanded})}"> <div id="summary" class="${(0,r.$)({noCollapse:this.noCollapse})}" @click="${this._toggleContainer}" @keydown="${this._toggleContainer}" @focus="${this._focusChanged}" @blur="${this._focusChanged}" role="button" tabindex="${this.noCollapse?-1:0}" aria-expanded="${this.expanded}" aria-controls="sect1"> ${this.leftChevron?e:o.Ld} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${this.header} <slot class="secondary" name="secondary">${this.secondary}</slot> </div> </slot> ${this.leftChevron?o.Ld:e} <slot name="icons"></slot> </div> </div> <div class="container ${(0,r.$)({expanded:this.expanded})}" @transitionend="${this._handleTransitionEnd}" role="region" aria-labelledby="summary" aria-hidden="${!this.expanded}" tabindex="-1"> ${this._showContent?o.dy`<slot></slot>`:""} </div> `}},{kind:"method",key:"willUpdate",value:function(e){(0,n.Z)(i,"willUpdate",this,3)([e]),e.has("expanded")&&(this._showContent=this.expanded,setTimeout((()=>{this._container.style.overflow=this.expanded?"initial":"hidden"}),300))}},{kind:"method",key:"_handleTransitionEnd",value:function(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}},{kind:"method",key:"_toggleContainer",value:async function(e){if(e.defaultPrevented)return;if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;if(e.preventDefault(),this.noCollapse)return;const t=!this.expanded;(0,d.B)(this,"expanded-will-change",{expanded:t}),this._container.style.overflow="hidden",t&&(this._showContent=!0,await(0,l.y)());const i=this._container.scrollHeight;this._container.style.height=`${i}px`,t||setTimeout((()=>{this._container.style.height="0px"}),0),this.expanded=t,(0,d.B)(this,"expanded-changed",{expanded:this.expanded})}},{kind:"method",key:"_focusChanged",value:function(e){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===e.type)}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,12px)}.top.expanded{border-bottom-left-radius:0px;border-bottom-right-radius:0px}.top.focused{background:var(--input-fill-color)}:host([outlined]){box-shadow:none;border-width:1px;border-style:solid;border-color:var(--outline-color);border-radius:var(--ha-card-border-radius,12px)}.summary-icon{transition:transform 150ms cubic-bezier(.4, 0, .2, 1);direction:var(--direction);margin-left:8px;margin-inline-start:8px;margin-inline-end:initial}::slotted([slot=leading-icon]),:host([left-chevron]) .summary-icon{margin-left:0;margin-right:8px;margin-inline-start:0;margin-inline-end:8px}#summary{flex:1;display:flex;padding:var(--expansion-panel-summary-padding,0 8px);min-height:48px;align-items:center;cursor:pointer;overflow:hidden;font-weight:500;outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1}.container{padding:var(--expansion-panel-content-padding,0 8px);overflow:hidden;transition:height .3s cubic-bezier(.4, 0, .2, 1);height:0px}.container.expanded{height:auto}.secondary{display:block;color:var(--secondary-text-color);font-size:12px}`}]}}),o.oi)},55486:function(e,t,i){var a=i(44249),n=i(4918),o=i(6394),s=i(57243),r=i(15093),d=i(35359),l=i(36522);(0,a.Z)([(0,r.Mo)("ha-formfield")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"method",key:"render",value:function(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return s.dy` <div class="mdc-form-field ${(0,d.$)(e)}"> <slot></slot> <label class="mdc-label" @click="${this._labelClick}"> <slot name="label">${this.label}</slot> </label> </div>`}},{kind:"method",key:"_labelClick",value:function(){const e=this.input;if(e&&(e.focus(),!e.disabled))switch(e.tagName){case"HA-CHECKBOX":e.checked=!e.checked,(0,l.B)(e,"change");break;case"HA-RADIO":e.checked=!0,(0,l.B)(e,"change");break;default:e.click()}}},{kind:"field",static:!0,key:"styles",value:()=>[o.W,s.iv`:host(:not([alignEnd])) ::slotted(ha-switch){margin-right:10px;margin-inline-end:10px;margin-inline-start:inline}.mdc-form-field{align-items:var(--ha-formfield-align-items,center);gap:4px}.mdc-form-field>label{direction:var(--direction);margin-inline-start:0;margin-inline-end:auto;padding:0}:host([disabled]) label{color:var(--disabled-text-color)}`]}]}}),n.a)},54202:function(e,t,i){i.r(t),i.d(t,{HaIconButtonArrowPrev:()=>r});var a=i(44249),n=i(57243),o=i(15093),s=i(5111);i(23334);let r=(0,a.Z)([(0,o.Mo)("ha-icon-button-arrow-prev")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_icon",value:()=>"rtl"===s.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"},{kind:"method",key:"render",value:function(){return n.dy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}"></ha-icon-button> `}}]}}),n.oi)},23334:function(e,t,i){i.r(t),i.d(t,{HaIconButton:()=>r});var a=i(44249),n=(i(74269),i(57243)),o=i(15093),s=i(20552);i(37583);let r=(0,a.Z)([(0,o.Mo)("ha-icon-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"hide-title",type:Boolean})],key:"hideTitle",value:()=>!1},{kind:"field",decorators:[(0,o.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){this._button?.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value:()=>({mode:"open",delegatesFocus:!0})},{kind:"method",key:"render",value:function(){return n.dy` <mwc-icon-button aria-label="${(0,s.o)(this.label)}" title="${(0,s.o)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,s.o)(this.ariaHasPopup)}" .disabled="${this.disabled}"> ${this.path?n.dy`<ha-svg-icon .path="${this.path}"></ha-svg-icon>`:n.dy`<slot></slot>`} </mwc-icon-button> `}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}`}]}}),n.oi)},7285:function(e,t,i){i.d(t,{M:()=>l});var a=i(44249),n=i(72621),o=i(65703),s=i(46289),r=i(57243),d=i(15093);let l=(0,a.Z)([(0,d.Mo)("ha-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,n.Z)(i,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[s.W,r.iv`: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?r.iv`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`:r.iv``]}}]}}),o.K)},43344:function(e,t,i){var a=i(44249),n=i(72621),o=i(57243),s=i(15093),r=i(36522),d=i(83716);i(23334);(0,a.Z)([(0,s.Mo)("ha-menu-button")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"hassio",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_hasNotifications",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_show",value:()=>!1},{kind:"field",key:"_alwaysVisible",value:()=>!1},{kind:"field",key:"_attachNotifOnConnect",value:()=>!1},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,n.Z)(i,"connectedCallback",this,3)([]),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(i,"disconnectedCallback",this,3)([]),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return o.Ld;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return o.dy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"}" @click="${this._toggleMenu}"></ha-icon-button> ${e?o.dy`<div class="dot"></div>`:""} `}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(e){if((0,n.Z)(i,"willUpdate",this,3)([e]),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,a=(e.has("narrow")?e.get("narrow"):this.narrow)||"always_hidden"===t?.dockedSidebar,o=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&a===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}},{kind:"method",key:"_subscribeNotifications",value:function(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,d.r)(this.hass.connection,(e=>{this._hasNotifications=e.length>0}))}},{kind:"method",key:"_toggleMenu",value:function(){(0,r.B)(this,"hass-toggle-menu")}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`: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:50%;border:2px solid var(--app-header-background-color)}`}]}}),o.oi)},34326:function(e,t,i){var a=i(44249),n=i(57243),o=i(15093);i(23334),i(83166);(0,a.Z)([(0,o.Mo)("ha-password-field")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"icon",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"iconTrailing",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"value",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"placeholder",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"label",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"minLength",value:()=>-1},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"maxLength",value:()=>-1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"outlined",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"helper",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"validateOnInitialRender",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"validationMessage",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"autoValidate",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"pattern",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"size",value:()=>null},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"helperPersistent",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"charCounter",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"endAligned",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"prefix",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"suffix",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:String})],key:"name",value:()=>""},{kind:"field",decorators:[(0,o.Cb)({type:String,attribute:"input-mode"})],key:"inputMode",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"readOnly",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({attribute:!1,type:String})],key:"autocapitalize",value:()=>""},{kind:"field",decorators:[(0,o.SB)()],key:"_unmaskedPassword",value:()=>!1},{kind:"field",decorators:[(0,o.IO)("ha-textfield")],key:"_textField",value:void 0},{kind:"method",key:"render",value:function(){return n.dy`<ha-textfield .invalid="${this.invalid}" .errorMessage="${this.errorMessage}" .icon="${this.icon}" .iconTrailing="${this.iconTrailing}" .autocomplete="${this.autocomplete}" .autocorrect="${this.autocorrect}" .inputSpellcheck="${this.inputSpellcheck}" .value="${this.value}" .placeholder="${this.placeholder}" .label="${this.label}" .disabled="${this.disabled}" .required="${this.required}" .minLength="${this.minLength}" .maxLength="${this.maxLength}" .outlined="${this.outlined}" .helper="${this.helper}" .validateOnInitialRender="${this.validateOnInitialRender}" .validationMessage="${this.validationMessage}" .autoValidate="${this.autoValidate}" .pattern="${this.pattern}" .size="${this.size}" .helperPersistent="${this.helperPersistent}" .charCounter="${this.charCounter}" .endAligned="${this.endAligned}" .prefix="${this.prefix}" .name="${this.name}" .inputMode="${this.inputMode}" .readOnly="${this.readOnly}" .autocapitalize="${this.autocapitalize}" .type="${this._unmaskedPassword?"text":"password"}" .suffix="${n.dy`<div style="width:24px"></div>`}" @input="${this._handleInputEvent}" @change="${this._handleChangeEvent}"></ha-textfield> <ha-icon-button .label="${this.hass?.localize(this._unmaskedPassword?"ui.components.selectors.text.hide_password":"ui.components.selectors.text.show_password")||(this._unmaskedPassword?"Hide password":"Show password")}" @click="${this._toggleUnmaskedPassword}" .path="${this._unmaskedPassword?"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z":"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}"></ha-icon-button>`}},{kind:"method",key:"focus",value:function(){this._textField.focus()}},{kind:"method",key:"checkValidity",value:function(){return this._textField.checkValidity()}},{kind:"method",key:"reportValidity",value:function(){return this._textField.reportValidity()}},{kind:"method",key:"setCustomValidity",value:function(e){return this._textField.setCustomValidity(e)}},{kind:"method",key:"layout",value:function(){return this._textField.layout()}},{kind:"method",key:"_toggleUnmaskedPassword",value:function(){this._unmaskedPassword=!this._unmaskedPassword}},{kind:"method",decorators:[(0,o.hO)({passive:!0})],key:"_handleInputEvent",value:function(e){this.value=e.target.value}},{kind:"method",decorators:[(0,o.hO)({passive:!0})],key:"_handleChangeEvent",value:function(e){this.value=e.target.value,this._reDispatchEvent(e)}},{kind:"method",key:"_reDispatchEvent",value:function(e){const t=new Event(e.type,e);this.dispatchEvent(t)}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:block;position:relative}ha-textfield{width:100%}ha-icon-button{position:absolute;top:8px;right:8px;inset-inline-start:initial;inset-inline-end:8px;--mdc-icon-button-size:40px;--mdc-icon-size:20px;color:var(--secondary-text-color);direction:var(--direction)}`}]}}),n.oi)},72781:function(e,t,i){var a=i(44249),n=i(47711),o=i(81577),s=i(57243),r=i(15093);(0,a.Z)([(0,r.Mo)("ha-radio")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[o.W,s.iv`:host{--mdc-theme-secondary:var(--primary-color)}`]}]}}),n.J)},30509:function(e,t,i){var a=i(44249),n=i(57243),o=i(15093);(0,a.Z)([(0,o.Mo)("ha-settings-row")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"slim",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,attribute:"three-line"})],key:"threeLine",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,attribute:"wrap-heading",reflect:!0})],key:"wrapHeading",value:()=>!1},{kind:"method",key:"render",value:function(){return n.dy` <div class="prefix-wrap"> <slot name="prefix"></slot> <div class="body" ?two-line="${!this.threeLine}" ?three-line="${this.threeLine}"> <slot name="heading"></slot> <div class="secondary"><slot name="description"></slot></div> </div> </div> <div class="content"><slot></slot></div> `}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:flex;padding:0 16px;align-content:normal;align-self:auto;align-items:center}.body{padding-top:8px;padding-bottom:8px;padding-left:0;padding-inline-start:0;padding-right:16px;padding-inline-end:16px;overflow:hidden;display:var(--layout-vertical_-_display,flex);flex-direction:var(--layout-vertical_-_flex-direction,column);justify-content:var(--layout-center-justified_-_justify-content,center);flex:var(--layout-flex_-_flex,1);flex-basis:var(--layout-flex_-_flex-basis,0.000000001px)}.body[three-line]{min-height:var(--paper-item-body-three-line-min-height,88px)}:host(:not([wrap-heading])) body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body>.secondary{display:block;padding-top:4px;font-family:var(
--mdc-typography-body2-font-family,
var(--mdc-typography-font-family, Roboto, sans-serif)
);-webkit-font-smoothing:antialiased;font-size:var(--mdc-typography-body2-font-size, .875rem);font-weight:var(--mdc-typography-body2-font-weight,400);line-height:normal;color:var(--secondary-text-color)}.body[two-line]{min-height:calc(var(--paper-item-body-two-line-min-height,72px) - 16px);flex:1}.content{display:contents}:host(:not([narrow])) .content{display:var(--settings-row-content-display,flex);justify-content:flex-end;flex:1;padding:16px 0}.content ::slotted(*){width:var(--settings-row-content-width)}:host([narrow]){align-items:normal;flex-direction:column;border-top:1px solid var(--divider-color);padding-bottom:8px}::slotted(ha-switch){padding:16px 0}.secondary{white-space:normal}.prefix-wrap{display:var(--settings-row-prefix-display)}:host([narrow]) .prefix-wrap{display:flex;align-items:center}:host([slim]),:host([slim]) .content,:host([slim]) ::slotted(ha-switch){padding:0}:host([slim]) .body{min-height:0}`}]}}),n.oi)},17170:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaSpinner:()=>h});var n=i(44249),o=i(72621),s=i(97677),r=i(43580),d=i(57243),l=i(15093),c=e([s]);s=(c.then?(await c)():c)[0];let h=(0,n.Z)([(0,l.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,l.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,o.Z)(i,"updated",this,3)([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")}}},{kind:"field",static:!0,key:"styles",value:()=>[r.Z,d.iv`: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)}`]}]}}),s.Z);a()}catch(e){a(e)}}))},37583:function(e,t,i){i.r(t),i.d(t,{HaSvgIcon:()=>s});var a=i(44249),n=i(57243),o=i(15093);let s=(0,a.Z)([(0,o.Mo)("ha-svg-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return n.YP` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?n.YP`<path class="primary-path" d="${this.path}"></path>`:n.Ld} ${this.secondaryPath?n.YP`<path class="secondary-path" d="${this.secondaryPath}"></path>`:n.Ld} </g> </svg>`}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`: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)}`}]}}),n.oi)},1888:function(e,t,i){var a=i(44249),n=i(72621),o=i(62523),s=i(83835),r=i(57243),d=i(15093),l=i(13560);(0,a.Z)([(0,d.Mo)("ha-switch")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"haptic",value:()=>!1},{kind:"method",key:"firstUpdated",value:function(){(0,n.Z)(i,"firstUpdated",this,3)([]),this.addEventListener("change",(()=>{this.haptic&&(0,l.j)("light")}))}},{kind:"field",static:!0,key:"styles",value:()=>[s.W,r.iv`:host{--mdc-theme-secondary:var(--switch-checked-color)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:var(--switch-checked-button-color);border-color:var(--switch-checked-button-color)}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:var(--switch-checked-track-color);border-color:var(--switch-checked-track-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:var(--switch-unchecked-button-color);border-color:var(--switch-unchecked-button-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:var(--switch-unchecked-track-color);border-color:var(--switch-unchecked-track-color)}`]}]}}),o.H)},83166:function(e,t,i){var a=i(44249),n=i(72621),o=i(1105),s=i(33990),r=i(57243),d=i(15093),l=i(5111);(0,a.Z)([(0,d.Mo)("ha-textfield")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"icon",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"iconTrailing",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,d.IO)("input")],key:"formElement",value:void 0},{kind:"method",key:"updated",value:function(e){(0,n.Z)(i,"updated",this,3)([e]),(e.has("invalid")||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||e.has("invalid")&&void 0!==e.get("invalid"))&&this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),e.has("autocorrect")&&(this.autocorrect?this.formElement.setAttribute("autocorrect",this.autocorrect):this.formElement.removeAttribute("autocorrect")),e.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return r.dy` <span class="mdc-text-field__icon mdc-text-field__icon--${i}" tabindex="${t?1:-1}"> <slot name="${i}Icon"></slot> </span> `}},{kind:"field",static:!0,key:"styles",value:()=>[s.W,r.iv`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){text-overflow:ellipsis;width:inherit;padding-right:30px;padding-inline-end:30px;padding-inline-start:initial;box-sizing:border-box;direction:var(--direction)}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start)}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`,"rtl"===l.E.document.dir?r.iv`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`:r.iv``]}]}}),o.P)},66929:function(e,t,i){i.d(t,{Ij:()=>n,S7:()=>a});const a=(e,t)=>e.callWS({type:"config/core/update",...t}),n=e=>e.callApi("POST","config/core/check_config")},56785:function(e,t,i){i.d(t,{js:()=>o,rY:()=>n,yd:()=>d,yz:()=>r});i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814);var a=i(17803);const n=e=>e.data,o=e=>"object"==typeof e?"object"==typeof e.body?e.body.message||"Unknown error, see supervisor logs":e.body||e.message||"Unknown error, see supervisor logs":e,s=new Set([502,503,504]),r=e=>!!(e&&e.status_code&&s.has(e.status_code))||!(!e||!e.message||!e.message.includes("ERR_CONNECTION_CLOSED")&&!e.message.includes("ERR_CONNECTION_RESET")),d=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:`/${t}/stats`,method:"get"}):n(await e.callApi("GET",`hassio/${t}/stats`))},67044:function(e,t,i){i.d(t,{AP:()=>s,MY:()=>r,Or:()=>d,Sj:()=>o,Sx:()=>c,oJ:()=>l,ou:()=>h});var a=i(17803),n=i(56785);const o=async e=>{if((0,a.I)(e.config.version,2021,2,4))return e.callWS({type:"supervisor/api",endpoint:"/host/info",method:"get"});const t=await e.callApi("GET","hassio/host/info");return(0,n.rY)(t)},s=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/info",method:"get"}):(0,n.rY)(await e.callApi("GET","hassio/os/info")),r=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/reboot",method:"post",timeout:null}):e.callApi("POST","hassio/host/reboot"),d=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/shutdown",method:"post",timeout:null}):e.callApi("POST","hassio/host/shutdown"),l=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/host/options",method:"post",data:t}):e.callApi("POST","hassio/host/options",t),c=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/datadisk/move",method:"post",timeout:null,data:{device:t}}):e.callApi("POST","hassio/os/datadisk/move"),h=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/os/datadisk/list",method:"get",timeout:null}):(0,n.rY)(await e.callApi("GET","/os/datadisk/list"))},81732:function(e,t,i){i.d(t,{Cy:()=>d,Ne:()=>r,Tg:()=>l,bR:()=>o,tJ:()=>s});i(9359),i(70104),i(48136);var a=i(17803),n=i(56785);const o=async e=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/network/info",method:"get"}):(0,n.rY)(await e.callApi("GET","hassio/network/info")),s=async(e,t,i)=>{(0,a.I)(e.config.version,2021,2,4)?await e.callWS({type:"supervisor/api",endpoint:`/network/interface/${t}/update`,method:"post",data:i,timeout:null}):await e.callApi("POST",`hassio/network/interface/${t}/update`,i)},r=async(e,t)=>(0,a.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:`/network/interface/${t}/accesspoints`,method:"get",timeout:null}):(0,n.rY)(await e.callApi("GET",`hassio/network/interface/${t}/accesspoints`)),d=e=>{const[t,i]=e.split("/"),a=t.includes(":");return{ip:t,mask:i?c(i,a):null}},l=(e,t)=>`${e}/${h(t)}`,c=(e,t=!1)=>{const i=parseInt(e,10);if(t){const e="ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",t=Math.floor(i/16),a=i%16,n=a?parseInt("1".repeat(a)+"0".repeat(16-a),2).toString(16):"";return e.split(":").slice(0,t).concat(n).concat(Array(8-t-(n?1:0)).fill("0")).join(":")}const a=~(2**(32-i)-1);return[a>>>24&255,a>>>16&255,a>>>8&255,255&a].join(".")},h=e=>e.includes(":")?e.split(":").map((e=>e?(parseInt(e,16).toString(2).match(/1/g)||[]).length:0)).reduce(((e,t)=>e+t),0):e.split(".").reduce(((e,t)=>e+(parseInt(t,10).toString(2).match(/1/g)||[]).length),0)},26011:function(e,t,i){i.d(t,{Mo:()=>a,Ws:()=>n,nC:()=>o});const a=e=>e.callWS({type:"network"}),n=(e,t)=>e.callWS({type:"network/configure",config:{configured_adapters:t}}),o=e=>e.callWS({type:"network/url"})},83716:function(e,t,i){i.d(t,{r:()=>a});const a=(e,t)=>{const i=new n,a=e.subscribeMessage((e=>t(i.processMessage(e))),{type:"persistent_notification/subscribe"});return()=>{a.then((e=>e?.()))}};class n{constructor(){this.notifications=void 0,this.notifications={}}processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications={...this.notifications,...e.notifications};return Object.values(this.notifications)}}},87979:function(e,t,i){var a=i(44249),n=i(57243),o=i(15093),s=i(31146),r=(i(54202),i(43344),i(28008));(0,a.Z)([(0,o.Mo)("hass-subpage")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"supervisor",value:()=>!1},{kind:"field",decorators:[(0,s.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){return n.dy` <div class="toolbar"> ${this.mainPage||history.state?.root?n.dy` <ha-menu-button .hassio="${this.supervisor}" .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `:this.backPath?n.dy` <a href="${this.backPath}"> <ha-icon-button-arrow-prev .hass="${this.hass}"></ha-icon-button-arrow-prev> </a> `:n.dy` <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 class="content ha-scrollbar" @scroll="${this._saveScrollPos}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `}},{kind:"method",decorators:[(0,o.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[r.$c,n.iv`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;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}}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin:var(--margin-title);line-height:20px;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;padding-bottom:1px}.content{position:relative;width:100%;height:calc(100% - 1px - var(--header-height));overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}#fab{position:absolute;right:calc(16px + env(safe-area-inset-right));inset-inline-end:calc(16px + env(safe-area-inset-right));inset-inline-start:initial;bottom:calc(16px + env(safe-area-inset-bottom));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}:host([narrow]) #fab.tabs{bottom:calc(84px + env(safe-area-inset-bottom))}#fab[is-wide]{bottom:24px;right:24px;inset-inline-end:24px;inset-inline-start:initial}`]}}]}}),n.oi)},16029:function(e,t,i){var a=i(44249),n=i(72621),o=(i(9359),i(56475),i(70104),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(31622),i(57243)),s=i(15093),r=i(72344),d=(i(99426),i(54977),i(83456),i(92745),i(36522)),l=i(28008);i(30509),i(37583);const c=e=>o.dy`${e.map(((t,i)=>[o.dy`<span>${t.address}/${t.network_prefix}</span>`,i<e.length-1?", ":o.Ld]))}`;(0,a.Z)([(0,s.Mo)("ha-network")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"networkConfig",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_expanded",value:void 0},{kind:"method",key:"render",value:function(){if(void 0===this.networkConfig)return o.Ld;const e=this.networkConfig.configured_adapters||[];return o.dy` <ha-settings-row> <span slot="prefix"> <ha-checkbox id="auto_configure" @change="${this._handleAutoConfigureCheckboxClick}" .checked="${!e.length}" name="auto_configure"> </ha-checkbox> </span> <span slot="heading" data-for="auto_configure"> ${this.hass.localize("ui.panel.config.network.adapter.auto_configure")} </span> <span slot="description" data-for="auto_configure"> ${this.hass.localize("ui.panel.config.network.adapter.detected")}: ${t=this.networkConfig.adapters,t.map((e=>e.auto?o.dy`${e.name} (${c([...e.ipv4,...e.ipv6])})`:""))} </span> </ha-settings-row> ${e.length||this._expanded?this.networkConfig.adapters.map((t=>o.dy`<ha-settings-row> <span slot="prefix"> <ha-checkbox id="${t.name}" @change="${this._handleAdapterCheckboxClick}" .checked="${e.includes(t.name)}" .adapter="${t.name}" name="${t.name}"> </ha-checkbox> </span> <span slot="heading"> ${this.hass.localize("ui.panel.config.network.adapter.adapter")}: ${t.name} ${t.default?o.dy`<ha-svg-icon .path="${"M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"}"></ha-svg-icon> (${this.hass.localize("ui.common.default")})`:o.Ld} </span> <span slot="description"> ${c([...t.ipv4,...t.ipv6])} </span> </ha-settings-row>`)):o.Ld} `;var t}},{kind:"method",key:"_handleAutoConfigureCheckboxClick",value:function(e){const t=e.currentTarget;if(void 0===this.networkConfig)return;let i=[...this.networkConfig.configured_adapters];if(t.checked)this._expanded=!1,i=[];else{this._expanded=!0;for(const e of this.networkConfig.adapters)if(e.default){i=[e.name];break}}(0,d.B)(this,"network-config-changed",{configured_adapters:i})}},{kind:"method",key:"_handleAdapterCheckboxClick",value:function(e){const t=e.currentTarget,i=t.name;if(void 0===this.networkConfig)return;const a=[...this.networkConfig.configured_adapters];if(t.checked)a.push(i);else{const e=a.indexOf(i,0);a.splice(e,1)}(0,d.B)(this,"network-config-changed",{configured_adapters:a})}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,o.iv`.error{color:var(--error-color)}ha-settings-row{padding:0;--paper-time-input-justify-content:flex-end;--settings-row-content-display:contents;--settings-row-prefix-display:contents}span[slot=description],span[slot=heading]{cursor:pointer}`]}}]}}),o.oi);var h=i(81732),u=i(26011);(0,a.Z)([(0,s.Mo)("ha-config-network")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_networkConfig",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_error",value:void 0},{kind:"method",key:"render",value:function(){return this.hass.userData?.showAdvanced&&(0,r.p)(this.hass,"network")?o.dy` <ha-card outlined header="${this.hass.localize("ui.panel.config.network.network_adapter")}"> <div class="card-content"> ${this._error?o.dy` <ha-alert alert-type="error">${this._error.message||this._error.code}</ha-alert> `:""} <p> ${this.hass.localize("ui.panel.config.network.network_adapter_info")} </p> <ha-network @network-config-changed="${this._configChanged}" .hass="${this.hass}" .networkConfig="${this._networkConfig}"></ha-network> </div> <div class="card-actions"> <mwc-button @click="${this._save}"> ${this.hass.localize("ui.panel.config.core.section.core.core_config.save_button")} </mwc-button> </div> </ha-card> `:o.Ld}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),(0,r.p)(this.hass,"network")&&this._load()}},{kind:"method",key:"_load",value:async function(){this._error=void 0;try{const e=await(0,u.Mo)(this.hass);if((0,r.p)(this.hass,"hassio")){const t=await(0,h.bR)(this.hass),i=new Set(t.interfaces.map((e=>e.interface)));i.size&&(e.adapters=e.adapters.filter((e=>i.has(e.name))))}this._networkConfig=e}catch(e){this._error=e.message||e}}},{kind:"method",key:"_save",value:async function(){this._error=void 0;try{await(0,u.Ws)(this.hass,this._networkConfig?.configured_adapters||[])}catch(e){this._error=e.message||e}}},{kind:"method",key:"_configChanged",value:function(e){this._networkConfig={...this._networkConfig,configured_adapters:e.detail.configured_adapters}}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,o.iv`.error{color:var(--error-color)}ha-settings-row{padding:0}.card-actions{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}`]}}]}}),o.oi)},59484:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t);var n=i(44249),o=i(57243),s=i(15093),r=i(72344),d=(i(87979),i(16029),i(18951),i(756)),l=i(1515),c=e([d,l]);[d,l]=c.then?(await c)():c;(0,n.Z)([(0,s.Mo)("ha-config-section-network")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"route",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"method",key:"render",value:function(){return o.dy` <hass-subpage back-path="/config/system" .hass="${this.hass}" .narrow="${this.narrow}" .header="${this.hass.localize("ui.panel.config.network.caption")}"> <div class="content"> ${(0,r.p)(this.hass,"hassio")?o.dy`<supervisor-hostname .hass="${this.hass}" .narrow="${this.narrow}"></supervisor-hostname> <supervisor-network .hass="${this.hass}"></supervisor-network>`:""} <ha-config-url-form .hass="${this.hass}"></ha-config-url-form> <ha-config-network .hass="${this.hass}"></ha-config-network> </div> </hass-subpage> `}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`.content{padding:28px 20px 0;max-width:1040px;margin:0 auto}ha-config-network,ha-config-url-form,supervisor-hostname,supervisor-network{display:block;margin:0 auto;margin-bottom:24px;max-width:600px}`}]}}),o.oi);a()}catch(e){a(e)}}))},18951:function(e,t,i){var a=i(44249),n=i(72621),o=(i(75656),i(50100),i(18084),i(31622),i(57243)),s=i(15093),r=i(72344);const d=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;i(99426),i(54977),i(55486),i(1888),i(83166),i(30509),i(59826);var l=i(94616),c=i(66929),h=i(26011),u=i(87865),p=i(72473),f=i(11225),v=i(6736);const m="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",g="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z",k="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z";(0,a.Z)([(0,s.Mo)("ha-config-url-form")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_working",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_urls",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_external_url",value:()=>""},{kind:"field",decorators:[(0,s.SB)()],key:"_internal_url",value:()=>""},{kind:"field",decorators:[(0,s.SB)()],key:"_cloudStatus",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_showCustomExternalUrl",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_showCustomInternalUrl",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_unmaskedExternalUrl",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_unmaskedInternalUrl",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_cloudChecked",value:()=>!1},{kind:"method",key:"hassSubscribe",value:function(){return[this.hass.connection.subscribeEvents((()=>{this._fetchUrls()}),"core_config_updated")]}},{kind:"method",key:"render",value:function(){const e=["storage","default"].includes(this.hass.config.config_source),t=this._working||!e;if(void 0===this._cloudStatus||void 0===this._urls)return o.Ld;const i=this._showCustomInternalUrl?this._internal_url:this._urls?.internal||"",a=this._showCustomExternalUrl?this._external_url:(this._cloudChecked?this._urls?.cloud:this._urls?.external)||"";let n,s,l;return null===this._cloudStatus?(n=!1,s=!1,l=!1):(l=this._cloudStatus.http_use_ssl,this._cloudStatus.logged_in?(n=!0,s=this._cloudStatus.active_subscription&&this._cloudStatus.prefs.remote_enabled):(n=!1,s=!1)),o.dy` <ha-card outlined .header="${this.hass.localize("ui.panel.config.url.caption")}"> <div class="card-content"> ${e?"":o.dy` <ha-alert> ${this.hass.localize("ui.panel.config.core.section.core.core_config.edit_requires_storage")} </ha-alert> `} ${this._error?o.dy`<ha-alert alert-type="error">${this._error}</ha-alert>`:""} <div class="description"> ${this.hass.localize("ui.panel.config.url.description")} </div> ${n?o.dy` <h4> ${this.hass.localize("ui.panel.config.url.external_url_label")} </h4> <ha-settings-row slim> <span slot="heading"> ${this.hass.localize("ui.panel.config.url.external_use_ha_cloud")} </span> <ha-switch .disabled="${t}" .checked="${this._cloudChecked}" @change="${this._toggleCloud}"></ha-switch> </ha-settings-row> `:""} <div class="url-container"> <div class="textfield-container"> <ha-textfield name="external_url" type="url" placeholder="https://example.duckdns.org:8123" .value="${this._unmaskedExternalUrl||this._showCustomExternalUrl&&e?a:(0,f.t)(a)}" @change="${this._handleChange}" .disabled="${t||!this._showCustomExternalUrl}" .suffix="${o.dy`<div style="width:24px"></div>`}"></ha-textfield> ${this._showCustomExternalUrl&&e?o.Ld:o.dy` <ha-icon-button class="toggle-unmasked-url" .label="${this.hass.localize(`ui.panel.config.common.${this._unmaskedExternalUrl?"hide":"show"}_url`)}" @click="${this._toggleUnmaskedExternalUrl}" .path="${this._unmaskedExternalUrl?g:k}"></ha-icon-button> `} </div> <ha-button .url="${a}" @click="${this._copyURL}"> <ha-svg-icon slot="icon" .path="${m}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.common.copy_link")} </ha-button> </div> ${n||!(0,r.p)(this.hass,"cloud")?"":o.dy` <div class="row"> <div class="flex"></div> <a href="/config/cloud">${this.hass.localize("ui.panel.config.url.external_get_ha_cloud")}</a> </div> `} ${!this._showCustomExternalUrl&&n?o.dy` ${s?o.dy` <div class="row"> <div class="flex"></div> <a href="/config/cloud">${this.hass.localize("ui.panel.config.url.manage_ha_cloud")}</a> </div> `:o.dy` <ha-alert alert-type="error"> ${this.hass.localize("ui.panel.config.url.ha_cloud_remote_not_enabled")} <a href="/config/cloud" slot="action"><mwc-button .label="${this.hass.localize("ui.panel.config.url.enable_remote")}"></mwc-button></a> </ha-alert> `} `:""} <h4> ${this.hass.localize("ui.panel.config.url.internal_url_label")} </h4> <ha-settings-row slim> <span slot="heading"> ${this.hass.localize("ui.panel.config.url.internal_url_automatic")} </span> <span slot="description"> ${this.hass.localize("ui.panel.config.url.internal_url_automatic_description")} </span> <ha-switch .disabled="${t}" .checked="${!this._showCustomInternalUrl}" @change="${this._toggleInternalAutomatic}"></ha-switch> </ha-settings-row> <div class="url-container"> <div class="textfield-container"> <ha-textfield name="internal_url" type="url" placeholder="${this.hass.localize("ui.panel.config.url.internal_url_placeholder")}" .value="${this._unmaskedInternalUrl||this._showCustomInternalUrl&&e?i:(0,f.t)(i)}" @change="${this._handleChange}" .disabled="${t||!this._showCustomInternalUrl}" .suffix="${o.dy`<div style="width:24px"></div>`}"></ha-textfield> ${this._showCustomInternalUrl&&e?o.Ld:o.dy` <ha-icon-button class="toggle-unmasked-url" .label="${this.hass.localize(`ui.panel.config.common.${this._unmaskedInternalUrl?"hide":"show"}_url`)}" @click="${this._toggleUnmaskedInternalUrl}" .path="${this._unmaskedInternalUrl?g:k}"></ha-icon-button> `} </div> <ha-button .url="${i}" @click="${this._copyURL}"> <ha-svg-icon slot="icon" .path="${m}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.common.copy_link")} </ha-button> </div> ${!l||i&&i.startsWith("https://")&&(c=new URL(i).hostname,!d.test(c))?"":o.dy` <ha-alert .alertType="${this._showCustomInternalUrl?"info":"warning"}" .title="${this.hass.localize("ui.panel.config.url.internal_url_https_error_title")}"> ${this.hass.localize("ui.panel.config.url.internal_url_https_error_description")} </ha-alert> `} </div> <div class="card-actions"> <mwc-button @click="${this._save}" .disabled="${t}"> ${this.hass.localize("ui.panel.config.core.section.core.core_config.save_button")} </mwc-button> </div> </ha-card> `;var c}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),(0,r.p)(this.hass,"cloud")?(0,l.LI)(this.hass).then((e=>{this._cloudStatus=e,this._showCustomExternalUrl=!(this._cloudStatus.logged_in&&!this.hass.config.external_url)})):this._cloudStatus=null,this._fetchUrls()}},{kind:"method",key:"_toggleCloud",value:function(e){this._cloudChecked=e.currentTarget.checked,this._showCustomExternalUrl=!this._cloudChecked}},{kind:"method",key:"_toggleInternalAutomatic",value:function(e){this._showCustomInternalUrl=!e.currentTarget.checked}},{kind:"method",key:"_toggleUnmaskedInternalUrl",value:function(){this._unmaskedInternalUrl=!this._unmaskedInternalUrl}},{kind:"method",key:"_toggleUnmaskedExternalUrl",value:function(){this._unmaskedExternalUrl=!this._unmaskedExternalUrl}},{kind:"method",key:"_copyURL",value:async function(e){const t=e.currentTarget.url;await(0,u.v)(t),(0,p.C)(this,{message:this.hass.localize("ui.common.copied_clipboard")})}},{kind:"method",key:"_handleChange",value:function(e){const t=e.currentTarget;this[`_${t.name}`]=t.value||""}},{kind:"method",key:"_save",value:async function(){this._working=!0,this._error=void 0;try{await(0,c.S7)(this.hass,{external_url:this._showCustomExternalUrl&&this._external_url||null,internal_url:this._showCustomInternalUrl&&this._internal_url||null})}catch(e){this._error=e.message||e}finally{this._working=!1}}},{kind:"method",key:"_fetchUrls",value:async function(){this._urls=await(0,h.nC)(this.hass),this._cloudChecked=this._urls?.cloud===this._urls?.external&&!this.hass.config.external_url,this._showCustomInternalUrl=!!this.hass.config.internal_url,this._showCustomExternalUrl=!(this._cloudStatus?.logged_in&&!this.hass.config.external_url),this._internal_url=this._urls?.internal??"",this._external_url=this._urls?.external??""}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`.description{margin-bottom:1em}.row{display:flex;flex-direction:row;margin:0 -8px;align-items:center;padding:8px 0}.secondary{color:var(--secondary-text-color)}.flex{flex:1}.row>*{margin:0 8px}ha-alert{display:block;margin:16px 0}.card-actions{display:flex;flex-direction:row-reverse}a{color:var(--primary-color);text-decoration:none}.url-container{display:flex;align-items:center;gap:8px;margin-top:8px}.textfield-container{position:relative;flex:1}.textfield-container ha-textfield{display:block}.toggle-unmasked-url{position:absolute;top:8px;right:8px;inset-inline-start:initial;inset-inline-end:8px;--mdc-icon-button-size:40px;--mdc-icon-size:20px;color:var(--secondary-text-color);direction:var(--direction)}`}]}}),(0,v.f)(o.oi))},756:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(44249),n=(i(31622),i(2060),i(87319),i(57243)),o=i(15093),s=(i(99426),i(54977),i(17170)),r=(i(41307),i(55486),i(23334),i(72781),i(30509),i(83166),i(56785)),d=i(67044),l=i(76131),c=e([s]);s=(c.then?(await c)():c)[0];(0,a.Z)([(0,o.Mo)("supervisor-hostname")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,o.SB)()],key:"_processing",value:()=>!1},{kind:"field",decorators:[(0,o.SB)()],key:"_hostname",value:void 0},{kind:"method",key:"firstUpdated",value:function(){this._fetchHostInfo()}},{kind:"method",key:"_fetchHostInfo",value:async function(){const e=await(0,d.Sj)(this.hass);this._hostname=e.hostname}},{kind:"method",key:"render",value:function(){return this._hostname?n.dy` <ha-card class="no-padding" outlined .header="${this.hass.localize("ui.panel.config.network.supervisor.hostname.title")}"> <div class="card-content"> <p> ${this.hass.localize("ui.panel.config.network.supervisor.hostname.description")} </p> <ha-textfield .disabled="${this._processing}" .value="${this._hostname}" @change="${this._handleChange}" placeholder="homeassistant"> </ha-textfield> </div> <div class="card-actions"> <mwc-button @click="${this._save}" .disabled="${this._processing}"> ${this._processing?n.dy`<ha-spinner size="small"></ha-spinner>`:this.hass.localize("ui.common.save")} </mwc-button> </div> </ha-card> `:n.Ld}},{kind:"method",key:"_handleChange",value:function(e){this._hostname=e.target.value}},{kind:"method",key:"_save",value:async function(){this._processing=!0;try{await(0,d.oJ)(this.hass,{hostname:this._hostname})}catch(e){(0,l.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.network.supervisor.hostname.failed_to_set_hostname"),text:(0,r.js)(e)})}finally{this._processing=!1}}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`ha-textfield{width:100%}.card-actions{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}.card-content>p{padding-bottom:1em}`}]}}),n.oi);t()}catch(e){t(e)}}))},1515:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(44249),n=(i(92745),i(9359),i(56475),i(1331),i(31526),i(70104),i(2060),i(99619),i(56820),i(57243)),o=i(15093),s=i(67064),r=(i(99426),i(59826),i(34273),i(54977),i(17170)),d=(i(41307),i(55486),i(23334),i(34326),i(72781),i(7285),i(83166),i(56785)),l=i(81732),c=i(76131),h=e([r]);r=(h.then?(await h)():h)[0];const u="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z",p="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",f="M7,10L12,15L17,10H7Z",v="M12,21L15.6,16.2C14.6,15.45 13.35,15 12,15C10.65,15 9.4,15.45 8.4,16.2L12,21M12,3C7.95,3 4.21,4.34 1.2,6.6L3,9C5.5,7.12 8.62,6 12,6C15.38,6 18.5,7.12 21,9L22.8,6.6C19.79,4.34 16.05,3 12,3M12,9C9.3,9 6.81,9.89 4.8,11.4L6.6,13.8C8.1,12.67 9.97,12 12,12C14.03,12 15.9,12.67 17.4,13.8L19.2,11.4C17.19,9.89 14.7,9 12,9Z",m=["ipv4","ipv6"],g={ipv4:{Cloudflare:["1.1.1.1","1.0.0.1"],Google:["8.8.8.8","8.8.4.4"],Quad9:["9.9.9.9","149.112.112.112"],NextDNS:["45.90.28.0","45.90.30.0"],AdGuard:["94.140.14.140","94.140.14.141"]},ipv6:{Cloudflare:["2606:4700:4700::1111","2606:4700:4700::1001"],Google:["2001:4860:4860::8888","2001:4860:4860::8844"],Quad9:["2620:fe::fe","2620:fe::9"],NextDNS:["2a05:d014:a000::","2a05:d014:a001::"],AdGuard:["94.140.14.140","94.140.14.141"]}};(0,a.Z)([(0,o.Mo)("supervisor-network")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_accessPoints",value:()=>[]},{kind:"field",decorators:[(0,o.SB)()],key:"_curTabIndex",value:()=>0},{kind:"field",decorators:[(0,o.SB)()],key:"_dirty",value:()=>!1},{kind:"field",decorators:[(0,o.SB)()],key:"_interface",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_interfaces",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_processing",value:()=>!1},{kind:"field",decorators:[(0,o.SB)()],key:"_scanning",value:()=>!1},{kind:"field",decorators:[(0,o.SB)()],key:"_wifiConfiguration",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_dnsMenuOpen",value:()=>!1},{kind:"method",key:"firstUpdated",value:function(){this._fetchNetworkInfo()}},{kind:"method",key:"_fetchNetworkInfo",value:async function(){const e=await(0,l.bR)(this.hass);this._interfaces=e.interfaces.sort(((e,t)=>e.primary>t.primary?-1:1)),this._interface={...this._interfaces[this._curTabIndex]}}},{kind:"method",key:"render",value:function(){return this._interface?n.dy` <ha-card outlined .header="${this.hass.localize("ui.panel.config.network.supervisor.title")}"> ${this._interfaces.length>1?n.dy`<mwc-tab-bar .activeIndex="${this._curTabIndex}" @MDCTabBar:activated="${this._handleTabActivated}">${this._interfaces.map((e=>n.dy`<mwc-tab .id="${e.interface}" .label="${e.interface}"> </mwc-tab>`))} </mwc-tab-bar>`:n.Ld} ${(0,s.F)(this._renderTab())} </ha-card> `:n.Ld}},{kind:"method",key:"_renderTab",value:function(){return n.dy`<div class="card-content"> ${"wireless"===this._interface?.type?n.dy` <ha-expansion-panel .header="${this.hass.localize("ui.panel.config.network.supervisor.wifi")}" outlined .expanded="${!this._interface?.wifi?.ssid}"> ${this._interface?.wifi?.ssid?n.dy`<p> <ha-svg-icon slot="icon" .path="${v}"></ha-svg-icon> ${this.hass.localize("ui.panel.config.network.supervisor.connected_to",{ssid:this._interface?.wifi?.ssid})} </p>`:n.Ld} <ha-button class="scan" @click="${this._scanForAP}" .disabled="${this._scanning}"> ${this._scanning?n.dy`<ha-spinner size="small"> </ha-spinner>`:this.hass.localize("ui.panel.config.network.supervisor.scan_ap")} <ha-svg-icon slot="icon" .path="${v}"></ha-svg-icon> </ha-button> ${this._accessPoints.length?n.dy` <mwc-list> ${this._accessPoints.map((e=>n.dy` <ha-list-item twoline @click="${this._selectAP}" .activated="${e.ssid===this._wifiConfiguration?.ssid}" .ap="${e}"> <span>${e.ssid}</span> <span slot="secondary"> ${e.mac} - ${this.hass.localize("ui.panel.config.network.supervisor.signal_strength")}: ${e.signal} </span> </ha-list-item> `))} </mwc-list> `:n.Ld} ${this._wifiConfiguration?n.dy` <div class="radio-row"> <ha-formfield .label="${this.hass.localize("ui.panel.config.network.supervisor.open")}"> <ha-radio @change="${this._handleRadioValueChangedAp}" .ap="${this._wifiConfiguration}" value="open" name="auth" .checked="${void 0===this._wifiConfiguration.auth||"open"===this._wifiConfiguration.auth}"> </ha-radio> </ha-formfield> <ha-formfield .label="${this.hass.localize("ui.panel.config.network.supervisor.wep")}"> <ha-radio @change="${this._handleRadioValueChangedAp}" .ap="${this._wifiConfiguration}" value="wep" name="auth" .checked="${"wep"===this._wifiConfiguration.auth}"> </ha-radio> </ha-formfield> <ha-formfield .label="${this.hass.localize("ui.panel.config.network.supervisor.wpa")}"> <ha-radio @change="${this._handleRadioValueChangedAp}" .ap="${this._wifiConfiguration}" value="wpa-psk" name="auth" .checked="${"wpa-psk"===this._wifiConfiguration.auth}"> </ha-radio> </ha-formfield> </div> ${"wpa-psk"===this._wifiConfiguration.auth||"wep"===this._wifiConfiguration.auth?n.dy` <ha-password-field id="psk" .label="${this.hass.localize("ui.panel.config.network.supervisor.wifi_password")}" .version="${"wifi"}" @change="${this._handleInputValueChangedWifi}"> </ha-password-field> `:n.Ld} `:n.Ld} </ha-expansion-panel> `:n.Ld} ${m.map((e=>this._interface[e]?this._renderIPConfiguration(e):n.Ld))} ${this._dirty?n.dy`<ha-alert alert-type="warning"> ${this.hass.localize("ui.panel.config.network.supervisor.warning")} </ha-alert>`:n.Ld} </div> <div class="card-actions"> <ha-button @click="${this._updateNetwork}" .disabled="${!this._dirty}"> ${this._processing?n.dy`<ha-spinner size="small"></ha-spinner>`:this.hass.localize("ui.common.save")} </ha-button> <ha-button @click="${this._clear}"> ${this.hass.localize("ui.panel.config.network.supervisor.reset")} </ha-button> </div>`}},{kind:"method",key:"_selectAP",value:function(e){this._wifiConfiguration=e.currentTarget.ap,m.forEach((e=>{"disabled"===this._interface[e].method&&(this._interface[e].method="auto")})),this._dirty=!0}},{kind:"method",key:"_scanForAP",value:async function(){if(this._interface){this._scanning=!0;try{const e=await(0,l.Ne)(this.hass,this._interface.interface);this._accessPoints=[],e.accesspoints?.forEach((e=>{if(e.ssid){const t=this._accessPoints.find((t=>t.ssid===e.ssid));t?e.signal>t.signal&&(this._accessPoints=this._accessPoints.filter((t=>t.ssid!==e.ssid)),this._accessPoints.push(e)):this._accessPoints.push(e)}}))}catch(e){(0,c.showAlertDialog)(this,{title:"Failed to scan for accesspoints",text:(0,d.js)(e)})}finally{this._scanning=!1}}}},{kind:"method",key:"_renderIPConfiguration",value:function(e){if("wireless"===this._interface?.type&&!this._wifiConfiguration?.ssid&&!this._interface.wifi?.ssid)return n.Ld;const t=this._interface[e]?.nameservers||[];0===t.length&&t.push("");const i="auto"===this._interface[e]?.method;return n.dy` <ha-expansion-panel .header="${`IPv${e.charAt(e.length-1)}`}" outlined> <div class="radio-row"> <ha-formfield .label="${this.hass.localize("ui.panel.config.network.supervisor.auto")}"> <ha-radio @change="${this._handleRadioValueChanged}" .version="${e}" value="auto" name="${e}method" .checked="${"auto"===this._interface[e]?.method}"> </ha-radio> </ha-formfield> <ha-formfield .label="${this.hass.localize("ui.panel.config.network.supervisor.static")}"> <ha-radio @change="${this._handleRadioValueChanged}" .version="${e}" value="static" name="${e}method" .checked="${"static"===this._interface[e]?.method}"> </ha-radio> </ha-formfield> <ha-formfield .label="${this.hass.localize("ui.panel.config.network.supervisor.disabled")}" class="warning"> <ha-radio @change="${this._handleRadioValueChanged}" .version="${e}" value="disabled" name="${e}method" .checked="${"disabled"===this._interface[e]?.method}"> </ha-radio> </ha-formfield> </div> ${["static","auto"].includes(this._interface[e].method)?n.dy` ${this._interface[e].address.map(((t,a)=>{const{ip:o,mask:s}=(0,l.Cy)(t);return n.dy` <div class="address-row"> <ha-textfield id="address" .label="${this.hass.localize("ui.panel.config.network.supervisor.ip")}" .version="${e}" .value="${o}" .index="${a}" @change="${this._handleInputValueChanged}" .disabled="${i}"> </ha-textfield> <ha-textfield id="netmask" .label="${this.hass.localize("ui.panel.config.network.supervisor.netmask")}" .version="${e}" .value="${s}" .index="${a}" @change="${this._handleInputValueChanged}" .disabled="${i}"> </ha-textfield> ${this._interface[e].address.length>1&&!i?n.dy` <ha-icon-button .label="${this.hass.localize("ui.common.delete")}" .path="${u}" .version="${e}" .index="${a}" @click="${this._removeAddress}"></ha-icon-button> `:n.Ld} </div> `}))} ${i?n.Ld:n.dy` <ha-button @click="${this._addAddress}" .version="${e}" class="add-address"> ${this.hass.localize("ui.panel.config.network.supervisor.add_address")} <ha-svg-icon slot="icon" .path="${p}"></ha-svg-icon> </ha-button> `} <ha-textfield id="gateway" .label="${this.hass.localize("ui.panel.config.network.supervisor.gateway")}" .version="${e}" .value="${this._interface[e].gateway||""}" @change="${this._handleInputValueChanged}" .disabled="${i}"> </ha-textfield> <div class="nameservers"> ${t.map(((t,i)=>n.dy` <div class="address-row"> <ha-textfield id="nameserver" .label="${this.hass.localize("ui.panel.config.network.supervisor.dns_server")}" .version="${e}" .value="${t}" .index="${i}" @change="${this._handleInputValueChanged}"> </ha-textfield> ${this._interface[e].nameservers?.length>1?n.dy` <ha-icon-button .label="${this.hass.localize("ui.common.delete")}" .path="${u}" .version="${e}" .index="${i}" @click="${this._removeNameserver}"></ha-icon-button> `:n.Ld} </div> `))} </div> <ha-button-menu @opened="${this._handleDNSMenuOpened}" @closed="${this._handleDNSMenuClosed}" .version="${e}" class="add-nameserver"> <ha-button slot="trigger"> ${this.hass.localize("ui.panel.config.network.supervisor.add_dns_server")} <ha-svg-icon slot="icon" .path="${this._dnsMenuOpen?f:p}"></ha-svg-icon> </ha-button> ${Object.entries(g[e]).map((([t,i])=>n.dy` <ha-list-item @click="${this._addPredefinedDNS}" .version="${e}" .addresses="${i}"> ${t} </ha-list-item> `))} <ha-list-item @click="${this._addCustomDNS}" .version="${e}"> ${this.hass.localize("ui.panel.config.network.supervisor.custom_dns")} </ha-list-item> </ha-button-menu> `:n.Ld} </ha-expansion-panel> `}},{kind:"method",key:"_updateNetwork",value:async function(){this._processing=!0;let e={};m.forEach((t=>{e[t]={method:this._interface[t]?.method||"auto",nameservers:this._interface[t]?.nameservers?.filter((e=>e.trim()))},"static"===this._interface[t]?.method&&(e[t]={...e[t],address:this._interface[t]?.address?.filter((e=>e.trim())),gateway:this._interface[t]?.gateway})})),this._wifiConfiguration&&(e={...e,wifi:{ssid:this._wifiConfiguration.ssid,mode:this._wifiConfiguration.mode,auth:this._wifiConfiguration.auth||"open"}},"open"!==e.wifi.auth&&(e.wifi={...e.wifi,psk:this._wifiConfiguration.psk})),e.enabled=!("disabled"===e.ipv4?.method&&"disabled"===e.ipv6?.method||"wireless"===this._interface.type&&void 0===this._wifiConfiguration&&!this._interface.wifi);try{await(0,l.tJ)(this.hass,this._interface.interface,e),this._dirty=!1,await this._fetchNetworkInfo()}catch(e){(0,c.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.network.supervisor.failed_to_change"),text:(0,d.js)(e)})}finally{this._processing=!1}}},{kind:"method",key:"_clear",value:async function(){await this._fetchNetworkInfo(),this._interface.ipv4.method="auto",this._interface.ipv4.nameservers=[],this._interface.ipv6.method="auto",this._interface.ipv6.nameservers=[],this._interface.wifi=null,this._wifiConfiguration=void 0,this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_handleTabActivated",value:async function(e){if(this._dirty){if(!await(0,c.showConfirmationDialog)(this,{text:this.hass.localize("ui.panel.config.network.supervisor.unsaved"),confirmText:this.hass.localize("ui.common.yes"),dismissText:this.hass.localize("ui.common.no")}))return void this.requestUpdate("_interface")}this._curTabIndex=e.detail.index,this._interface={...this._interfaces[e.detail.index]}}},{kind:"method",key:"_handleRadioValueChanged",value:function(e){const t=e.target.value,i=e.target.version;t&&this._interface&&this._interface[i].method!==t&&(this._dirty=!0,this._interface[i].method=t,this.requestUpdate("_interface"))}},{kind:"method",key:"_handleRadioValueChangedAp",value:function(e){const t=e.target.value;this._wifiConfiguration.auth=t,this._dirty=!0,this.requestUpdate("_wifiConfiguration")}},{kind:"method",key:"_handleInputValueChanged",value:function(e){const t=e.target,i=t.value,a=e.target.version,n=t.id;if(i&&this._interface?.[a])if(this._dirty=!0,"address"===n){const t=e.target.index,{mask:n}=(0,l.Cy)(this._interface[a].address[t]),{mask:o}=(0,l.Cy)(i);this._interface[a].address[t]=(0,l.Tg)(i,o||n||""),this.requestUpdate("_interface")}else if("netmask"===n){const t=e.target.index,{ip:n}=(0,l.Cy)(this._interface[a].address[t]);this._interface[a].address[t]=(0,l.Tg)(n,i),this.requestUpdate("_interface")}else if("nameserver"===n){const t=e.target.index;this._interface[a].nameservers[t]=i,this.requestUpdate("_interface")}else this._interface[a][n]=i}},{kind:"method",key:"_handleInputValueChangedWifi",value:function(e){const t=e.target,i=t.value,a=t.id;i&&this._wifiConfiguration&&this._wifiConfiguration[a]!==i&&(this._dirty=!0,this._wifiConfiguration[a]=i)}},{kind:"method",key:"_addAddress",value:function(e){const t=e.target.version;this._interface[t].address.push("ipv4"===t?"0.0.0.0/24":"::/64"),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_removeAddress",value:function(e){const t=e.target,i=t.index,a=t.version;this._interface[a].address.splice(i,1),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_handleDNSMenuOpened",value:function(){this._dnsMenuOpen=!0}},{kind:"method",key:"_handleDNSMenuClosed",value:function(){this._dnsMenuOpen=!1}},{kind:"method",key:"_addPredefinedDNS",value:function(e){const t=e.target,i=t.version,a=t.addresses;this._interface[i].nameservers||(this._interface[i].nameservers=[]),this._interface[i].nameservers.push(...a),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_addCustomDNS",value:function(e){const t=e.target.version;this._interface[t].nameservers||(this._interface[t].nameservers=[]),this._interface[t].nameservers.push(""),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"method",key:"_removeNameserver",value:function(e){const t=e.target,i=t.index,a=t.version;this._interface[a].nameservers.splice(i,1),this._dirty=!0,this.requestUpdate("_interface")}},{kind:"get",static:!0,key:"styles",value:function(){return[n.iv`mwc-tab-bar{border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12));margin-bottom:24px}.content{display:block;padding:20px 24px}ha-button.warning{--mdc-theme-primary:var(--error-color)}ha-button.scan{margin-left:8px;margin-inline-start:8px;margin-inline-end:initial}ha-expansion-panel{--expansion-panel-summary-padding:0 16px;margin:4px 0}ha-textfield{display:block;margin-top:16px}.address-row{display:flex;flex-direction:row;gap:8px;align-items:center}.address-row ha-textfield{flex:1}.address-row ha-icon-button{--mdc-icon-button-size:36px;margin-top:16px}.add-address,.add-nameserver{margin-top:16px}ha-list-item{--mdc-list-side-padding:10px}.card-actions{display:flex;flex-direction:row-reverse;justify-content:space-between;align-items:center}ha-expansion-panel>:last-child{margin-bottom:16px}`]}}]}}),n.oi);t()}catch(e){t(e)}}))},16485:function(e,t,i){i.a(e,(async function(e,t){try{i(92745);var a=i(61449),n=i(40574),o=i(30532),s=i(41674),r=i(49722),d=i(76632),l=i(7884),c=i(35185),h=i(60933),u=i(44180),p=i(49447);const e=async()=>{const e=(0,u.sS)(),t=[];(0,o.shouldPolyfill)()&&await Promise.all([i.e("80210"),i.e("74055")]).then(i.bind(i,98133)),(0,r.shouldPolyfill)()&&await Promise.all([i.e("83895"),i.e("75297"),i.e("80210"),i.e("60251")]).then(i.bind(i,59095)),(0,a.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("68250")]).then(i.bind(i,80561)).then((()=>(0,p.H)()))),(0,h.shouldPolyfill)()&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("65578")]).then(i.bind(i,97995))),(0,n.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("59826")]).then(i.bind(i,31514))),(0,s.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("23649")]).then(i.bind(i,93840))),(0,d.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("42831")]).then(i.bind(i,29559))),(0,l.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("57377")]).then(i.bind(i,39030)).then((()=>i.e("61236").then(i.t.bind(i,4121,23))))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("13870")]).then(i.bind(i,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,p.n)(e)))};await e(),t()}catch(e){t(e)}}),1)},28008:function(e,t,i){i.d(t,{$c:()=>r,Qx:()=>o,k1:()=>n,yu:()=>s});var a=i(57243);const n=a.iv`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`,o=a.iv`:host{font-family:var(--paper-font-body1_-_font-family);-webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing);font-size:var(--paper-font-body1_-_font-size);font-weight:var(--paper-font-body1_-_font-weight);line-height:var(--paper-font-body1_-_line-height)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}h1{font-family:var(--paper-font-headline_-_font-family);-webkit-font-smoothing:var(--paper-font-headline_-_-webkit-font-smoothing);white-space:var(--paper-font-headline_-_white-space);overflow:var(--paper-font-headline_-_overflow);text-overflow:var(--paper-font-headline_-_text-overflow);font-size:var(--paper-font-headline_-_font-size);font-weight:var(--paper-font-headline_-_font-weight);line-height:var(--paper-font-headline_-_line-height)}h2{font-family:var(--paper-font-title_-_font-family);-webkit-font-smoothing:var(--paper-font-title_-_-webkit-font-smoothing);white-space:var(--paper-font-title_-_white-space);overflow:var(--paper-font-title_-_overflow);text-overflow:var(--paper-font-title_-_text-overflow);font-size:var(--paper-font-title_-_font-size);font-weight:var(--paper-font-title_-_font-weight);line-height:var(--paper-font-title_-_line-height)}h3{font-family:var(--paper-font-subhead_-_font-family);-webkit-font-smoothing:var(--paper-font-subhead_-_-webkit-font-smoothing);white-space:var(--paper-font-subhead_-_white-space);overflow:var(--paper-font-subhead_-_overflow);text-overflow:var(--paper-font-subhead_-_text-overflow);font-size:var(--paper-font-subhead_-_font-size);font-weight:var(--paper-font-subhead_-_font-weight);line-height:var(--paper-font-subhead_-_line-height)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}${n} .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}`,s=a.iv`ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between}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-dialog{--mdc-dialog-min-width:calc(
100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
);--mdc-dialog-max-width:calc(
100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
);--mdc-dialog-min-height:100%;--mdc-dialog-max-height:100%;--vertical-align-dialog:flex-end;--ha-dialog-border-radius:0}}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}.error{color:var(--error-color)}`,r=a.iv`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{-webkit-border-radius:4px;border-radius:4px;background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`;a.iv`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`},11225:function(e,t,i){function a(e){return e.endsWith(".ui.nabu.casa")?"https://•••••••••••••••••.ui.nabu.casa":e.replace(/(?<=:\/\/)[\w-]+|(?<=\.)[\w-]+/g,(e=>"•".repeat(e.length)))}i.d(t,{t:()=>a})}};
//# sourceMappingURL=16930.4e6f9caf3199c1a3.js.map