@jasonshimmy/custom-elements-runtime 0.1.1 → 0.1.3
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 +1 -0
- package/dist/custom-elements-runtime.cjs.js +58 -98
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1322 -1039
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +58 -98
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/directives.d.ts +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.spec.d.ts +1 -0
- package/dist/router.d.ts +12 -1
- package/dist/router.spec.d.ts +1 -0
- package/dist/runtime/component.d.ts +5 -0
- package/dist/runtime/helpers.d.ts +2 -0
- package/dist/runtime/lifecycle.d.ts +13 -0
- package/dist/runtime/props.d.ts +8 -0
- package/dist/runtime/render.d.ts +17 -0
- package/dist/runtime/render.spec.d.ts +1 -0
- package/dist/runtime/style.d.ts +61 -0
- package/dist/runtime/template-compiler.d.ts +26 -0
- package/dist/{runtime.d.ts → runtime/types.d.ts} +45 -32
- package/dist/runtime/vdom.d.ts +67 -0
- package/dist/runtime/vdom.edge.spec.d.ts +1 -0
- package/dist/runtime/vdom.spec.d.ts +1 -0
- package/dist/runtime/watchers.d.ts +13 -0
- package/package.json +5 -6
- package/dist/style-utils.d.ts +0 -11
- package/dist/template-compiler.d.ts +0 -6
- package/dist/vdom.d.ts +0 -34
|
@@ -1,20 +1,42 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function rt(e, t) {
|
|
2
|
+
return J(e ? t : [], "when-block");
|
|
3
|
+
}
|
|
4
|
+
function nt(e, t) {
|
|
5
|
+
return e.map((r, n) => {
|
|
6
|
+
const o = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
|
|
7
|
+
return J(t(r, n), `each-${o}`);
|
|
4
8
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
}
|
|
10
|
+
function be() {
|
|
11
|
+
const e = [];
|
|
12
|
+
return {
|
|
13
|
+
when(t, r) {
|
|
14
|
+
return e.push([t, r]), this;
|
|
15
|
+
},
|
|
16
|
+
otherwise(t) {
|
|
17
|
+
return e.push([!0, t]), this;
|
|
18
|
+
},
|
|
19
|
+
done() {
|
|
20
|
+
return ve(...e);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function ve(...e) {
|
|
25
|
+
for (let t = 0; t < e.length; t++) {
|
|
26
|
+
const [r, n] = e[t];
|
|
27
|
+
if (r) return [J(n, `whenChain-branch-${t}`)];
|
|
14
28
|
}
|
|
15
|
-
return
|
|
29
|
+
return [J([], "whenChain-empty")];
|
|
16
30
|
}
|
|
17
|
-
|
|
31
|
+
function J(e, t) {
|
|
32
|
+
const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
|
|
33
|
+
return {
|
|
34
|
+
tag: "#anchor",
|
|
35
|
+
key: t,
|
|
36
|
+
children: r
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
class P extends EventTarget {
|
|
18
40
|
handlers = {};
|
|
19
41
|
static instance;
|
|
20
42
|
eventCounters = /* @__PURE__ */ new Map();
|
|
@@ -22,7 +44,7 @@ class B extends EventTarget {
|
|
|
22
44
|
* Returns the singleton instance of GlobalEventBus
|
|
23
45
|
*/
|
|
24
46
|
static getInstance() {
|
|
25
|
-
return
|
|
47
|
+
return P.instance || (P.instance = new P()), P.instance;
|
|
26
48
|
}
|
|
27
49
|
// Enhanced emit method with better typing and event storm protection
|
|
28
50
|
/**
|
|
@@ -30,26 +52,26 @@ class B extends EventTarget {
|
|
|
30
52
|
* @param eventName - Name of the event
|
|
31
53
|
* @param data - Optional event payload
|
|
32
54
|
*/
|
|
33
|
-
emit(t,
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
this.eventCounters.set(t, { count: 1, window:
|
|
37
|
-
else if (
|
|
55
|
+
emit(t, r) {
|
|
56
|
+
const n = Date.now(), o = this.eventCounters.get(t);
|
|
57
|
+
if (!o || n - o.window > 1e3)
|
|
58
|
+
this.eventCounters.set(t, { count: 1, window: n });
|
|
59
|
+
else if (o.count++, o.count > 50 && (console.error(`Event storm detected for "${t}": ${o.count} events in 1 second. Throttling...`), o.count > 100)) {
|
|
38
60
|
console.warn(`Blocking further "${t}" events to prevent infinite loop`);
|
|
39
61
|
return;
|
|
40
62
|
}
|
|
41
63
|
this.dispatchEvent(new CustomEvent(t, {
|
|
42
|
-
detail:
|
|
64
|
+
detail: r,
|
|
43
65
|
bubbles: !1,
|
|
44
66
|
// Global events don't need to bubble
|
|
45
67
|
cancelable: !0
|
|
46
68
|
}));
|
|
47
69
|
const s = this.handlers[t];
|
|
48
|
-
s && s.forEach((
|
|
70
|
+
s && s.forEach((i) => {
|
|
49
71
|
try {
|
|
50
|
-
|
|
51
|
-
} catch (
|
|
52
|
-
console.error(`Error in global event handler for "${t}":`,
|
|
72
|
+
i(r);
|
|
73
|
+
} catch (a) {
|
|
74
|
+
console.error(`Error in global event handler for "${t}":`, a);
|
|
53
75
|
}
|
|
54
76
|
});
|
|
55
77
|
}
|
|
@@ -58,17 +80,17 @@ class B extends EventTarget {
|
|
|
58
80
|
* @param eventName - Name of the event
|
|
59
81
|
* @param handler - Handler function
|
|
60
82
|
*/
|
|
61
|
-
on(t,
|
|
62
|
-
return this.handlers[t] || (this.handlers[t] = /* @__PURE__ */ new Set()), this.handlers[t].add(
|
|
83
|
+
on(t, r) {
|
|
84
|
+
return this.handlers[t] || (this.handlers[t] = /* @__PURE__ */ new Set()), this.handlers[t].add(r), () => this.off(t, r);
|
|
63
85
|
}
|
|
64
86
|
/**
|
|
65
87
|
* Remove a specific handler for a global event.
|
|
66
88
|
* @param eventName - Name of the event
|
|
67
89
|
* @param handler - Handler function to remove
|
|
68
90
|
*/
|
|
69
|
-
off(t,
|
|
70
|
-
const
|
|
71
|
-
|
|
91
|
+
off(t, r) {
|
|
92
|
+
const n = this.handlers[t];
|
|
93
|
+
n && n.delete(r);
|
|
72
94
|
}
|
|
73
95
|
/**
|
|
74
96
|
* Remove all handlers for a specific event.
|
|
@@ -83,18 +105,18 @@ class B extends EventTarget {
|
|
|
83
105
|
* @param handler - CustomEvent handler
|
|
84
106
|
* @param options - AddEventListener options
|
|
85
107
|
*/
|
|
86
|
-
listen(t,
|
|
87
|
-
return this.addEventListener(t,
|
|
108
|
+
listen(t, r, n) {
|
|
109
|
+
return this.addEventListener(t, r, n), () => this.removeEventListener(t, r);
|
|
88
110
|
}
|
|
89
111
|
/**
|
|
90
112
|
* Register a one-time event handler. Returns a promise that resolves with the event data.
|
|
91
113
|
* @param eventName - Name of the event
|
|
92
114
|
* @param handler - Handler function
|
|
93
115
|
*/
|
|
94
|
-
once(t,
|
|
95
|
-
return new Promise((
|
|
96
|
-
const
|
|
97
|
-
|
|
116
|
+
once(t, r) {
|
|
117
|
+
return new Promise((n) => {
|
|
118
|
+
const o = this.on(t, (s) => {
|
|
119
|
+
o(), r(s), n(s);
|
|
98
120
|
});
|
|
99
121
|
});
|
|
100
122
|
}
|
|
@@ -124,10 +146,10 @@ class B extends EventTarget {
|
|
|
124
146
|
*/
|
|
125
147
|
getEventStats() {
|
|
126
148
|
const t = {};
|
|
127
|
-
for (const [
|
|
128
|
-
t[
|
|
129
|
-
count:
|
|
130
|
-
handlersCount: this.getHandlerCount(
|
|
149
|
+
for (const [r, n] of this.eventCounters.entries())
|
|
150
|
+
t[r] = {
|
|
151
|
+
count: n.count,
|
|
152
|
+
handlersCount: this.getHandlerCount(r)
|
|
131
153
|
};
|
|
132
154
|
return t;
|
|
133
155
|
}
|
|
@@ -138,436 +160,268 @@ class B extends EventTarget {
|
|
|
138
160
|
this.eventCounters.clear();
|
|
139
161
|
}
|
|
140
162
|
}
|
|
141
|
-
const
|
|
142
|
-
function
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
163
|
+
const H = P.getInstance(), ot = (e, t) => H.emit(e, t), it = (e, t) => H.on(e, t), st = (e, t) => H.off(e, t), at = (e, t) => H.once(e, t), lt = (e, t, r) => H.listen(e, t, r);
|
|
164
|
+
function ie(e) {
|
|
165
|
+
let t = new Proxy(e, {
|
|
166
|
+
set: (i, a, l) => (i[a] = l, s(), !0)
|
|
167
|
+
});
|
|
168
|
+
const r = [];
|
|
169
|
+
function n(i) {
|
|
170
|
+
r.push(i), i(t);
|
|
171
|
+
}
|
|
172
|
+
function o() {
|
|
173
|
+
return t;
|
|
174
|
+
}
|
|
175
|
+
function s() {
|
|
176
|
+
r.forEach((i) => i(t));
|
|
177
|
+
}
|
|
178
|
+
return { subscribe: n, getState: o };
|
|
151
179
|
}
|
|
152
|
-
function
|
|
153
|
-
return e.
|
|
180
|
+
function ne(e) {
|
|
181
|
+
return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
154
182
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
} else if (f === "#") {
|
|
167
|
-
const [y, ...h] = u.split("."), S = [...h];
|
|
168
|
-
let m = c, a = [...S];
|
|
169
|
-
if (y === "model" && typeof m == "string" && m.includes(".")) {
|
|
170
|
-
const b = ["trim", "number", "lazy"], g = m.split(".");
|
|
171
|
-
let x = m;
|
|
172
|
-
const w = [];
|
|
173
|
-
for (let k = g.length - 1; k > 0 && b.includes(g[k]); k--)
|
|
174
|
-
w.unshift(g[k]), x = g.slice(0, k).join(".");
|
|
175
|
-
m = x, a.push(...w);
|
|
176
|
-
}
|
|
177
|
-
s[y] = {
|
|
178
|
-
value: m,
|
|
179
|
-
modifiers: a
|
|
180
|
-
};
|
|
181
|
-
} else u === "ref" ? r.ref = c : i[u] = c;
|
|
182
|
-
}
|
|
183
|
-
return { props: r, attrs: i, directives: s };
|
|
183
|
+
function ee(e) {
|
|
184
|
+
return typeof e == "string" ? e.replace(
|
|
185
|
+
/[&<>"']/g,
|
|
186
|
+
(t) => ({
|
|
187
|
+
"&": "&",
|
|
188
|
+
"<": "<",
|
|
189
|
+
">": ">",
|
|
190
|
+
'"': """,
|
|
191
|
+
"'": "'"
|
|
192
|
+
})[t]
|
|
193
|
+
) : e;
|
|
184
194
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
""
|
|
200
|
-
), x = a.attrs.style.replace(/^;?\s*/, "");
|
|
201
|
-
d.attrs.style = g + "; " + x;
|
|
202
|
-
} else if (b === "class" && d.attrs.class) {
|
|
203
|
-
const g = d.attrs.class.trim().split(/\s+/).filter(Boolean), x = a.attrs.class.trim().split(/\s+/).filter(Boolean), w = [
|
|
204
|
-
.../* @__PURE__ */ new Set([...g, ...x])
|
|
205
|
-
];
|
|
206
|
-
d.attrs.class = w.join(" ");
|
|
207
|
-
} else
|
|
208
|
-
d.attrs[b] = a.attrs[b];
|
|
209
|
-
}))) : (d.props || (d.props = {}), Object.assign(d.props, a)));
|
|
210
|
-
}
|
|
211
|
-
function m(a, b) {
|
|
212
|
-
const g = p ? u : h;
|
|
213
|
-
if (I(a)) {
|
|
214
|
-
const x = a.key ?? b;
|
|
215
|
-
let w = a.children;
|
|
216
|
-
g.push({
|
|
217
|
-
...a,
|
|
218
|
-
key: x,
|
|
219
|
-
children: w
|
|
220
|
-
});
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
if (R(a)) {
|
|
224
|
-
g.push(le(a, void 0));
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if (Array.isArray(a)) {
|
|
228
|
-
if (a.length === 0) return;
|
|
229
|
-
for (let x = 0; x < a.length; x++) {
|
|
230
|
-
const w = a[x];
|
|
231
|
-
I(w) || R(w) || Array.isArray(w) ? m(w, `${b}-${x}`) : w !== null && typeof w == "object" ? S(w) : g.push(r(String(w), `${b}-${x}`));
|
|
232
|
-
}
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
if (a !== null && typeof a == "object") {
|
|
236
|
-
S(a);
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
g.push(r(String(a), b));
|
|
240
|
-
}
|
|
241
|
-
for (; f = s.exec(i); )
|
|
242
|
-
if (f[1]) {
|
|
243
|
-
const a = f[1], b = f[0][1] === "/", g = f[0][f[0].length - 2] === "/", {
|
|
244
|
-
props: x,
|
|
245
|
-
attrs: w,
|
|
246
|
-
directives: k
|
|
247
|
-
} = ce(f[2] || "", t, n), $ = { props: {}, attrs: {} };
|
|
248
|
-
for (const v in x) $.props[v] = x[v];
|
|
249
|
-
for (const v in w) $.attrs[v] = w[v];
|
|
250
|
-
for (const [v, _] of Object.entries(k))
|
|
251
|
-
if (v === "bind")
|
|
252
|
-
if (typeof _.value == "object" && _.value !== null)
|
|
253
|
-
for (const [A, E] of Object.entries(_.value))
|
|
254
|
-
typeof E == "boolean" ? $.attrs[A] = E : E != null && ($.attrs[A] = String(E));
|
|
255
|
-
else _.value != null && ($.attrs[v] = String(_.value));
|
|
256
|
-
else if (v === "show") {
|
|
257
|
-
const A = !!_.value;
|
|
258
|
-
$.attrs.style = ($.attrs.style || "") + (A ? "" : "; display: none !important");
|
|
259
|
-
} else if (v === "class") {
|
|
260
|
-
const A = _.value;
|
|
261
|
-
let E = [];
|
|
262
|
-
if (typeof A == "string")
|
|
263
|
-
E = A.split(/\s+/).filter(Boolean);
|
|
264
|
-
else if (Array.isArray(A)) {
|
|
265
|
-
for (const j of A)
|
|
266
|
-
if (typeof j == "string")
|
|
267
|
-
E.push(...j.split(/\s+/).filter(Boolean));
|
|
268
|
-
else if (j && typeof j == "object")
|
|
269
|
-
for (const [L, N] of Object.entries(j))
|
|
270
|
-
N && E.push(...L.split(/\s+/).filter(Boolean));
|
|
271
|
-
} else if (A && typeof A == "object")
|
|
272
|
-
for (const [j, L] of Object.entries(A))
|
|
273
|
-
L && E.push(...j.split(/\s+/).filter(Boolean));
|
|
274
|
-
const M = $.attrs.class || "", O = [
|
|
275
|
-
.../* @__PURE__ */ new Set([
|
|
276
|
-
...M.split(/\s+/).filter(Boolean),
|
|
277
|
-
...E
|
|
278
|
-
])
|
|
279
|
-
];
|
|
280
|
-
$.attrs.class = O.join(" ");
|
|
281
|
-
} else if (v === "style") {
|
|
282
|
-
const A = _.value;
|
|
283
|
-
let E = "";
|
|
284
|
-
if (typeof A == "string")
|
|
285
|
-
E = A;
|
|
286
|
-
else if (A && typeof A == "object") {
|
|
287
|
-
const O = [];
|
|
288
|
-
for (const [j, L] of Object.entries(A))
|
|
289
|
-
if (L != null && L !== "") {
|
|
290
|
-
const N = j.replace(
|
|
291
|
-
/[A-Z]/g,
|
|
292
|
-
(ae) => `-${ae.toLowerCase()}`
|
|
293
|
-
), se = [
|
|
294
|
-
"width",
|
|
295
|
-
"height",
|
|
296
|
-
"top",
|
|
297
|
-
"right",
|
|
298
|
-
"bottom",
|
|
299
|
-
"left",
|
|
300
|
-
"margin",
|
|
301
|
-
"margin-top",
|
|
302
|
-
"margin-right",
|
|
303
|
-
"margin-bottom",
|
|
304
|
-
"margin-left",
|
|
305
|
-
"padding",
|
|
306
|
-
"padding-top",
|
|
307
|
-
"padding-right",
|
|
308
|
-
"padding-bottom",
|
|
309
|
-
"padding-left",
|
|
310
|
-
"font-size",
|
|
311
|
-
"line-height",
|
|
312
|
-
"border-width",
|
|
313
|
-
"border-radius",
|
|
314
|
-
"min-width",
|
|
315
|
-
"max-width",
|
|
316
|
-
"min-height",
|
|
317
|
-
"max-height"
|
|
318
|
-
];
|
|
319
|
-
let X = String(L);
|
|
320
|
-
typeof L == "number" && se.includes(N) && (X = `${L}px`), O.push(`${N}: ${X}`);
|
|
321
|
-
}
|
|
322
|
-
E = O.join("; ") + (O.length > 0 ? ";" : "");
|
|
323
|
-
}
|
|
324
|
-
const M = $.attrs.style || "";
|
|
325
|
-
$.attrs.style = M + (M && !M.endsWith(";") ? "; " : "") + E;
|
|
326
|
-
}
|
|
327
|
-
const C = {};
|
|
328
|
-
for (const [v, _] of Object.entries(k))
|
|
329
|
-
["bind", "show", "class", "style"].includes(v) || (C[v] = _);
|
|
330
|
-
if (Object.keys(C).length > 0 && ($.directives = C), b) {
|
|
331
|
-
const v = P(
|
|
332
|
-
p,
|
|
333
|
-
d,
|
|
334
|
-
u.length === 1 && R(u[0]) && u[0].tag === "#text" ? typeof u[0].children == "string" ? u[0].children : "" : u.length ? u : void 0,
|
|
335
|
-
c
|
|
336
|
-
), _ = o.pop();
|
|
337
|
-
_ ? (p = _.tag, d = _.props, c = _.key, u = _.children, u.push(v)) : l = v;
|
|
338
|
-
} else g ? (p ? u : h).push(P(a, $, void 0, void 0)) : (p && o.push({
|
|
339
|
-
tag: p,
|
|
340
|
-
props: d,
|
|
341
|
-
children: u,
|
|
342
|
-
key: c
|
|
343
|
-
}), p = a, d = $, u = []);
|
|
344
|
-
} else if (typeof f[3] < "u") {
|
|
345
|
-
const a = Number(f[3]), b = t[a], g = `interp-${a}`;
|
|
346
|
-
m(b, g);
|
|
347
|
-
} else if (f[4]) {
|
|
348
|
-
const a = f[4], b = p ? u : h, g = a.split(/({{\d+}})/);
|
|
349
|
-
for (const x of g) {
|
|
350
|
-
if (!x) continue;
|
|
351
|
-
const w = x.match(/^{{(\d+)}}$/);
|
|
352
|
-
if (w) {
|
|
353
|
-
const k = Number(w[1]), $ = t[k], C = `interp-${k}`;
|
|
354
|
-
m($, C);
|
|
355
|
-
} else {
|
|
356
|
-
const k = `text-${y++}`;
|
|
357
|
-
b.push(r(x, k));
|
|
195
|
+
function xe(e, t, r) {
|
|
196
|
+
if (r)
|
|
197
|
+
for (const [n, o] of Object.entries(r)) {
|
|
198
|
+
let s, i = {};
|
|
199
|
+
if (Array.isArray(o) ? (s = o[0], i = o[1] || {}) : s = o, t.set(n, {
|
|
200
|
+
callback: s,
|
|
201
|
+
options: i,
|
|
202
|
+
oldValue: te(e, n)
|
|
203
|
+
}), i.immediate)
|
|
204
|
+
try {
|
|
205
|
+
const a = te(e, n);
|
|
206
|
+
s(a, void 0, e);
|
|
207
|
+
} catch (a) {
|
|
208
|
+
console.error(`Error in immediate watcher for "${n}":`, a);
|
|
358
209
|
}
|
|
359
|
-
}
|
|
360
210
|
}
|
|
361
|
-
if (l)
|
|
362
|
-
return R(l) && Array.isArray(l.children) && (l.children = l.children.filter(
|
|
363
|
-
(a) => R(a) ? a.tag !== "#text" || typeof a.children == "string" && a.children.trim() !== "" : !0
|
|
364
|
-
// keep non-element VNodes (including anchors) as-is
|
|
365
|
-
)), l;
|
|
366
|
-
if (h.length > 0) {
|
|
367
|
-
const a = h.filter(
|
|
368
|
-
(b) => R(b) ? b.tag !== "#text" || typeof b.children == "string" && b.children.trim() !== "" : !0
|
|
369
|
-
);
|
|
370
|
-
return a.length === 1 ? a[0] : a;
|
|
371
|
-
}
|
|
372
|
-
return P("div", {}, "", "fallback-root");
|
|
373
211
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
376
|
-
return fe(e, t, r);
|
|
212
|
+
function te(e, t) {
|
|
213
|
+
return t.split(".").reduce((r, n) => r?.[n], e);
|
|
377
214
|
}
|
|
378
|
-
function
|
|
379
|
-
|
|
215
|
+
function we(e, t, r, n) {
|
|
216
|
+
const o = (i, a) => {
|
|
217
|
+
if (i === a) return !0;
|
|
218
|
+
if (typeof i != typeof a || typeof i != "object" || i === null || a === null) return !1;
|
|
219
|
+
if (Array.isArray(i) && Array.isArray(a))
|
|
220
|
+
return i.length !== a.length ? !1 : i.every((p, d) => o(p, a[d]));
|
|
221
|
+
const l = Object.keys(i), f = Object.keys(a);
|
|
222
|
+
return l.length !== f.length ? !1 : l.every((p) => o(i[p], a[p]));
|
|
223
|
+
}, s = t.get(r);
|
|
224
|
+
if (s && !o(n, s.oldValue))
|
|
225
|
+
try {
|
|
226
|
+
s.callback(n, s.oldValue, e), s.oldValue = n;
|
|
227
|
+
} catch (i) {
|
|
228
|
+
console.error(`Error in watcher for "${r}":`, i);
|
|
229
|
+
}
|
|
230
|
+
for (const [i, a] of t.entries())
|
|
231
|
+
if (a.options.deep && r.startsWith(i + "."))
|
|
232
|
+
try {
|
|
233
|
+
const l = te(e, i);
|
|
234
|
+
o(l, a.oldValue) || (a.callback(l, a.oldValue, e), a.oldValue = l);
|
|
235
|
+
} catch (l) {
|
|
236
|
+
console.error(`Error in deep watcher for "${i}":`, l);
|
|
237
|
+
}
|
|
380
238
|
}
|
|
381
|
-
function
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
return
|
|
239
|
+
function ke(e, t, r) {
|
|
240
|
+
if (!t.props) return;
|
|
241
|
+
function n(o, s) {
|
|
242
|
+
return s === Boolean ? o === "true" : s === Number ? Number(o) : o;
|
|
243
|
+
}
|
|
244
|
+
Object.entries(t.props).forEach(([o, s]) => {
|
|
245
|
+
if (s.type === Function && typeof e[o] == "function")
|
|
246
|
+
r[o] = e[o];
|
|
247
|
+
else {
|
|
248
|
+
const i = e.getAttribute(ne(o));
|
|
249
|
+
i !== null ? r[o] = ee(n(i, s.type)) : "default" in s && s.default !== void 0 && (r[o] = ee(s.default));
|
|
250
|
+
}
|
|
385
251
|
});
|
|
386
252
|
}
|
|
387
|
-
function
|
|
388
|
-
|
|
389
|
-
return {
|
|
390
|
-
when(t, n) {
|
|
391
|
-
return e.push([t, n]), this;
|
|
392
|
-
},
|
|
393
|
-
otherwise(t) {
|
|
394
|
-
return e.push([!0, t]), this;
|
|
395
|
-
},
|
|
396
|
-
done() {
|
|
397
|
-
return de(...e);
|
|
398
|
-
}
|
|
399
|
-
};
|
|
253
|
+
function $e(e, t, r, n) {
|
|
254
|
+
e.onConnected && !r && (e.onConnected(t), n(!0));
|
|
400
255
|
}
|
|
401
|
-
function
|
|
402
|
-
|
|
403
|
-
const [n, r] = e[t];
|
|
404
|
-
if (n) return [K(r, `whenChain-branch-${t}`)];
|
|
405
|
-
}
|
|
406
|
-
return [K([], "whenChain-empty")];
|
|
256
|
+
function Ce(e, t, r, n, o, s, i, a) {
|
|
257
|
+
e.onDisconnected && e.onDisconnected(t), r.forEach((l) => l()), n(), o(), s(!1), i(null), a(!1);
|
|
407
258
|
}
|
|
408
|
-
function
|
|
409
|
-
|
|
410
|
-
return {
|
|
411
|
-
tag: "#anchor",
|
|
412
|
-
key: t,
|
|
413
|
-
children: n
|
|
414
|
-
};
|
|
259
|
+
function Se(e, t, r, n, o) {
|
|
260
|
+
e.onAttributeChanged && e.onAttributeChanged(t, r, n, o);
|
|
415
261
|
}
|
|
416
262
|
function z(e, t) {
|
|
417
|
-
|
|
263
|
+
if (t && e instanceof HTMLElement) {
|
|
264
|
+
for (const r in t)
|
|
265
|
+
t[r] === e && delete t[r];
|
|
266
|
+
for (const r of Array.from(e.childNodes))
|
|
267
|
+
z(r, t);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function R(e, t) {
|
|
271
|
+
return t.split(".").reduce((r, n) => r?.[n], e);
|
|
418
272
|
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
421
|
-
if (!
|
|
422
|
-
const s =
|
|
423
|
-
s[
|
|
273
|
+
function se(e, t, r) {
|
|
274
|
+
const n = t.split("."), o = n.pop();
|
|
275
|
+
if (!o) return;
|
|
276
|
+
const s = n.reduce((i, a) => (a in i || (i[a] = {}), i[a]), e);
|
|
277
|
+
s[o] = r;
|
|
424
278
|
}
|
|
425
|
-
function
|
|
279
|
+
function _e(e, t, r, n, o, s, i) {
|
|
426
280
|
if (!s) return;
|
|
427
|
-
const
|
|
428
|
-
const
|
|
429
|
-
return
|
|
281
|
+
const a = t.includes("lazy"), l = t.includes("trim"), f = t.includes("number"), p = () => {
|
|
282
|
+
const y = s._state || s;
|
|
283
|
+
return R(y, e);
|
|
430
284
|
}, d = p();
|
|
431
|
-
let
|
|
432
|
-
const
|
|
433
|
-
if (
|
|
285
|
+
let u = "text";
|
|
286
|
+
const m = n?.type;
|
|
287
|
+
if (i instanceof HTMLInputElement ? u = m || i.type || "text" : i instanceof HTMLSelectElement ? u = "select" : i instanceof HTMLTextAreaElement && (u = "textarea"), u === "checkbox")
|
|
434
288
|
if (Array.isArray(d)) {
|
|
435
|
-
const
|
|
436
|
-
|
|
289
|
+
const y = i?.getAttribute("value") || n?.value || "", c = d.includes(y);
|
|
290
|
+
i && i.checked !== c && (r.checked = c);
|
|
437
291
|
} else {
|
|
438
|
-
const
|
|
439
|
-
|
|
292
|
+
const y = i?.getAttribute("true-value") || !0, c = d === y;
|
|
293
|
+
i && i.checked !== c && (r.checked = c);
|
|
440
294
|
}
|
|
441
|
-
else if (
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
} else if (
|
|
445
|
-
if (
|
|
446
|
-
const
|
|
295
|
+
else if (u === "radio") {
|
|
296
|
+
const y = n?.value || "", c = d === y;
|
|
297
|
+
i && i.checked !== c && (r.checked = c);
|
|
298
|
+
} else if (u === "select")
|
|
299
|
+
if (i && i.hasAttribute("multiple")) {
|
|
300
|
+
const y = i, c = Array.isArray(d) ? d : [];
|
|
447
301
|
setTimeout(() => {
|
|
448
|
-
Array.from(
|
|
449
|
-
const g =
|
|
302
|
+
Array.from(y.options).forEach((b) => {
|
|
303
|
+
const g = c.includes(b.value);
|
|
450
304
|
b.selected !== g && (b.selected = g);
|
|
451
305
|
});
|
|
452
306
|
}, 0);
|
|
453
307
|
} else
|
|
454
308
|
setTimeout(() => {
|
|
455
|
-
|
|
309
|
+
i instanceof HTMLSelectElement && i.value !== String(d) && (i.value = String(d));
|
|
456
310
|
}, 0);
|
|
457
311
|
else {
|
|
458
|
-
const
|
|
459
|
-
(!
|
|
312
|
+
const y = String(d ?? "");
|
|
313
|
+
(!i || i.value !== y) && (r.value = d);
|
|
460
314
|
}
|
|
461
|
-
const h =
|
|
462
|
-
if (
|
|
463
|
-
const
|
|
464
|
-
if (
|
|
315
|
+
const h = a || u === "checkbox" || u === "radio" || u === "select" ? "change" : "input", C = (y) => {
|
|
316
|
+
if (y.isComposing || o._isComposing || y.isTrusted === !1) return;
|
|
317
|
+
const c = y.target;
|
|
318
|
+
if (c._modelUpdating) return;
|
|
465
319
|
const b = p();
|
|
466
|
-
let g =
|
|
467
|
-
if (
|
|
320
|
+
let g = c.value;
|
|
321
|
+
if (u === "checkbox")
|
|
468
322
|
if (Array.isArray(b)) {
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
|
|
323
|
+
const S = c.getAttribute("value") || "", _ = [...b];
|
|
324
|
+
if (c.checked)
|
|
325
|
+
_.includes(S) || _.push(S);
|
|
472
326
|
else {
|
|
473
|
-
const
|
|
474
|
-
|
|
327
|
+
const x = _.indexOf(S);
|
|
328
|
+
x > -1 && _.splice(x, 1);
|
|
475
329
|
}
|
|
476
|
-
g =
|
|
330
|
+
g = _;
|
|
477
331
|
} else {
|
|
478
|
-
const
|
|
479
|
-
g =
|
|
332
|
+
const S = c.getAttribute("true-value") || !0, _ = c.getAttribute("false-value") || !1;
|
|
333
|
+
g = c.checked ? S : _;
|
|
480
334
|
}
|
|
481
|
-
else if (
|
|
482
|
-
g =
|
|
483
|
-
else if (
|
|
484
|
-
const
|
|
485
|
-
g = Array.from(
|
|
486
|
-
(
|
|
335
|
+
else if (u === "radio")
|
|
336
|
+
g = c.getAttribute("value") || c.value;
|
|
337
|
+
else if (u === "select" && c.multiple) {
|
|
338
|
+
const S = c;
|
|
339
|
+
g = Array.from(S.selectedOptions).map(
|
|
340
|
+
(_) => _.value
|
|
487
341
|
);
|
|
488
|
-
} else if (
|
|
489
|
-
const
|
|
490
|
-
isNaN(
|
|
342
|
+
} else if (l && (g = g.trim()), f) {
|
|
343
|
+
const S = Number(g);
|
|
344
|
+
isNaN(S) || (g = S);
|
|
491
345
|
}
|
|
492
|
-
const
|
|
346
|
+
const v = s._state || s, w = R(v, e);
|
|
493
347
|
if (Array.isArray(g) && Array.isArray(w) ? JSON.stringify([...g].sort()) !== JSON.stringify([...w].sort()) : g !== w) {
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
|
|
348
|
+
const S = y.target;
|
|
349
|
+
S._modelUpdating = !0, se(v, e, g), setTimeout(() => {
|
|
350
|
+
S._modelUpdating = !1;
|
|
497
351
|
}, 0), s._requestRender && s._requestRender();
|
|
498
352
|
}
|
|
499
353
|
};
|
|
500
|
-
if (
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
},
|
|
504
|
-
|
|
354
|
+
if (o[h] = C, u === "text" || u === "textarea") {
|
|
355
|
+
const y = () => {
|
|
356
|
+
o._isComposing = !0;
|
|
357
|
+
}, c = (b) => {
|
|
358
|
+
o._isComposing = !1;
|
|
505
359
|
const g = b.target;
|
|
506
360
|
setTimeout(() => {
|
|
507
361
|
if (g) {
|
|
508
|
-
let
|
|
509
|
-
if (
|
|
510
|
-
const
|
|
511
|
-
isNaN(
|
|
362
|
+
let v = g.value;
|
|
363
|
+
if (l && (v = v.trim()), f) {
|
|
364
|
+
const _ = Number(v);
|
|
365
|
+
isNaN(_) || (v = _);
|
|
512
366
|
}
|
|
513
|
-
const w = s._state || s, k =
|
|
514
|
-
(Array.isArray(
|
|
367
|
+
const w = s._state || s, k = R(w, e);
|
|
368
|
+
(Array.isArray(v) && Array.isArray(k) ? JSON.stringify([...v].sort()) !== JSON.stringify([...k].sort()) : v !== k) && (g && (g._modelUpdating = !0, setTimeout(() => {
|
|
515
369
|
g._modelUpdating = !1;
|
|
516
|
-
}, 0)),
|
|
370
|
+
}, 0)), se(w, e, v), s._requestRender && s._requestRender());
|
|
517
371
|
}
|
|
518
372
|
}, 0);
|
|
519
373
|
};
|
|
520
|
-
|
|
374
|
+
o.compositionstart = y, o.compositionend = c;
|
|
521
375
|
}
|
|
522
376
|
}
|
|
523
|
-
function
|
|
524
|
-
if (
|
|
377
|
+
function Ae(e, t, r, n) {
|
|
378
|
+
if (n)
|
|
525
379
|
try {
|
|
526
|
-
const
|
|
527
|
-
if (typeof
|
|
528
|
-
for (const [s,
|
|
529
|
-
t[s] =
|
|
380
|
+
const o = JSON.parse(e);
|
|
381
|
+
if (typeof o == "object")
|
|
382
|
+
for (const [s, i] of Object.entries(o))
|
|
383
|
+
t[s] = i;
|
|
530
384
|
} catch {
|
|
531
|
-
const
|
|
532
|
-
|
|
385
|
+
const o = R(n, e);
|
|
386
|
+
r[e] = o;
|
|
533
387
|
}
|
|
534
388
|
}
|
|
535
|
-
function
|
|
536
|
-
if (!
|
|
537
|
-
const
|
|
538
|
-
if (
|
|
539
|
-
const
|
|
540
|
-
(
|
|
389
|
+
function Ee(e, t, r) {
|
|
390
|
+
if (!r) return;
|
|
391
|
+
const n = R(r, e), o = t.style || "", s = n ? "" : "none";
|
|
392
|
+
if (o) {
|
|
393
|
+
const i = o.split(";").filter(Boolean), a = i.findIndex(
|
|
394
|
+
(l) => l.trim().startsWith("display:")
|
|
541
395
|
);
|
|
542
|
-
|
|
396
|
+
a >= 0 ? i[a] = `display: ${s}` : i.push(`display: ${s}`), t.style = i.join("; ");
|
|
543
397
|
} else
|
|
544
398
|
t.style = `display: ${s}`;
|
|
545
399
|
}
|
|
546
|
-
function
|
|
547
|
-
if (!
|
|
548
|
-
const
|
|
549
|
-
let
|
|
550
|
-
typeof
|
|
551
|
-
const s = t.class || "",
|
|
552
|
-
|
|
400
|
+
function Te(e, t, r) {
|
|
401
|
+
if (!r) return;
|
|
402
|
+
const n = R(r, e);
|
|
403
|
+
let o = [];
|
|
404
|
+
typeof n == "string" ? o = [n] : Array.isArray(n) ? o = n.filter(Boolean) : typeof n == "object" && (o = Object.entries(n).filter(([, a]) => !!a).map(([a]) => a));
|
|
405
|
+
const s = t.class || "", i = s ? `${s} ${o.join(" ")}`.trim() : o.join(" ");
|
|
406
|
+
i && (t.class = i);
|
|
553
407
|
}
|
|
554
|
-
function
|
|
555
|
-
let
|
|
408
|
+
function je(e, t, r) {
|
|
409
|
+
let n;
|
|
556
410
|
if (typeof e == "string") {
|
|
557
|
-
if (!
|
|
558
|
-
|
|
411
|
+
if (!r) return;
|
|
412
|
+
n = R(r, e);
|
|
559
413
|
} else
|
|
560
|
-
|
|
561
|
-
let
|
|
562
|
-
if (typeof
|
|
563
|
-
|
|
564
|
-
else if (
|
|
565
|
-
const
|
|
566
|
-
for (const [
|
|
567
|
-
if (
|
|
568
|
-
const
|
|
414
|
+
n = e;
|
|
415
|
+
let o = "";
|
|
416
|
+
if (typeof n == "string")
|
|
417
|
+
o = n;
|
|
418
|
+
else if (n && typeof n == "object") {
|
|
419
|
+
const i = [];
|
|
420
|
+
for (const [a, l] of Object.entries(n))
|
|
421
|
+
if (l != null && l !== "") {
|
|
422
|
+
const f = a.replace(
|
|
569
423
|
/[A-Z]/g,
|
|
570
|
-
(
|
|
424
|
+
(u) => `-${u.toLowerCase()}`
|
|
571
425
|
), p = [
|
|
572
426
|
"width",
|
|
573
427
|
"height",
|
|
@@ -594,98 +448,98 @@ function ye(e, t, n) {
|
|
|
594
448
|
"min-height",
|
|
595
449
|
"max-height"
|
|
596
450
|
];
|
|
597
|
-
let d = String(
|
|
598
|
-
typeof
|
|
451
|
+
let d = String(l);
|
|
452
|
+
typeof l == "number" && p.includes(f) && (d = `${l}px`), i.push(`${f}: ${d}`);
|
|
599
453
|
}
|
|
600
|
-
|
|
454
|
+
o = i.join("; ") + (i.length > 0 ? ";" : "");
|
|
601
455
|
}
|
|
602
456
|
const s = t.style || "";
|
|
603
|
-
t.style = s + (s && !s.endsWith(";") ? "; " : "") +
|
|
457
|
+
t.style = s + (s && !s.endsWith(";") ? "; " : "") + o;
|
|
604
458
|
}
|
|
605
|
-
function
|
|
606
|
-
const
|
|
607
|
-
for (const [
|
|
608
|
-
const { value:
|
|
609
|
-
switch (
|
|
459
|
+
function pe(e, t, r, n) {
|
|
460
|
+
const o = {}, s = { ...n || {} }, i = {};
|
|
461
|
+
for (const [a, l] of Object.entries(e)) {
|
|
462
|
+
const { value: f, modifiers: p } = l;
|
|
463
|
+
switch (a) {
|
|
610
464
|
case "model":
|
|
611
|
-
|
|
612
|
-
typeof
|
|
465
|
+
_e(
|
|
466
|
+
typeof f == "string" ? f : String(f),
|
|
613
467
|
p,
|
|
614
|
-
i,
|
|
615
|
-
s,
|
|
616
468
|
o,
|
|
469
|
+
s,
|
|
470
|
+
i,
|
|
617
471
|
t,
|
|
618
|
-
|
|
472
|
+
r
|
|
619
473
|
);
|
|
620
474
|
break;
|
|
621
475
|
case "bind":
|
|
622
|
-
|
|
476
|
+
Ae(f, o, s, t);
|
|
623
477
|
break;
|
|
624
478
|
case "show":
|
|
625
|
-
|
|
479
|
+
Ee(f, s, t);
|
|
626
480
|
break;
|
|
627
481
|
case "class":
|
|
628
|
-
|
|
482
|
+
Te(f, s, t);
|
|
629
483
|
break;
|
|
630
484
|
case "style":
|
|
631
|
-
|
|
485
|
+
je(f, s, t);
|
|
632
486
|
break;
|
|
633
487
|
}
|
|
634
488
|
}
|
|
635
|
-
return { props:
|
|
489
|
+
return { props: o, attrs: s, listeners: i };
|
|
636
490
|
}
|
|
637
|
-
function
|
|
491
|
+
function re(e, t) {
|
|
638
492
|
if (Array.isArray(e)) {
|
|
639
493
|
const s = /* @__PURE__ */ new Set();
|
|
640
|
-
return e.map((
|
|
641
|
-
if (!
|
|
642
|
-
let
|
|
643
|
-
if (!
|
|
644
|
-
const d =
|
|
645
|
-
|
|
494
|
+
return e.map((i) => {
|
|
495
|
+
if (!i || typeof i != "object") return i;
|
|
496
|
+
let a = i.props?.key ?? i.key;
|
|
497
|
+
if (!a) {
|
|
498
|
+
const d = i.tag || "node", u = i.props?.attrs?.id ?? i.props?.attrs?.name ?? i.props?.attrs?.["data-key"] ?? "";
|
|
499
|
+
a = u ? `${t}:${d}:${u}` : `${t}:${d}`;
|
|
646
500
|
}
|
|
647
|
-
let
|
|
648
|
-
for (; s.has(
|
|
649
|
-
|
|
650
|
-
s.add(
|
|
651
|
-
let p =
|
|
652
|
-
return Array.isArray(p) && (p =
|
|
501
|
+
let l = a, f = 1;
|
|
502
|
+
for (; s.has(l); )
|
|
503
|
+
l = `${a}#${f++}`;
|
|
504
|
+
s.add(l);
|
|
505
|
+
let p = i.children;
|
|
506
|
+
return Array.isArray(p) && (p = re(p, l)), { ...i, key: l, children: p };
|
|
653
507
|
});
|
|
654
508
|
}
|
|
655
|
-
const
|
|
656
|
-
let
|
|
657
|
-
return Array.isArray(
|
|
509
|
+
const r = e;
|
|
510
|
+
let n = r.props?.key ?? r.key ?? t, o = r.children;
|
|
511
|
+
return Array.isArray(o) && (o = re(o, n)), { ...r, key: n, children: o };
|
|
658
512
|
}
|
|
659
|
-
function
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
|
|
513
|
+
function Le(e, t, r, n) {
|
|
514
|
+
const o = r.directives ?? {}, s = pe(
|
|
515
|
+
o,
|
|
516
|
+
n,
|
|
663
517
|
e,
|
|
664
|
-
|
|
665
|
-
),
|
|
518
|
+
r.attrs
|
|
519
|
+
), i = {
|
|
666
520
|
...t.props,
|
|
667
|
-
...
|
|
521
|
+
...r.props,
|
|
668
522
|
...s.props
|
|
669
|
-
},
|
|
523
|
+
}, a = {
|
|
670
524
|
...t.attrs,
|
|
671
|
-
...
|
|
525
|
+
...r.attrs,
|
|
672
526
|
...s.attrs
|
|
673
|
-
},
|
|
674
|
-
for (const
|
|
675
|
-
const
|
|
676
|
-
|
|
527
|
+
}, l = t.props ?? {}, f = i;
|
|
528
|
+
for (const u in { ...l, ...f }) {
|
|
529
|
+
const m = l[u], h = f[u];
|
|
530
|
+
m !== h && (u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement) ? e.value !== h && (e.value = h ?? "") : u === "checked" && e instanceof HTMLInputElement ? e.checked = !!h : u.startsWith("on") && typeof h == "function" ? (typeof m == "function" && e.removeEventListener(u.slice(2).toLowerCase(), m), e.addEventListener(u.slice(2).toLowerCase(), h)) : h == null || h === !1 ? e.removeAttribute(u) : e.setAttribute(u, String(h)));
|
|
677
531
|
}
|
|
678
|
-
for (const [
|
|
532
|
+
for (const [u, m] of Object.entries(
|
|
679
533
|
s.listeners || {}
|
|
680
534
|
))
|
|
681
|
-
e.addEventListener(
|
|
682
|
-
const p = t.attrs ?? {}, d =
|
|
683
|
-
for (const
|
|
684
|
-
const
|
|
685
|
-
|
|
535
|
+
e.addEventListener(u, m);
|
|
536
|
+
const p = t.attrs ?? {}, d = a;
|
|
537
|
+
for (const u in { ...p, ...d }) {
|
|
538
|
+
const m = p[u], h = d[u];
|
|
539
|
+
m !== h && (h == null || h === !1 ? e.removeAttribute(u) : e.setAttribute(u, String(h)));
|
|
686
540
|
}
|
|
687
541
|
}
|
|
688
|
-
function T(e, t,
|
|
542
|
+
function T(e, t, r) {
|
|
689
543
|
if (typeof e == "string")
|
|
690
544
|
return document.createTextNode(e);
|
|
691
545
|
if (e.tag === "#text") {
|
|
@@ -695,359 +549,291 @@ function T(e, t, n) {
|
|
|
695
549
|
return e.key != null && (d.key = e.key), d;
|
|
696
550
|
}
|
|
697
551
|
if (e.tag === "#anchor") {
|
|
698
|
-
const d = e,
|
|
699
|
-
d.key != null && (
|
|
700
|
-
const
|
|
701
|
-
|
|
702
|
-
for (const
|
|
703
|
-
|
|
704
|
-
return
|
|
705
|
-
}
|
|
706
|
-
const
|
|
707
|
-
e.key != null && (
|
|
708
|
-
const { props:
|
|
709
|
-
...
|
|
710
|
-
...
|
|
711
|
-
},
|
|
552
|
+
const d = e, u = Array.isArray(d.children) ? d.children : [], m = document.createTextNode(""), h = document.createTextNode("");
|
|
553
|
+
d.key != null && (m.key = `${d.key}:start`, h.key = `${d.key}:end`), d._startNode = m, d._endNode = h;
|
|
554
|
+
const C = document.createDocumentFragment();
|
|
555
|
+
C.appendChild(m);
|
|
556
|
+
for (const y of u)
|
|
557
|
+
C.appendChild(T(y, t));
|
|
558
|
+
return C.appendChild(h), C;
|
|
559
|
+
}
|
|
560
|
+
const n = document.createElement(e.tag);
|
|
561
|
+
e.key != null && (n.key = e.key);
|
|
562
|
+
const { props: o = {}, attrs: s = {}, directives: i = {} } = e.props ?? {}, a = pe(i, t, n, s), l = {
|
|
563
|
+
...o,
|
|
564
|
+
...a.props
|
|
565
|
+
}, f = {
|
|
712
566
|
...s,
|
|
713
|
-
...
|
|
567
|
+
...a.attrs
|
|
714
568
|
};
|
|
715
|
-
for (const d in u) {
|
|
716
|
-
const c = u[d];
|
|
717
|
-
typeof c == "boolean" ? c && r.setAttribute(d, "") : c != null && r.setAttribute(d, String(c));
|
|
718
|
-
}
|
|
719
569
|
for (const d in f) {
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
570
|
+
const u = f[d];
|
|
571
|
+
typeof u == "boolean" ? u && n.setAttribute(d, "") : u != null && n.setAttribute(d, String(u));
|
|
572
|
+
}
|
|
573
|
+
for (const d in l) {
|
|
574
|
+
const u = l[d];
|
|
575
|
+
if (d === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement))
|
|
576
|
+
n.value = u ?? "";
|
|
577
|
+
else if (d === "checked" && n instanceof HTMLInputElement)
|
|
578
|
+
n.checked = !!u;
|
|
579
|
+
else if (d.startsWith("on") && typeof u == "function")
|
|
580
|
+
n.addEventListener(d.slice(2).toLowerCase(), u);
|
|
727
581
|
else {
|
|
728
|
-
if (d.startsWith("on") &&
|
|
582
|
+
if (d.startsWith("on") && u === void 0)
|
|
729
583
|
continue;
|
|
730
|
-
|
|
584
|
+
u == null || u === !1 ? n.removeAttribute(d) : n.setAttribute(d, String(u));
|
|
731
585
|
}
|
|
732
586
|
}
|
|
733
|
-
for (const [d,
|
|
734
|
-
|
|
587
|
+
for (const [d, u] of Object.entries(
|
|
588
|
+
a.listeners || {}
|
|
735
589
|
))
|
|
736
|
-
|
|
590
|
+
n.addEventListener(d, u);
|
|
737
591
|
const p = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
738
|
-
if (typeof e != "string" && p &&
|
|
592
|
+
if (typeof e != "string" && p && r && (r[p] = n), Array.isArray(e.children))
|
|
739
593
|
for (const d of e.children)
|
|
740
|
-
|
|
741
|
-
else typeof e.children == "string" && (
|
|
742
|
-
return
|
|
594
|
+
n.appendChild(T(d, t, r));
|
|
595
|
+
else typeof e.children == "string" && (n.textContent = e.children);
|
|
596
|
+
return n;
|
|
743
597
|
}
|
|
744
|
-
function
|
|
745
|
-
if (typeof
|
|
746
|
-
e.textContent !==
|
|
598
|
+
function Be(e, t, r, n, o) {
|
|
599
|
+
if (typeof r == "string") {
|
|
600
|
+
e.textContent !== r && (e.textContent = r);
|
|
747
601
|
return;
|
|
748
602
|
}
|
|
749
|
-
if (!Array.isArray(
|
|
750
|
-
const s = Array.from(e.childNodes),
|
|
751
|
-
for (const
|
|
752
|
-
|
|
753
|
-
const
|
|
754
|
-
for (const
|
|
755
|
-
const h =
|
|
756
|
-
h != null &&
|
|
603
|
+
if (!Array.isArray(r)) return;
|
|
604
|
+
const s = Array.from(e.childNodes), i = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
|
|
605
|
+
for (const m of i)
|
|
606
|
+
m && m.key != null && a.set(m.key, m);
|
|
607
|
+
const l = /* @__PURE__ */ new Map();
|
|
608
|
+
for (const m of s) {
|
|
609
|
+
const h = m.key;
|
|
610
|
+
h != null && l.set(h, m);
|
|
757
611
|
}
|
|
758
|
-
const
|
|
612
|
+
const f = /* @__PURE__ */ new Set();
|
|
759
613
|
let p = e.firstChild;
|
|
760
|
-
function d(
|
|
761
|
-
let
|
|
762
|
-
for (;
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
function
|
|
766
|
-
const
|
|
767
|
-
let b =
|
|
614
|
+
function d(m, h) {
|
|
615
|
+
let C = m;
|
|
616
|
+
for (; C && (f.add(C), C !== h); )
|
|
617
|
+
C = C.nextSibling;
|
|
618
|
+
}
|
|
619
|
+
function u(m, h, C, y) {
|
|
620
|
+
const c = [];
|
|
621
|
+
let b = m.nextSibling;
|
|
768
622
|
for (; b && b !== h; )
|
|
769
|
-
|
|
770
|
-
const g = Array.isArray(
|
|
771
|
-
if (
|
|
623
|
+
c.push(b), b = b.nextSibling;
|
|
624
|
+
const g = Array.isArray(C) ? C : [];
|
|
625
|
+
if (y.some((w) => w && w.key != null) || g.some((w) => w && w.key != null)) {
|
|
772
626
|
const w = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map();
|
|
773
|
-
for (const
|
|
774
|
-
|
|
775
|
-
for (const
|
|
776
|
-
const
|
|
777
|
-
|
|
627
|
+
for (const x of g)
|
|
628
|
+
x && x.key != null && w.set(x.key, x);
|
|
629
|
+
for (const x of c) {
|
|
630
|
+
const $ = x.key;
|
|
631
|
+
$ != null && k.set($, x);
|
|
778
632
|
}
|
|
779
|
-
const
|
|
780
|
-
let
|
|
781
|
-
for (const
|
|
782
|
-
let
|
|
783
|
-
if (
|
|
784
|
-
const A = w.get(
|
|
785
|
-
|
|
786
|
-
k.get(
|
|
633
|
+
const S = /* @__PURE__ */ new Set();
|
|
634
|
+
let _ = m.nextSibling;
|
|
635
|
+
for (const x of y) {
|
|
636
|
+
let $;
|
|
637
|
+
if (x.key != null && k.has(x.key)) {
|
|
638
|
+
const A = w.get(x.key);
|
|
639
|
+
$ = K(
|
|
640
|
+
k.get(x.key),
|
|
787
641
|
A,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
),
|
|
642
|
+
x,
|
|
643
|
+
n
|
|
644
|
+
), S.add($), $ !== _ && e.contains($) && e.insertBefore($, _);
|
|
791
645
|
} else
|
|
792
|
-
|
|
793
|
-
|
|
646
|
+
$ = T(x, n), e.insertBefore($, _), S.add($);
|
|
647
|
+
_ = $.nextSibling;
|
|
794
648
|
}
|
|
795
|
-
for (const
|
|
796
|
-
|
|
649
|
+
for (const x of c)
|
|
650
|
+
!S.has(x) && e.contains(x) && e.removeChild(x);
|
|
797
651
|
} else {
|
|
798
652
|
const w = Math.min(
|
|
799
653
|
g.length,
|
|
800
|
-
|
|
654
|
+
y.length
|
|
801
655
|
);
|
|
802
656
|
for (let k = 0; k < w; k++) {
|
|
803
|
-
const
|
|
804
|
-
|
|
657
|
+
const S = g[k], _ = y[k], x = K(c[k], S, _, n);
|
|
658
|
+
x !== c[k] && (e.insertBefore(x, c[k]), e.removeChild(c[k]));
|
|
805
659
|
}
|
|
806
|
-
for (let k = w; k <
|
|
807
|
-
e.insertBefore(T(
|
|
808
|
-
for (let k = w; k <
|
|
809
|
-
e.removeChild(
|
|
660
|
+
for (let k = w; k < y.length; k++)
|
|
661
|
+
e.insertBefore(T(y[k], n), h);
|
|
662
|
+
for (let k = w; k < c.length; k++)
|
|
663
|
+
e.removeChild(c[k]);
|
|
810
664
|
}
|
|
811
665
|
}
|
|
812
|
-
for (const
|
|
666
|
+
for (const m of r) {
|
|
813
667
|
let h;
|
|
814
|
-
if (
|
|
815
|
-
const
|
|
816
|
-
let b =
|
|
817
|
-
const
|
|
818
|
-
if (b || (b = document.createTextNode(""), b.key =
|
|
668
|
+
if (m.tag === "#anchor") {
|
|
669
|
+
const C = m.key, y = `${C}:start`, c = `${C}:end`;
|
|
670
|
+
let b = l.get(y), g = l.get(c);
|
|
671
|
+
const v = Array.isArray(m.children) ? m.children : [];
|
|
672
|
+
if (b || (b = document.createTextNode(""), b.key = y), g || (g = document.createTextNode(""), g.key = c), m._startNode = b, m._endNode = g, !e.contains(b) || !e.contains(g)) {
|
|
819
673
|
e.insertBefore(b, p);
|
|
820
|
-
for (const w of
|
|
821
|
-
e.insertBefore(T(w,
|
|
674
|
+
for (const w of v)
|
|
675
|
+
e.insertBefore(T(w, n), p);
|
|
822
676
|
e.insertBefore(g, p);
|
|
823
677
|
} else
|
|
824
|
-
|
|
678
|
+
u(
|
|
825
679
|
b,
|
|
826
680
|
g,
|
|
827
|
-
|
|
828
|
-
|
|
681
|
+
a.get(C)?.children,
|
|
682
|
+
v
|
|
829
683
|
);
|
|
830
684
|
d(b, g), p = g.nextSibling;
|
|
831
685
|
continue;
|
|
832
686
|
}
|
|
833
|
-
if (
|
|
834
|
-
const
|
|
835
|
-
h =
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
),
|
|
687
|
+
if (m.key != null && l.has(m.key)) {
|
|
688
|
+
const C = a.get(m.key);
|
|
689
|
+
h = K(
|
|
690
|
+
l.get(m.key),
|
|
691
|
+
C,
|
|
692
|
+
m,
|
|
693
|
+
n,
|
|
694
|
+
o
|
|
695
|
+
), f.add(h), h !== p && e.contains(h) && (p && !e.contains(p) && (p = null), e.insertBefore(h, p));
|
|
842
696
|
} else
|
|
843
|
-
h = T(
|
|
697
|
+
h = T(m, n, o), p && !e.contains(p) && (p = null), e.insertBefore(h, p), f.add(h);
|
|
844
698
|
p = h.nextSibling;
|
|
845
699
|
}
|
|
846
|
-
for (const
|
|
847
|
-
|
|
848
|
-
if (y instanceof HTMLElement && i)
|
|
849
|
-
for (const h in i)
|
|
850
|
-
i[h] === y && delete i[h];
|
|
851
|
-
e.removeChild(y);
|
|
852
|
-
}
|
|
700
|
+
for (const m of s)
|
|
701
|
+
!f.has(m) && e.contains(m) && (z(m, o), e.removeChild(m));
|
|
853
702
|
}
|
|
854
|
-
function
|
|
855
|
-
if (t && typeof t != "string" && t.props?.ref &&
|
|
856
|
-
if (typeof
|
|
703
|
+
function K(e, t, r, n, o) {
|
|
704
|
+
if (t && typeof t != "string" && t.props?.ref && o && z(e, o), t === r) return e;
|
|
705
|
+
if (typeof r == "string") {
|
|
857
706
|
if (e.nodeType === Node.TEXT_NODE)
|
|
858
|
-
return e.textContent !==
|
|
707
|
+
return e.textContent !== r && (e.textContent = r), e;
|
|
859
708
|
{
|
|
860
|
-
const
|
|
861
|
-
return e.parentNode?.replaceChild(
|
|
709
|
+
const i = document.createTextNode(r);
|
|
710
|
+
return e.parentNode?.replaceChild(i, e), i;
|
|
862
711
|
}
|
|
863
712
|
}
|
|
864
|
-
if (
|
|
865
|
-
const
|
|
866
|
-
|
|
713
|
+
if (r && typeof r != "string" && r.tag === "#anchor") {
|
|
714
|
+
const i = r, a = Array.isArray(i.children) ? i.children : [], l = i._startNode ?? document.createTextNode(""), f = i._endNode ?? document.createTextNode("");
|
|
715
|
+
i.key != null && (l.key = `${i.key}:start`, f.key = `${i.key}:end`), i._startNode = l, i._endNode = f;
|
|
867
716
|
const p = document.createDocumentFragment();
|
|
868
|
-
p.appendChild(
|
|
869
|
-
for (const d of
|
|
870
|
-
p.appendChild(T(d,
|
|
871
|
-
return p.appendChild(
|
|
717
|
+
p.appendChild(l);
|
|
718
|
+
for (const d of a)
|
|
719
|
+
p.appendChild(T(d, n));
|
|
720
|
+
return p.appendChild(f), e.parentNode?.replaceChild(p, e), l;
|
|
872
721
|
}
|
|
873
|
-
if (!
|
|
874
|
-
|
|
875
|
-
|
|
722
|
+
if (!r) {
|
|
723
|
+
z(e, o);
|
|
724
|
+
const i = document.createComment("removed");
|
|
725
|
+
return e.parentNode?.replaceChild(i, e), i;
|
|
876
726
|
}
|
|
877
727
|
if (!t || typeof t == "string") {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
728
|
+
z(e, o);
|
|
729
|
+
const i = T(r, n, o);
|
|
730
|
+
return typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), e.parentNode?.replaceChild(i, e), i;
|
|
731
|
+
}
|
|
732
|
+
if (r.tag === "#anchor") {
|
|
733
|
+
const i = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), l = r._endNode ?? document.createTextNode("");
|
|
734
|
+
r.key != null && (a.key = `${r.key}:start`, l.key = `${r.key}:end`), r._startNode = a, r._endNode = l;
|
|
735
|
+
const f = document.createDocumentFragment();
|
|
736
|
+
f.appendChild(a);
|
|
737
|
+
for (const p of i)
|
|
738
|
+
f.appendChild(T(p, n));
|
|
739
|
+
return f.appendChild(l), e.parentNode?.replaceChild(f, e), a;
|
|
740
|
+
}
|
|
741
|
+
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
|
|
742
|
+
const i = e;
|
|
743
|
+
return Le(i, t.props || {}, r.props || {}, n), Be(i, t.children, r.children, n, o), typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), i;
|
|
744
|
+
}
|
|
745
|
+
z(e, o);
|
|
746
|
+
const s = T(r, n, o);
|
|
747
|
+
return typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = s), e.parentNode?.replaceChild(s, e), s;
|
|
896
748
|
}
|
|
897
|
-
function
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
s =
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
for (const c in r)
|
|
910
|
-
r[c] === d && delete r[c];
|
|
911
|
-
u.push(d);
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
u.forEach((p) => e.removeChild(p)), e._prevVNode = s, e._prevDom = f;
|
|
749
|
+
function ze(e, t, r, n) {
|
|
750
|
+
let o;
|
|
751
|
+
Array.isArray(t) ? t.length === 1 ? (o = t[0], o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })) : o = { tag: "div", key: "__root__", children: t } : (o = t, o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })), o = re(o, String(o.key ?? "root"));
|
|
752
|
+
const s = e._prevVNode ?? null, i = e._prevDom ?? e.firstChild ?? null;
|
|
753
|
+
let a;
|
|
754
|
+
s && i ? typeof s != "string" && typeof o != "string" && s.tag === o.tag && s.key === o.key ? a = K(i, s, o, r, n) : (a = T(o, r, n), e.replaceChild(a, i)) : (a = T(o, r, n), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
|
|
755
|
+
const l = [];
|
|
756
|
+
for (let f = 0; f < e.childNodes.length; f++) {
|
|
757
|
+
const p = e.childNodes[f];
|
|
758
|
+
p !== a && p.nodeName !== "STYLE" && (z(p, n), l.push(p));
|
|
759
|
+
}
|
|
760
|
+
l.forEach((f) => e.removeChild(f)), e._prevVNode = o, e._prevDom = a;
|
|
915
761
|
}
|
|
916
|
-
function
|
|
762
|
+
function he(e, ...t) {
|
|
763
|
+
let r = "";
|
|
764
|
+
for (let n = 0; n < e.length; n++)
|
|
765
|
+
r += e[n], n < t.length && (r += t[n]);
|
|
766
|
+
return r;
|
|
767
|
+
}
|
|
768
|
+
function ge(e) {
|
|
917
769
|
return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
|
|
918
770
|
}
|
|
919
|
-
let
|
|
920
|
-
function
|
|
921
|
-
return
|
|
771
|
+
let q = null;
|
|
772
|
+
function ae() {
|
|
773
|
+
return q || (q = new CSSStyleSheet(), q.replaceSync(ge(Me))), q;
|
|
922
774
|
}
|
|
923
|
-
function
|
|
775
|
+
function Re(e) {
|
|
924
776
|
return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
|
|
925
777
|
}
|
|
926
|
-
const
|
|
778
|
+
const Me = he`
|
|
927
779
|
:host, *, ::before, ::after {
|
|
780
|
+
all: isolate;
|
|
928
781
|
box-sizing: border-box;
|
|
929
|
-
border
|
|
930
|
-
border-style: solid;
|
|
931
|
-
border-color: currentColor;
|
|
932
|
-
}
|
|
933
|
-
:host {
|
|
934
|
-
font-size: 16px;
|
|
935
|
-
line-height: 1.5;
|
|
936
|
-
font-family: ui-sans-serif, system-ui, sans-serif;
|
|
937
|
-
-webkit-text-size-adjust: 100%;
|
|
938
|
-
text-size-adjust: 100%;
|
|
939
|
-
color: inherit;
|
|
940
|
-
background-color: transparent;
|
|
941
|
-
}
|
|
942
|
-
*, ::before, ::after {
|
|
943
|
-
-webkit-tap-highlight-color: transparent;
|
|
782
|
+
border: 0 solid currentColor;
|
|
944
783
|
margin: 0;
|
|
945
784
|
padding: 0;
|
|
946
785
|
font: inherit;
|
|
947
786
|
vertical-align: baseline;
|
|
948
787
|
background: transparent;
|
|
949
788
|
color: inherit;
|
|
789
|
+
-webkit-tap-highlight-color: transparent;
|
|
950
790
|
}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
791
|
+
:host {
|
|
792
|
+
display: contents;
|
|
793
|
+
font: 16px/1.5 ui-sans-serif, system-ui, sans-serif;
|
|
794
|
+
-webkit-text-size-adjust: 100%;
|
|
795
|
+
text-size-adjust: 100%;
|
|
796
|
+
}
|
|
797
|
+
button, input, select, textarea {
|
|
954
798
|
background: transparent;
|
|
955
|
-
border: none;
|
|
956
799
|
outline: none;
|
|
957
|
-
margin: 0;
|
|
958
|
-
padding: 0;
|
|
959
|
-
}
|
|
960
|
-
textarea {
|
|
961
|
-
resize: vertical;
|
|
962
|
-
}
|
|
963
|
-
progress {
|
|
964
|
-
vertical-align: baseline;
|
|
965
|
-
}
|
|
966
|
-
button, textarea {
|
|
967
|
-
overflow: visible;
|
|
968
|
-
}
|
|
969
|
-
input[type="search"]::-webkit-search-decoration,
|
|
970
|
-
input[type="search"]::-webkit-search-cancel-button,
|
|
971
|
-
input[type="search"]::-webkit-search-results-button,
|
|
972
|
-
input[type="search"]::-webkit-search-results-decoration {
|
|
973
|
-
-webkit-appearance: none;
|
|
974
800
|
}
|
|
801
|
+
textarea { resize: vertical }
|
|
802
|
+
progress { vertical-align: baseline }
|
|
803
|
+
button, textarea { overflow: visible }
|
|
975
804
|
img, svg, video, canvas, audio, iframe, embed, object {
|
|
976
805
|
display: block;
|
|
977
806
|
max-width: 100%;
|
|
978
807
|
height: auto;
|
|
979
|
-
vertical-align: middle;
|
|
980
|
-
}
|
|
981
|
-
select {
|
|
982
|
-
text-transform: none;
|
|
983
|
-
}
|
|
984
|
-
optgroup {
|
|
985
|
-
font-weight: bold;
|
|
986
|
-
}
|
|
987
|
-
fieldset {
|
|
988
|
-
border: none;
|
|
989
|
-
}
|
|
990
|
-
svg {
|
|
991
|
-
fill: currentColor;
|
|
992
|
-
stroke: none;
|
|
993
808
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
}
|
|
998
|
-
a, button {
|
|
809
|
+
svg { fill: currentColor; stroke: none }
|
|
810
|
+
a { text-decoration: inherit; cursor: pointer }
|
|
811
|
+
button, [type=button], [type=reset], [type=submit] {
|
|
999
812
|
cursor: pointer;
|
|
1000
|
-
}
|
|
1001
|
-
input[type="file"] {
|
|
1002
|
-
border: 0;
|
|
1003
|
-
}
|
|
1004
|
-
button, [type="button"], [type="reset"], [type="submit"] {
|
|
1005
813
|
appearance: button;
|
|
1006
|
-
background
|
|
1007
|
-
background-image: none;
|
|
1008
|
-
}
|
|
1009
|
-
[type='button'], [type='reset'], [type='submit'] {
|
|
814
|
+
background: none;
|
|
1010
815
|
-webkit-user-select: none;
|
|
1011
816
|
user-select: none;
|
|
1012
817
|
}
|
|
1013
|
-
::-webkit-input-placeholder {
|
|
1014
|
-
|
|
818
|
+
::-webkit-input-placeholder, ::placeholder {
|
|
819
|
+
color: inherit; opacity: .5;
|
|
820
|
+
}
|
|
1015
821
|
*:focus {
|
|
1016
|
-
outline: 2px solid #3b82f6;
|
|
822
|
+
outline: 2px solid var(--color-blue-500, #3b82f6);
|
|
1017
823
|
outline-offset: 2px;
|
|
1018
824
|
}
|
|
1019
|
-
ol, ul {
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1022
|
-
table {
|
|
1023
|
-
border-collapse: collapse;
|
|
1024
|
-
border-spacing: 0;
|
|
1025
|
-
}
|
|
1026
|
-
strong {
|
|
1027
|
-
font-weight: bolder;
|
|
1028
|
-
}
|
|
825
|
+
ol, ul { list-style: none }
|
|
826
|
+
table { border-collapse: collapse }
|
|
1029
827
|
sub, sup {
|
|
1030
|
-
font-size:
|
|
828
|
+
font-size: .75em;
|
|
1031
829
|
line-height: 0;
|
|
1032
830
|
position: relative;
|
|
1033
|
-
vertical-align: baseline;
|
|
1034
|
-
}
|
|
1035
|
-
sub {
|
|
1036
|
-
bottom: -0.25em;
|
|
1037
|
-
}
|
|
1038
|
-
sup {
|
|
1039
|
-
top: -0.5em;
|
|
1040
|
-
}
|
|
1041
|
-
[disabled] {
|
|
1042
|
-
cursor: not-allowed;
|
|
1043
831
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
}
|
|
1047
|
-
[
|
|
1048
|
-
|
|
1049
|
-
}
|
|
1050
|
-
`, ke = {
|
|
832
|
+
sub { bottom: -.25em }
|
|
833
|
+
sup { top: -.5em }
|
|
834
|
+
[disabled], [aria-disabled=true] { cursor: not-allowed }
|
|
835
|
+
[hidden] { display: none }
|
|
836
|
+
`, Ne = {
|
|
1051
837
|
gray: {
|
|
1052
838
|
50: "var(--color-gray-50, #f9fafb)",
|
|
1053
839
|
100: "var(--color-gray-100, #f3f4f6)",
|
|
@@ -1060,6 +846,18 @@ const we = `
|
|
|
1060
846
|
800: "var(--color-gray-800, #1f2937)",
|
|
1061
847
|
900: "var(--color-gray-900, #111827)"
|
|
1062
848
|
},
|
|
849
|
+
neutral: {
|
|
850
|
+
50: "var(--color-neutral-50, #fafafa)",
|
|
851
|
+
100: "var(--color-neutral-100, #f5f5f5)",
|
|
852
|
+
200: "var(--color-neutral-200, #e5e5e5)",
|
|
853
|
+
300: "var(--color-neutral-300, #d4d4d4)",
|
|
854
|
+
400: "var(--color-neutral-400, #a3a3a3)",
|
|
855
|
+
500: "var(--color-neutral-500, #737373)",
|
|
856
|
+
600: "var(--color-neutral-600, #525252)",
|
|
857
|
+
700: "var(--color-neutral-700, #404040)",
|
|
858
|
+
800: "var(--color-neutral-800, #262626)",
|
|
859
|
+
900: "var(--color-neutral-900, #171717)"
|
|
860
|
+
},
|
|
1063
861
|
slate: {
|
|
1064
862
|
50: "var(--color-slate-50, #f8fafc)",
|
|
1065
863
|
100: "var(--color-slate-100, #f1f5f9)",
|
|
@@ -1170,7 +968,7 @@ const we = `
|
|
|
1170
968
|
},
|
|
1171
969
|
white: { DEFAULT: "var(--color-white, #ffffff)" },
|
|
1172
970
|
black: { DEFAULT: "var(--color-black, #000000)" }
|
|
1173
|
-
},
|
|
971
|
+
}, Q = {
|
|
1174
972
|
/* Display */
|
|
1175
973
|
block: "display:block;",
|
|
1176
974
|
inline: "display:inline;",
|
|
@@ -1179,6 +977,26 @@ const we = `
|
|
|
1179
977
|
"inline-flex": "display:inline-flex;",
|
|
1180
978
|
grid: "display:grid;",
|
|
1181
979
|
hidden: "display:none;",
|
|
980
|
+
/* Sizing & Spacing */
|
|
981
|
+
"w-full": "width:100%;",
|
|
982
|
+
"w-screen": "width:100dvw;",
|
|
983
|
+
"h-full": "height:100%;",
|
|
984
|
+
"h-screen": "height:100dvw;",
|
|
985
|
+
"max-w-full": "max-width:100%;",
|
|
986
|
+
"max-h-full": "max-height:100%;",
|
|
987
|
+
"min-w-0": "min-width:0;",
|
|
988
|
+
"min-h-0": "min-height:0;",
|
|
989
|
+
"m-auto": "margin:auto;",
|
|
990
|
+
"mx-auto": "margin-inline:auto;",
|
|
991
|
+
"my-auto": "margin-block:auto;",
|
|
992
|
+
/* Overflow */
|
|
993
|
+
"overflow-auto": "overflow:auto;",
|
|
994
|
+
"overflow-hidden": "overflow:hidden;",
|
|
995
|
+
"overflow-visible": "overflow:visible;",
|
|
996
|
+
"overflow-scroll": "overflow:scroll;",
|
|
997
|
+
/* Pointer Events */
|
|
998
|
+
"pointer-events-none": "pointer-events:none;",
|
|
999
|
+
"pointer-events-auto": "pointer-events:auto;",
|
|
1182
1000
|
/* Accessibility */
|
|
1183
1001
|
"sr-only": "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",
|
|
1184
1002
|
"not-sr-only": "position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;",
|
|
@@ -1283,7 +1101,28 @@ const we = `
|
|
|
1283
1101
|
"items-stretch": "align-items:stretch;",
|
|
1284
1102
|
"justify-center": "justify-content:center;",
|
|
1285
1103
|
"justify-start": "justify-content:flex-start;",
|
|
1104
|
+
"justify-between": "justify-content:space-between;",
|
|
1105
|
+
"justify-around": "justify-content:space-around;",
|
|
1106
|
+
"justify-evenly": "justify-content:space-evenly;",
|
|
1286
1107
|
"justify-end": "justify-content:flex-end;",
|
|
1108
|
+
"flex-wrap": "flex-wrap:wrap;",
|
|
1109
|
+
"flex-nowrap": "flex-wrap:nowrap;",
|
|
1110
|
+
"flex-wrap-reverse": "flex-wrap:wrap-reverse;",
|
|
1111
|
+
"content-center": "align-content:center;",
|
|
1112
|
+
"content-start": "align-content:flex-start;",
|
|
1113
|
+
"content-end": "align-content:flex-end;",
|
|
1114
|
+
"content-between": "align-content:space-between;",
|
|
1115
|
+
"content-around": "align-content:space-around;",
|
|
1116
|
+
"content-stretch": "align-content:stretch;",
|
|
1117
|
+
"self-auto": "align-self:auto;",
|
|
1118
|
+
"self-start": "align-self:flex-start;",
|
|
1119
|
+
"self-end": "align-self:flex-end;",
|
|
1120
|
+
"self-center": "align-self:center;",
|
|
1121
|
+
"self-stretch": "align-self:stretch;",
|
|
1122
|
+
"flex-1": "flex:1 1 0%;",
|
|
1123
|
+
"flex-auto": "flex:1 1 auto;",
|
|
1124
|
+
"flex-initial": "flex:0 1 auto;",
|
|
1125
|
+
"flex-none": "flex:0 0 auto;",
|
|
1287
1126
|
"flex-col": "flex-direction:column;",
|
|
1288
1127
|
"flex-row": "flex-direction:row;",
|
|
1289
1128
|
grow: "flex-grow:1;",
|
|
@@ -1303,7 +1142,7 @@ const we = `
|
|
|
1303
1142
|
"transition-colors": "transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;",
|
|
1304
1143
|
"transition-opacity": "transition-property:opacity;",
|
|
1305
1144
|
"transition-transform": "transition-property:transform;"
|
|
1306
|
-
},
|
|
1145
|
+
}, Pe = "var(--spacing, 0.25rem)", le = {
|
|
1307
1146
|
m: ["margin"],
|
|
1308
1147
|
mx: ["margin-inline"],
|
|
1309
1148
|
my: ["margin-block"],
|
|
@@ -1321,6 +1160,12 @@ const we = `
|
|
|
1321
1160
|
inset: ["inset"],
|
|
1322
1161
|
"inset-x": ["inset-inline"],
|
|
1323
1162
|
"inset-y": ["inset-block"],
|
|
1163
|
+
h: ["height"],
|
|
1164
|
+
w: ["width"],
|
|
1165
|
+
"min-h": ["min-height"],
|
|
1166
|
+
"min-w": ["min-width"],
|
|
1167
|
+
"max-h": ["max-height"],
|
|
1168
|
+
"max-w": ["max-width"],
|
|
1324
1169
|
top: ["top"],
|
|
1325
1170
|
bottom: ["bottom"],
|
|
1326
1171
|
left: ["left"],
|
|
@@ -1328,7 +1173,7 @@ const we = `
|
|
|
1328
1173
|
gap: ["gap"],
|
|
1329
1174
|
"gap-x": ["column-gap"],
|
|
1330
1175
|
"gap-y": ["row-gap"]
|
|
1331
|
-
},
|
|
1176
|
+
}, Oe = {
|
|
1332
1177
|
// State variants
|
|
1333
1178
|
before: (e, t) => `${e}::before{${t}}`,
|
|
1334
1179
|
after: (e, t) => `${e}::after{${t}}`,
|
|
@@ -1354,7 +1199,7 @@ const we = `
|
|
|
1354
1199
|
"peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
|
|
1355
1200
|
"peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
|
|
1356
1201
|
"peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
|
|
1357
|
-
},
|
|
1202
|
+
}, ce = {
|
|
1358
1203
|
// Responsive
|
|
1359
1204
|
sm: "(min-width:640px)",
|
|
1360
1205
|
md: "(min-width:768px)",
|
|
@@ -1363,23 +1208,23 @@ const we = `
|
|
|
1363
1208
|
"2xl": "(min-width:1536px)",
|
|
1364
1209
|
// Dark mode (now plain string)
|
|
1365
1210
|
dark: "(prefers-color-scheme: dark)"
|
|
1366
|
-
},
|
|
1367
|
-
function
|
|
1368
|
-
const t = e.startsWith("-"),
|
|
1369
|
-
if (
|
|
1370
|
-
const
|
|
1371
|
-
if (Number.isNaN(
|
|
1372
|
-
const
|
|
1373
|
-
return
|
|
1211
|
+
}, Z = ["sm", "md", "lg", "xl", "2xl"];
|
|
1212
|
+
function X(e) {
|
|
1213
|
+
const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
|
|
1214
|
+
if (n.length < 2) return null;
|
|
1215
|
+
const o = n.slice(0, -1).join("-"), s = n[n.length - 1], i = parseFloat(s);
|
|
1216
|
+
if (Number.isNaN(i) || !le[o]) return null;
|
|
1217
|
+
const a = t ? "-" : "";
|
|
1218
|
+
return le[o].map((l) => `${l}:calc(${a}${Pe} * ${i});`).join("");
|
|
1374
1219
|
}
|
|
1375
|
-
function
|
|
1376
|
-
const t = e.replace("#", ""),
|
|
1377
|
-
return `${
|
|
1220
|
+
function fe(e) {
|
|
1221
|
+
const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, o = r >> 8 & 255, s = r & 255;
|
|
1222
|
+
return `${n} ${o} ${s}`;
|
|
1378
1223
|
}
|
|
1379
|
-
function
|
|
1224
|
+
function We(e) {
|
|
1380
1225
|
const t = /^(bg|text|border|shadow|outline|caret|accent)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
|
|
1381
1226
|
if (!t) return null;
|
|
1382
|
-
const [,
|
|
1227
|
+
const [, r, n, o = "DEFAULT"] = t, s = Ne[n]?.[o];
|
|
1383
1228
|
return s ? `${{
|
|
1384
1229
|
bg: "background-color",
|
|
1385
1230
|
text: "color",
|
|
@@ -1388,43 +1233,43 @@ function Se(e) {
|
|
|
1388
1233
|
outline: "outline-color",
|
|
1389
1234
|
caret: "caret-color",
|
|
1390
1235
|
accent: "accent-color"
|
|
1391
|
-
}[
|
|
1236
|
+
}[r]}:${s};` : null;
|
|
1392
1237
|
}
|
|
1393
|
-
function
|
|
1394
|
-
const [t,
|
|
1395
|
-
if (!
|
|
1396
|
-
const
|
|
1397
|
-
return isNaN(
|
|
1238
|
+
function De(e) {
|
|
1239
|
+
const [t, r] = e.split("/");
|
|
1240
|
+
if (!r) return { base: t };
|
|
1241
|
+
const n = parseInt(r, 10);
|
|
1242
|
+
return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
|
|
1398
1243
|
}
|
|
1399
|
-
function
|
|
1400
|
-
const { base: t, opacity:
|
|
1401
|
-
if (
|
|
1402
|
-
if (
|
|
1403
|
-
const s = /#([0-9a-f]{6})/i.exec(
|
|
1244
|
+
function Y(e) {
|
|
1245
|
+
const { base: t, opacity: r } = De(e), n = We(t);
|
|
1246
|
+
if (n) {
|
|
1247
|
+
if (r !== void 0) {
|
|
1248
|
+
const s = /#([0-9a-f]{6})/i.exec(n);
|
|
1404
1249
|
if (s) {
|
|
1405
|
-
const
|
|
1406
|
-
return
|
|
1250
|
+
const i = fe(s[0]);
|
|
1251
|
+
return n.replace(/#([0-9a-f]{6})/i, `rgb(${i} / ${r})`);
|
|
1407
1252
|
}
|
|
1408
1253
|
}
|
|
1409
|
-
return
|
|
1254
|
+
return n;
|
|
1410
1255
|
}
|
|
1411
|
-
const
|
|
1412
|
-
if (
|
|
1413
|
-
const s = /#([0-9a-f]{6})/i.exec(
|
|
1256
|
+
const o = V(t);
|
|
1257
|
+
if (o && r !== void 0) {
|
|
1258
|
+
const s = /#([0-9a-f]{6})/i.exec(o);
|
|
1414
1259
|
if (s) {
|
|
1415
|
-
const
|
|
1416
|
-
return
|
|
1260
|
+
const i = fe(s[0]);
|
|
1261
|
+
return o.replace(/#([0-9a-f]{6})/i, `rgb(${i} / ${r})`);
|
|
1417
1262
|
}
|
|
1418
1263
|
}
|
|
1419
|
-
return
|
|
1264
|
+
return o;
|
|
1420
1265
|
}
|
|
1421
|
-
function
|
|
1422
|
-
const t = e.indexOf("-["),
|
|
1423
|
-
if (t > 0 &&
|
|
1424
|
-
const
|
|
1425
|
-
let
|
|
1426
|
-
|
|
1427
|
-
const
|
|
1266
|
+
function V(e) {
|
|
1267
|
+
const t = e.indexOf("-["), r = e.endsWith("]");
|
|
1268
|
+
if (t > 0 && r) {
|
|
1269
|
+
const n = e.slice(0, t);
|
|
1270
|
+
let o = e.slice(t + 2, -1);
|
|
1271
|
+
o = o.replace(/_/g, " ");
|
|
1272
|
+
const i = {
|
|
1428
1273
|
bg: "background-color",
|
|
1429
1274
|
text: "color",
|
|
1430
1275
|
p: "padding",
|
|
@@ -1463,108 +1308,145 @@ function W(e) {
|
|
|
1463
1308
|
weight: "font-weight",
|
|
1464
1309
|
leading: "line-height",
|
|
1465
1310
|
z: "z-index"
|
|
1466
|
-
}[
|
|
1467
|
-
if (
|
|
1311
|
+
}[n] ?? n.replace(/_/g, "-");
|
|
1312
|
+
if (i && o) return `${i}:${o};`;
|
|
1468
1313
|
}
|
|
1469
1314
|
return null;
|
|
1470
1315
|
}
|
|
1471
|
-
function
|
|
1316
|
+
function He(e) {
|
|
1472
1317
|
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
1473
1318
|
}
|
|
1474
|
-
function
|
|
1475
|
-
const t = /class\s*=\s*["']([^"']+)["']/g,
|
|
1476
|
-
let
|
|
1477
|
-
for (;
|
|
1478
|
-
let
|
|
1479
|
-
for (const
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
}
|
|
1483
|
-
return
|
|
1319
|
+
function Ie(e) {
|
|
1320
|
+
const t = /class\s*=\s*["']([^"']+)["']/g, r = [];
|
|
1321
|
+
let n;
|
|
1322
|
+
for (; n = t.exec(e); ) {
|
|
1323
|
+
let o = "", s = !1;
|
|
1324
|
+
for (const i of n[1])
|
|
1325
|
+
i === "[" && (s = !0), i === "]" && (s = !1), i === " " && !s ? (o && r.push(o), o = "") : o += i;
|
|
1326
|
+
o && r.push(o);
|
|
1327
|
+
}
|
|
1328
|
+
return r.filter(Boolean);
|
|
1484
1329
|
}
|
|
1485
|
-
const
|
|
1486
|
-
function
|
|
1487
|
-
const t = Date.now(),
|
|
1488
|
-
if (
|
|
1489
|
-
const
|
|
1490
|
-
function p(h,
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1493
|
-
const
|
|
1494
|
-
return
|
|
1330
|
+
const ue = /* @__PURE__ */ new Map(), qe = 16;
|
|
1331
|
+
function Fe(e) {
|
|
1332
|
+
const t = Date.now(), r = ue.get(e);
|
|
1333
|
+
if (r && t - r.timestamp < qe) return r.css;
|
|
1334
|
+
const n = Ie(e), o = new Set(n), s = [], i = [], a = [], l = [], f = {};
|
|
1335
|
+
function p(h, C = !1) {
|
|
1336
|
+
const y = (C ? "dark|" : "") + h;
|
|
1337
|
+
if (y in f) return f[y];
|
|
1338
|
+
const c = u(h, C);
|
|
1339
|
+
return f[y] = c, c;
|
|
1495
1340
|
}
|
|
1496
1341
|
function d(h) {
|
|
1497
|
-
const
|
|
1498
|
-
return h.length === 0 ? 1 : !
|
|
1342
|
+
const C = h.some((c) => Z.includes(c)), y = h.includes("dark");
|
|
1343
|
+
return h.length === 0 ? 1 : !C && !y ? 2 : C && !y ? 3 : 4;
|
|
1499
1344
|
}
|
|
1500
|
-
function
|
|
1501
|
-
const
|
|
1502
|
-
(
|
|
1345
|
+
function u(h, C = !1) {
|
|
1346
|
+
const y = h.split(":"), c = y.find(
|
|
1347
|
+
($) => Q[$] || X($) || Y($) || V($)
|
|
1503
1348
|
);
|
|
1504
|
-
if (!
|
|
1505
|
-
const b =
|
|
1349
|
+
if (!c) return null;
|
|
1350
|
+
const b = Q[c] ?? X(c) ?? Y(c) ?? V(c);
|
|
1506
1351
|
if (!b) return null;
|
|
1507
|
-
let g = `.${
|
|
1508
|
-
const w =
|
|
1509
|
-
let k = w >= 0 ?
|
|
1510
|
-
|
|
1511
|
-
const
|
|
1512
|
-
for (const
|
|
1513
|
-
if (
|
|
1514
|
-
const A = $
|
|
1515
|
-
typeof A == "function" && (g = A(g,
|
|
1352
|
+
let g = `.${He(h)}`, v = b;
|
|
1353
|
+
const w = y.indexOf(c);
|
|
1354
|
+
let k = w >= 0 ? y.slice(0, w) : [];
|
|
1355
|
+
C && (k = k.filter(($) => $ !== "dark"));
|
|
1356
|
+
const S = k.filter(($) => Z.includes($)), _ = S.length ? S[S.length - 1] : null;
|
|
1357
|
+
for (const $ of k) {
|
|
1358
|
+
if (Z.includes($)) continue;
|
|
1359
|
+
const A = Oe[$];
|
|
1360
|
+
typeof A == "function" && (g = A(g, v).replace(/\{.*$/, ""));
|
|
1516
1361
|
}
|
|
1517
|
-
let
|
|
1518
|
-
return
|
|
1362
|
+
let x = `${g}{${v}}`;
|
|
1363
|
+
return C && _ ? x = `@media (prefers-color-scheme: dark) and ${ce[_]}{${x}}` : C ? x = `@media (prefers-color-scheme: dark){${x}}` : _ && (x = `@media ${ce[_]}{${x}}`), x;
|
|
1519
1364
|
}
|
|
1520
|
-
for (const h of
|
|
1521
|
-
const
|
|
1522
|
-
(
|
|
1365
|
+
for (const h of o) {
|
|
1366
|
+
const C = h.split(":"), y = C.find(
|
|
1367
|
+
(v) => Q[v] || X(v) || Y(v) || V(v)
|
|
1523
1368
|
);
|
|
1524
|
-
if (!
|
|
1525
|
-
const
|
|
1369
|
+
if (!y) continue;
|
|
1370
|
+
const c = C.indexOf(y), b = c >= 0 ? C.slice(0, c) : [], g = d(b);
|
|
1526
1371
|
if (g === 4) {
|
|
1527
|
-
const
|
|
1528
|
-
|
|
1372
|
+
const v = p(h, !0);
|
|
1373
|
+
v && l.push(v);
|
|
1529
1374
|
} else {
|
|
1530
|
-
const
|
|
1531
|
-
|
|
1375
|
+
const v = p(h);
|
|
1376
|
+
v && (g === 1 ? s.push(v) : g === 2 ? i.push(v) : g === 3 && a.push(v));
|
|
1532
1377
|
}
|
|
1533
1378
|
}
|
|
1534
|
-
const
|
|
1535
|
-
return
|
|
1379
|
+
const m = [...s, ...i, ...a, ...l].join("");
|
|
1380
|
+
return ue.set(e, { css: m, timestamp: t }), m;
|
|
1536
1381
|
}
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1382
|
+
function Ke(e, t, r, n, o, s, i, a) {
|
|
1383
|
+
if (!e) return;
|
|
1384
|
+
if (t.loadingTemplate && r.isLoading) {
|
|
1385
|
+
M(e, t.loadingTemplate(r), r, n, o);
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
if (t.errorTemplate && r.hasError) {
|
|
1389
|
+
r.error instanceof Error && M(e, t.errorTemplate(r.error, r), r, n, o);
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1392
|
+
const l = t.render(r);
|
|
1393
|
+
if (l instanceof Promise) {
|
|
1394
|
+
s(!0), l.then((f) => {
|
|
1395
|
+
s(!1), i(null), M(e, f, r, n, o), a(e.innerHTML);
|
|
1396
|
+
}).catch((f) => {
|
|
1397
|
+
s(!1), i(f), t.errorTemplate && M(e, t.errorTemplate(f, r), r, n, o);
|
|
1398
|
+
}), t.loadingTemplate && M(e, t.loadingTemplate(r), r, n, o);
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
M(e, l, r, n, o), a(e.innerHTML);
|
|
1540
1402
|
}
|
|
1541
|
-
function
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
(t)
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
'"': """,
|
|
1549
|
-
"'": "'"
|
|
1550
|
-
})[t]
|
|
1551
|
-
) : e;
|
|
1403
|
+
function M(e, t, r, n, o) {
|
|
1404
|
+
e && (ze(
|
|
1405
|
+
e,
|
|
1406
|
+
Array.isArray(t) ? t : [t],
|
|
1407
|
+
r,
|
|
1408
|
+
n
|
|
1409
|
+
), o(e.innerHTML));
|
|
1552
1410
|
}
|
|
1553
|
-
function
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1411
|
+
function Ve(e, t, r, n, o, s, i) {
|
|
1412
|
+
if (s !== null && clearTimeout(s), Date.now() - t < 16) {
|
|
1413
|
+
if (o(r + 1), r > 10) {
|
|
1414
|
+
console.warn("Potential infinite render loop detected. Skipping render."), i(null);
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
} else
|
|
1418
|
+
o(0);
|
|
1419
|
+
const l = setTimeout(() => {
|
|
1420
|
+
n(Date.now()), e(), i(null);
|
|
1421
|
+
}, 0);
|
|
1422
|
+
i(l);
|
|
1558
1423
|
}
|
|
1559
|
-
function
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
}
|
|
1424
|
+
function Ue(e, t, r, n, o, s) {
|
|
1425
|
+
if (!e) return;
|
|
1426
|
+
const i = Fe(n);
|
|
1427
|
+
if (!t.style && (!i || i.trim() === "")) {
|
|
1428
|
+
s(null), e.adoptedStyleSheets = [ae()];
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
let a = "";
|
|
1432
|
+
t.style && (typeof t.style == "string" ? a = t.style : typeof t.style == "function" && (a = t.style(r)));
|
|
1433
|
+
let l = Re(`${a}
|
|
1434
|
+
${i}
|
|
1435
|
+
`);
|
|
1436
|
+
l = ge(l);
|
|
1437
|
+
let f = o;
|
|
1438
|
+
f || (f = new CSSStyleSheet()), (f.cssRules.length === 0 || f.toString() !== l) && f.replaceSync(l), e.adoptedStyleSheets = [ae(), f], s(f);
|
|
1439
|
+
}
|
|
1440
|
+
const Je = /* @__PURE__ */ new Map();
|
|
1441
|
+
function de(e, t, r) {
|
|
1442
|
+
let n = ne(e);
|
|
1443
|
+
n.includes("-") || (n = `cer-${n}`);
|
|
1444
|
+
let o;
|
|
1445
|
+
typeof t == "function" ? o = { ...r, render: t } : o = t, typeof o.onError != "function" && (o.onError = (s, i) => {
|
|
1446
|
+
console.error(`[${n}] Error:`, s, i);
|
|
1447
|
+
}), Je.set(n, o), typeof window < "u" && !customElements.get(n) && customElements.define(n, Qe(o));
|
|
1566
1448
|
}
|
|
1567
|
-
function
|
|
1449
|
+
function Qe(e) {
|
|
1568
1450
|
if (!e.render)
|
|
1569
1451
|
throw new Error(
|
|
1570
1452
|
"Component must have a render function"
|
|
@@ -1584,6 +1466,24 @@ function ze(e) {
|
|
|
1584
1466
|
_initializing = !0;
|
|
1585
1467
|
_styleSheet = null;
|
|
1586
1468
|
_lastHtmlStringForJitCSS = "";
|
|
1469
|
+
/**
|
|
1470
|
+
* Returns the last rendered HTML string for JIT CSS.
|
|
1471
|
+
*/
|
|
1472
|
+
get lastHtmlStringForJitCSS() {
|
|
1473
|
+
return this._lastHtmlStringForJitCSS;
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Returns true if the component is currently loading.
|
|
1477
|
+
*/
|
|
1478
|
+
get isLoading() {
|
|
1479
|
+
return this._templateLoading;
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* Returns the last error thrown during rendering, or null if none.
|
|
1483
|
+
*/
|
|
1484
|
+
get lastError() {
|
|
1485
|
+
return this._templateError;
|
|
1486
|
+
}
|
|
1587
1487
|
_cfg;
|
|
1588
1488
|
_lastRenderTime = 0;
|
|
1589
1489
|
_renderCount = 0;
|
|
@@ -1596,43 +1496,98 @@ function ze(e) {
|
|
|
1596
1496
|
value: this._refs,
|
|
1597
1497
|
writable: !1,
|
|
1598
1498
|
enumerable: !1,
|
|
1599
|
-
// Hide from iteration to avoid proxy traps
|
|
1600
1499
|
configurable: !1
|
|
1601
|
-
}),
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1500
|
+
}), Object.defineProperty(t, "requestRender", {
|
|
1501
|
+
value: () => this.requestRender(),
|
|
1502
|
+
writable: !1,
|
|
1503
|
+
enumerable: !1,
|
|
1504
|
+
configurable: !1
|
|
1505
|
+
}), this.context = t, this._applyProps(e), Object.defineProperty(this.context, "emit", {
|
|
1506
|
+
value: (r, n, o) => {
|
|
1507
|
+
this.dispatchEvent(
|
|
1508
|
+
new CustomEvent(r, {
|
|
1509
|
+
detail: n,
|
|
1510
|
+
bubbles: !0,
|
|
1511
|
+
composed: !0,
|
|
1512
|
+
...o || {}
|
|
1513
|
+
})
|
|
1514
|
+
);
|
|
1515
|
+
const s = `on${r.charAt(0).toUpperCase()}${r.slice(1)}`, i = typeof this[s] == "function" ? this[s] : void 0, a = typeof this.context[s] == "function" ? this.context[s] : void 0, l = typeof e[s] == "function" ? e[s] : void 0;
|
|
1516
|
+
i && i(n, this.context), a && a !== i && a(n, this.context), l && l !== i && l !== a && l(n, this.context);
|
|
1517
|
+
},
|
|
1518
|
+
writable: !1,
|
|
1519
|
+
enumerable: !1,
|
|
1520
|
+
configurable: !1
|
|
1521
|
+
}), Object.keys(e).forEach((r) => {
|
|
1522
|
+
const n = e[r];
|
|
1523
|
+
if (typeof n == "function" && !r.startsWith("on"))
|
|
1524
|
+
this.context[r] = (...o) => n(...o, this.context);
|
|
1525
|
+
else if (r.startsWith("on") && r.length > 2 && r[2] === r[2].toUpperCase()) {
|
|
1526
|
+
const o = r.slice(2, 3).toLowerCase() + r.slice(3);
|
|
1527
|
+
this.addEventListener(o, (s) => {
|
|
1528
|
+
const i = typeof this[r] == "function" ? this[r] : this.context[r];
|
|
1529
|
+
typeof i == "function" && i(s.detail, this.context);
|
|
1530
|
+
});
|
|
1531
|
+
}
|
|
1532
|
+
}), this._applyComputed(e), this._initializing = !1, this._initWatchers(e), this._render(e);
|
|
1605
1533
|
}
|
|
1606
1534
|
connectedCallback() {
|
|
1607
1535
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
1608
|
-
e
|
|
1536
|
+
$e(
|
|
1537
|
+
e,
|
|
1538
|
+
this.context,
|
|
1539
|
+
this._mounted,
|
|
1540
|
+
(t) => {
|
|
1541
|
+
this._mounted = t;
|
|
1542
|
+
}
|
|
1543
|
+
);
|
|
1609
1544
|
});
|
|
1610
1545
|
}
|
|
1611
1546
|
disconnectedCallback() {
|
|
1612
1547
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
1613
|
-
|
|
1548
|
+
Ce(
|
|
1549
|
+
e,
|
|
1550
|
+
this.context,
|
|
1551
|
+
this._listeners,
|
|
1552
|
+
() => {
|
|
1553
|
+
this._listeners = [];
|
|
1554
|
+
},
|
|
1555
|
+
() => {
|
|
1556
|
+
this._watchers.clear();
|
|
1557
|
+
},
|
|
1558
|
+
(t) => {
|
|
1559
|
+
this._templateLoading = t;
|
|
1560
|
+
},
|
|
1561
|
+
(t) => {
|
|
1562
|
+
this._templateError = t;
|
|
1563
|
+
},
|
|
1564
|
+
(t) => {
|
|
1565
|
+
this._mounted = t;
|
|
1566
|
+
}
|
|
1567
|
+
);
|
|
1614
1568
|
});
|
|
1615
1569
|
}
|
|
1616
|
-
attributeChangedCallback(t,
|
|
1570
|
+
attributeChangedCallback(t, r, n) {
|
|
1617
1571
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
1618
|
-
this._applyProps(e),
|
|
1572
|
+
this._applyProps(e), Se(
|
|
1573
|
+
e,
|
|
1619
1574
|
t,
|
|
1620
|
-
n,
|
|
1621
1575
|
r,
|
|
1576
|
+
n,
|
|
1622
1577
|
this.context
|
|
1623
1578
|
);
|
|
1624
1579
|
});
|
|
1625
1580
|
}
|
|
1626
1581
|
static get observedAttributes() {
|
|
1627
|
-
return e.props ? Object.keys(e.props).map(
|
|
1582
|
+
return e.props ? Object.keys(e.props).map(ne) : [];
|
|
1628
1583
|
}
|
|
1629
1584
|
_applyComputed(t) {
|
|
1630
1585
|
this._runLogicWithinErrorBoundary(e, () => {
|
|
1631
|
-
t.computed && Object.entries(t.computed).forEach(([
|
|
1632
|
-
Object.defineProperty(this.context,
|
|
1586
|
+
t.computed && Object.entries(t.computed).forEach(([r, n]) => {
|
|
1587
|
+
Object.defineProperty(this.context, r, {
|
|
1633
1588
|
get: () => {
|
|
1634
|
-
const
|
|
1635
|
-
return
|
|
1589
|
+
const o = n(this.context);
|
|
1590
|
+
return ee(o);
|
|
1636
1591
|
},
|
|
1637
1592
|
enumerable: !0
|
|
1638
1593
|
});
|
|
@@ -1642,90 +1597,69 @@ function ze(e) {
|
|
|
1642
1597
|
// --- Render ---
|
|
1643
1598
|
_render(t) {
|
|
1644
1599
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
throw r;
|
|
1662
|
-
}), t.loadingTemplate && this._renderOutput(t.loadingTemplate(this.context));
|
|
1663
|
-
return;
|
|
1664
|
-
}
|
|
1665
|
-
this._renderOutput(n), this._applyStyle(t);
|
|
1600
|
+
Ke(
|
|
1601
|
+
this.shadowRoot,
|
|
1602
|
+
t,
|
|
1603
|
+
this.context,
|
|
1604
|
+
this._refs,
|
|
1605
|
+
(r) => {
|
|
1606
|
+
this._lastHtmlStringForJitCSS = r, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(r);
|
|
1607
|
+
},
|
|
1608
|
+
(r) => {
|
|
1609
|
+
this._templateLoading = r, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(r);
|
|
1610
|
+
},
|
|
1611
|
+
(r) => {
|
|
1612
|
+
this._templateError = r, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(r);
|
|
1613
|
+
},
|
|
1614
|
+
(r) => this._applyStyle(t, r)
|
|
1615
|
+
);
|
|
1666
1616
|
});
|
|
1667
1617
|
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
if (!this.shadowRoot) return;
|
|
1671
|
-
const n = new Proxy(this.context, {
|
|
1672
|
-
get: (r, i) => i === "_requestRender" ? () => this._requestRender() : i === "context" ? r : typeof i == "string" && i.includes(".") ? i.split(".").reduce((s, o) => s?.[o], r) : r[i],
|
|
1673
|
-
set: (r, i, s) => {
|
|
1674
|
-
if (typeof i == "string" && i.includes(".")) {
|
|
1675
|
-
const o = i.split("."), l = o.pop();
|
|
1676
|
-
if (!l) return !1;
|
|
1677
|
-
const f = o.reduce((u, p) => (p in u || (u[p] = {}), u[p]), r);
|
|
1678
|
-
return f[l] = s, !0;
|
|
1679
|
-
}
|
|
1680
|
-
return r[i] = s, !0;
|
|
1681
|
-
}
|
|
1682
|
-
});
|
|
1683
|
-
xe(
|
|
1684
|
-
this.shadowRoot,
|
|
1685
|
-
Array.isArray(t) ? t : [t],
|
|
1686
|
-
n,
|
|
1687
|
-
this._refs
|
|
1688
|
-
), this._lastHtmlStringForJitCSS = this.shadowRoot.innerHTML;
|
|
1618
|
+
requestRender() {
|
|
1619
|
+
this._requestRender();
|
|
1689
1620
|
}
|
|
1690
1621
|
_requestRender() {
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1622
|
+
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
1623
|
+
Ve(
|
|
1624
|
+
() => this._render(this._cfg),
|
|
1625
|
+
this._lastRenderTime,
|
|
1626
|
+
this._renderCount,
|
|
1627
|
+
(t) => {
|
|
1628
|
+
this._lastRenderTime = t;
|
|
1629
|
+
},
|
|
1630
|
+
(t) => {
|
|
1631
|
+
this._renderCount = t;
|
|
1632
|
+
},
|
|
1633
|
+
this._renderTimeoutId,
|
|
1634
|
+
(t) => {
|
|
1635
|
+
this._renderTimeoutId = t;
|
|
1636
|
+
}
|
|
1637
|
+
);
|
|
1638
|
+
});
|
|
1703
1639
|
}
|
|
1704
1640
|
// --- Style ---
|
|
1705
|
-
_applyStyle(t) {
|
|
1641
|
+
_applyStyle(t, r) {
|
|
1706
1642
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
this.
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
`);
|
|
1718
|
-
i = oe(i), this._styleSheet || (this._styleSheet = new CSSStyleSheet()), (this._styleSheet.cssRules.length === 0 || this._styleSheet.toString() !== i) && this._styleSheet.replaceSync(i), this.shadowRoot.adoptedStyleSheets = [G(), this._styleSheet];
|
|
1643
|
+
Ue(
|
|
1644
|
+
this.shadowRoot,
|
|
1645
|
+
t,
|
|
1646
|
+
this.context,
|
|
1647
|
+
r,
|
|
1648
|
+
this._styleSheet,
|
|
1649
|
+
(n) => {
|
|
1650
|
+
this._styleSheet = n;
|
|
1651
|
+
}
|
|
1652
|
+
);
|
|
1719
1653
|
});
|
|
1720
1654
|
}
|
|
1721
1655
|
// --- Error Boundary function ---
|
|
1722
|
-
_runLogicWithinErrorBoundary(t,
|
|
1656
|
+
_runLogicWithinErrorBoundary(t, r) {
|
|
1723
1657
|
this._hasError && (this._hasError = !1);
|
|
1724
1658
|
try {
|
|
1725
|
-
|
|
1726
|
-
} catch (
|
|
1727
|
-
this._hasError = !0, t.onError && t.onError(
|
|
1728
|
-
|
|
1659
|
+
r();
|
|
1660
|
+
} catch (n) {
|
|
1661
|
+
this._hasError = !0, t.onError && t.onError(n, this.context), t.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = t.errorFallback(
|
|
1662
|
+
n,
|
|
1729
1663
|
this.context
|
|
1730
1664
|
));
|
|
1731
1665
|
}
|
|
@@ -1733,11 +1667,11 @@ ${n}
|
|
|
1733
1667
|
// --- State, props, computed ---
|
|
1734
1668
|
_initContext(t) {
|
|
1735
1669
|
try {
|
|
1736
|
-
let
|
|
1737
|
-
return Array.isArray(
|
|
1738
|
-
get(
|
|
1739
|
-
const
|
|
1740
|
-
return typeof
|
|
1670
|
+
let r = function(o, s = "") {
|
|
1671
|
+
return Array.isArray(o) ? new Proxy(o, {
|
|
1672
|
+
get(i, a, l) {
|
|
1673
|
+
const f = Reflect.get(i, a, l);
|
|
1674
|
+
return typeof f == "function" && typeof a == "string" && [
|
|
1741
1675
|
"push",
|
|
1742
1676
|
"pop",
|
|
1743
1677
|
"shift",
|
|
@@ -1745,128 +1679,477 @@ ${n}
|
|
|
1745
1679
|
"splice",
|
|
1746
1680
|
"sort",
|
|
1747
1681
|
"reverse"
|
|
1748
|
-
].includes(
|
|
1749
|
-
const
|
|
1750
|
-
if (!
|
|
1751
|
-
const
|
|
1752
|
-
|
|
1682
|
+
].includes(a) ? function(...d) {
|
|
1683
|
+
const u = f.apply(i, d);
|
|
1684
|
+
if (!n._initializing) {
|
|
1685
|
+
const m = s || "root";
|
|
1686
|
+
n._triggerWatchers(m, i), n._render(t);
|
|
1753
1687
|
}
|
|
1754
|
-
return
|
|
1755
|
-
} :
|
|
1688
|
+
return u;
|
|
1689
|
+
} : f;
|
|
1756
1690
|
},
|
|
1757
|
-
set(
|
|
1758
|
-
if (
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1691
|
+
set(i, a, l) {
|
|
1692
|
+
if (i[a] = l, !n._initializing) {
|
|
1693
|
+
const f = s ? `${s}.${String(a)}` : String(a);
|
|
1694
|
+
n._triggerWatchers(f, l), n._render(t);
|
|
1761
1695
|
}
|
|
1762
1696
|
return !0;
|
|
1763
1697
|
},
|
|
1764
|
-
deleteProperty(
|
|
1765
|
-
if (delete
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1698
|
+
deleteProperty(i, a) {
|
|
1699
|
+
if (delete i[a], !n._initializing) {
|
|
1700
|
+
const l = s ? `${s}.${String(a)}` : String(a);
|
|
1701
|
+
n._triggerWatchers(l, void 0), n._render(t);
|
|
1768
1702
|
}
|
|
1769
1703
|
return !0;
|
|
1770
1704
|
}
|
|
1771
|
-
}) :
|
|
1772
|
-
const
|
|
1773
|
-
i
|
|
1774
|
-
}), new Proxy(
|
|
1775
|
-
set(
|
|
1776
|
-
const
|
|
1777
|
-
return
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
),
|
|
1705
|
+
}) : o && typeof o == "object" ? (Object.keys(o).forEach((i) => {
|
|
1706
|
+
const a = s ? `${s}.${i}` : i;
|
|
1707
|
+
o[i] = r(o[i], a);
|
|
1708
|
+
}), new Proxy(o, {
|
|
1709
|
+
set(i, a, l) {
|
|
1710
|
+
const f = s ? `${s}.${String(a)}` : String(a);
|
|
1711
|
+
return i[a] = r(l, f), n._initializing || (n._triggerWatchers(
|
|
1712
|
+
f,
|
|
1713
|
+
i[a]
|
|
1714
|
+
), n._render(t)), !0;
|
|
1781
1715
|
},
|
|
1782
|
-
get(
|
|
1783
|
-
return Reflect.get(
|
|
1716
|
+
get(i, a, l) {
|
|
1717
|
+
return Reflect.get(i, a, l);
|
|
1784
1718
|
}
|
|
1785
|
-
})) :
|
|
1719
|
+
})) : o;
|
|
1786
1720
|
};
|
|
1787
|
-
const
|
|
1788
|
-
return
|
|
1721
|
+
const n = this;
|
|
1722
|
+
return r({ ...t.state });
|
|
1789
1723
|
} catch {
|
|
1790
1724
|
return {};
|
|
1791
1725
|
}
|
|
1792
1726
|
}
|
|
1793
1727
|
_initWatchers(t) {
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
}), s.immediate)
|
|
1802
|
-
try {
|
|
1803
|
-
const o = this._getNestedValue(n);
|
|
1804
|
-
i(o, void 0, this.context);
|
|
1805
|
-
} catch (o) {
|
|
1806
|
-
console.error(`Error in immediate watcher for "${n}":`, o);
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1728
|
+
this._runLogicWithinErrorBoundary(t, () => {
|
|
1729
|
+
xe(
|
|
1730
|
+
this.context,
|
|
1731
|
+
this._watchers,
|
|
1732
|
+
t.watch || {}
|
|
1733
|
+
);
|
|
1734
|
+
});
|
|
1809
1735
|
}
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
(n, r) => n?.[r],
|
|
1813
|
-
this.context
|
|
1814
|
-
);
|
|
1736
|
+
_triggerWatchers(t, r) {
|
|
1737
|
+
we(this.context, this._watchers, t, r);
|
|
1815
1738
|
}
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
if (s === o) return !0;
|
|
1819
|
-
if (typeof s != typeof o || typeof s != "object" || s === null || o === null) return !1;
|
|
1820
|
-
if (Array.isArray(s) && Array.isArray(o))
|
|
1821
|
-
return s.length !== o.length ? !1 : s.every((u, p) => r(u, o[p]));
|
|
1822
|
-
const l = Object.keys(s), f = Object.keys(o);
|
|
1823
|
-
return l.length !== f.length ? !1 : l.every((u) => r(s[u], o[u]));
|
|
1824
|
-
}, i = this._watchers.get(t);
|
|
1825
|
-
if (i && !r(n, i.oldValue))
|
|
1739
|
+
_applyProps(t) {
|
|
1740
|
+
this._runLogicWithinErrorBoundary(t, () => {
|
|
1826
1741
|
try {
|
|
1827
|
-
|
|
1828
|
-
} catch (
|
|
1829
|
-
|
|
1742
|
+
ke(this, t, this.context);
|
|
1743
|
+
} catch (r) {
|
|
1744
|
+
this._hasError = !0, t.onError && t.onError(r, this.context), t.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = t.errorFallback(r, this.context));
|
|
1830
1745
|
}
|
|
1831
|
-
|
|
1832
|
-
if (o.options.deep && t.startsWith(s + "."))
|
|
1833
|
-
try {
|
|
1834
|
-
const l = this._getNestedValue(s);
|
|
1835
|
-
r(l, o.oldValue) || (o.callback(l, o.oldValue, this.context), o.oldValue = l);
|
|
1836
|
-
} catch (l) {
|
|
1837
|
-
console.error(`Error in deep watcher for "${s}":`, l);
|
|
1838
|
-
}
|
|
1746
|
+
});
|
|
1839
1747
|
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1748
|
+
};
|
|
1749
|
+
}
|
|
1750
|
+
function F(e, t = {}, r, n) {
|
|
1751
|
+
const o = n ?? t.key;
|
|
1752
|
+
return { tag: e, key: o, props: t, children: r };
|
|
1753
|
+
}
|
|
1754
|
+
function U(e) {
|
|
1755
|
+
return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
|
|
1756
|
+
}
|
|
1757
|
+
function N(e) {
|
|
1758
|
+
return typeof e == "object" && e !== null && "tag" in e && !U(e);
|
|
1759
|
+
}
|
|
1760
|
+
function Ze(e, t) {
|
|
1761
|
+
return e.key != null ? e : { ...e, key: t };
|
|
1762
|
+
}
|
|
1763
|
+
function Xe(e, t = [], r = {}) {
|
|
1764
|
+
const n = {}, o = {}, s = {}, i = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
|
|
1765
|
+
let a;
|
|
1766
|
+
for (; a = i.exec(e); ) {
|
|
1767
|
+
const l = a[1], f = a[2], p = (a[4] || a[6]) ?? "", d = p.match(/^{{(\d+)}}$/);
|
|
1768
|
+
let u = d ? t[Number(d[1])] ?? null : p;
|
|
1769
|
+
if (d || (u === "true" ? u = !0 : u === "false" ? u = !1 : u === "null" ? u = null : isNaN(Number(u)) || (u = Number(u))), l === ":")
|
|
1770
|
+
typeof u == "boolean" ? o[f] = u : u != null && (n[f] = u);
|
|
1771
|
+
else if (l === "@") {
|
|
1772
|
+
const m = "on" + f.charAt(0).toUpperCase() + f.slice(1);
|
|
1773
|
+
n[m] = typeof u == "function" ? u : typeof r[u] == "function" ? r[u] : void 0;
|
|
1774
|
+
} else if (l === "#") {
|
|
1775
|
+
const [m, ...h] = f.split("."), C = [...h];
|
|
1776
|
+
let y = u, c = [...C];
|
|
1777
|
+
if (m === "model" && typeof y == "string" && y.includes(".")) {
|
|
1778
|
+
const b = ["trim", "number", "lazy"], g = y.split(".");
|
|
1779
|
+
let v = y;
|
|
1780
|
+
const w = [];
|
|
1781
|
+
for (let k = g.length - 1; k > 0 && b.includes(g[k]); k--)
|
|
1782
|
+
w.unshift(g[k]), v = g.slice(0, k).join(".");
|
|
1783
|
+
y = v, c.push(...w);
|
|
1857
1784
|
}
|
|
1785
|
+
s[m] = {
|
|
1786
|
+
value: y,
|
|
1787
|
+
modifiers: c
|
|
1788
|
+
};
|
|
1789
|
+
} else f === "ref" ? n.ref = u : o[f] = u;
|
|
1790
|
+
}
|
|
1791
|
+
return { props: n, attrs: o, directives: s };
|
|
1792
|
+
}
|
|
1793
|
+
function Ye(e, t, r) {
|
|
1794
|
+
function n(c, b) {
|
|
1795
|
+
return F("#text", {}, c, b);
|
|
1796
|
+
}
|
|
1797
|
+
let o = "";
|
|
1798
|
+
for (let c = 0; c < e.length; c++)
|
|
1799
|
+
o += e[c], c < t.length && (o += `{{${c}}}`);
|
|
1800
|
+
const s = /<\/?([a-zA-Z0-9-]+)([^>]*)\/?>|{{(\d+)}}|([^<]+)/g, i = [];
|
|
1801
|
+
let a = null, l, f = [], p = null, d = {}, u, m = 0, h = [];
|
|
1802
|
+
function C(c) {
|
|
1803
|
+
!c || typeof c != "object" || U(c) || (c.props || c.attrs ? (c.props && (d.props || (d.props = {}), Object.assign(d.props, c.props)), c.attrs && (d.attrs || (d.attrs = {}), Object.keys(c.attrs).forEach((b) => {
|
|
1804
|
+
if (b === "style" && d.attrs.style) {
|
|
1805
|
+
const g = d.attrs.style.replace(
|
|
1806
|
+
/;?\s*$/,
|
|
1807
|
+
""
|
|
1808
|
+
), v = c.attrs.style.replace(/^;?\s*/, "");
|
|
1809
|
+
d.attrs.style = g + "; " + v;
|
|
1810
|
+
} else if (b === "class" && d.attrs.class) {
|
|
1811
|
+
const g = d.attrs.class.trim().split(/\s+/).filter(Boolean), v = c.attrs.class.trim().split(/\s+/).filter(Boolean), w = [
|
|
1812
|
+
.../* @__PURE__ */ new Set([...g, ...v])
|
|
1813
|
+
];
|
|
1814
|
+
d.attrs.class = w.join(" ");
|
|
1815
|
+
} else
|
|
1816
|
+
d.attrs[b] = c.attrs[b];
|
|
1817
|
+
}))) : (d.props || (d.props = {}), Object.assign(d.props, c)));
|
|
1818
|
+
}
|
|
1819
|
+
function y(c, b) {
|
|
1820
|
+
const g = p ? f : h;
|
|
1821
|
+
if (U(c)) {
|
|
1822
|
+
const v = c.key ?? b;
|
|
1823
|
+
let w = c.children;
|
|
1824
|
+
g.push({
|
|
1825
|
+
...c,
|
|
1826
|
+
key: v,
|
|
1827
|
+
children: w
|
|
1828
|
+
});
|
|
1829
|
+
return;
|
|
1858
1830
|
}
|
|
1831
|
+
if (N(c)) {
|
|
1832
|
+
g.push(Ze(c, void 0));
|
|
1833
|
+
return;
|
|
1834
|
+
}
|
|
1835
|
+
if (Array.isArray(c)) {
|
|
1836
|
+
if (c.length === 0) return;
|
|
1837
|
+
for (let v = 0; v < c.length; v++) {
|
|
1838
|
+
const w = c[v];
|
|
1839
|
+
U(w) || N(w) || Array.isArray(w) ? y(w, `${b}-${v}`) : w !== null && typeof w == "object" ? C(w) : g.push(n(String(w), `${b}-${v}`));
|
|
1840
|
+
}
|
|
1841
|
+
return;
|
|
1842
|
+
}
|
|
1843
|
+
if (c !== null && typeof c == "object") {
|
|
1844
|
+
C(c);
|
|
1845
|
+
return;
|
|
1846
|
+
}
|
|
1847
|
+
g.push(n(String(c), b));
|
|
1848
|
+
}
|
|
1849
|
+
for (; l = s.exec(o); )
|
|
1850
|
+
if (l[1]) {
|
|
1851
|
+
const c = l[1], b = l[0][1] === "/", g = l[0][l[0].length - 2] === "/", {
|
|
1852
|
+
props: v,
|
|
1853
|
+
attrs: w,
|
|
1854
|
+
directives: k
|
|
1855
|
+
} = Xe(l[2] || "", t, r), S = { props: {}, attrs: {} };
|
|
1856
|
+
for (const x in v) S.props[x] = v[x];
|
|
1857
|
+
for (const x in w) S.attrs[x] = w[x];
|
|
1858
|
+
for (const [x, $] of Object.entries(k))
|
|
1859
|
+
if (x === "bind")
|
|
1860
|
+
if (typeof $.value == "object" && $.value !== null)
|
|
1861
|
+
for (const [A, E] of Object.entries($.value))
|
|
1862
|
+
typeof E == "boolean" ? S.attrs[A] = E : E != null && (S.attrs[A] = String(E));
|
|
1863
|
+
else $.value != null && (S.attrs[x] = String($.value));
|
|
1864
|
+
else if (x === "show") {
|
|
1865
|
+
const A = !!$.value;
|
|
1866
|
+
S.attrs.style = (S.attrs.style || "") + (A ? "" : "; display: none !important");
|
|
1867
|
+
} else if (x === "class") {
|
|
1868
|
+
const A = $.value;
|
|
1869
|
+
let E = [];
|
|
1870
|
+
if (typeof A == "string")
|
|
1871
|
+
E = A.split(/\s+/).filter(Boolean);
|
|
1872
|
+
else if (Array.isArray(A)) {
|
|
1873
|
+
for (const j of A)
|
|
1874
|
+
if (typeof j == "string")
|
|
1875
|
+
E.push(...j.split(/\s+/).filter(Boolean));
|
|
1876
|
+
else if (j && typeof j == "object")
|
|
1877
|
+
for (const [L, I] of Object.entries(j))
|
|
1878
|
+
I && E.push(...L.split(/\s+/).filter(Boolean));
|
|
1879
|
+
} else if (A && typeof A == "object")
|
|
1880
|
+
for (const [j, L] of Object.entries(A))
|
|
1881
|
+
L && E.push(...j.split(/\s+/).filter(Boolean));
|
|
1882
|
+
const O = S.attrs.class || "", W = [
|
|
1883
|
+
.../* @__PURE__ */ new Set([
|
|
1884
|
+
...O.split(/\s+/).filter(Boolean),
|
|
1885
|
+
...E
|
|
1886
|
+
])
|
|
1887
|
+
];
|
|
1888
|
+
S.attrs.class = W.join(" ");
|
|
1889
|
+
} else if (x === "style") {
|
|
1890
|
+
const A = $.value;
|
|
1891
|
+
let E = "";
|
|
1892
|
+
if (typeof A == "string")
|
|
1893
|
+
E = A;
|
|
1894
|
+
else if (A && typeof A == "object") {
|
|
1895
|
+
const W = [];
|
|
1896
|
+
for (const [j, L] of Object.entries(A))
|
|
1897
|
+
if (L != null && L !== "") {
|
|
1898
|
+
const I = j.replace(
|
|
1899
|
+
/[A-Z]/g,
|
|
1900
|
+
(ye) => `-${ye.toLowerCase()}`
|
|
1901
|
+
), me = [
|
|
1902
|
+
"width",
|
|
1903
|
+
"height",
|
|
1904
|
+
"top",
|
|
1905
|
+
"right",
|
|
1906
|
+
"bottom",
|
|
1907
|
+
"left",
|
|
1908
|
+
"margin",
|
|
1909
|
+
"margin-top",
|
|
1910
|
+
"margin-right",
|
|
1911
|
+
"margin-bottom",
|
|
1912
|
+
"margin-left",
|
|
1913
|
+
"padding",
|
|
1914
|
+
"padding-top",
|
|
1915
|
+
"padding-right",
|
|
1916
|
+
"padding-bottom",
|
|
1917
|
+
"padding-left",
|
|
1918
|
+
"font-size",
|
|
1919
|
+
"line-height",
|
|
1920
|
+
"border-width",
|
|
1921
|
+
"border-radius",
|
|
1922
|
+
"min-width",
|
|
1923
|
+
"max-width",
|
|
1924
|
+
"min-height",
|
|
1925
|
+
"max-height"
|
|
1926
|
+
];
|
|
1927
|
+
let oe = String(L);
|
|
1928
|
+
typeof L == "number" && me.includes(I) && (oe = `${L}px`), W.push(`${I}: ${oe}`);
|
|
1929
|
+
}
|
|
1930
|
+
E = W.join("; ") + (W.length > 0 ? ";" : "");
|
|
1931
|
+
}
|
|
1932
|
+
const O = S.attrs.style || "";
|
|
1933
|
+
S.attrs.style = O + (O && !O.endsWith(";") ? "; " : "") + E;
|
|
1934
|
+
}
|
|
1935
|
+
const _ = {};
|
|
1936
|
+
for (const [x, $] of Object.entries(k))
|
|
1937
|
+
["bind", "show", "class", "style"].includes(x) || (_[x] = $);
|
|
1938
|
+
if (Object.keys(_).length > 0 && (S.directives = _), b) {
|
|
1939
|
+
const x = F(
|
|
1940
|
+
p,
|
|
1941
|
+
d,
|
|
1942
|
+
f.length === 1 && N(f[0]) && f[0].tag === "#text" ? typeof f[0].children == "string" ? f[0].children : "" : f.length ? f : void 0,
|
|
1943
|
+
u
|
|
1944
|
+
), $ = i.pop();
|
|
1945
|
+
$ ? (p = $.tag, d = $.props, u = $.key, f = $.children, f.push(x)) : a = x;
|
|
1946
|
+
} else g ? (p ? f : h).push(F(c, S, void 0, void 0)) : (p && i.push({
|
|
1947
|
+
tag: p,
|
|
1948
|
+
props: d,
|
|
1949
|
+
children: f,
|
|
1950
|
+
key: u
|
|
1951
|
+
}), p = c, d = S, f = []);
|
|
1952
|
+
} else if (typeof l[3] < "u") {
|
|
1953
|
+
const c = Number(l[3]), b = t[c], g = `interp-${c}`;
|
|
1954
|
+
y(b, g);
|
|
1955
|
+
} else if (l[4]) {
|
|
1956
|
+
const c = l[4], b = p ? f : h, g = c.split(/({{\d+}})/);
|
|
1957
|
+
for (const v of g) {
|
|
1958
|
+
if (!v) continue;
|
|
1959
|
+
const w = v.match(/^{{(\d+)}}$/);
|
|
1960
|
+
if (w) {
|
|
1961
|
+
const k = Number(w[1]), S = t[k], _ = `interp-${k}`;
|
|
1962
|
+
y(S, _);
|
|
1963
|
+
} else {
|
|
1964
|
+
const k = `text-${m++}`;
|
|
1965
|
+
b.push(n(v, k));
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
if (a)
|
|
1970
|
+
return N(a) && Array.isArray(a.children) && (a.children = a.children.filter(
|
|
1971
|
+
(c) => N(c) ? c.tag !== "#text" || typeof c.children == "string" && c.children.trim() !== "" : !0
|
|
1972
|
+
// keep non-element VNodes (including anchors) as-is
|
|
1973
|
+
)), a;
|
|
1974
|
+
if (h.length > 0) {
|
|
1975
|
+
const c = h.filter(
|
|
1976
|
+
(b) => N(b) ? b.tag !== "#text" || typeof b.children == "string" && b.children.trim() !== "" : !0
|
|
1977
|
+
);
|
|
1978
|
+
return c.length === 1 ? c[0] : c;
|
|
1979
|
+
}
|
|
1980
|
+
return F("div", {}, "", "fallback-root");
|
|
1981
|
+
}
|
|
1982
|
+
function B(e, ...t) {
|
|
1983
|
+
const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
|
|
1984
|
+
return Ye(e, t, n);
|
|
1985
|
+
}
|
|
1986
|
+
const Ge = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, D = (e, t) => {
|
|
1987
|
+
for (const r of e) {
|
|
1988
|
+
const n = [], o = r.path.replace(/:[^/]+/g, (a) => (n.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${o}$`), i = t.match(s);
|
|
1989
|
+
if (i) {
|
|
1990
|
+
const a = {};
|
|
1991
|
+
return n.forEach((l, f) => {
|
|
1992
|
+
a[l] = i[f + 1];
|
|
1993
|
+
}), { route: r, params: a };
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
return { route: null, params: {} };
|
|
1997
|
+
}, G = {};
|
|
1998
|
+
async function et(e) {
|
|
1999
|
+
if (e.component) return e.component;
|
|
2000
|
+
if (e.load) {
|
|
2001
|
+
if (G[e.path]) return G[e.path];
|
|
2002
|
+
try {
|
|
2003
|
+
const t = await e.load();
|
|
2004
|
+
return G[e.path] = t.default, t.default;
|
|
2005
|
+
} catch {
|
|
2006
|
+
throw new Error(`Failed to load component for route: ${e.path}`);
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
throw new Error(`No component or loader defined for route: ${e.path}`);
|
|
2010
|
+
}
|
|
2011
|
+
function tt(e) {
|
|
2012
|
+
const { routes: t, base: r = "" } = e;
|
|
2013
|
+
let n, o, s, i, a, l, f;
|
|
2014
|
+
if (typeof window < "u" && typeof document < "u") {
|
|
2015
|
+
n = () => {
|
|
2016
|
+
const d = new URL(window.location.href), u = d.pathname.replace(r, "") || "/", m = Ge(d.search);
|
|
2017
|
+
return { path: u, query: m };
|
|
2018
|
+
}, o = n();
|
|
2019
|
+
const p = D(t, o.path);
|
|
2020
|
+
s = ie({
|
|
2021
|
+
path: o.path,
|
|
2022
|
+
params: p.params,
|
|
2023
|
+
query: o.query
|
|
2024
|
+
}), i = () => {
|
|
2025
|
+
const d = n(), u = D(t, d.path), m = s.getState();
|
|
2026
|
+
m.path = d.path, m.params = u.params, m.query = d.query;
|
|
2027
|
+
}, window.addEventListener("popstate", i), a = (d) => {
|
|
2028
|
+
window.history.pushState({}, "", r + d), i();
|
|
2029
|
+
}, l = (d) => {
|
|
2030
|
+
window.history.replaceState({}, "", r + d), i();
|
|
2031
|
+
}, f = () => window.history.back();
|
|
2032
|
+
} else {
|
|
2033
|
+
n = () => ({ path: "/", query: {} }), o = n();
|
|
2034
|
+
const p = D(t, o.path);
|
|
2035
|
+
s = ie({
|
|
2036
|
+
path: o.path,
|
|
2037
|
+
params: p.params,
|
|
2038
|
+
query: o.query
|
|
2039
|
+
}), i = () => {
|
|
2040
|
+
}, a = () => {
|
|
2041
|
+
}, l = () => {
|
|
2042
|
+
}, f = () => {
|
|
2043
|
+
};
|
|
2044
|
+
}
|
|
2045
|
+
return {
|
|
2046
|
+
store: s,
|
|
2047
|
+
push: a,
|
|
2048
|
+
replace: l,
|
|
2049
|
+
back: f,
|
|
2050
|
+
subscribe: s.subscribe,
|
|
2051
|
+
matchRoute: (p) => D(t, p),
|
|
2052
|
+
getCurrent: () => s.getState(),
|
|
2053
|
+
resolveRouteComponent: et
|
|
1859
2054
|
};
|
|
1860
2055
|
}
|
|
2056
|
+
function ct(e, t) {
|
|
2057
|
+
return D(e, t);
|
|
2058
|
+
}
|
|
2059
|
+
function ft(e) {
|
|
2060
|
+
const t = tt(e);
|
|
2061
|
+
return de("router-view", {
|
|
2062
|
+
async render() {
|
|
2063
|
+
if (!t) return B`<div>Router not initialized.</div>`;
|
|
2064
|
+
const r = t.getCurrent(), { path: n } = r, o = t.matchRoute(n);
|
|
2065
|
+
if (!o.route) return B`<div>Not found</div>`;
|
|
2066
|
+
let s = o.route.component;
|
|
2067
|
+
if (o.route.load) {
|
|
2068
|
+
const i = await o.route.load();
|
|
2069
|
+
typeof i.default == "string" && (s = i.default);
|
|
2070
|
+
}
|
|
2071
|
+
return typeof s == "string" ? B`<${s}></${s}>` : B`<div>Invalid route component</div>`;
|
|
2072
|
+
},
|
|
2073
|
+
onConnected(r) {
|
|
2074
|
+
t && typeof t.subscribe == "function" && t.subscribe(() => {
|
|
2075
|
+
typeof r.requestRender == "function" && r.requestRender();
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2078
|
+
}), de("router-link", {
|
|
2079
|
+
state: {},
|
|
2080
|
+
props: {
|
|
2081
|
+
to: { type: String, default: "" },
|
|
2082
|
+
tag: { type: String, default: "a" },
|
|
2083
|
+
replace: { type: Boolean, default: !1 },
|
|
2084
|
+
exact: { type: Boolean, default: !1 },
|
|
2085
|
+
activeClass: { type: String, default: "active" },
|
|
2086
|
+
exactActiveClass: { type: String, default: "exact-active" },
|
|
2087
|
+
ariaCurrentValue: { type: String, default: "page" },
|
|
2088
|
+
disabled: { type: Boolean, default: !1 },
|
|
2089
|
+
external: { type: Boolean, default: !1 },
|
|
2090
|
+
style: { type: String, default: he`
|
|
2091
|
+
[aria-disabled="true"] {
|
|
2092
|
+
pointer-events: none;
|
|
2093
|
+
opacity: 0.5;
|
|
2094
|
+
}
|
|
2095
|
+
` }
|
|
2096
|
+
},
|
|
2097
|
+
style: (r) => r.props.style,
|
|
2098
|
+
render: (r) => {
|
|
2099
|
+
const n = t.getCurrent(), o = r.props.to, s = r.props.exact, i = r.props.exactActiveClass, a = r.props.activeClass, l = r.props.ariaCurrentValue, f = r.props.tag, p = r.props.disabled, d = r.props.external, u = n.path === o, m = s ? u : n && typeof n.path == "string" ? n.path.startsWith(o) : !1, h = u ? i : m ? a : "", C = u ? `aria-current="${l}"` : "", y = f === "button", c = p ? y ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", b = d && (f === "a" || !f) ? 'target="_blank" rel="noopener noreferrer"' : "";
|
|
2100
|
+
return B`
|
|
2101
|
+
${be().when(y, B`
|
|
2102
|
+
<button
|
|
2103
|
+
part="button"
|
|
2104
|
+
class="${h}"
|
|
2105
|
+
${C}
|
|
2106
|
+
${c}
|
|
2107
|
+
${b}
|
|
2108
|
+
data-on-click="navigate"
|
|
2109
|
+
><slot></slot></button>
|
|
2110
|
+
`).otherwise(B`
|
|
2111
|
+
<a
|
|
2112
|
+
part="link"
|
|
2113
|
+
href="${o}"
|
|
2114
|
+
class="${h}"
|
|
2115
|
+
${C}
|
|
2116
|
+
${c}
|
|
2117
|
+
${b}
|
|
2118
|
+
data-on-click="navigate"
|
|
2119
|
+
><slot></slot></a>
|
|
2120
|
+
`).done()}
|
|
2121
|
+
`;
|
|
2122
|
+
},
|
|
2123
|
+
navigate: (r, n) => {
|
|
2124
|
+
const { disabled: o, external: s, tag: i, replace: a, to: l } = n.props;
|
|
2125
|
+
if (o) {
|
|
2126
|
+
r.preventDefault();
|
|
2127
|
+
return;
|
|
2128
|
+
}
|
|
2129
|
+
s && (i === "a" || !i) || (r.preventDefault(), a ? t.replace(l) : t.push(l));
|
|
2130
|
+
}
|
|
2131
|
+
}), t;
|
|
2132
|
+
}
|
|
1861
2133
|
export {
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2134
|
+
P as GlobalEventBus,
|
|
2135
|
+
de as component,
|
|
2136
|
+
ie as createStore,
|
|
2137
|
+
he as css,
|
|
2138
|
+
nt as each,
|
|
2139
|
+
ot as emit,
|
|
2140
|
+
H as eventBus,
|
|
2141
|
+
B as html,
|
|
2142
|
+
ft as initRouter,
|
|
2143
|
+
lt as listen,
|
|
2144
|
+
be as match,
|
|
2145
|
+
D as matchRoute,
|
|
2146
|
+
ct as matchRouteSSR,
|
|
2147
|
+
st as off,
|
|
2148
|
+
it as on,
|
|
2149
|
+
at as once,
|
|
2150
|
+
Ge as parseQuery,
|
|
2151
|
+
et as resolveRouteComponent,
|
|
2152
|
+
tt as useRouter,
|
|
2153
|
+
rt as when
|
|
1871
2154
|
};
|
|
1872
2155
|
//# sourceMappingURL=custom-elements-runtime.es.js.map
|