@luna_ui/luna 0.1.6 → 0.2.0
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 +27 -8
- package/dist/cli.mjs +361 -0
- package/dist/index.js +1 -1
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/src-BgIEfZkm.js +1 -0
- package/package.json +13 -8
- package/dist/src-C-OpUndy.js +0 -1
package/README.md
CHANGED
|
@@ -7,25 +7,39 @@ A lightweight reactive UI library with SolidJS-Like API. Implemented in MoonBit.
|
|
|
7
7
|
- [API Reference](https://luna.mizchi.workers.dev/luna/api/js/)
|
|
8
8
|
- [Tutorial](https://luna.mizchi.workers.dev/luna/tutorial/js/)
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Quick Start
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
# Create a new TSX project
|
|
14
|
+
npx @luna_ui/luna new myapp
|
|
15
|
+
cd myapp
|
|
16
|
+
npm install
|
|
17
|
+
npm run dev
|
|
18
|
+
|
|
19
|
+
# Or create a MoonBit project
|
|
20
|
+
npx @luna_ui/luna new myapp --mbt
|
|
21
|
+
cd myapp
|
|
22
|
+
moon update
|
|
23
|
+
npm install
|
|
24
|
+
npm run dev
|
|
14
25
|
```
|
|
15
26
|
|
|
16
|
-
## Setup
|
|
27
|
+
## Manual Setup
|
|
28
|
+
|
|
29
|
+
### Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install @luna_ui/luna
|
|
33
|
+
```
|
|
17
34
|
|
|
18
35
|
### TypeScript + Vite
|
|
19
36
|
|
|
20
37
|
**tsconfig.json:**
|
|
21
38
|
|
|
22
|
-
Set `"jsxImportSource": "@luna_ui/luna"`
|
|
23
|
-
|
|
24
39
|
```json
|
|
25
40
|
{
|
|
26
41
|
"compilerOptions": {
|
|
27
|
-
|
|
28
|
-
"jsxImportSource": "@luna_ui/luna",
|
|
42
|
+
"jsxImportSource": "@luna_ui/luna"
|
|
29
43
|
}
|
|
30
44
|
}
|
|
31
45
|
```
|
|
@@ -35,7 +49,12 @@ Set `"jsxImportSource": "@luna_ui/luna"`
|
|
|
35
49
|
```ts
|
|
36
50
|
import { defineConfig } from 'vite';
|
|
37
51
|
|
|
38
|
-
export default defineConfig({
|
|
52
|
+
export default defineConfig({
|
|
53
|
+
esbuild: {
|
|
54
|
+
jsx: 'automatic',
|
|
55
|
+
jsxImportSource: '@luna_ui/luna',
|
|
56
|
+
},
|
|
57
|
+
});
|
|
39
58
|
```
|
|
40
59
|
|
|
41
60
|
## Basic Usage
|
package/dist/cli.mjs
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
//#region bin/cli.ts
|
|
7
|
+
path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
function printHelp() {
|
|
9
|
+
console.log(`
|
|
10
|
+
@luna_ui/luna CLI
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
npx @luna_ui/luna new <project-name> [options]
|
|
14
|
+
|
|
15
|
+
Options:
|
|
16
|
+
--mbt Generate MoonBit template (default: TSX)
|
|
17
|
+
--help, -h Show this help message
|
|
18
|
+
|
|
19
|
+
Examples:
|
|
20
|
+
npx @luna_ui/luna new myapp # TSX template
|
|
21
|
+
npx @luna_ui/luna new myapp --mbt # MoonBit template
|
|
22
|
+
`);
|
|
23
|
+
}
|
|
24
|
+
function getTsxTemplates(projectName) {
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
path: "package.json",
|
|
28
|
+
content: JSON.stringify({
|
|
29
|
+
name: projectName,
|
|
30
|
+
private: true,
|
|
31
|
+
type: "module",
|
|
32
|
+
scripts: {
|
|
33
|
+
dev: "vite",
|
|
34
|
+
build: "vite build",
|
|
35
|
+
preview: "vite preview"
|
|
36
|
+
},
|
|
37
|
+
dependencies: { "@luna_ui/luna": "latest" },
|
|
38
|
+
devDependencies: {
|
|
39
|
+
vite: "^6.0.0",
|
|
40
|
+
typescript: "^5.7.0"
|
|
41
|
+
}
|
|
42
|
+
}, null, 2)
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
path: "tsconfig.json",
|
|
46
|
+
content: JSON.stringify({
|
|
47
|
+
compilerOptions: {
|
|
48
|
+
target: "ES2023",
|
|
49
|
+
module: "ESNext",
|
|
50
|
+
moduleResolution: "bundler",
|
|
51
|
+
noEmit: true,
|
|
52
|
+
allowJs: true,
|
|
53
|
+
strict: true,
|
|
54
|
+
esModuleInterop: true,
|
|
55
|
+
skipLibCheck: true,
|
|
56
|
+
jsx: "preserve",
|
|
57
|
+
jsxImportSource: "@luna_ui/luna"
|
|
58
|
+
},
|
|
59
|
+
include: ["src/**/*"]
|
|
60
|
+
}, null, 2)
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
path: "vite.config.ts",
|
|
64
|
+
content: `import { defineConfig } from "vite";
|
|
65
|
+
|
|
66
|
+
export default defineConfig({
|
|
67
|
+
esbuild: {
|
|
68
|
+
jsx: "automatic",
|
|
69
|
+
jsxImportSource: "@luna_ui/luna",
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
`
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
path: "index.html",
|
|
76
|
+
content: `<!DOCTYPE html>
|
|
77
|
+
<html lang="en">
|
|
78
|
+
<head>
|
|
79
|
+
<meta charset="UTF-8" />
|
|
80
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
81
|
+
<title>${projectName}</title>
|
|
82
|
+
</head>
|
|
83
|
+
<body>
|
|
84
|
+
<div id="app"></div>
|
|
85
|
+
<script type="module" src="/src/main.tsx"><\/script>
|
|
86
|
+
</body>
|
|
87
|
+
</html>
|
|
88
|
+
`
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: "src/main.tsx",
|
|
92
|
+
content: `import { render } from "@luna_ui/luna";
|
|
93
|
+
import { App } from "./App";
|
|
94
|
+
|
|
95
|
+
render(() => <App />, document.getElementById("app")!);
|
|
96
|
+
`
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
path: "src/App.tsx",
|
|
100
|
+
content: `import { createSignal, For, Show } from "@luna_ui/luna";
|
|
101
|
+
|
|
102
|
+
export function App() {
|
|
103
|
+
const [count, setCount] = createSignal(0);
|
|
104
|
+
const [items, setItems] = createSignal<string[]>([]);
|
|
105
|
+
|
|
106
|
+
const increment = () => setCount((c) => c + 1);
|
|
107
|
+
const decrement = () => setCount((c) => c - 1);
|
|
108
|
+
const reset = () => setCount(0);
|
|
109
|
+
const addItem = () => setItems((prev) => [...prev, \`Item \${prev.length + 1}\`]);
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<div>
|
|
113
|
+
<h1>Luna Counter</h1>
|
|
114
|
+
<p>Count: {count}</p>
|
|
115
|
+
<p>Doubled: {() => count() * 2}</p>
|
|
116
|
+
<div>
|
|
117
|
+
<button onClick={increment}>+1</button>
|
|
118
|
+
<button onClick={decrement}>-1</button>
|
|
119
|
+
<button onClick={reset}>Reset</button>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<h2>Items</h2>
|
|
123
|
+
<button onClick={addItem}>Add Item</button>
|
|
124
|
+
<Show when={() => items().length > 0} fallback={<p>No items yet</p>}>
|
|
125
|
+
<ul>
|
|
126
|
+
<For each={items}>
|
|
127
|
+
{(item, index) => (
|
|
128
|
+
<li>
|
|
129
|
+
{index}: {item}
|
|
130
|
+
</li>
|
|
131
|
+
)}
|
|
132
|
+
</For>
|
|
133
|
+
</ul>
|
|
134
|
+
</Show>
|
|
135
|
+
</div>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
`
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
path: ".gitignore",
|
|
142
|
+
content: `node_modules
|
|
143
|
+
dist
|
|
144
|
+
.vite
|
|
145
|
+
`
|
|
146
|
+
}
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
function getMbtTemplates(projectName) {
|
|
150
|
+
return [
|
|
151
|
+
{
|
|
152
|
+
path: "package.json",
|
|
153
|
+
content: JSON.stringify({
|
|
154
|
+
name: projectName,
|
|
155
|
+
private: true,
|
|
156
|
+
type: "module",
|
|
157
|
+
scripts: {
|
|
158
|
+
dev: "vite",
|
|
159
|
+
build: "moon build && vite build"
|
|
160
|
+
},
|
|
161
|
+
devDependencies: {
|
|
162
|
+
vite: "^6.0.0",
|
|
163
|
+
"vite-plugin-moonbit": "^0.1.0"
|
|
164
|
+
}
|
|
165
|
+
}, null, 2)
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
path: "moon.mod.json",
|
|
169
|
+
content: JSON.stringify({
|
|
170
|
+
name: `internal/${projectName}`,
|
|
171
|
+
version: "0.0.1",
|
|
172
|
+
deps: {
|
|
173
|
+
"mizchi/luna": "0.1.3",
|
|
174
|
+
"mizchi/js": "0.10.6"
|
|
175
|
+
},
|
|
176
|
+
source: "src",
|
|
177
|
+
"preferred-target": "js"
|
|
178
|
+
}, null, 2)
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
path: "tsconfig.json",
|
|
182
|
+
content: JSON.stringify({
|
|
183
|
+
compilerOptions: {
|
|
184
|
+
target: "ES2023",
|
|
185
|
+
module: "ESNext",
|
|
186
|
+
moduleResolution: "bundler",
|
|
187
|
+
noEmit: true,
|
|
188
|
+
allowJs: true,
|
|
189
|
+
strict: true,
|
|
190
|
+
esModuleInterop: true,
|
|
191
|
+
skipLibCheck: true,
|
|
192
|
+
paths: { [`mbt:internal/${projectName}`]: ["./target/js/release/build/app/app.js"] }
|
|
193
|
+
},
|
|
194
|
+
include: ["*.ts"]
|
|
195
|
+
}, null, 2)
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
path: "vite.config.ts",
|
|
199
|
+
content: `import { defineConfig } from "vite";
|
|
200
|
+
import { moonbitPlugin } from "vite-plugin-moonbit";
|
|
201
|
+
|
|
202
|
+
export default defineConfig({
|
|
203
|
+
plugins: [
|
|
204
|
+
moonbitPlugin({
|
|
205
|
+
watch: true,
|
|
206
|
+
showLogs: true,
|
|
207
|
+
}),
|
|
208
|
+
],
|
|
209
|
+
});
|
|
210
|
+
`
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
path: "index.html",
|
|
214
|
+
content: `<!DOCTYPE html>
|
|
215
|
+
<html lang="en">
|
|
216
|
+
<head>
|
|
217
|
+
<meta charset="UTF-8" />
|
|
218
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
219
|
+
<title>${projectName}</title>
|
|
220
|
+
</head>
|
|
221
|
+
<body>
|
|
222
|
+
<h1>${projectName}</h1>
|
|
223
|
+
<div id="app"></div>
|
|
224
|
+
<script type="module" src="/main.ts"><\/script>
|
|
225
|
+
</body>
|
|
226
|
+
</html>
|
|
227
|
+
`
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
path: "main.ts",
|
|
231
|
+
content: `// Import MoonBit module via mbt: prefix
|
|
232
|
+
import "mbt:internal/${projectName}";
|
|
233
|
+
`
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
path: "src/moon.pkg.json",
|
|
237
|
+
content: JSON.stringify({
|
|
238
|
+
"is-main": true,
|
|
239
|
+
"supported-targets": ["js"],
|
|
240
|
+
import: [
|
|
241
|
+
"mizchi/luna/luna/signal",
|
|
242
|
+
{
|
|
243
|
+
path: "mizchi/luna/platform/dom/element",
|
|
244
|
+
alias: "dom"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
path: "mizchi/js/browser/dom",
|
|
248
|
+
alias: "js_dom"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
link: { js: { format: "esm" } }
|
|
252
|
+
}, null, 2)
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
path: "src/lib.mbt",
|
|
256
|
+
content: `// Luna Counter App
|
|
257
|
+
|
|
258
|
+
fn main {
|
|
259
|
+
let count = @signal.signal(0)
|
|
260
|
+
let doubled = @signal.memo(fn() { count.get() * 2 })
|
|
261
|
+
|
|
262
|
+
let doc = @js_dom.document()
|
|
263
|
+
match doc.getElementById("app") {
|
|
264
|
+
Some(el) => {
|
|
265
|
+
let app = @dom.div([
|
|
266
|
+
@dom.h1([@dom.text("Luna Counter (MoonBit)")]),
|
|
267
|
+
@dom.p([
|
|
268
|
+
@dom.text_dyn(fn() { "Count: " + count.get().to_string() }),
|
|
269
|
+
]),
|
|
270
|
+
@dom.p([
|
|
271
|
+
@dom.text_dyn(fn() { "Doubled: " + doubled().to_string() }),
|
|
272
|
+
]),
|
|
273
|
+
@dom.div(class="buttons", [
|
|
274
|
+
@dom.button(
|
|
275
|
+
on=@dom.events().click(_ => count.update(fn(n) { n + 1 })),
|
|
276
|
+
[@dom.text("+1")],
|
|
277
|
+
),
|
|
278
|
+
@dom.button(
|
|
279
|
+
on=@dom.events().click(_ => count.update(fn(n) { n - 1 })),
|
|
280
|
+
[@dom.text("-1")],
|
|
281
|
+
),
|
|
282
|
+
@dom.button(
|
|
283
|
+
on=@dom.events().click(_ => count.set(0)),
|
|
284
|
+
[@dom.text("Reset")],
|
|
285
|
+
),
|
|
286
|
+
]),
|
|
287
|
+
])
|
|
288
|
+
@dom.render(el |> @dom.DomElement::from_jsdom, app)
|
|
289
|
+
}
|
|
290
|
+
None => ()
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
`
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
path: ".gitignore",
|
|
297
|
+
content: `node_modules
|
|
298
|
+
dist
|
|
299
|
+
target
|
|
300
|
+
.mooncakes
|
|
301
|
+
`
|
|
302
|
+
}
|
|
303
|
+
];
|
|
304
|
+
}
|
|
305
|
+
function createProject(projectName, templates, targetDir) {
|
|
306
|
+
if (fs.existsSync(targetDir)) {
|
|
307
|
+
console.error(`Error: Directory "${projectName}" already exists.`);
|
|
308
|
+
process.exit(1);
|
|
309
|
+
}
|
|
310
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
311
|
+
for (const template of templates) {
|
|
312
|
+
const filePath = path.join(targetDir, template.path);
|
|
313
|
+
const dir = path.dirname(filePath);
|
|
314
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
315
|
+
fs.writeFileSync(filePath, template.content);
|
|
316
|
+
console.log(` Created: ${template.path}`);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function main() {
|
|
320
|
+
const args = process.argv.slice(2);
|
|
321
|
+
if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
|
|
322
|
+
printHelp();
|
|
323
|
+
process.exit(0);
|
|
324
|
+
}
|
|
325
|
+
const command = args[0];
|
|
326
|
+
if (command !== "new") {
|
|
327
|
+
console.error(`Unknown command: ${command}`);
|
|
328
|
+
printHelp();
|
|
329
|
+
process.exit(1);
|
|
330
|
+
}
|
|
331
|
+
const projectName = args[1];
|
|
332
|
+
if (!projectName) {
|
|
333
|
+
console.error("Error: Project name is required.");
|
|
334
|
+
printHelp();
|
|
335
|
+
process.exit(1);
|
|
336
|
+
}
|
|
337
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(projectName)) {
|
|
338
|
+
console.error("Error: Project name can only contain letters, numbers, hyphens, and underscores.");
|
|
339
|
+
process.exit(1);
|
|
340
|
+
}
|
|
341
|
+
const useMbt = args.includes("--mbt");
|
|
342
|
+
const targetDir = path.resolve(process.cwd(), projectName);
|
|
343
|
+
console.log(`\nCreating ${useMbt ? "MoonBit" : "TSX"} project: ${projectName}\n`);
|
|
344
|
+
createProject(projectName, useMbt ? getMbtTemplates(projectName) : getTsxTemplates(projectName), targetDir);
|
|
345
|
+
console.log(`\nDone! To get started:\n`);
|
|
346
|
+
console.log(` cd ${projectName}`);
|
|
347
|
+
if (useMbt) {
|
|
348
|
+
console.log(` moon update`);
|
|
349
|
+
console.log(` npm install`);
|
|
350
|
+
console.log(` moon build`);
|
|
351
|
+
console.log(` npm run dev`);
|
|
352
|
+
} else {
|
|
353
|
+
console.log(` npm install`);
|
|
354
|
+
console.log(` npm run dev`);
|
|
355
|
+
}
|
|
356
|
+
console.log();
|
|
357
|
+
}
|
|
358
|
+
main();
|
|
359
|
+
|
|
360
|
+
//#endregion
|
|
361
|
+
export { };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,A as t,B as ee,C as n,Ct as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,St as b,T as x,U as S,V as C,W as w,X as T,Y as E,Z as D,_ as O,_t as k,a as A,at as j,b as M,bt as N,c as P,ct as F,d as I,dt as L,et as R,f as z,ft as B,g as te,gt as V,h as H,ht as U,i as W,it as G,j as K,k as q,l as J,lt as Y,m as X,mt as Z,n as Q,nt as ne,o as re,ot as ie,p as ae,pt as oe,q as se,r as ce,rt as le,s as ue,st as de,t as fe,tt as pe,u as me,ut as $,v as he,vt as ge,w as _e,x as ve,xt as ye,y as be,yt as xe,z as Se}from"./src-
|
|
1
|
+
import{$ as e,A as t,B as ee,C as n,Ct as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,St as b,T as x,U as S,V as C,W as w,X as T,Y as E,Z as D,_ as O,_t as k,a as A,at as j,b as M,bt as N,c as P,ct as F,d as I,dt as L,et as R,f as z,ft as B,g as te,gt as V,h as H,ht as U,i as W,it as G,j as K,k as q,l as J,lt as Y,m as X,mt as Z,n as Q,nt as ne,o as re,ot as ie,p as ae,pt as oe,q as se,r as ce,rt as le,s as ue,st as de,t as fe,tt as pe,u as me,ut as $,v as he,vt as ge,w as _e,x as ve,xt as ye,y as be,yt as xe,z as Se}from"./src-BgIEfZkm.js";export{fe as For,K as Fragment,Q as Index,ce as Match,W as Portal,A as Provider,re as Show,ue as Switch,M as batch,ve as batchEnd,y as batchStart,n as combine,_e as createContext,P as createDeferred,J as createEffect,x as createElement,me as createMemo,I as createResource,a as createRoot,i as createRouter,z as createSignal,ae as createStore,X as debounced,h as effect,q as events,t as forEach,p as get,m as getOwner,g as hasOwner,o as jsx,l as jsxs,f as map,H as mergeProps,v as mount,te as on,Se as onCleanup,ee as onMount,C as peek,c as portalToBody,S as portalToElementWithShadow,w as portalToSelector,s as portalWithShadow,O as produce,d as provide,he as reconcile,se as render,u as resourceError,E as resourceGet,T as resourceIsFailure,D as resourceIsPending,_ as resourceIsSuccess,e as resourcePeek,R as resourceRefetch,pe as resourceValue,ne as routePage,le as routePageFull,G as routePageTitled,j as routerGetBase,ie as routerGetMatch,de as routerGetPath,F as routerNavigate,Y as routerReplace,$ as runUntracked,$ as untrack,L as runWithOwner,B as set,oe as show,be as splitProps,Z as stateError,U as stateIsFailure,V as stateIsPending,k as stateIsSuccess,ge as stateValue,xe as subscribe,N as text,ye as textDyn,b as update,r as useContext};
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./src-
|
|
1
|
+
import"./src-BgIEfZkm.js";import{Fragment as e,jsx as t,jsxDEV as n,jsxs as r}from"./jsx-runtime.js";export{e as Fragment,t as jsx,n as jsxDEV,r as jsxs};
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,bt as t,xt as n}from"./src-
|
|
1
|
+
import{T as e,bt as t,xt as n}from"./src-BgIEfZkm.js";function r(e){return typeof e==`string`?e:typeof e!=`object`||!e?``:Object.entries(e).map(([e,t])=>`${e.replace(/([A-Z])/g,`-$1`).toLowerCase()}: ${t}`).join(`; `)}function i(e){if(!e)return[];let t=[];for(let[n,i]of Object.entries(e)){if(n===`children`)continue;let e=n,a;if(n===`className`&&(e=`class`),n===`style`){a={$tag:0,_0:r(i)},t.push({_0:e,_1:a});continue}if(n===`ref`&&typeof i==`function`){e=`__ref`,a={$tag:2,_0:i},t.push({_0:e,_1:a});continue}if(n.startsWith(`on`)&&typeof i==`function`){e=n.slice(2).toLowerCase(),a={$tag:2,_0:i},t.push({_0:e,_1:a});continue}a=typeof i==`function`?{$tag:1,_0:i}:{$tag:0,_0:String(i)},t.push({_0:e,_1:a})}return t}function a(e){if(!e)return[];let r;return r=Array.isArray(e)?e:[e],r.flat().map(e=>typeof e==`string`?t(e):typeof e==`number`?t(String(e)):typeof e==`function`&&e.length===0?n(()=>String(e())):e).filter(Boolean)}function o(t,n){let{children:r,...o}=n||{},s=i(o),c=a(r);if(typeof t==`string`)return e(t,s,c);if(typeof t==`function`)return t({...o,children:r});throw Error(`Invalid JSX type: ${t}`)}const s=o;function c({children:e}){return a(e)}const l=o;export{c as Fragment,o as jsx,l as jsxDEV,s as jsxs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={$tag:0};function t(e){this._0=e}t.prototype.$tag=1;var n=class extends Error{};function r(){throw new n}function i(e,t){if(t<0||t>=e.length)throw Error(`Index out of bounds`)}function a(e,t){let n=Array(e);return n.fill(t),n}function o(e){this._0=e}o.prototype.$tag=0;function s(e){this._0=e}s.prototype.$tag=1;const c={$tag:1},l={$tag:0},u=(e,t)=>e.toString(t),d=(e,t)=>{e.push(t)},f={$tag:0};function ee(e){this._0=e}ee.prototype.$tag=1;function te(e){this._0=e}te.prototype.$tag=2;function ne(e){this._0=e}ne.prototype.$tag=3;function re(e){this._0=e}re.prototype.$tag=4;const ie=e=>e.slice(0),p=(e,t)=>{e.length=t},ae=e=>e.pop(),oe=(e,t,n)=>e.splice(t,n),se=(e,t)=>e[t],m=(e,t,n)=>e[t](...n),ce=e=>e==null,le=()=>({}),ue=(e,t,n)=>{e[t]=n},de=()=>null,fe=e=>Object.fromEntries(e.map(e=>[e._0,e._1])),pe={$tag:0};function h(e){this._0=e}h.prototype.$tag=1;const me={$tag:0};function g(e){this._0=e}g.prototype.$tag=1;const he={$tag:0};function ge(e){this._0=e}ge.prototype.$tag=1;const _e=(e,t)=>setTimeout(e,t),ve=e=>clearTimeout(e),_=()=>document,ye=(e,t)=>e.createElement(t),be=(e,t,n)=>e.createElementNS(t,n),xe=(e,t)=>e.createTextNode(t),Se={$tag:0};function v(e){this._0=e}v.prototype.$tag=1;const y={$tag:0};function Ce(e){this._0=e}Ce.prototype.$tag=1;function we(e){this._0=e}we.prototype.$tag=2;function Te(e){this._0=e}Te.prototype.$tag=0;function Ee(e){this._0=e}Ee.prototype.$tag=1;function b(e){this._0=e}b.prototype.$tag=2;function De(e){this._0=e}De.prototype.$tag=3;const Oe=(e,t,n)=>e.addEventListener(t,n),ke=(e,t)=>e===t,Ae=(e,t,n)=>typeof e.moveBefore==`function`?(e.moveBefore(t,n),t):e.insertBefore(t,n),je=(e,t)=>typeof e.moveBefore==`function`?(e.moveBefore(t,null),t):e.insertBefore(t,null),Me=(e,t)=>e.nextSibling===t,Ne={$tag:0};function Pe(e){this._0=e}Pe.prototype.$tag=1;function Fe(e){this._0=e}Fe.prototype.$tag=0;function Ie(e){this._0=e}Ie.prototype.$tag=1;function Le(e){this._0=e}Le.prototype.$tag=2;const x={$tag:0};function Re(e){this._0=e}Re.prototype.$tag=1;const ze=()=>window.location.pathname,Be=()=>window.location.search,Ve=e=>window.history.pushState(null,``,e),He=e=>window.history.replaceState(null,``,e),Ue=e=>window.addEventListener(`popstate`,()=>e());function S(e,t,n,r){this._0=e,this._1=t,this._2=n,this._3=r}S.prototype.$tag=0;function We(e,t,n){this._0=e,this._1=t,this._2=n}We.prototype.$tag=1;function Ge(e,t){this._0=e,this._1=t}Ge.prototype.$tag=2;function Ke(e,t){this._0=e,this._1=t}Ke.prototype.$tag=3;const qe=()=>void 0,Je={method_0:Dt,method_1:Ot,method_2:Rt,method_3:ut},Ye={val:0},C={current_subscriber:void 0,current_owner:void 0,current_cleanups:e,batch_depth:0,pending_effects:[],pending_ids:[]},Xe={val:0};function Ze(e){return r()}function Qe(e){return r()}function $e(e){return r()}function et(e){return r()}function tt(e){r()}function nt(e){return r()}function rt(e,t){return e===0?t===0:t===1}function it(e,t){return Ze(`${e}\n at ${j(t)}\n`)}function at(e,t){return Qe(`${e}\n at ${j(t)}\n`)}function ot(e,t){return $e(`${e}\n at ${j(t)}\n`)}function st(e,t){return et(`${e}\n at ${j(t)}\n`)}function ct(e,t){tt(`${e}\n at ${j(t)}\n`)}function lt(e,t){return nt(`${e}\n at ${j(t)}\n`)}function w(e){return{val:``}}function ut(e,t){let n=e;n.val=`${n.val}${String.fromCodePoint(t)}`}function dt(e,t){return(((Math.imul(e-55296|0,1024)|0)+t|0)-56320|0)+65536|0}function ft(e,t){return!rt(e,t)}function pt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function mt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function ht(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function gt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function _t(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function vt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function yt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function T(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function bt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function xt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0,c=0;for(;;){let e=c;if(e<s){let n=t.str,a=t.start+e|0,s=n.charCodeAt(a)&255;i(o,s),o[s]=(r-1|0)-e|0,c=e+1|0;continue}else break}let l=0;for(;;){let a=l;if(a<=(n-r|0)){let n=r-1|0,s=0;for(;;){let r=s;if(r<=n){let n=a+r|0,i=e.str,o=e.start+n|0,c=i.charCodeAt(o),l=t.str,u=t.start+r|0;if(c!==l.charCodeAt(u))break;s=r+1|0;continue}else return a}let c=(a+r|0)-1|0,u=e.str,d=e.start+c|0,f=u.charCodeAt(d)&255;i(o,f),l=a+o[f]|0;continue}else break}return}else return;else return 0}function St(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0,c=0;for(;c<=s;){for(;;){let t;if(c<=s){let n=c,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){c=c+1|0;continue}else break}if(c<=s){let n=1;for(;;){let i=n;if(i<r){let r=c+i|0,a=e.str,o=e.start+r|0,s=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(s!==l.charCodeAt(u))break;n=i+1|0;continue}else return c}c=c+1|0}}return}else return;else return 0}function E(e,t){return(t.end-t.start|0)<=4?St(e,t):xt(e,t)}function Ct(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0;for(;;){let e=s;if(e>0){let n=t.str,r=t.start+e|0,a=n.charCodeAt(r)&255;i(o,a),o[a]=e,s=e-1|0;continue}else break}let c=n-r|0;for(;;){let n=c;if(n>=0){let a=0;for(;;){let i=a;if(i<r){let r=n+i|0,o=e.str,s=e.start+r|0,c=o.charCodeAt(s),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;a=i+1|0;continue}else return n}let s=e.str,l=e.start+n|0,u=s.charCodeAt(l)&255;i(o,u),c=n-o[u]|0;continue}else break}return}else return;else return n}function wt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0;for(;s>=0;){for(;;){let t;if(s>=0){let n=s,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){s=s-1|0;continue}else break}if(s>=0){let n=1;for(;;){let i=n;if(i<r){let r=s+i|0,a=e.str,o=e.start+r|0,c=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;n=i+1|0;continue}else return s}s=s-1|0}}return}else return;else return n}function D(e,t){return(t.end-t.start|0)<=4?wt(e,t):Ct(e,t)}function O(e,t,n){let r;return r=n===void 0?e.end-e.start|0:n,t>=0&&t<=r&&r<=(e.end-e.start|0)?{str:e.str,start:e.start+t|0,end:e.start+r|0}:st(`Invalid index for View`,`@moonbitlang/core/builtin:stringview.mbt:111:5-111:36`)}function Tt(e){let t=E(e,{str:`:`,start:0,end:1});if(t!==void 0){let n=t;return n>0&&(n+1|0)<(e.end-e.start|0)?{_0:O(e,0,n),_1:O(e,n+1|0,void 0)}:void 0}}function Et(e){_L:if(Pt(e,1,0,e.length))if(e.charCodeAt(0)===64){let t=Lt(e,1,0,e.length),n;n=t===void 0?e.length:t;let i={str:e,start:n,end:e.length},a=E(i,{str:`:`,start:0,end:1});if(a===void 0)return r();{let e=a,t=O(i,0,e),n=D(i,{str:`-`,start:0,end:1});if(n===void 0)return r();{let a=n;if((a+1|0)<(i.end-i.start|0)){let n=Tt(O(i,a+1|0,void 0));if(n===void 0)return r();{let o=n,s=o._0,c=o._1,l=O(i,0,a);_L$2:{let n=D(l,{str:`:`,start:0,end:1});if(n===void 0)break _L$2;{let i=D(O(l,0,n),{str:`:`,start:0,end:1});if(i===void 0)break _L$2;{let n=i;if((n+1|0)<(l.end-l.start|0)){let i=Tt(O(l,n+1|0,void 0));if(i===void 0)return r();{let a=i,o=a._0,u=a._1;return n>(e+1|0)?{pkg:t,filename:O(l,e+1|0,n),start_line:o,start_column:u,end_line:s,end_column:c}:r()}}else return r()}}}return r()}}else return r()}}}else break _L;else break _L;return r()}function Dt(e,t){let n=e;n.val=`${n.val}${t}`}function k(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;if(a>=0&&a<=i&&i<=r){let t;if(a<r){let n=e.charCodeAt(a);t=56320<=n&&n<=57343}else t=!1;if(t)return new o(l);let n;if(i<r){let t=e.charCodeAt(i);n=56320<=t&&t<=57343}else n=!1;return n?new o(l):new s({str:e,start:a,end:i})}else return new o(c)}function Ot(e,t,n,i){let a;_L:{_L$2:{let e=k(t,n,n+i|0);if(e.$tag===1)a=e._0;else{e._0;break _L$2}break _L}a=r()}Rt(e,a)}function A(e){let t=w(0);return en(e,{self:t,method_table:Je}),t.val}function j(e){let t=w(0);return cn(e,{self:t,method_table:Je}),t.val}function kt(e,t){return u(e,t)}function M(e){return e.str.substring(e.start,e.end)}function At(e){return e()}function jt(e){return e()}function Mt(e){return t=>{for(;;){let n=At(e);if(n===void 0)return 1;if(t(n)!==1)return 0}}}function Nt(e){return t=>{for(;;){let n=jt(e);if(n===-1)return 1;if(t(n)!==1)return 0}}}function N(e){let t=w(Math.imul(e.end-e.start|0,4)|0),n=e.end-e.start|0,r=0;for(;;){let i=r;if(i<n){let n=e.buf[e.start+i|0];ut(t,n),r=i+1|0;continue}else break}return t.val}function Pt(e,t,n,r){let i;i=r===void 0?e.length:r;let a=n,o=0;for(;;){let n=a,r=o;if(n<i&&r<t){let t=e.charCodeAt(n);if(55296<=t&&t<=56319&&(n+1|0)<i){let t=n+1|0,i=e.charCodeAt(t);if(56320<=i&&i<=57343){a=n+2|0,o=r+1|0;continue}else ct(`invalid surrogate pair`,`@moonbitlang/core/builtin:string.mbt:491:9-491:40`)}a=n+1|0,o=r+1|0;continue}else return r>=t}}function Ft(e,t,n,r){let i=0,a=r;for(;(a-1|0)>=n&&i<t;){let t=a-1|0,n=e.charCodeAt(t);a=56320<=n&&n<=57343?a-2|0:a-1|0,i=i+1|0}return i<t||a<n?void 0:a}function It(e,t,n,r){if(n>=0&&n<=r){let i=n,a=0;for(;i<r&&a<t;){let t=i,n=e.charCodeAt(t);i=55296<=n&&n<=56319?i+2|0:i+1|0,a=a+1|0}return a<t||i>=r?void 0:i}else return lt(`Invalid start index`,`@moonbitlang/core/builtin:string.mbt:366:5-366:33`)}function Lt(e,t,n,r){let i;return i=r===void 0?e.length:r,t>=0?It(e,t,n,i):Ft(e,-t|0,n,i)}function Rt(e,t){let n=e;n.val=`${n.val}${M(t)}`}function zt(e,t){let n=D(e,t);return n===void 0?!1:n===((e.end-e.start|0)-(t.end-t.start|0)|0)}function P(e,t){return zt({str:e,start:0,end:e.length},t)}function Bt(e,t){let n=E(e,t);return n===void 0?!1:n===0}function F(e,t){return Bt({str:e,start:0,end:e.length},t)}function Vt(e){return[]}function I(e,t){d(e,t)}function Ht(e,t){d(e,t)}function Ut(e,t){d(e,t)}function Wt(e,t){d(e,t)}function Gt(e,t){d(e,t)}function Kt(e,t){d(e,t)}function qt(e,t){d(e,t)}function Jt(e,t){d(e,t)}function L(e,t){d(e,t)}function R(e,t){d(e,t)}function z(e,t){d(e,t)}function Yt(e){let t=e.length,n={val:0};return()=>{if(n.val<t){let r=n.val,i=e.charCodeAt(r);if(55296<=i&&i<=56319&&(n.val+1|0)<t){let t=n.val+1|0,r=e.charCodeAt(t);if(56320<=r&&r<=57343){let e=dt(i,r);return n.val=n.val+2|0,e}}return n.val=n.val+1|0,i}else return-1}}function Xt(e){return Nt(Yt(e))}function Zt(e,t){return e(t)}function Qt(e){return String.fromCodePoint(e)}function $t(e){let t=Xt(e),n={val:Vt(e.length)},i={val:f};t(e=>{let t=n.val;return z(t,e),n.val=t,1});let a=i.val;switch(a.$tag){case 0:break;case 1:a._0;break;case 2:return a._0;case 3:r();break;default:r()}return n.val}function en(e,t){t.method_table.method_0(t.self,kt(e,10))}function tn(e){let t={val:0};return()=>{if(t.val<(e.end-e.start|0)){let n=e.buf[e.start+t.val|0];return t.val=t.val+1|0,n}else return}}function nn(e){return tn({buf:e,start:0,end:e.length})}function B(e){return Mt(nn(e))}function V(e,t){return ft(Zt(e,e=>t(e)?0:1),1)}function rn(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function an(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function on(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function sn(e,t){let n=e.pkg,r=E(n,{str:`/`,start:0,end:1}),i;if(r===void 0)i={_0:n,_1:void 0};else{let e=r,t=E(O(n,e+1|0,void 0),{str:`/`,start:0,end:1});if(t===void 0)i={_0:n,_1:void 0};else{let r=t,a=(e+1|0)+r|0;i={_0:O(n,0,a),_1:O(n,a+1|0,void 0)}}}let a=i._0,o=i._1;if(o!==void 0){let e=o;t.method_table.method_2(t.self,e),t.method_table.method_3(t.self,47)}t.method_table.method_2(t.self,e.filename),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_column),t.method_table.method_3(t.self,45),t.method_table.method_2(t.self,e.end_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.end_column),t.method_table.method_3(t.self,64),t.method_table.method_2(t.self,a)}function cn(e,t){sn(Et(e),t)}function ln(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;return a>=0&&a<=i&&i<=r?{buf:e,start:a,end:i}:ot(`View index out of bounds`,`@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38`)}function un(e,t){p(e,t)}function dn(e,t){p(e,t)}function fn(e,t){p(e,t)}function pn(e,t){p(e,t)}function mn(e,t){p(e,t)}function hn(e){return ae(e)}function gn(e){return e.length===0?-1:hn(e)}function _n(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return it(`index out of bounds: the len is from 0 to ${A(e.length)} but the index is ${A(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function vn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return at(`index out of bounds: the len is from 0 to ${A(e.length)} but the index is ${A(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function yn(e){return ie(e)}function bn(e){dn(e,0)}function xn(e){fn(e,0)}function Sn(e){mn(e,0)}function Cn(e){return ce(e)?pe:new h(e)}function wn(e){return ce(e)?me:new g(e)}function Tn(e){return ce(e)?he:new ge(e)}function En(e,t,n){return{mode:e,delegatesFocus:t,slotAssignment:n}}function Dn(e,t){return m(e,`attachShadow`,[fe([{_0:`mode`,_1:t.mode},{_0:`delegatesFocus`,_1:t.delegatesFocus},{_0:`slotAssignment`,_1:t.slotAssignment}])])}function H(e){return Cn(se(e,`parentNode`))}function U(e,t){return m(e,`appendChild`,[t])}function W(e,t){return m(e,`removeChild`,[t])}function On(e,t,n){if(n.$tag===1){let r=n._0;return m(e,`insertBefore`,[t,r])}else return m(e,`insertBefore`,[t,de()])}function kn(e,t){ue(e,`textContent`,t)}function An(e,t){ue(e,`className`,t)}function jn(e,t,n){m(e,`setAttribute`,[t,n])}function Mn(e,t){m(e,`removeAttribute`,[t])}function Nn(e,t){return wn(m(e,`querySelector`,[t]))}function Pn(e){return Tn(se(e,`body`))}function Fn(e){return m(e,`createDocumentFragment`,[])}function In(e,t){return m(e,`createComment`,[t])}function G(){let e=Ye.val;return Ye.val=e+1|0,e}function Ln(e){let t=C.current_owner;t!==void 0&&Ht(t.disposers,e)}function Rn(e){let t=e.length-1|0;for(;;){let n=t;if(n>=0){mt(e,n)(),t=n-1|0;continue}else break}bn(e)}function zn(e){let t=C.current_cleanups;return C.current_cleanups=e,t}function Bn(e,n){let r=zn(new t(e));n(),C.current_cleanups=r}function Vn(e,t){let n=C.current_subscriber;C.current_subscriber=e;let r=t();return C.current_subscriber=n,r}function Hn(e,t){let n=C.current_subscriber;C.current_subscriber=e,t(),C.current_subscriber=n}function K(e){let t={active:!0,cleanups:[]},n=G(),r={val:void 0},i=()=>{if(!t.active)return;Rn(t.cleanups);let n=r.val;n!==void 0&&Hn(n,()=>{Bn(t.cleanups,e)})};r.val={id:n,run:i},i();let a=()=>{t.active=!1,Rn(t.cleanups)};return Ln(a),a}function q(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Un(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Wn(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Gn(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Kn(e){return{value:e,subscribers:[]}}function qn(e){return{value:e,subscribers:[]}}function Jn(e){return{value:e,subscribers:[]}}function Yn(e){return{value:e,subscribers:[]}}function Xn(e){return Kn(e)}function Zn(e){return qn(e)}function Qn(e){return Jn(e)}function $n(e){return Yn(e)}function er(e){let t=C.pending_ids,n=t.length,r=0;for(;;){let i=r;if(i<n){if(t[i]===e)return!0;r=i+1|0;continue}else break}return!1}function J(e){if(C.batch_depth>0){if(er(e.id))return;Wt(C.pending_ids,e.id),I(C.pending_effects,e);return}else{let t=e.run;t();return}}function tr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function nr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function rr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function ir(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function ar(e,t){e.value=t,tr(e)}function Y(e,t){e.value=t,nr(e)}function or(e,t){e.value=t,rr(e)}function sr(e,t){e.value=t,ir(e)}function cr(e,t){e.value=t(e.value),tr(e)}function lr(e){let t=G(),n={value:Se,dirty:!0,subscribers:[]},r={val:void 0};return r.val={id:t,run:()=>{if(!n.dirty){n.dirty=!0;let e=n.subscribers,t=e.length,r=0;for(;;){let n=r;if(n<t){let t=e[n];J(t),r=n+1|0;continue}else return}}}},()=>{let t=C.current_subscriber;if(t!==void 0){let e=t;V(B(n.subscribers),t=>t.id===e.id)||I(n.subscribers,e)}if(n.dirty){let t=r.val;t===void 0||(n.value=new v(Vn(t,e)),n.dirty=!1)}let i=n.value;if(i.$tag===1)return i._0;{let t=e();return n.value=new v(t),t}}}function ur(e,t){let n=e.subscribers,r=n.length,i=0,a=0;for(;;){let e=i,o=a;if(e<r){let r=n[e];if(r.id!==t){n[o]=r,i=e+1|0,a=o+1|0;continue}i=e+1|0;continue}else{un(n,o);return}}}function dr(e,t){let n=G(),r={val:!0},i={id:n,run:()=>{if(r.val){t(e.value);return}else return}};return I(e.subscribers,i),()=>{r.val=!1,ur(e,n)}}function fr(e){return e.$tag===0}function pr(e){return e.$tag===1}function mr(e){return e.$tag===2}function hr(e){if(e.$tag===1){let t=e._0;return new v(t)}else return Se}function gr(e){if(e.$tag===2)return e._0}function _r(e){return Gn(e.state)}function vr(e){return e.state.value}function yr(e){let t=e.state;return fr(t.value)}function br(e){let t=e.state;return pr(t.value)}function xr(e){let t=e.state;return mr(t.value)}function Sr(e){let t=e.state;return hr(t.value)}function Cr(e){let t=e.state;return gr(t.value)}function wr(e){let t=e.refetch_;t()}function Tr(e){let t=Zn(y),n=e=>{Y(t,new Ce(e))},r=e=>{Y(t,new we(e))},i=()=>{Y(t,y),e(n,r)};return i(),{state:t,refetch_:i}}function Er(){let e=Zn(y);return{_0:{state:e,refetch_:()=>{Y(e,y)}},_1:t=>{Y(e,new Ce(t))},_2:t=>{Y(e,new we(t))}}}function Dr(e){let t=Xe.val;return Xe.val=t+1|0,{id:t,default_value:()=>e,providers:[]}}function Or(e,t){let n=t;for(;;){let t=n;if(t===void 0)return!1;{let r=t;if(r.id===e)return!r.disposed;n=r.parent;continue}}}function kr(e,t){let n=e.providers.length-1|0;for(;;){let r=n;if(r>=0){let i=gt(e.providers,r),a=i._0,o=i._1;if(Or(a,t))return o;n=r-1|0;continue}else break}}function Ar(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function jr(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function Mr(e){if(e.disposed)return;e.disposed=!0;let t=e.children.length-1|0;for(;;){let n=t;if(n>=0){Mr(ht(e.children,n)),t=n-1|0;continue}else break}let n=e.disposers.length-1|0;for(;;){let t=n;if(t>=0){mt(e.disposers,t)(),n=t-1|0;continue}else break}let r=e.cleanups.length-1|0;for(;;){let t=r;if(t>=0){mt(e.cleanups,t)(),r=t-1|0;continue}else break}xn(e.children),bn(e.disposers),bn(e.cleanups);let i=e.parent;if(i!==void 0){let t=i.children,n=t.length,r=0,a=0;for(;;){let i=r,o=a;if(i<n){let n=t[i];if(n.id!==e.id){t[o]=n,r=i+1|0,a=o+1|0;continue}r=i+1|0;continue}else{fn(t,o);return}}}}function Nr(e){let t={id:G(),parent:e,children:[],cleanups:[],disposers:[],disposed:!1};return e===void 0||Gt(e.children,t),t}function Pr(e){let t=Nr(C.current_owner),n=()=>{Mr(t)};return Ar(t,()=>e(n))}function Fr(e,t,n){let r=C.current_owner,i=Nr(r),a=i.id;return Kt(e.providers,{_0:a,_1:()=>t}),Ht(i.cleanups,()=>{let t=e.providers,n=t.length,r=0,i=0;for(;;){let e=r,o=i;if(e<n){let n=t[e];if(n._0!==a){t[o]=n,r=e+1|0,i=o+1|0;continue}r=e+1|0;continue}else{pn(t,o);return}}}),Ar(i,n)}function Ir(e,t,n){return C.current_owner===void 0?Pr(r=>Fr(e,t,n)):Fr(e,t,n)}function Lr(e){let t=C.current_owner,n=kr(e,t);if(n===void 0){let t=e.default_value;return t()}else return n()}function Rr(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=e();return C.current_subscriber=t,n}function zr(e){let t=C.current_subscriber;C.current_subscriber=void 0,e(),C.current_subscriber=t}function Br(e){zr(e)}function Vr(){C.batch_depth=C.batch_depth+1|0}function Hr(){for(;;)if(C.pending_effects.length>0){let e=_n(C.pending_effects,0);vn(C.pending_ids,0);let t=e.run;t();continue}else return}function Ur(){if(C.batch_depth=C.batch_depth-1|0,C.batch_depth===0){Hr();return}else return}function Wr(e){Vr();let t=e();return Ur(),t}function Gr(e){let t=C.current_cleanups;if(t.$tag===1){let n=t._0;Ht(n,e);return}else return}function Kr(e,t){return lr(()=>t(q(e)))}function qr(e,t,n){return lr(()=>n(q(e),q(t)))}function X(e,t){let n=[],r=$t(e),i=[],a=r.length,o=0;for(;;){let e=o;if(e<a){let a=r[e];a===t?(L(n,N({buf:i,start:0,end:i.length})),Sn(i)):z(i,a),o=e+1|0;continue}else break}return L(n,N({buf:i,start:0,end:i.length})),n}function Jr(e){let t=xe(_(),e());return K(()=>{kn(t,e())}),new Ee(t)}function Yr(e,t,n){if(t===`className`){An(e,n);return}else if(t===`value`){ue(e,`value`,n);return}else if(t===`checked`){ue(e,`checked`,n===`true`);return}else if(t===`disabled`)if(n===`true`){jn(e,`disabled`,``);return}else{Mn(e,`disabled`);return}else{jn(e,t,n);return}}function Xr(e,t){jn(e,`style`,t)}function Zr(e,t,n){switch(n.$tag){case 0:{let r=n._0;if(t===`style`){Xr(e,r);return}else{Yr(e,t,r);return}}case 1:{let r=n._0;K(()=>{let n=r();if(t===`style`){Xr(e,n);return}else{Yr(e,t,n);return}});return}default:{let r=n._0;if(t===`__ref`){r(e);return}else{Oe(e,t,r);return}}}}function Qr(e){return{inner:e}}function Z(e){switch(e.$tag){case 0:return e._0.inner;case 1:return e._0;case 2:return e._0;default:return e._0}}function $r(e,t,n){let r=ye(_(),e),i=t.length,a=0;for(;;){let e=a;if(e<i){let n=t[e],i=n._0,o=n._1;Zr(r,i,o),a=e+1|0;continue}else break}let o=n.length,s=0;for(;;){let e=s;if(e<o){let t=n[e];U(r,Z(t)),s=e+1|0;continue}else break}return new Te(Qr(r))}function ei(e,t){U(e,Z(t))}function ti(e){kn(e,``)}function ni(e,t){ti(e),ei(e,t)}function ri(e){switch(e.length){case 0:return new b(Fn(_()));case 1:return pt(e,0);default:{let t=Fn(_()),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];U(t,Z(n)),r=i+1|0;continue}else break}return new b(t)}}}function ii(e,t){let n=In(_(),`show`),r=C.current_owner,i=e(),a;if(i){let e;e=r===void 0?t():jr(r,t),a=new h(Z(e))}else a=pe;let o={val:a};if(K(()=>{let i=e(),a=o.val;if(i===!0)if(a.$tag===0){let e=H(n);if(e.$tag===1){let i=e._0,a;a=r===void 0?t():jr(r,t),On(i,Z(a),new h(n)),o.val=new h(Z(a));return}else return}else return;else if(a.$tag===1){let e=a._0,t=H(e);if(t.$tag===1){let n=t._0;W(n,e),o.val=pe;return}else return}else return}),a.$tag===1){let e=a._0;return ri([new b(e),new b(n)])}else return new b(n)}function ai(e,t){return ke(e,t)}function oi(e,t){let n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];if(ai(n.item,t))return i;r=i+1|0;continue}else break}return-1}function si(e,t,n){if(n.$tag===1){let r=n._0;return Ae(e,t,r)}else return je(e,t)}function ci(e,t,n,r,i){let a=n.length;if(a===0){let n=t.length,r=0;for(;;){let i=r;if(i<n){let n=t[i];W(e,n.dom),r=i+1|0;continue}else break}return[]}let o=[],s=0;for(;;){let e=s;if(e<a){Ut(o,{item:_t(n,0),dom:i}),s=e+1|0;continue}else break}let c=rn(t.length,!1),l=i,u=a-1|0;for(;;){let i=u;if(i>=0){let a=_t(n,i),s=oi(t,a);if(s>=0){let n=vt(t,s);an(c,s,!0),Me(n.dom,l)||si(e,n.dom,new h(l)),l=n.dom,on(o,i,n)}else{let t=r(a,i);On(e,t,new h(l)),l=t,on(o,i,{item:a,dom:t})}u=i-1|0;continue}else break}let d=t.length,f=0;for(;;){let n=f;if(n<d){let r=t[n];yt(c,n)||W(e,r.dom),f=n+1|0;continue}else break}return o}function li(e,t,n,r){let i=H(t);if(i.$tag===1){let a=i._0;e.val=ci(a,e.val,n,r,t);return}else return}function ui(e,t){return{item:e,dom:t}}function di(e,t){let n=_(),r=In(n,`for`),i={val:[]},a={val:!0},o=C.current_owner,s=(e,n)=>Z(o===void 0?t(e,n):jr(o,()=>t(e,n))),c=Fn(n),l=e(),u=l.length,d=0;for(;;){let e=d;if(e<u){let t=l[e],n=s(t,e);Ut(i.val,ui(t,n)),U(c,n),d=e+1|0;continue}else break}return U(c,r),K(()=>{let t=e();if(a.val){a.val=!1;return}li(i,r,t,s)}),new b(c)}function fi(e){return new Ee(xe(_(),e))}function pi(e){return new b(e)}function mi(){return le()}function hi(e){return fi(e)}function gi(e){return Jr(e)}function _i(e,t,n){return $r(e,t,n)}function vi(e,t,n){return $r(e,t,n)}function yi(e,t){let n=Kn(e.value),r={val:Ne};return dr(e,e=>{let i=r.val;if(i.$tag===1){let e=i._0;ve(e)}r.val=new Pe(_e(()=>{ar(n,e)},t))}),n}function bi(e){switch(e.$tag){case 0:return e._0;case 1:return e._0;default:return e._0}}function xi(){return{mount:me,use_shadow:!1,is_svg:!1}}function Si(e){return{mount:new g(e),use_shadow:!1,is_svg:!1}}function Ci(){return{mount:me,use_shadow:!0,is_svg:!1}}function wi(e,t){let n=_(),r=e.mount,i;if(r.$tag===1)i=r._0;else{let e=Pn(n);i=e.$tag===1?e._0:ye(n,`div`)}let a=e.is_svg?be(n,`http://www.w3.org/2000/svg`,`g`):ye(n,`div`),o;e.use_shadow?(U(Dn(i,En(`open`,!1,`named`)),a),o=a):(U(i,a),o=a);let s=[],c=t.length,l=0;for(;;){let e=l;if(e<c){let n=t[e],r=bi(n);U(o,r),qt(s,r),l=e+1|0;continue}else break}return Gr(()=>{let e=s.length,t=0;for(;;){let n=t;if(n<e){let e=s[n],r=H(e);if(r.$tag===1){let t=r._0;W(t,e)}t=n+1|0;continue}else break}let n=H(a);if(n.$tag===1){let e=n._0;W(e,a);return}else return}),new Le(In(n,`portal`))}function Ti(e){return wi(xi(),e)}function Ei(e,t){let n=Nn(_(),e),r;if(n.$tag===1){let e=n._0;r=Si(e)}else r=xi();return wi(r,t)}function Di(e){return wi(Ci(),e)}function Oi(e,t){return wi({mount:new g(e),use_shadow:!0,is_svg:!1},t)}function ki(e){if(e!==``){let t=[],n=X(e,38),r=n.length,i=0;for(;;){let e=i;if(e<r){let r=n[e],a=X(r,61);if(a.length===2)R(t,{_0:T(a,0),_1:T(a,1)});else{let e;e=a.length===1?T(a,0)!==``:!1,e&&R(t,{_0:T(a,0),_1:``})}i=e+1|0;continue}else break}return t}else return[]}function Ai(e){let t=$t(e),n=-1,r=t.length,i=0;for(;;){let e=i;if(e<r){if(t[e]===63){n=e;break}i=e+1|0;continue}else break}return n===-1?{_0:e,_1:[]}:{_0:N(ln(t,0,n)),_1:ki(N(ln(t,n+1|0,void 0)))}}function ji(e){return F(e,{str:`[`,start:0,end:1})&&P(e,{str:`]`,start:0,end:1})&&!F(e,{str:`[...`,start:0,end:4})&&!F(e,{str:`[[...`,start:0,end:5})}function Mi(e){if(e.length===0)return``;let t=w(0),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];i>0&&Dt(t,`/`),Dt(t,n),r=i+1|0;continue}else break}return t.val}function Ni(e){let t=X(e,47),n=[],r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];r!==``&&L(n,r),i=e+1|0;continue}else break}return n}function Pi(e,t){let n=Qt(t);return F(e,{str:n,start:0,end:n.length})}function Fi(e,t){let n=Ni(t.pattern),r=Ni(e),i=t.catch_all;if(i===void 0){if(n.length!==r.length)return x;let e=[],i=0,a=n.length,o=0;for(;;){let s=o;if(s<a){let a=n[s],c=T(r,s);if(Pi(a,58)||ji(a))if(i<t.param_names.length)R(e,{_0:T(t.param_names,i),_1:c}),i=i+1|0;else return x;else if(a!==c)return x;o=s+1|0;continue}else break}return new Re(e)}else{let e=i,a=n.length-1|0,o=r.length;if(e.optional){if(o<a)return x}else if(o<=a)return x;let s=[],c=0,l=0;for(;;){let e=l;if(e<a){let i=T(n,e),a=T(r,e);if(Pi(i,58)||ji(i))if(c<t.param_names.length)R(s,{_0:T(t.param_names,c),_1:a}),c=c+1|0;else return x;else if(i!==a)return x;l=e+1|0;continue}else break}let u=[],d=a;for(;;){let e=d;if(e<o){L(u,T(r,e)),d=e+1|0;continue}else break}let f=Mi(u);return R(s,{_0:e.name,_1:f}),new Re(s)}}function Ii(e,t){let n=Ai(e),r=n._0,i=n._1,a=t.length,o=0;for(;;){let e=o;if(e<a){let n=t[e],a=Fi(r,n);if(a.$tag===1)return{route:n,params:a._0,query:i,path:r};o=e+1|0;continue}else break}}function Li(e){if(e===``||e===`/`)return`/`;let t=$t(e),n=[],r=!1,i=t.length,a=0;for(;;){let e=a;if(e<i){let i=t[e];i===47?(r||z(n,i),r=!0):(z(n,i),r=!1),a=e+1|0;continue}else break}let o=n.length;return o>1&&bt(n,o-1|0)===47&&gn(n),N({buf:n,start:0,end:n.length})}function Ri(e){let t=[],n=X(e,47),r=n.length,i=0;for(;;){let e=i;if(e<r){_L:{let r=n[e];if(F(r,{str:`:`,start:0,end:1})&&r.length>1){let e;_L$2:{_L$3:{let t=k(r,1,void 0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=M(n);break _L$2}break _L}L(t,e)}else if(F(r,{str:`[`,start:0,end:1})&&!F(r,{str:`[...`,start:0,end:4})&&!F(r,{str:`[[...`,start:0,end:5})&&P(r,{str:`]`,start:0,end:1})&&r.length>2){let e;_L$2:{_L$3:{let t=k(r,1,r.length-1|0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=M(n);break _L$2}break _L}L(t,e)}break _L}i=e+1|0;continue}else break}return t}function zi(e){let t=X(e,47);if(t.length===0)return;let n=T(t,t.length-1|0);if(F(n,{str:`[[...`,start:0,end:5})&&P(n,{str:`]]`,start:0,end:2})&&n.length>7){let e;_L:{_L$2:{let t=k(n,5,n.length-2|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=M(r);break _L}return}return{name:e,optional:!0}}if(F(n,{str:`[...`,start:0,end:4})&&P(n,{str:`]`,start:0,end:1})&&n.length>5){let e;_L:{_L$2:{let t=k(n,4,n.length-1|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=M(r);break _L}return}return{name:e,optional:!1}}}function Bi(e,t,n,r){let i=e.length,a=0;for(;;){let o=a;if(o<i){let i=e[o];switch(i.$tag){case 0:{let e=i,a=e._0,o=e._1,s=e._2,c=e._3,l=Li(`${t}${a}`),u=Ri(l),d=zi(l);Jt(r,{pattern:l,param_names:u,component:o,layouts:yn(n),kind:0,title:s,meta:c,catch_all:d});break}case 2:{let e=i,n=e._0,a=e._1,o=Li(`${t}${n}`);Jt(r,{pattern:o,param_names:Ri(o),component:a,layouts:[],kind:1,title:``,meta:[],catch_all:zi(o)});break}case 3:{let e=i,n=e._0,a=e._1,o=Li(`${t}${n}`);Jt(r,{pattern:o,param_names:Ri(o),component:a,layouts:[],kind:2,title:``,meta:[],catch_all:zi(o)});break}default:{let e=i,a=e._0,o=e._1,s=e._2,c=Li(`${t}${a}`),l=yn(n);L(l,s),Bi(o,c,l,r)}}a=o+1|0;continue}else return}}function Vi(e,t){let n=[];return Bi(e,t,[],n),n}function Hi(){let e=ze(),t=Be();return t===``?e:`${e}${t}`}function Ui(e){let t=Hi();or(e.current_path,t),sr(e.current_match,Ii(t,e.routes))}function Wi(e,t){let n=Vi(e,t),r=Hi(),i=Ii(r,n),a={routes:n,base:t,current_path:Qn(r),current_match:$n(i)};return Ue(()=>{Ui(a)}),a}function Gi(e,t){or(e.current_path,t),sr(e.current_match,Ii(t,e.routes))}function Ki(e,t){Ve(t),Gi(e,t)}function qi(e,t){He(t),Gi(e,t)}function Ji(e){return Un(e.current_path)}function Yi(e){return Wn(e.current_match)}function Xi(e){return Xn(e)}function Zi(e){return q(e)}function Q(e,t){ar(e,t)}function Qi(e,t){cr(e,t)}function $i(e){return e.value}function ea(e,t){return dr(e,t)}function ta(e,t){return Kr(e,t)}function na(e){return lr(e)}function ra(e,t,n){return qr(e,t,n)}function ia(e){return K(e)}function aa(){Vr()}function oa(){Ur()}function sa(e){return Rr(e)}function ca(e){return Wr(e)}function la(e){Gr(e)}function ua(e){return Pr(e)}function da(){let e=C.current_owner;if(e!==void 0)return e}function fa(e,t){return Ar(e,t)}function pa(){return C.current_owner!==void 0}function ma(e){Br(e)}function ha(e,t){return di(e,t)}function ga(e){return hi(e)}function _a(e){return gi(e)}function va(e,t){ni(e,t)}function ya(e,t){ei(e,t)}function ba(e,t){return ii(e,t)}function xa(e,t,n){return _i(e,t,n)}function Sa(e,t,n){return vi(e,t,n)}function Ca(e){return ri(e)}function wa(e,t,n){return $r(e,t,n)}function Ta(){return mi()}function Ea(e,t){return yi(e,t)}function Da(e,t){return new S(e,t,``,[])}function Oa(e,t,n){return new S(e,t,n,[])}function ka(e,t,n,r){return new S(e,t,n,r)}function Aa(e,t){return Wi(e,t)}function ja(e,t){let n;return n=t===void 0?``:t,Aa(e,n)}function Ma(e,t){Ki(e,t)}function Na(e,t){qi(e,t)}function Pa(e){return Ji(e)}function Fa(e){return Yi(e)}function Ia(e){return e.base}function La(e){return Dr(e)}function Ra(e,t,n){return Ir(e,t,n)}function za(e){return Lr(e)}function Ba(e){return Tr(e)}function Va(){let e=Er();return{_0:e._0,_1:e._1,_2:e._2}}function Ha(e){return _r(e)}function Ua(e){return vr(e)}function Wa(e){wr(e)}function Ga(e){return yr(e)}function Ka(e){return br(e)}function qa(e){return xr(e)}function Ja(e){let t=Sr(e);return t.$tag===1?t._0:qe()}function Ya(e){let t=Cr(e);return t===void 0?``:t}function Xa(e){return fr(e)}function Za(e){return pr(e)}function Qa(e){return mr(e)}function $a(e){let t=hr(e);return t.$tag===1?t._0:qe()}function eo(e){let t=gr(e);return t===void 0?``:t}function to(e){return new Le(Z(e))}function $(e){return pi(bi(e))}function no(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=to(n),r=i+1|0;continue}else break}return $(Ti(t))}function ro(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=to(r),i=e+1|0;continue}else break}return $(Ei(e,n))}function io(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=to(n),r=i+1|0;continue}else break}return $(Di(t))}function ao(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=to(r),i=e+1|0;continue}else break}return $(Oi(e,n))}function oo(e){let t=Xi(e);return[()=>Zi(t),e=>{typeof e==`function`?Qi(t,e):Q(t,e)}]}function so(e){return ia(e)}function co(e){return na(e)}function lo(e,t,n={}){let{defer:r=!1}=n,i=Array.isArray(e),a,o,s=!0;return n=>{let c=i?e.map(e=>e()):e();if(r&&s){s=!1,a=c;return}let l=t(c,a,n??o);return a=c,o=l,s=!1,l}}function uo(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(e.startsWith(`on`)&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=(...e)=>{n(...e),r(...e)}:t[e]=r}else if(e===`ref`&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=e=>{n(e),r(e)}:t[e]=r}else if(e===`class`||e===`className`){let n=t[e];n?t[e]=`${n} ${r}`:t[e]=r}else e===`style`&&typeof r==`object`&&typeof t[e]==`object`?t[e]={...t[e],...r}:t[e]=r}return t}function fo(e,...t){let n=[],r={...e};for(let e of t){let t={};for(let n of e)n in r&&(t[n]=r[n],delete r[n]);n.push(t)}return n.push(r),n}function po(e){let t=Ba(e),n=()=>$a(Ha(t));return Object.defineProperties(n,{loading:{get:()=>Ga(t)},error:{get:()=>Ya(t)},state:{get:()=>Ga(t)?`pending`:Ka(t)?`ready`:qa(t)?`errored`:`unresolved`},latest:{get:()=>Ua(t)}}),[n,{refetch:()=>Wa(t)}]}function mo(){let e=Va(),t=e._0,n=e._1,r=e._2,i=()=>$a(Ha(t));return Object.defineProperties(i,{loading:{get:()=>Ga(t)},error:{get:()=>Ya(t)}}),[i,n,r]}function ho(e,t){let[n]=e,r=Xi(n()),i=Ea(r,t);return[()=>Zi(i),e=>Q(r,e)]}function go(e){let{each:t,fallback:n,children:r}=e;return t?ha(typeof t==`function`?t:()=>t,(e,t)=>r(e,()=>t)):n??null}function _o(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return ba(()=>!!r(),typeof n==`function`?()=>n(r()):()=>n)}function vo(e){let{each:t,fallback:n,children:r}=e;if(!t)return n??null;let i=typeof t==`function`?t:()=>t;return i().length===0&&n?n:ha(i,(e,t)=>r(()=>i()[t],t))}function yo(e){let{context:t,value:n,children:r}=e;return Ra(t,n,()=>typeof r==`function`?r():r)}function bo(e){let{fallback:t,children:n}=e;if(!Array.isArray(n))return t??null;for(let e of n)if(e&&e.__isMatch&&e.when())return typeof e.children==`function`?e.children():e.children;return t??null}function xo(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return{__isMatch:!0,when:()=>!!r(),children:typeof n==`function`?()=>n(r()):n}}function So(e){let{mount:t,useShadow:n=!1,children:r}=e,i=typeof r==`function`?[r()]:Array.isArray(r)?r:[r];if(n){if(typeof t==`string`){let e=document.querySelector(t);if(e)return ao(e,i)}else if(t)return ao(t,i);return io(i)}return typeof t==`string`?ro(t,i):no(i)}function Co(e){let t=new Map,n=structuredClone(e);function r(e){let r=e.join(`.`);if(!t.has(r)){let a=i(n,e);t.set(r,Xi(a))}return t.get(r)}function i(e,t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function a(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(r[n]==null){let i=t[e+1];r[n]=typeof i==`number`||/^\d+$/.test(i)?[]:{}}r=r[n]}r[t[t.length-1]]=n}function o(e){let r=e.join(`.`);aa();try{for(let[e,a]of t.entries())(e===r||e.startsWith(r+`.`))&&Q(a,i(n,e.split(`.`)))}finally{oa()}}function s(e,t=[]){return typeof e!=`object`||!e?e:new Proxy(e,{get(e,n){if(typeof n==`symbol`)return e[n];let i=[...t,n];Zi(r(i));let a=e[n];return typeof a==`object`&&a?s(a,i):a},set(e,n,r){let i=[...t,n];return e[n]=r,o(i),!0}})}function c(...e){if(e.length===0)return;let r=[],s=0;for(;s<e.length-1&&typeof e[s]==`string`;)r.push(e[s]),s++;let c=e[s];if(r.length===0&&typeof c==`object`&&c){Object.assign(n,c);for(let[e,r]of t.entries())Q(r,i(n,e.split(`.`)));return}let l=i(n,r),u;u=typeof c==`function`?c(l):Array.isArray(c)?c:typeof c==`object`&&c&&typeof l==`object`&&l&&!Array.isArray(l)?{...l,...c}:c,a(n,r,u),o(r)}return[s(n),c]}function wo(e){return t=>{let n=structuredClone(t);return e(n),n}}function To(e){return()=>e}export{Ua as $,ha as A,ma as B,ra as C,za as Ct,ja as D,ua as E,xa as F,io as G,no as H,Sa as I,Ya as J,Ra as K,ta as L,Zi as M,da as N,ia as O,pa as P,Ka as Q,ya as R,aa as S,Qi as St,wa as T,ao as U,$i as V,ro as W,qa as X,Ha as Y,Ga as Z,wo as _,Za as _t,yo as a,Ia as at,ca as b,ga as bt,mo as c,Ma as ct,po as d,fa as dt,Wa as et,oo as f,Q as ft,lo as g,Xa as gt,uo as h,Qa as ht,So as i,Oa as it,Ca as j,Ta as k,so as l,Na as lt,ho as m,eo as mt,vo as n,Da as nt,_o as o,Fa as ot,Co as p,ba as pt,va as q,xo as r,ka as rt,bo as s,Pa as st,go as t,Ja as tt,co as u,sa as ut,To as v,$a as vt,La as w,oa as x,_a as xt,fo as y,ea as yt,la as z};
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luna_ui/luna",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Fine-grained reactive UI library for Moonbit/JS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"@luna_ui/luna": "./dist/cli.mjs",
|
|
10
|
+
"luna": "./dist/cli.mjs"
|
|
11
|
+
},
|
|
8
12
|
"exports": {
|
|
9
13
|
".": {
|
|
10
14
|
"types": "./dist/index.d.ts",
|
|
@@ -19,6 +23,12 @@
|
|
|
19
23
|
"import": "./dist/jsx-dev-runtime.js"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"prepublishOnly": "pnpm build",
|
|
28
|
+
"build": "tsdown",
|
|
29
|
+
"test": "vitest run --root ../..",
|
|
30
|
+
"build:examples": "vite build examples"
|
|
31
|
+
},
|
|
22
32
|
"devDependencies": {
|
|
23
33
|
"global-jsdom": "^27.0.0",
|
|
24
34
|
"jsdom": "^27.3.0",
|
|
@@ -31,10 +41,5 @@
|
|
|
31
41
|
},
|
|
32
42
|
"files": [
|
|
33
43
|
"dist"
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
"build": "tsdown",
|
|
37
|
-
"test": "vitest run",
|
|
38
|
-
"build:examples": "vite build examples"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
44
|
+
]
|
|
45
|
+
}
|
package/dist/src-C-OpUndy.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={$tag:0};function t(e){this._0=e}t.prototype.$tag=1;var n=class extends Error{};function r(){throw new n}function i(e,t){if(t<0||t>=e.length)throw Error(`Index out of bounds`)}function a(e,t){let n=Array(e);return n.fill(t),n}function o(e){this._0=e}o.prototype.$tag=0;function s(e){this._0=e}s.prototype.$tag=1;const c={$tag:1},l={$tag:0},u=(e,t)=>e.toString(t),d=(e,t)=>{e.push(t)},f={$tag:0};function ee(e){this._0=e}ee.prototype.$tag=1;function te(e){this._0=e}te.prototype.$tag=2;function ne(e){this._0=e}ne.prototype.$tag=3;function re(e){this._0=e}re.prototype.$tag=4;const ie=e=>e.slice(0),p=(e,t)=>{e.length=t},ae=e=>e.pop(),oe=(e,t,n)=>e.splice(t,n),se=(e,t)=>e[t],m=(e,t,n)=>e[t](...n),ce=e=>e==null,le=()=>({}),ue=(e,t,n)=>{e[t]=n},de=()=>null,fe=e=>Object.fromEntries(e.map(e=>[e._0,e._1])),pe={$tag:0};function h(e){this._0=e}h.prototype.$tag=1;const me={$tag:0};function g(e){this._0=e}g.prototype.$tag=1;const he={$tag:0};function ge(e){this._0=e}ge.prototype.$tag=1;const _e=(e,t)=>setTimeout(e,t),ve=e=>clearTimeout(e),_=()=>document,ye=(e,t)=>e.createElement(t),be=(e,t,n)=>e.createElementNS(t,n),xe=(e,t)=>e.createTextNode(t),Se={$tag:0};function v(e){this._0=e}v.prototype.$tag=1;const y={$tag:0};function Ce(e){this._0=e}Ce.prototype.$tag=1;function we(e){this._0=e}we.prototype.$tag=2;const b={$tag:0};function Te(e){this._0=e}Te.prototype.$tag=1;function Ee(e){this._0=e}Ee.prototype.$tag=0;function De(e){this._0=e}De.prototype.$tag=1;function x(e){this._0=e}x.prototype.$tag=2;const Oe=(e,t,n)=>e.addEventListener(t,n),ke=(e,t)=>e===t,Ae=(e,t,n)=>typeof e.moveBefore==`function`?(e.moveBefore(t,n),t):e.insertBefore(t,n),je=(e,t)=>typeof e.moveBefore==`function`?(e.moveBefore(t,null),t):e.insertBefore(t,null),Me=(e,t)=>e.nextSibling===t,Ne={$tag:0};function Pe(e){this._0=e}Pe.prototype.$tag=1;function Fe(e){this._0=e}Fe.prototype.$tag=0;function Ie(e){this._0=e}Ie.prototype.$tag=1;function Le(e){this._0=e}Le.prototype.$tag=2;const Re=()=>window.location.pathname,ze=()=>window.location.search,Be=e=>window.history.pushState(null,``,e),Ve=e=>window.history.replaceState(null,``,e),He=e=>window.addEventListener(`popstate`,()=>e());function S(e,t,n,r){this._0=e,this._1=t,this._2=n,this._3=r}S.prototype.$tag=0;function Ue(e,t,n){this._0=e,this._1=t,this._2=n}Ue.prototype.$tag=1;function We(e,t){this._0=e,this._1=t}We.prototype.$tag=2;function Ge(e,t){this._0=e,this._1=t}Ge.prototype.$tag=3;const Ke=()=>void 0,qe={method_0:Et,method_1:Dt,method_2:Lt,method_3:lt},Je={val:0},C={current_subscriber:void 0,current_owner:void 0,current_cleanups:e,batch_depth:0,pending_effects:[],pending_ids:[]},Ye={val:0};function Xe(e){return r()}function Ze(e){return r()}function Qe(e){return r()}function $e(e){return r()}function et(e){r()}function tt(e){return r()}function nt(e,t){return e===0?t===0:t===1}function rt(e,t){return Xe(`${e}\n at ${j(t)}\n`)}function it(e,t){return Ze(`${e}\n at ${j(t)}\n`)}function at(e,t){return Qe(`${e}\n at ${j(t)}\n`)}function ot(e,t){return $e(`${e}\n at ${j(t)}\n`)}function st(e,t){et(`${e}\n at ${j(t)}\n`)}function ct(e,t){return tt(`${e}\n at ${j(t)}\n`)}function w(e){return{val:``}}function lt(e,t){let n=e;n.val=`${n.val}${String.fromCodePoint(t)}`}function ut(e,t){return(((Math.imul(e-55296|0,1024)|0)+t|0)-56320|0)+65536|0}function dt(e,t){return!nt(e,t)}function ft(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function pt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function mt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function ht(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function gt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function _t(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function vt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function T(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function yt(e,t){let n=e.length;return t>=0&&t<n?(i(e,t),e[t]):r()}function bt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0,c=0;for(;;){let e=c;if(e<s){let n=t.str,a=t.start+e|0,s=n.charCodeAt(a)&255;i(o,s),o[s]=(r-1|0)-e|0,c=e+1|0;continue}else break}let l=0;for(;;){let a=l;if(a<=(n-r|0)){let n=r-1|0,s=0;for(;;){let r=s;if(r<=n){let n=a+r|0,i=e.str,o=e.start+n|0,c=i.charCodeAt(o),l=t.str,u=t.start+r|0;if(c!==l.charCodeAt(u))break;s=r+1|0;continue}else return a}let c=(a+r|0)-1|0,u=e.str,d=e.start+c|0,f=u.charCodeAt(d)&255;i(o,f),l=a+o[f]|0;continue}else break}return}else return;else return 0}function xt(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0,c=0;for(;c<=s;){for(;;){let t;if(c<=s){let n=c,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){c=c+1|0;continue}else break}if(c<=s){let n=1;for(;;){let i=n;if(i<r){let r=c+i|0,a=e.str,o=e.start+r|0,s=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(s!==l.charCodeAt(u))break;n=i+1|0;continue}else return c}c=c+1|0}}return}else return;else return 0}function E(e,t){return(t.end-t.start|0)<=4?xt(e,t):bt(e,t)}function St(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let o=a(256,r),s=r-1|0;for(;;){let e=s;if(e>0){let n=t.str,r=t.start+e|0,a=n.charCodeAt(r)&255;i(o,a),o[a]=e,s=e-1|0;continue}else break}let c=n-r|0;for(;;){let n=c;if(n>=0){let a=0;for(;;){let i=a;if(i<r){let r=n+i|0,o=e.str,s=e.start+r|0,c=o.charCodeAt(s),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;a=i+1|0;continue}else return n}let s=e.str,l=e.start+n|0,u=s.charCodeAt(l)&255;i(o,u),c=n-o[u]|0;continue}else break}return}else return;else return n}function Ct(e,t){let n=e.end-e.start|0,r=t.end-t.start|0;if(r>0)if(n>=r){let i=t.str,a=t.start+0|0,o=i.charCodeAt(a),s=n-r|0;for(;s>=0;){for(;;){let t;if(s>=0){let n=s,r=e.str,i=e.start+n|0;t=r.charCodeAt(i)!==o}else t=!1;if(t){s=s-1|0;continue}else break}if(s>=0){let n=1;for(;;){let i=n;if(i<r){let r=s+i|0,a=e.str,o=e.start+r|0,c=a.charCodeAt(o),l=t.str,u=t.start+i|0;if(c!==l.charCodeAt(u))break;n=i+1|0;continue}else return s}s=s-1|0}}return}else return;else return n}function D(e,t){return(t.end-t.start|0)<=4?Ct(e,t):St(e,t)}function O(e,t,n){let r;return r=n===void 0?e.end-e.start|0:n,t>=0&&t<=r&&r<=(e.end-e.start|0)?{str:e.str,start:e.start+t|0,end:e.start+r|0}:ot(`Invalid index for View`,`@moonbitlang/core/builtin:stringview.mbt:111:5-111:36`)}function wt(e){let t=E(e,{str:`:`,start:0,end:1});if(t!==void 0){let n=t;return n>0&&(n+1|0)<(e.end-e.start|0)?{_0:O(e,0,n),_1:O(e,n+1|0,void 0)}:void 0}}function Tt(e){_L:if(Nt(e,1,0,e.length))if(e.charCodeAt(0)===64){let t=It(e,1,0,e.length),n;n=t===void 0?e.length:t;let i={str:e,start:n,end:e.length},a=E(i,{str:`:`,start:0,end:1});if(a===void 0)return r();{let e=a,t=O(i,0,e),n=D(i,{str:`-`,start:0,end:1});if(n===void 0)return r();{let a=n;if((a+1|0)<(i.end-i.start|0)){let n=wt(O(i,a+1|0,void 0));if(n===void 0)return r();{let o=n,s=o._0,c=o._1,l=O(i,0,a);_L$2:{let n=D(l,{str:`:`,start:0,end:1});if(n===void 0)break _L$2;{let i=D(O(l,0,n),{str:`:`,start:0,end:1});if(i===void 0)break _L$2;{let n=i;if((n+1|0)<(l.end-l.start|0)){let i=wt(O(l,n+1|0,void 0));if(i===void 0)return r();{let a=i,o=a._0,u=a._1;return n>(e+1|0)?{pkg:t,filename:O(l,e+1|0,n),start_line:o,start_column:u,end_line:s,end_column:c}:r()}}else return r()}}}return r()}}else return r()}}}else break _L;else break _L;return r()}function Et(e,t){let n=e;n.val=`${n.val}${t}`}function k(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;if(a>=0&&a<=i&&i<=r){let t;if(a<r){let n=e.charCodeAt(a);t=56320<=n&&n<=57343}else t=!1;if(t)return new o(l);let n;if(i<r){let t=e.charCodeAt(i);n=56320<=t&&t<=57343}else n=!1;return n?new o(l):new s({str:e,start:a,end:i})}else return new o(c)}function Dt(e,t,n,i){let a;_L:{_L$2:{let e=k(t,n,n+i|0);if(e.$tag===1)a=e._0;else{e._0;break _L$2}break _L}a=r()}Lt(e,a)}function A(e){let t=w(0);return $t(e,{self:t,method_table:qe}),t.val}function j(e){let t=w(0);return sn(e,{self:t,method_table:qe}),t.val}function Ot(e,t){return u(e,t)}function M(e){return e.str.substring(e.start,e.end)}function kt(e){return e()}function At(e){return e()}function jt(e){return t=>{for(;;){let n=kt(e);if(n===void 0)return 1;if(t(n)!==1)return 0}}}function Mt(e){return t=>{for(;;){let n=At(e);if(n===-1)return 1;if(t(n)!==1)return 0}}}function N(e){let t=w(Math.imul(e.end-e.start|0,4)|0),n=e.end-e.start|0,r=0;for(;;){let i=r;if(i<n){let n=e.buf[e.start+i|0];lt(t,n),r=i+1|0;continue}else break}return t.val}function Nt(e,t,n,r){let i;i=r===void 0?e.length:r;let a=n,o=0;for(;;){let n=a,r=o;if(n<i&&r<t){let t=e.charCodeAt(n);if(55296<=t&&t<=56319&&(n+1|0)<i){let t=n+1|0,i=e.charCodeAt(t);if(56320<=i&&i<=57343){a=n+2|0,o=r+1|0;continue}else st(`invalid surrogate pair`,`@moonbitlang/core/builtin:string.mbt:491:9-491:40`)}a=n+1|0,o=r+1|0;continue}else return r>=t}}function Pt(e,t,n,r){let i=0,a=r;for(;(a-1|0)>=n&&i<t;){let t=a-1|0,n=e.charCodeAt(t);a=56320<=n&&n<=57343?a-2|0:a-1|0,i=i+1|0}return i<t||a<n?void 0:a}function Ft(e,t,n,r){if(n>=0&&n<=r){let i=n,a=0;for(;i<r&&a<t;){let t=i,n=e.charCodeAt(t);i=55296<=n&&n<=56319?i+2|0:i+1|0,a=a+1|0}return a<t||i>=r?void 0:i}else return ct(`Invalid start index`,`@moonbitlang/core/builtin:string.mbt:366:5-366:33`)}function It(e,t,n,r){let i;return i=r===void 0?e.length:r,t>=0?Ft(e,t,n,i):Pt(e,-t|0,n,i)}function Lt(e,t){let n=e;n.val=`${n.val}${M(t)}`}function Rt(e,t){let n=D(e,t);return n===void 0?!1:n===((e.end-e.start|0)-(t.end-t.start|0)|0)}function P(e,t){return Rt({str:e,start:0,end:e.length},t)}function zt(e,t){let n=E(e,t);return n===void 0?!1:n===0}function F(e,t){return zt({str:e,start:0,end:e.length},t)}function Bt(e){return[]}function I(e,t){d(e,t)}function Vt(e,t){d(e,t)}function Ht(e,t){d(e,t)}function Ut(e,t){d(e,t)}function Wt(e,t){d(e,t)}function Gt(e,t){d(e,t)}function Kt(e,t){d(e,t)}function qt(e,t){d(e,t)}function L(e,t){d(e,t)}function R(e,t){d(e,t)}function z(e,t){d(e,t)}function Jt(e){let t=e.length,n={val:0};return()=>{if(n.val<t){let r=n.val,i=e.charCodeAt(r);if(55296<=i&&i<=56319&&(n.val+1|0)<t){let t=n.val+1|0,r=e.charCodeAt(t);if(56320<=r&&r<=57343){let e=ut(i,r);return n.val=n.val+2|0,e}}return n.val=n.val+1|0,i}else return-1}}function Yt(e){return Mt(Jt(e))}function Xt(e,t){return e(t)}function Zt(e){return String.fromCodePoint(e)}function Qt(e){let t=Yt(e),n={val:Bt(e.length)},i={val:f};t(e=>{let t=n.val;return z(t,e),n.val=t,1});let a=i.val;switch(a.$tag){case 0:break;case 1:a._0;break;case 2:return a._0;case 3:r();break;default:r()}return n.val}function $t(e,t){t.method_table.method_0(t.self,Ot(e,10))}function en(e){let t={val:0};return()=>{if(t.val<(e.end-e.start|0)){let n=e.buf[e.start+t.val|0];return t.val=t.val+1|0,n}else return}}function tn(e){return en({buf:e,start:0,end:e.length})}function B(e){return jt(tn(e))}function V(e,t){return dt(Xt(e,e=>t(e)?0:1),1)}function nn(e,t){let n=Array(e),r=0;for(;;){let i=r;if(i<e){n[i]=t,r=i+1|0;continue}else break}return n}function rn(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function an(e,t,n){let a=e.length;if(t>=0&&t<a){i(e,t),e[t]=n;return}else{r();return}}function on(e,t){let n=e.pkg,r=E(n,{str:`/`,start:0,end:1}),i;if(r===void 0)i={_0:n,_1:void 0};else{let e=r,t=E(O(n,e+1|0,void 0),{str:`/`,start:0,end:1});if(t===void 0)i={_0:n,_1:void 0};else{let r=t,a=(e+1|0)+r|0;i={_0:O(n,0,a),_1:O(n,a+1|0,void 0)}}}let a=i._0,o=i._1;if(o!==void 0){let e=o;t.method_table.method_2(t.self,e),t.method_table.method_3(t.self,47)}t.method_table.method_2(t.self,e.filename),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.start_column),t.method_table.method_3(t.self,45),t.method_table.method_2(t.self,e.end_line),t.method_table.method_3(t.self,58),t.method_table.method_2(t.self,e.end_column),t.method_table.method_3(t.self,64),t.method_table.method_2(t.self,a)}function sn(e,t){on(Tt(e),t)}function cn(e,t,n){let r=e.length,i;if(n===void 0)i=r;else{let e=n;i=e<0?r+e|0:e}let a=t<0?r+t|0:t;return a>=0&&a<=i&&i<=r?{buf:e,start:a,end:i}:at(`View index out of bounds`,`@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38`)}function ln(e,t){p(e,t)}function un(e,t){p(e,t)}function dn(e,t){p(e,t)}function fn(e,t){p(e,t)}function pn(e,t){p(e,t)}function mn(e){return ae(e)}function hn(e){return e.length===0?-1:mn(e)}function gn(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return rt(`index out of bounds: the len is from 0 to ${A(e.length)} but the index is ${A(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function _n(e,t){if(t>=0&&t<e.length){i(e,t);let n=e[t];return oe(e,t,1),n}else return it(`index out of bounds: the len is from 0 to ${A(e.length)} but the index is ${A(t)}`,`@moonbitlang/core/builtin:arraycore_js.mbt:241:5-243:6`)}function vn(e){return ie(e)}function yn(e){un(e,0)}function bn(e){dn(e,0)}function xn(e){pn(e,0)}function Sn(e){return ce(e)?pe:new h(e)}function Cn(e){return ce(e)?me:new g(e)}function wn(e){return ce(e)?he:new ge(e)}function Tn(e,t,n){return{mode:e,delegatesFocus:t,slotAssignment:n}}function En(e,t){return m(e,`attachShadow`,[fe([{_0:`mode`,_1:t.mode},{_0:`delegatesFocus`,_1:t.delegatesFocus},{_0:`slotAssignment`,_1:t.slotAssignment}])])}function H(e){return Sn(se(e,`parentNode`))}function U(e,t){return m(e,`appendChild`,[t])}function W(e,t){return m(e,`removeChild`,[t])}function Dn(e,t,n){if(n.$tag===1){let r=n._0;return m(e,`insertBefore`,[t,r])}else return m(e,`insertBefore`,[t,de()])}function On(e,t){ue(e,`textContent`,t)}function kn(e,t){ue(e,`className`,t)}function An(e,t,n){m(e,`setAttribute`,[t,n])}function jn(e,t){m(e,`removeAttribute`,[t])}function Mn(e,t){return Cn(m(e,`querySelector`,[t]))}function Nn(e){return wn(se(e,`body`))}function Pn(e){return m(e,`createDocumentFragment`,[])}function Fn(e,t){return m(e,`createComment`,[t])}function G(){let e=Je.val;return Je.val=e+1|0,e}function In(e){let t=C.current_owner;t!==void 0&&Vt(t.disposers,e)}function Ln(e){let t=e.length-1|0;for(;;){let n=t;if(n>=0){pt(e,n)(),t=n-1|0;continue}else break}yn(e)}function Rn(e){let t=C.current_cleanups;return C.current_cleanups=e,t}function zn(e,n){let r=Rn(new t(e));n(),C.current_cleanups=r}function Bn(e,t){let n=C.current_subscriber;C.current_subscriber=e;let r=t();return C.current_subscriber=n,r}function Vn(e,t){let n=C.current_subscriber;C.current_subscriber=e,t(),C.current_subscriber=n}function K(e){let t={active:!0,cleanups:[]},n=G(),r={val:void 0},i=()=>{if(!t.active)return;Ln(t.cleanups);let n=r.val;n!==void 0&&Vn(n,()=>{zn(t.cleanups,e)})};r.val={id:n,run:i},i();let a=()=>{t.active=!1,Ln(t.cleanups)};return In(a),a}function q(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Hn(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Un(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Wn(e){let t=C.current_subscriber;if(t!==void 0){let n=t;V(B(e.subscribers),e=>e.id===n.id)||I(e.subscribers,n)}return e.value}function Gn(e){return{value:e,subscribers:[]}}function Kn(e){return{value:e,subscribers:[]}}function qn(e){return{value:e,subscribers:[]}}function Jn(e){return{value:e,subscribers:[]}}function Yn(e){return Gn(e)}function Xn(e){return Kn(e)}function Zn(e){return qn(e)}function Qn(e){return Jn(e)}function $n(e){let t=C.pending_ids,n=t.length,r=0;for(;;){let i=r;if(i<n){if(t[i]===e)return!0;r=i+1|0;continue}else break}return!1}function J(e){if(C.batch_depth>0){if($n(e.id))return;Ut(C.pending_ids,e.id),I(C.pending_effects,e);return}else{let t=e.run;t();return}}function er(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function tr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function nr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function rr(e){let t=e.subscribers,n=t.length,r=0;for(;;){let e=r;if(e<n){let n=t[e];J(n),r=e+1|0;continue}else return}}function ir(e,t){e.value=t,er(e)}function Y(e,t){e.value=t,tr(e)}function ar(e,t){e.value=t,nr(e)}function or(e,t){e.value=t,rr(e)}function sr(e,t){e.value=t(e.value),er(e)}function cr(e){let t=G(),n={value:Se,dirty:!0,subscribers:[]},r={val:void 0};return r.val={id:t,run:()=>{if(!n.dirty){n.dirty=!0;let e=n.subscribers,t=e.length,r=0;for(;;){let n=r;if(n<t){let t=e[n];J(t),r=n+1|0;continue}else return}}}},()=>{let t=C.current_subscriber;if(t!==void 0){let e=t;V(B(n.subscribers),t=>t.id===e.id)||I(n.subscribers,e)}if(n.dirty){let t=r.val;t===void 0||(n.value=new v(Bn(t,e)),n.dirty=!1)}let i=n.value;if(i.$tag===1)return i._0;{let t=e();return n.value=new v(t),t}}}function lr(e,t){let n=e.subscribers,r=n.length,i=0,a=0;for(;;){let e=i,o=a;if(e<r){let r=n[e];if(r.id!==t){n[o]=r,i=e+1|0,a=o+1|0;continue}i=e+1|0;continue}else{ln(n,o);return}}}function ur(e,t){let n=G(),r={val:!0},i={id:n,run:()=>{if(r.val){t(e.value);return}else return}};return I(e.subscribers,i),()=>{r.val=!1,lr(e,n)}}function dr(e){return e.$tag===0}function fr(e){return e.$tag===1}function pr(e){return e.$tag===2}function mr(e){if(e.$tag===1){let t=e._0;return new v(t)}else return Se}function hr(e){if(e.$tag===2)return e._0}function gr(e){return Wn(e.state)}function _r(e){return e.state.value}function vr(e){let t=e.state;return dr(t.value)}function yr(e){let t=e.state;return fr(t.value)}function br(e){let t=e.state;return pr(t.value)}function xr(e){let t=e.state;return mr(t.value)}function Sr(e){let t=e.state;return hr(t.value)}function Cr(e){let t=e.refetch_;t()}function wr(e){let t=Xn(y),n=e=>{Y(t,new Ce(e))},r=e=>{Y(t,new we(e))},i=()=>{Y(t,y),e(n,r)};return i(),{state:t,refetch_:i}}function Tr(){let e=Xn(y);return{_0:{state:e,refetch_:()=>{Y(e,y)}},_1:t=>{Y(e,new Ce(t))},_2:t=>{Y(e,new we(t))}}}function Er(e){let t=Ye.val;return Ye.val=t+1|0,{id:t,default_value:()=>e,providers:[]}}function Dr(e,t){let n=t;for(;;){let t=n;if(t===void 0)return!1;{let r=t;if(r.id===e)return!r.disposed;n=r.parent;continue}}}function Or(e,t){let n=e.providers.length-1|0;for(;;){let r=n;if(r>=0){let i=ht(e.providers,r),a=i._0,o=i._1;if(Dr(a,t))return o;n=r-1|0;continue}else break}}function kr(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function Ar(e,t){let n=C.current_owner;C.current_owner=e;let r=t();return C.current_owner=n,r}function jr(e){if(e.disposed)return;e.disposed=!0;let t=e.children.length-1|0;for(;;){let n=t;if(n>=0){jr(mt(e.children,n)),t=n-1|0;continue}else break}let n=e.disposers.length-1|0;for(;;){let t=n;if(t>=0){pt(e.disposers,t)(),n=t-1|0;continue}else break}let r=e.cleanups.length-1|0;for(;;){let t=r;if(t>=0){pt(e.cleanups,t)(),r=t-1|0;continue}else break}bn(e.children),yn(e.disposers),yn(e.cleanups);let i=e.parent;if(i!==void 0){let t=i.children,n=t.length,r=0,a=0;for(;;){let i=r,o=a;if(i<n){let n=t[i];if(n.id!==e.id){t[o]=n,r=i+1|0,a=o+1|0;continue}r=i+1|0;continue}else{dn(t,o);return}}}}function Mr(e){let t={id:G(),parent:e,children:[],cleanups:[],disposers:[],disposed:!1};return e===void 0||Wt(e.children,t),t}function Nr(e){let t=Mr(C.current_owner),n=()=>{jr(t)};return kr(t,()=>e(n))}function Pr(e,t,n){let r=C.current_owner,i=Mr(r),a=i.id;return Gt(e.providers,{_0:a,_1:()=>t}),Vt(i.cleanups,()=>{let t=e.providers,n=t.length,r=0,i=0;for(;;){let e=r,o=i;if(e<n){let n=t[e];if(n._0!==a){t[o]=n,r=e+1|0,i=o+1|0;continue}r=e+1|0;continue}else{fn(t,o);return}}}),kr(i,n)}function Fr(e,t,n){return C.current_owner===void 0?Nr(r=>Pr(e,t,n)):Pr(e,t,n)}function Ir(e){let t=C.current_owner,n=Or(e,t);if(n===void 0){let t=e.default_value;return t()}else return n()}function Lr(e){let t=C.current_subscriber;C.current_subscriber=void 0;let n=e();return C.current_subscriber=t,n}function Rr(e){let t=C.current_subscriber;C.current_subscriber=void 0,e(),C.current_subscriber=t}function zr(e){Rr(e)}function Br(){C.batch_depth=C.batch_depth+1|0}function Vr(){for(;;)if(C.pending_effects.length>0){let e=gn(C.pending_effects,0);_n(C.pending_ids,0);let t=e.run;t();continue}else return}function Hr(){if(C.batch_depth=C.batch_depth-1|0,C.batch_depth===0){Vr();return}else return}function Ur(e){Br();let t=e();return Hr(),t}function Wr(e){let t=C.current_cleanups;if(t.$tag===1){let n=t._0;Vt(n,e);return}else return}function Gr(e,t){return cr(()=>t(q(e)))}function Kr(e,t,n){return cr(()=>n(q(e),q(t)))}function X(e,t){let n=[],r=Qt(e),i=[],a=r.length,o=0;for(;;){let e=o;if(e<a){let a=r[e];a===t?(L(n,N({buf:i,start:0,end:i.length})),xn(i)):z(i,a),o=e+1|0;continue}else break}return L(n,N({buf:i,start:0,end:i.length})),n}function qr(e){if(e!==``){let t=[],n=X(e,38),r=n.length,i=0;for(;;){let e=i;if(e<r){let r=n[e],a=X(r,61);if(a.length===2)R(t,{_0:T(a,0),_1:T(a,1)});else{let e;e=a.length===1?T(a,0)!==``:!1,e&&R(t,{_0:T(a,0),_1:``})}i=e+1|0;continue}else break}return t}else return[]}function Jr(e){let t=Qt(e),n=-1,r=t.length,i=0;for(;;){let e=i;if(e<r){if(t[e]===63){n=e;break}i=e+1|0;continue}else break}return n===-1?{_0:e,_1:[]}:{_0:N(cn(t,0,n)),_1:qr(N(cn(t,n+1|0,void 0)))}}function Yr(e){return F(e,{str:`[`,start:0,end:1})&&P(e,{str:`]`,start:0,end:1})&&!F(e,{str:`[...`,start:0,end:4})&&!F(e,{str:`[[...`,start:0,end:5})}function Xr(e){if(e.length===0)return``;let t=w(0),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];i>0&&Et(t,`/`),Et(t,n),r=i+1|0;continue}else break}return t.val}function Zr(e){let t=X(e,47),n=[],r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];r!==``&&L(n,r),i=e+1|0;continue}else break}return n}function Qr(e,t){let n=Zt(t);return F(e,{str:n,start:0,end:n.length})}function $r(e,t){let n=Zr(t.pattern),r=Zr(e),i=t.catch_all;if(i===void 0){if(n.length!==r.length)return b;let e=[],i=0,a=n.length,o=0;for(;;){let s=o;if(s<a){let a=n[s],c=T(r,s);if(Qr(a,58)||Yr(a))if(i<t.param_names.length)R(e,{_0:T(t.param_names,i),_1:c}),i=i+1|0;else return b;else if(a!==c)return b;o=s+1|0;continue}else break}return new Te(e)}else{let e=i,a=n.length-1|0,o=r.length;if(e.optional){if(o<a)return b}else if(o<=a)return b;let s=[],c=0,l=0;for(;;){let e=l;if(e<a){let i=T(n,e),a=T(r,e);if(Qr(i,58)||Yr(i))if(c<t.param_names.length)R(s,{_0:T(t.param_names,c),_1:a}),c=c+1|0;else return b;else if(i!==a)return b;l=e+1|0;continue}else break}let u=[],d=a;for(;;){let e=d;if(e<o){L(u,T(r,e)),d=e+1|0;continue}else break}let f=Xr(u);return R(s,{_0:e.name,_1:f}),new Te(s)}}function ei(e,t){let n=Jr(e),r=n._0,i=n._1,a=t.length,o=0;for(;;){let e=o;if(e<a){let n=t[e],a=$r(r,n);if(a.$tag===1)return{route:n,params:a._0,query:i,path:r};o=e+1|0;continue}else break}}function ti(e){if(e===``||e===`/`)return`/`;let t=Qt(e),n=[],r=!1,i=t.length,a=0;for(;;){let e=a;if(e<i){let i=t[e];i===47?(r||z(n,i),r=!0):(z(n,i),r=!1),a=e+1|0;continue}else break}let o=n.length;return o>1&&yt(n,o-1|0)===47&&hn(n),N({buf:n,start:0,end:n.length})}function ni(e){let t=[],n=X(e,47),r=n.length,i=0;for(;;){let e=i;if(e<r){_L:{let r=n[e];if(F(r,{str:`:`,start:0,end:1})&&r.length>1){let e;_L$2:{_L$3:{let t=k(r,1,void 0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=M(n);break _L$2}break _L}L(t,e)}else if(F(r,{str:`[`,start:0,end:1})&&!F(r,{str:`[...`,start:0,end:4})&&!F(r,{str:`[[...`,start:0,end:5})&&P(r,{str:`]`,start:0,end:1})&&r.length>2){let e;_L$2:{_L$3:{let t=k(r,1,r.length-1|0),n;if(t.$tag===1)n=t._0;else{t._0;break _L$3}e=M(n);break _L$2}break _L}L(t,e)}break _L}i=e+1|0;continue}else break}return t}function ri(e){let t=X(e,47);if(t.length===0)return;let n=T(t,t.length-1|0);if(F(n,{str:`[[...`,start:0,end:5})&&P(n,{str:`]]`,start:0,end:2})&&n.length>7){let e;_L:{_L$2:{let t=k(n,5,n.length-2|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=M(r);break _L}return}return{name:e,optional:!0}}if(F(n,{str:`[...`,start:0,end:4})&&P(n,{str:`]`,start:0,end:1})&&n.length>5){let e;_L:{_L$2:{let t=k(n,4,n.length-1|0),r;if(t.$tag===1)r=t._0;else{t._0;break _L$2}e=M(r);break _L}return}return{name:e,optional:!1}}}function ii(e,t,n,r){let i=e.length,a=0;for(;;){let o=a;if(o<i){let i=e[o];switch(i.$tag){case 0:{let e=i,a=e._0,o=e._1,s=e._2,c=e._3,l=ti(`${t}${a}`),u=ni(l),d=ri(l);qt(r,{pattern:l,param_names:u,component:o,layouts:vn(n),kind:0,title:s,meta:c,catch_all:d});break}case 2:{let e=i,n=e._0,a=e._1,o=ti(`${t}${n}`);qt(r,{pattern:o,param_names:ni(o),component:a,layouts:[],kind:1,title:``,meta:[],catch_all:ri(o)});break}case 3:{let e=i,n=e._0,a=e._1,o=ti(`${t}${n}`);qt(r,{pattern:o,param_names:ni(o),component:a,layouts:[],kind:2,title:``,meta:[],catch_all:ri(o)});break}default:{let e=i,a=e._0,o=e._1,s=e._2,c=ti(`${t}${a}`),l=vn(n);L(l,s),ii(o,c,l,r)}}a=o+1|0;continue}else return}}function ai(e,t){let n=[];return ii(e,t,[],n),n}function oi(e){let t=xe(_(),e());return K(()=>{On(t,e())}),new De(t)}function si(e,t,n){if(t===`className`){kn(e,n);return}else if(t===`value`){ue(e,`value`,n);return}else if(t===`checked`){ue(e,`checked`,n===`true`);return}else if(t===`disabled`)if(n===`true`){An(e,`disabled`,``);return}else{jn(e,`disabled`);return}else{An(e,t,n);return}}function ci(e,t){An(e,`style`,t)}function li(e,t,n){switch(n.$tag){case 0:{let r=n._0;if(t===`style`){ci(e,r);return}else{si(e,t,r);return}}case 1:{let r=n._0;K(()=>{let n=r();if(t===`style`){ci(e,n);return}else{si(e,t,n);return}});return}default:{let r=n._0;if(t===`__ref`){r(e);return}else{Oe(e,t,r);return}}}}function ui(e){return{inner:e}}function Z(e){switch(e.$tag){case 0:return e._0.inner;case 1:return e._0;default:return e._0}}function di(e,t,n){let r=ye(_(),e),i=t.length,a=0;for(;;){let e=a;if(e<i){let n=t[e],i=n._0,o=n._1;li(r,i,o),a=e+1|0;continue}else break}let o=n.length,s=0;for(;;){let e=s;if(e<o){let t=n[e];U(r,Z(t)),s=e+1|0;continue}else break}return new Ee(ui(r))}function fi(e,t){U(e,Z(t))}function pi(e){On(e,``)}function mi(e,t){pi(e),fi(e,t)}function hi(e){switch(e.length){case 0:return new x(Pn(_()));case 1:return ft(e,0);default:{let t=Pn(_()),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];U(t,Z(n)),r=i+1|0;continue}else break}return new x(t)}}}function gi(e,t){let n=Fn(_(),`show`),r=C.current_owner,i=e(),a;if(i){let e;e=r===void 0?t():Ar(r,t),a=new h(Z(e))}else a=pe;let o={val:a};if(K(()=>{let i=e(),a=o.val;if(i===!0)if(a.$tag===0){let e=H(n);if(e.$tag===1){let i=e._0,a;a=r===void 0?t():Ar(r,t),Dn(i,Z(a),new h(n)),o.val=new h(Z(a));return}else return}else return;else if(a.$tag===1){let e=a._0,t=H(e);if(t.$tag===1){let n=t._0;W(n,e),o.val=pe;return}else return}else return}),a.$tag===1){let e=a._0;return hi([new x(e),new x(n)])}else return new x(n)}function _i(e,t){return ke(e,t)}function vi(e,t){let n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];if(_i(n.item,t))return i;r=i+1|0;continue}else break}return-1}function yi(e,t,n){if(n.$tag===1){let r=n._0;return Ae(e,t,r)}else return je(e,t)}function bi(e,t,n,r,i){let a=n.length;if(a===0){let n=t.length,r=0;for(;;){let i=r;if(i<n){let n=t[i];W(e,n.dom),r=i+1|0;continue}else break}return[]}let o=[],s=0;for(;;){let e=s;if(e<a){Ht(o,{item:gt(n,0),dom:i}),s=e+1|0;continue}else break}let c=nn(t.length,!1),l=i,u=a-1|0;for(;;){let i=u;if(i>=0){let a=gt(n,i),s=vi(t,a);if(s>=0){let n=_t(t,s);rn(c,s,!0),Me(n.dom,l)||yi(e,n.dom,new h(l)),l=n.dom,an(o,i,n)}else{let t=r(a,i);Dn(e,t,new h(l)),l=t,an(o,i,{item:a,dom:t})}u=i-1|0;continue}else break}let d=t.length,f=0;for(;;){let n=f;if(n<d){let r=t[n];vt(c,n)||W(e,r.dom),f=n+1|0;continue}else break}return o}function xi(e,t,n,r){let i=H(t);if(i.$tag===1){let a=i._0;e.val=bi(a,e.val,n,r,t);return}else return}function Si(e,t){return{item:e,dom:t}}function Ci(e,t){let n=_(),r=Fn(n,`for`),i={val:[]},a={val:!0},o=C.current_owner,s=(e,n)=>Z(o===void 0?t(e,n):Ar(o,()=>t(e,n))),c=Pn(n),l=e(),u=l.length,d=0;for(;;){let e=d;if(e<u){let t=l[e],n=s(t,e);Ht(i.val,Si(t,n)),U(c,n),d=e+1|0;continue}else break}return U(c,r),K(()=>{let t=e();if(a.val){a.val=!1;return}xi(i,r,t,s)}),new x(c)}function wi(e){return new De(xe(_(),e))}function Ti(e){return new x(e)}function Ei(){return le()}function Di(e){return wi(e)}function Oi(e){return oi(e)}function ki(e,t,n){return di(e,t,n)}function Ai(e,t,n){return di(e,t,n)}function ji(e,t){let n=Gn(e.value),r={val:Ne};return ur(e,e=>{let i=r.val;if(i.$tag===1){let e=i._0;ve(e)}r.val=new Pe(_e(()=>{ir(n,e)},t))}),n}function Mi(e){switch(e.$tag){case 0:return e._0;case 1:return e._0;default:return e._0}}function Ni(){return{mount:me,use_shadow:!1,is_svg:!1}}function Pi(e){return{mount:new g(e),use_shadow:!1,is_svg:!1}}function Fi(){return{mount:me,use_shadow:!0,is_svg:!1}}function Ii(e,t){let n=_(),r=e.mount,i;if(r.$tag===1)i=r._0;else{let e=Nn(n);i=e.$tag===1?e._0:ye(n,`div`)}let a=e.is_svg?be(n,`http://www.w3.org/2000/svg`,`g`):ye(n,`div`),o;e.use_shadow?(U(En(i,Tn(`open`,!1,`named`)),a),o=a):(U(i,a),o=a);let s=[],c=t.length,l=0;for(;;){let e=l;if(e<c){let n=t[e],r=Mi(n);U(o,r),Kt(s,r),l=e+1|0;continue}else break}return Wr(()=>{let e=s.length,t=0;for(;;){let n=t;if(n<e){let e=s[n],r=H(e);if(r.$tag===1){let t=r._0;W(t,e)}t=n+1|0;continue}else break}let n=H(a);if(n.$tag===1){let e=n._0;W(e,a);return}else return}),new Le(Fn(n,`portal`))}function Li(e){return Ii(Ni(),e)}function Ri(e,t){let n=Mn(_(),e),r;if(n.$tag===1){let e=n._0;r=Pi(e)}else r=Ni();return Ii(r,t)}function zi(e){return Ii(Fi(),e)}function Bi(e,t){return Ii({mount:new g(e),use_shadow:!0,is_svg:!1},t)}function Vi(){let e=Re(),t=ze();return t===``?e:`${e}${t}`}function Hi(e){let t=Vi();ar(e.current_path,t),or(e.current_match,ei(t,e.routes))}function Ui(e,t){let n=ai(e,t),r=Vi(),i=ei(r,n),a={routes:n,base:t,current_path:Zn(r),current_match:Qn(i)};return He(()=>{Hi(a)}),a}function Wi(e,t){ar(e.current_path,t),or(e.current_match,ei(t,e.routes))}function Gi(e,t){Be(t),Wi(e,t)}function Ki(e,t){Ve(t),Wi(e,t)}function qi(e){return Hn(e.current_path)}function Ji(e){return Un(e.current_match)}function Yi(e){return Yn(e)}function Xi(e){return q(e)}function Q(e,t){ir(e,t)}function Zi(e,t){sr(e,t)}function Qi(e){return e.value}function $i(e,t){return ur(e,t)}function ea(e,t){return Gr(e,t)}function ta(e){return cr(e)}function na(e,t,n){return Kr(e,t,n)}function ra(e){return K(e)}function ia(){Br()}function aa(){Hr()}function oa(e){return Lr(e)}function sa(e){return Ur(e)}function ca(e){Wr(e)}function la(e){return Nr(e)}function ua(){let e=C.current_owner;if(e!==void 0)return e}function da(e,t){return kr(e,t)}function fa(){return C.current_owner!==void 0}function pa(e){zr(e)}function ma(e,t){return Ci(e,t)}function ha(e){return Di(e)}function ga(e){return Oi(e)}function _a(e,t){mi(e,t)}function va(e,t){fi(e,t)}function ya(e,t){return gi(e,t)}function ba(e,t,n){return ki(e,t,n)}function xa(e,t,n){return Ai(e,t,n)}function Sa(e){return hi(e)}function Ca(e,t,n){return di(e,t,n)}function wa(){return Ei()}function Ta(e,t){return ji(e,t)}function Ea(e,t){return new S(e,t,``,[])}function Da(e,t,n){return new S(e,t,n,[])}function Oa(e,t,n,r){return new S(e,t,n,r)}function ka(e,t){return Ui(e,t)}function Aa(e,t){let n;return n=t===void 0?``:t,ka(e,n)}function ja(e,t){Gi(e,t)}function Ma(e,t){Ki(e,t)}function Na(e){return qi(e)}function Pa(e){return Ji(e)}function Fa(e){return e.base}function Ia(e){return Er(e)}function La(e,t,n){return Fr(e,t,n)}function Ra(e){return Ir(e)}function za(e){return wr(e)}function Ba(){let e=Tr();return{_0:e._0,_1:e._1,_2:e._2}}function Va(e){return gr(e)}function Ha(e){return _r(e)}function Ua(e){Cr(e)}function Wa(e){return vr(e)}function Ga(e){return yr(e)}function Ka(e){return br(e)}function qa(e){let t=xr(e);return t.$tag===1?t._0:Ke()}function Ja(e){let t=Sr(e);return t===void 0?``:t}function Ya(e){return dr(e)}function Xa(e){return fr(e)}function Za(e){return pr(e)}function Qa(e){let t=mr(e);return t.$tag===1?t._0:Ke()}function $a(e){let t=hr(e);return t===void 0?``:t}function eo(e){return new Le(Z(e))}function $(e){return Ti(Mi(e))}function to(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=eo(n),r=i+1|0;continue}else break}return $(Li(t))}function no(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=eo(r),i=e+1|0;continue}else break}return $(Ri(e,n))}function ro(e){let t=Array(e.length),n=e.length,r=0;for(;;){let i=r;if(i<n){let n=e[i];t[i]=eo(n),r=i+1|0;continue}else break}return $(zi(t))}function io(e,t){let n=Array(t.length),r=t.length,i=0;for(;;){let e=i;if(e<r){let r=t[e];n[e]=eo(r),i=e+1|0;continue}else break}return $(Bi(e,n))}function ao(e){let t=Yi(e);return[()=>Xi(t),e=>{typeof e==`function`?Zi(t,e):Q(t,e)}]}function oo(e){return ra(e)}function so(e){return ta(e)}function co(e,t,n={}){let{defer:r=!1}=n,i=Array.isArray(e),a,o,s=!0;return n=>{let c=i?e.map(e=>e()):e();if(r&&s){s=!1,a=c;return}let l=t(c,a,n??o);return a=c,o=l,s=!1,l}}function lo(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e];if(e.startsWith(`on`)&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=(...e)=>{n(...e),r(...e)}:t[e]=r}else if(e===`ref`&&typeof r==`function`){let n=t[e];typeof n==`function`?t[e]=e=>{n(e),r(e)}:t[e]=r}else if(e===`class`||e===`className`){let n=t[e];n?t[e]=`${n} ${r}`:t[e]=r}else e===`style`&&typeof r==`object`&&typeof t[e]==`object`?t[e]={...t[e],...r}:t[e]=r}return t}function uo(e,...t){let n=[],r={...e};for(let e of t){let t={};for(let n of e)n in r&&(t[n]=r[n],delete r[n]);n.push(t)}return n.push(r),n}function fo(e){let t=za(e),n=()=>Qa(Va(t));return Object.defineProperties(n,{loading:{get:()=>Wa(t)},error:{get:()=>Ja(t)},state:{get:()=>Wa(t)?`pending`:Ga(t)?`ready`:Ka(t)?`errored`:`unresolved`},latest:{get:()=>Ha(t)}}),[n,{refetch:()=>Ua(t)}]}function po(){let e=Ba(),t=e._0,n=e._1,r=e._2,i=()=>Qa(Va(t));return Object.defineProperties(i,{loading:{get:()=>Wa(t)},error:{get:()=>Ja(t)}}),[i,n,r]}function mo(e,t){let[n]=e,r=Yi(n()),i=Ta(r,t);return[()=>Xi(i),e=>Q(r,e)]}function ho(e){let{each:t,fallback:n,children:r}=e;return t?ma(typeof t==`function`?t:()=>t,(e,t)=>r(e,()=>t)):n??null}function go(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return ya(()=>!!r(),typeof n==`function`?()=>n(r()):()=>n)}function _o(e){let{each:t,fallback:n,children:r}=e;if(!t)return n??null;let i=typeof t==`function`?t:()=>t;return i().length===0&&n?n:ma(i,(e,t)=>r(()=>i()[t],t))}function vo(e){let{context:t,value:n,children:r}=e;return La(t,n,()=>typeof r==`function`?r():r)}function yo(e){let{fallback:t,children:n}=e;if(!Array.isArray(n))return t??null;for(let e of n)if(e&&e.__isMatch&&e.when())return typeof e.children==`function`?e.children():e.children;return t??null}function bo(e){let{when:t,children:n}=e,r=typeof t==`function`?t:()=>t;return{__isMatch:!0,when:()=>!!r(),children:typeof n==`function`?()=>n(r()):n}}function xo(e){let{mount:t,useShadow:n=!1,children:r}=e,i=typeof r==`function`?[r()]:Array.isArray(r)?r:[r];if(n){if(typeof t==`string`){let e=document.querySelector(t);if(e)return io(e,i)}else if(t)return io(t,i);return ro(i)}return typeof t==`string`?no(t,i):to(i)}function So(e){let t=new Map,n=structuredClone(e);function r(e){let r=e.join(`.`);if(!t.has(r)){let a=i(n,e);t.set(r,Yi(a))}return t.get(r)}function i(e,t){let n=e;for(let e of t){if(n==null)return;n=n[e]}return n}function a(e,t,n){if(t.length===0)return;let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(r[n]==null){let i=t[e+1];r[n]=typeof i==`number`||/^\d+$/.test(i)?[]:{}}r=r[n]}r[t[t.length-1]]=n}function o(e){let r=e.join(`.`);ia();try{for(let[e,a]of t.entries())(e===r||e.startsWith(r+`.`))&&Q(a,i(n,e.split(`.`)))}finally{aa()}}function s(e,t=[]){return typeof e!=`object`||!e?e:new Proxy(e,{get(e,n){if(typeof n==`symbol`)return e[n];let i=[...t,n];Xi(r(i));let a=e[n];return typeof a==`object`&&a?s(a,i):a},set(e,n,r){let i=[...t,n];return e[n]=r,o(i),!0}})}function c(...e){if(e.length===0)return;let r=[],s=0;for(;s<e.length-1&&typeof e[s]==`string`;)r.push(e[s]),s++;let c=e[s];if(r.length===0&&typeof c==`object`&&c){Object.assign(n,c);for(let[e,r]of t.entries())Q(r,i(n,e.split(`.`)));return}let l=i(n,r),u;u=typeof c==`function`?c(l):Array.isArray(c)?c:typeof c==`object`&&c&&typeof l==`object`&&l&&!Array.isArray(l)?{...l,...c}:c,a(n,r,u),o(r)}return[s(n),c]}function Co(e){return t=>{let n=structuredClone(t);return e(n),n}}function wo(e){return()=>e}export{Ha as $,ma as A,pa as B,na as C,Ra as Ct,Aa as D,la as E,ba as F,ro as G,to as H,xa as I,Ja as J,La as K,ea as L,Xi as M,ua as N,ra as O,fa as P,Ga as Q,va as R,ia as S,Zi as St,Ca as T,io as U,Qi as V,no as W,Ka as X,Va as Y,Wa as Z,Co as _,Xa as _t,vo as a,Fa as at,sa as b,ha as bt,po as c,ja as ct,fo as d,da as dt,Ua as et,ao as f,Q as ft,co as g,Ya as gt,lo as h,Za as ht,xo as i,Da as it,Sa as j,wa as k,oo as l,Ma as lt,mo as m,$a as mt,_o as n,Ea as nt,go as o,Pa as ot,So as p,ya as pt,_a as q,bo as r,Oa as rt,yo as s,Na as st,ho as t,qa as tt,so as u,oa as ut,wo as v,Qa as vt,Ia as w,aa as x,ga as xt,uo as y,$i as yt,ca as z};
|