@jasonshimmy/custom-elements-runtime 2.6.1 → 2.6.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/dist/custom-elements-runtime.cjs.js +1 -1
- package/dist/custom-elements-runtime.es.js +2 -2
- package/dist/custom-elements-runtime.router.cjs.js +1 -1
- package/dist/custom-elements-runtime.router.es.js +1 -1
- package/dist/template-compiler-Bypo0Cn6.cjs +23 -0
- package/dist/template-compiler-Bypo0Cn6.cjs.map +1 -0
- package/dist/{template-compiler-xSxUyqRI.js → template-compiler-taX5Zg4G.js} +978 -999
- package/dist/template-compiler-taX5Zg4G.js.map +1 -0
- package/package.json +1 -1
- package/dist/template-compiler-gn2qLc7f.cjs +0 -23
- package/dist/template-compiler-gn2qLc7f.cjs.map +0 -1
- package/dist/template-compiler-xSxUyqRI.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as K, t as
|
|
2
|
-
import { a as
|
|
3
|
-
import { j as
|
|
1
|
+
import { j as K, t as J, i as P, k as We, m as x, o as V, p as U, q, T as St, v as Xe, S as Ct, x as dt, y as _e, z as Y, A as kt, B as tt, a as nt, C as rt, d as _t } from "./namespace-helpers-DcD_6_K1.js";
|
|
2
|
+
import { a as ee, d as B } from "./logger-BvkEbVM4.js";
|
|
3
|
+
import { j as At, g as wt, a as Re, b as ye, m as Ae, s as Tt, d as st } from "./transitions-Bo0DVkSp.js";
|
|
4
4
|
const ge = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ Symbol.for("cer.registry");
|
|
5
|
-
function
|
|
5
|
+
function Lt() {
|
|
6
6
|
if (!(typeof window > "u" && typeof document > "u" && typeof navigator > "u"))
|
|
7
7
|
try {
|
|
8
8
|
const n = globalThis;
|
|
@@ -11,78 +11,78 @@ function Nt() {
|
|
|
11
11
|
n[Ke] = new Map([...ge.entries()]), n[Ke].__realmId = t;
|
|
12
12
|
}
|
|
13
13
|
} catch (n) {
|
|
14
|
-
|
|
14
|
+
ee("Could not initialize global registry:", n);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Nt(e, n, t) {
|
|
18
18
|
if (t)
|
|
19
19
|
for (const [s, r] of Object.entries(t)) {
|
|
20
|
-
let
|
|
21
|
-
if (Array.isArray(r) ? (
|
|
22
|
-
callback:
|
|
23
|
-
options:
|
|
20
|
+
let o, i = {};
|
|
21
|
+
if (Array.isArray(r) ? (o = r[0], i = r[1] || {}) : o = r, n.set(s, {
|
|
22
|
+
callback: o,
|
|
23
|
+
options: i,
|
|
24
24
|
oldValue: K(e, s)
|
|
25
|
-
}),
|
|
25
|
+
}), i.immediate)
|
|
26
26
|
try {
|
|
27
27
|
const c = K(e, s);
|
|
28
|
-
|
|
28
|
+
o(c, void 0, e);
|
|
29
29
|
} catch (c) {
|
|
30
30
|
B(`Error in immediate watcher for "${s}":`, c);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const r = (
|
|
36
|
-
if (
|
|
37
|
-
if (typeof
|
|
38
|
-
if (Array.isArray(
|
|
39
|
-
return
|
|
40
|
-
const f =
|
|
34
|
+
function Ot(e, n, t, s) {
|
|
35
|
+
const r = (i, c) => {
|
|
36
|
+
if (i === c) return !0;
|
|
37
|
+
if (typeof i != typeof c || typeof i != "object" || i === null || c === null) return !1;
|
|
38
|
+
if (Array.isArray(i) && Array.isArray(c))
|
|
39
|
+
return i.length !== c.length ? !1 : i.every((d, k) => r(d, c[k]));
|
|
40
|
+
const f = i, u = c, h = Object.keys(f || {}), p = Object.keys(u || {});
|
|
41
41
|
return h.length !== p.length ? !1 : h.every((d) => r(f[d], u[d]));
|
|
42
|
-
},
|
|
43
|
-
if (
|
|
42
|
+
}, o = n.get(t);
|
|
43
|
+
if (o && !r(s, o.oldValue))
|
|
44
44
|
try {
|
|
45
|
-
|
|
46
|
-
} catch (
|
|
47
|
-
B(`Error in watcher for "${t}":`,
|
|
45
|
+
o.callback(s, o.oldValue, e), o.oldValue = s;
|
|
46
|
+
} catch (i) {
|
|
47
|
+
B(`Error in watcher for "${t}":`, i);
|
|
48
48
|
}
|
|
49
|
-
for (const [
|
|
50
|
-
if (c.options.deep && t.startsWith(
|
|
49
|
+
for (const [i, c] of n.entries())
|
|
50
|
+
if (c.options.deep && t.startsWith(i + "."))
|
|
51
51
|
try {
|
|
52
|
-
const f = K(e,
|
|
52
|
+
const f = K(e, i);
|
|
53
53
|
r(f, c.oldValue) || (c.callback(f, c.oldValue, e), c.oldValue = f);
|
|
54
54
|
} catch (f) {
|
|
55
|
-
B(`Error in deep watcher for "${
|
|
55
|
+
B(`Error in deep watcher for "${i}":`, f);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Ve(e, n) {
|
|
59
59
|
return n === Boolean ? e === "" || e === "true" : n === Number ? Number(e) : e;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function jt(e, n, t) {
|
|
62
62
|
if (n)
|
|
63
63
|
for (const s in n) {
|
|
64
|
-
const r = n[s],
|
|
64
|
+
const r = n[s], o = J(s), i = e.getAttribute(o);
|
|
65
65
|
if (r.type === Function && typeof e[s] == "function")
|
|
66
66
|
t[s] = e[s];
|
|
67
|
-
else if (
|
|
68
|
-
t[s] =
|
|
67
|
+
else if (i !== null)
|
|
68
|
+
t[s] = Ve(i, r.type);
|
|
69
69
|
else if (typeof e[s] < "u")
|
|
70
70
|
try {
|
|
71
71
|
const c = e[s];
|
|
72
72
|
if (r.type === String && c && typeof c == "object")
|
|
73
73
|
try {
|
|
74
|
-
t[s] =
|
|
74
|
+
t[s] = Ve(String(c), r.type);
|
|
75
75
|
} catch {
|
|
76
76
|
t[s] = c;
|
|
77
77
|
}
|
|
78
|
-
else r.type === Boolean && typeof c == "boolean" || r.type === Number && typeof c == "number" || r.type === Function && typeof c == "function" ? t[s] = c : t[s] =
|
|
78
|
+
else r.type === Boolean && typeof c == "boolean" || r.type === Number && typeof c == "number" || r.type === Function && typeof c == "function" ? t[s] = c : t[s] = Ve(String(c), r.type);
|
|
79
79
|
} catch {
|
|
80
80
|
t[s] = e[s];
|
|
81
81
|
}
|
|
82
82
|
else "default" in r && r.default !== void 0 && (t[s] = r.default);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Mt(e, n, t) {
|
|
86
86
|
if (!n.props) {
|
|
87
87
|
try {
|
|
88
88
|
const s = t?._hookCallbacks?.props || {}, r = Array.from(
|
|
@@ -91,27 +91,27 @@ function Pt(e, n, t) {
|
|
|
91
91
|
...Object.keys(s || {})
|
|
92
92
|
])
|
|
93
93
|
);
|
|
94
|
-
for (const
|
|
95
|
-
if (typeof
|
|
96
|
-
const
|
|
94
|
+
for (const o of r) {
|
|
95
|
+
if (typeof o != "string" || o.startsWith("_")) continue;
|
|
96
|
+
const i = Object.getOwnPropertyDescriptor(t, o);
|
|
97
97
|
if (!(!Object.prototype.hasOwnProperty.call(
|
|
98
98
|
s,
|
|
99
|
-
|
|
100
|
-
) &&
|
|
99
|
+
o
|
|
100
|
+
) && i && (i.get || i.set || !i.configurable)))
|
|
101
101
|
try {
|
|
102
|
-
Object.defineProperty(t,
|
|
102
|
+
Object.defineProperty(t, o, {
|
|
103
103
|
enumerable: !0,
|
|
104
104
|
configurable: !0,
|
|
105
105
|
get() {
|
|
106
106
|
try {
|
|
107
|
-
const f =
|
|
107
|
+
const f = J(o), u = e.getAttribute(f);
|
|
108
108
|
if (u !== null)
|
|
109
109
|
return u;
|
|
110
|
-
const h = e[
|
|
110
|
+
const h = e[o];
|
|
111
111
|
let p;
|
|
112
112
|
return P(h) || h && typeof h == "object" && "value" in h && !(h instanceof Node) ? p = h.value : p = h, p;
|
|
113
113
|
} catch {
|
|
114
|
-
return e[
|
|
114
|
+
return e[o];
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
});
|
|
@@ -122,15 +122,15 @@ function Pt(e, n, t) {
|
|
|
122
122
|
}
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
jt(e, n.props, t);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Pt(e, n, t, s) {
|
|
128
128
|
e.onConnected && !t && (e.onConnected(n), s(!0));
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(),
|
|
130
|
+
function $t(e, n, t, s, r, o, i, c) {
|
|
131
|
+
e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(), o(!1), i(null), c(!1);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function xt(e, n, t, s, r) {
|
|
134
134
|
e.onAttributeChanged && e.onAttributeChanged(n, t, s, r);
|
|
135
135
|
}
|
|
136
136
|
class ne {
|
|
@@ -140,7 +140,7 @@ class ne {
|
|
|
140
140
|
*/
|
|
141
141
|
static addListener(n, t, s, r) {
|
|
142
142
|
n.addEventListener(t, s, r);
|
|
143
|
-
const
|
|
143
|
+
const i = {
|
|
144
144
|
event: t,
|
|
145
145
|
handler: s,
|
|
146
146
|
wrapper: s,
|
|
@@ -150,19 +150,19 @@ class ne {
|
|
|
150
150
|
};
|
|
151
151
|
this.cleanupFunctions.has(n) || this.cleanupFunctions.set(n, []);
|
|
152
152
|
const c = this.cleanupFunctions.get(n);
|
|
153
|
-
c.push(
|
|
153
|
+
c.push(i), c.__metaList = c;
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
156
|
* Remove a specific event listener
|
|
157
157
|
*/
|
|
158
158
|
static removeListener(n, t, s, r) {
|
|
159
159
|
n.removeEventListener(t, s, r);
|
|
160
|
-
const
|
|
161
|
-
if (
|
|
162
|
-
for (let
|
|
163
|
-
const c = i
|
|
160
|
+
const o = this.cleanupFunctions.get(n);
|
|
161
|
+
if (o)
|
|
162
|
+
for (let i = 0; i < o.length; i++) {
|
|
163
|
+
const c = o[i];
|
|
164
164
|
if (c.event === t && c.handler === s) {
|
|
165
|
-
|
|
165
|
+
o.splice(i, 1), o.length === 0 && this.cleanupFunctions.delete(n);
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
@@ -237,7 +237,7 @@ class Rt {
|
|
|
237
237
|
const s = this.cache.get(n);
|
|
238
238
|
if (s) {
|
|
239
239
|
if (!s.isSecure) {
|
|
240
|
-
|
|
240
|
+
ee("Blocked cached dangerous expression:", n);
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
243
|
try {
|
|
@@ -248,11 +248,11 @@ class Rt {
|
|
|
248
248
|
}
|
|
249
249
|
const r = this.createEvaluator(n);
|
|
250
250
|
if (this.cache.size >= this.maxCacheSize) {
|
|
251
|
-
const
|
|
252
|
-
|
|
251
|
+
const o = this.cache.keys().next().value;
|
|
252
|
+
o && this.cache.delete(o);
|
|
253
253
|
}
|
|
254
254
|
if (this.cache.set(n, r), !r.isSecure) {
|
|
255
|
-
|
|
255
|
+
ee("Blocked dangerous expression:", n);
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
258
|
return r.evaluator(t);
|
|
@@ -267,7 +267,7 @@ class Rt {
|
|
|
267
267
|
try {
|
|
268
268
|
return { evaluator: this.createSafeEvaluator(n), isSecure: !0 };
|
|
269
269
|
} catch (t) {
|
|
270
|
-
return
|
|
270
|
+
return ee("Failed to create evaluator for expression:", n, t), { evaluator: () => {
|
|
271
271
|
}, isSecure: !1 };
|
|
272
272
|
}
|
|
273
273
|
}
|
|
@@ -287,26 +287,26 @@ class Rt {
|
|
|
287
287
|
static createObjectEvaluator(n) {
|
|
288
288
|
const t = n.trim().slice(1, -1), s = this.parseObjectProperties(t);
|
|
289
289
|
return (r) => {
|
|
290
|
-
const
|
|
291
|
-
for (const { key:
|
|
290
|
+
const o = {};
|
|
291
|
+
for (const { key: i, value: c } of s)
|
|
292
292
|
try {
|
|
293
293
|
if (c.startsWith("ctx.")) {
|
|
294
294
|
const f = c.slice(4);
|
|
295
|
-
i
|
|
295
|
+
o[i] = K(r, f);
|
|
296
296
|
} else
|
|
297
|
-
i
|
|
297
|
+
o[i] = this.evaluateSimpleValue(c, r);
|
|
298
298
|
} catch {
|
|
299
|
-
i
|
|
299
|
+
o[i] = void 0;
|
|
300
300
|
}
|
|
301
|
-
return
|
|
301
|
+
return o;
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
static parseObjectProperties(n) {
|
|
305
305
|
const t = [], s = n.split(",");
|
|
306
306
|
for (const r of s) {
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
309
|
-
const
|
|
307
|
+
const o = r.indexOf(":");
|
|
308
|
+
if (o === -1) continue;
|
|
309
|
+
const i = r.slice(0, o).trim(), c = r.slice(o + 1).trim(), f = i.replace(/^['"]|['"]$/g, "");
|
|
310
310
|
t.push({ key: f, value: c });
|
|
311
311
|
}
|
|
312
312
|
return t;
|
|
@@ -320,17 +320,17 @@ class Rt {
|
|
|
320
320
|
/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,
|
|
321
321
|
(p) => `<<#${r.push(p) - 1}#>>`
|
|
322
322
|
);
|
|
323
|
-
const
|
|
324
|
-
for (const p of
|
|
323
|
+
const o = s.match(/ctx\.[\w.]+/g) || [];
|
|
324
|
+
for (const p of o) {
|
|
325
325
|
const d = p.slice(4), k = K(t, d);
|
|
326
326
|
if (k === void 0) return;
|
|
327
|
-
const
|
|
327
|
+
const j = r.push(JSON.stringify(k)) - 1;
|
|
328
328
|
s = s.replace(
|
|
329
329
|
new RegExp(p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
330
|
-
`<<#${
|
|
330
|
+
`<<#${j}#>>`
|
|
331
331
|
);
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const i = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = s.match(i) || [];
|
|
334
334
|
for (const p of c) {
|
|
335
335
|
if (p.startsWith("ctx.")) continue;
|
|
336
336
|
const d = K(t, p);
|
|
@@ -350,16 +350,16 @@ class Rt {
|
|
|
350
350
|
h.add(p);
|
|
351
351
|
const d = K(t, p);
|
|
352
352
|
if (d === void 0) return;
|
|
353
|
-
const k = JSON.stringify(d),
|
|
353
|
+
const k = JSON.stringify(d), j = r.push(k) - 1;
|
|
354
354
|
p.includes(".") ? s = s.replace(
|
|
355
355
|
new RegExp(p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
356
|
-
`<<#${
|
|
356
|
+
`<<#${j}#>>`
|
|
357
357
|
) : s = s.replace(
|
|
358
358
|
new RegExp(
|
|
359
359
|
"\\b" + p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b",
|
|
360
360
|
"g"
|
|
361
361
|
),
|
|
362
|
-
`<<#${
|
|
362
|
+
`<<#${j}#>>`
|
|
363
363
|
);
|
|
364
364
|
}
|
|
365
365
|
s = s.replace(
|
|
@@ -387,56 +387,56 @@ class Rt {
|
|
|
387
387
|
function r() {
|
|
388
388
|
return t[s];
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
const
|
|
392
|
-
if (g && !
|
|
390
|
+
function o(g) {
|
|
391
|
+
const _ = t[s++];
|
|
392
|
+
if (g && !_)
|
|
393
393
|
throw new Error(`Unexpected token EOF, expected ${g}`);
|
|
394
|
-
if (g &&
|
|
394
|
+
if (g && _ && _.type !== g && _.value !== g)
|
|
395
395
|
throw new Error(
|
|
396
|
-
`Unexpected token ${
|
|
396
|
+
`Unexpected token ${_.type}/${_.value}, expected ${g}`
|
|
397
397
|
);
|
|
398
|
-
return
|
|
398
|
+
return _;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
400
|
+
function i() {
|
|
401
|
+
return j();
|
|
402
402
|
}
|
|
403
403
|
function c(g) {
|
|
404
404
|
if (typeof g == "number") return g;
|
|
405
405
|
if (g == null) return NaN;
|
|
406
406
|
if (typeof g == "boolean") return g ? 1 : 0;
|
|
407
|
-
const
|
|
408
|
-
return Number.isNaN(
|
|
407
|
+
const _ = Number(g);
|
|
408
|
+
return Number.isNaN(_) ? NaN : _;
|
|
409
409
|
}
|
|
410
|
-
function f(g,
|
|
411
|
-
return typeof g == "string" || typeof
|
|
410
|
+
function f(g, _) {
|
|
411
|
+
return typeof g == "string" || typeof _ == "string" ? String(g) + String(_) : c(g) + c(_);
|
|
412
412
|
}
|
|
413
|
-
function u(g,
|
|
414
|
-
return c(g) - c(
|
|
413
|
+
function u(g, _) {
|
|
414
|
+
return c(g) - c(_);
|
|
415
415
|
}
|
|
416
|
-
function h(g,
|
|
417
|
-
return c(g) * c(
|
|
416
|
+
function h(g, _) {
|
|
417
|
+
return c(g) * c(_);
|
|
418
418
|
}
|
|
419
|
-
function p(g,
|
|
420
|
-
return c(g) / c(
|
|
419
|
+
function p(g, _) {
|
|
420
|
+
return c(g) / c(_);
|
|
421
421
|
}
|
|
422
|
-
function d(g,
|
|
423
|
-
return c(g) % c(
|
|
422
|
+
function d(g, _) {
|
|
423
|
+
return c(g) % c(_);
|
|
424
424
|
}
|
|
425
|
-
function k(g,
|
|
426
|
-
if (typeof
|
|
425
|
+
function k(g, _, l) {
|
|
426
|
+
if (typeof _ == "number" && typeof l == "number")
|
|
427
427
|
switch (g) {
|
|
428
428
|
case ">":
|
|
429
|
-
return
|
|
429
|
+
return _ > l;
|
|
430
430
|
case "<":
|
|
431
|
-
return
|
|
431
|
+
return _ < l;
|
|
432
432
|
case ">=":
|
|
433
|
-
return
|
|
433
|
+
return _ >= l;
|
|
434
434
|
case "<=":
|
|
435
|
-
return
|
|
435
|
+
return _ <= l;
|
|
436
436
|
default:
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
|
-
const y = String(
|
|
439
|
+
const y = String(_), w = String(l);
|
|
440
440
|
switch (g) {
|
|
441
441
|
case ">":
|
|
442
442
|
return y > w;
|
|
@@ -450,23 +450,23 @@ class Rt {
|
|
|
450
450
|
return !1;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
const g =
|
|
455
|
-
if (
|
|
456
|
-
|
|
457
|
-
const l =
|
|
458
|
-
|
|
459
|
-
const y =
|
|
453
|
+
function j() {
|
|
454
|
+
const g = A(), _ = r();
|
|
455
|
+
if (_ && _.value === "?") {
|
|
456
|
+
o("?");
|
|
457
|
+
const l = i();
|
|
458
|
+
o(":");
|
|
459
|
+
const y = i();
|
|
460
460
|
return g ? l : y;
|
|
461
461
|
}
|
|
462
462
|
return g;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function A() {
|
|
465
465
|
let g = a();
|
|
466
466
|
for (; ; ) {
|
|
467
|
-
const
|
|
468
|
-
if (!
|
|
469
|
-
|
|
467
|
+
const _ = r();
|
|
468
|
+
if (!_ || _.value !== "||") break;
|
|
469
|
+
o("OP");
|
|
470
470
|
const l = a();
|
|
471
471
|
g = g || l;
|
|
472
472
|
}
|
|
@@ -475,9 +475,9 @@ class Rt {
|
|
|
475
475
|
function a() {
|
|
476
476
|
let g = b();
|
|
477
477
|
for (; ; ) {
|
|
478
|
-
const
|
|
479
|
-
if (!
|
|
480
|
-
|
|
478
|
+
const _ = r();
|
|
479
|
+
if (!_ || _.value !== "&&") break;
|
|
480
|
+
o("OP");
|
|
481
481
|
const l = b();
|
|
482
482
|
g = g && l;
|
|
483
483
|
}
|
|
@@ -486,9 +486,9 @@ class Rt {
|
|
|
486
486
|
function b() {
|
|
487
487
|
let g = E();
|
|
488
488
|
for (; ; ) {
|
|
489
|
-
const
|
|
490
|
-
if (!
|
|
491
|
-
const l =
|
|
489
|
+
const _ = r();
|
|
490
|
+
if (!_ || !["==", "!=", "===", "!=="].includes(_.value)) break;
|
|
491
|
+
const l = o("OP").value, y = E();
|
|
492
492
|
switch (l) {
|
|
493
493
|
case "==":
|
|
494
494
|
g = g == y;
|
|
@@ -509,9 +509,9 @@ class Rt {
|
|
|
509
509
|
function E() {
|
|
510
510
|
let g = m();
|
|
511
511
|
for (; ; ) {
|
|
512
|
-
const
|
|
513
|
-
if (!
|
|
514
|
-
const l =
|
|
512
|
+
const _ = r();
|
|
513
|
+
if (!_ || ![">", "<", ">=", "<="].includes(_.value)) break;
|
|
514
|
+
const l = o("OP").value, y = m();
|
|
515
515
|
switch (l) {
|
|
516
516
|
case ">":
|
|
517
517
|
g = k(">", g, y);
|
|
@@ -532,9 +532,9 @@ class Rt {
|
|
|
532
532
|
function m() {
|
|
533
533
|
let g = v();
|
|
534
534
|
for (; ; ) {
|
|
535
|
-
const
|
|
536
|
-
if (!
|
|
537
|
-
const l =
|
|
535
|
+
const _ = r();
|
|
536
|
+
if (!_ || _.value !== "+" && _.value !== "-") break;
|
|
537
|
+
const l = o("OP").value, y = v();
|
|
538
538
|
g = l === "+" ? f(g, y) : u(g, y);
|
|
539
539
|
}
|
|
540
540
|
return g;
|
|
@@ -542,10 +542,10 @@ class Rt {
|
|
|
542
542
|
function v() {
|
|
543
543
|
let g = S();
|
|
544
544
|
for (; ; ) {
|
|
545
|
-
const
|
|
546
|
-
if (!
|
|
545
|
+
const _ = r();
|
|
546
|
+
if (!_ || _.value !== "*" && _.value !== "/" && _.value !== "%")
|
|
547
547
|
break;
|
|
548
|
-
const l =
|
|
548
|
+
const l = o("OP").value, y = S();
|
|
549
549
|
switch (l) {
|
|
550
550
|
case "*":
|
|
551
551
|
g = h(g, y);
|
|
@@ -563,11 +563,11 @@ class Rt {
|
|
|
563
563
|
function S() {
|
|
564
564
|
const g = r();
|
|
565
565
|
if (g && g.value === "!")
|
|
566
|
-
return
|
|
566
|
+
return o("OP"), !S();
|
|
567
567
|
if (g && g.value === "-") {
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
-
return u(0,
|
|
568
|
+
o("OP");
|
|
569
|
+
const _ = S();
|
|
570
|
+
return u(0, _);
|
|
571
571
|
}
|
|
572
572
|
return C();
|
|
573
573
|
}
|
|
@@ -575,39 +575,39 @@ class Rt {
|
|
|
575
575
|
const g = r();
|
|
576
576
|
if (g) {
|
|
577
577
|
if (g.type === "NUMBER")
|
|
578
|
-
return
|
|
578
|
+
return o("NUMBER"), Number(g.value);
|
|
579
579
|
if (g.type === "STRING")
|
|
580
|
-
return
|
|
580
|
+
return o("STRING"), g.value.slice(1, -1);
|
|
581
581
|
if (g.type === "IDENT")
|
|
582
|
-
return
|
|
582
|
+
return o("IDENT"), g.value === "true" ? !0 : g.value === "false" ? !1 : g.value === "null" ? null : void 0;
|
|
583
583
|
if (g.value === "[") {
|
|
584
|
-
|
|
585
|
-
const
|
|
584
|
+
o("PUNC");
|
|
585
|
+
const _ = [];
|
|
586
586
|
for (; ; ) {
|
|
587
587
|
const l = r();
|
|
588
588
|
if (!l || l.value === "]") break;
|
|
589
|
-
|
|
589
|
+
_.push(i());
|
|
590
590
|
const y = r();
|
|
591
|
-
y && y.value === "," &&
|
|
591
|
+
y && y.value === "," && o("PUNC");
|
|
592
592
|
}
|
|
593
|
-
return
|
|
593
|
+
return o("PUNC"), _;
|
|
594
594
|
}
|
|
595
595
|
if (g.value === "(") {
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
return
|
|
596
|
+
o("PUNC");
|
|
597
|
+
const _ = i();
|
|
598
|
+
return o("PUNC"), _;
|
|
599
599
|
}
|
|
600
600
|
throw new Error("Unexpected token in expression");
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
return
|
|
603
|
+
return i();
|
|
604
604
|
}
|
|
605
605
|
static tokenize(n) {
|
|
606
606
|
const t = [], s = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
|
|
607
607
|
let r;
|
|
608
608
|
for (; (r = s.exec(n)) !== null; ) {
|
|
609
|
-
const
|
|
610
|
-
|
|
609
|
+
const o = r[1];
|
|
610
|
+
o && (/^\d/.test(o) ? t.push({ type: "NUMBER", value: o }) : /^"/.test(o) || /^'/.test(o) ? t.push({ type: "STRING", value: o }) : /^[a-zA-Z_]/.test(o) ? t.push({ type: "IDENT", value: o }) : /^[()?:,[\]]$/.test(o) ? t.push({ type: "PUNC", value: o }) : t.push({ type: "OP", value: o }));
|
|
611
611
|
}
|
|
612
612
|
return t;
|
|
613
613
|
}
|
|
@@ -628,20 +628,20 @@ class Rt {
|
|
|
628
628
|
return this.cache.size;
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function He(e, n) {
|
|
632
632
|
return Array.isArray(e) && Array.isArray(n) ? JSON.stringify([...e].sort()) !== JSON.stringify([...n].sort()) : e !== n;
|
|
633
633
|
}
|
|
634
634
|
function it(e, n, t, s, r) {
|
|
635
635
|
if (e) {
|
|
636
|
-
const
|
|
637
|
-
if (r && typeof
|
|
638
|
-
const
|
|
639
|
-
|
|
636
|
+
const o = n.value;
|
|
637
|
+
if (r && typeof o == "object" && o !== null) {
|
|
638
|
+
const i = { ...o };
|
|
639
|
+
i[r] = t, n.value = i;
|
|
640
640
|
} else
|
|
641
641
|
n.value = t;
|
|
642
642
|
} else {
|
|
643
|
-
const
|
|
644
|
-
We(
|
|
643
|
+
const o = s._state || s;
|
|
644
|
+
We(o, n, t);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
function Ie(e, n, t, s) {
|
|
@@ -650,19 +650,19 @@ function Ie(e, n, t, s) {
|
|
|
650
650
|
e._triggerWatchers(r, s);
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
const s = `update:${
|
|
653
|
+
function Ht(e, n, t) {
|
|
654
|
+
const s = `update:${J(n)}`, r = `update:${n}`, o = new CustomEvent(s, {
|
|
655
655
|
detail: t,
|
|
656
656
|
bubbles: !0,
|
|
657
657
|
cancelable: !0
|
|
658
|
-
}),
|
|
658
|
+
}), i = new CustomEvent(r, {
|
|
659
659
|
detail: t,
|
|
660
660
|
bubbles: !0,
|
|
661
661
|
cancelable: !0
|
|
662
662
|
});
|
|
663
|
-
e.dispatchEvent(
|
|
663
|
+
e.dispatchEvent(o), e.dispatchEvent(i);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function ot(e, n, t, s) {
|
|
666
666
|
const r = t;
|
|
667
667
|
if (x(() => {
|
|
668
668
|
if (typeof e.setAttribute == "function")
|
|
@@ -673,19 +673,19 @@ function ct(e, n, t, s) {
|
|
|
673
673
|
else
|
|
674
674
|
e[n] = r;
|
|
675
675
|
}), r == null || typeof r == "string" || typeof r == "number" || typeof r == "boolean") {
|
|
676
|
-
const
|
|
677
|
-
|
|
676
|
+
const o = V(r);
|
|
677
|
+
o !== null ? x(() => {
|
|
678
678
|
typeof e.setAttribute == "function" && U(
|
|
679
679
|
e,
|
|
680
|
-
|
|
681
|
-
String(
|
|
680
|
+
J(n),
|
|
681
|
+
String(o)
|
|
682
682
|
);
|
|
683
683
|
}) : x(() => {
|
|
684
|
-
typeof e.removeAttribute == "function" &&
|
|
684
|
+
typeof e.removeAttribute == "function" && q(e, J(n));
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function It(e, n, t, s) {
|
|
689
689
|
if (e) {
|
|
690
690
|
const r = n.value;
|
|
691
691
|
return s && typeof r == "object" && r !== null ? r[s] : r;
|
|
@@ -697,65 +697,67 @@ function Dt(e, n, t, s) {
|
|
|
697
697
|
function Ne(e) {
|
|
698
698
|
return e != null && typeof e == "object" && "value" in e;
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function Ge(e) {
|
|
701
701
|
return e != null && typeof e == "object" && "value" in e ? e.value : e;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function ie(e, n, t) {
|
|
704
704
|
if (!e) return;
|
|
705
705
|
e.attrs || (e.attrs = {});
|
|
706
706
|
const s = e.attrs;
|
|
707
707
|
s[n] = t;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Q(e) {
|
|
710
710
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
|
|
711
711
|
}
|
|
712
712
|
function pe(e) {
|
|
713
713
|
return e != null && typeof e == "object" && "value" in e ? pe(e.value) : !(e != null && typeof e == "object" || e === !1 || e === "false" || e === null || e === void 0 || e === 0);
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function pt(e) {
|
|
716
716
|
return e.substring(2, 3).toLowerCase() + e.substring(3);
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Ze(e) {
|
|
719
719
|
return typeof e == "boolean" || e === "true" || e === "false";
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
if (!
|
|
721
|
+
function Dt(e, n, t, s, r, o, i, c) {
|
|
722
|
+
if (!o) return;
|
|
723
723
|
const f = n.includes("lazy"), u = n.includes("trim"), h = n.includes("number"), p = () => {
|
|
724
724
|
if (P(e)) {
|
|
725
725
|
const v = e.value;
|
|
726
|
-
return c &&
|
|
726
|
+
return c && i && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement) && typeof v == "object" && v !== null ? v[c] : v;
|
|
727
727
|
}
|
|
728
|
-
const m =
|
|
728
|
+
const m = o?._state || o;
|
|
729
729
|
return K(m, e);
|
|
730
730
|
}, d = p();
|
|
731
731
|
let k = "text";
|
|
732
|
-
|
|
733
|
-
const
|
|
732
|
+
i instanceof HTMLInputElement ? k = s?.type || i.type || "text" : i instanceof HTMLSelectElement ? k = "select" : i instanceof HTMLTextAreaElement && (k = "textarea");
|
|
733
|
+
const j = i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement, a = j ? k === "checkbox" || k === "radio" ? "checked" : "value" : c ?? "modelValue";
|
|
734
734
|
if (k === "checkbox")
|
|
735
735
|
if (Array.isArray(d))
|
|
736
736
|
t[a] = d.includes(
|
|
737
|
-
String(
|
|
737
|
+
String(i?.getAttribute("value") ?? s?.value ?? "")
|
|
738
738
|
);
|
|
739
739
|
else {
|
|
740
|
-
const m =
|
|
740
|
+
const m = i?.getAttribute("true-value") ?? !0;
|
|
741
741
|
t[a] = d === m;
|
|
742
742
|
}
|
|
743
743
|
else if (k === "radio")
|
|
744
744
|
t[a] = d === (s?.value ?? "");
|
|
745
745
|
else if (k === "select")
|
|
746
|
-
if (
|
|
746
|
+
if (i && i.hasAttribute("multiple") && i instanceof HTMLSelectElement) {
|
|
747
747
|
const m = Array.isArray(d) ? d.map(String) : [];
|
|
748
748
|
setTimeout(() => {
|
|
749
|
-
Array.from(
|
|
749
|
+
Array.from(i.options).forEach((v) => {
|
|
750
750
|
v.selected = m.includes(v.value);
|
|
751
751
|
});
|
|
752
752
|
}, 0), t[a] = Array.isArray(d) ? d : [];
|
|
753
753
|
} else
|
|
754
754
|
t[a] = d;
|
|
755
|
+
else if (!j && P(e))
|
|
756
|
+
t[a] = e;
|
|
755
757
|
else {
|
|
756
|
-
|
|
758
|
+
t[a] = d;
|
|
757
759
|
try {
|
|
758
|
-
const m =
|
|
760
|
+
const m = J(a);
|
|
759
761
|
s && (s[m] = d);
|
|
760
762
|
} catch {
|
|
761
763
|
}
|
|
@@ -796,10 +798,10 @@ function Bt(e, n, t, s, r, i, o, c) {
|
|
|
796
798
|
isNaN(l) || (T = l);
|
|
797
799
|
}
|
|
798
800
|
const g = p();
|
|
799
|
-
if (
|
|
801
|
+
if (He(T, g)) {
|
|
800
802
|
C._modelUpdating = !0;
|
|
801
803
|
try {
|
|
802
|
-
it(P(e), e, T,
|
|
804
|
+
it(P(e), e, T, o, c), Ie(o, P(e), e, T), C && Ht(C, a, T);
|
|
803
805
|
} finally {
|
|
804
806
|
setTimeout(
|
|
805
807
|
() => C._modelUpdating = !1,
|
|
@@ -808,21 +810,21 @@ function Bt(e, n, t, s, r, i, o, c) {
|
|
|
808
810
|
}
|
|
809
811
|
}
|
|
810
812
|
};
|
|
811
|
-
if (
|
|
813
|
+
if (j) {
|
|
812
814
|
if (r[b]) {
|
|
813
815
|
const m = r[b];
|
|
814
|
-
|
|
816
|
+
i && ne.removeListener(i, b, m);
|
|
815
817
|
}
|
|
816
818
|
r[b] = E;
|
|
817
819
|
} else {
|
|
818
|
-
const m = `update:${
|
|
820
|
+
const m = `update:${J(a)}`, v = `update:${a}`;
|
|
819
821
|
if (r[m]) {
|
|
820
822
|
const S = r[m];
|
|
821
|
-
|
|
823
|
+
i && ne.removeListener(i, m, S);
|
|
822
824
|
}
|
|
823
825
|
if (r[v]) {
|
|
824
826
|
const S = r[v];
|
|
825
|
-
|
|
827
|
+
i && ne.removeListener(i, v, S);
|
|
826
828
|
}
|
|
827
829
|
if (r[m] = (S) => {
|
|
828
830
|
const C = S.detail;
|
|
@@ -836,16 +838,16 @@ function Bt(e, n, t, s, r, i, o, c) {
|
|
|
836
838
|
T = void 0;
|
|
837
839
|
}
|
|
838
840
|
}
|
|
839
|
-
const g =
|
|
841
|
+
const g = It(
|
|
840
842
|
P(e),
|
|
841
843
|
e,
|
|
842
|
-
|
|
844
|
+
o,
|
|
843
845
|
c
|
|
844
846
|
);
|
|
845
|
-
if (
|
|
846
|
-
it(P(e), e, T,
|
|
847
|
+
if (He(T, g)) {
|
|
848
|
+
it(P(e), e, T, o, c), Ie(o, P(e), e, T);
|
|
847
849
|
const l = S.target;
|
|
848
|
-
l &&
|
|
850
|
+
l && ot(
|
|
849
851
|
l,
|
|
850
852
|
a,
|
|
851
853
|
P(e) ? e : T,
|
|
@@ -863,13 +865,13 @@ function Bt(e, n, t, s, r, i, o, c) {
|
|
|
863
865
|
(T) => typeof T == "string" && !String(T).startsWith("_") && T !== "constructor"
|
|
864
866
|
);
|
|
865
867
|
for (const T of C) {
|
|
866
|
-
const g = String(T),
|
|
867
|
-
r[
|
|
868
|
+
const g = String(T), _ = `update:${J(g)}`, l = `update:${g}`;
|
|
869
|
+
r[_] || (r[_] = (y) => {
|
|
868
870
|
const w = y.detail !== void 0 ? y.detail : y.target?.value, L = P(e) ? e.value[g] : K(
|
|
869
|
-
|
|
871
|
+
o?._state || o,
|
|
870
872
|
e
|
|
871
873
|
);
|
|
872
|
-
if (!
|
|
874
|
+
if (!He(w, L)) return;
|
|
873
875
|
if (P(e)) {
|
|
874
876
|
const D = {
|
|
875
877
|
...e.value
|
|
@@ -877,19 +879,19 @@ function Bt(e, n, t, s, r, i, o, c) {
|
|
|
877
879
|
D[g] = w, e.value = D;
|
|
878
880
|
} else
|
|
879
881
|
We(
|
|
880
|
-
|
|
882
|
+
o?._state || o,
|
|
881
883
|
e,
|
|
882
884
|
w
|
|
883
885
|
);
|
|
884
|
-
Ie(
|
|
885
|
-
const M = y.currentTarget ||
|
|
886
|
-
M &&
|
|
886
|
+
Ie(o, P(e), e, w);
|
|
887
|
+
const M = y.currentTarget || i || y.target;
|
|
888
|
+
M && ot(
|
|
887
889
|
M,
|
|
888
890
|
a,
|
|
889
891
|
P(e) ? e : w,
|
|
890
892
|
P(e)
|
|
891
893
|
);
|
|
892
|
-
}, r[l] = r[
|
|
894
|
+
}, r[l] = r[_]);
|
|
893
895
|
}
|
|
894
896
|
}
|
|
895
897
|
r[v] = r[m];
|
|
@@ -898,16 +900,16 @@ function Bt(e, n, t, s, r, i, o, c) {
|
|
|
898
900
|
r._isComposing = !1;
|
|
899
901
|
const v = m.target;
|
|
900
902
|
v && setTimeout(() => {
|
|
901
|
-
const S = v.value, C =
|
|
903
|
+
const S = v.value, C = o?._state || o, T = K(C, e);
|
|
902
904
|
let g = S;
|
|
903
905
|
if (u && (g = g.trim()), h) {
|
|
904
906
|
const l = Number(g);
|
|
905
907
|
isNaN(l) || (g = l);
|
|
906
908
|
}
|
|
907
|
-
if (
|
|
909
|
+
if (He(g, T)) {
|
|
908
910
|
v._modelUpdating = !0;
|
|
909
911
|
try {
|
|
910
|
-
We(C, e, g), Ie(
|
|
912
|
+
We(C, e, g), Ie(o, P(e), e, g);
|
|
911
913
|
} finally {
|
|
912
914
|
setTimeout(
|
|
913
915
|
() => v._modelUpdating = !1,
|
|
@@ -918,31 +920,31 @@ function Bt(e, n, t, s, r, i, o, c) {
|
|
|
918
920
|
}, 0);
|
|
919
921
|
});
|
|
920
922
|
}
|
|
921
|
-
function
|
|
923
|
+
function Bt(e, n, t, s, r) {
|
|
922
924
|
if (typeof e == "object" && e !== null)
|
|
923
|
-
for (const [
|
|
924
|
-
if (
|
|
925
|
-
t[
|
|
926
|
-
else if (
|
|
927
|
-
const c =
|
|
925
|
+
for (const [o, i] of Object.entries(e))
|
|
926
|
+
if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
|
|
927
|
+
t[o] = i;
|
|
928
|
+
else if (o === "disabled" && r && Q(r)) {
|
|
929
|
+
const c = i && typeof i == "object" && "value" in i;
|
|
928
930
|
(() => {
|
|
929
931
|
try {
|
|
930
|
-
return P(
|
|
932
|
+
return P(i);
|
|
931
933
|
} catch {
|
|
932
934
|
return !1;
|
|
933
935
|
}
|
|
934
|
-
})() || c ? n[
|
|
936
|
+
})() || c ? n[o] = i : t[o] = i;
|
|
935
937
|
} else
|
|
936
|
-
n[
|
|
938
|
+
n[o] = i;
|
|
937
939
|
else if (typeof e == "string") {
|
|
938
940
|
if (!s) return;
|
|
939
941
|
try {
|
|
940
|
-
const
|
|
941
|
-
if (typeof
|
|
942
|
-
for (const [
|
|
943
|
-
if (
|
|
944
|
-
t[
|
|
945
|
-
else if (
|
|
942
|
+
const o = Pe(e, s);
|
|
943
|
+
if (typeof o == "object" && o !== null) {
|
|
944
|
+
for (const [i, c] of Object.entries(o))
|
|
945
|
+
if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
|
|
946
|
+
t[i] = c;
|
|
947
|
+
else if (i === "disabled" && r && Q(r)) {
|
|
946
948
|
const f = c && typeof c == "object" && "value" in c;
|
|
947
949
|
(() => {
|
|
948
950
|
try {
|
|
@@ -950,24 +952,24 @@ function Wt(e, n, t, s, r) {
|
|
|
950
952
|
} catch {
|
|
951
953
|
return !1;
|
|
952
954
|
}
|
|
953
|
-
})() || f ? n[
|
|
955
|
+
})() || f ? n[i] = c : t[i] = c;
|
|
954
956
|
} else
|
|
955
|
-
n[
|
|
957
|
+
n[i] = c;
|
|
956
958
|
return;
|
|
957
959
|
} else {
|
|
958
|
-
t[e] =
|
|
960
|
+
t[e] = o;
|
|
959
961
|
return;
|
|
960
962
|
}
|
|
961
963
|
} catch {
|
|
962
|
-
const
|
|
964
|
+
const o = K(
|
|
963
965
|
s,
|
|
964
966
|
e
|
|
965
967
|
);
|
|
966
|
-
t[e] =
|
|
968
|
+
t[e] = o;
|
|
967
969
|
}
|
|
968
970
|
}
|
|
969
971
|
}
|
|
970
|
-
function
|
|
972
|
+
function Wt(e, n, t) {
|
|
971
973
|
let s;
|
|
972
974
|
if (typeof e == "string") {
|
|
973
975
|
if (!t) return;
|
|
@@ -975,27 +977,27 @@ function Ut(e, n, t) {
|
|
|
975
977
|
} else
|
|
976
978
|
s = e;
|
|
977
979
|
const r = String(n.style || "");
|
|
978
|
-
let
|
|
980
|
+
let o = r;
|
|
979
981
|
if (s) {
|
|
980
982
|
if (r) {
|
|
981
|
-
const
|
|
983
|
+
const i = String(r).split(";").map((f) => f.trim()).filter(Boolean), c = i.findIndex(
|
|
982
984
|
(f) => f.startsWith("display:")
|
|
983
985
|
);
|
|
984
|
-
c >= 0 &&
|
|
986
|
+
c >= 0 && i[c] === "display: none" && (i.splice(c, 1), o = i.length > 0 ? i.join("; ") + ";" : "");
|
|
985
987
|
}
|
|
986
988
|
} else if (r) {
|
|
987
|
-
const
|
|
989
|
+
const i = String(r).split(";").filter(Boolean), c = i.findIndex(
|
|
988
990
|
(f) => f.trim().startsWith("display:")
|
|
989
991
|
);
|
|
990
|
-
c >= 0 ?
|
|
992
|
+
c >= 0 ? i[c] = "display: none" : i.push("display: none"), o = i.join("; ");
|
|
991
993
|
} else
|
|
992
|
-
|
|
993
|
-
|
|
994
|
+
o = "display: none";
|
|
995
|
+
o !== r && (o ? n.style = o : n.style = void 0);
|
|
994
996
|
}
|
|
995
997
|
function Pe(e, n) {
|
|
996
998
|
return Rt.evaluate(e, n);
|
|
997
999
|
}
|
|
998
|
-
function
|
|
1000
|
+
function Ut(e, n, t, s) {
|
|
999
1001
|
let r;
|
|
1000
1002
|
if (typeof e == "string") {
|
|
1001
1003
|
if (!t) return;
|
|
@@ -1013,18 +1015,18 @@ function zt(e, n, t, s) {
|
|
|
1013
1015
|
}
|
|
1014
1016
|
} catch {
|
|
1015
1017
|
}
|
|
1016
|
-
let
|
|
1018
|
+
let o = [];
|
|
1017
1019
|
if (typeof r == "string")
|
|
1018
|
-
|
|
1020
|
+
o = [r];
|
|
1019
1021
|
else if (Array.isArray(r))
|
|
1020
|
-
|
|
1022
|
+
o = r.filter(Boolean);
|
|
1021
1023
|
else if (typeof r == "object" && r !== null)
|
|
1022
1024
|
for (const [u, h] of Object.entries(r))
|
|
1023
|
-
h &&
|
|
1024
|
-
const
|
|
1025
|
+
h && o.push(u);
|
|
1026
|
+
const i = o.join(" "), c = s && s.class || n.class || "", f = c ? `${c} ${i}`.trim() : i.trim();
|
|
1025
1027
|
f ? n.class = f : n.class = void 0;
|
|
1026
1028
|
}
|
|
1027
|
-
function
|
|
1029
|
+
function zt(e, n, t) {
|
|
1028
1030
|
let s;
|
|
1029
1031
|
if (typeof e == "string") {
|
|
1030
1032
|
if (!t) return;
|
|
@@ -1035,7 +1037,7 @@ function Kt(e, n, t) {
|
|
|
1035
1037
|
if (typeof s == "string")
|
|
1036
1038
|
r = s;
|
|
1037
1039
|
else if (s && typeof s == "object") {
|
|
1038
|
-
const
|
|
1040
|
+
const i = [];
|
|
1039
1041
|
for (const [c, f] of Object.entries(s))
|
|
1040
1042
|
if (f != null && f !== "") {
|
|
1041
1043
|
const u = c.replace(
|
|
@@ -1068,30 +1070,30 @@ function Kt(e, n, t) {
|
|
|
1068
1070
|
"max-height"
|
|
1069
1071
|
];
|
|
1070
1072
|
let p = String(f);
|
|
1071
|
-
typeof f == "number" && h.includes(u) && (p = `${f}px`),
|
|
1073
|
+
typeof f == "number" && h.includes(u) && (p = `${f}px`), i.push(`${u}: ${p}`);
|
|
1072
1074
|
}
|
|
1073
|
-
r =
|
|
1075
|
+
r = i.join("; ") + (i.length > 0 ? ";" : "");
|
|
1074
1076
|
}
|
|
1075
|
-
const
|
|
1076
|
-
n.style =
|
|
1077
|
+
const o = String(n.style || "");
|
|
1078
|
+
n.style = o + (o && !o.endsWith(";") ? "; " : "") + r;
|
|
1077
1079
|
}
|
|
1078
|
-
function
|
|
1080
|
+
function Kt(e, n, t) {
|
|
1079
1081
|
let s = e;
|
|
1080
1082
|
typeof e == "string" && t && (s = Pe(e, t)), P(s) ? n.reactiveRef = s : n.ref = s;
|
|
1081
1083
|
}
|
|
1082
|
-
function
|
|
1083
|
-
const r = {},
|
|
1084
|
+
function ht(e, n, t, s) {
|
|
1085
|
+
const r = {}, o = { ...s || {} }, i = {};
|
|
1084
1086
|
for (const [c, f] of Object.entries(e)) {
|
|
1085
1087
|
const { value: u, modifiers: h, arg: p } = f;
|
|
1086
1088
|
if (c === "model" || c.startsWith("model:")) {
|
|
1087
1089
|
const d = c.split(":"), k = d.length > 1 ? d[1] : p;
|
|
1088
|
-
|
|
1090
|
+
Dt(
|
|
1089
1091
|
u,
|
|
1090
1092
|
// Pass the original value (could be string or reactive state object)
|
|
1091
1093
|
h,
|
|
1092
1094
|
r,
|
|
1093
|
-
i,
|
|
1094
1095
|
o,
|
|
1096
|
+
i,
|
|
1095
1097
|
n,
|
|
1096
1098
|
t,
|
|
1097
1099
|
k
|
|
@@ -1100,24 +1102,24 @@ function yt(e, n, t, s) {
|
|
|
1100
1102
|
}
|
|
1101
1103
|
switch (c) {
|
|
1102
1104
|
case "bind":
|
|
1103
|
-
|
|
1105
|
+
Bt(u, r, o, n, t);
|
|
1104
1106
|
break;
|
|
1105
1107
|
case "show":
|
|
1106
|
-
|
|
1108
|
+
Wt(u, o, n);
|
|
1107
1109
|
break;
|
|
1108
1110
|
case "class":
|
|
1109
|
-
|
|
1111
|
+
Ut(u, o, n, s);
|
|
1110
1112
|
break;
|
|
1111
1113
|
case "style":
|
|
1112
|
-
|
|
1114
|
+
zt(u, o, n);
|
|
1113
1115
|
break;
|
|
1114
1116
|
case "ref":
|
|
1115
|
-
|
|
1117
|
+
Kt(u, r, n);
|
|
1116
1118
|
break;
|
|
1117
1119
|
}
|
|
1118
1120
|
}
|
|
1119
1121
|
try {
|
|
1120
|
-
if (Object.prototype.hasOwnProperty.call(r, "disabled") && t &&
|
|
1122
|
+
if (Object.prototype.hasOwnProperty.call(r, "disabled") && t && Q(t)) {
|
|
1121
1123
|
const f = r.disabled, u = f && typeof f == "object" && "value" in f;
|
|
1122
1124
|
let h = !1;
|
|
1123
1125
|
try {
|
|
@@ -1127,7 +1129,7 @@ function yt(e, n, t, s) {
|
|
|
1127
1129
|
}
|
|
1128
1130
|
if (!u && !h)
|
|
1129
1131
|
try {
|
|
1130
|
-
|
|
1132
|
+
o.disabled = f, delete r.disabled;
|
|
1131
1133
|
const p = globalThis;
|
|
1132
1134
|
p.__VDOM_DISABLED_PROMOTIONS || (p.__VDOM_DISABLED_PROMOTIONS = []), p.__VDOM_DISABLED_PROMOTIONS.push({
|
|
1133
1135
|
phase: "bind-directive:postfix-move",
|
|
@@ -1142,7 +1144,7 @@ function yt(e, n, t, s) {
|
|
|
1142
1144
|
}
|
|
1143
1145
|
} catch {
|
|
1144
1146
|
}
|
|
1145
|
-
return { props: r, attrs:
|
|
1147
|
+
return { props: r, attrs: o, listeners: i };
|
|
1146
1148
|
}
|
|
1147
1149
|
function be(e) {
|
|
1148
1150
|
return e ? e.split(/\s+/).filter(Boolean) : [];
|
|
@@ -1159,104 +1161,76 @@ function me(e, n) {
|
|
|
1159
1161
|
const t = n.filter(Boolean);
|
|
1160
1162
|
t.length > 0 && e.classList.remove(...t);
|
|
1161
1163
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
V("⚠️ Element not connected to DOM, skipping style wait");
|
|
1167
|
-
return;
|
|
1168
|
-
}
|
|
1169
|
-
for (let s = 0; s < t; s++) {
|
|
1170
|
-
const r = window.getComputedStyle(e), i = r.transform && r.transform !== "", o = r.opacity && r.opacity !== "";
|
|
1171
|
-
if (i || o) {
|
|
1172
|
-
Ve = !0;
|
|
1173
|
-
return;
|
|
1174
|
-
}
|
|
1175
|
-
await new Promise(
|
|
1176
|
-
(c) => requestAnimationFrame(() => c(void 0))
|
|
1177
|
-
);
|
|
1178
|
-
}
|
|
1179
|
-
Ve = !0, V("⚠️ Styles did not load in time for transition, continuing anyway");
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
function qt(e) {
|
|
1183
|
-
const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (i) => {
|
|
1184
|
-
const o = parseFloat(i);
|
|
1185
|
-
return i.includes("ms") ? o : o * 1e3;
|
|
1164
|
+
function Vt(e) {
|
|
1165
|
+
const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (o) => {
|
|
1166
|
+
const i = parseFloat(o);
|
|
1167
|
+
return o.includes("ms") ? i : i * 1e3;
|
|
1186
1168
|
};
|
|
1187
1169
|
return r(t) + r(s);
|
|
1188
1170
|
}
|
|
1189
|
-
function
|
|
1171
|
+
function yt(e, n) {
|
|
1190
1172
|
return new Promise((t) => {
|
|
1191
|
-
const s = n ??
|
|
1173
|
+
const s = n ?? Vt(e);
|
|
1192
1174
|
if (s <= 0) {
|
|
1193
1175
|
t();
|
|
1194
1176
|
return;
|
|
1195
1177
|
}
|
|
1196
1178
|
let r = !1;
|
|
1197
|
-
const
|
|
1198
|
-
r || (r = !0, e.removeEventListener("transitionend",
|
|
1199
|
-
},
|
|
1200
|
-
e.addEventListener("transitionend",
|
|
1179
|
+
const o = () => {
|
|
1180
|
+
r || (r = !0, e.removeEventListener("transitionend", i), e.removeEventListener("transitioncancel", i), t());
|
|
1181
|
+
}, i = () => o();
|
|
1182
|
+
e.addEventListener("transitionend", i), e.addEventListener("transitioncancel", i), setTimeout(o, s + 50);
|
|
1201
1183
|
});
|
|
1202
1184
|
}
|
|
1203
1185
|
async function we(e, n) {
|
|
1204
|
-
const { classes: t, hooks: s, css: r, duration:
|
|
1186
|
+
const { classes: t, hooks: s, css: r, duration: o } = n;
|
|
1205
1187
|
if (s?.onBeforeEnter)
|
|
1206
1188
|
try {
|
|
1207
1189
|
s.onBeforeEnter(e);
|
|
1208
|
-
} catch (
|
|
1209
|
-
B("Transition onBeforeEnter error:",
|
|
1190
|
+
} catch (p) {
|
|
1191
|
+
B("Transition onBeforeEnter error:", p);
|
|
1210
1192
|
}
|
|
1211
1193
|
if (!r)
|
|
1212
|
-
return s?.onEnter ? new Promise((
|
|
1213
|
-
const
|
|
1214
|
-
typeof
|
|
1194
|
+
return s?.onEnter ? new Promise((p) => {
|
|
1195
|
+
const d = s.onEnter;
|
|
1196
|
+
typeof d == "function" ? d(e, () => {
|
|
1215
1197
|
if (s?.onAfterEnter)
|
|
1216
1198
|
try {
|
|
1217
1199
|
s.onAfterEnter(e);
|
|
1218
|
-
} catch (
|
|
1219
|
-
B("Transition onAfterEnter error:",
|
|
1200
|
+
} catch (k) {
|
|
1201
|
+
B("Transition onAfterEnter error:", k);
|
|
1220
1202
|
}
|
|
1221
|
-
|
|
1222
|
-
}) :
|
|
1203
|
+
p();
|
|
1204
|
+
}) : p();
|
|
1223
1205
|
}) : void 0;
|
|
1224
|
-
const
|
|
1225
|
-
ve(e,
|
|
1206
|
+
const i = be(t?.enterFrom), c = be(t?.enterActive), f = be(t?.enterTo);
|
|
1207
|
+
ve(e, i), e.offsetHeight, ve(e, c), e.offsetHeight;
|
|
1226
1208
|
let u;
|
|
1227
1209
|
if (s?.onEnter) {
|
|
1228
|
-
const
|
|
1229
|
-
u =
|
|
1210
|
+
const p = new Promise((d) => {
|
|
1211
|
+
u = d;
|
|
1230
1212
|
});
|
|
1231
1213
|
try {
|
|
1232
|
-
const
|
|
1233
|
-
typeof
|
|
1214
|
+
const d = s.onEnter;
|
|
1215
|
+
typeof d == "function" && d(e, () => {
|
|
1234
1216
|
u && u();
|
|
1235
1217
|
});
|
|
1236
|
-
} catch (
|
|
1237
|
-
B("Transition onEnter error:",
|
|
1238
|
-
}
|
|
1239
|
-
u && await
|
|
1240
|
-
}
|
|
1241
|
-
await new Promise(
|
|
1242
|
-
|
|
1243
|
-
), e
|
|
1244
|
-
const h = window.getComputedStyle(e), p = h.transform, d = h.opacity;
|
|
1245
|
-
me(e, o), p && p !== "none" && (e.style.transform = p), d && d !== "" && (e.style.opacity = d), e.offsetHeight, await new Promise(
|
|
1246
|
-
(N) => requestAnimationFrame(() => N(void 0))
|
|
1247
|
-
), e.style.transform = "", e.style.opacity = "", ve(e, f), e.offsetHeight, await new Promise(
|
|
1248
|
-
(N) => requestAnimationFrame(() => N(void 0))
|
|
1249
|
-
);
|
|
1250
|
-
let k;
|
|
1251
|
-
if (typeof i == "number" ? k = i : i && typeof i == "object" && "enter" in i && (k = i.enter), await mt(e, k), me(e, c), s?.onAfterEnter)
|
|
1218
|
+
} catch (d) {
|
|
1219
|
+
B("Transition onEnter error:", d);
|
|
1220
|
+
}
|
|
1221
|
+
u && await p;
|
|
1222
|
+
}
|
|
1223
|
+
await new Promise((p) => requestAnimationFrame(() => p())), e.offsetHeight, me(e, i), ve(e, f), e.offsetHeight, await new Promise((p) => requestAnimationFrame(() => p()));
|
|
1224
|
+
let h;
|
|
1225
|
+
if (typeof o == "number" ? h = o : o && typeof o == "object" && "enter" in o && (h = o.enter), await yt(e, h), me(e, c), s?.onAfterEnter)
|
|
1252
1226
|
try {
|
|
1253
1227
|
s.onAfterEnter(e);
|
|
1254
|
-
} catch (
|
|
1255
|
-
B("Transition onAfterEnter error:",
|
|
1228
|
+
} catch (p) {
|
|
1229
|
+
B("Transition onAfterEnter error:", p);
|
|
1256
1230
|
}
|
|
1257
1231
|
}
|
|
1258
|
-
async function
|
|
1259
|
-
const { classes: t, hooks: s, css: r, duration:
|
|
1232
|
+
async function Fe(e, n) {
|
|
1233
|
+
const { classes: t, hooks: s, css: r, duration: o } = n;
|
|
1260
1234
|
if (s?.onBeforeLeave)
|
|
1261
1235
|
try {
|
|
1262
1236
|
s.onBeforeLeave(e);
|
|
@@ -1276,8 +1250,8 @@ async function qe(e, n) {
|
|
|
1276
1250
|
p();
|
|
1277
1251
|
}) : p();
|
|
1278
1252
|
}) : void 0;
|
|
1279
|
-
const
|
|
1280
|
-
ve(e,
|
|
1253
|
+
const i = be(t?.leaveFrom), c = be(t?.leaveActive), f = be(t?.leaveTo);
|
|
1254
|
+
ve(e, i), e.offsetHeight, ve(e, c);
|
|
1281
1255
|
let u;
|
|
1282
1256
|
if (s?.onLeave) {
|
|
1283
1257
|
const p = new Promise((d) => {
|
|
@@ -1293,21 +1267,19 @@ async function qe(e, n) {
|
|
|
1293
1267
|
}
|
|
1294
1268
|
u && await p;
|
|
1295
1269
|
}
|
|
1296
|
-
await new Promise(
|
|
1297
|
-
(p) => requestAnimationFrame(() => p(void 0))
|
|
1298
|
-
), await Vt(e, [...o, ...c]), me(e, o), ve(e, f);
|
|
1270
|
+
await new Promise((p) => requestAnimationFrame(() => p())), me(e, i), ve(e, f);
|
|
1299
1271
|
let h;
|
|
1300
|
-
if (typeof
|
|
1272
|
+
if (typeof o == "number" ? h = o : o && typeof o == "object" && "leave" in o && (h = o.leave), await yt(e, h), me(e, c), me(e, f), me(e, i), s?.onAfterLeave)
|
|
1301
1273
|
try {
|
|
1302
1274
|
s.onAfterLeave(e);
|
|
1303
1275
|
} catch (p) {
|
|
1304
1276
|
B("Transition onAfterLeave error:", p);
|
|
1305
1277
|
}
|
|
1306
1278
|
}
|
|
1307
|
-
const
|
|
1279
|
+
const mt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap();
|
|
1308
1280
|
function De(e) {
|
|
1309
1281
|
if (!e) return;
|
|
1310
|
-
const n =
|
|
1282
|
+
const n = mt.get(e);
|
|
1311
1283
|
if (n !== void 0) return n;
|
|
1312
1284
|
try {
|
|
1313
1285
|
const t = e;
|
|
@@ -1319,9 +1291,9 @@ function De(e) {
|
|
|
1319
1291
|
if (t) return t;
|
|
1320
1292
|
}
|
|
1321
1293
|
}
|
|
1322
|
-
function
|
|
1294
|
+
function G(e, n) {
|
|
1323
1295
|
try {
|
|
1324
|
-
|
|
1296
|
+
mt.set(e, n);
|
|
1325
1297
|
} catch {
|
|
1326
1298
|
}
|
|
1327
1299
|
try {
|
|
@@ -1330,15 +1302,15 @@ function Z(e, n) {
|
|
|
1330
1302
|
}
|
|
1331
1303
|
try {
|
|
1332
1304
|
if (e instanceof Element) {
|
|
1333
|
-
const t =
|
|
1305
|
+
const t = V(n);
|
|
1334
1306
|
t !== null && U(e, "data-anchor-key", t);
|
|
1335
1307
|
}
|
|
1336
1308
|
} catch {
|
|
1337
1309
|
}
|
|
1338
1310
|
}
|
|
1339
|
-
function
|
|
1311
|
+
function Ft(e) {
|
|
1340
1312
|
if (!e) return;
|
|
1341
|
-
const n =
|
|
1313
|
+
const n = gt.get(e);
|
|
1342
1314
|
if (n !== void 0) return n;
|
|
1343
1315
|
try {
|
|
1344
1316
|
const t = e;
|
|
@@ -1347,9 +1319,9 @@ function Gt(e) {
|
|
|
1347
1319
|
} catch {
|
|
1348
1320
|
}
|
|
1349
1321
|
}
|
|
1350
|
-
function
|
|
1322
|
+
function qt(e, n) {
|
|
1351
1323
|
try {
|
|
1352
|
-
|
|
1324
|
+
gt.set(e, n);
|
|
1353
1325
|
} catch {
|
|
1354
1326
|
}
|
|
1355
1327
|
try {
|
|
@@ -1385,64 +1357,64 @@ function Te(e, n, t) {
|
|
|
1385
1357
|
s(n);
|
|
1386
1358
|
else if (typeof s == "string" && t)
|
|
1387
1359
|
try {
|
|
1388
|
-
const
|
|
1389
|
-
t[
|
|
1360
|
+
const o = String(s);
|
|
1361
|
+
t[o] = n;
|
|
1390
1362
|
} catch {
|
|
1391
1363
|
}
|
|
1392
1364
|
} catch {
|
|
1393
1365
|
}
|
|
1394
1366
|
else if (r && t)
|
|
1395
1367
|
try {
|
|
1396
|
-
const
|
|
1397
|
-
t[
|
|
1368
|
+
const o = String(r);
|
|
1369
|
+
t[o] = n;
|
|
1398
1370
|
} catch {
|
|
1399
1371
|
}
|
|
1400
1372
|
}
|
|
1401
|
-
function
|
|
1373
|
+
function Je(e, n) {
|
|
1402
1374
|
if (Array.isArray(e)) {
|
|
1403
|
-
const
|
|
1404
|
-
return e.map((
|
|
1405
|
-
if (!
|
|
1406
|
-
let c =
|
|
1375
|
+
const o = /* @__PURE__ */ new Set();
|
|
1376
|
+
return e.map((i) => {
|
|
1377
|
+
if (!i || typeof i != "object") return i;
|
|
1378
|
+
let c = i.props?.key ?? i.key;
|
|
1407
1379
|
if (!c) {
|
|
1408
|
-
const p =
|
|
1380
|
+
const p = i.tag || "node", k = [
|
|
1409
1381
|
// attrs (kebab-case)
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1382
|
+
i.props?.attrs?.id,
|
|
1383
|
+
i.props?.attrs?.name,
|
|
1384
|
+
i.props?.attrs?.["data-key"],
|
|
1413
1385
|
// promoted JS props (camelCase or original)
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
].find((
|
|
1386
|
+
i.props?.props?.id,
|
|
1387
|
+
i.props?.props?.name,
|
|
1388
|
+
i.props?.props?.dataKey,
|
|
1389
|
+
i.props?.props?.["data-key"]
|
|
1390
|
+
].find((j) => j != null) ?? "";
|
|
1419
1391
|
c = k ? `${n}:${p}:${k}` : `${n}:${p}`;
|
|
1420
1392
|
}
|
|
1421
1393
|
let f = c, u = 1;
|
|
1422
|
-
for (;
|
|
1394
|
+
for (; o.has(f); )
|
|
1423
1395
|
f = `${c}#${u++}`;
|
|
1424
|
-
|
|
1425
|
-
let h =
|
|
1426
|
-
return Array.isArray(h) && (h =
|
|
1396
|
+
o.add(f);
|
|
1397
|
+
let h = i.children;
|
|
1398
|
+
return Array.isArray(h) && (h = Je(h, f)), { ...i, key: f, children: h };
|
|
1427
1399
|
});
|
|
1428
1400
|
}
|
|
1429
1401
|
const t = e, s = t.props?.key ?? t.key ?? n;
|
|
1430
1402
|
let r = t.children;
|
|
1431
|
-
return Array.isArray(r) && (r =
|
|
1403
|
+
return Array.isArray(r) && (r = Je(r, s)), { ...t, key: s, children: r };
|
|
1432
1404
|
}
|
|
1433
|
-
function
|
|
1434
|
-
const r = t.directives ?? {},
|
|
1405
|
+
function ct(e, n, t, s) {
|
|
1406
|
+
const r = t.directives ?? {}, o = t.attrs ? { ...t.attrs } : {}, i = ht(
|
|
1435
1407
|
r,
|
|
1436
1408
|
s,
|
|
1437
1409
|
e,
|
|
1438
|
-
|
|
1410
|
+
o
|
|
1439
1411
|
), c = {
|
|
1440
1412
|
...n.props || {},
|
|
1441
1413
|
...t.props || {},
|
|
1442
|
-
...
|
|
1414
|
+
...i.props || {}
|
|
1443
1415
|
}, f = {
|
|
1444
|
-
...
|
|
1445
|
-
...
|
|
1416
|
+
...o || {},
|
|
1417
|
+
...i.attrs || {}
|
|
1446
1418
|
}, u = n.props ?? {}, h = c, p = !!(t?.isCustomElement ?? n?.isCustomElement ?? !1);
|
|
1447
1419
|
let d = !1;
|
|
1448
1420
|
for (const a in { ...u, ...h }) {
|
|
@@ -1454,13 +1426,13 @@ function at(e, n, t, s) {
|
|
|
1454
1426
|
(P(E) || Ne(E)) && (v = E.value);
|
|
1455
1427
|
}), !(b === E && m === v))
|
|
1456
1428
|
if (d = !0, a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
|
|
1457
|
-
const S =
|
|
1429
|
+
const S = Ge(E), C = S == null ? "" : String(S);
|
|
1458
1430
|
e.value !== C && (e.value = C);
|
|
1459
1431
|
} else if (a === "checked" && e instanceof HTMLInputElement) {
|
|
1460
|
-
const S =
|
|
1432
|
+
const S = Ge(E);
|
|
1461
1433
|
e.checked = !!S;
|
|
1462
1434
|
} else if (a.startsWith("on") && typeof E == "function") {
|
|
1463
|
-
const S =
|
|
1435
|
+
const S = pt(a);
|
|
1464
1436
|
typeof b == "function" && ne.removeListener(e, S, b), typeof E == "function" && ne.addListener(e, S, E);
|
|
1465
1437
|
try {
|
|
1466
1438
|
if (S && S.startsWith("update:")) {
|
|
@@ -1474,12 +1446,12 @@ function at(e, n, t, s) {
|
|
|
1474
1446
|
} catch {
|
|
1475
1447
|
g = [];
|
|
1476
1448
|
}
|
|
1477
|
-
const
|
|
1449
|
+
const _ = g.filter(
|
|
1478
1450
|
(l) => typeof l == "string" && !l.startsWith("_") && l !== "constructor"
|
|
1479
1451
|
);
|
|
1480
|
-
for (const l of
|
|
1452
|
+
for (const l of _) {
|
|
1481
1453
|
const y = `update:${l}`, w = (L) => {
|
|
1482
|
-
const
|
|
1454
|
+
const N = L.detail !== void 0 ? L.detail : L.target instanceof HTMLInputElement || L.target instanceof HTMLTextAreaElement || L.target instanceof HTMLSelectElement ? L.target.value : void 0, D = { ...P(T) ? T.value || {} : h[C] || {}, [l]: N };
|
|
1483
1455
|
try {
|
|
1484
1456
|
typeof E == "function" && E({
|
|
1485
1457
|
detail: D
|
|
@@ -1495,20 +1467,20 @@ function at(e, n, t, s) {
|
|
|
1495
1467
|
} catch {
|
|
1496
1468
|
}
|
|
1497
1469
|
} else if (E == null)
|
|
1498
|
-
|
|
1470
|
+
q(e, a);
|
|
1499
1471
|
else {
|
|
1500
1472
|
const S = t?.isCustomElement ?? n?.isCustomElement ?? !1;
|
|
1501
1473
|
if (S || a in e)
|
|
1502
1474
|
try {
|
|
1503
|
-
e[a] = E, a === "disabled" && E === !1 && !S &&
|
|
1475
|
+
e[a] = E, a === "disabled" && E === !1 && !S && Q(e) && q(e, "disabled");
|
|
1504
1476
|
} catch {
|
|
1505
1477
|
}
|
|
1506
1478
|
else
|
|
1507
|
-
E === !1 &&
|
|
1479
|
+
E === !1 && q(e, a);
|
|
1508
1480
|
}
|
|
1509
1481
|
}
|
|
1510
1482
|
for (const [a, b] of Object.entries(
|
|
1511
|
-
|
|
1483
|
+
i.listeners || {}
|
|
1512
1484
|
)) {
|
|
1513
1485
|
ne.addListener(e, a, b);
|
|
1514
1486
|
try {
|
|
@@ -1521,21 +1493,21 @@ function at(e, n, t, s) {
|
|
|
1521
1493
|
} catch {
|
|
1522
1494
|
}
|
|
1523
1495
|
}
|
|
1524
|
-
const k = { ...n.attrs ?? {} },
|
|
1525
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1496
|
+
const k = { ...n.attrs ?? {} }, j = f, A = i && i.attrs || {};
|
|
1497
|
+
if (Object.prototype.hasOwnProperty.call(A, "class") && typeof e.getAttribute == "function") {
|
|
1526
1498
|
const a = e.getAttribute("class");
|
|
1527
1499
|
a !== null && (k.class = a);
|
|
1528
1500
|
}
|
|
1529
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1501
|
+
if (Object.prototype.hasOwnProperty.call(A, "style") && typeof e.getAttribute == "function") {
|
|
1530
1502
|
const a = e.getAttribute("style");
|
|
1531
1503
|
a !== null && (k.style = a);
|
|
1532
1504
|
}
|
|
1533
1505
|
try {
|
|
1534
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1506
|
+
if (Object.prototype.hasOwnProperty.call(A, "class") && A.class === void 0 && typeof e.getAttribute == "function") {
|
|
1535
1507
|
const a = e.getAttribute("class");
|
|
1536
1508
|
a !== null && (k.class = a);
|
|
1537
1509
|
}
|
|
1538
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1510
|
+
if (Object.prototype.hasOwnProperty.call(A, "style") && A.style === void 0 && typeof e.getAttribute == "function") {
|
|
1539
1511
|
const a = e.getAttribute("style");
|
|
1540
1512
|
a !== null && (k.style = a);
|
|
1541
1513
|
}
|
|
@@ -1551,14 +1523,14 @@ function at(e, n, t, s) {
|
|
|
1551
1523
|
}
|
|
1552
1524
|
} catch {
|
|
1553
1525
|
}
|
|
1554
|
-
for (const a in { ...k, ...
|
|
1555
|
-
const b = k[a], E =
|
|
1526
|
+
for (const a in { ...k, ...j }) {
|
|
1527
|
+
const b = k[a], E = j[a];
|
|
1556
1528
|
let m = b, v = E;
|
|
1557
1529
|
if (P(b) && (m = b.value), P(E) && (v = E.value), m !== v)
|
|
1558
1530
|
if (d = !0, v == null || v === !1)
|
|
1559
1531
|
x(() => {
|
|
1560
|
-
|
|
1561
|
-
}),
|
|
1532
|
+
q(e, a);
|
|
1533
|
+
}), ie(n, a, void 0), a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? x(() => {
|
|
1562
1534
|
e.value = "";
|
|
1563
1535
|
}) : e instanceof HTMLSelectElement ? x(() => {
|
|
1564
1536
|
e.value = "";
|
|
@@ -1566,7 +1538,7 @@ function at(e, n, t, s) {
|
|
|
1566
1538
|
e.value = 0;
|
|
1567
1539
|
})), a === "checked" && e instanceof HTMLInputElement && x(() => {
|
|
1568
1540
|
e.checked = !1;
|
|
1569
|
-
}), a === "disabled" &&
|
|
1541
|
+
}), a === "disabled" && Q(e) && x(() => {
|
|
1570
1542
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = !1);
|
|
1571
1543
|
});
|
|
1572
1544
|
else {
|
|
@@ -1595,75 +1567,75 @@ function at(e, n, t, s) {
|
|
|
1595
1567
|
continue;
|
|
1596
1568
|
}
|
|
1597
1569
|
if (a === "style") {
|
|
1598
|
-
const C =
|
|
1599
|
-
C !== null && U(e, a, String(C)),
|
|
1570
|
+
const C = V(v);
|
|
1571
|
+
C !== null && U(e, a, String(C)), ie(n, a, v);
|
|
1600
1572
|
continue;
|
|
1601
1573
|
}
|
|
1602
1574
|
if (a === "class") {
|
|
1603
|
-
const C =
|
|
1604
|
-
C !== null && U(e, a, String(C)),
|
|
1575
|
+
const C = V(v);
|
|
1576
|
+
C !== null && U(e, a, String(C)), ie(n, a, v);
|
|
1605
1577
|
continue;
|
|
1606
1578
|
}
|
|
1607
|
-
if (a === "disabled" &&
|
|
1579
|
+
if (a === "disabled" && Q(e)) {
|
|
1608
1580
|
x(() => {
|
|
1609
1581
|
const C = pe(v);
|
|
1610
1582
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = C);
|
|
1611
1583
|
}), pe(v) ? x(() => {
|
|
1612
1584
|
U(e, a, "");
|
|
1613
1585
|
}) : x(() => {
|
|
1614
|
-
|
|
1586
|
+
q(e, a);
|
|
1615
1587
|
});
|
|
1616
1588
|
continue;
|
|
1617
1589
|
}
|
|
1618
1590
|
const S = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1619
1591
|
if (p && !S && a.includes("-"))
|
|
1620
|
-
if (
|
|
1621
|
-
const C =
|
|
1592
|
+
if (dt(a)) {
|
|
1593
|
+
const C = V(E ?? v);
|
|
1622
1594
|
if (C !== null) {
|
|
1623
1595
|
try {
|
|
1624
1596
|
U(e, a, String(C));
|
|
1625
1597
|
} catch {
|
|
1626
1598
|
}
|
|
1627
|
-
|
|
1599
|
+
ie(n, a, v);
|
|
1628
1600
|
}
|
|
1629
1601
|
} else {
|
|
1630
|
-
const C =
|
|
1602
|
+
const C = Xe(a);
|
|
1631
1603
|
try {
|
|
1632
1604
|
const T = e;
|
|
1633
|
-
T[C] = P(E) ? E : v,
|
|
1605
|
+
T[C] = P(E) ? E : v, ie(n, a, v);
|
|
1634
1606
|
} catch {
|
|
1635
|
-
const T =
|
|
1607
|
+
const T = V(E ?? v);
|
|
1636
1608
|
T !== null && U(e, a, String(T));
|
|
1637
1609
|
}
|
|
1638
1610
|
}
|
|
1639
1611
|
else if (!S && a in e)
|
|
1640
1612
|
try {
|
|
1641
1613
|
const C = e;
|
|
1642
|
-
C[a] = P(E) ? E : v,
|
|
1614
|
+
C[a] = P(E) ? E : v, ie(n, a, v);
|
|
1643
1615
|
} catch {
|
|
1644
|
-
const C =
|
|
1645
|
-
C !== null && (U(e, a, String(C)),
|
|
1616
|
+
const C = V(v);
|
|
1617
|
+
C !== null && (U(e, a, String(C)), ie(n, a, v));
|
|
1646
1618
|
}
|
|
1647
1619
|
else {
|
|
1648
|
-
const C =
|
|
1649
|
-
C !== null && (U(e, a, String(C)),
|
|
1620
|
+
const C = V(v);
|
|
1621
|
+
C !== null && (U(e, a, String(C)), ie(n, a, v));
|
|
1650
1622
|
}
|
|
1651
1623
|
}
|
|
1652
1624
|
}
|
|
1653
1625
|
try {
|
|
1654
|
-
if (
|
|
1626
|
+
if (Q(e)) {
|
|
1655
1627
|
const a = c.disabled;
|
|
1656
1628
|
let b;
|
|
1657
1629
|
try {
|
|
1658
1630
|
const m = Object.prototype.hasOwnProperty.call(
|
|
1659
|
-
|
|
1631
|
+
i.props || {},
|
|
1660
1632
|
"disabled"
|
|
1661
1633
|
), v = a && typeof a == "object" && "value" in a;
|
|
1662
1634
|
let S = !1;
|
|
1663
1635
|
x(() => {
|
|
1664
1636
|
S = !!P(a);
|
|
1665
1637
|
});
|
|
1666
|
-
const C =
|
|
1638
|
+
const C = Ze(a);
|
|
1667
1639
|
S || v || m || C ? b = a : b = f.disabled;
|
|
1668
1640
|
} catch {
|
|
1669
1641
|
b = f.disabled;
|
|
@@ -1674,7 +1646,7 @@ function at(e, n, t, s) {
|
|
|
1674
1646
|
}), E ? x(() => {
|
|
1675
1647
|
U(e, "disabled", "");
|
|
1676
1648
|
}) : x(() => {
|
|
1677
|
-
|
|
1649
|
+
q(e, "disabled");
|
|
1678
1650
|
});
|
|
1679
1651
|
}
|
|
1680
1652
|
} catch {
|
|
@@ -1688,14 +1660,14 @@ function at(e, n, t, s) {
|
|
|
1688
1660
|
});
|
|
1689
1661
|
}
|
|
1690
1662
|
}
|
|
1691
|
-
function
|
|
1663
|
+
function Z(e, n, t, s = null) {
|
|
1692
1664
|
if (typeof e == "string")
|
|
1693
1665
|
return document.createTextNode(e);
|
|
1694
1666
|
if (e.tag === "#text") {
|
|
1695
1667
|
const a = document.createTextNode(
|
|
1696
1668
|
typeof e.children == "string" ? e.children : ""
|
|
1697
1669
|
);
|
|
1698
|
-
return e.key != null &&
|
|
1670
|
+
return e.key != null && G(a, e.key), a;
|
|
1699
1671
|
}
|
|
1700
1672
|
if (e.tag === "#raw") {
|
|
1701
1673
|
const a = typeof e.children == "string" ? e.children : "";
|
|
@@ -1703,11 +1675,11 @@ function J(e, n, t, s = null) {
|
|
|
1703
1675
|
}
|
|
1704
1676
|
if (e.tag === "#anchor") {
|
|
1705
1677
|
const a = e, b = Array.isArray(a.children) ? a.children : [], E = document.createTextNode(""), m = document.createTextNode("");
|
|
1706
|
-
a.key != null && (
|
|
1678
|
+
a.key != null && (G(E, `${a.key}:start`), G(m, `${a.key}:end`)), a._startNode = E, a._endNode = m;
|
|
1707
1679
|
const v = document.createDocumentFragment();
|
|
1708
1680
|
v.appendChild(E);
|
|
1709
1681
|
for (const S of b) {
|
|
1710
|
-
const C =
|
|
1682
|
+
const C = Z(
|
|
1711
1683
|
S,
|
|
1712
1684
|
n,
|
|
1713
1685
|
t,
|
|
@@ -1716,18 +1688,18 @@ function J(e, n, t, s = null) {
|
|
|
1716
1688
|
);
|
|
1717
1689
|
if (a.key != null && C instanceof Element && !C.hasAttribute("data-anchor-key")) {
|
|
1718
1690
|
const T = S;
|
|
1719
|
-
T && typeof T == "object" && T.key != null ||
|
|
1691
|
+
T && typeof T == "object" && T.key != null || G(C, String(a.key));
|
|
1720
1692
|
}
|
|
1721
1693
|
v.appendChild(C);
|
|
1722
1694
|
}
|
|
1723
1695
|
return v.appendChild(m), v;
|
|
1724
1696
|
}
|
|
1725
|
-
const r = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0,
|
|
1726
|
-
e.key != null &&
|
|
1697
|
+
const r = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0, i = (r && typeof r.xmlns == "string" ? String(r.xmlns) : void 0) ?? s ?? St[e.tag] ?? null, c = i ? document.createElementNS(i, e.tag) : document.createElement(e.tag);
|
|
1698
|
+
e.key != null && G(c, e.key), e.props && e.props?._transitionGroup && qt(
|
|
1727
1699
|
c,
|
|
1728
1700
|
e.props?._transitionGroup
|
|
1729
1701
|
);
|
|
1730
|
-
const { props: f = {}, attrs: u = {}, directives: h = {} } = e.props ?? {}, p =
|
|
1702
|
+
const { props: f = {}, attrs: u = {}, directives: h = {} } = e.props ?? {}, p = ht(
|
|
1731
1703
|
h,
|
|
1732
1704
|
n,
|
|
1733
1705
|
c instanceof HTMLElement ? c : void 0,
|
|
@@ -1740,7 +1712,7 @@ function J(e, n, t, s = null) {
|
|
|
1740
1712
|
...p.attrs
|
|
1741
1713
|
};
|
|
1742
1714
|
try {
|
|
1743
|
-
const a = (k && k.class) ?? (d && d.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), b =
|
|
1715
|
+
const a = (k && k.class) ?? (d && d.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), b = V(a);
|
|
1744
1716
|
if (b !== null) {
|
|
1745
1717
|
const E = String(b).trim();
|
|
1746
1718
|
E && U(c, "class", E);
|
|
@@ -1748,7 +1720,7 @@ function J(e, n, t, s = null) {
|
|
|
1748
1720
|
} catch {
|
|
1749
1721
|
}
|
|
1750
1722
|
try {
|
|
1751
|
-
if (d.disabled !== void 0 && c &&
|
|
1723
|
+
if (d.disabled !== void 0 && c && Q(c)) {
|
|
1752
1724
|
const a = d.disabled, b = a && typeof a == "object" && "value" in a;
|
|
1753
1725
|
let E = !1;
|
|
1754
1726
|
try {
|
|
@@ -1762,59 +1734,59 @@ function J(e, n, t, s = null) {
|
|
|
1762
1734
|
}
|
|
1763
1735
|
} catch {
|
|
1764
1736
|
}
|
|
1765
|
-
const
|
|
1737
|
+
const j = c.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1766
1738
|
for (const a in k) {
|
|
1767
1739
|
const b = k[a];
|
|
1768
1740
|
if (typeof a != "string" || /\[object Object\]/.test(a))
|
|
1769
1741
|
continue;
|
|
1770
|
-
const E =
|
|
1742
|
+
const E = Ge(b);
|
|
1771
1743
|
if (typeof E == "boolean")
|
|
1772
1744
|
E ? U(c, a, "") : x(() => {
|
|
1773
|
-
|
|
1745
|
+
q(c, a);
|
|
1774
1746
|
});
|
|
1775
1747
|
else if (E != null) {
|
|
1776
|
-
if (a === "disabled" &&
|
|
1777
|
-
const m = d.disabled, v =
|
|
1748
|
+
if (a === "disabled" && Q(c)) {
|
|
1749
|
+
const m = d.disabled, v = Ze(m) ? m : E, S = pe(v);
|
|
1778
1750
|
x(() => {
|
|
1779
1751
|
c.disabled = S;
|
|
1780
1752
|
}), S ? x(() => {
|
|
1781
1753
|
U(c, a, "");
|
|
1782
1754
|
}) : x(() => {
|
|
1783
|
-
|
|
1755
|
+
q(c, a);
|
|
1784
1756
|
});
|
|
1785
1757
|
continue;
|
|
1786
1758
|
}
|
|
1787
|
-
if (!
|
|
1759
|
+
if (!j && a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement || c instanceof HTMLProgressElement))
|
|
1788
1760
|
try {
|
|
1789
1761
|
c instanceof HTMLProgressElement ? c.value = Number(E) : c.value = String(E ?? "");
|
|
1790
1762
|
} catch {
|
|
1791
|
-
const m =
|
|
1763
|
+
const m = V(E);
|
|
1792
1764
|
m !== null && U(c, a, String(m));
|
|
1793
1765
|
}
|
|
1794
|
-
else if (!
|
|
1766
|
+
else if (!j && a === "checked" && c instanceof HTMLInputElement)
|
|
1795
1767
|
try {
|
|
1796
1768
|
c.checked = !!E;
|
|
1797
1769
|
} catch {
|
|
1798
|
-
const m =
|
|
1770
|
+
const m = V(E);
|
|
1799
1771
|
m !== null && U(c, a, String(m));
|
|
1800
1772
|
}
|
|
1801
|
-
else if (!
|
|
1773
|
+
else if (!j && a in c)
|
|
1802
1774
|
try {
|
|
1803
|
-
c[a] = E, a === "disabled" && E === !1 &&
|
|
1775
|
+
c[a] = E, a === "disabled" && E === !1 && Q(c) && q(c, "disabled"), ie(e.props, a, E);
|
|
1804
1776
|
} catch {
|
|
1805
|
-
const m =
|
|
1777
|
+
const m = V(E);
|
|
1806
1778
|
m !== null && U(c, a, String(m));
|
|
1807
1779
|
}
|
|
1808
|
-
else if ((e.props?.isCustomElement ?? !1) && !
|
|
1809
|
-
const v =
|
|
1780
|
+
else if ((e.props?.isCustomElement ?? !1) && !j && a.includes("-")) {
|
|
1781
|
+
const v = Xe(a);
|
|
1810
1782
|
try {
|
|
1811
1783
|
c[v] = E;
|
|
1812
1784
|
} catch {
|
|
1813
|
-
const S =
|
|
1785
|
+
const S = V(E);
|
|
1814
1786
|
S !== null && U(c, a, String(S));
|
|
1815
1787
|
}
|
|
1816
1788
|
} else {
|
|
1817
|
-
const v =
|
|
1789
|
+
const v = V(E);
|
|
1818
1790
|
v !== null && U(c, a, String(v));
|
|
1819
1791
|
}
|
|
1820
1792
|
}
|
|
@@ -1828,7 +1800,7 @@ function J(e, n, t, s = null) {
|
|
|
1828
1800
|
c.value = String(E ?? "");
|
|
1829
1801
|
});
|
|
1830
1802
|
} else if (a.startsWith("on") && typeof b == "function") {
|
|
1831
|
-
const E =
|
|
1803
|
+
const E = pt(a), m = E.includes(":") ? (() => {
|
|
1832
1804
|
const v = E.split(":"), S = v[1];
|
|
1833
1805
|
if (S.includes("-")) {
|
|
1834
1806
|
const C = S.split("-").map(
|
|
@@ -1845,12 +1817,12 @@ function J(e, n, t, s = null) {
|
|
|
1845
1817
|
if (a.startsWith("on") && b === void 0)
|
|
1846
1818
|
continue;
|
|
1847
1819
|
if (b == null || b === !1)
|
|
1848
|
-
|
|
1820
|
+
q(c, a);
|
|
1849
1821
|
else {
|
|
1850
1822
|
const E = e.props?.isCustomElement ?? !1, m = typeof b == "object" && b !== null && P(b) ? b : Ne(b) && typeof b.value < "u" ? b.value : b;
|
|
1851
1823
|
if (a === "class" || a === "style") {
|
|
1852
1824
|
try {
|
|
1853
|
-
const v =
|
|
1825
|
+
const v = V(m);
|
|
1854
1826
|
v !== null && U(c, a, String(v));
|
|
1855
1827
|
} catch {
|
|
1856
1828
|
}
|
|
@@ -1859,14 +1831,14 @@ function J(e, n, t, s = null) {
|
|
|
1859
1831
|
if (E || a in c)
|
|
1860
1832
|
try {
|
|
1861
1833
|
const v = typeof b == "object" && b !== null && P(b) ? b : Ne(b) ? b.value : b;
|
|
1862
|
-
if (a === "disabled" &&
|
|
1834
|
+
if (a === "disabled" && Q(c)) {
|
|
1863
1835
|
const S = d.disabled !== void 0 ? d.disabled : v, C = pe(S);
|
|
1864
1836
|
x(() => {
|
|
1865
1837
|
c.disabled = C;
|
|
1866
1838
|
}), C ? x(() => {
|
|
1867
1839
|
U(c, a, "");
|
|
1868
1840
|
}) : x(() => {
|
|
1869
|
-
|
|
1841
|
+
q(c, a);
|
|
1870
1842
|
});
|
|
1871
1843
|
continue;
|
|
1872
1844
|
}
|
|
@@ -1888,14 +1860,14 @@ function J(e, n, t, s = null) {
|
|
|
1888
1860
|
p.listeners || {}
|
|
1889
1861
|
))
|
|
1890
1862
|
ne.addListener(c, a, b);
|
|
1891
|
-
const
|
|
1863
|
+
const A = {
|
|
1892
1864
|
...e,
|
|
1893
1865
|
props: {
|
|
1894
1866
|
...e.props,
|
|
1895
1867
|
...p.props
|
|
1896
1868
|
}
|
|
1897
1869
|
};
|
|
1898
|
-
Te(
|
|
1870
|
+
Te(A, c, t);
|
|
1899
1871
|
try {
|
|
1900
1872
|
const a = c;
|
|
1901
1873
|
if (typeof a._applyProps == "function")
|
|
@@ -1907,9 +1879,9 @@ function J(e, n, t, s = null) {
|
|
|
1907
1879
|
} catch {
|
|
1908
1880
|
}
|
|
1909
1881
|
if (Array.isArray(e.children)) {
|
|
1910
|
-
const a = e.tag === "foreignObject" &&
|
|
1882
|
+
const a = e.tag === "foreignObject" && i === Ct ? null : c.namespaceURI ?? null;
|
|
1911
1883
|
for (const b of e.children)
|
|
1912
|
-
c.appendChild(
|
|
1884
|
+
c.appendChild(Z(b, n, t, a));
|
|
1913
1885
|
} else typeof e.children == "string" && (c.textContent = e.children);
|
|
1914
1886
|
try {
|
|
1915
1887
|
if (c instanceof HTMLSelectElement && k && Object.prototype.hasOwnProperty.call(k, "value"))
|
|
@@ -1920,7 +1892,7 @@ function J(e, n, t, s = null) {
|
|
|
1920
1892
|
} catch {
|
|
1921
1893
|
}
|
|
1922
1894
|
try {
|
|
1923
|
-
if (
|
|
1895
|
+
if (Q(c)) {
|
|
1924
1896
|
const a = d.disabled, b = k.disabled, E = a && typeof a == "object" && "value" in a;
|
|
1925
1897
|
let m = !1;
|
|
1926
1898
|
try {
|
|
@@ -1928,31 +1900,31 @@ function J(e, n, t, s = null) {
|
|
|
1928
1900
|
} catch {
|
|
1929
1901
|
m = !1;
|
|
1930
1902
|
}
|
|
1931
|
-
const S = m || E ||
|
|
1903
|
+
const S = m || E || Ze(a) ? a : b, C = pe(S);
|
|
1932
1904
|
x(() => {
|
|
1933
1905
|
c.disabled = C;
|
|
1934
1906
|
}), C ? x(() => {
|
|
1935
1907
|
U(c, "disabled", "");
|
|
1936
1908
|
}) : x(() => {
|
|
1937
|
-
|
|
1909
|
+
q(c, "disabled");
|
|
1938
1910
|
});
|
|
1939
1911
|
}
|
|
1940
1912
|
} catch {
|
|
1941
1913
|
}
|
|
1942
1914
|
return c;
|
|
1943
1915
|
}
|
|
1944
|
-
function
|
|
1916
|
+
function Gt(e, n, t, s, r) {
|
|
1945
1917
|
if (typeof t == "string") {
|
|
1946
1918
|
e.textContent !== t && (e.textContent = t);
|
|
1947
1919
|
return;
|
|
1948
1920
|
}
|
|
1949
1921
|
if (!Array.isArray(t)) return;
|
|
1950
|
-
const
|
|
1951
|
-
for (let
|
|
1952
|
-
|
|
1953
|
-
const c = Array.isArray(n) ? n : [], f =
|
|
1922
|
+
const o = e.childNodes, i = [];
|
|
1923
|
+
for (let A = 0; A < o.length; A++)
|
|
1924
|
+
i.push(o[A]);
|
|
1925
|
+
const c = Array.isArray(n) ? n : [], f = Ft(e);
|
|
1954
1926
|
if (f) {
|
|
1955
|
-
const
|
|
1927
|
+
const A = (m) => {
|
|
1956
1928
|
if (typeof m == "string")
|
|
1957
1929
|
return m.startsWith("each-") ? m.substring(5) : m;
|
|
1958
1930
|
if (typeof m == "number") return String(m);
|
|
@@ -1961,24 +1933,24 @@ function Jt(e, n, t, s, r) {
|
|
|
1961
1933
|
if (m && m.tag === "#anchor") {
|
|
1962
1934
|
const v = Array.isArray(m.children) ? m.children : [];
|
|
1963
1935
|
for (const S of v) {
|
|
1964
|
-
const C =
|
|
1936
|
+
const C = A(
|
|
1965
1937
|
S.key ?? m.key ?? "unknown"
|
|
1966
1938
|
);
|
|
1967
1939
|
a.push({ ...S, key: C });
|
|
1968
1940
|
}
|
|
1969
|
-
} else m && a.push({ ...m, key:
|
|
1941
|
+
} else m && a.push({ ...m, key: A(m.key) });
|
|
1970
1942
|
for (const m of c)
|
|
1971
1943
|
if (m && m.tag === "#anchor") {
|
|
1972
1944
|
const v = Array.isArray(m.children) ? m.children : [];
|
|
1973
1945
|
for (const S of v) {
|
|
1974
|
-
const C =
|
|
1946
|
+
const C = A(
|
|
1975
1947
|
S.key ?? m.key ?? "unknown"
|
|
1976
1948
|
);
|
|
1977
1949
|
b.push({ ...S, key: C });
|
|
1978
1950
|
}
|
|
1979
1951
|
} else m && b.push({
|
|
1980
1952
|
...m,
|
|
1981
|
-
key:
|
|
1953
|
+
key: A(m.key)
|
|
1982
1954
|
});
|
|
1983
1955
|
if (a.some((m) => m && m.key != null) || b.some((m) => m && m.key != null)) {
|
|
1984
1956
|
const m = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
@@ -1987,18 +1959,18 @@ function Jt(e, n, t, s, r) {
|
|
|
1987
1959
|
const y = String(l.key);
|
|
1988
1960
|
m.set(y, l);
|
|
1989
1961
|
}
|
|
1990
|
-
for (let l = 0; l <
|
|
1991
|
-
const y =
|
|
1962
|
+
for (let l = 0; l < i.length; l++) {
|
|
1963
|
+
const y = i[l];
|
|
1992
1964
|
let w = De(y);
|
|
1993
|
-
if (w =
|
|
1965
|
+
if (w = A(w), w != null && y instanceof Element && y.nodeType === Node.ELEMENT_NODE) {
|
|
1994
1966
|
let L = typeof w == "string" && w.includes(":") ? w.substring(0, w.lastIndexOf(":")) : w;
|
|
1995
1967
|
L = String(L), v.set(L, y);
|
|
1996
1968
|
}
|
|
1997
1969
|
}
|
|
1998
|
-
const S = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map(), T =
|
|
1970
|
+
const S = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map(), T = i.length > 0;
|
|
1999
1971
|
if (f.moveClass && T)
|
|
2000
|
-
for (let l = 0; l <
|
|
2001
|
-
const y =
|
|
1972
|
+
for (let l = 0; l < i.length; l++) {
|
|
1973
|
+
const y = i[l];
|
|
2002
1974
|
if (y instanceof HTMLElement && y.parentElement) {
|
|
2003
1975
|
const w = y.getBoundingClientRect();
|
|
2004
1976
|
C.set(y, w);
|
|
@@ -2012,42 +1984,42 @@ function Jt(e, n, t, s, r) {
|
|
|
2012
1984
|
const w = m.get(y);
|
|
2013
1985
|
let L = v.get(y);
|
|
2014
1986
|
if (L && w) {
|
|
2015
|
-
const
|
|
1987
|
+
const N = Le(L, w, l, s);
|
|
2016
1988
|
S.add(L);
|
|
2017
1989
|
const M = String(y);
|
|
2018
|
-
|
|
2019
|
-
node:
|
|
1990
|
+
G(N, M), g.push({
|
|
1991
|
+
node: N,
|
|
2020
1992
|
key: y,
|
|
2021
1993
|
newVNode: l,
|
|
2022
1994
|
oldVNode: w,
|
|
2023
1995
|
isNew: !1
|
|
2024
1996
|
});
|
|
2025
1997
|
} else {
|
|
2026
|
-
L =
|
|
1998
|
+
L = Z(
|
|
2027
1999
|
l,
|
|
2028
2000
|
s,
|
|
2029
2001
|
void 0,
|
|
2030
2002
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2031
|
-
),
|
|
2032
|
-
const
|
|
2033
|
-
L instanceof HTMLElement &&
|
|
2003
|
+
), G(L, String(y)), e.appendChild(L);
|
|
2004
|
+
const N = T || f.appear === !0;
|
|
2005
|
+
L instanceof HTMLElement && N && we(L, f).catch((M) => {
|
|
2034
2006
|
B("Enter transition error:", M);
|
|
2035
2007
|
}), g.push({ node: L, key: y, newVNode: l, isNew: !0 });
|
|
2036
2008
|
}
|
|
2037
2009
|
}
|
|
2038
|
-
const
|
|
2039
|
-
for (let l = 0; l <
|
|
2040
|
-
const y =
|
|
2010
|
+
const _ = [];
|
|
2011
|
+
for (let l = 0; l < i.length; l++) {
|
|
2012
|
+
const y = i[l], w = De(y);
|
|
2041
2013
|
if (!S.has(y) && w != null && y instanceof HTMLElement) {
|
|
2042
|
-
const
|
|
2014
|
+
const N = Fe(y, f).then(() => {
|
|
2043
2015
|
e.contains(y) && e.removeChild(y);
|
|
2044
2016
|
}).catch((M) => {
|
|
2045
2017
|
B("Leave transition error:", M), e.contains(y) && e.removeChild(y);
|
|
2046
2018
|
});
|
|
2047
|
-
|
|
2019
|
+
_.push(N);
|
|
2048
2020
|
}
|
|
2049
2021
|
}
|
|
2050
|
-
if (
|
|
2022
|
+
if (_.length === 0) {
|
|
2051
2023
|
let l = e.firstChild;
|
|
2052
2024
|
for (const { node: y } of g)
|
|
2053
2025
|
y !== l && e.insertBefore(y, l), l = y.nextSibling;
|
|
@@ -2055,40 +2027,40 @@ function Jt(e, n, t, s, r) {
|
|
|
2055
2027
|
const y = [];
|
|
2056
2028
|
for (const { node: w, isNew: L } of g)
|
|
2057
2029
|
if (!L && w instanceof HTMLElement) {
|
|
2058
|
-
const
|
|
2059
|
-
if (
|
|
2060
|
-
const M = w.getBoundingClientRect(), D =
|
|
2061
|
-
if (D !== 0 ||
|
|
2030
|
+
const N = C.get(w);
|
|
2031
|
+
if (N) {
|
|
2032
|
+
const M = w.getBoundingClientRect(), D = N.left - M.left, O = N.top - M.top;
|
|
2033
|
+
if (D !== 0 || O !== 0) {
|
|
2062
2034
|
const z = f.moveClass.split(/\s+/).filter((I) => I);
|
|
2063
|
-
y.push({ node: w, deltaX: D, deltaY:
|
|
2035
|
+
y.push({ node: w, deltaX: D, deltaY: O, moveClasses: z });
|
|
2064
2036
|
}
|
|
2065
2037
|
}
|
|
2066
2038
|
}
|
|
2067
2039
|
if (y.length > 0) {
|
|
2068
|
-
for (const { node: w, deltaX: L, deltaY:
|
|
2069
|
-
w.style.transform = `translate(${L}px, ${
|
|
2040
|
+
for (const { node: w, deltaX: L, deltaY: N } of y)
|
|
2041
|
+
w.style.transform = `translate(${L}px, ${N}px)`, w.style.transitionProperty = "none";
|
|
2070
2042
|
e.offsetHeight, requestAnimationFrame(() => {
|
|
2071
2043
|
requestAnimationFrame(() => {
|
|
2072
2044
|
for (const { node: w, moveClasses: L } of y)
|
|
2073
|
-
for (const
|
|
2074
|
-
w.classList.add(
|
|
2045
|
+
for (const N of L)
|
|
2046
|
+
w.classList.add(N);
|
|
2075
2047
|
requestAnimationFrame(() => {
|
|
2076
|
-
const w = f.moveClass || "", L = w.match(/duration-(\d+)/),
|
|
2048
|
+
const w = f.moveClass || "", L = w.match(/duration-(\d+)/), N = L ? `${L[1]}ms` : "300ms", M = w.match(
|
|
2077
2049
|
/ease-(out|in|in-out|linear)/
|
|
2078
2050
|
), D = M ? `ease-${M[1]}` : "ease-out";
|
|
2079
|
-
for (const { node:
|
|
2080
|
-
|
|
2051
|
+
for (const { node: O } of y)
|
|
2052
|
+
O.style.transition = `transform ${N} ${D}`;
|
|
2081
2053
|
requestAnimationFrame(() => {
|
|
2082
|
-
for (const { node:
|
|
2083
|
-
|
|
2054
|
+
for (const { node: O, moveClasses: z } of y) {
|
|
2055
|
+
O.style.removeProperty("transform");
|
|
2084
2056
|
const I = () => {
|
|
2085
|
-
for (const
|
|
2086
|
-
|
|
2087
|
-
|
|
2057
|
+
for (const oe of z)
|
|
2058
|
+
O.classList.remove(oe);
|
|
2059
|
+
O.style.removeProperty("transition"), O.removeEventListener("transitionend", I), O.removeEventListener("transitioncancel", I);
|
|
2088
2060
|
};
|
|
2089
|
-
|
|
2061
|
+
O.addEventListener("transitionend", I, {
|
|
2090
2062
|
once: !0
|
|
2091
|
-
}),
|
|
2063
|
+
}), O.addEventListener("transitioncancel", I, {
|
|
2092
2064
|
once: !0
|
|
2093
2065
|
});
|
|
2094
2066
|
}
|
|
@@ -2103,51 +2075,51 @@ function Jt(e, n, t, s, r) {
|
|
|
2103
2075
|
}
|
|
2104
2076
|
}
|
|
2105
2077
|
const u = /* @__PURE__ */ new Map();
|
|
2106
|
-
for (const
|
|
2107
|
-
|
|
2078
|
+
for (const A of c)
|
|
2079
|
+
A && A.key != null && u.set(A.key, A);
|
|
2108
2080
|
const h = /* @__PURE__ */ new Map();
|
|
2109
|
-
for (let
|
|
2110
|
-
const a =
|
|
2081
|
+
for (let A = 0; A < i.length; A++) {
|
|
2082
|
+
const a = i[A], b = De(a);
|
|
2111
2083
|
b != null && h.set(b, a);
|
|
2112
2084
|
}
|
|
2113
2085
|
const p = /* @__PURE__ */ new Set();
|
|
2114
2086
|
let d = e.firstChild;
|
|
2115
|
-
function k(
|
|
2116
|
-
let b =
|
|
2087
|
+
function k(A, a) {
|
|
2088
|
+
let b = A;
|
|
2117
2089
|
for (; b && (p.add(b), b !== a); )
|
|
2118
2090
|
b = b.nextSibling;
|
|
2119
2091
|
}
|
|
2120
|
-
function
|
|
2092
|
+
function j(A, a, b, E, m, v = !0) {
|
|
2121
2093
|
const S = [];
|
|
2122
|
-
let C =
|
|
2094
|
+
let C = A.nextSibling;
|
|
2123
2095
|
for (; C && C !== a; )
|
|
2124
2096
|
S.push(C), C = C.nextSibling;
|
|
2125
2097
|
const T = Array.isArray(b) ? b : [];
|
|
2126
|
-
if (E.some((
|
|
2127
|
-
const
|
|
2128
|
-
for (const
|
|
2129
|
-
|
|
2130
|
-
for (const
|
|
2131
|
-
const M = De(
|
|
2132
|
-
M != null && l.set(M,
|
|
2098
|
+
if (E.some((_) => _ && _.key != null) || T.some((_) => _ && _.key != null)) {
|
|
2099
|
+
const _ = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
2100
|
+
for (const N of T)
|
|
2101
|
+
N && N.key != null && _.set(N.key, N);
|
|
2102
|
+
for (const N of S) {
|
|
2103
|
+
const M = De(N);
|
|
2104
|
+
M != null && l.set(M, N);
|
|
2133
2105
|
}
|
|
2134
2106
|
const y = m && m.state === "visible" && T.length === 0 && E.length > 0, w = /* @__PURE__ */ new Set();
|
|
2135
|
-
let L =
|
|
2136
|
-
for (const
|
|
2107
|
+
let L = A.nextSibling;
|
|
2108
|
+
for (const N of E) {
|
|
2137
2109
|
let M;
|
|
2138
|
-
if (
|
|
2139
|
-
const D =
|
|
2110
|
+
if (N.key != null && l.has(N.key)) {
|
|
2111
|
+
const D = _.get(N.key);
|
|
2140
2112
|
M = Le(
|
|
2141
|
-
l.get(
|
|
2113
|
+
l.get(N.key),
|
|
2142
2114
|
D,
|
|
2143
|
-
|
|
2115
|
+
N,
|
|
2144
2116
|
s
|
|
2145
|
-
), w.add(M), m && M instanceof HTMLElement && y && m.appear && we(M, m).catch((
|
|
2146
|
-
B("Transition enter error (appear):",
|
|
2117
|
+
), w.add(M), m && M instanceof HTMLElement && y && m.appear && we(M, m).catch((O) => {
|
|
2118
|
+
B("Transition enter error (appear):", O);
|
|
2147
2119
|
}), M !== L && e.contains(M) && e.insertBefore(M, L);
|
|
2148
2120
|
} else
|
|
2149
|
-
M =
|
|
2150
|
-
|
|
2121
|
+
M = Z(
|
|
2122
|
+
N,
|
|
2151
2123
|
s,
|
|
2152
2124
|
void 0,
|
|
2153
2125
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
@@ -2156,23 +2128,23 @@ function Jt(e, n, t, s, r) {
|
|
|
2156
2128
|
});
|
|
2157
2129
|
L = M.nextSibling;
|
|
2158
2130
|
}
|
|
2159
|
-
for (const
|
|
2160
|
-
!w.has(
|
|
2161
|
-
e.contains(
|
|
2131
|
+
for (const N of S)
|
|
2132
|
+
!w.has(N) && e.contains(N) && (m && N instanceof HTMLElement && v ? Fe(N, m).then(() => {
|
|
2133
|
+
e.contains(N) && e.removeChild(N);
|
|
2162
2134
|
}).catch((M) => {
|
|
2163
|
-
B("Transition leave error:", M), e.contains(
|
|
2164
|
-
}) : e.removeChild(
|
|
2135
|
+
B("Transition leave error:", M), e.contains(N) && e.removeChild(N);
|
|
2136
|
+
}) : e.removeChild(N));
|
|
2165
2137
|
} else {
|
|
2166
|
-
const
|
|
2138
|
+
const _ = Math.min(
|
|
2167
2139
|
T.length,
|
|
2168
2140
|
E.length
|
|
2169
2141
|
);
|
|
2170
|
-
for (let l = 0; l <
|
|
2142
|
+
for (let l = 0; l < _; l++) {
|
|
2171
2143
|
const y = T[l], w = E[l], L = Le(S[l], y, w, s);
|
|
2172
2144
|
L !== S[l] && (e.insertBefore(L, S[l]), e.removeChild(S[l]));
|
|
2173
2145
|
}
|
|
2174
|
-
for (let l =
|
|
2175
|
-
const y =
|
|
2146
|
+
for (let l = _; l < E.length; l++) {
|
|
2147
|
+
const y = Z(
|
|
2176
2148
|
E[l],
|
|
2177
2149
|
s,
|
|
2178
2150
|
void 0,
|
|
@@ -2182,9 +2154,9 @@ function Jt(e, n, t, s, r) {
|
|
|
2182
2154
|
B("Transition enter error:", w);
|
|
2183
2155
|
});
|
|
2184
2156
|
}
|
|
2185
|
-
for (let l =
|
|
2157
|
+
for (let l = _; l < S.length; l++) {
|
|
2186
2158
|
const y = S[l];
|
|
2187
|
-
m && y instanceof HTMLElement && v ?
|
|
2159
|
+
m && y instanceof HTMLElement && v ? Fe(y, m).then(() => {
|
|
2188
2160
|
e.contains(y) && e.removeChild(y);
|
|
2189
2161
|
}).catch((w) => {
|
|
2190
2162
|
B("Transition leave error:", w), e.contains(y) && e.removeChild(y);
|
|
@@ -2192,30 +2164,30 @@ function Jt(e, n, t, s, r) {
|
|
|
2192
2164
|
}
|
|
2193
2165
|
}
|
|
2194
2166
|
}
|
|
2195
|
-
for (const
|
|
2167
|
+
for (const A of t) {
|
|
2196
2168
|
let a;
|
|
2197
|
-
if (
|
|
2198
|
-
const b =
|
|
2169
|
+
if (A.tag === "#anchor") {
|
|
2170
|
+
const b = A.key, E = `${b}:start`, m = `${b}:end`;
|
|
2199
2171
|
let v = h.get(E), S = h.get(m);
|
|
2200
|
-
const C = Array.isArray(
|
|
2201
|
-
if (v || (v = document.createTextNode(""),
|
|
2172
|
+
const C = Array.isArray(A.children) ? A.children : [];
|
|
2173
|
+
if (v || (v = document.createTextNode(""), G(v, E)), S || (S = document.createTextNode(""), G(S, m)), A._startNode = v, A._endNode = S, !e.contains(v) || !e.contains(S)) {
|
|
2202
2174
|
e.insertBefore(v, d);
|
|
2203
|
-
const T =
|
|
2175
|
+
const T = A._transition, _ = !(T && T.state === "visible" && C.length > 0) || T.appear;
|
|
2204
2176
|
for (const l of C) {
|
|
2205
|
-
const y =
|
|
2177
|
+
const y = Z(
|
|
2206
2178
|
l,
|
|
2207
2179
|
s,
|
|
2208
2180
|
r,
|
|
2209
2181
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2210
2182
|
);
|
|
2211
|
-
e.insertBefore(y, d), T && y instanceof HTMLElement &&
|
|
2183
|
+
e.insertBefore(y, d), T && y instanceof HTMLElement && _ && we(y, T).catch((w) => {
|
|
2212
2184
|
B("Transition enter error:", w);
|
|
2213
2185
|
});
|
|
2214
2186
|
}
|
|
2215
2187
|
e.insertBefore(S, d);
|
|
2216
2188
|
} else {
|
|
2217
|
-
const T =
|
|
2218
|
-
|
|
2189
|
+
const T = A._transition, _ = u.get(b)._transition, l = _ && _.state !== T?.state, y = T && T.state === "visible" && C.length > 0 && !l, w = l || !y || T?.appear === !0;
|
|
2190
|
+
j(
|
|
2219
2191
|
v,
|
|
2220
2192
|
S,
|
|
2221
2193
|
u.get(b)?.children,
|
|
@@ -2227,26 +2199,26 @@ function Jt(e, n, t, s, r) {
|
|
|
2227
2199
|
k(v, S), d = S.nextSibling;
|
|
2228
2200
|
continue;
|
|
2229
2201
|
}
|
|
2230
|
-
if (
|
|
2231
|
-
const b = u.get(
|
|
2202
|
+
if (A.key != null && h.has(A.key)) {
|
|
2203
|
+
const b = u.get(A.key);
|
|
2232
2204
|
a = Le(
|
|
2233
|
-
h.get(
|
|
2205
|
+
h.get(A.key),
|
|
2234
2206
|
b,
|
|
2235
|
-
|
|
2207
|
+
A,
|
|
2236
2208
|
s,
|
|
2237
2209
|
r
|
|
2238
2210
|
), p.add(a), a !== d && e.contains(a) && (d && !e.contains(d) && (d = null), e.insertBefore(a, d));
|
|
2239
2211
|
} else
|
|
2240
|
-
a =
|
|
2241
|
-
|
|
2212
|
+
a = Z(
|
|
2213
|
+
A,
|
|
2242
2214
|
s,
|
|
2243
2215
|
r,
|
|
2244
2216
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2245
2217
|
), d && !e.contains(d) && (d = null), e.insertBefore(a, d), p.add(a);
|
|
2246
2218
|
d = a.nextSibling;
|
|
2247
2219
|
}
|
|
2248
|
-
for (let
|
|
2249
|
-
const a =
|
|
2220
|
+
for (let A = 0; A < i.length; A++) {
|
|
2221
|
+
const a = i[A];
|
|
2250
2222
|
!p.has(a) && e.contains(a) && (de(a, r), e.removeChild(a));
|
|
2251
2223
|
}
|
|
2252
2224
|
}
|
|
@@ -2256,17 +2228,17 @@ function Le(e, n, t, s, r) {
|
|
|
2256
2228
|
if (e.nodeType === Node.TEXT_NODE)
|
|
2257
2229
|
return e.textContent !== t && (e.textContent = t), e;
|
|
2258
2230
|
{
|
|
2259
|
-
const
|
|
2260
|
-
return e.parentNode?.replaceChild(
|
|
2231
|
+
const i = document.createTextNode(t);
|
|
2232
|
+
return e.parentNode?.replaceChild(i, e), i;
|
|
2261
2233
|
}
|
|
2262
2234
|
}
|
|
2263
2235
|
if (t && typeof t != "string" && t.tag === "#anchor") {
|
|
2264
|
-
const
|
|
2265
|
-
|
|
2236
|
+
const i = t, c = Array.isArray(i.children) ? i.children : [], f = i._startNode ?? document.createTextNode(""), u = i._endNode ?? document.createTextNode("");
|
|
2237
|
+
i.key != null && (G(f, `${i.key}:start`), G(u, `${i.key}:end`)), i._startNode = f, i._endNode = u;
|
|
2266
2238
|
const h = document.createDocumentFragment();
|
|
2267
2239
|
h.appendChild(f);
|
|
2268
2240
|
for (const p of c) {
|
|
2269
|
-
const d =
|
|
2241
|
+
const d = Z(
|
|
2270
2242
|
p,
|
|
2271
2243
|
s,
|
|
2272
2244
|
r,
|
|
@@ -2278,27 +2250,27 @@ function Le(e, n, t, s, r) {
|
|
|
2278
2250
|
}
|
|
2279
2251
|
if (!t) {
|
|
2280
2252
|
de(e, r);
|
|
2281
|
-
const
|
|
2282
|
-
return e.parentNode?.replaceChild(
|
|
2253
|
+
const i = document.createComment("removed");
|
|
2254
|
+
return e.parentNode?.replaceChild(i, e), i;
|
|
2283
2255
|
}
|
|
2284
2256
|
if (!n || typeof n == "string") {
|
|
2285
2257
|
de(e, r);
|
|
2286
|
-
const
|
|
2258
|
+
const i = Z(
|
|
2287
2259
|
t,
|
|
2288
2260
|
s,
|
|
2289
2261
|
r,
|
|
2290
2262
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2291
2263
|
);
|
|
2292
|
-
return Te(t,
|
|
2264
|
+
return Te(t, i, r), e.parentNode?.replaceChild(i, e), i;
|
|
2293
2265
|
}
|
|
2294
2266
|
if (t.tag === "#anchor") {
|
|
2295
|
-
const
|
|
2296
|
-
t.key != null && (
|
|
2267
|
+
const i = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), f = t._endNode ?? document.createTextNode("");
|
|
2268
|
+
t.key != null && (G(c, `${t.key}:start`), G(f, `${t.key}:end`)), t._startNode = c, t._endNode = f;
|
|
2297
2269
|
const u = document.createDocumentFragment();
|
|
2298
2270
|
u.appendChild(c);
|
|
2299
|
-
for (const h of
|
|
2271
|
+
for (const h of i)
|
|
2300
2272
|
u.appendChild(
|
|
2301
|
-
|
|
2273
|
+
Z(
|
|
2302
2274
|
h,
|
|
2303
2275
|
s,
|
|
2304
2276
|
r,
|
|
@@ -2308,25 +2280,25 @@ function Le(e, n, t, s, r) {
|
|
|
2308
2280
|
return u.appendChild(f), e.parentNode?.replaceChild(u, e), c;
|
|
2309
2281
|
}
|
|
2310
2282
|
if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && n.key === t.key) {
|
|
2311
|
-
const
|
|
2312
|
-
return
|
|
2283
|
+
const i = e;
|
|
2284
|
+
return ct(i, n.props || {}, t.props || {}, s), Gt(i, n.children, t.children, s, r), Te(t, i, r), i;
|
|
2313
2285
|
}
|
|
2314
2286
|
if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && (n.tag && String(n.tag).includes("-") || t.props && t.props.isCustomElement || n.props && n.props.isCustomElement))
|
|
2315
2287
|
try {
|
|
2316
2288
|
const c = e;
|
|
2317
|
-
return
|
|
2289
|
+
return ct(c, n.props || {}, t.props || {}, s), Te(t, c, r), c;
|
|
2318
2290
|
} catch {
|
|
2319
2291
|
}
|
|
2320
2292
|
de(e, r);
|
|
2321
|
-
const
|
|
2293
|
+
const o = Z(
|
|
2322
2294
|
t,
|
|
2323
2295
|
s,
|
|
2324
2296
|
r,
|
|
2325
2297
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2326
2298
|
);
|
|
2327
|
-
return Te(t,
|
|
2299
|
+
return Te(t, o, r), e.parentNode?.replaceChild(o, e), o;
|
|
2328
2300
|
}
|
|
2329
|
-
function
|
|
2301
|
+
function Zt(e, n, t, s) {
|
|
2330
2302
|
let r;
|
|
2331
2303
|
Array.isArray(n) ? n.length === 1 ? (r = n[0], r && typeof r == "object" && r.key == null && (r = { ...r, key: "__root__" })) : r = { tag: "div", key: "__root__", children: n } : (r = n, r && typeof r == "object" && r.key == null && (r = { ...r, key: "__root__" })), r && typeof r == "object" && r.tag === "#anchor" && (r = {
|
|
2332
2304
|
tag: "div",
|
|
@@ -2335,15 +2307,15 @@ function Yt(e, n, t, s) {
|
|
|
2335
2307
|
attrs: { "data-anchor-block-root": "", key: "__anchor_root__" }
|
|
2336
2308
|
},
|
|
2337
2309
|
children: [r]
|
|
2338
|
-
}), r =
|
|
2339
|
-
const
|
|
2310
|
+
}), r = Je(r, String(r.key ?? "root"));
|
|
2311
|
+
const o = e._prevVNode ?? null, i = e._prevDom ?? e.firstChild ?? null;
|
|
2340
2312
|
let c;
|
|
2341
|
-
|
|
2313
|
+
o && i ? typeof o != "string" && typeof r != "string" && o.tag === r.tag && o.key === r.key ? c = Le(i, o, r, t, s) : (c = Z(
|
|
2342
2314
|
r,
|
|
2343
2315
|
t,
|
|
2344
2316
|
s,
|
|
2345
2317
|
e.host instanceof Element ? e.host.namespaceURI ?? null : null
|
|
2346
|
-
), e.replaceChild(c,
|
|
2318
|
+
), e.replaceChild(c, i)) : (c = Z(
|
|
2347
2319
|
r,
|
|
2348
2320
|
t,
|
|
2349
2321
|
s,
|
|
@@ -2365,50 +2337,50 @@ function Yt(e, n, t, s) {
|
|
|
2365
2337
|
} : r;
|
|
2366
2338
|
e._prevVNode = u, e._prevDom = c;
|
|
2367
2339
|
}
|
|
2368
|
-
const Oe = [],
|
|
2369
|
-
function
|
|
2340
|
+
const Oe = [], at = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap();
|
|
2341
|
+
function Jt(e, n) {
|
|
2370
2342
|
Ee.has(e) || Ee.set(e, /* @__PURE__ */ new Set()), Ee.get(e).add(n);
|
|
2371
2343
|
}
|
|
2372
|
-
function
|
|
2344
|
+
function Yt(e, n) {
|
|
2373
2345
|
const t = Ee.get(e);
|
|
2374
2346
|
t && (t.delete(n), t.size === 0 && Ee.delete(e));
|
|
2375
2347
|
}
|
|
2376
|
-
function
|
|
2348
|
+
function Xt(e, n, t, s, r, o, i, c) {
|
|
2377
2349
|
if (e) {
|
|
2378
2350
|
Oe.push(t);
|
|
2379
2351
|
try {
|
|
2380
2352
|
const f = n.render(t);
|
|
2381
2353
|
if (f instanceof Promise) {
|
|
2382
|
-
|
|
2383
|
-
|
|
2354
|
+
o(!0), f.then((u) => {
|
|
2355
|
+
o(!1), i(null), lt(e, u, t, s, r), c(e.innerHTML);
|
|
2384
2356
|
}).catch((u) => {
|
|
2385
|
-
|
|
2357
|
+
o(!1), i(u instanceof Error ? u : new Error(String(u)));
|
|
2386
2358
|
});
|
|
2387
2359
|
return;
|
|
2388
2360
|
}
|
|
2389
|
-
|
|
2361
|
+
lt(e, f, t, s, r), c(e.innerHTML);
|
|
2390
2362
|
} catch (f) {
|
|
2391
|
-
|
|
2363
|
+
i(f instanceof Error ? f : new Error(String(f)));
|
|
2392
2364
|
} finally {
|
|
2393
2365
|
Oe.pop();
|
|
2394
2366
|
}
|
|
2395
2367
|
}
|
|
2396
2368
|
}
|
|
2397
|
-
function
|
|
2369
|
+
function lt(e, n, t, s, r) {
|
|
2398
2370
|
if (e)
|
|
2399
2371
|
try {
|
|
2400
|
-
|
|
2372
|
+
Zt(
|
|
2401
2373
|
e,
|
|
2402
2374
|
Array.isArray(n) ? n : [n],
|
|
2403
2375
|
t,
|
|
2404
2376
|
s
|
|
2405
2377
|
), r(e.innerHTML);
|
|
2406
|
-
} catch (
|
|
2407
|
-
throw B("Error during VDOM rendering:",
|
|
2378
|
+
} catch (o) {
|
|
2379
|
+
throw B("Error during VDOM rendering:", o), o;
|
|
2408
2380
|
}
|
|
2409
2381
|
}
|
|
2410
|
-
function
|
|
2411
|
-
|
|
2382
|
+
function Qt(e, n, t, s, r, o, i) {
|
|
2383
|
+
o !== null && clearTimeout(o);
|
|
2412
2384
|
const u = Date.now() - n < 16, h = (() => {
|
|
2413
2385
|
try {
|
|
2414
2386
|
return typeof window < "u" && !!window.Cypress;
|
|
@@ -2423,73 +2395,73 @@ function tn(e, n, t, s, r, i, o) {
|
|
|
2423
2395
|
}
|
|
2424
2396
|
})(), d = p || h;
|
|
2425
2397
|
if (u) {
|
|
2426
|
-
const
|
|
2427
|
-
r(
|
|
2398
|
+
const A = t + 1;
|
|
2399
|
+
r(A);
|
|
2428
2400
|
const a = d ? 50 : 10, b = d ? 100 : 25, E = p ? 12 : 50;
|
|
2429
|
-
if (
|
|
2430
|
-
|
|
2401
|
+
if (A === a && !d)
|
|
2402
|
+
ee(
|
|
2431
2403
|
`⚠️ Component rendering frequently. Performance may be impacted.
|
|
2432
2404
|
Common causes:
|
|
2433
2405
|
• State updates during render cycle
|
|
2434
2406
|
• Event handlers with immediate function calls
|
|
2435
2407
|
• Missing effect dependencies`
|
|
2436
2408
|
);
|
|
2437
|
-
else if (
|
|
2438
|
-
|
|
2409
|
+
else if (A === b && !d)
|
|
2410
|
+
ee(
|
|
2439
2411
|
`⚠️ Component is re-rendering rapidly. Applying throttling.
|
|
2440
2412
|
This might indicate:
|
|
2441
2413
|
• Event handler calling function immediately: @click="\${fn()}" should be @click="\${fn}"
|
|
2442
2414
|
• State modification during render
|
|
2443
2415
|
• Missing dependencies in computed/watch`
|
|
2444
2416
|
);
|
|
2445
|
-
else if (
|
|
2417
|
+
else if (A >= E) {
|
|
2446
2418
|
B(
|
|
2447
2419
|
`🛑 Infinite render loop detected. Stopping to prevent browser freeze.
|
|
2448
2420
|
Possible causes:
|
|
2449
2421
|
• State updates triggering immediate re-renders
|
|
2450
2422
|
• Computed values changing during evaluation
|
|
2451
2423
|
• Circular dependencies in reactive system`
|
|
2452
|
-
),
|
|
2424
|
+
), i(null);
|
|
2453
2425
|
return;
|
|
2454
2426
|
}
|
|
2455
2427
|
} else
|
|
2456
2428
|
r(0);
|
|
2457
2429
|
let k = 0;
|
|
2458
2430
|
d || (t >= 40 ? k = 500 : t >= 25 ? k = 100 : t >= 15 && (k = 16));
|
|
2459
|
-
const
|
|
2431
|
+
const j = () => {
|
|
2460
2432
|
s(Date.now());
|
|
2461
2433
|
try {
|
|
2462
2434
|
e();
|
|
2463
|
-
} catch (
|
|
2464
|
-
B("Error during render execution:",
|
|
2435
|
+
} catch (A) {
|
|
2436
|
+
B("Error during render execution:", A);
|
|
2465
2437
|
} finally {
|
|
2466
|
-
|
|
2438
|
+
i(null);
|
|
2467
2439
|
}
|
|
2468
2440
|
};
|
|
2469
2441
|
if (k > 0) {
|
|
2470
|
-
const
|
|
2471
|
-
|
|
2472
|
-
} else d ?
|
|
2442
|
+
const A = setTimeout(j, k);
|
|
2443
|
+
i(A);
|
|
2444
|
+
} else d ? j() : (i({}), queueMicrotask(j));
|
|
2473
2445
|
}
|
|
2474
|
-
function
|
|
2446
|
+
function en(e, n) {
|
|
2475
2447
|
let t = n;
|
|
2476
2448
|
try {
|
|
2477
2449
|
const s = Ee.get(e);
|
|
2478
2450
|
if (s?.size)
|
|
2479
2451
|
for (const r of s)
|
|
2480
2452
|
try {
|
|
2481
|
-
const
|
|
2482
|
-
|
|
2483
|
-
` +
|
|
2453
|
+
const o = r.lastHtmlStringForJitCSS;
|
|
2454
|
+
o?.trim() && (t += `
|
|
2455
|
+
` + o);
|
|
2484
2456
|
} catch {
|
|
2485
2457
|
}
|
|
2486
2458
|
else {
|
|
2487
2459
|
const r = e.querySelectorAll("*");
|
|
2488
|
-
for (const
|
|
2460
|
+
for (const o of r)
|
|
2489
2461
|
try {
|
|
2490
|
-
const
|
|
2491
|
-
|
|
2492
|
-
` +
|
|
2462
|
+
const i = o.lastHtmlStringForJitCSS;
|
|
2463
|
+
i?.trim() && (t += `
|
|
2464
|
+
` + i);
|
|
2493
2465
|
} catch {
|
|
2494
2466
|
}
|
|
2495
2467
|
}
|
|
@@ -2497,10 +2469,10 @@ function nn(e, n) {
|
|
|
2497
2469
|
}
|
|
2498
2470
|
return t;
|
|
2499
2471
|
}
|
|
2500
|
-
function
|
|
2472
|
+
function ft(e) {
|
|
2501
2473
|
return "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u" && "replaceSync" in CSSStyleSheet.prototype;
|
|
2502
2474
|
}
|
|
2503
|
-
function
|
|
2475
|
+
function ut(e, n) {
|
|
2504
2476
|
let t = e.querySelector(
|
|
2505
2477
|
"style[data-cer-runtime]"
|
|
2506
2478
|
);
|
|
@@ -2510,21 +2482,21 @@ function dt(e, n) {
|
|
|
2510
2482
|
} catch {
|
|
2511
2483
|
}
|
|
2512
2484
|
}
|
|
2513
|
-
function
|
|
2485
|
+
function tn(e, n, t, s, r) {
|
|
2514
2486
|
if (!e) return;
|
|
2515
|
-
const
|
|
2516
|
-
if (
|
|
2487
|
+
const o = en(e, t);
|
|
2488
|
+
if (at.get(e) === o)
|
|
2517
2489
|
return;
|
|
2518
|
-
|
|
2519
|
-
const c =
|
|
2490
|
+
at.set(e, o);
|
|
2491
|
+
const c = At(o), f = wt(), u = n._computedStyle;
|
|
2520
2492
|
if (!c?.trim() && !u && !f) {
|
|
2521
|
-
if (r(null),
|
|
2493
|
+
if (r(null), ft(e))
|
|
2522
2494
|
e.adoptedStyleSheets = [
|
|
2523
|
-
|
|
2495
|
+
Re(),
|
|
2524
2496
|
ye()
|
|
2525
2497
|
];
|
|
2526
2498
|
else {
|
|
2527
|
-
const b = Ae(
|
|
2499
|
+
const b = Ae(st), E = ye();
|
|
2528
2500
|
let m = "";
|
|
2529
2501
|
try {
|
|
2530
2502
|
E?.cssRules && (m = Array.from(E.cssRules).map((S) => S.cssText).join(`
|
|
@@ -2534,9 +2506,9 @@ function rn(e, n, t, s, r) {
|
|
|
2534
2506
|
}
|
|
2535
2507
|
const v = Ae(`${b}
|
|
2536
2508
|
${m}`);
|
|
2537
|
-
|
|
2509
|
+
ut(e, v);
|
|
2538
2510
|
try {
|
|
2539
|
-
e.adoptedStyleSheets = [
|
|
2511
|
+
e.adoptedStyleSheets = [Re(), ye()];
|
|
2540
2512
|
} catch {
|
|
2541
2513
|
}
|
|
2542
2514
|
}
|
|
@@ -2545,32 +2517,32 @@ ${m}`);
|
|
|
2545
2517
|
let h = "";
|
|
2546
2518
|
if (u && (h += u + `
|
|
2547
2519
|
`), c && (h += c + `
|
|
2548
|
-
`), h =
|
|
2520
|
+
`), h = Tt(h), h = Ae(h), ft(e)) {
|
|
2549
2521
|
let a = s;
|
|
2550
2522
|
a || (a = new CSSStyleSheet());
|
|
2551
2523
|
try {
|
|
2552
2524
|
a.replaceSync(h);
|
|
2553
|
-
const b = [
|
|
2525
|
+
const b = [Re(), ye()];
|
|
2554
2526
|
f && b.push(f), b.push(a), e.adoptedStyleSheets = b, r(a);
|
|
2555
2527
|
return;
|
|
2556
2528
|
} catch {
|
|
2557
2529
|
}
|
|
2558
2530
|
}
|
|
2559
|
-
const d = Ae(
|
|
2560
|
-
let
|
|
2531
|
+
const d = Ae(st), k = ye();
|
|
2532
|
+
let j = "";
|
|
2561
2533
|
try {
|
|
2562
|
-
k?.cssRules && (
|
|
2534
|
+
k?.cssRules && (j = Array.from(k.cssRules).map((a) => a.cssText).join(`
|
|
2563
2535
|
`));
|
|
2564
2536
|
} catch {
|
|
2565
|
-
|
|
2537
|
+
j = "";
|
|
2566
2538
|
}
|
|
2567
|
-
const
|
|
2568
|
-
${
|
|
2539
|
+
const A = Ae(`${d}
|
|
2540
|
+
${j}
|
|
2569
2541
|
${h}`);
|
|
2570
|
-
|
|
2542
|
+
ut(e, A);
|
|
2571
2543
|
try {
|
|
2572
2544
|
const a = [
|
|
2573
|
-
|
|
2545
|
+
Re(),
|
|
2574
2546
|
ye()
|
|
2575
2547
|
];
|
|
2576
2548
|
if (f && a.push(f), typeof CSSStyleSheet < "u")
|
|
@@ -2589,7 +2561,7 @@ ${h}`);
|
|
|
2589
2561
|
}
|
|
2590
2562
|
r(null);
|
|
2591
2563
|
}
|
|
2592
|
-
function
|
|
2564
|
+
function nn(e, n) {
|
|
2593
2565
|
if (!n.render)
|
|
2594
2566
|
throw new Error("Component must have a render function");
|
|
2595
2567
|
return typeof window > "u" ? class {
|
|
@@ -2633,8 +2605,8 @@ function sn(e, n) {
|
|
|
2633
2605
|
_templateError = null;
|
|
2634
2606
|
constructor() {
|
|
2635
2607
|
super(), this.attachShadow({ mode: "open" }), this._cfg = ge.get(e) || n, this._componentId = `${e}-${crypto.randomUUID()}`;
|
|
2636
|
-
const t = this._initContext(n), s = (
|
|
2637
|
-
Object.defineProperty(
|
|
2608
|
+
const t = this._initContext(n), s = (o, i, c) => {
|
|
2609
|
+
Object.defineProperty(o, i, {
|
|
2638
2610
|
value: c,
|
|
2639
2611
|
writable: !1,
|
|
2640
2612
|
enumerable: !1,
|
|
@@ -2652,26 +2624,26 @@ function sn(e, n) {
|
|
|
2652
2624
|
), s(t, "_componentId", this._componentId), s(
|
|
2653
2625
|
t,
|
|
2654
2626
|
"_triggerWatchers",
|
|
2655
|
-
(
|
|
2627
|
+
(o, i) => this._triggerWatchers(o, i)
|
|
2656
2628
|
), this.context = t, x(() => {
|
|
2657
2629
|
s(t, "_host", this);
|
|
2658
2630
|
}), s(
|
|
2659
2631
|
this.context,
|
|
2660
2632
|
"emit",
|
|
2661
|
-
(
|
|
2633
|
+
(o, i, c) => {
|
|
2662
2634
|
const f = {
|
|
2663
|
-
detail:
|
|
2635
|
+
detail: i,
|
|
2664
2636
|
bubbles: !0,
|
|
2665
2637
|
composed: !0,
|
|
2666
2638
|
...c || {}
|
|
2667
|
-
}, u = new CustomEvent(
|
|
2639
|
+
}, u = new CustomEvent(o, f);
|
|
2668
2640
|
this.dispatchEvent(u);
|
|
2669
|
-
const h =
|
|
2641
|
+
const h = o.indexOf(":");
|
|
2670
2642
|
if (h > 0) {
|
|
2671
|
-
const p =
|
|
2672
|
-
(
|
|
2643
|
+
const p = o.substring(0, h), d = o.substring(h + 1), k = d.includes("-") ? `${p}:${d.split("-").map(
|
|
2644
|
+
(j, A) => A === 0 ? j : j.charAt(0).toUpperCase() + j.slice(1)
|
|
2673
2645
|
).join("")}` : `${p}:${d.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
2674
|
-
k !==
|
|
2646
|
+
k !== o && x(() => {
|
|
2675
2647
|
this.dispatchEvent(new CustomEvent(k, f));
|
|
2676
2648
|
});
|
|
2677
2649
|
}
|
|
@@ -2679,20 +2651,20 @@ function sn(e, n) {
|
|
|
2679
2651
|
}
|
|
2680
2652
|
);
|
|
2681
2653
|
const r = ge.get(e) || n;
|
|
2682
|
-
for (const
|
|
2683
|
-
const
|
|
2684
|
-
typeof
|
|
2654
|
+
for (const o in r) {
|
|
2655
|
+
const i = r[o];
|
|
2656
|
+
typeof i == "function" && (this.context[o] = (...c) => i(...c, this.context));
|
|
2685
2657
|
}
|
|
2686
2658
|
if (r.props)
|
|
2687
|
-
for (const
|
|
2688
|
-
let
|
|
2689
|
-
Object.defineProperty(this,
|
|
2659
|
+
for (const o in r.props) {
|
|
2660
|
+
let i = this[o];
|
|
2661
|
+
Object.defineProperty(this, o, {
|
|
2690
2662
|
get() {
|
|
2691
|
-
return
|
|
2663
|
+
return i;
|
|
2692
2664
|
},
|
|
2693
2665
|
set(c) {
|
|
2694
|
-
const f =
|
|
2695
|
-
|
|
2666
|
+
const f = i;
|
|
2667
|
+
i = c, this.context[o] = c, this._initializing || (this._applyProps(r), f !== c && this._requestRender());
|
|
2696
2668
|
},
|
|
2697
2669
|
enumerable: !0,
|
|
2698
2670
|
configurable: !0
|
|
@@ -2703,7 +2675,7 @@ function sn(e, n) {
|
|
|
2703
2675
|
connectedCallback() {
|
|
2704
2676
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
2705
2677
|
const t = this.getRootNode();
|
|
2706
|
-
t && t !== document && "host" in t &&
|
|
2678
|
+
t && t !== document && "host" in t && Jt(t, this), this._applyProps(n), this._requestRender(), Pt(n, this.context, this._mounted, (s) => {
|
|
2707
2679
|
this._mounted = s;
|
|
2708
2680
|
});
|
|
2709
2681
|
});
|
|
@@ -2711,7 +2683,7 @@ function sn(e, n) {
|
|
|
2711
2683
|
disconnectedCallback() {
|
|
2712
2684
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
2713
2685
|
const t = this.getRootNode();
|
|
2714
|
-
t && t !== document && "host" in t &&
|
|
2686
|
+
t && t !== document && "host" in t && Yt(t, this), $t(
|
|
2715
2687
|
n,
|
|
2716
2688
|
this.context,
|
|
2717
2689
|
this._listeners,
|
|
@@ -2735,16 +2707,16 @@ function sn(e, n) {
|
|
|
2735
2707
|
}
|
|
2736
2708
|
attributeChangedCallback(t, s, r) {
|
|
2737
2709
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
2738
|
-
this._applyProps(n), s !== r && this._requestRender(),
|
|
2710
|
+
this._applyProps(n), s !== r && this._requestRender(), xt(n, t, s, r, this.context);
|
|
2739
2711
|
});
|
|
2740
2712
|
}
|
|
2741
2713
|
static get observedAttributes() {
|
|
2742
|
-
return n.props ? Object.keys(n.props).map(
|
|
2714
|
+
return n.props ? Object.keys(n.props).map(J) : [];
|
|
2743
2715
|
}
|
|
2744
2716
|
// --- Render ---
|
|
2745
2717
|
_render(t) {
|
|
2746
2718
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2747
|
-
|
|
2719
|
+
Xt(
|
|
2748
2720
|
this.shadowRoot,
|
|
2749
2721
|
t,
|
|
2750
2722
|
this.context,
|
|
@@ -2768,7 +2740,7 @@ function sn(e, n) {
|
|
|
2768
2740
|
_requestRender() {
|
|
2769
2741
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
2770
2742
|
_e(() => {
|
|
2771
|
-
|
|
2743
|
+
Qt(
|
|
2772
2744
|
() => this._render(this._cfg),
|
|
2773
2745
|
this._lastRenderTime,
|
|
2774
2746
|
this._renderCount,
|
|
@@ -2789,7 +2761,7 @@ function sn(e, n) {
|
|
|
2789
2761
|
// --- Style ---
|
|
2790
2762
|
_applyStyle(t, s) {
|
|
2791
2763
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2792
|
-
|
|
2764
|
+
tn(
|
|
2793
2765
|
this.shadowRoot,
|
|
2794
2766
|
this.context,
|
|
2795
2767
|
s,
|
|
@@ -2808,7 +2780,7 @@ function sn(e, n) {
|
|
|
2808
2780
|
} catch (r) {
|
|
2809
2781
|
this._hasError = !0;
|
|
2810
2782
|
try {
|
|
2811
|
-
const
|
|
2783
|
+
const o = this.tagName?.toLowerCase?.() || "<unknown>", i = this._componentId || "<unknown-id>", c = {};
|
|
2812
2784
|
if (t && t.props)
|
|
2813
2785
|
for (const f of Object.keys(t.props))
|
|
2814
2786
|
try {
|
|
@@ -2817,30 +2789,30 @@ function sn(e, n) {
|
|
|
2817
2789
|
} catch {
|
|
2818
2790
|
c[f] = "[unreadable]";
|
|
2819
2791
|
}
|
|
2820
|
-
B(`Error rendering component <${
|
|
2792
|
+
B(`Error rendering component <${o}> (id=${i}):`, r), B("Component props snapshot:", c), ee(
|
|
2821
2793
|
"Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`)."
|
|
2822
2794
|
);
|
|
2823
2795
|
} catch {
|
|
2824
2796
|
}
|
|
2825
2797
|
if (t.onError && t.onError(r, this.context), this.tagName.toLowerCase() !== "cer-error-boundary") {
|
|
2826
|
-
let
|
|
2827
|
-
if (!
|
|
2828
|
-
const
|
|
2829
|
-
|
|
2798
|
+
let o = this.parentElement;
|
|
2799
|
+
if (!o) {
|
|
2800
|
+
const i = this.getRootNode();
|
|
2801
|
+
i instanceof ShadowRoot && (o = i.host.parentElement);
|
|
2830
2802
|
}
|
|
2831
|
-
for (;
|
|
2832
|
-
if (
|
|
2833
|
-
|
|
2803
|
+
for (; o; ) {
|
|
2804
|
+
if (o.tagName.toLowerCase() === "cer-error-boundary") {
|
|
2805
|
+
o._cerHandleChildError?.(
|
|
2834
2806
|
r
|
|
2835
2807
|
);
|
|
2836
2808
|
break;
|
|
2837
2809
|
}
|
|
2838
|
-
let
|
|
2839
|
-
if (!
|
|
2840
|
-
const c =
|
|
2841
|
-
c instanceof ShadowRoot && (
|
|
2810
|
+
let i = o.parentElement;
|
|
2811
|
+
if (!i) {
|
|
2812
|
+
const c = o.getRootNode();
|
|
2813
|
+
c instanceof ShadowRoot && (i = c.host.parentElement);
|
|
2842
2814
|
}
|
|
2843
|
-
|
|
2815
|
+
o = i;
|
|
2844
2816
|
}
|
|
2845
2817
|
}
|
|
2846
2818
|
}
|
|
@@ -2848,9 +2820,9 @@ function sn(e, n) {
|
|
|
2848
2820
|
// --- State, props, computed ---
|
|
2849
2821
|
_initContext(t) {
|
|
2850
2822
|
try {
|
|
2851
|
-
let s = function(
|
|
2852
|
-
if (Array.isArray(
|
|
2853
|
-
return new Proxy(
|
|
2823
|
+
let s = function(o, i = "") {
|
|
2824
|
+
if (Array.isArray(o))
|
|
2825
|
+
return new Proxy(o, {
|
|
2854
2826
|
get(c, f, u) {
|
|
2855
2827
|
const h = Reflect.get(c, f, u);
|
|
2856
2828
|
return typeof h == "function" && typeof f == "string" && [
|
|
@@ -2864,8 +2836,8 @@ function sn(e, n) {
|
|
|
2864
2836
|
].includes(f) ? function(...d) {
|
|
2865
2837
|
const k = h.apply(c, d);
|
|
2866
2838
|
if (!r._initializing) {
|
|
2867
|
-
const
|
|
2868
|
-
r._triggerWatchers(
|
|
2839
|
+
const j = i || "root";
|
|
2840
|
+
r._triggerWatchers(j, c), _e(
|
|
2869
2841
|
() => r._render(t),
|
|
2870
2842
|
r._componentId
|
|
2871
2843
|
);
|
|
@@ -2875,29 +2847,29 @@ function sn(e, n) {
|
|
|
2875
2847
|
},
|
|
2876
2848
|
set(c, f, u) {
|
|
2877
2849
|
if (c[String(f)] = u, !r._initializing) {
|
|
2878
|
-
const h =
|
|
2850
|
+
const h = i ? `${i}.${String(f)}` : String(f);
|
|
2879
2851
|
r._triggerWatchers(h, u), _e(() => r._render(t), r._componentId);
|
|
2880
2852
|
}
|
|
2881
2853
|
return !0;
|
|
2882
2854
|
},
|
|
2883
2855
|
deleteProperty(c, f) {
|
|
2884
2856
|
if (delete c[String(f)], !r._initializing) {
|
|
2885
|
-
const u =
|
|
2857
|
+
const u = i ? `${i}.${String(f)}` : String(f);
|
|
2886
2858
|
r._triggerWatchers(u, void 0), _e(() => r._render(t), r._componentId);
|
|
2887
2859
|
}
|
|
2888
2860
|
return !0;
|
|
2889
2861
|
}
|
|
2890
2862
|
});
|
|
2891
|
-
if (
|
|
2892
|
-
if (P(
|
|
2893
|
-
return
|
|
2894
|
-
for (const c in
|
|
2895
|
-
const f =
|
|
2896
|
-
|
|
2863
|
+
if (o && typeof o == "object") {
|
|
2864
|
+
if (P(o))
|
|
2865
|
+
return o;
|
|
2866
|
+
for (const c in o) {
|
|
2867
|
+
const f = i ? `${i}.${c}` : c;
|
|
2868
|
+
o[c] = s(o[c], f);
|
|
2897
2869
|
}
|
|
2898
|
-
return new Proxy(
|
|
2870
|
+
return new Proxy(o, {
|
|
2899
2871
|
set(c, f, u) {
|
|
2900
|
-
const h =
|
|
2872
|
+
const h = i ? `${i}.${String(f)}` : String(f);
|
|
2901
2873
|
return c[String(f)] = s(u, h), r._initializing || (r._triggerWatchers(
|
|
2902
2874
|
h,
|
|
2903
2875
|
c[String(f)]
|
|
@@ -2908,16 +2880,16 @@ function sn(e, n) {
|
|
|
2908
2880
|
}
|
|
2909
2881
|
});
|
|
2910
2882
|
}
|
|
2911
|
-
return
|
|
2883
|
+
return o;
|
|
2912
2884
|
};
|
|
2913
2885
|
const r = this;
|
|
2914
2886
|
return s({
|
|
2915
2887
|
// For functional components, state is managed by state() function calls
|
|
2916
2888
|
// Include prop defaults in initial reactive context so prop updates trigger reactivity
|
|
2917
2889
|
...t.props ? Object.fromEntries(
|
|
2918
|
-
Object.entries(t.props).map(([
|
|
2919
|
-
|
|
2920
|
-
|
|
2890
|
+
Object.entries(t.props).map(([o, i]) => [
|
|
2891
|
+
o,
|
|
2892
|
+
i.default
|
|
2921
2893
|
])
|
|
2922
2894
|
) : {}
|
|
2923
2895
|
});
|
|
@@ -2927,7 +2899,7 @@ function sn(e, n) {
|
|
|
2927
2899
|
}
|
|
2928
2900
|
_initWatchers(t) {
|
|
2929
2901
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2930
|
-
|
|
2902
|
+
Nt(
|
|
2931
2903
|
this.context,
|
|
2932
2904
|
this._watchers,
|
|
2933
2905
|
{}
|
|
@@ -2936,34 +2908,34 @@ function sn(e, n) {
|
|
|
2936
2908
|
});
|
|
2937
2909
|
}
|
|
2938
2910
|
_triggerWatchers(t, s) {
|
|
2939
|
-
|
|
2911
|
+
Ot(this.context, this._watchers, t, s);
|
|
2940
2912
|
}
|
|
2941
2913
|
_applyProps(t) {
|
|
2942
2914
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2943
|
-
|
|
2915
|
+
Mt(this, t, this.context);
|
|
2944
2916
|
});
|
|
2945
2917
|
}
|
|
2946
2918
|
};
|
|
2947
2919
|
}
|
|
2948
|
-
function
|
|
2949
|
-
return
|
|
2920
|
+
function yn() {
|
|
2921
|
+
return Y();
|
|
2950
2922
|
}
|
|
2951
|
-
let
|
|
2923
|
+
let R = null;
|
|
2952
2924
|
function Ue(e) {
|
|
2953
|
-
|
|
2925
|
+
R = e;
|
|
2954
2926
|
}
|
|
2955
2927
|
function Be() {
|
|
2956
|
-
|
|
2928
|
+
R = null;
|
|
2957
2929
|
}
|
|
2958
|
-
function
|
|
2959
|
-
return
|
|
2930
|
+
function mn() {
|
|
2931
|
+
return R;
|
|
2960
2932
|
}
|
|
2961
|
-
function
|
|
2962
|
-
if (!
|
|
2933
|
+
function gn() {
|
|
2934
|
+
if (!R)
|
|
2963
2935
|
throw new Error("useEmit must be called during component render");
|
|
2964
|
-
if (
|
|
2936
|
+
if (Y())
|
|
2965
2937
|
return () => !1;
|
|
2966
|
-
const e =
|
|
2938
|
+
const e = R.emit;
|
|
2967
2939
|
if (typeof e != "function")
|
|
2968
2940
|
throw new Error(
|
|
2969
2941
|
"useEmit requires an emit function on the component context"
|
|
@@ -2979,38 +2951,38 @@ function he(e) {
|
|
|
2979
2951
|
configurable: !1
|
|
2980
2952
|
});
|
|
2981
2953
|
}
|
|
2982
|
-
function
|
|
2983
|
-
if (!
|
|
2954
|
+
function bn(e) {
|
|
2955
|
+
if (!R)
|
|
2984
2956
|
throw new Error("useOnConnected must be called during component render");
|
|
2985
|
-
if (
|
|
2986
|
-
he(
|
|
2987
|
-
const n =
|
|
2957
|
+
if (Y()) return;
|
|
2958
|
+
he(R);
|
|
2959
|
+
const n = R._hookCallbacks;
|
|
2988
2960
|
n.onConnected || (n.onConnected = []), n.onConnected.push(e);
|
|
2989
2961
|
}
|
|
2990
|
-
function
|
|
2991
|
-
if (!
|
|
2962
|
+
function vn(e) {
|
|
2963
|
+
if (!R)
|
|
2992
2964
|
throw new Error("useOnDisconnected must be called during component render");
|
|
2993
|
-
if (
|
|
2994
|
-
he(
|
|
2995
|
-
const n =
|
|
2965
|
+
if (Y()) return;
|
|
2966
|
+
he(R);
|
|
2967
|
+
const n = R._hookCallbacks;
|
|
2996
2968
|
n.onDisconnected || (n.onDisconnected = []), n.onDisconnected.push(e);
|
|
2997
2969
|
}
|
|
2998
|
-
function
|
|
2999
|
-
if (!
|
|
2970
|
+
function En(e) {
|
|
2971
|
+
if (!R)
|
|
3000
2972
|
throw new Error(
|
|
3001
2973
|
"useOnAttributeChanged must be called during component render"
|
|
3002
2974
|
);
|
|
3003
|
-
if (
|
|
3004
|
-
he(
|
|
3005
|
-
const n =
|
|
2975
|
+
if (Y()) return;
|
|
2976
|
+
he(R);
|
|
2977
|
+
const n = R._hookCallbacks;
|
|
3006
2978
|
n.onAttributeChanged || (n.onAttributeChanged = []), n.onAttributeChanged.push(e);
|
|
3007
2979
|
}
|
|
3008
|
-
function
|
|
3009
|
-
if (!
|
|
2980
|
+
function Sn(e) {
|
|
2981
|
+
if (!R)
|
|
3010
2982
|
throw new Error("useOnError must be called during component render");
|
|
3011
|
-
if (
|
|
3012
|
-
he(
|
|
3013
|
-
const n =
|
|
2983
|
+
if (Y()) return;
|
|
2984
|
+
he(R);
|
|
2985
|
+
const n = R._hookCallbacks;
|
|
3014
2986
|
n.onError || (n.onError = []), n.onError.push((t) => {
|
|
3015
2987
|
try {
|
|
3016
2988
|
t instanceof Error ? e(t) : e(new Error(String(t)));
|
|
@@ -3018,41 +2990,41 @@ function kn(e) {
|
|
|
3018
2990
|
}
|
|
3019
2991
|
});
|
|
3020
2992
|
}
|
|
3021
|
-
function
|
|
3022
|
-
if (!
|
|
2993
|
+
function rn(e) {
|
|
2994
|
+
if (!R)
|
|
3023
2995
|
throw new Error("useProps must be called during component render");
|
|
3024
|
-
he(
|
|
3025
|
-
const n =
|
|
2996
|
+
he(R);
|
|
2997
|
+
const n = R._hookCallbacks;
|
|
3026
2998
|
n.props = {
|
|
3027
2999
|
...n.props || {},
|
|
3028
3000
|
...e
|
|
3029
3001
|
};
|
|
3030
|
-
const t =
|
|
3002
|
+
const t = R;
|
|
3031
3003
|
try {
|
|
3032
3004
|
const r = Object.keys(e || {});
|
|
3033
|
-
for (const
|
|
3034
|
-
if (typeof
|
|
3035
|
-
const
|
|
3036
|
-
if (!(
|
|
3005
|
+
for (const o of r) {
|
|
3006
|
+
if (typeof o != "string" || o.startsWith("_")) continue;
|
|
3007
|
+
const i = Object.getOwnPropertyDescriptor(t, o);
|
|
3008
|
+
if (!(i && !i.configurable))
|
|
3037
3009
|
try {
|
|
3038
|
-
let f = Object.prototype.hasOwnProperty.call(t,
|
|
3039
|
-
Object.defineProperty(t,
|
|
3010
|
+
let f = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
|
|
3011
|
+
Object.defineProperty(t, o, {
|
|
3040
3012
|
configurable: !0,
|
|
3041
3013
|
enumerable: !0,
|
|
3042
3014
|
get() {
|
|
3043
3015
|
try {
|
|
3044
3016
|
const u = t && t._host;
|
|
3045
3017
|
if (u) {
|
|
3046
|
-
const h =
|
|
3018
|
+
const h = J(o), p = u.getAttribute(h);
|
|
3047
3019
|
if (p !== null) {
|
|
3048
|
-
const d = typeof e[
|
|
3020
|
+
const d = typeof e[o];
|
|
3049
3021
|
return d === "boolean" ? p === "" || p === "true" : d === "number" ? Number(p) : p;
|
|
3050
3022
|
}
|
|
3051
|
-
if (typeof u[
|
|
3052
|
-
const d = u[
|
|
3023
|
+
if (typeof u[o] < "u") {
|
|
3024
|
+
const d = u[o];
|
|
3053
3025
|
if (P(d) || d && typeof d == "object" && "value" in d && !(d instanceof Node))
|
|
3054
3026
|
return d.value;
|
|
3055
|
-
const k = typeof e[
|
|
3027
|
+
const k = typeof e[o];
|
|
3056
3028
|
if (!(k === "string" && d && typeof d == "object"))
|
|
3057
3029
|
return k === "boolean" && typeof d == "string" ? d === "" || d === "true" : d;
|
|
3058
3030
|
}
|
|
@@ -3071,31 +3043,31 @@ function on(e) {
|
|
|
3071
3043
|
} catch {
|
|
3072
3044
|
}
|
|
3073
3045
|
return new Proxy({}, {
|
|
3074
|
-
get(r,
|
|
3075
|
-
if (typeof
|
|
3076
|
-
const
|
|
3046
|
+
get(r, o) {
|
|
3047
|
+
if (typeof o != "string") return;
|
|
3048
|
+
const i = e[o];
|
|
3077
3049
|
try {
|
|
3078
3050
|
const f = t && t._host;
|
|
3079
3051
|
if (f) {
|
|
3080
3052
|
if (f instanceof HTMLElement || typeof f.getAttribute == "function" && typeof f.hasAttribute == "function") {
|
|
3081
|
-
const h =
|
|
3053
|
+
const h = o.replace(/([A-Z])/g, "-$1").toLowerCase(), p = f.getAttribute(h);
|
|
3082
3054
|
if (p !== null)
|
|
3083
|
-
return typeof
|
|
3055
|
+
return typeof i == "boolean" ? p === "" || p === "true" : typeof i == "number" ? Number(p) : p;
|
|
3084
3056
|
}
|
|
3085
|
-
const u = f[
|
|
3057
|
+
const u = f[o];
|
|
3086
3058
|
if (typeof u < "u" && u !== "") {
|
|
3087
3059
|
const h = u && typeof u == "object" && "value" in u && !(u instanceof Node);
|
|
3088
|
-
if (!(typeof
|
|
3089
|
-
return typeof
|
|
3060
|
+
if (!(typeof i == "string" && u && typeof u == "object" && !h && !P(u)))
|
|
3061
|
+
return typeof i == "boolean" && i === !1 && u === "" ? i : P(u) || h ? u.value : typeof i == "boolean" && typeof u == "string" ? u === "true" || u !== "" && u !== "false" : typeof i == "number" && typeof u == "string" && !Number.isNaN(Number(u)) ? Number(u) : u;
|
|
3090
3062
|
}
|
|
3091
3063
|
}
|
|
3092
3064
|
} catch {
|
|
3093
3065
|
}
|
|
3094
|
-
const c = t[
|
|
3095
|
-
return typeof
|
|
3066
|
+
const c = t[o];
|
|
3067
|
+
return typeof i == "boolean" && c === "" ? i === !1 ? i : !0 : P(c) || c && typeof c == "object" && "value" in c && !(c instanceof Node) ? c.value : c != null && c !== "" ? typeof i == "boolean" && typeof c == "string" ? c === "true" : typeof i == "number" && typeof c == "string" && !Number.isNaN(Number(c)) ? Number(c) : c : i;
|
|
3096
3068
|
},
|
|
3097
|
-
has(r,
|
|
3098
|
-
return typeof
|
|
3069
|
+
has(r, o) {
|
|
3070
|
+
return typeof o == "string" && (o in t || o in e);
|
|
3099
3071
|
},
|
|
3100
3072
|
ownKeys() {
|
|
3101
3073
|
return Array.from(
|
|
@@ -3107,21 +3079,21 @@ function on(e) {
|
|
|
3107
3079
|
}
|
|
3108
3080
|
});
|
|
3109
3081
|
}
|
|
3110
|
-
function
|
|
3111
|
-
if (!
|
|
3082
|
+
function Cn(e) {
|
|
3083
|
+
if (!R)
|
|
3112
3084
|
throw new Error("useStyle must be called during component render");
|
|
3113
|
-
if (!
|
|
3114
|
-
he(
|
|
3085
|
+
if (!Y()) {
|
|
3086
|
+
he(R);
|
|
3115
3087
|
try {
|
|
3116
3088
|
const n = e();
|
|
3117
|
-
Object.defineProperty(
|
|
3089
|
+
Object.defineProperty(R, "_computedStyle", {
|
|
3118
3090
|
value: n,
|
|
3119
3091
|
writable: !0,
|
|
3120
3092
|
enumerable: !1,
|
|
3121
3093
|
configurable: !0
|
|
3122
3094
|
});
|
|
3123
3095
|
} catch (n) {
|
|
3124
|
-
|
|
3096
|
+
ee("Error in useStyle callback:", n), Object.defineProperty(R, "_computedStyle", {
|
|
3125
3097
|
value: "",
|
|
3126
3098
|
writable: !0,
|
|
3127
3099
|
enumerable: !1,
|
|
@@ -3131,11 +3103,11 @@ function _n(e) {
|
|
|
3131
3103
|
}
|
|
3132
3104
|
}
|
|
3133
3105
|
const je = /* @__PURE__ */ Symbol.for("@cer/provides");
|
|
3134
|
-
function
|
|
3135
|
-
if (!
|
|
3106
|
+
function kn(e, n) {
|
|
3107
|
+
if (!R)
|
|
3136
3108
|
throw new Error("provide must be called during component render");
|
|
3137
|
-
if (
|
|
3138
|
-
const t =
|
|
3109
|
+
if (Y()) return;
|
|
3110
|
+
const t = R;
|
|
3139
3111
|
t[je] || Object.defineProperty(t, je, {
|
|
3140
3112
|
value: /* @__PURE__ */ new Map(),
|
|
3141
3113
|
writable: !1,
|
|
@@ -3143,28 +3115,28 @@ function An(e, n) {
|
|
|
3143
3115
|
configurable: !0
|
|
3144
3116
|
}), t[je].set(e, n);
|
|
3145
3117
|
}
|
|
3146
|
-
function
|
|
3147
|
-
if (!
|
|
3118
|
+
function _n(e, n) {
|
|
3119
|
+
if (!R)
|
|
3148
3120
|
throw new Error("inject must be called during component render");
|
|
3149
|
-
if (
|
|
3121
|
+
if (Y()) return n;
|
|
3150
3122
|
try {
|
|
3151
|
-
const t =
|
|
3123
|
+
const t = R._host;
|
|
3152
3124
|
if (t) {
|
|
3153
3125
|
let s = t.parentNode;
|
|
3154
3126
|
for (s || (s = t.getRootNode()); s; )
|
|
3155
3127
|
if (s instanceof ShadowRoot) {
|
|
3156
|
-
const r = s.host,
|
|
3157
|
-
if (
|
|
3158
|
-
const c =
|
|
3128
|
+
const r = s.host, o = r.context;
|
|
3129
|
+
if (o) {
|
|
3130
|
+
const c = o[je];
|
|
3159
3131
|
if (c?.has(e))
|
|
3160
3132
|
return c.get(e);
|
|
3161
3133
|
}
|
|
3162
3134
|
if (s = r.parentNode ?? r.getRootNode(), s === document || s === r) break;
|
|
3163
3135
|
} else {
|
|
3164
3136
|
if (s instanceof Element) {
|
|
3165
|
-
const
|
|
3166
|
-
if (
|
|
3167
|
-
const c =
|
|
3137
|
+
const i = s.context;
|
|
3138
|
+
if (i) {
|
|
3139
|
+
const c = i[je];
|
|
3168
3140
|
if (c?.has(e))
|
|
3169
3141
|
return c.get(e);
|
|
3170
3142
|
}
|
|
@@ -3177,14 +3149,14 @@ function wn(e, n) {
|
|
|
3177
3149
|
}
|
|
3178
3150
|
return n;
|
|
3179
3151
|
}
|
|
3180
|
-
function
|
|
3152
|
+
function An(e) {
|
|
3181
3153
|
return (n) => {
|
|
3182
|
-
const t = n ??
|
|
3154
|
+
const t = n ?? R;
|
|
3183
3155
|
if (!t)
|
|
3184
3156
|
throw new Error(
|
|
3185
3157
|
"createComposable: no component context available. Pass a context explicitly or call inside a render function."
|
|
3186
3158
|
);
|
|
3187
|
-
const s =
|
|
3159
|
+
const s = R;
|
|
3188
3160
|
Ue(t);
|
|
3189
3161
|
try {
|
|
3190
3162
|
return e();
|
|
@@ -3193,14 +3165,14 @@ function Tn(e) {
|
|
|
3193
3165
|
}
|
|
3194
3166
|
};
|
|
3195
3167
|
}
|
|
3196
|
-
function
|
|
3197
|
-
if (!
|
|
3168
|
+
function wn(e) {
|
|
3169
|
+
if (!R)
|
|
3198
3170
|
throw new Error("useExpose must be called during component render");
|
|
3199
|
-
if (
|
|
3200
|
-
he(
|
|
3201
|
-
const n =
|
|
3171
|
+
if (Y()) return;
|
|
3172
|
+
he(R);
|
|
3173
|
+
const n = R._hookCallbacks;
|
|
3202
3174
|
n.expose = { ...n.expose ?? {}, ...e };
|
|
3203
|
-
const t =
|
|
3175
|
+
const t = R._host;
|
|
3204
3176
|
if (t)
|
|
3205
3177
|
for (const [s, r] of Object.entries(e))
|
|
3206
3178
|
try {
|
|
@@ -3208,12 +3180,12 @@ function Ln(e) {
|
|
|
3208
3180
|
} catch {
|
|
3209
3181
|
}
|
|
3210
3182
|
}
|
|
3211
|
-
function
|
|
3212
|
-
if (!
|
|
3183
|
+
function Tn() {
|
|
3184
|
+
if (!R)
|
|
3213
3185
|
throw new Error("useSlots must be called during component render");
|
|
3214
|
-
if (
|
|
3186
|
+
if (Y())
|
|
3215
3187
|
return { has: () => !1, getNodes: () => [], names: () => [] };
|
|
3216
|
-
const e =
|
|
3188
|
+
const e = R._host;
|
|
3217
3189
|
return {
|
|
3218
3190
|
/**
|
|
3219
3191
|
* Returns true if the named slot (or the default slot when name is
|
|
@@ -3247,86 +3219,86 @@ function Nn() {
|
|
|
3247
3219
|
}
|
|
3248
3220
|
};
|
|
3249
3221
|
}
|
|
3250
|
-
function
|
|
3251
|
-
if (!
|
|
3222
|
+
function Ln(...e) {
|
|
3223
|
+
if (!R)
|
|
3252
3224
|
throw new Error("defineModel must be called during component render");
|
|
3253
|
-
const n = e.length === 2 ? e[0] : "modelValue", t = e.length === 2 ? e[1] : e.length === 1 ? e[0] : void 0, s =
|
|
3225
|
+
const n = e.length === 2 ? e[0] : "modelValue", t = e.length === 2 ? e[1] : e.length === 1 ? e[0] : void 0, s = rn({
|
|
3254
3226
|
[n]: t
|
|
3255
|
-
}),
|
|
3256
|
-
const c =
|
|
3227
|
+
}), o = Y() ? null : (() => {
|
|
3228
|
+
const c = R.emit;
|
|
3257
3229
|
return typeof c != "function" ? null : c;
|
|
3258
|
-
})(),
|
|
3230
|
+
})(), i = {
|
|
3259
3231
|
get value() {
|
|
3260
3232
|
return s[n];
|
|
3261
3233
|
},
|
|
3262
3234
|
set value(c) {
|
|
3263
|
-
|
|
3235
|
+
o && o(`update:${n}`, c);
|
|
3264
3236
|
}
|
|
3265
3237
|
};
|
|
3266
3238
|
try {
|
|
3267
|
-
Object.defineProperty(
|
|
3239
|
+
Object.defineProperty(i, /* @__PURE__ */ Symbol.for("@cer/ReactiveState"), {
|
|
3268
3240
|
value: !0,
|
|
3269
3241
|
enumerable: !1,
|
|
3270
3242
|
configurable: !1
|
|
3271
3243
|
});
|
|
3272
3244
|
} catch {
|
|
3273
3245
|
}
|
|
3274
|
-
return
|
|
3246
|
+
return i;
|
|
3275
3247
|
}
|
|
3276
|
-
function
|
|
3277
|
-
|
|
3278
|
-
let t =
|
|
3248
|
+
function Nn(e, n) {
|
|
3249
|
+
Lt();
|
|
3250
|
+
let t = J(e);
|
|
3279
3251
|
t.includes("-") || (t = `cer-${t}`);
|
|
3280
3252
|
const s = {}, r = {
|
|
3281
3253
|
// Props are accessed via useProps() hook
|
|
3282
3254
|
props: {},
|
|
3283
3255
|
// Add lifecycle hooks from the stored functions
|
|
3284
|
-
onConnected: (
|
|
3256
|
+
onConnected: (o) => {
|
|
3285
3257
|
if (s.onConnected)
|
|
3286
3258
|
try {
|
|
3287
|
-
s.onConnected(
|
|
3259
|
+
s.onConnected(o);
|
|
3288
3260
|
} catch {
|
|
3289
3261
|
}
|
|
3290
3262
|
},
|
|
3291
|
-
onDisconnected: (
|
|
3263
|
+
onDisconnected: (o) => {
|
|
3292
3264
|
if (s.onDisconnected)
|
|
3293
3265
|
try {
|
|
3294
|
-
s.onDisconnected(
|
|
3266
|
+
s.onDisconnected(o);
|
|
3295
3267
|
} catch {
|
|
3296
3268
|
}
|
|
3297
3269
|
},
|
|
3298
|
-
onAttributeChanged: (
|
|
3270
|
+
onAttributeChanged: (o, i, c, f) => {
|
|
3299
3271
|
if (s.onAttributeChanged)
|
|
3300
3272
|
try {
|
|
3301
|
-
s.onAttributeChanged(
|
|
3273
|
+
s.onAttributeChanged(o, i, c, f);
|
|
3302
3274
|
} catch {
|
|
3303
3275
|
}
|
|
3304
3276
|
},
|
|
3305
|
-
onError: (
|
|
3306
|
-
if (s.onError &&
|
|
3277
|
+
onError: (o, i) => {
|
|
3278
|
+
if (s.onError && o)
|
|
3307
3279
|
try {
|
|
3308
|
-
s.onError(
|
|
3280
|
+
s.onError(o, i);
|
|
3309
3281
|
} catch {
|
|
3310
3282
|
}
|
|
3311
3283
|
},
|
|
3312
|
-
render: (
|
|
3313
|
-
const
|
|
3314
|
-
|
|
3315
|
-
|
|
3284
|
+
render: (o) => {
|
|
3285
|
+
const i = o, c = i._componentId || `${t}-${crypto.randomUUID()}`;
|
|
3286
|
+
nt.setCurrentComponent(c, () => {
|
|
3287
|
+
o.requestRender && o.requestRender();
|
|
3316
3288
|
});
|
|
3317
3289
|
try {
|
|
3318
|
-
Object.defineProperty(
|
|
3290
|
+
Object.defineProperty(o, "_hookCallbacks", {
|
|
3319
3291
|
value: {},
|
|
3320
3292
|
writable: !0,
|
|
3321
3293
|
enumerable: !1,
|
|
3322
3294
|
configurable: !0
|
|
3323
|
-
}), Ue(
|
|
3295
|
+
}), Ue(o);
|
|
3324
3296
|
let f;
|
|
3325
3297
|
try {
|
|
3326
3298
|
f = n();
|
|
3327
3299
|
} catch (u) {
|
|
3328
3300
|
try {
|
|
3329
|
-
const p =
|
|
3301
|
+
const p = i._hookCallbacks?.onError;
|
|
3330
3302
|
if (Array.isArray(p))
|
|
3331
3303
|
for (const d of p)
|
|
3332
3304
|
try {
|
|
@@ -3341,7 +3313,7 @@ function jn(e, n) {
|
|
|
3341
3313
|
} catch {
|
|
3342
3314
|
}
|
|
3343
3315
|
try {
|
|
3344
|
-
const h =
|
|
3316
|
+
const h = i._host;
|
|
3345
3317
|
if (h?.parentElement) {
|
|
3346
3318
|
let p = h.parentElement;
|
|
3347
3319
|
for (; p; ) {
|
|
@@ -3363,8 +3335,8 @@ function jn(e, n) {
|
|
|
3363
3335
|
}
|
|
3364
3336
|
throw u;
|
|
3365
3337
|
}
|
|
3366
|
-
if (
|
|
3367
|
-
const u =
|
|
3338
|
+
if (i._hookCallbacks) {
|
|
3339
|
+
const u = i._hookCallbacks;
|
|
3368
3340
|
if (u.onConnected) {
|
|
3369
3341
|
const h = u.onConnected;
|
|
3370
3342
|
s.onConnected = (p) => {
|
|
@@ -3387,10 +3359,10 @@ function jn(e, n) {
|
|
|
3387
3359
|
}
|
|
3388
3360
|
if (u.onAttributeChanged) {
|
|
3389
3361
|
const h = u.onAttributeChanged;
|
|
3390
|
-
s.onAttributeChanged = (p, d, k,
|
|
3391
|
-
for (const
|
|
3362
|
+
s.onAttributeChanged = (p, d, k, j) => {
|
|
3363
|
+
for (const A of h)
|
|
3392
3364
|
try {
|
|
3393
|
-
|
|
3365
|
+
A(p, d, k, j);
|
|
3394
3366
|
} catch {
|
|
3395
3367
|
}
|
|
3396
3368
|
};
|
|
@@ -3417,49 +3389,49 @@ function jn(e, n) {
|
|
|
3417
3389
|
}
|
|
3418
3390
|
return f;
|
|
3419
3391
|
} finally {
|
|
3420
|
-
Be(),
|
|
3392
|
+
Be(), nt.clearCurrentComponent();
|
|
3421
3393
|
}
|
|
3422
3394
|
}
|
|
3423
3395
|
};
|
|
3424
3396
|
if (ge.set(t, r), typeof window < "u") {
|
|
3425
3397
|
try {
|
|
3426
|
-
const
|
|
3398
|
+
const o = {
|
|
3427
3399
|
_hookCallbacks: {},
|
|
3428
3400
|
requestRender: () => {
|
|
3429
3401
|
},
|
|
3430
3402
|
emit: () => !0
|
|
3431
3403
|
};
|
|
3432
|
-
Ue(
|
|
3404
|
+
Ue(o), kt();
|
|
3433
3405
|
try {
|
|
3434
3406
|
n();
|
|
3435
|
-
} catch (
|
|
3407
|
+
} catch (i) {
|
|
3436
3408
|
try {
|
|
3437
|
-
const f =
|
|
3409
|
+
const f = o?._hookCallbacks?.onError;
|
|
3438
3410
|
if (Array.isArray(f))
|
|
3439
3411
|
for (const u of f)
|
|
3440
3412
|
try {
|
|
3441
|
-
u(
|
|
3413
|
+
u(i);
|
|
3442
3414
|
} catch {
|
|
3443
3415
|
}
|
|
3444
3416
|
else if (typeof f == "function")
|
|
3445
3417
|
try {
|
|
3446
|
-
f(
|
|
3418
|
+
f(i);
|
|
3447
3419
|
} catch {
|
|
3448
3420
|
}
|
|
3449
3421
|
B(
|
|
3450
3422
|
`Error during component discovery render <${t}>:`,
|
|
3451
|
-
|
|
3452
|
-
),
|
|
3423
|
+
i
|
|
3424
|
+
), ee(
|
|
3453
3425
|
"Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when()."
|
|
3454
3426
|
);
|
|
3455
3427
|
} catch {
|
|
3456
3428
|
}
|
|
3457
|
-
throw
|
|
3429
|
+
throw tt(), Be(), i;
|
|
3458
3430
|
}
|
|
3459
|
-
if (
|
|
3460
|
-
const
|
|
3431
|
+
if (tt(), Be(), o._hookCallbacks?.props) {
|
|
3432
|
+
const i = o._hookCallbacks.props;
|
|
3461
3433
|
r.props = Object.fromEntries(
|
|
3462
|
-
Object.entries(
|
|
3434
|
+
Object.entries(i).map(([c, f]) => [
|
|
3463
3435
|
c,
|
|
3464
3436
|
{ type: typeof f == "boolean" ? Boolean : typeof f == "number" ? Number : typeof f == "string" ? String : Function, default: f }
|
|
3465
3437
|
])
|
|
@@ -3469,7 +3441,7 @@ function jn(e, n) {
|
|
|
3469
3441
|
}
|
|
3470
3442
|
customElements.get(t) || customElements.define(
|
|
3471
3443
|
t,
|
|
3472
|
-
|
|
3444
|
+
nn(t, r)
|
|
3473
3445
|
);
|
|
3474
3446
|
}
|
|
3475
3447
|
}
|
|
@@ -3483,10 +3455,10 @@ function Me(e) {
|
|
|
3483
3455
|
function ue(e) {
|
|
3484
3456
|
return typeof e == "object" && e !== null && "tag" in e && !Me(e);
|
|
3485
3457
|
}
|
|
3486
|
-
function
|
|
3458
|
+
function sn(e, n) {
|
|
3487
3459
|
return e.key != null ? e : { ...e, key: n };
|
|
3488
3460
|
}
|
|
3489
|
-
class
|
|
3461
|
+
class on {
|
|
3490
3462
|
map = /* @__PURE__ */ new Map();
|
|
3491
3463
|
maxSize;
|
|
3492
3464
|
accessOrder = /* @__PURE__ */ new Map();
|
|
@@ -3519,7 +3491,7 @@ class an {
|
|
|
3519
3491
|
return this.map.size;
|
|
3520
3492
|
}
|
|
3521
3493
|
}
|
|
3522
|
-
const
|
|
3494
|
+
const cn = () => {
|
|
3523
3495
|
if (typeof navigator < "u" && "deviceMemory" in navigator) {
|
|
3524
3496
|
const n = navigator.deviceMemory;
|
|
3525
3497
|
if (n)
|
|
@@ -3532,24 +3504,24 @@ const ln = () => {
|
|
|
3532
3504
|
return !1;
|
|
3533
3505
|
}
|
|
3534
3506
|
})() ? 100 : 500;
|
|
3535
|
-
},
|
|
3536
|
-
|
|
3507
|
+
}, qe = new on(
|
|
3508
|
+
cn()
|
|
3537
3509
|
);
|
|
3538
|
-
function
|
|
3510
|
+
function an(e, n) {
|
|
3539
3511
|
if (e == null) {
|
|
3540
|
-
|
|
3512
|
+
ee(
|
|
3541
3513
|
`⚠️ Event handler for '@${n}' is ${e}. This will prevent the event from working. Use a function reference instead: @${n}="\${functionName}"`
|
|
3542
3514
|
);
|
|
3543
3515
|
return;
|
|
3544
3516
|
}
|
|
3545
|
-
typeof e != "function" &&
|
|
3517
|
+
typeof e != "function" && ee(
|
|
3546
3518
|
`🚨 Potential infinite loop detected! Event handler for '@${n}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${n}="\${functionName()}" to @${n}="\${functionName}" to pass the function reference instead of calling it immediately.`
|
|
3547
|
-
), e === void 0 && typeof e != "function" &&
|
|
3519
|
+
), e === void 0 && typeof e != "function" && ee(
|
|
3548
3520
|
`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${n}="\${fn}" not @${n}="\${fn()}"`
|
|
3549
3521
|
);
|
|
3550
3522
|
}
|
|
3551
|
-
function
|
|
3552
|
-
const s = {}, r = {},
|
|
3523
|
+
function ln(e, n = [], t = {}) {
|
|
3524
|
+
const s = {}, r = {}, o = {}, i = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
|
|
3553
3525
|
let f;
|
|
3554
3526
|
for (; f = c.exec(e); ) {
|
|
3555
3527
|
const u = f[1], h = f[2];
|
|
@@ -3560,12 +3532,12 @@ function un(e, n = [], t = {}) {
|
|
|
3560
3532
|
break;
|
|
3561
3533
|
}
|
|
3562
3534
|
p.length >= 2 && (p[0] === '"' && p[p.length - 1] === '"' || p[0] === "'" && p[p.length - 1] === "'") && (p = p.slice(1, -1));
|
|
3563
|
-
const d = !/=/.test(f[0]), k = p.match(/^{{(\d+)}}$/),
|
|
3564
|
-
let
|
|
3535
|
+
const d = !/=/.test(f[0]), k = p.match(/^{{(\d+)}}$/), j = !k && /{{(\d+)}}/.test(p);
|
|
3536
|
+
let A = d ? !0 : k ? n[Number(k[1])] ?? null : j ? p.replace(
|
|
3565
3537
|
/{{(\d+)}}/g,
|
|
3566
3538
|
(b, E) => String(n[Number(E)] ?? "")
|
|
3567
3539
|
) : p;
|
|
3568
|
-
!k && !
|
|
3540
|
+
!k && !j && (A === "true" ? A = !0 : A === "false" ? A = !1 : A === "null" ? A = null : isNaN(Number(A)) || (A = Number(A)));
|
|
3569
3541
|
const a = [
|
|
3570
3542
|
"model",
|
|
3571
3543
|
"bind",
|
|
@@ -3579,30 +3551,30 @@ function un(e, n = [], t = {}) {
|
|
|
3579
3551
|
const [b, E] = h.split(":"), [m, ...v] = b.split(".");
|
|
3580
3552
|
if (a.includes(m)) {
|
|
3581
3553
|
const S = [...v], C = m === "model" && E ? `model:${E}` : m;
|
|
3582
|
-
|
|
3583
|
-
value:
|
|
3554
|
+
o[C] = {
|
|
3555
|
+
value: A,
|
|
3584
3556
|
modifiers: S,
|
|
3585
3557
|
arg: E
|
|
3586
3558
|
};
|
|
3587
3559
|
} else if (h === "disabled") {
|
|
3588
|
-
let S =
|
|
3560
|
+
let S = A;
|
|
3589
3561
|
S && P(S) && (S = S.value);
|
|
3590
3562
|
const C = typeof S;
|
|
3591
3563
|
if (S === "" || C === "boolean" || C === "string" && (S === "true" || S === "false") || S == null || C === "number")
|
|
3592
3564
|
s[h] = S;
|
|
3593
3565
|
else {
|
|
3594
|
-
let
|
|
3595
|
-
|
|
3566
|
+
let _ = A;
|
|
3567
|
+
_ && P(_) && (_ = _.value), r[h] = _;
|
|
3596
3568
|
}
|
|
3597
|
-
|
|
3569
|
+
i.push(h);
|
|
3598
3570
|
} else {
|
|
3599
|
-
let S =
|
|
3600
|
-
S && P(S) && (S = S.value), r[h] = S,
|
|
3571
|
+
let S = A;
|
|
3572
|
+
S && P(S) && (S = S.value), r[h] = S, i.push(h);
|
|
3601
3573
|
}
|
|
3602
3574
|
} else if (u === "@") {
|
|
3603
3575
|
const [b, ...E] = h.split("."), m = E;
|
|
3604
|
-
|
|
3605
|
-
const v = typeof
|
|
3576
|
+
an(A, b);
|
|
3577
|
+
const v = typeof A == "function" ? A : typeof t[A] == "function" ? t[A] : void 0;
|
|
3606
3578
|
if (v) {
|
|
3607
3579
|
const S = (T) => {
|
|
3608
3580
|
if (m.includes("prevent") && T.preventDefault(), m.includes("stop") && T.stopPropagation(), !(m.includes("self") && T.target !== T.currentTarget))
|
|
@@ -3613,34 +3585,34 @@ function un(e, n = [], t = {}) {
|
|
|
3613
3585
|
}, C = "on" + b.charAt(0).toUpperCase() + b.slice(1);
|
|
3614
3586
|
s[C] = S;
|
|
3615
3587
|
}
|
|
3616
|
-
} else h === "ref" ? s.ref =
|
|
3588
|
+
} else h === "ref" ? s.ref = A : r[h] = A;
|
|
3617
3589
|
}
|
|
3618
|
-
return { props: s, attrs: r, directives:
|
|
3590
|
+
return { props: s, attrs: r, directives: o, bound: i };
|
|
3619
3591
|
}
|
|
3620
|
-
function
|
|
3592
|
+
function Ye(e) {
|
|
3621
3593
|
if (!ue(e) || Me(e))
|
|
3622
3594
|
return e;
|
|
3623
3595
|
const n = e.props?.directives;
|
|
3624
3596
|
if (n && n.when) {
|
|
3625
3597
|
const t = n.when.value, s = P(t) ? t.value : t, r = { ...n };
|
|
3626
3598
|
delete r.when;
|
|
3627
|
-
const
|
|
3628
|
-
Object.keys(r).length > 0 ?
|
|
3629
|
-
const
|
|
3599
|
+
const o = { ...e.props };
|
|
3600
|
+
Object.keys(r).length > 0 ? o.directives = r : delete o.directives;
|
|
3601
|
+
const i = {
|
|
3630
3602
|
...e,
|
|
3631
|
-
props:
|
|
3603
|
+
props: o
|
|
3632
3604
|
};
|
|
3633
|
-
return Array.isArray(
|
|
3634
|
-
(f) => typeof f == "object" && f !== null ?
|
|
3605
|
+
return Array.isArray(i.children) && (i.children = i.children.map(
|
|
3606
|
+
(f) => typeof f == "object" && f !== null ? Ye(f) : f
|
|
3635
3607
|
)), {
|
|
3636
3608
|
tag: "#anchor",
|
|
3637
3609
|
key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
|
|
3638
|
-
children: s ? [
|
|
3610
|
+
children: s ? [i] : []
|
|
3639
3611
|
};
|
|
3640
3612
|
}
|
|
3641
3613
|
if (Array.isArray(e.children)) {
|
|
3642
3614
|
const t = e.children.map(
|
|
3643
|
-
(s) => typeof s == "object" && s !== null ?
|
|
3615
|
+
(s) => typeof s == "object" && s !== null ? Ye(s) : s
|
|
3644
3616
|
);
|
|
3645
3617
|
return {
|
|
3646
3618
|
...e,
|
|
@@ -3649,24 +3621,24 @@ function Xe(e) {
|
|
|
3649
3621
|
}
|
|
3650
3622
|
return e;
|
|
3651
3623
|
}
|
|
3652
|
-
function
|
|
3653
|
-
const s = Oe.length > 0 ? Oe[Oe.length - 1] : void 0, r = t ?? s,
|
|
3654
|
-
if (
|
|
3655
|
-
const l =
|
|
3624
|
+
function fn(e, n, t) {
|
|
3625
|
+
const s = Oe.length > 0 ? Oe[Oe.length - 1] : void 0, r = t ?? s, o = !t && n.length === 0, i = o ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3626
|
+
if (o && i) {
|
|
3627
|
+
const l = qe.get(i);
|
|
3656
3628
|
if (l) return l;
|
|
3657
3629
|
}
|
|
3658
3630
|
function c(l, y) {
|
|
3659
3631
|
return ce("#text", {}, l, y);
|
|
3660
3632
|
}
|
|
3661
3633
|
function f(l, y, w = !1) {
|
|
3662
|
-
let L = typeof l == "string" ?
|
|
3634
|
+
let L = typeof l == "string" ? _t(l) : l;
|
|
3663
3635
|
return !w && typeof L == "string" && /[\r\n]/.test(L) && (L = L.replace(/\s+/g, " ")), ce("#text", {}, L, y);
|
|
3664
3636
|
}
|
|
3665
3637
|
let u = "";
|
|
3666
3638
|
for (let l = 0; l < e.length; l++)
|
|
3667
3639
|
u += e[l], l < n.length && (u += `{{${l}}}`);
|
|
3668
3640
|
const h = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, p = [];
|
|
3669
|
-
let d, k = [],
|
|
3641
|
+
let d, k = [], j = null, A = {}, a, b = 0;
|
|
3670
3642
|
const E = [], m = /* @__PURE__ */ new Set([
|
|
3671
3643
|
"pre",
|
|
3672
3644
|
"code",
|
|
@@ -3675,7 +3647,7 @@ function dn(e, n, t) {
|
|
|
3675
3647
|
"style"
|
|
3676
3648
|
]);
|
|
3677
3649
|
function v() {
|
|
3678
|
-
if (
|
|
3650
|
+
if (j && m.has(j.toLowerCase()))
|
|
3679
3651
|
return !0;
|
|
3680
3652
|
for (const l of p)
|
|
3681
3653
|
if (m.has(l.tag.toLowerCase()))
|
|
@@ -3684,56 +3656,56 @@ function dn(e, n, t) {
|
|
|
3684
3656
|
}
|
|
3685
3657
|
function S(l) {
|
|
3686
3658
|
if (!l || typeof l != "object" || Me(l)) return;
|
|
3687
|
-
const y = l, w =
|
|
3659
|
+
const y = l, w = A;
|
|
3688
3660
|
if (y.props || y.attrs) {
|
|
3689
3661
|
const L = y;
|
|
3690
|
-
L.props && (w.props || (w.props = {}), Object.assign(w.props, L.props)), L.attrs && (w.attrs || (w.attrs = {}), Object.keys(L.attrs).forEach((
|
|
3691
|
-
if (
|
|
3662
|
+
L.props && (w.props || (w.props = {}), Object.assign(w.props, L.props)), L.attrs && (w.attrs || (w.attrs = {}), Object.keys(L.attrs).forEach((N) => {
|
|
3663
|
+
if (N === "style" && w.attrs.style) {
|
|
3692
3664
|
const M = String(w.attrs.style).replace(/;?\s*$/, ""), D = String(L.attrs.style).replace(/^;?\s*/, "");
|
|
3693
3665
|
w.attrs.style = M + "; " + D;
|
|
3694
|
-
} else if (
|
|
3695
|
-
const M = String(w.attrs.class).trim().split(/\s+/).filter(Boolean), D = String(L.attrs.class).trim().split(/\s+/).filter(Boolean),
|
|
3666
|
+
} else if (N === "class" && w.attrs.class) {
|
|
3667
|
+
const M = String(w.attrs.class).trim().split(/\s+/).filter(Boolean), D = String(L.attrs.class).trim().split(/\s+/).filter(Boolean), O = [
|
|
3696
3668
|
.../* @__PURE__ */ new Set([...M, ...D])
|
|
3697
3669
|
];
|
|
3698
|
-
w.attrs.class =
|
|
3670
|
+
w.attrs.class = O.join(" ");
|
|
3699
3671
|
} else
|
|
3700
|
-
w.attrs[
|
|
3672
|
+
w.attrs[N] = L.attrs[N];
|
|
3701
3673
|
}));
|
|
3702
3674
|
} else
|
|
3703
3675
|
w.props || (w.props = {}), Object.assign(w.props, y);
|
|
3704
3676
|
}
|
|
3705
3677
|
function C(l, y) {
|
|
3706
|
-
const w =
|
|
3678
|
+
const w = j ? k : E;
|
|
3707
3679
|
if (Me(l)) {
|
|
3708
|
-
const L = l.key ?? y,
|
|
3680
|
+
const L = l.key ?? y, N = l.children;
|
|
3709
3681
|
w.push({
|
|
3710
3682
|
...l,
|
|
3711
3683
|
key: L,
|
|
3712
|
-
children:
|
|
3684
|
+
children: N
|
|
3713
3685
|
});
|
|
3714
3686
|
return;
|
|
3715
3687
|
}
|
|
3716
3688
|
if (ue(l)) {
|
|
3717
|
-
w.push(
|
|
3689
|
+
w.push(sn(l, void 0));
|
|
3718
3690
|
return;
|
|
3719
3691
|
}
|
|
3720
3692
|
if (Array.isArray(l)) {
|
|
3721
3693
|
if (l.length === 0) return;
|
|
3722
3694
|
for (let L = 0; L < l.length; L++) {
|
|
3723
|
-
const
|
|
3724
|
-
Me(
|
|
3695
|
+
const N = l[L];
|
|
3696
|
+
Me(N) || ue(N) || Array.isArray(N) ? C(N, `${y}-${L}`) : N !== null && typeof N == "object" ? rt(N) ? w.push(
|
|
3725
3697
|
ce(
|
|
3726
3698
|
"#raw",
|
|
3727
3699
|
{},
|
|
3728
|
-
|
|
3700
|
+
N.__rawHTML,
|
|
3729
3701
|
`${y}-${L}`
|
|
3730
3702
|
)
|
|
3731
|
-
) : S(
|
|
3703
|
+
) : S(N) : w.push(c(String(N), `${y}-${L}`));
|
|
3732
3704
|
}
|
|
3733
3705
|
return;
|
|
3734
3706
|
}
|
|
3735
3707
|
if (l !== null && typeof l == "object") {
|
|
3736
|
-
if (
|
|
3708
|
+
if (rt(l)) {
|
|
3737
3709
|
const L = l.__rawHTML ?? "";
|
|
3738
3710
|
w.push(ce("#raw", {}, L, y));
|
|
3739
3711
|
return;
|
|
@@ -3764,18 +3736,18 @@ function dn(e, n, t) {
|
|
|
3764
3736
|
if (d[1]) {
|
|
3765
3737
|
const l = d[1], y = d[0][1] === "/", w = d[0][d[0].length - 2] === "/" || T.has(l), {
|
|
3766
3738
|
props: L,
|
|
3767
|
-
attrs:
|
|
3739
|
+
attrs: N,
|
|
3768
3740
|
directives: M,
|
|
3769
3741
|
bound: D
|
|
3770
|
-
} =
|
|
3742
|
+
} = ln(
|
|
3771
3743
|
d[2] || "",
|
|
3772
3744
|
n,
|
|
3773
3745
|
r ?? {}
|
|
3774
|
-
),
|
|
3775
|
-
for (const z in L)
|
|
3776
|
-
for (const z in
|
|
3777
|
-
|
|
3778
|
-
|
|
3746
|
+
), O = { props: {}, attrs: {} };
|
|
3747
|
+
for (const z in L) O.props[z] = L[z];
|
|
3748
|
+
for (const z in N) O.attrs[z] = N[z];
|
|
3749
|
+
O.attrs && Object.prototype.hasOwnProperty.call(O.attrs, "key") && !(O.props && Object.prototype.hasOwnProperty.call(O.props, "key")) && x(() => {
|
|
3750
|
+
O.props.key = O.attrs.key;
|
|
3779
3751
|
});
|
|
3780
3752
|
try {
|
|
3781
3753
|
const z = {
|
|
@@ -3802,51 +3774,51 @@ function dn(e, n, t) {
|
|
|
3802
3774
|
audio: ["muted", "autoplay", "controls", "loop"],
|
|
3803
3775
|
img: ["src", "alt", "width", "height"],
|
|
3804
3776
|
button: ["type", "name", "value", "autofocus", "form"]
|
|
3805
|
-
}, I = l.toLowerCase(),
|
|
3806
|
-
if (
|
|
3807
|
-
for (const
|
|
3808
|
-
if (D && D.includes(
|
|
3809
|
-
let $ =
|
|
3777
|
+
}, I = l.toLowerCase(), oe = z[I] ?? [];
|
|
3778
|
+
if (O.attrs) {
|
|
3779
|
+
for (const H of oe)
|
|
3780
|
+
if (D && D.includes(H) && H in O.attrs && !(O.props && H in O.props)) {
|
|
3781
|
+
let $ = O.attrs[H];
|
|
3810
3782
|
if ($ && P($))
|
|
3811
|
-
$ = $.value,
|
|
3783
|
+
$ = $.value, O.props[H] = $, delete O.attrs[H];
|
|
3812
3784
|
else if ($ && typeof $ == "object" && "value" in $ && !($ instanceof Node))
|
|
3813
3785
|
try {
|
|
3814
3786
|
const W = $.value;
|
|
3815
|
-
|
|
3787
|
+
O.props[H] = (I === "select" || I === "option") && H === "value" ? String(W) : W, delete O.attrs[H];
|
|
3816
3788
|
} catch {
|
|
3817
3789
|
}
|
|
3818
3790
|
else {
|
|
3819
3791
|
const W = typeof $;
|
|
3820
|
-
if (
|
|
3821
|
-
($ === "" || W === "boolean" || W === "string" && ($ === "true" || $ === "false") || $ == null || W === "number") && (
|
|
3792
|
+
if (H === "disabled")
|
|
3793
|
+
($ === "" || W === "boolean" || W === "string" && ($ === "true" || $ === "false") || $ == null || W === "number") && (O.props[H] = $, delete O.attrs[H]);
|
|
3822
3794
|
else if ($ === "" || W === "string" || W === "number" || W === "boolean" || $ == null) {
|
|
3823
|
-
const te = (I === "select" || I === "option") &&
|
|
3824
|
-
|
|
3795
|
+
const te = (I === "select" || I === "option") && H === "value" ? String($) : $;
|
|
3796
|
+
O.props[H] = te, delete O.attrs[H];
|
|
3825
3797
|
}
|
|
3826
3798
|
}
|
|
3827
3799
|
}
|
|
3828
3800
|
}
|
|
3829
3801
|
if (l.includes("-") || !!r?.__customElements?.has?.(l)) {
|
|
3830
|
-
if (
|
|
3831
|
-
const
|
|
3802
|
+
if (O.isCustomElement = !0, D && O.attrs) {
|
|
3803
|
+
const H = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
3832
3804
|
for (const $ of D)
|
|
3833
|
-
if ($ in
|
|
3834
|
-
const W = $.includes("-") ?
|
|
3835
|
-
if (
|
|
3805
|
+
if ($ in O.attrs && !(O.props && $ in O.props)) {
|
|
3806
|
+
const W = $.includes("-") ? Xe($) : $, te = O.attrs[$];
|
|
3807
|
+
if (O.props[W] = te, H.has($) || dt($))
|
|
3836
3808
|
try {
|
|
3837
|
-
const xe =
|
|
3838
|
-
xe === null ? delete
|
|
3809
|
+
const xe = V(O.attrs[$]);
|
|
3810
|
+
xe === null ? delete O.attrs[$] : O.attrs[$] = xe;
|
|
3839
3811
|
} catch {
|
|
3840
|
-
delete
|
|
3812
|
+
delete O.attrs[$];
|
|
3841
3813
|
}
|
|
3842
3814
|
else
|
|
3843
|
-
delete
|
|
3815
|
+
delete O.attrs[$];
|
|
3844
3816
|
}
|
|
3845
3817
|
}
|
|
3846
3818
|
try {
|
|
3847
|
-
if (
|
|
3848
|
-
const
|
|
3849
|
-
typeof
|
|
3819
|
+
if (O.attrs && !(O.props && "modelValue" in O.props)) {
|
|
3820
|
+
const H = O.attrs["model-value"] ?? O.attrs.modelValue;
|
|
3821
|
+
typeof H < "u" && (O.props.modelValue = H);
|
|
3850
3822
|
}
|
|
3851
3823
|
} catch {
|
|
3852
3824
|
}
|
|
@@ -3857,33 +3829,40 @@ function dn(e, n, t) {
|
|
|
3857
3829
|
(z) => z === "model" || z.startsWith("model:")
|
|
3858
3830
|
))
|
|
3859
3831
|
try {
|
|
3860
|
-
const I = globalThis[/* @__PURE__ */ Symbol.for("cer.registry")],
|
|
3861
|
-
if (!!(l.includes("-") ||
|
|
3832
|
+
const I = globalThis[/* @__PURE__ */ Symbol.for("cer.registry")], oe = !!(I && typeof I.has == "function" && I.has(l)), X = r, H = !!(X && (X.__customElements instanceof Set && X.__customElements.has(l) || Array.isArray(X.__isCustomElements) && X.__isCustomElements.includes(l)));
|
|
3833
|
+
if (!!(l.includes("-") || H || oe))
|
|
3862
3834
|
for (const te of Object.keys(M)) {
|
|
3863
3835
|
if (te !== "model" && !te.startsWith("model:")) continue;
|
|
3864
|
-
const $e = M[te], xe = $e.arg ?? (te.includes(":") ? te.split(":", 2)[1] : void 0),
|
|
3836
|
+
const $e = M[te], xe = $e.arg ?? (te.includes(":") ? te.split(":", 2)[1] : void 0), F = $e.value, ze = xe ?? "modelValue", Qe = K, bt = We, Se = r?._state || r;
|
|
3865
3837
|
let se;
|
|
3866
|
-
typeof
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3838
|
+
if (typeof F == "string" && Se)
|
|
3839
|
+
se = Qe(
|
|
3840
|
+
Se,
|
|
3841
|
+
F
|
|
3842
|
+
);
|
|
3843
|
+
else if (se = F, P(F))
|
|
3844
|
+
try {
|
|
3845
|
+
F.value;
|
|
3846
|
+
} catch {
|
|
3847
|
+
}
|
|
3848
|
+
O.props[ze] = se;
|
|
3870
3849
|
try {
|
|
3871
|
-
const ae =
|
|
3872
|
-
|
|
3850
|
+
const ae = J(ze);
|
|
3851
|
+
O.attrs || (O.attrs = {}), se != null && (typeof se == "string" || typeof se == "number" || typeof se == "boolean") && (O.attrs[ae] = se);
|
|
3873
3852
|
} catch {
|
|
3874
3853
|
}
|
|
3875
|
-
|
|
3876
|
-
const
|
|
3854
|
+
O.isCustomElement = !0;
|
|
3855
|
+
const et = `update:${J(ze)}`.replace(
|
|
3877
3856
|
/-([a-z])/g,
|
|
3878
3857
|
(ae, re) => re.toUpperCase()
|
|
3879
|
-
),
|
|
3880
|
-
|
|
3858
|
+
), vt = "on" + et.charAt(0).toUpperCase() + et.slice(1);
|
|
3859
|
+
O.props[vt] = function(ae) {
|
|
3881
3860
|
const re = ae.detail !== void 0 ? ae.detail : ae.target ? ae.target.value : void 0;
|
|
3882
3861
|
if (Se)
|
|
3883
|
-
if (
|
|
3884
|
-
const le =
|
|
3862
|
+
if (F && P(F)) {
|
|
3863
|
+
const le = F.value;
|
|
3885
3864
|
if (Array.isArray(re) && Array.isArray(le) ? JSON.stringify([...re].sort()) !== JSON.stringify([...le].sort()) : re !== le) {
|
|
3886
|
-
|
|
3865
|
+
F.value = re;
|
|
3887
3866
|
try {
|
|
3888
3867
|
const fe = r;
|
|
3889
3868
|
if (fe) {
|
|
@@ -3894,14 +3873,14 @@ function dn(e, n, t) {
|
|
|
3894
3873
|
}
|
|
3895
3874
|
}
|
|
3896
3875
|
} else {
|
|
3897
|
-
const le =
|
|
3876
|
+
const le = Qe(
|
|
3898
3877
|
Se || {},
|
|
3899
|
-
typeof
|
|
3878
|
+
typeof F == "string" ? F : String(F)
|
|
3900
3879
|
);
|
|
3901
3880
|
if (Array.isArray(re) && Array.isArray(le) ? JSON.stringify([...re].sort()) !== JSON.stringify([...le].sort()) : re !== le) {
|
|
3902
|
-
|
|
3881
|
+
bt(
|
|
3903
3882
|
Se || {},
|
|
3904
|
-
typeof
|
|
3883
|
+
typeof F == "string" ? F : String(F),
|
|
3905
3884
|
re
|
|
3906
3885
|
);
|
|
3907
3886
|
try {
|
|
@@ -3918,18 +3897,18 @@ function dn(e, n, t) {
|
|
|
3918
3897
|
}
|
|
3919
3898
|
} catch {
|
|
3920
3899
|
}
|
|
3921
|
-
if (Object.keys(M).length > 0 && (
|
|
3900
|
+
if (Object.keys(M).length > 0 && (O.directives = { ...M }), y) {
|
|
3922
3901
|
const z = k.some(
|
|
3923
|
-
(
|
|
3902
|
+
(H) => typeof H == "object" && H.tag !== "#text"
|
|
3924
3903
|
);
|
|
3925
3904
|
let I = k;
|
|
3926
3905
|
if (z && k.length > 0) {
|
|
3927
|
-
let
|
|
3928
|
-
for (;
|
|
3929
|
-
const W = k[
|
|
3906
|
+
let H = 0;
|
|
3907
|
+
for (; H < k.length; ) {
|
|
3908
|
+
const W = k[H];
|
|
3930
3909
|
if (!ue(W) || W.tag !== "#text" || typeof W.children != "string" || W.children.trim() !== "")
|
|
3931
3910
|
break;
|
|
3932
|
-
|
|
3911
|
+
H++;
|
|
3933
3912
|
}
|
|
3934
3913
|
let $ = k.length - 1;
|
|
3935
3914
|
for (; $ >= 0; ) {
|
|
@@ -3938,32 +3917,32 @@ function dn(e, n, t) {
|
|
|
3938
3917
|
break;
|
|
3939
3918
|
$--;
|
|
3940
3919
|
}
|
|
3941
|
-
|
|
3920
|
+
H === 0 && $ === k.length - 1 ? I = k : H > $ ? I = [] : I = k.slice(H, $ + 1);
|
|
3942
3921
|
}
|
|
3943
|
-
const
|
|
3944
|
-
|
|
3945
|
-
|
|
3922
|
+
const oe = ce(
|
|
3923
|
+
j,
|
|
3924
|
+
A,
|
|
3946
3925
|
I.length === 1 && ue(I[0]) && I[0].tag === "#text" ? typeof I[0].children == "string" ? I[0].children : "" : I.length ? I : void 0,
|
|
3947
3926
|
a
|
|
3948
|
-
),
|
|
3949
|
-
|
|
3950
|
-
} else w ?
|
|
3951
|
-
tag:
|
|
3952
|
-
props:
|
|
3927
|
+
), X = p.pop();
|
|
3928
|
+
X ? (j = X.tag, A = X.props, a = X.key, k = X.children, k.push(oe)) : (E.push(oe), j = null, A = {}, a = void 0, k = []);
|
|
3929
|
+
} else w ? j ? k.push(ce(l, O, void 0, void 0)) : E.push(ce(l, O, void 0, void 0)) : (j && p.push({
|
|
3930
|
+
tag: j,
|
|
3931
|
+
props: A,
|
|
3953
3932
|
children: k,
|
|
3954
3933
|
key: a
|
|
3955
|
-
}),
|
|
3934
|
+
}), j = l, A = O, k = []);
|
|
3956
3935
|
} else if (typeof d[3] < "u") {
|
|
3957
3936
|
const l = Number(d[3]), y = n[l], w = `interp-${l}`;
|
|
3958
3937
|
C(y, w);
|
|
3959
3938
|
} else if (d[4]) {
|
|
3960
|
-
const l = d[4], y =
|
|
3939
|
+
const l = d[4], y = j ? k : E, w = l.split(/({{\d+}})/);
|
|
3961
3940
|
for (const L of w) {
|
|
3962
3941
|
if (!L) continue;
|
|
3963
|
-
const
|
|
3964
|
-
if (
|
|
3965
|
-
const M = Number(
|
|
3966
|
-
C(D,
|
|
3942
|
+
const N = L.match(/^{{(\d+)}}$/);
|
|
3943
|
+
if (N) {
|
|
3944
|
+
const M = Number(N[1]), D = n[M], O = `interp-${M}`;
|
|
3945
|
+
C(D, O);
|
|
3967
3946
|
} else {
|
|
3968
3947
|
const M = `text-${b++}`, D = v();
|
|
3969
3948
|
y.push(f(L, M, D));
|
|
@@ -3971,41 +3950,41 @@ function dn(e, n, t) {
|
|
|
3971
3950
|
}
|
|
3972
3951
|
}
|
|
3973
3952
|
}
|
|
3974
|
-
const
|
|
3975
|
-
(l) =>
|
|
3953
|
+
const _ = E.filter((l) => ue(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0).map(
|
|
3954
|
+
(l) => Ye(l)
|
|
3976
3955
|
);
|
|
3977
|
-
if (
|
|
3978
|
-
const l =
|
|
3979
|
-
return
|
|
3980
|
-
} else if (
|
|
3981
|
-
const l =
|
|
3982
|
-
return
|
|
3956
|
+
if (_.length === 1) {
|
|
3957
|
+
const l = _[0];
|
|
3958
|
+
return o && i && qe.set(i, l), l;
|
|
3959
|
+
} else if (_.length > 1) {
|
|
3960
|
+
const l = _;
|
|
3961
|
+
return o && i && qe.set(i, l), l;
|
|
3983
3962
|
}
|
|
3984
3963
|
return ce("div", {}, "", "fallback-root");
|
|
3985
3964
|
}
|
|
3986
|
-
function
|
|
3987
|
-
if (
|
|
3965
|
+
function On(e, ...n) {
|
|
3966
|
+
if (Y()) return [];
|
|
3988
3967
|
const t = n[n.length - 1], s = typeof t == "object" && t && !Array.isArray(t) ? t : void 0;
|
|
3989
|
-
return
|
|
3968
|
+
return fn(e, n, s);
|
|
3990
3969
|
}
|
|
3991
3970
|
export {
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
3971
|
+
wn as a,
|
|
3972
|
+
rn as b,
|
|
3973
|
+
Nn as c,
|
|
3974
|
+
An as d,
|
|
3975
|
+
Ln as e,
|
|
3976
|
+
_n as f,
|
|
3977
|
+
mn as g,
|
|
3978
|
+
On as h,
|
|
3979
|
+
yn as i,
|
|
3980
|
+
gn as j,
|
|
3981
|
+
En as k,
|
|
3982
|
+
bn as l,
|
|
3983
|
+
vn as m,
|
|
3984
|
+
Tn as n,
|
|
3985
|
+
Cn as o,
|
|
3986
|
+
kn as p,
|
|
3987
|
+
Sn as u,
|
|
3988
|
+
Zt as v
|
|
4010
3989
|
};
|
|
4011
|
-
//# sourceMappingURL=template-compiler-
|
|
3990
|
+
//# sourceMappingURL=template-compiler-taX5Zg4G.js.map
|