UNPKG

iobroker.lovelace

Version:

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

5 lines 14.4 kB
export const __webpack_ids__=["39027"];export const __webpack_modules__={46467:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{D_:()=>w,NC:()=>_,Nh:()=>v,U8:()=>Z,WB:()=>g,mn:()=>m,p6:()=>c,ud:()=>f,yQ:()=>k});a(9359),a(1331);var n=a(16485),o=a(27486),l=a(20382),d=a(11104),r=e([n,d]);[n,d]=r.then?(await r)():r;(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,d.f)(e.time_zone,t)})));const c=(e,t,a)=>s(t,a.time_zone).format(e),s=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,d.f)(e.time_zone,t)}))),m=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,d.f)(e.time_zone,t)}))),g=(e,t,a)=>{const i=h(t,a.time_zone);if(t.date_format===l.t6.language||t.date_format===l.t6.system)return i.format(e);const n=i.formatToParts(e),o=n.find((e=>"literal"===e.type))?.value,d=n.find((e=>"day"===e.type))?.value,r=n.find((e=>"month"===e.type))?.value,c=n.find((e=>"year"===e.type))?.value,s=n.at(n.length-1);let m="literal"===s?.type?s?.value:"";"bg"===t.language&&t.date_format===l.t6.YMD&&(m="");return{[l.t6.DMY]:`${d}${o}${r}${o}${c}${m}`,[l.t6.MDY]:`${r}${o}${d}${o}${c}${m}`,[l.t6.YMD]:`${c}${o}${r}${o}${d}${m}`}[t.date_format]},h=(0,o.Z)(((e,t)=>{const a=e.date_format===l.t6.system?void 0:e.language;return e.date_format===l.t6.language||(e.date_format,l.t6.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,d.f)(e.time_zone,t)})})),f=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short",timeZone:(0,d.f)(e.time_zone,t)}))),_=(e,t,a)=>y(t,a.time_zone).format(e),y=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric",timeZone:(0,d.f)(e.time_zone,t)}))),v=(e,t,a)=>b(t,a.time_zone).format(e),b=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",timeZone:(0,d.f)(e.time_zone,t)}))),k=(e,t,a)=>z(t,a.time_zone).format(e),z=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",timeZone:(0,d.f)(e.time_zone,t)}))),w=(e,t,a)=>x(t,a.time_zone).format(e),x=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",timeZone:(0,d.f)(e.time_zone,t)}))),Z=(e,t,a)=>$(t,a.time_zone).format(e),$=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",timeZone:(0,d.f)(e.time_zone,t)})));i()}catch(e){i(e)}}))},64214:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{DG:()=>f,E8:()=>b,Fu:()=>v,NR:()=>z,W0:()=>g,o0:()=>m,yD:()=>_});var n=a(16485),o=a(27486),l=a(46467),d=a(33570),r=a(11104),c=a(16922),s=e([n,r,l,d]);[n,r,l,d]=s.then?(await s)():s;const m=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.y)(e)?"h12":"h23",timeZone:(0,r.f)(e.time_zone,t)}))),g=e=>h().format(e),h=(0,o.Z)((()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}))),f=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",hour:(0,c.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.y)(e)?"h12":"h23",timeZone:(0,r.f)(e.time_zone,t)}))),_=(e,t,a)=>y(t,a.time_zone).format(e),y=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",day:"numeric",hour:(0,c.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.y)(e)?"h12":"h23",timeZone:(0,r.f)(e.time_zone,t)}))),v=(e,t,a)=>(new Date).getFullYear()===e.getFullYear()?_(e,t,a):f(e,t,a),b=(e,t,a)=>k(t,a.time_zone).format(e),k=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.y)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,c.y)(e)?"h12":"h23",timeZone:(0,r.f)(e.time_zone,t)}))),z=(e,t,a)=>`${(0,l.WB)(e,t,a)}, ${(0,d.mr)(e,t,a)}`;i()}catch(e){i(e)}}))},33570:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{Vu:()=>m,Zs:()=>f,mr:()=>c,xO:()=>g});var n=a(16485),o=a(27486),l=a(11104),d=a(16922),r=e([n,l]);[n,l]=r.then?(await r)():r;const c=(e,t,a)=>s(t,a.time_zone).format(e),s=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,d.y)(e)?"h12":"h23",timeZone:(0,l.f)(e.time_zone,t)}))),m=(e,t,a)=>u(t,a.time_zone).format(e),u=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{hour:(0,d.y)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,d.y)(e)?"h12":"h23",timeZone:(0,l.f)(e.time_zone,t)}))),g=(e,t,a)=>h(t,a.time_zone).format(e),h=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",hour:(0,d.y)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,d.y)(e)?"h12":"h23",timeZone:(0,l.f)(e.time_zone,t)}))),f=(e,t,a)=>p(t,a.time_zone).format(e),p=(0,o.Z)(((e,t)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,l.f)(e.time_zone,t)})));i()}catch(e){i(e)}}))},11104:function(e,t,a){a.a(e,(async function(e,i){try{a.d(t,{Q:()=>r,f:()=>c});var n=a(16485),o=a(20382),l=e([n]);n=(l.then?(await l)():l)[0];const d=Intl.DateTimeFormat?.().resolvedOptions?.().timeZone,r=d??"UTC",c=(e,t)=>e===o.c_.local&&d?r:t;i()}catch(e){i(e)}}))},16922:function(e,t,a){a.d(t,{y:()=>o});var i=a(27486),n=a(20382);const o=(0,i.Z)((e=>{if(e.time_format===n.zt.language||e.time_format===n.zt.system){const t=e.time_format===n.zt.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===n.zt.am_pm}))},73729:function(e,t,a){a.d(t,{i:()=>m});var i=a(44249),n=a(72621),o=a(74966),l=a(51408),d=a(57243),r=a(15093),c=a(76525);a(23334);const s=["button","ha-list-item"],m=(e,t)=>d.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,i.Z)([(0,r.Mo)("ha-dialog")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",key:c.gA,value:void 0},{kind:"method",key:"scrollToPos",value:function(e,t){this.contentElement?.scrollTo(e,t)}},{kind:"method",key:"renderHeading",value:function(){return d.dy`<slot name="heading"> ${(0,n.Z)(a,"renderHeading",this,3)([])} </slot>`}},{kind:"method",key:"firstUpdated",value:function(){(0,n.Z)(a,"firstUpdated",this,3)([]),this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,s].join(", "),this._updateScrolledAttribute(),this.contentElement?.addEventListener("scroll",this._onScroll,{passive:!0})}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(a,"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:()=>[l.W,d.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)}`]}]}}),o.M)},94223:function(e,t,a){a.a(e,(async function(e,i){try{a.r(t);var n=a(44249),o=a(57243),l=a(15093),d=a(64214),r=a(36522),c=(a(99426),a(59826),a(23334),a(73729)),s=a(28008),m=a(11225),u=e([d]);d=(u.then?(await u)():u)[0];const g="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",h="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";(0,n.Z)([(0,l.Mo)("dialog-cloud-already-connected")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",key:"hass",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,l.SB)()],key:"_obfuscateIp",value:()=>!0},{kind:"method",key:"showDialog",value:function(e){this._params=e}},{kind:"method",key:"closeDialog",value:function(){this._params?.closeDialog?.(),this._params=void 0,this._obfuscateIp=!0,(0,r.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){if(!this._params)return o.Ld;const{details:e}=this._params;return o.dy` <ha-dialog open @closed="${this.closeDialog}" .heading="${(0,c.i)(this.hass,this.hass.localize("ui.panel.config.cloud.dialog_already_connected.heading"))}"> <div class="intro"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.description")} </span> <b> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.other_home_assistant")} </b> </div> <div class="instance-details"> ${e.name?o.dy`<div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.instance_name")}: </span> <span>${e.name}</span> </div>`:o.Ld} ${e.version?o.dy`<div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.instance_version")}: </span> <span>${e.version}</span> </div>`:o.Ld} <div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.ip_address")}: </span> <div class="obfuscated"> <span> ${this._obfuscateIp?(0,m.t)(e.remote_ip_address):e.remote_ip_address} </span> <ha-icon-button class="toggle-unmasked-url" .label="${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.obfuscated_ip."+(this._obfuscateIp?"hide":"show"))}" @click="${this._toggleObfuscateIp}" .path="${this._obfuscateIp?g:h}"></ha-icon-button> </div> </div> <div class="instance-detail"> <span> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.connected_at")}: </span> <span> ${(0,d.o0)(new Date(e.connected_at),this.hass.locale,this.hass.config)} </span> </div> </div> <ha-alert alert-type="info" .title="${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.info_backups.title")}"> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.info_backups.description")} </ha-alert> <ha-button @click="${this.closeDialog}" slot="secondaryAction"> ${this.hass.localize("ui.common.cancel")} </ha-button> <ha-button @click="${this._logInHere}" slot="primaryAction"> ${this.hass.localize("ui.panel.config.cloud.dialog_already_connected.login_here")} </ha-button> </ha-dialog> `}},{kind:"method",key:"_toggleObfuscateIp",value:function(){this._obfuscateIp=!this._obfuscateIp}},{kind:"method",key:"_logInHere",value:function(){this._params?.logInHereAction?.(),this.closeDialog()}},{kind:"get",static:!0,key:"styles",value:function(){return[s.yu,o.iv`ha-dialog{--mdc-dialog-max-width:535px}.intro b{display:block;margin-top:16px}.instance-details{display:flex;flex-direction:column;margin-bottom:16px}.instance-detail{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.obfuscated{align-items:center;display:flex;flex-direction:row}`]}}]}}),o.oi);i()}catch(e){i(e)}}))},11225:function(e,t,a){function i(e){return e.endsWith(".ui.nabu.casa")?"https://•••••••••••••••••.ui.nabu.casa":e.replace(/(?<=:\/\/)[\w-]+|(?<=\.)[\w-]+/g,(e=>"•".repeat(e.length)))}a.d(t,{t:()=>i})}}; //# sourceMappingURL=39027.18bf70cbe21226bb.js.map