@e280/sly 0.2.0-27 → 0.2.0-28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -294,10 +294,9 @@ import {html, css} from "lit"
294
294
  })
295
295
  ```
296
296
  - **use.attrs** — ergonomic typed html attribute access
297
- - `use.attrs` is a bit different than [#dom.attrs](#dom.attrs), just to properly memoize .spec and .on for the render fn
298
- - use.attrs.spec
297
+ - `use.attrs` is similar to [#dom.attrs](#dom.attrs)
299
298
  ```ts
300
- const attrs = use.attrs.spec({
299
+ const attrs = use.attrs({
301
300
  name: String,
302
301
  count: Number,
303
302
  active: Boolean,
@@ -308,7 +307,7 @@ import {html, css} from "lit"
308
307
  attrs.count // 123
309
308
  attrs.active // true
310
309
  ```
311
- - use.attrs.(strings/numbers/booleans)
310
+ - use.attrs.{strings/numbers/booleans}
312
311
  ```ts
313
312
  use.attrs.strings.name // "chase"
314
313
  use.attrs.numbers.count // 123
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e280/sly",
3
- "version": "0.2.0-27",
3
+ "version": "0.2.0-28",
4
4
  "description": "web shadow views",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/s/base/use.ts CHANGED
@@ -5,9 +5,9 @@ import {signal, SignalOptions} from "@e280/strata/signals"
5
5
 
6
6
  import {Op} from "../ops/op.js"
7
7
  import {Mounts} from "./utils/mounts.js"
8
- import {UseAttrs} from "./utils/use-attrs.js"
8
+ import {eve, EveSpec} from "../dom/parts/eve.js"
9
9
  import {applyStyles} from "./utils/apply-styles.js"
10
- import { eve, EveSpec } from "../dom/parts/eve.js"
10
+ import {useAttrs, UseAttrs} from "./utils/use-attrs.js"
11
11
 
12
12
  export const _wrap = Symbol()
13
13
  export const _disconnect = Symbol()
@@ -45,7 +45,7 @@ export class Use {
45
45
  public renderNow: () => void,
46
46
  public render: () => Promise<void>,
47
47
  ) {
48
- this.attrs = new UseAttrs(this)
48
+ this.attrs = useAttrs(this)
49
49
  }
50
50
 
51
51
  get renderCount() {
@@ -1,27 +1,36 @@
1
1
 
2
2
  import {Use} from "../use.js"
3
3
  import {dom} from "../../dom/dom.js"
4
- import {Attrs, AttrSpec} from "../../dom/types.js"
4
+ import {AttrSpec, AttrTypes} from "../../dom/types.js"
5
5
 
6
- export class UseAttrs {
7
- #use: Use
8
- #attrs: Attrs
6
+ export type UseAttrs = {
7
+ <A extends AttrSpec>(spec: A): AttrTypes<A>
8
+ strings: Record<string, undefined | string>
9
+ numbers: Record<string, undefined | number>
10
+ booleans: Record<string, undefined | boolean>
11
+ spec<A extends AttrSpec>(spec: A): AttrTypes<A>
12
+ on(fn: () => void): void
13
+ }
14
+
15
+ export function useAttrs(use: Use): UseAttrs {
16
+ const attrs = dom.attrs(use.element)
9
17
 
10
- constructor(use: Use) {
11
- this.#use = use
12
- this.#attrs = dom.attrs(use.element)
18
+ function attrsFn<A extends AttrSpec>(spec: A) {
19
+ return use.once(() => attrs.spec<A>(spec))
13
20
  }
14
21
 
15
- get strings() { return this.#attrs.strings }
16
- get numbers() { return this.#attrs.numbers }
17
- get booleans() { return this.#attrs.booleans }
22
+ attrsFn.strings = attrs.strings
23
+ attrsFn.numbers = attrs.numbers
24
+ attrsFn.booleans = attrs.booleans
18
25
 
19
- spec<A extends AttrSpec>(spec: A) {
20
- return this.#use.once(() => this.#attrs.spec(spec))
26
+ attrsFn.spec = <A extends AttrSpec>(spec: A) => {
27
+ return use.once(() => attrs.spec<A>(spec))
21
28
  }
22
29
 
23
- on(fn: () => void) {
24
- return this.#use.mount(() => this.#attrs.on(fn))
30
+ attrsFn.on = (fn: () => void) => {
31
+ return use.mount(() => attrs.on(fn))
25
32
  }
33
+
34
+ return attrsFn
26
35
  }
27
36
 
package/x/base/use.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { CSSResultGroup } from "lit";
2
2
  import { SignalOptions } from "@e280/strata/signals";
3
3
  import { Op } from "../ops/op.js";
4
- import { UseAttrs } from "./utils/use-attrs.js";
5
4
  import { EveSpec } from "../dom/parts/eve.js";
5
+ import { UseAttrs } from "./utils/use-attrs.js";
6
6
  export declare const _wrap: unique symbol;
7
7
  export declare const _disconnect: unique symbol;
8
8
  export declare const _reconnect: unique symbol;
package/x/base/use.js CHANGED
@@ -2,9 +2,9 @@ import { defer, MapG } from "@e280/stz";
2
2
  import { signal } from "@e280/strata/signals";
3
3
  import { Op } from "../ops/op.js";
4
4
  import { Mounts } from "./utils/mounts.js";
5
- import { UseAttrs } from "./utils/use-attrs.js";
6
- import { applyStyles } from "./utils/apply-styles.js";
7
5
  import { eve } from "../dom/parts/eve.js";
6
+ import { applyStyles } from "./utils/apply-styles.js";
7
+ import { useAttrs } from "./utils/use-attrs.js";
8
8
  export const _wrap = Symbol();
9
9
  export const _disconnect = Symbol();
10
10
  export const _reconnect = Symbol();
@@ -40,7 +40,7 @@ export class Use {
40
40
  this.shadow = shadow;
41
41
  this.renderNow = renderNow;
42
42
  this.render = render;
43
- this.attrs = new UseAttrs(this);
43
+ this.attrs = useAttrs(this);
44
44
  }
45
45
  get renderCount() {
46
46
  return this.#runs;
package/x/base/use.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"use.js","sourceRoot":"","sources":["../../s/base/use.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACrC,OAAO,EAAC,MAAM,EAAgB,MAAM,sBAAsB,CAAA;AAE1D,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAA;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAW,MAAM,qBAAqB,CAAA;AAElD,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,EAAE,CAAA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,CAAA;QACjE,OAAO,EAAE,CAAA;IACV,CAAC,CAAC,EAAE,CAAA;IAEJ,MAAM,GAAG,CAAC,GAAG,EAAE;QACd,MAAM,IAAI,GAAG,IAAI,CAAA;QACjB,SAAS,GAAG,CAAI,KAAQ,EAAE,OAAgC;YACzD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAI,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;QAClD,CAAC;QACD,GAAG,CAAC,OAAO,GAAG,SAAS,OAAO,CAAI,OAAgB,EAAE,OAAgC;YACnF,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAI,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;QAC5D,CAAC,CAAA;QACD,GAAG,CAAC,IAAI,GAAG,SAAS,IAAI,CAAI,OAAgB,EAAE,OAAgC;YAC7E,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAI,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;QACzD,CAAC,CAAA;QACD,OAAO,GAAG,CAAA;IACX,CAAC,CAAC,EAAE,CAAA;IAEJ,OAAO,CAAI,OAAgB,EAAE,OAAgC;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAI,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IAC5D,CAAC;IAED,IAAI,CAAI,OAAgB,EAAE,OAAgC;QACzD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAI,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IACzD,CAAC;CACD"}
@@ -1,11 +1,11 @@
1
1
  import { Use } from "../use.js";
2
- import { AttrSpec } from "../../dom/types.js";
3
- export declare class UseAttrs {
4
- #private;
5
- constructor(use: Use);
6
- get strings(): Record<string, string | undefined>;
7
- get numbers(): Record<string, number | undefined>;
8
- get booleans(): Record<string, boolean | undefined>;
9
- spec<A extends AttrSpec>(spec: A): import("../../dom/types.js").AttrTypes<A>;
2
+ import { AttrSpec, AttrTypes } from "../../dom/types.js";
3
+ export type UseAttrs = {
4
+ <A extends AttrSpec>(spec: A): AttrTypes<A>;
5
+ strings: Record<string, undefined | string>;
6
+ numbers: Record<string, undefined | number>;
7
+ booleans: Record<string, undefined | boolean>;
8
+ spec<A extends AttrSpec>(spec: A): AttrTypes<A>;
10
9
  on(fn: () => void): void;
11
- }
10
+ };
11
+ export declare function useAttrs(use: Use): UseAttrs;
@@ -1,19 +1,18 @@
1
1
  import { dom } from "../../dom/dom.js";
2
- export class UseAttrs {
3
- #use;
4
- #attrs;
5
- constructor(use) {
6
- this.#use = use;
7
- this.#attrs = dom.attrs(use.element);
8
- }
9
- get strings() { return this.#attrs.strings; }
10
- get numbers() { return this.#attrs.numbers; }
11
- get booleans() { return this.#attrs.booleans; }
12
- spec(spec) {
13
- return this.#use.once(() => this.#attrs.spec(spec));
14
- }
15
- on(fn) {
16
- return this.#use.mount(() => this.#attrs.on(fn));
2
+ export function useAttrs(use) {
3
+ const attrs = dom.attrs(use.element);
4
+ function attrsFn(spec) {
5
+ return use.once(() => attrs.spec(spec));
17
6
  }
7
+ attrsFn.strings = attrs.strings;
8
+ attrsFn.numbers = attrs.numbers;
9
+ attrsFn.booleans = attrs.booleans;
10
+ attrsFn.spec = (spec) => {
11
+ return use.once(() => attrs.spec(spec));
12
+ };
13
+ attrsFn.on = (fn) => {
14
+ return use.mount(() => attrs.on(fn));
15
+ };
16
+ return attrsFn;
18
17
  }
19
18
  //# sourceMappingURL=use-attrs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-attrs.js","sourceRoot":"","sources":["../../../s/base/utils/use-attrs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAGpC,MAAM,OAAO,QAAQ;IACpB,IAAI,CAAK;IAC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AAC,OAAO,CAAA;IAC/B,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;IAEjC,OAAO,CAAC,IAAI,GAAG,CAAqB,IAAO,EAAE,EAAE;QAC9C,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAI,IAAI,CAAC,CAAC,CAAA;IAC3C,CAAC,CAAA;IAED,OAAO,CAAC,EAAE,GAAG,CAAC,EAAc,EAAE,EAAE;QAC/B,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IACrC,CAAC,CAAA;IAED,OAAO,OAAO,CAAA;AACf,CAAC"}
@@ -1,6 +1,6 @@
1
- var Ie=Object.defineProperty;var pe=(r,t)=>{for(var e in t)Ie(r,e,{get:t[e],enumerable:!0})};var ft=globalThis,gt=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zt=Symbol(),le=new WeakMap,et=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Zt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(gt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=le.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&le.set(e,t))}return t}toString(){return this.cssText}},me=r=>new et(typeof r=="string"?r:r+"",void 0,Zt),$=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,o,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+r[i+1]),r[0]);return new et(e,r,Zt)},yt=(r,t)=>{if(gt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=ft.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},D=gt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return me(e)})(r):r;var{is:We,defineProperty:Fe,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:Ze,getOwnPropertySymbols:Je,getPrototypeOf:Ke}=Object,$t=globalThis,de=$t.trustedTypes,Qe=de?de.emptyScript:"",Ye=$t.reactiveElementPolyfillSupport,rt=(r,t)=>r,Jt={toAttribute(r,t){switch(t){case Boolean:r=r?Qe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},ge=(r,t)=>!We(r,t),fe={attribute:!0,type:String,converter:Jt,reflect:!1,useDefault:!1,hasChanged:ge};Symbol.metadata??=Symbol("metadata"),$t.litPropertyMetadata??=new WeakMap;var E=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=fe){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&Fe(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:i}=Ge(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:o,set(n){let h=o?.call(this);i?.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??fe}static _$Ei(){if(this.hasOwnProperty(rt("elementProperties")))return;let t=Ke(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(rt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(rt("properties"))){let e=this.properties,s=[...Ze(e),...Je(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(D(o))}else t!==void 0&&e.push(D(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:Jt).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=s.getPropertyOptions(o),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Jt;this._$Em=o,this[o]=n.fromAttribute(e,i.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,i=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??ge)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,i]of s){let{wrapped:n}=i,h=this[o];n!==!0||this._$AL.has(o)||h===void 0||this.C(o,void 0,i,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[rt("elementProperties")]=new Map,E[rt("finalized")]=new Map,Ye?.({ReactiveElement:E}),($t.reactiveElementVersions??=[]).push("2.1.0");var Qt=globalThis,bt=Qt.trustedTypes,ye=bt?bt.createPolicy("lit-html",{createHTML:r=>r}):void 0,Yt="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,Xt="?"+C,Xe=`<${Xt}>`,O=document,ot=()=>O.createComment(""),it=r=>r===null||typeof r!="object"&&typeof r!="function",te=Array.isArray,ve=r=>te(r)||typeof r?.[Symbol.iterator]=="function",Kt=`[
2
- \f\r]`,st=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$e=/-->/g,be=/>/g,T=RegExp(`>|${Kt}(?:([^\\s"'>=/]+)(${Kt}*=${Kt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),we=/'/g,_e=/"/g,Ae=/^(?:script|style|textarea|title)$/i,ee=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),x=ee(1),Yr=ee(2),Xr=ee(3),M=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),xe=new WeakMap,N=O.createTreeWalker(O,129);function Se(r,t){if(!te(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ye!==void 0?ye.createHTML(t):t}var Ee=(r,t)=>{let e=r.length-1,s=[],o,i=t===2?"<svg>":t===3?"<math>":"",n=st;for(let h=0;h<e;h++){let a=r[h],u,d,l=-1,w=0;for(;w<a.length&&(n.lastIndex=w,d=n.exec(a),d!==null);)w=n.lastIndex,n===st?d[1]==="!--"?n=$e:d[1]!==void 0?n=be:d[2]!==void 0?(Ae.test(d[2])&&(o=RegExp("</"+d[2],"g")),n=T):d[3]!==void 0&&(n=T):n===T?d[0]===">"?(n=o??st,l=-1):d[1]===void 0?l=-2:(l=n.lastIndex-d[2].length,u=d[1],n=d[3]===void 0?T:d[3]==='"'?_e:we):n===_e||n===we?n=T:n===$e||n===be?n=st:(n=T,o=void 0);let P=n===T&&r[h+1].startsWith("/>")?" ":"";i+=n===st?a+Xe:l>=0?(s.push(u),a.slice(0,l)+Yt+a.slice(l)+C+P):a+C+(l===-2?h:P)}return[Se(r,i+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},nt=class r{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let i=0,n=0,h=t.length-1,a=this.parts,[u,d]=Ee(t,e);if(this.el=r.createElement(u,s),N.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(o=N.nextNode())!==null&&a.length<h;){if(o.nodeType===1){if(o.hasAttributes())for(let l of o.getAttributeNames())if(l.endsWith(Yt)){let w=d[n++],P=o.getAttribute(l).split(C),dt=/([.?@])?(.*)/.exec(w);a.push({type:1,index:i,name:dt[2],strings:P,ctor:dt[1]==="."?_t:dt[1]==="?"?xt:dt[1]==="@"?vt:H}),o.removeAttribute(l)}else l.startsWith(C)&&(a.push({type:6,index:i}),o.removeAttribute(l));if(Ae.test(o.tagName)){let l=o.textContent.split(C),w=l.length-1;if(w>0){o.textContent=bt?bt.emptyScript:"";for(let P=0;P<w;P++)o.append(l[P],ot()),N.nextNode(),a.push({type:2,index:++i});o.append(l[w],ot())}}}else if(o.nodeType===8)if(o.data===Xt)a.push({type:2,index:i});else{let l=-1;for(;(l=o.data.indexOf(C,l+1))!==-1;)a.push({type:7,index:i}),l+=C.length-1}i++}}static createElement(t,e){let s=O.createElement("template");return s.innerHTML=t,s}};function U(r,t,e=r,s){if(t===M)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,i=it(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(r),o._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=U(r,o._$AS(r,t.values),o,s)),t}var wt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??O).importNode(e,!0);N.currentNode=o;let i=N.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let u;a.type===2?u=new q(i,i.nextSibling,this,t):a.type===1?u=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(u=new At(i,this,t)),this._$AV.push(u),a=s[++h]}n!==a?.index&&(i=N.nextNode(),n++)}return N.currentNode=O,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},q=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),it(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==M&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ve(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&it(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=nt.createElement(Se(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new wt(o,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=xe.get(t.strings);return e===void 0&&xe.set(t.strings,e=new nt(t)),e}k(t){te(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let i of t)o===e.length?e.push(s=new r(this.O(ot()),this.O(ot()),this,this.options)):s=e[o],s._$AI(i),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},H=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,o){let i=this.strings,n=!1;if(i===void 0)t=U(this,t,e,0),n=!it(t)||t!==this._$AH&&t!==M,n&&(this._$AH=t);else{let h=t,a,u;for(t=i[0],a=0;a<i.length-1;a++)u=U(this,h[s+a],e,a),u===M&&(u=this._$AH[a]),n||=!it(u)||u!==this._$AH[a],u===f?t=f:t!==f&&(t+=(u??"")+i[a+1]),this._$AH[a]=u}n&&!o&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},_t=class extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},xt=class extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},vt=class extends H{constructor(t,e,s,o,i){super(t,e,s,o,i),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??f)===M)return;let s=this._$AH,o=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==f&&(s===f||o);o&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},At=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}},Ce={M:Yt,P:C,A:Xt,C:1,L:Ee,R:wt,D:ve,V:U,I:q,H,N:xt,U:vt,B:_t,F:At},tr=Qt.litHtmlPolyfillSupport;tr?.(nt,q),(Qt.litHtmlVersions??=[]).push("3.3.0");var k=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let i=e?.renderBefore??null;s._$litPart$=o=new q(t.insertBefore(ot(),i),i,void 0,e??{})}return o._$AI(r),o};var re=globalThis,z=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=k(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return M}};z._$litElement$=!0,z.finalized=!0,re.litElementHydrateSupport?.({LitElement:z});var er=re.litElementPolyfillSupport;er?.({LitElement:z});(re.litElementVersions??=[]).push("4.2.0");var v={string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},g={string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0),any:(r,t,e)=>{e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)},entries:(r,t)=>{for(let[e,s]of t)g.any(r,e,s)},record:(r,t)=>g.entries(r,Object.entries(t))};function Pe(r,t={}){let e=document.createElement(r);return g.record(e,t),e}function ke(r){let t=document.createDocumentFragment();return k(r,t),t.firstElementChild}function B(r,t){let e=[];for(let[s,o]of Object.entries(t))if(typeof o=="function")r.addEventListener(s,o),e.push(()=>r.removeEventListener(s,o));else{let[i,n]=o;r.addEventListener(s,n,i),e.push(()=>r.removeEventListener(s,n))}return()=>e.forEach(s=>s())}function Re(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var Te=(r,t)=>new Proxy(t,{get:(e,s)=>{switch(t[s]){case String:return v.string(r,s);case Number:return v.number(r,s);case Boolean:return v.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return g.string(r,s,o);case Number:return g.number(r,s,o);case Boolean:return g.boolean(r,s,o);default:throw new Error(`invalid attribute type for "${s}"`)}}});var St=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>v.string(this.element,e),set:(t,e,s)=>g.string(this.element,e,s)});numbers=new Proxy({},{get:(t,e)=>v.number(this.element,e),set:(t,e,s)=>g.number(this.element,e,s)});booleans=new Proxy({},{get:(t,e)=>v.boolean(this.element,e),set:(t,e,s)=>g.boolean(this.element,e,s)})};function V(r){let t=new St(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>Re(r,e),spec:e=>Te(r,e)}}V.get=v;V.set=g;function Ne(r){return new se(r)}var se=class{tagName;#t=new Map;#e=[];constructor(t){this.tagName=t}attr(t,e=!0){return this.#t.set(t,e),this}attrs(t){for(let[e,s]of Object.entries(t))this.attr(e,s);return this}children(...t){return this.#e.push(...t),this}done(){let t=document.createElement(this.tagName);return g.entries(t,this.#t),t.append(...this.#e),t}};function I(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`element not found (${r})`);return e}function Et(r,t=document){return t.querySelector(r)}function Ct(r,t=document){return Array.from(t.querySelectorAll(r))}var Pt=class r{element;#t;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?I(t,this.element):t)}require(t){return I(t,this.element)}maybe(t){return Et(t,this.element)}all(t){return Ct(t,this.element)}render(...t){return k(t,this.element)}get attrs(){return this.#t??=V(this.element)}events(t){return B(this.element,t)}};function Oe(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Me(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,i]of Object.entries(r)){let n=Oe(o),h=customElements.get(n);e&&h||(customElements.define(n,i),s&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function p(r,t=document){return I(r,t)}p.in=(r,t=document)=>new Pt(t).in(r);p.require=I;p.maybe=Et;p.all=Ct;p.el=Pe;p.elmer=Ne;p.mk=ke;p.events=B;p.attrs=V;p.register=Me;p.render=(r,...t)=>k(t,r);var kt=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e=!0){return this.#e.attrs.set(t,e),this}attrs(t){for(let[e,s]of Object.entries(t))this.#e.attrs.set(e,s);return this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};function W(r,t){let e,s,o=[];function i(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return i(),((...n)=>{e=n,s&&clearTimeout(s);let h=new Promise((a,u)=>{o.push({resolve:a,reject:u})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:u}of o)u(a);i()}).catch(a=>{for(let{reject:u}of o)u(a);i()})},r),h})}function Rt(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}function at(){let r,t,e=new Promise((o,i)=>{r=o,t=i});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var F=class r extends Map{static require(t,e){if(t.has(e))return t.get(e);throw new Error(`required key not found: "${e}"`)}static guarantee(t,e,s){if(t.has(e))return t.get(e);{let o=s();return t.set(e,o),o}}array(){return[...this]}require(t){return r.require(this,t)}guarantee(t,e){return r.guarantee(this,t,e)}};var Tt=(r=0)=>new Promise(t=>setTimeout(t,r));function Ue(){let r=new Set;async function t(...a){await Promise.all([...r].map(u=>u(...a)))}function e(a){return r.add(a),()=>{r.delete(a)}}async function s(...a){return t(...a)}function o(a){return e(a)}async function i(a){let{promise:u,resolve:d}=at(),l=o(async(...w)=>{a&&await a(...w),d(w),l()});return u}function n(){r.clear()}let h={pub:s,sub:o,publish:t,subscribe:e,on:e,next:i,clear:n};return Object.assign(o,h),Object.assign(s,h),h}function Nt(r){let t=Ue();return r&&t.sub(r),t.sub}function oe(r){let t=Ue();return r&&t.sub(r),t.pub}var ie=class{#t=[];#e=new WeakMap;#r=[];#s=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#s.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#r.at(-1)?.add(e),e}observe(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}subscribe(t,e){return this.#o(t)(async()=>{let s=new Set;this.#r.push(s),this.#s.add(t),s.add(e()),this.#s.delete(t),await Promise.all(s),this.#r.pop()})}#o(t){let e=this.#e.get(t);return e||(e=Nt(),this.#e.set(t,e)),e}},y=globalThis[Symbol.for("e280.tracker")]??=new ie;var G=class{sneak;constructor(t){this.sneak=t}get(){return y.notifyRead(this),this.sneak}get value(){return this.get()}};var Z=class extends G{on=Nt();dispose(){this.on.clear()}};function Ot(r,t=r){let{seen:e,result:s}=y.observe(r),o=W(0,t),i=[],n=()=>i.forEach(h=>h());for(let h of e){let a=y.subscribe(h,o);i.push(a)}return{result:s,dispose:n}}function J(r,t){return r===t}var Mt=class extends Z{#t;constructor(t,e){let s=e?.compare??J,{result:o,dispose:i}=Ot(t,async()=>{let n=t();!s(this.sneak,n)&&(this.sneak=n,await Promise.all([y.notifyWrite(this),this.on.pub(n)]))});super(o),this.#t=i}toString(){return`(derived "${String(this.get())}")`}dispose(){super.dispose(),this.#t()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Ut=class extends G{#t;#e;#r=!1;#s;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??J}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#s){let{result:t,dispose:e}=Ot(this.#t,()=>this.#r=!0);this.#s=e,this.sneak=t}if(this.#r){this.#r=!1;let t=this.#t();!this.#e(this.sneak,t)&&(this.sneak=t,y.notifyWrite(this))}return super.get()}dispose(){this.#s&&this.#s()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Ht=class extends Z{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??J}toString(){return`($signal "${String(this.get())}")`}async set(t,e=!1){let s=this.sneak;return this.sneak=t,(e||!this.#e(s,t))&&await this.publish(),t}get value(){return this.get()}set value(t){this.set(t)}async publish(){if(this.#t)throw new Error("forbid circularity");let t=this.sneak,e=Promise.resolve();try{this.#t=!0,e=Promise.all([y.notifyWrite(this),this.on.publish(t)])}finally{this.#t=!1}return await e,t}get core(){return this}fn(){let t=this;function e(s){return arguments.length===0?t.get():t.set(arguments[0])}return e.core=t,e.get=t.get.bind(t),e.set=t.set.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.publish=t.publish.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value,set:s=>t.value=s}),Object.defineProperty(e,"sneak",{get:()=>t.sneak,set:s=>t.sneak=s}),e}};function rr(r,t){return new Ut(r,t).fn()}function He(r,t){return new Mt(r,t).fn()}function _(r,t){return new Ht(r,t).fn()}_.lazy=rr;_.derived=He;var R=class{#t=new F;effect(t,e){let{seen:s,result:o}=y.observe(t);for(let i of s)this.#t.guarantee(i,()=>y.subscribe(i,e));for(let[i,n]of this.#t)s.has(i)||(n(),this.#t.delete(i));return o}clear(){for(let t of this.#t.values())t();this.#t.clear()}};var K=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=p.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function Lt(r,t){yt(r,or(t))}function or(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(D(s))}else r!==void 0&&t.push(D(r));return t}var L={status:r=>r[0],value:r=>r[0]==="ready"?r[1]:void 0,error:r=>r[0]==="error"?r[1]:void 0,select:(r,t)=>{switch(r[0]){case"loading":return t.loading();case"error":return t.error(r[1]);case"ready":return t.ready(r[1]);default:throw new Error("unknown op status")}},morph:(r,t)=>L.select(r,{loading:()=>["loading"],error:e=>["error",e],ready:e=>["ready",t(e)]}),all:(...r)=>{let t=[],e=[],s=0;for(let o of r)switch(o[0]){case"loading":s++;break;case"ready":t.push(o[1]);break;case"error":e.push(o[1]);break}return e.length>0?["error",e]:s===0?["ready",t]:["loading"]}};var j=class{static loading(){return new this}static ready(t){return new this(["ready",t])}static error(t){return new this(["error",t])}static promise(t){let e=new this;return e.promise(t),e}static load(t){return this.promise(t())}static all(...t){let e=t.map(s=>s.pod);return L.all(...e)}signal;#t=0;#e=oe();#r=oe();constructor(t=["loading"]){this.signal=_(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([s])=>t(s)),this.#r.next().then(([s])=>e(s))})}get then(){return this.wait.then.bind(this.wait)}get catch(){return this.wait.catch.bind(this.wait)}get finally(){return this.wait.finally.bind(this.wait)}async setLoading(){await this.signal.set(["loading"])}async setReady(t){await this.signal.set(["ready",t]),await this.#e(t)}async setError(t){await this.signal.set(["error",t]),await this.#r(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let s=await t;return e===this.#t&&await this.setReady(s),s}catch(s){console.error(s),e===this.#t&&await this.setError(s)}}async load(t){return this.promise(t())}get pod(){return this.signal.get()}set pod(t){this.signal.set(t)}get status(){return this.signal.get()[0]}get value(){return L.value(this.signal.get())}get error(){return L.error(this.signal.get())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal.get();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return L.select(this.signal.get(),t)}morph(t){return L.morph(this.pod,t)}};var jt=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};var Dt=class{#t;#e;constructor(t){this.#t=t,this.#e=p.attrs(t.element)}get strings(){return this.#e.strings}get numbers(){return this.#e.numbers}get booleans(){return this.#e.booleans}spec(t){return this.#t.once(()=>this.#e.spec(t))}on(t){return this.#t.mount(()=>this.#e.on(t))}};var ct=Symbol(),ht=Symbol(),ut=Symbol(),Q=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#r=new F;#s=at();#o=new jt;[ct](t){this.#t++,this.#e=0,this.#s=at();let e=t();return this.#s.resolve(),e}[ht](){this.#o.unmountAll()}[ut](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o,this.attrs=new Dt(this)}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>Lt(this.shadow,t))}css(...t){return this.styles(...t)}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}events(t){return this.mount(()=>B(this.element,t))}op=(()=>{let t=this;function e(s){return t.once(()=>j.load(s))}return e.load=e,e.promise=s=>this.once(()=>j.promise(s)),e})();signal=(()=>{let t=this;function e(s,o){return t.once(()=>_(s,o))}return e.derived=function(o,i){return t.once(()=>_.derived(o,i))},e.lazy=function(o,i){return t.once(()=>_.lazy(o,i))},e})();derived(t,e){return this.once(()=>_.derived(t,e))}lazy(t,e){return this.once(()=>_.lazy(t,e))}};var A=class extends HTMLElement{static styles;shadow;#t;#e=0;#r=new R;#s=new K(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new Q(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[ct](()=>{p.render(this.shadow,this.#r.effect(()=>this.render(this.#t),this.update))})};update=W(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&Lt(this.shadow,t),this.updateNow()}else this.#t[ut]();this.#s.start(),this.#e++}disconnectedCallback(){this.#t[ht](),this.#r.clear(),this.#s.stop()}};var pt=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function Le(r,t,e,s){return class extends t{static view=Y(s,r);#t=new R;createShadow(){return this.attachShadow(r)}render(i){return s(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:hn}=Ce;var je=r=>r.strings===void 0;var De={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ne=r=>(...t)=>({_$litDirective$:r,values:t}),qt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var lt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),lt(s,t);return!0},zt=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},qe=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ar(t)}};function ir(r){this._$AN!==void 0?(zt(this),this._$AM=r,qe(this)):this._$AM=r}function nr(r,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)lt(s[i],!1),zt(s[i]);else s!=null&&(lt(s,!1),zt(s));else lt(this,r)}var ar=r=>{r.type==De.CHILD&&(r._$AP??=nr,r._$AQ??=ir)},Bt=class extends qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),qe(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(lt(this,t),zt(this))}setValue(t){if(je(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Vt=class r extends HTMLElement{static#t=!1;static make(){return this.#t||(p.register({SlyView:r},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var It=class{viewFn;settings;#t=Vt.make();#e=new R;#r;#s;#o;#i=new K(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#s=this.#t.attachShadow(this.settings),this.#r=new Q(this.#t,this.#s,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#r[ct](()=>{let t=this.#e.effect(()=>this.viewFn(this.#r)(...this.#o.props),()=>this.#a());g.entries(this.#t,this.#o.attrs),p.render(this.#s,t),p.render(this.#t,this.#o.children),this.#i.start()})};#a=W(0,this.#n);disconnected(){this.#r[ht](),this.#e.clear(),this.#i.stop()}reconnected(){this.#r[ut](),this.#i.start()}};function ze(r,t){return ne(class extends Bt{#t=new It(r,t);render(s){return this.#t.update(s)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function Y(r,t){let e=ze(r,t);function s(...o){return e(new pt(o))}return s.props=(...o)=>new kt(new pt(o),e),s.transmute=o=>Y(n=>{let h=r(n);return(...a)=>h(...o(...a))},t),s.component=(o=A)=>({props:i=>Le(t,o,i,r)}),s}function b(r){return Y(r,{mode:"open"})}b.settings=r=>({render:t=>Y(t,r)});b.render=b;b.component=r=>b(t=>()=>r(t)).component(A).props(()=>[]);var S=$`
1
+ var Ie=Object.defineProperty;var pe=(r,t)=>{for(var e in t)Ie(r,e,{get:t[e],enumerable:!0})};var ft=globalThis,gt=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gt=Symbol(),ue=new WeakMap,et=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Gt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(gt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=ue.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ue.set(e,t))}return t}toString(){return this.cssText}},le=r=>new et(typeof r=="string"?r:r+"",void 0,Gt),$=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,o,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+r[i+1]),r[0]);return new et(e,r,Gt)},yt=(r,t)=>{if(gt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=ft.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},D=gt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return le(e)})(r):r;var{is:We,defineProperty:Fe,getOwnPropertyDescriptor:Ge,getOwnPropertyNames:Ze,getOwnPropertySymbols:Je,getPrototypeOf:Ke}=Object,$t=globalThis,me=$t.trustedTypes,Qe=me?me.emptyScript:"",Ye=$t.reactiveElementPolyfillSupport,rt=(r,t)=>r,Zt={toAttribute(r,t){switch(t){case Boolean:r=r?Qe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},fe=(r,t)=>!We(r,t),de={attribute:!0,type:String,converter:Zt,reflect:!1,useDefault:!1,hasChanged:fe};Symbol.metadata??=Symbol("metadata"),$t.litPropertyMetadata??=new WeakMap;var E=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=de){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&Fe(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:i}=Ge(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:o,set(n){let h=o?.call(this);i?.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??de}static _$Ei(){if(this.hasOwnProperty(rt("elementProperties")))return;let t=Ke(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(rt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(rt("properties"))){let e=this.properties,s=[...Ze(e),...Je(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(D(o))}else t!==void 0&&e.push(D(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:Zt).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=s.getPropertyOptions(o),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Zt;this._$Em=o,this[o]=n.fromAttribute(e,i.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,i=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??fe)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,i]of s){let{wrapped:n}=i,h=this[o];n!==!0||this._$AL.has(o)||h===void 0||this.C(o,void 0,i,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[rt("elementProperties")]=new Map,E[rt("finalized")]=new Map,Ye?.({ReactiveElement:E}),($t.reactiveElementVersions??=[]).push("2.1.0");var Kt=globalThis,bt=Kt.trustedTypes,ge=bt?bt.createPolicy("lit-html",{createHTML:r=>r}):void 0,Qt="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,Yt="?"+C,Xe=`<${Yt}>`,O=document,ot=()=>O.createComment(""),it=r=>r===null||typeof r!="object"&&typeof r!="function",Xt=Array.isArray,xe=r=>Xt(r)||typeof r?.[Symbol.iterator]=="function",Jt=`[
2
+ \f\r]`,st=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ye=/-->/g,$e=/>/g,T=RegExp(`>|${Jt}(?:([^\\s"'>=/]+)(${Jt}*=${Jt}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),be=/'/g,_e=/"/g,Ae=/^(?:script|style|textarea|title)$/i,te=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),x=te(1),Yr=te(2),Xr=te(3),M=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),we=new WeakMap,N=O.createTreeWalker(O,129);function ve(r,t){if(!Xt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ge!==void 0?ge.createHTML(t):t}var Se=(r,t)=>{let e=r.length-1,s=[],o,i=t===2?"<svg>":t===3?"<math>":"",n=st;for(let h=0;h<e;h++){let a=r[h],p,d,l=-1,_=0;for(;_<a.length&&(n.lastIndex=_,d=n.exec(a),d!==null);)_=n.lastIndex,n===st?d[1]==="!--"?n=ye:d[1]!==void 0?n=$e:d[2]!==void 0?(Ae.test(d[2])&&(o=RegExp("</"+d[2],"g")),n=T):d[3]!==void 0&&(n=T):n===T?d[0]===">"?(n=o??st,l=-1):d[1]===void 0?l=-2:(l=n.lastIndex-d[2].length,p=d[1],n=d[3]===void 0?T:d[3]==='"'?_e:be):n===_e||n===be?n=T:n===ye||n===$e?n=st:(n=T,o=void 0);let P=n===T&&r[h+1].startsWith("/>")?" ":"";i+=n===st?a+Xe:l>=0?(s.push(p),a.slice(0,l)+Qt+a.slice(l)+C+P):a+C+(l===-2?h:P)}return[ve(r,i+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},nt=class r{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let i=0,n=0,h=t.length-1,a=this.parts,[p,d]=Se(t,e);if(this.el=r.createElement(p,s),N.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(o=N.nextNode())!==null&&a.length<h;){if(o.nodeType===1){if(o.hasAttributes())for(let l of o.getAttributeNames())if(l.endsWith(Qt)){let _=d[n++],P=o.getAttribute(l).split(C),dt=/([.?@])?(.*)/.exec(_);a.push({type:1,index:i,name:dt[2],strings:P,ctor:dt[1]==="."?wt:dt[1]==="?"?xt:dt[1]==="@"?At:H}),o.removeAttribute(l)}else l.startsWith(C)&&(a.push({type:6,index:i}),o.removeAttribute(l));if(Ae.test(o.tagName)){let l=o.textContent.split(C),_=l.length-1;if(_>0){o.textContent=bt?bt.emptyScript:"";for(let P=0;P<_;P++)o.append(l[P],ot()),N.nextNode(),a.push({type:2,index:++i});o.append(l[_],ot())}}}else if(o.nodeType===8)if(o.data===Yt)a.push({type:2,index:i});else{let l=-1;for(;(l=o.data.indexOf(C,l+1))!==-1;)a.push({type:7,index:i}),l+=C.length-1}i++}}static createElement(t,e){let s=O.createElement("template");return s.innerHTML=t,s}};function U(r,t,e=r,s){if(t===M)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,i=it(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(r),o._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=U(r,o._$AS(r,t.values),o,s)),t}var _t=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??O).importNode(e,!0);N.currentNode=o;let i=N.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new q(i,i.nextSibling,this,t):a.type===1?p=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(p=new vt(i,this,t)),this._$AV.push(p),a=s[++h]}n!==a?.index&&(i=N.nextNode(),n++)}return N.currentNode=O,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},q=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),it(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==M&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):xe(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&it(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=nt.createElement(ve(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new _t(o,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=we.get(t.strings);return e===void 0&&we.set(t.strings,e=new nt(t)),e}k(t){Xt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let i of t)o===e.length?e.push(s=new r(this.O(ot()),this.O(ot()),this,this.options)):s=e[o],s._$AI(i),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},H=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,o){let i=this.strings,n=!1;if(i===void 0)t=U(this,t,e,0),n=!it(t)||t!==this._$AH&&t!==M,n&&(this._$AH=t);else{let h=t,a,p;for(t=i[0],a=0;a<i.length-1;a++)p=U(this,h[s+a],e,a),p===M&&(p=this._$AH[a]),n||=!it(p)||p!==this._$AH[a],p===f?t=f:t!==f&&(t+=(p??"")+i[a+1]),this._$AH[a]=p}n&&!o&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},wt=class extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},xt=class extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},At=class extends H{constructor(t,e,s,o,i){super(t,e,s,o,i),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??f)===M)return;let s=this._$AH,o=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==f&&(s===f||o);o&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},vt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}},Ee={M:Qt,P:C,A:Yt,C:1,L:Se,R:_t,D:xe,V:U,I:q,H,N:xt,U:At,B:wt,F:vt},tr=Kt.litHtmlPolyfillSupport;tr?.(nt,q),(Kt.litHtmlVersions??=[]).push("3.3.0");var k=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let i=e?.renderBefore??null;s._$litPart$=o=new q(t.insertBefore(ot(),i),i,void 0,e??{})}return o._$AI(r),o};var ee=globalThis,z=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=k(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return M}};z._$litElement$=!0,z.finalized=!0,ee.litElementHydrateSupport?.({LitElement:z});var er=ee.litElementPolyfillSupport;er?.({LitElement:z});(ee.litElementVersions??=[]).push("4.2.0");var A={string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},g={string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0),any:(r,t,e)=>{e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)},entries:(r,t)=>{for(let[e,s]of t)g.any(r,e,s)},record:(r,t)=>g.entries(r,Object.entries(t))};function Ce(r,t={}){let e=document.createElement(r);return g.record(e,t),e}function Pe(r){let t=document.createDocumentFragment();return k(r,t),t.firstElementChild}function B(r,t){let e=[];for(let[s,o]of Object.entries(t))if(typeof o=="function")r.addEventListener(s,o),e.push(()=>r.removeEventListener(s,o));else{let[i,n]=o;r.addEventListener(s,n,i),e.push(()=>r.removeEventListener(s,n))}return()=>e.forEach(s=>s())}function ke(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var Re=(r,t)=>new Proxy(t,{get:(e,s)=>{switch(t[s]){case String:return A.string(r,s);case Number:return A.number(r,s);case Boolean:return A.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return g.string(r,s,o);case Number:return g.number(r,s,o);case Boolean:return g.boolean(r,s,o);default:throw new Error(`invalid attribute type for "${s}"`)}}});var St=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>A.string(this.element,e),set:(t,e,s)=>g.string(this.element,e,s)});numbers=new Proxy({},{get:(t,e)=>A.number(this.element,e),set:(t,e,s)=>g.number(this.element,e,s)});booleans=new Proxy({},{get:(t,e)=>A.boolean(this.element,e),set:(t,e,s)=>g.boolean(this.element,e,s)})};function V(r){let t=new St(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>ke(r,e),spec:e=>Re(r,e)}}V.get=A;V.set=g;function Te(r){return new re(r)}var re=class{tagName;#t=new Map;#e=[];constructor(t){this.tagName=t}attr(t,e=!0){return this.#t.set(t,e),this}attrs(t){for(let[e,s]of Object.entries(t))this.attr(e,s);return this}children(...t){return this.#e.push(...t),this}done(){let t=document.createElement(this.tagName);return g.entries(t,this.#t),t.append(...this.#e),t}};function I(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`element not found (${r})`);return e}function Et(r,t=document){return t.querySelector(r)}function Ct(r,t=document){return Array.from(t.querySelectorAll(r))}var Pt=class r{element;#t;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?I(t,this.element):t)}require(t){return I(t,this.element)}maybe(t){return Et(t,this.element)}all(t){return Ct(t,this.element)}render(...t){return k(t,this.element)}get attrs(){return this.#t??=V(this.element)}events(t){return B(this.element,t)}};function Ne(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Oe(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,i]of Object.entries(r)){let n=Ne(o),h=customElements.get(n);e&&h||(customElements.define(n,i),s&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function u(r,t=document){return I(r,t)}u.in=(r,t=document)=>new Pt(t).in(r);u.require=I;u.maybe=Et;u.all=Ct;u.el=Ce;u.elmer=Te;u.mk=Pe;u.events=B;u.attrs=V;u.register=Oe;u.render=(r,...t)=>k(t,r);var kt=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e=!0){return this.#e.attrs.set(t,e),this}attrs(t){for(let[e,s]of Object.entries(t))this.#e.attrs.set(e,s);return this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};function W(r,t){let e,s,o=[];function i(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return i(),((...n)=>{e=n,s&&clearTimeout(s);let h=new Promise((a,p)=>{o.push({resolve:a,reject:p})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:p}of o)p(a);i()}).catch(a=>{for(let{reject:p}of o)p(a);i()})},r),h})}function Rt(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}function at(){let r,t,e=new Promise((o,i)=>{r=o,t=i});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var F=class r extends Map{static require(t,e){if(t.has(e))return t.get(e);throw new Error(`required key not found: "${e}"`)}static guarantee(t,e,s){if(t.has(e))return t.get(e);{let o=s();return t.set(e,o),o}}array(){return[...this]}require(t){return r.require(this,t)}guarantee(t,e){return r.guarantee(this,t,e)}};var Tt=(r=0)=>new Promise(t=>setTimeout(t,r));function Me(){let r=new Set;async function t(...a){await Promise.all([...r].map(p=>p(...a)))}function e(a){return r.add(a),()=>{r.delete(a)}}async function s(...a){return t(...a)}function o(a){return e(a)}async function i(a){let{promise:p,resolve:d}=at(),l=o(async(..._)=>{a&&await a(..._),d(_),l()});return p}function n(){r.clear()}let h={pub:s,sub:o,publish:t,subscribe:e,on:e,next:i,clear:n};return Object.assign(o,h),Object.assign(s,h),h}function Nt(r){let t=Me();return r&&t.sub(r),t.sub}function se(r){let t=Me();return r&&t.sub(r),t.pub}var oe=class{#t=[];#e=new WeakMap;#r=[];#s=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#s.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#r.at(-1)?.add(e),e}observe(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}subscribe(t,e){return this.#o(t)(async()=>{let s=new Set;this.#r.push(s),this.#s.add(t),s.add(e()),this.#s.delete(t),await Promise.all(s),this.#r.pop()})}#o(t){let e=this.#e.get(t);return e||(e=Nt(),this.#e.set(t,e)),e}},y=globalThis[Symbol.for("e280.tracker")]??=new oe;var G=class{sneak;constructor(t){this.sneak=t}get(){return y.notifyRead(this),this.sneak}get value(){return this.get()}};var Z=class extends G{on=Nt();dispose(){this.on.clear()}};function Ot(r,t=r){let{seen:e,result:s}=y.observe(r),o=W(0,t),i=[],n=()=>i.forEach(h=>h());for(let h of e){let a=y.subscribe(h,o);i.push(a)}return{result:s,dispose:n}}function J(r,t){return r===t}var Mt=class extends Z{#t;constructor(t,e){let s=e?.compare??J,{result:o,dispose:i}=Ot(t,async()=>{let n=t();!s(this.sneak,n)&&(this.sneak=n,await Promise.all([y.notifyWrite(this),this.on.pub(n)]))});super(o),this.#t=i}toString(){return`(derived "${String(this.get())}")`}dispose(){super.dispose(),this.#t()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Ut=class extends G{#t;#e;#r=!1;#s;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??J}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#s){let{result:t,dispose:e}=Ot(this.#t,()=>this.#r=!0);this.#s=e,this.sneak=t}if(this.#r){this.#r=!1;let t=this.#t();!this.#e(this.sneak,t)&&(this.sneak=t,y.notifyWrite(this))}return super.get()}dispose(){this.#s&&this.#s()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Ht=class extends Z{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??J}toString(){return`($signal "${String(this.get())}")`}async set(t,e=!1){let s=this.sneak;return this.sneak=t,(e||!this.#e(s,t))&&await this.publish(),t}get value(){return this.get()}set value(t){this.set(t)}async publish(){if(this.#t)throw new Error("forbid circularity");let t=this.sneak,e=Promise.resolve();try{this.#t=!0,e=Promise.all([y.notifyWrite(this),this.on.publish(t)])}finally{this.#t=!1}return await e,t}get core(){return this}fn(){let t=this;function e(s){return arguments.length===0?t.get():t.set(arguments[0])}return e.core=t,e.get=t.get.bind(t),e.set=t.set.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.publish=t.publish.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value,set:s=>t.value=s}),Object.defineProperty(e,"sneak",{get:()=>t.sneak,set:s=>t.sneak=s}),e}};function rr(r,t){return new Ut(r,t).fn()}function Ue(r,t){return new Mt(r,t).fn()}function w(r,t){return new Ht(r,t).fn()}w.lazy=rr;w.derived=Ue;var R=class{#t=new F;effect(t,e){let{seen:s,result:o}=y.observe(t);for(let i of s)this.#t.guarantee(i,()=>y.subscribe(i,e));for(let[i,n]of this.#t)s.has(i)||(n(),this.#t.delete(i));return o}clear(){for(let t of this.#t.values())t();this.#t.clear()}};var K=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=u.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function Lt(r,t){yt(r,or(t))}function or(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(D(s))}else r!==void 0&&t.push(D(r));return t}var L={status:r=>r[0],value:r=>r[0]==="ready"?r[1]:void 0,error:r=>r[0]==="error"?r[1]:void 0,select:(r,t)=>{switch(r[0]){case"loading":return t.loading();case"error":return t.error(r[1]);case"ready":return t.ready(r[1]);default:throw new Error("unknown op status")}},morph:(r,t)=>L.select(r,{loading:()=>["loading"],error:e=>["error",e],ready:e=>["ready",t(e)]}),all:(...r)=>{let t=[],e=[],s=0;for(let o of r)switch(o[0]){case"loading":s++;break;case"ready":t.push(o[1]);break;case"error":e.push(o[1]);break}return e.length>0?["error",e]:s===0?["ready",t]:["loading"]}};var j=class{static loading(){return new this}static ready(t){return new this(["ready",t])}static error(t){return new this(["error",t])}static promise(t){let e=new this;return e.promise(t),e}static load(t){return this.promise(t())}static all(...t){let e=t.map(s=>s.pod);return L.all(...e)}signal;#t=0;#e=se();#r=se();constructor(t=["loading"]){this.signal=w(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([s])=>t(s)),this.#r.next().then(([s])=>e(s))})}get then(){return this.wait.then.bind(this.wait)}get catch(){return this.wait.catch.bind(this.wait)}get finally(){return this.wait.finally.bind(this.wait)}async setLoading(){await this.signal.set(["loading"])}async setReady(t){await this.signal.set(["ready",t]),await this.#e(t)}async setError(t){await this.signal.set(["error",t]),await this.#r(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let s=await t;return e===this.#t&&await this.setReady(s),s}catch(s){console.error(s),e===this.#t&&await this.setError(s)}}async load(t){return this.promise(t())}get pod(){return this.signal.get()}set pod(t){this.signal.set(t)}get status(){return this.signal.get()[0]}get value(){return L.value(this.signal.get())}get error(){return L.error(this.signal.get())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal.get();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return L.select(this.signal.get(),t)}morph(t){return L.morph(this.pod,t)}};var jt=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};function He(r){let t=u.attrs(r.element);function e(s){return r.once(()=>t.spec(s))}return e.strings=t.strings,e.numbers=t.numbers,e.booleans=t.booleans,e.spec=s=>r.once(()=>t.spec(s)),e.on=s=>r.mount(()=>t.on(s)),e}var ct=Symbol(),ht=Symbol(),pt=Symbol(),Q=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#r=new F;#s=at();#o=new jt;[ct](t){this.#t++,this.#e=0,this.#s=at();let e=t();return this.#s.resolve(),e}[ht](){this.#o.unmountAll()}[pt](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o,this.attrs=He(this)}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>Lt(this.shadow,t))}css(...t){return this.styles(...t)}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}events(t){return this.mount(()=>B(this.element,t))}op=(()=>{let t=this;function e(s){return t.once(()=>j.load(s))}return e.load=e,e.promise=s=>this.once(()=>j.promise(s)),e})();signal=(()=>{let t=this;function e(s,o){return t.once(()=>w(s,o))}return e.derived=function(o,i){return t.once(()=>w.derived(o,i))},e.lazy=function(o,i){return t.once(()=>w.lazy(o,i))},e})();derived(t,e){return this.once(()=>w.derived(t,e))}lazy(t,e){return this.once(()=>w.lazy(t,e))}};var v=class extends HTMLElement{static styles;shadow;#t;#e=0;#r=new R;#s=new K(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new Q(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[ct](()=>{u.render(this.shadow,this.#r.effect(()=>this.render(this.#t),this.update))})};update=W(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&Lt(this.shadow,t),this.updateNow()}else this.#t[pt]();this.#s.start(),this.#e++}disconnectedCallback(){this.#t[ht](),this.#r.clear(),this.#s.stop()}};var ut=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function Le(r,t,e,s){return class extends t{static view=Y(s,r);#t=new R;createShadow(){return this.attachShadow(r)}render(i){return s(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:hn}=Ee;var je=r=>r.strings===void 0;var De={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ie=r=>(...t)=>({_$litDirective$:r,values:t}),Dt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var lt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),lt(s,t);return!0},qt=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},qe=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ar(t)}};function ir(r){this._$AN!==void 0?(qt(this),this._$AM=r,qe(this)):this._$AM=r}function nr(r,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)lt(s[i],!1),qt(s[i]);else s!=null&&(lt(s,!1),qt(s));else lt(this,r)}var ar=r=>{r.type==De.CHILD&&(r._$AP??=nr,r._$AQ??=ir)},zt=class extends Dt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),qe(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(lt(this,t),qt(this))}setValue(t){if(je(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Bt=class r extends HTMLElement{static#t=!1;static make(){return this.#t||(u.register({SlyView:r},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var Vt=class{viewFn;settings;#t=Bt.make();#e=new R;#r;#s;#o;#i=new K(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#s=this.#t.attachShadow(this.settings),this.#r=new Q(this.#t,this.#s,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#r[ct](()=>{let t=this.#e.effect(()=>this.viewFn(this.#r)(...this.#o.props),()=>this.#a());g.entries(this.#t,this.#o.attrs),u.render(this.#s,t),u.render(this.#t,this.#o.children),this.#i.start()})};#a=W(0,this.#n);disconnected(){this.#r[ht](),this.#e.clear(),this.#i.stop()}reconnected(){this.#r[pt](),this.#i.start()}};function ze(r,t){return ie(class extends zt{#t=new Vt(r,t);render(s){return this.#t.update(s)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function Y(r,t){let e=ze(r,t);function s(...o){return e(new ut(o))}return s.props=(...o)=>new kt(new ut(o),e),s.transmute=o=>Y(n=>{let h=r(n);return(...a)=>h(...o(...a))},t),s.component=(o=v)=>({props:i=>Le(t,o,i,r)}),s}function b(r){return Y(r,{mode:"open"})}b.settings=r=>({render:t=>Y(t,r)});b.render=b;b.component=r=>b(t=>()=>r(t)).component(v).props(()=>[]);var S=$`
4
4
  @layer reset {
5
5
  * {
6
6
  margin: 0;
@@ -16,7 +16,7 @@ var Ie=Object.defineProperty;var pe=(r,t)=>{for(var e in t)Ie(r,e,{get:t[e],enum
16
16
  ::-webkit-scrollbar-thumb { background: #333; border-radius: 1em; }
17
17
  ::-webkit-scrollbar-thumb:hover { background: #444; }
18
18
  }
19
- `;var ae=b(r=>(t,e)=>{r.name("counter"),r.styles(S,cr);let s=r.signal(t),o=()=>{s.value+=e};return x`
19
+ `;var ne=b(r=>(t,e)=>{r.name("counter"),r.styles(S,cr);let s=r.signal(t),o=()=>{s.value+=e};return x`
20
20
  <slot></slot>
21
21
  <div>
22
22
  <span>${s()}</span>
@@ -24,7 +24,7 @@ var Ie=Object.defineProperty;var pe=(r,t)=>{for(var e in t)Ie(r,e,{get:t[e],enum
24
24
  <div>
25
25
  <button @click="${o}">++</button>
26
26
  </div>
27
- `}),Wt=class extends ae.component(class extends A{attrs=p.attrs(this).spec({start:Number,step:Number})}).props(t=>[t.attrs.start??0,t.attrs.step??1]){},cr=$`
27
+ `}),It=class extends ne.component(class extends v{attrs=u.attrs(this).spec({start:Number,step:Number})}).props(t=>[t.attrs.start??0,t.attrs.step??1]){},cr=$`
28
28
  :host {
29
29
  display: flex;
30
30
  justify-content: center;
@@ -34,18 +34,18 @@ var Ie=Object.defineProperty;var pe=(r,t)=>{for(var e in t)Ie(r,e,{get:t[e],enum
34
34
  button {
35
35
  padding: 0.2em 0.5em;
36
36
  }
37
- `;var mt={};pe(mt,{AsciiAnim:()=>Be,ErrorDisplay:()=>ue,anims:()=>he,make:()=>Vr,makeAsciiAnim:()=>c,mock:()=>Ir});var he={};pe(he,{arrow:()=>lr,bar:()=>mr,bar2:()=>dr,bar3:()=>fr,bar4:()=>gr,bin:()=>Tr,binary:()=>Nr,binary2:()=>Or,block:()=>yr,block2:()=>$r,brackets:()=>vr,brackets2:()=>Ar,braille:()=>pr,bright:()=>Dr,clock:()=>Hr,cylon:()=>_r,dots:()=>Sr,dots2:()=>Er,earth:()=>ce,fistbump:()=>Lr,kiss:()=>Ur,lock:()=>jr,moon:()=>zr,pie:()=>wr,pulseblue:()=>Mr,runner:()=>br,slider:()=>xr,speaker:()=>qr,spinner:()=>ur,wave:()=>Cr,wavepulse:()=>kr,wavepulse2:()=>Rr,wavescrub:()=>Pr});function c(r,t){return()=>Be({hz:r,frames:t})}var Be=b(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(S,hr);let s=r.signal(0);return r.mount(()=>Rt(async()=>{await Tt(1e3/t);let o=s.get()+1;s.set(o>=e.length?0:o)})),e.at(s.get())}),hr=$`
37
+ `;var mt={};pe(mt,{AsciiAnim:()=>Be,ErrorDisplay:()=>he,anims:()=>ce,make:()=>Vr,makeAsciiAnim:()=>c,mock:()=>Ir});var ce={};pe(ce,{arrow:()=>lr,bar:()=>mr,bar2:()=>dr,bar3:()=>fr,bar4:()=>gr,bin:()=>Tr,binary:()=>Nr,binary2:()=>Or,block:()=>yr,block2:()=>$r,brackets:()=>Ar,brackets2:()=>vr,braille:()=>ur,bright:()=>Dr,clock:()=>Hr,cylon:()=>wr,dots:()=>Sr,dots2:()=>Er,earth:()=>ae,fistbump:()=>Lr,kiss:()=>Ur,lock:()=>jr,moon:()=>zr,pie:()=>_r,pulseblue:()=>Mr,runner:()=>br,slider:()=>xr,speaker:()=>qr,spinner:()=>pr,wave:()=>Cr,wavepulse:()=>kr,wavepulse2:()=>Rr,wavescrub:()=>Pr});function c(r,t){return()=>Be({hz:r,frames:t})}var Be=b(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(S,hr);let s=r.signal(0);return r.mount(()=>Rt(async()=>{await Tt(1e3/t);let o=s.get()+1;s.set(o>=e.length?0:o)})),e.at(s.get())}),hr=$`
38
38
  :host {
39
39
  font-family: monospace;
40
40
  white-space: pre;
41
41
  user-select: none;
42
42
  }
43
- `;var m=20,X=10,tt=4,ur=c(m,["|","/","-","\\"]),pr=c(m,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),lr=c(m,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),mr=c(m,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),dr=c(m,["\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),fr=c(m,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1"]),gr=c(m,["\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0"]),yr=c(m,["\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588"]),$r=c(m,["\u2588\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2581\u2581\u2581"]),br=c(tt,["\u{1F6B6}","\u{1F3C3}"]),wr=c(X,["\u25F7","\u25F6","\u25F5","\u25F4"]),_r=c(m,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),xr=c(m,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),vr=c(X,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]"]),Ar=c(X,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]","[ ]","[ ]","[ =]","[ ==]","[===]","[== ]","[= ]"]),Sr=c(X,[" "," ",". ",".. ","..."," .."," ."]),Er=c(m,[". ",". ",".. ","..."," .."," ."," ."," ..","...",".. "]),Cr=c(m,[".....",".....",":....","::...",":::..","::::.",":::::",":::::",".::::","..:::","...::","....:"]),Pr=c(m,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),kr=c(m,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),Rr=c(m,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:",".....",".....",":...:","::.::",":::::",":::::",".:::.",".:::.","..:.."]),Tr=c(m,["000","100","110","111","011","001"]),Nr=c(m,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),Or=c(m,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),Mr=c(tt,["\u{1F539}","\u{1F535}"]),Ur=c(X,["\u{1F642}","\u{1F642}","\u{1F617}","\u{1F619}","\u{1F618}","\u{1F618}","\u{1F619}"]),Hr=c(m,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),Lr=c(m,["\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}"," \u{1F91C} \u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F4A5}\u{1F91B} ","\u{1F91C} \u{1F4A5} \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}"]),ce=c(tt,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),jr=c(tt,["\u{1F513}","\u{1F512}"]),Dr=c(tt,["\u{1F505}","\u{1F506}"]),qr=c(tt,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),zr=c(X,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var ue=b(r=>t=>(r.name("error"),r.styles(S,Br),typeof t=="string"?t:t instanceof Error?x`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),Br=$`
43
+ `;var m=20,X=10,tt=4,pr=c(m,["|","/","-","\\"]),ur=c(m,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),lr=c(m,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),mr=c(m,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),dr=c(m,["\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),fr=c(m,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1"]),gr=c(m,["\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0"]),yr=c(m,["\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588"]),$r=c(m,["\u2588\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2581\u2581\u2581"]),br=c(tt,["\u{1F6B6}","\u{1F3C3}"]),_r=c(X,["\u25F7","\u25F6","\u25F5","\u25F4"]),wr=c(m,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),xr=c(m,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),Ar=c(X,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]"]),vr=c(X,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]","[ ]","[ ]","[ =]","[ ==]","[===]","[== ]","[= ]"]),Sr=c(X,[" "," ",". ",".. ","..."," .."," ."]),Er=c(m,[". ",". ",".. ","..."," .."," ."," ."," ..","...",".. "]),Cr=c(m,[".....",".....",":....","::...",":::..","::::.",":::::",":::::",".::::","..:::","...::","....:"]),Pr=c(m,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),kr=c(m,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),Rr=c(m,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:",".....",".....",":...:","::.::",":::::",":::::",".:::.",".:::.","..:.."]),Tr=c(m,["000","100","110","111","011","001"]),Nr=c(m,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),Or=c(m,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),Mr=c(tt,["\u{1F539}","\u{1F535}"]),Ur=c(X,["\u{1F642}","\u{1F642}","\u{1F617}","\u{1F619}","\u{1F618}","\u{1F618}","\u{1F619}"]),Hr=c(m,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),Lr=c(m,["\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}"," \u{1F91C} \u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F4A5}\u{1F91B} ","\u{1F91C} \u{1F4A5} \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}"]),ae=c(tt,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),jr=c(tt,["\u{1F513}","\u{1F512}"]),Dr=c(tt,["\u{1F505}","\u{1F506}"]),qr=c(tt,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),zr=c(X,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var he=b(r=>t=>(r.name("error"),r.styles(S,Br),typeof t=="string"?t:t instanceof Error?x`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),Br=$`
44
44
  :host {
45
45
  font-family: monospace;
46
46
  color: red;
47
47
  }
48
- `;function Vr(r=ce,t=e=>ue(e)){return(e,s)=>e.select({loading:r,ready:s,error:t})}function Ir(){return(r,t)=>r.select({ready:t,loading:()=>"[loading]",error:()=>"[error]"})}var Ve=b(r=>()=>{r.name("loaders"),r.styles(S,Wr);let t=r.once(()=>j.loading());return r.once(()=>Object.entries(mt.anims).map(([s,o])=>({key:s,loader:mt.make(o)}))).map(({key:s,loader:o})=>x`
48
+ `;function Vr(r=ae,t=e=>he(e)){return(e,s)=>e.select({loading:r,ready:s,error:t})}function Ir(){return(r,t)=>r.select({ready:t,loading:()=>"[loading]",error:()=>"[error]"})}var Ve=b(r=>()=>{r.name("loaders"),r.styles(S,Wr);let t=r.once(()=>j.loading());return r.once(()=>Object.entries(mt.anims).map(([s,o])=>({key:s,loader:mt.make(o)}))).map(({key:s,loader:o})=>x`
49
49
  <div data-anim="${s}">
50
50
  <span>${s}</span>
51
51
  <span>${o(t,()=>null)}</span>
@@ -91,8 +91,8 @@ div {
91
91
  min-height: 2.5em;
92
92
  }
93
93
  }
94
- `;var Ft=class extends b.component(t=>(t.name("demo"),t.styles(S,Fr),x`
95
- ${ae.props(768,3).children("view").render()}
94
+ `;var Wt=class extends b.component(t=>(t.name("demo"),t.styles(S,Fr),x`
95
+ ${ne.props(768,3).children("view").render()}
96
96
  ${Ve()}
97
97
  `)){},Fr=$`
98
98
  :host {
@@ -101,9 +101,9 @@ div {
101
101
  align-items: center;
102
102
  gap: 1em;
103
103
  }
104
- `;var Gt=class extends A{static styles=$`span{color:orange}`;attrs=p.attrs(this).spec({value:Number});something={whatever:"rofl"};render(t){let{value:e=1}=this.attrs,s=t.signal(0);return t.mount(()=>Rt(async()=>{await Tt(10),await s(s()+1)})),x`
104
+ `;var Ft=class extends v{static styles=$`span{color:orange}`;attrs=u.attrs(this).spec({value:Number});something={whatever:"rofl"};render(t){let{value:e=1}=this.attrs,s=t.signal(0);return t.mount(()=>Rt(async()=>{await Tt(10),await s(s()+1)})),x`
105
105
  <span>${s()*e}</span>
106
- `}};p.register({DemoComponent:Ft,CounterComponent:Wt,FastcountElement:Gt});console.log("\u{1F99D} sly");
106
+ `}};u.register({DemoComponent:Wt,CounterComponent:It,FastcountElement:Ft});console.log("\u{1F99D} sly");
107
107
  /*! Bundled license information:
108
108
 
109
109
  @lit/reactive-element/css-tag.js: