UNPKG

iobroker.lovelace

Version:

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

2 lines 16.2 kB
/*! For license information please see 49946.1cc5e045ad223e4a.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[49946],{77957:function(e,t,a){var r=a(76080),o=a(79504),i=a(47055),s=a(48981),n=a(56969),l=a(26198),d=a(2360),c=a(35370),u=Array,h=o([].push);e.exports=function(e,t,a,o){for(var p,f,g,v=s(e),m=i(v),w=r(t,a),b=d(null),y=l(m),x=0;y>x;x++)g=m[x],(f=n(w(g,x,v)))in b?h(b[f],g):b[f]=[g];if(o&&(p=o(v))!==u)for(f in b)b[f]=c(p,b[f]);return b}},46058:function(e,t,a){var r=a(46518),o=a(77957),i=a(6469);r({target:"Array",proto:!0},{group:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("group")},93900:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(27495),a(62953);var r=a(5124),o=a(67576),i=a(6412),s=a(63672),n=a(17051),l=a(42462),d=a(28438),c=a(98779),u=a(27259),h=a(25877),p=a(31247),f=a(4444),g=a(92070),v=a(9395),m=a(717),w=a(17060),b=a(88496),y=a(91470),x=e([b,w]);[b,w]=x.then?(await x)():x;let A,L,E,M=e=>e;var k=Object.defineProperty,C=Object.getOwnPropertyDescriptor,D=(e,t,a,r)=>{for(var o,i=r>1?void 0:r?C(t,a):t,s=e.length-1;s>=0;s--)(o=e[s])&&(i=(r?o(t,a,i):o(i))||i);return r&&i&&k(t,a,i),i};let O=class extends m.A{firstUpdated(){this.open&&(this.addOpenListeners(),this.dialog.showModal(),(0,f.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,f.I7)(this),this.removeOpenListeners()}async requestClose(e){const t=new d.L({source:e});if(this.dispatchEvent(t),t.defaultPrevented)return this.open=!0,void(0,u.Ud)(this.dialog,"pulse");this.removeOpenListeners(),await(0,u.Ud)(this.dialog,"hide"),this.open=!1,this.dialog.close(),(0,f.I7)(this);const a=this.originalTrigger;"function"==typeof(null==a?void 0:a.focus)&&setTimeout(()=>a.focus()),this.dispatchEvent(new n.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,h.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,h.Fw)(this)}handleDialogCancel(e){e.preventDefault(),!this.dialog.classList.contains("hide")&&e.target===this.dialog&&(0,h.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(e){const t=e.target.closest('[data-dialog="close"]');t&&(e.stopPropagation(),this.requestClose(t))}async handleDialogPointerDown(e){e.target===this.dialog&&(this.lightDismiss?this.requestClose(this.dialog):await(0,u.Ud)(this.dialog,"pulse"))}handleOpenChange(){this.open&&!this.dialog.open?this.show():!this.open&&this.dialog.open&&(this.open=!0,this.requestClose(this.dialog))}async show(){const e=new c.k;this.dispatchEvent(e),e.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,f.JG)(this),requestAnimationFrame(()=>{const e=this.querySelector("[autofocus]");e&&"function"==typeof e.focus?e.focus():this.dialog.focus()}),await(0,u.Ud)(this.dialog,"show"),this.dispatchEvent(new l.q))}render(){var e;const t=!this.withoutHeader,a=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return(0,r.qy)(A||(A=M` <dialog aria-labelledby="${0}" aria-describedby="${0}" part="dialog" class="${0}" @cancel="${0}" @click="${0}" @pointerdown="${0}"> ${0} <div part="body" class="body"><slot></slot></div> ${0} </dialog> `),null!==(e=this.ariaLabelledby)&&void 0!==e?e:"title",(0,s.J)(this.ariaDescribedby),(0,i.H)({dialog:!0,open:this.open}),this.handleDialogCancel,this.handleDialogClick,this.handleDialogPointerDown,t?(0,r.qy)(L||(L=M` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${0} </slot> </h2> <div part="header-actions" class="header-actions"> <slot name="header-actions"></slot> <wa-button part="close-button" exportparts="base:close-button__base" class="close" appearance="plain" @click="${0}"> <wa-icon name="xmark" label="${0}" library="system" variant="solid"></wa-icon> </wa-button> </div> </header> `),this.label.length>0?this.label:String.fromCharCode(8203),e=>this.requestClose(e.target),this.localize.term("close")):"",a?(0,r.qy)(E||(E=M` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `)):"")}constructor(){super(...arguments),this.localize=new w.c(this),this.hasSlotController=new g.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.withoutHeader=!1,this.lightDismiss=!1,this.withFooter=!1,this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.open&&(0,h.a0)(this)&&(e.preventDefault(),e.stopPropagation(),this.requestClose(this.dialog))}}};O.css=y.A,D([(0,o.P)(".dialog")],O.prototype,"dialog",2),D([(0,o.MZ)({type:Boolean,reflect:!0})],O.prototype,"open",2),D([(0,o.MZ)({reflect:!0})],O.prototype,"label",2),D([(0,o.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],O.prototype,"withoutHeader",2),D([(0,o.MZ)({attribute:"light-dismiss",type:Boolean})],O.prototype,"lightDismiss",2),D([(0,o.MZ)({attribute:"aria-labelledby"})],O.prototype,"ariaLabelledby",2),D([(0,o.MZ)({attribute:"aria-describedby"})],O.prototype,"ariaDescribedby",2),D([(0,o.MZ)({attribute:"with-footer",type:Boolean})],O.prototype,"withFooter",2),D([(0,v.w)("open",{waitUntilFirstUpdate:!0})],O.prototype,"handleOpenChange",1),O=D([(0,o.EM)("wa-dialog")],O),r.S$||(document.addEventListener("click",e=>{const t=e.target.closest("[data-dialog]");if(t instanceof Element){const[e,a]=(0,p.v)(t.getAttribute("data-dialog")||"");if("open"===e&&null!=a&&a.length){const e=t.getRootNode().getElementById(a);"wa-dialog"===(null==e?void 0:e.localName)?e.open=!0:console.warn(`A dialog with an ID of "${a}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),t()}catch(A){t(A)}})},91470:function(e,t,a){a.d(t,{A:function(){return o}});let r;var o=(0,a(5124).AH)(r||(r=(e=>e)`:host{--width:31rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:200ms;--hide-duration:200ms;display:none}:host([open]){display:block}.dialog{display:flex;flex-direction:column;top:0;right:0;bottom:0;left:0;width:var(--width);max-width:calc(100% - var(--wa-space-2xl));max-height:calc(100% - var(--wa-space-2xl));color:inherit;background-color:var(--wa-color-surface-raised);border-radius:var(--wa-panel-border-radius);border:none;box-shadow:var(--wa-shadow-l);padding:0;margin:auto}.dialog.show{animation:show-dialog var(--show-duration) ease}.dialog.show::backdrop{animation:show-backdrop var(--show-duration,200ms) ease}.dialog.hide{animation:show-dialog var(--hide-duration) ease reverse}.dialog.hide::backdrop{animation:show-backdrop var(--hide-duration,200ms) ease reverse}.dialog.pulse{animation:pulse 250ms ease}.dialog:focus{outline:0}@media screen and (max-width:420px){.dialog{max-height:80vh}}.open{display:flex;opacity:1}.header{flex:0 0 auto;display:flex;flex-wrap:nowrap;padding-inline-start:var(--spacing);padding-block-end:0;padding-inline-end:calc(var(--spacing) - var(--wa-form-control-padding-block));padding-block-start:calc(var(--spacing) - var(--wa-form-control-padding-block))}.title{align-self:center;flex:1 1 auto;font-family:inherit;font-size:var(--wa-font-size-l);font-weight:var(--wa-font-weight-heading);line-height:var(--wa-line-height-condensed);margin:0}.header-actions{align-self:start;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:end;gap:var(--wa-space-2xs);padding-inline-start:var(--spacing)}.header-actions ::slotted(wa-button),.header-actions wa-button{flex:0 0 auto;display:flex;align-items:center}.body{flex:1 1 auto;display:block;padding:var(--spacing);overflow:auto;-webkit-overflow-scrolling:touch}.body:focus{outline:0}.body:focus-visible{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.footer{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:var(--wa-space-xs);justify-content:end;padding:var(--spacing);padding-block-start:0}.footer ::slotted(wa-button:not(:first-of-type)){margin-inline-start:var(--wa-spacing-xs)}.dialog::backdrop{background-color:var(--wa-color-overlay-modal,rgb(0 0 0 / .25));-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)}@keyframes pulse{0%{scale:1}50%{scale:1.02}100%{scale:1}}@keyframes show-dialog{from{opacity:0;scale:0.8}to{opacity:1;scale:1}}@keyframes show-backdrop{from{opacity:0}to{opacity:1}}@media (forced-colors:active){.dialog{border:solid 1px #fff}}`))},75275:function(e,t,a){var r=a(40445),o=a(67576),i=(a(89463),a(62953),a(5124)),s=a(76482);const n=["focusin","focusout","pointerdown"];class l extends i.WF{get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){var t,a;if(!e[d]){switch(e.type){default:return;case"focusin":this.visible=null!==(t=null===(a=this.control)||void 0===a?void 0:a.matches(":focus-visible"))&&void 0!==t&&t;break;case"focusout":case"pointerdown":this.visible=!1}e[d]=!0}}onControlChange(e,t){if(!i.S$)for(const a of n)null==e||e.removeEventListener(a,this),null==t||t.addEventListener(a,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new s.i(this,this.onControlChange.bind(this))}}(0,r.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],l.prototype,"visible",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,reflect:!0})],l.prototype,"inward",void 0);const d=Symbol("handledByFocusRing");let c;const u=(0,i.AH)(c||(c=(e=>e)`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2,0,0,1);box-sizing:border-box;color:var(--md-focus-ring-color,var(--md-sys-color-secondary,#625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) + var(--md-focus-ring-outward-offset,2px));inset:calc(-1*var(--md-focus-ring-outward-offset,2px));outline:var(--md-focus-ring-width,3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start,var(--md-focus-ring-shape,var(--md-sys-shape-corner-full,9999px))) - var(--md-focus-ring-inward-offset,0px));border:var(--md-focus-ring-width,3px) solid currentColor;inset:var(--md-focus-ring-inward-offset,0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width,8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width,8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width,8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width,8px)}}@media(prefers-reduced-motion){:host{animation:none}}`));let h=class extends l{};h.styles=[u],h=(0,r.Cg)([(0,o.EM)("md-focus-ring")],h)},1024:function(e,t,a){a.d(t,{n:function(){return d}});a(89463),a(27495),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(25440),a(62953);var r=a(5124);a(74423);const o=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],i=o.map(n);function s(e){return i.includes(e)}function n(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const l=Symbol("privateIgnoreAttributeChangesFor");function d(e){var t;if(r.S$)return e;class a extends e{attributeChangedCallback(e,t,a){if(!s(e))return void super.attributeChangedCallback(e,t,a);if(this[l].has(e))return;this[l].add(e),this.removeAttribute(e),this[l].delete(e);const r=u(e);null===a?delete this.dataset[r]:this.dataset[r]=a,this.requestUpdate(u(e),t)}getAttribute(e){return s(e)?super.getAttribute(c(e)):super.getAttribute(e)}removeAttribute(e){super.removeAttribute(e),s(e)&&(super.removeAttribute(c(e)),this.requestUpdate())}constructor(){super(...arguments),this[t]=new Set}}return t=l,function(e){for(const t of o){const a=n(t),r=c(a),o=u(a);e.createProperty(t,{attribute:a,noAccessor:!0}),e.createProperty(Symbol(r),{attribute:r,noAccessor:!0}),Object.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get(){var e;return null!==(e=this.dataset[o])&&void 0!==e?e:null},set(e){var a;const r=null!==(a=this.dataset[o])&&void 0!==a?a:null;e!==r&&(null===e?delete this.dataset[o]:this.dataset[o]=e,this.requestUpdate(t,r))}})}}(a),a}function c(e){return`data-${e}`}function u(e){return e.replace(/-\w/,e=>e[1].toUpperCase())}},71970:function(e,t,a){var r=a(40445),o=a(67576),i=a(91382),s=a(96245);let n=class extends i.n{};n.styles=[s.R],n=(0,r.Cg)([(0,o.EM)("md-ripple")],n)},54495:function(e,t,a){a.d(t,{OA:function(){return r.OA},WL:function(){return r.WL},u$:function(){return r.u$}});var r=a(42017)},75751:function(e,t,a){a.d(t,{u:function(){return n}});a(16280),a(45367),a(92731),a(62953);var r=a(5055),o=a(42017),i=a(63937);const s=(e,t,a)=>{const r=new Map;for(let o=t;o<=a;o++)r.set(e[o],o);return r},n=(0,o.u$)(class extends o.WL{dt(e,t,a){let r;void 0===a?a=t:void 0!==t&&(r=t);const o=[],i=[];let s=0;for(const n of e)o[s]=r?r(n,s):s,i[s]=a(n,s),s++;return{values:i,keys:o}}render(e,t,a){return this.dt(e,t,a).values}update(e,[t,a,o]){var n;const l=(0,i.cN)(e),{values:d,keys:c}=this.dt(t,a,o);if(!Array.isArray(l))return this.ut=c,d;const u=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],h=[];let p,f,g=0,v=l.length-1,m=0,w=d.length-1;for(;g<=v&&m<=w;)if(null===l[g])g++;else if(null===l[v])v--;else if(u[g]===c[m])h[m]=(0,i.lx)(l[g],d[m]),g++,m++;else if(u[v]===c[w])h[w]=(0,i.lx)(l[v],d[w]),v--,w--;else if(u[g]===c[w])h[w]=(0,i.lx)(l[g],d[w]),(0,i.Dx)(e,h[w+1],l[g]),g++,w--;else if(u[v]===c[m])h[m]=(0,i.lx)(l[v],d[m]),(0,i.Dx)(e,l[g],l[v]),v--,m++;else if(void 0===p&&(p=s(c,m,w),f=s(u,g,v)),p.has(u[g]))if(p.has(u[v])){const t=f.get(c[m]),a=void 0!==t?l[t]:null;if(null===a){const t=(0,i.Dx)(e,l[g]);(0,i.lx)(t,d[m]),h[m]=t}else h[m]=(0,i.lx)(a,d[m]),(0,i.Dx)(e,l[g],a),l[t]=null;m++}else(0,i.KO)(l[v]),v--;else(0,i.KO)(l[g]),g++;for(;m<=w;){const t=(0,i.Dx)(e,h[w+1]);(0,i.lx)(t,d[m]),h[m++]=t}for(;g<=v;){const e=l[g++];null!==e&&(0,i.KO)(e)}return this.ut=c,(0,i.mY)(e,h),r.c0}constructor(e){if(super(e),e.type!==o.OA.CHILD)throw Error("repeat() can only be used in text expressions")}})}}]);