@jasonshimmy/custom-elements-runtime 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements-runtime.cjs.js +19 -12
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1140 -1106
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +19 -12
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/runtime/hooks.d.ts +23 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class yt {
|
|
2
2
|
pendingUpdates = /* @__PURE__ */ new Map();
|
|
3
3
|
isFlushScheduled = !1;
|
|
4
4
|
/**
|
|
@@ -29,12 +29,12 @@ class mt {
|
|
|
29
29
|
return this.pendingUpdates.size;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
34
|
-
|
|
32
|
+
const bt = new yt();
|
|
33
|
+
function de(e, t) {
|
|
34
|
+
bt.schedule(e, t);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
class
|
|
36
|
+
const Je = /* @__PURE__ */ new WeakSet();
|
|
37
|
+
class wt {
|
|
38
38
|
static cache = /* @__PURE__ */ new WeakMap();
|
|
39
39
|
static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
|
|
40
40
|
static objectHandlerCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -47,7 +47,7 @@ class bt {
|
|
|
47
47
|
return i;
|
|
48
48
|
const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
|
|
49
49
|
try {
|
|
50
|
-
|
|
50
|
+
ct.markAsProxy(o);
|
|
51
51
|
} catch {
|
|
52
52
|
}
|
|
53
53
|
return this.cache.set(t, o), o;
|
|
@@ -71,8 +71,8 @@ class bt {
|
|
|
71
71
|
"fill",
|
|
72
72
|
"copyWithin"
|
|
73
73
|
].includes(i) ? function(...a) {
|
|
74
|
-
const
|
|
75
|
-
return t.triggerUpdate(),
|
|
74
|
+
const h = o.apply(n, a);
|
|
75
|
+
return t.triggerUpdate(), h;
|
|
76
76
|
} : o;
|
|
77
77
|
},
|
|
78
78
|
set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
|
|
@@ -118,7 +118,7 @@ class bt {
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
class
|
|
121
|
+
class ct {
|
|
122
122
|
// Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
|
|
123
123
|
// This allows handler caches in ReactiveProxyCache to reuse handlers
|
|
124
124
|
// for identical reactive contexts instead of creating a new context object
|
|
@@ -129,7 +129,7 @@ class ot {
|
|
|
129
129
|
*/
|
|
130
130
|
static createReactiveProxy(t, r, n) {
|
|
131
131
|
try {
|
|
132
|
-
if (
|
|
132
|
+
if (Je.has(t)) return t;
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
135
|
const i = Array.isArray(t);
|
|
@@ -139,7 +139,7 @@ class ot {
|
|
|
139
139
|
return o || (o = {
|
|
140
140
|
triggerUpdate: r,
|
|
141
141
|
makeReactiveValue: n
|
|
142
|
-
}, s.set(n, o)),
|
|
142
|
+
}, s.set(n, o)), wt.getOrCreateProxy(t, o, i);
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* Mark an object as a proxy (for optimization)
|
|
@@ -147,12 +147,12 @@ class ot {
|
|
|
147
147
|
static markAsProxy(t) {
|
|
148
148
|
if (t)
|
|
149
149
|
try {
|
|
150
|
-
|
|
150
|
+
Je.add(t);
|
|
151
151
|
} catch {
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
class
|
|
155
|
+
class xt {
|
|
156
156
|
currentComponent = null;
|
|
157
157
|
componentDependencies = /* @__PURE__ */ new Map();
|
|
158
158
|
componentRenderFunctions = /* @__PURE__ */ new Map();
|
|
@@ -218,11 +218,11 @@ class wt {
|
|
|
218
218
|
*/
|
|
219
219
|
getOrCreateState(t) {
|
|
220
220
|
if (!this.currentComponent)
|
|
221
|
-
return new
|
|
221
|
+
return new Fe(t);
|
|
222
222
|
const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
|
|
223
223
|
if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
|
|
224
224
|
return this.stateStorage.get(i);
|
|
225
|
-
const s = new
|
|
225
|
+
const s = new Fe(t);
|
|
226
226
|
return this.stateStorage.set(i, s), s;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
@@ -237,7 +237,7 @@ class wt {
|
|
|
237
237
|
triggerUpdate(t) {
|
|
238
238
|
t.getDependents().forEach((r) => {
|
|
239
239
|
const n = this.componentRenderFunctions.get(r);
|
|
240
|
-
n &&
|
|
240
|
+
n && de(n, r);
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
@@ -251,8 +251,8 @@ class wt {
|
|
|
251
251
|
this.stateIndexCounter.delete(t);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
const F = new
|
|
255
|
-
class
|
|
254
|
+
const F = new xt();
|
|
255
|
+
class Fe {
|
|
256
256
|
_value;
|
|
257
257
|
dependents = /* @__PURE__ */ new Set();
|
|
258
258
|
constructor(t) {
|
|
@@ -284,7 +284,7 @@ class Ue {
|
|
|
284
284
|
return this.dependents;
|
|
285
285
|
}
|
|
286
286
|
makeReactive(t) {
|
|
287
|
-
return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t :
|
|
287
|
+
return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : ct.createReactiveProxy(
|
|
288
288
|
t,
|
|
289
289
|
() => F.triggerUpdate(this),
|
|
290
290
|
(r) => this.makeReactive(r)
|
|
@@ -308,7 +308,7 @@ function ee(e) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function mr(e) {
|
|
311
|
-
const t = new
|
|
311
|
+
const t = new Fe(e());
|
|
312
312
|
return {
|
|
313
313
|
get value() {
|
|
314
314
|
return F.trackDependency(t), e();
|
|
@@ -327,23 +327,23 @@ function yr(e, t, r = {}) {
|
|
|
327
327
|
F.cleanup(i);
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
|
-
const
|
|
331
|
-
function
|
|
332
|
-
if ($e.has(e))
|
|
333
|
-
return $e.get(e);
|
|
334
|
-
const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
335
|
-
return $e.size < Fe && $e.set(e, t), t;
|
|
336
|
-
}
|
|
337
|
-
function at(e) {
|
|
330
|
+
const ke = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map(), Ve = 500;
|
|
331
|
+
function ie(e) {
|
|
338
332
|
if (ke.has(e))
|
|
339
333
|
return ke.get(e);
|
|
334
|
+
const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
335
|
+
return ke.size < Ve && ke.set(e, t), t;
|
|
336
|
+
}
|
|
337
|
+
function lt(e) {
|
|
338
|
+
if (Ce.has(e))
|
|
339
|
+
return Ce.get(e);
|
|
340
340
|
const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
|
|
341
|
-
return
|
|
341
|
+
return Ce.size < Ve && Ce.set(e, t), t;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function ge(e) {
|
|
344
344
|
if (typeof e == "string") {
|
|
345
|
-
if (
|
|
346
|
-
return
|
|
345
|
+
if (_e.has(e))
|
|
346
|
+
return _e.get(e);
|
|
347
347
|
const t = e.replace(
|
|
348
348
|
/[&<>"']/g,
|
|
349
349
|
(r) => ({
|
|
@@ -354,102 +354,102 @@ function pe(e) {
|
|
|
354
354
|
"'": "'"
|
|
355
355
|
})[r]
|
|
356
356
|
);
|
|
357
|
-
return t !== e &&
|
|
357
|
+
return t !== e && _e.size < Ve && _e.set(e, t), t;
|
|
358
358
|
}
|
|
359
359
|
return e;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function U(e, t) {
|
|
362
362
|
if (typeof t == "string") {
|
|
363
363
|
const r = t.split(".").reduce((n, i) => n?.[i], e);
|
|
364
364
|
return ee(r) ? r.value : r;
|
|
365
365
|
}
|
|
366
366
|
return t;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Ae(e, t, r) {
|
|
369
369
|
const n = String(t).split("."), i = n.pop();
|
|
370
370
|
if (!i) return;
|
|
371
371
|
const s = n.reduce((o, c) => (o[c] == null && (o[c] = {}), o[c]), e);
|
|
372
372
|
ee(s[i]) ? s[i].value = r : s[i] = r;
|
|
373
373
|
}
|
|
374
|
-
const
|
|
375
|
-
function
|
|
376
|
-
|
|
374
|
+
const ut = typeof process < "u" && process.env?.NODE_ENV !== "production";
|
|
375
|
+
function oe(e, ...t) {
|
|
376
|
+
ut && console.error(e, ...t);
|
|
377
377
|
}
|
|
378
378
|
function Le(e, ...t) {
|
|
379
|
-
|
|
379
|
+
ut && console.warn(e, ...t);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function vt(e, t, r) {
|
|
382
382
|
if (r)
|
|
383
383
|
for (const [n, i] of Object.entries(r)) {
|
|
384
384
|
let s, o = {};
|
|
385
385
|
if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(n, {
|
|
386
386
|
callback: s,
|
|
387
387
|
options: o,
|
|
388
|
-
oldValue:
|
|
388
|
+
oldValue: U(e, n)
|
|
389
389
|
}), o.immediate)
|
|
390
390
|
try {
|
|
391
|
-
const c =
|
|
391
|
+
const c = U(e, n);
|
|
392
392
|
s(c, void 0, e);
|
|
393
393
|
} catch (c) {
|
|
394
|
-
|
|
394
|
+
oe(`Error in immediate watcher for "${n}":`, c);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function $t(e, t, r, n) {
|
|
399
399
|
const i = (o, c) => {
|
|
400
400
|
if (o === c) return !0;
|
|
401
401
|
if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
|
|
402
402
|
if (Array.isArray(o) && Array.isArray(c))
|
|
403
|
-
return o.length !== c.length ? !1 : o.every((
|
|
404
|
-
const a = Object.keys(o),
|
|
405
|
-
return a.length !==
|
|
403
|
+
return o.length !== c.length ? !1 : o.every((p, x) => i(p, c[x]));
|
|
404
|
+
const a = Object.keys(o), h = Object.keys(c);
|
|
405
|
+
return a.length !== h.length ? !1 : a.every((p) => i(o[p], c[p]));
|
|
406
406
|
}, s = t.get(r);
|
|
407
407
|
if (s && !i(n, s.oldValue))
|
|
408
408
|
try {
|
|
409
409
|
s.callback(n, s.oldValue, e), s.oldValue = n;
|
|
410
410
|
} catch (o) {
|
|
411
|
-
|
|
411
|
+
oe(`Error in watcher for "${r}":`, o);
|
|
412
412
|
}
|
|
413
413
|
for (const [o, c] of t.entries())
|
|
414
414
|
if (c.options.deep && r.startsWith(o + "."))
|
|
415
415
|
try {
|
|
416
|
-
const a =
|
|
416
|
+
const a = U(e, o);
|
|
417
417
|
i(a, c.oldValue) || (c.callback(a, c.oldValue, e), c.oldValue = a);
|
|
418
418
|
} catch (a) {
|
|
419
|
-
|
|
419
|
+
oe(`Error in deep watcher for "${o}":`, a);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Ze(e, t) {
|
|
423
423
|
return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function kt(e, t, r) {
|
|
426
426
|
t && Object.entries(t).forEach(([n, i]) => {
|
|
427
|
-
const s =
|
|
427
|
+
const s = ie(n), o = e.getAttribute(s);
|
|
428
428
|
if (i.type === Function && typeof e[n] == "function")
|
|
429
429
|
r[n] = e[n];
|
|
430
430
|
else if (typeof e[n] < "u")
|
|
431
431
|
try {
|
|
432
432
|
const c = e[n];
|
|
433
|
-
i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] =
|
|
433
|
+
i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ze(String(c), i.type);
|
|
434
434
|
} catch {
|
|
435
435
|
r[n] = e[n];
|
|
436
436
|
}
|
|
437
|
-
else o !== null ? r[n] =
|
|
437
|
+
else o !== null ? r[n] = Ze(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
t.props &&
|
|
440
|
+
function Ct(e, t, r) {
|
|
441
|
+
t.props && kt(e, t.props, r);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function _t(e, t, r, n) {
|
|
444
444
|
e.onConnected && !r && (e.onConnected(t), n(!0));
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Et(e, t, r, n, i, s, o, c) {
|
|
447
447
|
e.onDisconnected && e.onDisconnected(t), r.forEach((a) => a()), n(), i(), s(!1), o(null), c(!1);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function St(e, t, r, n, i) {
|
|
450
450
|
e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
|
|
451
451
|
}
|
|
452
|
-
class
|
|
452
|
+
class At {
|
|
453
453
|
static cache = /* @__PURE__ */ new Map();
|
|
454
454
|
static maxCacheSize = 1e3;
|
|
455
455
|
// Dangerous patterns to block
|
|
@@ -512,9 +512,9 @@ class St {
|
|
|
512
512
|
return this.createObjectEvaluator(t);
|
|
513
513
|
if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
|
|
514
514
|
const r = t.trim().slice(4);
|
|
515
|
-
return (n) =>
|
|
515
|
+
return (n) => U(n, r);
|
|
516
516
|
}
|
|
517
|
-
return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) =>
|
|
517
|
+
return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => U(r, t);
|
|
518
518
|
}
|
|
519
519
|
static createObjectEvaluator(t) {
|
|
520
520
|
const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
|
|
@@ -524,7 +524,7 @@ class St {
|
|
|
524
524
|
try {
|
|
525
525
|
if (c.startsWith("ctx.")) {
|
|
526
526
|
const a = c.slice(4);
|
|
527
|
-
s[o] =
|
|
527
|
+
s[o] = U(i, a);
|
|
528
528
|
} else
|
|
529
529
|
s[o] = this.evaluateSimpleValue(c, i);
|
|
530
530
|
} catch {
|
|
@@ -548,35 +548,35 @@ class St {
|
|
|
548
548
|
try {
|
|
549
549
|
let n = t;
|
|
550
550
|
const i = [];
|
|
551
|
-
n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (
|
|
551
|
+
n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (x) => `<<#${i.push(x) - 1}#>>`);
|
|
552
552
|
const s = n.match(/ctx\.[\w.]+/g) || [];
|
|
553
|
-
for (const
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
n = n.replace(new RegExp(
|
|
553
|
+
for (const x of s) {
|
|
554
|
+
const m = x.slice(4), d = U(r, m);
|
|
555
|
+
if (d === void 0) return;
|
|
556
|
+
const u = i.push(JSON.stringify(d)) - 1;
|
|
557
|
+
n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
|
|
558
558
|
}
|
|
559
559
|
const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = n.match(o) || [];
|
|
560
|
-
for (const
|
|
561
|
-
if (
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
564
|
-
const
|
|
565
|
-
n = n.replace(new RegExp(
|
|
560
|
+
for (const x of c) {
|
|
561
|
+
if (x.startsWith("ctx.")) continue;
|
|
562
|
+
const m = U(r, x);
|
|
563
|
+
if (m === void 0) return;
|
|
564
|
+
const d = i.push(JSON.stringify(m)) - 1;
|
|
565
|
+
n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
|
|
566
566
|
}
|
|
567
567
|
const a = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
568
|
-
let
|
|
569
|
-
const
|
|
570
|
-
for (; (
|
|
571
|
-
const
|
|
572
|
-
if (["true", "false", "null", "undefined"].includes(
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
if (
|
|
576
|
-
const
|
|
577
|
-
|
|
568
|
+
let h;
|
|
569
|
+
const p = /* @__PURE__ */ new Set();
|
|
570
|
+
for (; (h = a.exec(n)) !== null; ) {
|
|
571
|
+
const x = h[1];
|
|
572
|
+
if (["true", "false", "null", "undefined"].includes(x) || /^[0-9]+$/.test(x) || x === "ctx" || p.has(x)) continue;
|
|
573
|
+
p.add(x);
|
|
574
|
+
const m = U(r, x);
|
|
575
|
+
if (m === void 0) return;
|
|
576
|
+
const d = JSON.stringify(m), u = i.push(d) - 1;
|
|
577
|
+
x.includes(".") ? n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`) : n = n.replace(new RegExp("\\b" + x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${u}#>>`);
|
|
578
578
|
}
|
|
579
|
-
n = n.replace(/<<#(\d+)#>>/g, (
|
|
579
|
+
n = n.replace(/<<#(\d+)#>>/g, (x, m) => i[Number(m)]);
|
|
580
580
|
try {
|
|
581
581
|
return this.evaluateBasicExpression(n);
|
|
582
582
|
} catch {
|
|
@@ -599,12 +599,12 @@ class St {
|
|
|
599
599
|
return r[n];
|
|
600
600
|
}
|
|
601
601
|
function s(l) {
|
|
602
|
-
const
|
|
603
|
-
if (l && !
|
|
602
|
+
const f = r[n++];
|
|
603
|
+
if (l && !f)
|
|
604
604
|
throw new Error(`Unexpected token EOF, expected ${l}`);
|
|
605
|
-
if (l &&
|
|
606
|
-
throw new Error(`Unexpected token ${
|
|
607
|
-
return
|
|
605
|
+
if (l && f && f.type !== l && f.value !== l)
|
|
606
|
+
throw new Error(`Unexpected token ${f.type}/${f.value}, expected ${l}`);
|
|
607
|
+
return f;
|
|
608
608
|
}
|
|
609
609
|
function o() {
|
|
610
610
|
return c();
|
|
@@ -613,101 +613,101 @@ class St {
|
|
|
613
613
|
let l = a();
|
|
614
614
|
if (i() && i().value === "?") {
|
|
615
615
|
s("?");
|
|
616
|
-
const
|
|
616
|
+
const f = o();
|
|
617
617
|
s(":");
|
|
618
|
-
const
|
|
619
|
-
return l ?
|
|
618
|
+
const b = o();
|
|
619
|
+
return l ? f : b;
|
|
620
620
|
}
|
|
621
621
|
return l;
|
|
622
622
|
}
|
|
623
623
|
function a() {
|
|
624
|
-
let l =
|
|
624
|
+
let l = h();
|
|
625
625
|
for (; i() && i().value === "||"; ) {
|
|
626
626
|
s("OP");
|
|
627
|
-
const
|
|
628
|
-
l = l ||
|
|
627
|
+
const f = h();
|
|
628
|
+
l = l || f;
|
|
629
629
|
}
|
|
630
630
|
return l;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
let l =
|
|
632
|
+
function h() {
|
|
633
|
+
let l = p();
|
|
634
634
|
for (; i() && i().value === "&&"; ) {
|
|
635
635
|
s("OP");
|
|
636
|
-
const
|
|
637
|
-
l = l &&
|
|
636
|
+
const f = p();
|
|
637
|
+
l = l && f;
|
|
638
638
|
}
|
|
639
639
|
return l;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
let l =
|
|
641
|
+
function p() {
|
|
642
|
+
let l = x();
|
|
643
643
|
for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
|
|
644
|
-
const
|
|
645
|
-
switch (
|
|
644
|
+
const f = s("OP").value, b = x();
|
|
645
|
+
switch (f) {
|
|
646
646
|
case "==":
|
|
647
|
-
l = l ==
|
|
647
|
+
l = l == b;
|
|
648
648
|
break;
|
|
649
649
|
case "!=":
|
|
650
|
-
l = l !=
|
|
650
|
+
l = l != b;
|
|
651
651
|
break;
|
|
652
652
|
case "===":
|
|
653
|
-
l = l ===
|
|
653
|
+
l = l === b;
|
|
654
654
|
break;
|
|
655
655
|
case "!==":
|
|
656
|
-
l = l !==
|
|
656
|
+
l = l !== b;
|
|
657
657
|
break;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
return l;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
let l =
|
|
662
|
+
function x() {
|
|
663
|
+
let l = m();
|
|
664
664
|
for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
|
|
665
|
-
const
|
|
666
|
-
switch (
|
|
665
|
+
const f = s("OP").value, b = m();
|
|
666
|
+
switch (f) {
|
|
667
667
|
case ">":
|
|
668
|
-
l = l >
|
|
668
|
+
l = l > b;
|
|
669
669
|
break;
|
|
670
670
|
case "<":
|
|
671
|
-
l = l <
|
|
671
|
+
l = l < b;
|
|
672
672
|
break;
|
|
673
673
|
case ">=":
|
|
674
|
-
l = l >=
|
|
674
|
+
l = l >= b;
|
|
675
675
|
break;
|
|
676
676
|
case "<=":
|
|
677
|
-
l = l <=
|
|
677
|
+
l = l <= b;
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
return l;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
let l =
|
|
683
|
+
function m() {
|
|
684
|
+
let l = d();
|
|
685
685
|
for (; i() && (i().value === "+" || i().value === "-"); ) {
|
|
686
|
-
const
|
|
687
|
-
l =
|
|
686
|
+
const f = s("OP").value, b = d();
|
|
687
|
+
l = f === "+" ? l + b : l - b;
|
|
688
688
|
}
|
|
689
689
|
return l;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
let l =
|
|
691
|
+
function d() {
|
|
692
|
+
let l = u();
|
|
693
693
|
for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
|
|
694
|
-
const
|
|
695
|
-
switch (
|
|
694
|
+
const f = s("OP").value, b = u();
|
|
695
|
+
switch (f) {
|
|
696
696
|
case "*":
|
|
697
|
-
l = l *
|
|
697
|
+
l = l * b;
|
|
698
698
|
break;
|
|
699
699
|
case "/":
|
|
700
|
-
l = l /
|
|
700
|
+
l = l / b;
|
|
701
701
|
break;
|
|
702
702
|
case "%":
|
|
703
|
-
l = l %
|
|
703
|
+
l = l % b;
|
|
704
704
|
break;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
return l;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return i() && i().value === "!" ? (s("OP"), !
|
|
709
|
+
function u() {
|
|
710
|
+
return i() && i().value === "!" ? (s("OP"), !u()) : i() && i().value === "-" ? (s("OP"), -u()) : y();
|
|
711
711
|
}
|
|
712
712
|
function y() {
|
|
713
713
|
const l = i();
|
|
@@ -720,15 +720,15 @@ class St {
|
|
|
720
720
|
return s("IDENT"), l.value === "true" ? !0 : l.value === "false" ? !1 : l.value === "null" ? null : void 0;
|
|
721
721
|
if (l.value === "[") {
|
|
722
722
|
s("PUNC");
|
|
723
|
-
const
|
|
723
|
+
const f = [];
|
|
724
724
|
for (; i() && i().value !== "]"; )
|
|
725
|
-
|
|
726
|
-
return s("PUNC"),
|
|
725
|
+
f.push(o()), i() && i().value === "," && s("PUNC");
|
|
726
|
+
return s("PUNC"), f;
|
|
727
727
|
}
|
|
728
728
|
if (l.value === "(") {
|
|
729
729
|
s("PUNC");
|
|
730
|
-
const
|
|
731
|
-
return s("PUNC"),
|
|
730
|
+
const f = o();
|
|
731
|
+
return s("PUNC"), f;
|
|
732
732
|
}
|
|
733
733
|
throw new Error("Unexpected token in expression");
|
|
734
734
|
}
|
|
@@ -750,7 +750,7 @@ class St {
|
|
|
750
750
|
if (!isNaN(Number(t))) return Number(t);
|
|
751
751
|
if (t.startsWith("ctx.")) {
|
|
752
752
|
const n = t.slice(4);
|
|
753
|
-
return
|
|
753
|
+
return U(r, n);
|
|
754
754
|
}
|
|
755
755
|
return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
|
|
756
756
|
}
|
|
@@ -761,7 +761,7 @@ class St {
|
|
|
761
761
|
return this.cache.size;
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
|
-
class
|
|
764
|
+
class ae {
|
|
765
765
|
static cleanupFunctions = /* @__PURE__ */ new WeakMap();
|
|
766
766
|
/**
|
|
767
767
|
* Add an event listener with automatic cleanup tracking
|
|
@@ -835,163 +835,163 @@ class oe {
|
|
|
835
835
|
return n ? n.length : 0;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function fe(e, t) {
|
|
839
839
|
if (t && e instanceof HTMLElement) {
|
|
840
|
-
|
|
840
|
+
ae.cleanup(e);
|
|
841
841
|
for (const r in t)
|
|
842
842
|
t[r] === e && delete t[r];
|
|
843
843
|
for (const r of Array.from(e.childNodes))
|
|
844
|
-
|
|
844
|
+
fe(r, t);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function be(e, t, r) {
|
|
848
848
|
if (typeof e == "string") return;
|
|
849
849
|
const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
850
850
|
n ? n.value = t : i && r && (r[i] = t);
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function jt(e, t, r, n, i, s, o, c) {
|
|
853
853
|
if (!s) return;
|
|
854
|
-
const a = t.includes("lazy"),
|
|
855
|
-
if (
|
|
854
|
+
const a = t.includes("lazy"), h = t.includes("trim"), p = t.includes("number"), x = e && typeof e == "object" && "value" in e && typeof e.value < "u", m = () => {
|
|
855
|
+
if (x) {
|
|
856
856
|
const k = e.value;
|
|
857
857
|
return c && typeof k == "object" && k !== null ? k[c] : k;
|
|
858
858
|
}
|
|
859
|
-
return
|
|
860
|
-
},
|
|
861
|
-
let
|
|
862
|
-
o instanceof HTMLInputElement ?
|
|
863
|
-
const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ?
|
|
864
|
-
if (
|
|
865
|
-
if (Array.isArray(
|
|
866
|
-
r[l] =
|
|
859
|
+
return U(s._state || s, e);
|
|
860
|
+
}, d = m();
|
|
861
|
+
let u = "text";
|
|
862
|
+
o instanceof HTMLInputElement ? u = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? u = "select" : o instanceof HTMLTextAreaElement && (u = "textarea");
|
|
863
|
+
const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ? u === "checkbox" || u === "radio" ? "checked" : "value" : c ?? "modelValue";
|
|
864
|
+
if (u === "checkbox")
|
|
865
|
+
if (Array.isArray(d))
|
|
866
|
+
r[l] = d.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
|
|
867
867
|
else {
|
|
868
868
|
const k = o?.getAttribute("true-value") ?? !0;
|
|
869
|
-
r[l] =
|
|
869
|
+
r[l] = d === k;
|
|
870
870
|
}
|
|
871
|
-
else if (
|
|
872
|
-
r[l] =
|
|
873
|
-
else if (
|
|
871
|
+
else if (u === "radio")
|
|
872
|
+
r[l] = d === (n?.value ?? "");
|
|
873
|
+
else if (u === "select")
|
|
874
874
|
if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
|
|
875
|
-
const k = Array.isArray(
|
|
875
|
+
const k = Array.isArray(d) ? d.map(String) : [];
|
|
876
876
|
setTimeout(() => {
|
|
877
877
|
Array.from(o.options).forEach((C) => {
|
|
878
878
|
C.selected = k.includes(C.value);
|
|
879
879
|
});
|
|
880
|
-
}, 0), r[l] = Array.isArray(
|
|
880
|
+
}, 0), r[l] = Array.isArray(d) ? d : [];
|
|
881
881
|
} else
|
|
882
|
-
r[l] =
|
|
882
|
+
r[l] = d;
|
|
883
883
|
else {
|
|
884
|
-
r[l] =
|
|
884
|
+
r[l] = d;
|
|
885
885
|
try {
|
|
886
|
-
const k =
|
|
887
|
-
n && (n[k] =
|
|
886
|
+
const k = ie(l);
|
|
887
|
+
n && (n[k] = d);
|
|
888
888
|
} catch {
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
const
|
|
891
|
+
const f = a || u === "checkbox" || u === "radio" || u === "select" ? "change" : "input", b = (k) => {
|
|
892
892
|
if (k.isComposing || i._isComposing) return;
|
|
893
893
|
const C = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
|
|
894
894
|
if (k.isTrusted === !1 && !C) return;
|
|
895
|
-
const
|
|
896
|
-
if (!
|
|
897
|
-
let $ =
|
|
898
|
-
if (
|
|
899
|
-
const
|
|
900
|
-
if (Array.isArray(
|
|
901
|
-
const
|
|
902
|
-
if (
|
|
903
|
-
|
|
895
|
+
const g = k.target;
|
|
896
|
+
if (!g || g._modelUpdating) return;
|
|
897
|
+
let $ = g.value;
|
|
898
|
+
if (u === "checkbox") {
|
|
899
|
+
const A = m();
|
|
900
|
+
if (Array.isArray(A)) {
|
|
901
|
+
const D = g.getAttribute("value") ?? "", S = Array.from(A);
|
|
902
|
+
if (g.checked)
|
|
903
|
+
S.includes(D) || S.push(D);
|
|
904
904
|
else {
|
|
905
|
-
const O =
|
|
906
|
-
O > -1 &&
|
|
905
|
+
const O = S.indexOf(D);
|
|
906
|
+
O > -1 && S.splice(O, 1);
|
|
907
907
|
}
|
|
908
|
-
$ =
|
|
908
|
+
$ = S;
|
|
909
909
|
} else {
|
|
910
|
-
const
|
|
911
|
-
$ =
|
|
910
|
+
const D = g.getAttribute("true-value") ?? !0, S = g.getAttribute("false-value") ?? !1;
|
|
911
|
+
$ = g.checked ? D : S;
|
|
912
912
|
}
|
|
913
|
-
} else if (
|
|
914
|
-
$ =
|
|
915
|
-
else if (
|
|
916
|
-
$ = Array.from(
|
|
917
|
-
else if (
|
|
918
|
-
const
|
|
919
|
-
isNaN(
|
|
913
|
+
} else if (u === "radio")
|
|
914
|
+
$ = g.getAttribute("value") ?? g.value;
|
|
915
|
+
else if (u === "select" && g.multiple)
|
|
916
|
+
$ = Array.from(g.selectedOptions).map((A) => A.value);
|
|
917
|
+
else if (h && typeof $ == "string" && ($ = $.trim()), p) {
|
|
918
|
+
const A = Number($);
|
|
919
|
+
isNaN(A) || ($ = A);
|
|
920
920
|
}
|
|
921
|
-
const
|
|
921
|
+
const j = s._state || s, v = m();
|
|
922
922
|
if (Array.isArray($) && Array.isArray(v) ? JSON.stringify([...$].sort()) !== JSON.stringify([...v].sort()) : $ !== v) {
|
|
923
|
-
|
|
923
|
+
g._modelUpdating = !0;
|
|
924
924
|
try {
|
|
925
|
-
if (
|
|
925
|
+
if (x)
|
|
926
926
|
if (c && typeof e.value == "object" && e.value !== null) {
|
|
927
|
-
const
|
|
928
|
-
|
|
927
|
+
const A = { ...e.value };
|
|
928
|
+
A[c] = $, e.value = A;
|
|
929
929
|
} else
|
|
930
930
|
e.value = $;
|
|
931
931
|
else
|
|
932
|
-
|
|
932
|
+
Ae(j, e, $);
|
|
933
933
|
if (s._requestRender && s._requestRender(), s._triggerWatchers) {
|
|
934
|
-
const
|
|
935
|
-
s._triggerWatchers(
|
|
934
|
+
const A = x ? "reactiveState" : e;
|
|
935
|
+
s._triggerWatchers(A, $);
|
|
936
936
|
}
|
|
937
|
-
if (
|
|
938
|
-
const
|
|
937
|
+
if (g) {
|
|
938
|
+
const A = `update:${ie(l)}`, D = new CustomEvent(A, {
|
|
939
939
|
detail: $,
|
|
940
940
|
bubbles: !0,
|
|
941
941
|
composed: !0
|
|
942
942
|
});
|
|
943
|
-
|
|
943
|
+
g.dispatchEvent(D);
|
|
944
944
|
}
|
|
945
945
|
} finally {
|
|
946
|
-
setTimeout(() =>
|
|
946
|
+
setTimeout(() => g._modelUpdating = !1, 0);
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
};
|
|
950
950
|
if (y) {
|
|
951
|
-
if (i[
|
|
952
|
-
const k = i[
|
|
953
|
-
o &&
|
|
951
|
+
if (i[f]) {
|
|
952
|
+
const k = i[f];
|
|
953
|
+
o && ae.removeListener(o, f, k);
|
|
954
954
|
}
|
|
955
|
-
i[
|
|
955
|
+
i[f] = b;
|
|
956
956
|
} else {
|
|
957
|
-
const k = `update:${
|
|
957
|
+
const k = `update:${ie(l)}`;
|
|
958
958
|
if (i[k]) {
|
|
959
959
|
const C = i[k];
|
|
960
|
-
o &&
|
|
960
|
+
o && ae.removeListener(o, k, C);
|
|
961
961
|
}
|
|
962
962
|
i[k] = (C) => {
|
|
963
|
-
const
|
|
964
|
-
if (Array.isArray($) && Array.isArray(
|
|
965
|
-
|
|
966
|
-
const
|
|
967
|
-
if (
|
|
968
|
-
|
|
963
|
+
const g = s._state || s, $ = C.detail !== void 0 ? C.detail : C.target?.value, j = U(g, e);
|
|
964
|
+
if (Array.isArray($) && Array.isArray(j) ? JSON.stringify([...$].sort()) !== JSON.stringify([...j].sort()) : $ !== j) {
|
|
965
|
+
Ae(g, e, $), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, $);
|
|
966
|
+
const _ = C.target;
|
|
967
|
+
if (_) {
|
|
968
|
+
_[l] = $;
|
|
969
969
|
try {
|
|
970
|
-
const
|
|
971
|
-
typeof $ == "boolean" ? $ ?
|
|
970
|
+
const A = ie(l);
|
|
971
|
+
typeof $ == "boolean" ? $ ? _.setAttribute(A, "true") : _.setAttribute(A, "false") : _.setAttribute(A, String($));
|
|
972
972
|
} catch {
|
|
973
973
|
}
|
|
974
974
|
queueMicrotask(() => {
|
|
975
|
-
typeof
|
|
975
|
+
typeof _._applyProps == "function" && _._applyProps(_._cfg), typeof _._requestRender == "function" && _._requestRender();
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
};
|
|
980
980
|
}
|
|
981
|
-
(
|
|
981
|
+
(u === "text" || u === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (k) => {
|
|
982
982
|
i._isComposing = !1;
|
|
983
983
|
const C = k.target;
|
|
984
984
|
C && setTimeout(() => {
|
|
985
|
-
const
|
|
986
|
-
let v =
|
|
987
|
-
if (
|
|
988
|
-
const
|
|
989
|
-
isNaN(
|
|
985
|
+
const g = C.value, $ = s._state || s, j = U($, e);
|
|
986
|
+
let v = g;
|
|
987
|
+
if (h && (v = v.trim()), p) {
|
|
988
|
+
const A = Number(v);
|
|
989
|
+
isNaN(A) || (v = A);
|
|
990
990
|
}
|
|
991
|
-
if (Array.isArray(v) && Array.isArray(
|
|
991
|
+
if (Array.isArray(v) && Array.isArray(j) ? JSON.stringify([...v].sort()) !== JSON.stringify([...j].sort()) : v !== j) {
|
|
992
992
|
C._modelUpdating = !0;
|
|
993
993
|
try {
|
|
994
|
-
|
|
994
|
+
Ae($, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
|
|
995
995
|
} finally {
|
|
996
996
|
setTimeout(() => C._modelUpdating = !1, 0);
|
|
997
997
|
}
|
|
@@ -999,18 +999,18 @@ function At(e, t, r, n, i, s, o, c) {
|
|
|
999
999
|
}, 0);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function ft(e) {
|
|
1003
1003
|
const t = e.slice(2);
|
|
1004
1004
|
return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Ot(e, t, r, n) {
|
|
1007
1007
|
if (typeof e == "object" && e !== null)
|
|
1008
1008
|
for (const [i, s] of Object.entries(e))
|
|
1009
1009
|
i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
|
|
1010
1010
|
else if (typeof e == "string") {
|
|
1011
1011
|
if (!n) return;
|
|
1012
1012
|
try {
|
|
1013
|
-
const i =
|
|
1013
|
+
const i = xe(e, n);
|
|
1014
1014
|
if (typeof i == "object" && i !== null) {
|
|
1015
1015
|
for (const [s, o] of Object.entries(i))
|
|
1016
1016
|
s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? r[s] = o : t[s] = o;
|
|
@@ -1020,16 +1020,16 @@ function jt(e, t, r, n) {
|
|
|
1020
1020
|
return;
|
|
1021
1021
|
}
|
|
1022
1022
|
} catch {
|
|
1023
|
-
const i =
|
|
1023
|
+
const i = U(n, e);
|
|
1024
1024
|
r[e] = i;
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function Tt(e, t, r) {
|
|
1029
1029
|
let n;
|
|
1030
1030
|
if (typeof e == "string") {
|
|
1031
1031
|
if (!r) return;
|
|
1032
|
-
n =
|
|
1032
|
+
n = xe(e, r);
|
|
1033
1033
|
} else
|
|
1034
1034
|
n = e;
|
|
1035
1035
|
const i = t.style || "";
|
|
@@ -1050,14 +1050,14 @@ function Ot(e, t, r) {
|
|
|
1050
1050
|
s = "display: none";
|
|
1051
1051
|
s !== i && (s ? t.style = s : delete t.style);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1053
|
+
function xe(e, t) {
|
|
1054
|
+
return At.evaluate(e, t);
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function Rt(e, t, r) {
|
|
1057
1057
|
let n;
|
|
1058
1058
|
if (typeof e == "string") {
|
|
1059
1059
|
if (!r) return;
|
|
1060
|
-
n =
|
|
1060
|
+
n = xe(e, r);
|
|
1061
1061
|
} else
|
|
1062
1062
|
n = e;
|
|
1063
1063
|
let i = [];
|
|
@@ -1065,11 +1065,11 @@ function Tt(e, t, r) {
|
|
|
1065
1065
|
const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
|
|
1066
1066
|
o && (t.class = o);
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Pt(e, t, r) {
|
|
1069
1069
|
let n;
|
|
1070
1070
|
if (typeof e == "string") {
|
|
1071
1071
|
if (!r) return;
|
|
1072
|
-
n =
|
|
1072
|
+
n = xe(e, r);
|
|
1073
1073
|
} else
|
|
1074
1074
|
n = e;
|
|
1075
1075
|
let i = "";
|
|
@@ -1079,10 +1079,10 @@ function Rt(e, t, r) {
|
|
|
1079
1079
|
const o = [];
|
|
1080
1080
|
for (const [c, a] of Object.entries(n))
|
|
1081
1081
|
if (a != null && a !== "") {
|
|
1082
|
-
const
|
|
1082
|
+
const h = c.replace(
|
|
1083
1083
|
/[A-Z]/g,
|
|
1084
|
-
(
|
|
1085
|
-
),
|
|
1084
|
+
(m) => `-${m.toLowerCase()}`
|
|
1085
|
+
), p = [
|
|
1086
1086
|
"width",
|
|
1087
1087
|
"height",
|
|
1088
1088
|
"top",
|
|
@@ -1108,8 +1108,8 @@ function Rt(e, t, r) {
|
|
|
1108
1108
|
"min-height",
|
|
1109
1109
|
"max-height"
|
|
1110
1110
|
];
|
|
1111
|
-
let
|
|
1112
|
-
typeof a == "number" &&
|
|
1111
|
+
let x = String(a);
|
|
1112
|
+
typeof a == "number" && p.includes(h) && (x = `${a}px`), o.push(`${h}: ${x}`);
|
|
1113
1113
|
}
|
|
1114
1114
|
i = o.join("; ") + (o.length > 0 ? ";" : "");
|
|
1115
1115
|
}
|
|
@@ -1118,55 +1118,55 @@ function Rt(e, t, r) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
function Lt(e, t, r) {
|
|
1120
1120
|
let n = e;
|
|
1121
|
-
typeof e == "string" && r && (n =
|
|
1121
|
+
typeof e == "string" && r && (n = xe(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function dt(e, t, r, n) {
|
|
1124
1124
|
const i = {}, s = { ...n || {} }, o = {};
|
|
1125
1125
|
for (const [c, a] of Object.entries(e)) {
|
|
1126
|
-
const { value:
|
|
1126
|
+
const { value: h, modifiers: p, arg: x } = a;
|
|
1127
1127
|
if (c === "model" || c.startsWith("model:")) {
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1130
|
-
p,
|
|
1131
|
-
// Pass the original value (could be string or reactive state object)
|
|
1128
|
+
const m = c.split(":"), d = m.length > 1 ? m[1] : x;
|
|
1129
|
+
jt(
|
|
1132
1130
|
h,
|
|
1131
|
+
// Pass the original value (could be string or reactive state object)
|
|
1132
|
+
p,
|
|
1133
1133
|
i,
|
|
1134
1134
|
s,
|
|
1135
1135
|
o,
|
|
1136
1136
|
t,
|
|
1137
1137
|
r,
|
|
1138
|
-
|
|
1138
|
+
d
|
|
1139
1139
|
);
|
|
1140
1140
|
continue;
|
|
1141
1141
|
}
|
|
1142
1142
|
switch (c) {
|
|
1143
1143
|
case "bind":
|
|
1144
|
-
|
|
1144
|
+
Ot(h, i, s, t);
|
|
1145
1145
|
break;
|
|
1146
1146
|
case "show":
|
|
1147
|
-
|
|
1147
|
+
Tt(h, s, t);
|
|
1148
1148
|
break;
|
|
1149
1149
|
case "class":
|
|
1150
|
-
|
|
1150
|
+
Rt(h, s, t);
|
|
1151
1151
|
break;
|
|
1152
1152
|
case "style":
|
|
1153
|
-
|
|
1153
|
+
Pt(h, s, t);
|
|
1154
1154
|
break;
|
|
1155
1155
|
case "ref":
|
|
1156
|
-
Lt(
|
|
1156
|
+
Lt(h, i, t);
|
|
1157
1157
|
break;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
return { props: i, attrs: s, listeners: o };
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function Ke(e, t) {
|
|
1163
1163
|
if (Array.isArray(e)) {
|
|
1164
1164
|
const s = /* @__PURE__ */ new Set();
|
|
1165
1165
|
return e.map((o) => {
|
|
1166
1166
|
if (!o || typeof o != "object") return o;
|
|
1167
1167
|
let c = o.props?.key ?? o.key;
|
|
1168
1168
|
if (!c) {
|
|
1169
|
-
const
|
|
1169
|
+
const x = o.tag || "node", d = [
|
|
1170
1170
|
// attrs (kebab-case)
|
|
1171
1171
|
o.props?.attrs?.id,
|
|
1172
1172
|
o.props?.attrs?.name,
|
|
@@ -1176,23 +1176,23 @@ function qe(e, t) {
|
|
|
1176
1176
|
o.props?.props?.name,
|
|
1177
1177
|
o.props?.props?.dataKey,
|
|
1178
1178
|
o.props?.props?.["data-key"]
|
|
1179
|
-
].find((
|
|
1180
|
-
c =
|
|
1179
|
+
].find((u) => u != null) ?? "";
|
|
1180
|
+
c = d ? `${t}:${x}:${d}` : `${t}:${x}`;
|
|
1181
1181
|
}
|
|
1182
|
-
let a = c,
|
|
1182
|
+
let a = c, h = 1;
|
|
1183
1183
|
for (; s.has(a); )
|
|
1184
|
-
a = `${c}#${
|
|
1184
|
+
a = `${c}#${h++}`;
|
|
1185
1185
|
s.add(a);
|
|
1186
|
-
let
|
|
1187
|
-
return Array.isArray(
|
|
1186
|
+
let p = o.children;
|
|
1187
|
+
return Array.isArray(p) && (p = Ke(p, a)), { ...o, key: a, children: p };
|
|
1188
1188
|
});
|
|
1189
1189
|
}
|
|
1190
1190
|
const r = e;
|
|
1191
1191
|
let n = r.props?.key ?? r.key ?? t, i = r.children;
|
|
1192
|
-
return Array.isArray(i) && (i =
|
|
1192
|
+
return Array.isArray(i) && (i = Ke(i, n)), { ...r, key: n, children: i };
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1195
|
-
const i = r.directives ?? {}, s =
|
|
1194
|
+
function Ge(e, t, r, n) {
|
|
1195
|
+
const i = r.directives ?? {}, s = dt(
|
|
1196
1196
|
i,
|
|
1197
1197
|
n,
|
|
1198
1198
|
e,
|
|
@@ -1205,39 +1205,39 @@ function Je(e, t, r, n) {
|
|
|
1205
1205
|
...t.attrs,
|
|
1206
1206
|
...r.attrs,
|
|
1207
1207
|
...s.attrs
|
|
1208
|
-
}, a = t.props ?? {},
|
|
1209
|
-
let
|
|
1210
|
-
for (const
|
|
1211
|
-
const y = a[
|
|
1212
|
-
if (y !==
|
|
1213
|
-
if (
|
|
1214
|
-
e.value !==
|
|
1215
|
-
else if (
|
|
1216
|
-
e.checked = !!
|
|
1217
|
-
else if (
|
|
1218
|
-
const l =
|
|
1219
|
-
typeof y == "function" &&
|
|
1220
|
-
} else if (
|
|
1221
|
-
e.removeAttribute(
|
|
1222
|
-
else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) ||
|
|
1208
|
+
}, a = t.props ?? {}, h = o, p = r?.isCustomElement ?? t?.isCustomElement ?? !1;
|
|
1209
|
+
let x = !1;
|
|
1210
|
+
for (const u in { ...a, ...h }) {
|
|
1211
|
+
const y = a[u], w = h[u];
|
|
1212
|
+
if (y !== w)
|
|
1213
|
+
if (x = !0, u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
|
|
1214
|
+
e.value !== w && (e.value = w ?? "");
|
|
1215
|
+
else if (u === "checked" && e instanceof HTMLInputElement)
|
|
1216
|
+
e.checked = !!w;
|
|
1217
|
+
else if (u.startsWith("on") && typeof w == "function") {
|
|
1218
|
+
const l = ft(u);
|
|
1219
|
+
typeof y == "function" && ae.removeListener(e, l, y), ae.addListener(e, l, w);
|
|
1220
|
+
} else if (w == null)
|
|
1221
|
+
e.removeAttribute(u);
|
|
1222
|
+
else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || u in e)
|
|
1223
1223
|
try {
|
|
1224
|
-
e[
|
|
1224
|
+
e[u] = w;
|
|
1225
1225
|
} catch {
|
|
1226
1226
|
}
|
|
1227
1227
|
else
|
|
1228
|
-
|
|
1228
|
+
w === !1 && e.removeAttribute(u);
|
|
1229
1229
|
}
|
|
1230
|
-
for (const [
|
|
1230
|
+
for (const [u, y] of Object.entries(
|
|
1231
1231
|
s.listeners || {}
|
|
1232
1232
|
))
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1235
|
-
for (const
|
|
1236
|
-
const y =
|
|
1237
|
-
let l = y,
|
|
1238
|
-
if (ee(y) && (l = y.value), ee(
|
|
1239
|
-
if (
|
|
1240
|
-
if (e.removeAttribute(
|
|
1233
|
+
ae.addListener(e, u, y);
|
|
1234
|
+
const m = t.attrs ?? {}, d = c;
|
|
1235
|
+
for (const u in { ...m, ...d }) {
|
|
1236
|
+
const y = m[u], w = d[u];
|
|
1237
|
+
let l = y, f = w;
|
|
1238
|
+
if (ee(y) && (l = y.value), ee(w) && (f = w.value), l !== f)
|
|
1239
|
+
if (x = !0, f == null || f === !1) {
|
|
1240
|
+
if (e.removeAttribute(u), u === "value") {
|
|
1241
1241
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
|
|
1242
1242
|
try {
|
|
1243
1243
|
e.value = "";
|
|
@@ -1254,69 +1254,69 @@ function Je(e, t, r, n) {
|
|
|
1254
1254
|
} catch {
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
|
-
if (
|
|
1257
|
+
if (u === "checked" && e instanceof HTMLInputElement)
|
|
1258
1258
|
try {
|
|
1259
1259
|
e.checked = !1;
|
|
1260
1260
|
} catch {
|
|
1261
1261
|
}
|
|
1262
|
-
if (
|
|
1262
|
+
if (u === "disabled")
|
|
1263
1263
|
try {
|
|
1264
1264
|
e.disabled = !1;
|
|
1265
1265
|
} catch {
|
|
1266
1266
|
}
|
|
1267
1267
|
} else {
|
|
1268
|
-
if (
|
|
1268
|
+
if (u === "value") {
|
|
1269
1269
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
1270
1270
|
try {
|
|
1271
|
-
e.value =
|
|
1271
|
+
e.value = f ?? "";
|
|
1272
1272
|
} catch {
|
|
1273
|
-
e.setAttribute(
|
|
1273
|
+
e.setAttribute(u, String(f));
|
|
1274
1274
|
}
|
|
1275
1275
|
continue;
|
|
1276
1276
|
} else if (e instanceof HTMLSelectElement) {
|
|
1277
1277
|
try {
|
|
1278
|
-
e.value =
|
|
1278
|
+
e.value = f ?? "";
|
|
1279
1279
|
} catch {
|
|
1280
1280
|
}
|
|
1281
1281
|
continue;
|
|
1282
1282
|
} else if (e instanceof HTMLProgressElement) {
|
|
1283
1283
|
try {
|
|
1284
|
-
e.value = Number(
|
|
1284
|
+
e.value = Number(f);
|
|
1285
1285
|
} catch {
|
|
1286
1286
|
}
|
|
1287
1287
|
continue;
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
if (
|
|
1290
|
+
if (u === "checked" && e instanceof HTMLInputElement) {
|
|
1291
1291
|
try {
|
|
1292
|
-
e.checked = !!
|
|
1292
|
+
e.checked = !!f;
|
|
1293
1293
|
} catch {
|
|
1294
1294
|
}
|
|
1295
1295
|
continue;
|
|
1296
1296
|
}
|
|
1297
|
-
if (
|
|
1298
|
-
e.setAttribute(
|
|
1297
|
+
if (u === "style") {
|
|
1298
|
+
e.setAttribute(u, String(f));
|
|
1299
1299
|
continue;
|
|
1300
1300
|
}
|
|
1301
|
-
const
|
|
1302
|
-
if (
|
|
1303
|
-
const k =
|
|
1301
|
+
const b = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1302
|
+
if (p && !b && u.includes("-")) {
|
|
1303
|
+
const k = lt(u);
|
|
1304
1304
|
try {
|
|
1305
|
-
e[k] =
|
|
1305
|
+
e[k] = f;
|
|
1306
1306
|
} catch {
|
|
1307
|
-
e.setAttribute(
|
|
1307
|
+
e.setAttribute(u, String(f));
|
|
1308
1308
|
}
|
|
1309
|
-
} else if (!
|
|
1309
|
+
} else if (!b && u in e)
|
|
1310
1310
|
try {
|
|
1311
|
-
e[
|
|
1311
|
+
e[u] = f;
|
|
1312
1312
|
} catch {
|
|
1313
|
-
e.setAttribute(
|
|
1313
|
+
e.setAttribute(u, String(f));
|
|
1314
1314
|
}
|
|
1315
1315
|
else
|
|
1316
|
-
e.setAttribute(
|
|
1316
|
+
e.setAttribute(u, String(f));
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
if (
|
|
1319
|
+
if (p && x)
|
|
1320
1320
|
try {
|
|
1321
1321
|
if (typeof e._applyProps == "function")
|
|
1322
1322
|
try {
|
|
@@ -1331,102 +1331,102 @@ function Z(e, t, r) {
|
|
|
1331
1331
|
if (typeof e == "string")
|
|
1332
1332
|
return document.createTextNode(e);
|
|
1333
1333
|
if (e.tag === "#text") {
|
|
1334
|
-
const
|
|
1334
|
+
const m = document.createTextNode(
|
|
1335
1335
|
typeof e.children == "string" ? e.children : ""
|
|
1336
1336
|
);
|
|
1337
|
-
return e.key != null && (
|
|
1337
|
+
return e.key != null && (m.key = e.key), m;
|
|
1338
1338
|
}
|
|
1339
1339
|
if (e.tag === "#anchor") {
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
for (const l of
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1340
|
+
const m = e, d = Array.isArray(m.children) ? m.children : [], u = document.createTextNode(""), y = document.createTextNode("");
|
|
1341
|
+
m.key != null && (u.key = `${m.key}:start`, y.key = `${m.key}:end`), m._startNode = u, m._endNode = y;
|
|
1342
|
+
const w = document.createDocumentFragment();
|
|
1343
|
+
w.appendChild(u);
|
|
1344
|
+
for (const l of d) {
|
|
1345
|
+
const f = Z(l, t);
|
|
1346
|
+
w.appendChild(f);
|
|
1347
1347
|
}
|
|
1348
|
-
return
|
|
1348
|
+
return w.appendChild(y), w;
|
|
1349
1349
|
}
|
|
1350
1350
|
const n = document.createElement(e.tag);
|
|
1351
1351
|
e.key != null && (n.key = e.key);
|
|
1352
|
-
const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c =
|
|
1352
|
+
const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = dt(o, t, n, s), a = {
|
|
1353
1353
|
...i,
|
|
1354
1354
|
...c.props
|
|
1355
|
-
},
|
|
1355
|
+
}, h = {
|
|
1356
1356
|
...s,
|
|
1357
1357
|
...c.attrs
|
|
1358
|
-
},
|
|
1359
|
-
for (const
|
|
1360
|
-
const
|
|
1361
|
-
if (!(typeof
|
|
1362
|
-
if (typeof
|
|
1363
|
-
|
|
1364
|
-
else if (
|
|
1365
|
-
if (!
|
|
1358
|
+
}, p = n.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1359
|
+
for (const m in h) {
|
|
1360
|
+
const d = h[m];
|
|
1361
|
+
if (!(typeof m != "string" || /\[object Object\]/.test(m))) {
|
|
1362
|
+
if (typeof d == "boolean")
|
|
1363
|
+
d && n.setAttribute(m, "");
|
|
1364
|
+
else if (d != null)
|
|
1365
|
+
if (!p && m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
|
|
1366
1366
|
try {
|
|
1367
|
-
n instanceof HTMLProgressElement ? n.value = Number(
|
|
1367
|
+
n instanceof HTMLProgressElement ? n.value = Number(d) : n.value = d ?? "";
|
|
1368
1368
|
} catch {
|
|
1369
|
-
n.setAttribute(
|
|
1369
|
+
n.setAttribute(m, String(d));
|
|
1370
1370
|
}
|
|
1371
|
-
else if (!
|
|
1371
|
+
else if (!p && m === "checked" && n instanceof HTMLInputElement)
|
|
1372
1372
|
try {
|
|
1373
|
-
n.checked = !!
|
|
1373
|
+
n.checked = !!d;
|
|
1374
1374
|
} catch {
|
|
1375
|
-
n.setAttribute(
|
|
1375
|
+
n.setAttribute(m, String(d));
|
|
1376
1376
|
}
|
|
1377
|
-
else if (!
|
|
1377
|
+
else if (!p && m in n)
|
|
1378
1378
|
try {
|
|
1379
|
-
n[
|
|
1379
|
+
n[m] = d;
|
|
1380
1380
|
} catch {
|
|
1381
|
-
n.setAttribute(
|
|
1381
|
+
n.setAttribute(m, String(d));
|
|
1382
1382
|
}
|
|
1383
|
-
else if ((e.props?.isCustomElement ?? !1) && !
|
|
1384
|
-
const y =
|
|
1383
|
+
else if ((e.props?.isCustomElement ?? !1) && !p && m.includes("-")) {
|
|
1384
|
+
const y = lt(m);
|
|
1385
1385
|
try {
|
|
1386
|
-
n[y] =
|
|
1386
|
+
n[y] = d;
|
|
1387
1387
|
} catch {
|
|
1388
|
-
n.setAttribute(
|
|
1388
|
+
n.setAttribute(m, String(d));
|
|
1389
1389
|
}
|
|
1390
1390
|
} else
|
|
1391
|
-
n.setAttribute(
|
|
1391
|
+
n.setAttribute(m, String(d));
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
|
-
for (const
|
|
1395
|
-
const
|
|
1396
|
-
if (!(typeof
|
|
1397
|
-
if (
|
|
1398
|
-
const
|
|
1399
|
-
n.value =
|
|
1400
|
-
} else if (
|
|
1401
|
-
const
|
|
1402
|
-
n.checked = !!
|
|
1403
|
-
} else if (
|
|
1404
|
-
|
|
1394
|
+
for (const m in a) {
|
|
1395
|
+
const d = a[m];
|
|
1396
|
+
if (!(typeof m != "string" || /\[object Object\]/.test(m)))
|
|
1397
|
+
if (m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
|
|
1398
|
+
const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
|
|
1399
|
+
n.value = u ?? "";
|
|
1400
|
+
} else if (m === "checked" && n instanceof HTMLInputElement) {
|
|
1401
|
+
const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
|
|
1402
|
+
n.checked = !!u;
|
|
1403
|
+
} else if (m.startsWith("on") && typeof d == "function")
|
|
1404
|
+
ae.addListener(n, ft(m), d);
|
|
1405
1405
|
else {
|
|
1406
|
-
if (
|
|
1406
|
+
if (m.startsWith("on") && d === void 0)
|
|
1407
1407
|
continue;
|
|
1408
|
-
if (
|
|
1409
|
-
n.removeAttribute(
|
|
1410
|
-
else if ((e.props?.isCustomElement ?? !1) ||
|
|
1408
|
+
if (d == null || d === !1)
|
|
1409
|
+
n.removeAttribute(m);
|
|
1410
|
+
else if ((e.props?.isCustomElement ?? !1) || m in n)
|
|
1411
1411
|
try {
|
|
1412
|
-
const y = typeof
|
|
1413
|
-
n[
|
|
1412
|
+
const y = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
|
|
1413
|
+
n[m] = y;
|
|
1414
1414
|
} catch {
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
for (const [
|
|
1418
|
+
for (const [m, d] of Object.entries(
|
|
1419
1419
|
c.listeners || {}
|
|
1420
1420
|
))
|
|
1421
|
-
|
|
1422
|
-
const
|
|
1421
|
+
ae.addListener(n, m, d);
|
|
1422
|
+
const x = {
|
|
1423
1423
|
...e,
|
|
1424
1424
|
props: {
|
|
1425
1425
|
...e.props,
|
|
1426
1426
|
...c.props
|
|
1427
1427
|
}
|
|
1428
1428
|
};
|
|
1429
|
-
|
|
1429
|
+
be(x, n, r);
|
|
1430
1430
|
try {
|
|
1431
1431
|
if (typeof n._applyProps == "function")
|
|
1432
1432
|
try {
|
|
@@ -1437,126 +1437,126 @@ function Z(e, t, r) {
|
|
|
1437
1437
|
} catch {
|
|
1438
1438
|
}
|
|
1439
1439
|
if (Array.isArray(e.children))
|
|
1440
|
-
for (const
|
|
1441
|
-
n.appendChild(Z(
|
|
1440
|
+
for (const m of e.children)
|
|
1441
|
+
n.appendChild(Z(m, t, r));
|
|
1442
1442
|
else typeof e.children == "string" && (n.textContent = e.children);
|
|
1443
1443
|
try {
|
|
1444
|
-
if (n instanceof HTMLSelectElement &&
|
|
1444
|
+
if (n instanceof HTMLSelectElement && h && h.hasOwnProperty("value"))
|
|
1445
1445
|
try {
|
|
1446
|
-
n.value =
|
|
1446
|
+
n.value = h.value ?? "";
|
|
1447
1447
|
} catch {
|
|
1448
1448
|
}
|
|
1449
1449
|
} catch {
|
|
1450
1450
|
}
|
|
1451
1451
|
return n;
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function Mt(e, t, r, n, i) {
|
|
1454
1454
|
if (typeof r == "string") {
|
|
1455
1455
|
e.textContent !== r && (e.textContent = r);
|
|
1456
1456
|
return;
|
|
1457
1457
|
}
|
|
1458
1458
|
if (!Array.isArray(r)) return;
|
|
1459
1459
|
const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], c = /* @__PURE__ */ new Map();
|
|
1460
|
-
for (const
|
|
1461
|
-
|
|
1460
|
+
for (const d of o)
|
|
1461
|
+
d && d.key != null && c.set(d.key, d);
|
|
1462
1462
|
const a = /* @__PURE__ */ new Map();
|
|
1463
|
-
for (const
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
}
|
|
1467
|
-
const
|
|
1468
|
-
let
|
|
1469
|
-
function
|
|
1470
|
-
let y =
|
|
1471
|
-
for (; y && (
|
|
1463
|
+
for (const d of s) {
|
|
1464
|
+
const u = d.key;
|
|
1465
|
+
u != null && a.set(u, d);
|
|
1466
|
+
}
|
|
1467
|
+
const h = /* @__PURE__ */ new Set();
|
|
1468
|
+
let p = e.firstChild;
|
|
1469
|
+
function x(d, u) {
|
|
1470
|
+
let y = d;
|
|
1471
|
+
for (; y && (h.add(y), y !== u); )
|
|
1472
1472
|
y = y.nextSibling;
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function m(d, u, y, w) {
|
|
1475
1475
|
const l = [];
|
|
1476
|
-
let
|
|
1477
|
-
for (;
|
|
1478
|
-
l.push(
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1481
|
-
const C = /* @__PURE__ */ new Map(),
|
|
1482
|
-
for (const v of
|
|
1476
|
+
let f = d.nextSibling;
|
|
1477
|
+
for (; f && f !== u; )
|
|
1478
|
+
l.push(f), f = f.nextSibling;
|
|
1479
|
+
const b = Array.isArray(y) ? y : [];
|
|
1480
|
+
if (w.some((C) => C && C.key != null) || b.some((C) => C && C.key != null)) {
|
|
1481
|
+
const C = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
1482
|
+
for (const v of b)
|
|
1483
1483
|
v && v.key != null && C.set(v.key, v);
|
|
1484
1484
|
for (const v of l) {
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1485
|
+
const _ = v.key;
|
|
1486
|
+
_ != null && g.set(_, v);
|
|
1487
1487
|
}
|
|
1488
1488
|
const $ = /* @__PURE__ */ new Set();
|
|
1489
|
-
let
|
|
1490
|
-
for (const v of
|
|
1491
|
-
let
|
|
1492
|
-
if (v.key != null &&
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1489
|
+
let j = d.nextSibling;
|
|
1490
|
+
for (const v of w) {
|
|
1491
|
+
let _;
|
|
1492
|
+
if (v.key != null && g.has(v.key)) {
|
|
1493
|
+
const A = C.get(v.key);
|
|
1494
|
+
_ = je(
|
|
1495
|
+
g.get(v.key),
|
|
1496
|
+
A,
|
|
1497
1497
|
v,
|
|
1498
1498
|
n
|
|
1499
|
-
), $.add(
|
|
1499
|
+
), $.add(_), _ !== j && e.contains(_) && e.insertBefore(_, j);
|
|
1500
1500
|
} else
|
|
1501
|
-
|
|
1502
|
-
|
|
1501
|
+
_ = Z(v, n), e.insertBefore(_, j), $.add(_);
|
|
1502
|
+
j = _.nextSibling;
|
|
1503
1503
|
}
|
|
1504
1504
|
for (const v of l)
|
|
1505
1505
|
!$.has(v) && e.contains(v) && e.removeChild(v);
|
|
1506
1506
|
} else {
|
|
1507
1507
|
const C = Math.min(
|
|
1508
|
-
|
|
1509
|
-
|
|
1508
|
+
b.length,
|
|
1509
|
+
w.length
|
|
1510
1510
|
);
|
|
1511
|
-
for (let
|
|
1512
|
-
const $ =
|
|
1513
|
-
v !== l[
|
|
1511
|
+
for (let g = 0; g < C; g++) {
|
|
1512
|
+
const $ = b[g], j = w[g], v = je(l[g], $, j, n);
|
|
1513
|
+
v !== l[g] && (e.insertBefore(v, l[g]), e.removeChild(l[g]));
|
|
1514
1514
|
}
|
|
1515
|
-
for (let
|
|
1516
|
-
e.insertBefore(Z(
|
|
1517
|
-
for (let
|
|
1518
|
-
e.removeChild(l[
|
|
1515
|
+
for (let g = C; g < w.length; g++)
|
|
1516
|
+
e.insertBefore(Z(w[g], n), u);
|
|
1517
|
+
for (let g = C; g < l.length; g++)
|
|
1518
|
+
e.removeChild(l[g]);
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
for (const
|
|
1522
|
-
let
|
|
1523
|
-
if (
|
|
1524
|
-
const y =
|
|
1525
|
-
let
|
|
1526
|
-
const k = Array.isArray(
|
|
1527
|
-
if (
|
|
1528
|
-
e.insertBefore(
|
|
1521
|
+
for (const d of r) {
|
|
1522
|
+
let u;
|
|
1523
|
+
if (d.tag === "#anchor") {
|
|
1524
|
+
const y = d.key, w = `${y}:start`, l = `${y}:end`;
|
|
1525
|
+
let f = a.get(w), b = a.get(l);
|
|
1526
|
+
const k = Array.isArray(d.children) ? d.children : [];
|
|
1527
|
+
if (f || (f = document.createTextNode(""), f.key = w), b || (b = document.createTextNode(""), b.key = l), d._startNode = f, d._endNode = b, !e.contains(f) || !e.contains(b)) {
|
|
1528
|
+
e.insertBefore(f, p);
|
|
1529
1529
|
for (const C of k)
|
|
1530
|
-
e.insertBefore(Z(C, n),
|
|
1531
|
-
e.insertBefore(
|
|
1530
|
+
e.insertBefore(Z(C, n), p);
|
|
1531
|
+
e.insertBefore(b, p);
|
|
1532
1532
|
} else
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1533
|
+
m(
|
|
1534
|
+
f,
|
|
1535
|
+
b,
|
|
1536
1536
|
c.get(y)?.children,
|
|
1537
1537
|
k
|
|
1538
1538
|
);
|
|
1539
|
-
|
|
1539
|
+
x(f, b), p = b.nextSibling;
|
|
1540
1540
|
continue;
|
|
1541
1541
|
}
|
|
1542
|
-
if (
|
|
1543
|
-
const y = c.get(
|
|
1544
|
-
|
|
1545
|
-
a.get(
|
|
1542
|
+
if (d.key != null && a.has(d.key)) {
|
|
1543
|
+
const y = c.get(d.key);
|
|
1544
|
+
u = je(
|
|
1545
|
+
a.get(d.key),
|
|
1546
1546
|
y,
|
|
1547
|
-
|
|
1547
|
+
d,
|
|
1548
1548
|
n,
|
|
1549
1549
|
i
|
|
1550
|
-
),
|
|
1550
|
+
), h.add(u), u !== p && e.contains(u) && (p && !e.contains(p) && (p = null), e.insertBefore(u, p));
|
|
1551
1551
|
} else
|
|
1552
|
-
|
|
1553
|
-
|
|
1552
|
+
u = Z(d, n, i), p && !e.contains(p) && (p = null), e.insertBefore(u, p), h.add(u);
|
|
1553
|
+
p = u.nextSibling;
|
|
1554
1554
|
}
|
|
1555
|
-
for (const
|
|
1556
|
-
!
|
|
1555
|
+
for (const d of s)
|
|
1556
|
+
!h.has(d) && e.contains(d) && (fe(d, i), e.removeChild(d));
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
if (t && typeof t != "string" && t.props?.ref && i &&
|
|
1558
|
+
function je(e, t, r, n, i) {
|
|
1559
|
+
if (t && typeof t != "string" && t.props?.ref && i && fe(e, i), t === r) return e;
|
|
1560
1560
|
if (typeof r == "string") {
|
|
1561
1561
|
if (e.nodeType === Node.TEXT_NODE)
|
|
1562
1562
|
return e.textContent !== r && (e.textContent = r), e;
|
|
@@ -1566,97 +1566,97 @@ function Ae(e, t, r, n, i) {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
if (r && typeof r != "string" && r.tag === "#anchor") {
|
|
1569
|
-
const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""),
|
|
1570
|
-
o.key != null && (a.key = `${o.key}:start`,
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1573
|
-
for (const
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1569
|
+
const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""), h = o._endNode ?? document.createTextNode("");
|
|
1570
|
+
o.key != null && (a.key = `${o.key}:start`, h.key = `${o.key}:end`), o._startNode = a, o._endNode = h;
|
|
1571
|
+
const p = document.createDocumentFragment();
|
|
1572
|
+
p.appendChild(a);
|
|
1573
|
+
for (const x of c) {
|
|
1574
|
+
const m = Z(x, n);
|
|
1575
|
+
p.appendChild(m);
|
|
1576
1576
|
}
|
|
1577
|
-
return
|
|
1577
|
+
return p.appendChild(h), e.parentNode?.replaceChild(p, e), a;
|
|
1578
1578
|
}
|
|
1579
1579
|
if (!r) {
|
|
1580
|
-
|
|
1580
|
+
fe(e, i);
|
|
1581
1581
|
const o = document.createComment("removed");
|
|
1582
1582
|
return e.parentNode?.replaceChild(o, e), o;
|
|
1583
1583
|
}
|
|
1584
1584
|
if (!t || typeof t == "string") {
|
|
1585
|
-
|
|
1585
|
+
fe(e, i);
|
|
1586
1586
|
const o = Z(r, n, i);
|
|
1587
|
-
return
|
|
1587
|
+
return be(r, o, i), e.parentNode?.replaceChild(o, e), o;
|
|
1588
1588
|
}
|
|
1589
1589
|
if (r.tag === "#anchor") {
|
|
1590
1590
|
const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), a = r._endNode ?? document.createTextNode("");
|
|
1591
1591
|
r.key != null && (c.key = `${r.key}:start`, a.key = `${r.key}:end`), r._startNode = c, r._endNode = a;
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1594
|
-
for (const
|
|
1595
|
-
|
|
1596
|
-
return
|
|
1592
|
+
const h = document.createDocumentFragment();
|
|
1593
|
+
h.appendChild(c);
|
|
1594
|
+
for (const p of o)
|
|
1595
|
+
h.appendChild(Z(p, n));
|
|
1596
|
+
return h.appendChild(a), e.parentNode?.replaceChild(h, e), c;
|
|
1597
1597
|
}
|
|
1598
1598
|
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
|
|
1599
1599
|
const o = e;
|
|
1600
|
-
return
|
|
1600
|
+
return Ge(o, t.props || {}, r.props || {}, n), Mt(o, t.children, r.children, n, i), be(r, o, i), o;
|
|
1601
1601
|
}
|
|
1602
1602
|
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))
|
|
1603
1603
|
try {
|
|
1604
1604
|
const c = e;
|
|
1605
|
-
return
|
|
1605
|
+
return Ge(c, t.props || {}, r.props || {}, n), be(r, c, i), c;
|
|
1606
1606
|
} catch {
|
|
1607
1607
|
}
|
|
1608
|
-
|
|
1608
|
+
fe(e, i);
|
|
1609
1609
|
const s = Z(r, n, i);
|
|
1610
|
-
return
|
|
1610
|
+
return be(r, s, i), e.parentNode?.replaceChild(s, e), s;
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function Wt(e, t, r, n) {
|
|
1613
1613
|
let i;
|
|
1614
1614
|
Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })) : i = { tag: "div", key: "__root__", children: t } : (i = t, i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })), i && typeof i == "object" && i.tag === "#anchor" && (i = {
|
|
1615
1615
|
tag: "div",
|
|
1616
1616
|
key: "__anchor_root__",
|
|
1617
1617
|
props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
|
|
1618
1618
|
children: [i]
|
|
1619
|
-
}), i =
|
|
1619
|
+
}), i = Ke(i, String(i.key ?? "root"));
|
|
1620
1620
|
const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
|
|
1621
1621
|
let c;
|
|
1622
|
-
s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c =
|
|
1622
|
+
s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = je(o, s, i, r, n) : (c = Z(i, r, n), e.replaceChild(c, o)) : (c = Z(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
|
|
1623
1623
|
const a = [];
|
|
1624
|
-
for (let
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1624
|
+
for (let h = 0; h < e.childNodes.length; h++) {
|
|
1625
|
+
const p = e.childNodes[h];
|
|
1626
|
+
p !== c && p.nodeName !== "STYLE" && (fe(p, n), a.push(p));
|
|
1627
1627
|
}
|
|
1628
|
-
a.forEach((
|
|
1628
|
+
a.forEach((h) => e.removeChild(h)), e._prevVNode = i, e._prevDom = c;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
if (typeof e == "string") return
|
|
1630
|
+
function Me(e) {
|
|
1631
|
+
if (typeof e == "string") return ge(e);
|
|
1632
1632
|
if (e.tag === "#text")
|
|
1633
|
-
return typeof e.children == "string" ?
|
|
1633
|
+
return typeof e.children == "string" ? ge(e.children) : "";
|
|
1634
1634
|
if (e.tag === "#anchor")
|
|
1635
|
-
return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(
|
|
1635
|
+
return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Me).join("");
|
|
1636
1636
|
let t = "";
|
|
1637
|
-
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${
|
|
1637
|
+
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${ge(String(s))}"`).join(""));
|
|
1638
1638
|
let r = "";
|
|
1639
|
-
e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${
|
|
1640
|
-
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(
|
|
1639
|
+
e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${ge(String(s))}"`).join(""));
|
|
1640
|
+
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Me).join("") : typeof e.children == "string" ? ge(e.children) : e.children ? Me(e.children) : "";
|
|
1641
1641
|
return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function Dt(e, ...t) {
|
|
1644
1644
|
let r = "";
|
|
1645
1645
|
for (let n = 0; n < e.length; n++)
|
|
1646
1646
|
r += e[n], n < t.length && (r += t[n]);
|
|
1647
1647
|
return r;
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1649
|
+
function pt(e) {
|
|
1650
1650
|
return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
|
|
1651
1651
|
}
|
|
1652
|
-
let
|
|
1653
|
-
function
|
|
1654
|
-
return
|
|
1652
|
+
let Ee = null;
|
|
1653
|
+
function Xe() {
|
|
1654
|
+
return Ee || (Ee = new CSSStyleSheet(), Ee.replaceSync(pt(Nt))), Ee;
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function It(e) {
|
|
1657
1657
|
return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
|
|
1658
1658
|
}
|
|
1659
|
-
const
|
|
1659
|
+
const Nt = Dt`
|
|
1660
1660
|
:host,
|
|
1661
1661
|
*,
|
|
1662
1662
|
::before,
|
|
@@ -1677,6 +1677,13 @@ const It = Wt`
|
|
|
1677
1677
|
font: 16px/1.5 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
|
|
1678
1678
|
-webkit-text-size-adjust: 100%;
|
|
1679
1679
|
text-size-adjust: 100%;
|
|
1680
|
+
/* Default gradient variables to avoid undefined var() usage in generated utilities */
|
|
1681
|
+
--tw-gradient-from-position: 0%;
|
|
1682
|
+
--tw-gradient-to-position: 100%;
|
|
1683
|
+
--tw-gradient-via-position: 50%;
|
|
1684
|
+
--tw-gradient-from: rgba(255,255,255,0);
|
|
1685
|
+
--tw-gradient-to: rgba(255,255,255,0);
|
|
1686
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
1680
1687
|
}
|
|
1681
1688
|
button,
|
|
1682
1689
|
input,
|
|
@@ -1760,7 +1767,7 @@ const It = Wt`
|
|
|
1760
1767
|
[hidden] {
|
|
1761
1768
|
display: none;
|
|
1762
1769
|
}
|
|
1763
|
-
`,
|
|
1770
|
+
`, Ht = {
|
|
1764
1771
|
// Existing semantic colors
|
|
1765
1772
|
neutral: {
|
|
1766
1773
|
50: "#fafafa",
|
|
@@ -1858,8 +1865,8 @@ const It = Wt`
|
|
|
1858
1865
|
black: { DEFAULT: "#000000" },
|
|
1859
1866
|
transparent: { DEFAULT: "transparent" },
|
|
1860
1867
|
current: { DEFAULT: "currentColor" }
|
|
1861
|
-
},
|
|
1862
|
-
Object.entries(
|
|
1868
|
+
}, ht = Object.fromEntries(
|
|
1869
|
+
Object.entries(Ht).map(([e, t]) => [
|
|
1863
1870
|
e,
|
|
1864
1871
|
Object.fromEntries(
|
|
1865
1872
|
Object.entries(t).map(([r, n]) => [
|
|
@@ -1868,7 +1875,7 @@ const It = Wt`
|
|
|
1868
1875
|
])
|
|
1869
1876
|
)
|
|
1870
1877
|
])
|
|
1871
|
-
),
|
|
1878
|
+
), ue = "0.25rem", Bt = {
|
|
1872
1879
|
"3xs": 64,
|
|
1873
1880
|
"2xs": 72,
|
|
1874
1881
|
xs: 80,
|
|
@@ -1882,7 +1889,7 @@ const It = Wt`
|
|
|
1882
1889
|
"5xl": 256,
|
|
1883
1890
|
"6xl": 288,
|
|
1884
1891
|
"7xl": 320
|
|
1885
|
-
},
|
|
1892
|
+
}, Qe = {
|
|
1886
1893
|
m: ["margin"],
|
|
1887
1894
|
mx: ["margin-inline"],
|
|
1888
1895
|
my: ["margin-block"],
|
|
@@ -2037,8 +2044,8 @@ const It = Wt`
|
|
|
2037
2044
|
["text-7xl", "4.5rem", "1"],
|
|
2038
2045
|
["text-8xl", "6rem", "1"],
|
|
2039
2046
|
["text-9xl", "8rem", "1"]
|
|
2040
|
-
].forEach(([a,
|
|
2041
|
-
e[a] = `font-size:${
|
|
2047
|
+
].forEach(([a, h, p]) => {
|
|
2048
|
+
e[a] = `font-size:${h};line-height:${p};`;
|
|
2042
2049
|
}), [
|
|
2043
2050
|
["tracking-tighter", "-0.05em"],
|
|
2044
2051
|
["tracking-tight", "-0.025em"],
|
|
@@ -2046,8 +2053,8 @@ const It = Wt`
|
|
|
2046
2053
|
["tracking-wide", "0.025em"],
|
|
2047
2054
|
["tracking-wider", "0.05em"],
|
|
2048
2055
|
["tracking-widest", "0.1em"]
|
|
2049
|
-
].forEach(([a,
|
|
2050
|
-
e[a] = `letter-spacing:${
|
|
2056
|
+
].forEach(([a, h]) => {
|
|
2057
|
+
e[a] = `letter-spacing:${h};`;
|
|
2051
2058
|
}), [
|
|
2052
2059
|
["leading-3", "0.75rem"],
|
|
2053
2060
|
["leading-4", "1rem"],
|
|
@@ -2063,15 +2070,15 @@ const It = Wt`
|
|
|
2063
2070
|
["leading-normal", "1.5"],
|
|
2064
2071
|
["leading-relaxed", "1.625"],
|
|
2065
2072
|
["leading-loose", "2"]
|
|
2066
|
-
].forEach(([a,
|
|
2067
|
-
e[a] = `line-height:${
|
|
2073
|
+
].forEach(([a, h]) => {
|
|
2074
|
+
e[a] = `line-height:${h};`;
|
|
2068
2075
|
}), Object.assign(e, {
|
|
2069
2076
|
"font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
|
|
2070
2077
|
"font-serif": "font-family:var(--font-serif, ui-serif,Georgia,serif);",
|
|
2071
2078
|
"font-mono": "font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);"
|
|
2072
2079
|
}), [0, 1, 2, 4, 6, 8].forEach((a) => {
|
|
2073
|
-
const
|
|
2074
|
-
e[`border-${a}`] = `border-width:${
|
|
2080
|
+
const h = `${a}px`;
|
|
2081
|
+
e[`border-${a}`] = `border-width:${h};`, e[`border-t-${a}`] = `border-top-width:${h};`, e[`border-r-${a}`] = `border-right-width:${h};`, e[`border-b-${a}`] = `border-bottom-width:${h};`, e[`border-l-${a}`] = `border-left-width:${h};`, e[`border-x-${a}`] = `border-left-width:${h};border-right-width:${h};`, e[`border-y-${a}`] = `border-top-width:${h};border-bottom-width:${h};`;
|
|
2075
2082
|
}), e.border = "border-width:1px;", e["border-t"] = "border-top-width:1px;", e["border-r"] = "border-right-width:1px;", e["border-b"] = "border-bottom-width:1px;", e["border-l"] = "border-left-width:1px;", e["border-x"] = "border-left-width:1px;border-right-width:1px;", e["border-y"] = "border-top-width:1px;border-bottom-width:1px;", Object.assign(e, {
|
|
2076
2083
|
"border-solid": "border-style:solid;",
|
|
2077
2084
|
"border-dashed": "border-style:dashed;",
|
|
@@ -2089,9 +2096,9 @@ const It = Wt`
|
|
|
2089
2096
|
"3xl": 24,
|
|
2090
2097
|
"4xl": 32,
|
|
2091
2098
|
full: 9999
|
|
2092
|
-
}).forEach(([a,
|
|
2093
|
-
const
|
|
2094
|
-
e[`rounded-${a}`] = `border-radius:${
|
|
2099
|
+
}).forEach(([a, h]) => {
|
|
2100
|
+
const p = h === 9999 ? "9999px" : `${h / 16}rem`;
|
|
2101
|
+
e[`rounded-${a}`] = `border-radius:${p};`, e[`rounded-t-${a}`] = `border-top-left-radius:${p};border-top-right-radius:${p};`, e[`rounded-r-${a}`] = `border-top-right-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-l-${a}`] = `border-top-left-radius:${p};border-bottom-left-radius:${p};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${p};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${p};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${p};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${p};`;
|
|
2095
2102
|
}), Object.assign(e, {
|
|
2096
2103
|
"shadow-none": "--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
|
|
2097
2104
|
"shadow-xs": "--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
|
|
@@ -2169,8 +2176,8 @@ const It = Wt`
|
|
|
2169
2176
|
"m-auto": "margin:auto;",
|
|
2170
2177
|
"mx-auto": "margin-inline:auto;",
|
|
2171
2178
|
"my-auto": "margin-block:auto;"
|
|
2172
|
-
}), Object.entries(
|
|
2173
|
-
e[`max-w-${a}`] = `max-width:calc(${
|
|
2179
|
+
}), Object.entries(Bt).forEach(([a, h]) => {
|
|
2180
|
+
e[`max-w-${a}`] = `max-width:calc(${ue} * ${h});`, e[`min-w-${a}`] = `min-width:calc(${ue} * ${h});`, e[`w-${a}`] = `width:calc(${ue} * ${h});`, e[`max-h-${a}`] = `max-height:calc(${ue} * ${h});`, e[`min-h-${a}`] = `min-height:calc(${ue} * ${h});`, e[`h-${a}`] = `height:calc(${ue} * ${h});`;
|
|
2174
2181
|
}), Object.assign(e, {
|
|
2175
2182
|
transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
|
|
2176
2183
|
"transition-none": "transition-property:none;",
|
|
@@ -2257,7 +2264,7 @@ const It = Wt`
|
|
|
2257
2264
|
"bg-gradient-to-l": "background-image:linear-gradient(to left, var(--tw-gradient-stops));",
|
|
2258
2265
|
"bg-gradient-to-tl": "background-image:linear-gradient(to top left, var(--tw-gradient-stops));"
|
|
2259
2266
|
}), e;
|
|
2260
|
-
},
|
|
2267
|
+
}, We = zt();
|
|
2261
2268
|
function J(e, t) {
|
|
2262
2269
|
let r = 0;
|
|
2263
2270
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -2269,7 +2276,7 @@ function J(e, t) {
|
|
|
2269
2276
|
}
|
|
2270
2277
|
return e + t;
|
|
2271
2278
|
}
|
|
2272
|
-
const
|
|
2279
|
+
const Ut = {
|
|
2273
2280
|
before: (e, t) => `${e}::before{${t}}`,
|
|
2274
2281
|
after: (e, t) => `${e}::after{${t}}`,
|
|
2275
2282
|
hover: (e, t) => `${J(e, ":hover")}{${t}}`,
|
|
@@ -2292,14 +2299,14 @@ const Bt = {
|
|
|
2292
2299
|
"peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
|
|
2293
2300
|
"peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
|
|
2294
2301
|
"peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
|
|
2295
|
-
},
|
|
2302
|
+
}, Ye = {
|
|
2296
2303
|
sm: "(min-width:640px)",
|
|
2297
2304
|
md: "(min-width:768px)",
|
|
2298
2305
|
lg: "(min-width:1024px)",
|
|
2299
2306
|
xl: "(min-width:1280px)",
|
|
2300
2307
|
"2xl": "(min-width:1536px)",
|
|
2301
2308
|
dark: "(prefers-color-scheme: dark)"
|
|
2302
|
-
},
|
|
2309
|
+
}, qt = {
|
|
2303
2310
|
xs: "(min-width:20rem)",
|
|
2304
2311
|
sm: "(min-width:24rem)",
|
|
2305
2312
|
md: "(min-width:28rem)",
|
|
@@ -2311,7 +2318,7 @@ const Bt = {
|
|
|
2311
2318
|
"5xl": "(min-width:64rem)",
|
|
2312
2319
|
"6xl": "(min-width:72rem)",
|
|
2313
2320
|
"7xl": "(min-width:80rem)"
|
|
2314
|
-
},
|
|
2321
|
+
}, De = ["sm", "md", "lg", "xl", "2xl"], Ie = [
|
|
2315
2322
|
"xs",
|
|
2316
2323
|
"sm",
|
|
2317
2324
|
"md",
|
|
@@ -2324,19 +2331,19 @@ const Bt = {
|
|
|
2324
2331
|
"6xl",
|
|
2325
2332
|
"7xl"
|
|
2326
2333
|
];
|
|
2327
|
-
function
|
|
2334
|
+
function Ne(e) {
|
|
2328
2335
|
const t = e.startsWith("-"), r = t ? e.slice(1) : e, n = r.lastIndexOf("-");
|
|
2329
2336
|
if (n === -1) return null;
|
|
2330
2337
|
const i = r.slice(0, n), s = r.slice(n + 1), o = parseFloat(s);
|
|
2331
|
-
if (Number.isNaN(o) || !
|
|
2338
|
+
if (Number.isNaN(o) || !Qe[i]) return null;
|
|
2332
2339
|
const c = t ? "-" : "";
|
|
2333
|
-
return
|
|
2340
|
+
return Qe[i].map((a) => `${a}:calc(${c}${ue} * ${o});`).join("");
|
|
2334
2341
|
}
|
|
2335
|
-
function
|
|
2342
|
+
function et(e) {
|
|
2336
2343
|
const t = e.replace("#", ""), r = parseInt(t, 16);
|
|
2337
2344
|
return `${r >> 16 & 255} ${r >> 8 & 255} ${r & 255}`;
|
|
2338
2345
|
}
|
|
2339
|
-
const
|
|
2346
|
+
const Ft = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Kt = {
|
|
2340
2347
|
bg: "background-color",
|
|
2341
2348
|
decoration: "text-decoration-color",
|
|
2342
2349
|
text: "color",
|
|
@@ -2347,36 +2354,36 @@ const qt = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
|
|
|
2347
2354
|
fill: "fill",
|
|
2348
2355
|
stroke: "stroke"
|
|
2349
2356
|
};
|
|
2350
|
-
function
|
|
2351
|
-
const t =
|
|
2357
|
+
function Vt(e) {
|
|
2358
|
+
const t = Ft.exec(e);
|
|
2352
2359
|
if (!t) return null;
|
|
2353
|
-
const [, r, n, i = "DEFAULT"] = t, s =
|
|
2360
|
+
const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
|
|
2354
2361
|
if (!s) return null;
|
|
2355
2362
|
if (r === "shadow") return `--ce-shadow-color:${s};`;
|
|
2356
|
-
const o =
|
|
2363
|
+
const o = Kt[r];
|
|
2357
2364
|
return o ? `${o}:${s};` : null;
|
|
2358
2365
|
}
|
|
2359
|
-
function
|
|
2366
|
+
function Jt(e) {
|
|
2360
2367
|
const t = e.indexOf("/");
|
|
2361
2368
|
if (t === -1) return { base: e };
|
|
2362
2369
|
const r = e.slice(0, t), n = e.slice(t + 1), i = parseInt(n, 10);
|
|
2363
2370
|
return isNaN(i) || i < 0 || i > 100 ? { base: r } : { base: r, opacity: i / 100 };
|
|
2364
2371
|
}
|
|
2365
|
-
function
|
|
2366
|
-
const { base: t, opacity: r } =
|
|
2372
|
+
function He(e) {
|
|
2373
|
+
const { base: t, opacity: r } = Jt(e), n = Vt(t);
|
|
2367
2374
|
if (n && r !== void 0) {
|
|
2368
2375
|
const s = /#([0-9a-f]{6})/i.exec(n);
|
|
2369
2376
|
if (s) {
|
|
2370
|
-
const o =
|
|
2377
|
+
const o = et(s[0]);
|
|
2371
2378
|
return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
|
|
2372
2379
|
}
|
|
2373
2380
|
}
|
|
2374
2381
|
if (n) return n;
|
|
2375
|
-
const i =
|
|
2382
|
+
const i = Oe(t);
|
|
2376
2383
|
if (i && r !== void 0) {
|
|
2377
2384
|
const s = /#([0-9a-f]{6})/i.exec(i);
|
|
2378
2385
|
if (s) {
|
|
2379
|
-
const o =
|
|
2386
|
+
const o = et(s[0]);
|
|
2380
2387
|
return i.replace(
|
|
2381
2388
|
/#([0-9a-f]{6})/i,
|
|
2382
2389
|
`rgb(${o} / ${r})`
|
|
@@ -2385,10 +2392,10 @@ function Ne(e) {
|
|
|
2385
2392
|
}
|
|
2386
2393
|
return i;
|
|
2387
2394
|
}
|
|
2388
|
-
function
|
|
2395
|
+
function Be(e) {
|
|
2389
2396
|
const t = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
|
|
2390
2397
|
if (!t) return null;
|
|
2391
|
-
const [, r, n, i = "DEFAULT"] = t, s =
|
|
2398
|
+
const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
|
|
2392
2399
|
if (!s) return null;
|
|
2393
2400
|
switch (r) {
|
|
2394
2401
|
case "from":
|
|
@@ -2401,19 +2408,19 @@ function Ye(e) {
|
|
|
2401
2408
|
return null;
|
|
2402
2409
|
}
|
|
2403
2410
|
}
|
|
2404
|
-
function
|
|
2411
|
+
function ze(e) {
|
|
2405
2412
|
const t = /^opacity-(\d{1,3})$/.exec(e);
|
|
2406
2413
|
if (!t) return null;
|
|
2407
2414
|
const r = parseInt(t[1], 10);
|
|
2408
2415
|
return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
|
|
2409
2416
|
}
|
|
2410
|
-
function
|
|
2417
|
+
function Oe(e) {
|
|
2411
2418
|
if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
|
|
2412
2419
|
const o = e.slice(1, -1).trim(), c = o.indexOf(":");
|
|
2413
2420
|
if (c === -1) return null;
|
|
2414
2421
|
const a = o.slice(0, c).trim();
|
|
2415
|
-
let
|
|
2416
|
-
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (
|
|
2422
|
+
let h = o.slice(c + 1).trim();
|
|
2423
|
+
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (h = h.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), h = h.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${h};`) : null;
|
|
2417
2424
|
}
|
|
2418
2425
|
const t = e.indexOf("-[");
|
|
2419
2426
|
if (t <= 0 || !e.endsWith("]")) return null;
|
|
@@ -2468,7 +2475,7 @@ function je(e) {
|
|
|
2468
2475
|
const s = i[r] ?? r.replace(/_/g, "-");
|
|
2469
2476
|
return s && n ? `${s}:${n};` : null;
|
|
2470
2477
|
}
|
|
2471
|
-
function
|
|
2478
|
+
function Zt(e) {
|
|
2472
2479
|
if (e.startsWith("[") && e.endsWith("]")) {
|
|
2473
2480
|
const r = e.slice(1, -1);
|
|
2474
2481
|
return r.includes("&") ? r : e;
|
|
@@ -2480,7 +2487,7 @@ function Jt(e) {
|
|
|
2480
2487
|
}
|
|
2481
2488
|
return null;
|
|
2482
2489
|
}
|
|
2483
|
-
function
|
|
2490
|
+
function tt(e) {
|
|
2484
2491
|
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
2485
2492
|
}
|
|
2486
2493
|
function Gt(e) {
|
|
@@ -2492,31 +2499,31 @@ function Gt(e) {
|
|
|
2492
2499
|
}
|
|
2493
2500
|
return r;
|
|
2494
2501
|
}
|
|
2495
|
-
const
|
|
2502
|
+
const me = /* @__PURE__ */ new Map(), Xt = 16, rt = 1e3;
|
|
2496
2503
|
function Qt(e) {
|
|
2497
|
-
const t = Date.now(), r =
|
|
2504
|
+
const t = Date.now(), r = me.get(e);
|
|
2498
2505
|
if (r && t - r.timestamp < Xt) return r.css;
|
|
2499
2506
|
const n = Gt(e);
|
|
2500
2507
|
if (!n.length) return "";
|
|
2501
|
-
const i = new Set(n), s = [[], [], [], []], o = {}, c = (u,
|
|
2502
|
-
const
|
|
2503
|
-
if (
|
|
2504
|
-
const
|
|
2505
|
-
return o[
|
|
2508
|
+
const i = new Set(n), s = [[], [], [], []], o = {}, c = (u, y = !1) => {
|
|
2509
|
+
const w = y ? `dark|${u}` : u;
|
|
2510
|
+
if (w in o) return o[w];
|
|
2511
|
+
const l = x(u, y);
|
|
2512
|
+
return o[w] = l, l;
|
|
2506
2513
|
}, a = (u) => {
|
|
2507
|
-
const
|
|
2508
|
-
(
|
|
2509
|
-
),
|
|
2510
|
-
return u.length ? !
|
|
2511
|
-
},
|
|
2512
|
-
const
|
|
2513
|
-
let
|
|
2514
|
-
for (let
|
|
2515
|
-
const
|
|
2516
|
-
|
|
2514
|
+
const y = u.some((f) => De.includes(f)), w = u.some(
|
|
2515
|
+
(f) => f.startsWith("@") && (Ie.includes(f.slice(1)) || f.match(/^@\[.+\]$/))
|
|
2516
|
+
), l = u.includes("dark");
|
|
2517
|
+
return u.length ? !y && !l && !w ? 1 : l && (y || w) ? 3 : 2 : 0;
|
|
2518
|
+
}, h = (u) => {
|
|
2519
|
+
const y = [];
|
|
2520
|
+
let w = "", l = 0;
|
|
2521
|
+
for (let f = 0; f < u.length; f++) {
|
|
2522
|
+
const b = u[f];
|
|
2523
|
+
b === "[" || b === "(" ? l++ : (b === "]" || b === ")") && l--, b === ":" && l === 0 ? (y.push(w), w = "") : w += b;
|
|
2517
2524
|
}
|
|
2518
|
-
return
|
|
2519
|
-
},
|
|
2525
|
+
return w && y.push(w), y;
|
|
2526
|
+
}, p = {
|
|
2520
2527
|
hover: ":hover",
|
|
2521
2528
|
focus: ":focus",
|
|
2522
2529
|
active: ":active",
|
|
@@ -2529,151 +2536,158 @@ function Qt(e) {
|
|
|
2529
2536
|
even: ":nth-child(even)",
|
|
2530
2537
|
"focus-within": ":focus-within",
|
|
2531
2538
|
"focus-visible": ":focus-visible"
|
|
2532
|
-
},
|
|
2533
|
-
const
|
|
2534
|
-
let
|
|
2535
|
-
for (const
|
|
2536
|
-
let
|
|
2537
|
-
if (
|
|
2538
|
-
|
|
2539
|
+
}, x = (u, y = !1) => {
|
|
2540
|
+
const w = h(u);
|
|
2541
|
+
let l = "", f = !1;
|
|
2542
|
+
for (const E of w) {
|
|
2543
|
+
let T = E;
|
|
2544
|
+
if (T.startsWith("!") && (f = !0, T = T.slice(1)), We[T] || Ne(T) || ze(T) || He(T) || Be(T) || Oe(T)) {
|
|
2545
|
+
l = E;
|
|
2539
2546
|
break;
|
|
2540
2547
|
}
|
|
2541
2548
|
}
|
|
2542
|
-
if (!
|
|
2543
|
-
const
|
|
2544
|
-
if (!
|
|
2545
|
-
const
|
|
2546
|
-
let
|
|
2547
|
-
|
|
2548
|
-
const
|
|
2549
|
-
let
|
|
2549
|
+
if (!l) return null;
|
|
2550
|
+
const b = l.replace(/^!/, ""), k = We[b] ?? Ne(b) ?? ze(b) ?? He(b) ?? Be(b) ?? Oe(b);
|
|
2551
|
+
if (!k) return null;
|
|
2552
|
+
const C = w.indexOf(l);
|
|
2553
|
+
let g = C >= 0 ? w.slice(0, C) : [];
|
|
2554
|
+
y && (g = g.filter((E) => E !== "dark"));
|
|
2555
|
+
const $ = `.${tt(u)}`, j = f ? k.replace(/;/g, " !important;") : k, v = "__SUBJECT__";
|
|
2556
|
+
let _ = v;
|
|
2550
2557
|
const A = [];
|
|
2551
|
-
for (const
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
`.peer:${
|
|
2555
|
-
), A.push(
|
|
2556
|
-
|
|
2557
|
-
const
|
|
2558
|
-
let
|
|
2559
|
-
for (const
|
|
2560
|
-
if (
|
|
2558
|
+
for (const E of g)
|
|
2559
|
+
E.startsWith("group-") ? (_ = `.group:${E.slice(6)} ${_}`, A.push(E)) : E.startsWith("peer-") && (_ = _.replace(
|
|
2560
|
+
v,
|
|
2561
|
+
`.peer:${E.slice(5)}~${v}`
|
|
2562
|
+
), A.push(E));
|
|
2563
|
+
g = g.filter((E) => !A.includes(E));
|
|
2564
|
+
const D = [], S = [];
|
|
2565
|
+
let O = null;
|
|
2566
|
+
for (const E of g) {
|
|
2567
|
+
if (E === "dark" || De.includes(E) || E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/)))
|
|
2561
2568
|
continue;
|
|
2562
|
-
const
|
|
2563
|
-
if (
|
|
2564
|
-
|
|
2569
|
+
const T = Zt(E);
|
|
2570
|
+
if (T) {
|
|
2571
|
+
O = T;
|
|
2565
2572
|
continue;
|
|
2566
2573
|
}
|
|
2567
|
-
const
|
|
2568
|
-
if (
|
|
2569
|
-
|
|
2574
|
+
const R = p[E];
|
|
2575
|
+
if (R) {
|
|
2576
|
+
O ? S.push(R) : D.push(R);
|
|
2570
2577
|
continue;
|
|
2571
2578
|
}
|
|
2572
|
-
const
|
|
2573
|
-
typeof
|
|
2579
|
+
const B = Ut[E];
|
|
2580
|
+
typeof B == "function" && (_ = B(_, j).split("{")[0]);
|
|
2574
2581
|
}
|
|
2575
|
-
const
|
|
2576
|
-
function
|
|
2577
|
-
if (!
|
|
2578
|
-
let
|
|
2579
|
-
if (
|
|
2580
|
-
let
|
|
2581
|
-
for (;
|
|
2582
|
-
for (;
|
|
2583
|
-
const z =
|
|
2584
|
-
if (z === "[" ?
|
|
2585
|
-
return
|
|
2582
|
+
const H = D.join(""), te = S.join("");
|
|
2583
|
+
function $e(E, T) {
|
|
2584
|
+
if (!T) return E;
|
|
2585
|
+
let R = 0, B = 0;
|
|
2586
|
+
if (E.length && (E[0] === ">" || E[0] === "+" || E[0] === "~" || E[0] === " ")) {
|
|
2587
|
+
let L = 1;
|
|
2588
|
+
for (; L < E.length && E[L] === " "; ) L++;
|
|
2589
|
+
for (; L < E.length; L++) {
|
|
2590
|
+
const z = E[L];
|
|
2591
|
+
if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (E[L] === ">" || E[L] === "+" || E[L] === "~" || E[L] === " "))
|
|
2592
|
+
return E.slice(0, L) + T + E.slice(L);
|
|
2586
2593
|
}
|
|
2587
|
-
return
|
|
2594
|
+
return E + T;
|
|
2588
2595
|
}
|
|
2589
|
-
for (let
|
|
2590
|
-
const z =
|
|
2591
|
-
if (z === "[" ?
|
|
2592
|
-
return
|
|
2596
|
+
for (let L = 0; L < E.length; L++) {
|
|
2597
|
+
const z = E[L];
|
|
2598
|
+
if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
|
|
2599
|
+
return E.slice(0, L) + T + E.slice(L);
|
|
2593
2600
|
}
|
|
2594
|
-
return
|
|
2601
|
+
return E + T;
|
|
2595
2602
|
}
|
|
2596
|
-
if (
|
|
2597
|
-
if (
|
|
2598
|
-
const
|
|
2599
|
-
if (
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
+
if (O)
|
|
2604
|
+
if (O.includes("&")) {
|
|
2605
|
+
const E = O.indexOf("&"), T = O.slice(0, E), R = O.slice(E + 1), B = v + H;
|
|
2606
|
+
if (D.length === 0)
|
|
2607
|
+
_ = _.replace(
|
|
2608
|
+
v,
|
|
2609
|
+
T + B + te + R
|
|
2603
2610
|
);
|
|
2604
2611
|
else {
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2612
|
+
const L = $e(R, te);
|
|
2613
|
+
_ = _.replace(
|
|
2614
|
+
v,
|
|
2615
|
+
T + B + L
|
|
2609
2616
|
);
|
|
2610
2617
|
}
|
|
2611
2618
|
} else
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
`${
|
|
2615
|
-
),
|
|
2619
|
+
_ = _.replace(
|
|
2620
|
+
v,
|
|
2621
|
+
`${O}${v + H}`
|
|
2622
|
+
), te && (_ = _.replace(v, `${v}${te}`));
|
|
2616
2623
|
else
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2624
|
+
_ = _.replace(
|
|
2625
|
+
v,
|
|
2626
|
+
v + H + te
|
|
2620
2627
|
);
|
|
2621
|
-
|
|
2622
|
-
let
|
|
2623
|
-
const
|
|
2624
|
-
(
|
|
2625
|
-
),
|
|
2626
|
-
(
|
|
2627
|
-
),
|
|
2628
|
-
let
|
|
2629
|
-
if (
|
|
2630
|
-
if (
|
|
2631
|
-
const
|
|
2632
|
-
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(
|
|
2628
|
+
_ = _.replace(new RegExp(v, "g"), $);
|
|
2629
|
+
let N = `${_}{${j}}`;
|
|
2630
|
+
const W = g.filter(
|
|
2631
|
+
(E) => De.includes(E)
|
|
2632
|
+
), V = g.filter(
|
|
2633
|
+
(E) => E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/))
|
|
2634
|
+
), K = W.length ? W[W.length - 1] : null, G = V.length ? V[V.length - 1] : null, I = g.includes("dark");
|
|
2635
|
+
let X = "", re = "";
|
|
2636
|
+
if (I && K ? X = `@media (prefers-color-scheme: dark) and ${Ye[K]}` : I ? X = "@media (prefers-color-scheme: dark)" : K && (X = `@media ${Ye[K]}`), G)
|
|
2637
|
+
if (G.startsWith("@[") && G.endsWith("]")) {
|
|
2638
|
+
const E = G.slice(2, -1);
|
|
2639
|
+
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(E))
|
|
2633
2640
|
return null;
|
|
2634
|
-
|
|
2641
|
+
re = `@container (min-width:${E})`;
|
|
2635
2642
|
} else {
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2643
|
+
const E = G.slice(1);
|
|
2644
|
+
re = `@container ${qt[E] || `(min-width:${E})`}`;
|
|
2638
2645
|
}
|
|
2639
|
-
return
|
|
2646
|
+
return X && re ? N = `${X}${re}{${N}}` : X ? N = `${X}{${N}}` : re && (N = `${re}{${N}}`), N;
|
|
2640
2647
|
};
|
|
2641
2648
|
for (const u of i) {
|
|
2642
|
-
const
|
|
2643
|
-
(
|
|
2649
|
+
const y = h(u), w = y.find(
|
|
2650
|
+
(C) => We[C.replace(/^!/, "")] || Ne(C.replace(/^!/, "")) || ze(C.replace(/^!/, "")) || He(C.replace(/^!/, "")) || Be(C.replace(/^!/, "")) || Oe(C.replace(/^!/, ""))
|
|
2644
2651
|
);
|
|
2645
|
-
if (!
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2648
|
-
}
|
|
2649
|
-
const
|
|
2650
|
-
|
|
2652
|
+
if (!w) continue;
|
|
2653
|
+
const l = y.indexOf(w), f = l >= 0 ? y.slice(0, l) : [], b = a(f), k = c(u);
|
|
2654
|
+
k && s[b].push(k);
|
|
2655
|
+
}
|
|
2656
|
+
const m = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
|
|
2657
|
+
for (const u of i)
|
|
2658
|
+
if (m.test(u)) {
|
|
2659
|
+
if (s.flat().join("").includes(`.${tt(u)}`)) continue;
|
|
2660
|
+
const w = c(u);
|
|
2661
|
+
w && s[0].push(w);
|
|
2662
|
+
}
|
|
2663
|
+
const d = s.flat().join("");
|
|
2664
|
+
return me.size >= rt && Array.from(me.keys()).slice(
|
|
2651
2665
|
0,
|
|
2652
|
-
Math.floor(
|
|
2653
|
-
).forEach((
|
|
2666
|
+
Math.floor(rt / 2)
|
|
2667
|
+
).forEach((y) => me.delete(y)), me.set(e, { css: d, timestamp: t }), d;
|
|
2654
2668
|
}
|
|
2655
|
-
const
|
|
2669
|
+
const we = [];
|
|
2656
2670
|
function Yt(e, t, r, n, i, s, o, c) {
|
|
2657
2671
|
if (e) {
|
|
2658
|
-
|
|
2672
|
+
we.push(r);
|
|
2659
2673
|
try {
|
|
2660
2674
|
const a = t.render(r);
|
|
2661
2675
|
if (a instanceof Promise) {
|
|
2662
|
-
s(!0), a.then((
|
|
2663
|
-
s(!1), o(null),
|
|
2664
|
-
}).catch((
|
|
2665
|
-
s(!1), o(
|
|
2676
|
+
s(!0), a.then((h) => {
|
|
2677
|
+
s(!1), o(null), nt(e, h, r, n, i), c(e.innerHTML);
|
|
2678
|
+
}).catch((h) => {
|
|
2679
|
+
s(!1), o(h);
|
|
2666
2680
|
});
|
|
2667
2681
|
return;
|
|
2668
2682
|
}
|
|
2669
|
-
|
|
2683
|
+
nt(e, a, r, n, i), c(e.innerHTML);
|
|
2670
2684
|
} finally {
|
|
2671
|
-
|
|
2685
|
+
we.pop();
|
|
2672
2686
|
}
|
|
2673
2687
|
}
|
|
2674
2688
|
}
|
|
2675
|
-
function
|
|
2676
|
-
e && (
|
|
2689
|
+
function nt(e, t, r, n, i) {
|
|
2690
|
+
e && (Wt(
|
|
2677
2691
|
e,
|
|
2678
2692
|
Array.isArray(t) ? t : [t],
|
|
2679
2693
|
r,
|
|
@@ -2702,41 +2716,41 @@ Stopping runaway component render to prevent browser freeze`
|
|
|
2702
2716
|
}
|
|
2703
2717
|
} else
|
|
2704
2718
|
i(0);
|
|
2705
|
-
const
|
|
2719
|
+
const h = setTimeout(() => {
|
|
2706
2720
|
n(Date.now()), e(), o(null);
|
|
2707
2721
|
}, r > 10 ? 100 : 0);
|
|
2708
|
-
o(
|
|
2722
|
+
o(h);
|
|
2709
2723
|
}
|
|
2710
2724
|
function tr(e, t, r, n, i) {
|
|
2711
2725
|
if (!e) return;
|
|
2712
2726
|
const s = Qt(r);
|
|
2713
2727
|
if ((!s || s.trim() === "") && !t._computedStyle) {
|
|
2714
|
-
i(null), e.adoptedStyleSheets = [
|
|
2728
|
+
i(null), e.adoptedStyleSheets = [Xe()];
|
|
2715
2729
|
return;
|
|
2716
2730
|
}
|
|
2717
2731
|
let o = "";
|
|
2718
2732
|
t._computedStyle && (o = t._computedStyle);
|
|
2719
|
-
let c =
|
|
2733
|
+
let c = It(`${o}
|
|
2720
2734
|
${s}
|
|
2721
2735
|
`);
|
|
2722
|
-
c =
|
|
2736
|
+
c = pt(c);
|
|
2723
2737
|
let a = n;
|
|
2724
|
-
a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [
|
|
2738
|
+
a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Xe(), a], i(a);
|
|
2725
2739
|
}
|
|
2726
|
-
let
|
|
2740
|
+
let P = null;
|
|
2727
2741
|
function rr(e) {
|
|
2728
|
-
|
|
2742
|
+
P = e;
|
|
2729
2743
|
}
|
|
2730
2744
|
function nr() {
|
|
2731
|
-
|
|
2745
|
+
P = null;
|
|
2732
2746
|
}
|
|
2733
2747
|
function br() {
|
|
2734
|
-
if (!
|
|
2748
|
+
if (!P)
|
|
2735
2749
|
throw new Error("useEmit must be called during component render");
|
|
2736
|
-
const e =
|
|
2750
|
+
const e = P.emit;
|
|
2737
2751
|
return (t, r) => e(t, r);
|
|
2738
2752
|
}
|
|
2739
|
-
function
|
|
2753
|
+
function he(e) {
|
|
2740
2754
|
e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
|
|
2741
2755
|
value: {},
|
|
2742
2756
|
writable: !0,
|
|
@@ -2745,39 +2759,58 @@ function xe(e) {
|
|
|
2745
2759
|
});
|
|
2746
2760
|
}
|
|
2747
2761
|
function wr(e) {
|
|
2748
|
-
if (!
|
|
2762
|
+
if (!P)
|
|
2749
2763
|
throw new Error("useOnConnected must be called during component render");
|
|
2750
|
-
|
|
2764
|
+
he(P), P._hookCallbacks.onConnected = e;
|
|
2751
2765
|
}
|
|
2752
2766
|
function xr(e) {
|
|
2753
|
-
if (!
|
|
2767
|
+
if (!P)
|
|
2754
2768
|
throw new Error("useOnDisconnected must be called during component render");
|
|
2755
|
-
|
|
2769
|
+
he(P), P._hookCallbacks.onDisconnected = e;
|
|
2756
2770
|
}
|
|
2757
2771
|
function vr(e) {
|
|
2758
|
-
if (!
|
|
2772
|
+
if (!P)
|
|
2759
2773
|
throw new Error("useOnAttributeChanged must be called during component render");
|
|
2760
|
-
|
|
2774
|
+
he(P), P._hookCallbacks.onAttributeChanged = e;
|
|
2761
2775
|
}
|
|
2762
2776
|
function $r(e) {
|
|
2763
|
-
if (!
|
|
2777
|
+
if (!P)
|
|
2764
2778
|
throw new Error("useOnError must be called during component render");
|
|
2765
|
-
|
|
2779
|
+
he(P), P._hookCallbacks.onError = e;
|
|
2766
2780
|
}
|
|
2767
2781
|
function kr(e) {
|
|
2768
|
-
if (!
|
|
2782
|
+
if (!P)
|
|
2783
|
+
throw new Error("useProps must be called during component render");
|
|
2784
|
+
he(P), P._hookCallbacks.props = {
|
|
2785
|
+
...P._hookCallbacks.props || {},
|
|
2786
|
+
...e
|
|
2787
|
+
};
|
|
2788
|
+
const t = P, r = {};
|
|
2789
|
+
return Object.keys(e).forEach((n) => {
|
|
2790
|
+
Object.defineProperty(r, n, {
|
|
2791
|
+
enumerable: !0,
|
|
2792
|
+
configurable: !0,
|
|
2793
|
+
get() {
|
|
2794
|
+
const i = t[n];
|
|
2795
|
+
return i != null && i !== "" ? i : e[n];
|
|
2796
|
+
}
|
|
2797
|
+
});
|
|
2798
|
+
}), r;
|
|
2799
|
+
}
|
|
2800
|
+
function Cr(e) {
|
|
2801
|
+
if (!P)
|
|
2769
2802
|
throw new Error("useStyle must be called during component render");
|
|
2770
|
-
|
|
2803
|
+
he(P);
|
|
2771
2804
|
try {
|
|
2772
2805
|
const t = e();
|
|
2773
|
-
Object.defineProperty(
|
|
2806
|
+
Object.defineProperty(P, "_computedStyle", {
|
|
2774
2807
|
value: t,
|
|
2775
2808
|
writable: !0,
|
|
2776
2809
|
enumerable: !1,
|
|
2777
2810
|
configurable: !0
|
|
2778
2811
|
});
|
|
2779
2812
|
} catch (t) {
|
|
2780
|
-
console.warn("Error in useStyle callback:", t), Object.defineProperty(
|
|
2813
|
+
console.warn("Error in useStyle callback:", t), Object.defineProperty(P, "_computedStyle", {
|
|
2781
2814
|
value: "",
|
|
2782
2815
|
writable: !0,
|
|
2783
2816
|
enumerable: !1,
|
|
@@ -2785,10 +2818,10 @@ function kr(e) {
|
|
|
2785
2818
|
});
|
|
2786
2819
|
}
|
|
2787
2820
|
}
|
|
2788
|
-
const
|
|
2821
|
+
const Re = /* @__PURE__ */ new Map(), it = Symbol.for("cer.registry");
|
|
2789
2822
|
if (typeof window < "u") {
|
|
2790
2823
|
const e = globalThis;
|
|
2791
|
-
e[
|
|
2824
|
+
e[it] || (e[it] = Re);
|
|
2792
2825
|
}
|
|
2793
2826
|
function ir(e, t) {
|
|
2794
2827
|
if (!t.render)
|
|
@@ -2833,7 +2866,7 @@ function ir(e, t) {
|
|
|
2833
2866
|
_templateLoading = !1;
|
|
2834
2867
|
_templateError = null;
|
|
2835
2868
|
constructor() {
|
|
2836
|
-
super(), this.attachShadow({ mode: "open" }), this._cfg =
|
|
2869
|
+
super(), this.attachShadow({ mode: "open" }), this._cfg = Re.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2837
2870
|
const r = this._initContext(t);
|
|
2838
2871
|
Object.defineProperty(r, "refs", {
|
|
2839
2872
|
value: this._refs,
|
|
@@ -2874,7 +2907,7 @@ function ir(e, t) {
|
|
|
2874
2907
|
enumerable: !1,
|
|
2875
2908
|
configurable: !1
|
|
2876
2909
|
});
|
|
2877
|
-
const n =
|
|
2910
|
+
const n = Re.get(e) || t;
|
|
2878
2911
|
Object.keys(n).forEach((i) => {
|
|
2879
2912
|
const s = n[i];
|
|
2880
2913
|
typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
|
|
@@ -2895,14 +2928,14 @@ function ir(e, t) {
|
|
|
2895
2928
|
}
|
|
2896
2929
|
connectedCallback() {
|
|
2897
2930
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2898
|
-
this._applyProps(t), this._requestRender(),
|
|
2931
|
+
this._applyProps(t), this._requestRender(), _t(t, this.context, this._mounted, (r) => {
|
|
2899
2932
|
this._mounted = r;
|
|
2900
2933
|
});
|
|
2901
2934
|
});
|
|
2902
2935
|
}
|
|
2903
2936
|
disconnectedCallback() {
|
|
2904
2937
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2905
|
-
|
|
2938
|
+
Et(
|
|
2906
2939
|
t,
|
|
2907
2940
|
this.context,
|
|
2908
2941
|
this._listeners,
|
|
@@ -2926,11 +2959,11 @@ function ir(e, t) {
|
|
|
2926
2959
|
}
|
|
2927
2960
|
attributeChangedCallback(r, n, i) {
|
|
2928
2961
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2929
|
-
this._applyProps(t), n !== i && this._requestRender(),
|
|
2962
|
+
this._applyProps(t), n !== i && this._requestRender(), St(t, r, n, i, this.context);
|
|
2930
2963
|
});
|
|
2931
2964
|
}
|
|
2932
2965
|
static get observedAttributes() {
|
|
2933
|
-
return t.props ? Object.keys(t.props).map(
|
|
2966
|
+
return t.props ? Object.keys(t.props).map(ie) : [];
|
|
2934
2967
|
}
|
|
2935
2968
|
_applyComputed(r) {
|
|
2936
2969
|
}
|
|
@@ -2960,7 +2993,7 @@ function ir(e, t) {
|
|
|
2960
2993
|
}
|
|
2961
2994
|
_requestRender() {
|
|
2962
2995
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
2963
|
-
|
|
2996
|
+
de(() => {
|
|
2964
2997
|
er(
|
|
2965
2998
|
() => this._render(this._cfg),
|
|
2966
2999
|
this._lastRenderTime,
|
|
@@ -3007,9 +3040,9 @@ function ir(e, t) {
|
|
|
3007
3040
|
try {
|
|
3008
3041
|
let n = function(s, o = "") {
|
|
3009
3042
|
return Array.isArray(s) ? new Proxy(s, {
|
|
3010
|
-
get(c, a,
|
|
3011
|
-
const
|
|
3012
|
-
return typeof
|
|
3043
|
+
get(c, a, h) {
|
|
3044
|
+
const p = Reflect.get(c, a, h);
|
|
3045
|
+
return typeof p == "function" && typeof a == "string" && [
|
|
3013
3046
|
"push",
|
|
3014
3047
|
"pop",
|
|
3015
3048
|
"shift",
|
|
@@ -3017,29 +3050,29 @@ function ir(e, t) {
|
|
|
3017
3050
|
"splice",
|
|
3018
3051
|
"sort",
|
|
3019
3052
|
"reverse"
|
|
3020
|
-
].includes(a) ? function(...
|
|
3021
|
-
const
|
|
3053
|
+
].includes(a) ? function(...m) {
|
|
3054
|
+
const d = p.apply(c, m);
|
|
3022
3055
|
if (!i._initializing) {
|
|
3023
|
-
const
|
|
3024
|
-
i._triggerWatchers(
|
|
3056
|
+
const u = o || "root";
|
|
3057
|
+
i._triggerWatchers(u, c), de(
|
|
3025
3058
|
() => i._render(r),
|
|
3026
3059
|
i._componentId
|
|
3027
3060
|
);
|
|
3028
3061
|
}
|
|
3029
|
-
return
|
|
3030
|
-
} :
|
|
3062
|
+
return d;
|
|
3063
|
+
} : p;
|
|
3031
3064
|
},
|
|
3032
|
-
set(c, a,
|
|
3033
|
-
if (c[a] =
|
|
3034
|
-
const
|
|
3035
|
-
i._triggerWatchers(
|
|
3065
|
+
set(c, a, h) {
|
|
3066
|
+
if (c[a] = h, !i._initializing) {
|
|
3067
|
+
const p = o ? `${o}.${String(a)}` : String(a);
|
|
3068
|
+
i._triggerWatchers(p, h), de(() => i._render(r), i._componentId);
|
|
3036
3069
|
}
|
|
3037
3070
|
return !0;
|
|
3038
3071
|
},
|
|
3039
3072
|
deleteProperty(c, a) {
|
|
3040
3073
|
if (delete c[a], !i._initializing) {
|
|
3041
|
-
const
|
|
3042
|
-
i._triggerWatchers(
|
|
3074
|
+
const h = o ? `${o}.${String(a)}` : String(a);
|
|
3075
|
+
i._triggerWatchers(h, void 0), de(() => i._render(r), i._componentId);
|
|
3043
3076
|
}
|
|
3044
3077
|
return !0;
|
|
3045
3078
|
}
|
|
@@ -3047,12 +3080,12 @@ function ir(e, t) {
|
|
|
3047
3080
|
const a = o ? `${o}.${c}` : c;
|
|
3048
3081
|
s[c] = n(s[c], a);
|
|
3049
3082
|
}), new Proxy(s, {
|
|
3050
|
-
set(c, a,
|
|
3051
|
-
const
|
|
3052
|
-
return c[a] = n(
|
|
3083
|
+
set(c, a, h) {
|
|
3084
|
+
const p = o ? `${o}.${String(a)}` : String(a);
|
|
3085
|
+
return c[a] = n(h, p), i._initializing || (i._triggerWatchers(p, c[a]), de(() => i._render(r), i._componentId)), !0;
|
|
3053
3086
|
},
|
|
3054
|
-
get(c, a,
|
|
3055
|
-
return Reflect.get(c, a,
|
|
3087
|
+
get(c, a, h) {
|
|
3088
|
+
return Reflect.get(c, a, h);
|
|
3056
3089
|
}
|
|
3057
3090
|
})) : s;
|
|
3058
3091
|
};
|
|
@@ -3073,7 +3106,7 @@ function ir(e, t) {
|
|
|
3073
3106
|
}
|
|
3074
3107
|
_initWatchers(r) {
|
|
3075
3108
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
3076
|
-
|
|
3109
|
+
vt(
|
|
3077
3110
|
this.context,
|
|
3078
3111
|
this._watchers,
|
|
3079
3112
|
{}
|
|
@@ -3082,12 +3115,12 @@ function ir(e, t) {
|
|
|
3082
3115
|
});
|
|
3083
3116
|
}
|
|
3084
3117
|
_triggerWatchers(r, n) {
|
|
3085
|
-
|
|
3118
|
+
$t(this.context, this._watchers, r, n);
|
|
3086
3119
|
}
|
|
3087
3120
|
_applyProps(r) {
|
|
3088
3121
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
3089
3122
|
try {
|
|
3090
|
-
|
|
3123
|
+
Ct(this, r, this.context);
|
|
3091
3124
|
} catch (n) {
|
|
3092
3125
|
this._hasError = !0, r.onError && r.onError(n, this.context);
|
|
3093
3126
|
}
|
|
@@ -3095,8 +3128,8 @@ function ir(e, t) {
|
|
|
3095
3128
|
}
|
|
3096
3129
|
};
|
|
3097
3130
|
}
|
|
3098
|
-
function
|
|
3099
|
-
let r =
|
|
3131
|
+
function st(e, t) {
|
|
3132
|
+
let r = ie(e);
|
|
3100
3133
|
r.includes("-") || (r = `cer-${r}`);
|
|
3101
3134
|
let n = {};
|
|
3102
3135
|
if (typeof window < "u")
|
|
@@ -3105,150 +3138,150 @@ function nt(e, t) {
|
|
|
3105
3138
|
let c = null;
|
|
3106
3139
|
const a = o.indexOf("({");
|
|
3107
3140
|
if (a !== -1) {
|
|
3108
|
-
let
|
|
3109
|
-
for (let
|
|
3110
|
-
const y = o[
|
|
3111
|
-
if (
|
|
3112
|
-
|
|
3141
|
+
let h = 0, p = !1, x = null, m = !1, d = -1;
|
|
3142
|
+
for (let u = a + 2; u < o.length; u++) {
|
|
3143
|
+
const y = o[u];
|
|
3144
|
+
if (m) {
|
|
3145
|
+
m = !1;
|
|
3113
3146
|
continue;
|
|
3114
3147
|
}
|
|
3115
3148
|
if (y === "\\") {
|
|
3116
|
-
|
|
3149
|
+
m = !0;
|
|
3117
3150
|
continue;
|
|
3118
3151
|
}
|
|
3119
|
-
if (!
|
|
3120
|
-
|
|
3152
|
+
if (!p && (y === '"' || y === "'" || y === "`")) {
|
|
3153
|
+
p = !0, x = y;
|
|
3121
3154
|
continue;
|
|
3122
3155
|
}
|
|
3123
|
-
if (
|
|
3124
|
-
|
|
3156
|
+
if (p && y === x) {
|
|
3157
|
+
p = !1, x = null;
|
|
3125
3158
|
continue;
|
|
3126
3159
|
}
|
|
3127
|
-
if (!
|
|
3160
|
+
if (!p) {
|
|
3128
3161
|
if (y === "{")
|
|
3129
|
-
|
|
3162
|
+
h++;
|
|
3130
3163
|
else if (y === "}") {
|
|
3131
|
-
if (
|
|
3132
|
-
|
|
3164
|
+
if (h === 0) {
|
|
3165
|
+
d = u;
|
|
3133
3166
|
break;
|
|
3134
3167
|
}
|
|
3135
|
-
|
|
3168
|
+
h--;
|
|
3136
3169
|
}
|
|
3137
3170
|
}
|
|
3138
3171
|
}
|
|
3139
|
-
if (
|
|
3140
|
-
const
|
|
3141
|
-
c = [
|
|
3172
|
+
if (d !== -1) {
|
|
3173
|
+
const u = o.substring(a, d + 2), y = o.substring(a + 2, d).trim();
|
|
3174
|
+
c = [u, y];
|
|
3142
3175
|
}
|
|
3143
3176
|
}
|
|
3144
3177
|
if (c) {
|
|
3145
|
-
const
|
|
3146
|
-
let
|
|
3147
|
-
for (;
|
|
3148
|
-
const l =
|
|
3178
|
+
const h = c[1];
|
|
3179
|
+
let p = "", x = "", m = !0, d = 0, u = null, y = !1, w = 0;
|
|
3180
|
+
for (; w < h.length; ) {
|
|
3181
|
+
const l = h[w];
|
|
3149
3182
|
if (y) {
|
|
3150
|
-
|
|
3183
|
+
m ? p += l : x += l, y = !1, w++;
|
|
3151
3184
|
continue;
|
|
3152
3185
|
}
|
|
3153
3186
|
if (l === "\\") {
|
|
3154
|
-
y = !0,
|
|
3187
|
+
y = !0, m ? p += l : x += l, w++;
|
|
3155
3188
|
continue;
|
|
3156
3189
|
}
|
|
3157
|
-
if ((l === '"' || l === "'" || l === "`") && !
|
|
3158
|
-
|
|
3190
|
+
if ((l === '"' || l === "'" || l === "`") && !u) {
|
|
3191
|
+
u = l, m ? p += l : x += l, w++;
|
|
3159
3192
|
continue;
|
|
3160
3193
|
}
|
|
3161
|
-
if (l ===
|
|
3162
|
-
|
|
3194
|
+
if (l === u) {
|
|
3195
|
+
u = null, m ? p += l : x += l, w++;
|
|
3163
3196
|
continue;
|
|
3164
3197
|
}
|
|
3165
|
-
if (
|
|
3166
|
-
|
|
3198
|
+
if (u) {
|
|
3199
|
+
m ? p += l : x += l, w++;
|
|
3167
3200
|
continue;
|
|
3168
3201
|
}
|
|
3169
3202
|
if (l === "{" || l === "[") {
|
|
3170
|
-
|
|
3203
|
+
d++, m ? p += l : x += l, w++;
|
|
3171
3204
|
continue;
|
|
3172
3205
|
}
|
|
3173
3206
|
if (l === "}" || l === "]") {
|
|
3174
|
-
|
|
3207
|
+
d--, m ? p += l : x += l, w++;
|
|
3175
3208
|
continue;
|
|
3176
3209
|
}
|
|
3177
|
-
if (l === "=" &&
|
|
3178
|
-
|
|
3210
|
+
if (l === "=" && d === 0 && m) {
|
|
3211
|
+
m = !1, w++;
|
|
3179
3212
|
continue;
|
|
3180
3213
|
}
|
|
3181
|
-
if (l === "," &&
|
|
3182
|
-
if (
|
|
3183
|
-
const
|
|
3214
|
+
if (l === "," && d === 0) {
|
|
3215
|
+
if (p.trim() && x.trim()) {
|
|
3216
|
+
const f = p.trim(), b = x.trim();
|
|
3184
3217
|
try {
|
|
3185
|
-
if (
|
|
3186
|
-
else if (
|
|
3187
|
-
else if (
|
|
3188
|
-
else if (
|
|
3189
|
-
else if (/^\d+$/.test(
|
|
3190
|
-
n[
|
|
3191
|
-
else if (/^'.*'$/s.test(
|
|
3192
|
-
n[
|
|
3193
|
-
else if (/^".*"$/s.test(
|
|
3194
|
-
n[
|
|
3195
|
-
else if (/^`.*`$/s.test(
|
|
3196
|
-
const k =
|
|
3218
|
+
if (b === "true") n[f] = !0;
|
|
3219
|
+
else if (b === "false") n[f] = !1;
|
|
3220
|
+
else if (b === "[]") n[f] = [];
|
|
3221
|
+
else if (b === "{}") n[f] = {};
|
|
3222
|
+
else if (/^\d+$/.test(b))
|
|
3223
|
+
n[f] = parseInt(b);
|
|
3224
|
+
else if (/^'.*'$/s.test(b))
|
|
3225
|
+
n[f] = b.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
|
|
3226
|
+
else if (/^".*"$/s.test(b))
|
|
3227
|
+
n[f] = b.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
|
|
3228
|
+
else if (/^`.*`$/s.test(b)) {
|
|
3229
|
+
const k = b.slice(1, -1);
|
|
3197
3230
|
if (k.includes("${"))
|
|
3198
3231
|
try {
|
|
3199
|
-
n[
|
|
3232
|
+
n[f] = new Function(
|
|
3200
3233
|
`return \`${k}\`;`
|
|
3201
3234
|
)();
|
|
3202
3235
|
} catch {
|
|
3203
|
-
n[
|
|
3236
|
+
n[f] = k;
|
|
3204
3237
|
}
|
|
3205
3238
|
else
|
|
3206
|
-
n[
|
|
3239
|
+
n[f] = k;
|
|
3207
3240
|
} else
|
|
3208
|
-
n[
|
|
3241
|
+
n[f] = b;
|
|
3209
3242
|
} catch {
|
|
3210
|
-
n[
|
|
3243
|
+
n[f] = "";
|
|
3211
3244
|
}
|
|
3212
|
-
} else if (
|
|
3213
|
-
const
|
|
3214
|
-
|
|
3245
|
+
} else if (p.trim()) {
|
|
3246
|
+
const f = p.split(":")[0].trim();
|
|
3247
|
+
f && !f.includes("}") && (n[f] = "");
|
|
3215
3248
|
}
|
|
3216
|
-
|
|
3249
|
+
p = "", x = "", m = !0, w++;
|
|
3217
3250
|
continue;
|
|
3218
3251
|
}
|
|
3219
|
-
|
|
3252
|
+
m ? p += l : x += l, w++;
|
|
3220
3253
|
}
|
|
3221
|
-
if (
|
|
3222
|
-
const l =
|
|
3254
|
+
if (p.trim() && x.trim()) {
|
|
3255
|
+
const l = p.trim(), f = x.trim();
|
|
3223
3256
|
try {
|
|
3224
|
-
if (
|
|
3225
|
-
else if (
|
|
3226
|
-
else if (
|
|
3227
|
-
else if (
|
|
3228
|
-
else if (/^\d+$/.test(
|
|
3229
|
-
else if (/^'.*'$/s.test(
|
|
3230
|
-
n[l] =
|
|
3231
|
-
else if (/^".*"$/s.test(
|
|
3232
|
-
n[l] =
|
|
3233
|
-
else if (/^`.*`$/s.test(
|
|
3234
|
-
const
|
|
3235
|
-
if (
|
|
3257
|
+
if (f === "true") n[l] = !0;
|
|
3258
|
+
else if (f === "false") n[l] = !1;
|
|
3259
|
+
else if (f === "[]") n[l] = [];
|
|
3260
|
+
else if (f === "{}") n[l] = {};
|
|
3261
|
+
else if (/^\d+$/.test(f)) n[l] = parseInt(f);
|
|
3262
|
+
else if (/^'.*'$/s.test(f))
|
|
3263
|
+
n[l] = f.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
|
|
3264
|
+
else if (/^".*"$/s.test(f))
|
|
3265
|
+
n[l] = f.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
|
|
3266
|
+
else if (/^`.*`$/s.test(f)) {
|
|
3267
|
+
const b = f.slice(1, -1);
|
|
3268
|
+
if (b.includes("${"))
|
|
3236
3269
|
try {
|
|
3237
3270
|
n[l] = new Function(
|
|
3238
|
-
`return \`${
|
|
3271
|
+
`return \`${b}\`;`
|
|
3239
3272
|
)();
|
|
3240
3273
|
} catch {
|
|
3241
|
-
n[l] =
|
|
3274
|
+
n[l] = b;
|
|
3242
3275
|
}
|
|
3243
3276
|
else
|
|
3244
|
-
n[l] =
|
|
3277
|
+
n[l] = b;
|
|
3245
3278
|
} else
|
|
3246
|
-
n[l] =
|
|
3279
|
+
n[l] = f;
|
|
3247
3280
|
} catch {
|
|
3248
3281
|
n[l] = "";
|
|
3249
3282
|
}
|
|
3250
|
-
} else if (
|
|
3251
|
-
const l =
|
|
3283
|
+
} else if (p.trim()) {
|
|
3284
|
+
const l = p.split(":")[0].trim();
|
|
3252
3285
|
l && !l.includes("}") && (n[l] = "");
|
|
3253
3286
|
}
|
|
3254
3287
|
}
|
|
@@ -3267,7 +3300,7 @@ function nt(e, t) {
|
|
|
3267
3300
|
onDisconnected: (o) => {
|
|
3268
3301
|
i.onDisconnected && i.onDisconnected();
|
|
3269
3302
|
},
|
|
3270
|
-
onAttributeChanged: (o, c, a,
|
|
3303
|
+
onAttributeChanged: (o, c, a, h) => {
|
|
3271
3304
|
i.onAttributeChanged && i.onAttributeChanged(o, c, a);
|
|
3272
3305
|
},
|
|
3273
3306
|
onError: (o, c) => {
|
|
@@ -3281,26 +3314,26 @@ function nt(e, t) {
|
|
|
3281
3314
|
try {
|
|
3282
3315
|
rr(o);
|
|
3283
3316
|
const a = Object.keys(n).length > 0;
|
|
3284
|
-
let
|
|
3317
|
+
let h;
|
|
3285
3318
|
if (a) {
|
|
3286
|
-
const
|
|
3287
|
-
Object.keys(n).forEach((
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3290
|
-
}),
|
|
3319
|
+
const p = {};
|
|
3320
|
+
Object.keys(n).forEach((x) => {
|
|
3321
|
+
const m = o[x], d = n[x];
|
|
3322
|
+
p[x] = m != null && m !== "" ? m : d;
|
|
3323
|
+
}), h = t(p);
|
|
3291
3324
|
} else
|
|
3292
|
-
|
|
3325
|
+
h = t();
|
|
3293
3326
|
if (o._hookCallbacks) {
|
|
3294
|
-
const
|
|
3295
|
-
|
|
3327
|
+
const p = o._hookCallbacks;
|
|
3328
|
+
p.onConnected && (i.onConnected = p.onConnected), p.onDisconnected && (i.onDisconnected = p.onDisconnected), p.onAttributeChanged && (i.onAttributeChanged = p.onAttributeChanged), p.onError && (i.onError = p.onError), p.style && (o._styleCallback = p.style);
|
|
3296
3329
|
}
|
|
3297
|
-
return
|
|
3330
|
+
return h;
|
|
3298
3331
|
} finally {
|
|
3299
3332
|
nr(), F.clearCurrentComponent();
|
|
3300
3333
|
}
|
|
3301
3334
|
}
|
|
3302
3335
|
};
|
|
3303
|
-
|
|
3336
|
+
Re.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
|
|
3304
3337
|
r,
|
|
3305
3338
|
ir(r, s)
|
|
3306
3339
|
));
|
|
@@ -3329,7 +3362,7 @@ class sr {
|
|
|
3329
3362
|
this.map.clear();
|
|
3330
3363
|
}
|
|
3331
3364
|
}
|
|
3332
|
-
const
|
|
3365
|
+
const Ue = new sr(500);
|
|
3333
3366
|
function or(e, t) {
|
|
3334
3367
|
if (e == null) {
|
|
3335
3368
|
console.warn(
|
|
@@ -3343,15 +3376,15 @@ function or(e, t) {
|
|
|
3343
3376
|
`💡 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()}"`
|
|
3344
3377
|
);
|
|
3345
3378
|
}
|
|
3346
|
-
function
|
|
3379
|
+
function ye(e, t = {}, r, n) {
|
|
3347
3380
|
const i = n ?? t.key;
|
|
3348
3381
|
return { tag: e, key: i, props: t, children: r };
|
|
3349
3382
|
}
|
|
3350
|
-
function
|
|
3383
|
+
function Te(e) {
|
|
3351
3384
|
return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
|
|
3352
3385
|
}
|
|
3353
|
-
function
|
|
3354
|
-
return typeof e == "object" && e !== null && "tag" in e && !
|
|
3386
|
+
function Se(e) {
|
|
3387
|
+
return typeof e == "object" && e !== null && "tag" in e && !Te(e);
|
|
3355
3388
|
}
|
|
3356
3389
|
function ar(e, t) {
|
|
3357
3390
|
return e.key != null ? e : { ...e, key: t };
|
|
@@ -3360,98 +3393,98 @@ function cr(e, t = [], r = {}) {
|
|
|
3360
3393
|
const n = {}, i = {}, s = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
|
|
3361
3394
|
let a;
|
|
3362
3395
|
for (; a = c.exec(e); ) {
|
|
3363
|
-
const
|
|
3364
|
-
let
|
|
3365
|
-
|
|
3366
|
-
const
|
|
3367
|
-
if (
|
|
3368
|
-
const [y,
|
|
3369
|
-
if (
|
|
3370
|
-
const
|
|
3396
|
+
const h = a[1], p = a[2], x = (a[4] || a[6]) ?? "", m = x.match(/^{{(\d+)}}$/);
|
|
3397
|
+
let d = m ? t[Number(m[1])] ?? null : x;
|
|
3398
|
+
m || (d === "true" ? d = !0 : d === "false" ? d = !1 : d === "null" ? d = null : isNaN(Number(d)) || (d = Number(d)));
|
|
3399
|
+
const u = ["model", "bind", "show", "class", "style", "ref"];
|
|
3400
|
+
if (h === ":") {
|
|
3401
|
+
const [y, w] = p.split(":"), [l, ...f] = y.split(".");
|
|
3402
|
+
if (u.includes(l)) {
|
|
3403
|
+
const b = [...f], k = l === "model" && w ? `model:${w}` : l;
|
|
3371
3404
|
s[k] = {
|
|
3372
|
-
value:
|
|
3373
|
-
modifiers:
|
|
3374
|
-
arg:
|
|
3405
|
+
value: d,
|
|
3406
|
+
modifiers: b,
|
|
3407
|
+
arg: w
|
|
3375
3408
|
};
|
|
3376
3409
|
} else {
|
|
3377
|
-
let
|
|
3378
|
-
|
|
3410
|
+
let b = d;
|
|
3411
|
+
b && ee(b) && (b = b.value), i[p] = b, o.push(p);
|
|
3379
3412
|
}
|
|
3380
|
-
} else if (
|
|
3381
|
-
const [y, ...
|
|
3382
|
-
or(
|
|
3383
|
-
const
|
|
3384
|
-
if (
|
|
3385
|
-
const
|
|
3413
|
+
} else if (h === "@") {
|
|
3414
|
+
const [y, ...w] = p.split("."), l = w;
|
|
3415
|
+
or(d, y);
|
|
3416
|
+
const f = typeof d == "function" ? d : typeof r[d] == "function" ? r[d] : void 0;
|
|
3417
|
+
if (f) {
|
|
3418
|
+
const b = (C) => {
|
|
3386
3419
|
if (l.includes("prevent") && C.preventDefault(), l.includes("stop") && C.stopPropagation(), !(l.includes("self") && C.target !== C.currentTarget))
|
|
3387
|
-
return l.includes("once") && C.currentTarget?.removeEventListener(y,
|
|
3420
|
+
return l.includes("once") && C.currentTarget?.removeEventListener(y, b), f(C);
|
|
3388
3421
|
}, k = "on" + y.charAt(0).toUpperCase() + y.slice(1);
|
|
3389
|
-
n[k] =
|
|
3422
|
+
n[k] = b;
|
|
3390
3423
|
}
|
|
3391
|
-
} else
|
|
3424
|
+
} else p === "ref" ? n.ref = d : i[p] = d;
|
|
3392
3425
|
}
|
|
3393
3426
|
return { props: n, attrs: i, directives: s, bound: o };
|
|
3394
3427
|
}
|
|
3395
3428
|
function lr(e, t, r) {
|
|
3396
|
-
const n =
|
|
3429
|
+
const n = we.length > 0 ? we[we.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3397
3430
|
if (s && o) {
|
|
3398
|
-
const
|
|
3399
|
-
if (
|
|
3431
|
+
const g = Ue.get(o);
|
|
3432
|
+
if (g) return g;
|
|
3400
3433
|
}
|
|
3401
|
-
function c(
|
|
3402
|
-
return
|
|
3434
|
+
function c(g, $) {
|
|
3435
|
+
return ye("#text", {}, g, $);
|
|
3403
3436
|
}
|
|
3404
3437
|
let a = "";
|
|
3405
|
-
for (let
|
|
3406
|
-
a += e[
|
|
3407
|
-
const
|
|
3408
|
-
let
|
|
3409
|
-
function
|
|
3410
|
-
!
|
|
3411
|
-
if ($ === "style" &&
|
|
3412
|
-
const
|
|
3438
|
+
for (let g = 0; g < e.length; g++)
|
|
3439
|
+
a += e[g], g < t.length && (a += `{{${g}}}`);
|
|
3440
|
+
const h = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, p = [];
|
|
3441
|
+
let x, m = [], d = null, u = {}, y, w = 0, l = [];
|
|
3442
|
+
function f(g) {
|
|
3443
|
+
!g || typeof g != "object" || Te(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(($) => {
|
|
3444
|
+
if ($ === "style" && u.attrs.style) {
|
|
3445
|
+
const j = u.attrs.style.replace(
|
|
3413
3446
|
/;?\s*$/,
|
|
3414
3447
|
""
|
|
3415
|
-
), v =
|
|
3416
|
-
|
|
3417
|
-
} else if ($ === "class" &&
|
|
3418
|
-
const
|
|
3419
|
-
.../* @__PURE__ */ new Set([...
|
|
3448
|
+
), v = g.attrs.style.replace(/^;?\s*/, "");
|
|
3449
|
+
u.attrs.style = j + "; " + v;
|
|
3450
|
+
} else if ($ === "class" && u.attrs.class) {
|
|
3451
|
+
const j = u.attrs.class.trim().split(/\s+/).filter(Boolean), v = g.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
|
|
3452
|
+
.../* @__PURE__ */ new Set([...j, ...v])
|
|
3420
3453
|
];
|
|
3421
|
-
|
|
3454
|
+
u.attrs.class = _.join(" ");
|
|
3422
3455
|
} else
|
|
3423
|
-
|
|
3424
|
-
}))) : (
|
|
3425
|
-
}
|
|
3426
|
-
function
|
|
3427
|
-
const
|
|
3428
|
-
if (
|
|
3429
|
-
const v =
|
|
3430
|
-
let
|
|
3431
|
-
|
|
3432
|
-
...
|
|
3456
|
+
u.attrs[$] = g.attrs[$];
|
|
3457
|
+
}))) : (u.props || (u.props = {}), Object.assign(u.props, g)));
|
|
3458
|
+
}
|
|
3459
|
+
function b(g, $) {
|
|
3460
|
+
const j = d ? m : l;
|
|
3461
|
+
if (Te(g)) {
|
|
3462
|
+
const v = g.key ?? $;
|
|
3463
|
+
let _ = g.children;
|
|
3464
|
+
j.push({
|
|
3465
|
+
...g,
|
|
3433
3466
|
key: v,
|
|
3434
|
-
children:
|
|
3467
|
+
children: _
|
|
3435
3468
|
});
|
|
3436
3469
|
return;
|
|
3437
3470
|
}
|
|
3438
|
-
if (
|
|
3439
|
-
|
|
3471
|
+
if (Se(g)) {
|
|
3472
|
+
j.push(ar(g, void 0));
|
|
3440
3473
|
return;
|
|
3441
3474
|
}
|
|
3442
|
-
if (Array.isArray(
|
|
3443
|
-
if (
|
|
3444
|
-
for (let v = 0; v <
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3475
|
+
if (Array.isArray(g)) {
|
|
3476
|
+
if (g.length === 0) return;
|
|
3477
|
+
for (let v = 0; v < g.length; v++) {
|
|
3478
|
+
const _ = g[v];
|
|
3479
|
+
Te(_) || Se(_) || Array.isArray(_) ? b(_, `${$}-${v}`) : _ !== null && typeof _ == "object" ? f(_) : j.push(c(String(_), `${$}-${v}`));
|
|
3447
3480
|
}
|
|
3448
3481
|
return;
|
|
3449
3482
|
}
|
|
3450
|
-
if (
|
|
3451
|
-
|
|
3483
|
+
if (g !== null && typeof g == "object") {
|
|
3484
|
+
f(g);
|
|
3452
3485
|
return;
|
|
3453
3486
|
}
|
|
3454
|
-
|
|
3487
|
+
j.push(c(String(g), $));
|
|
3455
3488
|
}
|
|
3456
3489
|
const k = /* @__PURE__ */ new Set([
|
|
3457
3490
|
"area",
|
|
@@ -3469,20 +3502,20 @@ function lr(e, t, r) {
|
|
|
3469
3502
|
"track",
|
|
3470
3503
|
"wbr"
|
|
3471
3504
|
]);
|
|
3472
|
-
for (;
|
|
3473
|
-
if (!(
|
|
3474
|
-
if (
|
|
3475
|
-
const
|
|
3505
|
+
for (; x = h.exec(a); )
|
|
3506
|
+
if (!(x[0].startsWith("<!--") && x[0].endsWith("-->"))) {
|
|
3507
|
+
if (x[1]) {
|
|
3508
|
+
const g = x[1], $ = x[0][1] === "/", j = x[0][x[0].length - 2] === "/" || k.has(g), {
|
|
3476
3509
|
props: v,
|
|
3477
|
-
attrs:
|
|
3478
|
-
directives:
|
|
3479
|
-
bound:
|
|
3480
|
-
} = cr(
|
|
3481
|
-
for (const O in v)
|
|
3482
|
-
for (const O in
|
|
3483
|
-
if (
|
|
3510
|
+
attrs: _,
|
|
3511
|
+
directives: A,
|
|
3512
|
+
bound: D
|
|
3513
|
+
} = cr(x[2] || "", t, i), S = { props: {}, attrs: {} };
|
|
3514
|
+
for (const O in v) S.props[O] = v[O];
|
|
3515
|
+
for (const O in _) S.attrs[O] = _[O];
|
|
3516
|
+
if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
|
|
3484
3517
|
try {
|
|
3485
|
-
|
|
3518
|
+
S.props.key = S.attrs.key;
|
|
3486
3519
|
} catch {
|
|
3487
3520
|
}
|
|
3488
3521
|
try {
|
|
@@ -3495,108 +3528,108 @@ function lr(e, t, r) {
|
|
|
3495
3528
|
audio: ["muted", "autoplay", "controls", "loop"],
|
|
3496
3529
|
img: ["src", "alt", "width", "height"],
|
|
3497
3530
|
button: ["type", "name", "value", "disabled", "autofocus", "form"]
|
|
3498
|
-
}, H =
|
|
3499
|
-
if (
|
|
3500
|
-
for (const
|
|
3501
|
-
if (
|
|
3502
|
-
let
|
|
3503
|
-
|
|
3531
|
+
}, H = g.toLowerCase(), te = O[H] ?? [];
|
|
3532
|
+
if (S.attrs) {
|
|
3533
|
+
for (const N of te)
|
|
3534
|
+
if (D && D.includes(N) && N in S.attrs && !(S.props && N in S.props)) {
|
|
3535
|
+
let W = S.attrs[N];
|
|
3536
|
+
W && ee(W) && (W = W.value), S.props[N] = W, delete S.attrs[N];
|
|
3504
3537
|
}
|
|
3505
3538
|
}
|
|
3506
|
-
if ((
|
|
3507
|
-
const
|
|
3508
|
-
for (const
|
|
3509
|
-
if (
|
|
3510
|
-
const V =
|
|
3511
|
-
let
|
|
3512
|
-
|
|
3539
|
+
if ((g.includes("-") || !!i?.__customElements?.has?.(g)) && (S.isCustomElement = !0, D && S.attrs)) {
|
|
3540
|
+
const N = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
3541
|
+
for (const W of D)
|
|
3542
|
+
if (W in S.attrs && !(S.props && W in S.props)) {
|
|
3543
|
+
const V = W.includes("-") ? W.split("-").map((G, I) => I === 0 ? G : G.charAt(0).toUpperCase() + G.slice(1)).join("") : W;
|
|
3544
|
+
let K = S.attrs[W];
|
|
3545
|
+
K && ee(K) && (K = K.value), S.props[V] = K, N.has(W) || delete S.attrs[W];
|
|
3513
3546
|
}
|
|
3514
3547
|
}
|
|
3515
3548
|
} catch {
|
|
3516
3549
|
}
|
|
3517
|
-
if (
|
|
3550
|
+
if (A && Object.keys(A).some((O) => O === "model" || O.startsWith("model:")))
|
|
3518
3551
|
try {
|
|
3519
|
-
const O = Symbol.for("cer.registry"), H = globalThis[O],
|
|
3520
|
-
if (!!(
|
|
3521
|
-
for (const V of Object.keys(
|
|
3552
|
+
const O = Symbol.for("cer.registry"), H = globalThis[O], te = !!(H && typeof H.has == "function" && H.has(g)), $e = !!(i && (i.__customElements instanceof Set && i.__customElements.has(g) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(g)));
|
|
3553
|
+
if (!!(g.includes("-") || $e || te))
|
|
3554
|
+
for (const V of Object.keys(A)) {
|
|
3522
3555
|
if (V !== "model" && !V.startsWith("model:")) continue;
|
|
3523
|
-
const
|
|
3524
|
-
let
|
|
3525
|
-
typeof
|
|
3556
|
+
const K = A[V], G = K.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), I = K.value, X = G ?? "modelValue", re = U, E = Ae, T = i ? i._state || i : void 0;
|
|
3557
|
+
let R;
|
|
3558
|
+
typeof I == "string" && i ? R = re(T, I) : (R = I, R && ee(R) && (R = R.value)), S.props[X] = R;
|
|
3526
3559
|
try {
|
|
3527
|
-
const
|
|
3528
|
-
|
|
3560
|
+
const se = ie(X);
|
|
3561
|
+
S.attrs || (S.attrs = {}), R !== void 0 && (S.attrs[se] = R);
|
|
3529
3562
|
} catch {
|
|
3530
3563
|
}
|
|
3531
|
-
|
|
3532
|
-
const
|
|
3533
|
-
|
|
3534
|
-
const Q =
|
|
3535
|
-
if (
|
|
3536
|
-
if (
|
|
3537
|
-
const
|
|
3538
|
-
(Array.isArray(Q) && Array.isArray(
|
|
3564
|
+
S.isCustomElement = !0;
|
|
3565
|
+
const L = `update:${ie(X)}`.replace(/-([a-z])/g, (se, Q) => Q.toUpperCase()), z = "on" + L.charAt(0).toUpperCase() + L.slice(1);
|
|
3566
|
+
S.props[z] = function(se) {
|
|
3567
|
+
const Q = se.detail !== void 0 ? se.detail : se.target ? se.target.value : void 0;
|
|
3568
|
+
if (T)
|
|
3569
|
+
if (I && ee(I)) {
|
|
3570
|
+
const ce = I.value;
|
|
3571
|
+
(Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (I.value = Q, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
|
|
3539
3572
|
} else {
|
|
3540
|
-
const
|
|
3541
|
-
(Array.isArray(Q) && Array.isArray(
|
|
3573
|
+
const ce = re(T, typeof I == "string" ? I : String(I));
|
|
3574
|
+
(Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (E(T, typeof I == "string" ? I : String(I), Q), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
|
|
3542
3575
|
}
|
|
3543
|
-
}, delete
|
|
3576
|
+
}, delete A[V];
|
|
3544
3577
|
}
|
|
3545
3578
|
} catch {
|
|
3546
3579
|
}
|
|
3547
|
-
if (Object.keys(
|
|
3548
|
-
const O =
|
|
3580
|
+
if (Object.keys(A).length > 0 && (S.directives = { ...A }), $) {
|
|
3581
|
+
const O = ye(
|
|
3582
|
+
d,
|
|
3549
3583
|
u,
|
|
3550
|
-
|
|
3551
|
-
g.length === 1 && Ee(g[0]) && g[0].tag === "#text" ? typeof g[0].children == "string" ? g[0].children : "" : g.length ? g : void 0,
|
|
3584
|
+
m.length === 1 && Se(m[0]) && m[0].tag === "#text" ? typeof m[0].children == "string" ? m[0].children : "" : m.length ? m : void 0,
|
|
3552
3585
|
y
|
|
3553
|
-
), H =
|
|
3554
|
-
H ? (
|
|
3555
|
-
} else
|
|
3556
|
-
tag:
|
|
3557
|
-
props:
|
|
3558
|
-
children:
|
|
3586
|
+
), H = p.pop();
|
|
3587
|
+
H ? (d = H.tag, u = H.props, y = H.key, m = H.children, m.push(O)) : (l.push(O), d = null, u = {}, y = void 0, m = []);
|
|
3588
|
+
} else j ? d ? m.push(ye(g, S, void 0, void 0)) : l.push(ye(g, S, void 0, void 0)) : (d && p.push({
|
|
3589
|
+
tag: d,
|
|
3590
|
+
props: u,
|
|
3591
|
+
children: m,
|
|
3559
3592
|
key: y
|
|
3560
|
-
}),
|
|
3561
|
-
} else if (typeof
|
|
3562
|
-
const
|
|
3563
|
-
|
|
3564
|
-
} else if (
|
|
3565
|
-
const
|
|
3566
|
-
for (const v of
|
|
3593
|
+
}), d = g, u = S, m = []);
|
|
3594
|
+
} else if (typeof x[3] < "u") {
|
|
3595
|
+
const g = Number(x[3]), $ = t[g], j = `interp-${g}`;
|
|
3596
|
+
b($, j);
|
|
3597
|
+
} else if (x[4]) {
|
|
3598
|
+
const g = x[4], $ = d ? m : l, j = g.split(/({{\d+}})/);
|
|
3599
|
+
for (const v of j) {
|
|
3567
3600
|
if (!v) continue;
|
|
3568
|
-
const
|
|
3569
|
-
if (
|
|
3570
|
-
const
|
|
3571
|
-
|
|
3601
|
+
const _ = v.match(/^{{(\d+)}}$/);
|
|
3602
|
+
if (_) {
|
|
3603
|
+
const A = Number(_[1]), D = t[A], S = `interp-${A}`;
|
|
3604
|
+
b(D, S);
|
|
3572
3605
|
} else {
|
|
3573
|
-
const
|
|
3574
|
-
$.push(c(v,
|
|
3606
|
+
const A = `text-${w++}`;
|
|
3607
|
+
$.push(c(v, A));
|
|
3575
3608
|
}
|
|
3576
3609
|
}
|
|
3577
3610
|
}
|
|
3578
3611
|
}
|
|
3579
|
-
const C = l.filter((
|
|
3612
|
+
const C = l.filter((g) => Se(g) && g.tag === "#text" ? typeof g.children == "string" && g.children.trim() !== "" : !0);
|
|
3580
3613
|
if (C.length === 1) {
|
|
3581
|
-
const
|
|
3582
|
-
return s && o &&
|
|
3614
|
+
const g = C[0];
|
|
3615
|
+
return s && o && Ue.set(o, g), g;
|
|
3583
3616
|
} else if (C.length > 1) {
|
|
3584
|
-
const
|
|
3585
|
-
return s && o &&
|
|
3617
|
+
const g = C;
|
|
3618
|
+
return s && o && Ue.set(o, g), g;
|
|
3586
3619
|
}
|
|
3587
|
-
return
|
|
3620
|
+
return ye("div", {}, "", "fallback-root");
|
|
3588
3621
|
}
|
|
3589
|
-
function
|
|
3622
|
+
function le(e, ...t) {
|
|
3590
3623
|
const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
|
|
3591
3624
|
return lr(e, t, n);
|
|
3592
3625
|
}
|
|
3593
|
-
function
|
|
3594
|
-
return
|
|
3626
|
+
function Pe(e, t) {
|
|
3627
|
+
return M(e ? t : [], "when-block");
|
|
3595
3628
|
}
|
|
3596
|
-
function
|
|
3629
|
+
function _r(e, t) {
|
|
3597
3630
|
return e.map((r, n) => {
|
|
3598
3631
|
const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
|
|
3599
|
-
return
|
|
3632
|
+
return M(t(r, n), `each-${i}`);
|
|
3600
3633
|
});
|
|
3601
3634
|
}
|
|
3602
3635
|
function ur() {
|
|
@@ -3616,11 +3649,11 @@ function ur() {
|
|
|
3616
3649
|
function fr(...e) {
|
|
3617
3650
|
for (let t = 0; t < e.length; t++) {
|
|
3618
3651
|
const [r, n] = e[t];
|
|
3619
|
-
if (r) return [
|
|
3652
|
+
if (r) return [M(n, `whenChain-branch-${t}`)];
|
|
3620
3653
|
}
|
|
3621
|
-
return [
|
|
3654
|
+
return [M([], "whenChain-empty")];
|
|
3622
3655
|
}
|
|
3623
|
-
function
|
|
3656
|
+
function M(e, t) {
|
|
3624
3657
|
const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
|
|
3625
3658
|
return {
|
|
3626
3659
|
tag: "#anchor",
|
|
@@ -3628,55 +3661,55 @@ function W(e, t) {
|
|
|
3628
3661
|
children: r
|
|
3629
3662
|
};
|
|
3630
3663
|
}
|
|
3631
|
-
function _r(e, t) {
|
|
3632
|
-
return Re(!e, t);
|
|
3633
|
-
}
|
|
3634
3664
|
function Er(e, t) {
|
|
3635
|
-
|
|
3636
|
-
return Re(r, t);
|
|
3665
|
+
return Pe(!e, t);
|
|
3637
3666
|
}
|
|
3638
3667
|
function Sr(e, t) {
|
|
3668
|
+
const r = !e || e.length === 0;
|
|
3669
|
+
return Pe(r, t);
|
|
3670
|
+
}
|
|
3671
|
+
function Ar(e, t) {
|
|
3639
3672
|
const r = !!(e && e.length > 0);
|
|
3640
|
-
return
|
|
3673
|
+
return Pe(r, t);
|
|
3641
3674
|
}
|
|
3642
|
-
function
|
|
3675
|
+
function jr(e, t, r) {
|
|
3643
3676
|
const n = [];
|
|
3644
3677
|
return e.forEach((i, s) => {
|
|
3645
3678
|
t(i, s) && n.push({ item: i, originalIndex: s });
|
|
3646
3679
|
}), n.map(({ item: i, originalIndex: s }, o) => {
|
|
3647
3680
|
const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
|
|
3648
|
-
return
|
|
3681
|
+
return M(r(i, s, o), `each-where-${c}`);
|
|
3649
3682
|
});
|
|
3650
3683
|
}
|
|
3651
|
-
function
|
|
3684
|
+
function Or(e, t) {
|
|
3652
3685
|
const r = e?.length ?? 0;
|
|
3653
|
-
return r === 0 && t.empty ?
|
|
3686
|
+
return r === 0 && t.empty ? M(t.empty, "switch-length-empty") : r === 1 && t.one ? M(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? M(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? M(t.many(e), "switch-length-many") : M([], "switch-length-fallback");
|
|
3654
3687
|
}
|
|
3655
|
-
function
|
|
3688
|
+
function Tr(e, t, r) {
|
|
3656
3689
|
const n = /* @__PURE__ */ new Map();
|
|
3657
3690
|
return e.forEach((i) => {
|
|
3658
3691
|
const s = t(i);
|
|
3659
3692
|
n.has(s) || n.set(s, []), n.get(s).push(i);
|
|
3660
|
-
}), Array.from(n.entries()).map(([i, s], o) =>
|
|
3693
|
+
}), Array.from(n.entries()).map(([i, s], o) => M(
|
|
3661
3694
|
r(i, s, o),
|
|
3662
3695
|
`each-group-${i}`
|
|
3663
3696
|
));
|
|
3664
3697
|
}
|
|
3665
|
-
function
|
|
3698
|
+
function Rr(e, t, r, n) {
|
|
3666
3699
|
const i = r * t, s = Math.min(i + t, e.length);
|
|
3667
3700
|
return e.slice(i, s).map((c, a) => {
|
|
3668
|
-
const
|
|
3669
|
-
return
|
|
3701
|
+
const h = i + a, p = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${h}` : `page-${h}`;
|
|
3702
|
+
return M(n(c, h, a), `each-page-${p}`);
|
|
3670
3703
|
});
|
|
3671
3704
|
}
|
|
3672
|
-
function
|
|
3673
|
-
return e.loading && t.loading ?
|
|
3705
|
+
function Pr(e, t) {
|
|
3706
|
+
return e.loading && t.loading ? M(t.loading, "promise-loading") : e.error && t.error ? M(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? M(t.success(e.data), "promise-success") : t.idle ? M(t.idle, "promise-idle") : M([], "promise-fallback");
|
|
3674
3707
|
}
|
|
3675
3708
|
function q(e, t) {
|
|
3676
3709
|
const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
|
|
3677
|
-
return
|
|
3710
|
+
return Pe(!!r, t);
|
|
3678
3711
|
}
|
|
3679
|
-
const
|
|
3712
|
+
const ne = {
|
|
3680
3713
|
// Responsive breakpoints (matching style.ts)
|
|
3681
3714
|
sm: "(min-width:640px)",
|
|
3682
3715
|
md: "(min-width:768px)",
|
|
@@ -3685,15 +3718,15 @@ const te = {
|
|
|
3685
3718
|
"2xl": "(min-width:1536px)",
|
|
3686
3719
|
// Dark mode (matching style.ts)
|
|
3687
3720
|
dark: "(prefers-color-scheme: dark)"
|
|
3688
|
-
},
|
|
3721
|
+
}, gt = ["sm", "md", "lg", "xl", "2xl"], dr = {
|
|
3689
3722
|
// Breakpoint-based rendering (matching style.ts exactly)
|
|
3690
|
-
sm: (e) => q(
|
|
3691
|
-
md: (e) => q(
|
|
3692
|
-
lg: (e) => q(
|
|
3693
|
-
xl: (e) => q(
|
|
3694
|
-
"2xl": (e) => q(
|
|
3723
|
+
sm: (e) => q(ne.sm, e),
|
|
3724
|
+
md: (e) => q(ne.md, e),
|
|
3725
|
+
lg: (e) => q(ne.lg, e),
|
|
3726
|
+
xl: (e) => q(ne.xl, e),
|
|
3727
|
+
"2xl": (e) => q(ne["2xl"], e),
|
|
3695
3728
|
// Dark mode (matching style.ts)
|
|
3696
|
-
dark: (e) => q(
|
|
3729
|
+
dark: (e) => q(ne.dark, e),
|
|
3697
3730
|
light: (e) => q("(prefers-color-scheme: light)", e),
|
|
3698
3731
|
// Accessibility and interaction preferences
|
|
3699
3732
|
touch: (e) => q("(hover: none) and (pointer: coarse)", e),
|
|
@@ -3706,22 +3739,22 @@ const te = {
|
|
|
3706
3739
|
};
|
|
3707
3740
|
function Lr(e, t) {
|
|
3708
3741
|
const r = [];
|
|
3709
|
-
e.includes("dark") ? r.push(
|
|
3742
|
+
e.includes("dark") ? r.push(ne.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
|
|
3710
3743
|
const n = e.filter(
|
|
3711
|
-
(o) =>
|
|
3744
|
+
(o) => gt.includes(o)
|
|
3712
3745
|
), i = n[n.length - 1];
|
|
3713
|
-
i && i in
|
|
3746
|
+
i && i in ne && r.push(ne[i]);
|
|
3714
3747
|
const s = r.length > 0 ? r.join(" and ") : "all";
|
|
3715
3748
|
return q(s, t);
|
|
3716
3749
|
}
|
|
3717
|
-
function
|
|
3750
|
+
function Mr(e) {
|
|
3718
3751
|
const t = [];
|
|
3719
|
-
return e.base && t.push(
|
|
3752
|
+
return e.base && t.push(M(e.base, "responsive-base")), gt.forEach((r) => {
|
|
3720
3753
|
const n = e[r];
|
|
3721
3754
|
n && t.push(dr[r](n));
|
|
3722
3755
|
}), t;
|
|
3723
3756
|
}
|
|
3724
|
-
function
|
|
3757
|
+
function Wr(e) {
|
|
3725
3758
|
const t = [];
|
|
3726
3759
|
let r = null;
|
|
3727
3760
|
return {
|
|
@@ -3739,13 +3772,13 @@ function Mr(e) {
|
|
|
3739
3772
|
for (let n = 0; n < t.length; n++) {
|
|
3740
3773
|
const { condition: i, content: s } = t[n];
|
|
3741
3774
|
if (i(e))
|
|
3742
|
-
return
|
|
3775
|
+
return M(s, `switch-case-${n}`);
|
|
3743
3776
|
}
|
|
3744
|
-
return
|
|
3777
|
+
return M(r || [], "switch-otherwise");
|
|
3745
3778
|
}
|
|
3746
3779
|
};
|
|
3747
3780
|
}
|
|
3748
|
-
class
|
|
3781
|
+
class pe extends EventTarget {
|
|
3749
3782
|
handlers = {};
|
|
3750
3783
|
static instance;
|
|
3751
3784
|
eventCounters = /* @__PURE__ */ new Map();
|
|
@@ -3753,7 +3786,7 @@ class de extends EventTarget {
|
|
|
3753
3786
|
* Returns the singleton instance of GlobalEventBus
|
|
3754
3787
|
*/
|
|
3755
3788
|
static getInstance() {
|
|
3756
|
-
return
|
|
3789
|
+
return pe.instance || (pe.instance = new pe()), pe.instance;
|
|
3757
3790
|
}
|
|
3758
3791
|
/**
|
|
3759
3792
|
* Emit a global event with optional data. Includes event storm protection.
|
|
@@ -3777,7 +3810,7 @@ class de extends EventTarget {
|
|
|
3777
3810
|
try {
|
|
3778
3811
|
o(r);
|
|
3779
3812
|
} catch (c) {
|
|
3780
|
-
|
|
3813
|
+
oe(`Error in global event handler for "${t}":`, c);
|
|
3781
3814
|
}
|
|
3782
3815
|
});
|
|
3783
3816
|
}
|
|
@@ -3866,8 +3899,8 @@ class de extends EventTarget {
|
|
|
3866
3899
|
this.eventCounters.clear();
|
|
3867
3900
|
}
|
|
3868
3901
|
}
|
|
3869
|
-
const ve =
|
|
3870
|
-
function
|
|
3902
|
+
const ve = pe.getInstance(), Dr = (e, t) => ve.emit(e, t), Ir = (e, t) => ve.on(e, t), Nr = (e, t) => ve.off(e, t), Hr = (e, t) => ve.once(e, t), Br = (e, t, r) => ve.listen(e, t, r);
|
|
3903
|
+
function ot(e) {
|
|
3871
3904
|
let t = { ...e };
|
|
3872
3905
|
const r = [];
|
|
3873
3906
|
function n(c) {
|
|
@@ -3885,281 +3918,282 @@ function it(e) {
|
|
|
3885
3918
|
}
|
|
3886
3919
|
return { subscribe: n, getState: i, setState: s };
|
|
3887
3920
|
}
|
|
3888
|
-
const
|
|
3921
|
+
const at = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Y = (e, t) => {
|
|
3889
3922
|
for (const r of e) {
|
|
3890
3923
|
const n = [], i = r.path.replace(/:[^/]+/g, (c) => (n.push(c.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
|
|
3891
3924
|
if (o) {
|
|
3892
3925
|
const c = {};
|
|
3893
|
-
return n.forEach((a,
|
|
3894
|
-
c[a] = o[
|
|
3926
|
+
return n.forEach((a, h) => {
|
|
3927
|
+
c[a] = o[h + 1];
|
|
3895
3928
|
}), { route: r, params: c };
|
|
3896
3929
|
}
|
|
3897
3930
|
}
|
|
3898
3931
|
return { route: null, params: {} };
|
|
3899
|
-
},
|
|
3900
|
-
async function
|
|
3932
|
+
}, qe = {};
|
|
3933
|
+
async function pr(e) {
|
|
3901
3934
|
if (e.component) return e.component;
|
|
3902
3935
|
if (e.load) {
|
|
3903
|
-
if (
|
|
3936
|
+
if (qe[e.path]) return qe[e.path];
|
|
3904
3937
|
try {
|
|
3905
3938
|
const t = await e.load();
|
|
3906
|
-
return
|
|
3939
|
+
return qe[e.path] = t.default, t.default;
|
|
3907
3940
|
} catch {
|
|
3908
3941
|
throw new Error(`Failed to load component for route: ${e.path}`);
|
|
3909
3942
|
}
|
|
3910
3943
|
}
|
|
3911
3944
|
throw new Error(`No component or loader defined for route: ${e.path}`);
|
|
3912
3945
|
}
|
|
3913
|
-
function
|
|
3946
|
+
function hr(e) {
|
|
3914
3947
|
const { routes: t, base: r = "", initialUrl: n } = e;
|
|
3915
|
-
let i, s, o, c, a,
|
|
3916
|
-
const
|
|
3917
|
-
const l = t.find((
|
|
3948
|
+
let i, s, o, c, a, h, p;
|
|
3949
|
+
const x = async (y, w) => {
|
|
3950
|
+
const l = t.find((f) => Y([f], y.path).route !== null);
|
|
3918
3951
|
if (l?.beforeEnter)
|
|
3919
3952
|
try {
|
|
3920
|
-
const
|
|
3921
|
-
return typeof
|
|
3922
|
-
} catch (
|
|
3923
|
-
return
|
|
3953
|
+
const f = await l.beforeEnter(y, w);
|
|
3954
|
+
return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
|
|
3955
|
+
} catch (f) {
|
|
3956
|
+
return oe("beforeEnter error", f), !1;
|
|
3924
3957
|
}
|
|
3925
3958
|
return !0;
|
|
3926
|
-
},
|
|
3927
|
-
const l = t.find((
|
|
3959
|
+
}, m = async (y, w) => {
|
|
3960
|
+
const l = t.find((f) => Y([f], y.path).route !== null);
|
|
3928
3961
|
if (l?.onEnter)
|
|
3929
3962
|
try {
|
|
3930
|
-
const
|
|
3931
|
-
return typeof
|
|
3932
|
-
} catch (
|
|
3933
|
-
return
|
|
3963
|
+
const f = await l.onEnter(y, w);
|
|
3964
|
+
return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
|
|
3965
|
+
} catch (f) {
|
|
3966
|
+
return oe("onEnter error", f), !1;
|
|
3934
3967
|
}
|
|
3935
3968
|
return !0;
|
|
3936
|
-
},
|
|
3937
|
-
const l = t.find((
|
|
3969
|
+
}, d = (y, w) => {
|
|
3970
|
+
const l = t.find((f) => Y([f], y.path).route !== null);
|
|
3938
3971
|
if (l?.afterEnter)
|
|
3939
3972
|
try {
|
|
3940
|
-
l.afterEnter(y,
|
|
3941
|
-
} catch (
|
|
3942
|
-
|
|
3973
|
+
l.afterEnter(y, w);
|
|
3974
|
+
} catch (f) {
|
|
3975
|
+
oe("afterEnter error", f);
|
|
3943
3976
|
}
|
|
3944
|
-
},
|
|
3977
|
+
}, u = async (y, w = !1) => {
|
|
3945
3978
|
try {
|
|
3946
3979
|
const l = {
|
|
3947
3980
|
path: y.replace(r, "") || "/",
|
|
3948
3981
|
query: {}
|
|
3949
|
-
},
|
|
3950
|
-
if (!
|
|
3951
|
-
const
|
|
3982
|
+
}, f = Y(t, l.path);
|
|
3983
|
+
if (!f) throw new Error(`No route found for ${l.path}`);
|
|
3984
|
+
const b = o.getState(), k = {
|
|
3952
3985
|
path: l.path,
|
|
3953
|
-
params:
|
|
3986
|
+
params: f.params,
|
|
3954
3987
|
query: l.query
|
|
3955
3988
|
};
|
|
3956
|
-
if (!await
|
|
3957
|
-
typeof window < "u" && typeof document < "u" && (
|
|
3989
|
+
if (!await x(k, b) || !await m(k, b)) return;
|
|
3990
|
+
typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + y) : window.history.pushState({}, "", r + y)), o.setState(k), d(k, b);
|
|
3958
3991
|
} catch (l) {
|
|
3959
|
-
|
|
3992
|
+
oe("Navigation error:", l);
|
|
3960
3993
|
}
|
|
3961
3994
|
};
|
|
3962
3995
|
if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
|
|
3963
3996
|
i = () => {
|
|
3964
|
-
const
|
|
3965
|
-
return { path: l, query:
|
|
3997
|
+
const w = new URL(window.location.href), l = w.pathname.replace(r, "") || "/", f = at(w.search);
|
|
3998
|
+
return { path: l, query: f };
|
|
3966
3999
|
}, s = i();
|
|
3967
4000
|
const y = Y(t, s.path);
|
|
3968
|
-
o =
|
|
4001
|
+
o = ot({
|
|
3969
4002
|
path: s.path,
|
|
3970
4003
|
params: y.params,
|
|
3971
4004
|
query: s.query
|
|
3972
|
-
}), c = async (
|
|
4005
|
+
}), c = async (w = !1) => {
|
|
3973
4006
|
const l = i();
|
|
3974
|
-
await
|
|
3975
|
-
}, window.addEventListener("popstate", () => c(!0)), a = (
|
|
4007
|
+
await u(l.path, w);
|
|
4008
|
+
}, window.addEventListener("popstate", () => c(!0)), a = (w) => u(w, !1), h = (w) => u(w, !0), p = () => window.history.back();
|
|
3976
4009
|
} else {
|
|
3977
4010
|
i = () => {
|
|
3978
|
-
const l = new URL(n || "/", "http://localhost"),
|
|
3979
|
-
return { path:
|
|
4011
|
+
const l = new URL(n || "/", "http://localhost"), f = l.pathname.replace(r, "") || "/", b = at(l.search);
|
|
4012
|
+
return { path: f, query: b };
|
|
3980
4013
|
}, s = i();
|
|
3981
4014
|
const y = Y(t, s.path);
|
|
3982
|
-
o =
|
|
4015
|
+
o = ot({
|
|
3983
4016
|
path: s.path,
|
|
3984
4017
|
params: y.params,
|
|
3985
4018
|
query: s.query
|
|
3986
4019
|
}), c = async () => {
|
|
3987
4020
|
const l = i();
|
|
3988
|
-
await
|
|
4021
|
+
await w(l.path);
|
|
3989
4022
|
};
|
|
3990
|
-
const
|
|
4023
|
+
const w = async (l) => {
|
|
3991
4024
|
try {
|
|
3992
|
-
const
|
|
4025
|
+
const f = {
|
|
3993
4026
|
path: l.replace(r, "") || "/",
|
|
3994
4027
|
query: {}
|
|
3995
|
-
},
|
|
3996
|
-
if (!
|
|
4028
|
+
}, b = Y(t, f.path);
|
|
4029
|
+
if (!b) throw new Error(`No route found for ${f.path}`);
|
|
3997
4030
|
const k = o.getState(), C = {
|
|
3998
|
-
path:
|
|
3999
|
-
params:
|
|
4000
|
-
query:
|
|
4001
|
-
},
|
|
4002
|
-
if (
|
|
4031
|
+
path: f.path,
|
|
4032
|
+
params: b.params,
|
|
4033
|
+
query: f.query
|
|
4034
|
+
}, g = t.find(($) => Y([$], C.path).route !== null);
|
|
4035
|
+
if (g?.beforeEnter)
|
|
4003
4036
|
try {
|
|
4004
|
-
const $ = await
|
|
4037
|
+
const $ = await g.beforeEnter(C, k);
|
|
4005
4038
|
if (typeof $ == "string") {
|
|
4006
|
-
await
|
|
4039
|
+
await w($);
|
|
4007
4040
|
return;
|
|
4008
4041
|
}
|
|
4009
4042
|
if ($ === !1) return;
|
|
4010
4043
|
} catch {
|
|
4011
4044
|
return;
|
|
4012
4045
|
}
|
|
4013
|
-
if (
|
|
4046
|
+
if (g?.onEnter)
|
|
4014
4047
|
try {
|
|
4015
|
-
const $ = await
|
|
4048
|
+
const $ = await g.onEnter(C, k);
|
|
4016
4049
|
if (typeof $ == "string") {
|
|
4017
|
-
await
|
|
4050
|
+
await w($);
|
|
4018
4051
|
return;
|
|
4019
4052
|
}
|
|
4020
4053
|
if ($ === !1) return;
|
|
4021
4054
|
} catch {
|
|
4022
4055
|
return;
|
|
4023
4056
|
}
|
|
4024
|
-
if (o.setState(C),
|
|
4057
|
+
if (o.setState(C), g?.afterEnter)
|
|
4025
4058
|
try {
|
|
4026
|
-
|
|
4059
|
+
g.afterEnter(C, k);
|
|
4027
4060
|
} catch {
|
|
4028
4061
|
}
|
|
4029
4062
|
} catch {
|
|
4030
4063
|
}
|
|
4031
4064
|
};
|
|
4032
|
-
a = async (l) =>
|
|
4065
|
+
a = async (l) => w(l), h = async (l) => w(l), p = () => {
|
|
4033
4066
|
};
|
|
4034
4067
|
}
|
|
4035
4068
|
return {
|
|
4036
4069
|
store: o,
|
|
4037
4070
|
push: a,
|
|
4038
|
-
replace:
|
|
4039
|
-
back:
|
|
4071
|
+
replace: h,
|
|
4072
|
+
back: p,
|
|
4040
4073
|
subscribe: o.subscribe,
|
|
4041
4074
|
matchRoute: (y) => Y(t, y),
|
|
4042
4075
|
getCurrent: () => o.getState(),
|
|
4043
|
-
resolveRouteComponent:
|
|
4076
|
+
resolveRouteComponent: pr
|
|
4044
4077
|
};
|
|
4045
4078
|
}
|
|
4046
4079
|
function zr(e, t) {
|
|
4047
4080
|
return Y(e, t);
|
|
4048
4081
|
}
|
|
4049
|
-
function
|
|
4050
|
-
const t =
|
|
4051
|
-
return
|
|
4082
|
+
function Ur(e) {
|
|
4083
|
+
const t = hr(e);
|
|
4084
|
+
return st("router-view", (r = {}, n = {}) => {
|
|
4052
4085
|
const { onConnected: i } = n;
|
|
4053
4086
|
if (i && i(() => {
|
|
4054
4087
|
t && typeof t.subscribe == "function" && t.subscribe(() => {
|
|
4055
4088
|
});
|
|
4056
|
-
}), !t) return
|
|
4089
|
+
}), !t) return le`<div>Router not initialized.</div>`;
|
|
4057
4090
|
const s = t.getCurrent(), { path: o } = s, c = t.matchRoute(o);
|
|
4058
4091
|
return c.route ? t.resolveRouteComponent(c.route).then((a) => {
|
|
4059
4092
|
if (typeof a == "string")
|
|
4060
4093
|
return { tag: a, props: {}, children: [] };
|
|
4061
4094
|
if (typeof a == "function") {
|
|
4062
|
-
const
|
|
4063
|
-
return (
|
|
4095
|
+
const h = a();
|
|
4096
|
+
return (h instanceof Promise ? h : Promise.resolve(h)).then((x) => typeof x == "string" ? { tag: x, props: {}, children: [] } : x);
|
|
4064
4097
|
}
|
|
4065
|
-
return
|
|
4066
|
-
}).catch(() =>
|
|
4067
|
-
}),
|
|
4098
|
+
return le`<div>Invalid route component</div>`;
|
|
4099
|
+
}).catch(() => le`<div>Invalid route component</div>`) : le`<div>Not found</div>`;
|
|
4100
|
+
}), st("router-link", (r = {}, n = {}) => {
|
|
4068
4101
|
const {
|
|
4069
4102
|
to: i = "",
|
|
4070
4103
|
tag: s = "a",
|
|
4071
4104
|
replace: o = !1,
|
|
4072
4105
|
exact: c = !1,
|
|
4073
4106
|
activeClass: a = "active",
|
|
4074
|
-
exactActiveClass:
|
|
4075
|
-
ariaCurrentValue:
|
|
4076
|
-
disabled:
|
|
4077
|
-
external:
|
|
4078
|
-
class:
|
|
4079
|
-
} = r,
|
|
4080
|
-
for (const v of
|
|
4107
|
+
exactActiveClass: h = "exact-active",
|
|
4108
|
+
ariaCurrentValue: p = "page",
|
|
4109
|
+
disabled: x = !1,
|
|
4110
|
+
external: m = !1,
|
|
4111
|
+
class: d = ""
|
|
4112
|
+
} = r, u = t.getCurrent(), y = u.path === i, w = c ? y : u && typeof u.path == "string" ? u.path.startsWith(i) : !1, l = y ? `aria-current="${p}"` : "", f = (d || "").split(/\s+/).filter(Boolean), b = {};
|
|
4113
|
+
for (const v of f) b[v] = !0;
|
|
4081
4114
|
const k = {
|
|
4082
|
-
...
|
|
4115
|
+
...b,
|
|
4083
4116
|
// Also include the configurable names (may duplicate the above)
|
|
4084
|
-
[a]:
|
|
4085
|
-
[
|
|
4086
|
-
}, C = s === "button",
|
|
4087
|
-
if (
|
|
4117
|
+
[a]: w,
|
|
4118
|
+
[h]: y
|
|
4119
|
+
}, C = s === "button", g = x ? C ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", $ = m && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", j = (v) => {
|
|
4120
|
+
if (x) {
|
|
4088
4121
|
v.preventDefault();
|
|
4089
4122
|
return;
|
|
4090
4123
|
}
|
|
4091
|
-
|
|
4124
|
+
m && (s === "a" || !s) || (v.preventDefault(), o ? t.replace(i) : t.push(i));
|
|
4092
4125
|
};
|
|
4093
|
-
return
|
|
4094
|
-
${ur().when(C,
|
|
4126
|
+
return le`
|
|
4127
|
+
${ur().when(C, le`
|
|
4095
4128
|
<button
|
|
4096
4129
|
part="button"
|
|
4097
4130
|
:class="${k}"
|
|
4098
4131
|
${l}
|
|
4099
|
-
${
|
|
4132
|
+
${g}
|
|
4100
4133
|
${$}
|
|
4101
|
-
@click="${
|
|
4134
|
+
@click="${j}"
|
|
4102
4135
|
><slot></slot></button>
|
|
4103
|
-
`).otherwise(
|
|
4136
|
+
`).otherwise(le`
|
|
4104
4137
|
<a
|
|
4105
4138
|
part="link"
|
|
4106
4139
|
href="${i}"
|
|
4107
4140
|
:class="${k}"
|
|
4108
4141
|
${l}
|
|
4109
|
-
${
|
|
4142
|
+
${g}
|
|
4110
4143
|
${$}
|
|
4111
|
-
@click="${
|
|
4144
|
+
@click="${j}"
|
|
4112
4145
|
><slot></slot></a>
|
|
4113
4146
|
`).done()}
|
|
4114
4147
|
`;
|
|
4115
4148
|
}), t;
|
|
4116
4149
|
}
|
|
4117
4150
|
export {
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4151
|
+
pe as GlobalEventBus,
|
|
4152
|
+
M as anchorBlock,
|
|
4153
|
+
st as component,
|
|
4121
4154
|
mr as computed,
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4155
|
+
ot as createStore,
|
|
4156
|
+
Dt as css,
|
|
4157
|
+
_r as each,
|
|
4158
|
+
Tr as eachGroup,
|
|
4159
|
+
Rr as eachPage,
|
|
4160
|
+
jr as eachWhere,
|
|
4161
|
+
Dr as emit,
|
|
4129
4162
|
ve as eventBus,
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4163
|
+
le as html,
|
|
4164
|
+
Ur as initRouter,
|
|
4165
|
+
Br as listen,
|
|
4133
4166
|
ur as match,
|
|
4134
4167
|
Y as matchRoute,
|
|
4135
4168
|
zr as matchRouteSSR,
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4169
|
+
ne as mediaVariants,
|
|
4170
|
+
Nr as off,
|
|
4171
|
+
Ir as on,
|
|
4172
|
+
Hr as once,
|
|
4173
|
+
at as parseQuery,
|
|
4141
4174
|
gr as ref,
|
|
4142
|
-
|
|
4143
|
-
|
|
4175
|
+
Me as renderToString,
|
|
4176
|
+
pr as resolveRouteComponent,
|
|
4144
4177
|
dr as responsive,
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4178
|
+
gt as responsiveOrder,
|
|
4179
|
+
Mr as responsiveSwitch,
|
|
4180
|
+
Wr as switchOn,
|
|
4181
|
+
Or as switchOnLength,
|
|
4182
|
+
Pr as switchOnPromise,
|
|
4183
|
+
Er as unless,
|
|
4151
4184
|
br as useEmit,
|
|
4152
4185
|
vr as useOnAttributeChanged,
|
|
4153
4186
|
wr as useOnConnected,
|
|
4154
4187
|
xr as useOnDisconnected,
|
|
4155
4188
|
$r as useOnError,
|
|
4156
|
-
|
|
4157
|
-
|
|
4189
|
+
kr as useProps,
|
|
4190
|
+
hr as useRouter,
|
|
4191
|
+
Cr as useStyle,
|
|
4158
4192
|
yr as watch,
|
|
4159
|
-
|
|
4160
|
-
|
|
4193
|
+
Pe as when,
|
|
4194
|
+
Sr as whenEmpty,
|
|
4161
4195
|
q as whenMedia,
|
|
4162
|
-
|
|
4196
|
+
Ar as whenNotEmpty,
|
|
4163
4197
|
Lr as whenVariants
|
|
4164
4198
|
};
|
|
4165
4199
|
//# sourceMappingURL=custom-elements-runtime.es.js.map
|