UNPKG

iobroker.lovelace

Version:

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

61 lines 64.7 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[18109],{72487:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{CA:function(){return C},Mi:function(){return L},Pm:function(){return $},Wq:function(){return y},Yq:function(){return l},bl:function(){return S},c2:function(){return w},fr:function(){return f},gu:function(){return z},kz:function(){return d},m9:function(){return T},sl:function(){return m},ur:function(){return D},zB:function(){return p}});o(18111),o(20116);var i=o(74487),r=o(22786),n=o(46927),s=o(8480),c=t([i,s]);[i,s]=c.then?(await c)():c;(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)}));const l=(t,e,o)=>h(e,o.time_zone).format(t),h=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),d=(t,e,o)=>u(e,o.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),p=(t,e,o)=>{var a,i,r,s;const c=g(e,o.time_zone);if(e.date_format===n.ow.language||e.date_format===n.ow.system)return c.format(t);const l=c.formatToParts(t),h=null===(a=l.find(t=>"literal"===t.type))||void 0===a?void 0:a.value,d=null===(i=l.find(t=>"day"===t.type))||void 0===i?void 0:i.value,u=null===(r=l.find(t=>"month"===t.type))||void 0===r?void 0:r.value,p=null===(s=l.find(t=>"year"===t.type))||void 0===s?void 0:s.value,m=l[l.length-1];let v="literal"===(null==m?void 0:m.type)?null==m?void 0:m.value:"";"bg"===e.language&&e.date_format===n.ow.YMD&&(v="");return{[n.ow.DMY]:`${d}${h}${u}${h}${p}${v}`,[n.ow.MDY]:`${u}${h}${d}${h}${p}${v}`,[n.ow.YMD]:`${p}${h}${u}${h}${d}${v}`}[e.date_format]},g=(0,r.A)((t,e)=>{const o=t.date_format===n.ow.system?void 0:t.language;return t.date_format===n.ow.language||(t.date_format,n.ow.system),new Intl.DateTimeFormat(o,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),m=(t,e,o)=>v(e,o.time_zone).format(t),v=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),f=(t,e,o)=>b(e,o.time_zone).format(t),b=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),y=(t,e,o)=>_(e,o.time_zone).format(t),_=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),w=(t,e,o)=>k(e,o.time_zone).format(t),k=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),$=(t,e,o)=>x(e,o.time_zone).format(t),x=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),C=(t,e,o)=>M(e,o.time_zone).format(t),M=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),z=(t,e,o)=>Z(e,o.time_zone).format(t),Z=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),L=(t,e,o)=>A(e,o.time_zone).format(t),A=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),D=(t,e,o)=>N(e,o.time_zone).format(t),N=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),S=(t,e,o)=>{const a=(0,s.wj)(e.time_zone,o.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:a}).format(t)},T=(t,e,o,a)=>`${S(t,o,a)}/${S(e,o,a)}`;a()}catch(l){a(l)}})},95747:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{CL:function(){return y},GH:function(){return k},Rl:function(){return p},ZS:function(){return f},aQ:function(){return m},r6:function(){return d},yg:function(){return _}});var i=o(74487),r=o(22786),n=o(72487),s=o(30162),c=o(8480),l=o(69543),h=t([i,c,n,s]);[i,c,n,s]=h.then?(await h)():h;const d=(t,e,o)=>u(e,o.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,l.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,l.J)(t)?"h12":"h23",timeZone:(0,c.wj)(t.time_zone,e)})),p=t=>g().format(t),g=(0,r.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),m=(t,e,o)=>v(e,o.time_zone).format(t),v=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",hour:(0,l.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,l.J)(t)?"h12":"h23",timeZone:(0,c.wj)(t.time_zone,e)})),f=(t,e,o)=>b(e,o.time_zone).format(t),b=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",day:"numeric",hour:(0,l.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,l.J)(t)?"h12":"h23",timeZone:(0,c.wj)(t.time_zone,e)})),y=(t,e,o)=>(new Date).getFullYear()===t.getFullYear()?f(t,e,o):m(t,e,o),_=(t,e,o)=>w(e,o.time_zone).format(t),w=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,l.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,l.J)(t)?"h12":"h23",timeZone:(0,c.wj)(t.time_zone,e)})),k=(t,e,o)=>`${(0,n.zB)(t,e,o)}, ${(0,s.fU)(t,e,o)}`;a()}catch(d){a(d)}})},30162:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{LW:function(){return m},Xs:function(){return p},fU:function(){return l},ie:function(){return d}});var i=o(74487),r=o(22786),n=o(8480),s=o(69543),c=t([i,n]);[i,n]=c.then?(await c)():c;const l=(t,e,o)=>h(e,o.time_zone).format(t),h=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),d=(t,e,o)=>u(e,o.time_zone).format(t),u=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),p=(t,e,o)=>g(e,o.time_zone).format(t),g=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",hour:(0,s.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),m=(t,e,o)=>v(e,o.time_zone).format(t),v=(0,r.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(t.time_zone,e)}));a()}catch(l){a(l)}})},8480:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{fL:function(){return p},n2:function(){return g},wj:function(){return m}});var i,r,n,s=o(74487),c=o(29079),l=o(46927),h=t([s]);s=(h.then?(await h)():h)[0];const d=null===(i=Intl.DateTimeFormat)||void 0===i||null===(r=(n=i.call(Intl)).resolvedOptions)||void 0===r?void 0:r.call(n).timeZone,u=d&&("UTC"===d||"Etc/UTC"===d||d in c)?d:void 0,p=14881==o.j?void 0!==u:null,g=null!=u?u:"UTC",m=(t,e)=>t===l.Wj.local&&u?g:e;a()}catch(d){a(d)}})},69543:function(t,e,o){o.d(e,{J:function(){return r}});o(74423);var a=o(22786),i=o(46927);const r=(0,a.A)(t=>{if(t.time_format===i.Hg.language||t.time_format===i.Hg.system){const e=t.time_format===i.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===i.Hg.am_pm})},93421:function(t,e,o){o.d(e,{IW:function(){return h},dH:function(){return l},fI:function(){return c}});o(44114),o(62953);var a=o(35211),i=o(22792),r=o(32172);const n=(t,e)=>{let o=t;for(const a of e){if(null==o)return;o=o[a]}return o},s=(t,e,o)=>{const i=(0,r.p)({transformer:function(t){return o.call(this,t)},watch:e?[e]:[]}),n=(0,a.Fg)({context:t,subscribe:!0});return(t,e)=>{i(t,e),n(t,e)}},c=t=>s(i.iN,t.entityIdPath[0],function(e){const o=n(this,t.entityIdPath);return"string"==typeof o?null==e?void 0:e[o]:void 0}),l=t=>s(i.X1,t.entityIdPath[0],function(e){const o=n(this,t.entityIdPath);return"string"==typeof o?null==e?void 0:e[o]:void 0}),h=()=>s(i.D5,void 0,({localize:t})=>t)},26218:function(t,e,o){o.d(e,{a:function(){return i}});o(16280);const a=(0,o(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const i=e.connectedCallback;e.connectedCallback=function(){i.call(this);const e=this[o];e&&this.updateComplete.then(()=>{const o=this.renderRoot.querySelector(t);o&&setTimeout(()=>{o.scrollTop=e},0)})};const r=Object.getOwnPropertyDescriptor(e,o);let n;if(void 0===r)n={get(){var t;return this[`__${String(o)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){a(t),this[`__${String(o)}`]=t},configurable:!0,enumerable:!0};else{const t=r.set;n=Object.assign(Object.assign({},r),{},{set(e){a(e),this[`__${String(o)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,o,n)}}},32172:function(t,e,o){o.d(e,{p:function(){return a}});o(16280),o(18111),o(7588),o(45367),o(92731),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);function a(t){return(e,o)=>{if("object"==typeof o)throw new Error("This decorator does not support this compilation type.");const a=String(o),i=e;if(i._transformers){if(!i.hasOwnProperty("_transformers")){const t=i._transformers;i._transformers=new Map,t.forEach((t,e)=>i._transformers.set(e,t))}}else{i._transformers=new Map,i._watching=new Map;const t=i.willUpdate;i.willUpdate=function(e){t.call(this,e);const o=new Set;e.forEach((t,e)=>{const a=this._watching.get(e);void 0!==a&&a.forEach(t=>o.add(t))}),o.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}i._transformers.set(o,t.transformer),t.watch&&t.watch.forEach(t=>{let e=i._watching.get(t);e||(e=new Set,i._watching.set(t,e)),e.add(o)});const r=Object.getOwnPropertyDescriptor(e,o);let n;if(void 0===r)n={get(){return this[`__transform_${a}`]},set(t){const e=this[`__transform_${a}`],o=this._transformers.get(a);this[`__transform_${a}`]=o?o.call(this,t):t,this[`__original_${a}`]=t,this.requestUpdate(a,e)},configurable:!0,enumerable:!0};else{const t=r.set;n=Object.assign(Object.assign({},r),{},{set(e){const o=this[`__transform_${a}`],i=this._transformers.get(a);this[`__transform_${a}`]=i?i.call(this,e):e,this[`__original_${a}`]=e,this.requestUpdate(a,o),null==t||t.call(this,e)}})}Object.defineProperty(e,o,n)}}},69093:function(t,e,o){o.d(e,{t:function(){return i}});var a=o(71727);const i=t=>(0,a.m)(t.entity_id)},82286:function(t,e,o){o.d(e,{$:function(){return a}});const a=(t,e)=>i(t.attributes,e),i=(t,e)=>0!==(t.supported_features&e)},86198:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{T:function(){return s}});var i=o(74487),r=o(22786),n=t([i]);i=(n.then?(await n)():n)[0];const s=(t,e)=>{try{var o,a;return null!==(o=null===(a=c(e))||void 0===a?void 0:a.of(t))&&void 0!==o?o:t}catch(i){return t}},c=(0,r.A)(t=>new Intl.DisplayNames(t.language,{type:"language",fallback:"code"}));a()}catch(s){a(s)}})},20058:function(t,e,o){o.a(t,async function(t,a){try{o.d(e,{QL:function(){return d},ZQ:function(){return u},ZV:function(){return h},ty:function(){return c},x:function(){return s}});var i=o(74487),r=(o(74423),o(18111),o(61701),o(46927)),n=t([i]);i=(n.then?(await n)():n)[0];const s=t=>c(t.attributes),c=(t,e)=>!!t.unit_of_measurement||!!t.state_class||(e||[]).includes(t.device_class||""),l=t=>{switch(t.number_format){case r.jG.comma_decimal:return["en-US","en"];case r.jG.decimal_comma:return["de","es","it"];case r.jG.space_comma:return["fr","sv","cs"];case r.jG.quote_decimal:return["de-CH"];case r.jG.system:return;default:return t.language}},h=(t,e,o)=>d(t,e,o).map(t=>t.value).join(""),d=(t,e,o)=>{const a=e?l(e):void 0;return(null==e?void 0:e.number_format)===r.jG.none||Number.isNaN(Number(t))?Number.isNaN(Number(t))||""===t||(null==e?void 0:e.number_format)!==r.jG.none?[{type:"literal",value:t}]:new Intl.NumberFormat("en-US",p(t,Object.assign(Object.assign({},o),{},{useGrouping:!1}))).formatToParts(Number(t)):new Intl.NumberFormat(a,p(t,o)).formatToParts(Number(t))},u=(t,e)=>{var o;const a=null==e?void 0:e.display_precision;return null!=a?{maximumFractionDigits:a,minimumFractionDigits:a}:Number.isInteger(Number(null==t||null===(o=t.attributes)||void 0===o?void 0:o.step))&&Number.isInteger(Number(null==t?void 0:t.state))?{maximumFractionDigits:0}:void 0},p=(t,e)=>{const o=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return o;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;o.minimumFractionDigits=e,o.maximumFractionDigits=e}return o};a()}catch(s){a(s)}})},77796:function(t,e,o){o.d(e,{n:function(){return a}});o(62953);const a=(t,e,o=!0,a=!0)=>{let i,r=0;const n=(...n)=>{const s=()=>{r=!1===o?0:Date.now(),i=void 0,t(...n)},c=Date.now();r||!1!==o||(r=c);const l=e-(c-r);l<=0||l>e?(i&&(clearTimeout(i),i=void 0),r=c,t(...n)):i||!1===a||(i=window.setTimeout(s,l))};return n.cancel=()=>{clearTimeout(i),i=void 0,r=0},n}},89300:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),i=o(5124),r=o(67576),n=o(6412),s=o(18350),c=o(65829),l=(o(67094),t([s,c]));[s,c]=l.then?(await l)():l;let h,d,u,p,g,m,v=t=>t;const f="M2.2,16.06L3.88,12L2.2,7.94L6.26,6.26L7.94,2.2L12,3.88L16.06,2.2L17.74,6.26L21.8,7.94L20.12,12L21.8,16.06L17.74,17.74L16.06,21.8L12,20.12L7.94,21.8L6.26,17.74L2.2,16.06M13,17V15H11V17H13M13,13V7H11V13H13Z",b="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z";class y extends i.WF{render(){const t=this.progress||this._result?"accent":this.appearance;return(0,i.qy)(h||(h=v` <ha-button .appearance="${0}" .disabled="${0}" .loading="${0}" .variant="${0}" class="${0}"> ${0} <slot>${0}</slot> </ha-button> ${0} `),t,this.disabled,this.progress,"success"===this._result?"success":"error"===this._result?"danger":this.variant,(0,n.H)({result:!!this._result,success:"success"===this._result,error:"error"===this._result}),this.iconPath?(0,i.qy)(d||(d=v`<ha-svg-icon .path="${0}" slot="start"></ha-svg-icon>`),this.iconPath):i.s6,this.label,this._result?(0,i.qy)(u||(u=v` <div class="progress"> ${0} </div> `),"success"===this._result?(0,i.qy)(p||(p=v`<ha-svg-icon .path="${0}"></ha-svg-icon>`),b):"error"===this._result?(0,i.qy)(g||(g=v`<ha-svg-icon .path="${0}"></ha-svg-icon>`),f):i.s6):i.s6)}actionSuccess(){this._setResult("success")}actionError(){this._setResult("error")}_setResult(t){this._result=t,setTimeout(()=>{this._result=void 0},2e3)}constructor(...t){super(...t),this.disabled=!1,this.progress=!1,this.appearance="accent",this.variant="brand"}}y.styles=(0,i.AH)(m||(m=v`:host{outline:0;display:inline-block;position:relative}:host([progress]){pointer-events:none}.progress{bottom:0;display:flex;justify-content:center;align-items:center;position:absolute;top:0;width:100%}ha-button{width:100%}ha-button.result::part(caret),ha-button.result::part(end),ha-button.result::part(label),ha-button.result::part(spinner),ha-button.result::part(start){visibility:hidden}:host([appearance=brand]) ha-svg-icon{color:var(--white-color)}`)),(0,a.Cg)([(0,r.MZ)()],y.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],y.prototype,"progress",void 0),(0,a.Cg)([(0,r.MZ)()],y.prototype,"appearance",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"iconPath",void 0),(0,a.Cg)([(0,r.MZ)()],y.prototype,"variant",void 0),(0,a.Cg)([(0,r.wk)()],y.prototype,"_result",void 0),y=(0,a.Cg)([(0,r.EM)("ha-progress-button")],y),e()}catch(h){e(h)}})},38962:function(t,e,o){o.a(t,async function(t,a){try{o.r(e);o(62953);var i=o(40445),r=o(5124),n=o(67576),s=o(6412),c=o(93421),l=o(1087),h=o(26300),d=(o(67094),t([h]));h=(d.then?(await d)():d)[0];let u,p,g,m,v=t=>t;const f="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",b={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"};class y extends r.WF{render(){var t;return(0,r.qy)(u||(u=v` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,s.H)({[this.alertType]:!0}),this.title?"":"no-title",b[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,r.qy)(p||(p=v`<div class="title">${0}</div>`),this.title):r.s6,this.dismissable?(0,r.qy)(g||(g=v`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(t=this._localize)||void 0===t?void 0:t.call(this,"ui.common.dismiss_alert"),f):r.s6)}_dismissClicked(){(0,l.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}y.styles=(0,r.AH)(m||(m=v`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.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;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-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}`)),(0,i.Cg)([(0,n.MZ)()],y.prototype,"title",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"alert-type"})],y.prototype,"alertType",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"dismissable",void 0),(0,i.Cg)([(0,n.wk)(),(0,c.IW)()],y.prototype,"_localize",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"narrow",void 0),y=(0,i.Cg)([(0,n.EM)("ha-alert")],y),a()}catch(u){a(u)}})},76776:function(t,e,o){o(62953);var a=o(40445),i=o(5124),r=o(67576);let n,s,c,l=t=>t;class h extends i.WF{render(){return(0,i.qy)(n||(n=l` ${0} <slot></slot> `),this.header?(0,i.qy)(s||(s=l`<h1 class="card-header">${0}</h1>`),this.header):i.s6)}constructor(...t){super(...t),this.raised=!1}}h.styles=(0,i.AH)(c||(c=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,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
    :host
      ::slotted(
        .card-content:not(:nth-child(1 of .card-content, .card-header))
      ),
    slot:not(:first-child)::slotted(.card-content) {
      padding-top: 0;
      margin-top: calc(var(--ha-space-2) * -1);
    }
    :host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`)),(0,a.Cg)([(0,r.MZ)()],h.prototype,"header",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],h.prototype,"raised",void 0),h=(0,a.Cg)([(0,r.EM)("ha-card")],h)},9503:function(t,e,o){var a=o(40445),i=o(97577),r=o(5124),n=o(67576);let s,c=t=>t;class l extends i.A{get value(){var t;return null!==(t=this._value)&&void 0!==t?t:null}set value(t){this._value=t}static get styles(){return[i.A.styles,(0,r.AH)(s||(s=c`:host{--wa-form-control-toggle-size:var(--ha-checkbox-size, 20px);--wa-form-control-border-color:var(
            --ha-checkbox-border-color,
            var(--ha-color-border-neutral-normal)
          );--wa-form-control-background-color:var(
            --ha-checkbox-background-color,
            var(--wa-form-control-background-color)
          );--checked-icon-color:var(
            --ha-checkbox-checked-icon-color,
            var(--wa-color-brand-on-loud)
          );--wa-form-control-activated-color:var(
            --ha-checkbox-checked-background-color,
            var(--ha-color-fill-primary-loud-resting)
          );-webkit-tap-highlight-color:transparent;--checked-icon-scale:var(--ha-checkbox-checked-icon-scale, 0.9);--wa-form-control-required-content:var(
            --ha-checkbox-required-marker,
            var(--ha-input-required-marker, "*")
          );--wa-form-control-required-content-offset:var(
            --ha-checkbox-required-marker-offset,
            0.1rem
          )}[part~=base]{align-items:center;gap:var(--ha-space-2)}[part~=control]{border-radius:var(--ha-checkbox-border-radius,var(--ha-border-radius-sm));border-width:var(--ha-checkbox-border-width,var(--ha-border-width-md));margin-inline-end:0}[part~=label]{line-height:1}#hint{font-size:var(--ha-font-size-xs);color:var(--ha-color-text-secondary)}label:has(input:not(:disabled)):hover{--wa-form-control-border-color:var(
            --ha-checkbox-border-color-hover,
            var(--ha-checkbox-border-color, var(--ha-color-border-neutral-loud))
          )}label:has(input:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-background-color-hover,var(--ha-color-form-background-hover))}label:has(input:checked:not(:disabled)):hover [part~=control],label:has(input:indeterminate:not(:disabled)):hover [part~=control]{background-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover));border-color:var(--ha-checkbox-checked-background-color-hover,var(--ha-color-fill-primary-loud-hover))}`))]}}l=(0,a.Cg)([(0,n.EM)("ha-checkbox")],l)},90696:function(t,e,o){o.a(t,async function(t,e){try{var a=o(74487),i=(o(26910),o(18111),o(20116),o(62953),o(40445)),r=o(5124),n=o(67576),s=o(22786),c=o(1087),l=o(52220),h=o(38508),d=t([a,h]);[a,h]=d.then?(await d)():d;let u,p,g,m,v,f=t=>t;const b=[{name:"primary",weight:10},{name:"secondary",weight:8}],y=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BRL","BSD","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHF","CLP","CNY","COP","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VEF","VND","VUV","WST","XAF","XCD","XOF","XPF","YER","ZAR","ZMW","ZWL"],_=(t,e)=>{var o;return null===(o=new Intl.NumberFormat(e,{style:"currency",currency:t}).formatToParts(1).find(t=>"currency"===t.type))||void 0===o?void 0:o.value},w=t=>{var e;const o=null!==(e=null==t?void 0:t.language)&&void 0!==e?e:"en",a=new Intl.DisplayNames(o,{type:"currency",fallback:"code"}),i=y.map(t=>({id:t,primary:`${a.of(t)} (${_(t,o)})`,secondary:t}));return i.sort((t,e)=>(0,l.SH)(t.primary,e.primary,o)),i};class k extends r.WF{render(){var t,e,o;const a=null!==(t=this.label)&&void 0!==t?t:(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.components.currency-picker.currency"))||"Currency";return(0,r.qy)(u||(u=f` <ha-generic-picker .hass="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .label="${0}" .value="${0}" .valueRenderer="${0}" .disabled="${0}" .required="${0}" .getItems="${0}" .searchKeys="${0}" @value-changed="${0}" hide-clear-icon></ha-generic-picker> `),this.hass,this._notFoundLabel,(null===(o=this.hass)||void 0===o?void 0:o.localize("ui.components.currency-picker.no_currencies"))||"No currencies available",a,this.value,this._valueRenderer,this.disabled,this.required,this._getItems,b,this._changed)}_changed(t){t.stopPropagation(),this.value=t.detail.value,(0,c.r)(this,"value-changed",{value:this.value})}constructor(...t){super(...t),this.required=!1,this.disabled=!1,this._getCurrencyOptions=(0,s.A)(w),this._getItems=()=>{var t;return this._getCurrencyOptions(null===(t=this.hass)||void 0===t?void 0:t.locale)},this._getCurrencyName=t=>{var e;return null===(e=this._getItems().find(e=>e.id===t))||void 0===e?void 0:e.primary},this._valueRenderer=t=>{var e;return(0,r.qy)(p||(p=f`<span slot="headline">${0}</span>`),null!==(e=this._getCurrencyName(t))&&void 0!==e?e:t)},this._notFoundLabel=t=>{const e=(0,r.qy)(g||(g=f`<b>'${0}'</b>`),t);return this.hass?this.hass.localize("ui.components.currency-picker.no_match",{term:e}):(0,r.qy)(m||(m=f`No currencies found for ${0}`),e)}}}k.styles=(0,r.AH)(v||(v=f`ha-generic-picker{width:100%;min-width:200px;display:block}`)),(0,i.Cg)([(0,n.MZ)({attribute:!1})],k.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)()],k.prototype,"value",void 0),(0,i.Cg)([(0,n.MZ)()],k.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],k.prototype,"required",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],k.prototype,"disabled",void 0),k=(0,i.Cg)([(0,n.EM)("ha-currency-picker")],k),e()}catch(u){e(u)}})},90248:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButtonArrowPrev:function(){return g}});o(62953);var i=o(40445),r=o(5124),n=o(67576),s=o(63091),c=o(26300),l=t([c]);c=(l.then?(await l)():l)[0];let h,d=t=>t;const u="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",p="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class g extends r.WF{render(){var t;return(0,r.qy)(h||(h=d` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?p:u}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],g.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],g.prototype,"download",void 0),(0,i.Cg)([(0,n.wk)()],g.prototype,"_icon",void 0),g=(0,i.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],g),a()}catch(h){a(h)}})},26300:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaIconButton:function(){return m}});o(62953);var i=o(40445),r=o(5124),n=o(67576),s=o(63672),c=o(18350),l=(o(67094),t([c]));c=(l.then?(await l)():l)[0];let h,d,u,p,g=t=>t;class m extends r.WF{render(){return(0,r.qy)(h||(h=g` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,r.qy)(d||(d=g`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,r.qy)(u||(u=g`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}m.shadowRootOptions={mode:"open",delegatesFocus:!0},m.styles=(0,r.AH)(p||(p=g`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
        --ha-icon-button-padding-inline,
        --ha-space-2
      );--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],m.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],m.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],m.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],m.prototype,"hideTitle",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],m.prototype,"selected",void 0),(0,i.Cg)([(0,n.MZ)()],m.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],m.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],m.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],m.prototype,"download",void 0),m=(0,i.Cg)([(0,n.EM)("ha-icon-button")],m),a()}catch(h){a(h)}})},14927:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaLanguagePicker:function(){return M},getLanguageOptions:function(){return C}});var i=o(74487),r=(o(26910),o(18111),o(20116),o(61701),o(62953),o(40445)),n=o(5124),s=o(67576),c=o(22786),l=o(1087),h=o(86198),d=o(52220),u=o(28684),p=o(18350),g=o(38508),m=t([i,p,g,h]);[i,p,g,h]=m.then?(await m)():m;let v,f,b,y,_,w,k=t=>t;const $="M7,10L12,15L17,10H7Z",x=[{name:"primary",weight:10},{name:"secondary",weight:8},{name:"search_labels.english",weight:5}],C=(t,e,o,a)=>{let i=[];const r={language:"en"};if(e){const e=u.P.translations;i=t.map(t=>{var o;let i=null===(o=e[t])||void 0===o?void 0:o.nativeName;if(!i)try{i=new Intl.DisplayNames(t,{type:"language",fallback:"code"}).of(t)}catch(c){i=t}const n=(0,h.T)(t,a||{language:navigator.language}),s=(0,h.T)(t,r);return{id:t,primary:i,secondary:n!==i?n:void 0,search_labels:{english:s!==i?s:null}}})}else a&&(i=t.map(t=>{const e=(0,h.T)(t,a),o=(0,h.T)(t,r);return{id:t,primary:e,search_labels:{english:o!==e?o:null}}}));return!o&&a&&i.sort((t,e)=>(0,d.SH)(t.primary,e.primary,a.language)),i};class M extends n.WF{firstUpdated(t){super.firstUpdated(t),this._computeDefaultLanguageOptions()}_computeDefaultLanguageOptions(){this._defaultLanguages=Object.keys(u.P.translations)}render(){var t,e,o,a;const i=null!==(t=this.label)&&void 0!==t?t:(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.components.language-picker.language"))||"Language",r=null!==(o=this.value)&&void 0!==o?o:this.required&&!this.disabled?this._getItems()[0].id:this.value;return(0,n.qy)(v||(v=k` <ha-generic-picker .hass="${0}" .autofocus="${0}" .notFoundLabel="${0}" .emptyLabel="${0}" .label="${0}" .value="${0}" .valueRenderer="${0}" .disabled="${0}" .helper="${0}" .getItems="${0}" .searchKeys="${0}" @value-changed="${0}" hide-clear-icon> ${0} </ha-generic-picker> `),this.hass,this.autofocus,this._notFoundLabel,(null===(a=this.hass)||void 0===a?void 0:a.localize("ui.components.language-picker.no_languages"))||"No languages available",i,r,this._valueRenderer,this.disabled,this.helper,this._getItems,x,this._changed,this.buttonStyle?(0,n.qy)(f||(f=k`<ha-button slot="field" .disabled="${0}" @click="${0}" appearance="plain" variant="neutral"> ${0} <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> </ha-button>`),this.disabled,this._openPicker,this._getLanguageName(r),$):n.s6)}_openPicker(t){t.stopPropagation(),this.genericPicker.open()}_changed(t){t.stopPropagation(),this.value=t.detail.value,(0,l.r)(this,"value-changed",{value:this.value})}constructor(...t){super(...t),this.disabled=!1,this.required=!1,this.nativeName=!1,this.buttonStyle=!1,this.noSort=!1,this._defaultLanguages=[],this._getLanguagesOptions=(0,c.A)(C),this._getItems=()=>{var t,e;return this._getLanguagesOptions(null!==(t=this.languages)&&void 0!==t?t:this._defaultLanguages,this.nativeName,this.noSort,null===(e=this.hass)||void 0===e?void 0:e.locale)},this._getLanguageName=t=>{var e;return null===(e=this._getItems().find(e=>e.id===t))||void 0===e?void 0:e.primary},this._valueRenderer=t=>{var e;return(0,n.qy)(b||(b=k`<span slot="headline">${0}</span> `),null!==(e=this._getLanguageName(t))&&void 0!==e?e:t)},this._notFoundLabel=t=>{const e=(0,n.qy)(y||(y=k`<b>‘${0}’</b>`),t);return this.hass?this.hass.localize("ui.components.language-picker.no_match",{term:e}):(0,n.qy)(_||(_=k`No languages found for ${0}`),e)}}}M.styles=(0,n.AH)(w||(w=k`ha-generic-picker{width:100%;display:block}`)),(0,r.Cg)([(0,s.MZ)()],M.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)()],M.prototype,"label",void 0),(0,r.Cg)([(0,s.MZ)({type:Array})],M.prototype,"languages",void 0),(0,r.Cg)([(0,s.MZ)({attribute:!1})],M.prototype,"hass",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],M.prototype,"disabled",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],M.prototype,"required",void 0),(0,r.Cg)([(0,s.MZ)()],M.prototype,"helper",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"native-name",type:Boolean})],M.prototype,"nativeName",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,attribute:"button-style"})],M.prototype,"buttonStyle",void 0),(0,r.Cg)([(0,s.MZ)({attribute:"no-sort",type:Boolean})],M.prototype,"noSort",void 0),(0,r.Cg)([(0,s.wk)()],M.prototype,"_defaultLanguages",void 0),(0,r.Cg)([(0,s.P)("ha-generic-picker",!0)],M.prototype,"genericPicker",void 0),M=(0,r.Cg)([(0,s.EM)("ha-language-picker")],M),a()}catch(v){a(v)}})},2054:function(t,e,o){o.a(t,async function(t,e){try{o(16280),o(62953);var a=o(40445),i=o(5124),r=o(67576),n=o(1087),s=o(44249),c=o(26300),l=t([c]);c=(l.then?(await l)():l)[0];let h,d,u,p=t=>t;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class m extends i.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return i.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,i.qy)(h||(h=p` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,t?(0,i.qy)(d||(d=p`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,o=t.has("narrow")?t.get("narrow"):this.narrow,a=!1===(null==e?void 0:e.kioskMode)&&(o||"always_hidden"===(null==e?void 0:e.dockedSidebar)),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===i||(this._show=i||this._alwaysVisible,i?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}m.styles=(0,i.AH)(u||(u=p`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,a.Cg)([(0,r.MZ)({type:Boolean})],m.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,a.Cg)([(0,r.wk)()],m.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,r.wk)()],m.prototype,"_show",void 0),m=(0,a.Cg)([(0,r.EM)("ha-menu-button")],m),e()}catch(h){e(h)}})},2226:function(t,e,o){o(89463),o(18111),o(61701),o(62953);var a=o(40445),i=o(35211),r=o(5124),n=o(67576),s=o(6412),c=o(63672),l=o(89784),h=o(1087),d=o(15638),u=o(22792);o(64013),o(92677);let p,g,m,v,f,b=t=>t;class y extends r.WF{render(){var t;const e=null!==(t=this.maxColumns)&&void 0!==t?t:3,o=Math.min(e,this.options.length);return(0,r.qy)(p||(p=b` <ha-radio-group class="list" style="${0}" .value="${0}" @change="${0}"> ${0} </ha-radio-group> `),(0,l.W)({"--columns":o}),this.value,this._radioChanged,this.options.map(t=>this._renderOption(t)))}_renderOption(t){var e;const o=1===this.maxColumns&&!this.stackedImage,a=1===this.maxColumns&&this.stackedImage,i=t.disabled||this.disabled||!1,n=t.value===this.value,l=(null===(e=this._ui)||void 0===e?void 0:e.themes.darkMode)||!1,h=!!this._i18n&&(0,d.qC)(this._i18n.language,this._i18n.translationMetadata.translations),u="object"==typeof t.image?l&&t.image.src_dark||t.image.src:t.image,p="object"==typeof t.image&&(h&&t.image.flip_rtl);return(0,r.qy)(g||(g=b` <label class="option ${0}" ?disabled="${0}"> <div class="content"> <ha-radio-option aria-describedby="${0}" aria-labelledby="${0}" .value="${0}" .disabled="${0}"></ha-radio-option> <div class="text"> <span id="${0}" class="label">${0}</span> ${0} </div> </div> ${0} </label> `),(0,s.H)({horizontal:o,stacked:a,selected:n}),i,(0,c.J)(t.description?`desc-${t.value}`:void 0),`label-${t.value}`,t.value,i,`label-${t.value}`,t.label,t.description?(0,r.qy)(m||(m=b`<span class="description" id="desc-${0}">${0}</span>`),t.value,t.description):r.s6,u?(0,r.qy)(v||(v=b` <img class="${0}" alt="" src="${0}"> `),p?"flipped":"",u):r.s6)}_radioChanged(t){var e;t.stopPropagation();const o=t.currentTarget.value;this.disabled||void 0===o||o===(null!==(e=this.value)&&void 0!==e?e:"")||(0,h.r)(this,"value-changed",{value:o})}constructor(...t){super(...t),this.options=[],this.stackedImage=!1}}y.styles=(0,r.AH)(f||(f=b`.list::part(form-control-input){display:grid;grid-template-columns:repeat(var(--columns,1),minmax(0,1fr));gap:var(--ha-space-3)}.option{position:relative;display:block;border:1px solid var(--divider-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:12px;gap:var(--ha-space-2);overflow:hidden;cursor:pointer}.option .content{position:relative;display:flex;flex-direction:row;gap:var(--ha-space-2);min-width:0;width:100%}.option .content ha-radio-option{--ha-radio-option-control-margin:0;margin:0;flex:none}.option .content .text{display:flex;flex-direction:column;gap:var(--ha-space-1);min-width:0;flex:1;justify-content:center}.option .content .text .label{color:var(--primary-text-color);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.option .content .text .description{color:var(--secondary-text-color);font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}img{position:relative;max-width:var(--ha-select-box-image-size,96px);max-height:var(--ha-select-box-image-size,96px);margin:auto}.flipped{transform:scaleX(-1)}.option.horizontal{flex-direction:row;align-items:flex-start}.option.horizontal img{margin:0}.option.stacked{align-items:stretch}.option.stacked img{max-width:100%;max-height:var(--ha-select-box-image-size,96px);margin:0}.option:before{content:"";display:block;inset:0;position:absolute;background-color:transparent;pointer-events:none;opacity:.2;transition:background-color 180ms ease-in-out,opacity 180ms ease-in-out}.option:hover:before{background-color:var(--divider-color)}.option.selected:before{background-color:var(--primary-color)}.option[disabled]{cursor:not-allowed}.option[disabled] .content,.option[disabled] img{opacity:.5}.option[disabled]:before{background-color:var(--disabled-color);opacity:.05}`)),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"options",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],y.prototype,"value",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean})],y.prototype,"disabled",void 0),(0,a.Cg)([(0,n.MZ)({type:Number,attribute:"max_columns"})],y.prototype,"maxColumns",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,attribute:"stacked_image"})],y.prototype,"stackedImage",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:u.D5,subscribe:!0})],y.prototype,"_i18n",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:u.EK,subscribe:!0})],y.prototype,"_ui",void 0),y=(0,a.Cg)([(0,n.EM)("ha-select-box")],y)},65829:function(t,e,o){o.a(t,async function(t,a){try{o.r(e),o.d(e,{HaSpinner:function(){return d}});var i=o(40445),r=o(55262),n=o(5124),s=o(67576),c=t([r]);r=(c.then?(await c)():c)[0];let l,h=t=>t;class d extends r.A{updated(t){if(super.updated(t),t.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[r.A.styles,(0,n.AH)(l||(l=h`:host{--indicator-color:var(
            --ha-spinner-indicator-color,
            var(--primary-color)
          );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}(0,i.Cg)([(0,s.MZ)()],d.prototype,"size",void 0),d=(0,i.Cg)([(0,s.EM)("ha-spinner")],d),a()}catch(l){a(l)}})},93367:function(t,e,o){o.a(t,async function(t,e){try{var a=o(40445),i=o(35211),r=o(5124),n=o(67576),s=o(91450),c=o(69093),l=o(22792),h=o(85694),d=(o(47680),o(67094),t([h]));h=(d.then?(await d)():d)[0];let u,p,g,m,v=t=>t;class f extends r.WF{render(){var t,e;const o=this.icon||this.stateObj&&(null===(t=this._entities)||void 0===t||null===(t=t[this.stateObj.entity_id])||void 0===t?void 0:t.icon)||(null===(e=this.stateObj)||void 0===e?void 0:e.attributes.icon);if(o)return(0,r.qy)(u||(u=v`<ha-icon .icon="${0}"></ha-icon>`),o);if(!this.stateObj)return r.s6;if(!this._config||!this._connection||!this._entities)return this._renderFallback();const a=(0,h.fq)(this._entities,this._config.config,this._connection.connection,this.stateObj,this.stateValue).then(t=>t?(0,r.qy)(p||(p=v`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,r.qy)(g||(g=v`${0}`),(0,s.T)(a))}_renderFallback(){const t=(0,c.t)(this.stateObj);return(0,r.qy)(m||(m=v` <ha-svg-icon .path="${0}"></ha-svg-icon> `),h.l[t]||h.lW)}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"stateObj",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"stateValue",void 0),(0,a.Cg)([(0,n.MZ)()],f.prototype,"icon",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.WF,subscribe:!0})],f.prototype,"_config",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.Wq,subscribe:!0})],f.prototype,"_connection",void 0),(0,a.Cg)([(0,n.wk)(),(0,i.Fg)({context:l.X1,subscribe:!0})],f.prototype,"_entities",void 0),f=(0,a.Cg)([(0,n.EM)("ha-state-icon")],f),e()}catch(u){e(u)}})},67094:function(t,e,o){o.r(e),o.d(e,{HaSvgIcon:function(){return d}});var a=o(40445),i=o(5124),r=o(67576);let n,s,c,l,h=t=>t;class d extends i.WF{render(){return(0,i.JW)(n||(n=h` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,i.JW)(s||(s=h`<path class="primary-path" d="${0}"></path>`),this.path):i.s6,this.secondaryPath?(0,i.JW)(c||(c=h`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):i.s6)}}d.styles=(0,i.AH)(l||(l=h`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,a.Cg)([(0,r.MZ)()],d.prototype,"path",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],d.prototype,"secondaryPath",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],d.prototype,"viewBox",void 0),d=(0,a.Cg)([(0,r.EM)("ha-svg-icon")],d)},64013:function(t,e,o){var a=o(40445),i=o(97086),r=o(5124),n=o(67576);let s,c=t=>t;class l extends i.A{static get styles(){return[i.A.styles,(0,r.AH)(s||(s=c`:host{--wa-form-control-required-content:var(
            --ha-radio-group-required-marker,
            var(--ha-input-required-marker, "*")
          );--wa-form-control-required-content-offset:var(
            --ha-radio-group-required-marker-offset,
            0.1rem
          )}`))]}constructor(){super(),this.radioTag="ha-radio-option"}}l=(0,a.Cg)([(0,n.EM)("ha-radio-group")],l)},92677:function(t,e,o){var a=o(40445),i=o(17010),r=o(5124),n=o(67576);let s,c=t=>t;class l extends i.A{static get styles(){return[i.A.styles,(0,r.AH)(s||(s=c`:host{--wa-form-control-activated-color:var(
            --ha-radio-option-active-color,
            var(--ha-color-fill-primary-loud-resting)
          );--wa-form-control-height:var(--ha-radio-option-height, 40px);--wa-form-control-toggle-size:var(
            --ha-radio-option-toggle-size,
            20px
          );--wa-form-control-border-width:var(
            --ha-radio-option-border-width,
            var(--ha-border-width-md)
          );--wa-form-control-border-color:var(
            --ha-radio-option-border-color,
            var(--ha-color-border-neutral-normal)
          );--wa-form-control-background-color:var(
            --ha-radio-option-background-color,
            var(--wa-form-control-background-color)
          );--checked-icon-color:var(
            --ha-radio-option-checked-icon-color,
            var(--wa-form-control-activated-color)
          );--checked-icon-scale:var(--ha-radio-option-checked-icon-scale, 0.7)}:host([appearance=default]) .control{margin:var(--ha-radio-option-control-margin,var(--ha-space-3) var(--ha-space-2) var(--ha-space-3) var(--ha-space-3))}:host(:not([aria-checked=true],[aria-disabled=true]):hover) .control{border-color:var(--ha-radio-option-border-color-hover,var(--ha-radio-option-border-color,var(--ha-color-border-neutral-loud)));background-color:var(--ha-radio-option-background-color-hover,var(--ha-color-fill-neutral-quiet-hover))}:host([aria-checked=true]) .control{background-color:var(--ha-radio-option-checked-background-color,var(--ha-color-fill-primary-normal-resting));color:var(--checked-icon-color);border-color:var(--checked-icon-color)}[part~=label]{display:inline-flex;align-items:center;cursor:pointer}:host([disabled]) [part~=label]{cursor:not-allowed}`))]}}l=(0,a.Cg)([(0,n.EM)("ha-radio-option")],l)},18885:function(t,e,o){o.d(e,{Td:function(){return a},iP:function(){return r},pz:function(){return i}});const a=(t,e)=>t.callWS(Object.assign({type:"config/core/update"},e)),i=t=>t.callWS({type:"config/core/detect"}),r=t=>t.callApi("POST","config/core/check_config")},44249:function(t,e,o){o.d(e,{V:function(){return a}});o(62953);const a=(t,e)=>{const o=new i,a=t.subscribeMessage(t=>e(o.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{a.then(t=>null==t?void 0:t())}};class i{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},81310:function(t,e,o){o.a(t,async function(t,e){try{o(62953);var a=o(40445),i=o(5124),r=o(67576),n=o(6412),s=o(26218),c=o(91926),l=o(90248),h=o(2054),d=o(14503),u=t([l,h]);[l,h]=u.then?(await u)():u;let p,g,m,v,f,b=t=>t;class y extends i.WF{render(){var t;return(0,i.qy)(p||(p=b` <div class="toolbar ${0}"> <div class="toolbar-content"> ${0} <div class="main-title"> <slot name="header">${0}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${0}" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,n.H)({narrow:this.narrow}),this.mainPage||null!==(t=history.state)&&void 0!==t&&t.root?(0,i.qy)(g||(g=b` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,i.qy)(m||(m=b` <ha-icon-button-arrow-prev href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,i.qy)(v||(v=b` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,(0,n.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable}),this._saveScrollPos)}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,c.OE)()}static get styles(){return[d.dp,(0,i.AH)(f||(f=b`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`))]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)()],y.prototype,"header",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:"main-page"})],y.prototype,"mainPage",void 0),(0,a.Cg)([(0,r.MZ)({type:String,attribute:"back-path"})],y.prototype,"backPath",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"backCallback",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],y.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"scrollable",void 0),(0,a.Cg)([(0,s.a)(".content")],y.prototype,"_savedScrollPos",void 0),(0,a.Cg)([(0,r.Ls)({passive:!0})],y.prototype,"_saveScrollPos",null),y=(0,a.Cg)([(0,r.EM)("hass-subpage")],y),e()}catch(p){e(p)}})},40075:function(t,e,o){o.a(t,async function(t,a){try{o.r(e);o(74423),o(3362),o(62953);var i=o(40445),r=o(5124),n=o(67576),s=(o(46190),o(57237)),c=o(91926),l=o(89300),h=o(38962),d=o(18350),u=(o(76776),o(9503),o(33173)),p=o(90696),g=o(14927),m=(o(2226),o(98220)),v=o(91485),f=o(22273),b=o(18885),y=o(65063),_=o(81310),w=o(14503),k=t([l,h,d,u,p,g,m,v,f,_]);[l,h,d,u,p,g,m,v,f,_]=k.then?(await k)():k;let $,x,C,M,z,Z,L,A,D,N=t=>t;class S extends r.WF{render(){const t=["storage","default"].includes(this.hass.config.config_source);return(0,r.qy)($||($=N` <hass-subpage back-path="/config/system" .hass="${0}" .narrow="${0}" .header="${0}"> <div class="content"> ${0} ${0} ${0} ${0} ${0} </div> </hass-subpage> `),this.hass,this.narrow,this.hass.localize("ui.panel.config.core.caption"),this._error?(0,r.qy)(x||(x=N`<ha-alert alert-type="error">${0}</ha-alert>`),this._error):"",t?r.s6:(0,r.qy)(C||(C=N` <ha-alert> ${0} </ha-alert> `),this.hass.localize("ui.panel.config.core.section.core.core_config.edit_requires_storage")),this._renderHomeNameCard(t),this._renderLocationCard(t),this._renderRegionalSettingsCard(t))}_renderHomeNameCard(t){const e=this._submittingName||!t;return(0,r.qy)(M||(M=N` <ha-card outlined .header="${0}"> <div class="card-content"> <ha-input name="name" .label="${0}" .disabled="${0}" .value="${0}" @change="${0}"></ha-input> </div> <div class="card-actions"> <ha-progress-button appearance="filled" @click="${0}" .disabled="${0}"> ${0} </ha-progress-button> </div> </ha-card> `),this.hass.localize("ui.panel.config.core.section.core.home_name_card.header"),this.hass.localize("ui.panel.config.core.section.core.core_config.location_name"),e,this._name,this._handleChange,this._updateHomeName,e,this.hass.localize("ui.common.save"))}_renderLocationCard(t){const e="zone.home"in this.hass.states;return(0,r.qy)(z||(z=N` <ha-card outlined .header="${0}"> ${0} <div class="card-actions"> <ha-button appearance="filled" @click="${0}" .disabled="${0}"> ${0} </ha-button> </div> </ha-card> `),this.hass.localize("ui.panel.config.core.section.core.location_card.header"),e?(0,r.qy)(Z||(Z=N` <div class="card-content"> <ha-map .hass="${0}" .entities="${0}" .zoom="${0}" .autoFit="${0}" .fitZones="${0}" .themeMode="${0}" .renderPassive="${0}" .interactiveZones="${0}" class="map-preview"></ha-map> </div> `),this.hass,["zone.home"],14,!0,!0,"auto",!1,!1):r.s6,this._editLocation,!t,this.hass.localize("ui.common.edit"))}_renderRegionalSettingsCard(t){const e=this._submittingRegional||!t;return(0,r.qy)(L||(L=N` <ha-card outlined .header="${0}"> <div class="card-content"> <ha-timezone-picker .hass="${0}" .label="${0}" name="timeZone" .disabled="${0}" .value="${0}" @value-changed="${0}" hide-clear-icon></ha-timezone-picker> <ha-input .label="${0}" name="elevation" type="number" .disabled="${0}" .value="${0}" @change="${0}"> <span slot="end">${0}</span> </ha-input> <div> <div> ${0} </div> <div class="unit-system-options"> <ha-select-box name="unit_system" .value="${0}" .disabled="${0}" @value-changed="${0}" .options="${0}"> </ha-select-box> ${0} </div> </div> <div> <ha-currency-picker .hass="${0}" .label="${0}" name="currency" .disabled="${0}" .value="${0}" @value-changed="${0}"></ha-currency-picker> <a href="https://en.wikipedia.org/wiki/ISO_4217#Active_codes" target="_blank" rel="noopener noreferrer" class="find-value">${0}</a> </div> <ha-country-picker .hass="${0}" .label="${0}" name="country" .disabled="${0}" .value="${0}" @value-changed="${0}"></ha-country-picker> <ha-language-picker .hass="${0}" native-name .label="${0}" name="language" .value="${0}" .disabled="${0}" @closed="${0}" @value-changed="${0}"> </ha-language-picker> </div> <div class="card-actions"> <ha-progress-button appearance="filled" @click="${0}" .disabled="${0}"> ${0} </ha-progress-button> </div> </ha-card> `),this.hass.localize("ui.panel.config.core.section.core.regional_settings_card.header"),this.hass,this.hass.localize("ui.panel.config.core.section.core.core_config.time_zone"),e,this._timeZone,this._handleValueChanged,this.hass.localize("ui.panel.config.core.section.core.core_config.elevation"),e,void 0!==this._elevation?String(this._elevation):"",this._handleChange,this.hass.localize("ui.panel.config.core.section.core.core_config.elevation_meters"),this.hass.localize("ui.panel.config.core.section.core.core_config.unit_system"),this._unitSystem,e,this._unitSystemChanged,[{value:"metric",label:this.hass.localize("ui.panel.config.core.section.core.core_config.metric_example"),description:this.hass.localize("ui.panel.config.core.section.core.core_config.unit_system_metric")},{value:"us_customary",label:this.hass.localize("ui.panel.config.core.section.core.core_config.us_customary_example"),description:this.hass.localize("ui.panel.config.core.section.core.core_config.unit_system_us_customary")}],this._unitSystem!==this._configuredUnitSystem()?(0,r.qy)(A||(A=N` <ha-checkbox .checked="${0}" .disabled="${0}" @change="${0}"> ${0} <div slot="hint"> ${0} ${0} <br><br> ${0} </div> </ha-checkbox> `),this._updateUnits,this._submittingRegional,this._updateUnitsChanged,this.hass.localize("ui.panel.config.core.section.core.core_config.update_units_label"),this.hass.localize("ui.panel.config.core.section.core.core_config.update_units_text_1"),this.hass.localize("ui.panel.config.core.section.core.core_config.update_units_text_2"),this.hass.localize("ui.panel.config.core.section.core.core_config.update_units_text_3")):r.s6,this.hass,this.hass.localize("ui.panel.config.core.section.core.core_config.currency"),e,this._currency,this._handleValueChanged,this.hass.localize("ui.panel.config.core.section.core.core_config.find_currency_value"),this.hass,this.hass.localize("ui.panel.config.core.section.core.core_config.country"),e,this._country,this._handleValueChanged,this.hass,this.hass.localize("ui.panel.config.core.section.core.core_config.language"),this._language,e,s.d,this._handleValueChanged,this._updateRegionalSettings,e,this.hass.localize("ui.common.save"))}_configuredUnitSystem(){return"°C"===this.hass.config.unit_system.temperature?"metric":"us_customary"}firstUpdated(){this._unitSystem=this._configuredUnitSystem(),this._currency=this.hass.config.currency,this._country=this.hass.config.country,this._language=this.hass.config.language,this._elevation=this.hass.config.elevation,this._timeZone=this.hass.config.time_zone||"Etc/GMT",this._name=this.hass.config.location_name,this._updateUnits=!0}_handleValueChanged(t){this[`_${t.currentTarget.getAttribute("name")}`]=t.detail.value}_handleChange(t){const e=t.currentTarget;this[`_${e.name}`]=e.value}_unitSystemChanged(t){this._unitSystem=t.detail.value}_updateUnitsChanged(t){this._updateUnits=t.target.checked}async _updateHomeName(t){const e=t.target;if(!e.progress){e.progress=!0,this._submittingName=!0,this._error=void 0;try{await(0,b.Td)(this.hass,{location_name:this._name}),e.actionSuccess()}catch(o){e.actionError(),this._error=o.message}finally{e.progress=!1,this._submittingName=!1}}}async _updateRegionalSettings(t){const e=t.target;if(e.progress)return;const o=this._unitSystem!==this._configuredUnitSystem();if(o&&this._updateUnits&&!(await(0,y.dk)(this,{title:this.hass.localize("ui.panel.config.core.section.core.core_config.update_units_confirm_title"),text:this.hass.localize("ui.panel.config.core.section.core.core_config.update_units_confirm_text"),confirmText:this.hass.localize("ui.panel.config.core.section.core.core_config.update_units_confirm_update"),dismissText:this.hass.localize("ui.common.cancel")})))return;let a;e.progress=!0,this._submittingRegional=!0,this._error=void 0,this._location&&(a={latitude:this._location[0],longitude:this._location[1]}),this._error=void 0;try{await(0,b.Td)(this.hass,Object.assign({time_zone:this._timeZone,elevation:Number(this._elevation),unit_system:this._unitSystem,update_units:this._updateUnits&&o,currency:this._currency,country:this._country,language:this._language},a)),e.actionSuccess()}catch(i){e.actionError(),this._error=i.message}finally{e.progress=!1,this._submittingRegional=!1}}_editLocation(){(0,c.oo)("/config/zone/edit/zone.home")}constructor(...t){super(...t),this.narrow=!1,this._submittingName=!1,this._submittingRegional=!1}}S.styles=[w.RF,(0,r.AH)(D||(D=N`.content{padding:var(--ha-space-7) var(--ha-space-5) 0;max-width:1040px;margin:0 auto}ha-card{max-width:600px;margin:0 auto var(--ha-space-6)}.card-content{display:flex;flex-direction:column}.card-content>*{display:block}.card-content>:not(:first-child){margin-top:var(--ha-space-4)}.card-actions{display:flex;justify-content:flex-end}a.find-value{margin-top:var(--ha-space-2);display:inline-block}.map-preview{height:200px;width:100%;display:block;border-radius:var(--ha-card-border-radius,8px);overflow:hidden}ha-checkbox{display:flex;margin-top:var(--ha-space-2);margin-bottom:var(--ha-space-3)}.unit-system-options{padding-top:var(--ha-space-2)}.unit-system-options ha-checkbox{display:block;margin-top:var(--ha-space-3);margin-inline-start:var(--ha-space-3)}`))],(0,i.Cg)([(0,n.MZ)({attribute:!1})],S.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],S.prototype,"narrow",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_submittingName",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_submittingRegional",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_unitSystem",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_currency",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_language",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_country",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_name",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_elevation",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_timeZone",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_location",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_error",void 0),(0,i.Cg)([(0,n.wk)()],S.prototype,"_updateUnits",void 0),S=(0,i.Cg)([(0,n.EM)("ha-config-section-general")],S),a()}catch($){a($)}})},53580:function(t,e,o){o.d(e,{mdiHomeAssistant:function(){return a}});const a="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"}}]);