iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
4 lines • 88.3 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["65120"],{19631:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{Bt:()=>l,T8:()=>d});a(19083);var n=a(16485),s=a(88977),o=a(20382),r=e([n]);n=(r.then?(await r)():r)[0];const c=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],l=e=>e.first_weekday===o.FS.language?"weekInfo"in Intl.Locale.prototype?new Intl.Locale(e.language).weekInfo.firstDay%7:(0,s.L)(e.language)%7:c.includes(e.first_weekday)?c.indexOf(e.first_weekday):1,d=e=>{const t=l(e);return c[t]};i()}catch(c){i(c)}}))},94947:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{G:()=>l});var n=a(16485),s=a(27486),o=a(27046),r=e([n,o]);[n,o]=r.then?(await r)():r;const c=(0,s.Z)((e=>new Intl.RelativeTimeFormat(e.language,{numeric:"auto"}))),l=(e,t,a,i=!0)=>{const n=(0,o.W)(e,a,t);return i?c(t).format(n.value,n.unit):Intl.NumberFormat(t.language,{style:"unit",unit:n.unit,unitDisplay:"long"}).format(Math.abs(n.value))};i()}catch(c){i(c)}}))},97547:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{c:()=>f,computeStateDisplay:()=>g});a(19083),a(19423),a(61006);var n=a(96194),s=a(20382),o=a(54363),r=a(46467),c=a(64214),l=a(33570),d=a(50602),u=a(87974),h=a(73850),p=e([o,d,r,l,c]);[o,d,r,l,c]=p.then?(await p)():p;const g=(e,t,a,i,n,s,o)=>{const r=null==s?void 0:s[t.entity_id];return f(e,a,i,n,r,t.entity_id,t.attributes,void 0!==o?o:t.state)},f=(e,t,a,i,p,g,f,v)=>{if(v===n.lz||v===n.nZ)return e(`state.default.${v}`);const m=(0,h.M)(g),k="counter"===m||"number"===m||"input_number"===m;if((0,d.sJ)(f,"sensor"===m?a:[])||k){if("duration"===f.device_class&&f.unit_of_measurement&&o.a_.includes(f.unit_of_measurement))try{return(0,o.LU)(t,v,f.unit_of_measurement,null==p?void 0:p.display_precision)}catch(b){}if("monetary"===f.device_class)try{return(0,d.uf)(v,t,Object.assign({style:"currency",currency:f.unit_of_measurement,minimumFractionDigits:2},(0,d.l4)({state:v,attributes:f},p)))}catch(b){}const a=(0,d.uf)(v,t,(0,d.l4)({state:v,attributes:f},p)),i=(null==p?void 0:p.translation_key)&&e(`component.${p.platform}.entity.${m}.${p.translation_key}.unit_of_measurement`)||f.unit_of_measurement;return i?`${a}${(0,u.L)(i,t)}${i}`:a}if(["date","input_datetime","time"].includes(m))try{const e=v.split(" ");if(2===e.length)return(0,c.o0)(new Date(e.join("T")),Object.assign(Object.assign({},t),{},{time_zone:s.c_.local}),i);if(1===e.length){if(v.includes("-"))return(0,r.p6)(new Date(`${v}T00:00`),Object.assign(Object.assign({},t),{},{time_zone:s.c_.local}),i);if(v.includes(":")){const e=new Date;return(0,l.mr)(new Date(`${e.toISOString().split("T")[0]}T${v}`),Object.assign(Object.assign({},t),{},{time_zone:s.c_.local}),i)}}return v}catch(y){return v}if(["button","conversation","event","image","input_button","notify","scene","stt","tag","tts","wake_word","datetime"].includes(m)||"sensor"===m&&"timestamp"===f.device_class)try{return(0,c.o0)(new Date(v),t,i)}catch(b){return v}return(null==p?void 0:p.translation_key)&&e(`component.${p.platform}.entity.${m}.${p.translation_key}.state.${v}`)||f.device_class&&e(`component.${m}.entity_component.${f.device_class}.state.${v}`)||e(`component.${m}.entity_component._.state.${v}`)||v};i()}catch(g){i(g)}}))},87707:function(e,t,a){a.d(t,{Q:()=>i});const i=e=>!(!e.detail.selected||"property"!==e.detail.source)&&(e.currentTarget.selected=!1,!0)},87733:function(e,t,a){a.d(t,{f:()=>i});const i=e=>e.charAt(0).toUpperCase()+e.slice(1)},27046:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{W:()=>p});a(19423);var n=a(13809),s=a(29558),o=a(94763),r=a(19631),c=e([r]);r=(c.then?(await c)():c)[0];const d=1e3,u=60,h=60*u;function p(e,t=Date.now(),a,i={}){const c=Object.assign(Object.assign({},g),i||{}),l=(+e-+t)/d;if(Math.abs(l)<c.second)return{value:Math.round(l),unit:"second"};const p=l/u;if(Math.abs(p)<c.minute)return{value:Math.round(p),unit:"minute"};const f=l/h;if(Math.abs(f)<c.hour)return{value:Math.round(f),unit:"hour"};const v=new Date(e),m=new Date(t);v.setHours(0,0,0,0),m.setHours(0,0,0,0);const k=(0,n.j)(v,m);if(0===k)return{value:Math.round(f),unit:"hour"};if(Math.abs(k)<c.day)return{value:k,unit:"day"};const b=(0,r.Bt)(a),y=(0,s.z)(v,{weekStartsOn:b}),_=(0,s.z)(m,{weekStartsOn:b}),w=(0,o.p)(y,_);if(0===w)return{value:k,unit:"day"};if(Math.abs(w)<c.week)return{value:w,unit:"week"};const x=v.getFullYear()-m.getFullYear(),$=12*x+v.getMonth()-m.getMonth();return 0===$?{value:w,unit:"week"}:Math.abs($)<c.month||0===x?{value:$,unit:"month"}:{value:Math.round(x),unit:"year"}}const g={second:45,minute:45,hour:22,day:5,week:4,month:11};i()}catch(l){i(l)}}))},34273:function(e,t,a){var i=a(61701),n=a(72621),s=(a(71695),a(9359),a(31526),a(47021),a(22997),a(57243)),o=a(50778),r=a(5111),c=a(76525);let l,d,u=e=>e;(0,i.Z)([(0,o.Mo)("ha-button-menu")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",key:c.gA,value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"corner",value(){return"BOTTOM_START"}},{kind:"field",decorators:[(0,o.Cb)({attribute:"menu-corner"})],key:"menuCorner",value(){return"START"}},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"x",value(){return null}},{kind:"field",decorators:[(0,o.Cb)({type:Number})],key:"y",value(){return null}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"multi",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"activatable",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"fixed",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,attribute:"no-anchor"})],key:"noAnchor",value(){return!1}},{kind:"field",decorators:[(0,o.IO)("mwc-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){var e;return null===(e=this._menu)||void 0===e?void 0:e.items}},{kind:"get",key:"selected",value:function(){var e;return null===(e=this._menu)||void 0===e?void 0:e.selected}},{kind:"method",key:"focus",value:function(){var e,t;null!==(e=this._menu)&&void 0!==e&&e.open?this._menu.focusItemAtIndex(0):null===(t=this._triggerButton)||void 0===t||t.focus()}},{kind:"method",key:"render",value:function(){return(0,s.dy)(l||(l=u` <div @click="${0}"> <slot name="trigger" @slotchange="${0}"></slot> </div> <mwc-menu .corner="${0}" .menuCorner="${0}" .fixed="${0}" .multi="${0}" .activatable="${0}" .y="${0}" .x="${0}"> <slot></slot> </mwc-menu> `),this._handleClick,this._setTriggerAria,this.corner,this.menuCorner,this.fixed,this.multi,this.activatable,this.y,this.x)}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(a,"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(){return(0,s.iv)(d||(d=u`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`))}}]}}),s.oi)},54977:function(e,t,a){var i=a(61701),n=(a(71695),a(47021),a(57243)),s=a(50778);let o,r,c,l=e=>e;(0,i.Z)([(0,s.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(o||(o=l`: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(0,n.dy)(r||(r=l` ${0} <slot></slot> `),this.header?(0,n.dy)(c||(c=l`<h1 class="card-header">${0}</h1>`),this.header):n.Ld)}}]}}),n.oi)},20130:function(e,t,a){var i=a(61701),n=a(72621),s=(a(71695),a(47021),a(39785)),o=a(52876),r=a(50778),c=a(57243),l=a(5111);let d,u,h,p=e=>e;(0,i.Z)([(0,r.Mo)("ha-fab")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(a,"firstUpdated",this,3)([e]),this.style.setProperty("--mdc-theme-secondary","var(--primary-color)")}},{kind:"field",static:!0,key:"styles",value(){return[o.W,(0,c.iv)(d||(d=p`:host .mdc-fab--extended .mdc-fab__icon{margin-inline-start:-8px;margin-inline-end:12px;direction:var(--direction)}:disabled{--mdc-theme-secondary:var(--disabled-text-color);pointer-events:none}`)),"rtl"===l.E.document.dir?(0,c.iv)(u||(u=p`:host .mdc-fab--extended .mdc-fab__icon{direction:rtl}`)):(0,c.iv)(h||(h=p``))]}}]}}),s._)},9425:function(e,t,a){var i=a(61701),n=(a(19083),a(71695),a(92745),a(9359),a(1331),a(70104),a(40251),a(61006),a(47021),a(2060),a(57243)),s=a(50778),o=a(36522),r=a(28008);a(48103),a(41307),a(65981),a(23334);let c,l,d,u,h,p,g=e=>e;(0,i.Z)([(0,s.Mo)("ha-filter-states")],(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)()],key:"label",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"states",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"expanded",value(){return!1}},{kind:"field",decorators:[(0,s.SB)()],key:"_shouldRender",value(){return!1}},{kind:"field",decorators:[(0,s.IO)("mwc-list")],key:"_list",value:void 0},{kind:"method",key:"render",value:function(){var e,t;if(!this.states)return n.Ld;const a=this.states.find((e=>e.icon));return(0,n.dy)(c||(c=g` <ha-expansion-panel left-chevron .expanded="${0}" @expanded-will-change="${0}" @expanded-changed="${0}"> <div slot="header" class="header"> ${0} ${0} </div> ${0} </ha-expansion-panel> `),this.expanded,this._expandedWillChange,this._expandedChanged,this.label,null!==(e=this.value)&&void 0!==e&&e.length?(0,n.dy)(l||(l=g`<div class="badge">${0}</div> <ha-icon-button .path="${0}" @click="${0}"></ha-icon-button>`),null===(t=this.value)||void 0===t?void 0:t.length,"M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z",this._clearFilter):n.Ld,this._shouldRender?(0,n.dy)(d||(d=g` <mwc-list @selected="${0}" multi class="ha-scrollbar"> ${0} </mwc-list> `),this._statesSelected,this.states.map((e=>{var t,i;return(0,n.dy)(u||(u=g`<ha-check-list-item .value="${0}" .selected="${0}" .graphic="${0}"> ${0} ${0} </ha-check-list-item>`),e.value,null!==(t=null===(i=this.value)||void 0===i?void 0:i.includes(e.value))&&void 0!==t&&t,a?"icon":null,e.icon?(0,n.dy)(h||(h=g`<ha-icon slot="graphic" .icon="${0}"></ha-icon>`),e.icon):n.Ld,e.label)}))):n.Ld)}},{kind:"method",key:"willUpdate",value:function(e){e.has("expanded")&&this.expanded&&(this._shouldRender=!0)}},{kind:"method",key:"updated",value:function(e){(e.has("expanded")||e.has("states"))&&this.expanded&&setTimeout((async()=>{if(!this.expanded)return;const e=this._list;e&&(e.style.height=this.clientHeight-49+"px")}),300)}},{kind:"method",key:"_expandedWillChange",value:function(e){this._shouldRender=e.detail.expanded}},{kind:"method",key:"_expandedChanged",value:function(e){this.expanded=e.detail.expanded}},{kind:"method",key:"_statesSelected",value:async function(e){if(!e.detail.index.size)return(0,o.B)(this,"data-table-filter-changed",{value:[],items:void 0}),void(this.value=[]);const t=[];for(const a of e.detail.index){const e=this.states[a].value;t.push(e)}this.value=t,(0,o.B)(this,"data-table-filter-changed",{value:t,items:void 0})}},{kind:"method",key:"_clearFilter",value:function(e){e.preventDefault(),this.value=void 0,(0,o.B)(this,"data-table-filter-changed",{value:void 0,items:void 0})}},{kind:"get",static:!0,key:"styles",value:function(){return[r.$c,(0,n.iv)(p||(p=g`:host{border-bottom:1px solid var(--divider-color)}:host([expanded]){flex:1;height:0}ha-expansion-panel{--ha-card-border-radius:0;--expansion-panel-content-padding:0}.header{display:flex;align-items:center}.header ha-icon-button{margin-inline-start:auto;margin-inline-end:8px}.badge{display:inline-block;margin-left:8px;margin-inline-start:8px;margin-inline-end:0;min-width:16px;box-sizing:border-box;border-radius:50%;font-weight:400;font-size:11px;background-color:var(--primary-color);line-height:16px;text-align:center;padding:0px 2px;color:var(--text-primary-color)}`))]}}]}}),n.oi)},59959:function(e,t,a){a.a(e,(async function(e,i){try{a.r(t),a.d(t,{HaIconOverflowMenu:()=>_});var n=a(61701),s=(a(71695),a(9359),a(70104),a(47021),a(57243)),o=a(50778),r=a(35359),c=a(28008),l=(a(34273),a(23334),a(7285),a(37583),a(56032)),d=e([l]);l=(d.then?(await d)():d)[0];let u,h,p,g,f,v,m,k,b=e=>e;const y="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z";let _=(0,n.Z)([(0,o.Mo)("ha-icon-overflow-menu")],(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:Array})],key:"items",value(){return[]}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,s.dy)(u||(u=b` ${0} `),this.narrow?(0,s.dy)(h||(h=b` <ha-button-menu @click="${0}" @closed="${0}" class="ha-icon-overflow-menu-overflow" absolute> <ha-icon-button .label="${0}" .path="${0}" slot="trigger"></ha-icon-button> ${0} </ha-button-menu>`),this._handleIconOverflowMenuOpened,this._handleIconOverflowMenuClosed,this.hass.localize("ui.common.overflow_menu"),y,this.items.map((e=>e.divider?(0,s.dy)(p||(p=b`<li divider role="separator"></li>`)):(0,s.dy)(g||(g=b`<ha-list-item graphic="icon" ?disabled="${0}" @click="${0}" class="${0}"> <div slot="graphic"> <ha-svg-icon class="${0}" .path="${0}"></ha-svg-icon> </div> ${0} </ha-list-item> `),e.disabled,e.action,(0,r.$)({warning:Boolean(e.warning)}),(0,r.$)({warning:Boolean(e.warning)}),e.path,e.label)))):(0,s.dy)(f||(f=b` ${0} `),this.items.map((e=>{var t;return e.narrowOnly?s.Ld:e.divider?(0,s.dy)(v||(v=b`<div role="separator"></div>`)):(0,s.dy)(m||(m=b`<ha-tooltip .disabled="${0}" .content="${0}"> <ha-icon-button @click="${0}" .label="${0}" .path="${0}" ?disabled="${0}"></ha-icon-button> </ha-tooltip>`),!e.tooltip,null!==(t=e.tooltip)&&void 0!==t?t:"",e.action,e.label,e.path,e.disabled)}))))}},{kind:"method",key:"_handleIconOverflowMenuOpened",value:function(e){e.stopPropagation();const t=this.closest(".mdc-data-table__row");t&&(t.style.zIndex="1")}},{kind:"method",key:"_handleIconOverflowMenuClosed",value:function(){const e=this.closest(".mdc-data-table__row");e&&(e.style.zIndex="")}},{kind:"get",static:!0,key:"styles",value:function(){return[c.Qx,(0,s.iv)(k||(k=b`:host{display:flex;justify-content:flex-end}li[role=separator]{border-bottom-color:var(--divider-color)}div[role=separator]{border-right:1px solid var(--divider-color);width:1px}ha-list-item[disabled] ha-svg-icon{color:var(--disabled-text-color)}`))]}}]}}),s.oi);i()}catch(u){i(u)}}))},7285:function(e,t,a){a.d(t,{M:()=>p});var i=a(61701),n=a(72621),s=(a(71695),a(47021),a(65703)),o=a(46289),r=a(57243),c=a(50778);let l,d,u,h=e=>e,p=(0,i.Z)([(0,c.Mo)("ha-list-item")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,n.Z)(a,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[o.W,(0,r.iv)(l||(l=h`: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?(0,r.iv)(d||(d=h`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,r.iv)(u||(u=h``))]}}]}}),s.K)},74633:function(e,t,a){var i=a(61701),n=a(72621),s=(a(71695),a(47021),a(78755)),o=a(57243),r=a(50778);let c,l=e=>e;(0,i.Z)([(0,r.Mo)("ha-md-list-item")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,n.Z)(a,"styles",this),(0,o.iv)(c||(c=l`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center)}`))]}}]}}),s.g)},19993:function(e,t,a){var i=a(61701),n=a(72621),s=(a(71695),a(47021),a(623)),o=a(57243),r=a(50778);let c,l=e=>e;(0,i.Z)([(0,r.Mo)("ha-md-list")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,n.Z)(a,"styles",this),(0,o.iv)(c||(c=l`:host{--md-sys-color-surface:var(--card-background-color)}`))]}}]}}),s.j)},17170:function(e,t,a){a.a(e,(async function(e,i){try{a.r(t),a.d(t,{HaSpinner:()=>p});var n=a(61701),s=a(72621),o=(a(71695),a(47021),a(97677)),r=a(43580),c=a(57243),l=a(50778),d=e([o]);o=(d.then?(await d)():d)[0];let u,h=e=>e,p=(0,n.Z)([(0,l.Mo)("ha-spinner")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,l.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,s.Z)(a,"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(){return[r.Z,(0,c.iv)(u||(u=h`:host{--indicator-color:var(
--ha-spinner-indicator-color,
var(--primary-color)
);--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}]}}),o.Z);i()}catch(u){i(u)}}))},56032:function(e,t,a){a.a(e,(async function(e,t){try{var i=a(61701),n=(a(71695),a(47021),a(80519)),s=a(1261),o=a(57243),r=a(50778),c=a(85605),l=e([n]);n=(l.then?(await l)():l)[0];let d,u=e=>e;(0,c.jx)("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:150,easing:"ease"}}),(0,c.jx)("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:400,easing:"ease"}});(0,i.Z)([(0,r.Mo)("ha-tooltip")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[s.Z,(0,o.iv)(d||(d=u`:host{--sl-tooltip-background-color:var(--secondary-background-color);--sl-tooltip-color:var(--primary-text-color);--sl-tooltip-font-family:Roboto,sans-serif;--sl-tooltip-font-size:12px;--sl-tooltip-font-weight:normal;--sl-tooltip-line-height:1;--sl-tooltip-padding:8px;--sl-tooltip-border-radius:var(--ha-tooltip-border-radius, 4px);--sl-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 8px);--sl-z-index-tooltip:var(--ha-tooltip-z-index, 1000)}`))]}}]}}),n.Z);t()}catch(d){t(d)}}))},26779:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{$u:()=>O,AG:()=>v,BR:()=>Z,Ef:()=>I,En:()=>D,I0:()=>y,KE:()=>Y,Kn:()=>L,LG:()=>k,OT:()=>H,Sw:()=>P,Ty:()=>E,U0:()=>Q,UR:()=>B,Ug:()=>$,V1:()=>S,VY:()=>N,Vn:()=>F,Y6:()=>W,Ye:()=>w,ZE:()=>_,Zk:()=>C,_r:()=>b,aq:()=>A,cF:()=>G,fi:()=>M,mu:()=>T,n:()=>q,p_:()=>V,pi:()=>z,rI:()=>m,wy:()=>f,xc:()=>x});a(19083),a(71695),a(61893),a(55751),a(26200),a(25754),a(22246),a(9359),a(56475),a(1331),a(31526),a(70104),a(19423),a(23669),a(40251),a(19134),a(11740),a(97003),a(92789),a(36810),a(14953),a(58402),a(31503),a(16440),a(2213),a(57385),a(71375),a(15524),a(20267),a(21917),a(56193),a(25020),a(86913),a(47021),a(71513),a(75656),a(50100),a(18084);var n=a(66952),s=a(55116),o=a(5423),r=a(27486),c=a(64214),l=a(33570),d=a(58014),u=a(57816),h=a(92091),p=a(11257),g=e([n,c,l]);[n,c,l]=g.then?(await g)():g;let f=function(e){return e.NEVER="never",e.DAILY="daily",e.CUSTOM_DAYS="custom_days",e}({});const v=["mon","tue","wed","thu","fri","sat","sun"],m=e=>e.sort(((e,t)=>v.indexOf(e)-v.indexOf(t))),k=e=>e.callWS({type:"backup/config/info"}),b=(e,t)=>e.callWS(Object.assign({type:"backup/config/update"},t)),y=(e,t,a)=>`/api/backup/download/${e}?agent_id=${t}${a?`&password=${a}`:""}`,_=e=>e.callWS({type:"backup/info"}),w=(e,t)=>e.callWS({type:"backup/details",backup_id:t}),x=e=>e.callWS({type:"backup/agents/info"}),$=(e,t)=>e.callWS({type:"backup/delete",backup_id:t}),C=(e,t)=>e.callWS(Object.assign({type:"backup/generate"},t)),A=e=>e.callWS({type:"backup/generate_with_automatic_settings"}),z=(e,t)=>e.callWS(Object.assign({type:"backup/restore"},t)),V=async(e,t,a)=>{const i=new FormData;i.append("file",t);const n=new URLSearchParams;return a.forEach((e=>{n.append("agent_id",e)})),(0,p.h9)(e.fetchWithAuth(`/api/backup/upload?${n.toString()}`,{method:"POST",body:i}))},H=e=>{const t=e.find(S);if(t)return t;const a=e.find(Z);return a||e[0]},M=(e,t,a,i)=>e.callWS({type:"backup/can_decrypt_on_download",backup_id:t,agent_id:a,password:i}),B="backup.local",L="hassio.local",O="cloud.cloud",S=e=>[B,L].includes(e),Z=e=>{const[t,a]=e.split(".");return"hassio"===t&&"local"!==a},P=(e,t,a)=>{if(S(t))return e("ui.panel.config.backup.agents.local_agent");const i=a.find((e=>e.agent_id===t)),n=t.split(".")[0],s=i?i.name:t.split(".")[1];if(Z(t))return s;const o=(0,u.Lh)(e,n);return a.filter((e=>e.agent_id.split(".")[0]===n)).length>1?`${o}: ${s}`:o},D=e=>Math.max(...Object.values(e.agents).map((e=>e.size))),j=["automatic","manual","addon_update"],T=(0,n.z)((e=>e?j:j.filter((e=>"addon_update"!==e)))),F=(e,t)=>{var a;return e.with_automatic_settings?"automatic":t&&null!=(null===(a=e.extra_metadata)||void 0===a?void 0:a["supervisor.addon_update"])?"addon_update":"manual"},I=(e,t)=>{const a=S(e),i=S(t),n=Z(e),s=Z(t),o=(e,t)=>e?1:t?2:3,r=o(a,n),c=o(i,s);return r!==c?r-c:e.localeCompare(t)},E=()=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",t="xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx";let a="";const i=new Uint8Array(34);return crypto.getRandomValues(i),i.forEach(((i,n)=>{a+="-"===t[n]?"-":e[i%36]})),a},U=(e,t)=>"data:text/plain;charset=utf-8,"+encodeURIComponent(`${e.localize("ui.panel.config.backup.emergency_kit_file.title")}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.description")}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.date")} ${(0,c.o0)(new Date,e.locale,e.config)}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.instance")}\n${e.config.location_name}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.url")}\n${e.auth.data.hassUrl}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.encryption_key")}\n${t}\n\n${e.localize("ui.panel.config.backup.emergency_kit_file.more_info",{link:"https://www.home-assistant.io/more-info/backup-emergency-kit"})}`),R=(e,t)=>`home_assistant_backup_emergency_kit_${t?`${t}_`:""}${(0,c.NR)(new Date,e.locale,e.config).replace(",","").replace(" ","_")}.txt`,N=(e,t,a)=>(0,d.N)(U(e,t),R(e,a)),G=(0,s.H)((0,o.B)(new Date,4),45),W=(0,s.H)((0,o.B)(new Date,5),45),Y=(0,r.Z)(((e,t,a)=>{if((0,h.Z)(a))return(0,l.mr)(a,e,t);if("string"==typeof a&&a){const i=a.split(":"),n=(0,s.H)((0,o.B)(new Date,parseInt(i[0])),parseInt(i[1]));return(0,l.mr)(n,e,t)}return`${(0,l.mr)(G,e,t)} - ${(0,l.mr)(W,e,t)}`})),Q="application/x-tar",q={file:void 0};i()}catch(f){i(f)}}))},36029:function(e,t,a){a.d(t,{X:()=>n,q:()=>i});const i=(e,t)=>e.connection.subscribeMessage(t,{type:"backup/subscribe_events"}),n={manager_state:"idle"}},56785:function(e,t,a){a.d(t,{js:()=>s,rY:()=>n,yd:()=>c,yz:()=>r});a(19083),a(71695),a(40251),a(92519),a(42179),a(89256),a(24931),a(88463),a(57449),a(19814),a(61006),a(47021);var i=a(17803);const n=e=>e.data,s=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,o=new Set([502,503,504]),r=e=>!!(e&&e.status_code&&o.has(e.status_code))||!(!e||!e.message||!e.message.includes("ERR_CONNECTION_CLOSED")&&!e.message.includes("ERR_CONNECTION_RESET")),c=async(e,t)=>(0,i.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`))},88991:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{S:()=>c,ST:()=>d,n3:()=>l});a(19083),a(71695),a(40251),a(61006),a(47021);var n=a(59847),s=a(81530),o=e([s]);s=(o.then?(await o)():o)[0];const r={alarm_control_panel:()=>a.e("62410").then(a.bind(a,80875)),automation:()=>a.e("98368").then(a.bind(a,13592)),camera:()=>a.e("11569").then(a.bind(a,17712)),climate:()=>Promise.all([a.e("41258"),a.e("21728")]).then(a.bind(a,5192)),configurator:()=>Promise.all([a.e("46379"),a.e("52430"),a.e("86002")]).then(a.bind(a,10080)),conversation:()=>Promise.all([a.e("46379"),a.e("51229"),a.e("65258")]).then(a.bind(a,93726)),counter:()=>a.e("25510").then(a.bind(a,32441)),cover:()=>a.e("78402").then(a.bind(a,72869)),date:()=>Promise.all([a.e("46379"),a.e("41258"),a.e("38336"),a.e("64836")]).then(a.bind(a,6560)),datetime:()=>Promise.all([a.e("46379"),a.e("41258"),a.e("3134"),a.e("38336"),a.e("74040")]).then(a.bind(a,11348)),fan:()=>a.e("88973").then(a.bind(a,54764)),group:()=>Promise.all([a.e("46379"),a.e("41258"),a.e("99287"),a.e("1916"),a.e("81407")]).then(a.bind(a,96771)),humidifier:()=>a.e("66881").then(a.bind(a,9198)),image:()=>a.e("89870").then(a.bind(a,37093)),input_boolean:()=>a.e("64783").then(a.bind(a,85742)),input_datetime:()=>Promise.all([a.e("46379"),a.e("41258"),a.e("38336"),a.e("73561")]).then(a.bind(a,68377)),lawn_mower:()=>a.e("49").then(a.bind(a,31650)),light:()=>a.e("55815").then(a.bind(a,59031)),lock:()=>a.e("51539").then(a.bind(a,1563)),media_player:()=>Promise.all([a.e("41258"),a.e("8656")]).then(a.bind(a,99091)),person:()=>Promise.all([a.e("35637"),a.e("49554"),a.e("64693")]).then(a.bind(a,86554)),remote:()=>Promise.all([a.e("41258"),a.e("2600")]).then(a.bind(a,92081)),script:()=>Promise.all([a.e("46379"),a.e("24199"),a.e("78943"),a.e("99287"),a.e("52430"),a.e("78823"),a.e("43682")]).then(a.bind(a,74358)),siren:()=>a.e("34404").then(a.bind(a,86534)),sun:()=>a.e("8373").then(a.bind(a,55421)),switch:()=>a.e("50728").then(a.bind(a,56985)),time:()=>Promise.all([a.e("46379"),a.e("41258"),a.e("38336"),a.e("52137")]).then(a.bind(a,16347)),timer:()=>a.e("14597").then(a.bind(a,42971)),update:()=>Promise.all([a.e("5080"),a.e("52430"),a.e("49016"),a.e("33617"),a.e("9524")]).then(a.bind(a,51077)),vacuum:()=>Promise.all([a.e("41258"),a.e("29453")]).then(a.bind(a,61372)),valve:()=>a.e("60455").then(a.bind(a,20973)),water_heater:()=>a.e("80518").then(a.bind(a,60054)),weather:()=>Promise.all([a.e("99287"),a.e("15722"),a.e("85078")]).then(a.bind(a,95818))},c=e=>{const t=(0,n.N)(e);return l(t)},l=e=>s.l.includes(e)?e:s.tm.includes(e)?"hidden":"default",d=e=>{e in r&&r[e]()};i()}catch(r){i(r)}}))},87979:function(e,t,a){var i=a(61701),n=(a(71695),a(47021),a(57243)),s=a(50778),o=a(31146),r=(a(54202),a(43344),a(28008));let c,l,d,u,h,p=e=>e;(0,i.Z)([(0,s.Mo)("hass-subpage")],(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)()],key:"header",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"supervisor",value(){return!1}},{kind:"field",decorators:[(0,o.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,n.dy)(c||(c=p` <div class="toolbar"> ${0} <div class="main-title"><slot name="header">${0}</slot></div> <slot name="toolbar-icon"></slot> </div> <div class="content ha-scrollbar" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?(0,n.dy)(l||(l=p` <ha-menu-button .hassio="${0}" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.supervisor,this.hass,this.narrow):this.backPath?(0,n.dy)(d||(d=p` <a href="${0}"> <ha-icon-button-arrow-prev .hass="${0}"></ha-icon-button-arrow-prev> </a> `),this.backPath,this.hass):(0,n.dy)(u||(u=p` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,this._saveScrollPos)}},{kind:"method",decorators:[(0,s.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,(0,n.iv)(h||(h=p`: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)},32889:function(e,t,a){a.a(e,(async function(e,t){try{var i=a(61701),n=(a(63721),a(71695),a(47021),a(57243)),s=a(50778),o=(a(59826),a(54977),a(17170)),r=(a(65981),e([o]));o=(r.then?(await r)():r)[0];let c,l,d,u,h,p=e=>e;const g={success:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",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",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",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",loading:"M12,18A6,6 0 0,1 6,12C6,11 6.25,10.03 6.7,9.2L5.24,7.74C4.46,8.97 4,10.43 4,12A8,8 0 0,0 12,20V23L16,19L12,15M12,4V1L8,5L12,9V6A6,6 0 0,1 18,12C18,13 17.75,13.97 17.3,14.8L18.76,16.26C19.54,15.03 20,13.57 20,12A8,8 0 0,0 12,4Z"};(0,i.Z)([(0,s.Mo)("ha-backup-summary-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)()],key:"heading",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"description",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,attribute:"has-action"})],key:"hasAction",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)()],key:"status",value(){return"info"}},{kind:"method",key:"render",value:function(){return(0,n.dy)(c||(c=p` <ha-card outlined> <div class="summary"> ${0} <div class="content"> <p class="heading">${0}</p> <p class="description">${0}</p> </div> ${0} </div> <div class="content"> <slot></slot> </div> </ha-card> `),"loading"===this.status?(0,n.dy)(l||(l=p`<ha-spinner></ha-spinner>`)):(0,n.dy)(d||(d=p` <div class="icon ${0}"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> `),this.status,g[this.status]),this.heading,this.description,this.hasAction?(0,n.dy)(u||(u=p` <div class="action"> <slot name="action"></slot> </div> `)):n.Ld)}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(h||(h=p`ha-card{min-height:74px}.summary{display:flex;flex-direction:row;column-gap:16px;row-gap:8px;align-items:center;padding:16px;padding-bottom:8px;width:100%;box-sizing:border-box}.icon{position:relative;border-radius:20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;overflow:hidden;--icon-color:var(--primary-color)}.icon.success{--icon-color:var(--success-color)}.icon.warning{--icon-color:var(--warning-color)}.icon.error{--icon-color:var(--error-color)}.icon::before{display:block;content:"";position:absolute;inset:0;background-color:var(--icon-color,var(--primary-color));opacity:.2}.icon ha-svg-icon{color:var(--icon-color,var(--primary-color));width:24px;height:24px}ha-spinner{--ha-spinner-size:40px}.content{display:flex;flex-direction:column;flex:1;min-width:0}.heading{font-size:22px;font-style:normal;font-weight:400;line-height:28px;color:var(--primary-text-color);margin:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.description{font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.25px;color:var(--secondary-text-color);margin:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}@media all and (max-width:550px){.action{width:100%;display:flex;justify-content:flex-end}}`))}}]}}),n.oi);t()}catch(c){t(c)}}))},81742:function(e,t,a){a.a(e,(async function(e,t){try{var i=a(61701),n=(a(71695),a(52805),a(9359),a(56475),a(70104),a(48136),a(47021),a(57243)),s=a(50778),o=a(27486),r=a(72344),c=(a(59826),a(54977),a(13928),a(19993),a(74633),a(26779)),l=a(28008),d=a(90698),u=e([c]);c=(u.then?(await u)():u)[0];let h,p,g,f=e=>e;const v={automatic:"M18,11V12.5C21.19,12.5 23.09,16.05 21.33,18.71L20.24,17.62C21.06,15.96 19.85,14 18,14V15.5L15.75,13.25L18,11M18,22V20.5C14.81,20.5 12.91,16.95 14.67,14.29L15.76,15.38C14.94,17.04 16.15,19 18,19V17.5L20.25,19.75L18,22M19,3H18V1H16V3H8V1H6V3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H14C13.36,20.45 12.86,19.77 12.5,19H5V8H19V10.59C19.71,10.7 20.39,10.94 21,11.31V5A2,2 0 0,0 19,3Z",manual:"M10,9A1,1 0 0,1 11,8A1,1 0 0,1 12,9V13.47L13.21,13.6L18.15,15.79C18.68,16.03 19,16.56 19,17.14V21.5C18.97,22.32 18.32,22.97 17.5,23H11C10.62,23 10.26,22.85 10,22.57L5.1,18.37L5.84,17.6C6.03,17.39 6.3,17.28 6.58,17.28H6.8L10,19V9M11,5A4,4 0 0,1 15,9C15,10.5 14.2,11.77 13,12.46V11.24C13.61,10.69 14,9.89 14,9A3,3 0 0,0 11,6A3,3 0 0,0 8,9C8,9.89 8.39,10.69 9,11.24V12.46C7.8,11.77 7,10.5 7,9A4,4 0 0,1 11,5Z",addon_update:"M20.5,11H19V7C19,5.89 18.1,5 17,5H13V3.5A2.5,2.5 0 0,0 10.5,1A2.5,2.5 0 0,0 8,3.5V5H4A2,2 0 0,0 2,7V10.8H3.5C5,10.8 6.2,12 6.2,13.5C6.2,15 5,16.2 3.5,16.2H2V20A2,2 0 0,0 4,22H7.8V20.5C7.8,19 9,17.8 10.5,17.8C12,17.8 13.2,19 13.2,20.5V22H17A2,2 0 0,0 19,20V16H20.5A2.5,2.5 0 0,0 23,13.5A2.5,2.5 0 0,0 20.5,11Z"},m=e=>e.reduce(((e,t)=>(e.count++,e.size+=(0,c.En)(t),e)),{count:0,size:0});(0,i.Z)([(0,s.Mo)("ha-backup-overview-backups")],(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:"backups",value(){return[]}},{kind:"field",key:"_stats",value(){return(0,o.Z)(((e,t)=>(0,c.mu)(t).map((a=>{const i=e.filter((e=>(0,c.Vn)(e,t)===a));return[a,m(i)]}))))}},{kind:"method",key:"render",value:function(){const e=(0,r.p)(this.hass,"hassio"),t=this._stats(this.backups,e);return(0,n.dy)(h||(h=f` <ha-card class="my-backups"> <div class="card-header"> ${0} </div> <div class="card-content"> <ha-md-list> ${0} </ha-md-list> </div> <div class="card-actions"> <a href="/config/backup/backups?type=all"> <ha-button> ${0} </ha-button> </a> </div> </ha-card> `),this.hass.localize("ui.panel.config.backup.overview.backups.title"),t.map((([e,{count:t,size:a}])=>(0,n.dy)(p||(p=f` <ha-md-list-item type="link" href="/config/backup/backups?type=${0}"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> `),e,v[e],this.hass.localize(`ui.panel.config.backup.overview.backups.${e}`,{count:t}),this.hass.localize("ui.panel.config.backup.overview.backups.total_size",{size:(0,d.d)(a)})))),this.hass.localize("ui.panel.config.backup.overview.backups.show_all"))}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,(0,n.iv)(g||(g=f`.content{padding:28px 20px 0;max-width:690px;margin:0 auto;gap:24px;display:flex;flex-direction:column;margin-bottom:calc(72px + env(safe-area-inset-bottom))}.card-actions{display:flex;justify-content:flex-end}.card-header{padding-bottom:8px}.card-content{padding-left:0;padding-right:0;padding-bottom:0}`))]}}]}}),n.oi);t()}catch(h){t(h)}}))},99377:function(e,t,a){var i=a(61701),n=(a(71695),a(40251),a(47021),a(57243)),s=a(50778),o=a(36522),r=(a(59826),a(54977),a(37583),a(28008));let c,l,d=e=>e;(0,i.Z)([(0,s.Mo)("ha-backup-overview-onboarding")],(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:"method",key:"_setup",value:async function(){(0,o.B)(this,"button-click")}},{kind:"method",key:"render",value:function(){return(0,n.dy)(c||(c=d` <ha-card> <div class="card-header"> <div class="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> ${0} </div> <div class="card-content"> <p> ${0} </p> </div> <div class="card-actions"> <ha-button @click="${0}">${0}</ha-button> </div> </ha-card> `),"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",this.hass.localize("ui.panel.config.backup.overview.onboarding.title"),this.hass.localize("ui.panel.config.backup.overview.onboarding.description"),this._setup,this.hass.localize("ui.panel.config.backup.overview.onboarding.setup"))}},{kind:"get",static:!0,key:"styles",value:function(){return[r.Qx,(0,n.iv)(l||(l=d`.card-header{display:flex;flex-direction:row;align-items:center;gap:16px}.icon{position:relative;border-radius:20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;overflow:hidden}.icon::before{display:block;content:"";position:absolute;inset:0;background-color:var(--primary-color);opacity:.2}.icon ha-svg-icon{color:var(--primary-color);width:24px;height:24px}p{margin:0}.card-actions{display:flex;justify-content:flex-end;border-top:none}`))]}}]}}),n.oi)},84370:function(e,t,a){a.a(e,(async function(e,t){try{var i=a(61701),n=(a(71695),a(47021),a(57243)),s=a(50778),o=a(32889),r=e([o]);o=(r.then?(await r)():r)[0];let c,l=e=>e;(0,i.Z)([(0,s.Mo)("ha-backup-overview-progress")],(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:"manager",value:void 0},{kind:"get",key:"_heading",value:function(){const e=this.manager.manager_state;return"idle"===e?"":this.hass.localize(`ui.panel.config.backup.overview.progress.heading.${e}`)}},{kind:"get",key:"_description",value:function(){switch(this.manager.manager_state){case"create_backup":return this.manager.stage?this.hass.localize(`ui.panel.config.backup.overview.progress.description.create_backup.${this.manager.stage}`):"";case"restore_backup":return this.manager.stage?this.hass.localize(`ui.panel.config.backup.overview.progress.description.restore_backup.${this.manager.stage}`):"";case"receive_backup":return this.manager.stage?this.hass.localize(`ui.panel.config.backup.overview.progress.description.receive_backup.${this.manager.stage}`):"";default:return""}}},{kind:"method",key:"render",value:function(){return(0,n.dy)(c||(c=l` <ha-backup-summary-card .hass="${0}" .heading="${0}" .description="${0}" status="loading"> </ha-backup-summary-card> `),this.hass,this._heading,this._description)}}]}}),n.oi);t()}catch(c){t(c)}}))},24714:function(e,t,a){a.a(e,(async function(e,t){try{var i=a(61701),n=a(72621),s=(a(19083),a(71695),a(9359),a(56475),a(70104),a(52924),a(40251),a(61006),a(47021),a(57243)),o=a(50778),r=a(83523),c=(a(59826),a(54977),a(13928),a(19993),a(74633),a(37583),a(26779)),l=a(28008),d=a(72344),u=a(17705),h=e([c]);c=(h.then?(await h)():h)[0];let p,g,f,v=e=>e;const m="M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z",k="M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M4,9V12C4,14.21 7.58,16 12,16C16.42,16 20,14.21 20,12V9C20,11.21 16.42,13 12,13C7.58,13 4,11.21 4,9M4,14V17C4,19.21 7.58,21 12,21C16.42,21 20,19.21 20,17V14C20,16.21 16.42,18 12,18C7.58,18 4,16.21 4,14Z",b="M20.5,11H19V7C19,5.89 18.1,5 17,5H13V3.5A2.5,2.5 0 0,0 10.5,1A2.5,2.5 0 0,0 8,3.5V5H4A2,2 0 0,0 2,7V10.8H3.5C5,10.8 6.2,12 6.2,13.5C6.2,15 5,16.2 3.5,16.2H2V20A2,2 0 0,0 4,22H7.8V20.5C7.8,19 9,17.8 10.5,17.8C12,17.8 13.2,19 13.2,20.5V22H17A2,2 0 0,0 19,20V16H20.5A2.5,2.5 0 0,0 23,13.5A2.5,2.5 0 0,0 20.5,11Z",y="M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z";(0,i.Z)([(0,o.Mo)("ha-backup-overview-settings")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"config",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"agents",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_showDbOption",value(){return!0}},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(a,"firstUpdated",this,3)([e]),this._checkDbOption()}},{kind:"method",key:"_configure",value:function(){(0,r.c)("/config/backup/settings")}},{kind:"method",key:"_checkDbOption",value:async function(){if((0,d.p)(this.hass,"recorder")){const e=await(0,u._m)(this.hass.connection);this._showDbOption=e.db_in_default_location}else this._showDbOption=!1}},{kind:"method",key:"_scheduleDescription",value:function(e){const{copies:t,days:a}=e.retention,{recurrence:i}=e.schedule;if(i===c.wy.NEVER)return this.hass.localize("ui.panel.config.backup.overview.settings.schedule_never");const n=this.config.schedule.time&&(0,c.KE)(this.hass.locale,this.hass.config,this.config.schedule.time);let s=this.hass.localize("ui.panel.config.backup.overview.settings.schedule_never");const o=this.config.schedule.days;this.config.schedule.recurrence===c.wy.DAILY||this.config.schedule.recurrence===c.wy.CUSTOM_DAYS&&7===o.length?s=this.hass.localize(`ui.panel.config.backup.overview.settings.schedule_${this.config.schedule.time?"":"optimized_"}daily`,{time:n}):this.config.schedule.recurrence===c.wy.CUSTOM_DAYS&&0!==o.length&&(s=2===o.length&&o.includes("sat")&&o.includes("sun")?this.hass.localize(`ui.panel.config.backup.overview.settings.schedule_${this.config.schedule.time?"":"optimized_"}weekend`,{time:n}):5!==o.length||o.includes("sat")||o.includes("sun")?this.hass.localize(`ui.panel.config.backup.overview.settings.schedule_${this.config.schedule.time?"":"optimized_"}days`,{count:o.length,days:o.map((e=>this.hass.localize(`ui.panel.config.backup.overview.settings.${o.length>2?"short_weekdays":"weekdays"}.${e}`))).join(", "),time:n}):this.hass.localize(`ui.panel.config.backup.overview.settings.schedule_${this.config.schedule.time?"":"optimized_"}weekdays`,{time:n}));let r=this.hass.localize("ui.panel.config.backup.overview.settings.schedule_copies_all");return t?r=this.hass.localize("ui.panel.config.backup.overview.settings.schedule_copies_backups",{count:t}):a&&(r=this.hass.localize("ui.panel.config.backup.overview.settings.schedule_copies_days",{count:a})),s+" "+r}},{kind:"method",key:"_addonsDescription",value:function(e){var t;if(e.create_backup.include_all_addons)return this.hass.localize("ui.panel.config.backup.overview.settings.addons_all");const a=null===(t=e.create_backup.include_addons)||void 0===t?void 0:t.length;return a?this.hass.localize("ui.panel.config.backup.overview.settings.addons_many",{count:a}):this.hass.localize("ui.panel.config.backup.overview.settings.addons_none")}},{kind:"method",key:"_locationsDescription",value:function(e){const t=e.create_backup.agent_ids.some((e=>(0,c.V1)(e))),a=e.create_backup.agent_ids.filter((e=>!(0,c.V1)(e)));if(a.length){if(1===a.length){const e=(0,c.Sw)(this.hass.localize,a[0],this.agents);return this.hass.localize("ui.panel.config.backup.overview.settings.locations_one",{name:e})}return this.hass.localize("ui.panel.config.backup.overview.settings.locations_many",{count:a.length})}return t?this.hass.localize("ui.panel.config.backup.overview.settings.locations_local_only"):this.hass.localize("ui.panel.config.backup.overview.settings.locations_none")}},{kind:"method",key:"render",value:function(){const e=this.hass.config.components.includes("hassio");return(0,s.dy)(p||(p=v` <ha-card class="my-backups"> <div class="card-header"> ${0} </div> <div class="card-content"> <ha-md-list> <ha-md-list-item type="link" href="/config/backup/settings#schedule"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item type="link" href="/config/backup/settings#data"> <ha-svg-icon slot="start" .path="${0}"></ha-svg-icon> <div slot="headline"> ${0} </div> <div slot="supporting-text"> ${0} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> ${0} <ha-md-l