UNPKG

iobroker.lovelace

Version:

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

2 lines 2.45 kB
/*! For license information please see 20295.f90329a06b245d39.js.LICENSE.txt */ export const __rspack_esm_id=20295;export const __rspack_esm_ids=[20295];export const __webpack_modules__={47351(e,s,t){t.d(s,{PS:()=>o,Tv:()=>i,VR:()=>r,lE:()=>c});t(74423),t(17642),t(58004),t(33853),t(45876),t(32475),t(15024),t(31698);const o=e=>e.data,r=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,a=new Set([502,503,504]),i=e=>!!(e&&e.status_code&&a.has(e.status_code))||!(!e||!e.message||!e.message.includes("ERR_CONNECTION_CLOSED")&&!e.message.includes("ERR_CONNECTION_RESET")),c=async(e,s)=>e({type:"supervisor/api",endpoint:`/${s}/stats`,method:"get"})},93132(e,s,t){t.a(e,async function(e,o){try{t.r(s),t.d(s,{HuiRecoveryModeCard:()=>d});var r=t(62826),a=t(5124),i=t(22441),c=(t(76776),t(22828)),n=e([c]);c=(n.then?(await n)():n)[0];class d extends a.WF{getCardSize(){return 3}setConfig(e){}render(){return a.qy` <ha-card .header="${this.hass.localize("ui.panel.lovelace.cards.recovery-mode.header")}"> <div class="card-content"> ${this.hass.localize("ui.panel.lovelace.cards.recovery-mode.description")} </div> <error-log-card .hass="${this.hass}" provider="core"></error-log-card> </ha-card> `}}d.styles=a.AH`ha-card{--ha-card-header-color:var(--primary-color)}error-log-card{display:block;padding-bottom:16px}`,(0,r.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"hass",void 0),d=(0,r.Cg)([(0,i.EM)("hui-recovery-mode-card")],d),o()}catch(e){o(e)}})},35463(e,s,t){t.d(s,{Q:()=>o});t(17642),t(58004),t(33853),t(45876),t(32475),t(15024),t(31698);class o{handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){const e=this.u.takeRecords();e.length&&this.handleChanges(e)}observe(e){this.t.add(e),this.u.observe(e),this.i=!0}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}constructor(e,{target:s,config:t,callback:o,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,null!==s&&this.t.add(s??e),this.o=r??this.o,this.callback=o,window.IntersectionObserver?(this.u=new IntersectionObserver(e=>{const s=this.i;this.i=!1,this.o&&s||(this.handleChanges(e),this.h.requestUpdate())},t),e.addController(this)):console.warn("IntersectionController error: browser does not support IntersectionObserver.")}}}};