iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
15 lines • 27.9 kB
JavaScript
/*! For license information please see 10174.4dd4e8b2695cc177.js.LICENSE.txt */
export const __webpack_ids__=["10174"];export const __webpack_modules__={88618:function(e,t,i){i.d(t,{Wg:()=>d,qN:()=>r.q});var o,a,n=i(9065),s=i(15093),r=i(11911);const l=null!==(a=null===(o=window.ShadyDOM)||void 0===o?void 0:o.inUse)&&void 0!==a&&a;class d extends r.H{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=e=>{this.disabled||this.setFormData(e.formData)}}findFormElement(){if(!this.shadowRoot||l)return null;const e=this.getRootNode().querySelectorAll("form");for(const t of Array.from(e))if(t.contains(this))return t;return null}connectedCallback(){var e;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(e=this.containingForm)||void 0===e||e.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.containingForm)||void 0===e||e.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}}d.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,n.__decorate)([(0,s.Cb)({type:Boolean})],d.prototype,"disabled",void 0)},93958:function(e,t,i){i.d(t,{F:()=>h});var o=i(9065),a=i(15093),n=i(92444),s=i(76688);let r=class extends n.A{};r.styles=[s.W],r=(0,o.__decorate)([(0,a.Mo)("mwc-checkbox")],r);var l=i(57243),d=i(35359),c=i(65703);class h extends c.K{constructor(){super(...arguments),this.left=!1,this.graphic="control"}render(){const e={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},t=this.renderText(),i=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():l.dy``,o=this.hasMeta&&this.left?this.renderMeta():l.dy``,a=this.renderRipple();return l.dy` ${a} ${i} ${this.left?"":t} <span class="${(0,d.$)(e)}"> <mwc-checkbox reducedTouchTarget tabindex="${this.tabindex}" .checked="${this.selected}" ?disabled="${this.disabled}" ="${this.onChange}"> </mwc-checkbox> </span> ${this.left?t:""} ${o}`}async onChange(e){const t=e.target;this.selected===t.checked||(this._skipPropRequest=!0,this.selected=t.checked,await this.updateComplete,this._skipPropRequest=!1)}}(0,o.__decorate)([(0,a.IO)("slot")],h.prototype,"slotElement",void 0),(0,o.__decorate)([(0,a.IO)("mwc-checkbox")],h.prototype,"checkboxElement",void 0),(0,o.__decorate)([(0,a.Cb)({type:Boolean})],h.prototype,"left",void 0),(0,o.__decorate)([(0,a.Cb)({type:String,reflect:!0})],h.prototype,"graphic",void 0)},97536:function(e,t,i){i.d(t,{W:()=>o});const o=i(57243).iv`:host(:not([twoline])){height:56px}:host(:not([left])) .mdc-deprecated-list-item__meta{height:40px;width:40px}`},31146:function(e,t,i){i.d(t,{i:()=>a});const o=(0,i(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),a=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){o(e),this[`__${String(t.key)}`]=e},get(){return this[`__${String(t.key)}`]||history.state?.scrollPosition},enumerable:!0,configurable:!0},finisher(i){const o=i.prototype.connectedCallback;i.prototype.connectedCallback=function(){o.call(this);const i=this[t.key];i&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=i}),0)}))}}})},87707:function(e,t,i){i.d(t,{Q:()=>o});const o=e=>!(!e.detail.selected||"property"!==e.detail.source)&&(e.currentTarget.selected=!1,!0)},93826:function(e,t,i){i.d(t,{P:()=>o});const o=(e,t,i=!0,o=!0)=>{let a,n=0;const s=(...s)=>{const r=()=>{n=!1===i?0:Date.now(),a=void 0,e(...s)},l=Date.now();n||!1!==i||(n=l);const d=t-(l-n);d<=0||d>t?(a&&(clearTimeout(a),a=void 0),n=l,e(...s)):a||!1===o||(a=window.setTimeout(r,d))};return s.cancel=()=>{clearTimeout(a),a=void 0,n=0},s}},28310:function(e,t,i){var o=i(44249),a=i(57243),n=i(15093),s=i(10916);(0,o.Z)([(0,n.Mo)("ha-bar")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"min",value:()=>0},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"max",value:()=>100},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"value",value:void 0},{kind:"method",key:"render",value:function(){const e=(0,s.IU)((0,s.Ff)((0,s.Fv)(this.value,this.min,this.max),this.min,this.max));return a.YP` <svg> <g> <rect/> <rect width="${e}%"/> </g> </svg> `}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`rect{height:100%}rect:first-child{width:100%;fill:var(--ha-bar-background-color,var(--secondary-background-color))}rect:last-child{fill:var(--ha-bar-primary-color,var(--primary-color))}svg{border-radius:var(--ha-bar-border-radius,4px);height:12px;width:100%}`}]}}),a.oi)},48103:function(e,t,i){var o=i(44249),a=i(72621),n=i(57243),s=i(93958),r=i(97536),l=i(46289),d=i(15093),c=i(36522);(0,o.Z)([(0,d.Mo)("ha-check-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"onChange",value:async function(e){(0,a.Z)(i,"onChange",this,3)([e]),(0,c.B)(this,e.type)}},{kind:"field",static:!0,key:"styles",value:()=>[l.W,r.W,n.iv`:host{--mdc-theme-secondary:var(--primary-color)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,16px);margin-inline-start:0px;direction:var(--direction)}.mdc-deprecated-list-item__meta{flex-shrink:0;direction:var(--direction);margin-inline-start:auto;margin-inline-end:0}.mdc-deprecated-list-item__graphic{margin-top:var(--check-list-item-graphic-margin-top)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-inline-start:0;margin-inline-end:var(--mdc-list-item-graphic-margin,32px)}`]}]}}),s.F)},73729:function(e,t,i){i.d(t,{i:()=>h});var o=i(44249),a=i(72621),n=i(74966),s=i(51408),r=i(57243),l=i(15093),d=i(76525);i(23334);const c=["button","ha-list-item"],h=(e,t)=>r.dy` <div class="header_title"> <ha-icon-button .label="${e?.localize("ui.common.close")??"Close"}" .path="${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}" dialogAction="close" class="header_button"></ha-icon-button> <span>${t}</span> </div> `;(0,o.Z)([(0,l.Mo)("ha-dialog")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:d.gA,value:void 0},{kind:"method",key:"scrollToPos",value:function(e,t){this.contentElement?.scrollTo(e,t)}},{kind:"method",key:"renderHeading",value:function(){return r.dy`<slot name="heading"> ${(0,a.Z)(i,"renderHeading",this,3)([])} </slot>`}},{kind:"method",key:"firstUpdated",value:function(){(0,a.Z)(i,"firstUpdated",this,3)([]),this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,c].join(", "),this._updateScrolledAttribute(),this.contentElement?.addEventListener("scroll",this._onScroll,{passive:!0})}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(i,"disconnectedCallback",this,3)([]),this.contentElement.removeEventListener("scroll",this._onScroll)}},{kind:"field",key:"_onScroll",value(){return()=>{this._updateScrolledAttribute()}}},{kind:"method",key:"_updateScrolledAttribute",value:function(){this.contentElement&&this.toggleAttribute("scrolled",0!==this.contentElement.scrollTop)}},{kind:"field",static:!0,key:"styles",value:()=>[s.W,r.iv`:host([scrolled]) ::slotted(ha-dialog-header){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.mdc-dialog{--mdc-dialog-scroll-divider-color:var(
--dialog-scroll-divider-color,
var(--divider-color)
);z-index:var(--dialog-z-index,8);-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));--mdc-dialog-box-shadow:var(--dialog-box-shadow, none);--mdc-typography-headline6-font-weight:400;--mdc-typography-headline6-font-size:1.574rem}.mdc-dialog__actions{justify-content:var(--justify-action-buttons,flex-end);padding-bottom:max(env(safe-area-inset-bottom),24px)}.mdc-dialog__actions span:first-child{flex:var(--secondary-action-button-flex,unset)}.mdc-dialog__actions span:nth-child(2){flex:var(--primary-action-button-flex,unset)}.mdc-dialog__container{align-items:var(--vertical-align-dialog,center)}.mdc-dialog__title{padding:24px 24px 0 24px}.mdc-dialog__title:has(span){padding:12px 12px 0}.mdc-dialog__actions{padding:12px 24px 12px 24px}.mdc-dialog__title::before{content:unset}.mdc-dialog .mdc-dialog__content{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,24px)}:host([hideactions]) .mdc-dialog .mdc-dialog__content{padding-bottom:max(var(--dialog-content-padding,24px),env(safe-area-inset-bottom))}.mdc-dialog .mdc-dialog__surface{position:var(--dialog-surface-position,relative);top:var(--dialog-surface-top);margin-top:var(--dialog-surface-margin-top);min-height:var(--mdc-dialog-min-height,auto);border-radius:var(--ha-dialog-border-radius,28px);-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);background:var(--ha-dialog-surface-background,var(--mdc-theme-surface,#fff))}:host([flexContent]) .mdc-dialog .mdc-dialog__content{display:flex;flex-direction:column}.header_title{display:flex;align-items:center;direction:var(--direction)}.header_title span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;padding-left:4px}.header_button{text-decoration:none;color:inherit;inset-inline-start:initial;inset-inline-end:-12px;direction:var(--direction)}.dialog-actions{inset-inline-start:initial!important;inset-inline-end:0px!important;direction:var(--direction)}`]}]}}),n.M)},54202:function(e,t,i){i.r(t),i.d(t,{HaIconButtonArrowPrev:()=>r});var o=i(44249),a=i(57243),n=i(15093),s=i(5111);i(23334);let r=(0,o.Z)([(0,n.Mo)("ha-icon-button-arrow-prev")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_icon",value:()=>"rtl"===s.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"},{kind:"method",key:"render",value:function(){return a.dy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}"></ha-icon-button> `}}]}}),a.oi)},89370:function(e,t,i){var o=i(44249),a=i(57243),n=i(15093),s=i(35359),r=i(10916);i(28310),i(30509);(0,o.Z)([(0,n.Mo)("ha-metric")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"value",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"heading",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"tooltip",value:void 0},{kind:"method",key:"render",value:function(){const e=(0,r.IU)(this.value);return a.dy` <ha-settings-row> <span slot="heading"> ${this.heading} </span> <div slot="description" .title="${this.tooltip??""}"> <span class="value"> <div>${e} %</div> </span> <ha-bar class="${(0,s.$)({"target-warning":e>50,"target-critical":e>85})}" .value="${this.value}"></ha-bar> </div> </ha-settings-row> `}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`ha-settings-row{padding:0;height:54px;width:100%}ha-settings-row>div[slot=description]{white-space:normal;color:var(--secondary-text-color);display:flex;justify-content:space-between}ha-bar{--ha-bar-primary-color:var(--metric-bar-ok-color, var(--success-color))}.target-warning{--ha-bar-primary-color:var(
--metric-bar-warning-color,
var(--warning-color)
)}.target-critical{--ha-bar-primary-color:var(
--metric-bar-critical-color,
var(--error-color)
)}.value{width:48px;padding-right:4px;padding-inline-end:4px;padding-inline-start:initial;flex-shrink:0}.value>div{direction:ltr;text-align:var(--float-start)}`}]}}),a.oi)},30509:function(e,t,i){var o=i(44249),a=i(57243),n=i(15093);(0,o.Z)([(0,n.Mo)("ha-settings-row")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"slim",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"three-line"})],key:"threeLine",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"wrap-heading",reflect:!0})],key:"wrapHeading",value:()=>!1},{kind:"method",key:"render",value:function(){return a.dy` <div class="prefix-wrap"> <slot name="prefix"></slot> <div class="body" ?two-line="${!this.threeLine}" ?three-line="${this.threeLine}"> <slot name="heading"></slot> <div class="secondary"><slot name="description"></slot></div> </div> </div> <div class="content"><slot></slot></div> `}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`:host{display:flex;padding:0 16px;align-content:normal;align-self:auto;align-items:center}.body{padding-top:8px;padding-bottom:8px;padding-left:0;padding-inline-start:0;padding-right:16px;padding-inline-end:16px;overflow:hidden;display:var(--layout-vertical_-_display,flex);flex-direction:var(--layout-vertical_-_flex-direction,column);justify-content:var(--layout-center-justified_-_justify-content,center);flex:var(--layout-flex_-_flex,1);flex-basis:var(--layout-flex_-_flex-basis,0.000000001px)}.body[three-line]{min-height:var(--paper-item-body-three-line-min-height,88px)}:host(:not([wrap-heading])) body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body>.secondary{display:block;padding-top:4px;font-family:var(
--mdc-typography-body2-font-family,
var(--mdc-typography-font-family, Roboto, sans-serif)
);-webkit-font-smoothing:antialiased;font-size:var(--mdc-typography-body2-font-size, .875rem);font-weight:var(--mdc-typography-body2-font-weight,400);line-height:normal;color:var(--secondary-text-color)}.body[two-line]{min-height:calc(var(--paper-item-body-two-line-min-height,72px) - 16px);flex:1}.content{display:contents}:host(:not([narrow])) .content{display:var(--settings-row-content-display,flex);justify-content:flex-end;flex:1;padding:16px 0}.content ::slotted(*){width:var(--settings-row-content-width)}:host([narrow]){align-items:normal;flex-direction:column;border-top:1px solid var(--divider-color);padding-bottom:8px}::slotted(ha-switch){padding:16px 0}.secondary{white-space:normal}.prefix-wrap{display:var(--settings-row-prefix-display)}:host([narrow]) .prefix-wrap{display:flex;align-items:center}:host([slim]),:host([slim]) .content,:host([slim]) ::slotted(ha-switch){padding:0}:host([slim]) .body{min-height:0}`}]}}),a.oi)},56785:function(e,t,i){i.d(t,{js:()=>n,rY:()=>a,yd:()=>l,yz:()=>r});i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814);var o=i(17803);const a=e=>e.data,n=e=>"object"==typeof e?"object"==typeof e.body?e.body.message||"Unknown error, see supervisor logs":e.body||e.message||"Unknown error, see supervisor logs":e,s=new Set([502,503,504]),r=e=>!!(e&&e.status_code&&s.has(e.status_code))||!(!e||!e.message||!e.message.includes("ERR_CONNECTION_CLOSED")&&!e.message.includes("ERR_CONNECTION_RESET")),l=async(e,t)=>(0,o.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:`/${t}/stats`,method:"get"}):a(await e.callApi("GET",`hassio/${t}/stats`))},79960:function(e,t,i){i.d(t,{Bq:()=>v,CP:()=>s,KQ:()=>l,Lm:()=>r,NC:()=>c,Ri:()=>h,gM:()=>u,jP:()=>g,lC:()=>n,rM:()=>p,wt:()=>d});var o=i(17803),a=i(56785);const n=async e=>{(0,o.I)(e.config.version,2021,2,4)?await e.callWS({type:"supervisor/api",endpoint:"/supervisor/reload",method:"post"}):await e.callApi("POST","hassio/supervisor/reload")},s=async e=>(0,o.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/supervisor/info",method:"get"}):(0,a.rY)(await e.callApi("GET","hassio/supervisor/info")),r=async e=>(0,o.I)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:"/info",method:"get"}):(0,a.rY)(await e.callApi("GET","hassio/info")),l=async e=>e.callApi("GET","hassio/host/logs/boots"),d=async(e,t)=>e.callApi("GET",`hassio/${t.includes("_")?`addons/${t}`:t}/logs`),c=async(e,t,i,o=0)=>e.callApiRaw("GET",`hassio/${t.includes("_")?`addons/${t}`:t}/logs${0!==o?`/boots/${o}`:""}`,void 0,i?{Range:i}:void 0),h=async(e,t,i,o=100,a=0)=>e.callApiRaw("GET",`hassio/${t.includes("_")?`addons/${t}`:t}/logs${0!==a?`/boots/${a}`:""}/follow?lines=${o}`,void 0,void 0,i),p=async(e,t,i,o,a,n=100,s=0)=>e.callApiRaw("GET",`hassio/${t.includes("_")?`addons/${t}`:t}/logs${0!==s?`/boots/${s}`:""}/follow`,void 0,{Range:`entries=${o}:${a}:${n}`},i),u=e=>`/api/hassio/${e.includes("_")?`addons/${e}`:e}/logs`,v=(e,t,i=0)=>`/api/hassio/${e.includes("_")?`addons/${e}`:e}/logs${0!==i?`/boots/${i}`:""}?lines=${t}`,g=async(e,t)=>{(0,o.I)(e.config.version,2021,2,4)?await e.callWS({type:"supervisor/api",endpoint:"/supervisor/options",method:"post",data:t}):await e.callApi("POST","hassio/supervisor/options",t)}},87979:function(e,t,i){var o=i(44249),a=i(57243),n=i(15093),s=i(31146),r=(i(54202),i(43344),i(28008));(0,o.Z)([(0,n.Mo)("hass-subpage")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),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:()=>!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:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"supervisor",value:()=>!1},{kind:"field",decorators:[(0,s.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){return a.dy` <div class="toolbar"> ${this.mainPage||history.state?.root?a.dy` <ha-menu-button .hassio="${this.supervisor}" .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `:this.backPath?a.dy` <a href="${this.backPath}"> <ha-icon-button-arrow-prev .hass="${this.hass}"></ha-icon-button-arrow-prev> </a> `:a.dy` <ha-icon-button-arrow-prev .hass="${this.hass}" ="${this._backTapped}"></ha-icon-button-arrow-prev> `} <div class="main-title"><slot name="header">${this.header}</slot></div> <slot name="toolbar-icon"></slot> </div> <div class="content ha-scrollbar" ="${this._saveScrollPos}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `}},{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[r.$c,a.iv`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box} (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)},3761:function(e,t,i){i.a(e,(async function(e,o){try{i.r(t);var a=i(44249),n=i(72621),s=(i(87319),i(57243)),r=i(15093),l=i(27486),d=i(72344),c=i(87707),h=(i(99426),i(28310),i(34273),i(54977),i(48103),i(89370),i(56785)),p=i(79960),u=i(69919),v=i(76131),g=(i(87979),i(73728)),m=i(27199),f=e([g,u]);[g,u]=f.then?(await f)():f;const b="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",y="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";(0,a.Z)([(0,r.Mo)("ha-config-section-updates")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_showSkipped",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_supervisorInfo",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){(0,n.Z)(i,"firstUpdated",this,3)([e]),(0,d.p)(this.hass,"hassio")&&this._refreshSupervisorInfo()}},{kind:"method",key:"render",value:function(){const e=this._filterUpdateEntitiesWithInstall(this.hass.states,this._showSkipped);return s.dy` <hass-subpage back-path="/config/system" .hass="${this.hass}" .narrow="${this.narrow}" .header="${this.hass.localize("ui.panel.config.updates.caption")}"> <div slot="toolbar-icon"> <ha-icon-button .label="${this.hass.localize("ui.panel.config.updates.check_updates")}" .path="${y}" ="${this._checkUpdates}"></ha-icon-button> <ha-button-menu multi> <ha-icon-button slot="trigger" .label="${this.hass.localize("ui.common.menu")}" .path="${b}"></ha-icon-button> <ha-check-list-item left -selected="${this._toggleSkipped}" .selected="${this._showSkipped}"> ${this.hass.localize("ui.panel.config.updates.show_skipped")} </ha-check-list-item> ${this._supervisorInfo?s.dy` <li divider role="separator"></li> <mwc-list-item -selected="${this._toggleBeta}" .disabled="${"dev"===this._supervisorInfo.channel}"> ${"stable"===this._supervisorInfo.channel?this.hass.localize("ui.panel.config.updates.join_beta"):this.hass.localize("ui.panel.config.updates.leave_beta")} </mwc-list-item> `:""} </ha-button-menu> </div> <div class="content"> <ha-card outlined> <div class="card-content"> ${e.length?s.dy` <ha-config-updates .hass="${this.hass}" .narrow="${this.narrow}" .updateEntities="${e}" showAll></ha-config-updates> `:s.dy` <div class="no-updates"> ${this.hass.localize("ui.panel.config.updates.no_updates")} </div> `} </div> </ha-card> </div> </hass-subpage> `}},{kind:"method",key:"_refreshSupervisorInfo",value:async function(){this._supervisorInfo=await(0,p.CP)(this.hass)}},{kind:"method",key:"_toggleSkipped",value:function(e){"property"===e.detail.source&&(this._showSkipped=!this._showSkipped)}},{kind:"method",key:"_toggleBeta",value:async function(e){(0,c.Q)(e)&&("stable"===this._supervisorInfo.channel?(0,m.Q)(this,{join:async()=>this._setChannel("beta")}):this._setChannel("stable"))}},{kind:"method",key:"_setChannel",value:async function(e){try{await(0,p.jP)(this.hass,{channel:e}),await(0,p.lC)(this.hass),await this._refreshSupervisorInfo()}catch(e){(0,v.showAlertDialog)(this,{text:(0,h.js)(e)})}}},{kind:"method",key:"_checkUpdates",value:async function(){(0,u.M$)(this,this.hass)}},{kind:"field",key:"_filterUpdateEntitiesWithInstall",value:()=>(0,l.Z)(((e,t)=>(0,u.Fj)(e,t)))},{kind:"field",static:!0,key:"styles",value:()=>s.iv`.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,env(safe-area-inset-bottom))}.card-content{display:flex;justify-content:space-between;flex-direction:column;padding:0}.no-updates{padding:16px}li[divider]{border-bottom-color:var(--divider-color)}`}]}}),s.oi);o()}catch(e){o(e)}}))},33590:function(e,t,i){i.r(t),i.d(t,{DialogJoinBeta:()=>c});var o=i(44249),a=(i(31622),i(57243)),n=i(15093),s=i(36522),r=(i(99426),i(73729)),l=i(28008),d=i(73192);let c=(0,o.Z)([(0,n.Mo)("dialog-join-beta")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_dialogParams",value:void 0},{kind:"method",key:"showDialog",value:function(e){this._dialogParams=e}},{kind:"method",key:"closeDialog",value:function(){return this._dialogParams=void 0,(0,s.B)(this,"dialog-closed",{dialog:this.localName}),!0}},{kind:"method",key:"render",value:function(){return this._dialogParams?a.dy` <ha-dialog open ="${this.closeDialog}" .heading="${(0,r.i)(this.hass,this.hass.localize("ui.dialogs.join_beta_channel.title"))}"> <ha-alert alert-type="warning"> ${this.hass.localize("ui.dialogs.join_beta_channel.backup")} </ha-alert> <p> ${this.hass.localize("ui.dialogs.join_beta_channel.warning")}.<br> ${this.hass.localize("ui.dialogs.join_beta_channel.release_items")} </p> <ul> <li>ioBroker Core</li> <li>ioBroker Supervisor</li> <li>ioBroker Operating System</li> </ul> <a href="${(0,d.R)(this.hass,"/faq/release/")}" target="_blank" rel="noreferrer"> ${this.hass.localize("ui.dialogs.join_beta_channel.view_documentation")} <ha-svg-icon .path="${"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"}"></ha-svg-icon> </a> <mwc-button slot="primaryAction" ="${this._cancel}"> ${this.hass.localize("ui.common.cancel")} </mwc-button> <mwc-button slot="primaryAction" ="${this._join}"> ${this.hass.localize("ui.dialogs.join_beta_channel.join")} </mwc-button> </ha-dialog> `:a.Ld}},{kind:"method",key:"_cancel",value:function(){this._dialogParams?.cancel?.(),this.closeDialog()}},{kind:"method",key:"_join",value:function(){this._dialogParams?.join?.(),this.closeDialog()}},{kind:"get",static:!0,key:"styles",value:function(){return[l.yu,a.iv`a{text-decoration:none}a ha-svg-icon{--mdc-icon-size:16px}`]}}]}}),a.oi)},27199:function(e,t,i){i.d(t,{Q:()=>a});var o=i(36522);i(33590);const a=(e,t)=>{(0,o.B)(e,"show-dialog",{dialogTag:"dialog-join-beta",dialogImport:()=>Promise.resolve().then(i.bind(i,33590)),dialogParams:t})}},10916:function(e,t,i){i.d(t,{Ff:()=>a,Fv:()=>o,IU:()=>n});const o=(e,t,i)=>isNaN(e)||isNaN(t)||isNaN(i)?0:e>i?i:e<t?t:e,a=(e,t,i)=>100*(e-t)/(i-t),n=e=>Math.round(10*e)/10}};
//# sourceMappingURL=10174.4dd4e8b2695cc177.js.map