@jasonshimmy/custom-elements-runtime 1.1.1 → 1.1.2
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 +15 -15
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1495 -1425
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +14 -14
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/runtime/style.d.ts +1 -0
- package/dist/transitions.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
const Lt = typeof process < "u" && process.env?.NODE_ENV !== "production";
|
|
2
|
+
function F(e, ...t) {
|
|
3
|
+
Lt && console.error(e, ...t);
|
|
4
4
|
}
|
|
5
5
|
function oe(e, ...t) {
|
|
6
|
-
|
|
6
|
+
Lt && console.warn(e, ...t);
|
|
7
7
|
}
|
|
8
8
|
class Wt {
|
|
9
9
|
pendingUpdates = /* @__PURE__ */ new Map();
|
|
@@ -26,7 +26,7 @@ class Wt {
|
|
|
26
26
|
try {
|
|
27
27
|
r();
|
|
28
28
|
} catch (n) {
|
|
29
|
-
|
|
29
|
+
F("Error in batched update:", n);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -36,12 +36,12 @@ class Wt {
|
|
|
36
36
|
return this.pendingUpdates.size;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
function
|
|
41
|
-
|
|
39
|
+
const zt = new Wt();
|
|
40
|
+
function ye(e, t) {
|
|
41
|
+
zt.schedule(e, t);
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
class
|
|
43
|
+
const gt = /* @__PURE__ */ new WeakSet();
|
|
44
|
+
class Ut {
|
|
45
45
|
static cache = /* @__PURE__ */ new WeakMap();
|
|
46
46
|
static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
|
|
47
47
|
static objectHandlerCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -54,7 +54,7 @@ class zt {
|
|
|
54
54
|
return o;
|
|
55
55
|
const i = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), s = new Proxy(t, i);
|
|
56
56
|
try {
|
|
57
|
-
|
|
57
|
+
Pt.markAsProxy(s);
|
|
58
58
|
} catch {
|
|
59
59
|
}
|
|
60
60
|
return this.cache.set(t, s), s;
|
|
@@ -78,8 +78,8 @@ class zt {
|
|
|
78
78
|
"fill",
|
|
79
79
|
"copyWithin"
|
|
80
80
|
].includes(o) ? function(...a) {
|
|
81
|
-
const
|
|
82
|
-
return t.triggerUpdate(),
|
|
81
|
+
const f = s.apply(n, a);
|
|
82
|
+
return t.triggerUpdate(), f;
|
|
83
83
|
} : s;
|
|
84
84
|
},
|
|
85
85
|
set: (n, o, i) => (n[o] = t.makeReactiveValue(i), t.triggerUpdate(), !0),
|
|
@@ -125,7 +125,7 @@ class zt {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class Pt {
|
|
129
129
|
// Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
|
|
130
130
|
// This allows handler caches in ReactiveProxyCache to reuse handlers
|
|
131
131
|
// for identical reactive contexts instead of creating a new context object
|
|
@@ -136,7 +136,7 @@ class Lt {
|
|
|
136
136
|
*/
|
|
137
137
|
static createReactiveProxy(t, r, n) {
|
|
138
138
|
try {
|
|
139
|
-
if (
|
|
139
|
+
if (gt.has(t)) return t;
|
|
140
140
|
} catch {
|
|
141
141
|
}
|
|
142
142
|
const o = Array.isArray(t);
|
|
@@ -146,7 +146,7 @@ class Lt {
|
|
|
146
146
|
return s || (s = {
|
|
147
147
|
triggerUpdate: r,
|
|
148
148
|
makeReactiveValue: n
|
|
149
|
-
}, i.set(n, s)),
|
|
149
|
+
}, i.set(n, s)), Ut.getOrCreateProxy(t, s, o);
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
152
|
* Mark an object as a proxy (for optimization)
|
|
@@ -154,12 +154,12 @@ class Lt {
|
|
|
154
154
|
static markAsProxy(t) {
|
|
155
155
|
if (t)
|
|
156
156
|
try {
|
|
157
|
-
|
|
157
|
+
gt.add(t);
|
|
158
158
|
} catch {
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
class
|
|
162
|
+
class Kt {
|
|
163
163
|
currentComponent = null;
|
|
164
164
|
// Consolidated component data: stores dependencies, render function, state index, and last warning time
|
|
165
165
|
componentData = /* @__PURE__ */ new Map();
|
|
@@ -257,7 +257,7 @@ class Ut {
|
|
|
257
257
|
const r = t.getDependents();
|
|
258
258
|
for (const n of r) {
|
|
259
259
|
const o = this.componentData.get(n);
|
|
260
|
-
o &&
|
|
260
|
+
o && ye(o.renderFn, n);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
@@ -275,7 +275,7 @@ class Ut {
|
|
|
275
275
|
o.startsWith(n) && this.stateStorage.delete(o);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
const
|
|
278
|
+
const X = new Kt();
|
|
279
279
|
class Ue {
|
|
280
280
|
_value;
|
|
281
281
|
dependents = /* @__PURE__ */ new Set();
|
|
@@ -288,15 +288,15 @@ class Ue {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
get value() {
|
|
291
|
-
return
|
|
291
|
+
return X.trackDependency(this), this._value;
|
|
292
292
|
}
|
|
293
293
|
set value(t) {
|
|
294
|
-
|
|
294
|
+
X.isRenderingComponent() && X.shouldEmitRenderWarning() && oe(
|
|
295
295
|
`🚨 State modification detected during render! This can cause infinite loops.
|
|
296
296
|
• Move state updates to event handlers
|
|
297
297
|
• Use useEffect/watch for side effects
|
|
298
298
|
• Ensure computed properties don't modify state`
|
|
299
|
-
), this._value = this.makeReactive(t),
|
|
299
|
+
), this._value = this.makeReactive(t), X.triggerUpdate(this);
|
|
300
300
|
}
|
|
301
301
|
addDependent(t) {
|
|
302
302
|
this.dependents.add(t);
|
|
@@ -308,15 +308,15 @@ class Ue {
|
|
|
308
308
|
return this.dependents;
|
|
309
309
|
}
|
|
310
310
|
makeReactive(t) {
|
|
311
|
-
return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t :
|
|
311
|
+
return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : Pt.createReactiveProxy(
|
|
312
312
|
t,
|
|
313
|
-
() =>
|
|
313
|
+
() => X.triggerUpdate(this),
|
|
314
314
|
(r) => this.makeReactive(r)
|
|
315
315
|
);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
function Wn(e) {
|
|
319
|
-
return
|
|
319
|
+
return X.getOrCreateState(e === void 0 ? null : e);
|
|
320
320
|
}
|
|
321
321
|
function R(e) {
|
|
322
322
|
if (!e || typeof e != "object") return !1;
|
|
@@ -327,48 +327,48 @@ function R(e) {
|
|
|
327
327
|
return !1;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function zn(e) {
|
|
331
331
|
const t = new Ue(e());
|
|
332
332
|
return {
|
|
333
333
|
get value() {
|
|
334
|
-
return
|
|
334
|
+
return X.trackDependency(t), e();
|
|
335
335
|
}
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Un(e, t, r = {}) {
|
|
339
339
|
let n = e();
|
|
340
340
|
r.immediate && t(n, n);
|
|
341
341
|
const o = `watch-${Math.random().toString(36).substr(2, 9)}`, i = () => {
|
|
342
|
-
|
|
342
|
+
X.setCurrentComponent(o, i);
|
|
343
343
|
const s = e();
|
|
344
|
-
|
|
344
|
+
X.clearCurrentComponent(), s !== n && (t(s, n), n = s);
|
|
345
345
|
};
|
|
346
|
-
return
|
|
347
|
-
|
|
346
|
+
return X.setCurrentComponent(o, i), e(), X.clearCurrentComponent(), () => {
|
|
347
|
+
X.cleanup(o);
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
const
|
|
350
|
+
const P = (e) => {
|
|
351
351
|
try {
|
|
352
352
|
e();
|
|
353
353
|
} catch {
|
|
354
354
|
}
|
|
355
|
-
},
|
|
356
|
-
function
|
|
357
|
-
if (
|
|
358
|
-
return
|
|
355
|
+
}, De = /* @__PURE__ */ new Map(), He = /* @__PURE__ */ new Map(), Ie = /* @__PURE__ */ new Map(), pt = 500;
|
|
356
|
+
function te(e) {
|
|
357
|
+
if (De.has(e))
|
|
358
|
+
return De.get(e);
|
|
359
359
|
const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
360
|
-
return
|
|
360
|
+
return De.size < pt && De.set(e, t), t;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
if (
|
|
364
|
-
return
|
|
362
|
+
function ht(e) {
|
|
363
|
+
if (He.has(e))
|
|
364
|
+
return He.get(e);
|
|
365
365
|
const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
|
|
366
|
-
return
|
|
366
|
+
return He.size < pt && He.set(e, t), t;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Ee(e) {
|
|
369
369
|
if (typeof e == "string") {
|
|
370
|
-
if (
|
|
371
|
-
return
|
|
370
|
+
if (Ie.has(e))
|
|
371
|
+
return Ie.get(e);
|
|
372
372
|
const t = e.replace(
|
|
373
373
|
/[&<>"']/g,
|
|
374
374
|
(r) => ({
|
|
@@ -379,7 +379,7 @@ function Ce(e) {
|
|
|
379
379
|
"'": "'"
|
|
380
380
|
})[r]
|
|
381
381
|
);
|
|
382
|
-
return t !== e &&
|
|
382
|
+
return t !== e && Ie.size < pt && Ie.set(e, t), t;
|
|
383
383
|
}
|
|
384
384
|
return e;
|
|
385
385
|
}
|
|
@@ -390,13 +390,13 @@ function V(e, t) {
|
|
|
390
390
|
}
|
|
391
391
|
return t;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function qe(e, t, r) {
|
|
394
394
|
const n = String(t).split("."), o = n.pop();
|
|
395
395
|
if (!o) return;
|
|
396
396
|
const i = n.reduce((s, c) => (s[c] == null && (s[c] = {}), s[c]), e);
|
|
397
397
|
R(i[o]) ? i[o].value = r : i[o] = r;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function qt(e, t, r) {
|
|
400
400
|
if (r)
|
|
401
401
|
for (const [n, o] of Object.entries(r)) {
|
|
402
402
|
let i, s = {};
|
|
@@ -409,7 +409,7 @@ function Kt(e, t, r) {
|
|
|
409
409
|
const c = V(e, n);
|
|
410
410
|
i(c, void 0, e);
|
|
411
411
|
} catch (c) {
|
|
412
|
-
|
|
412
|
+
F(`Error in immediate watcher for "${n}":`, c);
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
}
|
|
@@ -418,15 +418,15 @@ function Vt(e, t, r, n) {
|
|
|
418
418
|
if (s === c) return !0;
|
|
419
419
|
if (typeof s != typeof c || typeof s != "object" || s === null || c === null) return !1;
|
|
420
420
|
if (Array.isArray(s) && Array.isArray(c))
|
|
421
|
-
return s.length !== c.length ? !1 : s.every((b,
|
|
422
|
-
const a = Object.keys(s),
|
|
423
|
-
return a.length !==
|
|
421
|
+
return s.length !== c.length ? !1 : s.every((b, m) => o(b, c[m]));
|
|
422
|
+
const a = Object.keys(s), f = Object.keys(c);
|
|
423
|
+
return a.length !== f.length ? !1 : a.every((b) => o(s[b], c[b]));
|
|
424
424
|
}, i = t.get(r);
|
|
425
425
|
if (i && !o(n, i.oldValue))
|
|
426
426
|
try {
|
|
427
427
|
i.callback(n, i.oldValue, e), i.oldValue = n;
|
|
428
428
|
} catch (s) {
|
|
429
|
-
|
|
429
|
+
F(`Error in watcher for "${r}":`, s);
|
|
430
430
|
}
|
|
431
431
|
for (const [s, c] of t.entries())
|
|
432
432
|
if (c.options.deep && r.startsWith(s + "."))
|
|
@@ -434,31 +434,31 @@ function Vt(e, t, r, n) {
|
|
|
434
434
|
const a = V(e, s);
|
|
435
435
|
o(a, c.oldValue) || (c.callback(a, c.oldValue, e), c.oldValue = a);
|
|
436
436
|
} catch (a) {
|
|
437
|
-
|
|
437
|
+
F(`Error in deep watcher for "${s}":`, a);
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function mt(e, t) {
|
|
441
441
|
return t === Boolean ? e === "" || e === "true" : t === Number ? Number(e) : e;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Zt(e, t, r) {
|
|
444
444
|
if (t)
|
|
445
445
|
for (const n in t) {
|
|
446
|
-
const o = t[n], i =
|
|
446
|
+
const o = t[n], i = te(n), s = e.getAttribute(i);
|
|
447
447
|
if (o.type === Function && typeof e[n] == "function")
|
|
448
448
|
r[n] = e[n];
|
|
449
449
|
else if (s !== null)
|
|
450
|
-
r[n] =
|
|
450
|
+
r[n] = mt(s, o.type);
|
|
451
451
|
else if (typeof e[n] < "u")
|
|
452
452
|
try {
|
|
453
453
|
const c = e[n];
|
|
454
|
-
o.type === Boolean && typeof c == "boolean" || o.type === Number && typeof c == "number" || o.type === Function && typeof c == "function" ? r[n] = c : r[n] =
|
|
454
|
+
o.type === Boolean && typeof c == "boolean" || o.type === Number && typeof c == "number" || o.type === Function && typeof c == "function" ? r[n] = c : r[n] = mt(String(c), o.type);
|
|
455
455
|
} catch {
|
|
456
456
|
r[n] = e[n];
|
|
457
457
|
}
|
|
458
458
|
else "default" in o && o.default !== void 0 && (r[n] = o.default);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Gt(e, t, r) {
|
|
462
462
|
if (!t.props) {
|
|
463
463
|
try {
|
|
464
464
|
const n = r && r._hookCallbacks && r._hookCallbacks.props || {}, o = Array.from(/* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(n)]));
|
|
@@ -472,12 +472,12 @@ function Zt(e, t, r) {
|
|
|
472
472
|
configurable: !0,
|
|
473
473
|
get() {
|
|
474
474
|
try {
|
|
475
|
-
const a =
|
|
476
|
-
if (
|
|
477
|
-
return
|
|
475
|
+
const a = te(i), f = e.getAttribute(a);
|
|
476
|
+
if (f !== null)
|
|
477
|
+
return f;
|
|
478
478
|
const b = e[i];
|
|
479
|
-
let
|
|
480
|
-
return R(b) || b && typeof b == "object" && "value" in b && !(b instanceof Node) ?
|
|
479
|
+
let m;
|
|
480
|
+
return R(b) || b && typeof b == "object" && "value" in b && !(b instanceof Node) ? m = b.value : m = b, m;
|
|
481
481
|
} catch {
|
|
482
482
|
return e[i];
|
|
483
483
|
}
|
|
@@ -490,15 +490,15 @@ function Zt(e, t, r) {
|
|
|
490
490
|
}
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
|
-
|
|
493
|
+
Zt(e, t.props, r);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Jt(e, t, r, n) {
|
|
496
496
|
e.onConnected && !r && (e.onConnected(t), n(!0));
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Xt(e, t, r, n, o, i, s, c) {
|
|
499
499
|
e.onDisconnected && e.onDisconnected(t), r.forEach((a) => a()), n(), o(), i(!1), s(null), c(!1);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Yt(e, t, r, n, o) {
|
|
502
502
|
e.onAttributeChanged && e.onAttributeChanged(t, r, n, o);
|
|
503
503
|
}
|
|
504
504
|
class Qt {
|
|
@@ -601,35 +601,35 @@ class Qt {
|
|
|
601
601
|
try {
|
|
602
602
|
let n = t;
|
|
603
603
|
const o = [];
|
|
604
|
-
n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (
|
|
604
|
+
n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (m) => `<<#${o.push(m) - 1}#>>`);
|
|
605
605
|
const i = n.match(/ctx\.[\w.]+/g) || [];
|
|
606
|
-
for (const
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
609
|
-
const u = o.push(JSON.stringify(
|
|
610
|
-
n = n.replace(new RegExp(
|
|
606
|
+
for (const m of i) {
|
|
607
|
+
const d = m.slice(4), k = V(r, d);
|
|
608
|
+
if (k === void 0) return;
|
|
609
|
+
const u = o.push(JSON.stringify(k)) - 1;
|
|
610
|
+
n = n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
|
|
611
611
|
}
|
|
612
612
|
const s = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = n.match(s) || [];
|
|
613
|
-
for (const
|
|
614
|
-
if (
|
|
615
|
-
const
|
|
616
|
-
if (
|
|
617
|
-
const
|
|
618
|
-
n = n.replace(new RegExp(
|
|
613
|
+
for (const m of c) {
|
|
614
|
+
if (m.startsWith("ctx.")) continue;
|
|
615
|
+
const d = V(r, m);
|
|
616
|
+
if (d === void 0) return;
|
|
617
|
+
const k = o.push(JSON.stringify(d)) - 1;
|
|
618
|
+
n = n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${k}#>>`);
|
|
619
619
|
}
|
|
620
620
|
const a = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
621
|
-
let
|
|
621
|
+
let f;
|
|
622
622
|
const b = /* @__PURE__ */ new Set();
|
|
623
|
-
for (; (
|
|
624
|
-
const
|
|
625
|
-
if (["true", "false", "null", "undefined"].includes(
|
|
626
|
-
b.add(
|
|
627
|
-
const
|
|
628
|
-
if (
|
|
629
|
-
const
|
|
630
|
-
|
|
623
|
+
for (; (f = a.exec(n)) !== null; ) {
|
|
624
|
+
const m = f[1];
|
|
625
|
+
if (["true", "false", "null", "undefined"].includes(m) || /^[0-9]+$/.test(m) || m === "ctx" || b.has(m)) continue;
|
|
626
|
+
b.add(m);
|
|
627
|
+
const d = V(r, m);
|
|
628
|
+
if (d === void 0) return;
|
|
629
|
+
const k = JSON.stringify(d), u = o.push(k) - 1;
|
|
630
|
+
m.includes(".") ? n = n.replace(new RegExp(m.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`) : n = n.replace(new RegExp("\\b" + m.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${u}#>>`);
|
|
631
631
|
}
|
|
632
|
-
n = n.replace(/<<#(\d+)#>>/g, (
|
|
632
|
+
n = n.replace(/<<#(\d+)#>>/g, (m, d) => o[Number(d)]);
|
|
633
633
|
try {
|
|
634
634
|
return this.evaluateBasicExpression(n);
|
|
635
635
|
} catch {
|
|
@@ -652,12 +652,12 @@ class Qt {
|
|
|
652
652
|
return r[n];
|
|
653
653
|
}
|
|
654
654
|
function i(l) {
|
|
655
|
-
const
|
|
656
|
-
if (l && !
|
|
655
|
+
const y = r[n++];
|
|
656
|
+
if (l && !y)
|
|
657
657
|
throw new Error(`Unexpected token EOF, expected ${l}`);
|
|
658
|
-
if (l &&
|
|
659
|
-
throw new Error(`Unexpected token ${
|
|
660
|
-
return
|
|
658
|
+
if (l && y && y.type !== l && y.value !== l)
|
|
659
|
+
throw new Error(`Unexpected token ${y.type}/${y.value}, expected ${l}`);
|
|
660
|
+
return y;
|
|
661
661
|
}
|
|
662
662
|
function s() {
|
|
663
663
|
return c();
|
|
@@ -666,103 +666,103 @@ class Qt {
|
|
|
666
666
|
let l = a();
|
|
667
667
|
if (o() && o().value === "?") {
|
|
668
668
|
i("?");
|
|
669
|
-
const
|
|
669
|
+
const y = s();
|
|
670
670
|
i(":");
|
|
671
|
-
const
|
|
672
|
-
return l ?
|
|
671
|
+
const w = s();
|
|
672
|
+
return l ? y : w;
|
|
673
673
|
}
|
|
674
674
|
return l;
|
|
675
675
|
}
|
|
676
676
|
function a() {
|
|
677
|
-
let l =
|
|
677
|
+
let l = f();
|
|
678
678
|
for (; o() && o().value === "||"; ) {
|
|
679
679
|
i("OP");
|
|
680
|
-
const
|
|
681
|
-
l = l ||
|
|
680
|
+
const y = f();
|
|
681
|
+
l = l || y;
|
|
682
682
|
}
|
|
683
683
|
return l;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function f() {
|
|
686
686
|
let l = b();
|
|
687
687
|
for (; o() && o().value === "&&"; ) {
|
|
688
688
|
i("OP");
|
|
689
|
-
const
|
|
690
|
-
l = l &&
|
|
689
|
+
const y = b();
|
|
690
|
+
l = l && y;
|
|
691
691
|
}
|
|
692
692
|
return l;
|
|
693
693
|
}
|
|
694
694
|
function b() {
|
|
695
|
-
let l =
|
|
695
|
+
let l = m();
|
|
696
696
|
for (; o() && ["==", "!=", "===", "!=="].includes(o().value); ) {
|
|
697
|
-
const
|
|
698
|
-
switch (
|
|
697
|
+
const y = i("OP").value, w = m();
|
|
698
|
+
switch (y) {
|
|
699
699
|
case "==":
|
|
700
|
-
l = l ==
|
|
700
|
+
l = l == w;
|
|
701
701
|
break;
|
|
702
702
|
case "!=":
|
|
703
|
-
l = l !=
|
|
703
|
+
l = l != w;
|
|
704
704
|
break;
|
|
705
705
|
case "===":
|
|
706
|
-
l = l ===
|
|
706
|
+
l = l === w;
|
|
707
707
|
break;
|
|
708
708
|
case "!==":
|
|
709
|
-
l = l !==
|
|
709
|
+
l = l !== w;
|
|
710
710
|
break;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
return l;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
let l =
|
|
715
|
+
function m() {
|
|
716
|
+
let l = d();
|
|
717
717
|
for (; o() && [">", "<", ">=", "<="].includes(o().value); ) {
|
|
718
|
-
const
|
|
719
|
-
switch (
|
|
718
|
+
const y = i("OP").value, w = d();
|
|
719
|
+
switch (y) {
|
|
720
720
|
case ">":
|
|
721
|
-
l = l >
|
|
721
|
+
l = l > w;
|
|
722
722
|
break;
|
|
723
723
|
case "<":
|
|
724
|
-
l = l <
|
|
724
|
+
l = l < w;
|
|
725
725
|
break;
|
|
726
726
|
case ">=":
|
|
727
|
-
l = l >=
|
|
727
|
+
l = l >= w;
|
|
728
728
|
break;
|
|
729
729
|
case "<=":
|
|
730
|
-
l = l <=
|
|
730
|
+
l = l <= w;
|
|
731
731
|
break;
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
734
|
return l;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
let l =
|
|
736
|
+
function d() {
|
|
737
|
+
let l = k();
|
|
738
738
|
for (; o() && (o().value === "+" || o().value === "-"); ) {
|
|
739
|
-
const
|
|
740
|
-
l =
|
|
739
|
+
const y = i("OP").value, w = k();
|
|
740
|
+
l = y === "+" ? l + w : l - w;
|
|
741
741
|
}
|
|
742
742
|
return l;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function k() {
|
|
745
745
|
let l = u();
|
|
746
746
|
for (; o() && (o().value === "*" || o().value === "/" || o().value === "%"); ) {
|
|
747
|
-
const
|
|
748
|
-
switch (
|
|
747
|
+
const y = i("OP").value, w = u();
|
|
748
|
+
switch (y) {
|
|
749
749
|
case "*":
|
|
750
|
-
l = l *
|
|
750
|
+
l = l * w;
|
|
751
751
|
break;
|
|
752
752
|
case "/":
|
|
753
|
-
l = l /
|
|
753
|
+
l = l / w;
|
|
754
754
|
break;
|
|
755
755
|
case "%":
|
|
756
|
-
l = l %
|
|
756
|
+
l = l % w;
|
|
757
757
|
break;
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
return l;
|
|
761
761
|
}
|
|
762
762
|
function u() {
|
|
763
|
-
return o() && o().value === "!" ? (i("OP"), !u()) : o() && o().value === "-" ? (i("OP"), -u()) :
|
|
763
|
+
return o() && o().value === "!" ? (i("OP"), !u()) : o() && o().value === "-" ? (i("OP"), -u()) : p();
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function p() {
|
|
766
766
|
const l = o();
|
|
767
767
|
if (l) {
|
|
768
768
|
if (l.type === "NUMBER")
|
|
@@ -773,15 +773,15 @@ class Qt {
|
|
|
773
773
|
return i("IDENT"), l.value === "true" ? !0 : l.value === "false" ? !1 : l.value === "null" ? null : void 0;
|
|
774
774
|
if (l.value === "[") {
|
|
775
775
|
i("PUNC");
|
|
776
|
-
const
|
|
776
|
+
const y = [];
|
|
777
777
|
for (; o() && o().value !== "]"; )
|
|
778
|
-
|
|
779
|
-
return i("PUNC"),
|
|
778
|
+
y.push(s()), o() && o().value === "," && i("PUNC");
|
|
779
|
+
return i("PUNC"), y;
|
|
780
780
|
}
|
|
781
781
|
if (l.value === "(") {
|
|
782
782
|
i("PUNC");
|
|
783
|
-
const
|
|
784
|
-
return i("PUNC"),
|
|
783
|
+
const y = s();
|
|
784
|
+
return i("PUNC"), y;
|
|
785
785
|
}
|
|
786
786
|
throw new Error("Unexpected token in expression");
|
|
787
787
|
}
|
|
@@ -881,10 +881,10 @@ class re {
|
|
|
881
881
|
return r ? r.map((n) => ({ event: n.event, handler: n.handler, wrapper: n.wrapper, options: n.options })) : [];
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Fe(e, t) {
|
|
885
885
|
return Array.isArray(e) && Array.isArray(t) ? JSON.stringify([...e].sort()) !== JSON.stringify([...t].sort()) : e !== t;
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function yt(e, t, r, n, o) {
|
|
888
888
|
if (e)
|
|
889
889
|
if (o && typeof t.value == "object" && t.value !== null) {
|
|
890
890
|
const i = { ...t.value };
|
|
@@ -893,17 +893,17 @@ function mt(e, t, r, n, o) {
|
|
|
893
893
|
t.value = r;
|
|
894
894
|
else {
|
|
895
895
|
const i = n._state || n;
|
|
896
|
-
|
|
896
|
+
qe(i, t, r);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function Be(e, t, r, n) {
|
|
900
900
|
if (e._requestRender && e._requestRender(), e._triggerWatchers) {
|
|
901
901
|
const o = t ? "reactiveState" : r;
|
|
902
902
|
e._triggerWatchers(o, n);
|
|
903
903
|
}
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
const n = `update:${
|
|
905
|
+
function en(e, t, r) {
|
|
906
|
+
const n = `update:${te(t)}`, o = `update:${t}`, i = new CustomEvent(n, {
|
|
907
907
|
detail: r,
|
|
908
908
|
bubbles: !0,
|
|
909
909
|
composed: !0
|
|
@@ -914,20 +914,20 @@ function Yt(e, t, r) {
|
|
|
914
914
|
});
|
|
915
915
|
e.dispatchEvent(i), e.dispatchEvent(s);
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function bt(e, t, r, n) {
|
|
918
918
|
const o = r;
|
|
919
|
-
|
|
919
|
+
P(() => {
|
|
920
920
|
e[t] = o;
|
|
921
|
-
}),
|
|
922
|
-
const i =
|
|
921
|
+
}), P(() => {
|
|
922
|
+
const i = te(t);
|
|
923
923
|
typeof o == "boolean" ? o ? e.setAttribute(i, "true") : e.setAttribute(i, "false") : o != null && (typeof o == "string" || typeof o == "number") ? e.setAttribute(i, String(o)) : e.removeAttribute?.(i);
|
|
924
|
-
}),
|
|
924
|
+
}), P(() => {
|
|
925
925
|
e._applyProps?.(e._cfg);
|
|
926
|
-
}),
|
|
926
|
+
}), P(() => {
|
|
927
927
|
e._requestRender?.();
|
|
928
928
|
});
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function tn(e, t, r, n) {
|
|
931
931
|
if (e) {
|
|
932
932
|
const i = t.value;
|
|
933
933
|
return n && typeof i == "object" && i !== null ? i[n] : i;
|
|
@@ -935,21 +935,21 @@ function en(e, t, r, n) {
|
|
|
935
935
|
const o = r._state || r;
|
|
936
936
|
return V(o, t);
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function ve(e) {
|
|
939
939
|
return e ? e.split(/\s+/).filter(Boolean) : [];
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function xe(e, t) {
|
|
942
942
|
if (t.length === 0) return;
|
|
943
943
|
const r = t.filter((n) => n && !e.classList.contains(n));
|
|
944
944
|
r.length > 0 && e.classList.add(...r);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function be(e, t) {
|
|
947
947
|
if (t.length === 0) return;
|
|
948
948
|
const r = t.filter(Boolean);
|
|
949
949
|
r.length > 0 && e.classList.remove(...r);
|
|
950
950
|
}
|
|
951
951
|
let Ze = !1;
|
|
952
|
-
async function
|
|
952
|
+
async function nn(e, t, r = 10) {
|
|
953
953
|
if (!Ze) {
|
|
954
954
|
if (!e.isConnected) {
|
|
955
955
|
oe("⚠️ Element not connected to DOM, skipping style wait");
|
|
@@ -966,16 +966,16 @@ async function tn(e, t, r = 10) {
|
|
|
966
966
|
Ze = !0, oe("⚠️ Styles did not load in time for transition, continuing anyway");
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function rn(e) {
|
|
970
970
|
const t = window.getComputedStyle(e), r = t.transitionDuration || "0s", n = t.transitionDelay || "0s", o = (i) => {
|
|
971
971
|
const s = parseFloat(i);
|
|
972
972
|
return i.includes("ms") ? s : s * 1e3;
|
|
973
973
|
};
|
|
974
974
|
return o(r) + o(n);
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function Mt(e, t) {
|
|
977
977
|
return new Promise((r) => {
|
|
978
|
-
const n = t ??
|
|
978
|
+
const n = t ?? rn(e);
|
|
979
979
|
if (n <= 0) {
|
|
980
980
|
r();
|
|
981
981
|
return;
|
|
@@ -987,13 +987,13 @@ function Pt(e, t) {
|
|
|
987
987
|
e.addEventListener("transitionend", s), e.addEventListener("transitioncancel", s), setTimeout(i, n + 50);
|
|
988
988
|
});
|
|
989
989
|
}
|
|
990
|
-
async function
|
|
990
|
+
async function _e(e, t) {
|
|
991
991
|
const { classes: r, hooks: n, css: o, duration: i } = t;
|
|
992
992
|
if (n?.onBeforeEnter)
|
|
993
993
|
try {
|
|
994
994
|
n.onBeforeEnter(e);
|
|
995
995
|
} catch (u) {
|
|
996
|
-
|
|
996
|
+
F("Transition onBeforeEnter error:", u);
|
|
997
997
|
}
|
|
998
998
|
if (!o)
|
|
999
999
|
return n?.onEnter ? new Promise((u) => {
|
|
@@ -1001,37 +1001,37 @@ async function Ee(e, t) {
|
|
|
1001
1001
|
if (n?.onAfterEnter)
|
|
1002
1002
|
try {
|
|
1003
1003
|
n.onAfterEnter(e);
|
|
1004
|
-
} catch (
|
|
1005
|
-
|
|
1004
|
+
} catch (p) {
|
|
1005
|
+
F("Transition onAfterEnter error:", p);
|
|
1006
1006
|
}
|
|
1007
1007
|
u();
|
|
1008
1008
|
});
|
|
1009
1009
|
}) : void 0;
|
|
1010
|
-
const s =
|
|
1011
|
-
|
|
1012
|
-
let
|
|
1010
|
+
const s = ve(r?.enterFrom), c = ve(r?.enterActive), a = ve(r?.enterTo);
|
|
1011
|
+
xe(e, s), e.offsetHeight, xe(e, c), e.offsetHeight;
|
|
1012
|
+
let f;
|
|
1013
1013
|
if (n?.onEnter) {
|
|
1014
|
-
const u = new Promise((
|
|
1015
|
-
|
|
1014
|
+
const u = new Promise((p) => {
|
|
1015
|
+
f = p;
|
|
1016
1016
|
});
|
|
1017
1017
|
try {
|
|
1018
1018
|
n.onEnter(e, () => {
|
|
1019
|
-
|
|
1019
|
+
f && f();
|
|
1020
1020
|
});
|
|
1021
|
-
} catch (
|
|
1022
|
-
|
|
1021
|
+
} catch (p) {
|
|
1022
|
+
F("Transition onEnter error:", p);
|
|
1023
1023
|
}
|
|
1024
|
-
|
|
1024
|
+
f && await u;
|
|
1025
1025
|
}
|
|
1026
1026
|
await new Promise((u) => requestAnimationFrame(() => u(void 0))), e.offsetHeight;
|
|
1027
|
-
const b = window.getComputedStyle(e),
|
|
1028
|
-
|
|
1029
|
-
let
|
|
1030
|
-
if (typeof i == "number" ?
|
|
1027
|
+
const b = window.getComputedStyle(e), m = b.transform, d = b.opacity;
|
|
1028
|
+
be(e, s), m && m !== "none" && (e.style.transform = m), d && d !== "" && (e.style.opacity = d), e.offsetHeight, await new Promise((u) => requestAnimationFrame(() => u(void 0))), e.style.transform = "", e.style.opacity = "", xe(e, a), e.offsetHeight, await new Promise((u) => requestAnimationFrame(() => u(void 0)));
|
|
1029
|
+
let k;
|
|
1030
|
+
if (typeof i == "number" ? k = i : i && typeof i == "object" && "enter" in i && (k = i.enter), await Mt(e, k), be(e, c), n?.onAfterEnter)
|
|
1031
1031
|
try {
|
|
1032
1032
|
n.onAfterEnter(e);
|
|
1033
1033
|
} catch (u) {
|
|
1034
|
-
|
|
1034
|
+
F("Transition onAfterEnter error:", u);
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
async function Ge(e, t) {
|
|
@@ -1039,208 +1039,208 @@ async function Ge(e, t) {
|
|
|
1039
1039
|
if (n?.onBeforeLeave)
|
|
1040
1040
|
try {
|
|
1041
1041
|
n.onBeforeLeave(e);
|
|
1042
|
-
} catch (
|
|
1043
|
-
|
|
1042
|
+
} catch (m) {
|
|
1043
|
+
F("Transition onBeforeLeave error:", m);
|
|
1044
1044
|
}
|
|
1045
1045
|
if (!o)
|
|
1046
|
-
return n?.onLeave ? new Promise((
|
|
1046
|
+
return n?.onLeave ? new Promise((m) => {
|
|
1047
1047
|
n.onLeave(e, () => {
|
|
1048
1048
|
if (n?.onAfterLeave)
|
|
1049
1049
|
try {
|
|
1050
1050
|
n.onAfterLeave(e);
|
|
1051
|
-
} catch (
|
|
1052
|
-
|
|
1051
|
+
} catch (d) {
|
|
1052
|
+
F("Transition onAfterLeave error:", d);
|
|
1053
1053
|
}
|
|
1054
|
-
|
|
1054
|
+
m();
|
|
1055
1055
|
});
|
|
1056
1056
|
}) : void 0;
|
|
1057
|
-
const s =
|
|
1058
|
-
|
|
1059
|
-
let
|
|
1057
|
+
const s = ve(r?.leaveFrom), c = ve(r?.leaveActive), a = ve(r?.leaveTo);
|
|
1058
|
+
xe(e, s), e.offsetHeight, xe(e, c);
|
|
1059
|
+
let f;
|
|
1060
1060
|
if (n?.onLeave) {
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1061
|
+
const m = new Promise((d) => {
|
|
1062
|
+
f = d;
|
|
1063
1063
|
});
|
|
1064
1064
|
try {
|
|
1065
1065
|
n.onLeave(e, () => {
|
|
1066
|
-
|
|
1066
|
+
f && f();
|
|
1067
1067
|
});
|
|
1068
|
-
} catch (
|
|
1069
|
-
|
|
1068
|
+
} catch (d) {
|
|
1069
|
+
F("Transition onLeave error:", d);
|
|
1070
1070
|
}
|
|
1071
|
-
|
|
1071
|
+
f && await m;
|
|
1072
1072
|
}
|
|
1073
|
-
await new Promise((
|
|
1073
|
+
await new Promise((m) => requestAnimationFrame(() => m(void 0))), await nn(e, [...s, ...c]), be(e, s), xe(e, a);
|
|
1074
1074
|
let b;
|
|
1075
|
-
if (typeof i == "number" ? b = i : i && typeof i == "object" && "leave" in i && (b = i.leave), await
|
|
1075
|
+
if (typeof i == "number" ? b = i : i && typeof i == "object" && "leave" in i && (b = i.leave), await Mt(e, b), be(e, c), be(e, a), be(e, s), n?.onAfterLeave)
|
|
1076
1076
|
try {
|
|
1077
1077
|
n.onAfterLeave(e);
|
|
1078
|
-
} catch (
|
|
1079
|
-
|
|
1078
|
+
} catch (m) {
|
|
1079
|
+
F("Transition onAfterLeave error:", m);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function ee(e) {
|
|
1083
1083
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
|
|
1084
1084
|
}
|
|
1085
1085
|
function ke(e) {
|
|
1086
1086
|
return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? R(e) || "value" in e ? !!e.value : !1 : !!e;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function me(e, t) {
|
|
1089
1089
|
if (!t || !(e instanceof HTMLElement)) return;
|
|
1090
1090
|
re.cleanup(e);
|
|
1091
1091
|
for (const n in t)
|
|
1092
1092
|
t[n] === e && delete t[n];
|
|
1093
1093
|
const r = e.childNodes;
|
|
1094
1094
|
for (let n = 0; n < r.length; n++)
|
|
1095
|
-
|
|
1095
|
+
me(r[n], t);
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function Te(e, t, r) {
|
|
1098
1098
|
if (typeof e == "string") return;
|
|
1099
1099
|
const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), o = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
1100
1100
|
n ? n.value = t : o && r && (r[o] = t);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1102
|
+
function on(e, t, r, n, o, i, s, c) {
|
|
1103
1103
|
if (!i) return;
|
|
1104
|
-
const a = t.includes("lazy"),
|
|
1105
|
-
if (
|
|
1106
|
-
const
|
|
1107
|
-
return c && s && (s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement || s instanceof HTMLSelectElement) && typeof
|
|
1104
|
+
const a = t.includes("lazy"), f = t.includes("trim"), b = t.includes("number"), m = e && typeof e == "object" && "value" in e && typeof e.value < "u", d = () => {
|
|
1105
|
+
if (m) {
|
|
1106
|
+
const x = e.value;
|
|
1107
|
+
return c && s && (s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement || s instanceof HTMLSelectElement) && typeof x == "object" && x !== null ? x[c] : x;
|
|
1108
1108
|
}
|
|
1109
1109
|
return V(i._state || i, e);
|
|
1110
|
-
},
|
|
1110
|
+
}, k = d();
|
|
1111
1111
|
let u = "text";
|
|
1112
1112
|
s instanceof HTMLInputElement ? u = n?.type || s.type || "text" : s instanceof HTMLSelectElement ? u = "select" : s instanceof HTMLTextAreaElement && (u = "textarea");
|
|
1113
|
-
const
|
|
1113
|
+
const p = s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement || s instanceof HTMLSelectElement, l = p ? u === "checkbox" || u === "radio" ? "checked" : "value" : c ?? "modelValue";
|
|
1114
1114
|
if (u === "checkbox")
|
|
1115
|
-
if (Array.isArray(
|
|
1116
|
-
r[l] =
|
|
1115
|
+
if (Array.isArray(k))
|
|
1116
|
+
r[l] = k.includes(String(s?.getAttribute("value") ?? n?.value ?? ""));
|
|
1117
1117
|
else {
|
|
1118
|
-
const
|
|
1119
|
-
r[l] =
|
|
1118
|
+
const x = s?.getAttribute("true-value") ?? !0;
|
|
1119
|
+
r[l] = k === x;
|
|
1120
1120
|
}
|
|
1121
1121
|
else if (u === "radio")
|
|
1122
|
-
r[l] =
|
|
1122
|
+
r[l] = k === (n?.value ?? "");
|
|
1123
1123
|
else if (u === "select")
|
|
1124
1124
|
if (s && s.hasAttribute("multiple") && s instanceof HTMLSelectElement) {
|
|
1125
|
-
const
|
|
1125
|
+
const x = Array.isArray(k) ? k.map(String) : [];
|
|
1126
1126
|
setTimeout(() => {
|
|
1127
1127
|
Array.from(s.options).forEach((_) => {
|
|
1128
|
-
_.selected =
|
|
1128
|
+
_.selected = x.includes(_.value);
|
|
1129
1129
|
});
|
|
1130
|
-
}, 0), r[l] = Array.isArray(
|
|
1130
|
+
}, 0), r[l] = Array.isArray(k) ? k : [];
|
|
1131
1131
|
} else
|
|
1132
|
-
r[l] =
|
|
1132
|
+
r[l] = k;
|
|
1133
1133
|
else {
|
|
1134
|
-
!
|
|
1134
|
+
!p && m ? r[l] = e : r[l] = k;
|
|
1135
1135
|
try {
|
|
1136
|
-
const
|
|
1137
|
-
n && (n[
|
|
1136
|
+
const x = te(l);
|
|
1137
|
+
n && (n[x] = k);
|
|
1138
1138
|
} catch {
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1141
|
+
const y = a || u === "checkbox" || u === "radio" || u === "select" ? "change" : "input", w = (x) => {
|
|
1142
|
+
if (x.isComposing || o._isComposing) return;
|
|
1143
1143
|
const _ = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
|
|
1144
|
-
if (
|
|
1145
|
-
const C =
|
|
1144
|
+
if (x.isTrusted === !1 && !_) return;
|
|
1145
|
+
const C = x.target;
|
|
1146
1146
|
if (!C || C._modelUpdating) return;
|
|
1147
|
-
let
|
|
1147
|
+
let g = C.value;
|
|
1148
1148
|
if (u === "checkbox") {
|
|
1149
|
-
const
|
|
1150
|
-
if (Array.isArray(
|
|
1151
|
-
const
|
|
1149
|
+
const $ = d();
|
|
1150
|
+
if (Array.isArray($)) {
|
|
1151
|
+
const v = C.getAttribute("value") ?? "", A = Array.from($);
|
|
1152
1152
|
if (C.checked)
|
|
1153
|
-
|
|
1153
|
+
A.includes(v) || A.push(v);
|
|
1154
1154
|
else {
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1155
|
+
const L = A.indexOf(v);
|
|
1156
|
+
L > -1 && A.splice(L, 1);
|
|
1157
1157
|
}
|
|
1158
|
-
|
|
1158
|
+
g = A;
|
|
1159
1159
|
} else {
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1160
|
+
const v = C.getAttribute("true-value") ?? !0, A = C.getAttribute("false-value") ?? !1;
|
|
1161
|
+
g = C.checked ? v : A;
|
|
1162
1162
|
}
|
|
1163
1163
|
} else if (u === "radio")
|
|
1164
|
-
|
|
1164
|
+
g = C.getAttribute("value") ?? C.value;
|
|
1165
1165
|
else if (u === "select" && C.multiple)
|
|
1166
|
-
|
|
1167
|
-
else if (
|
|
1168
|
-
const
|
|
1169
|
-
isNaN(
|
|
1166
|
+
g = Array.from(C.selectedOptions).map(($) => $.value);
|
|
1167
|
+
else if (f && typeof g == "string" && (g = g.trim()), b) {
|
|
1168
|
+
const $ = Number(g);
|
|
1169
|
+
isNaN($) || (g = $);
|
|
1170
1170
|
}
|
|
1171
|
-
const
|
|
1172
|
-
if (
|
|
1171
|
+
const S = d();
|
|
1172
|
+
if (Fe(g, S)) {
|
|
1173
1173
|
C._modelUpdating = !0;
|
|
1174
1174
|
try {
|
|
1175
|
-
|
|
1175
|
+
yt(m, e, g, i, c), Be(i, m, e, g), C && en(C, l, g);
|
|
1176
1176
|
} finally {
|
|
1177
1177
|
setTimeout(() => C._modelUpdating = !1, 0);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
|
-
if (
|
|
1182
|
-
if (o[
|
|
1183
|
-
const
|
|
1184
|
-
s && re.removeListener(s,
|
|
1181
|
+
if (p) {
|
|
1182
|
+
if (o[y]) {
|
|
1183
|
+
const x = o[y];
|
|
1184
|
+
s && re.removeListener(s, y, x);
|
|
1185
1185
|
}
|
|
1186
|
-
o[
|
|
1186
|
+
o[y] = w;
|
|
1187
1187
|
} else {
|
|
1188
|
-
const
|
|
1189
|
-
if (o[
|
|
1190
|
-
const C = o[
|
|
1191
|
-
s && re.removeListener(s,
|
|
1188
|
+
const x = `update:${te(l)}`, _ = `update:${l}`;
|
|
1189
|
+
if (o[x]) {
|
|
1190
|
+
const C = o[x];
|
|
1191
|
+
s && re.removeListener(s, x, C);
|
|
1192
1192
|
}
|
|
1193
1193
|
if (o[_]) {
|
|
1194
1194
|
const C = o[_];
|
|
1195
1195
|
s && re.removeListener(s, _, C);
|
|
1196
1196
|
}
|
|
1197
|
-
if (o[
|
|
1198
|
-
const
|
|
1199
|
-
if (
|
|
1200
|
-
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1197
|
+
if (o[x] = (C) => {
|
|
1198
|
+
const g = C.detail !== void 0 ? C.detail : C.target?.value, S = tn(m, e, i, c);
|
|
1199
|
+
if (Fe(g, S)) {
|
|
1200
|
+
yt(m, e, g, i, c), Be(i, m, e, g);
|
|
1201
|
+
const $ = C.target;
|
|
1202
|
+
$ && bt($, l, m ? e : g, m);
|
|
1203
1203
|
}
|
|
1204
|
-
},
|
|
1204
|
+
}, m && typeof e.value == "object" && e.value !== null) {
|
|
1205
1205
|
let C = [];
|
|
1206
1206
|
try {
|
|
1207
1207
|
C = Reflect.ownKeys(e.value);
|
|
1208
1208
|
} catch {
|
|
1209
1209
|
C = Object.keys(e.value);
|
|
1210
1210
|
}
|
|
1211
|
-
const
|
|
1212
|
-
for (const
|
|
1213
|
-
const
|
|
1214
|
-
o[
|
|
1215
|
-
const
|
|
1216
|
-
if (!
|
|
1217
|
-
if (
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1211
|
+
const g = C.filter((S) => typeof S == "string" && !String(S).startsWith("_") && S !== "constructor");
|
|
1212
|
+
for (const S of g) {
|
|
1213
|
+
const T = `update:${te(S)}`, $ = `update:${S}`;
|
|
1214
|
+
o[T] || (o[T] = (v) => {
|
|
1215
|
+
const A = v.detail !== void 0 ? v.detail : v.target?.value, L = m ? e.value[S] : V(i._state || i, e);
|
|
1216
|
+
if (!Fe(A, L)) return;
|
|
1217
|
+
if (m) {
|
|
1218
|
+
const M = { ...e.value };
|
|
1219
|
+
M[S] = A, e.value = M;
|
|
1220
1220
|
} else
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
}, o[
|
|
1221
|
+
qe(i._state || i, e, A);
|
|
1222
|
+
Be(i, m, e, A);
|
|
1223
|
+
const O = v.currentTarget || s || v.target;
|
|
1224
|
+
O && bt(O, l, m ? e : A, m);
|
|
1225
|
+
}, o[$] = o[T]);
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
|
-
o[_] = o[
|
|
1228
|
+
o[_] = o[x];
|
|
1229
1229
|
}
|
|
1230
|
-
(u === "text" || u === "textarea") && (o.compositionstart = (() => o._isComposing = !0), o.compositionend = (
|
|
1230
|
+
(u === "text" || u === "textarea") && (o.compositionstart = (() => o._isComposing = !0), o.compositionend = (x) => {
|
|
1231
1231
|
o._isComposing = !1;
|
|
1232
|
-
const _ =
|
|
1232
|
+
const _ = x.target;
|
|
1233
1233
|
_ && setTimeout(() => {
|
|
1234
|
-
const C = _.value,
|
|
1235
|
-
let
|
|
1236
|
-
if (
|
|
1237
|
-
const
|
|
1238
|
-
isNaN(
|
|
1234
|
+
const C = _.value, g = i._state || i, S = V(g, e);
|
|
1235
|
+
let T = C;
|
|
1236
|
+
if (f && (T = T.trim()), b) {
|
|
1237
|
+
const v = Number(T);
|
|
1238
|
+
isNaN(v) || (T = v);
|
|
1239
1239
|
}
|
|
1240
|
-
if (
|
|
1240
|
+
if (Fe(T, S)) {
|
|
1241
1241
|
_._modelUpdating = !0;
|
|
1242
1242
|
try {
|
|
1243
|
-
|
|
1243
|
+
qe(g, e, T), Be(i, m, e, T);
|
|
1244
1244
|
} finally {
|
|
1245
1245
|
setTimeout(() => _._modelUpdating = !1, 0);
|
|
1246
1246
|
}
|
|
@@ -1252,12 +1252,12 @@ function Rt(e) {
|
|
|
1252
1252
|
const t = e.slice(2);
|
|
1253
1253
|
return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function sn(e, t, r, n, o) {
|
|
1256
1256
|
if (typeof e == "object" && e !== null)
|
|
1257
1257
|
for (const [i, s] of Object.entries(e))
|
|
1258
1258
|
if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
|
|
1259
1259
|
r[i] = s;
|
|
1260
|
-
else if (i === "disabled" && o &&
|
|
1260
|
+
else if (i === "disabled" && o && ee(o)) {
|
|
1261
1261
|
const c = s && typeof s == "object" && "value" in s;
|
|
1262
1262
|
(() => {
|
|
1263
1263
|
try {
|
|
@@ -1276,7 +1276,7 @@ function on(e, t, r, n, o) {
|
|
|
1276
1276
|
for (const [s, c] of Object.entries(i))
|
|
1277
1277
|
if (s.startsWith("data-") || s.startsWith("aria-") || s === "class")
|
|
1278
1278
|
r[s] = c;
|
|
1279
|
-
else if (s === "disabled" && o &&
|
|
1279
|
+
else if (s === "disabled" && o && ee(o)) {
|
|
1280
1280
|
const a = c && typeof c == "object" && "value" in c;
|
|
1281
1281
|
(() => {
|
|
1282
1282
|
try {
|
|
@@ -1298,7 +1298,7 @@ function on(e, t, r, n, o) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function an(e, t, r) {
|
|
1302
1302
|
let n;
|
|
1303
1303
|
if (typeof e == "string") {
|
|
1304
1304
|
if (!r) return;
|
|
@@ -1326,7 +1326,7 @@ function sn(e, t, r) {
|
|
|
1326
1326
|
function Re(e, t) {
|
|
1327
1327
|
return Qt.evaluate(e, t);
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1329
|
+
function cn(e, t, r) {
|
|
1330
1330
|
let n;
|
|
1331
1331
|
if (typeof e == "string") {
|
|
1332
1332
|
if (!r) return;
|
|
@@ -1344,7 +1344,7 @@ function an(e, t, r) {
|
|
|
1344
1344
|
const i = t.class || "", s = o.join(" ");
|
|
1345
1345
|
t.class = i ? `${i} ${s}`.trim() : s;
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function lt(e) {
|
|
1348
1348
|
if (e === !0 || e === !1) return !0;
|
|
1349
1349
|
if (e == null) return !1;
|
|
1350
1350
|
if (typeof e === "string") return e === "" || e === "true" || e === "false";
|
|
@@ -1357,7 +1357,7 @@ function ct(e) {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
return !1;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function ln(e, t, r) {
|
|
1361
1361
|
let n;
|
|
1362
1362
|
if (typeof e == "string") {
|
|
1363
1363
|
if (!r) return;
|
|
@@ -1371,9 +1371,9 @@ function cn(e, t, r) {
|
|
|
1371
1371
|
const s = [];
|
|
1372
1372
|
for (const [c, a] of Object.entries(n))
|
|
1373
1373
|
if (a != null && a !== "") {
|
|
1374
|
-
const
|
|
1374
|
+
const f = c.replace(
|
|
1375
1375
|
/[A-Z]/g,
|
|
1376
|
-
(
|
|
1376
|
+
(d) => `-${d.toLowerCase()}`
|
|
1377
1377
|
), b = [
|
|
1378
1378
|
"width",
|
|
1379
1379
|
"height",
|
|
@@ -1400,26 +1400,26 @@ function cn(e, t, r) {
|
|
|
1400
1400
|
"min-height",
|
|
1401
1401
|
"max-height"
|
|
1402
1402
|
];
|
|
1403
|
-
let
|
|
1404
|
-
typeof a == "number" && b.includes(
|
|
1403
|
+
let m = String(a);
|
|
1404
|
+
typeof a == "number" && b.includes(f) && (m = `${a}px`), s.push(`${f}: ${m}`);
|
|
1405
1405
|
}
|
|
1406
1406
|
o = s.join("; ") + (s.length > 0 ? ";" : "");
|
|
1407
1407
|
}
|
|
1408
1408
|
const i = t.style || "";
|
|
1409
1409
|
t.style = i + (i && !i.endsWith(";") ? "; " : "") + o;
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function un(e, t, r) {
|
|
1412
1412
|
let n = e;
|
|
1413
1413
|
typeof e == "string" && r && (n = Re(e, r)), R(n) ? t.reactiveRef = n : t.ref = n;
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function Nt(e, t, r, n) {
|
|
1416
1416
|
const o = {}, i = { ...n || {} }, s = {};
|
|
1417
1417
|
for (const [c, a] of Object.entries(e)) {
|
|
1418
|
-
const { value:
|
|
1418
|
+
const { value: f, modifiers: b, arg: m } = a;
|
|
1419
1419
|
if (c === "model" || c.startsWith("model:")) {
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1422
|
-
|
|
1420
|
+
const d = c.split(":"), k = d.length > 1 ? d[1] : m;
|
|
1421
|
+
on(
|
|
1422
|
+
f,
|
|
1423
1423
|
// Pass the original value (could be string or reactive state object)
|
|
1424
1424
|
b,
|
|
1425
1425
|
o,
|
|
@@ -1427,42 +1427,42 @@ function Mt(e, t, r, n) {
|
|
|
1427
1427
|
s,
|
|
1428
1428
|
t,
|
|
1429
1429
|
r,
|
|
1430
|
-
|
|
1430
|
+
k
|
|
1431
1431
|
);
|
|
1432
1432
|
continue;
|
|
1433
1433
|
}
|
|
1434
1434
|
switch (c) {
|
|
1435
1435
|
case "bind":
|
|
1436
|
-
|
|
1436
|
+
sn(f, o, i, t, r);
|
|
1437
1437
|
break;
|
|
1438
1438
|
case "show":
|
|
1439
|
-
|
|
1439
|
+
an(f, i, t);
|
|
1440
1440
|
break;
|
|
1441
1441
|
case "class":
|
|
1442
|
-
|
|
1442
|
+
cn(f, i, t);
|
|
1443
1443
|
break;
|
|
1444
1444
|
case "style":
|
|
1445
|
-
|
|
1445
|
+
ln(f, i, t);
|
|
1446
1446
|
break;
|
|
1447
1447
|
case "ref":
|
|
1448
|
-
|
|
1448
|
+
un(f, o, t);
|
|
1449
1449
|
break;
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
|
1452
1452
|
try {
|
|
1453
|
-
if (Object.prototype.hasOwnProperty.call(o, "disabled") && r &&
|
|
1454
|
-
const a = o.disabled,
|
|
1453
|
+
if (Object.prototype.hasOwnProperty.call(o, "disabled") && r && ee(r)) {
|
|
1454
|
+
const a = o.disabled, f = a && typeof a == "object" && "value" in a;
|
|
1455
1455
|
let b = !1;
|
|
1456
1456
|
try {
|
|
1457
1457
|
b = R(a);
|
|
1458
1458
|
} catch {
|
|
1459
1459
|
b = !1;
|
|
1460
1460
|
}
|
|
1461
|
-
if (!
|
|
1461
|
+
if (!f && !b)
|
|
1462
1462
|
try {
|
|
1463
1463
|
i.disabled = a, delete o.disabled;
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1464
|
+
const m = globalThis;
|
|
1465
|
+
m.__VDOM_DISABLED_PROMOTIONS || (m.__VDOM_DISABLED_PROMOTIONS = []), m.__VDOM_DISABLED_PROMOTIONS.push({ phase: "bind-directive:postfix-move", location: "attrs", key: "disabled", value: a, time: Date.now(), stack: new Error().stack });
|
|
1466
1466
|
} catch {
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
@@ -1470,14 +1470,14 @@ function Mt(e, t, r, n) {
|
|
|
1470
1470
|
}
|
|
1471
1471
|
return { props: o, attrs: i, listeners: s };
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function ut(e, t) {
|
|
1474
1474
|
if (Array.isArray(e)) {
|
|
1475
1475
|
const i = /* @__PURE__ */ new Set();
|
|
1476
1476
|
return e.map((s) => {
|
|
1477
1477
|
if (!s || typeof s != "object") return s;
|
|
1478
1478
|
let c = s.props?.key ?? s.key;
|
|
1479
1479
|
if (!c) {
|
|
1480
|
-
const
|
|
1480
|
+
const m = s.tag || "node", k = [
|
|
1481
1481
|
// attrs (kebab-case)
|
|
1482
1482
|
s.props?.attrs?.id,
|
|
1483
1483
|
s.props?.attrs?.name,
|
|
@@ -1488,22 +1488,22 @@ function lt(e, t) {
|
|
|
1488
1488
|
s.props?.props?.dataKey,
|
|
1489
1489
|
s.props?.props?.["data-key"]
|
|
1490
1490
|
].find((u) => u != null) ?? "";
|
|
1491
|
-
c =
|
|
1491
|
+
c = k ? `${t}:${m}:${k}` : `${t}:${m}`;
|
|
1492
1492
|
}
|
|
1493
|
-
let a = c,
|
|
1493
|
+
let a = c, f = 1;
|
|
1494
1494
|
for (; i.has(a); )
|
|
1495
|
-
a = `${c}#${
|
|
1495
|
+
a = `${c}#${f++}`;
|
|
1496
1496
|
i.add(a);
|
|
1497
1497
|
let b = s.children;
|
|
1498
|
-
return Array.isArray(b) && (b =
|
|
1498
|
+
return Array.isArray(b) && (b = ut(b, a)), { ...s, key: a, children: b };
|
|
1499
1499
|
});
|
|
1500
1500
|
}
|
|
1501
1501
|
const r = e;
|
|
1502
1502
|
let n = r.props?.key ?? r.key ?? t, o = r.children;
|
|
1503
|
-
return Array.isArray(o) && (o =
|
|
1503
|
+
return Array.isArray(o) && (o = ut(o, n)), { ...r, key: n, children: o };
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1506
|
-
const o = r.directives ?? {}, i =
|
|
1505
|
+
function wt(e, t, r, n) {
|
|
1506
|
+
const o = r.directives ?? {}, i = Nt(
|
|
1507
1507
|
o,
|
|
1508
1508
|
n,
|
|
1509
1509
|
e,
|
|
@@ -1516,170 +1516,170 @@ function bt(e, t, r, n) {
|
|
|
1516
1516
|
...t.attrs,
|
|
1517
1517
|
...r.attrs,
|
|
1518
1518
|
...i.attrs
|
|
1519
|
-
}, a = t.props ?? {},
|
|
1520
|
-
let
|
|
1521
|
-
for (const u in { ...a, ...
|
|
1522
|
-
const
|
|
1523
|
-
let l =
|
|
1524
|
-
if (
|
|
1525
|
-
(R(
|
|
1526
|
-
}),
|
|
1527
|
-
(R(
|
|
1528
|
-
}), !(
|
|
1529
|
-
if (
|
|
1530
|
-
const
|
|
1531
|
-
e.value !==
|
|
1519
|
+
}, a = t.props ?? {}, f = s, b = r?.isCustomElement ?? t?.isCustomElement ?? !1;
|
|
1520
|
+
let m = !1;
|
|
1521
|
+
for (const u in { ...a, ...f }) {
|
|
1522
|
+
const p = a[u], h = f[u];
|
|
1523
|
+
let l = p, y = h;
|
|
1524
|
+
if (P(() => {
|
|
1525
|
+
(R(p) || p && typeof p == "object" && "value" in p) && (l = p.value);
|
|
1526
|
+
}), P(() => {
|
|
1527
|
+
(R(h) || h && typeof h == "object" && "value" in h) && (y = h.value);
|
|
1528
|
+
}), !(p === h && l === y))
|
|
1529
|
+
if (m = !0, u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
|
|
1530
|
+
const w = typeof h == "object" && h !== null && R(h) || h && typeof h == "object" && "value" in h ? h.value : h;
|
|
1531
|
+
e.value !== w && (e.value = w ?? "");
|
|
1532
1532
|
} else if (u === "checked" && e instanceof HTMLInputElement) {
|
|
1533
|
-
const
|
|
1534
|
-
e.checked = !!
|
|
1535
|
-
} else if (u.startsWith("on") && typeof
|
|
1536
|
-
const
|
|
1537
|
-
typeof
|
|
1533
|
+
const w = typeof h == "object" && h !== null && R(h) || h && typeof h == "object" && "value" in h ? h.value : h;
|
|
1534
|
+
e.checked = !!w;
|
|
1535
|
+
} else if (u.startsWith("on") && typeof h == "function") {
|
|
1536
|
+
const w = Rt(u);
|
|
1537
|
+
typeof p == "function" && re.removeListener(e, w, p), re.addListener(e, w, h);
|
|
1538
1538
|
try {
|
|
1539
|
-
if (
|
|
1540
|
-
const
|
|
1539
|
+
if (w && w.startsWith("update:")) {
|
|
1540
|
+
const x = w.split(":", 2)[1], _ = f[x];
|
|
1541
1541
|
let C = [];
|
|
1542
1542
|
try {
|
|
1543
1543
|
if (R(_)) {
|
|
1544
|
-
const
|
|
1545
|
-
C =
|
|
1544
|
+
const S = _.value;
|
|
1545
|
+
C = S && typeof S == "object" ? Object.keys(S) : [];
|
|
1546
1546
|
} else _ && typeof _ == "object" && (C = Object.keys(_));
|
|
1547
1547
|
} catch {
|
|
1548
1548
|
C = [];
|
|
1549
1549
|
}
|
|
1550
|
-
const
|
|
1551
|
-
for (const
|
|
1552
|
-
const
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1555
|
-
|
|
1550
|
+
const g = C.filter((S) => typeof S == "string" && !S.startsWith("_") && S !== "constructor");
|
|
1551
|
+
for (const S of g) {
|
|
1552
|
+
const T = `update:${S}`, $ = (v) => {
|
|
1553
|
+
const A = v.detail !== void 0 ? v.detail : v.target?.value, E = { ...R(_) ? _.value || {} : f[x] || {}, [S]: A };
|
|
1554
|
+
P(() => {
|
|
1555
|
+
h({ detail: E });
|
|
1556
1556
|
});
|
|
1557
1557
|
};
|
|
1558
|
-
|
|
1559
|
-
re.addListener(e,
|
|
1558
|
+
P(() => {
|
|
1559
|
+
re.addListener(e, T, $);
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
} catch {
|
|
1564
1564
|
}
|
|
1565
|
-
} else if (
|
|
1565
|
+
} else if (h == null)
|
|
1566
1566
|
e.removeAttribute(u);
|
|
1567
1567
|
else {
|
|
1568
|
-
const
|
|
1569
|
-
if (
|
|
1568
|
+
const w = r?.isCustomElement ?? t?.isCustomElement ?? !1;
|
|
1569
|
+
if (w || u in e)
|
|
1570
1570
|
try {
|
|
1571
|
-
e[u] =
|
|
1571
|
+
e[u] = h, u === "disabled" && h === !1 && !w && ee(e) && e.removeAttribute("disabled");
|
|
1572
1572
|
} catch {
|
|
1573
1573
|
}
|
|
1574
1574
|
else
|
|
1575
|
-
|
|
1575
|
+
h === !1 && e.removeAttribute(u);
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
|
-
for (const [u,
|
|
1578
|
+
for (const [u, p] of Object.entries(
|
|
1579
1579
|
i.listeners || {}
|
|
1580
1580
|
)) {
|
|
1581
|
-
re.addListener(e, u,
|
|
1581
|
+
re.addListener(e, u, p);
|
|
1582
1582
|
try {
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1583
|
+
const h = e && e.parentElement;
|
|
1584
|
+
h && h !== e && re.addListener(h, u, p);
|
|
1585
1585
|
} catch {
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
1588
|
-
const
|
|
1589
|
-
for (const u in { ...
|
|
1590
|
-
const
|
|
1591
|
-
let l =
|
|
1592
|
-
if (R(
|
|
1593
|
-
if (
|
|
1594
|
-
|
|
1588
|
+
const d = t.attrs ?? {}, k = c;
|
|
1589
|
+
for (const u in { ...d, ...k }) {
|
|
1590
|
+
const p = d[u], h = k[u];
|
|
1591
|
+
let l = p, y = h;
|
|
1592
|
+
if (R(p) && (l = p.value), R(h) && (y = h.value), l !== y)
|
|
1593
|
+
if (m = !0, y == null || y === !1)
|
|
1594
|
+
P(() => {
|
|
1595
1595
|
e.removeAttribute(u);
|
|
1596
|
-
}), u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ?
|
|
1596
|
+
}), u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? P(() => {
|
|
1597
1597
|
e.value = "";
|
|
1598
|
-
}) : e instanceof HTMLSelectElement ?
|
|
1598
|
+
}) : e instanceof HTMLSelectElement ? P(() => {
|
|
1599
1599
|
e.value = "";
|
|
1600
|
-
}) : e instanceof HTMLProgressElement &&
|
|
1600
|
+
}) : e instanceof HTMLProgressElement && P(() => {
|
|
1601
1601
|
e.value = 0;
|
|
1602
|
-
})), u === "checked" && e instanceof HTMLInputElement &&
|
|
1602
|
+
})), u === "checked" && e instanceof HTMLInputElement && P(() => {
|
|
1603
1603
|
e.checked = !1;
|
|
1604
|
-
}), u === "disabled" &&
|
|
1604
|
+
}), u === "disabled" && ee(e) && P(() => {
|
|
1605
1605
|
e.disabled = !1;
|
|
1606
1606
|
});
|
|
1607
1607
|
else {
|
|
1608
1608
|
if (u === "value") {
|
|
1609
1609
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
1610
|
-
|
|
1611
|
-
e.value =
|
|
1610
|
+
P(() => {
|
|
1611
|
+
e.value = y ?? "";
|
|
1612
1612
|
});
|
|
1613
1613
|
continue;
|
|
1614
1614
|
} else if (e instanceof HTMLSelectElement) {
|
|
1615
|
-
|
|
1616
|
-
e.value =
|
|
1615
|
+
P(() => {
|
|
1616
|
+
e.value = y ?? "";
|
|
1617
1617
|
});
|
|
1618
1618
|
continue;
|
|
1619
1619
|
} else if (e instanceof HTMLProgressElement) {
|
|
1620
|
-
|
|
1621
|
-
e.value = Number(
|
|
1620
|
+
P(() => {
|
|
1621
|
+
e.value = Number(y);
|
|
1622
1622
|
});
|
|
1623
1623
|
continue;
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
if (u === "checked" && e instanceof HTMLInputElement) {
|
|
1627
|
-
|
|
1628
|
-
e.checked = !!
|
|
1627
|
+
P(() => {
|
|
1628
|
+
e.checked = !!y;
|
|
1629
1629
|
});
|
|
1630
1630
|
continue;
|
|
1631
1631
|
}
|
|
1632
1632
|
if (u === "style") {
|
|
1633
|
-
e.setAttribute(u, String(
|
|
1633
|
+
e.setAttribute(u, String(y));
|
|
1634
1634
|
continue;
|
|
1635
1635
|
}
|
|
1636
|
-
if (u === "disabled" &&
|
|
1637
|
-
|
|
1638
|
-
e.disabled = ke(
|
|
1639
|
-
}), ke(
|
|
1636
|
+
if (u === "disabled" && ee(e)) {
|
|
1637
|
+
P(() => {
|
|
1638
|
+
e.disabled = ke(y);
|
|
1639
|
+
}), ke(y) ? P(() => {
|
|
1640
1640
|
e.setAttribute(u, "");
|
|
1641
|
-
}) :
|
|
1641
|
+
}) : P(() => {
|
|
1642
1642
|
e.removeAttribute(u);
|
|
1643
1643
|
});
|
|
1644
1644
|
continue;
|
|
1645
1645
|
}
|
|
1646
|
-
const
|
|
1647
|
-
if (b && !
|
|
1648
|
-
const
|
|
1646
|
+
const w = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1647
|
+
if (b && !w && u.includes("-")) {
|
|
1648
|
+
const x = ht(u);
|
|
1649
1649
|
try {
|
|
1650
|
-
R(
|
|
1650
|
+
R(h) ? e[x] = h : e[x] = y;
|
|
1651
1651
|
} catch {
|
|
1652
|
-
e.setAttribute(u, String(
|
|
1652
|
+
e.setAttribute(u, String(y));
|
|
1653
1653
|
}
|
|
1654
|
-
} else if (!
|
|
1654
|
+
} else if (!w && u in e)
|
|
1655
1655
|
try {
|
|
1656
|
-
R(
|
|
1656
|
+
R(h) ? e[u] = h : e[u] = y;
|
|
1657
1657
|
} catch {
|
|
1658
|
-
e.setAttribute(u, String(
|
|
1658
|
+
e.setAttribute(u, String(y));
|
|
1659
1659
|
}
|
|
1660
1660
|
else
|
|
1661
|
-
e.setAttribute(u, String(
|
|
1661
|
+
e.setAttribute(u, String(y));
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
1664
|
try {
|
|
1665
|
-
if (
|
|
1665
|
+
if (ee(e)) {
|
|
1666
1666
|
const u = s.disabled;
|
|
1667
|
-
let
|
|
1667
|
+
let p;
|
|
1668
1668
|
try {
|
|
1669
|
-
const l = Object.prototype.hasOwnProperty.call(i.props || {}, "disabled"),
|
|
1670
|
-
let
|
|
1671
|
-
|
|
1672
|
-
|
|
1669
|
+
const l = Object.prototype.hasOwnProperty.call(i.props || {}, "disabled"), y = u && typeof u == "object" && "value" in u;
|
|
1670
|
+
let w = !1;
|
|
1671
|
+
P(() => {
|
|
1672
|
+
w = !!R(u);
|
|
1673
1673
|
});
|
|
1674
|
-
const
|
|
1675
|
-
|
|
1674
|
+
const x = lt(u);
|
|
1675
|
+
w || y || l || x ? p = u : p = c.disabled;
|
|
1676
1676
|
} catch {
|
|
1677
|
-
|
|
1677
|
+
p = c.disabled;
|
|
1678
1678
|
}
|
|
1679
|
-
const
|
|
1680
|
-
|
|
1681
|
-
e.disabled =
|
|
1682
|
-
}),
|
|
1679
|
+
const h = ke(p);
|
|
1680
|
+
P(() => {
|
|
1681
|
+
e.disabled = h;
|
|
1682
|
+
}), P(h ? () => {
|
|
1683
1683
|
e.setAttribute("disabled", "");
|
|
1684
1684
|
} : () => {
|
|
1685
1685
|
e.removeAttribute("disabled");
|
|
@@ -1687,177 +1687,177 @@ function bt(e, t, r, n) {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
} catch {
|
|
1689
1689
|
}
|
|
1690
|
-
b &&
|
|
1690
|
+
b && m && (P(() => {
|
|
1691
1691
|
e._applyProps?.(e._cfg);
|
|
1692
|
-
}),
|
|
1692
|
+
}), P(() => {
|
|
1693
1693
|
typeof e.requestRender == "function" ? e.requestRender() : typeof e._render == "function" && e._render(e._cfg);
|
|
1694
1694
|
}));
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function Y(e, t, r) {
|
|
1697
1697
|
if (typeof e == "string")
|
|
1698
1698
|
return document.createTextNode(e);
|
|
1699
1699
|
if (e.tag === "#text") {
|
|
1700
|
-
const
|
|
1700
|
+
const d = document.createTextNode(
|
|
1701
1701
|
typeof e.children == "string" ? e.children : ""
|
|
1702
1702
|
);
|
|
1703
|
-
return e.key != null && (
|
|
1703
|
+
return e.key != null && (d.key = e.key), d;
|
|
1704
1704
|
}
|
|
1705
1705
|
if (e.tag === "#anchor") {
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1710
|
-
for (const l of
|
|
1711
|
-
const
|
|
1712
|
-
if (
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1706
|
+
const d = e, k = Array.isArray(d.children) ? d.children : [], u = document.createTextNode(""), p = document.createTextNode("");
|
|
1707
|
+
d.key != null && (u.key = `${d.key}:start`, p.key = `${d.key}:end`), d._startNode = u, d._endNode = p;
|
|
1708
|
+
const h = document.createDocumentFragment();
|
|
1709
|
+
h.appendChild(u);
|
|
1710
|
+
for (const l of k) {
|
|
1711
|
+
const y = Y(l, t);
|
|
1712
|
+
if (d.key != null && y instanceof Element && !y.hasAttribute("data-anchor-key")) {
|
|
1713
|
+
const w = l;
|
|
1714
|
+
w && typeof w == "object" && w.key != null || (y.key = d.key, y.setAttribute("data-anchor-key", String(d.key)));
|
|
1715
1715
|
}
|
|
1716
|
-
|
|
1716
|
+
h.appendChild(y);
|
|
1717
1717
|
}
|
|
1718
|
-
return
|
|
1718
|
+
return h.appendChild(p), h;
|
|
1719
1719
|
}
|
|
1720
1720
|
const n = document.createElement(e.tag);
|
|
1721
1721
|
e.key != null && (n.key = e.key), e.props && e.props._transitionGroup && (n._transitionGroup = e.props._transitionGroup);
|
|
1722
|
-
const { props: o = {}, attrs: i = {}, directives: s = {} } = e.props ?? {}, c =
|
|
1722
|
+
const { props: o = {}, attrs: i = {}, directives: s = {} } = e.props ?? {}, c = Nt(s, t, n, i), a = {
|
|
1723
1723
|
...o,
|
|
1724
1724
|
...c.props
|
|
1725
|
-
},
|
|
1725
|
+
}, f = {
|
|
1726
1726
|
...i,
|
|
1727
1727
|
...c.attrs
|
|
1728
1728
|
};
|
|
1729
1729
|
try {
|
|
1730
|
-
if (a.disabled !== void 0 && n &&
|
|
1731
|
-
const
|
|
1730
|
+
if (a.disabled !== void 0 && n && ee(n)) {
|
|
1731
|
+
const d = a.disabled, k = d && typeof d == "object" && "value" in d;
|
|
1732
1732
|
let u = !1;
|
|
1733
1733
|
try {
|
|
1734
|
-
u = R(
|
|
1734
|
+
u = R(d);
|
|
1735
1735
|
} catch {
|
|
1736
1736
|
u = !1;
|
|
1737
1737
|
}
|
|
1738
|
-
!
|
|
1739
|
-
|
|
1740
|
-
const
|
|
1741
|
-
|
|
1738
|
+
!k && !u && P(() => {
|
|
1739
|
+
f.disabled = d, delete a.disabled;
|
|
1740
|
+
const p = globalThis;
|
|
1741
|
+
p.__VDOM_DISABLED_PROMOTIONS || (p.__VDOM_DISABLED_PROMOTIONS = []), p.__VDOM_DISABLED_PROMOTIONS.push({ phase: "createElement:move-prop-to-attr", location: "attrs", key: "disabled", value: d, time: Date.now(), stack: new Error().stack });
|
|
1742
1742
|
});
|
|
1743
1743
|
}
|
|
1744
1744
|
} catch {
|
|
1745
1745
|
}
|
|
1746
1746
|
const b = n.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1747
|
-
for (const
|
|
1748
|
-
const
|
|
1749
|
-
if (typeof
|
|
1747
|
+
for (const d in f) {
|
|
1748
|
+
const k = f[d];
|
|
1749
|
+
if (typeof d != "string" || /\[object Object\]/.test(d))
|
|
1750
1750
|
continue;
|
|
1751
|
-
const u = typeof
|
|
1751
|
+
const u = typeof k == "object" && k !== null && R(k) || k && typeof k == "object" && "value" in k ? k.value : k;
|
|
1752
1752
|
if (typeof u == "boolean")
|
|
1753
|
-
u ? n.setAttribute(
|
|
1754
|
-
n.removeAttribute(
|
|
1753
|
+
u ? n.setAttribute(d, "") : P(() => {
|
|
1754
|
+
n.removeAttribute(d);
|
|
1755
1755
|
});
|
|
1756
1756
|
else if (u != null) {
|
|
1757
|
-
if (
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1757
|
+
if (d === "disabled" && ee(n)) {
|
|
1758
|
+
const p = a.disabled, h = lt(p) ? p : u, l = ke(h);
|
|
1759
|
+
P(() => {
|
|
1760
1760
|
n.disabled = l;
|
|
1761
|
-
}),
|
|
1762
|
-
n.setAttribute(
|
|
1761
|
+
}), P(l ? () => {
|
|
1762
|
+
n.setAttribute(d, "");
|
|
1763
1763
|
} : () => {
|
|
1764
|
-
n.removeAttribute(
|
|
1764
|
+
n.removeAttribute(d);
|
|
1765
1765
|
});
|
|
1766
1766
|
continue;
|
|
1767
1767
|
}
|
|
1768
|
-
if (!b &&
|
|
1768
|
+
if (!b && d === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
|
|
1769
1769
|
try {
|
|
1770
1770
|
n instanceof HTMLProgressElement ? n.value = Number(u) : n.value = u ?? "";
|
|
1771
1771
|
} catch {
|
|
1772
|
-
n.setAttribute(
|
|
1772
|
+
n.setAttribute(d, String(u));
|
|
1773
1773
|
}
|
|
1774
|
-
else if (!b &&
|
|
1774
|
+
else if (!b && d === "checked" && n instanceof HTMLInputElement)
|
|
1775
1775
|
try {
|
|
1776
1776
|
n.checked = !!u;
|
|
1777
1777
|
} catch {
|
|
1778
|
-
n.setAttribute(
|
|
1778
|
+
n.setAttribute(d, String(u));
|
|
1779
1779
|
}
|
|
1780
|
-
else if (!b &&
|
|
1780
|
+
else if (!b && d in n)
|
|
1781
1781
|
try {
|
|
1782
|
-
n[
|
|
1782
|
+
n[d] = u, d === "disabled" && u === !1 && ee(n) && n.removeAttribute("disabled");
|
|
1783
1783
|
} catch {
|
|
1784
|
-
n.setAttribute(
|
|
1784
|
+
n.setAttribute(d, String(u));
|
|
1785
1785
|
}
|
|
1786
|
-
else if ((e.props?.isCustomElement ?? !1) && !b &&
|
|
1787
|
-
const
|
|
1786
|
+
else if ((e.props?.isCustomElement ?? !1) && !b && d.includes("-")) {
|
|
1787
|
+
const h = ht(d);
|
|
1788
1788
|
try {
|
|
1789
|
-
n[
|
|
1789
|
+
n[h] = u;
|
|
1790
1790
|
} catch {
|
|
1791
|
-
n.setAttribute(
|
|
1791
|
+
n.setAttribute(d, String(u));
|
|
1792
1792
|
}
|
|
1793
1793
|
} else
|
|
1794
|
-
n.setAttribute(
|
|
1794
|
+
n.setAttribute(d, String(u));
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
|
-
for (const
|
|
1798
|
-
const
|
|
1799
|
-
if (!(typeof
|
|
1800
|
-
if (
|
|
1801
|
-
const u = typeof
|
|
1802
|
-
|
|
1797
|
+
for (const d in a) {
|
|
1798
|
+
const k = a[d];
|
|
1799
|
+
if (!(typeof d != "string" || /\[object Object\]/.test(d)))
|
|
1800
|
+
if (d === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
|
|
1801
|
+
const u = typeof k == "object" && k !== null && typeof k.value < "u" ? k.value : k;
|
|
1802
|
+
P(() => {
|
|
1803
1803
|
n.value = u ?? "";
|
|
1804
1804
|
});
|
|
1805
|
-
} else if (
|
|
1806
|
-
const u = Rt(
|
|
1807
|
-
const
|
|
1805
|
+
} else if (d.startsWith("on") && typeof k == "function") {
|
|
1806
|
+
const u = Rt(d), p = u.includes(":") ? (() => {
|
|
1807
|
+
const h = u.split(":"), l = h[1];
|
|
1808
1808
|
if (l.includes("-")) {
|
|
1809
|
-
const
|
|
1810
|
-
return `${
|
|
1809
|
+
const y = l.split("-").map((w, x) => x === 0 ? w : w.charAt(0).toUpperCase() + w.slice(1)).join("");
|
|
1810
|
+
return `${h[0]}:${y}`;
|
|
1811
1811
|
} else {
|
|
1812
|
-
const
|
|
1813
|
-
return `${
|
|
1812
|
+
const y = l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1813
|
+
return `${h[0]}:${y}`;
|
|
1814
1814
|
}
|
|
1815
1815
|
})() : u;
|
|
1816
|
-
c.listeners && (c.listeners[u] || c.listeners[
|
|
1816
|
+
c.listeners && (c.listeners[u] || c.listeners[p]) || re.addListener(n, u, k);
|
|
1817
1817
|
} else {
|
|
1818
|
-
if (
|
|
1818
|
+
if (d.startsWith("on") && k === void 0)
|
|
1819
1819
|
continue;
|
|
1820
|
-
if (
|
|
1821
|
-
n.removeAttribute(
|
|
1822
|
-
else if ((e.props?.isCustomElement ?? !1) ||
|
|
1820
|
+
if (k == null || k === !1)
|
|
1821
|
+
n.removeAttribute(d);
|
|
1822
|
+
else if ((e.props?.isCustomElement ?? !1) || d in n)
|
|
1823
1823
|
try {
|
|
1824
|
-
const
|
|
1825
|
-
if (
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1824
|
+
const p = typeof k == "object" && k !== null && R(k) ? k : typeof k == "object" && k !== null && typeof k.value < "u" ? k.value : k;
|
|
1825
|
+
if (d === "disabled" && ee(n)) {
|
|
1826
|
+
const h = a.disabled !== void 0 ? a.disabled : p, l = ke(h);
|
|
1827
|
+
P(() => {
|
|
1828
1828
|
n.disabled = l;
|
|
1829
|
-
}),
|
|
1830
|
-
n.setAttribute(
|
|
1829
|
+
}), P(l ? () => {
|
|
1830
|
+
n.setAttribute(d, "");
|
|
1831
1831
|
} : () => {
|
|
1832
|
-
n.removeAttribute(
|
|
1832
|
+
n.removeAttribute(d);
|
|
1833
1833
|
});
|
|
1834
1834
|
continue;
|
|
1835
1835
|
}
|
|
1836
1836
|
try {
|
|
1837
|
-
if (typeof n[
|
|
1838
|
-
let l =
|
|
1839
|
-
typeof
|
|
1837
|
+
if (typeof n[d] == "boolean") {
|
|
1838
|
+
let l = p;
|
|
1839
|
+
typeof p == "string" ? p === "false" ? l = !1 : p === "true" ? l = !0 : l = !!p && p !== "" : l = !!p, n[d] = l;
|
|
1840
1840
|
} else
|
|
1841
|
-
n[
|
|
1841
|
+
n[d] = p;
|
|
1842
1842
|
} catch {
|
|
1843
|
-
n[
|
|
1843
|
+
n[d] = p;
|
|
1844
1844
|
}
|
|
1845
1845
|
} catch {
|
|
1846
1846
|
}
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
|
-
for (const [
|
|
1849
|
+
for (const [d, k] of Object.entries(
|
|
1850
1850
|
c.listeners || {}
|
|
1851
1851
|
))
|
|
1852
|
-
re.addListener(n,
|
|
1853
|
-
const
|
|
1852
|
+
re.addListener(n, d, k);
|
|
1853
|
+
const m = {
|
|
1854
1854
|
...e,
|
|
1855
1855
|
props: {
|
|
1856
1856
|
...e.props,
|
|
1857
1857
|
...c.props
|
|
1858
1858
|
}
|
|
1859
1859
|
};
|
|
1860
|
-
|
|
1860
|
+
Te(m, n, r);
|
|
1861
1861
|
try {
|
|
1862
1862
|
if (typeof n._applyProps == "function")
|
|
1863
1863
|
try {
|
|
@@ -1868,30 +1868,30 @@ function X(e, t, r) {
|
|
|
1868
1868
|
} catch {
|
|
1869
1869
|
}
|
|
1870
1870
|
if (Array.isArray(e.children))
|
|
1871
|
-
for (const
|
|
1872
|
-
n.appendChild(
|
|
1871
|
+
for (const d of e.children)
|
|
1872
|
+
n.appendChild(Y(d, t, r));
|
|
1873
1873
|
else typeof e.children == "string" && (n.textContent = e.children);
|
|
1874
1874
|
try {
|
|
1875
|
-
if (n instanceof HTMLSelectElement &&
|
|
1875
|
+
if (n instanceof HTMLSelectElement && f && f.hasOwnProperty("value"))
|
|
1876
1876
|
try {
|
|
1877
|
-
n.value =
|
|
1877
|
+
n.value = f.value ?? "";
|
|
1878
1878
|
} catch {
|
|
1879
1879
|
}
|
|
1880
1880
|
} catch {
|
|
1881
1881
|
}
|
|
1882
1882
|
try {
|
|
1883
|
-
if (
|
|
1884
|
-
const
|
|
1885
|
-
let
|
|
1883
|
+
if (ee(n)) {
|
|
1884
|
+
const d = a.disabled, k = f.disabled, u = d && typeof d == "object" && "value" in d;
|
|
1885
|
+
let p = !1;
|
|
1886
1886
|
try {
|
|
1887
|
-
|
|
1887
|
+
p = !!R(d);
|
|
1888
1888
|
} catch {
|
|
1889
|
-
|
|
1889
|
+
p = !1;
|
|
1890
1890
|
}
|
|
1891
|
-
const l =
|
|
1892
|
-
|
|
1893
|
-
n.disabled =
|
|
1894
|
-
}),
|
|
1891
|
+
const l = p || u || lt(d) ? d : k, y = ke(l);
|
|
1892
|
+
P(() => {
|
|
1893
|
+
n.disabled = y;
|
|
1894
|
+
}), P(y ? () => {
|
|
1895
1895
|
n.setAttribute("disabled", "");
|
|
1896
1896
|
} : () => {
|
|
1897
1897
|
n.removeAttribute("disabled");
|
|
@@ -1901,227 +1901,273 @@ function X(e, t, r) {
|
|
|
1901
1901
|
}
|
|
1902
1902
|
return n;
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1904
|
+
function fn(e, t, r, n, o) {
|
|
1905
1905
|
if (typeof r == "string") {
|
|
1906
1906
|
e.textContent !== r && (e.textContent = r);
|
|
1907
1907
|
return;
|
|
1908
1908
|
}
|
|
1909
1909
|
if (!Array.isArray(r)) return;
|
|
1910
1910
|
const i = e.childNodes, s = [];
|
|
1911
|
-
for (let
|
|
1912
|
-
s.push(i[
|
|
1911
|
+
for (let p = 0; p < i.length; p++)
|
|
1912
|
+
s.push(i[p]);
|
|
1913
1913
|
const c = Array.isArray(t) ? t : [], a = e._transitionGroup;
|
|
1914
1914
|
if (a) {
|
|
1915
|
-
const
|
|
1916
|
-
f || (e._hasTransitionGroupRendered = !0);
|
|
1917
|
-
const g = (w) => typeof w == "string" && w.startsWith("each-") ? w.substring(5) : w, l = [], m = [];
|
|
1915
|
+
const p = (w) => typeof w == "string" && w.startsWith("each-") ? w.substring(5) : w, h = [], l = [];
|
|
1918
1916
|
for (const w of r)
|
|
1919
1917
|
if (w && w.tag === "#anchor") {
|
|
1920
|
-
const
|
|
1921
|
-
for (const
|
|
1922
|
-
const
|
|
1923
|
-
|
|
1918
|
+
const x = Array.isArray(w.children) ? w.children : [];
|
|
1919
|
+
for (const _ of x) {
|
|
1920
|
+
const C = p(_.key || w.key || "unknown");
|
|
1921
|
+
h.push({ ..._, key: C });
|
|
1924
1922
|
}
|
|
1925
|
-
} else w &&
|
|
1923
|
+
} else w && h.push({ ...w, key: p(w.key) });
|
|
1926
1924
|
for (const w of c)
|
|
1927
1925
|
if (w && w.tag === "#anchor") {
|
|
1928
|
-
const
|
|
1929
|
-
for (const
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1926
|
+
const x = Array.isArray(w.children) ? w.children : [];
|
|
1927
|
+
for (const _ of x) {
|
|
1928
|
+
const C = p(_.key || w.key || "unknown");
|
|
1929
|
+
l.push({ ..._, key: C });
|
|
1932
1930
|
}
|
|
1933
|
-
} else w &&
|
|
1934
|
-
if (
|
|
1935
|
-
const w = /* @__PURE__ */ new Map(),
|
|
1936
|
-
for (const
|
|
1937
|
-
if (
|
|
1938
|
-
const v = String(
|
|
1939
|
-
w.set(v,
|
|
1931
|
+
} else w && l.push({ ...w, key: p(w.key) });
|
|
1932
|
+
if (h.some((w) => w && w.key != null) || l.some((w) => w && w.key != null)) {
|
|
1933
|
+
const w = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
|
|
1934
|
+
for (const $ of l)
|
|
1935
|
+
if ($ && $.key != null) {
|
|
1936
|
+
const v = String($.key);
|
|
1937
|
+
w.set(v, $);
|
|
1940
1938
|
}
|
|
1941
|
-
for (let
|
|
1942
|
-
const v = s[
|
|
1943
|
-
let
|
|
1944
|
-
if (
|
|
1945
|
-
const
|
|
1946
|
-
|
|
1939
|
+
for (let $ = 0; $ < s.length; $++) {
|
|
1940
|
+
const v = s[$];
|
|
1941
|
+
let A = v.key;
|
|
1942
|
+
if (!A && v instanceof Element) {
|
|
1943
|
+
const L = v.getAttribute("data-anchor-key");
|
|
1944
|
+
L && (A = L);
|
|
1947
1945
|
}
|
|
1948
|
-
if (
|
|
1949
|
-
let
|
|
1950
|
-
|
|
1946
|
+
if (A = p(A), A != null && v instanceof Element && v.nodeType === Node.ELEMENT_NODE) {
|
|
1947
|
+
let L = typeof A == "string" && A.includes(":") ? A.substring(0, A.lastIndexOf(":")) : A;
|
|
1948
|
+
L = String(L), x.set(L, v);
|
|
1951
1949
|
}
|
|
1952
1950
|
}
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
let
|
|
1951
|
+
const _ = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map(), g = s.length > 0;
|
|
1952
|
+
if (a.moveClass && g)
|
|
1953
|
+
for (let $ = 0; $ < s.length; $++) {
|
|
1954
|
+
const v = s[$];
|
|
1955
|
+
if (v instanceof HTMLElement && v.parentElement) {
|
|
1956
|
+
const A = v.getBoundingClientRect();
|
|
1957
|
+
C.set(v, A);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
const S = [];
|
|
1961
|
+
for (const $ of h) {
|
|
1962
|
+
let v = $.key;
|
|
1956
1963
|
if (v == null) continue;
|
|
1957
1964
|
v = String(v);
|
|
1958
|
-
const
|
|
1959
|
-
let
|
|
1960
|
-
if (
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
const
|
|
1964
|
-
|
|
1965
|
+
const A = w.get(v);
|
|
1966
|
+
let L = x.get(v);
|
|
1967
|
+
if (L && A) {
|
|
1968
|
+
const E = Oe(L, A, $, n);
|
|
1969
|
+
_.add(L);
|
|
1970
|
+
const O = String(v);
|
|
1971
|
+
E.key = O, E instanceof Element && E.setAttribute("data-anchor-key", O), S.push({ node: E, key: v, newVNode: $, oldVNode: A, isNew: !1 });
|
|
1965
1972
|
} else {
|
|
1966
|
-
|
|
1967
|
-
const
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
}),
|
|
1973
|
+
L = Y($, n), L.key = v, L instanceof Element && L.setAttribute("data-anchor-key", String(v)), e.appendChild(L);
|
|
1974
|
+
const E = g || a.appear === !0;
|
|
1975
|
+
L instanceof HTMLElement && E && _e(L, a).catch((O) => {
|
|
1976
|
+
F("Enter transition error:", O);
|
|
1977
|
+
}), S.push({ node: L, key: v, newVNode: $, isNew: !0 });
|
|
1971
1978
|
}
|
|
1972
1979
|
}
|
|
1973
1980
|
const T = [];
|
|
1974
|
-
for (let
|
|
1975
|
-
const v = s[
|
|
1976
|
-
if (!
|
|
1977
|
-
const
|
|
1981
|
+
for (let $ = 0; $ < s.length; $++) {
|
|
1982
|
+
const v = s[$], A = v.key;
|
|
1983
|
+
if (!_.has(v) && A != null && v instanceof HTMLElement) {
|
|
1984
|
+
const E = Ge(v, a).then(() => {
|
|
1978
1985
|
e.contains(v) && e.removeChild(v);
|
|
1979
|
-
}).catch((
|
|
1980
|
-
|
|
1986
|
+
}).catch((O) => {
|
|
1987
|
+
F("Leave transition error:", O), e.contains(v) && e.removeChild(v);
|
|
1981
1988
|
});
|
|
1982
|
-
T.push(
|
|
1989
|
+
T.push(E);
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
if (T.length === 0) {
|
|
1993
|
+
let $ = e.firstChild;
|
|
1994
|
+
for (const { node: v } of S)
|
|
1995
|
+
v !== $ && e.insertBefore(v, $), $ = v.nextSibling;
|
|
1996
|
+
if (a.moveClass && C.size > 0) {
|
|
1997
|
+
const v = [];
|
|
1998
|
+
for (const { node: A, isNew: L } of S)
|
|
1999
|
+
if (!L && A instanceof HTMLElement) {
|
|
2000
|
+
const E = C.get(A);
|
|
2001
|
+
if (E) {
|
|
2002
|
+
const O = A.getBoundingClientRect(), M = E.left - O.left, I = E.top - O.top;
|
|
2003
|
+
if (M !== 0 || I !== 0) {
|
|
2004
|
+
const ue = a.moveClass.split(/\s+/).filter((D) => D);
|
|
2005
|
+
v.push({ node: A, deltaX: M, deltaY: I, moveClasses: ue });
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
if (v.length > 0) {
|
|
2010
|
+
for (const { node: A, deltaX: L, deltaY: E } of v)
|
|
2011
|
+
A.style.transform = `translate(${L}px, ${E}px)`, A.style.transitionProperty = "none";
|
|
2012
|
+
e.offsetHeight, requestAnimationFrame(() => {
|
|
2013
|
+
requestAnimationFrame(() => {
|
|
2014
|
+
for (const { node: A, moveClasses: L } of v)
|
|
2015
|
+
for (const E of L)
|
|
2016
|
+
A.classList.add(E);
|
|
2017
|
+
requestAnimationFrame(() => {
|
|
2018
|
+
const A = a.moveClass || "", L = A.match(/duration-(\d+)/), E = L ? `${L[1]}ms` : "300ms", O = A.match(/ease-(out|in|in-out|linear)/), M = O ? `ease-${O[1]}` : "ease-out";
|
|
2019
|
+
for (const { node: I } of v)
|
|
2020
|
+
I.style.transition = `transform ${E} ${M}`;
|
|
2021
|
+
requestAnimationFrame(() => {
|
|
2022
|
+
for (const { node: I, moveClasses: ue } of v) {
|
|
2023
|
+
I.style.removeProperty("transform");
|
|
2024
|
+
const D = () => {
|
|
2025
|
+
for (const N of ue)
|
|
2026
|
+
I.classList.remove(N);
|
|
2027
|
+
I.style.removeProperty("transition"), I.removeEventListener("transitionend", D), I.removeEventListener("transitioncancel", D);
|
|
2028
|
+
};
|
|
2029
|
+
I.addEventListener("transitionend", D, { once: !0 }), I.addEventListener("transitioncancel", D, { once: !0 });
|
|
2030
|
+
}
|
|
2031
|
+
});
|
|
2032
|
+
});
|
|
2033
|
+
});
|
|
2034
|
+
});
|
|
2035
|
+
}
|
|
1983
2036
|
}
|
|
1984
2037
|
}
|
|
1985
|
-
requestAnimationFrame(() => {
|
|
1986
|
-
if (T.length > 0)
|
|
1987
|
-
return;
|
|
1988
|
-
let E = e.firstChild;
|
|
1989
|
-
for (const { node: v } of h)
|
|
1990
|
-
v !== E && e.insertBefore(v, E), E = v.nextSibling;
|
|
1991
|
-
});
|
|
1992
2038
|
return;
|
|
1993
2039
|
}
|
|
1994
2040
|
}
|
|
1995
|
-
const
|
|
1996
|
-
for (const
|
|
1997
|
-
|
|
2041
|
+
const f = /* @__PURE__ */ new Map();
|
|
2042
|
+
for (const p of c)
|
|
2043
|
+
p && p.key != null && f.set(p.key, p);
|
|
1998
2044
|
const b = /* @__PURE__ */ new Map();
|
|
1999
|
-
for (let
|
|
2000
|
-
const
|
|
2001
|
-
l != null && b.set(l,
|
|
2002
|
-
}
|
|
2003
|
-
const
|
|
2004
|
-
let
|
|
2005
|
-
function
|
|
2006
|
-
let l =
|
|
2007
|
-
for (; l && (
|
|
2045
|
+
for (let p = 0; p < s.length; p++) {
|
|
2046
|
+
const h = s[p], l = h.key;
|
|
2047
|
+
l != null && b.set(l, h);
|
|
2048
|
+
}
|
|
2049
|
+
const m = /* @__PURE__ */ new Set();
|
|
2050
|
+
let d = e.firstChild;
|
|
2051
|
+
function k(p, h) {
|
|
2052
|
+
let l = p;
|
|
2053
|
+
for (; l && (m.add(l), l !== h); )
|
|
2008
2054
|
l = l.nextSibling;
|
|
2009
2055
|
}
|
|
2010
|
-
function u(
|
|
2056
|
+
function u(p, h, l, y, w, x = !0) {
|
|
2011
2057
|
const _ = [];
|
|
2012
|
-
let C =
|
|
2013
|
-
for (; C && C !==
|
|
2058
|
+
let C = p.nextSibling;
|
|
2059
|
+
for (; C && C !== h; )
|
|
2014
2060
|
_.push(C), C = C.nextSibling;
|
|
2015
|
-
const
|
|
2016
|
-
if (
|
|
2017
|
-
const
|
|
2018
|
-
for (const
|
|
2019
|
-
|
|
2020
|
-
for (const
|
|
2021
|
-
const
|
|
2022
|
-
|
|
2061
|
+
const g = Array.isArray(l) ? l : [];
|
|
2062
|
+
if (y.some((T) => T && T.key != null) || g.some((T) => T && T.key != null)) {
|
|
2063
|
+
const T = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
|
|
2064
|
+
for (const E of g)
|
|
2065
|
+
E && E.key != null && T.set(E.key, E);
|
|
2066
|
+
for (const E of _) {
|
|
2067
|
+
const O = E.key;
|
|
2068
|
+
O != null && $.set(O, E);
|
|
2023
2069
|
}
|
|
2024
|
-
const
|
|
2025
|
-
let
|
|
2026
|
-
for (const
|
|
2027
|
-
let
|
|
2028
|
-
if (
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2070
|
+
const v = w && w.state === "visible" && g.length === 0 && y.length > 0, A = /* @__PURE__ */ new Set();
|
|
2071
|
+
let L = p.nextSibling;
|
|
2072
|
+
for (const E of y) {
|
|
2073
|
+
let O;
|
|
2074
|
+
if (E.key != null && $.has(E.key)) {
|
|
2075
|
+
const M = T.get(E.key);
|
|
2076
|
+
O = Oe(
|
|
2077
|
+
$.get(E.key),
|
|
2078
|
+
M,
|
|
2079
|
+
E,
|
|
2034
2080
|
n
|
|
2035
|
-
),
|
|
2036
|
-
|
|
2037
|
-
}),
|
|
2081
|
+
), A.add(O), w && O instanceof HTMLElement && v && w.appear && _e(O, w).catch((I) => {
|
|
2082
|
+
F("Transition enter error (appear):", I);
|
|
2083
|
+
}), O !== L && e.contains(O) && e.insertBefore(O, L);
|
|
2038
2084
|
} else
|
|
2039
|
-
|
|
2040
|
-
|
|
2085
|
+
O = Y(E, n), e.insertBefore(O, L), A.add(O), w && O instanceof HTMLElement && x && _e(O, w).catch((M) => {
|
|
2086
|
+
F("Transition enter error:", M);
|
|
2041
2087
|
});
|
|
2042
|
-
|
|
2088
|
+
L = O.nextSibling;
|
|
2043
2089
|
}
|
|
2044
|
-
for (const
|
|
2045
|
-
!
|
|
2046
|
-
e.contains(
|
|
2047
|
-
}).catch((
|
|
2048
|
-
|
|
2049
|
-
}) : e.removeChild(
|
|
2090
|
+
for (const E of _)
|
|
2091
|
+
!A.has(E) && e.contains(E) && (w && E instanceof HTMLElement && x ? Ge(E, w).then(() => {
|
|
2092
|
+
e.contains(E) && e.removeChild(E);
|
|
2093
|
+
}).catch((O) => {
|
|
2094
|
+
F("Transition leave error:", O), e.contains(E) && e.removeChild(E);
|
|
2095
|
+
}) : e.removeChild(E));
|
|
2050
2096
|
} else {
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2053
|
-
|
|
2097
|
+
const T = Math.min(
|
|
2098
|
+
g.length,
|
|
2099
|
+
y.length
|
|
2054
2100
|
);
|
|
2055
|
-
for (let
|
|
2056
|
-
const
|
|
2057
|
-
|
|
2101
|
+
for (let $ = 0; $ < T; $++) {
|
|
2102
|
+
const v = g[$], A = y[$], L = Oe(_[$], v, A, n);
|
|
2103
|
+
L !== _[$] && (e.insertBefore(L, _[$]), e.removeChild(_[$]));
|
|
2058
2104
|
}
|
|
2059
|
-
for (let
|
|
2060
|
-
const
|
|
2061
|
-
e.insertBefore(
|
|
2062
|
-
|
|
2105
|
+
for (let $ = T; $ < y.length; $++) {
|
|
2106
|
+
const v = Y(y[$], n);
|
|
2107
|
+
e.insertBefore(v, h), w && v instanceof HTMLElement && x && _e(v, w).catch((A) => {
|
|
2108
|
+
F("Transition enter error:", A);
|
|
2063
2109
|
});
|
|
2064
2110
|
}
|
|
2065
|
-
for (let
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2068
|
-
e.contains(
|
|
2069
|
-
}).catch((
|
|
2070
|
-
|
|
2071
|
-
}) : e.removeChild(
|
|
2111
|
+
for (let $ = T; $ < _.length; $++) {
|
|
2112
|
+
const v = _[$];
|
|
2113
|
+
w && v instanceof HTMLElement && x ? Ge(v, w).then(() => {
|
|
2114
|
+
e.contains(v) && e.removeChild(v);
|
|
2115
|
+
}).catch((A) => {
|
|
2116
|
+
F("Transition leave error:", A), e.contains(v) && e.removeChild(v);
|
|
2117
|
+
}) : e.removeChild(v);
|
|
2072
2118
|
}
|
|
2073
2119
|
}
|
|
2074
2120
|
}
|
|
2075
|
-
for (const
|
|
2076
|
-
let
|
|
2077
|
-
if (
|
|
2078
|
-
const l =
|
|
2079
|
-
let
|
|
2080
|
-
const C = Array.isArray(
|
|
2081
|
-
if (
|
|
2082
|
-
e.insertBefore(
|
|
2083
|
-
const
|
|
2084
|
-
for (const
|
|
2085
|
-
const
|
|
2086
|
-
e.insertBefore(
|
|
2087
|
-
|
|
2121
|
+
for (const p of r) {
|
|
2122
|
+
let h;
|
|
2123
|
+
if (p.tag === "#anchor") {
|
|
2124
|
+
const l = p.key, y = `${l}:start`, w = `${l}:end`;
|
|
2125
|
+
let x = b.get(y), _ = b.get(w);
|
|
2126
|
+
const C = Array.isArray(p.children) ? p.children : [];
|
|
2127
|
+
if (x || (x = document.createTextNode(""), x.key = y), _ || (_ = document.createTextNode(""), _.key = w), p._startNode = x, p._endNode = _, !e.contains(x) || !e.contains(_)) {
|
|
2128
|
+
e.insertBefore(x, d);
|
|
2129
|
+
const g = p._transition, T = !(g && g.state === "visible" && C.length > 0) || g.appear;
|
|
2130
|
+
for (const $ of C) {
|
|
2131
|
+
const v = Y($, n);
|
|
2132
|
+
e.insertBefore(v, d), g && v instanceof HTMLElement && T && _e(v, g).catch((A) => {
|
|
2133
|
+
F("Transition enter error:", A);
|
|
2088
2134
|
});
|
|
2089
2135
|
}
|
|
2090
|
-
e.insertBefore(_,
|
|
2136
|
+
e.insertBefore(_, d);
|
|
2091
2137
|
} else {
|
|
2092
|
-
const
|
|
2138
|
+
const g = p._transition, T = f.get(l)?._transition, $ = T && T.state !== g?.state, v = g && g.state === "visible" && C.length > 0 && !$, A = $ || !v || g?.appear === !0;
|
|
2093
2139
|
u(
|
|
2094
|
-
|
|
2140
|
+
x,
|
|
2095
2141
|
_,
|
|
2096
|
-
|
|
2142
|
+
f.get(l)?.children,
|
|
2097
2143
|
C,
|
|
2098
|
-
|
|
2099
|
-
|
|
2144
|
+
g,
|
|
2145
|
+
A
|
|
2100
2146
|
);
|
|
2101
2147
|
}
|
|
2102
|
-
x
|
|
2148
|
+
k(x, _), d = _.nextSibling;
|
|
2103
2149
|
continue;
|
|
2104
2150
|
}
|
|
2105
|
-
if (
|
|
2106
|
-
const l =
|
|
2107
|
-
|
|
2108
|
-
b.get(
|
|
2151
|
+
if (p.key != null && b.has(p.key)) {
|
|
2152
|
+
const l = f.get(p.key);
|
|
2153
|
+
h = Oe(
|
|
2154
|
+
b.get(p.key),
|
|
2109
2155
|
l,
|
|
2110
|
-
|
|
2156
|
+
p,
|
|
2111
2157
|
n,
|
|
2112
2158
|
o
|
|
2113
|
-
),
|
|
2159
|
+
), m.add(h), h !== d && e.contains(h) && (d && !e.contains(d) && (d = null), e.insertBefore(h, d));
|
|
2114
2160
|
} else
|
|
2115
|
-
|
|
2116
|
-
|
|
2161
|
+
h = Y(p, n, o), d && !e.contains(d) && (d = null), e.insertBefore(h, d), m.add(h);
|
|
2162
|
+
d = h.nextSibling;
|
|
2117
2163
|
}
|
|
2118
|
-
for (let
|
|
2119
|
-
const
|
|
2120
|
-
!
|
|
2164
|
+
for (let p = 0; p < s.length; p++) {
|
|
2165
|
+
const h = s[p];
|
|
2166
|
+
!m.has(h) && e.contains(h) && (me(h, o), e.removeChild(h));
|
|
2121
2167
|
}
|
|
2122
2168
|
}
|
|
2123
|
-
function
|
|
2124
|
-
if (t && typeof t != "string" && t.props?.ref && o &&
|
|
2169
|
+
function Oe(e, t, r, n, o) {
|
|
2170
|
+
if (t && typeof t != "string" && t.props?.ref && o && me(e, o), t === r) return e;
|
|
2125
2171
|
if (typeof r == "string") {
|
|
2126
2172
|
if (e.nodeType === Node.TEXT_NODE)
|
|
2127
2173
|
return e.textContent !== r && (e.textContent = r), e;
|
|
@@ -2131,81 +2177,81 @@ function Te(e, t, r, n, o) {
|
|
|
2131
2177
|
}
|
|
2132
2178
|
}
|
|
2133
2179
|
if (r && typeof r != "string" && r.tag === "#anchor") {
|
|
2134
|
-
const s = r, c = Array.isArray(s.children) ? s.children : [], a = s._startNode ?? document.createTextNode(""),
|
|
2135
|
-
s.key != null && (a.key = `${s.key}:start`,
|
|
2180
|
+
const s = r, c = Array.isArray(s.children) ? s.children : [], a = s._startNode ?? document.createTextNode(""), f = s._endNode ?? document.createTextNode("");
|
|
2181
|
+
s.key != null && (a.key = `${s.key}:start`, f.key = `${s.key}:end`), s._startNode = a, s._endNode = f;
|
|
2136
2182
|
const b = document.createDocumentFragment();
|
|
2137
2183
|
b.appendChild(a);
|
|
2138
|
-
for (const
|
|
2139
|
-
const
|
|
2140
|
-
b.appendChild(
|
|
2184
|
+
for (const m of c) {
|
|
2185
|
+
const d = Y(m, n);
|
|
2186
|
+
b.appendChild(d);
|
|
2141
2187
|
}
|
|
2142
|
-
return b.appendChild(
|
|
2188
|
+
return b.appendChild(f), e.parentNode?.replaceChild(b, e), a;
|
|
2143
2189
|
}
|
|
2144
2190
|
if (!r) {
|
|
2145
|
-
|
|
2191
|
+
me(e, o);
|
|
2146
2192
|
const s = document.createComment("removed");
|
|
2147
2193
|
return e.parentNode?.replaceChild(s, e), s;
|
|
2148
2194
|
}
|
|
2149
2195
|
if (!t || typeof t == "string") {
|
|
2150
|
-
|
|
2151
|
-
const s =
|
|
2152
|
-
return
|
|
2196
|
+
me(e, o);
|
|
2197
|
+
const s = Y(r, n, o);
|
|
2198
|
+
return Te(r, s, o), e.parentNode?.replaceChild(s, e), s;
|
|
2153
2199
|
}
|
|
2154
2200
|
if (r.tag === "#anchor") {
|
|
2155
2201
|
const s = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), a = r._endNode ?? document.createTextNode("");
|
|
2156
2202
|
r.key != null && (c.key = `${r.key}:start`, a.key = `${r.key}:end`), r._startNode = c, r._endNode = a;
|
|
2157
|
-
const
|
|
2158
|
-
|
|
2203
|
+
const f = document.createDocumentFragment();
|
|
2204
|
+
f.appendChild(c);
|
|
2159
2205
|
for (const b of s)
|
|
2160
|
-
|
|
2161
|
-
return
|
|
2206
|
+
f.appendChild(Y(b, n));
|
|
2207
|
+
return f.appendChild(a), e.parentNode?.replaceChild(f, e), c;
|
|
2162
2208
|
}
|
|
2163
2209
|
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
|
|
2164
2210
|
const s = e;
|
|
2165
|
-
return
|
|
2211
|
+
return wt(s, t.props || {}, r.props || {}, n), fn(s, t.children, r.children, n, o), Te(r, s, o), s;
|
|
2166
2212
|
}
|
|
2167
2213
|
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
|
|
2168
2214
|
try {
|
|
2169
2215
|
const c = e;
|
|
2170
|
-
return
|
|
2216
|
+
return wt(c, t.props || {}, r.props || {}, n), Te(r, c, o), c;
|
|
2171
2217
|
} catch {
|
|
2172
2218
|
}
|
|
2173
|
-
|
|
2174
|
-
const i =
|
|
2175
|
-
return
|
|
2219
|
+
me(e, o);
|
|
2220
|
+
const i = Y(r, n, o);
|
|
2221
|
+
return Te(r, i, o), e.parentNode?.replaceChild(i, e), i;
|
|
2176
2222
|
}
|
|
2177
|
-
function
|
|
2223
|
+
function dn(e, t, r, n) {
|
|
2178
2224
|
let o;
|
|
2179
2225
|
Array.isArray(t) ? t.length === 1 ? (o = t[0], o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })) : o = { tag: "div", key: "__root__", children: t } : (o = t, o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })), o && typeof o == "object" && o.tag === "#anchor" && (o = {
|
|
2180
2226
|
tag: "div",
|
|
2181
2227
|
key: "__anchor_root__",
|
|
2182
2228
|
props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
|
|
2183
2229
|
children: [o]
|
|
2184
|
-
}), o =
|
|
2230
|
+
}), o = ut(o, String(o.key ?? "root"));
|
|
2185
2231
|
const i = e._prevVNode ?? null, s = e._prevDom ?? e.firstChild ?? null;
|
|
2186
2232
|
let c;
|
|
2187
|
-
i && s ? typeof i != "string" && typeof o != "string" && i.tag === o.tag && i.key === o.key ? c =
|
|
2233
|
+
i && s ? typeof i != "string" && typeof o != "string" && i.tag === o.tag && i.key === o.key ? c = Oe(s, i, o, r, n) : (c = Y(o, r, n), e.replaceChild(c, s)) : (c = Y(o, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
|
|
2188
2234
|
const a = [];
|
|
2189
|
-
for (let
|
|
2190
|
-
const b = e.childNodes[
|
|
2191
|
-
b !== c && b.nodeName !== "STYLE" && (
|
|
2235
|
+
for (let f = 0; f < e.childNodes.length; f++) {
|
|
2236
|
+
const b = e.childNodes[f];
|
|
2237
|
+
b !== c && b.nodeName !== "STYLE" && (me(b, n), a.push(b));
|
|
2192
2238
|
}
|
|
2193
|
-
a.forEach((
|
|
2239
|
+
a.forEach((f) => e.removeChild(f)), e._prevVNode = o, e._prevDom = c;
|
|
2194
2240
|
}
|
|
2195
2241
|
function Je(e) {
|
|
2196
|
-
if (typeof e == "string") return
|
|
2242
|
+
if (typeof e == "string") return Ee(e);
|
|
2197
2243
|
if (e.tag === "#text")
|
|
2198
|
-
return typeof e.children == "string" ?
|
|
2244
|
+
return typeof e.children == "string" ? Ee(e.children) : "";
|
|
2199
2245
|
if (e.tag === "#anchor")
|
|
2200
2246
|
return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Je).join("");
|
|
2201
2247
|
let t = "";
|
|
2202
|
-
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([o, i]) => ` ${o}="${
|
|
2248
|
+
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([o, i]) => ` ${o}="${Ee(String(i))}"`).join(""));
|
|
2203
2249
|
let r = "";
|
|
2204
|
-
e.props && (r = Object.entries(e.props).filter(([o]) => o !== "attrs" && o !== "directives" && o !== "ref" && o !== "key").map(([o, i]) => ` ${o}="${
|
|
2205
|
-
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Je).join("") : typeof e.children == "string" ?
|
|
2250
|
+
e.props && (r = Object.entries(e.props).filter(([o]) => o !== "attrs" && o !== "directives" && o !== "ref" && o !== "key").map(([o, i]) => ` ${o}="${Ee(String(i))}"`).join(""));
|
|
2251
|
+
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Je).join("") : typeof e.children == "string" ? Ee(e.children) : e.children ? Je(e.children) : "";
|
|
2206
2252
|
return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
|
|
2207
2253
|
}
|
|
2208
|
-
function
|
|
2254
|
+
function pn(e, ...t) {
|
|
2209
2255
|
let r = "";
|
|
2210
2256
|
for (let n = 0; n < e.length; n++)
|
|
2211
2257
|
r += e[n], n < t.length && (r += t[n]);
|
|
@@ -2214,14 +2260,14 @@ function dn(e, ...t) {
|
|
|
2214
2260
|
function Dt(e) {
|
|
2215
2261
|
return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
|
|
2216
2262
|
}
|
|
2217
|
-
let
|
|
2218
|
-
function
|
|
2219
|
-
return
|
|
2263
|
+
let We = null;
|
|
2264
|
+
function vt() {
|
|
2265
|
+
return We || (We = new CSSStyleSheet(), We.replaceSync(Dt(gn))), We;
|
|
2220
2266
|
}
|
|
2221
|
-
function
|
|
2267
|
+
function hn(e) {
|
|
2222
2268
|
return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
|
|
2223
2269
|
}
|
|
2224
|
-
const
|
|
2270
|
+
const gn = pn`
|
|
2225
2271
|
:host,
|
|
2226
2272
|
*,
|
|
2227
2273
|
::before,
|
|
@@ -2332,7 +2378,7 @@ const hn = dn`
|
|
|
2332
2378
|
[hidden] {
|
|
2333
2379
|
display: none;
|
|
2334
2380
|
}
|
|
2335
|
-
`,
|
|
2381
|
+
`, mn = {
|
|
2336
2382
|
// Existing semantic colors
|
|
2337
2383
|
neutral: {
|
|
2338
2384
|
50: "#fafafa",
|
|
@@ -2430,8 +2476,8 @@ const hn = dn`
|
|
|
2430
2476
|
black: { DEFAULT: "#000000" },
|
|
2431
2477
|
transparent: { DEFAULT: "transparent" },
|
|
2432
2478
|
current: { DEFAULT: "currentColor" }
|
|
2433
|
-
},
|
|
2434
|
-
Object.entries(
|
|
2479
|
+
}, Ht = Object.fromEntries(
|
|
2480
|
+
Object.entries(mn).map(([e, t]) => [
|
|
2435
2481
|
e,
|
|
2436
2482
|
Object.fromEntries(
|
|
2437
2483
|
Object.entries(t).map(([r, n]) => [
|
|
@@ -2440,7 +2486,7 @@ const hn = dn`
|
|
|
2440
2486
|
])
|
|
2441
2487
|
)
|
|
2442
2488
|
])
|
|
2443
|
-
),
|
|
2489
|
+
), pe = "0.25rem", yn = {
|
|
2444
2490
|
"3xs": 64,
|
|
2445
2491
|
"2xs": 72,
|
|
2446
2492
|
xs: 80,
|
|
@@ -2485,7 +2531,7 @@ const hn = dn`
|
|
|
2485
2531
|
gap: ["gap"],
|
|
2486
2532
|
"gap-x": ["column-gap"],
|
|
2487
2533
|
"gap-y": ["row-gap"]
|
|
2488
|
-
},
|
|
2534
|
+
}, bn = () => {
|
|
2489
2535
|
const e = {};
|
|
2490
2536
|
e["@container"] = "container-type:inline-size;", [
|
|
2491
2537
|
"block",
|
|
@@ -2609,8 +2655,8 @@ const hn = dn`
|
|
|
2609
2655
|
["text-7xl", "4.5rem", "1"],
|
|
2610
2656
|
["text-8xl", "6rem", "1"],
|
|
2611
2657
|
["text-9xl", "8rem", "1"]
|
|
2612
|
-
].forEach(([a,
|
|
2613
|
-
e[a] = `font-size:${
|
|
2658
|
+
].forEach(([a, f, b]) => {
|
|
2659
|
+
e[a] = `font-size:${f};line-height:${b};`;
|
|
2614
2660
|
}), [
|
|
2615
2661
|
["tracking-tighter", "-0.05em"],
|
|
2616
2662
|
["tracking-tight", "-0.025em"],
|
|
@@ -2618,8 +2664,8 @@ const hn = dn`
|
|
|
2618
2664
|
["tracking-wide", "0.025em"],
|
|
2619
2665
|
["tracking-wider", "0.05em"],
|
|
2620
2666
|
["tracking-widest", "0.1em"]
|
|
2621
|
-
].forEach(([a,
|
|
2622
|
-
e[a] = `letter-spacing:${
|
|
2667
|
+
].forEach(([a, f]) => {
|
|
2668
|
+
e[a] = `letter-spacing:${f};`;
|
|
2623
2669
|
}), [
|
|
2624
2670
|
["leading-3", "0.75rem"],
|
|
2625
2671
|
["leading-4", "1rem"],
|
|
@@ -2635,13 +2681,13 @@ const hn = dn`
|
|
|
2635
2681
|
["leading-normal", "1.5"],
|
|
2636
2682
|
["leading-relaxed", "1.625"],
|
|
2637
2683
|
["leading-loose", "2"]
|
|
2638
|
-
].forEach(([a,
|
|
2639
|
-
e[a] = `line-height:${
|
|
2684
|
+
].forEach(([a, f]) => {
|
|
2685
|
+
e[a] = `line-height:${f};`;
|
|
2640
2686
|
});
|
|
2641
2687
|
const i = [0, 1, 2, 4, 6, 8];
|
|
2642
2688
|
for (const a of i) {
|
|
2643
|
-
const
|
|
2644
|
-
e[`border-${a}`] = `border-width:${
|
|
2689
|
+
const f = `${a}px`;
|
|
2690
|
+
e[`border-${a}`] = `border-width:${f};`, e[`border-t-${a}`] = `border-top-width:${f};`, e[`border-r-${a}`] = `border-right-width:${f};`, e[`border-b-${a}`] = `border-bottom-width:${f};`, e[`border-l-${a}`] = `border-left-width:${f};`, e[`border-x-${a}`] = `border-left-width:${f};border-right-width:${f};`, e[`border-y-${a}`] = `border-top-width:${f};border-bottom-width:${f};`;
|
|
2645
2691
|
}
|
|
2646
2692
|
Object.assign(e, {
|
|
2647
2693
|
"font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
|
|
@@ -2672,8 +2718,8 @@ const hn = dn`
|
|
|
2672
2718
|
"4xl": 32,
|
|
2673
2719
|
full: 9999
|
|
2674
2720
|
};
|
|
2675
|
-
for (const [a,
|
|
2676
|
-
const b =
|
|
2721
|
+
for (const [a, f] of Object.entries(s)) {
|
|
2722
|
+
const b = f === 9999 ? "9999px" : `${f / 16}rem`;
|
|
2677
2723
|
e[`rounded-${a}`] = `border-radius:${b};`, e[`rounded-t-${a}`] = `border-top-left-radius:${b};border-top-right-radius:${b};`, e[`rounded-r-${a}`] = `border-top-right-radius:${b};border-bottom-right-radius:${b};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${b};border-bottom-right-radius:${b};`, e[`rounded-l-${a}`] = `border-top-left-radius:${b};border-bottom-left-radius:${b};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${b};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${b};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${b};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${b};`;
|
|
2678
2724
|
}
|
|
2679
2725
|
Object.assign(e, {
|
|
@@ -2740,8 +2786,8 @@ const hn = dn`
|
|
|
2740
2786
|
"mx-auto": "margin-inline:auto;",
|
|
2741
2787
|
"my-auto": "margin-block:auto;"
|
|
2742
2788
|
});
|
|
2743
|
-
for (const [a,
|
|
2744
|
-
e[`max-w-${a}`] = `max-width:calc(${
|
|
2789
|
+
for (const [a, f] of Object.entries(yn))
|
|
2790
|
+
e[`max-w-${a}`] = `max-width:calc(${pe} * ${f});`, e[`min-w-${a}`] = `min-width:calc(${pe} * ${f});`, e[`w-${a}`] = `width:calc(${pe} * ${f});`, e[`max-h-${a}`] = `max-height:calc(${pe} * ${f});`, e[`min-h-${a}`] = `min-height:calc(${pe} * ${f});`, e[`h-${a}`] = `height:calc(${pe} * ${f});`;
|
|
2745
2791
|
Object.assign(e, {
|
|
2746
2792
|
transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
|
|
2747
2793
|
"transition-none": "transition-property:none;",
|
|
@@ -2858,7 +2904,7 @@ const hn = dn`
|
|
|
2858
2904
|
"bg-conic-at-l": "background-image:conic-gradient(from 0deg at left, var(--tw-gradient-stops));",
|
|
2859
2905
|
"bg-conic-at-tl": "background-image:conic-gradient(from 0deg at top left, var(--tw-gradient-stops));"
|
|
2860
2906
|
}), e;
|
|
2861
|
-
},
|
|
2907
|
+
}, Ye = bn();
|
|
2862
2908
|
function Q(e, t) {
|
|
2863
2909
|
let r = 0;
|
|
2864
2910
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -2870,7 +2916,7 @@ function Q(e, t) {
|
|
|
2870
2916
|
}
|
|
2871
2917
|
return e + t;
|
|
2872
2918
|
}
|
|
2873
|
-
const
|
|
2919
|
+
const wn = {
|
|
2874
2920
|
before: (e, t) => `${e}::before{${t}}`,
|
|
2875
2921
|
after: (e, t) => `${e}::after{${t}}`,
|
|
2876
2922
|
hover: (e, t) => `${Q(e, ":hover")}{${t}}`,
|
|
@@ -2893,14 +2939,14 @@ const bn = {
|
|
|
2893
2939
|
"peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
|
|
2894
2940
|
"peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
|
|
2895
2941
|
"peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
|
|
2896
|
-
},
|
|
2942
|
+
}, Qe = {
|
|
2897
2943
|
sm: "(min-width:640px)",
|
|
2898
2944
|
md: "(min-width:768px)",
|
|
2899
2945
|
lg: "(min-width:1024px)",
|
|
2900
2946
|
xl: "(min-width:1280px)",
|
|
2901
2947
|
"2xl": "(min-width:1536px)",
|
|
2902
2948
|
dark: "(prefers-color-scheme: dark)"
|
|
2903
|
-
},
|
|
2949
|
+
}, xt = {
|
|
2904
2950
|
xs: "(min-width:20rem)",
|
|
2905
2951
|
sm: "(min-width:24rem)",
|
|
2906
2952
|
md: "(min-width:28rem)",
|
|
@@ -2931,22 +2977,40 @@ function nt(e) {
|
|
|
2931
2977
|
const o = r.slice(0, n), i = r.slice(n + 1);
|
|
2932
2978
|
if (!Xe[o]) return null;
|
|
2933
2979
|
if (i.includes("/")) {
|
|
2934
|
-
const [a,
|
|
2935
|
-
if (Number.isNaN(a) || Number.isNaN(
|
|
2980
|
+
const [a, f] = i.split("/").map((m) => parseFloat(m));
|
|
2981
|
+
if (Number.isNaN(a) || Number.isNaN(f) || f === 0)
|
|
2936
2982
|
return null;
|
|
2937
|
-
const b = a /
|
|
2938
|
-
return Xe[o].map((
|
|
2983
|
+
const b = a / f * 100;
|
|
2984
|
+
return Xe[o].map((m) => `${m}:${b}%;`).join("");
|
|
2939
2985
|
}
|
|
2940
2986
|
const s = parseFloat(i);
|
|
2941
2987
|
if (Number.isNaN(s)) return null;
|
|
2942
2988
|
const c = t ? "-" : "";
|
|
2943
|
-
return Xe[o].map((a) => `${a}:calc(${c}${
|
|
2989
|
+
return Xe[o].map((a) => `${a}:calc(${c}${pe} * ${s});`).join("");
|
|
2990
|
+
}
|
|
2991
|
+
function rt(e) {
|
|
2992
|
+
const t = e.startsWith("-"), n = (t ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
|
|
2993
|
+
if (!n) return null;
|
|
2994
|
+
const [, o, i] = n, s = o === "x";
|
|
2995
|
+
if (i === "reverse")
|
|
2996
|
+
return s ? "--tw-space-x-reverse:1;" : "--tw-space-y-reverse:1;";
|
|
2997
|
+
if (i.includes("/")) {
|
|
2998
|
+
const [b, m] = i.split("/").map((u) => parseFloat(u));
|
|
2999
|
+
if (Number.isNaN(b) || Number.isNaN(m) || m === 0)
|
|
3000
|
+
return null;
|
|
3001
|
+
const d = b / m * 100, k = t ? "-" : "";
|
|
3002
|
+
return s ? `--tw-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${k}${d}% * calc(1 - var(--tw-space-x-reverse)));margin-inline-end:calc(${k}${d}% * var(--tw-space-x-reverse));}` : `--tw-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${k}${d}% * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(${k}${d}% * var(--tw-space-y-reverse));}`;
|
|
3003
|
+
}
|
|
3004
|
+
const c = parseFloat(i);
|
|
3005
|
+
if (Number.isNaN(c)) return null;
|
|
3006
|
+
const f = `calc(${t ? "-" : ""}${pe} * ${c})`;
|
|
3007
|
+
return s ? `--tw-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${f} * calc(1 - var(--tw-space-x-reverse)));margin-inline-end:calc(${f} * var(--tw-space-x-reverse));}` : `--tw-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${f} * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(${f} * var(--tw-space-y-reverse));}`;
|
|
2944
3008
|
}
|
|
2945
3009
|
function kt(e) {
|
|
2946
3010
|
const t = e.replace("#", ""), r = parseInt(t, 16);
|
|
2947
3011
|
return `${r >> 16 & 255} ${r >> 8 & 255} ${r & 255}`;
|
|
2948
3012
|
}
|
|
2949
|
-
const
|
|
3013
|
+
const vn = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, xn = {
|
|
2950
3014
|
bg: "background-color",
|
|
2951
3015
|
decoration: "text-decoration-color",
|
|
2952
3016
|
text: "color",
|
|
@@ -2958,22 +3022,22 @@ const wn = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
|
|
|
2958
3022
|
stroke: "stroke"
|
|
2959
3023
|
};
|
|
2960
3024
|
function kn(e) {
|
|
2961
|
-
const t =
|
|
3025
|
+
const t = vn.exec(e);
|
|
2962
3026
|
if (!t) return null;
|
|
2963
|
-
const [, r, n, o = "DEFAULT"] = t, i =
|
|
3027
|
+
const [, r, n, o = "DEFAULT"] = t, i = Ht[n]?.[o];
|
|
2964
3028
|
if (!i) return null;
|
|
2965
3029
|
if (r === "shadow") return `--ce-shadow-color:${i};`;
|
|
2966
|
-
const s =
|
|
3030
|
+
const s = xn[r];
|
|
2967
3031
|
return s ? `${s}:${i};` : null;
|
|
2968
3032
|
}
|
|
2969
|
-
function
|
|
3033
|
+
function $n(e) {
|
|
2970
3034
|
const t = e.indexOf("/");
|
|
2971
3035
|
if (t === -1) return { base: e };
|
|
2972
3036
|
const r = e.slice(0, t), n = e.slice(t + 1), o = parseInt(n, 10);
|
|
2973
3037
|
return isNaN(o) || o < 0 || o > 100 ? { base: r } : { base: r, opacity: o / 100 };
|
|
2974
3038
|
}
|
|
2975
|
-
function
|
|
2976
|
-
const { base: t, opacity: r } =
|
|
3039
|
+
function ot(e) {
|
|
3040
|
+
const { base: t, opacity: r } = $n(e), n = kn(t);
|
|
2977
3041
|
if (n && r !== void 0) {
|
|
2978
3042
|
const i = /#([0-9a-f]{6})/i.exec(n);
|
|
2979
3043
|
if (i) {
|
|
@@ -2995,10 +3059,10 @@ function rt(e) {
|
|
|
2995
3059
|
}
|
|
2996
3060
|
return o;
|
|
2997
3061
|
}
|
|
2998
|
-
function
|
|
3062
|
+
function it(e) {
|
|
2999
3063
|
const t = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
|
|
3000
3064
|
if (!t) return null;
|
|
3001
|
-
const [, r, n, o = "DEFAULT"] = t, i =
|
|
3065
|
+
const [, r, n, o = "DEFAULT"] = t, i = Ht[n]?.[o];
|
|
3002
3066
|
if (!i) return null;
|
|
3003
3067
|
switch (r) {
|
|
3004
3068
|
case "from":
|
|
@@ -3011,7 +3075,7 @@ function ot(e) {
|
|
|
3011
3075
|
return null;
|
|
3012
3076
|
}
|
|
3013
3077
|
}
|
|
3014
|
-
function
|
|
3078
|
+
function st(e) {
|
|
3015
3079
|
const t = /^opacity-(\d{1,3})$/.exec(e);
|
|
3016
3080
|
if (!t) return null;
|
|
3017
3081
|
const r = parseInt(t[1], 10);
|
|
@@ -3022,8 +3086,8 @@ function Ke(e) {
|
|
|
3022
3086
|
const s = e.slice(1, -1).trim(), c = s.indexOf(":");
|
|
3023
3087
|
if (c === -1) return null;
|
|
3024
3088
|
const a = s.slice(0, c).trim();
|
|
3025
|
-
let
|
|
3026
|
-
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (
|
|
3089
|
+
let f = s.slice(c + 1).trim();
|
|
3090
|
+
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (f = f.replace(/_/g, " "), f = f.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), f = f.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${f};`) : null;
|
|
3027
3091
|
}
|
|
3028
3092
|
const t = e.indexOf("-[");
|
|
3029
3093
|
if (t <= 0 || !e.endsWith("]")) return null;
|
|
@@ -3078,7 +3142,7 @@ function Ke(e) {
|
|
|
3078
3142
|
const i = o[r] ?? r.replace(/_/g, "-");
|
|
3079
3143
|
return i && n ? `${i}:${n};` : null;
|
|
3080
3144
|
}
|
|
3081
|
-
function
|
|
3145
|
+
function Cn(e) {
|
|
3082
3146
|
if (e.startsWith("[") && e.endsWith("]")) {
|
|
3083
3147
|
const r = e.slice(1, -1);
|
|
3084
3148
|
return r.includes("&") ? r : e;
|
|
@@ -3090,10 +3154,10 @@ function $n(e) {
|
|
|
3090
3154
|
}
|
|
3091
3155
|
return null;
|
|
3092
3156
|
}
|
|
3093
|
-
function
|
|
3157
|
+
function $t(e) {
|
|
3094
3158
|
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
3095
3159
|
}
|
|
3096
|
-
function
|
|
3160
|
+
function En(e) {
|
|
3097
3161
|
const t = /class\s*=\s*(['"])([\s\S]*?)\1/g, r = [];
|
|
3098
3162
|
let n;
|
|
3099
3163
|
for (; n = t.exec(e); ) {
|
|
@@ -3102,31 +3166,31 @@ function Cn(e) {
|
|
|
3102
3166
|
}
|
|
3103
3167
|
return r;
|
|
3104
3168
|
}
|
|
3105
|
-
const
|
|
3169
|
+
const Ae = /* @__PURE__ */ new Map(), _n = 16, Ct = 1e3;
|
|
3106
3170
|
function It(e) {
|
|
3107
|
-
const t = Date.now(), r =
|
|
3108
|
-
if (r && t - r.timestamp <
|
|
3171
|
+
const t = Date.now(), r = Ae.get(e);
|
|
3172
|
+
if (r && t - r.timestamp < _n)
|
|
3109
3173
|
return r.css;
|
|
3110
|
-
const n =
|
|
3174
|
+
const n = En(e);
|
|
3111
3175
|
if (!n.length) return "";
|
|
3112
|
-
const o = new Set(n), i = [[], [], [], []], s = {}, c = (
|
|
3113
|
-
const l =
|
|
3176
|
+
const o = new Set(n), i = [[], [], [], []], s = {}, c = (p, h = !1) => {
|
|
3177
|
+
const l = h ? `dark|${p}` : p;
|
|
3114
3178
|
if (l in s) return s[l];
|
|
3115
|
-
const
|
|
3116
|
-
return s[l] =
|
|
3117
|
-
}, a = (
|
|
3118
|
-
const
|
|
3119
|
-
(
|
|
3120
|
-
),
|
|
3121
|
-
return
|
|
3122
|
-
},
|
|
3123
|
-
const
|
|
3124
|
-
let l = "",
|
|
3125
|
-
for (let
|
|
3126
|
-
const
|
|
3127
|
-
|
|
3179
|
+
const y = m(p, h);
|
|
3180
|
+
return s[l] = y, y;
|
|
3181
|
+
}, a = (p) => {
|
|
3182
|
+
const h = p.some((w) => et.includes(w)), l = p.some(
|
|
3183
|
+
(w) => w.startsWith("@") && (tt.includes(w.slice(1)) || w.match(/^@\[.+\]$/))
|
|
3184
|
+
), y = p.includes("dark");
|
|
3185
|
+
return p.length ? !h && !y && !l ? 1 : y && (h || l) ? 3 : 2 : 0;
|
|
3186
|
+
}, f = (p) => {
|
|
3187
|
+
const h = [];
|
|
3188
|
+
let l = "", y = 0;
|
|
3189
|
+
for (let w = 0; w < p.length; w++) {
|
|
3190
|
+
const x = p[w];
|
|
3191
|
+
x === "[" || x === "(" ? y++ : (x === "]" || x === ")") && y--, x === ":" && y === 0 ? (h.push(l), l = "") : l += x;
|
|
3128
3192
|
}
|
|
3129
|
-
return l &&
|
|
3193
|
+
return l && h.push(l), h;
|
|
3130
3194
|
}, b = {
|
|
3131
3195
|
hover: ":hover",
|
|
3132
3196
|
focus: ":focus",
|
|
@@ -3140,144 +3204,144 @@ function It(e) {
|
|
|
3140
3204
|
even: ":nth-child(even)",
|
|
3141
3205
|
"focus-within": ":focus-within",
|
|
3142
3206
|
"focus-visible": ":focus-visible"
|
|
3143
|
-
},
|
|
3144
|
-
const l =
|
|
3145
|
-
let
|
|
3146
|
-
for (const
|
|
3147
|
-
let
|
|
3148
|
-
if (
|
|
3149
|
-
|
|
3207
|
+
}, m = (p, h = !1) => {
|
|
3208
|
+
const l = f(p);
|
|
3209
|
+
let y = "", w = !1;
|
|
3210
|
+
for (const j of l) {
|
|
3211
|
+
let H = j;
|
|
3212
|
+
if (H.startsWith("!") && (w = !0, H = H.slice(1)), Ye[H] || nt(H) || rt(H) || st(H) || ot(H) || it(H) || Ke(H)) {
|
|
3213
|
+
y = j;
|
|
3150
3214
|
break;
|
|
3151
3215
|
}
|
|
3152
3216
|
}
|
|
3153
|
-
if (!
|
|
3154
|
-
const
|
|
3217
|
+
if (!y) return null;
|
|
3218
|
+
const x = y.replace(/^!/, ""), _ = Ye[x] ?? nt(x) ?? rt(x) ?? st(x) ?? ot(x) ?? it(x) ?? Ke(x);
|
|
3155
3219
|
if (!_) return null;
|
|
3156
|
-
const C = l.indexOf(
|
|
3157
|
-
let
|
|
3158
|
-
|
|
3159
|
-
const
|
|
3160
|
-
let
|
|
3161
|
-
const
|
|
3162
|
-
for (const
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
`.peer:${
|
|
3166
|
-
),
|
|
3167
|
-
|
|
3168
|
-
const
|
|
3169
|
-
let
|
|
3170
|
-
for (const
|
|
3171
|
-
if (
|
|
3220
|
+
const C = l.indexOf(y);
|
|
3221
|
+
let g = C >= 0 ? l.slice(0, C) : [];
|
|
3222
|
+
h && (g = g.filter((j) => j !== "dark"));
|
|
3223
|
+
const S = `.${$t(p)}`, T = w ? _.replace(/;/g, " !important;") : _, $ = "__SUBJECT__";
|
|
3224
|
+
let v = $;
|
|
3225
|
+
const A = [];
|
|
3226
|
+
for (const j of g)
|
|
3227
|
+
j.startsWith("group-") ? (v = `.group:${j.slice(6)} ${v}`, A.push(j)) : j.startsWith("peer-") && (v = v.replace(
|
|
3228
|
+
$,
|
|
3229
|
+
`.peer:${j.slice(5)}~${$}`
|
|
3230
|
+
), A.push(j));
|
|
3231
|
+
g = g.filter((j) => !A.includes(j));
|
|
3232
|
+
const L = [], E = [];
|
|
3233
|
+
let O = null;
|
|
3234
|
+
for (const j of g) {
|
|
3235
|
+
if (j === "dark" || et.includes(j) || j.startsWith("@") && (tt.includes(j.slice(1)) || j.match(/^@\[.+\]$/)))
|
|
3172
3236
|
continue;
|
|
3173
|
-
const
|
|
3174
|
-
if (
|
|
3175
|
-
|
|
3237
|
+
const H = Cn(j);
|
|
3238
|
+
if (H) {
|
|
3239
|
+
O = H;
|
|
3176
3240
|
continue;
|
|
3177
3241
|
}
|
|
3178
|
-
const
|
|
3179
|
-
if (
|
|
3180
|
-
|
|
3242
|
+
const B = b[j];
|
|
3243
|
+
if (B) {
|
|
3244
|
+
O ? E.push(B) : L.push(B);
|
|
3181
3245
|
continue;
|
|
3182
3246
|
}
|
|
3183
|
-
const
|
|
3184
|
-
typeof
|
|
3247
|
+
const Z = wn[j];
|
|
3248
|
+
typeof Z == "function" && (v = Z(v, T).split("{")[0]);
|
|
3185
3249
|
}
|
|
3186
|
-
const
|
|
3187
|
-
function
|
|
3188
|
-
if (!
|
|
3189
|
-
let
|
|
3190
|
-
if (
|
|
3191
|
-
let
|
|
3192
|
-
for (;
|
|
3193
|
-
for (;
|
|
3194
|
-
const
|
|
3195
|
-
if (
|
|
3196
|
-
return
|
|
3250
|
+
const M = L.join(""), I = E.join("");
|
|
3251
|
+
function ue(j, H) {
|
|
3252
|
+
if (!H) return j;
|
|
3253
|
+
let B = 0, Z = 0;
|
|
3254
|
+
if (j.length && (j[0] === ">" || j[0] === "+" || j[0] === "~" || j[0] === " ")) {
|
|
3255
|
+
let z = 1;
|
|
3256
|
+
for (; z < j.length && j[z] === " "; ) z++;
|
|
3257
|
+
for (; z < j.length; z++) {
|
|
3258
|
+
const G = j[z];
|
|
3259
|
+
if (G === "[" ? B++ : G === "]" && B > 0 ? B-- : G === "(" ? Z++ : G === ")" && Z > 0 && Z--, B === 0 && Z === 0 && (j[z] === ">" || j[z] === "+" || j[z] === "~" || j[z] === " "))
|
|
3260
|
+
return j.slice(0, z) + H + j.slice(z);
|
|
3197
3261
|
}
|
|
3198
|
-
return
|
|
3262
|
+
return j + H;
|
|
3199
3263
|
}
|
|
3200
|
-
for (let
|
|
3201
|
-
const
|
|
3202
|
-
if (
|
|
3203
|
-
return
|
|
3264
|
+
for (let z = 0; z < j.length; z++) {
|
|
3265
|
+
const G = j[z];
|
|
3266
|
+
if (G === "[" ? B++ : G === "]" && B > 0 ? B-- : G === "(" ? Z++ : G === ")" && Z > 0 && Z--, B === 0 && Z === 0 && (G === ">" || G === "+" || G === "~" || G === " "))
|
|
3267
|
+
return j.slice(0, z) + H + j.slice(z);
|
|
3204
3268
|
}
|
|
3205
|
-
return
|
|
3269
|
+
return j + H;
|
|
3206
3270
|
}
|
|
3207
|
-
if (
|
|
3208
|
-
if (
|
|
3209
|
-
const
|
|
3210
|
-
if (
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3271
|
+
if (O)
|
|
3272
|
+
if (O.includes("&")) {
|
|
3273
|
+
const j = O.indexOf("&"), H = O.slice(0, j), B = O.slice(j + 1), Z = $ + M;
|
|
3274
|
+
if (L.length === 0)
|
|
3275
|
+
v = v.replace(
|
|
3276
|
+
$,
|
|
3277
|
+
H + Z + I + B
|
|
3214
3278
|
);
|
|
3215
3279
|
else {
|
|
3216
|
-
const
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3280
|
+
const z = ue(B, I);
|
|
3281
|
+
v = v.replace(
|
|
3282
|
+
$,
|
|
3283
|
+
H + Z + z
|
|
3220
3284
|
);
|
|
3221
3285
|
}
|
|
3222
3286
|
} else
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
`${
|
|
3226
|
-
),
|
|
3287
|
+
v = v.replace(
|
|
3288
|
+
$,
|
|
3289
|
+
`${O}${$ + M}`
|
|
3290
|
+
), I && (v = v.replace($, `${$}${I}`));
|
|
3227
3291
|
else
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3292
|
+
v = v.replace(
|
|
3293
|
+
$,
|
|
3294
|
+
$ + M + I
|
|
3231
3295
|
);
|
|
3232
|
-
|
|
3233
|
-
let
|
|
3234
|
-
const
|
|
3235
|
-
(
|
|
3236
|
-
),
|
|
3237
|
-
(
|
|
3238
|
-
), ie =
|
|
3296
|
+
v = v.replace(new RegExp($, "g"), S);
|
|
3297
|
+
let D = `${v}{${T}}`;
|
|
3298
|
+
const N = g.filter(
|
|
3299
|
+
(j) => et.includes(j)
|
|
3300
|
+
), q = g.filter(
|
|
3301
|
+
(j) => j.startsWith("@") && (tt.includes(j.slice(1)) || j.match(/^@\[.+\]$/))
|
|
3302
|
+
), ie = N.length ? N[N.length - 1] : null, fe = q.length ? q[q.length - 1] : null, K = g.includes("dark");
|
|
3239
3303
|
let ne = "", ce = "";
|
|
3240
|
-
if (
|
|
3241
|
-
if (
|
|
3242
|
-
const
|
|
3243
|
-
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(
|
|
3304
|
+
if (K && ie ? ne = `@media (prefers-color-scheme: dark) and ${Qe[ie]}` : K ? ne = "@media (prefers-color-scheme: dark)" : ie && (ne = `@media ${Qe[ie]}`), fe)
|
|
3305
|
+
if (fe.startsWith("@[") && fe.endsWith("]")) {
|
|
3306
|
+
const j = fe.slice(2, -1);
|
|
3307
|
+
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(j))
|
|
3244
3308
|
return null;
|
|
3245
|
-
ce = `@container (min-width:${
|
|
3309
|
+
ce = `@container (min-width:${j})`;
|
|
3246
3310
|
} else {
|
|
3247
|
-
const
|
|
3248
|
-
ce = `@container ${
|
|
3311
|
+
const j = fe.slice(1);
|
|
3312
|
+
ce = `@container ${xt[j] || `(min-width:${j})`}`;
|
|
3249
3313
|
}
|
|
3250
|
-
return ne && ce ?
|
|
3314
|
+
return ne && ce ? D = `${ne}${ce}{${D}}` : ne ? D = `${ne}{${D}}` : ce && (D = `${ce}{${D}}`), D;
|
|
3251
3315
|
};
|
|
3252
|
-
for (const
|
|
3253
|
-
const
|
|
3254
|
-
(C) =>
|
|
3316
|
+
for (const p of o) {
|
|
3317
|
+
const h = f(p), l = h.find(
|
|
3318
|
+
(C) => Ye[C.replace(/^!/, "")] || nt(C.replace(/^!/, "")) || rt(C.replace(/^!/, "")) || st(C.replace(/^!/, "")) || ot(C.replace(/^!/, "")) || it(C.replace(/^!/, "")) || Ke(C.replace(/^!/, ""))
|
|
3255
3319
|
);
|
|
3256
3320
|
if (!l) continue;
|
|
3257
|
-
const
|
|
3258
|
-
_ && i[
|
|
3259
|
-
}
|
|
3260
|
-
const
|
|
3261
|
-
for (const
|
|
3262
|
-
if (
|
|
3263
|
-
if (i.flat().join("").includes(`.${
|
|
3264
|
-
const l = c(
|
|
3321
|
+
const y = h.indexOf(l), w = y >= 0 ? h.slice(0, y) : [], x = a(w), _ = c(p);
|
|
3322
|
+
_ && i[x].push(_);
|
|
3323
|
+
}
|
|
3324
|
+
const d = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
|
|
3325
|
+
for (const p of o)
|
|
3326
|
+
if (d.test(p)) {
|
|
3327
|
+
if (i.flat().join("").includes(`.${$t(p)}`)) continue;
|
|
3328
|
+
const l = c(p);
|
|
3265
3329
|
l && i[0].push(l);
|
|
3266
3330
|
}
|
|
3267
|
-
const
|
|
3268
|
-
const
|
|
3269
|
-
const
|
|
3331
|
+
const k = (p) => p.sort((h, l) => {
|
|
3332
|
+
const y = (S) => {
|
|
3333
|
+
const T = {
|
|
3270
3334
|
sm: 640,
|
|
3271
3335
|
md: 768,
|
|
3272
3336
|
lg: 1024,
|
|
3273
3337
|
xl: 1280,
|
|
3274
3338
|
"2xl": 1536
|
|
3275
3339
|
};
|
|
3276
|
-
for (const [v
|
|
3277
|
-
if (
|
|
3340
|
+
for (const [$, v] of Object.entries(T))
|
|
3341
|
+
if (S.includes(`@media ${Qe[$]}`)) return v;
|
|
3278
3342
|
return -1;
|
|
3279
|
-
},
|
|
3280
|
-
const
|
|
3343
|
+
}, w = (S) => {
|
|
3344
|
+
const T = {
|
|
3281
3345
|
xs: 320,
|
|
3282
3346
|
// 20rem
|
|
3283
3347
|
sm: 384,
|
|
@@ -3301,36 +3365,36 @@ function It(e) {
|
|
|
3301
3365
|
"7xl": 1280
|
|
3302
3366
|
// 80rem
|
|
3303
3367
|
};
|
|
3304
|
-
for (const [v
|
|
3305
|
-
if (
|
|
3306
|
-
if (
|
|
3307
|
-
const
|
|
3308
|
-
if (
|
|
3309
|
-
const
|
|
3310
|
-
return
|
|
3368
|
+
for (const [$, v] of Object.entries(T))
|
|
3369
|
+
if (S.includes(`@container ${xt[$]}`)) return v;
|
|
3370
|
+
if (S.includes("@container (min-width:")) {
|
|
3371
|
+
const $ = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(S);
|
|
3372
|
+
if ($) {
|
|
3373
|
+
const v = parseFloat($[1]), A = $[2];
|
|
3374
|
+
return A === "rem" || A === "em" ? v * 16 : v;
|
|
3311
3375
|
}
|
|
3312
3376
|
}
|
|
3313
3377
|
return -1;
|
|
3314
|
-
},
|
|
3315
|
-
return
|
|
3378
|
+
}, x = y(h), _ = y(l), C = w(h), g = w(l);
|
|
3379
|
+
return x >= 0 && _ >= 0 && x !== _ ? x - _ : C >= 0 && g >= 0 && C !== g ? C - g : 0;
|
|
3316
3380
|
});
|
|
3317
|
-
i[2] =
|
|
3381
|
+
i[2] = k(i[2]), i[3] = k(i[3]);
|
|
3318
3382
|
const u = i.flat().join("");
|
|
3319
|
-
return
|
|
3383
|
+
return Ae.size >= Ct && Array.from(Ae.keys()).slice(
|
|
3320
3384
|
0,
|
|
3321
|
-
Math.floor(
|
|
3322
|
-
).forEach((
|
|
3385
|
+
Math.floor(Ct / 2)
|
|
3386
|
+
).forEach((h) => Ae.delete(h)), Ae.set(e, { css: u, timestamp: t }), u;
|
|
3323
3387
|
}
|
|
3324
|
-
function
|
|
3325
|
-
return
|
|
3388
|
+
function Ve(e, t) {
|
|
3389
|
+
return U(e ? t : [], "when-block");
|
|
3326
3390
|
}
|
|
3327
|
-
function
|
|
3391
|
+
function Kn(e, t) {
|
|
3328
3392
|
return e.map((r, n) => {
|
|
3329
3393
|
const o = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
|
|
3330
|
-
return
|
|
3394
|
+
return U(t(r, n), `each-${o}`);
|
|
3331
3395
|
});
|
|
3332
3396
|
}
|
|
3333
|
-
function
|
|
3397
|
+
function An() {
|
|
3334
3398
|
const e = [];
|
|
3335
3399
|
return {
|
|
3336
3400
|
when(t, r) {
|
|
@@ -3340,18 +3404,18 @@ function _n() {
|
|
|
3340
3404
|
return e.push([!0, t]), this;
|
|
3341
3405
|
},
|
|
3342
3406
|
done() {
|
|
3343
|
-
return
|
|
3407
|
+
return Sn(...e);
|
|
3344
3408
|
}
|
|
3345
3409
|
};
|
|
3346
3410
|
}
|
|
3347
|
-
function
|
|
3411
|
+
function Sn(...e) {
|
|
3348
3412
|
for (let t = 0; t < e.length; t++) {
|
|
3349
3413
|
const [r, n] = e[t];
|
|
3350
|
-
if (r) return [
|
|
3414
|
+
if (r) return [U(n, `whenChain-branch-${t}`)];
|
|
3351
3415
|
}
|
|
3352
|
-
return [
|
|
3416
|
+
return [U([], "whenChain-empty")];
|
|
3353
3417
|
}
|
|
3354
|
-
function
|
|
3418
|
+
function U(e, t) {
|
|
3355
3419
|
const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
|
|
3356
3420
|
return {
|
|
3357
3421
|
tag: "#anchor",
|
|
@@ -3359,7 +3423,7 @@ function z(e, t) {
|
|
|
3359
3423
|
children: r
|
|
3360
3424
|
};
|
|
3361
3425
|
}
|
|
3362
|
-
const
|
|
3426
|
+
const Me = {
|
|
3363
3427
|
/** Simple fade in/out */
|
|
3364
3428
|
fade: {
|
|
3365
3429
|
enterFrom: "opacity-0",
|
|
@@ -3451,7 +3515,7 @@ const Pe = {
|
|
|
3451
3515
|
leaveTo: "rotate-[90deg] opacity-0"
|
|
3452
3516
|
}
|
|
3453
3517
|
};
|
|
3454
|
-
function
|
|
3518
|
+
function qn(e, t) {
|
|
3455
3519
|
const {
|
|
3456
3520
|
preset: r,
|
|
3457
3521
|
show: n,
|
|
@@ -3460,50 +3524,50 @@ function Kn(e, t) {
|
|
|
3460
3524
|
appear: s = !1,
|
|
3461
3525
|
css: c = !0,
|
|
3462
3526
|
name: a,
|
|
3463
|
-
enterFrom:
|
|
3527
|
+
enterFrom: f,
|
|
3464
3528
|
enterActive: b,
|
|
3465
|
-
enterTo:
|
|
3466
|
-
leaveFrom:
|
|
3467
|
-
leaveActive:
|
|
3529
|
+
enterTo: m,
|
|
3530
|
+
leaveFrom: d,
|
|
3531
|
+
leaveActive: k,
|
|
3468
3532
|
leaveTo: u,
|
|
3469
|
-
onBeforeEnter:
|
|
3470
|
-
onEnter:
|
|
3533
|
+
onBeforeEnter: p,
|
|
3534
|
+
onEnter: h,
|
|
3471
3535
|
onAfterEnter: l,
|
|
3472
|
-
onEnterCancelled:
|
|
3473
|
-
onBeforeLeave:
|
|
3474
|
-
onLeave:
|
|
3536
|
+
onEnterCancelled: y,
|
|
3537
|
+
onBeforeLeave: w,
|
|
3538
|
+
onLeave: x,
|
|
3475
3539
|
onAfterLeave: _,
|
|
3476
3540
|
onLeaveCancelled: C
|
|
3477
3541
|
} = e;
|
|
3478
|
-
let
|
|
3479
|
-
r &&
|
|
3480
|
-
enterFrom:
|
|
3542
|
+
let g;
|
|
3543
|
+
r && Me[r] ? (g = { ...Me[r] }, f && (g.enterFrom = f), b && (g.enterActive = b), m && (g.enterTo = m), d && (g.leaveFrom = d), k && (g.leaveActive = k), u && (g.leaveTo = u)) : g = {
|
|
3544
|
+
enterFrom: f,
|
|
3481
3545
|
enterActive: b,
|
|
3482
|
-
enterTo:
|
|
3483
|
-
leaveFrom:
|
|
3484
|
-
leaveActive:
|
|
3546
|
+
enterTo: m,
|
|
3547
|
+
leaveFrom: d,
|
|
3548
|
+
leaveActive: k,
|
|
3485
3549
|
leaveTo: u
|
|
3486
3550
|
};
|
|
3487
|
-
const
|
|
3488
|
-
return
|
|
3489
|
-
name:
|
|
3490
|
-
classes:
|
|
3551
|
+
const S = a || (r ? `transition-${r}` : "transition"), T = U(n ? t : [], S);
|
|
3552
|
+
return T._transition = {
|
|
3553
|
+
name: S,
|
|
3554
|
+
classes: g,
|
|
3491
3555
|
mode: o,
|
|
3492
3556
|
duration: i,
|
|
3493
3557
|
appear: s,
|
|
3494
3558
|
css: c,
|
|
3495
3559
|
state: n ? "visible" : "hidden",
|
|
3496
3560
|
hooks: {
|
|
3497
|
-
onBeforeEnter:
|
|
3498
|
-
onEnter:
|
|
3561
|
+
onBeforeEnter: p,
|
|
3562
|
+
onEnter: h,
|
|
3499
3563
|
onAfterEnter: l,
|
|
3500
|
-
onEnterCancelled:
|
|
3501
|
-
onBeforeLeave:
|
|
3502
|
-
onLeave:
|
|
3564
|
+
onEnterCancelled: y,
|
|
3565
|
+
onBeforeLeave: w,
|
|
3566
|
+
onLeave: x,
|
|
3503
3567
|
onAfterLeave: _,
|
|
3504
3568
|
onLeaveCancelled: C
|
|
3505
3569
|
}
|
|
3506
|
-
},
|
|
3570
|
+
}, T;
|
|
3507
3571
|
}
|
|
3508
3572
|
function Vn(e, t) {
|
|
3509
3573
|
const {
|
|
@@ -3514,87 +3578,93 @@ function Vn(e, t) {
|
|
|
3514
3578
|
mode: s = "default",
|
|
3515
3579
|
duration: c,
|
|
3516
3580
|
appear: a = !1,
|
|
3517
|
-
css:
|
|
3581
|
+
css: f = !0,
|
|
3518
3582
|
name: b,
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3583
|
+
class: m,
|
|
3584
|
+
style: d,
|
|
3585
|
+
enterFrom: k,
|
|
3586
|
+
enterActive: u,
|
|
3587
|
+
enterTo: p,
|
|
3588
|
+
leaveFrom: h,
|
|
3589
|
+
leaveActive: l,
|
|
3590
|
+
leaveTo: y,
|
|
3591
|
+
onBeforeEnter: w,
|
|
3592
|
+
onEnter: x,
|
|
3593
|
+
onAfterEnter: _,
|
|
3594
|
+
onEnterCancelled: C,
|
|
3595
|
+
onBeforeLeave: g,
|
|
3596
|
+
onLeave: S,
|
|
3597
|
+
onAfterLeave: T,
|
|
3598
|
+
onLeaveCancelled: $
|
|
3533
3599
|
} = e;
|
|
3534
|
-
let
|
|
3535
|
-
o &&
|
|
3536
|
-
enterFrom:
|
|
3537
|
-
enterActive:
|
|
3538
|
-
enterTo:
|
|
3539
|
-
leaveFrom:
|
|
3540
|
-
leaveActive:
|
|
3541
|
-
leaveTo:
|
|
3600
|
+
let v;
|
|
3601
|
+
o && Me[o] ? (v = { ...Me[o] }, k && (v.enterFrom = k), u && (v.enterActive = u), p && (v.enterTo = p), h && (v.leaveFrom = h), l && (v.leaveActive = l), y && (v.leaveTo = y)) : v = {
|
|
3602
|
+
enterFrom: k,
|
|
3603
|
+
enterActive: u,
|
|
3604
|
+
enterTo: p,
|
|
3605
|
+
leaveFrom: h,
|
|
3606
|
+
leaveActive: l,
|
|
3607
|
+
leaveTo: y
|
|
3542
3608
|
};
|
|
3543
|
-
const
|
|
3544
|
-
for (const
|
|
3545
|
-
if (
|
|
3546
|
-
const
|
|
3547
|
-
for (const
|
|
3548
|
-
if (
|
|
3549
|
-
const
|
|
3550
|
-
...
|
|
3551
|
-
key:
|
|
3609
|
+
const A = b || (o ? `transition-group-${o}` : "transition-group"), L = [];
|
|
3610
|
+
for (const E of i ? t : [])
|
|
3611
|
+
if (E && typeof E == "object" && E.tag === "#anchor") {
|
|
3612
|
+
const O = Array.isArray(E.children) ? E.children : [];
|
|
3613
|
+
for (const M of O)
|
|
3614
|
+
if (M && typeof M == "object") {
|
|
3615
|
+
const I = {
|
|
3616
|
+
...M,
|
|
3617
|
+
key: E.key || M.key,
|
|
3552
3618
|
props: {
|
|
3553
|
-
...
|
|
3554
|
-
_anchorKey:
|
|
3619
|
+
...M.props,
|
|
3620
|
+
_anchorKey: E.key
|
|
3555
3621
|
// Preserve original anchor key
|
|
3556
3622
|
}
|
|
3557
3623
|
};
|
|
3558
|
-
|
|
3624
|
+
L.push(I);
|
|
3559
3625
|
} else
|
|
3560
|
-
|
|
3626
|
+
L.push(M);
|
|
3561
3627
|
} else
|
|
3562
|
-
|
|
3628
|
+
L.push(E);
|
|
3563
3629
|
return {
|
|
3564
3630
|
tag: r,
|
|
3565
|
-
children:
|
|
3566
|
-
key:
|
|
3631
|
+
children: L,
|
|
3632
|
+
key: A,
|
|
3567
3633
|
props: {
|
|
3634
|
+
attrs: {
|
|
3635
|
+
...m ? { class: m } : {},
|
|
3636
|
+
...d ? { style: d } : {}
|
|
3637
|
+
},
|
|
3568
3638
|
_transitionGroup: {
|
|
3569
|
-
name:
|
|
3570
|
-
classes:
|
|
3639
|
+
name: A,
|
|
3640
|
+
classes: v,
|
|
3571
3641
|
moveClass: n,
|
|
3572
3642
|
mode: s,
|
|
3573
3643
|
duration: c,
|
|
3574
3644
|
appear: a,
|
|
3575
|
-
css:
|
|
3645
|
+
css: f,
|
|
3576
3646
|
hooks: {
|
|
3577
|
-
onBeforeEnter:
|
|
3578
|
-
onEnter:
|
|
3579
|
-
onAfterEnter:
|
|
3580
|
-
onEnterCancelled:
|
|
3581
|
-
onBeforeLeave:
|
|
3582
|
-
onLeave:
|
|
3583
|
-
onAfterLeave:
|
|
3584
|
-
onLeaveCancelled:
|
|
3647
|
+
onBeforeEnter: w,
|
|
3648
|
+
onEnter: x,
|
|
3649
|
+
onAfterEnter: _,
|
|
3650
|
+
onEnterCancelled: C,
|
|
3651
|
+
onBeforeLeave: g,
|
|
3652
|
+
onLeave: S,
|
|
3653
|
+
onAfterLeave: T,
|
|
3654
|
+
onLeaveCancelled: $
|
|
3585
3655
|
}
|
|
3586
3656
|
}
|
|
3587
3657
|
}
|
|
3588
3658
|
};
|
|
3589
3659
|
}
|
|
3590
|
-
function
|
|
3660
|
+
function Zn(e) {
|
|
3591
3661
|
return { ...e };
|
|
3592
3662
|
}
|
|
3593
3663
|
let ze = null;
|
|
3594
|
-
function
|
|
3664
|
+
function ft() {
|
|
3595
3665
|
if (!ze) {
|
|
3596
3666
|
const e = [];
|
|
3597
|
-
Object.values(
|
|
3667
|
+
Object.values(Me).forEach((n) => {
|
|
3598
3668
|
n.enterFrom && e.push(n.enterFrom), n.enterActive && e.push(n.enterActive), n.enterTo && e.push(n.enterTo), n.leaveFrom && e.push(n.leaveFrom), n.leaveActive && e.push(n.leaveActive), n.leaveTo && e.push(n.leaveTo);
|
|
3599
3669
|
});
|
|
3600
3670
|
const t = `<div class="${e.join(" ")}"></div>`, r = It(t);
|
|
@@ -3602,39 +3672,39 @@ function ut() {
|
|
|
3602
3672
|
}
|
|
3603
3673
|
return ze;
|
|
3604
3674
|
}
|
|
3605
|
-
function
|
|
3606
|
-
|
|
3675
|
+
function Tn() {
|
|
3676
|
+
ft();
|
|
3607
3677
|
}
|
|
3608
|
-
|
|
3609
|
-
const
|
|
3610
|
-
function
|
|
3678
|
+
Tn();
|
|
3679
|
+
const Le = [];
|
|
3680
|
+
function On(e, t, r, n, o, i, s, c) {
|
|
3611
3681
|
if (e) {
|
|
3612
|
-
|
|
3682
|
+
Le.push(r);
|
|
3613
3683
|
try {
|
|
3614
3684
|
const a = t.render(r);
|
|
3615
3685
|
if (a instanceof Promise) {
|
|
3616
|
-
i(!0), a.then((
|
|
3617
|
-
i(!1), s(null),
|
|
3618
|
-
}).catch((
|
|
3619
|
-
i(!1), s(
|
|
3686
|
+
i(!0), a.then((f) => {
|
|
3687
|
+
i(!1), s(null), Et(e, f, r, n, o), c(e.innerHTML);
|
|
3688
|
+
}).catch((f) => {
|
|
3689
|
+
i(!1), s(f);
|
|
3620
3690
|
});
|
|
3621
3691
|
return;
|
|
3622
3692
|
}
|
|
3623
|
-
|
|
3693
|
+
Et(e, a, r, n, o), c(e.innerHTML);
|
|
3624
3694
|
} finally {
|
|
3625
|
-
|
|
3695
|
+
Le.pop();
|
|
3626
3696
|
}
|
|
3627
3697
|
}
|
|
3628
3698
|
}
|
|
3629
|
-
function
|
|
3630
|
-
e && (
|
|
3699
|
+
function Et(e, t, r, n, o) {
|
|
3700
|
+
e && (dn(
|
|
3631
3701
|
e,
|
|
3632
3702
|
Array.isArray(t) ? t : [t],
|
|
3633
3703
|
r,
|
|
3634
3704
|
n
|
|
3635
3705
|
), o(e.innerHTML));
|
|
3636
3706
|
}
|
|
3637
|
-
function
|
|
3707
|
+
function jn(e, t, r, n, o, i, s) {
|
|
3638
3708
|
if (i !== null && clearTimeout(i), Date.now() - t < 16) {
|
|
3639
3709
|
if (o(r + 1), r === 15)
|
|
3640
3710
|
oe(
|
|
@@ -3646,7 +3716,7 @@ function On(e, t, r, n, o, i, s) {
|
|
|
3646
3716
|
Component rendering will be throttled to prevent browser freeze.`
|
|
3647
3717
|
);
|
|
3648
3718
|
else if (r > 20) {
|
|
3649
|
-
|
|
3719
|
+
F(
|
|
3650
3720
|
`🛑 Infinite loop detected in component render:
|
|
3651
3721
|
• This might be caused by state updates during render
|
|
3652
3722
|
• Ensure all state modifications are done in event handlers or effects
|
|
@@ -3656,41 +3726,41 @@ Stopping runaway component render to prevent browser freeze`
|
|
|
3656
3726
|
}
|
|
3657
3727
|
} else
|
|
3658
3728
|
o(0);
|
|
3659
|
-
const
|
|
3729
|
+
const f = setTimeout(() => {
|
|
3660
3730
|
n(Date.now()), e(), s(null);
|
|
3661
3731
|
}, r > 10 ? 100 : 0);
|
|
3662
|
-
s(
|
|
3732
|
+
s(f);
|
|
3663
3733
|
}
|
|
3664
|
-
function
|
|
3734
|
+
function Ln(e, t, r, n, o) {
|
|
3665
3735
|
if (!e) return;
|
|
3666
3736
|
const i = It(r);
|
|
3667
3737
|
if ((!i || i.trim() === "") && !t._computedStyle) {
|
|
3668
|
-
o(null), e.adoptedStyleSheets = [
|
|
3738
|
+
o(null), e.adoptedStyleSheets = [vt(), ft()];
|
|
3669
3739
|
return;
|
|
3670
3740
|
}
|
|
3671
3741
|
let s = "";
|
|
3672
3742
|
t._computedStyle && (s = t._computedStyle);
|
|
3673
|
-
let c =
|
|
3743
|
+
let c = hn(`${s}
|
|
3674
3744
|
${i}
|
|
3675
3745
|
`);
|
|
3676
3746
|
c = Dt(c);
|
|
3677
3747
|
let a = n;
|
|
3678
|
-
a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.cssRules.length > 0 && Array.from(a.cssRules).map((b) => b.cssText).join("") !== c) && a.replaceSync(c), e.adoptedStyleSheets = [
|
|
3748
|
+
a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.cssRules.length > 0 && Array.from(a.cssRules).map((b) => b.cssText).join("") !== c) && a.replaceSync(c), e.adoptedStyleSheets = [vt(), ft(), a], o(a);
|
|
3679
3749
|
}
|
|
3680
|
-
let
|
|
3681
|
-
function
|
|
3682
|
-
|
|
3750
|
+
let W = null;
|
|
3751
|
+
function _t(e) {
|
|
3752
|
+
W = e;
|
|
3683
3753
|
}
|
|
3684
|
-
function
|
|
3685
|
-
|
|
3754
|
+
function At() {
|
|
3755
|
+
W = null;
|
|
3686
3756
|
}
|
|
3687
|
-
function
|
|
3688
|
-
if (!
|
|
3757
|
+
function Gn() {
|
|
3758
|
+
if (!W)
|
|
3689
3759
|
throw new Error("useEmit must be called during component render");
|
|
3690
|
-
const e =
|
|
3760
|
+
const e = W.emit;
|
|
3691
3761
|
return (t, r) => e(t, r);
|
|
3692
3762
|
}
|
|
3693
|
-
function
|
|
3763
|
+
function Ce(e) {
|
|
3694
3764
|
e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
|
|
3695
3765
|
value: {},
|
|
3696
3766
|
writable: !0,
|
|
@@ -3698,34 +3768,34 @@ function $e(e) {
|
|
|
3698
3768
|
configurable: !1
|
|
3699
3769
|
});
|
|
3700
3770
|
}
|
|
3701
|
-
function
|
|
3702
|
-
if (!
|
|
3771
|
+
function Jn(e) {
|
|
3772
|
+
if (!W)
|
|
3703
3773
|
throw new Error("useOnConnected must be called during component render");
|
|
3704
|
-
|
|
3774
|
+
Ce(W), W._hookCallbacks.onConnected = e;
|
|
3705
3775
|
}
|
|
3706
|
-
function
|
|
3707
|
-
if (!
|
|
3776
|
+
function Xn(e) {
|
|
3777
|
+
if (!W)
|
|
3708
3778
|
throw new Error("useOnDisconnected must be called during component render");
|
|
3709
|
-
|
|
3779
|
+
Ce(W), W._hookCallbacks.onDisconnected = e;
|
|
3710
3780
|
}
|
|
3711
|
-
function
|
|
3712
|
-
if (!
|
|
3781
|
+
function Yn(e) {
|
|
3782
|
+
if (!W)
|
|
3713
3783
|
throw new Error("useOnAttributeChanged must be called during component render");
|
|
3714
|
-
|
|
3784
|
+
Ce(W), W._hookCallbacks.onAttributeChanged = e;
|
|
3715
3785
|
}
|
|
3716
3786
|
function Qn(e) {
|
|
3717
|
-
if (!
|
|
3787
|
+
if (!W)
|
|
3718
3788
|
throw new Error("useOnError must be called during component render");
|
|
3719
|
-
|
|
3789
|
+
Ce(W), W._hookCallbacks.onError = e;
|
|
3720
3790
|
}
|
|
3721
|
-
function
|
|
3722
|
-
if (!
|
|
3791
|
+
function er(e) {
|
|
3792
|
+
if (!W)
|
|
3723
3793
|
throw new Error("useProps must be called during component render");
|
|
3724
|
-
|
|
3725
|
-
...
|
|
3794
|
+
Ce(W), W._hookCallbacks.props = {
|
|
3795
|
+
...W._hookCallbacks.props || {},
|
|
3726
3796
|
...e
|
|
3727
3797
|
};
|
|
3728
|
-
const t =
|
|
3798
|
+
const t = W;
|
|
3729
3799
|
try {
|
|
3730
3800
|
const n = Object.keys(e || {});
|
|
3731
3801
|
for (const o of n) {
|
|
@@ -3741,14 +3811,14 @@ function Yn(e) {
|
|
|
3741
3811
|
try {
|
|
3742
3812
|
const a = t && t._host;
|
|
3743
3813
|
if (a) {
|
|
3744
|
-
const
|
|
3814
|
+
const f = te(o), b = a.getAttribute(f);
|
|
3745
3815
|
if (b !== null) {
|
|
3746
|
-
const
|
|
3747
|
-
return
|
|
3816
|
+
const m = typeof e[o];
|
|
3817
|
+
return m === "boolean" ? b === "" || b === "true" : m === "number" ? Number(b) : b;
|
|
3748
3818
|
}
|
|
3749
3819
|
if (typeof a[o] < "u") {
|
|
3750
|
-
const
|
|
3751
|
-
return R(
|
|
3820
|
+
const m = a[o];
|
|
3821
|
+
return R(m) || m && typeof m == "object" && "value" in m && !(m instanceof Node) ? m.value : typeof e[o] === "boolean" && typeof m == "string" ? m === "" || m === "true" : m;
|
|
3752
3822
|
}
|
|
3753
3823
|
}
|
|
3754
3824
|
} catch {
|
|
@@ -3772,7 +3842,7 @@ function Yn(e) {
|
|
|
3772
3842
|
const c = t && t._host;
|
|
3773
3843
|
if (c) {
|
|
3774
3844
|
if (c instanceof HTMLElement || typeof c.getAttribute == "function" && typeof c.hasAttribute == "function") {
|
|
3775
|
-
const
|
|
3845
|
+
const f = o.replace(/([A-Z])/g, "-$1").toLowerCase(), b = c.getAttribute(f);
|
|
3776
3846
|
if (b !== null)
|
|
3777
3847
|
return typeof i == "boolean" ? b === "" || b === "true" : typeof i == "number" ? Number(b) : b;
|
|
3778
3848
|
}
|
|
@@ -3796,20 +3866,20 @@ function Yn(e) {
|
|
|
3796
3866
|
}
|
|
3797
3867
|
});
|
|
3798
3868
|
}
|
|
3799
|
-
function
|
|
3800
|
-
if (!
|
|
3869
|
+
function tr(e) {
|
|
3870
|
+
if (!W)
|
|
3801
3871
|
throw new Error("useStyle must be called during component render");
|
|
3802
|
-
|
|
3872
|
+
Ce(W);
|
|
3803
3873
|
try {
|
|
3804
3874
|
const t = e();
|
|
3805
|
-
Object.defineProperty(
|
|
3875
|
+
Object.defineProperty(W, "_computedStyle", {
|
|
3806
3876
|
value: t,
|
|
3807
3877
|
writable: !0,
|
|
3808
3878
|
enumerable: !1,
|
|
3809
3879
|
configurable: !0
|
|
3810
3880
|
});
|
|
3811
3881
|
} catch (t) {
|
|
3812
|
-
oe("Error in useStyle callback:", t), Object.defineProperty(
|
|
3882
|
+
oe("Error in useStyle callback:", t), Object.defineProperty(W, "_computedStyle", {
|
|
3813
3883
|
value: "",
|
|
3814
3884
|
writable: !0,
|
|
3815
3885
|
enumerable: !1,
|
|
@@ -3817,12 +3887,12 @@ function er(e) {
|
|
|
3817
3887
|
});
|
|
3818
3888
|
}
|
|
3819
3889
|
}
|
|
3820
|
-
const
|
|
3890
|
+
const $e = /* @__PURE__ */ new Map(), St = Symbol.for("cer.registry");
|
|
3821
3891
|
if (typeof window < "u") {
|
|
3822
3892
|
const e = globalThis;
|
|
3823
|
-
e[
|
|
3893
|
+
e[St] || (e[St] = $e);
|
|
3824
3894
|
}
|
|
3825
|
-
function
|
|
3895
|
+
function Pn(e, t) {
|
|
3826
3896
|
if (!t.render)
|
|
3827
3897
|
throw new Error("Component must have a render function");
|
|
3828
3898
|
return typeof window > "u" ? class {
|
|
@@ -3865,11 +3935,11 @@ function Ln(e, t) {
|
|
|
3865
3935
|
_templateLoading = !1;
|
|
3866
3936
|
_templateError = null;
|
|
3867
3937
|
constructor() {
|
|
3868
|
-
super(), this.attachShadow({ mode: "open" }), this._cfg =
|
|
3938
|
+
super(), this.attachShadow({ mode: "open" }), this._cfg = $e.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
|
|
3869
3939
|
const r = this._initContext(t), n = (i, s, c) => {
|
|
3870
3940
|
Object.defineProperty(i, s, { value: c, writable: !1, enumerable: !1, configurable: !1 });
|
|
3871
3941
|
};
|
|
3872
|
-
n(r, "refs", this._refs), n(r, "requestRender", () => this.requestRender()), n(r, "_requestRender", () => this._requestRender()), n(r, "_componentId", this._componentId), n(r, "_triggerWatchers", (i, s) => this._triggerWatchers(i, s)), this.context = r,
|
|
3942
|
+
n(r, "refs", this._refs), n(r, "requestRender", () => this.requestRender()), n(r, "_requestRender", () => this._requestRender()), n(r, "_componentId", this._componentId), n(r, "_triggerWatchers", (i, s) => this._triggerWatchers(i, s)), this.context = r, P(() => {
|
|
3873
3943
|
n(r, "_host", this);
|
|
3874
3944
|
}), n(this.context, "emit", (i, s, c) => {
|
|
3875
3945
|
const a = {
|
|
@@ -3877,18 +3947,18 @@ function Ln(e, t) {
|
|
|
3877
3947
|
bubbles: !0,
|
|
3878
3948
|
composed: !0,
|
|
3879
3949
|
...c || {}
|
|
3880
|
-
},
|
|
3881
|
-
this.dispatchEvent(
|
|
3950
|
+
}, f = new CustomEvent(i, a);
|
|
3951
|
+
this.dispatchEvent(f);
|
|
3882
3952
|
const b = i.indexOf(":");
|
|
3883
3953
|
if (b > 0) {
|
|
3884
|
-
const
|
|
3885
|
-
|
|
3886
|
-
this.dispatchEvent(new CustomEvent(
|
|
3954
|
+
const m = i.substring(0, b), d = i.substring(b + 1), k = d.includes("-") ? `${m}:${d.split("-").map((u, p) => p === 0 ? u : u.charAt(0).toUpperCase() + u.slice(1)).join("")}` : `${m}:${d.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
3955
|
+
k !== i && P(() => {
|
|
3956
|
+
this.dispatchEvent(new CustomEvent(k, a));
|
|
3887
3957
|
});
|
|
3888
3958
|
}
|
|
3889
|
-
return !
|
|
3959
|
+
return !f.defaultPrevented;
|
|
3890
3960
|
});
|
|
3891
|
-
const o =
|
|
3961
|
+
const o = $e.get(e) || t;
|
|
3892
3962
|
for (const i in o) {
|
|
3893
3963
|
const s = o[i];
|
|
3894
3964
|
typeof s == "function" && (this.context[i] = (...c) => s(...c, this.context));
|
|
@@ -3912,14 +3982,14 @@ function Ln(e, t) {
|
|
|
3912
3982
|
}
|
|
3913
3983
|
connectedCallback() {
|
|
3914
3984
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
3915
|
-
this._applyProps(t), this._requestRender(),
|
|
3985
|
+
this._applyProps(t), this._requestRender(), Jt(t, this.context, this._mounted, (r) => {
|
|
3916
3986
|
this._mounted = r;
|
|
3917
3987
|
});
|
|
3918
3988
|
});
|
|
3919
3989
|
}
|
|
3920
3990
|
disconnectedCallback() {
|
|
3921
3991
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
3922
|
-
|
|
3992
|
+
Xt(
|
|
3923
3993
|
t,
|
|
3924
3994
|
this.context,
|
|
3925
3995
|
this._listeners,
|
|
@@ -3943,16 +4013,16 @@ function Ln(e, t) {
|
|
|
3943
4013
|
}
|
|
3944
4014
|
attributeChangedCallback(r, n, o) {
|
|
3945
4015
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
3946
|
-
this._applyProps(t), n !== o && this._requestRender(),
|
|
4016
|
+
this._applyProps(t), n !== o && this._requestRender(), Yt(t, r, n, o, this.context);
|
|
3947
4017
|
});
|
|
3948
4018
|
}
|
|
3949
4019
|
static get observedAttributes() {
|
|
3950
|
-
return t.props ? Object.keys(t.props).map(
|
|
4020
|
+
return t.props ? Object.keys(t.props).map(te) : [];
|
|
3951
4021
|
}
|
|
3952
4022
|
// --- Render ---
|
|
3953
4023
|
_render(r) {
|
|
3954
4024
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
3955
|
-
|
|
4025
|
+
On(
|
|
3956
4026
|
this.shadowRoot,
|
|
3957
4027
|
r,
|
|
3958
4028
|
this.context,
|
|
@@ -3975,8 +4045,8 @@ function Ln(e, t) {
|
|
|
3975
4045
|
}
|
|
3976
4046
|
_requestRender() {
|
|
3977
4047
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
3978
|
-
|
|
3979
|
-
|
|
4048
|
+
ye(() => {
|
|
4049
|
+
jn(
|
|
3980
4050
|
() => this._render(this._cfg),
|
|
3981
4051
|
this._lastRenderTime,
|
|
3982
4052
|
this._renderCount,
|
|
@@ -3997,7 +4067,7 @@ function Ln(e, t) {
|
|
|
3997
4067
|
// --- Style ---
|
|
3998
4068
|
_applyStyle(r, n) {
|
|
3999
4069
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
4000
|
-
|
|
4070
|
+
Ln(
|
|
4001
4071
|
this.shadowRoot,
|
|
4002
4072
|
this.context,
|
|
4003
4073
|
n,
|
|
@@ -4023,8 +4093,8 @@ function Ln(e, t) {
|
|
|
4023
4093
|
let n = function(i, s = "") {
|
|
4024
4094
|
if (Array.isArray(i))
|
|
4025
4095
|
return new Proxy(i, {
|
|
4026
|
-
get(c, a,
|
|
4027
|
-
const b = Reflect.get(c, a,
|
|
4096
|
+
get(c, a, f) {
|
|
4097
|
+
const b = Reflect.get(c, a, f);
|
|
4028
4098
|
return typeof b == "function" && typeof a == "string" && [
|
|
4029
4099
|
"push",
|
|
4030
4100
|
"pop",
|
|
@@ -4033,29 +4103,29 @@ function Ln(e, t) {
|
|
|
4033
4103
|
"splice",
|
|
4034
4104
|
"sort",
|
|
4035
4105
|
"reverse"
|
|
4036
|
-
].includes(a) ? function(...
|
|
4037
|
-
const
|
|
4106
|
+
].includes(a) ? function(...d) {
|
|
4107
|
+
const k = b.apply(c, d);
|
|
4038
4108
|
if (!o._initializing) {
|
|
4039
4109
|
const u = s || "root";
|
|
4040
|
-
o._triggerWatchers(u, c),
|
|
4110
|
+
o._triggerWatchers(u, c), ye(
|
|
4041
4111
|
() => o._render(r),
|
|
4042
4112
|
o._componentId
|
|
4043
4113
|
);
|
|
4044
4114
|
}
|
|
4045
|
-
return
|
|
4115
|
+
return k;
|
|
4046
4116
|
} : b;
|
|
4047
4117
|
},
|
|
4048
|
-
set(c, a,
|
|
4049
|
-
if (c[a] =
|
|
4118
|
+
set(c, a, f) {
|
|
4119
|
+
if (c[a] = f, !o._initializing) {
|
|
4050
4120
|
const b = s ? `${s}.${String(a)}` : String(a);
|
|
4051
|
-
o._triggerWatchers(b,
|
|
4121
|
+
o._triggerWatchers(b, f), ye(() => o._render(r), o._componentId);
|
|
4052
4122
|
}
|
|
4053
4123
|
return !0;
|
|
4054
4124
|
},
|
|
4055
4125
|
deleteProperty(c, a) {
|
|
4056
4126
|
if (delete c[a], !o._initializing) {
|
|
4057
|
-
const
|
|
4058
|
-
o._triggerWatchers(
|
|
4127
|
+
const f = s ? `${s}.${String(a)}` : String(a);
|
|
4128
|
+
o._triggerWatchers(f, void 0), ye(() => o._render(r), o._componentId);
|
|
4059
4129
|
}
|
|
4060
4130
|
return !0;
|
|
4061
4131
|
}
|
|
@@ -4068,12 +4138,12 @@ function Ln(e, t) {
|
|
|
4068
4138
|
i[c] = n(i[c], a);
|
|
4069
4139
|
}
|
|
4070
4140
|
return new Proxy(i, {
|
|
4071
|
-
set(c, a,
|
|
4141
|
+
set(c, a, f) {
|
|
4072
4142
|
const b = s ? `${s}.${String(a)}` : String(a);
|
|
4073
|
-
return c[a] = n(
|
|
4143
|
+
return c[a] = n(f, b), o._initializing || (o._triggerWatchers(b, c[a]), ye(() => o._render(r), o._componentId)), !0;
|
|
4074
4144
|
},
|
|
4075
|
-
get(c, a,
|
|
4076
|
-
return Reflect.get(c, a,
|
|
4145
|
+
get(c, a, f) {
|
|
4146
|
+
return Reflect.get(c, a, f);
|
|
4077
4147
|
}
|
|
4078
4148
|
});
|
|
4079
4149
|
}
|
|
@@ -4096,7 +4166,7 @@ function Ln(e, t) {
|
|
|
4096
4166
|
}
|
|
4097
4167
|
_initWatchers(r) {
|
|
4098
4168
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
4099
|
-
|
|
4169
|
+
qt(
|
|
4100
4170
|
this.context,
|
|
4101
4171
|
this._watchers,
|
|
4102
4172
|
{}
|
|
@@ -4110,7 +4180,7 @@ function Ln(e, t) {
|
|
|
4110
4180
|
_applyProps(r) {
|
|
4111
4181
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
4112
4182
|
try {
|
|
4113
|
-
|
|
4183
|
+
Gt(this, r, this.context);
|
|
4114
4184
|
} catch (n) {
|
|
4115
4185
|
this._hasError = !0, r.onError && r.onError(n, this.context);
|
|
4116
4186
|
}
|
|
@@ -4118,8 +4188,8 @@ function Ln(e, t) {
|
|
|
4118
4188
|
}
|
|
4119
4189
|
};
|
|
4120
4190
|
}
|
|
4121
|
-
function
|
|
4122
|
-
let r =
|
|
4191
|
+
function Tt(e, t) {
|
|
4192
|
+
let r = te(e);
|
|
4123
4193
|
r.includes("-") || (r = `cer-${r}`);
|
|
4124
4194
|
let n = {};
|
|
4125
4195
|
const o = {
|
|
@@ -4140,49 +4210,49 @@ function St(e, t) {
|
|
|
4140
4210
|
},
|
|
4141
4211
|
render: (i) => {
|
|
4142
4212
|
const s = i._componentId || `${r}-${Math.random().toString(36).substr(2, 9)}`;
|
|
4143
|
-
|
|
4213
|
+
X.setCurrentComponent(s, () => {
|
|
4144
4214
|
i.requestRender && i.requestRender();
|
|
4145
4215
|
});
|
|
4146
4216
|
try {
|
|
4147
|
-
|
|
4217
|
+
_t(i);
|
|
4148
4218
|
const c = t();
|
|
4149
4219
|
if (i._hookCallbacks) {
|
|
4150
4220
|
const a = i._hookCallbacks;
|
|
4151
4221
|
if (a.onConnected && (n.onConnected = a.onConnected), a.onDisconnected && (n.onDisconnected = a.onDisconnected), a.onAttributeChanged && (n.onAttributeChanged = a.onAttributeChanged), a.onError && (n.onError = a.onError), a.style && (i._styleCallback = a.style), a.props) {
|
|
4152
|
-
const
|
|
4222
|
+
const f = a.props;
|
|
4153
4223
|
o.props = Object.fromEntries(
|
|
4154
|
-
Object.entries(
|
|
4155
|
-
),
|
|
4224
|
+
Object.entries(f).map(([b, m]) => [b, { type: typeof m == "boolean" ? Boolean : typeof m == "number" ? Number : typeof m == "string" ? String : Function, default: m }])
|
|
4225
|
+
), $e.set(r, o);
|
|
4156
4226
|
}
|
|
4157
4227
|
}
|
|
4158
4228
|
return c;
|
|
4159
4229
|
} finally {
|
|
4160
|
-
|
|
4230
|
+
At(), X.clearCurrentComponent();
|
|
4161
4231
|
}
|
|
4162
4232
|
}
|
|
4163
4233
|
};
|
|
4164
|
-
if (
|
|
4234
|
+
if ($e.set(r, o), typeof window < "u") {
|
|
4165
4235
|
try {
|
|
4166
4236
|
const i = {
|
|
4167
4237
|
_hookCallbacks: {},
|
|
4168
4238
|
requestRender: () => {
|
|
4169
4239
|
}
|
|
4170
4240
|
};
|
|
4171
|
-
if (
|
|
4241
|
+
if (_t(i), t(), At(), i._hookCallbacks?.props) {
|
|
4172
4242
|
const s = i._hookCallbacks.props;
|
|
4173
4243
|
o.props = Object.fromEntries(
|
|
4174
4244
|
Object.entries(s).map(([c, a]) => [c, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
|
|
4175
|
-
),
|
|
4245
|
+
), $e.set(r, o);
|
|
4176
4246
|
}
|
|
4177
4247
|
} catch {
|
|
4178
4248
|
}
|
|
4179
4249
|
customElements.get(r) || customElements.define(
|
|
4180
4250
|
r,
|
|
4181
|
-
|
|
4251
|
+
Pn(r, o)
|
|
4182
4252
|
);
|
|
4183
4253
|
}
|
|
4184
4254
|
}
|
|
4185
|
-
class
|
|
4255
|
+
class Mn {
|
|
4186
4256
|
map = /* @__PURE__ */ new Map();
|
|
4187
4257
|
maxSize;
|
|
4188
4258
|
constructor(t) {
|
|
@@ -4206,7 +4276,7 @@ class Pn {
|
|
|
4206
4276
|
this.map.clear();
|
|
4207
4277
|
}
|
|
4208
4278
|
}
|
|
4209
|
-
const
|
|
4279
|
+
const at = new Mn(500);
|
|
4210
4280
|
function Rn(e, t) {
|
|
4211
4281
|
if (e == null) {
|
|
4212
4282
|
oe(
|
|
@@ -4220,68 +4290,68 @@ function Rn(e, t) {
|
|
|
4220
4290
|
`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`
|
|
4221
4291
|
);
|
|
4222
4292
|
}
|
|
4223
|
-
function
|
|
4293
|
+
function Se(e, t = {}, r, n) {
|
|
4224
4294
|
const o = n ?? t.key;
|
|
4225
4295
|
return { tag: e, key: o, props: t, children: r };
|
|
4226
4296
|
}
|
|
4227
|
-
function
|
|
4297
|
+
function Pe(e) {
|
|
4228
4298
|
return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
|
|
4229
4299
|
}
|
|
4230
|
-
function
|
|
4231
|
-
return typeof e == "object" && e !== null && "tag" in e && !
|
|
4300
|
+
function je(e) {
|
|
4301
|
+
return typeof e == "object" && e !== null && "tag" in e && !Pe(e);
|
|
4232
4302
|
}
|
|
4233
|
-
function
|
|
4303
|
+
function Nn(e, t) {
|
|
4234
4304
|
return e.key != null ? e : { ...e, key: t };
|
|
4235
4305
|
}
|
|
4236
4306
|
function Dn(e, t = [], r = {}) {
|
|
4237
4307
|
const n = {}, o = {}, i = {}, s = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;
|
|
4238
4308
|
let a;
|
|
4239
4309
|
for (; a = c.exec(e); ) {
|
|
4240
|
-
const
|
|
4241
|
-
let u =
|
|
4242
|
-
|
|
4243
|
-
const
|
|
4244
|
-
if (
|
|
4245
|
-
const [
|
|
4246
|
-
if (
|
|
4247
|
-
const
|
|
4310
|
+
const f = a[1], b = a[2], m = (a[4] || a[6]) ?? "", d = a[3] === void 0 && a[6] === void 0, k = m.match(/^{{(\d+)}}$/);
|
|
4311
|
+
let u = d ? !0 : k ? t[Number(k[1])] ?? null : m;
|
|
4312
|
+
k || (u === "true" ? u = !0 : u === "false" ? u = !1 : u === "null" ? u = null : isNaN(Number(u)) || (u = Number(u)));
|
|
4313
|
+
const p = ["model", "bind", "show", "class", "style", "ref", "when"];
|
|
4314
|
+
if (f === ":") {
|
|
4315
|
+
const [h, l] = b.split(":"), [y, ...w] = h.split(".");
|
|
4316
|
+
if (p.includes(y)) {
|
|
4317
|
+
const x = [...w], _ = y === "model" && l ? `model:${l}` : y;
|
|
4248
4318
|
i[_] = {
|
|
4249
4319
|
value: u,
|
|
4250
|
-
modifiers:
|
|
4320
|
+
modifiers: x,
|
|
4251
4321
|
arg: l
|
|
4252
4322
|
};
|
|
4253
4323
|
} else if (b === "disabled") {
|
|
4254
|
-
let
|
|
4255
|
-
|
|
4256
|
-
const _ = typeof
|
|
4257
|
-
if (
|
|
4258
|
-
n[b] =
|
|
4324
|
+
let x = u;
|
|
4325
|
+
x && R(x) && (x = x.value);
|
|
4326
|
+
const _ = typeof x;
|
|
4327
|
+
if (x === "" || _ === "boolean" || _ === "string" && (x === "true" || x === "false") || x == null || _ === "number")
|
|
4328
|
+
n[b] = x;
|
|
4259
4329
|
else {
|
|
4260
|
-
let
|
|
4261
|
-
|
|
4330
|
+
let S = u;
|
|
4331
|
+
S && R(S) && (S = S.value), o[b] = S;
|
|
4262
4332
|
}
|
|
4263
4333
|
s.push(b);
|
|
4264
4334
|
} else {
|
|
4265
|
-
let
|
|
4266
|
-
|
|
4335
|
+
let x = u;
|
|
4336
|
+
x && R(x) && (x = x.value), o[b] = x, s.push(b);
|
|
4267
4337
|
}
|
|
4268
|
-
} else if (
|
|
4269
|
-
const [
|
|
4270
|
-
Rn(u,
|
|
4271
|
-
const
|
|
4272
|
-
if (
|
|
4273
|
-
const
|
|
4274
|
-
if (
|
|
4275
|
-
return
|
|
4276
|
-
}, _ = "on" +
|
|
4277
|
-
n[_] =
|
|
4338
|
+
} else if (f === "@") {
|
|
4339
|
+
const [h, ...l] = b.split("."), y = l;
|
|
4340
|
+
Rn(u, h);
|
|
4341
|
+
const w = typeof u == "function" ? u : typeof r[u] == "function" ? r[u] : void 0;
|
|
4342
|
+
if (w) {
|
|
4343
|
+
const x = (C) => {
|
|
4344
|
+
if (y.includes("prevent") && C.preventDefault(), y.includes("stop") && C.stopPropagation(), !(y.includes("self") && C.target !== C.currentTarget))
|
|
4345
|
+
return y.includes("once") && C.currentTarget?.removeEventListener(h, x), w(C);
|
|
4346
|
+
}, _ = "on" + h.charAt(0).toUpperCase() + h.slice(1);
|
|
4347
|
+
n[_] = x;
|
|
4278
4348
|
}
|
|
4279
4349
|
} else b === "ref" ? n.ref = u : o[b] = u;
|
|
4280
4350
|
}
|
|
4281
4351
|
return { props: n, attrs: o, directives: i, bound: s };
|
|
4282
4352
|
}
|
|
4283
|
-
function
|
|
4284
|
-
if (!
|
|
4353
|
+
function dt(e) {
|
|
4354
|
+
if (!je(e) || Pe(e))
|
|
4285
4355
|
return e;
|
|
4286
4356
|
const t = e.props?.directives;
|
|
4287
4357
|
if (t && t.when) {
|
|
@@ -4292,7 +4362,7 @@ function ft(e) {
|
|
|
4292
4362
|
props: i
|
|
4293
4363
|
};
|
|
4294
4364
|
return Array.isArray(s.children) && (s.children = s.children.map(
|
|
4295
|
-
(a) => typeof a == "object" && a !== null ?
|
|
4365
|
+
(a) => typeof a == "object" && a !== null ? dt(a) : a
|
|
4296
4366
|
)), {
|
|
4297
4367
|
tag: "#anchor",
|
|
4298
4368
|
key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
|
|
@@ -4301,7 +4371,7 @@ function ft(e) {
|
|
|
4301
4371
|
}
|
|
4302
4372
|
if (Array.isArray(e.children)) {
|
|
4303
4373
|
const r = e.children.map(
|
|
4304
|
-
(n) => typeof n == "object" && n !== null ?
|
|
4374
|
+
(n) => typeof n == "object" && n !== null ? dt(n) : n
|
|
4305
4375
|
);
|
|
4306
4376
|
return {
|
|
4307
4377
|
...e,
|
|
@@ -4310,68 +4380,68 @@ function ft(e) {
|
|
|
4310
4380
|
}
|
|
4311
4381
|
return e;
|
|
4312
4382
|
}
|
|
4313
|
-
function
|
|
4314
|
-
const n =
|
|
4383
|
+
function Hn(e, t, r) {
|
|
4384
|
+
const n = Le.length > 0 ? Le[Le.length - 1] : void 0, o = r ?? n, i = !r && t.length === 0, s = i ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
4315
4385
|
if (i && s) {
|
|
4316
|
-
const
|
|
4317
|
-
if (
|
|
4386
|
+
const g = at.get(s);
|
|
4387
|
+
if (g) return g;
|
|
4318
4388
|
}
|
|
4319
|
-
function c(
|
|
4320
|
-
return
|
|
4389
|
+
function c(g, S) {
|
|
4390
|
+
return Se("#text", {}, g, S);
|
|
4321
4391
|
}
|
|
4322
4392
|
let a = "";
|
|
4323
|
-
for (let
|
|
4324
|
-
a += e[
|
|
4325
|
-
const
|
|
4326
|
-
let
|
|
4327
|
-
function
|
|
4328
|
-
!
|
|
4329
|
-
if (
|
|
4330
|
-
const
|
|
4393
|
+
for (let g = 0; g < e.length; g++)
|
|
4394
|
+
a += e[g], g < t.length && (a += `{{${g}}}`);
|
|
4395
|
+
const f = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, b = [];
|
|
4396
|
+
let m, d = [], k = null, u = {}, p, h = 0, l = [];
|
|
4397
|
+
function y(g) {
|
|
4398
|
+
!g || typeof g != "object" || Pe(g) || (g.props || g.attrs ? (g.props && (u.props || (u.props = {}), Object.assign(u.props, g.props)), g.attrs && (u.attrs || (u.attrs = {}), Object.keys(g.attrs).forEach((S) => {
|
|
4399
|
+
if (S === "style" && u.attrs.style) {
|
|
4400
|
+
const T = u.attrs.style.replace(
|
|
4331
4401
|
/;?\s*$/,
|
|
4332
4402
|
""
|
|
4333
|
-
),
|
|
4334
|
-
u.attrs.style =
|
|
4335
|
-
} else if (
|
|
4336
|
-
const
|
|
4337
|
-
.../* @__PURE__ */ new Set([...
|
|
4403
|
+
), $ = g.attrs.style.replace(/^;?\s*/, "");
|
|
4404
|
+
u.attrs.style = T + "; " + $;
|
|
4405
|
+
} else if (S === "class" && u.attrs.class) {
|
|
4406
|
+
const T = u.attrs.class.trim().split(/\s+/).filter(Boolean), $ = g.attrs.class.trim().split(/\s+/).filter(Boolean), v = [
|
|
4407
|
+
.../* @__PURE__ */ new Set([...T, ...$])
|
|
4338
4408
|
];
|
|
4339
|
-
u.attrs.class =
|
|
4409
|
+
u.attrs.class = v.join(" ");
|
|
4340
4410
|
} else
|
|
4341
|
-
u.attrs[
|
|
4342
|
-
}))) : (u.props || (u.props = {}), Object.assign(u.props,
|
|
4343
|
-
}
|
|
4344
|
-
function
|
|
4345
|
-
const
|
|
4346
|
-
if (
|
|
4347
|
-
const
|
|
4348
|
-
let
|
|
4349
|
-
|
|
4350
|
-
...
|
|
4351
|
-
key:
|
|
4352
|
-
children:
|
|
4411
|
+
u.attrs[S] = g.attrs[S];
|
|
4412
|
+
}))) : (u.props || (u.props = {}), Object.assign(u.props, g)));
|
|
4413
|
+
}
|
|
4414
|
+
function w(g, S) {
|
|
4415
|
+
const T = k ? d : l;
|
|
4416
|
+
if (Pe(g)) {
|
|
4417
|
+
const $ = g.key ?? S;
|
|
4418
|
+
let v = g.children;
|
|
4419
|
+
T.push({
|
|
4420
|
+
...g,
|
|
4421
|
+
key: $,
|
|
4422
|
+
children: v
|
|
4353
4423
|
});
|
|
4354
4424
|
return;
|
|
4355
4425
|
}
|
|
4356
|
-
if (
|
|
4357
|
-
|
|
4426
|
+
if (je(g)) {
|
|
4427
|
+
T.push(Nn(g, void 0));
|
|
4358
4428
|
return;
|
|
4359
4429
|
}
|
|
4360
|
-
if (Array.isArray(
|
|
4361
|
-
if (
|
|
4362
|
-
for (let
|
|
4363
|
-
const
|
|
4364
|
-
|
|
4430
|
+
if (Array.isArray(g)) {
|
|
4431
|
+
if (g.length === 0) return;
|
|
4432
|
+
for (let $ = 0; $ < g.length; $++) {
|
|
4433
|
+
const v = g[$];
|
|
4434
|
+
Pe(v) || je(v) || Array.isArray(v) ? w(v, `${S}-${$}`) : v !== null && typeof v == "object" ? y(v) : T.push(c(String(v), `${S}-${$}`));
|
|
4365
4435
|
}
|
|
4366
4436
|
return;
|
|
4367
4437
|
}
|
|
4368
|
-
if (
|
|
4369
|
-
|
|
4438
|
+
if (g !== null && typeof g == "object") {
|
|
4439
|
+
y(g);
|
|
4370
4440
|
return;
|
|
4371
4441
|
}
|
|
4372
|
-
|
|
4442
|
+
T.push(c(String(g), S));
|
|
4373
4443
|
}
|
|
4374
|
-
const
|
|
4444
|
+
const x = /* @__PURE__ */ new Set([
|
|
4375
4445
|
"area",
|
|
4376
4446
|
"base",
|
|
4377
4447
|
"br",
|
|
@@ -4387,22 +4457,22 @@ function Nn(e, t, r) {
|
|
|
4387
4457
|
"track",
|
|
4388
4458
|
"wbr"
|
|
4389
4459
|
]);
|
|
4390
|
-
for (;
|
|
4391
|
-
if (!(
|
|
4392
|
-
if (
|
|
4393
|
-
const
|
|
4394
|
-
props:
|
|
4395
|
-
attrs:
|
|
4396
|
-
directives:
|
|
4397
|
-
bound:
|
|
4398
|
-
} = Dn(
|
|
4399
|
-
for (const
|
|
4400
|
-
for (const
|
|
4401
|
-
|
|
4402
|
-
|
|
4460
|
+
for (; m = f.exec(a); )
|
|
4461
|
+
if (!(m[0].startsWith("<!--") && m[0].endsWith("-->"))) {
|
|
4462
|
+
if (m[1]) {
|
|
4463
|
+
const g = m[1], S = m[0][1] === "/", T = m[0][m[0].length - 2] === "/" || x.has(g), {
|
|
4464
|
+
props: $,
|
|
4465
|
+
attrs: v,
|
|
4466
|
+
directives: A,
|
|
4467
|
+
bound: L
|
|
4468
|
+
} = Dn(m[2] || "", t, o), E = { props: {}, attrs: {} };
|
|
4469
|
+
for (const O in $) E.props[O] = $[O];
|
|
4470
|
+
for (const O in v) E.attrs[O] = v[O];
|
|
4471
|
+
E.attrs && Object.prototype.hasOwnProperty.call(E.attrs, "key") && !(E.props && Object.prototype.hasOwnProperty.call(E.props, "key")) && P(() => {
|
|
4472
|
+
E.props.key = E.attrs.key;
|
|
4403
4473
|
});
|
|
4404
4474
|
try {
|
|
4405
|
-
const
|
|
4475
|
+
const O = {
|
|
4406
4476
|
input: ["value", "checked", "readonly", "required", "placeholder", "maxlength", "minlength"],
|
|
4407
4477
|
textarea: ["value", "readonly", "required", "placeholder", "maxlength", "minlength"],
|
|
4408
4478
|
select: ["value", "required", "multiple"],
|
|
@@ -4411,156 +4481,156 @@ function Nn(e, t, r) {
|
|
|
4411
4481
|
audio: ["muted", "autoplay", "controls", "loop"],
|
|
4412
4482
|
img: ["src", "alt", "width", "height"],
|
|
4413
4483
|
button: ["type", "name", "value", "autofocus", "form"]
|
|
4414
|
-
},
|
|
4415
|
-
if (
|
|
4416
|
-
for (const
|
|
4417
|
-
if (
|
|
4418
|
-
let
|
|
4419
|
-
if (
|
|
4420
|
-
|
|
4484
|
+
}, M = g.toLowerCase(), I = O[M] ?? [];
|
|
4485
|
+
if (E.attrs) {
|
|
4486
|
+
for (const D of I)
|
|
4487
|
+
if (L && L.includes(D) && D in E.attrs && !(E.props && D in E.props)) {
|
|
4488
|
+
let N = E.attrs[D];
|
|
4489
|
+
if (N && R(N))
|
|
4490
|
+
N = N.value, E.props[D] = N, delete E.attrs[D];
|
|
4421
4491
|
else {
|
|
4422
|
-
const
|
|
4423
|
-
|
|
4424
|
-
const
|
|
4425
|
-
|
|
4426
|
-
}), delete
|
|
4492
|
+
const q = typeof N;
|
|
4493
|
+
D === "disabled" ? (N === "" || q === "boolean" || q === "string" && (N === "true" || N === "false") || N == null || q === "number") && (E.props[D] = N, P(() => {
|
|
4494
|
+
const K = globalThis;
|
|
4495
|
+
K.__VDOM_DISABLED_PROMOTIONS || (K.__VDOM_DISABLED_PROMOTIONS = []), K.__VDOM_DISABLED_PROMOTIONS.push({ phase: "compiler-promotion", tag: g, propName: D, value: N, time: Date.now(), stack: new Error().stack });
|
|
4496
|
+
}), delete E.attrs[D]) : (N === "" || q === "string" || q === "number" || q === "boolean" || N == null) && (E.props[D] = N, delete E.attrs[D]);
|
|
4427
4497
|
}
|
|
4428
4498
|
}
|
|
4429
4499
|
}
|
|
4430
|
-
if ((
|
|
4431
|
-
const
|
|
4432
|
-
for (const
|
|
4433
|
-
if (
|
|
4434
|
-
const
|
|
4435
|
-
let ie =
|
|
4436
|
-
|
|
4500
|
+
if ((g.includes("-") || !!o?.__customElements?.has?.(g)) && (E.isCustomElement = !0, L && E.attrs)) {
|
|
4501
|
+
const D = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
4502
|
+
for (const N of L)
|
|
4503
|
+
if (N in E.attrs && !(E.props && N in E.props)) {
|
|
4504
|
+
const q = N.includes("-") ? ht(N) : N;
|
|
4505
|
+
let ie = E.attrs[N];
|
|
4506
|
+
E.props[q] = ie, D.has(N) || delete E.attrs[N];
|
|
4437
4507
|
}
|
|
4438
4508
|
}
|
|
4439
4509
|
} catch {
|
|
4440
4510
|
}
|
|
4441
|
-
if (
|
|
4511
|
+
if (A && Object.keys(A).some((O) => O === "model" || O.startsWith("model:")))
|
|
4442
4512
|
try {
|
|
4443
|
-
const
|
|
4444
|
-
if (!!(
|
|
4445
|
-
for (const
|
|
4446
|
-
if (
|
|
4447
|
-
const ie =
|
|
4448
|
-
let
|
|
4449
|
-
typeof
|
|
4513
|
+
const O = Symbol.for("cer.registry"), M = globalThis[O], I = !!(M && typeof M.has == "function" && M.has(g)), ue = !!(o && (o.__customElements instanceof Set && o.__customElements.has(g) || Array.isArray(o.__isCustomElements) && o.__isCustomElements.includes(g)));
|
|
4514
|
+
if (!!(g.includes("-") || ue || I))
|
|
4515
|
+
for (const q of Object.keys(A)) {
|
|
4516
|
+
if (q !== "model" && !q.startsWith("model:")) continue;
|
|
4517
|
+
const ie = A[q], fe = ie.arg ?? (q.includes(":") ? q.split(":", 2)[1] : void 0), K = ie.value, ne = fe ?? "modelValue", ce = V, j = qe, H = o ? o._state || o : void 0;
|
|
4518
|
+
let B;
|
|
4519
|
+
typeof K == "string" && o ? B = ce(H, K) : B = K, E.props[ne] = B;
|
|
4450
4520
|
try {
|
|
4451
|
-
const
|
|
4452
|
-
|
|
4521
|
+
const de = te(ne);
|
|
4522
|
+
E.attrs || (E.attrs = {}), B != null && (typeof B == "string" || typeof B == "number" || typeof B == "boolean") && (E.attrs[de] = B);
|
|
4453
4523
|
} catch {
|
|
4454
4524
|
}
|
|
4455
|
-
|
|
4456
|
-
const
|
|
4457
|
-
|
|
4458
|
-
const se =
|
|
4459
|
-
if (
|
|
4460
|
-
if (
|
|
4461
|
-
const
|
|
4462
|
-
(Array.isArray(se) && Array.isArray(
|
|
4525
|
+
E.isCustomElement = !0;
|
|
4526
|
+
const z = `update:${te(ne)}`.replace(/-([a-z])/g, (de, se) => se.toUpperCase()), G = "on" + z.charAt(0).toUpperCase() + z.slice(1);
|
|
4527
|
+
E.props[G] = function(de) {
|
|
4528
|
+
const se = de.detail !== void 0 ? de.detail : de.target ? de.target.value : void 0;
|
|
4529
|
+
if (H)
|
|
4530
|
+
if (K && R(K)) {
|
|
4531
|
+
const he = K.value;
|
|
4532
|
+
(Array.isArray(se) && Array.isArray(he) ? JSON.stringify([...se].sort()) !== JSON.stringify([...he].sort()) : se !== he) && (K.value = se, o?.requestRender ? o.requestRender() : o?._requestRender && o._requestRender());
|
|
4463
4533
|
} else {
|
|
4464
|
-
const
|
|
4465
|
-
(Array.isArray(se) && Array.isArray(
|
|
4534
|
+
const he = ce(H, typeof K == "string" ? K : String(K));
|
|
4535
|
+
(Array.isArray(se) && Array.isArray(he) ? JSON.stringify([...se].sort()) !== JSON.stringify([...he].sort()) : se !== he) && (j(H, typeof K == "string" ? K : String(K), se), o?.requestRender ? o.requestRender() : o?._requestRender && o._requestRender());
|
|
4466
4536
|
}
|
|
4467
|
-
}, delete
|
|
4537
|
+
}, delete A[q];
|
|
4468
4538
|
}
|
|
4469
4539
|
} catch {
|
|
4470
4540
|
}
|
|
4471
|
-
if (Object.keys(
|
|
4472
|
-
const
|
|
4473
|
-
|
|
4541
|
+
if (Object.keys(A).length > 0 && (E.directives = { ...A }), S) {
|
|
4542
|
+
const O = Se(
|
|
4543
|
+
k,
|
|
4474
4544
|
u,
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
),
|
|
4478
|
-
|
|
4479
|
-
} else
|
|
4480
|
-
tag:
|
|
4545
|
+
d.length === 1 && je(d[0]) && d[0].tag === "#text" ? typeof d[0].children == "string" ? d[0].children : "" : d.length ? d : void 0,
|
|
4546
|
+
p
|
|
4547
|
+
), M = b.pop();
|
|
4548
|
+
M ? (k = M.tag, u = M.props, p = M.key, d = M.children, d.push(O)) : (l.push(O), k = null, u = {}, p = void 0, d = []);
|
|
4549
|
+
} else T ? k ? d.push(Se(g, E, void 0, void 0)) : l.push(Se(g, E, void 0, void 0)) : (k && b.push({
|
|
4550
|
+
tag: k,
|
|
4481
4551
|
props: u,
|
|
4482
|
-
children:
|
|
4483
|
-
key:
|
|
4484
|
-
}),
|
|
4485
|
-
} else if (typeof
|
|
4486
|
-
const
|
|
4487
|
-
|
|
4488
|
-
} else if (
|
|
4489
|
-
const
|
|
4490
|
-
for (const
|
|
4491
|
-
if (
|
|
4492
|
-
const
|
|
4493
|
-
if (
|
|
4494
|
-
const
|
|
4495
|
-
|
|
4552
|
+
children: d,
|
|
4553
|
+
key: p
|
|
4554
|
+
}), k = g, u = E, d = []);
|
|
4555
|
+
} else if (typeof m[3] < "u") {
|
|
4556
|
+
const g = Number(m[3]), S = t[g], T = `interp-${g}`;
|
|
4557
|
+
w(S, T);
|
|
4558
|
+
} else if (m[4]) {
|
|
4559
|
+
const g = m[4], S = k ? d : l, T = g.split(/({{\d+}})/);
|
|
4560
|
+
for (const $ of T) {
|
|
4561
|
+
if (!$) continue;
|
|
4562
|
+
const v = $.match(/^{{(\d+)}}$/);
|
|
4563
|
+
if (v) {
|
|
4564
|
+
const A = Number(v[1]), L = t[A], E = `interp-${A}`;
|
|
4565
|
+
w(L, E);
|
|
4496
4566
|
} else {
|
|
4497
|
-
const
|
|
4498
|
-
|
|
4567
|
+
const A = `text-${h++}`;
|
|
4568
|
+
S.push(c($, A));
|
|
4499
4569
|
}
|
|
4500
4570
|
}
|
|
4501
4571
|
}
|
|
4502
4572
|
}
|
|
4503
|
-
const C = l.filter((
|
|
4573
|
+
const C = l.filter((g) => je(g) && g.tag === "#text" ? typeof g.children == "string" && g.children.trim() !== "" : !0).map((g) => dt(g));
|
|
4504
4574
|
if (C.length === 1) {
|
|
4505
|
-
const
|
|
4506
|
-
return i && s &&
|
|
4575
|
+
const g = C[0];
|
|
4576
|
+
return i && s && at.set(s, g), g;
|
|
4507
4577
|
} else if (C.length > 1) {
|
|
4508
|
-
const
|
|
4509
|
-
return i && s &&
|
|
4578
|
+
const g = C;
|
|
4579
|
+
return i && s && at.set(s, g), g;
|
|
4510
4580
|
}
|
|
4511
|
-
return
|
|
4581
|
+
return Se("div", {}, "", "fallback-root");
|
|
4512
4582
|
}
|
|
4513
|
-
function
|
|
4583
|
+
function ge(e, ...t) {
|
|
4514
4584
|
const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
|
|
4515
|
-
return
|
|
4516
|
-
}
|
|
4517
|
-
function tr(e, t) {
|
|
4518
|
-
return qe(!e, t);
|
|
4585
|
+
return Hn(e, t, n);
|
|
4519
4586
|
}
|
|
4520
4587
|
function nr(e, t) {
|
|
4521
|
-
|
|
4522
|
-
return qe(r, t);
|
|
4588
|
+
return Ve(!e, t);
|
|
4523
4589
|
}
|
|
4524
4590
|
function rr(e, t) {
|
|
4591
|
+
const r = !e || e.length === 0;
|
|
4592
|
+
return Ve(r, t);
|
|
4593
|
+
}
|
|
4594
|
+
function or(e, t) {
|
|
4525
4595
|
const r = !!(e && e.length > 0);
|
|
4526
|
-
return
|
|
4596
|
+
return Ve(r, t);
|
|
4527
4597
|
}
|
|
4528
|
-
function
|
|
4598
|
+
function ir(e, t, r) {
|
|
4529
4599
|
const n = [];
|
|
4530
4600
|
return e.forEach((o, i) => {
|
|
4531
4601
|
t(o, i) && n.push({ item: o, originalIndex: i });
|
|
4532
4602
|
}), n.map(({ item: o, originalIndex: i }, s) => {
|
|
4533
4603
|
const c = typeof o == "object" && o != null ? o?.key ?? o?.id ?? `filtered-${i}` : `filtered-${i}`;
|
|
4534
|
-
return
|
|
4604
|
+
return U(r(o, i, s), `each-where-${c}`);
|
|
4535
4605
|
});
|
|
4536
4606
|
}
|
|
4537
|
-
function
|
|
4607
|
+
function sr(e, t) {
|
|
4538
4608
|
const r = e?.length ?? 0;
|
|
4539
|
-
return r === 0 && t.empty ?
|
|
4609
|
+
return r === 0 && t.empty ? U(t.empty, "switch-length-empty") : r === 1 && t.one ? U(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? U(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? U(t.many(e), "switch-length-many") : U([], "switch-length-fallback");
|
|
4540
4610
|
}
|
|
4541
|
-
function
|
|
4611
|
+
function ar(e, t, r) {
|
|
4542
4612
|
const n = /* @__PURE__ */ new Map();
|
|
4543
4613
|
return e.forEach((o) => {
|
|
4544
4614
|
const i = t(o);
|
|
4545
4615
|
n.has(i) || n.set(i, []), n.get(i).push(o);
|
|
4546
|
-
}), Array.from(n.entries()).map(([o, i], s) =>
|
|
4616
|
+
}), Array.from(n.entries()).map(([o, i], s) => U(
|
|
4547
4617
|
r(o, i, s),
|
|
4548
4618
|
`each-group-${o}`
|
|
4549
4619
|
));
|
|
4550
4620
|
}
|
|
4551
|
-
function
|
|
4621
|
+
function cr(e, t, r, n) {
|
|
4552
4622
|
const o = r * t, i = Math.min(o + t, e.length);
|
|
4553
4623
|
return e.slice(o, i).map((c, a) => {
|
|
4554
|
-
const
|
|
4555
|
-
return
|
|
4624
|
+
const f = o + a, b = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${f}` : `page-${f}`;
|
|
4625
|
+
return U(n(c, f, a), `each-page-${b}`);
|
|
4556
4626
|
});
|
|
4557
4627
|
}
|
|
4558
|
-
function
|
|
4559
|
-
return e.loading && t.loading ?
|
|
4628
|
+
function lr(e, t) {
|
|
4629
|
+
return e.loading && t.loading ? U(t.loading, "promise-loading") : e.error && t.error ? U(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? U(t.success(e.data), "promise-success") : t.idle ? U(t.idle, "promise-idle") : U([], "promise-fallback");
|
|
4560
4630
|
}
|
|
4561
|
-
function
|
|
4631
|
+
function J(e, t) {
|
|
4562
4632
|
const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
|
|
4563
|
-
return
|
|
4633
|
+
return Ve(!!r, t);
|
|
4564
4634
|
}
|
|
4565
4635
|
const le = {
|
|
4566
4636
|
// Responsive breakpoints (matching style.ts)
|
|
@@ -4571,43 +4641,43 @@ const le = {
|
|
|
4571
4641
|
"2xl": "(min-width:1536px)",
|
|
4572
4642
|
// Dark mode (matching style.ts)
|
|
4573
4643
|
dark: "(prefers-color-scheme: dark)"
|
|
4574
|
-
},
|
|
4644
|
+
}, Ft = ["sm", "md", "lg", "xl", "2xl"], In = {
|
|
4575
4645
|
// Breakpoint-based rendering (matching style.ts exactly)
|
|
4576
|
-
sm: (e) =>
|
|
4577
|
-
md: (e) =>
|
|
4578
|
-
lg: (e) =>
|
|
4579
|
-
xl: (e) =>
|
|
4580
|
-
"2xl": (e) =>
|
|
4646
|
+
sm: (e) => J(le.sm, e),
|
|
4647
|
+
md: (e) => J(le.md, e),
|
|
4648
|
+
lg: (e) => J(le.lg, e),
|
|
4649
|
+
xl: (e) => J(le.xl, e),
|
|
4650
|
+
"2xl": (e) => J(le["2xl"], e),
|
|
4581
4651
|
// Dark mode (matching style.ts)
|
|
4582
|
-
dark: (e) =>
|
|
4583
|
-
light: (e) =>
|
|
4652
|
+
dark: (e) => J(le.dark, e),
|
|
4653
|
+
light: (e) => J("(prefers-color-scheme: light)", e),
|
|
4584
4654
|
// Accessibility and interaction preferences
|
|
4585
|
-
touch: (e) =>
|
|
4586
|
-
mouse: (e) =>
|
|
4587
|
-
reducedMotion: (e) =>
|
|
4588
|
-
highContrast: (e) =>
|
|
4655
|
+
touch: (e) => J("(hover: none) and (pointer: coarse)", e),
|
|
4656
|
+
mouse: (e) => J("(hover: hover) and (pointer: fine)", e),
|
|
4657
|
+
reducedMotion: (e) => J("(prefers-reduced-motion: reduce)", e),
|
|
4658
|
+
highContrast: (e) => J("(prefers-contrast: high)", e),
|
|
4589
4659
|
// Orientation
|
|
4590
|
-
portrait: (e) =>
|
|
4591
|
-
landscape: (e) =>
|
|
4660
|
+
portrait: (e) => J("(orientation: portrait)", e),
|
|
4661
|
+
landscape: (e) => J("(orientation: landscape)", e)
|
|
4592
4662
|
};
|
|
4593
|
-
function
|
|
4663
|
+
function ur(e, t) {
|
|
4594
4664
|
const r = [];
|
|
4595
4665
|
e.includes("dark") ? r.push(le.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
|
|
4596
4666
|
const n = e.filter(
|
|
4597
|
-
(s) =>
|
|
4667
|
+
(s) => Ft.includes(s)
|
|
4598
4668
|
), o = n[n.length - 1];
|
|
4599
4669
|
o && o in le && r.push(le[o]);
|
|
4600
4670
|
const i = r.length > 0 ? r.join(" and ") : "all";
|
|
4601
|
-
return
|
|
4671
|
+
return J(i, t);
|
|
4602
4672
|
}
|
|
4603
|
-
function
|
|
4673
|
+
function fr(e) {
|
|
4604
4674
|
const t = [];
|
|
4605
|
-
return e.base && t.push(
|
|
4675
|
+
return e.base && t.push(U(e.base, "responsive-base")), Ft.forEach((r) => {
|
|
4606
4676
|
const n = e[r];
|
|
4607
4677
|
n && t.push(In[r](n));
|
|
4608
4678
|
}), t;
|
|
4609
4679
|
}
|
|
4610
|
-
function
|
|
4680
|
+
function dr(e) {
|
|
4611
4681
|
const t = [];
|
|
4612
4682
|
let r = null;
|
|
4613
4683
|
return {
|
|
@@ -4625,13 +4695,13 @@ function fr(e) {
|
|
|
4625
4695
|
for (let n = 0; n < t.length; n++) {
|
|
4626
4696
|
const { condition: o, content: i } = t[n];
|
|
4627
4697
|
if (o(e))
|
|
4628
|
-
return
|
|
4698
|
+
return U(i, `switch-case-${n}`);
|
|
4629
4699
|
}
|
|
4630
|
-
return
|
|
4700
|
+
return U(r || [], "switch-otherwise");
|
|
4631
4701
|
}
|
|
4632
4702
|
};
|
|
4633
4703
|
}
|
|
4634
|
-
class
|
|
4704
|
+
class we extends EventTarget {
|
|
4635
4705
|
handlers = {};
|
|
4636
4706
|
static instance;
|
|
4637
4707
|
eventCounters = /* @__PURE__ */ new Map();
|
|
@@ -4639,7 +4709,7 @@ class be extends EventTarget {
|
|
|
4639
4709
|
* Returns the singleton instance of GlobalEventBus
|
|
4640
4710
|
*/
|
|
4641
4711
|
static getInstance() {
|
|
4642
|
-
return
|
|
4712
|
+
return we.instance || (we.instance = new we()), we.instance;
|
|
4643
4713
|
}
|
|
4644
4714
|
/**
|
|
4645
4715
|
* Emit a global event with optional data. Includes event storm protection.
|
|
@@ -4663,7 +4733,7 @@ class be extends EventTarget {
|
|
|
4663
4733
|
try {
|
|
4664
4734
|
s(r);
|
|
4665
4735
|
} catch (c) {
|
|
4666
|
-
|
|
4736
|
+
F(`Error in global event handler for "${t}":`, c);
|
|
4667
4737
|
}
|
|
4668
4738
|
});
|
|
4669
4739
|
}
|
|
@@ -4752,8 +4822,8 @@ class be extends EventTarget {
|
|
|
4752
4822
|
this.eventCounters.clear();
|
|
4753
4823
|
}
|
|
4754
4824
|
}
|
|
4755
|
-
const
|
|
4756
|
-
function
|
|
4825
|
+
const Ne = we.getInstance(), pr = (e, t) => Ne.emit(e, t), hr = (e, t) => Ne.on(e, t), gr = (e, t) => Ne.off(e, t), mr = (e, t) => Ne.once(e, t), yr = (e, t, r) => Ne.listen(e, t, r);
|
|
4826
|
+
function Ot(e) {
|
|
4757
4827
|
let t = { ...e };
|
|
4758
4828
|
const r = [];
|
|
4759
4829
|
function n(c) {
|
|
@@ -4771,25 +4841,25 @@ function Tt(e) {
|
|
|
4771
4841
|
}
|
|
4772
4842
|
return { subscribe: n, getState: o, setState: i };
|
|
4773
4843
|
}
|
|
4774
|
-
const
|
|
4844
|
+
const jt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, ae = (e, t) => {
|
|
4775
4845
|
for (const r of e) {
|
|
4776
4846
|
const n = [], o = r.path.replace(/:[^/]+/g, (c) => (n.push(c.slice(1)), "([^/]+)")), i = new RegExp(`^${o}$`), s = t.match(i);
|
|
4777
4847
|
if (s) {
|
|
4778
4848
|
const c = {};
|
|
4779
|
-
return n.forEach((a,
|
|
4780
|
-
c[a] = s[
|
|
4849
|
+
return n.forEach((a, f) => {
|
|
4850
|
+
c[a] = s[f + 1];
|
|
4781
4851
|
}), { route: r, params: c };
|
|
4782
4852
|
}
|
|
4783
4853
|
}
|
|
4784
4854
|
return { route: null, params: {} };
|
|
4785
|
-
},
|
|
4786
|
-
async function
|
|
4855
|
+
}, ct = {};
|
|
4856
|
+
async function Fn(e) {
|
|
4787
4857
|
if (e.component) return e.component;
|
|
4788
4858
|
if (e.load) {
|
|
4789
|
-
if (
|
|
4859
|
+
if (ct[e.path]) return ct[e.path];
|
|
4790
4860
|
try {
|
|
4791
4861
|
const t = await e.load();
|
|
4792
|
-
return
|
|
4862
|
+
return ct[e.path] = t.default, t.default;
|
|
4793
4863
|
} catch {
|
|
4794
4864
|
throw new Error(`Failed to load component for route: ${e.path}`);
|
|
4795
4865
|
}
|
|
@@ -4798,260 +4868,260 @@ async function Hn(e) {
|
|
|
4798
4868
|
}
|
|
4799
4869
|
function Bn(e) {
|
|
4800
4870
|
const { routes: t, base: r = "", initialUrl: n } = e;
|
|
4801
|
-
let o, i, s, c, a,
|
|
4802
|
-
const
|
|
4803
|
-
const l = t.find((
|
|
4871
|
+
let o, i, s, c, a, f, b;
|
|
4872
|
+
const m = async (p, h) => {
|
|
4873
|
+
const l = t.find((y) => ae([y], p.path).route !== null);
|
|
4804
4874
|
if (l?.beforeEnter)
|
|
4805
4875
|
try {
|
|
4806
|
-
const
|
|
4807
|
-
return typeof
|
|
4808
|
-
} catch (
|
|
4809
|
-
return
|
|
4876
|
+
const y = await l.beforeEnter(p, h);
|
|
4877
|
+
return typeof y == "string" ? (await u(y, !0), !1) : y !== !1;
|
|
4878
|
+
} catch (y) {
|
|
4879
|
+
return F("beforeEnter error", y), !1;
|
|
4810
4880
|
}
|
|
4811
4881
|
return !0;
|
|
4812
|
-
},
|
|
4813
|
-
const l = t.find((
|
|
4882
|
+
}, d = async (p, h) => {
|
|
4883
|
+
const l = t.find((y) => ae([y], p.path).route !== null);
|
|
4814
4884
|
if (l?.onEnter)
|
|
4815
4885
|
try {
|
|
4816
|
-
const
|
|
4817
|
-
return typeof
|
|
4818
|
-
} catch (
|
|
4819
|
-
return
|
|
4886
|
+
const y = await l.onEnter(p, h);
|
|
4887
|
+
return typeof y == "string" ? (await u(y, !0), !1) : y !== !1;
|
|
4888
|
+
} catch (y) {
|
|
4889
|
+
return F("onEnter error", y), !1;
|
|
4820
4890
|
}
|
|
4821
4891
|
return !0;
|
|
4822
|
-
},
|
|
4823
|
-
const l = t.find((
|
|
4892
|
+
}, k = (p, h) => {
|
|
4893
|
+
const l = t.find((y) => ae([y], p.path).route !== null);
|
|
4824
4894
|
if (l?.afterEnter)
|
|
4825
4895
|
try {
|
|
4826
|
-
l.afterEnter(
|
|
4827
|
-
} catch (
|
|
4828
|
-
|
|
4896
|
+
l.afterEnter(p, h);
|
|
4897
|
+
} catch (y) {
|
|
4898
|
+
F("afterEnter error", y);
|
|
4829
4899
|
}
|
|
4830
|
-
}, u = async (
|
|
4900
|
+
}, u = async (p, h = !1) => {
|
|
4831
4901
|
try {
|
|
4832
4902
|
const l = {
|
|
4833
|
-
path:
|
|
4903
|
+
path: p.replace(r, "") || "/",
|
|
4834
4904
|
query: {}
|
|
4835
|
-
},
|
|
4836
|
-
if (!
|
|
4837
|
-
const
|
|
4905
|
+
}, y = ae(t, l.path);
|
|
4906
|
+
if (!y) throw new Error(`No route found for ${l.path}`);
|
|
4907
|
+
const w = s.getState(), x = {
|
|
4838
4908
|
path: l.path,
|
|
4839
|
-
params:
|
|
4909
|
+
params: y.params,
|
|
4840
4910
|
query: l.query
|
|
4841
4911
|
};
|
|
4842
|
-
if (!await
|
|
4843
|
-
typeof window < "u" && typeof document < "u" && (
|
|
4912
|
+
if (!await m(x, w) || !await d(x, w)) return;
|
|
4913
|
+
typeof window < "u" && typeof document < "u" && (h ? window.history.replaceState({}, "", r + p) : window.history.pushState({}, "", r + p)), s.setState(x), k(x, w);
|
|
4844
4914
|
} catch (l) {
|
|
4845
|
-
|
|
4915
|
+
F("Navigation error:", l);
|
|
4846
4916
|
}
|
|
4847
4917
|
};
|
|
4848
4918
|
if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
|
|
4849
4919
|
o = () => {
|
|
4850
|
-
const
|
|
4851
|
-
return { path: l, query:
|
|
4920
|
+
const h = new URL(window.location.href), l = h.pathname.replace(r, "") || "/", y = jt(h.search);
|
|
4921
|
+
return { path: l, query: y };
|
|
4852
4922
|
}, i = o();
|
|
4853
|
-
const
|
|
4854
|
-
s =
|
|
4923
|
+
const p = ae(t, i.path);
|
|
4924
|
+
s = Ot({
|
|
4855
4925
|
path: i.path,
|
|
4856
|
-
params:
|
|
4926
|
+
params: p.params,
|
|
4857
4927
|
query: i.query
|
|
4858
|
-
}), c = async (
|
|
4928
|
+
}), c = async (h = !1) => {
|
|
4859
4929
|
const l = o();
|
|
4860
|
-
await u(l.path,
|
|
4861
|
-
}, window.addEventListener("popstate", () => c(!0)), a = (
|
|
4930
|
+
await u(l.path, h);
|
|
4931
|
+
}, window.addEventListener("popstate", () => c(!0)), a = (h) => u(h, !1), f = (h) => u(h, !0), b = () => window.history.back();
|
|
4862
4932
|
} else {
|
|
4863
4933
|
o = () => {
|
|
4864
|
-
const l = new URL(n || "/", "http://localhost"),
|
|
4865
|
-
return { path:
|
|
4934
|
+
const l = new URL(n || "/", "http://localhost"), y = l.pathname.replace(r, "") || "/", w = jt(l.search);
|
|
4935
|
+
return { path: y, query: w };
|
|
4866
4936
|
}, i = o();
|
|
4867
|
-
const
|
|
4868
|
-
s =
|
|
4937
|
+
const p = ae(t, i.path);
|
|
4938
|
+
s = Ot({
|
|
4869
4939
|
path: i.path,
|
|
4870
|
-
params:
|
|
4940
|
+
params: p.params,
|
|
4871
4941
|
query: i.query
|
|
4872
4942
|
}), c = async () => {
|
|
4873
4943
|
const l = o();
|
|
4874
|
-
await
|
|
4944
|
+
await h(l.path);
|
|
4875
4945
|
};
|
|
4876
|
-
const
|
|
4946
|
+
const h = async (l) => {
|
|
4877
4947
|
try {
|
|
4878
|
-
const
|
|
4948
|
+
const y = {
|
|
4879
4949
|
path: l.replace(r, "") || "/",
|
|
4880
4950
|
query: {}
|
|
4881
|
-
},
|
|
4882
|
-
if (!
|
|
4883
|
-
const
|
|
4884
|
-
path:
|
|
4885
|
-
params:
|
|
4886
|
-
query:
|
|
4887
|
-
}, C = t.find((
|
|
4951
|
+
}, w = ae(t, y.path);
|
|
4952
|
+
if (!w) throw new Error(`No route found for ${y.path}`);
|
|
4953
|
+
const x = s.getState(), _ = {
|
|
4954
|
+
path: y.path,
|
|
4955
|
+
params: w.params,
|
|
4956
|
+
query: y.query
|
|
4957
|
+
}, C = t.find((g) => ae([g], _.path).route !== null);
|
|
4888
4958
|
if (C?.beforeEnter)
|
|
4889
4959
|
try {
|
|
4890
|
-
const
|
|
4891
|
-
if (typeof
|
|
4892
|
-
await g
|
|
4960
|
+
const g = await C.beforeEnter(_, x);
|
|
4961
|
+
if (typeof g == "string") {
|
|
4962
|
+
await h(g);
|
|
4893
4963
|
return;
|
|
4894
4964
|
}
|
|
4895
|
-
if (
|
|
4965
|
+
if (g === !1) return;
|
|
4896
4966
|
} catch {
|
|
4897
4967
|
return;
|
|
4898
4968
|
}
|
|
4899
4969
|
if (C?.onEnter)
|
|
4900
4970
|
try {
|
|
4901
|
-
const
|
|
4902
|
-
if (typeof
|
|
4903
|
-
await g
|
|
4971
|
+
const g = await C.onEnter(_, x);
|
|
4972
|
+
if (typeof g == "string") {
|
|
4973
|
+
await h(g);
|
|
4904
4974
|
return;
|
|
4905
4975
|
}
|
|
4906
|
-
if (
|
|
4976
|
+
if (g === !1) return;
|
|
4907
4977
|
} catch {
|
|
4908
4978
|
return;
|
|
4909
4979
|
}
|
|
4910
4980
|
if (s.setState(_), C?.afterEnter)
|
|
4911
4981
|
try {
|
|
4912
|
-
C.afterEnter(_,
|
|
4982
|
+
C.afterEnter(_, x);
|
|
4913
4983
|
} catch {
|
|
4914
4984
|
}
|
|
4915
4985
|
} catch {
|
|
4916
4986
|
}
|
|
4917
4987
|
};
|
|
4918
|
-
a = async (l) =>
|
|
4988
|
+
a = async (l) => h(l), f = async (l) => h(l), b = () => {
|
|
4919
4989
|
};
|
|
4920
4990
|
}
|
|
4921
4991
|
return {
|
|
4922
4992
|
store: s,
|
|
4923
4993
|
push: a,
|
|
4924
|
-
replace:
|
|
4994
|
+
replace: f,
|
|
4925
4995
|
back: b,
|
|
4926
4996
|
subscribe: s.subscribe,
|
|
4927
|
-
matchRoute: (
|
|
4997
|
+
matchRoute: (p) => ae(t, p),
|
|
4928
4998
|
getCurrent: () => s.getState(),
|
|
4929
|
-
resolveRouteComponent:
|
|
4999
|
+
resolveRouteComponent: Fn
|
|
4930
5000
|
};
|
|
4931
5001
|
}
|
|
4932
|
-
function
|
|
5002
|
+
function br(e, t) {
|
|
4933
5003
|
return ae(e, t);
|
|
4934
5004
|
}
|
|
4935
|
-
function
|
|
5005
|
+
function wr(e) {
|
|
4936
5006
|
const t = Bn(e);
|
|
4937
|
-
return
|
|
5007
|
+
return Tt("router-view", (r = {}, n = {}) => {
|
|
4938
5008
|
const { onConnected: o } = n;
|
|
4939
5009
|
if (o && o(() => {
|
|
4940
5010
|
t && typeof t.subscribe == "function" && t.subscribe(() => {
|
|
4941
5011
|
});
|
|
4942
|
-
}), !t) return
|
|
5012
|
+
}), !t) return ge`<div>Router not initialized.</div>`;
|
|
4943
5013
|
const i = t.getCurrent(), { path: s } = i, c = t.matchRoute(s);
|
|
4944
5014
|
return c.route ? t.resolveRouteComponent(c.route).then((a) => {
|
|
4945
5015
|
if (typeof a == "string")
|
|
4946
5016
|
return { tag: a, props: {}, children: [] };
|
|
4947
5017
|
if (typeof a == "function") {
|
|
4948
|
-
const
|
|
4949
|
-
return (
|
|
5018
|
+
const f = a();
|
|
5019
|
+
return (f instanceof Promise ? f : Promise.resolve(f)).then((m) => typeof m == "string" ? { tag: m, props: {}, children: [] } : m);
|
|
4950
5020
|
}
|
|
4951
|
-
return
|
|
4952
|
-
}).catch(() =>
|
|
4953
|
-
}),
|
|
5021
|
+
return ge`<div>Invalid route component</div>`;
|
|
5022
|
+
}).catch(() => ge`<div>Invalid route component</div>`) : ge`<div>Not found</div>`;
|
|
5023
|
+
}), Tt("router-link", (r = {}, n = {}) => {
|
|
4954
5024
|
const {
|
|
4955
5025
|
to: o = "",
|
|
4956
5026
|
tag: i = "a",
|
|
4957
5027
|
replace: s = !1,
|
|
4958
5028
|
exact: c = !1,
|
|
4959
5029
|
activeClass: a = "active",
|
|
4960
|
-
exactActiveClass:
|
|
5030
|
+
exactActiveClass: f = "exact-active",
|
|
4961
5031
|
ariaCurrentValue: b = "page",
|
|
4962
|
-
disabled:
|
|
4963
|
-
external:
|
|
4964
|
-
class:
|
|
4965
|
-
} = r, u = t.getCurrent(),
|
|
4966
|
-
for (const
|
|
4967
|
-
const
|
|
4968
|
-
...
|
|
5032
|
+
disabled: m = !1,
|
|
5033
|
+
external: d = !1,
|
|
5034
|
+
class: k = ""
|
|
5035
|
+
} = r, u = t.getCurrent(), p = u.path === o, h = c ? p : u && typeof u.path == "string" ? u.path.startsWith(o) : !1, l = p ? `aria-current="${b}"` : "", y = (k || "").split(/\s+/).filter(Boolean), w = {};
|
|
5036
|
+
for (const T of y) w[T] = !0;
|
|
5037
|
+
const x = {
|
|
5038
|
+
...w,
|
|
4969
5039
|
// Also include the configurable names (may duplicate the above)
|
|
4970
|
-
[a]:
|
|
4971
|
-
[
|
|
4972
|
-
}, _ = i === "button", C =
|
|
4973
|
-
if (
|
|
4974
|
-
|
|
5040
|
+
[a]: h,
|
|
5041
|
+
[f]: p
|
|
5042
|
+
}, _ = i === "button", C = m ? _ ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", g = d && (i === "a" || !i) ? 'target="_blank" rel="noopener noreferrer"' : "", S = (T) => {
|
|
5043
|
+
if (m) {
|
|
5044
|
+
T.preventDefault();
|
|
4975
5045
|
return;
|
|
4976
5046
|
}
|
|
4977
|
-
|
|
5047
|
+
d && (i === "a" || !i) || (T.preventDefault(), s ? t.replace(o) : t.push(o));
|
|
4978
5048
|
};
|
|
4979
|
-
return
|
|
4980
|
-
${
|
|
5049
|
+
return ge`
|
|
5050
|
+
${An().when(_, ge`
|
|
4981
5051
|
<button
|
|
4982
5052
|
part="button"
|
|
4983
|
-
:class="${
|
|
5053
|
+
:class="${x}"
|
|
4984
5054
|
${l}
|
|
4985
5055
|
${C}
|
|
4986
|
-
${
|
|
4987
|
-
@click="${
|
|
5056
|
+
${g}
|
|
5057
|
+
@click="${S}"
|
|
4988
5058
|
><slot></slot></button>
|
|
4989
|
-
`).otherwise(
|
|
5059
|
+
`).otherwise(ge`
|
|
4990
5060
|
<a
|
|
4991
5061
|
part="link"
|
|
4992
5062
|
href="${o}"
|
|
4993
|
-
:class="${
|
|
5063
|
+
:class="${x}"
|
|
4994
5064
|
${l}
|
|
4995
5065
|
${C}
|
|
4996
|
-
${
|
|
4997
|
-
@click="${
|
|
5066
|
+
${g}
|
|
5067
|
+
@click="${S}"
|
|
4998
5068
|
><slot></slot></a>
|
|
4999
5069
|
`).done()}
|
|
5000
5070
|
`;
|
|
5001
5071
|
}), t;
|
|
5002
5072
|
}
|
|
5003
5073
|
export {
|
|
5004
|
-
|
|
5005
|
-
|
|
5074
|
+
we as GlobalEventBus,
|
|
5075
|
+
qn as Transition,
|
|
5006
5076
|
Vn as TransitionGroup,
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5077
|
+
U as anchorBlock,
|
|
5078
|
+
Tt as component,
|
|
5079
|
+
zn as computed,
|
|
5080
|
+
Ot as createStore,
|
|
5081
|
+
Zn as createTransitionPreset,
|
|
5082
|
+
pn as css,
|
|
5083
|
+
Kn as each,
|
|
5084
|
+
ar as eachGroup,
|
|
5085
|
+
cr as eachPage,
|
|
5086
|
+
ir as eachWhere,
|
|
5087
|
+
pr as emit,
|
|
5088
|
+
Ne as eventBus,
|
|
5089
|
+
ft as getTransitionStyleSheet,
|
|
5090
|
+
ge as html,
|
|
5091
|
+
wr as initRouter,
|
|
5092
|
+
yr as listen,
|
|
5093
|
+
An as match,
|
|
5024
5094
|
ae as matchRoute,
|
|
5025
|
-
|
|
5095
|
+
br as matchRouteSSR,
|
|
5026
5096
|
le as mediaVariants,
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5097
|
+
gr as off,
|
|
5098
|
+
hr as on,
|
|
5099
|
+
mr as once,
|
|
5100
|
+
jt as parseQuery,
|
|
5031
5101
|
Wn as ref,
|
|
5032
5102
|
Je as renderToString,
|
|
5033
|
-
|
|
5103
|
+
Fn as resolveRouteComponent,
|
|
5034
5104
|
In as responsive,
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5105
|
+
Ft as responsiveOrder,
|
|
5106
|
+
fr as responsiveSwitch,
|
|
5107
|
+
dr as switchOn,
|
|
5108
|
+
sr as switchOnLength,
|
|
5109
|
+
lr as switchOnPromise,
|
|
5110
|
+
Me as transitionPresets,
|
|
5111
|
+
nr as unless,
|
|
5112
|
+
Gn as useEmit,
|
|
5113
|
+
Yn as useOnAttributeChanged,
|
|
5114
|
+
Jn as useOnConnected,
|
|
5115
|
+
Xn as useOnDisconnected,
|
|
5046
5116
|
Qn as useOnError,
|
|
5047
|
-
|
|
5117
|
+
er as useProps,
|
|
5048
5118
|
Bn as useRouter,
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5119
|
+
tr as useStyle,
|
|
5120
|
+
Un as watch,
|
|
5121
|
+
Ve as when,
|
|
5122
|
+
rr as whenEmpty,
|
|
5123
|
+
J as whenMedia,
|
|
5124
|
+
or as whenNotEmpty,
|
|
5125
|
+
ur as whenVariants
|
|
5056
5126
|
};
|
|
5057
5127
|
//# sourceMappingURL=custom-elements-runtime.es.js.map
|