@jasonshimmy/custom-elements-runtime 2.2.6 → 2.2.8
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 +10 -10
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1195 -1188
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.transitions.cjs.js +1 -1
- package/dist/custom-elements-runtime.transitions.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{transitions-Dnvv4N7o.js → transitions-CZ21fzhh.js} +63 -51
- package/dist/transitions-CZ21fzhh.js.map +1 -0
- package/dist/{transitions-BAjG4ZyQ.cjs → transitions-RXe2brRm.cjs} +20 -8
- package/dist/transitions-RXe2brRm.cjs.map +1 -0
- package/dist/variables.css +1 -1
- package/package.json +1 -1
- package/dist/transitions-BAjG4ZyQ.cjs.map +0 -1
- package/dist/transitions-Dnvv4N7o.js.map +0 -1
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { g as U, t as J, i as
|
|
1
|
+
import { g as U, t as J, i as M, s as Re, a as H, b as F, d as D, f as q, T as gt, h as Ze, S as bt, j as at, k as Xe, l as Ce, m as Qe, n as Et } from "./namespace-helpers-Vwt2Fzds.js";
|
|
2
2
|
import { c as En, r as Sn, u as vn, w as _n } from "./namespace-helpers-Vwt2Fzds.js";
|
|
3
3
|
import { d as W, a as Q } from "./logger-BpibrmKL.js";
|
|
4
|
-
import { j as St, g as vt, a as
|
|
5
|
-
import { d as kn } from "./transitions-
|
|
4
|
+
import { j as St, g as vt, a as $e, b as pe, m as ke, s as _t, c as et } from "./transitions-CZ21fzhh.js";
|
|
5
|
+
import { d as kn } from "./transitions-CZ21fzhh.js";
|
|
6
6
|
function Ct(e, n, t) {
|
|
7
7
|
if (t)
|
|
8
8
|
for (const [s, r] of Object.entries(t)) {
|
|
9
|
-
let
|
|
10
|
-
if (Array.isArray(r) ? (
|
|
11
|
-
callback:
|
|
12
|
-
options:
|
|
9
|
+
let o, i = {};
|
|
10
|
+
if (Array.isArray(r) ? (o = r[0], i = r[1] || {}) : o = r, n.set(s, {
|
|
11
|
+
callback: o,
|
|
12
|
+
options: i,
|
|
13
13
|
oldValue: U(e, s)
|
|
14
|
-
}),
|
|
14
|
+
}), i.immediate)
|
|
15
15
|
try {
|
|
16
16
|
const c = U(e, s);
|
|
17
|
-
|
|
17
|
+
o(c, void 0, e);
|
|
18
18
|
} catch (c) {
|
|
19
19
|
W(`Error in immediate watcher for "${s}":`, c);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
function kt(e, n, t, s) {
|
|
24
|
-
const r = (
|
|
25
|
-
if (
|
|
26
|
-
if (typeof
|
|
27
|
-
if (Array.isArray(
|
|
28
|
-
return
|
|
29
|
-
const f =
|
|
30
|
-
return S.length !==
|
|
31
|
-
},
|
|
32
|
-
if (
|
|
24
|
+
const r = (i, c) => {
|
|
25
|
+
if (i === c) return !0;
|
|
26
|
+
if (typeof i != typeof c || typeof i != "object" || i === null || c === null) return !1;
|
|
27
|
+
if (Array.isArray(i) && Array.isArray(c))
|
|
28
|
+
return i.length !== c.length ? !1 : i.every((m, C) => r(m, c[C]));
|
|
29
|
+
const f = i, u = c, S = Object.keys(f || {}), b = Object.keys(u || {});
|
|
30
|
+
return S.length !== b.length ? !1 : S.every((m) => r(f[m], u[m]));
|
|
31
|
+
}, o = n.get(t);
|
|
32
|
+
if (o && !r(s, o.oldValue))
|
|
33
33
|
try {
|
|
34
|
-
|
|
35
|
-
} catch (
|
|
36
|
-
W(`Error in watcher for "${t}":`,
|
|
34
|
+
o.callback(s, o.oldValue, e), o.oldValue = s;
|
|
35
|
+
} catch (i) {
|
|
36
|
+
W(`Error in watcher for "${t}":`, i);
|
|
37
37
|
}
|
|
38
|
-
for (const [
|
|
39
|
-
if (c.options.deep && t.startsWith(
|
|
38
|
+
for (const [i, c] of n.entries())
|
|
39
|
+
if (c.options.deep && t.startsWith(i + "."))
|
|
40
40
|
try {
|
|
41
|
-
const f = U(e,
|
|
41
|
+
const f = U(e, i);
|
|
42
42
|
r(f, c.oldValue) || (c.callback(f, c.oldValue, e), c.oldValue = f);
|
|
43
43
|
} catch (f) {
|
|
44
|
-
W(`Error in deep watcher for "${
|
|
44
|
+
W(`Error in deep watcher for "${i}":`, f);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
function De(e, n) {
|
|
@@ -50,11 +50,11 @@ function De(e, n) {
|
|
|
50
50
|
function At(e, n, t) {
|
|
51
51
|
if (n)
|
|
52
52
|
for (const s in n) {
|
|
53
|
-
const r = n[s],
|
|
53
|
+
const r = n[s], o = J(s), i = e.getAttribute(o);
|
|
54
54
|
if (r.type === Function && typeof e[s] == "function")
|
|
55
55
|
t[s] = e[s];
|
|
56
|
-
else if (
|
|
57
|
-
t[s] = De(
|
|
56
|
+
else if (i !== null)
|
|
57
|
+
t[s] = De(i, r.type);
|
|
58
58
|
else if (typeof e[s] < "u")
|
|
59
59
|
try {
|
|
60
60
|
const c = e[s];
|
|
@@ -80,27 +80,27 @@ function wt(e, n, t) {
|
|
|
80
80
|
...Object.keys(s || {})
|
|
81
81
|
])
|
|
82
82
|
);
|
|
83
|
-
for (const
|
|
84
|
-
if (typeof
|
|
85
|
-
const
|
|
83
|
+
for (const o of r) {
|
|
84
|
+
if (typeof o != "string" || o.startsWith("_")) continue;
|
|
85
|
+
const i = Object.getOwnPropertyDescriptor(t, o);
|
|
86
86
|
if (!(!Object.prototype.hasOwnProperty.call(
|
|
87
87
|
s,
|
|
88
|
-
|
|
89
|
-
) &&
|
|
88
|
+
o
|
|
89
|
+
) && i && (i.get || i.set || !i.configurable)))
|
|
90
90
|
try {
|
|
91
|
-
Object.defineProperty(t,
|
|
91
|
+
Object.defineProperty(t, o, {
|
|
92
92
|
enumerable: !0,
|
|
93
93
|
configurable: !0,
|
|
94
94
|
get() {
|
|
95
95
|
try {
|
|
96
|
-
const f = J(
|
|
96
|
+
const f = J(o), u = e.getAttribute(f);
|
|
97
97
|
if (u !== null)
|
|
98
98
|
return u;
|
|
99
|
-
const S = e[
|
|
100
|
-
let
|
|
101
|
-
return
|
|
99
|
+
const S = e[o];
|
|
100
|
+
let b;
|
|
101
|
+
return M(S) || S && typeof S == "object" && "value" in S && !(S instanceof Node) ? b = S.value : b = S, b;
|
|
102
102
|
} catch {
|
|
103
|
-
return e[
|
|
103
|
+
return e[o];
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
});
|
|
@@ -116,8 +116,8 @@ function wt(e, n, t) {
|
|
|
116
116
|
function Tt(e, n, t, s) {
|
|
117
117
|
e.onConnected && !t && (e.onConnected(n), s(!0));
|
|
118
118
|
}
|
|
119
|
-
function Lt(e, n, t, s, r,
|
|
120
|
-
e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(),
|
|
119
|
+
function Lt(e, n, t, s, r, o, i, c) {
|
|
120
|
+
e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(), o(!1), i(null), c(!1);
|
|
121
121
|
}
|
|
122
122
|
function Nt(e, n, t, s, r) {
|
|
123
123
|
e.onAttributeChanged && e.onAttributeChanged(n, t, s, r);
|
|
@@ -158,8 +158,8 @@ class Ot {
|
|
|
158
158
|
}
|
|
159
159
|
const r = this.createEvaluator(n);
|
|
160
160
|
if (this.cache.size >= this.maxCacheSize) {
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const o = this.cache.keys().next().value;
|
|
162
|
+
o && this.cache.delete(o);
|
|
163
163
|
}
|
|
164
164
|
if (this.cache.set(n, r), !r.isSecure) {
|
|
165
165
|
Q("Blocked dangerous expression:", n);
|
|
@@ -197,26 +197,26 @@ class Ot {
|
|
|
197
197
|
static createObjectEvaluator(n) {
|
|
198
198
|
const t = n.trim().slice(1, -1), s = this.parseObjectProperties(t);
|
|
199
199
|
return (r) => {
|
|
200
|
-
const
|
|
201
|
-
for (const { key:
|
|
200
|
+
const o = {};
|
|
201
|
+
for (const { key: i, value: c } of s)
|
|
202
202
|
try {
|
|
203
203
|
if (c.startsWith("ctx.")) {
|
|
204
204
|
const f = c.slice(4);
|
|
205
|
-
i
|
|
205
|
+
o[i] = U(r, f);
|
|
206
206
|
} else
|
|
207
|
-
i
|
|
207
|
+
o[i] = this.evaluateSimpleValue(c, r);
|
|
208
208
|
} catch {
|
|
209
|
-
i
|
|
209
|
+
o[i] = void 0;
|
|
210
210
|
}
|
|
211
|
-
return
|
|
211
|
+
return o;
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
static parseObjectProperties(n) {
|
|
215
215
|
const t = [], s = n.split(",");
|
|
216
216
|
for (const r of s) {
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
217
|
+
const o = r.indexOf(":");
|
|
218
|
+
if (o === -1) continue;
|
|
219
|
+
const i = r.slice(0, o).trim(), c = r.slice(o + 1).trim(), f = i.replace(/^['"]|['"]$/g, "");
|
|
220
220
|
t.push({ key: f, value: c });
|
|
221
221
|
}
|
|
222
222
|
return t;
|
|
@@ -228,53 +228,53 @@ class Ot {
|
|
|
228
228
|
const r = [];
|
|
229
229
|
s = s.replace(
|
|
230
230
|
/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,
|
|
231
|
-
(
|
|
231
|
+
(b) => `<<#${r.push(b) - 1}#>>`
|
|
232
232
|
);
|
|
233
|
-
const
|
|
234
|
-
for (const
|
|
235
|
-
const
|
|
236
|
-
if (
|
|
237
|
-
const
|
|
233
|
+
const o = s.match(/ctx\.[\w.]+/g) || [];
|
|
234
|
+
for (const b of o) {
|
|
235
|
+
const m = b.slice(4), C = U(t, m);
|
|
236
|
+
if (C === void 0) return;
|
|
237
|
+
const w = r.push(JSON.stringify(C)) - 1;
|
|
238
238
|
s = s.replace(
|
|
239
|
-
new RegExp(
|
|
240
|
-
`<<#${
|
|
239
|
+
new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
240
|
+
`<<#${w}#>>`
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
const
|
|
244
|
-
for (const
|
|
245
|
-
if (
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
243
|
+
const i = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = s.match(i) || [];
|
|
244
|
+
for (const b of c) {
|
|
245
|
+
if (b.startsWith("ctx.")) continue;
|
|
246
|
+
const m = U(t, b);
|
|
247
|
+
if (m === void 0) return;
|
|
248
|
+
const C = r.push(JSON.stringify(m)) - 1;
|
|
249
249
|
s = s.replace(
|
|
250
|
-
new RegExp(
|
|
251
|
-
`<<#${
|
|
250
|
+
new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
251
|
+
`<<#${C}#>>`
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
const f = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
255
255
|
let u;
|
|
256
256
|
const S = /* @__PURE__ */ new Set();
|
|
257
257
|
for (; (u = f.exec(s)) !== null; ) {
|
|
258
|
-
const
|
|
259
|
-
if (["true", "false", "null", "undefined"].includes(
|
|
260
|
-
S.add(
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
new RegExp(
|
|
266
|
-
`<<#${
|
|
258
|
+
const b = u[1];
|
|
259
|
+
if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || S.has(b)) continue;
|
|
260
|
+
S.add(b);
|
|
261
|
+
const m = U(t, b);
|
|
262
|
+
if (m === void 0) return;
|
|
263
|
+
const C = JSON.stringify(m), w = r.push(C) - 1;
|
|
264
|
+
b.includes(".") ? s = s.replace(
|
|
265
|
+
new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
|
|
266
|
+
`<<#${w}#>>`
|
|
267
267
|
) : s = s.replace(
|
|
268
268
|
new RegExp(
|
|
269
|
-
"\\b" +
|
|
269
|
+
"\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b",
|
|
270
270
|
"g"
|
|
271
271
|
),
|
|
272
|
-
`<<#${
|
|
272
|
+
`<<#${w}#>>`
|
|
273
273
|
);
|
|
274
274
|
}
|
|
275
275
|
s = s.replace(
|
|
276
276
|
/<<#(\d+)#>>/g,
|
|
277
|
-
(
|
|
277
|
+
(b, m) => r[Number(m)]
|
|
278
278
|
);
|
|
279
279
|
try {
|
|
280
280
|
return this.evaluateBasicExpression(s);
|
|
@@ -297,44 +297,44 @@ class Ot {
|
|
|
297
297
|
function r() {
|
|
298
298
|
return t[s];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function o(d) {
|
|
301
301
|
const k = t[s++];
|
|
302
|
-
if (
|
|
303
|
-
throw new Error(`Unexpected token EOF, expected ${
|
|
304
|
-
if (
|
|
302
|
+
if (d && !k)
|
|
303
|
+
throw new Error(`Unexpected token EOF, expected ${d}`);
|
|
304
|
+
if (d && k && k.type !== d && k.value !== d)
|
|
305
305
|
throw new Error(
|
|
306
|
-
`Unexpected token ${k.type}/${k.value}, expected ${
|
|
306
|
+
`Unexpected token ${k.type}/${k.value}, expected ${d}`
|
|
307
307
|
);
|
|
308
308
|
return k;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
310
|
+
function i() {
|
|
311
|
+
return w();
|
|
312
312
|
}
|
|
313
|
-
function c(
|
|
314
|
-
if (typeof
|
|
315
|
-
if (
|
|
316
|
-
if (typeof
|
|
317
|
-
const k = Number(
|
|
313
|
+
function c(d) {
|
|
314
|
+
if (typeof d == "number") return d;
|
|
315
|
+
if (d == null) return NaN;
|
|
316
|
+
if (typeof d == "boolean") return d ? 1 : 0;
|
|
317
|
+
const k = Number(d);
|
|
318
318
|
return Number.isNaN(k) ? NaN : k;
|
|
319
319
|
}
|
|
320
|
-
function f(
|
|
321
|
-
return typeof
|
|
320
|
+
function f(d, k) {
|
|
321
|
+
return typeof d == "string" || typeof k == "string" ? String(d) + String(k) : c(d) + c(k);
|
|
322
322
|
}
|
|
323
|
-
function u(
|
|
324
|
-
return c(
|
|
323
|
+
function u(d, k) {
|
|
324
|
+
return c(d) - c(k);
|
|
325
325
|
}
|
|
326
|
-
function S(
|
|
327
|
-
return c(
|
|
326
|
+
function S(d, k) {
|
|
327
|
+
return c(d) * c(k);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return c(
|
|
329
|
+
function b(d, k) {
|
|
330
|
+
return c(d) / c(k);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
return c(
|
|
332
|
+
function m(d, k) {
|
|
333
|
+
return c(d) % c(k);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function C(d, k, l) {
|
|
336
336
|
if (typeof k == "number" && typeof l == "number")
|
|
337
|
-
switch (
|
|
337
|
+
switch (d) {
|
|
338
338
|
case ">":
|
|
339
339
|
return k > l;
|
|
340
340
|
case "<":
|
|
@@ -346,178 +346,178 @@ class Ot {
|
|
|
346
346
|
default:
|
|
347
347
|
return !1;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
switch (
|
|
349
|
+
const g = String(k), A = String(l);
|
|
350
|
+
switch (d) {
|
|
351
351
|
case ">":
|
|
352
|
-
return
|
|
352
|
+
return g > A;
|
|
353
353
|
case "<":
|
|
354
|
-
return
|
|
354
|
+
return g < A;
|
|
355
355
|
case ">=":
|
|
356
|
-
return
|
|
356
|
+
return g >= A;
|
|
357
357
|
case "<=":
|
|
358
|
-
return
|
|
358
|
+
return g <= A;
|
|
359
359
|
default:
|
|
360
360
|
return !1;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
const
|
|
363
|
+
function w() {
|
|
364
|
+
const d = L(), k = r();
|
|
365
365
|
if (k && k.value === "?") {
|
|
366
|
-
|
|
367
|
-
const l =
|
|
368
|
-
|
|
369
|
-
const
|
|
370
|
-
return
|
|
366
|
+
o("?");
|
|
367
|
+
const l = i();
|
|
368
|
+
o(":");
|
|
369
|
+
const g = i();
|
|
370
|
+
return d ? l : g;
|
|
371
371
|
}
|
|
372
|
-
return
|
|
372
|
+
return d;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
let
|
|
374
|
+
function L() {
|
|
375
|
+
let d = a();
|
|
376
376
|
for (; ; ) {
|
|
377
377
|
const k = r();
|
|
378
378
|
if (!k || k.value !== "||") break;
|
|
379
|
-
|
|
379
|
+
o("OP");
|
|
380
380
|
const l = a();
|
|
381
|
-
|
|
381
|
+
d = d || l;
|
|
382
382
|
}
|
|
383
|
-
return
|
|
383
|
+
return d;
|
|
384
384
|
}
|
|
385
385
|
function a() {
|
|
386
|
-
let
|
|
386
|
+
let d = v();
|
|
387
387
|
for (; ; ) {
|
|
388
388
|
const k = r();
|
|
389
389
|
if (!k || k.value !== "&&") break;
|
|
390
|
-
|
|
391
|
-
const l =
|
|
392
|
-
|
|
390
|
+
o("OP");
|
|
391
|
+
const l = v();
|
|
392
|
+
d = d && l;
|
|
393
393
|
}
|
|
394
|
-
return
|
|
394
|
+
return d;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
let
|
|
396
|
+
function v() {
|
|
397
|
+
let d = h();
|
|
398
398
|
for (; ; ) {
|
|
399
399
|
const k = r();
|
|
400
400
|
if (!k || !["==", "!=", "===", "!=="].includes(k.value)) break;
|
|
401
|
-
const l =
|
|
401
|
+
const l = o("OP").value, g = h();
|
|
402
402
|
switch (l) {
|
|
403
403
|
case "==":
|
|
404
|
-
|
|
404
|
+
d = d == g;
|
|
405
405
|
break;
|
|
406
406
|
case "!=":
|
|
407
|
-
|
|
407
|
+
d = d != g;
|
|
408
408
|
break;
|
|
409
409
|
case "===":
|
|
410
|
-
|
|
410
|
+
d = d === g;
|
|
411
411
|
break;
|
|
412
412
|
case "!==":
|
|
413
|
-
|
|
413
|
+
d = d !== g;
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
return
|
|
417
|
+
return d;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
let
|
|
419
|
+
function h() {
|
|
420
|
+
let d = y();
|
|
421
421
|
for (; ; ) {
|
|
422
422
|
const k = r();
|
|
423
423
|
if (!k || ![">", "<", ">=", "<="].includes(k.value)) break;
|
|
424
|
-
const l =
|
|
424
|
+
const l = o("OP").value, g = y();
|
|
425
425
|
switch (l) {
|
|
426
426
|
case ">":
|
|
427
|
-
|
|
427
|
+
d = C(">", d, g);
|
|
428
428
|
break;
|
|
429
429
|
case "<":
|
|
430
|
-
|
|
430
|
+
d = C("<", d, g);
|
|
431
431
|
break;
|
|
432
432
|
case ">=":
|
|
433
|
-
|
|
433
|
+
d = C(">=", d, g);
|
|
434
434
|
break;
|
|
435
435
|
case "<=":
|
|
436
|
-
|
|
436
|
+
d = C("<=", d, g);
|
|
437
437
|
break;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return d;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
let
|
|
442
|
+
function y() {
|
|
443
|
+
let d = p();
|
|
444
444
|
for (; ; ) {
|
|
445
445
|
const k = r();
|
|
446
446
|
if (!k || k.value !== "+" && k.value !== "-") break;
|
|
447
|
-
const l =
|
|
448
|
-
|
|
447
|
+
const l = o("OP").value, g = p();
|
|
448
|
+
d = l === "+" ? f(d, g) : u(d, g);
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return d;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
let
|
|
452
|
+
function p() {
|
|
453
|
+
let d = _();
|
|
454
454
|
for (; ; ) {
|
|
455
455
|
const k = r();
|
|
456
456
|
if (!k || k.value !== "*" && k.value !== "/" && k.value !== "%")
|
|
457
457
|
break;
|
|
458
|
-
const l =
|
|
458
|
+
const l = o("OP").value, g = _();
|
|
459
459
|
switch (l) {
|
|
460
460
|
case "*":
|
|
461
|
-
|
|
461
|
+
d = S(d, g);
|
|
462
462
|
break;
|
|
463
463
|
case "/":
|
|
464
|
-
|
|
464
|
+
d = b(d, g);
|
|
465
465
|
break;
|
|
466
466
|
case "%":
|
|
467
|
-
|
|
467
|
+
d = m(d, g);
|
|
468
468
|
break;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
return
|
|
471
|
+
return d;
|
|
472
472
|
}
|
|
473
473
|
function _() {
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
return
|
|
477
|
-
if (
|
|
478
|
-
|
|
474
|
+
const d = r();
|
|
475
|
+
if (d && d.value === "!")
|
|
476
|
+
return o("OP"), !_();
|
|
477
|
+
if (d && d.value === "-") {
|
|
478
|
+
o("OP");
|
|
479
479
|
const k = _();
|
|
480
480
|
return u(0, k);
|
|
481
481
|
}
|
|
482
|
-
return
|
|
483
|
-
}
|
|
484
|
-
function
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
if (
|
|
488
|
-
return
|
|
489
|
-
if (
|
|
490
|
-
return
|
|
491
|
-
if (
|
|
492
|
-
return
|
|
493
|
-
if (
|
|
494
|
-
|
|
482
|
+
return E();
|
|
483
|
+
}
|
|
484
|
+
function E() {
|
|
485
|
+
const d = r();
|
|
486
|
+
if (d) {
|
|
487
|
+
if (d.type === "NUMBER")
|
|
488
|
+
return o("NUMBER"), Number(d.value);
|
|
489
|
+
if (d.type === "STRING")
|
|
490
|
+
return o("STRING"), d.value.slice(1, -1);
|
|
491
|
+
if (d.type === "IDENT")
|
|
492
|
+
return o("IDENT"), d.value === "true" ? !0 : d.value === "false" ? !1 : d.value === "null" ? null : void 0;
|
|
493
|
+
if (d.value === "[") {
|
|
494
|
+
o("PUNC");
|
|
495
495
|
const k = [];
|
|
496
496
|
for (; ; ) {
|
|
497
497
|
const l = r();
|
|
498
498
|
if (!l || l.value === "]") break;
|
|
499
|
-
k.push(
|
|
500
|
-
const
|
|
501
|
-
|
|
499
|
+
k.push(i());
|
|
500
|
+
const g = r();
|
|
501
|
+
g && g.value === "," && o("PUNC");
|
|
502
502
|
}
|
|
503
|
-
return
|
|
503
|
+
return o("PUNC"), k;
|
|
504
504
|
}
|
|
505
|
-
if (
|
|
506
|
-
|
|
507
|
-
const k =
|
|
508
|
-
return
|
|
505
|
+
if (d.value === "(") {
|
|
506
|
+
o("PUNC");
|
|
507
|
+
const k = i();
|
|
508
|
+
return o("PUNC"), k;
|
|
509
509
|
}
|
|
510
510
|
throw new Error("Unexpected token in expression");
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
return
|
|
513
|
+
return i();
|
|
514
514
|
}
|
|
515
515
|
static tokenize(n) {
|
|
516
516
|
const t = [], s = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
|
|
517
517
|
let r;
|
|
518
518
|
for (; (r = s.exec(n)) !== null; ) {
|
|
519
|
-
const
|
|
520
|
-
|
|
519
|
+
const o = r[1];
|
|
520
|
+
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 }));
|
|
521
521
|
}
|
|
522
522
|
return t;
|
|
523
523
|
}
|
|
@@ -545,7 +545,7 @@ class te {
|
|
|
545
545
|
*/
|
|
546
546
|
static addListener(n, t, s, r) {
|
|
547
547
|
n.addEventListener(t, s, r);
|
|
548
|
-
const
|
|
548
|
+
const i = {
|
|
549
549
|
event: t,
|
|
550
550
|
handler: s,
|
|
551
551
|
wrapper: s,
|
|
@@ -555,19 +555,19 @@ class te {
|
|
|
555
555
|
};
|
|
556
556
|
this.cleanupFunctions.has(n) || this.cleanupFunctions.set(n, []);
|
|
557
557
|
const c = this.cleanupFunctions.get(n);
|
|
558
|
-
c.push(
|
|
558
|
+
c.push(i), c.__metaList = c;
|
|
559
559
|
}
|
|
560
560
|
/**
|
|
561
561
|
* Remove a specific event listener
|
|
562
562
|
*/
|
|
563
563
|
static removeListener(n, t, s, r) {
|
|
564
564
|
n.removeEventListener(t, s, r);
|
|
565
|
-
const
|
|
566
|
-
if (
|
|
567
|
-
for (let
|
|
568
|
-
const c = i
|
|
565
|
+
const o = this.cleanupFunctions.get(n);
|
|
566
|
+
if (o)
|
|
567
|
+
for (let i = 0; i < o.length; i++) {
|
|
568
|
+
const c = o[i];
|
|
569
569
|
if (c.event === t && c.handler === s) {
|
|
570
|
-
|
|
570
|
+
o.splice(i, 1), o.length === 0 && this.cleanupFunctions.delete(n);
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
573
573
|
}
|
|
@@ -622,15 +622,15 @@ function He(e, n) {
|
|
|
622
622
|
}
|
|
623
623
|
function tt(e, n, t, s, r) {
|
|
624
624
|
if (e) {
|
|
625
|
-
const
|
|
626
|
-
if (r && typeof
|
|
627
|
-
const
|
|
628
|
-
|
|
625
|
+
const o = n.value;
|
|
626
|
+
if (r && typeof o == "object" && o !== null) {
|
|
627
|
+
const i = { ...o };
|
|
628
|
+
i[r] = t, n.value = i;
|
|
629
629
|
} else
|
|
630
630
|
n.value = t;
|
|
631
631
|
} else {
|
|
632
|
-
const
|
|
633
|
-
Re(
|
|
632
|
+
const o = s._state || s;
|
|
633
|
+
Re(o, n, t);
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
function xe(e, n, t, s) {
|
|
@@ -639,17 +639,17 @@ function xe(e, n, t, s) {
|
|
|
639
639
|
e._triggerWatchers(r, s);
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
const s = `update:${J(n)}`, r = `update:${n}`,
|
|
642
|
+
function Pt(e, n, t) {
|
|
643
|
+
const s = `update:${J(n)}`, r = `update:${n}`, o = new CustomEvent(s, {
|
|
644
644
|
detail: t,
|
|
645
645
|
bubbles: !0,
|
|
646
646
|
cancelable: !0
|
|
647
|
-
}),
|
|
647
|
+
}), i = new CustomEvent(r, {
|
|
648
648
|
detail: t,
|
|
649
649
|
bubbles: !0,
|
|
650
650
|
cancelable: !0
|
|
651
651
|
});
|
|
652
|
-
e.dispatchEvent(
|
|
652
|
+
e.dispatchEvent(o), e.dispatchEvent(i);
|
|
653
653
|
}
|
|
654
654
|
function nt(e, n, t, s) {
|
|
655
655
|
const r = t;
|
|
@@ -662,19 +662,19 @@ function nt(e, n, t, s) {
|
|
|
662
662
|
else
|
|
663
663
|
e[n] = r;
|
|
664
664
|
}), r == null || typeof r == "string" || typeof r == "number" || typeof r == "boolean") {
|
|
665
|
-
const
|
|
666
|
-
|
|
665
|
+
const o = F(r);
|
|
666
|
+
o !== null ? H(() => {
|
|
667
667
|
typeof e.setAttribute == "function" && D(
|
|
668
668
|
e,
|
|
669
669
|
J(n),
|
|
670
|
-
String(
|
|
670
|
+
String(o)
|
|
671
671
|
);
|
|
672
672
|
}) : H(() => {
|
|
673
673
|
typeof e.removeAttribute == "function" && q(e, J(n));
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function jt(e, n, t, s) {
|
|
678
678
|
if (e) {
|
|
679
679
|
const r = n.value;
|
|
680
680
|
return s && typeof r == "object" && r !== null ? r[s] : r;
|
|
@@ -699,15 +699,15 @@ function de(e, n) {
|
|
|
699
699
|
t.length > 0 && e.classList.remove(...t);
|
|
700
700
|
}
|
|
701
701
|
let We = !1;
|
|
702
|
-
async function
|
|
702
|
+
async function Mt(e, n, t = 10) {
|
|
703
703
|
if (!We) {
|
|
704
704
|
if (!e.isConnected) {
|
|
705
705
|
Q("⚠️ Element not connected to DOM, skipping style wait");
|
|
706
706
|
return;
|
|
707
707
|
}
|
|
708
708
|
for (let s = 0; s < t; s++) {
|
|
709
|
-
const r = window.getComputedStyle(e),
|
|
710
|
-
if (
|
|
709
|
+
const r = window.getComputedStyle(e), o = r.transform && r.transform !== "", i = r.opacity && r.opacity !== "";
|
|
710
|
+
if (o || i) {
|
|
711
711
|
We = !0;
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
@@ -718,129 +718,129 @@ async function Pt(e, n, t = 10) {
|
|
|
718
718
|
We = !0, Q("⚠️ Styles did not load in time for transition, continuing anyway");
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (
|
|
723
|
-
const
|
|
724
|
-
return
|
|
721
|
+
function $t(e) {
|
|
722
|
+
const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (o) => {
|
|
723
|
+
const i = parseFloat(o);
|
|
724
|
+
return o.includes("ms") ? i : i * 1e3;
|
|
725
725
|
};
|
|
726
726
|
return r(t) + r(s);
|
|
727
727
|
}
|
|
728
728
|
function lt(e, n) {
|
|
729
729
|
return new Promise((t) => {
|
|
730
|
-
const s = n ??
|
|
730
|
+
const s = n ?? $t(e);
|
|
731
731
|
if (s <= 0) {
|
|
732
732
|
t();
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
735
|
let r = !1;
|
|
736
|
-
const
|
|
737
|
-
r || (r = !0, e.removeEventListener("transitionend",
|
|
738
|
-
},
|
|
739
|
-
e.addEventListener("transitionend",
|
|
736
|
+
const o = () => {
|
|
737
|
+
r || (r = !0, e.removeEventListener("transitionend", i), e.removeEventListener("transitioncancel", i), t());
|
|
738
|
+
}, i = () => o();
|
|
739
|
+
e.addEventListener("transitionend", i), e.addEventListener("transitioncancel", i), setTimeout(o, s + 50);
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
742
|
async function Ae(e, n) {
|
|
743
|
-
const { classes: t, hooks: s, css: r, duration:
|
|
743
|
+
const { classes: t, hooks: s, css: r, duration: o } = n;
|
|
744
744
|
if (s?.onBeforeEnter)
|
|
745
745
|
try {
|
|
746
746
|
s.onBeforeEnter(e);
|
|
747
|
-
} catch (
|
|
748
|
-
W("Transition onBeforeEnter error:",
|
|
747
|
+
} catch (w) {
|
|
748
|
+
W("Transition onBeforeEnter error:", w);
|
|
749
749
|
}
|
|
750
750
|
if (!r)
|
|
751
|
-
return s?.onEnter ? new Promise((
|
|
752
|
-
const
|
|
753
|
-
typeof
|
|
751
|
+
return s?.onEnter ? new Promise((w) => {
|
|
752
|
+
const L = s.onEnter;
|
|
753
|
+
typeof L == "function" ? L(e, () => {
|
|
754
754
|
if (s?.onAfterEnter)
|
|
755
755
|
try {
|
|
756
756
|
s.onAfterEnter(e);
|
|
757
757
|
} catch (a) {
|
|
758
758
|
W("Transition onAfterEnter error:", a);
|
|
759
759
|
}
|
|
760
|
-
|
|
761
|
-
}) :
|
|
760
|
+
w();
|
|
761
|
+
}) : w();
|
|
762
762
|
}) : void 0;
|
|
763
|
-
const
|
|
764
|
-
ye(e,
|
|
763
|
+
const i = he(t?.enterFrom), c = he(t?.enterActive), f = he(t?.enterTo);
|
|
764
|
+
ye(e, i), e.offsetHeight, ye(e, c), e.offsetHeight;
|
|
765
765
|
let u;
|
|
766
766
|
if (s?.onEnter) {
|
|
767
|
-
const
|
|
768
|
-
u =
|
|
767
|
+
const w = new Promise((L) => {
|
|
768
|
+
u = L;
|
|
769
769
|
});
|
|
770
770
|
try {
|
|
771
|
-
const
|
|
772
|
-
typeof
|
|
771
|
+
const L = s.onEnter;
|
|
772
|
+
typeof L == "function" && L(e, () => {
|
|
773
773
|
u && u();
|
|
774
774
|
});
|
|
775
|
-
} catch (
|
|
776
|
-
W("Transition onEnter error:",
|
|
775
|
+
} catch (L) {
|
|
776
|
+
W("Transition onEnter error:", L);
|
|
777
777
|
}
|
|
778
|
-
u && await
|
|
778
|
+
u && await w;
|
|
779
779
|
}
|
|
780
780
|
await new Promise(
|
|
781
|
-
(
|
|
781
|
+
(w) => requestAnimationFrame(() => w(void 0))
|
|
782
782
|
), e.offsetHeight;
|
|
783
|
-
const S = window.getComputedStyle(e),
|
|
784
|
-
de(e,
|
|
785
|
-
(
|
|
783
|
+
const S = window.getComputedStyle(e), b = S.transform, m = S.opacity;
|
|
784
|
+
de(e, i), b && b !== "none" && (e.style.transform = b), m && m !== "" && (e.style.opacity = m), e.offsetHeight, await new Promise(
|
|
785
|
+
(w) => requestAnimationFrame(() => w(void 0))
|
|
786
786
|
), e.style.transform = "", e.style.opacity = "", ye(e, f), e.offsetHeight, await new Promise(
|
|
787
|
-
(
|
|
787
|
+
(w) => requestAnimationFrame(() => w(void 0))
|
|
788
788
|
);
|
|
789
|
-
let
|
|
790
|
-
if (typeof
|
|
789
|
+
let C;
|
|
790
|
+
if (typeof o == "number" ? C = o : o && typeof o == "object" && "enter" in o && (C = o.enter), await lt(e, C), de(e, c), s?.onAfterEnter)
|
|
791
791
|
try {
|
|
792
792
|
s.onAfterEnter(e);
|
|
793
|
-
} catch (
|
|
794
|
-
W("Transition onAfterEnter error:",
|
|
793
|
+
} catch (w) {
|
|
794
|
+
W("Transition onAfterEnter error:", w);
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
async function ze(e, n) {
|
|
798
|
-
const { classes: t, hooks: s, css: r, duration:
|
|
798
|
+
const { classes: t, hooks: s, css: r, duration: o } = n;
|
|
799
799
|
if (s?.onBeforeLeave)
|
|
800
800
|
try {
|
|
801
801
|
s.onBeforeLeave(e);
|
|
802
|
-
} catch (
|
|
803
|
-
W("Transition onBeforeLeave error:",
|
|
802
|
+
} catch (b) {
|
|
803
|
+
W("Transition onBeforeLeave error:", b);
|
|
804
804
|
}
|
|
805
805
|
if (!r)
|
|
806
|
-
return s?.onLeave ? new Promise((
|
|
807
|
-
const
|
|
808
|
-
typeof
|
|
806
|
+
return s?.onLeave ? new Promise((b) => {
|
|
807
|
+
const m = s.onLeave;
|
|
808
|
+
typeof m == "function" ? m(e, () => {
|
|
809
809
|
if (s?.onAfterLeave)
|
|
810
810
|
try {
|
|
811
811
|
s.onAfterLeave(e);
|
|
812
|
-
} catch (
|
|
813
|
-
W("Transition onAfterLeave error:",
|
|
812
|
+
} catch (C) {
|
|
813
|
+
W("Transition onAfterLeave error:", C);
|
|
814
814
|
}
|
|
815
|
-
|
|
816
|
-
}) :
|
|
815
|
+
b();
|
|
816
|
+
}) : b();
|
|
817
817
|
}) : void 0;
|
|
818
|
-
const
|
|
819
|
-
ye(e,
|
|
818
|
+
const i = he(t?.leaveFrom), c = he(t?.leaveActive), f = he(t?.leaveTo);
|
|
819
|
+
ye(e, i), e.offsetHeight, ye(e, c);
|
|
820
820
|
let u;
|
|
821
821
|
if (s?.onLeave) {
|
|
822
|
-
const
|
|
823
|
-
u =
|
|
822
|
+
const b = new Promise((m) => {
|
|
823
|
+
u = m;
|
|
824
824
|
});
|
|
825
825
|
try {
|
|
826
|
-
const
|
|
827
|
-
typeof
|
|
826
|
+
const m = s.onLeave;
|
|
827
|
+
typeof m == "function" && m(e, () => {
|
|
828
828
|
u && u();
|
|
829
829
|
});
|
|
830
|
-
} catch (
|
|
831
|
-
W("Transition onLeave error:",
|
|
830
|
+
} catch (m) {
|
|
831
|
+
W("Transition onLeave error:", m);
|
|
832
832
|
}
|
|
833
|
-
u && await
|
|
833
|
+
u && await b;
|
|
834
834
|
}
|
|
835
835
|
await new Promise(
|
|
836
|
-
(
|
|
837
|
-
), await
|
|
836
|
+
(b) => requestAnimationFrame(() => b(void 0))
|
|
837
|
+
), await Mt(e, [...i, ...c]), de(e, i), ye(e, f);
|
|
838
838
|
let S;
|
|
839
|
-
if (typeof
|
|
839
|
+
if (typeof o == "number" ? S = o : o && typeof o == "object" && "leave" in o && (S = o.leave), await lt(e, S), de(e, c), de(e, f), de(e, i), s?.onAfterLeave)
|
|
840
840
|
try {
|
|
841
841
|
s.onAfterLeave(e);
|
|
842
|
-
} catch (
|
|
843
|
-
W("Transition onAfterLeave error:",
|
|
842
|
+
} catch (b) {
|
|
843
|
+
W("Transition onAfterLeave error:", b);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
846
|
const ft = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap();
|
|
@@ -901,7 +901,7 @@ function me(e) {
|
|
|
901
901
|
}
|
|
902
902
|
function Fe(e) {
|
|
903
903
|
try {
|
|
904
|
-
if (
|
|
904
|
+
if (M(e)) return e.value;
|
|
905
905
|
} catch {
|
|
906
906
|
}
|
|
907
907
|
try {
|
|
@@ -920,7 +920,7 @@ function X(e) {
|
|
|
920
920
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
|
|
921
921
|
}
|
|
922
922
|
function ge(e) {
|
|
923
|
-
return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ?
|
|
923
|
+
return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? M(e) || "value" in e ? !!e.value : !1 : !!e;
|
|
924
924
|
}
|
|
925
925
|
function ue(e, n) {
|
|
926
926
|
if (!n || !(e instanceof Element)) return;
|
|
@@ -936,218 +936,218 @@ function we(e, n, t) {
|
|
|
936
936
|
const s = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), r = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
937
937
|
if (s)
|
|
938
938
|
try {
|
|
939
|
-
if (
|
|
939
|
+
if (M(s) || typeof s == "object" && "value" in s)
|
|
940
940
|
s.value = n;
|
|
941
941
|
else if (typeof s == "function")
|
|
942
942
|
s(n);
|
|
943
943
|
else if (typeof s == "string" && t)
|
|
944
944
|
try {
|
|
945
|
-
const
|
|
946
|
-
t[
|
|
945
|
+
const o = String(s);
|
|
946
|
+
t[o] = n;
|
|
947
947
|
} catch {
|
|
948
948
|
}
|
|
949
949
|
} catch {
|
|
950
950
|
}
|
|
951
951
|
else if (r && t)
|
|
952
952
|
try {
|
|
953
|
-
const
|
|
954
|
-
t[
|
|
953
|
+
const o = String(r);
|
|
954
|
+
t[o] = n;
|
|
955
955
|
} catch {
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
|
-
function It(e, n, t, s, r,
|
|
959
|
-
if (!
|
|
960
|
-
const f = n.includes("lazy"), u = n.includes("trim"), S = n.includes("number"),
|
|
961
|
-
if (
|
|
962
|
-
const
|
|
963
|
-
return c &&
|
|
964
|
-
}
|
|
965
|
-
const
|
|
966
|
-
return U(
|
|
967
|
-
},
|
|
968
|
-
let
|
|
969
|
-
|
|
970
|
-
const
|
|
971
|
-
if (
|
|
972
|
-
if (Array.isArray(
|
|
973
|
-
t[a] =
|
|
974
|
-
String(
|
|
958
|
+
function It(e, n, t, s, r, o, i, c) {
|
|
959
|
+
if (!o) return;
|
|
960
|
+
const f = n.includes("lazy"), u = n.includes("trim"), S = n.includes("number"), b = () => {
|
|
961
|
+
if (M(e)) {
|
|
962
|
+
const p = e.value;
|
|
963
|
+
return c && i && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement) && typeof p == "object" && p !== null ? p[c] : p;
|
|
964
|
+
}
|
|
965
|
+
const y = o?._state || o;
|
|
966
|
+
return U(y, e);
|
|
967
|
+
}, m = b();
|
|
968
|
+
let C = "text";
|
|
969
|
+
i instanceof HTMLInputElement ? C = s?.type || i.type || "text" : i instanceof HTMLSelectElement ? C = "select" : i instanceof HTMLTextAreaElement && (C = "textarea");
|
|
970
|
+
const w = i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement, a = w ? C === "checkbox" || C === "radio" ? "checked" : "value" : c ?? "modelValue";
|
|
971
|
+
if (C === "checkbox")
|
|
972
|
+
if (Array.isArray(m))
|
|
973
|
+
t[a] = m.includes(
|
|
974
|
+
String(i?.getAttribute("value") ?? s?.value ?? "")
|
|
975
975
|
);
|
|
976
976
|
else {
|
|
977
|
-
const
|
|
978
|
-
t[a] =
|
|
979
|
-
}
|
|
980
|
-
else if (
|
|
981
|
-
t[a] =
|
|
982
|
-
else if (
|
|
983
|
-
if (
|
|
984
|
-
const
|
|
977
|
+
const y = i?.getAttribute("true-value") ?? !0;
|
|
978
|
+
t[a] = m === y;
|
|
979
|
+
}
|
|
980
|
+
else if (C === "radio")
|
|
981
|
+
t[a] = m === (s?.value ?? "");
|
|
982
|
+
else if (C === "select")
|
|
983
|
+
if (i && i.hasAttribute("multiple") && i instanceof HTMLSelectElement) {
|
|
984
|
+
const y = Array.isArray(m) ? m.map(String) : [];
|
|
985
985
|
setTimeout(() => {
|
|
986
|
-
Array.from(
|
|
987
|
-
|
|
986
|
+
Array.from(i.options).forEach((p) => {
|
|
987
|
+
p.selected = y.includes(p.value);
|
|
988
988
|
});
|
|
989
|
-
}, 0), t[a] = Array.isArray(
|
|
989
|
+
}, 0), t[a] = Array.isArray(m) ? m : [];
|
|
990
990
|
} else
|
|
991
|
-
t[a] =
|
|
991
|
+
t[a] = m;
|
|
992
992
|
else {
|
|
993
|
-
!
|
|
993
|
+
!w && M(e) ? t[a] = e : t[a] = m;
|
|
994
994
|
try {
|
|
995
|
-
const
|
|
996
|
-
s && (s[
|
|
995
|
+
const y = J(a);
|
|
996
|
+
s && (s[y] = m);
|
|
997
997
|
} catch {
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
const
|
|
1001
|
-
if (
|
|
1000
|
+
const v = f || C === "checkbox" || C === "radio" || C === "select" ? "change" : "input", h = (y) => {
|
|
1001
|
+
if (y.isComposing || r._isComposing)
|
|
1002
1002
|
return;
|
|
1003
|
-
const
|
|
1004
|
-
if (
|
|
1003
|
+
const p = globalThis.process, _ = !!p && p.env?.NODE_ENV === "test" || typeof window < "u" && globalThis.__vitest__;
|
|
1004
|
+
if (y.isTrusted === !1 && !_)
|
|
1005
1005
|
return;
|
|
1006
|
-
const
|
|
1007
|
-
if (!
|
|
1006
|
+
const E = y.target;
|
|
1007
|
+
if (!E || E._modelUpdating)
|
|
1008
1008
|
return;
|
|
1009
|
-
let
|
|
1010
|
-
if (
|
|
1011
|
-
const l =
|
|
1009
|
+
let T = E.value;
|
|
1010
|
+
if (C === "checkbox") {
|
|
1011
|
+
const l = b();
|
|
1012
1012
|
if (Array.isArray(l)) {
|
|
1013
|
-
const
|
|
1014
|
-
if (
|
|
1015
|
-
A.includes(
|
|
1013
|
+
const g = E.getAttribute("value") ?? "", A = Array.from(l);
|
|
1014
|
+
if (E.checked)
|
|
1015
|
+
A.includes(g) || A.push(g);
|
|
1016
1016
|
else {
|
|
1017
|
-
const N = A.indexOf(
|
|
1017
|
+
const N = A.indexOf(g);
|
|
1018
1018
|
N > -1 && A.splice(N, 1);
|
|
1019
1019
|
}
|
|
1020
|
-
|
|
1020
|
+
T = A;
|
|
1021
1021
|
} else {
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1022
|
+
const g = E.getAttribute("true-value") ?? !0, A = E.getAttribute("false-value") ?? !1;
|
|
1023
|
+
T = E.checked ? g : A;
|
|
1024
1024
|
}
|
|
1025
|
-
} else if (
|
|
1026
|
-
|
|
1027
|
-
else if (
|
|
1028
|
-
|
|
1025
|
+
} else if (C === "radio")
|
|
1026
|
+
T = E.getAttribute("value") ?? E.value;
|
|
1027
|
+
else if (C === "select" && E.multiple)
|
|
1028
|
+
T = Array.from(E.selectedOptions).map(
|
|
1029
1029
|
(l) => l.value
|
|
1030
1030
|
);
|
|
1031
|
-
else if (u && typeof
|
|
1032
|
-
const l = Number(
|
|
1033
|
-
isNaN(l) || (
|
|
1031
|
+
else if (u && typeof T == "string" && (T = T.trim()), S) {
|
|
1032
|
+
const l = Number(T);
|
|
1033
|
+
isNaN(l) || (T = l);
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1036
|
-
if (He(
|
|
1037
|
-
|
|
1035
|
+
const d = b();
|
|
1036
|
+
if (He(T, d)) {
|
|
1037
|
+
E._modelUpdating = !0;
|
|
1038
1038
|
try {
|
|
1039
|
-
tt(
|
|
1039
|
+
tt(M(e), e, T, o, c), xe(o, M(e), e, T), E && Pt(E, a, T);
|
|
1040
1040
|
} finally {
|
|
1041
1041
|
setTimeout(
|
|
1042
|
-
() =>
|
|
1042
|
+
() => E._modelUpdating = !1,
|
|
1043
1043
|
0
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
1047
|
};
|
|
1048
|
-
if (
|
|
1049
|
-
if (r[
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1048
|
+
if (w) {
|
|
1049
|
+
if (r[v]) {
|
|
1050
|
+
const y = r[v];
|
|
1051
|
+
i && te.removeListener(i, v, y);
|
|
1052
1052
|
}
|
|
1053
|
-
r[
|
|
1053
|
+
r[v] = h;
|
|
1054
1054
|
} else {
|
|
1055
|
-
const
|
|
1056
|
-
if (r[
|
|
1057
|
-
const _ = r[
|
|
1058
|
-
|
|
1059
|
-
}
|
|
1060
|
-
if (r[
|
|
1061
|
-
const _ = r[
|
|
1062
|
-
|
|
1063
|
-
}
|
|
1064
|
-
if (r[
|
|
1065
|
-
const
|
|
1066
|
-
let
|
|
1067
|
-
if (
|
|
1055
|
+
const y = `update:${J(a)}`, p = `update:${a}`;
|
|
1056
|
+
if (r[y]) {
|
|
1057
|
+
const _ = r[y];
|
|
1058
|
+
i && te.removeListener(i, y, _);
|
|
1059
|
+
}
|
|
1060
|
+
if (r[p]) {
|
|
1061
|
+
const _ = r[p];
|
|
1062
|
+
i && te.removeListener(i, p, _);
|
|
1063
|
+
}
|
|
1064
|
+
if (r[y] = (_) => {
|
|
1065
|
+
const E = _.detail;
|
|
1066
|
+
let T = E !== void 0 ? E : void 0;
|
|
1067
|
+
if (T === void 0) {
|
|
1068
1068
|
const l = _.target;
|
|
1069
1069
|
if (l && typeof l == "object" && "value" in l)
|
|
1070
1070
|
try {
|
|
1071
|
-
|
|
1071
|
+
T = l.value;
|
|
1072
1072
|
} catch {
|
|
1073
|
-
|
|
1073
|
+
T = void 0;
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1076
|
+
const d = jt(
|
|
1077
|
+
M(e),
|
|
1078
1078
|
e,
|
|
1079
|
-
|
|
1079
|
+
o,
|
|
1080
1080
|
c
|
|
1081
1081
|
);
|
|
1082
|
-
if (He(
|
|
1083
|
-
tt(
|
|
1082
|
+
if (He(T, d)) {
|
|
1083
|
+
tt(M(e), e, T, o, c), xe(o, M(e), e, T);
|
|
1084
1084
|
const l = _.target;
|
|
1085
1085
|
l && nt(
|
|
1086
1086
|
l,
|
|
1087
1087
|
a,
|
|
1088
|
-
|
|
1089
|
-
|
|
1088
|
+
M(e) ? e : T,
|
|
1089
|
+
M(e)
|
|
1090
1090
|
);
|
|
1091
1091
|
}
|
|
1092
|
-
},
|
|
1092
|
+
}, M(e) && typeof e.value == "object" && e.value !== null) {
|
|
1093
1093
|
let _ = [];
|
|
1094
1094
|
try {
|
|
1095
1095
|
_ = Reflect.ownKeys(e.value);
|
|
1096
1096
|
} catch {
|
|
1097
1097
|
_ = Object.keys(e.value);
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1100
|
-
(
|
|
1099
|
+
const E = _.filter(
|
|
1100
|
+
(T) => typeof T == "string" && !String(T).startsWith("_") && T !== "constructor"
|
|
1101
1101
|
);
|
|
1102
|
-
for (const
|
|
1103
|
-
const
|
|
1104
|
-
r[k] || (r[k] = (
|
|
1105
|
-
const A =
|
|
1106
|
-
|
|
1102
|
+
for (const T of E) {
|
|
1103
|
+
const d = String(T), k = `update:${J(d)}`, l = `update:${d}`;
|
|
1104
|
+
r[k] || (r[k] = (g) => {
|
|
1105
|
+
const A = g.detail !== void 0 ? g.detail : g.target?.value, N = M(e) ? e.value[d] : U(
|
|
1106
|
+
o?._state || o,
|
|
1107
1107
|
e
|
|
1108
1108
|
);
|
|
1109
1109
|
if (!He(A, N)) return;
|
|
1110
|
-
if (
|
|
1110
|
+
if (M(e)) {
|
|
1111
1111
|
const R = {
|
|
1112
1112
|
...e.value
|
|
1113
1113
|
};
|
|
1114
|
-
R[
|
|
1114
|
+
R[d] = A, e.value = R;
|
|
1115
1115
|
} else
|
|
1116
1116
|
Re(
|
|
1117
|
-
|
|
1117
|
+
o?._state || o,
|
|
1118
1118
|
e,
|
|
1119
1119
|
A
|
|
1120
1120
|
);
|
|
1121
|
-
xe(
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
|
|
1121
|
+
xe(o, M(e), e, A);
|
|
1122
|
+
const j = g.currentTarget || i || g.target;
|
|
1123
|
+
j && nt(
|
|
1124
|
+
j,
|
|
1125
1125
|
a,
|
|
1126
|
-
|
|
1127
|
-
|
|
1126
|
+
M(e) ? e : A,
|
|
1127
|
+
M(e)
|
|
1128
1128
|
);
|
|
1129
1129
|
}, r[l] = r[k]);
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
r[
|
|
1132
|
+
r[p] = r[y];
|
|
1133
1133
|
}
|
|
1134
|
-
(
|
|
1134
|
+
(C === "text" || C === "textarea") && (r.compositionstart = () => r._isComposing = !0, r.compositionend = (y) => {
|
|
1135
1135
|
r._isComposing = !1;
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1138
|
-
const _ =
|
|
1139
|
-
let
|
|
1140
|
-
if (u && (
|
|
1141
|
-
const l = Number(
|
|
1142
|
-
isNaN(l) || (
|
|
1143
|
-
}
|
|
1144
|
-
if (He(
|
|
1145
|
-
|
|
1136
|
+
const p = y.target;
|
|
1137
|
+
p && setTimeout(() => {
|
|
1138
|
+
const _ = p.value, E = o?._state || o, T = U(E, e);
|
|
1139
|
+
let d = _;
|
|
1140
|
+
if (u && (d = d.trim()), S) {
|
|
1141
|
+
const l = Number(d);
|
|
1142
|
+
isNaN(l) || (d = l);
|
|
1143
|
+
}
|
|
1144
|
+
if (He(d, T)) {
|
|
1145
|
+
p._modelUpdating = !0;
|
|
1146
1146
|
try {
|
|
1147
|
-
Re(
|
|
1147
|
+
Re(E, e, d), xe(o, M(e), e, d);
|
|
1148
1148
|
} finally {
|
|
1149
1149
|
setTimeout(
|
|
1150
|
-
() =>
|
|
1150
|
+
() => p._modelUpdating = !1,
|
|
1151
1151
|
0
|
|
1152
1152
|
);
|
|
1153
1153
|
}
|
|
@@ -1161,50 +1161,50 @@ function pt(e) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
function Rt(e, n, t, s, r) {
|
|
1163
1163
|
if (typeof e == "object" && e !== null)
|
|
1164
|
-
for (const [
|
|
1165
|
-
if (
|
|
1166
|
-
t[
|
|
1167
|
-
else if (
|
|
1168
|
-
const c =
|
|
1164
|
+
for (const [o, i] of Object.entries(e))
|
|
1165
|
+
if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
|
|
1166
|
+
t[o] = i;
|
|
1167
|
+
else if (o === "disabled" && r && X(r)) {
|
|
1168
|
+
const c = i && typeof i == "object" && "value" in i;
|
|
1169
1169
|
(() => {
|
|
1170
1170
|
try {
|
|
1171
|
-
return
|
|
1171
|
+
return M(i);
|
|
1172
1172
|
} catch {
|
|
1173
1173
|
return !1;
|
|
1174
1174
|
}
|
|
1175
|
-
})() || c ? n[
|
|
1175
|
+
})() || c ? n[o] = i : t[o] = i;
|
|
1176
1176
|
} else
|
|
1177
|
-
n[
|
|
1177
|
+
n[o] = i;
|
|
1178
1178
|
else if (typeof e == "string") {
|
|
1179
1179
|
if (!s) return;
|
|
1180
1180
|
try {
|
|
1181
|
-
const
|
|
1182
|
-
if (typeof
|
|
1183
|
-
for (const [
|
|
1184
|
-
if (
|
|
1185
|
-
t[
|
|
1186
|
-
else if (
|
|
1181
|
+
const o = Pe(e, s);
|
|
1182
|
+
if (typeof o == "object" && o !== null) {
|
|
1183
|
+
for (const [i, c] of Object.entries(o))
|
|
1184
|
+
if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
|
|
1185
|
+
t[i] = c;
|
|
1186
|
+
else if (i === "disabled" && r && X(r)) {
|
|
1187
1187
|
const f = c && typeof c == "object" && "value" in c;
|
|
1188
1188
|
(() => {
|
|
1189
1189
|
try {
|
|
1190
|
-
return
|
|
1190
|
+
return M(c);
|
|
1191
1191
|
} catch {
|
|
1192
1192
|
return !1;
|
|
1193
1193
|
}
|
|
1194
|
-
})() || f ? n[
|
|
1194
|
+
})() || f ? n[i] = c : t[i] = c;
|
|
1195
1195
|
} else
|
|
1196
|
-
n[
|
|
1196
|
+
n[i] = c;
|
|
1197
1197
|
return;
|
|
1198
1198
|
} else {
|
|
1199
|
-
t[e] =
|
|
1199
|
+
t[e] = o;
|
|
1200
1200
|
return;
|
|
1201
1201
|
}
|
|
1202
1202
|
} catch {
|
|
1203
|
-
const
|
|
1203
|
+
const o = U(
|
|
1204
1204
|
s,
|
|
1205
1205
|
e
|
|
1206
1206
|
);
|
|
1207
|
-
t[e] =
|
|
1207
|
+
t[e] = o;
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
@@ -1212,40 +1212,40 @@ function Bt(e, n, t) {
|
|
|
1212
1212
|
let s;
|
|
1213
1213
|
if (typeof e == "string") {
|
|
1214
1214
|
if (!t) return;
|
|
1215
|
-
s =
|
|
1215
|
+
s = Pe(e, t);
|
|
1216
1216
|
} else
|
|
1217
1217
|
s = e;
|
|
1218
1218
|
const r = String(n.style || "");
|
|
1219
|
-
let
|
|
1219
|
+
let o = r;
|
|
1220
1220
|
if (s) {
|
|
1221
1221
|
if (r) {
|
|
1222
|
-
const
|
|
1222
|
+
const i = String(r).split(";").map((f) => f.trim()).filter(Boolean), c = i.findIndex(
|
|
1223
1223
|
(f) => f.startsWith("display:")
|
|
1224
1224
|
);
|
|
1225
|
-
c >= 0 &&
|
|
1225
|
+
c >= 0 && i[c] === "display: none" && (i.splice(c, 1), o = i.length > 0 ? i.join("; ") + ";" : "");
|
|
1226
1226
|
}
|
|
1227
1227
|
} else if (r) {
|
|
1228
|
-
const
|
|
1228
|
+
const i = String(r).split(";").filter(Boolean), c = i.findIndex(
|
|
1229
1229
|
(f) => f.trim().startsWith("display:")
|
|
1230
1230
|
);
|
|
1231
|
-
c >= 0 ?
|
|
1231
|
+
c >= 0 ? i[c] = "display: none" : i.push("display: none"), o = i.join("; ");
|
|
1232
1232
|
} else
|
|
1233
|
-
|
|
1234
|
-
|
|
1233
|
+
o = "display: none";
|
|
1234
|
+
o !== r && (o ? n.style = o : n.style = void 0);
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1236
|
+
function Pe(e, n) {
|
|
1237
1237
|
return Ot.evaluate(e, n);
|
|
1238
1238
|
}
|
|
1239
1239
|
function Dt(e, n, t, s) {
|
|
1240
1240
|
let r;
|
|
1241
1241
|
if (typeof e == "string") {
|
|
1242
1242
|
if (!t) return;
|
|
1243
|
-
r =
|
|
1243
|
+
r = Pe(e, t);
|
|
1244
1244
|
} else
|
|
1245
1245
|
r = e;
|
|
1246
1246
|
try {
|
|
1247
1247
|
if (r && typeof r == "object") {
|
|
1248
|
-
if (
|
|
1248
|
+
if (M(r))
|
|
1249
1249
|
r = r.value;
|
|
1250
1250
|
else if ("value" in r && typeof r.value < "u") {
|
|
1251
1251
|
const u = r.value;
|
|
@@ -1254,15 +1254,15 @@ function Dt(e, n, t, s) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
} catch {
|
|
1256
1256
|
}
|
|
1257
|
-
let
|
|
1257
|
+
let o = [];
|
|
1258
1258
|
if (typeof r == "string")
|
|
1259
|
-
|
|
1259
|
+
o = [r];
|
|
1260
1260
|
else if (Array.isArray(r))
|
|
1261
|
-
|
|
1261
|
+
o = r.filter(Boolean);
|
|
1262
1262
|
else if (typeof r == "object" && r !== null)
|
|
1263
1263
|
for (const [u, S] of Object.entries(r))
|
|
1264
|
-
S &&
|
|
1265
|
-
const
|
|
1264
|
+
S && o.push(u);
|
|
1265
|
+
const i = o.join(" "), c = s && s.class || n.class || "", f = c ? `${c} ${i}`.trim() : i.trim();
|
|
1266
1266
|
f ? n.class = f : n.class = void 0;
|
|
1267
1267
|
}
|
|
1268
1268
|
function Ve(e) {
|
|
@@ -1282,19 +1282,19 @@ function Wt(e, n, t) {
|
|
|
1282
1282
|
let s;
|
|
1283
1283
|
if (typeof e == "string") {
|
|
1284
1284
|
if (!t) return;
|
|
1285
|
-
s =
|
|
1285
|
+
s = Pe(e, t);
|
|
1286
1286
|
} else
|
|
1287
1287
|
s = e;
|
|
1288
1288
|
let r = "";
|
|
1289
1289
|
if (typeof s == "string")
|
|
1290
1290
|
r = s;
|
|
1291
1291
|
else if (s && typeof s == "object") {
|
|
1292
|
-
const
|
|
1292
|
+
const i = [];
|
|
1293
1293
|
for (const [c, f] of Object.entries(s))
|
|
1294
1294
|
if (f != null && f !== "") {
|
|
1295
1295
|
const u = c.replace(
|
|
1296
1296
|
/[A-Z]/g,
|
|
1297
|
-
(
|
|
1297
|
+
(m) => `-${m.toLowerCase()}`
|
|
1298
1298
|
), S = [
|
|
1299
1299
|
"width",
|
|
1300
1300
|
"height",
|
|
@@ -1321,49 +1321,49 @@ function Wt(e, n, t) {
|
|
|
1321
1321
|
"min-height",
|
|
1322
1322
|
"max-height"
|
|
1323
1323
|
];
|
|
1324
|
-
let
|
|
1325
|
-
typeof f == "number" && S.includes(u) && (
|
|
1324
|
+
let b = String(f);
|
|
1325
|
+
typeof f == "number" && S.includes(u) && (b = `${f}px`), i.push(`${u}: ${b}`);
|
|
1326
1326
|
}
|
|
1327
|
-
r =
|
|
1327
|
+
r = i.join("; ") + (i.length > 0 ? ";" : "");
|
|
1328
1328
|
}
|
|
1329
|
-
const
|
|
1330
|
-
n.style =
|
|
1329
|
+
const o = String(n.style || "");
|
|
1330
|
+
n.style = o + (o && !o.endsWith(";") ? "; " : "") + r;
|
|
1331
1331
|
}
|
|
1332
1332
|
function zt(e, n, t) {
|
|
1333
1333
|
let s = e;
|
|
1334
|
-
typeof e == "string" && t && (s =
|
|
1334
|
+
typeof e == "string" && t && (s = Pe(e, t)), M(s) ? n.reactiveRef = s : n.ref = s;
|
|
1335
1335
|
}
|
|
1336
1336
|
function dt(e, n, t, s) {
|
|
1337
|
-
const r = {},
|
|
1337
|
+
const r = {}, o = { ...s || {} }, i = {};
|
|
1338
1338
|
for (const [c, f] of Object.entries(e)) {
|
|
1339
|
-
const { value: u, modifiers: S, arg:
|
|
1339
|
+
const { value: u, modifiers: S, arg: b } = f;
|
|
1340
1340
|
if (c === "model" || c.startsWith("model:")) {
|
|
1341
|
-
const
|
|
1341
|
+
const m = c.split(":"), C = m.length > 1 ? m[1] : b;
|
|
1342
1342
|
It(
|
|
1343
1343
|
u,
|
|
1344
1344
|
// Pass the original value (could be string or reactive state object)
|
|
1345
1345
|
S,
|
|
1346
1346
|
r,
|
|
1347
|
-
i,
|
|
1348
1347
|
o,
|
|
1348
|
+
i,
|
|
1349
1349
|
n,
|
|
1350
1350
|
t,
|
|
1351
|
-
|
|
1351
|
+
C
|
|
1352
1352
|
);
|
|
1353
1353
|
continue;
|
|
1354
1354
|
}
|
|
1355
1355
|
switch (c) {
|
|
1356
1356
|
case "bind":
|
|
1357
|
-
Rt(u, r,
|
|
1357
|
+
Rt(u, r, o, n, t);
|
|
1358
1358
|
break;
|
|
1359
1359
|
case "show":
|
|
1360
|
-
Bt(u,
|
|
1360
|
+
Bt(u, o, n);
|
|
1361
1361
|
break;
|
|
1362
1362
|
case "class":
|
|
1363
|
-
Dt(u,
|
|
1363
|
+
Dt(u, o, n, s);
|
|
1364
1364
|
break;
|
|
1365
1365
|
case "style":
|
|
1366
|
-
Wt(u,
|
|
1366
|
+
Wt(u, o, n);
|
|
1367
1367
|
break;
|
|
1368
1368
|
case "ref":
|
|
1369
1369
|
zt(u, r, n);
|
|
@@ -1375,15 +1375,15 @@ function dt(e, n, t, s) {
|
|
|
1375
1375
|
const f = r.disabled, u = f && typeof f == "object" && "value" in f;
|
|
1376
1376
|
let S = !1;
|
|
1377
1377
|
try {
|
|
1378
|
-
S =
|
|
1378
|
+
S = M(f);
|
|
1379
1379
|
} catch {
|
|
1380
1380
|
S = !1;
|
|
1381
1381
|
}
|
|
1382
1382
|
if (!u && !S)
|
|
1383
1383
|
try {
|
|
1384
|
-
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1384
|
+
o.disabled = f, delete r.disabled;
|
|
1385
|
+
const b = globalThis;
|
|
1386
|
+
b.__VDOM_DISABLED_PROMOTIONS || (b.__VDOM_DISABLED_PROMOTIONS = []), b.__VDOM_DISABLED_PROMOTIONS.push({
|
|
1387
1387
|
phase: "bind-directive:postfix-move",
|
|
1388
1388
|
location: "attrs",
|
|
1389
1389
|
key: "disabled",
|
|
@@ -1396,34 +1396,34 @@ function dt(e, n, t, s) {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
} catch {
|
|
1398
1398
|
}
|
|
1399
|
-
return { props: r, attrs:
|
|
1399
|
+
return { props: r, attrs: o, listeners: i };
|
|
1400
1400
|
}
|
|
1401
1401
|
function qe(e, n) {
|
|
1402
1402
|
if (Array.isArray(e)) {
|
|
1403
|
-
const
|
|
1404
|
-
return e.map((
|
|
1405
|
-
if (!
|
|
1406
|
-
let c =
|
|
1403
|
+
const o = /* @__PURE__ */ new Set();
|
|
1404
|
+
return e.map((i) => {
|
|
1405
|
+
if (!i || typeof i != "object") return i;
|
|
1406
|
+
let c = i.props?.key ?? i.key;
|
|
1407
1407
|
if (!c) {
|
|
1408
|
-
const
|
|
1408
|
+
const b = i.tag || "node", C = [
|
|
1409
1409
|
// attrs (kebab-case)
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1410
|
+
i.props?.attrs?.id,
|
|
1411
|
+
i.props?.attrs?.name,
|
|
1412
|
+
i.props?.attrs?.["data-key"],
|
|
1413
1413
|
// promoted JS props (camelCase or original)
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
].find((
|
|
1419
|
-
c =
|
|
1414
|
+
i.props?.props?.id,
|
|
1415
|
+
i.props?.props?.name,
|
|
1416
|
+
i.props?.props?.dataKey,
|
|
1417
|
+
i.props?.props?.["data-key"]
|
|
1418
|
+
].find((w) => w != null) ?? "";
|
|
1419
|
+
c = C ? `${n}:${b}:${C}` : `${n}:${b}`;
|
|
1420
1420
|
}
|
|
1421
1421
|
let f = c, u = 1;
|
|
1422
|
-
for (;
|
|
1422
|
+
for (; o.has(f); )
|
|
1423
1423
|
f = `${c}#${u++}`;
|
|
1424
|
-
|
|
1425
|
-
let S =
|
|
1426
|
-
return Array.isArray(S) && (S = qe(S, f)), { ...
|
|
1424
|
+
o.add(f);
|
|
1425
|
+
let S = i.children;
|
|
1426
|
+
return Array.isArray(S) && (S = qe(S, f)), { ...i, key: f, children: S };
|
|
1427
1427
|
});
|
|
1428
1428
|
}
|
|
1429
1429
|
const t = e, s = t.props?.key ?? t.key ?? n;
|
|
@@ -1431,113 +1431,120 @@ function qe(e, n) {
|
|
|
1431
1431
|
return Array.isArray(r) && (r = qe(r, s)), { ...t, key: s, children: r };
|
|
1432
1432
|
}
|
|
1433
1433
|
function rt(e, n, t, s) {
|
|
1434
|
-
const r = t.directives ?? {}, i = dt(
|
|
1434
|
+
const r = t.directives ?? {}, o = t.attrs ? { ...t.attrs } : {}, i = dt(
|
|
1435
1435
|
r,
|
|
1436
1436
|
s,
|
|
1437
1437
|
e,
|
|
1438
|
-
|
|
1439
|
-
),
|
|
1438
|
+
o
|
|
1439
|
+
), c = {
|
|
1440
1440
|
...n.props || {},
|
|
1441
1441
|
...t.props || {},
|
|
1442
1442
|
...i.props || {}
|
|
1443
|
-
},
|
|
1443
|
+
}, f = {
|
|
1444
1444
|
...n.attrs || {},
|
|
1445
|
-
...
|
|
1445
|
+
...o || {},
|
|
1446
1446
|
...i.attrs || {}
|
|
1447
|
-
},
|
|
1448
|
-
let
|
|
1449
|
-
for (const
|
|
1450
|
-
const v =
|
|
1451
|
-
let
|
|
1447
|
+
}, u = n.props ?? {}, S = c, b = !!(t?.isCustomElement ?? n?.isCustomElement ?? !1);
|
|
1448
|
+
let m = !1;
|
|
1449
|
+
for (const a in { ...u, ...S }) {
|
|
1450
|
+
const v = u[a], h = S[a];
|
|
1451
|
+
let y = v, p = h;
|
|
1452
1452
|
if (H(() => {
|
|
1453
|
-
(
|
|
1453
|
+
(M(v) || me(v)) && (y = v.value);
|
|
1454
1454
|
}), H(() => {
|
|
1455
|
-
(
|
|
1456
|
-
}), !(v ===
|
|
1457
|
-
if (
|
|
1458
|
-
const
|
|
1459
|
-
e.value !==
|
|
1460
|
-
} else if (
|
|
1461
|
-
const
|
|
1462
|
-
e.checked = !!
|
|
1463
|
-
} else if (
|
|
1464
|
-
const
|
|
1465
|
-
typeof v == "function" && te.removeListener(e,
|
|
1455
|
+
(M(h) || me(h)) && (p = h.value);
|
|
1456
|
+
}), !(v === h && y === p))
|
|
1457
|
+
if (m = !0, a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
|
|
1458
|
+
const _ = Fe(h), E = _ == null ? "" : String(_);
|
|
1459
|
+
e.value !== E && (e.value = E);
|
|
1460
|
+
} else if (a === "checked" && e instanceof HTMLInputElement) {
|
|
1461
|
+
const _ = Fe(h);
|
|
1462
|
+
e.checked = !!_;
|
|
1463
|
+
} else if (a.startsWith("on") && typeof h == "function") {
|
|
1464
|
+
const _ = pt(a);
|
|
1465
|
+
typeof v == "function" && te.removeListener(e, _, v), typeof h == "function" && te.addListener(e, _, h);
|
|
1466
1466
|
try {
|
|
1467
|
-
if (
|
|
1468
|
-
const
|
|
1469
|
-
let
|
|
1467
|
+
if (_ && _.startsWith("update:")) {
|
|
1468
|
+
const E = _.split(":", 2)[1], T = S[E];
|
|
1469
|
+
let d = [];
|
|
1470
1470
|
try {
|
|
1471
|
-
if (
|
|
1472
|
-
const
|
|
1473
|
-
|
|
1474
|
-
} else
|
|
1471
|
+
if (M(T)) {
|
|
1472
|
+
const l = T.value;
|
|
1473
|
+
d = l && typeof l == "object" ? Object.keys(l) : [];
|
|
1474
|
+
} else T && typeof T == "object" && (d = Object.keys(T));
|
|
1475
1475
|
} catch {
|
|
1476
|
-
|
|
1476
|
+
d = [];
|
|
1477
1477
|
}
|
|
1478
|
-
const
|
|
1479
|
-
(
|
|
1478
|
+
const k = d.filter(
|
|
1479
|
+
(l) => typeof l == "string" && !l.startsWith("_") && l !== "constructor"
|
|
1480
1480
|
);
|
|
1481
|
-
for (const
|
|
1482
|
-
const
|
|
1483
|
-
const
|
|
1481
|
+
for (const l of k) {
|
|
1482
|
+
const g = `update:${l}`, A = (N) => {
|
|
1483
|
+
const O = N.detail !== void 0 ? N.detail : N.target instanceof HTMLInputElement || N.target instanceof HTMLTextAreaElement || N.target instanceof HTMLSelectElement ? N.target.value : void 0, R = { ...M(T) ? T.value || {} : S[E] || {}, [l]: O };
|
|
1484
1484
|
try {
|
|
1485
|
-
typeof
|
|
1486
|
-
detail:
|
|
1485
|
+
typeof h == "function" && h({
|
|
1486
|
+
detail: R
|
|
1487
1487
|
});
|
|
1488
1488
|
} catch {
|
|
1489
1489
|
}
|
|
1490
1490
|
};
|
|
1491
1491
|
H(() => {
|
|
1492
|
-
te.addListener(e,
|
|
1492
|
+
te.addListener(e, g, A);
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
} catch {
|
|
1497
1497
|
}
|
|
1498
|
-
} else if (
|
|
1499
|
-
q(e,
|
|
1498
|
+
} else if (h == null)
|
|
1499
|
+
q(e, a);
|
|
1500
1500
|
else {
|
|
1501
|
-
const
|
|
1502
|
-
if (
|
|
1501
|
+
const _ = t?.isCustomElement ?? n?.isCustomElement ?? !1;
|
|
1502
|
+
if (_ || a in e)
|
|
1503
1503
|
try {
|
|
1504
|
-
e[
|
|
1504
|
+
e[a] = h, a === "disabled" && h === !1 && !_ && X(e) && q(e, "disabled");
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
1507
|
else
|
|
1508
|
-
|
|
1508
|
+
h === !1 && q(e, a);
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
for (const [
|
|
1511
|
+
for (const [a, v] of Object.entries(
|
|
1512
1512
|
i.listeners || {}
|
|
1513
1513
|
)) {
|
|
1514
|
-
te.addListener(e,
|
|
1514
|
+
te.addListener(e, a, v);
|
|
1515
1515
|
try {
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1516
|
+
const h = e && e.parentElement;
|
|
1517
|
+
h && h !== e && te.addListener(
|
|
1518
|
+
h,
|
|
1518
1519
|
a,
|
|
1519
|
-
p,
|
|
1520
1520
|
v
|
|
1521
1521
|
);
|
|
1522
1522
|
} catch {
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1525
|
+
const C = { ...n.attrs ?? {} }, w = f, L = i && i.attrs || {};
|
|
1526
|
+
if (Object.prototype.hasOwnProperty.call(L, "class") && typeof e.getAttribute == "function") {
|
|
1527
|
+
const a = e.getAttribute("class");
|
|
1528
|
+
a !== null && (C.class = a);
|
|
1529
|
+
}
|
|
1530
|
+
if (Object.prototype.hasOwnProperty.call(L, "style") && typeof e.getAttribute == "function") {
|
|
1531
|
+
const a = e.getAttribute("style");
|
|
1532
|
+
a !== null && (C.style = a);
|
|
1533
|
+
}
|
|
1526
1534
|
try {
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
v !== null && (g.class = v);
|
|
1535
|
+
if (Object.prototype.hasOwnProperty.call(L, "class") && L.class === void 0 && typeof e.getAttribute == "function") {
|
|
1536
|
+
const a = e.getAttribute("class");
|
|
1537
|
+
a !== null && (C.class = a);
|
|
1531
1538
|
}
|
|
1532
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1539
|
+
if (Object.prototype.hasOwnProperty.call(L, "style") && L.style === void 0 && typeof e.getAttribute == "function") {
|
|
1540
|
+
const a = e.getAttribute("style");
|
|
1541
|
+
a !== null && (C.style = a);
|
|
1535
1542
|
}
|
|
1536
1543
|
try {
|
|
1537
1544
|
if (typeof e.getAttribute == "function") {
|
|
1538
|
-
const
|
|
1545
|
+
const a = e.getAttribute("class");
|
|
1539
1546
|
try {
|
|
1540
|
-
e instanceof HTMLInputElement && e.type === "text" &&
|
|
1547
|
+
e instanceof HTMLInputElement && e.type === "text" && a !== null && a !== C.class && (C.class = a);
|
|
1541
1548
|
} catch {
|
|
1542
1549
|
}
|
|
1543
1550
|
}
|
|
@@ -1545,127 +1552,127 @@ function rt(e, n, t, s) {
|
|
|
1545
1552
|
}
|
|
1546
1553
|
} catch {
|
|
1547
1554
|
}
|
|
1548
|
-
for (const
|
|
1549
|
-
const v =
|
|
1550
|
-
let
|
|
1551
|
-
if (
|
|
1552
|
-
if (
|
|
1555
|
+
for (const a in { ...C, ...w }) {
|
|
1556
|
+
const v = C[a], h = w[a];
|
|
1557
|
+
let y = v, p = h;
|
|
1558
|
+
if (M(v) && (y = v.value), M(h) && (p = h.value), y !== p)
|
|
1559
|
+
if (m = !0, p == null || p === !1)
|
|
1553
1560
|
H(() => {
|
|
1554
|
-
q(e,
|
|
1555
|
-
}), se(n,
|
|
1561
|
+
q(e, a);
|
|
1562
|
+
}), se(n, a, void 0), a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? H(() => {
|
|
1556
1563
|
e.value = "";
|
|
1557
1564
|
}) : e instanceof HTMLSelectElement ? H(() => {
|
|
1558
1565
|
e.value = "";
|
|
1559
1566
|
}) : e instanceof HTMLProgressElement && H(() => {
|
|
1560
1567
|
e.value = 0;
|
|
1561
|
-
})),
|
|
1568
|
+
})), a === "checked" && e instanceof HTMLInputElement && H(() => {
|
|
1562
1569
|
e.checked = !1;
|
|
1563
|
-
}),
|
|
1570
|
+
}), a === "disabled" && X(e) && H(() => {
|
|
1564
1571
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = !1);
|
|
1565
1572
|
});
|
|
1566
1573
|
else {
|
|
1567
|
-
if (
|
|
1574
|
+
if (a === "value") {
|
|
1568
1575
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
1569
1576
|
H(() => {
|
|
1570
|
-
e.value =
|
|
1577
|
+
e.value = p ?? "";
|
|
1571
1578
|
});
|
|
1572
1579
|
continue;
|
|
1573
1580
|
} else if (e instanceof HTMLSelectElement) {
|
|
1574
1581
|
H(() => {
|
|
1575
|
-
e.value =
|
|
1582
|
+
e.value = p ?? "";
|
|
1576
1583
|
});
|
|
1577
1584
|
continue;
|
|
1578
1585
|
} else if (e instanceof HTMLProgressElement) {
|
|
1579
1586
|
H(() => {
|
|
1580
|
-
e.value = Number(
|
|
1587
|
+
e.value = Number(p);
|
|
1581
1588
|
});
|
|
1582
1589
|
continue;
|
|
1583
1590
|
}
|
|
1584
1591
|
}
|
|
1585
|
-
if (
|
|
1592
|
+
if (a === "checked" && e instanceof HTMLInputElement) {
|
|
1586
1593
|
H(() => {
|
|
1587
|
-
e.checked = !!
|
|
1594
|
+
e.checked = !!p;
|
|
1588
1595
|
});
|
|
1589
1596
|
continue;
|
|
1590
1597
|
}
|
|
1591
|
-
if (
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1598
|
+
if (a === "style") {
|
|
1599
|
+
const E = F(p);
|
|
1600
|
+
E !== null && D(e, a, String(E)), se(n, a, p);
|
|
1594
1601
|
continue;
|
|
1595
1602
|
}
|
|
1596
|
-
if (
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1603
|
+
if (a === "class") {
|
|
1604
|
+
const E = F(p);
|
|
1605
|
+
E !== null && D(e, a, String(E)), se(n, a, p);
|
|
1599
1606
|
continue;
|
|
1600
1607
|
}
|
|
1601
|
-
if (
|
|
1608
|
+
if (a === "disabled" && X(e)) {
|
|
1602
1609
|
H(() => {
|
|
1603
|
-
const
|
|
1604
|
-
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled =
|
|
1605
|
-
}), ge(
|
|
1606
|
-
D(e,
|
|
1610
|
+
const E = ge(p);
|
|
1611
|
+
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = E);
|
|
1612
|
+
}), ge(p) ? H(() => {
|
|
1613
|
+
D(e, a, "");
|
|
1607
1614
|
}) : H(() => {
|
|
1608
|
-
q(e,
|
|
1615
|
+
q(e, a);
|
|
1609
1616
|
});
|
|
1610
1617
|
continue;
|
|
1611
1618
|
}
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1614
|
-
if (at(
|
|
1615
|
-
const
|
|
1616
|
-
if (
|
|
1619
|
+
const _ = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1620
|
+
if (b && !_ && a.includes("-"))
|
|
1621
|
+
if (at(a)) {
|
|
1622
|
+
const E = F(h ?? p);
|
|
1623
|
+
if (E !== null) {
|
|
1617
1624
|
try {
|
|
1618
|
-
D(e,
|
|
1625
|
+
D(e, a, String(E));
|
|
1619
1626
|
} catch {
|
|
1620
1627
|
}
|
|
1621
|
-
se(n,
|
|
1628
|
+
se(n, a, p);
|
|
1622
1629
|
}
|
|
1623
1630
|
} else {
|
|
1624
|
-
const
|
|
1631
|
+
const E = Ze(a);
|
|
1625
1632
|
try {
|
|
1626
|
-
const
|
|
1627
|
-
|
|
1633
|
+
const T = e;
|
|
1634
|
+
T[E] = M(h) ? h : p, se(n, a, p);
|
|
1628
1635
|
} catch {
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1636
|
+
const T = F(h ?? p);
|
|
1637
|
+
T !== null && D(e, a, String(T));
|
|
1631
1638
|
}
|
|
1632
1639
|
}
|
|
1633
|
-
else if (!
|
|
1640
|
+
else if (!_ && a in e)
|
|
1634
1641
|
try {
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1642
|
+
const E = e;
|
|
1643
|
+
E[a] = M(h) ? h : p, se(n, a, p);
|
|
1637
1644
|
} catch {
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1645
|
+
const E = F(p);
|
|
1646
|
+
E !== null && (D(e, a, String(E)), se(n, a, p));
|
|
1640
1647
|
}
|
|
1641
1648
|
else {
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1649
|
+
const E = F(p);
|
|
1650
|
+
E !== null && (D(e, a, String(E)), se(n, a, p));
|
|
1644
1651
|
}
|
|
1645
1652
|
}
|
|
1646
1653
|
}
|
|
1647
1654
|
try {
|
|
1648
1655
|
if (X(e)) {
|
|
1649
|
-
const
|
|
1656
|
+
const a = c.disabled;
|
|
1650
1657
|
let v;
|
|
1651
1658
|
try {
|
|
1652
|
-
const
|
|
1659
|
+
const y = Object.prototype.hasOwnProperty.call(
|
|
1653
1660
|
i.props || {},
|
|
1654
1661
|
"disabled"
|
|
1655
|
-
),
|
|
1656
|
-
let
|
|
1662
|
+
), p = a && typeof a == "object" && "value" in a;
|
|
1663
|
+
let _ = !1;
|
|
1657
1664
|
H(() => {
|
|
1658
|
-
|
|
1665
|
+
_ = !!M(a);
|
|
1659
1666
|
});
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1667
|
+
const E = Ve(a);
|
|
1668
|
+
_ || p || y || E ? v = a : v = f.disabled;
|
|
1662
1669
|
} catch {
|
|
1663
|
-
v =
|
|
1670
|
+
v = f.disabled;
|
|
1664
1671
|
}
|
|
1665
|
-
const
|
|
1672
|
+
const h = ge(v);
|
|
1666
1673
|
H(() => {
|
|
1667
|
-
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled =
|
|
1668
|
-
}),
|
|
1674
|
+
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = h);
|
|
1675
|
+
}), h ? H(() => {
|
|
1669
1676
|
D(e, "disabled", "");
|
|
1670
1677
|
}) : H(() => {
|
|
1671
1678
|
q(e, "disabled");
|
|
@@ -1673,12 +1680,12 @@ function rt(e, n, t, s) {
|
|
|
1673
1680
|
}
|
|
1674
1681
|
} catch {
|
|
1675
1682
|
}
|
|
1676
|
-
if (
|
|
1677
|
-
const
|
|
1683
|
+
if (b && m) {
|
|
1684
|
+
const a = e;
|
|
1678
1685
|
H(() => {
|
|
1679
|
-
|
|
1686
|
+
a._applyProps?.(a._cfg);
|
|
1680
1687
|
}), H(() => {
|
|
1681
|
-
typeof
|
|
1688
|
+
typeof a.requestRender == "function" ? a.requestRender() : typeof a._render == "function" && a._render?.(a._cfg);
|
|
1682
1689
|
});
|
|
1683
1690
|
}
|
|
1684
1691
|
}
|
|
@@ -1696,79 +1703,79 @@ function Z(e, n, t, s = null) {
|
|
|
1696
1703
|
return document.createRange().createContextualFragment(a);
|
|
1697
1704
|
}
|
|
1698
1705
|
if (e.tag === "#anchor") {
|
|
1699
|
-
const a = e,
|
|
1700
|
-
a.key != null && (G(
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
for (const _ of
|
|
1704
|
-
const
|
|
1706
|
+
const a = e, v = Array.isArray(a.children) ? a.children : [], h = document.createTextNode(""), y = document.createTextNode("");
|
|
1707
|
+
a.key != null && (G(h, `${a.key}:start`), G(y, `${a.key}:end`)), a._startNode = h, a._endNode = y;
|
|
1708
|
+
const p = document.createDocumentFragment();
|
|
1709
|
+
p.appendChild(h);
|
|
1710
|
+
for (const _ of v) {
|
|
1711
|
+
const E = Z(
|
|
1705
1712
|
_,
|
|
1706
1713
|
n,
|
|
1707
1714
|
t,
|
|
1708
1715
|
// propagate parent namespace (was previously a boolean)
|
|
1709
1716
|
s
|
|
1710
1717
|
);
|
|
1711
|
-
if (a.key != null &&
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1718
|
+
if (a.key != null && E instanceof Element && !E.hasAttribute("data-anchor-key")) {
|
|
1719
|
+
const T = _;
|
|
1720
|
+
T && typeof T == "object" && T.key != null || G(E, String(a.key));
|
|
1714
1721
|
}
|
|
1715
|
-
|
|
1722
|
+
p.appendChild(E);
|
|
1716
1723
|
}
|
|
1717
|
-
return
|
|
1724
|
+
return p.appendChild(y), p;
|
|
1718
1725
|
}
|
|
1719
|
-
const r = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0,
|
|
1726
|
+
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 ?? gt[e.tag] ?? null, c = i ? document.createElementNS(i, e.tag) : document.createElement(e.tag);
|
|
1720
1727
|
e.key != null && G(c, e.key), e.props && e.props?._transitionGroup && xt(
|
|
1721
1728
|
c,
|
|
1722
1729
|
e.props?._transitionGroup
|
|
1723
1730
|
);
|
|
1724
|
-
const { props: f = {}, attrs: u = {}, directives: S = {} } = e.props ?? {},
|
|
1731
|
+
const { props: f = {}, attrs: u = {}, directives: S = {} } = e.props ?? {}, b = dt(
|
|
1725
1732
|
S,
|
|
1726
1733
|
n,
|
|
1727
1734
|
c instanceof HTMLElement ? c : void 0,
|
|
1728
1735
|
u
|
|
1729
|
-
),
|
|
1736
|
+
), m = {
|
|
1730
1737
|
...f,
|
|
1731
|
-
...
|
|
1732
|
-
},
|
|
1738
|
+
...b.props
|
|
1739
|
+
}, C = {
|
|
1733
1740
|
...u,
|
|
1734
|
-
...
|
|
1741
|
+
...b.attrs
|
|
1735
1742
|
};
|
|
1736
1743
|
try {
|
|
1737
|
-
const a = (
|
|
1738
|
-
if (
|
|
1739
|
-
const
|
|
1740
|
-
|
|
1744
|
+
const a = (C && C.class) ?? (m && m.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), v = F(a);
|
|
1745
|
+
if (v !== null) {
|
|
1746
|
+
const h = String(v).trim();
|
|
1747
|
+
h && D(c, "class", h);
|
|
1741
1748
|
}
|
|
1742
1749
|
} catch {
|
|
1743
1750
|
}
|
|
1744
1751
|
try {
|
|
1745
|
-
if (
|
|
1746
|
-
const a =
|
|
1747
|
-
let
|
|
1752
|
+
if (m.disabled !== void 0 && c && X(c)) {
|
|
1753
|
+
const a = m.disabled, v = a && typeof a == "object" && "value" in a;
|
|
1754
|
+
let h = !1;
|
|
1748
1755
|
try {
|
|
1749
|
-
|
|
1756
|
+
h = M(a);
|
|
1750
1757
|
} catch {
|
|
1751
|
-
|
|
1758
|
+
h = !1;
|
|
1752
1759
|
}
|
|
1753
|
-
!
|
|
1754
|
-
|
|
1760
|
+
!v && !h && H(() => {
|
|
1761
|
+
C.disabled = a, delete m.disabled;
|
|
1755
1762
|
});
|
|
1756
1763
|
}
|
|
1757
1764
|
} catch {
|
|
1758
1765
|
}
|
|
1759
|
-
const
|
|
1760
|
-
for (const a in
|
|
1761
|
-
const
|
|
1766
|
+
const w = c.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1767
|
+
for (const a in C) {
|
|
1768
|
+
const v = C[a];
|
|
1762
1769
|
if (typeof a != "string" || /\[object Object\]/.test(a))
|
|
1763
1770
|
continue;
|
|
1764
|
-
const
|
|
1765
|
-
if (typeof
|
|
1766
|
-
|
|
1771
|
+
const h = Fe(v);
|
|
1772
|
+
if (typeof h == "boolean")
|
|
1773
|
+
h ? D(c, a, "") : H(() => {
|
|
1767
1774
|
q(c, a);
|
|
1768
1775
|
});
|
|
1769
|
-
else if (
|
|
1776
|
+
else if (h != null) {
|
|
1770
1777
|
if (a === "disabled" && X(c)) {
|
|
1771
|
-
const
|
|
1778
|
+
const y = m.disabled, p = Ve(y) ? y : h, _ = ge(p);
|
|
1772
1779
|
H(() => {
|
|
1773
1780
|
c.disabled = _;
|
|
1774
1781
|
}), _ ? H(() => {
|
|
@@ -1778,86 +1785,86 @@ function Z(e, n, t, s = null) {
|
|
|
1778
1785
|
});
|
|
1779
1786
|
continue;
|
|
1780
1787
|
}
|
|
1781
|
-
if (!
|
|
1788
|
+
if (!w && a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement || c instanceof HTMLProgressElement))
|
|
1782
1789
|
try {
|
|
1783
|
-
c instanceof HTMLProgressElement ? c.value = Number(
|
|
1790
|
+
c instanceof HTMLProgressElement ? c.value = Number(h) : c.value = String(h ?? "");
|
|
1784
1791
|
} catch {
|
|
1785
|
-
const
|
|
1786
|
-
|
|
1792
|
+
const y = F(h);
|
|
1793
|
+
y !== null && D(c, a, String(y));
|
|
1787
1794
|
}
|
|
1788
|
-
else if (!
|
|
1795
|
+
else if (!w && a === "checked" && c instanceof HTMLInputElement)
|
|
1789
1796
|
try {
|
|
1790
|
-
c.checked = !!
|
|
1797
|
+
c.checked = !!h;
|
|
1791
1798
|
} catch {
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1799
|
+
const y = F(h);
|
|
1800
|
+
y !== null && D(c, a, String(y));
|
|
1794
1801
|
}
|
|
1795
|
-
else if (!
|
|
1802
|
+
else if (!w && a in c)
|
|
1796
1803
|
try {
|
|
1797
|
-
c[a] =
|
|
1804
|
+
c[a] = h, a === "disabled" && h === !1 && X(c) && q(c, "disabled"), se(e.props, a, h);
|
|
1798
1805
|
} catch {
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1806
|
+
const y = F(h);
|
|
1807
|
+
y !== null && D(c, a, String(y));
|
|
1801
1808
|
}
|
|
1802
|
-
else if ((e.props?.isCustomElement ?? !1) && !
|
|
1803
|
-
const
|
|
1809
|
+
else if ((e.props?.isCustomElement ?? !1) && !w && a.includes("-")) {
|
|
1810
|
+
const p = Ze(a);
|
|
1804
1811
|
try {
|
|
1805
|
-
c[
|
|
1812
|
+
c[p] = h;
|
|
1806
1813
|
} catch {
|
|
1807
|
-
const _ = F(
|
|
1814
|
+
const _ = F(h);
|
|
1808
1815
|
_ !== null && D(c, a, String(_));
|
|
1809
1816
|
}
|
|
1810
1817
|
} else {
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1818
|
+
const p = F(h);
|
|
1819
|
+
p !== null && D(c, a, String(p));
|
|
1813
1820
|
}
|
|
1814
1821
|
}
|
|
1815
1822
|
}
|
|
1816
|
-
for (const a in
|
|
1817
|
-
const
|
|
1823
|
+
for (const a in m) {
|
|
1824
|
+
const v = m[a];
|
|
1818
1825
|
if (!(typeof a != "string" || /\[object Object\]/.test(a)))
|
|
1819
1826
|
if (a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement)) {
|
|
1820
|
-
const
|
|
1827
|
+
const h = typeof v == "object" && v !== null && me(v) ? v.value : v;
|
|
1821
1828
|
H(() => {
|
|
1822
|
-
c.value = String(
|
|
1829
|
+
c.value = String(h ?? "");
|
|
1823
1830
|
});
|
|
1824
|
-
} else if (a.startsWith("on") && typeof
|
|
1825
|
-
const
|
|
1826
|
-
const
|
|
1831
|
+
} else if (a.startsWith("on") && typeof v == "function") {
|
|
1832
|
+
const h = pt(a), y = h.includes(":") ? (() => {
|
|
1833
|
+
const p = h.split(":"), _ = p[1];
|
|
1827
1834
|
if (_.includes("-")) {
|
|
1828
|
-
const
|
|
1829
|
-
(
|
|
1835
|
+
const E = _.split("-").map(
|
|
1836
|
+
(T, d) => d === 0 ? T : T.charAt(0).toUpperCase() + T.slice(1)
|
|
1830
1837
|
).join("");
|
|
1831
|
-
return `${
|
|
1838
|
+
return `${p[0]}:${E}`;
|
|
1832
1839
|
} else {
|
|
1833
|
-
const
|
|
1834
|
-
return `${
|
|
1840
|
+
const E = _.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1841
|
+
return `${p[0]}:${E}`;
|
|
1835
1842
|
}
|
|
1836
|
-
})() :
|
|
1837
|
-
|
|
1843
|
+
})() : h;
|
|
1844
|
+
b.listeners && (b.listeners[h] || b.listeners[y]) || te.addListener(c, h, v);
|
|
1838
1845
|
} else {
|
|
1839
|
-
if (a.startsWith("on") &&
|
|
1846
|
+
if (a.startsWith("on") && v === void 0)
|
|
1840
1847
|
continue;
|
|
1841
|
-
if (
|
|
1848
|
+
if (v == null || v === !1)
|
|
1842
1849
|
q(c, a);
|
|
1843
1850
|
else {
|
|
1844
|
-
const
|
|
1851
|
+
const h = e.props?.isCustomElement ?? !1, y = typeof v == "object" && v !== null && M(v) ? v : me(v) && typeof v.value < "u" ? v.value : v;
|
|
1845
1852
|
if (a === "class" || a === "style") {
|
|
1846
1853
|
try {
|
|
1847
|
-
const
|
|
1848
|
-
|
|
1854
|
+
const p = F(y);
|
|
1855
|
+
p !== null && D(c, a, String(p));
|
|
1849
1856
|
} catch {
|
|
1850
1857
|
}
|
|
1851
1858
|
continue;
|
|
1852
1859
|
}
|
|
1853
|
-
if (
|
|
1860
|
+
if (h || a in c)
|
|
1854
1861
|
try {
|
|
1855
|
-
const
|
|
1862
|
+
const p = typeof v == "object" && v !== null && M(v) ? v : me(v) ? v.value : v;
|
|
1856
1863
|
if (a === "disabled" && X(c)) {
|
|
1857
|
-
const _ =
|
|
1864
|
+
const _ = m.disabled !== void 0 ? m.disabled : p, E = ge(_);
|
|
1858
1865
|
H(() => {
|
|
1859
|
-
c.disabled =
|
|
1860
|
-
}),
|
|
1866
|
+
c.disabled = E;
|
|
1867
|
+
}), E ? H(() => {
|
|
1861
1868
|
D(c, a, "");
|
|
1862
1869
|
}) : H(() => {
|
|
1863
1870
|
q(c, a);
|
|
@@ -1866,30 +1873,30 @@ function Z(e, n, t, s = null) {
|
|
|
1866
1873
|
}
|
|
1867
1874
|
try {
|
|
1868
1875
|
if (typeof c[a] == "boolean") {
|
|
1869
|
-
let
|
|
1870
|
-
typeof
|
|
1876
|
+
let E = p;
|
|
1877
|
+
typeof p == "string" ? p === "false" ? E = !1 : p === "true" ? E = !0 : E = !!p && p !== "" : E = !!p, c[a] = E;
|
|
1871
1878
|
} else
|
|
1872
|
-
c[a] =
|
|
1879
|
+
c[a] = p;
|
|
1873
1880
|
} catch {
|
|
1874
|
-
c[a] =
|
|
1881
|
+
c[a] = p;
|
|
1875
1882
|
}
|
|
1876
1883
|
} catch {
|
|
1877
1884
|
}
|
|
1878
1885
|
}
|
|
1879
1886
|
}
|
|
1880
1887
|
}
|
|
1881
|
-
for (const [a,
|
|
1882
|
-
|
|
1888
|
+
for (const [a, v] of Object.entries(
|
|
1889
|
+
b.listeners || {}
|
|
1883
1890
|
))
|
|
1884
|
-
te.addListener(c, a,
|
|
1885
|
-
const
|
|
1891
|
+
te.addListener(c, a, v);
|
|
1892
|
+
const L = {
|
|
1886
1893
|
...e,
|
|
1887
1894
|
props: {
|
|
1888
1895
|
...e.props,
|
|
1889
|
-
...
|
|
1896
|
+
...b.props
|
|
1890
1897
|
}
|
|
1891
1898
|
};
|
|
1892
|
-
we(
|
|
1899
|
+
we(L, c, t);
|
|
1893
1900
|
try {
|
|
1894
1901
|
const a = c;
|
|
1895
1902
|
if (typeof a._applyProps == "function")
|
|
@@ -1901,31 +1908,31 @@ function Z(e, n, t, s = null) {
|
|
|
1901
1908
|
} catch {
|
|
1902
1909
|
}
|
|
1903
1910
|
if (Array.isArray(e.children)) {
|
|
1904
|
-
const a = e.tag === "foreignObject" &&
|
|
1905
|
-
for (const
|
|
1906
|
-
c.appendChild(Z(
|
|
1911
|
+
const a = e.tag === "foreignObject" && i === bt ? null : c.namespaceURI ?? null;
|
|
1912
|
+
for (const v of e.children)
|
|
1913
|
+
c.appendChild(Z(v, n, t, a));
|
|
1907
1914
|
} else typeof e.children == "string" && (c.textContent = e.children);
|
|
1908
1915
|
try {
|
|
1909
|
-
if (c instanceof HTMLSelectElement &&
|
|
1916
|
+
if (c instanceof HTMLSelectElement && C && Object.prototype.hasOwnProperty.call(C, "value"))
|
|
1910
1917
|
try {
|
|
1911
|
-
c.value = String(
|
|
1918
|
+
c.value = String(C.value ?? "");
|
|
1912
1919
|
} catch {
|
|
1913
1920
|
}
|
|
1914
1921
|
} catch {
|
|
1915
1922
|
}
|
|
1916
1923
|
try {
|
|
1917
1924
|
if (X(c)) {
|
|
1918
|
-
const a =
|
|
1919
|
-
let
|
|
1925
|
+
const a = m.disabled, v = C.disabled, h = a && typeof a == "object" && "value" in a;
|
|
1926
|
+
let y = !1;
|
|
1920
1927
|
try {
|
|
1921
|
-
|
|
1928
|
+
y = !!M(a);
|
|
1922
1929
|
} catch {
|
|
1923
|
-
|
|
1930
|
+
y = !1;
|
|
1924
1931
|
}
|
|
1925
|
-
const _ =
|
|
1932
|
+
const _ = y || h || Ve(a) ? a : v, E = ge(_);
|
|
1926
1933
|
H(() => {
|
|
1927
|
-
c.disabled =
|
|
1928
|
-
}),
|
|
1934
|
+
c.disabled = E;
|
|
1935
|
+
}), E ? H(() => {
|
|
1929
1936
|
D(c, "disabled", "");
|
|
1930
1937
|
}) : H(() => {
|
|
1931
1938
|
q(c, "disabled");
|
|
@@ -1941,77 +1948,77 @@ function Kt(e, n, t, s, r) {
|
|
|
1941
1948
|
return;
|
|
1942
1949
|
}
|
|
1943
1950
|
if (!Array.isArray(t)) return;
|
|
1944
|
-
const
|
|
1945
|
-
for (let
|
|
1946
|
-
|
|
1951
|
+
const o = e.childNodes, i = [];
|
|
1952
|
+
for (let L = 0; L < o.length; L++)
|
|
1953
|
+
i.push(o[L]);
|
|
1947
1954
|
const c = Array.isArray(n) ? n : [], f = Ht(e);
|
|
1948
1955
|
if (f) {
|
|
1949
|
-
const
|
|
1950
|
-
if (typeof
|
|
1951
|
-
return
|
|
1952
|
-
if (typeof
|
|
1953
|
-
}, a = [],
|
|
1954
|
-
for (const
|
|
1955
|
-
if (
|
|
1956
|
-
const
|
|
1957
|
-
for (const _ of
|
|
1958
|
-
const
|
|
1959
|
-
_.key ??
|
|
1956
|
+
const L = (y) => {
|
|
1957
|
+
if (typeof y == "string")
|
|
1958
|
+
return y.startsWith("each-") ? y.substring(5) : y;
|
|
1959
|
+
if (typeof y == "number") return String(y);
|
|
1960
|
+
}, a = [], v = [];
|
|
1961
|
+
for (const y of t)
|
|
1962
|
+
if (y && y.tag === "#anchor") {
|
|
1963
|
+
const p = Array.isArray(y.children) ? y.children : [];
|
|
1964
|
+
for (const _ of p) {
|
|
1965
|
+
const E = L(
|
|
1966
|
+
_.key ?? y.key ?? "unknown"
|
|
1960
1967
|
);
|
|
1961
|
-
a.push({ ..._, key:
|
|
1968
|
+
a.push({ ..._, key: E });
|
|
1962
1969
|
}
|
|
1963
|
-
} else
|
|
1964
|
-
for (const
|
|
1965
|
-
if (
|
|
1966
|
-
const
|
|
1967
|
-
for (const _ of
|
|
1968
|
-
const
|
|
1969
|
-
_.key ??
|
|
1970
|
+
} else y && a.push({ ...y, key: L(y.key) });
|
|
1971
|
+
for (const y of c)
|
|
1972
|
+
if (y && y.tag === "#anchor") {
|
|
1973
|
+
const p = Array.isArray(y.children) ? y.children : [];
|
|
1974
|
+
for (const _ of p) {
|
|
1975
|
+
const E = L(
|
|
1976
|
+
_.key ?? y.key ?? "unknown"
|
|
1970
1977
|
);
|
|
1971
|
-
|
|
1978
|
+
v.push({ ..._, key: E });
|
|
1972
1979
|
}
|
|
1973
|
-
} else
|
|
1974
|
-
...
|
|
1975
|
-
key:
|
|
1980
|
+
} else y && v.push({
|
|
1981
|
+
...y,
|
|
1982
|
+
key: L(y.key)
|
|
1976
1983
|
});
|
|
1977
|
-
if (a.some((
|
|
1978
|
-
const
|
|
1979
|
-
for (const l of
|
|
1984
|
+
if (a.some((y) => y && y.key != null) || v.some((y) => y && y.key != null)) {
|
|
1985
|
+
const y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
|
|
1986
|
+
for (const l of v)
|
|
1980
1987
|
if (l && l.key != null) {
|
|
1981
|
-
const
|
|
1982
|
-
|
|
1988
|
+
const g = String(l.key);
|
|
1989
|
+
y.set(g, l);
|
|
1983
1990
|
}
|
|
1984
|
-
for (let l = 0; l <
|
|
1985
|
-
const
|
|
1986
|
-
let A = Ie(
|
|
1987
|
-
if (A =
|
|
1991
|
+
for (let l = 0; l < i.length; l++) {
|
|
1992
|
+
const g = i[l];
|
|
1993
|
+
let A = Ie(g);
|
|
1994
|
+
if (A = L(A), A != null && g instanceof Element && g.nodeType === Node.ELEMENT_NODE) {
|
|
1988
1995
|
let N = typeof A == "string" && A.includes(":") ? A.substring(0, A.lastIndexOf(":")) : A;
|
|
1989
|
-
N = String(N),
|
|
1996
|
+
N = String(N), p.set(N, g);
|
|
1990
1997
|
}
|
|
1991
1998
|
}
|
|
1992
|
-
const _ = /* @__PURE__ */ new Set(),
|
|
1993
|
-
if (f.moveClass &&
|
|
1994
|
-
for (let l = 0; l <
|
|
1995
|
-
const
|
|
1996
|
-
if (
|
|
1997
|
-
const A =
|
|
1998
|
-
|
|
1999
|
+
const _ = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new Map(), T = i.length > 0;
|
|
2000
|
+
if (f.moveClass && T)
|
|
2001
|
+
for (let l = 0; l < i.length; l++) {
|
|
2002
|
+
const g = i[l];
|
|
2003
|
+
if (g instanceof HTMLElement && g.parentElement) {
|
|
2004
|
+
const A = g.getBoundingClientRect();
|
|
2005
|
+
E.set(g, A);
|
|
1999
2006
|
}
|
|
2000
2007
|
}
|
|
2001
|
-
const
|
|
2008
|
+
const d = [];
|
|
2002
2009
|
for (const l of a) {
|
|
2003
|
-
let
|
|
2004
|
-
if (
|
|
2005
|
-
|
|
2006
|
-
const A =
|
|
2007
|
-
let N =
|
|
2010
|
+
let g = l.key;
|
|
2011
|
+
if (g == null) continue;
|
|
2012
|
+
g = String(g);
|
|
2013
|
+
const A = y.get(g);
|
|
2014
|
+
let N = p.get(g);
|
|
2008
2015
|
if (N && A) {
|
|
2009
2016
|
const O = Te(N, A, l, s);
|
|
2010
2017
|
_.add(N);
|
|
2011
|
-
const
|
|
2012
|
-
G(O,
|
|
2018
|
+
const j = String(g);
|
|
2019
|
+
G(O, j), d.push({
|
|
2013
2020
|
node: O,
|
|
2014
|
-
key:
|
|
2021
|
+
key: g,
|
|
2015
2022
|
newVNode: l,
|
|
2016
2023
|
oldVNode: A,
|
|
2017
2024
|
isNew: !1
|
|
@@ -2022,67 +2029,67 @@ function Kt(e, n, t, s, r) {
|
|
|
2022
2029
|
s,
|
|
2023
2030
|
void 0,
|
|
2024
2031
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2025
|
-
), G(N, String(
|
|
2026
|
-
const O =
|
|
2027
|
-
N instanceof HTMLElement && O && Ae(N, f).catch((
|
|
2028
|
-
W("Enter transition error:",
|
|
2029
|
-
}),
|
|
2032
|
+
), G(N, String(g)), e.appendChild(N);
|
|
2033
|
+
const O = T || f.appear === !0;
|
|
2034
|
+
N instanceof HTMLElement && O && Ae(N, f).catch((j) => {
|
|
2035
|
+
W("Enter transition error:", j);
|
|
2036
|
+
}), d.push({ node: N, key: g, newVNode: l, isNew: !0 });
|
|
2030
2037
|
}
|
|
2031
2038
|
}
|
|
2032
2039
|
const k = [];
|
|
2033
|
-
for (let l = 0; l <
|
|
2034
|
-
const
|
|
2035
|
-
if (!_.has(
|
|
2036
|
-
const O = ze(
|
|
2037
|
-
e.contains(
|
|
2038
|
-
}).catch((
|
|
2039
|
-
W("Leave transition error:",
|
|
2040
|
+
for (let l = 0; l < i.length; l++) {
|
|
2041
|
+
const g = i[l], A = Ie(g);
|
|
2042
|
+
if (!_.has(g) && A != null && g instanceof HTMLElement) {
|
|
2043
|
+
const O = ze(g, f).then(() => {
|
|
2044
|
+
e.contains(g) && e.removeChild(g);
|
|
2045
|
+
}).catch((j) => {
|
|
2046
|
+
W("Leave transition error:", j), e.contains(g) && e.removeChild(g);
|
|
2040
2047
|
});
|
|
2041
2048
|
k.push(O);
|
|
2042
2049
|
}
|
|
2043
2050
|
}
|
|
2044
2051
|
if (k.length === 0) {
|
|
2045
2052
|
let l = e.firstChild;
|
|
2046
|
-
for (const { node:
|
|
2047
|
-
|
|
2048
|
-
if (f.moveClass &&
|
|
2049
|
-
const
|
|
2050
|
-
for (const { node: A, isNew: N } of
|
|
2053
|
+
for (const { node: g } of d)
|
|
2054
|
+
g !== l && e.insertBefore(g, l), l = g.nextSibling;
|
|
2055
|
+
if (f.moveClass && E.size > 0) {
|
|
2056
|
+
const g = [];
|
|
2057
|
+
for (const { node: A, isNew: N } of d)
|
|
2051
2058
|
if (!N && A instanceof HTMLElement) {
|
|
2052
|
-
const O =
|
|
2059
|
+
const O = E.get(A);
|
|
2053
2060
|
if (O) {
|
|
2054
|
-
const
|
|
2055
|
-
if (R !== 0 ||
|
|
2061
|
+
const j = A.getBoundingClientRect(), R = O.left - j.left, P = O.top - j.top;
|
|
2062
|
+
if (R !== 0 || P !== 0) {
|
|
2056
2063
|
const K = f.moveClass.split(/\s+/).filter((I) => I);
|
|
2057
|
-
|
|
2064
|
+
g.push({ node: A, deltaX: R, deltaY: P, moveClasses: K });
|
|
2058
2065
|
}
|
|
2059
2066
|
}
|
|
2060
2067
|
}
|
|
2061
|
-
if (
|
|
2062
|
-
for (const { node: A, deltaX: N, deltaY: O } of
|
|
2068
|
+
if (g.length > 0) {
|
|
2069
|
+
for (const { node: A, deltaX: N, deltaY: O } of g)
|
|
2063
2070
|
A.style.transform = `translate(${N}px, ${O}px)`, A.style.transitionProperty = "none";
|
|
2064
2071
|
e.offsetHeight, requestAnimationFrame(() => {
|
|
2065
2072
|
requestAnimationFrame(() => {
|
|
2066
|
-
for (const { node: A, moveClasses: N } of
|
|
2073
|
+
for (const { node: A, moveClasses: N } of g)
|
|
2067
2074
|
for (const O of N)
|
|
2068
2075
|
A.classList.add(O);
|
|
2069
2076
|
requestAnimationFrame(() => {
|
|
2070
|
-
const A = f.moveClass || "", N = A.match(/duration-(\d+)/), O = N ? `${N[1]}ms` : "300ms",
|
|
2077
|
+
const A = f.moveClass || "", N = A.match(/duration-(\d+)/), O = N ? `${N[1]}ms` : "300ms", j = A.match(
|
|
2071
2078
|
/ease-(out|in|in-out|linear)/
|
|
2072
|
-
), R =
|
|
2073
|
-
for (const { node:
|
|
2074
|
-
|
|
2079
|
+
), R = j ? `ease-${j[1]}` : "ease-out";
|
|
2080
|
+
for (const { node: P } of g)
|
|
2081
|
+
P.style.transition = `transform ${O} ${R}`;
|
|
2075
2082
|
requestAnimationFrame(() => {
|
|
2076
|
-
for (const { node:
|
|
2077
|
-
|
|
2083
|
+
for (const { node: P, moveClasses: K } of g) {
|
|
2084
|
+
P.style.removeProperty("transform");
|
|
2078
2085
|
const I = () => {
|
|
2079
2086
|
for (const ie of K)
|
|
2080
|
-
|
|
2081
|
-
|
|
2087
|
+
P.classList.remove(ie);
|
|
2088
|
+
P.style.removeProperty("transition"), P.removeEventListener("transitionend", I), P.removeEventListener("transitioncancel", I);
|
|
2082
2089
|
};
|
|
2083
|
-
|
|
2090
|
+
P.addEventListener("transitionend", I, {
|
|
2084
2091
|
once: !0
|
|
2085
|
-
}),
|
|
2092
|
+
}), P.addEventListener("transitioncancel", I, {
|
|
2086
2093
|
once: !0
|
|
2087
2094
|
});
|
|
2088
2095
|
}
|
|
@@ -2097,151 +2104,151 @@ function Kt(e, n, t, s, r) {
|
|
|
2097
2104
|
}
|
|
2098
2105
|
}
|
|
2099
2106
|
const u = /* @__PURE__ */ new Map();
|
|
2100
|
-
for (const
|
|
2101
|
-
|
|
2107
|
+
for (const L of c)
|
|
2108
|
+
L && L.key != null && u.set(L.key, L);
|
|
2102
2109
|
const S = /* @__PURE__ */ new Map();
|
|
2103
|
-
for (let
|
|
2104
|
-
const a =
|
|
2105
|
-
|
|
2106
|
-
}
|
|
2107
|
-
const
|
|
2108
|
-
let
|
|
2109
|
-
function
|
|
2110
|
-
let
|
|
2111
|
-
for (;
|
|
2112
|
-
|
|
2113
|
-
}
|
|
2114
|
-
function
|
|
2110
|
+
for (let L = 0; L < i.length; L++) {
|
|
2111
|
+
const a = i[L], v = Ie(a);
|
|
2112
|
+
v != null && S.set(v, a);
|
|
2113
|
+
}
|
|
2114
|
+
const b = /* @__PURE__ */ new Set();
|
|
2115
|
+
let m = e.firstChild;
|
|
2116
|
+
function C(L, a) {
|
|
2117
|
+
let v = L;
|
|
2118
|
+
for (; v && (b.add(v), v !== a); )
|
|
2119
|
+
v = v.nextSibling;
|
|
2120
|
+
}
|
|
2121
|
+
function w(L, a, v, h, y, p = !0) {
|
|
2115
2122
|
const _ = [];
|
|
2116
|
-
let
|
|
2117
|
-
for (;
|
|
2118
|
-
_.push(
|
|
2119
|
-
const
|
|
2120
|
-
if (
|
|
2123
|
+
let E = L.nextSibling;
|
|
2124
|
+
for (; E && E !== a; )
|
|
2125
|
+
_.push(E), E = E.nextSibling;
|
|
2126
|
+
const T = Array.isArray(v) ? v : [];
|
|
2127
|
+
if (h.some((k) => k && k.key != null) || T.some((k) => k && k.key != null)) {
|
|
2121
2128
|
const k = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
2122
|
-
for (const O of
|
|
2129
|
+
for (const O of T)
|
|
2123
2130
|
O && O.key != null && k.set(O.key, O);
|
|
2124
2131
|
for (const O of _) {
|
|
2125
|
-
const
|
|
2126
|
-
|
|
2132
|
+
const j = Ie(O);
|
|
2133
|
+
j != null && l.set(j, O);
|
|
2127
2134
|
}
|
|
2128
|
-
const
|
|
2129
|
-
let N =
|
|
2130
|
-
for (const O of
|
|
2131
|
-
let
|
|
2135
|
+
const g = y && y.state === "visible" && T.length === 0 && h.length > 0, A = /* @__PURE__ */ new Set();
|
|
2136
|
+
let N = L.nextSibling;
|
|
2137
|
+
for (const O of h) {
|
|
2138
|
+
let j;
|
|
2132
2139
|
if (O.key != null && l.has(O.key)) {
|
|
2133
2140
|
const R = k.get(O.key);
|
|
2134
|
-
|
|
2141
|
+
j = Te(
|
|
2135
2142
|
l.get(O.key),
|
|
2136
2143
|
R,
|
|
2137
2144
|
O,
|
|
2138
2145
|
s
|
|
2139
|
-
), A.add(
|
|
2140
|
-
W("Transition enter error (appear):",
|
|
2141
|
-
}),
|
|
2146
|
+
), A.add(j), y && j instanceof HTMLElement && g && y.appear && Ae(j, y).catch((P) => {
|
|
2147
|
+
W("Transition enter error (appear):", P);
|
|
2148
|
+
}), j !== N && e.contains(j) && e.insertBefore(j, N);
|
|
2142
2149
|
} else
|
|
2143
|
-
|
|
2150
|
+
j = Z(
|
|
2144
2151
|
O,
|
|
2145
2152
|
s,
|
|
2146
2153
|
void 0,
|
|
2147
2154
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2148
|
-
), e.insertBefore(
|
|
2155
|
+
), e.insertBefore(j, N), A.add(j), y && j instanceof HTMLElement && p && Ae(j, y).catch((R) => {
|
|
2149
2156
|
W("Transition enter error:", R);
|
|
2150
2157
|
});
|
|
2151
|
-
N =
|
|
2158
|
+
N = j.nextSibling;
|
|
2152
2159
|
}
|
|
2153
2160
|
for (const O of _)
|
|
2154
|
-
!A.has(O) && e.contains(O) && (
|
|
2161
|
+
!A.has(O) && e.contains(O) && (y && O instanceof HTMLElement && p ? ze(O, y).then(() => {
|
|
2155
2162
|
e.contains(O) && e.removeChild(O);
|
|
2156
|
-
}).catch((
|
|
2157
|
-
W("Transition leave error:",
|
|
2163
|
+
}).catch((j) => {
|
|
2164
|
+
W("Transition leave error:", j), e.contains(O) && e.removeChild(O);
|
|
2158
2165
|
}) : e.removeChild(O));
|
|
2159
2166
|
} else {
|
|
2160
2167
|
const k = Math.min(
|
|
2161
|
-
|
|
2162
|
-
|
|
2168
|
+
T.length,
|
|
2169
|
+
h.length
|
|
2163
2170
|
);
|
|
2164
2171
|
for (let l = 0; l < k; l++) {
|
|
2165
|
-
const
|
|
2172
|
+
const g = T[l], A = h[l], N = Te(_[l], g, A, s);
|
|
2166
2173
|
N !== _[l] && (e.insertBefore(N, _[l]), e.removeChild(_[l]));
|
|
2167
2174
|
}
|
|
2168
|
-
for (let l = k; l <
|
|
2169
|
-
const
|
|
2170
|
-
|
|
2175
|
+
for (let l = k; l < h.length; l++) {
|
|
2176
|
+
const g = Z(
|
|
2177
|
+
h[l],
|
|
2171
2178
|
s,
|
|
2172
2179
|
void 0,
|
|
2173
2180
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2174
2181
|
);
|
|
2175
|
-
e.insertBefore(
|
|
2182
|
+
e.insertBefore(g, a), y && g instanceof HTMLElement && p && Ae(g, y).catch((A) => {
|
|
2176
2183
|
W("Transition enter error:", A);
|
|
2177
2184
|
});
|
|
2178
2185
|
}
|
|
2179
2186
|
for (let l = k; l < _.length; l++) {
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2182
|
-
e.contains(
|
|
2187
|
+
const g = _[l];
|
|
2188
|
+
y && g instanceof HTMLElement && p ? ze(g, y).then(() => {
|
|
2189
|
+
e.contains(g) && e.removeChild(g);
|
|
2183
2190
|
}).catch((A) => {
|
|
2184
|
-
W("Transition leave error:", A), e.contains(
|
|
2185
|
-
}) : e.removeChild(
|
|
2191
|
+
W("Transition leave error:", A), e.contains(g) && e.removeChild(g);
|
|
2192
|
+
}) : e.removeChild(g);
|
|
2186
2193
|
}
|
|
2187
2194
|
}
|
|
2188
2195
|
}
|
|
2189
|
-
for (const
|
|
2196
|
+
for (const L of t) {
|
|
2190
2197
|
let a;
|
|
2191
|
-
if (
|
|
2192
|
-
const
|
|
2193
|
-
let
|
|
2194
|
-
const
|
|
2195
|
-
if (
|
|
2196
|
-
e.insertBefore(
|
|
2197
|
-
const
|
|
2198
|
-
for (const l of
|
|
2199
|
-
const
|
|
2198
|
+
if (L.tag === "#anchor") {
|
|
2199
|
+
const v = L.key, h = `${v}:start`, y = `${v}:end`;
|
|
2200
|
+
let p = S.get(h), _ = S.get(y);
|
|
2201
|
+
const E = Array.isArray(L.children) ? L.children : [];
|
|
2202
|
+
if (p || (p = document.createTextNode(""), G(p, h)), _ || (_ = document.createTextNode(""), G(_, y)), L._startNode = p, L._endNode = _, !e.contains(p) || !e.contains(_)) {
|
|
2203
|
+
e.insertBefore(p, m);
|
|
2204
|
+
const T = L._transition, k = !(T && T.state === "visible" && E.length > 0) || T.appear;
|
|
2205
|
+
for (const l of E) {
|
|
2206
|
+
const g = Z(
|
|
2200
2207
|
l,
|
|
2201
2208
|
s,
|
|
2202
2209
|
r,
|
|
2203
2210
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2204
2211
|
);
|
|
2205
|
-
e.insertBefore(
|
|
2212
|
+
e.insertBefore(g, m), T && g instanceof HTMLElement && k && Ae(g, T).catch((A) => {
|
|
2206
2213
|
W("Transition enter error:", A);
|
|
2207
2214
|
});
|
|
2208
2215
|
}
|
|
2209
|
-
e.insertBefore(_,
|
|
2216
|
+
e.insertBefore(_, m);
|
|
2210
2217
|
} else {
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2213
|
-
|
|
2218
|
+
const T = L._transition, k = u.get(v)._transition, l = k && k.state !== T?.state, g = T && T.state === "visible" && E.length > 0 && !l, A = l || !g || T?.appear === !0;
|
|
2219
|
+
w(
|
|
2220
|
+
p,
|
|
2214
2221
|
_,
|
|
2215
|
-
u.get(
|
|
2222
|
+
u.get(v)?.children,
|
|
2223
|
+
E,
|
|
2216
2224
|
T,
|
|
2217
|
-
L,
|
|
2218
2225
|
A
|
|
2219
2226
|
);
|
|
2220
2227
|
}
|
|
2221
|
-
|
|
2228
|
+
C(p, _), m = _.nextSibling;
|
|
2222
2229
|
continue;
|
|
2223
2230
|
}
|
|
2224
|
-
if (
|
|
2225
|
-
const
|
|
2231
|
+
if (L.key != null && S.has(L.key)) {
|
|
2232
|
+
const v = u.get(L.key);
|
|
2226
2233
|
a = Te(
|
|
2227
|
-
S.get(
|
|
2228
|
-
C,
|
|
2234
|
+
S.get(L.key),
|
|
2229
2235
|
v,
|
|
2236
|
+
L,
|
|
2230
2237
|
s,
|
|
2231
2238
|
r
|
|
2232
|
-
),
|
|
2239
|
+
), b.add(a), a !== m && e.contains(a) && (m && !e.contains(m) && (m = null), e.insertBefore(a, m));
|
|
2233
2240
|
} else
|
|
2234
2241
|
a = Z(
|
|
2235
|
-
|
|
2242
|
+
L,
|
|
2236
2243
|
s,
|
|
2237
2244
|
r,
|
|
2238
2245
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2239
|
-
),
|
|
2240
|
-
|
|
2246
|
+
), m && !e.contains(m) && (m = null), e.insertBefore(a, m), b.add(a);
|
|
2247
|
+
m = a.nextSibling;
|
|
2241
2248
|
}
|
|
2242
|
-
for (let
|
|
2243
|
-
const a =
|
|
2244
|
-
!
|
|
2249
|
+
for (let L = 0; L < i.length; L++) {
|
|
2250
|
+
const a = i[L];
|
|
2251
|
+
!b.has(a) && e.contains(a) && (ue(a, r), e.removeChild(a));
|
|
2245
2252
|
}
|
|
2246
2253
|
}
|
|
2247
2254
|
function Te(e, n, t, s, r) {
|
|
@@ -2250,47 +2257,47 @@ function Te(e, n, t, s, r) {
|
|
|
2250
2257
|
if (e.nodeType === Node.TEXT_NODE)
|
|
2251
2258
|
return e.textContent !== t && (e.textContent = t), e;
|
|
2252
2259
|
{
|
|
2253
|
-
const
|
|
2254
|
-
return e.parentNode?.replaceChild(
|
|
2260
|
+
const i = document.createTextNode(t);
|
|
2261
|
+
return e.parentNode?.replaceChild(i, e), i;
|
|
2255
2262
|
}
|
|
2256
2263
|
}
|
|
2257
2264
|
if (t && typeof t != "string" && t.tag === "#anchor") {
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2265
|
+
const i = t, c = Array.isArray(i.children) ? i.children : [], f = i._startNode ?? document.createTextNode(""), u = i._endNode ?? document.createTextNode("");
|
|
2266
|
+
i.key != null && (G(f, `${i.key}:start`), G(u, `${i.key}:end`)), i._startNode = f, i._endNode = u;
|
|
2260
2267
|
const S = document.createDocumentFragment();
|
|
2261
2268
|
S.appendChild(f);
|
|
2262
|
-
for (const
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2269
|
+
for (const b of c) {
|
|
2270
|
+
const m = Z(
|
|
2271
|
+
b,
|
|
2265
2272
|
s,
|
|
2266
2273
|
r,
|
|
2267
2274
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2268
2275
|
);
|
|
2269
|
-
S.appendChild(
|
|
2276
|
+
S.appendChild(m);
|
|
2270
2277
|
}
|
|
2271
2278
|
return S.appendChild(u), e.parentNode?.replaceChild(S, e), f;
|
|
2272
2279
|
}
|
|
2273
2280
|
if (!t) {
|
|
2274
2281
|
ue(e, r);
|
|
2275
|
-
const
|
|
2276
|
-
return e.parentNode?.replaceChild(
|
|
2282
|
+
const i = document.createComment("removed");
|
|
2283
|
+
return e.parentNode?.replaceChild(i, e), i;
|
|
2277
2284
|
}
|
|
2278
2285
|
if (!n || typeof n == "string") {
|
|
2279
2286
|
ue(e, r);
|
|
2280
|
-
const
|
|
2287
|
+
const i = Z(
|
|
2281
2288
|
t,
|
|
2282
2289
|
s,
|
|
2283
2290
|
r,
|
|
2284
2291
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2285
2292
|
);
|
|
2286
|
-
return we(t,
|
|
2293
|
+
return we(t, i, r), e.parentNode?.replaceChild(i, e), i;
|
|
2287
2294
|
}
|
|
2288
2295
|
if (t.tag === "#anchor") {
|
|
2289
|
-
const
|
|
2296
|
+
const i = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), f = t._endNode ?? document.createTextNode("");
|
|
2290
2297
|
t.key != null && (G(c, `${t.key}:start`), G(f, `${t.key}:end`)), t._startNode = c, t._endNode = f;
|
|
2291
2298
|
const u = document.createDocumentFragment();
|
|
2292
2299
|
u.appendChild(c);
|
|
2293
|
-
for (const S of
|
|
2300
|
+
for (const S of i)
|
|
2294
2301
|
u.appendChild(
|
|
2295
2302
|
Z(
|
|
2296
2303
|
S,
|
|
@@ -2302,8 +2309,8 @@ function Te(e, n, t, s, r) {
|
|
|
2302
2309
|
return u.appendChild(f), e.parentNode?.replaceChild(u, e), c;
|
|
2303
2310
|
}
|
|
2304
2311
|
if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && n.key === t.key) {
|
|
2305
|
-
const
|
|
2306
|
-
return rt(
|
|
2312
|
+
const i = e;
|
|
2313
|
+
return rt(i, n.props || {}, t.props || {}, s), Kt(i, n.children, t.children, s, r), we(t, i, r), i;
|
|
2307
2314
|
}
|
|
2308
2315
|
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))
|
|
2309
2316
|
try {
|
|
@@ -2312,13 +2319,13 @@ function Te(e, n, t, s, r) {
|
|
|
2312
2319
|
} catch {
|
|
2313
2320
|
}
|
|
2314
2321
|
ue(e, r);
|
|
2315
|
-
const
|
|
2322
|
+
const o = Z(
|
|
2316
2323
|
t,
|
|
2317
2324
|
s,
|
|
2318
2325
|
r,
|
|
2319
2326
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2320
2327
|
);
|
|
2321
|
-
return we(t,
|
|
2328
|
+
return we(t, o, r), e.parentNode?.replaceChild(o, e), o;
|
|
2322
2329
|
}
|
|
2323
2330
|
function Ut(e, n, t, s) {
|
|
2324
2331
|
let r;
|
|
@@ -2330,14 +2337,14 @@ function Ut(e, n, t, s) {
|
|
|
2330
2337
|
},
|
|
2331
2338
|
children: [r]
|
|
2332
2339
|
}), r = qe(r, String(r.key ?? "root"));
|
|
2333
|
-
const
|
|
2340
|
+
const o = e._prevVNode ?? null, i = e._prevDom ?? e.firstChild ?? null;
|
|
2334
2341
|
let c;
|
|
2335
|
-
|
|
2342
|
+
o && i ? typeof o != "string" && typeof r != "string" && o.tag === r.tag && o.key === r.key ? c = Te(i, o, r, t, s) : (c = Z(
|
|
2336
2343
|
r,
|
|
2337
2344
|
t,
|
|
2338
2345
|
s,
|
|
2339
2346
|
e.host instanceof Element ? e.host.namespaceURI ?? null : null
|
|
2340
|
-
), e.replaceChild(c,
|
|
2347
|
+
), e.replaceChild(c, i)) : (c = Z(
|
|
2341
2348
|
r,
|
|
2342
2349
|
t,
|
|
2343
2350
|
s,
|
|
@@ -2358,16 +2365,16 @@ function Vt(e, n) {
|
|
|
2358
2365
|
const t = Ne.get(e);
|
|
2359
2366
|
t && t.delete(n);
|
|
2360
2367
|
}
|
|
2361
|
-
function qt(e, n, t, s, r,
|
|
2368
|
+
function qt(e, n, t, s, r, o, i, c) {
|
|
2362
2369
|
if (e) {
|
|
2363
2370
|
Le.push(t);
|
|
2364
2371
|
try {
|
|
2365
2372
|
const f = n.render(t);
|
|
2366
2373
|
if (f instanceof Promise) {
|
|
2367
|
-
|
|
2368
|
-
|
|
2374
|
+
o(!0), f.then((u) => {
|
|
2375
|
+
o(!1), i(null), it(e, u, t, s, r), c(e.innerHTML);
|
|
2369
2376
|
}).catch((u) => {
|
|
2370
|
-
|
|
2377
|
+
o(!1), i(u);
|
|
2371
2378
|
});
|
|
2372
2379
|
return;
|
|
2373
2380
|
}
|
|
@@ -2385,8 +2392,8 @@ function it(e, n, t, s, r) {
|
|
|
2385
2392
|
s
|
|
2386
2393
|
), r(e.innerHTML));
|
|
2387
2394
|
}
|
|
2388
|
-
function Gt(e, n, t, s, r,
|
|
2389
|
-
if (
|
|
2395
|
+
function Gt(e, n, t, s, r, o, i) {
|
|
2396
|
+
if (o !== null && clearTimeout(o), Date.now() - n < 16) {
|
|
2390
2397
|
if (r(t + 1), t === 15)
|
|
2391
2398
|
Q(
|
|
2392
2399
|
`⚠️ Component is re-rendering rapidly. This might indicate:
|
|
@@ -2402,76 +2409,76 @@ function Gt(e, n, t, s, r, i, o) {
|
|
|
2402
2409
|
• This might be caused by state updates during render
|
|
2403
2410
|
• Ensure all state modifications are done in event handlers or effects
|
|
2404
2411
|
Stopping runaway component render to prevent browser freeze`
|
|
2405
|
-
),
|
|
2412
|
+
), i(null);
|
|
2406
2413
|
return;
|
|
2407
2414
|
}
|
|
2408
2415
|
} else
|
|
2409
2416
|
r(0);
|
|
2410
2417
|
const u = setTimeout(
|
|
2411
2418
|
() => {
|
|
2412
|
-
s(Date.now()), e(),
|
|
2419
|
+
s(Date.now()), e(), i(null);
|
|
2413
2420
|
},
|
|
2414
2421
|
t > 10 ? 100 : 0
|
|
2415
2422
|
);
|
|
2416
|
-
|
|
2423
|
+
i(u);
|
|
2417
2424
|
}
|
|
2418
2425
|
function Zt(e, n, t, s, r) {
|
|
2419
2426
|
if (!e) return;
|
|
2420
|
-
let
|
|
2427
|
+
let o = t || "";
|
|
2421
2428
|
try {
|
|
2422
|
-
const
|
|
2423
|
-
if (
|
|
2424
|
-
for (const
|
|
2429
|
+
const h = Ne.get(e);
|
|
2430
|
+
if (h && h.size > 0)
|
|
2431
|
+
for (const y of h)
|
|
2425
2432
|
try {
|
|
2426
|
-
const
|
|
2427
|
-
|
|
2428
|
-
` +
|
|
2433
|
+
const p = y.lastHtmlStringForJitCSS;
|
|
2434
|
+
p && typeof p == "string" && p.trim() && (o += `
|
|
2435
|
+
` + p);
|
|
2429
2436
|
} catch {
|
|
2430
2437
|
}
|
|
2431
2438
|
else {
|
|
2432
|
-
const
|
|
2439
|
+
const y = Array.from(
|
|
2433
2440
|
e.querySelectorAll("*")
|
|
2434
2441
|
);
|
|
2435
|
-
for (const
|
|
2442
|
+
for (const p of y)
|
|
2436
2443
|
try {
|
|
2437
|
-
const _ =
|
|
2438
|
-
_ && typeof _ == "string" && _.trim() && (
|
|
2444
|
+
const _ = p.lastHtmlStringForJitCSS;
|
|
2445
|
+
_ && typeof _ == "string" && _.trim() && (o += `
|
|
2439
2446
|
` + _);
|
|
2440
2447
|
} catch {
|
|
2441
2448
|
}
|
|
2442
2449
|
}
|
|
2443
2450
|
} catch {
|
|
2444
2451
|
}
|
|
2445
|
-
if (st.get(e) ===
|
|
2452
|
+
if (st.get(e) === o)
|
|
2446
2453
|
return;
|
|
2447
|
-
st.set(e,
|
|
2448
|
-
const c = St(
|
|
2454
|
+
st.set(e, o);
|
|
2455
|
+
const c = St(o), f = vt();
|
|
2449
2456
|
if ((!c || c.trim() === "") && !n._computedStyle && !f) {
|
|
2450
2457
|
if (r(null), "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
|
|
2451
|
-
const
|
|
2452
|
-
e.adoptedStyleSheets =
|
|
2458
|
+
const y = [$e(), pe()];
|
|
2459
|
+
e.adoptedStyleSheets = y;
|
|
2453
2460
|
} else {
|
|
2454
|
-
const
|
|
2461
|
+
const y = ke(et), p = pe();
|
|
2455
2462
|
let _ = "";
|
|
2456
2463
|
try {
|
|
2457
|
-
|
|
2464
|
+
p && "cssRules" in p && (_ = Array.from(p.cssRules).map((d) => d.cssText).join(`
|
|
2458
2465
|
`));
|
|
2459
2466
|
} catch {
|
|
2460
2467
|
_ = "";
|
|
2461
2468
|
}
|
|
2462
|
-
const
|
|
2469
|
+
const E = ke(`${y}
|
|
2463
2470
|
${_}`);
|
|
2464
|
-
let
|
|
2471
|
+
let T = e.querySelector(
|
|
2465
2472
|
"style[data-cer-runtime]"
|
|
2466
2473
|
);
|
|
2467
|
-
|
|
2474
|
+
T || (T = document.createElement("style"), D(T, "data-cer-runtime", "true"), e.appendChild(T));
|
|
2468
2475
|
try {
|
|
2469
|
-
|
|
2476
|
+
T.textContent = E;
|
|
2470
2477
|
} catch {
|
|
2471
2478
|
}
|
|
2472
2479
|
try {
|
|
2473
|
-
const
|
|
2474
|
-
e.adoptedStyleSheets =
|
|
2480
|
+
const d = [$e(), pe()];
|
|
2481
|
+
e.adoptedStyleSheets = d;
|
|
2475
2482
|
} catch {
|
|
2476
2483
|
}
|
|
2477
2484
|
}
|
|
@@ -2483,56 +2490,56 @@ ${_}`);
|
|
|
2483
2490
|
${c}
|
|
2484
2491
|
`);
|
|
2485
2492
|
S = ke(S);
|
|
2486
|
-
let
|
|
2493
|
+
let b = s;
|
|
2487
2494
|
if ("adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
|
|
2488
|
-
|
|
2495
|
+
b || (b = new CSSStyleSheet());
|
|
2489
2496
|
try {
|
|
2490
|
-
|
|
2497
|
+
b.replaceSync(S);
|
|
2491
2498
|
} catch {
|
|
2492
|
-
|
|
2499
|
+
b = null;
|
|
2493
2500
|
}
|
|
2494
|
-
if (
|
|
2495
|
-
const
|
|
2496
|
-
f &&
|
|
2501
|
+
if (b) {
|
|
2502
|
+
const h = [$e(), pe()];
|
|
2503
|
+
f && h.push(f), h.push(b), e.adoptedStyleSheets = h, r(b);
|
|
2497
2504
|
return;
|
|
2498
2505
|
}
|
|
2499
2506
|
}
|
|
2500
|
-
const
|
|
2501
|
-
let
|
|
2507
|
+
const C = ke(et), w = pe();
|
|
2508
|
+
let L = "";
|
|
2502
2509
|
try {
|
|
2503
|
-
|
|
2510
|
+
w && "cssRules" in w && (L = Array.from(w.cssRules).map((h) => h.cssText).join(`
|
|
2504
2511
|
`));
|
|
2505
2512
|
} catch {
|
|
2506
|
-
|
|
2513
|
+
L = "";
|
|
2507
2514
|
}
|
|
2508
|
-
const a = ke(`${
|
|
2509
|
-
${
|
|
2515
|
+
const a = ke(`${C}
|
|
2516
|
+
${L}
|
|
2510
2517
|
${S}`);
|
|
2511
|
-
let
|
|
2518
|
+
let v = e.querySelector(
|
|
2512
2519
|
"style[data-cer-runtime]"
|
|
2513
2520
|
);
|
|
2514
|
-
|
|
2521
|
+
v || (v = document.createElement("style"), D(v, "data-cer-runtime", "true"), e.appendChild(v));
|
|
2515
2522
|
try {
|
|
2516
|
-
|
|
2523
|
+
v.textContent = a;
|
|
2517
2524
|
} catch {
|
|
2518
2525
|
}
|
|
2519
2526
|
try {
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2527
|
+
const h = [
|
|
2528
|
+
$e(),
|
|
2522
2529
|
pe()
|
|
2523
2530
|
];
|
|
2524
|
-
if (f &&
|
|
2531
|
+
if (f && h.push(f), typeof CSSStyleSheet < "u")
|
|
2525
2532
|
try {
|
|
2526
|
-
const
|
|
2533
|
+
const y = new CSSStyleSheet();
|
|
2527
2534
|
try {
|
|
2528
|
-
|
|
2535
|
+
y.replaceSync(S), h.push(y);
|
|
2529
2536
|
} catch {
|
|
2530
|
-
|
|
2537
|
+
h.push({ cssRules: [], replaceSync: () => {
|
|
2531
2538
|
} });
|
|
2532
2539
|
}
|
|
2533
2540
|
} catch {
|
|
2534
2541
|
}
|
|
2535
|
-
e.adoptedStyleSheets =
|
|
2542
|
+
e.adoptedStyleSheets = h;
|
|
2536
2543
|
} catch {
|
|
2537
2544
|
}
|
|
2538
2545
|
r(null);
|
|
@@ -2602,31 +2609,31 @@ function dn(e) {
|
|
|
2602
2609
|
const t = B;
|
|
2603
2610
|
try {
|
|
2604
2611
|
const r = Object.keys(e || {});
|
|
2605
|
-
for (const
|
|
2606
|
-
if (typeof
|
|
2607
|
-
const
|
|
2608
|
-
if (!(
|
|
2612
|
+
for (const o of r) {
|
|
2613
|
+
if (typeof o != "string" || o.startsWith("_")) continue;
|
|
2614
|
+
const i = Object.getOwnPropertyDescriptor(t, o);
|
|
2615
|
+
if (!(i && !i.configurable))
|
|
2609
2616
|
try {
|
|
2610
|
-
let f = Object.prototype.hasOwnProperty.call(t,
|
|
2611
|
-
Object.defineProperty(t,
|
|
2617
|
+
let f = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
|
|
2618
|
+
Object.defineProperty(t, o, {
|
|
2612
2619
|
configurable: !0,
|
|
2613
2620
|
enumerable: !0,
|
|
2614
2621
|
get() {
|
|
2615
2622
|
try {
|
|
2616
2623
|
const u = t && t._host;
|
|
2617
2624
|
if (u) {
|
|
2618
|
-
const S = J(
|
|
2619
|
-
if (
|
|
2620
|
-
const
|
|
2621
|
-
return
|
|
2625
|
+
const S = J(o), b = u.getAttribute(S);
|
|
2626
|
+
if (b !== null) {
|
|
2627
|
+
const m = typeof e[o];
|
|
2628
|
+
return m === "boolean" ? b === "" || b === "true" : m === "number" ? Number(b) : b;
|
|
2622
2629
|
}
|
|
2623
|
-
if (typeof u[
|
|
2624
|
-
const
|
|
2625
|
-
if (
|
|
2626
|
-
return
|
|
2627
|
-
const
|
|
2628
|
-
if (!(
|
|
2629
|
-
return
|
|
2630
|
+
if (typeof u[o] < "u") {
|
|
2631
|
+
const m = u[o];
|
|
2632
|
+
if (M(m) || m && typeof m == "object" && "value" in m && !(m instanceof Node))
|
|
2633
|
+
return m.value;
|
|
2634
|
+
const C = typeof e[o];
|
|
2635
|
+
if (!(C === "string" && m && typeof m == "object"))
|
|
2636
|
+
return C === "boolean" && typeof m == "string" ? m === "" || m === "true" : m;
|
|
2630
2637
|
}
|
|
2631
2638
|
}
|
|
2632
2639
|
} catch {
|
|
@@ -2643,31 +2650,31 @@ function dn(e) {
|
|
|
2643
2650
|
} catch {
|
|
2644
2651
|
}
|
|
2645
2652
|
return new Proxy({}, {
|
|
2646
|
-
get(r,
|
|
2647
|
-
if (typeof
|
|
2648
|
-
const
|
|
2653
|
+
get(r, o) {
|
|
2654
|
+
if (typeof o != "string") return;
|
|
2655
|
+
const i = e[o];
|
|
2649
2656
|
try {
|
|
2650
2657
|
const f = t && t._host;
|
|
2651
2658
|
if (f) {
|
|
2652
2659
|
if (f instanceof HTMLElement || typeof f.getAttribute == "function" && typeof f.hasAttribute == "function") {
|
|
2653
|
-
const S =
|
|
2654
|
-
if (
|
|
2655
|
-
return typeof
|
|
2660
|
+
const S = o.replace(/([A-Z])/g, "-$1").toLowerCase(), b = f.getAttribute(S);
|
|
2661
|
+
if (b !== null)
|
|
2662
|
+
return typeof i == "boolean" ? b === "" || b === "true" : typeof i == "number" ? Number(b) : b;
|
|
2656
2663
|
}
|
|
2657
|
-
const u = f[
|
|
2664
|
+
const u = f[o];
|
|
2658
2665
|
if (typeof u < "u" && u !== "") {
|
|
2659
2666
|
const S = u && typeof u == "object" && "value" in u && !(u instanceof Node);
|
|
2660
|
-
if (!(typeof
|
|
2661
|
-
return typeof
|
|
2667
|
+
if (!(typeof i == "string" && u && typeof u == "object" && !S && !M(u)))
|
|
2668
|
+
return typeof i == "boolean" && i === !1 && u === "" ? i : M(u) || S ? 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;
|
|
2662
2669
|
}
|
|
2663
2670
|
}
|
|
2664
2671
|
} catch {
|
|
2665
2672
|
}
|
|
2666
|
-
const c = t[
|
|
2667
|
-
return typeof
|
|
2673
|
+
const c = t[o];
|
|
2674
|
+
return typeof i == "boolean" && c === "" ? i === !1 ? i : !0 : M(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;
|
|
2668
2675
|
},
|
|
2669
|
-
has(r,
|
|
2670
|
-
return typeof
|
|
2676
|
+
has(r, o) {
|
|
2677
|
+
return typeof o == "string" && (o in t || o in e);
|
|
2671
2678
|
},
|
|
2672
2679
|
ownKeys() {
|
|
2673
2680
|
return Array.from(
|
|
@@ -2751,8 +2758,8 @@ function Yt(e, n) {
|
|
|
2751
2758
|
_templateError = null;
|
|
2752
2759
|
constructor() {
|
|
2753
2760
|
super(), this.attachShadow({ mode: "open" }), this._cfg = be.get(e) || n, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2754
|
-
const t = this._initContext(n), s = (
|
|
2755
|
-
Object.defineProperty(
|
|
2761
|
+
const t = this._initContext(n), s = (o, i, c) => {
|
|
2762
|
+
Object.defineProperty(o, i, {
|
|
2756
2763
|
value: c,
|
|
2757
2764
|
writable: !1,
|
|
2758
2765
|
enumerable: !1,
|
|
@@ -2770,47 +2777,47 @@ function Yt(e, n) {
|
|
|
2770
2777
|
), s(t, "_componentId", this._componentId), s(
|
|
2771
2778
|
t,
|
|
2772
2779
|
"_triggerWatchers",
|
|
2773
|
-
(
|
|
2780
|
+
(o, i) => this._triggerWatchers(o, i)
|
|
2774
2781
|
), this.context = t, H(() => {
|
|
2775
2782
|
s(t, "_host", this);
|
|
2776
2783
|
}), s(
|
|
2777
2784
|
this.context,
|
|
2778
2785
|
"emit",
|
|
2779
|
-
(
|
|
2786
|
+
(o, i, c) => {
|
|
2780
2787
|
const f = {
|
|
2781
|
-
detail:
|
|
2788
|
+
detail: i,
|
|
2782
2789
|
bubbles: !0,
|
|
2783
2790
|
composed: !0,
|
|
2784
2791
|
...c || {}
|
|
2785
|
-
}, u = new CustomEvent(
|
|
2792
|
+
}, u = new CustomEvent(o, f);
|
|
2786
2793
|
this.dispatchEvent(u);
|
|
2787
|
-
const S =
|
|
2794
|
+
const S = o.indexOf(":");
|
|
2788
2795
|
if (S > 0) {
|
|
2789
|
-
const
|
|
2790
|
-
(
|
|
2791
|
-
).join("")}` : `${
|
|
2792
|
-
|
|
2793
|
-
this.dispatchEvent(new CustomEvent(
|
|
2796
|
+
const b = o.substring(0, S), m = o.substring(S + 1), C = m.includes("-") ? `${b}:${m.split("-").map(
|
|
2797
|
+
(w, L) => L === 0 ? w : w.charAt(0).toUpperCase() + w.slice(1)
|
|
2798
|
+
).join("")}` : `${b}:${m.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
2799
|
+
C !== o && H(() => {
|
|
2800
|
+
this.dispatchEvent(new CustomEvent(C, f));
|
|
2794
2801
|
});
|
|
2795
2802
|
}
|
|
2796
2803
|
return !u.defaultPrevented;
|
|
2797
2804
|
}
|
|
2798
2805
|
);
|
|
2799
2806
|
const r = be.get(e) || n;
|
|
2800
|
-
for (const
|
|
2801
|
-
const
|
|
2802
|
-
typeof
|
|
2807
|
+
for (const o in r) {
|
|
2808
|
+
const i = r[o];
|
|
2809
|
+
typeof i == "function" && (this.context[o] = (...c) => i(...c, this.context));
|
|
2803
2810
|
}
|
|
2804
2811
|
if (r.props)
|
|
2805
|
-
for (const
|
|
2806
|
-
let
|
|
2807
|
-
Object.defineProperty(this,
|
|
2812
|
+
for (const o in r.props) {
|
|
2813
|
+
let i = this[o];
|
|
2814
|
+
Object.defineProperty(this, o, {
|
|
2808
2815
|
get() {
|
|
2809
|
-
return
|
|
2816
|
+
return i;
|
|
2810
2817
|
},
|
|
2811
2818
|
set(c) {
|
|
2812
|
-
const f =
|
|
2813
|
-
|
|
2819
|
+
const f = i;
|
|
2820
|
+
i = c, this.context[o] = c, this._initializing || (this._applyProps(r), f !== c && this._requestRender());
|
|
2814
2821
|
},
|
|
2815
2822
|
enumerable: !0,
|
|
2816
2823
|
configurable: !0
|
|
@@ -2926,7 +2933,7 @@ function Yt(e, n) {
|
|
|
2926
2933
|
} catch (r) {
|
|
2927
2934
|
this._hasError = !0;
|
|
2928
2935
|
try {
|
|
2929
|
-
const
|
|
2936
|
+
const o = this.tagName?.toLowerCase?.() || "<unknown>", i = this._componentId || "<unknown-id>", c = {};
|
|
2930
2937
|
if (t && t.props)
|
|
2931
2938
|
for (const f of Object.keys(t.props))
|
|
2932
2939
|
try {
|
|
@@ -2935,7 +2942,7 @@ function Yt(e, n) {
|
|
|
2935
2942
|
} catch {
|
|
2936
2943
|
c[f] = "[unreadable]";
|
|
2937
2944
|
}
|
|
2938
|
-
W(`Error rendering component <${
|
|
2945
|
+
W(`Error rendering component <${o}> (id=${i}):`, r), W("Component props snapshot:", c), Q(
|
|
2939
2946
|
"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`...`)."
|
|
2940
2947
|
);
|
|
2941
2948
|
} catch {
|
|
@@ -2946,9 +2953,9 @@ function Yt(e, n) {
|
|
|
2946
2953
|
// --- State, props, computed ---
|
|
2947
2954
|
_initContext(t) {
|
|
2948
2955
|
try {
|
|
2949
|
-
let s = function(
|
|
2950
|
-
if (Array.isArray(
|
|
2951
|
-
return new Proxy(
|
|
2956
|
+
let s = function(o, i = "") {
|
|
2957
|
+
if (Array.isArray(o))
|
|
2958
|
+
return new Proxy(o, {
|
|
2952
2959
|
get(c, f, u) {
|
|
2953
2960
|
const S = Reflect.get(c, f, u);
|
|
2954
2961
|
return typeof S == "function" && typeof f == "string" && [
|
|
@@ -2959,43 +2966,43 @@ function Yt(e, n) {
|
|
|
2959
2966
|
"splice",
|
|
2960
2967
|
"sort",
|
|
2961
2968
|
"reverse"
|
|
2962
|
-
].includes(f) ? function(...
|
|
2963
|
-
const
|
|
2969
|
+
].includes(f) ? function(...m) {
|
|
2970
|
+
const C = S.apply(c, m);
|
|
2964
2971
|
if (!r._initializing) {
|
|
2965
|
-
const
|
|
2966
|
-
r._triggerWatchers(
|
|
2972
|
+
const w = i || "root";
|
|
2973
|
+
r._triggerWatchers(w, c), Ce(
|
|
2967
2974
|
() => r._render(t),
|
|
2968
2975
|
r._componentId
|
|
2969
2976
|
);
|
|
2970
2977
|
}
|
|
2971
|
-
return
|
|
2978
|
+
return C;
|
|
2972
2979
|
} : S;
|
|
2973
2980
|
},
|
|
2974
2981
|
set(c, f, u) {
|
|
2975
2982
|
if (c[String(f)] = u, !r._initializing) {
|
|
2976
|
-
const S =
|
|
2983
|
+
const S = i ? `${i}.${String(f)}` : String(f);
|
|
2977
2984
|
r._triggerWatchers(S, u), Ce(() => r._render(t), r._componentId);
|
|
2978
2985
|
}
|
|
2979
2986
|
return !0;
|
|
2980
2987
|
},
|
|
2981
2988
|
deleteProperty(c, f) {
|
|
2982
2989
|
if (delete c[String(f)], !r._initializing) {
|
|
2983
|
-
const u =
|
|
2990
|
+
const u = i ? `${i}.${String(f)}` : String(f);
|
|
2984
2991
|
r._triggerWatchers(u, void 0), Ce(() => r._render(t), r._componentId);
|
|
2985
2992
|
}
|
|
2986
2993
|
return !0;
|
|
2987
2994
|
}
|
|
2988
2995
|
});
|
|
2989
|
-
if (
|
|
2990
|
-
if (
|
|
2991
|
-
return
|
|
2992
|
-
for (const c in
|
|
2993
|
-
const f =
|
|
2994
|
-
|
|
2996
|
+
if (o && typeof o == "object") {
|
|
2997
|
+
if (M(o))
|
|
2998
|
+
return o;
|
|
2999
|
+
for (const c in o) {
|
|
3000
|
+
const f = i ? `${i}.${c}` : c;
|
|
3001
|
+
o[c] = s(o[c], f);
|
|
2995
3002
|
}
|
|
2996
|
-
return new Proxy(
|
|
3003
|
+
return new Proxy(o, {
|
|
2997
3004
|
set(c, f, u) {
|
|
2998
|
-
const S =
|
|
3005
|
+
const S = i ? `${i}.${String(f)}` : String(f);
|
|
2999
3006
|
return c[String(f)] = s(u, S), r._initializing || (r._triggerWatchers(
|
|
3000
3007
|
S,
|
|
3001
3008
|
c[String(f)]
|
|
@@ -3006,16 +3013,16 @@ function Yt(e, n) {
|
|
|
3006
3013
|
}
|
|
3007
3014
|
});
|
|
3008
3015
|
}
|
|
3009
|
-
return
|
|
3016
|
+
return o;
|
|
3010
3017
|
};
|
|
3011
3018
|
const r = this;
|
|
3012
3019
|
return s({
|
|
3013
3020
|
// For functional components, state is managed by state() function calls
|
|
3014
3021
|
// Include prop defaults in initial reactive context so prop updates trigger reactivity
|
|
3015
3022
|
...t.props ? Object.fromEntries(
|
|
3016
|
-
Object.entries(t.props).map(([
|
|
3017
|
-
|
|
3018
|
-
|
|
3023
|
+
Object.entries(t.props).map(([o, i]) => [
|
|
3024
|
+
o,
|
|
3025
|
+
i.default
|
|
3019
3026
|
])
|
|
3020
3027
|
) : {}
|
|
3021
3028
|
});
|
|
@@ -3055,47 +3062,47 @@ function yn(e, n) {
|
|
|
3055
3062
|
// Props are accessed via useProps() hook
|
|
3056
3063
|
props: {},
|
|
3057
3064
|
// Add lifecycle hooks from the stored functions
|
|
3058
|
-
onConnected: (
|
|
3065
|
+
onConnected: (o) => {
|
|
3059
3066
|
if (s.onConnected)
|
|
3060
3067
|
try {
|
|
3061
|
-
s.onConnected(
|
|
3068
|
+
s.onConnected(o);
|
|
3062
3069
|
} catch {
|
|
3063
3070
|
}
|
|
3064
3071
|
},
|
|
3065
|
-
onDisconnected: (
|
|
3072
|
+
onDisconnected: (o) => {
|
|
3066
3073
|
if (s.onDisconnected)
|
|
3067
3074
|
try {
|
|
3068
|
-
s.onDisconnected(
|
|
3075
|
+
s.onDisconnected(o);
|
|
3069
3076
|
} catch {
|
|
3070
3077
|
}
|
|
3071
3078
|
},
|
|
3072
|
-
onAttributeChanged: (
|
|
3079
|
+
onAttributeChanged: (o, i, c, f) => {
|
|
3073
3080
|
if (s.onAttributeChanged)
|
|
3074
3081
|
try {
|
|
3075
|
-
s.onAttributeChanged(
|
|
3082
|
+
s.onAttributeChanged(o, i, c, f);
|
|
3076
3083
|
} catch {
|
|
3077
3084
|
}
|
|
3078
3085
|
},
|
|
3079
|
-
onError: (
|
|
3080
|
-
if (s.onError &&
|
|
3086
|
+
onError: (o, i) => {
|
|
3087
|
+
if (s.onError && o)
|
|
3081
3088
|
try {
|
|
3082
|
-
s.onError(
|
|
3089
|
+
s.onError(o, i);
|
|
3083
3090
|
} catch {
|
|
3084
3091
|
}
|
|
3085
3092
|
},
|
|
3086
|
-
render: (
|
|
3087
|
-
const
|
|
3093
|
+
render: (o) => {
|
|
3094
|
+
const i = o, c = i._componentId || `${t}-${Math.random().toString(36).substr(2, 9)}`;
|
|
3088
3095
|
Xe.setCurrentComponent(c, () => {
|
|
3089
|
-
|
|
3096
|
+
o.requestRender && o.requestRender();
|
|
3090
3097
|
});
|
|
3091
3098
|
try {
|
|
3092
|
-
ot(
|
|
3099
|
+
ot(o);
|
|
3093
3100
|
let f;
|
|
3094
3101
|
try {
|
|
3095
3102
|
f = n();
|
|
3096
3103
|
} catch (u) {
|
|
3097
3104
|
try {
|
|
3098
|
-
const S =
|
|
3105
|
+
const S = i._hookCallbacks;
|
|
3099
3106
|
if (S && typeof S.onError == "function")
|
|
3100
3107
|
try {
|
|
3101
3108
|
S.onError(u);
|
|
@@ -3105,14 +3112,14 @@ function yn(e, n) {
|
|
|
3105
3112
|
}
|
|
3106
3113
|
throw u;
|
|
3107
3114
|
}
|
|
3108
|
-
if (
|
|
3109
|
-
const u =
|
|
3110
|
-
if (u.onConnected && (s.onConnected = u.onConnected), u.onDisconnected && (s.onDisconnected = u.onDisconnected), u.onAttributeChanged && (s.onAttributeChanged = u.onAttributeChanged), u.onError && (s.onError = u.onError), u.style && (
|
|
3115
|
+
if (i._hookCallbacks) {
|
|
3116
|
+
const u = i._hookCallbacks;
|
|
3117
|
+
if (u.onConnected && (s.onConnected = u.onConnected), u.onDisconnected && (s.onDisconnected = u.onDisconnected), u.onAttributeChanged && (s.onAttributeChanged = u.onAttributeChanged), u.onError && (s.onError = u.onError), u.style && (i._styleCallback = u.style), u.props) {
|
|
3111
3118
|
const S = u.props;
|
|
3112
3119
|
r.props = Object.fromEntries(
|
|
3113
|
-
Object.entries(S).map(([
|
|
3114
|
-
|
|
3115
|
-
{ type: typeof
|
|
3120
|
+
Object.entries(S).map(([b, m]) => [
|
|
3121
|
+
b,
|
|
3122
|
+
{ type: typeof m == "boolean" ? Boolean : typeof m == "number" ? Number : typeof m == "string" ? String : Function, default: m }
|
|
3116
3123
|
])
|
|
3117
3124
|
), be.set(t, r);
|
|
3118
3125
|
}
|
|
@@ -3125,7 +3132,7 @@ function yn(e, n) {
|
|
|
3125
3132
|
};
|
|
3126
3133
|
if (be.set(t, r), typeof window < "u") {
|
|
3127
3134
|
try {
|
|
3128
|
-
const
|
|
3135
|
+
const o = {
|
|
3129
3136
|
_hookCallbacks: {},
|
|
3130
3137
|
requestRender: () => {
|
|
3131
3138
|
},
|
|
@@ -3135,31 +3142,31 @@ function yn(e, n) {
|
|
|
3135
3142
|
// instances will have a proper emit implementation.
|
|
3136
3143
|
emit: () => !0
|
|
3137
3144
|
};
|
|
3138
|
-
ot(
|
|
3145
|
+
ot(o);
|
|
3139
3146
|
try {
|
|
3140
3147
|
n();
|
|
3141
|
-
} catch (
|
|
3148
|
+
} catch (i) {
|
|
3142
3149
|
try {
|
|
3143
|
-
const c =
|
|
3150
|
+
const c = o?._hookCallbacks;
|
|
3144
3151
|
if (c && typeof c.onError == "function")
|
|
3145
3152
|
try {
|
|
3146
|
-
c.onError(
|
|
3153
|
+
c.onError(i);
|
|
3147
3154
|
} catch {
|
|
3148
3155
|
}
|
|
3149
3156
|
W(
|
|
3150
3157
|
`Error during component discovery render <${t}>:`,
|
|
3151
|
-
|
|
3158
|
+
i
|
|
3152
3159
|
), Q(
|
|
3153
3160
|
"Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when()."
|
|
3154
3161
|
);
|
|
3155
3162
|
} catch {
|
|
3156
3163
|
}
|
|
3157
|
-
throw Ke(),
|
|
3164
|
+
throw Ke(), i;
|
|
3158
3165
|
}
|
|
3159
|
-
if (Ke(),
|
|
3160
|
-
const
|
|
3166
|
+
if (Ke(), o._hookCallbacks?.props) {
|
|
3167
|
+
const i = o._hookCallbacks.props;
|
|
3161
3168
|
r.props = Object.fromEntries(
|
|
3162
|
-
Object.entries(
|
|
3169
|
+
Object.entries(i).map(([c, f]) => [
|
|
3163
3170
|
c,
|
|
3164
3171
|
{ type: typeof f == "boolean" ? Boolean : typeof f == "number" ? Number : typeof f == "string" ? String : Function, default: f }
|
|
3165
3172
|
])
|
|
@@ -3225,21 +3232,21 @@ function en(e, n) {
|
|
|
3225
3232
|
return e.key != null ? e : { ...e, key: n };
|
|
3226
3233
|
}
|
|
3227
3234
|
function tn(e, n = [], t = {}) {
|
|
3228
|
-
const s = {}, r = {},
|
|
3235
|
+
const s = {}, r = {}, o = {}, i = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
|
|
3229
3236
|
let f;
|
|
3230
3237
|
for (; f = c.exec(e); ) {
|
|
3231
3238
|
const u = f[1], S = f[2];
|
|
3232
|
-
let
|
|
3239
|
+
let b = "";
|
|
3233
3240
|
for (let a = 3; a < f.length; a++)
|
|
3234
3241
|
if (f[a] !== void 0) {
|
|
3235
|
-
|
|
3242
|
+
b = f[a];
|
|
3236
3243
|
break;
|
|
3237
3244
|
}
|
|
3238
|
-
|
|
3239
|
-
const
|
|
3240
|
-
let
|
|
3241
|
-
|
|
3242
|
-
const
|
|
3245
|
+
b.length >= 2 && (b[0] === '"' && b[b.length - 1] === '"' || b[0] === "'" && b[b.length - 1] === "'") && (b = b.slice(1, -1));
|
|
3246
|
+
const m = !/=/.test(f[0]), C = b.match(/^{{(\d+)}}$/);
|
|
3247
|
+
let w = m ? !0 : C ? n[Number(C[1])] ?? null : b;
|
|
3248
|
+
C || (w === "true" ? w = !0 : w === "false" ? w = !1 : w === "null" ? w = null : isNaN(Number(w)) || (w = Number(w)));
|
|
3249
|
+
const L = [
|
|
3243
3250
|
"model",
|
|
3244
3251
|
"bind",
|
|
3245
3252
|
"show",
|
|
@@ -3249,66 +3256,66 @@ function tn(e, n = [], t = {}) {
|
|
|
3249
3256
|
"when"
|
|
3250
3257
|
];
|
|
3251
3258
|
if (u === ":") {
|
|
3252
|
-
const [a,
|
|
3253
|
-
if (
|
|
3254
|
-
const
|
|
3255
|
-
|
|
3256
|
-
value:
|
|
3257
|
-
modifiers:
|
|
3258
|
-
arg:
|
|
3259
|
+
const [a, v] = S.split(":"), [h, ...y] = a.split(".");
|
|
3260
|
+
if (L.includes(h)) {
|
|
3261
|
+
const p = [...y], _ = h === "model" && v ? `model:${v}` : h;
|
|
3262
|
+
o[_] = {
|
|
3263
|
+
value: w,
|
|
3264
|
+
modifiers: p,
|
|
3265
|
+
arg: v
|
|
3259
3266
|
};
|
|
3260
3267
|
} else if (S === "disabled") {
|
|
3261
|
-
let
|
|
3262
|
-
|
|
3263
|
-
const _ = typeof
|
|
3264
|
-
if (
|
|
3265
|
-
s[S] =
|
|
3268
|
+
let p = w;
|
|
3269
|
+
p && M(p) && (p = p.value);
|
|
3270
|
+
const _ = typeof p;
|
|
3271
|
+
if (p === "" || _ === "boolean" || _ === "string" && (p === "true" || p === "false") || p == null || _ === "number")
|
|
3272
|
+
s[S] = p;
|
|
3266
3273
|
else {
|
|
3267
|
-
let
|
|
3268
|
-
|
|
3274
|
+
let d = w;
|
|
3275
|
+
d && M(d) && (d = d.value), r[S] = d;
|
|
3269
3276
|
}
|
|
3270
|
-
|
|
3277
|
+
i.push(S);
|
|
3271
3278
|
} else {
|
|
3272
|
-
let
|
|
3273
|
-
|
|
3279
|
+
let p = w;
|
|
3280
|
+
p && M(p) && (p = p.value), r[S] = p, i.push(S);
|
|
3274
3281
|
}
|
|
3275
3282
|
} else if (u === "@") {
|
|
3276
|
-
const [a, ...
|
|
3277
|
-
Qt(
|
|
3278
|
-
const
|
|
3279
|
-
if (
|
|
3280
|
-
const
|
|
3281
|
-
if (
|
|
3282
|
-
return
|
|
3283
|
+
const [a, ...v] = S.split("."), h = v;
|
|
3284
|
+
Qt(w, a);
|
|
3285
|
+
const y = typeof w == "function" ? w : typeof t[w] == "function" ? t[w] : void 0;
|
|
3286
|
+
if (y) {
|
|
3287
|
+
const p = (E) => {
|
|
3288
|
+
if (h.includes("prevent") && E.preventDefault(), h.includes("stop") && E.stopPropagation(), !(h.includes("self") && E.target !== E.currentTarget))
|
|
3289
|
+
return h.includes("once") && E.currentTarget?.removeEventListener(
|
|
3283
3290
|
a,
|
|
3284
|
-
|
|
3285
|
-
),
|
|
3291
|
+
p
|
|
3292
|
+
), y(E);
|
|
3286
3293
|
}, _ = "on" + a.charAt(0).toUpperCase() + a.slice(1);
|
|
3287
|
-
s[_] =
|
|
3294
|
+
s[_] = p;
|
|
3288
3295
|
}
|
|
3289
|
-
} else S === "ref" ? s.ref =
|
|
3296
|
+
} else S === "ref" ? s.ref = w : r[S] = w;
|
|
3290
3297
|
}
|
|
3291
|
-
return { props: s, attrs: r, directives:
|
|
3298
|
+
return { props: s, attrs: r, directives: o, bound: i };
|
|
3292
3299
|
}
|
|
3293
3300
|
function Ge(e) {
|
|
3294
3301
|
if (!fe(e) || Oe(e))
|
|
3295
3302
|
return e;
|
|
3296
3303
|
const n = e.props?.directives;
|
|
3297
3304
|
if (n && n.when) {
|
|
3298
|
-
const t = n.when.value, s =
|
|
3305
|
+
const t = n.when.value, s = M(t) ? t.value : t, r = { ...n };
|
|
3299
3306
|
delete r.when;
|
|
3300
|
-
const
|
|
3301
|
-
Object.keys(r).length > 0 ?
|
|
3302
|
-
const
|
|
3307
|
+
const o = { ...e.props };
|
|
3308
|
+
Object.keys(r).length > 0 ? o.directives = r : delete o.directives;
|
|
3309
|
+
const i = {
|
|
3303
3310
|
...e,
|
|
3304
|
-
props:
|
|
3311
|
+
props: o
|
|
3305
3312
|
};
|
|
3306
|
-
return Array.isArray(
|
|
3313
|
+
return Array.isArray(i.children) && (i.children = i.children.map(
|
|
3307
3314
|
(f) => typeof f == "object" && f !== null ? Ge(f) : f
|
|
3308
3315
|
)), {
|
|
3309
3316
|
tag: "#anchor",
|
|
3310
3317
|
key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
|
|
3311
|
-
children: s ? [
|
|
3318
|
+
children: s ? [i] : []
|
|
3312
3319
|
};
|
|
3313
3320
|
}
|
|
3314
3321
|
if (Array.isArray(e.children)) {
|
|
@@ -3323,62 +3330,62 @@ function Ge(e) {
|
|
|
3323
3330
|
return e;
|
|
3324
3331
|
}
|
|
3325
3332
|
function nn(e, n, t) {
|
|
3326
|
-
const s = Le.length > 0 ? Le[Le.length - 1] : void 0, r = t ?? s,
|
|
3327
|
-
if (
|
|
3328
|
-
const l = Ue.get(
|
|
3333
|
+
const s = Le.length > 0 ? Le[Le.length - 1] : void 0, r = t ?? s, o = !t && n.length === 0, i = o ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3334
|
+
if (o && i) {
|
|
3335
|
+
const l = Ue.get(i);
|
|
3329
3336
|
if (l) return l;
|
|
3330
3337
|
}
|
|
3331
|
-
function c(l,
|
|
3332
|
-
return oe("#text", {}, l,
|
|
3338
|
+
function c(l, g) {
|
|
3339
|
+
return oe("#text", {}, l, g);
|
|
3333
3340
|
}
|
|
3334
|
-
function f(l,
|
|
3341
|
+
function f(l, g, A = !1) {
|
|
3335
3342
|
let N = typeof l == "string" ? Et(l) : l;
|
|
3336
|
-
return !A && typeof N == "string" && /[\r\n]/.test(N) && (N = N.replace(/\s+/g, " ")), oe("#text", {}, N,
|
|
3343
|
+
return !A && typeof N == "string" && /[\r\n]/.test(N) && (N = N.replace(/\s+/g, " ")), oe("#text", {}, N, g);
|
|
3337
3344
|
}
|
|
3338
3345
|
let u = "";
|
|
3339
3346
|
for (let l = 0; l < e.length; l++)
|
|
3340
3347
|
u += e[l], l < n.length && (u += `{{${l}}}`);
|
|
3341
|
-
const S = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g,
|
|
3342
|
-
let
|
|
3343
|
-
const
|
|
3348
|
+
const S = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, b = [];
|
|
3349
|
+
let m, C = [], w = null, L = {}, a, v = 0;
|
|
3350
|
+
const h = [], y = /* @__PURE__ */ new Set([
|
|
3344
3351
|
"pre",
|
|
3345
3352
|
"code",
|
|
3346
3353
|
"textarea",
|
|
3347
3354
|
"script",
|
|
3348
3355
|
"style"
|
|
3349
3356
|
]);
|
|
3350
|
-
function
|
|
3351
|
-
if (
|
|
3357
|
+
function p() {
|
|
3358
|
+
if (w && y.has(w.toLowerCase()))
|
|
3352
3359
|
return !0;
|
|
3353
|
-
for (const l of
|
|
3354
|
-
if (
|
|
3360
|
+
for (const l of b)
|
|
3361
|
+
if (y.has(l.tag.toLowerCase()))
|
|
3355
3362
|
return !0;
|
|
3356
3363
|
return !1;
|
|
3357
3364
|
}
|
|
3358
3365
|
function _(l) {
|
|
3359
3366
|
if (!l || typeof l != "object" || Oe(l)) return;
|
|
3360
|
-
const
|
|
3361
|
-
if (
|
|
3362
|
-
const N =
|
|
3367
|
+
const g = l, A = L;
|
|
3368
|
+
if (g.props || g.attrs) {
|
|
3369
|
+
const N = g;
|
|
3363
3370
|
N.props && (A.props || (A.props = {}), Object.assign(A.props, N.props)), N.attrs && (A.attrs || (A.attrs = {}), Object.keys(N.attrs).forEach((O) => {
|
|
3364
3371
|
if (O === "style" && A.attrs.style) {
|
|
3365
|
-
const
|
|
3366
|
-
A.attrs.style =
|
|
3372
|
+
const j = String(A.attrs.style).replace(/;?\s*$/, ""), R = String(N.attrs.style).replace(/^;?\s*/, "");
|
|
3373
|
+
A.attrs.style = j + "; " + R;
|
|
3367
3374
|
} else if (O === "class" && A.attrs.class) {
|
|
3368
|
-
const
|
|
3369
|
-
.../* @__PURE__ */ new Set([
|
|
3375
|
+
const j = String(A.attrs.class).trim().split(/\s+/).filter(Boolean), R = String(N.attrs.class).trim().split(/\s+/).filter(Boolean), P = [
|
|
3376
|
+
.../* @__PURE__ */ new Set([...j, ...R])
|
|
3370
3377
|
];
|
|
3371
|
-
A.attrs.class =
|
|
3378
|
+
A.attrs.class = P.join(" ");
|
|
3372
3379
|
} else
|
|
3373
3380
|
A.attrs[O] = N.attrs[O];
|
|
3374
3381
|
}));
|
|
3375
3382
|
} else
|
|
3376
|
-
A.props || (A.props = {}), Object.assign(A.props,
|
|
3383
|
+
A.props || (A.props = {}), Object.assign(A.props, g);
|
|
3377
3384
|
}
|
|
3378
|
-
function
|
|
3379
|
-
const A =
|
|
3385
|
+
function E(l, g) {
|
|
3386
|
+
const A = w ? C : h;
|
|
3380
3387
|
if (Oe(l)) {
|
|
3381
|
-
const N = l.key ??
|
|
3388
|
+
const N = l.key ?? g, O = l.children;
|
|
3382
3389
|
A.push({
|
|
3383
3390
|
...l,
|
|
3384
3391
|
key: N,
|
|
@@ -3394,29 +3401,29 @@ function nn(e, n, t) {
|
|
|
3394
3401
|
if (l.length === 0) return;
|
|
3395
3402
|
for (let N = 0; N < l.length; N++) {
|
|
3396
3403
|
const O = l[N];
|
|
3397
|
-
Oe(O) || fe(O) || Array.isArray(O) ?
|
|
3404
|
+
Oe(O) || fe(O) || Array.isArray(O) ? E(O, `${g}-${N}`) : O !== null && typeof O == "object" ? Qe(O) ? A.push(
|
|
3398
3405
|
oe(
|
|
3399
3406
|
"#raw",
|
|
3400
3407
|
{},
|
|
3401
3408
|
O.__rawHTML,
|
|
3402
|
-
`${
|
|
3409
|
+
`${g}-${N}`
|
|
3403
3410
|
)
|
|
3404
|
-
) : _(O) : A.push(c(String(O), `${
|
|
3411
|
+
) : _(O) : A.push(c(String(O), `${g}-${N}`));
|
|
3405
3412
|
}
|
|
3406
3413
|
return;
|
|
3407
3414
|
}
|
|
3408
3415
|
if (l !== null && typeof l == "object") {
|
|
3409
3416
|
if (Qe(l)) {
|
|
3410
3417
|
const N = l.__rawHTML ?? "";
|
|
3411
|
-
A.push(oe("#raw", {}, N,
|
|
3418
|
+
A.push(oe("#raw", {}, N, g));
|
|
3412
3419
|
return;
|
|
3413
3420
|
}
|
|
3414
3421
|
_(l);
|
|
3415
3422
|
return;
|
|
3416
3423
|
}
|
|
3417
|
-
A.push(c(String(l),
|
|
3424
|
+
A.push(c(String(l), g));
|
|
3418
3425
|
}
|
|
3419
|
-
const
|
|
3426
|
+
const T = /* @__PURE__ */ new Set([
|
|
3420
3427
|
"area",
|
|
3421
3428
|
"base",
|
|
3422
3429
|
"br",
|
|
@@ -3432,23 +3439,23 @@ function nn(e, n, t) {
|
|
|
3432
3439
|
"track",
|
|
3433
3440
|
"wbr"
|
|
3434
3441
|
]);
|
|
3435
|
-
for (;
|
|
3436
|
-
if (!(
|
|
3437
|
-
if (
|
|
3438
|
-
const l =
|
|
3442
|
+
for (; m = S.exec(u); )
|
|
3443
|
+
if (!(m[0].startsWith("<!--") && m[0].endsWith("-->"))) {
|
|
3444
|
+
if (m[1]) {
|
|
3445
|
+
const l = m[1], g = m[0][1] === "/", A = m[0][m[0].length - 2] === "/" || T.has(l), {
|
|
3439
3446
|
props: N,
|
|
3440
3447
|
attrs: O,
|
|
3441
|
-
directives:
|
|
3448
|
+
directives: j,
|
|
3442
3449
|
bound: R
|
|
3443
3450
|
} = tn(
|
|
3444
|
-
|
|
3451
|
+
m[2] || "",
|
|
3445
3452
|
n,
|
|
3446
3453
|
r ?? {}
|
|
3447
|
-
),
|
|
3448
|
-
for (const K in N)
|
|
3449
|
-
for (const K in O)
|
|
3450
|
-
|
|
3451
|
-
|
|
3454
|
+
), P = { props: {}, attrs: {} };
|
|
3455
|
+
for (const K in N) P.props[K] = N[K];
|
|
3456
|
+
for (const K in O) P.attrs[K] = O[K];
|
|
3457
|
+
P.attrs && Object.prototype.hasOwnProperty.call(P.attrs, "key") && !(P.props && Object.prototype.hasOwnProperty.call(P.props, "key")) && H(() => {
|
|
3458
|
+
P.props.key = P.attrs.key;
|
|
3452
3459
|
});
|
|
3453
3460
|
try {
|
|
3454
3461
|
const K = {
|
|
@@ -3476,84 +3483,84 @@ function nn(e, n, t) {
|
|
|
3476
3483
|
img: ["src", "alt", "width", "height"],
|
|
3477
3484
|
button: ["type", "name", "value", "autofocus", "form"]
|
|
3478
3485
|
}, I = l.toLowerCase(), ie = K[I] ?? [];
|
|
3479
|
-
if (
|
|
3486
|
+
if (P.attrs) {
|
|
3480
3487
|
for (const x of ie)
|
|
3481
|
-
if (R && R.includes(x) && x in
|
|
3482
|
-
let
|
|
3483
|
-
if (
|
|
3484
|
-
|
|
3485
|
-
else if (
|
|
3488
|
+
if (R && R.includes(x) && x in P.attrs && !(P.props && x in P.props)) {
|
|
3489
|
+
let $ = P.attrs[x];
|
|
3490
|
+
if ($ && M($))
|
|
3491
|
+
$ = $.value, P.props[x] = $, delete P.attrs[x];
|
|
3492
|
+
else if ($ && typeof $ == "object" && "value" in $ && !($ instanceof Node))
|
|
3486
3493
|
try {
|
|
3487
|
-
const z =
|
|
3488
|
-
|
|
3494
|
+
const z = $.value;
|
|
3495
|
+
P.props[x] = (I === "select" || I === "option") && x === "value" ? String(z) : z, delete P.attrs[x];
|
|
3489
3496
|
} catch {
|
|
3490
3497
|
}
|
|
3491
3498
|
else {
|
|
3492
|
-
const z = typeof
|
|
3499
|
+
const z = typeof $;
|
|
3493
3500
|
if (x === "disabled")
|
|
3494
|
-
(
|
|
3495
|
-
else if (
|
|
3496
|
-
const ee = (I === "select" || I === "option") && x === "value" ? String(
|
|
3497
|
-
|
|
3501
|
+
($ === "" || z === "boolean" || z === "string" && ($ === "true" || $ === "false") || $ == null || z === "number") && (P.props[x] = $, delete P.attrs[x]);
|
|
3502
|
+
else if ($ === "" || z === "string" || z === "number" || z === "boolean" || $ == null) {
|
|
3503
|
+
const ee = (I === "select" || I === "option") && x === "value" ? String($) : $;
|
|
3504
|
+
P.props[x] = ee, delete P.attrs[x];
|
|
3498
3505
|
}
|
|
3499
3506
|
}
|
|
3500
3507
|
}
|
|
3501
3508
|
}
|
|
3502
3509
|
if (l.includes("-") || !!r?.__customElements?.has?.(l)) {
|
|
3503
|
-
if (
|
|
3510
|
+
if (P.isCustomElement = !0, R && P.attrs) {
|
|
3504
3511
|
const x = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
3505
|
-
for (const
|
|
3506
|
-
if (
|
|
3507
|
-
const z =
|
|
3508
|
-
if (
|
|
3512
|
+
for (const $ of R)
|
|
3513
|
+
if ($ in P.attrs && !(P.props && $ in P.props)) {
|
|
3514
|
+
const z = $.includes("-") ? Ze($) : $, ee = P.attrs[$];
|
|
3515
|
+
if (P.props[z] = ee, x.has($) || at($))
|
|
3509
3516
|
try {
|
|
3510
|
-
const
|
|
3511
|
-
|
|
3517
|
+
const Me = F(P.attrs[$]);
|
|
3518
|
+
Me === null ? delete P.attrs[$] : P.attrs[$] = Me;
|
|
3512
3519
|
} catch {
|
|
3513
|
-
delete
|
|
3520
|
+
delete P.attrs[$];
|
|
3514
3521
|
}
|
|
3515
3522
|
else
|
|
3516
|
-
delete
|
|
3523
|
+
delete P.attrs[$];
|
|
3517
3524
|
}
|
|
3518
3525
|
}
|
|
3519
3526
|
try {
|
|
3520
|
-
if (
|
|
3521
|
-
const x =
|
|
3522
|
-
typeof x < "u" && (
|
|
3527
|
+
if (P.attrs && !(P.props && "modelValue" in P.props)) {
|
|
3528
|
+
const x = P.attrs["model-value"] ?? P.attrs.modelValue;
|
|
3529
|
+
typeof x < "u" && (P.props.modelValue = x);
|
|
3523
3530
|
}
|
|
3524
3531
|
} catch {
|
|
3525
3532
|
}
|
|
3526
3533
|
}
|
|
3527
3534
|
} catch {
|
|
3528
3535
|
}
|
|
3529
|
-
if (
|
|
3536
|
+
if (j && Object.keys(j).some(
|
|
3530
3537
|
(K) => K === "model" || K.startsWith("model:")
|
|
3531
3538
|
))
|
|
3532
3539
|
try {
|
|
3533
3540
|
const K = Symbol.for("cer.registry"), I = globalThis[K], ie = !!(I && typeof I.has == "function" && I.has(l)), Y = r, x = !!(Y && (Y.__customElements instanceof Set && Y.__customElements.has(l) || Array.isArray(Y.__isCustomElements) && Y.__isCustomElements.includes(l)));
|
|
3534
3541
|
if (!!(l.includes("-") || x || ie))
|
|
3535
|
-
for (const ee of Object.keys(
|
|
3542
|
+
for (const ee of Object.keys(j)) {
|
|
3536
3543
|
if (ee !== "model" && !ee.startsWith("model:")) continue;
|
|
3537
|
-
const
|
|
3544
|
+
const je = j[ee], Me = je.arg ?? (ee.includes(":") ? ee.split(":", 2)[1] : void 0), V = je.value, Be = Me ?? "modelValue", Je = U, ht = Re, Se = r?._state || r;
|
|
3538
3545
|
let re;
|
|
3539
3546
|
typeof V == "string" && Se ? re = Je(
|
|
3540
3547
|
Se,
|
|
3541
3548
|
V
|
|
3542
|
-
) : re = V,
|
|
3549
|
+
) : re = V, P.props[Be] = re;
|
|
3543
3550
|
try {
|
|
3544
3551
|
const ce = J(Be);
|
|
3545
|
-
|
|
3552
|
+
P.attrs || (P.attrs = {}), re != null && (typeof re == "string" || typeof re == "number" || typeof re == "boolean") && (P.attrs[ce] = re);
|
|
3546
3553
|
} catch {
|
|
3547
3554
|
}
|
|
3548
|
-
|
|
3555
|
+
P.isCustomElement = !0;
|
|
3549
3556
|
const Ye = `update:${J(Be)}`.replace(
|
|
3550
3557
|
/-([a-z])/g,
|
|
3551
3558
|
(ce, ne) => ne.toUpperCase()
|
|
3552
3559
|
), yt = "on" + Ye.charAt(0).toUpperCase() + Ye.slice(1);
|
|
3553
|
-
|
|
3560
|
+
P.props[yt] = function(ce) {
|
|
3554
3561
|
const ne = ce.detail !== void 0 ? ce.detail : ce.target ? ce.target.value : void 0;
|
|
3555
3562
|
if (Se)
|
|
3556
|
-
if (V &&
|
|
3563
|
+
if (V && M(V)) {
|
|
3557
3564
|
const ae = V.value;
|
|
3558
3565
|
if (Array.isArray(ne) && Array.isArray(ae) ? JSON.stringify([...ne].sort()) !== JSON.stringify([...ae].sort()) : ne !== ae) {
|
|
3559
3566
|
V.value = ne;
|
|
@@ -3587,72 +3594,72 @@ function nn(e, n, t) {
|
|
|
3587
3594
|
}
|
|
3588
3595
|
}
|
|
3589
3596
|
}
|
|
3590
|
-
}, delete
|
|
3597
|
+
}, delete j[ee];
|
|
3591
3598
|
}
|
|
3592
3599
|
} catch {
|
|
3593
3600
|
}
|
|
3594
|
-
if (Object.keys(
|
|
3595
|
-
const K =
|
|
3601
|
+
if (Object.keys(j).length > 0 && (P.directives = { ...j }), g) {
|
|
3602
|
+
const K = C.some(
|
|
3596
3603
|
(x) => typeof x == "object" && x.tag !== "#text"
|
|
3597
3604
|
);
|
|
3598
|
-
let I =
|
|
3599
|
-
if (K &&
|
|
3605
|
+
let I = C;
|
|
3606
|
+
if (K && C.length > 0) {
|
|
3600
3607
|
let x = 0;
|
|
3601
|
-
for (; x <
|
|
3602
|
-
const z =
|
|
3608
|
+
for (; x < C.length; ) {
|
|
3609
|
+
const z = C[x];
|
|
3603
3610
|
if (!fe(z) || z.tag !== "#text" || typeof z.children != "string" || z.children.trim() !== "")
|
|
3604
3611
|
break;
|
|
3605
3612
|
x++;
|
|
3606
3613
|
}
|
|
3607
|
-
let
|
|
3608
|
-
for (;
|
|
3609
|
-
const z =
|
|
3614
|
+
let $ = C.length - 1;
|
|
3615
|
+
for (; $ >= 0; ) {
|
|
3616
|
+
const z = C[$];
|
|
3610
3617
|
if (!fe(z) || z.tag !== "#text" || typeof z.children != "string" || z.children.trim() !== "")
|
|
3611
3618
|
break;
|
|
3612
|
-
|
|
3619
|
+
$--;
|
|
3613
3620
|
}
|
|
3614
|
-
x === 0 &&
|
|
3621
|
+
x === 0 && $ === C.length - 1 ? I = C : x > $ ? I = [] : I = C.slice(x, $ + 1);
|
|
3615
3622
|
}
|
|
3616
3623
|
const ie = oe(
|
|
3617
|
-
|
|
3618
|
-
|
|
3624
|
+
w,
|
|
3625
|
+
L,
|
|
3619
3626
|
I.length === 1 && fe(I[0]) && I[0].tag === "#text" ? typeof I[0].children == "string" ? I[0].children : "" : I.length ? I : void 0,
|
|
3620
3627
|
a
|
|
3621
|
-
), Y =
|
|
3622
|
-
Y ? (
|
|
3623
|
-
} else A ?
|
|
3624
|
-
tag:
|
|
3625
|
-
props:
|
|
3626
|
-
children:
|
|
3628
|
+
), Y = b.pop();
|
|
3629
|
+
Y ? (w = Y.tag, L = Y.props, a = Y.key, C = Y.children, C.push(ie)) : (h.push(ie), w = null, L = {}, a = void 0, C = []);
|
|
3630
|
+
} else A ? w ? C.push(oe(l, P, void 0, void 0)) : h.push(oe(l, P, void 0, void 0)) : (w && b.push({
|
|
3631
|
+
tag: w,
|
|
3632
|
+
props: L,
|
|
3633
|
+
children: C,
|
|
3627
3634
|
key: a
|
|
3628
|
-
}),
|
|
3629
|
-
} else if (typeof
|
|
3630
|
-
const l = Number(
|
|
3631
|
-
|
|
3632
|
-
} else if (
|
|
3633
|
-
const l =
|
|
3635
|
+
}), w = l, L = P, C = []);
|
|
3636
|
+
} else if (typeof m[3] < "u") {
|
|
3637
|
+
const l = Number(m[3]), g = n[l], A = `interp-${l}`;
|
|
3638
|
+
E(g, A);
|
|
3639
|
+
} else if (m[4]) {
|
|
3640
|
+
const l = m[4], g = w ? C : h, A = l.split(/({{\d+}})/);
|
|
3634
3641
|
for (const N of A) {
|
|
3635
3642
|
if (!N) continue;
|
|
3636
3643
|
const O = N.match(/^{{(\d+)}}$/);
|
|
3637
3644
|
if (O) {
|
|
3638
|
-
const
|
|
3639
|
-
|
|
3645
|
+
const j = Number(O[1]), R = n[j], P = `interp-${j}`;
|
|
3646
|
+
E(R, P);
|
|
3640
3647
|
} else {
|
|
3641
|
-
const
|
|
3642
|
-
|
|
3648
|
+
const j = `text-${v++}`, R = p();
|
|
3649
|
+
g.push(f(N, j, R));
|
|
3643
3650
|
}
|
|
3644
3651
|
}
|
|
3645
3652
|
}
|
|
3646
3653
|
}
|
|
3647
|
-
const k =
|
|
3654
|
+
const k = h.filter((l) => fe(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0).map(
|
|
3648
3655
|
(l) => Ge(l)
|
|
3649
3656
|
);
|
|
3650
3657
|
if (k.length === 1) {
|
|
3651
3658
|
const l = k[0];
|
|
3652
|
-
return
|
|
3659
|
+
return o && i && Ue.set(i, l), l;
|
|
3653
3660
|
} else if (k.length > 1) {
|
|
3654
3661
|
const l = k;
|
|
3655
|
-
return
|
|
3662
|
+
return o && i && Ue.set(i, l), l;
|
|
3656
3663
|
}
|
|
3657
3664
|
return oe("div", {}, "", "fallback-root");
|
|
3658
3665
|
}
|