iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
16 lines • 34.4 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[60586],{26218:function(t,e,a){a.d(e,{a:function(){return i}});a(16280);const o=(0,a(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(e,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const i=e.connectedCallback;e.connectedCallback=function(){i.call(this);const e=this[a];e&&this.updateComplete.then(()=>{const a=this.renderRoot.querySelector(t);a&&setTimeout(()=>{a.scrollTop=e},0)})};const r=Object.getOwnPropertyDescriptor(e,a);let s;if(void 0===r)s={get(){var t;return this[`__${String(a)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){o(t),this[`__${String(a)}`]=t},configurable:!0,enumerable:!0};else{const t=r.set;s=Object.assign(Object.assign({},r),{},{set(e){o(e),this[`__${String(a)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,a,s)}}},77796:function(t,e,a){a.d(e,{n:function(){return o}});a(62953);const o=(t,e,a=!0,o=!0)=>{let i,r=0;const s=(...s)=>{const n=()=>{r=!1===a?0:Date.now(),i=void 0,t(...s)},l=Date.now();r||!1!==a||(r=l);const d=e-(l-r);d<=0||d>e?(i&&(clearTimeout(i),i=void 0),r=l,t(...s)):i||!1===o||(i=window.setTimeout(n,d))};return s.cancel=()=>{clearTimeout(i),i=void 0,r=0},s}},64481:function(t,e,a){a.d(e,{D:function(){return i},J:function(){return s}});a(16280),a(3362),a(55815),a(64979),a(79739);let o=!1;try{o="true"===window.localStorage.getItem("disableViewTransition")}catch(n){}const i=t=>{o=t},r=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},s=t=>{if(!document.startViewTransition||o)return t(!1),Promise.resolve();let e=!1;try{const a=document.startViewTransition(()=>{e=!0,t(!0)});return a.ready.catch(r),a.finished.catch(r)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),e?Promise.reject(a):(t(!1),Promise.resolve())}}},93444:function(t,e,a){var o=a(40445),i=a(5124),r=a(67576);let s,n,l=t=>t;class d extends i.WF{render(){return(0,i.qy)(s||(s=l` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,i.AH)(n||(n=l`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}d=(0,o.Cg)([(0,r.EM)("ha-dialog-footer")],d)},76538:function(t,e,a){a(62953);var o=a(40445),i=a(5124),r=a(67576);let s,n,l,d,h,c,p=t=>t;class u extends i.WF{render(){const t=(0,i.qy)(s||(s=p`<div class="header-title"> <slot name="title"></slot> </div>`)),e=(0,i.qy)(n||(n=p`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,i.qy)(l||(l=p` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,i.qy)(d||(d=p`${0}${0}`),e,t):(0,i.qy)(h||(h=p`${0}${0}`),t,e))}static get styles(){return[(0,i.AH)(c||(c=p`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))} all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`))]}constructor(...t){super(...t),this.subtitlePosition="below",this.showBorder=!1}}(0,o.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],u.prototype,"subtitlePosition",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],u.prototype,"showBorder",void 0),u=(0,o.Cg)([(0,r.EM)("ha-dialog-header")],u)},72554:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953),a(49255);var o=a(40445),i=a(93900),r=a(35211),s=a(5124),n=a(67576),l=a(63672),d=a(1087),h=a(64481),c=a(22792),p=a(59992),u=a(14503),v=a(22348),g=(a(76538),a(26300)),f=t([i,g,p]);[i,g,p]=f.then?(await f)():f;let b,w,m,y,_,x,$,C=t=>t;const S="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";class k extends((0,p.V)(s.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(t){super.updated(t),t.has("open")&&(this._open=this.open)}render(){var t,e,a;return(0,s.qy)(b||(b=C` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" ="${0}" -hide="${0}" -show="${0}" -after-show="${0}" -after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" ="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,l.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?s.s6:(0,s.qy)(w||(w=C`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(t=null===(e=this._i18n)||void 0===e||null===(a=e.localize)||void 0===a?void 0:a.call(e,"ui.common.close"))&&void 0!==t?t:"Close",S,void 0!==this.headerTitle?(0,s.qy)(m||(m=C`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,s.qy)(y||(y=C`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,s.qy)(_||(_=C`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,s.qy)(x||(x=C`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(t){this._open?(0,h.J)(()=>{this._setFullscreen(t.detail)}):this._setFullscreen(t.detail)}_setFullscreen(t){this.toggleAttribute("fullscreen",t)}_handleBodyScroll(t){this._bodyScrolled=t.target.scrollTop>0}_handleKeyDown(t){"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)}_handleHide(t){var e;const a=(null===(e=t.detail)||void 0===e?void 0:e.source)===t.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&t.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,u.dp,(0,s.AH)($||($=C`wa-dialog{--full-width:var(
--ha-dialog-width-full,
min(95vw, var(--safe-width))
);--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
--ha-dialog-surface-background,
var(--card-background-color, var(--ha-color-surface-default))
);--wa-panel-border-radius:var(
--ha-dialog-border-radius,
var(--ha-border-radius-3xl)
);max-width:var(--ha-dialog-max-width,var(--safe-width))} (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)} all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
--ha-dialog-header-title-font-size,
var(--ha-font-size-2xl)
);line-height:var(
--ha-dialog-header-title-line-height,
var(--ha-line-height-condensed)
);font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}constructor(...t){super(...t),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,d.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var t,e;if(null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,v.V)(this._hassConfig.auth.external)){const t=this.querySelector("[autofocus]");return void(null!==t&&(t.id||(t.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})))}null===(e=this.querySelector("[autofocus]"))||void 0===e||e.focus()}))},this._handleAfterShow=t=>{t.eventPhase===Event.AT_TARGET&&(0,d.r)(this,"after-show")},this._handleAfterHide=t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,d.r)(this,"closed"))}}}(0,o.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],k.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],k.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],k.prototype,"open",void 0),(0,o.Cg)([(0,n.MZ)({reflect:!0})],k.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],k.prototype,"width",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],k.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-title"})],k.prototype,"headerTitle",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],k.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],k.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],k.prototype,"flexContent",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],k.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,n.wk)()],k.prototype,"_open",void 0),(0,o.Cg)([(0,n.P)(".body")],k.prototype,"bodyContainer",void 0),(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.D5,subscribe:!0})],k.prototype,"_i18n",void 0),(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],k.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,n.wk)()],k.prototype,"_bodyScrolled",void 0),(0,o.Cg)([(0,n.Ls)({passive:!0})],k.prototype,"_handleBodyScroll",null),k=(0,o.Cg)([(0,n.EM)("ha-dialog")],k),e()}catch(b){e(b)}})},90248:function(t,e,a){a.a(t,async function(t,o){try{a.r(e),a.d(e,{HaIconButtonArrowPrev:function(){return v}});a(62953);var i=a(40445),r=a(5124),s=a(67576),n=a(63091),l=a(26300),d=t([l]);l=(d.then?(await d)():d)[0];let h,c=t=>t;const p="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",u="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class v extends r.WF{render(){var t;return(0,r.qy)(h||(h=c` <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"===n.G.document.dir?u:p}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],v.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)()],v.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)()],v.prototype,"href",void 0),(0,i.Cg)([(0,s.MZ)()],v.prototype,"target",void 0),(0,i.Cg)([(0,s.MZ)()],v.prototype,"rel",void 0),(0,i.Cg)([(0,s.MZ)()],v.prototype,"download",void 0),(0,i.Cg)([(0,s.wk)()],v.prototype,"_icon",void 0),v=(0,i.Cg)([(0,s.EM)("ha-icon-button-arrow-prev")],v),o()}catch(h){o(h)}})},47351:function(t,e,a){a.d(e,{PS:function(){return o},Tv:function(){return s},VR:function(){return i},lE:function(){return n}});a(74423),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);const o=t=>t.data,i=t=>"object"==typeof t?"object"==typeof t.body?t.body.message||"Unknown error, see supervisor logs":t.body||t.message||"Unknown error, see supervisor logs":t,r=new Set([502,503,504]),s=t=>!!(t&&t.status_code&&r.has(t.status_code))||!(!t||!t.message||!t.message.includes("ERR_CONNECTION_CLOSED")&&!t.message.includes("ERR_CONNECTION_RESET")),n=async(t,e)=>t({type:"supervisor/api",endpoint:`/${e}/stats`,method:"get"})},90600:function(t,e,a){a.d(e,{GM:function(){return s},IK:function(){return d},MU:function(){return n},OV:function(){return r},RE:function(){return h},Vo:function(){return u},Yd:function(){return v},h$:function(){return l},w9:function(){return g},xL:function(){return p},y0:function(){return c}});a(74423),a(3362);var o=a(62384),i=a(47351);const r=async t=>{(0,o.v)(t.config.version,2021,2,4)?await t.callWS({type:"supervisor/api",endpoint:"/supervisor/reload",method:"post"}):await t.callApi("POST","hassio/supervisor/reload")},s=async t=>(0,o.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/supervisor/info",method:"get"}):(0,i.PS)(await t.callApi("GET","hassio/supervisor/info")),n=async t=>(0,o.v)(t.config.version,2021,2,4)?t.callWS({type:"supervisor/api",endpoint:"/info",method:"get"}):(0,i.PS)(await t.callApi("GET","hassio/info")),l=async t=>t.callApi("GET","hassio/host/logs/boots"),d=async(t,e)=>t.callApi("GET",`hassio/${e.includes("_")?`addons/${e}`:e}/logs`),h=async(t,e,a,o=0)=>t.callApiRaw("GET",`hassio/${e.includes("_")?`addons/${e}`:e}/logs${0!==o?`/boots/${o}`:""}`,void 0,a?{Range:a}:void 0),c=async(t,e,a,o=100,i=0)=>t.callApiRaw("GET",`hassio/${e.includes("_")?`addons/${e}`:e}/logs${0!==i?`/boots/${i}`:""}/follow?lines=${o}`,void 0,void 0,a),p=async(t,e,a,o,i,r=100,s=0)=>t.callApiRaw("GET",`hassio/${e.includes("_")?`addons/${e}`:e}/logs${0!==s?`/boots/${s}`:""}/follow`,void 0,{Range:`entries=${o}:${i}:${r}`},a),u=t=>`/api/hassio/${t.includes("_")?`addons/${t}`:t}/logs`,v=(t,e,a=0)=>`/api/hassio/${t.includes("_")?`addons/${t}`:t}/logs${0!==a?`/boots/${a}`:""}?lines=${e}`,g=async(t,e)=>{(0,o.v)(t.config.version,2021,2,4)?await t.callWS({type:"supervisor/api",endpoint:"/supervisor/options",method:"post",data:e}):await t.callApi("POST","hassio/supervisor/options",e)}},81310:function(t,e,a){a.a(t,async function(t,e){try{a(62953);var o=a(40445),i=a(5124),r=a(67576),s=a(6412),n=a(26218),l=a(91926),d=a(90248),h=a(2054),c=a(14503),p=t([d,h]);[d,h]=p.then?(await p)():p;let u,v,g,f,b,w=t=>t;class m extends i.WF{render(){var t;return(0,i.qy)(u||(u=w` <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}" ="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,s.H)({narrow:this.narrow}),this.mainPage||null!==(t=history.state)&&void 0!==t&&t.root?(0,i.qy)(v||(v=w` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,i.qy)(g||(g=w` <ha-icon-button-arrow-prev href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,i.qy)(f||(f=w` <ha-icon-button-arrow-prev .hass="${0}" ="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,(0,s.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,l.OE)()}static get styles(){return[c.dp,(0,i.AH)(b||(b=w`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`))]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)()],m.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,attribute:"main-page"})],m.prototype,"mainPage",void 0),(0,o.Cg)([(0,r.MZ)({type:String,attribute:"back-path"})],m.prototype,"backPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],m.prototype,"backCallback",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],m.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],m.prototype,"scrollable",void 0),(0,o.Cg)([(0,n.a)(".content")],m.prototype,"_savedScrollPos",void 0),(0,o.Cg)([(0,r.Ls)({passive:!0})],m.prototype,"_saveScrollPos",null),m=(0,o.Cg)([(0,r.EM)("hass-subpage")],m),e()}catch(u){e(u)}})},59992:function(t,e,a){a.a(t,async function(t,o){try{a.d(e,{V:function(){return v}});a(62953);var i=a(40445),r=a(88696),s=a(5124),n=a(6412),l=a(67576),d=t([r]);r=(d.then?(await d)():d)[0];let h,c,p=t=>t;const u=t=>void 0===t?[]:Array.isArray(t)?t:[t],v=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,s.qy)(h||(h=p` <div class="${0}"></div> <div class="${0}"></div> `),(0,n.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,n.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...u(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,s.AH)(c||(c=p`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:o=0,scrollTop:i=0}=t;this._contentScrollable=a-o>i+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const a=t.currentTarget;this._contentScrolled=(null!==(e=a.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:t=>{var e;const a=null===(e=t[0])||void 0===e?void 0:e.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,i.Cg)([(0,l.wk)()],e.prototype,"_contentScrolled",void 0),(0,i.Cg)([(0,l.wk)()],e.prototype,"_contentScrollable",void 0),e};o()}catch(h){o(h)}})},89905:function(t,e,a){a.a(t,async function(t,o){try{a.r(e);a(3362),a(27495),a(62953),a(48408),a(14603),a(47566),a(98721);var i=a(40445),r=(a(68825),a(5124)),s=a(67576),n=a(22786),l=a(36312),d=(a(76776),a(29823)),h=(a(70947),a(47351)),c=a(90600),p=a(24247),u=a(65063),v=a(81310),g=a(87842),f=a(96897),b=t([d,v,g,f,p]);[d,v,g,f,p]=b.then?(await b)():b;let w,m,y,_,x,$,C=t=>t;const S="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",k="M14 12L10 8V11H2V13H10V16M22 12A10 10 0 0 1 2.46 15H4.59A8 8 0 1 0 4.59 9H2.46A10 10 0 0 1 22 12Z",A="M22 12L18 8V11H10V13H18V16M20 18A10 10 0 1 1 20 6H17.27A8 8 0 1 0 17.27 18Z",E="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";class P extends r.WF{firstUpdated(t){super.firstUpdated(t),(0,l.x)(this.hass.config,"hassio")&&this._refreshSupervisorInfo()}render(){const t=this._filterInstallableUpdateEntities(this.hass.states,this._showSkipped),e=this._filterNotInstallableUpdateEntities(this.hass.states,this._showSkipped);return(0,r.qy)(w||(w=C` <hass-subpage .backPath="${0}" .hass="${0}" .narrow="${0}" .header="${0}"> <div slot="toolbar-icon"> <ha-icon-button .label="${0}" .path="${0}" ="${0}"></ha-icon-button> <ha-dropdown -select="${0}"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> <ha-dropdown-item type="checkbox" .checked="${0}" value="show_skipped"> ${0} </ha-dropdown-item> ${0} </ha-dropdown> </div> <div class="content"> ${0} ${0} ${0} </div> </hass-subpage> `),this._searchParms.has("historyBack")?void 0:"/config/system",this.hass,this.narrow,this.hass.localize("ui.panel.config.updates.caption"),this.hass.localize("ui.panel.config.updates.check_updates"),E,this._checkUpdates,this._handleOverflowAction,this.hass.localize("ui.common.menu"),S,this._showSkipped,this.hass.localize("ui.panel.config.updates.show_skipped"),this._supervisorInfo?(0,r.qy)(m||(m=C` <wa-divider></wa-divider> <ha-dropdown-item value="toggle_beta" .disabled="${0}"> <ha-svg-icon .path="${0}" slot="icon"></ha-svg-icon> ${0} </ha-dropdown-item> `),"dev"===this._supervisorInfo.channel,"stable"===this._supervisorInfo.channel?k:A,this.hass.localize(`ui.panel.config.updates.${"stable"===this._supervisorInfo.channel?"join":"leave"}_beta`)):r.s6,t.length?(0,r.qy)(y||(y=C` <ha-card outlined> <div class="card-content"> <div class="title" role="heading" aria-level="2"> ${0} </div> <ha-config-updates .hass="${0}" .narrow="${0}" .updateEntities="${0}" showAll></ha-config-updates> </div> </ha-card> `),this.hass.localize("ui.panel.config.updates.title",{count:t.length}),this.hass,this.narrow,t):r.s6,e.length?(0,r.qy)(_||(_=C` <ha-card outlined> <div class="card-content"> <div class="title" role="heading" aria-level="2"> ${0} </div> <ha-config-updates .hass="${0}" .narrow="${0}" .updateEntities="${0}" showAll></ha-config-updates> </div> </ha-card> `),this.hass.localize("ui.panel.config.updates.title_not_installable",{count:e.length}),this.hass,this.narrow,e):r.s6,t.length+e.length?r.s6:(0,r.qy)(x||(x=C` <ha-card outlined> <div class="no-updates"> ${0} </div> </ha-card> `),this.hass.localize("ui.panel.config.updates.no_updates")))}async _refreshSupervisorInfo(){this._supervisorInfo=await(0,c.GM)(this.hass)}_handleOverflowAction(t){"toggle_beta"===t.detail.item.value?"stable"===this._supervisorInfo.channel?(0,f.U)(this,{join:()=>this._setChannel("beta")}):this._setChannel("stable"):"show_skipped"===t.detail.item.value&&(this._showSkipped=!this._showSkipped)}async _setChannel(t){try{await(0,c.w9)(this.hass,{channel:t}),await(0,c.OV)(this.hass),await this._refreshSupervisorInfo()}catch(e){(0,u.showAlertDialog)(this,{text:(0,h.VR)(e)})}}async _checkUpdates(){(0,p.nD)(this,this.hass)}constructor(...t){super(...t),this.narrow=!1,this._searchParms=new URLSearchParams(window.location.search),this._showSkipped=!1,this._filterInstallableUpdateEntities=(0,n.A)((t,e)=>(0,p.id)(t,e,!1)),this._filterNotInstallableUpdateEntities=(0,n.A)((t,e)=>(0,p.id)(t,e,!0))}}P.styles=(0,r.AH)($||($=C`.content{padding:28px 20px 0;max-width:1040px;margin:0 auto}ha-card{max-width:600px;margin:0 auto;height:100%;justify-content:space-between;flex-direction:column;display:flex;margin-bottom:max(24px,var(--safe-area-inset-bottom))}ha-config-updates{margin-bottom:8px}.card-content{display:flex;justify-content:space-between;flex-direction:column;padding:0}.title{padding:var(--ha-space-4) var(--ha-space-4) 0;font-size:var(--ha-font-size-l)}.no-updates{padding:16px}li[divider]{border-bottom-color:var(--divider-color)}`)),(0,i.Cg)([(0,s.MZ)({attribute:!1})],P.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],P.prototype,"narrow",void 0),(0,i.Cg)([(0,s.wk)()],P.prototype,"_searchParms",void 0),(0,i.Cg)([(0,s.wk)()],P.prototype,"_showSkipped",void 0),(0,i.Cg)([(0,s.wk)()],P.prototype,"_supervisorInfo",void 0),P=(0,i.Cg)([(0,s.EM)("ha-config-section-updates")],P),o()}catch(w){o(w)}})},15685:function(t,e,a){a.a(t,async function(t,o){try{a.r(e),a.d(e,{DialogJoinBeta:function(){return w}});a(62953);var i=a(40445),r=a(5124),s=a(67576),n=a(1087),l=a(38962),d=a(18350),h=(a(93444),a(72554)),c=a(14503),p=a(36918),u=t([l,d,h]);[l,d,h]=u.then?(await u)():u;let v,g,f=t=>t;const b="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z";class w extends r.WF{showDialog(t){this._dialogParams=t,this._open=!0}closeDialog(){return this._open=!1,!0}_dialogClosed(){this._dialogParams=void 0,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._dialogParams?(0,r.qy)(v||(v=f` <ha-dialog .open="${0}" header-title="${0}" ="${0}"> <ha-alert alert-type="warning"> ${0} </ha-alert> <p> ${0}.<br> ${0} </p> <ul> <li>ioBroker Core</li> <li>ioBroker Supervisor</li> <li>ioBroker Operating System</li> </ul> <a href="${0}" target="_blank" rel="noreferrer"> ${0} <ha-svg-icon .path="${0}"></ha-svg-icon> </a> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" ="${0}"> ${0} </ha-button> <ha-button slot="primaryAction" ="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this._open,this.hass.localize("ui.dialogs.join_beta_channel.title"),this._dialogClosed,this.hass.localize("ui.dialogs.join_beta_channel.backup"),this.hass.localize("ui.dialogs.join_beta_channel.warning"),this.hass.localize("ui.dialogs.join_beta_channel.release_items"),(0,p.o)(this.hass,"/faq/release/"),this.hass.localize("ui.dialogs.join_beta_channel.view_documentation"),b,this._cancel,this.hass.localize("ui.common.cancel"),this._join,this.hass.localize("ui.dialogs.join_beta_channel.join")):r.s6}_cancel(){var t,e;null===(t=this._dialogParams)||void 0===t||null===(e=t.cancel)||void 0===e||e.call(t),this.closeDialog()}_join(){var t,e;null===(t=this._dialogParams)||void 0===t||null===(e=t.join)||void 0===e||e.call(t),this.closeDialog()}static get styles(){return[c.nA,(0,r.AH)(g||(g=f`a{text-decoration:none}a ha-svg-icon{--mdc-icon-size:16px}`))]}constructor(...t){super(...t),this._open=!1}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_dialogParams",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_open",void 0),w=(0,i.Cg)([(0,s.EM)("dialog-join-beta")],w),o()}catch(v){o(v)}})},96897:function(t,e,a){a.a(t,async function(t,o){try{a.d(e,{U:function(){return n}});a(3362),a(62953);var i=a(1087),r=a(15685),s=t([r]);r=(s.then?(await s)():s)[0];const n=(t,e)=>{(0,i.r)(t,"show-dialog",{dialogTag:"dialog-join-beta",dialogImport:()=>Promise.resolve().then(a.bind(a,15685)),dialogParams:e})};o()}catch(n){o(n)}})},22348:function(t,e,a){a.d(e,{V:function(){return i}});var o=a(37177);const i=t=>!!t&&o.n},37177:function(t,e,a){a.d(e,{n:function(){return o}});a(27495);const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);