UNPKG

iobroker.lovelace

Version:

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

2 lines 28.8 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["86815"],{54202:function(e,o,r){var t=r(61701),i=(r(71695),r(47021),r(57243)),a=r(50778),n=r(5111);r(23334);let c,l=e=>e;(0,t.Z)([(0,a.Mo)("ha-icon-button-arrow-prev")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_icon",value(){return"rtl"===n.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},{kind:"method",key:"render",value:function(){var e;return(0,i.dy)(c||(c=l` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon)}}]}}),i.oi)},23334:function(e,o,r){var t=r(61701),i=(r(71695),r(47021),r(74269),r(57243)),a=r(50778),n=r(20552);r(37583);let c,l,s,d,h=e=>e;(0,t.Z)([(0,a.Mo)("ha-icon-button")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,a.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:"hide-title",type:Boolean})],key:"hideTitle",value(){return!1}},{kind:"field",decorators:[(0,a.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){var e;null===(e=this._button)||void 0===e||e.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value(){return{mode:"open",delegatesFocus:!0}}},{kind:"method",key:"render",value:function(){return(0,i.dy)(c||(c=h` <mwc-icon-button aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}"> ${0} </mwc-icon-button> `),(0,n.o)(this.label),(0,n.o)(this.hideTitle?void 0:this.label),(0,n.o)(this.ariaHasPopup),this.disabled,this.path?(0,i.dy)(l||(l=h`<ha-svg-icon .path="${0}"></ha-svg-icon>`),this.path):(0,i.dy)(s||(s=h`<slot></slot>`)))}},{kind:"field",static:!0,key:"styles",value(){return(0,i.iv)(d||(d=h`:host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}`))}}]}}),i.oi)},43344:function(e,o,r){var t=r(61701),i=r(72621),a=(r(52247),r(71695),r(47021),r(57243)),n=r(50778),c=r(36522),l=r(83716);r(23334);let s,d,h,u=e=>e;(0,t.Z)([(0,n.Mo)("ha-menu-button")],(function(e,o){class r extends o{constructor(...o){super(...o),e(this)}}return{F:r,d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"hassio",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_hasNotifications",value(){return!1}},{kind:"field",decorators:[(0,n.SB)()],key:"_show",value(){return!1}},{kind:"field",key:"_alwaysVisible",value(){return!1}},{kind:"field",key:"_attachNotifOnConnect",value(){return!1}},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,i.Z)(r,"connectedCallback",this,3)([]),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,i.Z)(r,"disconnectedCallback",this,3)([]),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return a.Ld;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,a.dy)(s||(s=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,e?(0,a.dy)(d||(d=u`<div class="dot"></div>`)):"")}},{kind:"method",key:"firstUpdated",value:function(e){(0,i.Z)(r,"firstUpdated",this,3)([e]),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(e){if((0,i.Z)(r,"willUpdate",this,3)([e]),!e.has("narrow")&&!e.has("hass"))return;const o=e.has("hass")?e.get("hass"):this.hass,t=(e.has("narrow")?e.get("narrow"):this.narrow)||"always_hidden"===(null==o?void 0:o.dockedSidebar),a=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&t===a||(this._show=a||this._alwaysVisible,a?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}},{kind:"method",key:"_subscribeNotifications",value:function(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,l.r)(this.hass.connection,(e=>{this._hasNotifications=e.length>0}))}},{kind:"method",key:"_toggleMenu",value:function(){(0,c.B)(this,"hass-toggle-menu")}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(h||(h=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:50%;border:2px solid var(--app-header-background-color)}`))}}]}}),a.oi)},37583:function(e,o,r){var t=r(61701),i=(r(71695),r(47021),r(57243)),a=r(50778);let n,c,l,s,d=e=>e;(0,t.Z)([(0,a.Mo)("ha-svg-icon")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return(0,i.YP)(n||(n=d` <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.YP)(c||(c=d`<path class="primary-path" d="${0}"></path>`),this.path):i.Ld,this.secondaryPath?(0,i.YP)(l||(l=d`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):i.Ld)}},{kind:"field",static:!0,key:"styles",value(){return(0,i.iv)(s||(s=d`: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)}`))}}]}}),i.oi)},83716:function(e,o,r){r.d(o,{r:()=>t});r(71695),r(19423),r(47021);const t=(e,o)=>{const r=new i,t=e.subscribeMessage((e=>o(r.processMessage(e))),{type:"persistent_notification/subscribe"});return()=>{t.then((e=>null==e?void 0:e()))}};class i{constructor(){this.notifications=void 0,this.notifications={}}processMessage(e){if("removed"===e.type)for(const o of Object.keys(e.notifications))delete this.notifications[o];else this.notifications=Object.assign(Object.assign({},this.notifications),e.notifications);return Object.values(this.notifications)}}},39518:function(e,o,r){var t=r(61701),i=r(72621),a=(r(71695),r(47021),r(31622),r(57243)),n=r(50778);r(19083),r(61006);r(19423),r(88044);const c={"primary-background-color":"#111111","card-background-color":"#1c1c1c","secondary-background-color":"#282828","clear-background-color":"#111111","primary-text-color":"#e1e1e1","secondary-text-color":"#9b9b9b","disabled-text-color":"#6f6f6f","app-header-text-color":"#e1e1e1","app-header-background-color":"#101e24","switch-unchecked-button-color":"#999999","switch-unchecked-track-color":"#9b9b9b","divider-color":"rgba(225, 225, 225, .12)","outline-color":"rgba(225, 225, 225, .12)","outline-hover-color":"rgba(225, 225, 225, .24)","mdc-ripple-color":"#AAAAAA","mdc-linear-progress-buffer-color":"rgba(255, 255, 255, 0.1)","input-idle-line-color":"rgba(255, 255, 255, 0.42)","input-hover-line-color":"rgba(255, 255, 255, 0.87)","input-disabled-line-color":"rgba(255, 255, 255, 0.06)","input-outlined-idle-border-color":"rgba(255, 255, 255, 0.38)","input-outlined-hover-border-color":"rgba(255, 255, 255, 0.87)","input-outlined-disabled-border-color":"rgba(255, 255, 255, 0.06)","input-fill-color":"rgba(255, 255, 255, 0.05)","input-disabled-fill-color":"rgba(255, 255, 255, 0.02)","input-ink-color":"rgba(255, 255, 255, 0.87)","input-label-ink-color":"rgba(255, 255, 255, 0.6)","input-disabled-ink-color":"rgba(255, 255, 255, 0.37)","input-dropdown-icon-color":"rgba(255, 255, 255, 0.54)","codemirror-keyword":"#C792EA","codemirror-operator":"#89DDFF","codemirror-variable":"#f07178","codemirror-variable-2":"#EEFFFF","codemirror-variable-3":"#DECB6B","codemirror-builtin":"#FFCB6B","codemirror-atom":"#F78C6C","codemirror-number":"#FF5370","codemirror-def":"#82AAFF","codemirror-string":"#C3E88D","codemirror-string-2":"#f07178","codemirror-comment":"#545454","codemirror-tag":"#FF5370","codemirror-meta":"#FFCB6B","codemirror-attribute":"#C792EA","codemirror-property":"#C792EA","codemirror-qualifier":"#DECB6B","codemirror-type":"#DECB6B","energy-grid-return-color":"#a280db","map-filter":"invert(.9) hue-rotate(170deg) brightness(1.5) contrast(1.2) saturate(.3)","disabled-color":"#464646"},l={"state-icon-error-color":"var(--error-state-color, var(--error-color))","state-unavailable-color":"var(--state-icon-unavailable-color, var(--disabled-text-color))","sidebar-text-color":"var(--primary-text-color)","sidebar-background-color":"var(--card-background-color)","sidebar-selected-text-color":"var(--primary-color)","sidebar-selected-icon-color":"var(--primary-color)","sidebar-icon-color":"rgba(var(--rgb-primary-text-color), 0.6)","switch-checked-color":"var(--primary-color)","switch-checked-button-color":"var(--switch-checked-color, var(--primary-background-color))","switch-checked-track-color":"var(--switch-checked-color, #000000)","switch-unchecked-button-color":"var(--switch-unchecked-color, var(--primary-background-color))","switch-unchecked-track-color":"var(--switch-unchecked-color, #000000)","slider-color":"var(--primary-color)","slider-secondary-color":"var(--light-primary-color)","slider-track-color":"var(--scrollbar-thumb-color)","label-badge-background-color":"var(--card-background-color)","label-badge-text-color":"rgba(var(--rgb-primary-text-color), 0.8)","paper-listbox-background-color":"var(--card-background-color)","paper-item-icon-color":"var(--state-icon-color)","paper-item-icon-active-color":"var(--state-icon-active-color)","table-header-background-color":"var(--input-fill-color)","table-row-background-color":"var(--primary-background-color)","table-row-alternative-background-color":"var(--secondary-background-color)","data-table-background-color":"var(--card-background-color)","markdown-code-background-color":"var(--primary-background-color)","mdc-theme-primary":"var(--primary-color)","mdc-theme-secondary":"var(--accent-color)","mdc-theme-background":"var(--primary-background-color)","mdc-theme-surface":"var(--card-background-color)","mdc-theme-on-primary":"var(--text-primary-color)","mdc-theme-on-secondary":"var(--text-primary-color)","mdc-theme-on-surface":"var(--primary-text-color)","mdc-theme-text-disabled-on-light":"var(--disabled-text-color)","mdc-theme-text-primary-on-background":"var(--primary-text-color)","mdc-theme-text-secondary-on-background":"var(--secondary-text-color)","mdc-theme-text-hint-on-background":"var(--secondary-text-color)","mdc-theme-text-icon-on-background":"var(--secondary-text-color)","mdc-theme-error":"var(--error-color)","app-header-text-color":"var(--text-primary-color)","app-header-background-color":"var(--primary-color)","app-theme-color":"var(--app-header-background-color)","mdc-checkbox-unchecked-color":"rgba(var(--rgb-primary-text-color), 0.54)","mdc-checkbox-disabled-color":"var(--disabled-text-color)","mdc-radio-unchecked-color":"rgba(var(--rgb-primary-text-color), 0.54)","mdc-radio-disabled-color":"var(--disabled-text-color)","mdc-tab-text-label-color-default":"var(--primary-text-color)","mdc-button-disabled-ink-color":"var(--disabled-text-color)","mdc-button-outline-color":"var(--outline-color)","mdc-dialog-scroll-divider-color":"var(--divider-color)","mdc-dialog-heading-ink-color":"var(--primary-text-color)","mdc-dialog-content-ink-color":"var(--primary-text-color)","mdc-text-field-idle-line-color":"var(--input-idle-line-color)","mdc-text-field-hover-line-color":"var(--input-hover-line-color)","mdc-text-field-disabled-line-color":"var(--input-disabled-line-color)","mdc-text-field-outlined-idle-border-color":"var(--input-outlined-idle-border-color)","mdc-text-field-outlined-hover-border-color":"var(--input-outlined-hover-border-color)","mdc-text-field-outlined-disabled-border-color":"var(--input-outlined-disabled-border-color)","mdc-text-field-fill-color":"var(--input-fill-color)","mdc-text-field-disabled-fill-color":"var(--input-disabled-fill-color)","mdc-text-field-ink-color":"var(--input-ink-color)","mdc-text-field-label-ink-color":"var(--input-label-ink-color)","mdc-text-field-disabled-ink-color":"var(--input-disabled-ink-color)","mdc-select-idle-line-color":"var(--input-idle-line-color)","mdc-select-hover-line-color":"var(--input-hover-line-color)","mdc-select-outlined-idle-border-color":"var(--input-outlined-idle-border-color)","mdc-select-outlined-hover-border-color":"var(--input-outlined-hover-border-color)","mdc-select-outlined-disabled-border-color":"var(--input-outlined-disabled-border-color)","mdc-select-fill-color":"var(--input-fill-color)","mdc-select-disabled-fill-color":"var(--input-disabled-fill-color)","mdc-select-ink-color":"var(--input-ink-color)","mdc-select-label-ink-color":"var(--input-label-ink-color)","mdc-select-disabled-ink-color":"var(--input-disabled-ink-color)","mdc-select-dropdown-icon-color":"var(--input-dropdown-icon-color)","mdc-select-disabled-dropdown-icon-color":"var(--input-disabled-ink-color)","ha-assist-chip-filled-container-color":"rgba(var(--rgb-primary-text-color),0.15)","ha-assist-chip-active-container-color":"rgba(var(--rgb-primary-color),0.15)","chip-background-color":"rgba(var(--rgb-primary-text-color), 0.15)","material-body-text-color":"var(--primary-text-color)","material-background-color":"var(--card-background-color)","material-secondary-background-color":"var(--secondary-background-color)","material-secondary-text-color":"var(--secondary-text-color)"};r(9359),r(70104),r(23669),r(19134),r(11740),r(44495),r(97003);const s=e=>{if(6===(e=e.replace("#","")).length)return e;let o="";for(const r of e)o+=r+r;return o},d=e=>{const o=Math.round(Math.min(Math.max(e,0),255)).toString(16);return 1===o.length?`0${o}`:o},h=e=>(e=s(e),[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]),u=e=>`#${d(e[0])}${d(e[1])}${d(e[2])}`,b=.95047,p=1.08883,v=.137931034,f=.12841855,m=e=>(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4,k=e=>e>.008856452?e**(1/3):e/f+v,y=e=>255*(e<=.00304?12.92*e:1.055*e**(1/2.4)-.055),g=e=>e>.206896552?e*e*e:f*(e-v),x=e=>{const[o,r,t]=(e=>{let[o,r,t]=e;return o=m(o),r=m(r),t=m(t),[k((.4124564*o+.3575761*r+.1804375*t)/b),k((.2126729*o+.7151522*r+.072175*t)/1),k((.0193339*o+.119192*r+.9503041*t)/p)]})(e),i=116*r-16;return[i<0?0:i,500*(o-r),200*(r-t)]},w=e=>{const[o,r,t]=e;let i=(o+16)/116,a=isNaN(r)?i:i+r/500,n=isNaN(t)?i:i-t/200;i=1*g(i),a=b*g(a),n=p*g(n);return[Math.round(y(3.2404542*a-1.5371385*i-.4985314*n)),Math.round(y(-.969266*a+1.8760108*i+.041556*n)),Math.round(y(.0556434*a-.2040259*i+1.0572252*n))]};const _=(e,o=1)=>[e[0]-18*o,e[1],e[2]],C=e=>{const o=[0,0,0];for(let r=0;r<e.length;r++){const t=e[r]/255;o[r]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}return.2126*o[0]+.7152*o[1]+.0722*o[2]},$=(e,o)=>{const r=C(e),t=C(o);return r>t?(r+.05)/(t+.05):(t+.05)/(r+.05)},O=["modes"];let S={};const N=(e,o,r,t,i)=>{var a,n;const l=r||(i?o.theme:void 0),d=void 0!==(null==t?void 0:t.dark)?t.dark:(null==o?void 0:o.darkMode)||!1;let b=l,p={};if(l&&d&&(b=`${b}__dark`,p=Object.assign({},c)),"default"===l){var v;const o=null==t?void 0:t.primaryColor,r=null==t?void 0:t.accentColor;if(d&&o&&(p["app-header-background-color"]=((e,o,r=50)=>{let t="";e=s(e),o=s(o);for(let i=0;i<=5;i+=2){const a=parseInt(e.substring(i,i+2),16),n=parseInt(o.substring(i,i+2),16);let c=Math.floor(n+r/100*(a-n)).toString(16);for(;c.length<2;)c="0"+c;t+=c}return`#${t}`})(o,"#121212",8)),o){b=`${b}__primary_${o}`;const e=h(o),r=x(e);p["primary-color"]=o;const t=w(((e,o=1)=>_(e,-o))(r));p["light-primary-color"]=u(t),p["dark-primary-color"]=(e=>{const o=w(e);return u(o)})(_(r)),p["text-primary-color"]=$(e,[33,33,33])<6?"#fff":"#212121",p["text-light-primary-color"]=$(t,[33,33,33])<6?"#fff":"#212121",p["state-icon-color"]=p["dark-primary-color"]}if(r){b=`${b}__accent_${r}`,p["accent-color"]=r;const e=h(r);p["text-accent-color"]=$(e,[33,33,33])<6?"#fff":"#212121"}if((null===(v=e.__themes)||void 0===v?void 0:v.cacheKey)===b)return}if(l&&"default"!==l&&o.themes[l]){const e=o.themes[l],{modes:r}=e,t=function(e,o){if(null==e)return{};var r,t,i=function(e,o){if(null==e)return{};var r={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==o.indexOf(t))continue;r[t]=e[t]}return r}(e,o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)r=a[t],-1===o.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,O);p=Object.assign(Object.assign({},p),t),r&&(p=d?Object.assign(Object.assign({},p),r.dark):Object.assign(Object.assign({},p),r.light))}if(!(null!==(a=e.__themes)&&void 0!==a&&a.keys||Object.keys(p).length))return;const f=Object.keys(p).length&&b?S[b]||M(b,p):void 0,m=Object.assign(Object.assign({},null===(n=e.__themes)||void 0===n?void 0:n.keys),null==f?void 0:f.styles);if(e.__themes={cacheKey:b,keys:null==f?void 0:f.keys},e.updateStyles)e.updateStyles(m);else if(window.ShadyCSS)window.ShadyCSS.styleSubtree(e,m);else for(const c in m)null===c?e.style.removeProperty(c):e.style.setProperty(c,m[c])},M=(e,o)=>{if(!o||!Object.keys(o).length)return;const r=Object.assign(Object.assign({},l),o),t={},i={};for(const n of Object.keys(r)){const e=`--${n}`,o=String(r[n]);if(t[e]=o,i[e]="",!o.startsWith("#"))continue;const c=`rgb-${n}`;if(void 0===r[c])try{const e=h(o).join(","),r=`--${c}`;t[r]=e,i[r]=""}catch(a){continue}}return S[e]={styles:t,keys:i},{styles:t,keys:i}};let B,j,F,P=e=>e;(0,t.Z)([(0,n.Mo)("ha-card")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(B||(B=P`: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,a.dy)(j||(j=P` ${0} <slot></slot> `),this.header?(0,a.dy)(F||(F=P`<h1 class="card-header">${0}</h1>`),this.header):a.Ld)}}]}}),a.oi);var T=r(28008);const z=((e,o,r=!0,t=!0)=>{let i,a=0;const n=(...n)=>{const c=()=>{a=!1===r?0:Date.now(),i=void 0,e(...n)},l=Date.now();a||!1!==r||(a=l);const s=o-(l-a);s<=0||s>o?(i&&(clearTimeout(i),i=void 0),a=l,e(...n)):i||!1===t||(i=window.setTimeout(c,s))};return n.cancel=()=>{clearTimeout(i),i=void 0,a=0},n})((e=>{history.replaceState({scrollPosition:e},"")}),300),E=e=>o=>({kind:"method",placement:"prototype",key:o.key,descriptor:{set(e){z(e),this[`__${String(o.key)}`]=e},get(){var e;return this[`__${String(o.key)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},enumerable:!0,configurable:!0},finisher(r){const t=r.prototype.connectedCallback;r.prototype.connectedCallback=function(){t.call(this);const r=this[o.key];r&&this.updateComplete.then((()=>{const o=this.renderRoot.querySelector(e);o&&setTimeout((()=>{o.scrollTop=r}),0)}))}}});r(54202),r(43344);let L,Z,A,I,H,V,D,U=e=>e,R=((0,t.Z)([(0,n.Mo)("hass-subpage")],(function(e,o){return{F:class extends o{constructor(...o){super(...o),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"supervisor",value(){return!1}},{kind:"field",decorators:[E(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(L||(L=U` <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,a.dy)(Z||(Z=U` <ha-menu-button .hassio="${0}" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.supervisor,this.hass,this.narrow):this.backPath?(0,a.dy)(A||(A=U` <a href="${0}"> <ha-icon-button-arrow-prev .hass="${0}"></ha-icon-button-arrow-prev> </a> `),this.backPath,this.hass):(0,a.dy)(I||(I=U` <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,n.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[T.$c,(0,a.iv)(H||(H=U`: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}`))]}}]}}),a.oi),e=>e);(0,t.Z)([(0,n.Mo)("supervisor-error-screen")],(function(e,o){class r extends o{constructor(...o){super(...o),e(this)}}return{F:r,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){(0,i.Z)(r,"firstUpdated",this,3)([e]),this._applyTheme()}},{kind:"method",key:"updated",value:function(e){(0,i.Z)(r,"updated",this,3)([e]);const o=e.get("hass");o&&o.themes!==this.hass.themes&&this._applyTheme()}},{kind:"method",key:"render",value:function(){return(0,a.dy)(V||(V=R` <hass-subpage .hass="${0}" .header="${0}"> <ha-card header="Troubleshooting"> <div class="card-content"> <ol> <li>${0}</li> <li> <a class="supervisor_error-link" href="http://homeassistant.local:4357" target="_blank" rel="noreferrer"> ${0} </a> </li> <li>${0}</li> <li> <a href="/config/info" target="_parent"> ${0} </a> </li> <li> <a href="https://www.home-assistant.io/help/" target="_blank" rel="noreferrer"> ${0} </a> </li> </ol> </div> </ha-card> </hass-subpage> `),this.hass,this.hass.localize("ui.errors.supervisor.title"),this.hass.localize("ui.errors.supervisor.wait"),this.hass.localize("ui.errors.supervisor.observer"),this.hass.localize("ui.errors.supervisor.reboot"),this.hass.localize("ui.errors.supervisor.system_health"),this.hass.localize("ui.errors.supervisor.ask"))}},{kind:"method",key:"_applyTheme",value:function(){let e,o;var r;((e,o,r,t)=>{const[i,a,n]=e.split(".",3);return Number(i)>o||Number(i)===o&&(void 0===t?Number(a)>=r:Number(a)>r)||void 0!==t&&Number(i)===o&&Number(a)===r&&Number(n)>=t})(this.hass.config.version,0,114)?(e=(null===(r=this.hass.selectedTheme)||void 0===r?void 0:r.theme)||(this.hass.themes.darkMode&&this.hass.themes.default_dark_theme?this.hass.themes.default_dark_theme:this.hass.themes.default_theme),o=this.hass.selectedTheme):e=this.hass.selectedTheme||this.hass.themes.default_theme;N(this.parentElement,this.hass.themes,e,o,!0)}},{kind:"get",static:!0,key:"styles",value:function(){return[T.Qx,(0,a.iv)(D||(D=R`a{color:var(--mdc-theme-primary)}ha-card{width:600px;margin:auto;padding:8px}@media all and (max-width:500px){ha-card{width:calc(100vw - 32px)}}`))]}}]}}),a.oi)},61632:function(e,o,r){var t=r(1569),i=r(29660),a=r(72878),n=r(72616),c=r(36888).trim,l=r(91430),s=t.parseInt,d=t.Symbol,h=d&&d.iterator,u=/^[+-]?0x/i,b=a(u.exec),p=8!==s(l+"08")||22!==s(l+"0x16")||h&&!i((function(){s(Object(h))}));e.exports=p?function(e,o){var r=c(n(e));return s(r,o>>>0||(b(u,r)?16:10))}:s},36888:function(e,o,r){var t=r(72878),i=r(95011),a=r(72616),n=r(91430),c=t("".replace),l=RegExp("^["+n+"]+"),s=RegExp("(^|[^"+n+"])["+n+"]+$"),d=function(e){return function(o){var r=a(i(o));return 1&e&&(r=c(r,l,"")),2&e&&(r=c(r,s,"$1")),r}};e.exports={start:d(1),end:d(2),trim:d(3)}},91430:function(e){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},23669:function(e,o,r){var t=r(40810),i=r(61632);t({global:!0,forced:parseInt!==i},{parseInt:i})},44495:function(e,o,r){var t=r(97934),i=r(13818),a=r(71998),n=r(56737),c=r(82065),l=r(72616),s=r(95011),d=r(22861),h=r(41848),u=r(3182);i("match",(function(e,o,r){return[function(o){var r=s(this),i=n(o)?void 0:d(o,e);return i?t(i,o,r):new RegExp(o)[e](l(r))},function(e){var t=a(this),i=l(e),n=r(o,t,i);if(n.done)return n.value;if(!t.global)return u(t,i);var s=t.unicode;t.lastIndex=0;for(var d,b=[],p=0;null!==(d=u(t,i));){var v=l(d[0]);b[p]=v,""===v&&(t.lastIndex=h(i,c(t.lastIndex),s)),p++}return 0===p?null:b}]}))}}]); //# sourceMappingURL=86815.480ff53394a4d245.js.map