UNPKG

iobroker.lovelace

Version:

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

17 lines 20.8 kB
/*! For license information please see 82201.3cd2f20af7affd4a.js.LICENSE.txt */ export const __rspack_esm_id=82201;export const __rspack_esm_ids=[82201];export const __webpack_modules__={93900(t,e,i){i.a(t,async function(t,e){try{var o=i(5124),s=i(22441),a=i(6412),r=i(63672),l=i(17051),n=i(42462),d=i(28438),c=i(98779),p=i(27259),h=i(25877),m=i(31247),u=i(4444),g=i(92070),f=i(9395),y=i(717),v=i(17060),b=i(88496),w=i(91470),x=t([b,v]);[b,v]=x.then?(await x)():x;var k=Object.defineProperty,C=Object.getOwnPropertyDescriptor,$=(t,e,i,o)=>{for(var s,a=o>1?void 0:o?C(e,i):e,r=t.length-1;r>=0;r--)(s=t[r])&&(a=(o?s(e,i,a):s(a))||a);return o&&a&&k(e,i,a),a};let E=class extends y.A{firstUpdated(){this.open&&(this.addOpenListeners(),this.dialog.showModal(),(0,u.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,u.I7)(this),this.removeOpenListeners()}async requestClose(t){const e=new d.L({source:t});if(this.dispatchEvent(e),e.defaultPrevented)return this.open=!0,void(0,p.Ud)(this.dialog,"pulse");this.removeOpenListeners(),await(0,p.Ud)(this.dialog,"hide"),this.open=!1,this.dialog.close(),(0,u.I7)(this);const i=this.originalTrigger;"function"==typeof i?.focus&&setTimeout(()=>i.focus()),this.dispatchEvent(new l.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,h.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,h.Fw)(this)}handleDialogCancel(t){t.preventDefault(),!this.dialog.classList.contains("hide")&&t.target===this.dialog&&(0,h.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(t){const e=t.target.closest('[data-dialog="close"]');e&&(t.stopPropagation(),this.requestClose(e))}async handleDialogPointerDown(t){t.target===this.dialog&&(this.lightDismiss?this.requestClose(this.dialog):await(0,p.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 t=new c.k;this.dispatchEvent(t),t.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,u.JG)(this),requestAnimationFrame(()=>{const t=this.querySelector("[autofocus]");t&&"function"==typeof t.focus?t.focus():this.dialog.focus()}),await(0,p.Ud)(this.dialog,"show"),this.dispatchEvent(new n.q))}render(){const t=!this.withoutHeader,e=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return o.qy` <dialog aria-labelledby="${this.ariaLabelledby??"title"}" aria-describedby="${(0,r.J)(this.ariaDescribedby)}" part="dialog" class="${(0,a.H)({dialog:!0,open:this.open})}" @cancel="${this.handleDialogCancel}" @click="${this.handleDialogClick}" @pointerdown="${this.handleDialogPointerDown}"> ${t?o.qy` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(8203)} </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="${t=>this.requestClose(t.target)}"> <wa-icon name="xmark" label="${this.localize.term("close")}" library="system" variant="solid"></wa-icon> </wa-button> </div> </header> `:""} <div part="body" class="body"><slot></slot></div> ${e?o.qy` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `:""} </dialog> `}constructor(){super(...arguments),this.localize=new v.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=t=>{"Escape"===t.key&&this.open&&(0,h.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.requestClose(this.dialog))}}};E.css=w.A,$([(0,s.P)(".dialog")],E.prototype,"dialog",2),$([(0,s.MZ)({type:Boolean,reflect:!0})],E.prototype,"open",2),$([(0,s.MZ)({reflect:!0})],E.prototype,"label",2),$([(0,s.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],E.prototype,"withoutHeader",2),$([(0,s.MZ)({attribute:"light-dismiss",type:Boolean})],E.prototype,"lightDismiss",2),$([(0,s.MZ)({attribute:"aria-labelledby"})],E.prototype,"ariaLabelledby",2),$([(0,s.MZ)({attribute:"aria-describedby"})],E.prototype,"ariaDescribedby",2),$([(0,s.MZ)({attribute:"with-footer",type:Boolean})],E.prototype,"withFooter",2),$([(0,f.w)("open",{waitUntilFirstUpdate:!0})],E.prototype,"handleOpenChange",1),E=$([(0,s.EM)("wa-dialog")],E),o.S$||(document.addEventListener("click",t=>{const e=t.target.closest("[data-dialog]");if(e instanceof Element){const[t,i]=(0,m.v)(e.getAttribute("data-dialog")||"");if("open"===t&&i?.length){const t=e.getRootNode().getElementById(i);"wa-dialog"===t?.localName?t.open=!0:console.warn(`A dialog with an ID of "${i}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),e()}catch(t){e(t)}})},91470(t,e,i){i.d(e,{A:()=>o});var o=i(5124).AH`: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}}`},31247(t,e,i){i.d(e,{v:()=>o});i(18111),i(22489),i(61701);function o(t){return t.split(" ").map(t=>t.trim()).filter(t=>""!==t)}},4444(t,e,i){i.d(e,{JG:()=>s,Rt:()=>r,I7:()=>a});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);const o=new Set;function s(t){if(o.add(t),!document.documentElement.classList.contains("wa-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}()+function(){const t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}();let e=getComputedStyle(document.documentElement).scrollbarGutter;e&&"auto"!==e||(e="stable"),t<2&&(e=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",e),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${t}px`)}}function a(t){o.delete(t),0===o.size&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function r(t,e,i="vertical",o="smooth"){const s=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),a=s.top+e.scrollTop,r=s.left+e.scrollLeft,l=e.scrollLeft,n=e.scrollLeft+e.offsetWidth,d=e.scrollTop,c=e.scrollTop+e.offsetHeight;"horizontal"!==i&&"both"!==i||(r<l?e.scrollTo({left:r,behavior:o}):r+t.clientWidth>n&&e.scrollTo({left:r-e.offsetWidth+t.clientWidth,behavior:o})),"vertical"!==i&&"both"!==i||(a<d?e.scrollTo({top:a,behavior:o}):a+t.clientHeight>c&&e.scrollTo({top:a-e.offsetHeight+t.clientHeight,behavior:o}))}},27525(t,e,i){function o(t,e=m){const i=l(t,e);return i&&(i.tabIndex=0,i.focus()),i}function s(t,e=m){const i=n(t,e);return i&&(i.tabIndex=0,i.focus()),i}function a(t,e=m){const i=r(t,e);return i&&(i.item.tabIndex=-1),i}function r(t,e=m){for(let i=0;i<t.length;i++){const o=t[i];if(0===o.tabIndex&&e(o))return{item:o,index:i}}return null}function l(t,e=m){for(const i of t)if(e(i))return i;return null}function n(t,e=m){for(let i=t.length-1;i>=0;i--){const o=t[i];if(e(o))return o}return null}function d(t,e,i=m,s=!0){if(e){const o=function(t,e,i=m,o=!0){for(let s=1;s<t.length;s++){const a=(s+e)%t.length;if(a<e&&!o)return null;const r=t[a];if(i(r))return r}return t[e]?t[e]:null}(t,e.index,i,s);return o&&(o.tabIndex=0,o.focus()),o}return o(t,i)}function c(t,e,i=m,o=!0){if(e){const s=function(t,e,i=m,o=!0){for(let s=1;s<t.length;s++){const a=(e-s+t.length)%t.length;if(a>e&&!o)return null;const r=t[a];if(i(r))return r}return t[e]?t[e]:null}(t,e.index,i,o);return s&&(s.tabIndex=0,s.focus()),s}return s(t,i)}function p(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function h(){return new Event("request-activation",{bubbles:!0,composed:!0})}function m(t){return!t.disabled}i.d(e,{A6:()=>r,Ex:()=>n,RN:()=>p,RZ:()=>s,c7:()=>l,cG:()=>h,u9:()=>c,ub:()=>a,wm:()=>d,zT:()=>o})},82553(t,e,i){i.d(e,{R:()=>o});const o=i(5124).AH`:host{display:flex;-webkit-tap-highlight-color:transparent;--md-ripple-hover-color:var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity:var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color:var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity:var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape:8px}a,button,li{background:0 0;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:0;-webkit-tap-highlight-color:transparent;width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, .3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color,var(--md-sys-color-on-surface,#1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight,var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400)));min-height:var(--md-list-item-one-line-container-height,56px);padding-top:var(--md-list-item-top-space,12px);padding-bottom:var(--md-list-item-bottom-space,12px);padding-inline-start:var(--md-list-item-leading-space,16px);padding-inline-end:var(--md-list-item-trailing-space,16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height,72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, .875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight,var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, .6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight,var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}@media(forced-colors:active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}`},58168(t,e,i){i.d(e,{n:()=>g});var o=i(62826),s=(i(75275),i(22441)),a=i(5124);class r extends a.WF{render(){return a.qy` <slot name="container"></slot> <slot class="non-text" name="start"></slot> <div class="text"> <slot name="overline" @slotchange="${this.handleTextSlotChange}"></slot> <slot class="default-slot" @slotchange="${this.handleTextSlotChange}"></slot> <slot name="headline" @slotchange="${this.handleTextSlotChange}"></slot> <slot name="supporting-text" @slotchange="${this.handleTextSlotChange}"></slot> </div> <slot class="non-text" name="trailing-supporting-text"></slot> <slot class="non-text" name="end"></slot> `}handleTextSlotChange(){let t=!1,e=0;for(const i of this.textSlots)if(l(i)&&(e+=1),e>1){t=!0;break}this.multiline=t}constructor(){super(...arguments),this.multiline=!1}}function l(t){for(const e of t.assignedNodes({flatten:!0})){const t=e.nodeType===Node.ELEMENT_NODE,i=e.nodeType===Node.TEXT_NODE&&e.textContent?.match(/\S/);if(t||i)return!0}return!1}(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],r.prototype,"multiline",void 0),(0,o.Cg)([(0,s.YG)(".text slot")],r.prototype,"textSlots",void 0);const n=a.AH`:host{color:var(--md-sys-color-on-surface,#1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, .875rem);font-weight:var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}`;let d=class extends r{};d.styles=[n],d=(0,o.Cg)([(0,s.EM)("md-item")],d);i(71970);var c=i(6412),p=i(7872),h=i(1024),m=i(27525);const u=(0,h.n)(a.WF);class g extends u{get isDisabled(){return this.disabled&&"link"!==this.type}willUpdate(t){this.href&&(this.type="link"),super.willUpdate(t)}render(){return this.renderListItem(a.qy` <md-item> <div slot="container"> ${this.renderRipple()} ${this.renderFocusRing()} </div> <slot name="start" slot="start"></slot> <slot name="end" slot="end"></slot> ${this.renderBody()} </md-item> `)}renderListItem(t){const e="link"===this.type;let i;switch(this.type){case"link":i=p.eu`a`;break;case"button":i=p.eu`button`;break;default:i=p.eu`li`}const o="text"!==this.type,s=e&&this.target?this.target:a.s6;return p.qy` <${i} id="item" tabindex="${this.isDisabled||!o?-1:0}" ?disabled=${this.isDisabled} role="listitem" aria-selected=${this.ariaSelected||a.s6} aria-checked=${this.ariaChecked||a.s6} aria-expanded=${this.ariaExpanded||a.s6} aria-haspopup=${this.ariaHasPopup||a.s6} class="list-item ${(0,c.H)(this.getRenderClasses())}" href=${this.href||a.s6} target=${s} @focus=${this.onFocus} >${t}</${i}> `}renderRipple(){return"text"===this.type?a.s6:a.qy` <md-ripple part="ripple" for="item" ?disabled="${this.isDisabled}"></md-ripple>`}renderFocusRing(){return"text"===this.type?a.s6:a.qy` <md-focus-ring @visibility-changed="${this.onFocusRingVisibilityChanged}" part="focus-ring" for="item" inward></md-focus-ring>`}onFocusRingVisibilityChanged(t){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return a.qy` <slot></slot> <slot name="overline" slot="overline"></slot> <slot name="headline" slot="headline"></slot> <slot name="supporting-text" slot="supporting-text"></slot> <slot name="trailing-supporting-text" slot="trailing-supporting-text"></slot> `}onFocus(){-1===this.tabIndex&&this.dispatchEvent((0,m.cG)())}focus(){this.listItemRoot?.focus()}click(){this.listItemRoot?this.listItemRoot.click():super.click()}constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}}g.shadowRootOptions={...a.WF.shadowRootOptions,delegatesFocus:!0},(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],g.prototype,"disabled",void 0),(0,o.Cg)([(0,s.MZ)({reflect:!0})],g.prototype,"type",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"md-list-item",reflect:!0})],g.prototype,"isListItem",void 0),(0,o.Cg)([(0,s.MZ)()],g.prototype,"href",void 0),(0,o.Cg)([(0,s.MZ)()],g.prototype,"target",void 0),(0,o.Cg)([(0,s.P)(".list-item")],g.prototype,"listItemRoot",void 0)},95192(t,e,i){i.d(e,{IU:()=>d,Jt:()=>l,Yd:()=>o,hZ:()=>n,y$:()=>s});i(44114),i(18111),i(7588),i(61701);function o(t){return new Promise((e,i)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>i(t.error)})}function s(t,e){let i;return(s,a)=>(()=>{if(i)return i;const s=indexedDB.open(t);return s.onupgradeneeded=()=>s.result.createObjectStore(e),i=o(s),i.then(t=>{t.onclose=()=>i=void 0},()=>{}),i})().then(t=>a(t.transaction(e,s).objectStore(e)))}let a;function r(){return a||(a=s("keyval-store","keyval")),a}function l(t,e=r()){return e("readonly",e=>o(e.get(t)))}function n(t,e,i=r()){return i("readwrite",i=>(i.put(e,t),o(i.transaction)))}function d(t=r()){return t("readwrite",t=>(t.clear(),o(t.transaction)))}}};