@e280/sly 0.2.0-16 → 0.2.0-17

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.
Files changed (109) hide show
  1. package/README.md +121 -12
  2. package/package.json +10 -4
  3. package/s/demo/views/loaders.ts +5 -5
  4. package/s/dom/dom.ts +2 -2
  5. package/s/dom/index.ts +4 -0
  6. package/s/index.ts +6 -19
  7. package/s/loaders/index.barrel.ts +9 -0
  8. package/s/loaders/index.ts +3 -0
  9. package/s/{ops/loaders/make-loader.ts → loaders/make.ts} +3 -7
  10. package/s/loaders/mock.ts +11 -0
  11. package/s/{ops/loaders → loaders}/parts/anims.ts +1 -1
  12. package/s/{ops/loaders → loaders}/parts/ascii-anim.ts +4 -3
  13. package/s/{ops/loaders → loaders}/parts/error-display.ts +2 -2
  14. package/s/loaders/types.ts +6 -0
  15. package/s/loot/index.barrel.ts +5 -0
  16. package/s/loot/index.ts +1 -3
  17. package/s/ops/index.ts +5 -0
  18. package/s/spa/index.barrel.ts +6 -0
  19. package/s/spa/index.ts +3 -0
  20. package/s/spa/plumbing/braces.ts +76 -0
  21. package/s/spa/plumbing/primitives.ts +85 -0
  22. package/s/spa/plumbing/router-core.ts +49 -0
  23. package/s/spa/plumbing/types.ts +39 -0
  24. package/s/spa/router.ts +49 -0
  25. package/s/spa/spa.test.ts +91 -0
  26. package/s/tests.test.ts +4 -1
  27. package/s/ui/index.ts +9 -0
  28. package/x/demo/demo.bundle.min.js +19 -19
  29. package/x/demo/demo.bundle.min.js.map +4 -4
  30. package/x/demo/views/loaders.js +4 -4
  31. package/x/demo/views/loaders.js.map +1 -1
  32. package/x/dom/dom.js +2 -2
  33. package/x/dom/dom.js.map +1 -1
  34. package/x/dom/index.d.ts +2 -0
  35. package/x/dom/index.js +3 -0
  36. package/x/dom/index.js.map +1 -0
  37. package/x/index.d.ts +6 -16
  38. package/x/index.html +2 -2
  39. package/x/index.js +6 -16
  40. package/x/index.js.map +1 -1
  41. package/x/loaders/index.barrel.d.ts +6 -0
  42. package/x/loaders/index.barrel.js +7 -0
  43. package/x/loaders/index.barrel.js.map +1 -0
  44. package/x/loaders/index.d.ts +1 -0
  45. package/x/loaders/index.js +2 -0
  46. package/x/loaders/index.js.map +1 -0
  47. package/x/loaders/make.d.ts +3 -0
  48. package/x/loaders/make.js +6 -0
  49. package/x/loaders/make.js.map +1 -0
  50. package/x/loaders/mock.d.ts +2 -0
  51. package/x/loaders/mock.js +8 -0
  52. package/x/loaders/mock.js.map +1 -0
  53. package/x/{ops/loaders → loaders}/parts/anims.d.ts +1 -1
  54. package/x/loaders/parts/anims.js.map +1 -0
  55. package/x/{ops/loaders → loaders}/parts/ascii-anim.d.ts +2 -2
  56. package/x/{ops/loaders → loaders}/parts/ascii-anim.js +2 -2
  57. package/x/loaders/parts/ascii-anim.js.map +1 -0
  58. package/x/loaders/parts/error-display.d.ts +1 -0
  59. package/x/{ops/loaders → loaders}/parts/error-display.js +2 -2
  60. package/x/loaders/parts/error-display.js.map +1 -0
  61. package/x/loaders/types.d.ts +3 -0
  62. package/x/loaders/types.js +2 -0
  63. package/x/loaders/types.js.map +1 -0
  64. package/x/loot/index.barrel.d.ts +3 -0
  65. package/x/loot/index.barrel.js +4 -0
  66. package/x/loot/index.barrel.js.map +1 -0
  67. package/x/loot/index.d.ts +1 -3
  68. package/x/loot/index.js +1 -3
  69. package/x/loot/index.js.map +1 -1
  70. package/x/ops/index.d.ts +3 -0
  71. package/x/ops/index.js +4 -0
  72. package/x/ops/index.js.map +1 -0
  73. package/x/spa/index.barrel.d.ts +4 -0
  74. package/x/spa/index.barrel.js +3 -0
  75. package/x/spa/index.barrel.js.map +1 -0
  76. package/x/spa/index.d.ts +1 -0
  77. package/x/spa/index.js +2 -0
  78. package/x/spa/index.js.map +1 -0
  79. package/x/spa/plumbing/braces.d.ts +12 -0
  80. package/x/spa/plumbing/braces.js +55 -0
  81. package/x/spa/plumbing/braces.js.map +1 -0
  82. package/x/spa/plumbing/primitives.d.ts +22 -0
  83. package/x/spa/plumbing/primitives.js +65 -0
  84. package/x/spa/plumbing/primitives.js.map +1 -0
  85. package/x/spa/plumbing/router-core.d.ts +13 -0
  86. package/x/spa/plumbing/router-core.js +38 -0
  87. package/x/spa/plumbing/router-core.js.map +1 -0
  88. package/x/spa/plumbing/types.d.ts +34 -0
  89. package/x/spa/plumbing/types.js +2 -0
  90. package/x/spa/plumbing/types.js.map +1 -0
  91. package/x/spa/router.d.ts +16 -0
  92. package/x/spa/router.js +39 -0
  93. package/x/spa/router.js.map +1 -0
  94. package/x/spa/spa.test.d.ts +15 -0
  95. package/x/spa/spa.test.js +78 -0
  96. package/x/spa/spa.test.js.map +1 -0
  97. package/x/tests.test.js +4 -1
  98. package/x/tests.test.js.map +1 -1
  99. package/x/ui/index.d.ts +7 -0
  100. package/x/ui/index.js +8 -0
  101. package/x/ui/index.js.map +1 -0
  102. package/x/ops/loaders/make-loader.d.ts +0 -5
  103. package/x/ops/loaders/make-loader.js +0 -7
  104. package/x/ops/loaders/make-loader.js.map +0 -1
  105. package/x/ops/loaders/parts/anims.js.map +0 -1
  106. package/x/ops/loaders/parts/ascii-anim.js.map +0 -1
  107. package/x/ops/loaders/parts/error-display.d.ts +0 -1
  108. package/x/ops/loaders/parts/error-display.js.map +0 -1
  109. /package/x/{ops/loaders → loaders}/parts/anims.js +0 -0
@@ -0,0 +1,39 @@
1
+
2
+ import type {Op} from "../../ops/op.js"
3
+ import type {Navigable} from "./primitives.js"
4
+ import type {Content} from "../../ui/types.js"
5
+ import type {Loader} from "../../loaders/types.js"
6
+
7
+ export type RouterOptions<R extends Routes> = {
8
+ routes: R
9
+ auto?: boolean
10
+ location?: Hashbearer
11
+ loader?: Loader
12
+ notFound?: () => Content
13
+ }
14
+
15
+ export type Hashbearer = {hash: string}
16
+
17
+ export type Hasher<Params extends any[]> = {
18
+ parse: (hash: string) => (Params | null)
19
+ make: (...params: Params) => string
20
+ }
21
+
22
+ export type Route<Params extends any[]> = {
23
+ hasher: Hasher<Params>
24
+ fn: (...params: Params) => Promise<Content>
25
+ }
26
+
27
+ export type Routes = {[key: string]: Route<any>}
28
+
29
+ export type ResolvedRoute<R extends Routes, K extends keyof R = keyof R> = {
30
+ key: K
31
+ route: R[K]
32
+ params: Parameters<R[K]["hasher"]["make"]>
33
+ op: Op<Content>
34
+ }
35
+
36
+ export type Navigables<R extends Routes> = {
37
+ [K in keyof R]: Navigable<R, K>
38
+ }
39
+
@@ -0,0 +1,49 @@
1
+
2
+ import {disposer} from "@e280/stz"
3
+ import {Content} from "../ui/types.js"
4
+ import {Loader} from "../loaders/types.js"
5
+ import {loaders} from "../loaders/index.js"
6
+ import {RouterCore} from "./plumbing/router-core.js"
7
+ import {RouterOptions, Routes} from "./plumbing/types.js"
8
+ import {HashNormalizer, onHashChange} from "./plumbing/primitives.js"
9
+
10
+ export class Router<R extends Routes> extends RouterCore<R> {
11
+ loader: Loader
12
+ notFound: () => Content
13
+ readonly dispose = disposer()
14
+ #lastHash: string
15
+
16
+ constructor(options: RouterOptions<R>) {
17
+ super(
18
+ options.routes,
19
+ options.location ?? new HashNormalizer(window.location),
20
+ )
21
+ const {auto = true} = options
22
+ this.loader = options.loader ?? loaders.make()
23
+ this.notFound = options.notFound ?? (() => null)
24
+ this.#lastHash = this.hash
25
+ if (auto) {
26
+ this.listen()
27
+ this.refresh()
28
+ }
29
+ }
30
+
31
+ render() {
32
+ const resolved = this.$resolved.get()
33
+ return resolved === null
34
+ ? this.notFound()
35
+ : this.loader(resolved.op, content => content)
36
+ }
37
+
38
+ listen() {
39
+ const dispose = onHashChange(() => {
40
+ const hash = this.hash
41
+ const isChanged = hash !== this.#lastHash
42
+ this.#lastHash = hash
43
+ if (isChanged) this.refresh()
44
+ })
45
+ this.dispose.schedule(dispose)
46
+ return dispose
47
+ }
48
+ }
49
+
@@ -0,0 +1,91 @@
1
+
2
+ import {Science, test, expect} from "@e280/science"
3
+ import {route} from "./plumbing/braces.js"
4
+ import {Routes} from "./plumbing/types.js"
5
+ import {RouterCore} from "./plumbing/router-core.js"
6
+
7
+ async function setup<R extends Routes>(routes: R) {
8
+ const location = {hash: ""}
9
+ const router = new RouterCore(routes, location)
10
+ return {location, router}
11
+ }
12
+
13
+ export default Science.suite({
14
+ inits: Science.suite({
15
+ "#/": test(async() => {
16
+ const {location, router} = await setup({
17
+ home: route("#/", async() => "123"),
18
+ })
19
+ expect(router.content).is(null)
20
+ location.hash = "#/"
21
+ await router.refresh()
22
+ expect(router.content).is("123")
23
+ }),
24
+
25
+ "#/hello/world": test(async() => {
26
+ const {location, router} = await setup({
27
+ helloWorld: route("#/hello/world", async() => "123"),
28
+ })
29
+ expect(router.content).is(null)
30
+ location.hash = "#/hello/world"
31
+ await router.refresh()
32
+ expect(router.content).is("123")
33
+ }),
34
+
35
+ "#/item/a123": test(async() => {
36
+ const {location, router} = await setup({
37
+ item: route("#/item/{id}", async({id}) => `content ${id}`),
38
+ })
39
+ location.hash = "#/item/a123"
40
+ await router.refresh()
41
+ expect(router.content).is("content a123")
42
+ }),
43
+
44
+ "#/item/a123/lol should miss": test(async() => {
45
+ const {location, router} = await setup({
46
+ item: route("#/item/{id}", async({id}) => `content ${id}`),
47
+ })
48
+ location.hash = "#/item/a123/lol"
49
+ await router.refresh()
50
+ expect(router.content).is(null)
51
+ }),
52
+
53
+ "#/left/{mid}/right extraction": test(async() => {
54
+ const {location, router} = await setup({
55
+ item: route("#/left/{mid}/right", async({mid}) => `content ${mid}`),
56
+ })
57
+ location.hash = "#/left/middle/right"
58
+ await router.refresh()
59
+ expect(router.content).is("content middle")
60
+ }),
61
+
62
+ "#/not-found-lol": test(async() => {
63
+ const {location, router} = await setup({
64
+ helloWorld: route("#/hello/world", async() => "123"),
65
+ })
66
+ location.hash = "#/not-found-lol"
67
+ await router.refresh()
68
+ expect(router.content).is(null)
69
+ }),
70
+ }),
71
+
72
+ nav: Science.suite({
73
+ "home to item and back": test(async() => {
74
+ const {location, router} = await setup({
75
+ home: route("#/", async() => `home`),
76
+ item: route("#/item/{id}", async({id}) => `item ${id}`),
77
+ })
78
+ location.hash = "#/"
79
+
80
+ await router.refresh()
81
+ expect(router.content).is("home")
82
+
83
+ await router.nav.item.go({id: "x234"})
84
+ expect(router.content).is("item x234")
85
+
86
+ await router.nav.home.go()
87
+ expect(router.content).is("home")
88
+ }),
89
+ }),
90
+ })
91
+
package/s/tests.test.ts CHANGED
@@ -1,5 +1,8 @@
1
1
 
2
2
  import {Science} from "@e280/science"
3
+ import spa from "./spa/spa.test.js"
3
4
 
4
- await Science.run({})
5
+ await Science.run({
6
+ spa,
7
+ })
5
8
 
package/s/ui/index.ts ADDED
@@ -0,0 +1,9 @@
1
+
2
+ export * from "./base/css-reset.js"
3
+ export * from "./base/use.js"
4
+ export * from "./view/parts/chain.js"
5
+ export * from "./view/parts/sly-view.js"
6
+ export * from "./base-element.js"
7
+ export * from "./types.js"
8
+ export * from "./view.js"
9
+
@@ -1,6 +1,6 @@
1
- var Le=Object.defineProperty;var je=(s,t)=>{for(var e in t)Le(s,e,{get:t[e],enumerable:!0})};var lt=globalThis,dt=lt.ShadowRoot&&(lt.ShadyCSS===void 0||lt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,It=Symbol(),ie=new WeakMap,Q=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==It)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(dt&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=ie.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&ie.set(e,t))}return t}toString(){return this.cssText}},ne=s=>new Q(typeof s=="string"?s:s+"",void 0,It),y=(s,...t)=>{let e=s.length===1?s[0]:t.reduce(((r,o,i)=>r+(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)+s[i+1]),s[0]);return new Q(e,s,It)},mt=(s,t)=>{if(dt)s.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let r=document.createElement("style"),o=lt.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=e.cssText,s.appendChild(r)}},j=dt?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return ne(e)})(s):s;var{is:De,defineProperty:ze,getOwnPropertyDescriptor:Be,getOwnPropertyNames:qe,getOwnPropertySymbols:Ve,getPrototypeOf:Ie}=Object,ft=globalThis,ae=ft.trustedTypes,We=ae?ae.emptyScript:"",Fe=ft.reactiveElementPolyfillSupport,G=(s,t)=>s,Wt={toAttribute(s,t){switch(t){case Boolean:s=s?We:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},he=(s,t)=>!De(s,t),ce={attribute:!0,type:String,converter:Wt,reflect:!1,useDefault:!1,hasChanged:he};Symbol.metadata??=Symbol("metadata"),ft.litPropertyMetadata??=new WeakMap;var S=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=ce){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 r=Symbol(),o=this.getPropertyDescriptor(t,r,e);o!==void 0&&ze(this.prototype,t,o)}}static getPropertyDescriptor(t,e,r){let{get:o,set:i}=Be(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,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ce}static _$Ei(){if(this.hasOwnProperty(G("elementProperties")))return;let t=Ie(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(G("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(G("properties"))){let e=this.properties,r=[...qe(e),...Ve(e)];for(let o of r)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,o]of e)this.elementProperties.set(r,o)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let o=this._$Eu(e,r);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let o of r)e.unshift(j(o))}else t!==void 0&&e.push(j(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r: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 r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return mt(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,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,r);if(o!==void 0&&r.reflect===!0){let i=(r.converter?.toAttribute!==void 0?r.converter:Wt).toAttribute(e,r.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,e){let r=this.constructor,o=r._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=r.getPropertyOptions(o),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Wt;this._$Em=o,this[o]=n.fromAttribute(e,i.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,r){if(t!==void 0){let o=this.constructor,i=this[t];if(r??=o.getPropertyOptions(t),!((r.hasChanged??he)(i,e)||r.useDefault&&r.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:o,wrapped:i},n){r&&!(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||r||(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 r=this.constructor.elementProperties;if(r.size>0)for(let[o,i]of r){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((r=>r.hostUpdate?.())),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}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){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[G("elementProperties")]=new Map,S[G("finalized")]=new Map,Fe?.({ReactiveElement:S}),(ft.reactiveElementVersions??=[]).push("2.1.0");var Zt=globalThis,gt=Zt.trustedTypes,pe=gt?gt.createPolicy("lit-html",{createHTML:s=>s}):void 0,Jt="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,Kt="?"+E,Ze=`<${Kt}>`,N=document,X=()=>N.createComment(""),tt=s=>s===null||typeof s!="object"&&typeof s!="function",Qt=Array.isArray,ge=s=>Qt(s)||typeof s?.[Symbol.iterator]=="function",Ft=`[
2
- \f\r]`,Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ue=/-->/g,le=/>/g,T=RegExp(`>|${Ft}(?:([^\\s"'>=/]+)(${Ft}*=${Ft}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),de=/'/g,me=/"/g,$e=/^(?:script|style|textarea|title)$/i,Gt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),A=Gt(1),Fs=Gt(2),Zs=Gt(3),O=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),fe=new WeakMap,R=N.createTreeWalker(N,129);function ye(s,t){if(!Qt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return pe!==void 0?pe.createHTML(t):t}var be=(s,t)=>{let e=s.length-1,r=[],o,i=t===2?"<svg>":t===3?"<math>":"",n=Y;for(let h=0;h<e;h++){let a=s[h],p,m,u=-1,_=0;for(;_<a.length&&(n.lastIndex=_,m=n.exec(a),m!==null);)_=n.lastIndex,n===Y?m[1]==="!--"?n=ue:m[1]!==void 0?n=le:m[2]!==void 0?($e.test(m[2])&&(o=RegExp("</"+m[2],"g")),n=T):m[3]!==void 0&&(n=T):n===T?m[0]===">"?(n=o??Y,u=-1):m[1]===void 0?u=-2:(u=n.lastIndex-m[2].length,p=m[1],n=m[3]===void 0?T:m[3]==='"'?me:de):n===me||n===de?n=T:n===ue||n===le?n=Y:(n=T,o=void 0);let C=n===T&&s[h+1].startsWith("/>")?" ":"";i+=n===Y?a+Ze:u>=0?(r.push(p),a.slice(0,u)+Jt+a.slice(u)+E+C):a+E+(u===-2?h:C)}return[ye(s,i+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},et=class s{constructor({strings:t,_$litType$:e},r){let o;this.parts=[];let i=0,n=0,h=t.length-1,a=this.parts,[p,m]=be(t,e);if(this.el=s.createElement(p,r),R.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=R.nextNode())!==null&&a.length<h;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Jt)){let _=m[n++],C=o.getAttribute(u).split(E),ut=/([.?@])?(.*)/.exec(_);a.push({type:1,index:i,name:ut[2],strings:C,ctor:ut[1]==="."?yt:ut[1]==="?"?bt:ut[1]==="@"?_t:U}),o.removeAttribute(u)}else u.startsWith(E)&&(a.push({type:6,index:i}),o.removeAttribute(u));if($e.test(o.tagName)){let u=o.textContent.split(E),_=u.length-1;if(_>0){o.textContent=gt?gt.emptyScript:"";for(let C=0;C<_;C++)o.append(u[C],X()),R.nextNode(),a.push({type:2,index:++i});o.append(u[_],X())}}}else if(o.nodeType===8)if(o.data===Kt)a.push({type:2,index:i});else{let u=-1;for(;(u=o.data.indexOf(E,u+1))!==-1;)a.push({type:7,index:i}),u+=E.length-1}i++}}static createElement(t,e){let r=N.createElement("template");return r.innerHTML=t,r}};function M(s,t,e=s,r){if(t===O)return t;let o=r!==void 0?e._$Co?.[r]:e._$Cl,i=tt(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(s),o._$AT(s,e,r)),r!==void 0?(e._$Co??=[])[r]=o:e._$Cl=o),o!==void 0&&(t=M(s,o._$AS(s,t.values),o,r)),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:r}=this._$AD,o=(t?.creationScope??N).importNode(e,!0);R.currentNode=o;let i=R.nextNode(),n=0,h=0,a=r[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new D(i,i.nextSibling,this,t):a.type===1?p=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(p=new wt(i,this,t)),this._$AV.push(p),a=r[++h]}n!==a?.index&&(i=R.nextNode(),n++)}return R.currentNode=N,o}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},D=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,o){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,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=M(this,t,e),tt(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ge(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&&tt(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=et.createElement(ye(r.h,r.h[0]),this.options)),r);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=fe.get(t.strings);return e===void 0&&fe.set(t.strings,e=new et(t)),e}k(t){Qt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,o=0;for(let i of t)o===e.length?e.push(r=new s(this.O(X()),this.O(X()),this,this.options)):r=e[o],r._$AI(i),o++;o<e.length&&(this._$AR(r&&r._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let r=t.nextSibling;t.remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,o,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=f}_$AI(t,e=this,r,o){let i=this.strings,n=!1;if(i===void 0)t=M(this,t,e,0),n=!tt(t)||t!==this._$AH&&t!==O,n&&(this._$AH=t);else{let h=t,a,p;for(t=i[0],a=0;a<i.length-1;a++)p=M(this,h[r+a],e,a),p===O&&(p=this._$AH[a]),n||=!tt(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??"")}},yt=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},bt=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},_t=class extends U{constructor(t,e,r,o,i){super(t,e,r,o,i),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??f)===O)return;let r=this._$AH,o=t===f&&r!==f||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==f&&(r===f||o);o&&this.element.removeEventListener(this.name,this,r),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)}},wt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}},_e={M:Jt,P:E,A:Kt,C:1,L:be,R:$t,D:ge,V:M,I:D,H:U,N:bt,U:_t,B:yt,F:wt},Je=Zt.litHtmlPolyfillSupport;Je?.(et,D),(Zt.litHtmlVersions??=[]).push("3.3.0");var st=(s,t,e)=>{let r=e?.renderBefore??t,o=r._$litPart$;if(o===void 0){let i=e?.renderBefore??null;r._$litPart$=o=new D(t.insertBefore(X(),i),i,void 0,e??{})}return o._$AI(s),o};var Yt=globalThis,z=class extends S{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=st(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return O}};z._$litElement$=!0,z.finalized=!0,Yt.litElementHydrateSupport?.({LitElement:z});var Ke=Yt.litElementPolyfillSupport;Ke?.({LitElement:z});(Yt.litElementVersions??=[]).push("4.2.0");function we(s,t){let e=new MutationObserver(t);return e.observe(s,{attributes:!0}),()=>e.disconnect()}var g={get:{string:(s,t)=>s.getAttribute(t)??void 0,number:(s,t)=>{let e=s.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(s,t)=>s.getAttribute(t)!==null},set:{string:(s,t,e)=>(e===void 0?s.removeAttribute(t):s.setAttribute(t,e),!0),number:(s,t,e)=>(e===void 0?s.removeAttribute(t):s.setAttribute(t,e.toString()),!0),boolean:(s,t,e)=>(e?s.setAttribute(t,""):s.removeAttribute(t),!0)}};var Ae=(s,t)=>new Proxy(t,{get:(e,r)=>{switch(t[r]){case String:return g.get.string(s,r);case Number:return g.get.number(s,r);case Boolean:return g.get.boolean(s,r);default:throw new Error(`invalid attribute type for "${r}"`)}},set:(e,r,o)=>{switch(t[r]){case String:return g.set.string(s,r,o);case Number:return g.set.number(s,r,o);case Boolean:return g.set.boolean(s,r,o);default:throw new Error(`invalid attribute type for "${r}"`)}}});var At=class{element;constructor(t){this.element=t}string=new Proxy({},{get:(t,e)=>g.get.string(this.element,e),set:(t,e,r)=>g.set.string(this.element,e,r)});number=new Proxy({},{get:(t,e)=>g.get.number(this.element,e),set:(t,e,r)=>g.set.number(this.element,e,r)});boolean=new Proxy({},{get:(t,e)=>g.get.boolean(this.element,e),set:(t,e,r)=>g.set.boolean(this.element,e,r)})};function rt(s){let t=new At(s);return{string:t.string,number:t.number,boolean:t.boolean,on:e=>we(s,e),spec:e=>Ae(s,e)}}rt.get=g.get;rt.set=g.set;function xe(s){return s.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function ve(s,t={}){let{soft:e=!1,upgrade:r=!0}=t;for(let[o,i]of Object.entries(s)){let n=xe(o),h=customElements.get(n);e&&h||(customElements.define(n,i),r&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function Xt(s,t){let e=[];for(let[r,o]of Object.entries(t))if(typeof o=="function")s.addEventListener(r,o),e.push(()=>s.removeEventListener(r,o));else{let[i,n]=o;s.addEventListener(r,n,i),e.push(()=>s.removeEventListener(r,n))}return()=>e.forEach(r=>r())}function Qe(s,t,e){e==null?s.removeAttribute(t):typeof e=="string"?s.setAttribute(t,e):typeof e=="number"?s.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?s.setAttribute(t,""):s.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)}function xt(s,t){for(let[e,r]of t)Qe(s,e,r)}function Se(s,t){let e=document.createElement(s);return xt(e,Object.entries(t)),e}function Ee(s,t){let e=s.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}var vt=class s{element;constructor(t){this.element=t}in(t){return new s(typeof t=="string"?Ee(this.element,t):t)}require(t){let e=this.element.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}maybe(t){return this.element.querySelector(t)}all(t){return Array.from(this.element.querySelectorAll(t))}render(...t){return st(t,this.element)}attrs(){return rt(this.element)}events(t){return Xt(this.element,t)}};function l(s){return typeof s=="string"?Ee(document,s):new vt(s)}var P=new vt(document);l.in=P.in.bind(P);l.require=P.require.bind(P);l.maybe=P.maybe.bind(P);l.all=P.all.bind(P);l.el=Se;l.events=Xt;l.attrs=rt;l.register=ve;l.render=(s,...t)=>st(t,s);var St=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e){return this.#e.attrs.set(t,e),this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};function B(s,t){let e,r,o=[];function i(){e=[],r&&clearTimeout(r),r=void 0,o=[]}return i(),((...n)=>{e=n,r&&clearTimeout(r);let h=new Promise((a,p)=>{o.push({resolve:a,reject:p})});return r=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()})},s),h})}function ot(){let s,t,e=new Promise((o,i)=>{s=o,t=i});function r(o){return o.then(s).catch(t),e}return{promise:e,resolve:s,reject:t,entangle:r}}var q=class s 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,r){if(t.has(e))return t.get(e);{let o=r();return t.set(e,o),o}}array(){return[...this]}require(t){return s.require(this,t)}guarantee(t,e){return s.guarantee(this,t,e)}};var Et=(s=0)=>new Promise(t=>setTimeout(t,s));function Ce(){let s=new Set;async function t(...a){await Promise.all([...s].map(p=>p(...a)))}function e(a){return s.add(a),()=>{s.delete(a)}}async function r(...a){return t(...a)}function o(a){return e(a)}async function i(a){let{promise:p,resolve:m}=ot(),u=o(async(..._)=>{a&&await a(..._),m(_),u()});return p}function n(){s.clear()}let h={pub:r,sub:o,publish:t,subscribe:e,on:e,next:i,clear:n};return Object.assign(o,h),Object.assign(r,h),h}function Ct(s){let t=Ce();return s&&t.sub(s),t.sub}function te(s){let t=Ce();return s&&t.sub(s),t.pub}function Pt(s){let t,e=!1,r=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await s(r),!e&&(t=setTimeout(o,0)))};return o(),r}var ee=class{#t=[];#e=new WeakMap;#s=[];#r=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#r.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#s.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 r=new Set;this.#s.push(r),this.#r.add(t),r.add(e()),this.#r.delete(t),await Promise.all(r),this.#s.pop()})}#o(t){let e=this.#e.get(t);return e||(e=Ct(),this.#e.set(t,e)),e}},$=globalThis[Symbol.for("e280.tracker")]??=new ee;var V=class{sneak;constructor(t){this.sneak=t}get(){return $.notifyRead(this),this.sneak}get value(){return this.get()}};var I=class extends V{on=Ct();dispose(){this.on.clear()}};function kt(s,t=s){let{seen:e,result:r}=$.observe(s),o=B(0,t),i=[],n=()=>i.forEach(h=>h());for(let h of e){let a=$.subscribe(h,o);i.push(a)}return{result:r,dispose:n}}function W(s,t){return s===t}var Tt=class extends I{#t;constructor(t,e){let r=e?.compare??W,{result:o,dispose:i}=kt(t,async()=>{let n=t();!r(this.sneak,n)&&(this.sneak=n,await Promise.all([$.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 Rt=class extends V{#t;#e;#s=!1;#r;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??W}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#r){let{result:t,dispose:e}=kt(this.#t,()=>this.#s=!0);this.#r=e,this.sneak=t}if(this.#s){this.#s=!1;let t=this.#t();!this.#e(this.sneak,t)&&(this.sneak=t,$.notifyWrite(this))}return super.get()}dispose(){this.#r&&this.#r()}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 Nt=class extends I{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??W}toString(){return`($signal "${String(this.get())}")`}async set(t,e=!1){let r=this.sneak;return this.sneak=t,(e||!this.#e(r,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([$.notifyWrite(this),this.on.publish(t)])}finally{this.#t=!1}return await e,t}get core(){return this}fn(){let t=this;function e(r){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:r=>t.value=r}),Object.defineProperty(e,"sneak",{get:()=>t.sneak,set:r=>t.sneak=r}),e}};function Ge(s,t){return new Rt(s,t).fn()}function Pe(s,t){return new Tt(s,t).fn()}function w(s,t){return new Nt(s,t).fn()}w.lazy=Ge;w.derived=Pe;var k=class{#t=new q;effect(t,e){let{seen:r,result:o}=$.observe(t);for(let i of r)this.#t.guarantee(i,()=>$.subscribe(i,e));for(let[i,n]of this.#t)r.has(i)||(n(),this.#t.delete(i));return o}clear(){for(let t of this.#t.values())t();this.#t.clear()}};var F=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=l.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function Ot(s,t){mt(s,Xe(t))}function Xe(s){let t=[];if(Array.isArray(s)){let e=new Set(s.flat(1/0).reverse());for(let r of e)t.unshift(j(r))}else s!==void 0&&t.push(j(s));return t}var H={status:s=>s[0],value:s=>s[0]==="ready"?s[1]:void 0,error:s=>s[0]==="error"?s[1]:void 0,select:(s,t)=>{switch(s[0]){case"loading":return t.loading();case"error":return t.error(s[1]);case"ready":return t.ready(s[1]);default:throw new Error("unknown op status")}},morph:(s,t)=>H.select(s,{loading:()=>["loading"],error:e=>["error",e],ready:e=>["ready",t(e)]}),all:(...s)=>{let t=[],e=[],r=0;for(let o of s)switch(o[0]){case"loading":r++;break;case"ready":t.push(o[1]);break;case"error":e.push(o[1]);break}return e.length>0?["error",e]:r===0?["ready",t]:["loading"]}};var L=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(r=>r.pod);return H.all(...e)}signal;#t=0;#e=te();#s=te();constructor(t=["loading"]){this.signal=w(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([r])=>t(r)),this.#s.next().then(([r])=>e(r))})}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.#s(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let r=await t;return e===this.#t&&await this.setReady(r),r}catch(r){console.error(r),e===this.#t&&await this.setError(r)}}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 H.value(this.signal.get())}get error(){return H.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 H.select(this.signal.get(),t)}morph(t){return H.morph(this.pod,t)}};var Mt=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 it=Symbol(),nt=Symbol(),at=Symbol(),Z=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#s=new q;#r=ot();#o=new Mt;[it](t){this.#t++,this.#e=0,this.#r=ot();let e=t();return this.#r.resolve(),e}[nt](){this.#o.unmountAll()}[at](){this.#o.remountAll()}constructor(t,e,r,o){this.element=t,this.shadow=e,this.renderNow=r,this.render=o,this.attrs=l.attrs(this.element)}get renderCount(){return this.#t}get rendered(){return this.#r.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>Ot(this.shadow,t))}css(...t){return this.styles(...t)}once(t){return this.#s.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[r,o]=t();return e=r,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}op=(()=>{let t=this;function e(r){return t.once(()=>L.load(r))}return e.load=e,e.promise=r=>this.once(()=>L.promise(r)),e})();signal=(()=>{let t=this;function e(r,o){return t.once(()=>w(r,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 x=class extends HTMLElement{static styles;shadow;#t;#e=0;#s=new k;#r=new F(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new Z(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[it](()=>{l.render(this.shadow,this.#s.effect(()=>this.render(this.#t),this.update))})};update=B(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&Ot(this.shadow,t),this.updateNow()}else this.#t[at]();this.#r.start(),this.#e++}disconnectedCallback(){this.#t[nt](),this.#s.clear(),this.#r.stop()}};var ct=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function ke(s,t,e,r){return class extends t{static view=ht(r,s);#t=new k;createShadow(){return this.attachShadow(s)}render(i){return r(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:zi}=_e;var Te=s=>s.strings===void 0;var Re={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},se=s=>(...t)=>({_$litDirective$:s,values:t}),Ut=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var pt=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let r of e)r._$AO?.(t,!1),pt(r,t);return!0},Ht=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},Ne=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),ss(t)}};function ts(s){this._$AN!==void 0?(Ht(this),this._$AM=s,Ne(this)):this._$AM=s}function es(s,t=!1,e=0){let r=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)pt(r[i],!1),Ht(r[i]);else r!=null&&(pt(r,!1),Ht(r));else pt(this,s)}var ss=s=>{s.type==Re.CHILD&&(s._$AP??=es,s._$AQ??=ts)},Lt=class extends Ut{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Ne(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(pt(this,t),Ht(this))}setValue(t){if(Te(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 jt=class s extends HTMLElement{static#t=!1;static make(){return this.#t||(l.register({SlyView:s},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var Dt=class{viewFn;settings;#t=jt.make();#e=new k;#s;#r;#o;#i=new F(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#r=this.#t.attachShadow(this.settings),this.#s=new Z(this.#t,this.#r,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#s[it](()=>{let t=this.#e.effect(()=>this.viewFn(this.#s)(...this.#o.props),()=>this.#a());xt(this.#t,[...this.#o.attrs]),l.render(this.#r,t),l.render(this.#t,this.#o.children),this.#i.start()})};#a=B(0,this.#n);disconnected(){this.#s[nt](),this.#e.clear(),this.#i.stop()}reconnected(){this.#s[at](),this.#i.start()}};function Oe(s,t){return se(class extends Lt{#t=new Dt(s,t);render(r){return this.#t.update(r)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function ht(s,t){let e=Oe(s,t);function r(...o){return e(new ct(o))}return r.props=(...o)=>new St(new ct(o),e),r.component=(o=x)=>({props:i=>ke(t,o,i,s)}),r}function b(s){return ht(s,{mode:"open"})}b.settings=s=>({render:t=>ht(t,s)});b.render=b;b.component=s=>b(t=>()=>s(t)).component(x).props(()=>[]);var v=y`
1
+ var De=Object.defineProperty;var ae=(r,t)=>{for(var e in t)De(r,e,{get:t[e],enumerable:!0})};var dt=globalThis,mt=dt.ShadowRoot&&(dt.ShadyCSS===void 0||dt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,It=Symbol(),ce=new WeakMap,Q=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==It)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(mt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=ce.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ce.set(e,t))}return t}toString(){return this.cssText}},he=r=>new Q(typeof r=="string"?r:r+"",void 0,It),y=(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 Q(e,r,It)},ft=(r,t)=>{if(mt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=dt.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},j=mt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return he(e)})(r):r;var{is:ze,defineProperty:Be,getOwnPropertyDescriptor:qe,getOwnPropertyNames:Ve,getOwnPropertySymbols:Ie,getPrototypeOf:We}=Object,gt=globalThis,pe=gt.trustedTypes,Fe=pe?pe.emptyScript:"",Ze=gt.reactiveElementPolyfillSupport,G=(r,t)=>r,Wt={toAttribute(r,t){switch(t){case Boolean:r=r?Fe: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}},le=(r,t)=>!ze(r,t),ue={attribute:!0,type:String,converter:Wt,reflect:!1,useDefault:!1,hasChanged:le};Symbol.metadata??=Symbol("metadata"),gt.litPropertyMetadata??=new WeakMap;var S=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=ue){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&&Be(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:i}=qe(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)??ue}static _$Ei(){if(this.hasOwnProperty(G("elementProperties")))return;let t=We(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(G("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(G("properties"))){let e=this.properties,s=[...Ve(e),...Ie(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(j(o))}else t!==void 0&&e.push(j(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 ft(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:Wt).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:Wt;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??le)(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){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[G("elementProperties")]=new Map,S[G("finalized")]=new Map,Ze?.({ReactiveElement:S}),(gt.reactiveElementVersions??=[]).push("2.1.0");var Zt=globalThis,$t=Zt.trustedTypes,de=$t?$t.createPolicy("lit-html",{createHTML:r=>r}):void 0,Jt="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,Kt="?"+E,Je=`<${Kt}>`,N=document,X=()=>N.createComment(""),tt=r=>r===null||typeof r!="object"&&typeof r!="function",Qt=Array.isArray,be=r=>Qt(r)||typeof r?.[Symbol.iterator]=="function",Ft=`[
2
+ \f\r]`,Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,me=/-->/g,fe=/>/g,T=RegExp(`>|${Ft}(?:([^\\s"'>=/]+)(${Ft}*=${Ft}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ge=/'/g,$e=/"/g,_e=/^(?:script|style|textarea|title)$/i,Gt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),x=Gt(1),Jr=Gt(2),Kr=Gt(3),O=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),ye=new WeakMap,R=N.createTreeWalker(N,129);function we(r,t){if(!Qt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return de!==void 0?de.createHTML(t):t}var xe=(r,t)=>{let e=r.length-1,s=[],o,i=t===2?"<svg>":t===3?"<math>":"",n=Y;for(let h=0;h<e;h++){let a=r[h],p,m,u=-1,_=0;for(;_<a.length&&(n.lastIndex=_,m=n.exec(a),m!==null);)_=n.lastIndex,n===Y?m[1]==="!--"?n=me:m[1]!==void 0?n=fe:m[2]!==void 0?(_e.test(m[2])&&(o=RegExp("</"+m[2],"g")),n=T):m[3]!==void 0&&(n=T):n===T?m[0]===">"?(n=o??Y,u=-1):m[1]===void 0?u=-2:(u=n.lastIndex-m[2].length,p=m[1],n=m[3]===void 0?T:m[3]==='"'?$e:ge):n===$e||n===ge?n=T:n===me||n===fe?n=Y:(n=T,o=void 0);let C=n===T&&r[h+1].startsWith("/>")?" ":"";i+=n===Y?a+Je:u>=0?(s.push(p),a.slice(0,u)+Jt+a.slice(u)+E+C):a+E+(u===-2?h:C)}return[we(r,i+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},et=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,m]=xe(t,e);if(this.el=r.createElement(p,s),R.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=R.nextNode())!==null&&a.length<h;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Jt)){let _=m[n++],C=o.getAttribute(u).split(E),lt=/([.?@])?(.*)/.exec(_);a.push({type:1,index:i,name:lt[2],strings:C,ctor:lt[1]==="."?bt:lt[1]==="?"?_t:lt[1]==="@"?wt:U}),o.removeAttribute(u)}else u.startsWith(E)&&(a.push({type:6,index:i}),o.removeAttribute(u));if(_e.test(o.tagName)){let u=o.textContent.split(E),_=u.length-1;if(_>0){o.textContent=$t?$t.emptyScript:"";for(let C=0;C<_;C++)o.append(u[C],X()),R.nextNode(),a.push({type:2,index:++i});o.append(u[_],X())}}}else if(o.nodeType===8)if(o.data===Kt)a.push({type:2,index:i});else{let u=-1;for(;(u=o.data.indexOf(E,u+1))!==-1;)a.push({type:7,index:i}),u+=E.length-1}i++}}static createElement(t,e){let s=N.createElement("template");return s.innerHTML=t,s}};function M(r,t,e=r,s){if(t===O)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,i=tt(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=M(r,o._$AS(r,t.values),o,s)),t}var yt=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??N).importNode(e,!0);R.currentNode=o;let i=R.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new D(i,i.nextSibling,this,t):a.type===1?p=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(p=new xt(i,this,t)),this._$AV.push(p),a=s[++h]}n!==a?.index&&(i=R.nextNode(),n++)}return R.currentNode=N,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++}},D=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=M(this,t,e),tt(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):be(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&&tt(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.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=et.createElement(we(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new yt(o,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=ye.get(t.strings);return e===void 0&&ye.set(t.strings,e=new et(t)),e}k(t){Qt(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(X()),this.O(X()),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))}},U=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=M(this,t,e,0),n=!tt(t)||t!==this._$AH&&t!==O,n&&(this._$AH=t);else{let h=t,a,p;for(t=i[0],a=0;a<i.length-1;a++)p=M(this,h[s+a],e,a),p===O&&(p=this._$AH[a]),n||=!tt(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??"")}},bt=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},_t=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},wt=class extends U{constructor(t,e,s,o,i){super(t,e,s,o,i),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??f)===O)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)}},xt=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){M(this,t)}},Ae={M:Jt,P:E,A:Kt,C:1,L:xe,R:yt,D:be,V:M,I:D,H:U,N:_t,U:wt,B:bt,F:xt},Ke=Zt.litHtmlPolyfillSupport;Ke?.(et,D),(Zt.litHtmlVersions??=[]).push("3.3.0");var rt=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let i=e?.renderBefore??null;s._$litPart$=o=new D(t.insertBefore(X(),i),i,void 0,e??{})}return o._$AI(r),o};var Yt=globalThis,z=class extends S{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=rt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return O}};z._$litElement$=!0,z.finalized=!0,Yt.litElementHydrateSupport?.({LitElement:z});var Qe=Yt.litElementPolyfillSupport;Qe?.({LitElement:z});(Yt.litElementVersions??=[]).push("4.2.0");function Ge(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}"`)}function At(r,t){for(let[e,s]of t)Ge(r,e,s)}function ve(r,t){let e=document.createElement(r);return At(e,Object.entries(t)),e}function Se(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var g={get:{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},set:{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)}};var Ee=(r,t)=>new Proxy(t,{get:(e,s)=>{switch(t[s]){case String:return g.get.string(r,s);case Number:return g.get.number(r,s);case Boolean:return g.get.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return g.set.string(r,s,o);case Number:return g.set.number(r,s,o);case Boolean:return g.set.boolean(r,s,o);default:throw new Error(`invalid attribute type for "${s}"`)}}});var vt=class{element;constructor(t){this.element=t}string=new Proxy({},{get:(t,e)=>g.get.string(this.element,e),set:(t,e,s)=>g.set.string(this.element,e,s)});number=new Proxy({},{get:(t,e)=>g.get.number(this.element,e),set:(t,e,s)=>g.set.number(this.element,e,s)});boolean=new Proxy({},{get:(t,e)=>g.get.boolean(this.element,e),set:(t,e,s)=>g.set.boolean(this.element,e,s)})};function st(r){let t=new vt(r);return{string:t.string,number:t.number,boolean:t.boolean,on:e=>Se(r,e),spec:e=>Ee(r,e)}}st.get=g.get;st.set=g.set;function Xt(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 Ce(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Pe(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,i]of Object.entries(r)){let n=Ce(o),h=customElements.get(n);e&&h||(customElements.define(n,i),s&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function ke(r,t){let e=r.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}var St=class r{element;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?ke(this.element,t):t)}require(t){let e=this.element.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}maybe(t){return this.element.querySelector(t)}all(t){return Array.from(this.element.querySelectorAll(t))}render(...t){return rt(t,this.element)}attrs(){return st(this.element)}events(t){return Xt(this.element,t)}};function l(r){return typeof r=="string"?ke(document,r):new St(r)}var P=new St(document);l.in=P.in.bind(P);l.require=P.require.bind(P);l.maybe=P.maybe.bind(P);l.all=P.all.bind(P);l.el=ve;l.events=Xt;l.attrs=st;l.register=Pe;l.render=(r,...t)=>rt(t,r);var Et=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e){return this.#e.attrs.set(t,e),this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};function B(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 ot(){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 q=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 Ct=(r=0)=>new Promise(t=>setTimeout(t,r));function Te(){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:m}=ot(),u=o(async(..._)=>{a&&await a(..._),m(_),u()});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 Pt(r){let t=Te();return r&&t.sub(r),t.sub}function te(r){let t=Te();return r&&t.sub(r),t.pub}function kt(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}var ee=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=Pt(),this.#e.set(t,e)),e}},$=globalThis[Symbol.for("e280.tracker")]??=new ee;var V=class{sneak;constructor(t){this.sneak=t}get(){return $.notifyRead(this),this.sneak}get value(){return this.get()}};var I=class extends V{on=Pt();dispose(){this.on.clear()}};function Tt(r,t=r){let{seen:e,result:s}=$.observe(r),o=B(0,t),i=[],n=()=>i.forEach(h=>h());for(let h of e){let a=$.subscribe(h,o);i.push(a)}return{result:s,dispose:n}}function W(r,t){return r===t}var Rt=class extends I{#t;constructor(t,e){let s=e?.compare??W,{result:o,dispose:i}=Tt(t,async()=>{let n=t();!s(this.sneak,n)&&(this.sneak=n,await Promise.all([$.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 Nt=class extends V{#t;#e;#r=!1;#s;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??W}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#s){let{result:t,dispose:e}=Tt(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,$.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 Ot=class extends I{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??W}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([$.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 Ye(r,t){return new Nt(r,t).fn()}function Re(r,t){return new Rt(r,t).fn()}function w(r,t){return new Ot(r,t).fn()}w.lazy=Ye;w.derived=Re;var k=class{#t=new q;effect(t,e){let{seen:s,result:o}=$.observe(t);for(let i of s)this.#t.guarantee(i,()=>$.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 F=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=l.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function Mt(r,t){ft(r,tr(t))}function tr(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(j(s))}else r!==void 0&&t.push(j(r));return t}var H={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)=>H.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 L=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 H.all(...e)}signal;#t=0;#e=te();#r=te();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 H.value(this.signal.get())}get error(){return H.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 H.select(this.signal.get(),t)}morph(t){return H.morph(this.pod,t)}};var Ut=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 it=Symbol(),nt=Symbol(),at=Symbol(),Z=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#r=new q;#s=ot();#o=new Ut;[it](t){this.#t++,this.#e=0,this.#s=ot();let e=t();return this.#s.resolve(),e}[nt](){this.#o.unmountAll()}[at](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o,this.attrs=l.attrs(this.element)}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>Mt(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(),()=>{}])}op=(()=>{let t=this;function e(s){return t.once(()=>L.load(s))}return e.load=e,e.promise=s=>this.once(()=>L.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 A=class extends HTMLElement{static styles;shadow;#t;#e=0;#r=new k;#s=new F(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new Z(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[it](()=>{l.render(this.shadow,this.#r.effect(()=>this.render(this.#t),this.update))})};update=B(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&Mt(this.shadow,t),this.updateNow()}else this.#t[at]();this.#s.start(),this.#e++}disconnectedCallback(){this.#t[nt](),this.#r.clear(),this.#s.stop()}};var ct=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function Ne(r,t,e,s){return class extends t{static view=ht(s,r);#t=new k;createShadow(){return this.attachShadow(r)}render(i){return s(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:qi}=Ae;var Oe=r=>r.strings===void 0;var Me={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},re=r=>(...t)=>({_$litDirective$:r,values:t}),Ht=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 pt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),pt(s,t);return!0},Lt=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},Ue=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),sr(t)}};function er(r){this._$AN!==void 0?(Lt(this),this._$AM=r,Ue(this)):this._$AM=r}function rr(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++)pt(s[i],!1),Lt(s[i]);else s!=null&&(pt(s,!1),Lt(s));else pt(this,r)}var sr=r=>{r.type==Me.CHILD&&(r._$AP??=rr,r._$AQ??=er)},jt=class extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ue(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(pt(this,t),Lt(this))}setValue(t){if(Oe(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 Dt=class r extends HTMLElement{static#t=!1;static make(){return this.#t||(l.register({SlyView:r},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var zt=class{viewFn;settings;#t=Dt.make();#e=new k;#r;#s;#o;#i=new F(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#s=this.#t.attachShadow(this.settings),this.#r=new Z(this.#t,this.#s,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#r[it](()=>{let t=this.#e.effect(()=>this.viewFn(this.#r)(...this.#o.props),()=>this.#a());At(this.#t,[...this.#o.attrs]),l.render(this.#s,t),l.render(this.#t,this.#o.children),this.#i.start()})};#a=B(0,this.#n);disconnected(){this.#r[nt](),this.#e.clear(),this.#i.stop()}reconnected(){this.#r[at](),this.#i.start()}};function He(r,t){return re(class extends jt{#t=new zt(r,t);render(s){return this.#t.update(s)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function ht(r,t){let e=He(r,t);function s(...o){return e(new ct(o))}return s.props=(...o)=>new Et(new ct(o),e),s.component=(o=A)=>({props:i=>Ne(t,o,i,r)}),s}function b(r){return ht(r,{mode:"open"})}b.settings=r=>({render:t=>ht(t,r)});b.render=b;b.component=r=>b(t=>()=>r(t)).component(A).props(()=>[]);var v=y`
4
4
  @layer reset {
5
5
  * {
6
6
  margin: 0;
@@ -16,15 +16,15 @@ var Le=Object.defineProperty;var je=(s,t)=>{for(var e in t)Le(s,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 re=b(s=>(t,e)=>{s.name("counter"),s.styles(v,rs);let r=s.signal(t),o=()=>{r.value+=e};return A`
19
+ `;var se=b(r=>(t,e)=>{r.name("counter"),r.styles(v,or);let s=r.signal(t),o=()=>{s.value+=e};return x`
20
20
  <slot></slot>
21
21
  <div>
22
- <span>${r()}</span>
22
+ <span>${s()}</span>
23
23
  </div>
24
24
  <div>
25
25
  <button @click="${o}">++</button>
26
26
  </div>
27
- `}),zt=class extends re.component(class extends x{attrs=l.attrs(this).spec({start:Number,step:Number})}).props(t=>[t.attrs.start??0,t.attrs.step??1]){},rs=y`
27
+ `}),Bt=class extends se.component(class extends A{attrs=l.attrs(this).spec({start:Number,step:Number})}).props(t=>[t.attrs.start??0,t.attrs.step??1]){},or=y`
28
28
  :host {
29
29
  display: flex;
30
30
  justify-content: center;
@@ -34,23 +34,23 @@ var Le=Object.defineProperty;var je=(s,t)=>{for(var e in t)Le(s,e,{get:t[e],enum
34
34
  button {
35
35
  padding: 0.2em 0.5em;
36
36
  }
37
- `;var Bt={};je(Bt,{arrow:()=>cs,bar:()=>hs,bar2:()=>ps,bar3:()=>us,bar4:()=>ls,bin:()=>Cs,binary:()=>Ps,binary2:()=>ks,block:()=>ds,block2:()=>ms,brackets:()=>bs,brackets2:()=>_s,braille:()=>as,bright:()=>Us,clock:()=>Ns,cylon:()=>$s,dots:()=>ws,dots2:()=>As,earth:()=>oe,fistbump:()=>Os,kiss:()=>Rs,lock:()=>Ms,moon:()=>Ls,pie:()=>gs,pulseblue:()=>Ts,runner:()=>fs,slider:()=>ys,speaker:()=>Hs,spinner:()=>ns,wave:()=>xs,wavepulse:()=>Ss,wavepulse2:()=>Es,wavescrub:()=>vs});function c(s,t){return()=>os({hz:s,frames:t})}var os=b(s=>({hz:t,frames:e})=>{s.name("loading"),s.styles(v,is);let r=s.signal(0);return s.mount(()=>Pt(async()=>{await Et(1e3/t);let o=r.get()+1;r.set(o>=e.length?0:o)})),e.at(r.get())}),is=y`
37
+ `;var ut={};ae(ut,{AsciiAnim:()=>Le,ErrorDisplay:()=>ne,anims:()=>ie,make:()=>Dr,makeAsciiAnim:()=>c,mock:()=>zr});var ie={};ae(ie,{arrow:()=>cr,bar:()=>hr,bar2:()=>pr,bar3:()=>ur,bar4:()=>lr,bin:()=>Cr,binary:()=>Pr,binary2:()=>kr,block:()=>dr,block2:()=>mr,brackets:()=>br,brackets2:()=>_r,braille:()=>ar,bright:()=>Ur,clock:()=>Nr,cylon:()=>$r,dots:()=>wr,dots2:()=>xr,earth:()=>oe,fistbump:()=>Or,kiss:()=>Rr,lock:()=>Mr,moon:()=>Lr,pie:()=>gr,pulseblue:()=>Tr,runner:()=>fr,slider:()=>yr,speaker:()=>Hr,spinner:()=>nr,wave:()=>Ar,wavepulse:()=>Sr,wavepulse2:()=>Er,wavescrub:()=>vr});function c(r,t){return()=>Le({hz:r,frames:t})}var Le=b(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(v,ir);let s=r.signal(0);return r.mount(()=>kt(async()=>{await Ct(1e3/t);let o=s.get()+1;s.set(o>=e.length?0:o)})),e.at(s.get())}),ir=y`
38
38
  :host {
39
39
  font-family: monospace;
40
40
  white-space: pre;
41
41
  user-select: none;
42
42
  }
43
- `;var d=20,J=10,K=4,ns=c(d,["|","/","-","\\"]),as=c(d,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),cs=c(d,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),hs=c(d,["\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"]),ps=c(d,["\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"]),us=c(d,["\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"]),ls=c(d,["\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"]),ds=c(d,["\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"]),ms=c(d,["\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"]),fs=c(K,["\u{1F6B6}","\u{1F3C3}"]),gs=c(J,["\u25F7","\u25F6","\u25F5","\u25F4"]),$s=c(d,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),ys=c(d,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),bs=c(J,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]"]),_s=c(J,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]","[ ]","[ ]","[ =]","[ ==]","[===]","[== ]","[= ]"]),ws=c(J,[" "," ",". ",".. ","..."," .."," ."]),As=c(d,[". ",". ",".. ","..."," .."," ."," ."," ..","...",".. "]),xs=c(d,[".....",".....",":....","::...",":::..","::::.",":::::",":::::",".::::","..:::","...::","....:"]),vs=c(d,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),Ss=c(d,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),Es=c(d,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:",".....",".....",":...:","::.::",":::::",":::::",".:::.",".:::.","..:.."]),Cs=c(d,["000","100","110","111","011","001"]),Ps=c(d,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),ks=c(d,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),Ts=c(K,["\u{1F539}","\u{1F535}"]),Rs=c(J,["\u{1F642}","\u{1F642}","\u{1F617}","\u{1F619}","\u{1F618}","\u{1F618}","\u{1F619}"]),Ns=c(d,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),Os=c(d,["\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}"]),oe=c(K,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),Ms=c(K,["\u{1F513}","\u{1F512}"]),Us=c(K,["\u{1F505}","\u{1F506}"]),Hs=c(K,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),Ls=c(J,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var Me=b(s=>t=>(s.name("error"),s.styles(v,js),typeof t=="string"?t:t instanceof Error?A`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),js=y`
43
+ `;var d=20,J=10,K=4,nr=c(d,["|","/","-","\\"]),ar=c(d,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),cr=c(d,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),hr=c(d,["\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"]),pr=c(d,["\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"]),ur=c(d,["\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"]),lr=c(d,["\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"]),dr=c(d,["\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"]),mr=c(d,["\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"]),fr=c(K,["\u{1F6B6}","\u{1F3C3}"]),gr=c(J,["\u25F7","\u25F6","\u25F5","\u25F4"]),$r=c(d,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),yr=c(d,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),br=c(J,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]"]),_r=c(J,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]","[ ]","[ ]","[ =]","[ ==]","[===]","[== ]","[= ]"]),wr=c(J,[" "," ",". ",".. ","..."," .."," ."]),xr=c(d,[". ",". ",".. ","..."," .."," ."," ."," ..","...",".. "]),Ar=c(d,[".....",".....",":....","::...",":::..","::::.",":::::",":::::",".::::","..:::","...::","....:"]),vr=c(d,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),Sr=c(d,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),Er=c(d,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:",".....",".....",":...:","::.::",":::::",":::::",".:::.",".:::.","..:.."]),Cr=c(d,["000","100","110","111","011","001"]),Pr=c(d,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),kr=c(d,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),Tr=c(K,["\u{1F539}","\u{1F535}"]),Rr=c(J,["\u{1F642}","\u{1F642}","\u{1F617}","\u{1F619}","\u{1F618}","\u{1F618}","\u{1F619}"]),Nr=c(d,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),Or=c(d,["\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}"]),oe=c(K,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),Mr=c(K,["\u{1F513}","\u{1F512}"]),Ur=c(K,["\u{1F505}","\u{1F506}"]),Hr=c(K,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),Lr=c(J,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var ne=b(r=>t=>(r.name("error"),r.styles(v,jr),typeof t=="string"?t:t instanceof Error?x`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),jr=y`
44
44
  :host {
45
45
  font-family: monospace;
46
46
  color: red;
47
47
  }
48
- `;function Ue(s=oe,t=e=>Me(e)){return(e,r)=>e.select({loading:s,ready:r,error:t})}var He=b(s=>()=>{s.name("loaders"),s.styles(v,Ds);let t=s.once(()=>L.loading());return s.once(()=>Object.entries(Bt).map(([r,o])=>({key:r,loader:Ue(o)}))).map(({key:r,loader:o})=>A`
49
- <div data-anim="${r}">
50
- <span>${r}</span>
48
+ `;function Dr(r=oe,t=e=>ne(e)){return(e,s)=>e.select({loading:r,ready:s,error:t})}function zr(){return(r,t)=>r.select({ready:t,loading:()=>"[loading]",error:()=>"[error]"})}var je=b(r=>()=>{r.name("loaders"),r.styles(v,Br);let t=r.once(()=>L.loading());return r.once(()=>Object.entries(ut.anims).map(([s,o])=>({key:s,loader:ut.make(o)}))).map(({key:s,loader:o})=>x`
49
+ <div data-anim="${s}">
50
+ <span>${s}</span>
51
51
  <span>${o(t,()=>null)}</span>
52
52
  </div>
53
- `)}),Ds=y`
53
+ `)}),Br=y`
54
54
  :host {
55
55
  display: flex;
56
56
  flex-direction: row;
@@ -91,19 +91,19 @@ div {
91
91
  min-height: 2.5em;
92
92
  }
93
93
  }
94
- `;var qt=class extends b.component(t=>(t.name("demo"),t.styles(v,zs),A`
95
- ${re.props(768,3).children("view").render()}
96
- ${He()}
97
- `)){},zs=y`
94
+ `;var qt=class extends b.component(t=>(t.name("demo"),t.styles(v,qr),x`
95
+ ${se.props(768,3).children("view").render()}
96
+ ${je()}
97
+ `)){},qr=y`
98
98
  :host {
99
99
  display: flex;
100
100
  flex-direction: column;
101
101
  align-items: center;
102
102
  gap: 1em;
103
103
  }
104
- `;var Vt=class extends x{static styles=y`span{color:orange}`;attrs=l.attrs(this).spec({value:Number});something={whatever:"rofl"};render(t){let{value:e=1}=this.attrs,r=t.signal(0);return t.mount(()=>Pt(async()=>{await Et(10),await r(r()+1)})),A`
105
- <span>${r()*e}</span>
106
- `}};l.register({DemoComponent:qt,CounterComponent:zt,FastcountElement:Vt});console.log("\u{1F99D} sly");
104
+ `;var Vt=class extends A{static styles=y`span{color:orange}`;attrs=l.attrs(this).spec({value:Number});something={whatever:"rofl"};render(t){let{value:e=1}=this.attrs,s=t.signal(0);return t.mount(()=>kt(async()=>{await Ct(10),await s(s()+1)})),x`
105
+ <span>${s()*e}</span>
106
+ `}};l.register({DemoComponent:qt,CounterComponent:Bt,FastcountElement:Vt});console.log("\u{1F99D} sly");
107
107
  /*! Bundled license information:
108
108
 
109
109
  @lit/reactive-element/css-tag.js: