@jasonshimmy/custom-elements-runtime 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- const an = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
1
+ const un = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
2
2
  let $e = !1;
3
3
  try {
4
4
  const e = globalThis.process;
5
- e && e.env ? $e = e.env.NODE_ENV !== "production" : typeof import.meta < "u" && an ? $e = !1 : $e = typeof window < "u";
5
+ e && e.env ? $e = e.env.NODE_ENV !== "production" : typeof import.meta < "u" && un ? $e = !1 : $e = typeof window < "u";
6
6
  } catch {
7
7
  $e = !0;
8
8
  }
9
9
  function H(e, ...t) {
10
10
  $e && console.error(e, ...t);
11
11
  }
12
- function te(e, ...t) {
12
+ function Z(e, ...t) {
13
13
  $e && console.warn(e, ...t);
14
14
  }
15
- class cn {
15
+ class fn {
16
16
  pendingUpdates = /* @__PURE__ */ new Map();
17
17
  isFlushScheduled = !1;
18
18
  /**
@@ -43,12 +43,12 @@ class cn {
43
43
  return this.pendingUpdates.size;
44
44
  }
45
45
  }
46
- const ln = new cn();
46
+ const dn = new fn();
47
47
  function ke(e, t) {
48
- ln.schedule(e, t);
48
+ dn.schedule(e, t);
49
49
  }
50
- const kt = /* @__PURE__ */ new WeakSet();
51
- class un {
50
+ const Et = /* @__PURE__ */ new WeakSet();
51
+ class pn {
52
52
  static cache = /* @__PURE__ */ new WeakMap();
53
53
  static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
54
54
  static objectHandlerCache = /* @__PURE__ */ new WeakMap();
@@ -61,7 +61,7 @@ class un {
61
61
  return i;
62
62
  const o = r ? this.getOrCreateArrayHandler(n) : this.getOrCreateObjectHandler(n), s = new Proxy(t, o);
63
63
  try {
64
- qt.markAsProxy(s);
64
+ Zt.markAsProxy(s);
65
65
  } catch {
66
66
  }
67
67
  return this.cache.set(t, s), s;
@@ -132,7 +132,7 @@ class un {
132
132
  };
133
133
  }
134
134
  }
135
- class qt {
135
+ class Zt {
136
136
  // Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
137
137
  // This allows handler caches in ReactiveProxyCache to reuse handlers
138
138
  // for identical reactive contexts instead of creating a new context object
@@ -143,7 +143,7 @@ class qt {
143
143
  */
144
144
  static createReactiveProxy(t, n, r) {
145
145
  try {
146
- if (kt.has(t)) return t;
146
+ if (Et.has(t)) return t;
147
147
  } catch {
148
148
  }
149
149
  const i = Array.isArray(t);
@@ -153,7 +153,7 @@ class qt {
153
153
  return s || (s = {
154
154
  triggerUpdate: n,
155
155
  makeReactiveValue: r
156
- }, o.set(r, s)), un.getOrCreateProxy(t, s, i);
156
+ }, o.set(r, s)), pn.getOrCreateProxy(t, s, i);
157
157
  }
158
158
  /**
159
159
  * Mark an object as a proxy (for optimization)
@@ -161,12 +161,12 @@ class qt {
161
161
  static markAsProxy(t) {
162
162
  if (t)
163
163
  try {
164
- kt.add(t);
164
+ Et.add(t);
165
165
  } catch {
166
166
  }
167
167
  }
168
168
  }
169
- class fn {
169
+ class hn {
170
170
  currentComponent = null;
171
171
  // Consolidated component data: stores dependencies, render function, state index, and last warning time
172
172
  componentData = /* @__PURE__ */ new Map();
@@ -241,13 +241,13 @@ class fn {
241
241
  */
242
242
  getOrCreateState(t) {
243
243
  if (!this.currentComponent)
244
- return new Je(t);
244
+ return new Xe(t);
245
245
  const n = this.componentData.get(this.currentComponent);
246
246
  if (!n)
247
- return new Je(t);
247
+ return new Xe(t);
248
248
  const r = `${this.currentComponent}:${n.stateIndex++}`;
249
249
  let i = this.stateStorage.get(r);
250
- return i || (i = new Je(t), this.stateStorage.set(r, i)), i;
250
+ return i || (i = new Xe(t), this.stateStorage.set(r, i)), i;
251
251
  }
252
252
  /**
253
253
  * Track a dependency for the current component
@@ -282,8 +282,8 @@ class fn {
282
282
  i.startsWith(r) && this.stateStorage.delete(i);
283
283
  }
284
284
  }
285
- const ee = new fn();
286
- class Je {
285
+ const ee = new hn();
286
+ class Xe {
287
287
  _value;
288
288
  dependents = /* @__PURE__ */ new Set();
289
289
  constructor(t) {
@@ -298,7 +298,7 @@ class Je {
298
298
  return ee.trackDependency(this), this._value;
299
299
  }
300
300
  set value(t) {
301
- ee.isRenderingComponent() && ee.shouldEmitRenderWarning() && te(
301
+ ee.isRenderingComponent() && ee.shouldEmitRenderWarning() && Z(
302
302
  `🚨 State modification detected during render! This can cause infinite loops.
303
303
  • Move state updates to event handlers
304
304
  • Use useEffect/watch for side effects
@@ -315,17 +315,17 @@ class Je {
315
315
  return this.dependents;
316
316
  }
317
317
  makeReactive(t) {
318
- return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : qt.createReactiveProxy(
318
+ return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : Zt.createReactiveProxy(
319
319
  t,
320
320
  () => ee.triggerUpdate(this),
321
321
  (n) => this.makeReactive(n)
322
322
  );
323
323
  }
324
324
  }
325
- function $t(e) {
325
+ function _t(e) {
326
326
  return ee.getOrCreateState(e === void 0 ? null : e);
327
327
  }
328
- function R(e) {
328
+ function N(e) {
329
329
  if (!e || typeof e != "object") return !1;
330
330
  try {
331
331
  const t = Symbol.for("@cer/ReactiveState");
@@ -334,15 +334,15 @@ function R(e) {
334
334
  return !1;
335
335
  }
336
336
  }
337
- function be(e) {
338
- const t = new Je(e());
337
+ function he(e) {
338
+ const t = new Xe(e());
339
339
  return {
340
340
  get value() {
341
341
  return ee.trackDependency(t), e();
342
342
  }
343
343
  };
344
344
  }
345
- function dr(e, t, n = {}) {
345
+ function mr(e, t, n = {}) {
346
346
  let r = e();
347
347
  n.immediate && t(r, r);
348
348
  const i = `watch-${Math.random().toString(36).substr(2, 9)}`, o = () => {
@@ -354,25 +354,25 @@ function dr(e, t, n = {}) {
354
354
  ee.cleanup(i);
355
355
  };
356
356
  }
357
- const M = (e) => {
357
+ const P = (e) => {
358
358
  try {
359
359
  e();
360
360
  } catch {
361
361
  }
362
- }, We = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map(), wt = 500;
363
- let Ct, Kt, Et = !1, _t = !1, At;
364
- const dn = !!(globalThis.process && globalThis.process.versions && globalThis.process.versions.node);
365
- function se(e) {
366
- if (We.has(e))
367
- return We.get(e);
362
+ }, Ie = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map(), $t = 500;
363
+ let At, Gt, St = !1, Tt = !1, jt;
364
+ const gn = !!(globalThis.process && globalThis.process.versions && globalThis.process.versions.node);
365
+ function oe(e) {
366
+ if (Ie.has(e))
367
+ return Ie.get(e);
368
368
  const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
369
- return We.size < wt && We.set(e, t), t;
369
+ return Ie.size < $t && Ie.set(e, t), t;
370
370
  }
371
- function xt(e) {
371
+ function Ct(e) {
372
372
  if (ze.has(e))
373
373
  return ze.get(e);
374
374
  const t = e.replace(/-([a-z])/g, (n, r) => r.toUpperCase());
375
- return ze.size < wt && ze.set(e, t), t;
375
+ return ze.size < $t && ze.set(e, t), t;
376
376
  }
377
377
  function Ue(e) {
378
378
  if (typeof e == "string") {
@@ -388,17 +388,17 @@ function Ue(e) {
388
388
  "'": "&#39;"
389
389
  })[n]
390
390
  );
391
- return t !== e && Be.size < wt && Be.set(e, t), t;
391
+ return t !== e && Be.size < $t && Be.set(e, t), t;
392
392
  }
393
393
  return e;
394
394
  }
395
- function de(e) {
395
+ function ue(e) {
396
396
  if (!e) return "";
397
397
  const t = String(e);
398
398
  if (typeof document < "u" && typeof document.createElement == "function") {
399
- const c = t.replace(/</g, "").replace(/>/g, ""), a = At || (At = document.createElement("div"));
399
+ const c = t.replace(/</g, "").replace(/>/g, ""), a = jt || (jt = document.createElement("div"));
400
400
  try {
401
- de._el = a;
401
+ ue._el = a;
402
402
  } catch {
403
403
  }
404
404
  return a.innerHTML = c, (a.textContent || "").replace(new RegExp("", "g"), "<").replace(new RegExp("", "g"), ">");
@@ -410,9 +410,9 @@ function de(e) {
410
410
  quot: '"',
411
411
  apos: "'",
412
412
  nbsp: " "
413
- }, r = Ct ?? de._namedMap;
413
+ }, r = At ?? ue._namedMap;
414
414
  let i = r;
415
- if (!i && dn)
415
+ if (!i && gn)
416
416
  try {
417
417
  const o = globalThis.require;
418
418
  if (typeof o == "function") {
@@ -439,29 +439,29 @@ function de(e) {
439
439
  } catch {
440
440
  }
441
441
  if (!i) {
442
- i = n, Et = !0;
442
+ i = n, St = !0;
443
443
  try {
444
- de._usedFallback = !0;
444
+ ue._usedFallback = !0;
445
445
  } catch {
446
446
  }
447
- const o = de._namedMapLoader ?? Kt;
447
+ const o = ue._namedMapLoader ?? Gt;
448
448
  o && o().then((s) => {
449
- Ct = s;
449
+ At = s;
450
450
  try {
451
- de._namedMap = s;
451
+ ue._namedMap = s;
452
452
  } catch {
453
453
  }
454
454
  }).catch(() => {
455
455
  });
456
456
  }
457
- if ((Et || de._usedFallback) && !(_t || de._warnedFallback)) {
458
- _t = !0;
457
+ if ((St || ue._usedFallback) && !(Tt || ue._warnedFallback)) {
458
+ Tt = !0;
459
459
  try {
460
- de._warnedFallback = !0;
460
+ ue._warnedFallback = !0;
461
461
  } catch {
462
462
  }
463
463
  try {
464
- te(
464
+ Z(
465
465
  "decodeEntities: using small SSR fallback entity map. Register the full entities.json via registerEntityMap(entities) on the server to enable full HTML5 named-entity decoding."
466
466
  );
467
467
  } catch {
@@ -476,7 +476,7 @@ function de(e) {
476
476
  return c !== void 0 ? c : `&${s};`;
477
477
  });
478
478
  }
479
- async function Vt() {
479
+ async function Jt() {
480
480
  const e = [
481
481
  "@jasonshimmy",
482
482
  "custom-elements-runtime",
@@ -527,32 +527,32 @@ async function Vt() {
527
527
  }
528
528
  }
529
529
  }
530
- Kt = Vt;
531
- de._namedMapLoader = Vt;
532
- function pr(e) {
530
+ Gt = Jt;
531
+ ue._namedMapLoader = Jt;
532
+ function yr(e) {
533
533
  const t = String(e);
534
534
  return { __unsafeHTML: t, __rawHTML: t };
535
535
  }
536
- function St(e) {
536
+ function Lt(e) {
537
537
  return !!e && (typeof e.__unsafeHTML == "string" || typeof e.__rawHTML == "string");
538
538
  }
539
- function J(e, t) {
539
+ function X(e, t) {
540
540
  if (typeof t == "string") {
541
541
  const n = t.split(".").reduce((r, i) => r?.[i], e);
542
- return R(n) ? n.value : n;
542
+ return N(n) ? n.value : n;
543
543
  }
544
544
  return t;
545
545
  }
546
- function Ye(e, t, n) {
546
+ function Qe(e, t, n) {
547
547
  const r = String(t).split("."), i = r.pop();
548
548
  if (!i) return;
549
549
  const o = r.reduce((s, c) => (s[c] == null && (s[c] = {}), s[c]), e);
550
- R(o[i]) ? o[i].value = n : o[i] = n;
550
+ N(o[i]) ? o[i].value = n : o[i] = n;
551
551
  }
552
- function pn(e) {
552
+ function mn(e) {
553
553
  try {
554
554
  if (e && typeof e == "object") {
555
- if (R(e)) return e.value;
555
+ if (N(e)) return e.value;
556
556
  if ("value" in e) {
557
557
  const t = e.value;
558
558
  return t == null || typeof t == "string" || typeof t == "number" || typeof t == "boolean" ? t : e;
@@ -562,13 +562,13 @@ function pn(e) {
562
562
  }
563
563
  return e;
564
564
  }
565
- function X(e) {
566
- const t = pn(e);
565
+ function Y(e) {
566
+ const t = mn(e);
567
567
  if (t == null) return null;
568
568
  const n = typeof t;
569
569
  return n === "string" || n === "number" || n === "boolean" ? String(t) : null;
570
570
  }
571
- function Zt(e) {
571
+ function Xt(e) {
572
572
  if (!e || typeof e != "string") return !1;
573
573
  if (e === "class" || e.endsWith("Class")) return !0;
574
574
  if (e.includes("-"))
@@ -578,24 +578,24 @@ function Zt(e) {
578
578
  }
579
579
  return !1;
580
580
  }
581
- function hn(e, t, n) {
581
+ function yn(e, t, n) {
582
582
  if (n)
583
583
  for (const [r, i] of Object.entries(n)) {
584
584
  let o, s = {};
585
585
  if (Array.isArray(i) ? (o = i[0], s = i[1] || {}) : o = i, t.set(r, {
586
586
  callback: o,
587
587
  options: s,
588
- oldValue: J(e, r)
588
+ oldValue: X(e, r)
589
589
  }), s.immediate)
590
590
  try {
591
- const c = J(e, r);
591
+ const c = X(e, r);
592
592
  o(c, void 0, e);
593
593
  } catch (c) {
594
594
  H(`Error in immediate watcher for "${r}":`, c);
595
595
  }
596
596
  }
597
597
  }
598
- function gn(e, t, n, r) {
598
+ function bn(e, t, n, r) {
599
599
  const i = (s, c) => {
600
600
  if (s === c) return !0;
601
601
  if (typeof s != typeof c || typeof s != "object" || s === null || c === null) return !1;
@@ -613,53 +613,64 @@ function gn(e, t, n, r) {
613
613
  for (const [s, c] of t.entries())
614
614
  if (c.options.deep && n.startsWith(s + "."))
615
615
  try {
616
- const a = J(e, s);
616
+ const a = X(e, s);
617
617
  i(a, c.oldValue) || (c.callback(a, c.oldValue, e), c.oldValue = a);
618
618
  } catch (a) {
619
619
  H(`Error in deep watcher for "${s}":`, a);
620
620
  }
621
621
  }
622
- function Tt(e, t) {
622
+ function tt(e, t) {
623
623
  return t === Boolean ? e === "" || e === "true" : t === Number ? Number(e) : e;
624
624
  }
625
- function mn(e, t, n) {
625
+ function vn(e, t, n) {
626
626
  if (t)
627
627
  for (const r in t) {
628
- const i = t[r], o = se(r), s = e.getAttribute(o);
628
+ const i = t[r], o = oe(r), s = e.getAttribute(o);
629
629
  if (i.type === Function && typeof e[r] == "function")
630
630
  n[r] = e[r];
631
631
  else if (s !== null)
632
- n[r] = Tt(s, i.type);
632
+ n[r] = tt(s, i.type);
633
633
  else if (typeof e[r] < "u")
634
634
  try {
635
635
  const c = e[r];
636
- i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? n[r] = c : n[r] = Tt(String(c), i.type);
636
+ if (i.type === String && c && typeof c == "object")
637
+ try {
638
+ n[r] = tt(String(c), i.type);
639
+ } catch {
640
+ n[r] = c;
641
+ }
642
+ else i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? n[r] = c : n[r] = tt(String(c), i.type);
637
643
  } catch {
638
644
  n[r] = e[r];
639
645
  }
640
646
  else "default" in i && i.default !== void 0 && (n[r] = i.default);
641
647
  }
642
648
  }
643
- function yn(e, t, n) {
649
+ function wn(e, t, n) {
644
650
  if (!t.props) {
645
651
  try {
646
- const r = n && n._hookCallbacks && n._hookCallbacks.props || {}, i = Array.from(/* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(r)]));
652
+ const r = n && n._hookCallbacks && n._hookCallbacks.props || {}, i = Array.from(
653
+ /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(r)])
654
+ );
647
655
  for (const o of i) {
648
656
  if (typeof o != "string" || o.startsWith("_")) continue;
649
657
  const s = Object.getOwnPropertyDescriptor(n, o);
650
- if (!(!Object.prototype.hasOwnProperty.call(r, o) && s && (s.get || s.set || !s.configurable)))
658
+ if (!(!Object.prototype.hasOwnProperty.call(
659
+ r,
660
+ o
661
+ ) && s && (s.get || s.set || !s.configurable)))
651
662
  try {
652
663
  Object.defineProperty(n, o, {
653
664
  enumerable: !0,
654
665
  configurable: !0,
655
666
  get() {
656
667
  try {
657
- const a = se(o), l = e.getAttribute(a);
668
+ const a = oe(o), l = e.getAttribute(a);
658
669
  if (l !== null)
659
670
  return l;
660
671
  const m = e[o];
661
672
  let y;
662
- return R(m) || m && typeof m == "object" && "value" in m && !(m instanceof Node) ? y = m.value : y = m, y;
673
+ return N(m) || m && typeof m == "object" && "value" in m && !(m instanceof Node) ? y = m.value : y = m, y;
663
674
  } catch {
664
675
  return e[o];
665
676
  }
@@ -672,18 +683,18 @@ function yn(e, t, n) {
672
683
  }
673
684
  return;
674
685
  }
675
- mn(e, t.props, n);
686
+ vn(e, t.props, n);
676
687
  }
677
- function bn(e, t, n, r) {
688
+ function xn(e, t, n, r) {
678
689
  e.onConnected && !n && (e.onConnected(t), r(!0));
679
690
  }
680
- function vn(e, t, n, r, i, o, s, c) {
691
+ function kn(e, t, n, r, i, o, s, c) {
681
692
  e.onDisconnected && e.onDisconnected(t), n.forEach((a) => a()), r(), i(), o(!1), s(null), c(!1);
682
693
  }
683
- function wn(e, t, n, r, i) {
694
+ function $n(e, t, n, r, i) {
684
695
  e.onAttributeChanged && e.onAttributeChanged(t, n, r, i);
685
696
  }
686
- class xn {
697
+ class Cn {
687
698
  static cache = /* @__PURE__ */ new Map();
688
699
  static maxCacheSize = 1e3;
689
700
  // Dangerous patterns to block
@@ -708,7 +719,7 @@ class xn {
708
719
  const r = this.cache.get(t);
709
720
  if (r) {
710
721
  if (!r.isSecure) {
711
- te("Blocked cached dangerous expression:", t);
722
+ Z("Blocked cached dangerous expression:", t);
712
723
  return;
713
724
  }
714
725
  return r.evaluator(n);
@@ -719,7 +730,7 @@ class xn {
719
730
  o && this.cache.delete(o);
720
731
  }
721
732
  if (this.cache.set(t, i), !i.isSecure) {
722
- te("Blocked dangerous expression:", t);
733
+ Z("Blocked dangerous expression:", t);
723
734
  return;
724
735
  }
725
736
  return i.evaluator(n);
@@ -734,7 +745,7 @@ class xn {
734
745
  try {
735
746
  return { evaluator: this.createSafeEvaluator(t), isSecure: !0 };
736
747
  } catch (n) {
737
- return te("Failed to create evaluator for expression:", t, n), { evaluator: () => {
748
+ return Z("Failed to create evaluator for expression:", t, n), { evaluator: () => {
738
749
  }, isSecure: !1 };
739
750
  }
740
751
  }
@@ -747,9 +758,9 @@ class xn {
747
758
  return this.createObjectEvaluator(t);
748
759
  if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
749
760
  const r = t.trim().slice(4);
750
- return (i) => J(i, r);
761
+ return (i) => X(i, r);
751
762
  }
752
- return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => J(r, t);
763
+ return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => X(r, t);
753
764
  }
754
765
  static createObjectEvaluator(t) {
755
766
  const n = t.trim().slice(1, -1), r = this.parseObjectProperties(n);
@@ -759,7 +770,7 @@ class xn {
759
770
  try {
760
771
  if (c.startsWith("ctx.")) {
761
772
  const a = c.slice(4);
762
- o[s] = J(i, a);
773
+ o[s] = X(i, a);
763
774
  } else
764
775
  o[s] = this.evaluateSimpleValue(c, i);
765
776
  } catch {
@@ -786,7 +797,7 @@ class xn {
786
797
  r = r.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (y) => `<<#${i.push(y) - 1}#>>`);
787
798
  const o = r.match(/ctx\.[\w.]+/g) || [];
788
799
  for (const y of o) {
789
- const p = y.slice(4), v = J(n, p);
800
+ const p = y.slice(4), v = X(n, p);
790
801
  if (v === void 0) return;
791
802
  const f = i.push(JSON.stringify(v)) - 1;
792
803
  r = r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`);
@@ -794,7 +805,7 @@ class xn {
794
805
  const s = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = r.match(s) || [];
795
806
  for (const y of c) {
796
807
  if (y.startsWith("ctx.")) continue;
797
- const p = J(n, y);
808
+ const p = X(n, y);
798
809
  if (p === void 0) return;
799
810
  const v = i.push(JSON.stringify(p)) - 1;
800
811
  r = r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${v}#>>`);
@@ -806,7 +817,7 @@ class xn {
806
817
  const y = l[1];
807
818
  if (["true", "false", "null", "undefined"].includes(y) || /^[0-9]+$/.test(y) || y === "ctx" || m.has(y)) continue;
808
819
  m.add(y);
809
- const p = J(n, y);
820
+ const p = X(n, y);
810
821
  if (p === void 0) return;
811
822
  const v = JSON.stringify(p), f = i.push(v) - 1;
812
823
  y.includes(".") ? r = r.replace(new RegExp(y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`) : r = r.replace(new RegExp("\\b" + y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${f}#>>`);
@@ -985,7 +996,7 @@ class xn {
985
996
  if (!isNaN(Number(t))) return Number(t);
986
997
  if (t.startsWith("ctx.")) {
987
998
  const r = t.slice(4);
988
- return J(n, r);
999
+ return X(n, r);
989
1000
  }
990
1001
  return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
991
1002
  }
@@ -996,7 +1007,7 @@ class xn {
996
1007
  return this.cache.size;
997
1008
  }
998
1009
  }
999
- class ce {
1010
+ class ae {
1000
1011
  static cleanupFunctions = /* @__PURE__ */ new WeakMap();
1001
1012
  /**
1002
1013
  * Add an event listener with automatic cleanup tracking
@@ -1066,7 +1077,7 @@ class ce {
1066
1077
  function qe(e, t) {
1067
1078
  return Array.isArray(e) && Array.isArray(t) ? JSON.stringify([...e].sort()) !== JSON.stringify([...t].sort()) : e !== t;
1068
1079
  }
1069
- function jt(e, t, n, r, i) {
1080
+ function Ot(e, t, n, r, i) {
1070
1081
  if (e)
1071
1082
  if (i && typeof t.value == "object" && t.value !== null) {
1072
1083
  const o = { ...t.value };
@@ -1075,7 +1086,7 @@ function jt(e, t, n, r, i) {
1075
1086
  t.value = n;
1076
1087
  else {
1077
1088
  const o = r._state || r;
1078
- Ye(o, t, n);
1089
+ Qe(o, t, n);
1079
1090
  }
1080
1091
  }
1081
1092
  function Ke(e, t, n, r) {
@@ -1084,8 +1095,8 @@ function Ke(e, t, n, r) {
1084
1095
  e._triggerWatchers(i, r);
1085
1096
  }
1086
1097
  }
1087
- function kn(e, t, n) {
1088
- const r = `update:${se(t)}`, i = `update:${t}`, o = new CustomEvent(r, {
1098
+ function En(e, t, n) {
1099
+ const r = `update:${oe(t)}`, i = `update:${t}`, o = new CustomEvent(r, {
1089
1100
  detail: n,
1090
1101
  bubbles: !0,
1091
1102
  composed: !0
@@ -1096,34 +1107,34 @@ function kn(e, t, n) {
1096
1107
  });
1097
1108
  e.dispatchEvent(o), e.dispatchEvent(s);
1098
1109
  }
1099
- function Lt(e, t, n, r) {
1110
+ function Pt(e, t, n, r) {
1100
1111
  const i = n;
1101
- M(() => {
1112
+ P(() => {
1102
1113
  e[t] = i;
1103
- }), M(() => {
1104
- const o = se(t);
1114
+ }), P(() => {
1115
+ const o = oe(t);
1105
1116
  if (typeof i == "boolean") {
1106
- const s = X(i);
1117
+ const s = Y(i);
1107
1118
  s !== null ? e.setAttribute(o, s) : e.removeAttribute?.(o);
1108
1119
  } else if (i != null && (typeof i == "string" || typeof i == "number"))
1109
1120
  e.setAttribute(o, String(i));
1110
1121
  else {
1111
- const s = X(i);
1122
+ const s = Y(i);
1112
1123
  s !== null ? e.setAttribute(o, s) : e.removeAttribute?.(o);
1113
1124
  }
1114
- }), M(() => {
1125
+ }), P(() => {
1115
1126
  e._applyProps?.(e._cfg);
1116
- }), M(() => {
1127
+ }), P(() => {
1117
1128
  e._requestRender?.();
1118
1129
  });
1119
1130
  }
1120
- function $n(e, t, n, r) {
1131
+ function _n(e, t, n, r) {
1121
1132
  if (e) {
1122
1133
  const o = t.value;
1123
1134
  return r && typeof o == "object" && o !== null ? o[r] : o;
1124
1135
  }
1125
1136
  const i = n._state || n;
1126
- return J(i, t);
1137
+ return X(i, t);
1127
1138
  }
1128
1139
  function _e(e) {
1129
1140
  return e ? e.split(/\s+/).filter(Boolean) : [];
@@ -1138,34 +1149,34 @@ function Ce(e, t) {
1138
1149
  const n = t.filter(Boolean);
1139
1150
  n.length > 0 && e.classList.remove(...n);
1140
1151
  }
1141
- let et = !1;
1142
- async function Cn(e, t, n = 10) {
1143
- if (!et) {
1152
+ let nt = !1;
1153
+ async function An(e, t, n = 10) {
1154
+ if (!nt) {
1144
1155
  if (!e.isConnected) {
1145
- te("⚠️ Element not connected to DOM, skipping style wait");
1156
+ Z("⚠️ Element not connected to DOM, skipping style wait");
1146
1157
  return;
1147
1158
  }
1148
1159
  for (let r = 0; r < n; r++) {
1149
1160
  const i = window.getComputedStyle(e), o = i.transform && i.transform !== "", s = i.opacity && i.opacity !== "";
1150
1161
  if (o || s) {
1151
- et = !0;
1162
+ nt = !0;
1152
1163
  return;
1153
1164
  }
1154
1165
  await new Promise((c) => requestAnimationFrame(() => c(void 0)));
1155
1166
  }
1156
- et = !0, te("⚠️ Styles did not load in time for transition, continuing anyway");
1167
+ nt = !0, Z("⚠️ Styles did not load in time for transition, continuing anyway");
1157
1168
  }
1158
1169
  }
1159
- function En(e) {
1170
+ function Sn(e) {
1160
1171
  const t = window.getComputedStyle(e), n = t.transitionDuration || "0s", r = t.transitionDelay || "0s", i = (o) => {
1161
1172
  const s = parseFloat(o);
1162
1173
  return o.includes("ms") ? s : s * 1e3;
1163
1174
  };
1164
1175
  return i(n) + i(r);
1165
1176
  }
1166
- function Gt(e, t) {
1177
+ function Yt(e, t) {
1167
1178
  return new Promise((n) => {
1168
- const r = t ?? En(e);
1179
+ const r = t ?? Sn(e);
1169
1180
  if (r <= 0) {
1170
1181
  n();
1171
1182
  return;
@@ -1217,14 +1228,14 @@ async function Le(e, t) {
1217
1228
  const m = window.getComputedStyle(e), y = m.transform, p = m.opacity;
1218
1229
  Ce(e, s), y && y !== "none" && (e.style.transform = y), p && p !== "" && (e.style.opacity = p), e.offsetHeight, await new Promise((f) => requestAnimationFrame(() => f(void 0))), e.style.transform = "", e.style.opacity = "", Ae(e, a), e.offsetHeight, await new Promise((f) => requestAnimationFrame(() => f(void 0)));
1219
1230
  let v;
1220
- if (typeof o == "number" ? v = o : o && typeof o == "object" && "enter" in o && (v = o.enter), await Gt(e, v), Ce(e, c), r?.onAfterEnter)
1231
+ if (typeof o == "number" ? v = o : o && typeof o == "object" && "enter" in o && (v = o.enter), await Yt(e, v), Ce(e, c), r?.onAfterEnter)
1221
1232
  try {
1222
1233
  r.onAfterEnter(e);
1223
1234
  } catch (f) {
1224
1235
  H("Transition onAfterEnter error:", f);
1225
1236
  }
1226
1237
  }
1227
- async function tt(e, t) {
1238
+ async function rt(e, t) {
1228
1239
  const { classes: n, hooks: r, css: i, duration: o } = t;
1229
1240
  if (r?.onBeforeLeave)
1230
1241
  try {
@@ -1260,19 +1271,19 @@ async function tt(e, t) {
1260
1271
  }
1261
1272
  l && await y;
1262
1273
  }
1263
- await new Promise((y) => requestAnimationFrame(() => y(void 0))), await Cn(e, [...s, ...c]), Ce(e, s), Ae(e, a);
1274
+ await new Promise((y) => requestAnimationFrame(() => y(void 0))), await An(e, [...s, ...c]), Ce(e, s), Ae(e, a);
1264
1275
  let m;
1265
- if (typeof o == "number" ? m = o : o && typeof o == "object" && "leave" in o && (m = o.leave), await Gt(e, m), Ce(e, c), Ce(e, a), Ce(e, s), r?.onAfterLeave)
1276
+ if (typeof o == "number" ? m = o : o && typeof o == "object" && "leave" in o && (m = o.leave), await Yt(e, m), Ce(e, c), Ce(e, a), Ce(e, s), r?.onAfterLeave)
1266
1277
  try {
1267
1278
  r.onAfterLeave(e);
1268
1279
  } catch (y) {
1269
1280
  H("Transition onAfterLeave error:", y);
1270
1281
  }
1271
1282
  }
1272
- const Jt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap();
1283
+ const Qt = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap();
1273
1284
  function Ve(e) {
1274
1285
  if (!e) return;
1275
- const t = Jt.get(e);
1286
+ const t = Qt.get(e);
1276
1287
  if (t !== void 0) return t;
1277
1288
  try {
1278
1289
  const n = e;
@@ -1284,9 +1295,9 @@ function Ve(e) {
1284
1295
  if (n) return n;
1285
1296
  }
1286
1297
  }
1287
- function ne(e, t) {
1298
+ function te(e, t) {
1288
1299
  try {
1289
- Jt.set(e, t);
1300
+ Qt.set(e, t);
1290
1301
  } catch {
1291
1302
  }
1292
1303
  try {
@@ -1295,15 +1306,15 @@ function ne(e, t) {
1295
1306
  }
1296
1307
  try {
1297
1308
  if (e instanceof Element) {
1298
- const n = X(t);
1309
+ const n = Y(t);
1299
1310
  n !== null && e.setAttribute("data-anchor-key", n);
1300
1311
  }
1301
1312
  } catch {
1302
1313
  }
1303
1314
  }
1304
- function _n(e) {
1315
+ function Tn(e) {
1305
1316
  if (!e) return;
1306
- const t = Xt.get(e);
1317
+ const t = en.get(e);
1307
1318
  if (t !== void 0) return t;
1308
1319
  try {
1309
1320
  const n = e;
@@ -1311,9 +1322,9 @@ function _n(e) {
1311
1322
  } catch {
1312
1323
  }
1313
1324
  }
1314
- function An(e, t) {
1325
+ function jn(e, t) {
1315
1326
  try {
1316
- Xt.set(e, t);
1327
+ en.set(e, t);
1317
1328
  } catch {
1318
1329
  }
1319
1330
  try {
@@ -1321,15 +1332,15 @@ function An(e, t) {
1321
1332
  } catch {
1322
1333
  }
1323
1334
  }
1324
- function oe(e) {
1335
+ function ie(e) {
1325
1336
  return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
1326
1337
  }
1327
1338
  function Se(e) {
1328
- return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? R(e) || "value" in e ? !!e.value : !1 : !!e;
1339
+ return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? N(e) || "value" in e ? !!e.value : !1 : !!e;
1329
1340
  }
1330
1341
  function we(e, t) {
1331
1342
  if (!t || !(e instanceof HTMLElement)) return;
1332
- ce.cleanup(e);
1343
+ ae.cleanup(e);
1333
1344
  for (const r in t)
1334
1345
  t[r] === e && delete t[r];
1335
1346
  const n = e.childNodes;
@@ -1341,14 +1352,14 @@ function Pe(e, t, n) {
1341
1352
  const r = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
1342
1353
  r ? r.value = t : i && n && (n[i] = t);
1343
1354
  }
1344
- function Sn(e, t, n, r, i, o, s, c) {
1355
+ function Ln(e, t, n, r, i, o, s, c) {
1345
1356
  if (!o) return;
1346
1357
  const a = t.includes("lazy"), l = t.includes("trim"), m = t.includes("number"), y = e && typeof e == "object" && "value" in e && typeof e.value < "u", p = () => {
1347
1358
  if (y) {
1348
1359
  const k = e.value;
1349
1360
  return c && s && (s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement || s instanceof HTMLSelectElement) && typeof k == "object" && k !== null ? k[c] : k;
1350
1361
  }
1351
- return J(o._state || o, e);
1362
+ return X(o._state || o, e);
1352
1363
  }, v = p();
1353
1364
  let f = "text";
1354
1365
  s instanceof HTMLInputElement ? f = r?.type || s.type || "text" : s instanceof HTMLSelectElement ? f = "select" : s instanceof HTMLTextAreaElement && (f = "textarea");
@@ -1368,8 +1379,8 @@ function Sn(e, t, n, r, i, o, s, c) {
1368
1379
  if (s && s.hasAttribute("multiple") && s instanceof HTMLSelectElement) {
1369
1380
  const k = Array.isArray(v) ? v.map(String) : [];
1370
1381
  setTimeout(() => {
1371
- Array.from(s.options).forEach((S) => {
1372
- S.selected = k.includes(S.value);
1382
+ Array.from(s.options).forEach((A) => {
1383
+ A.selected = k.includes(A.value);
1373
1384
  });
1374
1385
  }, 0), n[u] = Array.isArray(v) ? v : [];
1375
1386
  } else
@@ -1377,32 +1388,32 @@ function Sn(e, t, n, r, i, o, s, c) {
1377
1388
  else {
1378
1389
  !h && y ? n[u] = e : n[u] = v;
1379
1390
  try {
1380
- const k = se(u);
1391
+ const k = oe(u);
1381
1392
  r && (r[k] = v);
1382
1393
  } catch {
1383
1394
  }
1384
1395
  }
1385
1396
  const g = a || f === "checkbox" || f === "radio" || f === "select" ? "change" : "input", w = (k) => {
1386
1397
  if (k.isComposing || i._isComposing) return;
1387
- const S = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
1388
- if (k.isTrusted === !1 && !S) return;
1398
+ const A = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
1399
+ if (k.isTrusted === !1 && !A) return;
1389
1400
  const C = k.target;
1390
1401
  if (!C || C._modelUpdating) return;
1391
1402
  let _ = C.value;
1392
1403
  if (f === "checkbox") {
1393
1404
  const $ = p();
1394
1405
  if (Array.isArray($)) {
1395
- const b = C.getAttribute("value") ?? "", A = Array.from($);
1406
+ const b = C.getAttribute("value") ?? "", E = Array.from($);
1396
1407
  if (C.checked)
1397
- A.includes(b) || A.push(b);
1408
+ E.includes(b) || E.push(b);
1398
1409
  else {
1399
- const O = A.indexOf(b);
1400
- O > -1 && A.splice(O, 1);
1410
+ const O = E.indexOf(b);
1411
+ O > -1 && E.splice(O, 1);
1401
1412
  }
1402
- _ = A;
1413
+ _ = E;
1403
1414
  } else {
1404
- const b = C.getAttribute("true-value") ?? !0, A = C.getAttribute("false-value") ?? !1;
1405
- _ = C.checked ? b : A;
1415
+ const b = C.getAttribute("true-value") ?? !0, E = C.getAttribute("false-value") ?? !1;
1416
+ _ = C.checked ? b : E;
1406
1417
  }
1407
1418
  } else if (f === "radio")
1408
1419
  _ = C.getAttribute("value") ?? C.value;
@@ -1418,7 +1429,7 @@ function Sn(e, t, n, r, i, o, s, c) {
1418
1429
  if (qe(_, x)) {
1419
1430
  C._modelUpdating = !0;
1420
1431
  try {
1421
- jt(y, e, _, o, c), Ke(o, y, e, _), C && kn(C, u, _);
1432
+ Ot(y, e, _, o, c), Ke(o, y, e, _), C && En(C, u, _);
1422
1433
  } finally {
1423
1434
  setTimeout(() => C._modelUpdating = !1, 0);
1424
1435
  }
@@ -1427,30 +1438,30 @@ function Sn(e, t, n, r, i, o, s, c) {
1427
1438
  if (h) {
1428
1439
  if (i[g]) {
1429
1440
  const k = i[g];
1430
- s && ce.removeListener(s, g, k);
1441
+ s && ae.removeListener(s, g, k);
1431
1442
  }
1432
1443
  i[g] = w;
1433
1444
  } else {
1434
- const k = `update:${se(u)}`, S = `update:${u}`;
1445
+ const k = `update:${oe(u)}`, A = `update:${u}`;
1435
1446
  if (i[k]) {
1436
1447
  const C = i[k];
1437
- s && ce.removeListener(s, k, C);
1448
+ s && ae.removeListener(s, k, C);
1438
1449
  }
1439
- if (i[S]) {
1440
- const C = i[S];
1441
- s && ce.removeListener(s, S, C);
1450
+ if (i[A]) {
1451
+ const C = i[A];
1452
+ s && ae.removeListener(s, A, C);
1442
1453
  }
1443
1454
  if (i[k] = (C) => {
1444
- const _ = C.detail !== void 0 ? C.detail : C.target?.value, x = $n(
1455
+ const _ = C.detail !== void 0 ? C.detail : C.target?.value, x = _n(
1445
1456
  y,
1446
1457
  e,
1447
1458
  o,
1448
1459
  c
1449
1460
  );
1450
1461
  if (qe(_, x)) {
1451
- jt(y, e, _, o, c), Ke(o, y, e, _);
1462
+ Ot(y, e, _, o, c), Ke(o, y, e, _);
1452
1463
  const $ = C.target;
1453
- $ && Lt(
1464
+ $ && Pt(
1454
1465
  $,
1455
1466
  u,
1456
1467
  y ? e : _,
@@ -1468,63 +1479,63 @@ function Sn(e, t, n, r, i, o, s, c) {
1468
1479
  (x) => typeof x == "string" && !String(x).startsWith("_") && x !== "constructor"
1469
1480
  );
1470
1481
  for (const x of _) {
1471
- const T = `update:${se(x)}`, $ = `update:${x}`;
1482
+ const T = `update:${oe(x)}`, $ = `update:${x}`;
1472
1483
  i[T] || (i[T] = (b) => {
1473
- const A = b.detail !== void 0 ? b.detail : b.target?.value, O = y ? e.value[x] : J(o._state || o, e);
1474
- if (!qe(A, O)) return;
1484
+ const E = b.detail !== void 0 ? b.detail : b.target?.value, O = y ? e.value[x] : X(o._state || o, e);
1485
+ if (!qe(E, O)) return;
1475
1486
  if (y) {
1476
- const P = { ...e.value };
1477
- P[x] = A, e.value = P;
1487
+ const M = { ...e.value };
1488
+ M[x] = E, e.value = M;
1478
1489
  } else
1479
- Ye(o._state || o, e, A);
1480
- Ke(o, y, e, A);
1481
- const E = b.currentTarget || s || b.target;
1482
- E && Lt(
1483
- E,
1490
+ Qe(o._state || o, e, E);
1491
+ Ke(o, y, e, E);
1492
+ const S = b.currentTarget || s || b.target;
1493
+ S && Pt(
1494
+ S,
1484
1495
  u,
1485
- y ? e : A,
1496
+ y ? e : E,
1486
1497
  y
1487
1498
  );
1488
1499
  }, i[$] = i[T]);
1489
1500
  }
1490
1501
  }
1491
- i[S] = i[k];
1502
+ i[A] = i[k];
1492
1503
  }
1493
1504
  (f === "text" || f === "textarea") && (i.compositionstart = () => i._isComposing = !0, i.compositionend = (k) => {
1494
1505
  i._isComposing = !1;
1495
- const S = k.target;
1496
- S && setTimeout(() => {
1497
- const C = S.value, _ = o._state || o, x = J(_, e);
1506
+ const A = k.target;
1507
+ A && setTimeout(() => {
1508
+ const C = A.value, _ = o._state || o, x = X(_, e);
1498
1509
  let T = C;
1499
1510
  if (l && (T = T.trim()), m) {
1500
1511
  const b = Number(T);
1501
1512
  isNaN(b) || (T = b);
1502
1513
  }
1503
1514
  if (qe(T, x)) {
1504
- S._modelUpdating = !0;
1515
+ A._modelUpdating = !0;
1505
1516
  try {
1506
- Ye(_, e, T), Ke(o, y, e, T);
1517
+ Qe(_, e, T), Ke(o, y, e, T);
1507
1518
  } finally {
1508
- setTimeout(() => S._modelUpdating = !1, 0);
1519
+ setTimeout(() => A._modelUpdating = !1, 0);
1509
1520
  }
1510
1521
  }
1511
1522
  }, 0);
1512
1523
  });
1513
1524
  }
1514
- function Yt(e) {
1525
+ function tn(e) {
1515
1526
  const t = e.slice(2);
1516
1527
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
1517
1528
  }
1518
- function Tn(e, t, n, r, i) {
1529
+ function On(e, t, n, r, i) {
1519
1530
  if (typeof e == "object" && e !== null)
1520
1531
  for (const [o, s] of Object.entries(e))
1521
1532
  if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
1522
1533
  n[o] = s;
1523
- else if (o === "disabled" && i && oe(i)) {
1534
+ else if (o === "disabled" && i && ie(i)) {
1524
1535
  const c = s && typeof s == "object" && "value" in s;
1525
1536
  (() => {
1526
1537
  try {
1527
- return R(s);
1538
+ return N(s);
1528
1539
  } catch {
1529
1540
  return !1;
1530
1541
  }
@@ -1539,11 +1550,11 @@ function Tn(e, t, n, r, i) {
1539
1550
  for (const [s, c] of Object.entries(o))
1540
1551
  if (s.startsWith("data-") || s.startsWith("aria-") || s === "class")
1541
1552
  n[s] = c;
1542
- else if (s === "disabled" && i && oe(i)) {
1553
+ else if (s === "disabled" && i && ie(i)) {
1543
1554
  const a = c && typeof c == "object" && "value" in c;
1544
1555
  (() => {
1545
1556
  try {
1546
- return R(c);
1557
+ return N(c);
1547
1558
  } catch {
1548
1559
  return !1;
1549
1560
  }
@@ -1556,12 +1567,12 @@ function Tn(e, t, n, r, i) {
1556
1567
  return;
1557
1568
  }
1558
1569
  } catch {
1559
- const o = J(r, e);
1570
+ const o = X(r, e);
1560
1571
  n[e] = o;
1561
1572
  }
1562
1573
  }
1563
1574
  }
1564
- function jn(e, t, n) {
1575
+ function Pn(e, t, n) {
1565
1576
  let r;
1566
1577
  if (typeof e == "string") {
1567
1578
  if (!n) return;
@@ -1587,9 +1598,9 @@ function jn(e, t, n) {
1587
1598
  o !== i && (o ? t.style = o : delete t.style);
1588
1599
  }
1589
1600
  function Fe(e, t) {
1590
- return xn.evaluate(e, t);
1601
+ return Cn.evaluate(e, t);
1591
1602
  }
1592
- function Ln(e, t, n) {
1603
+ function Mn(e, t, n) {
1593
1604
  let r;
1594
1605
  if (typeof e == "string") {
1595
1606
  if (!n) return;
@@ -1598,7 +1609,7 @@ function Ln(e, t, n) {
1598
1609
  r = e;
1599
1610
  try {
1600
1611
  if (r && typeof r == "object") {
1601
- if (R(r))
1612
+ if (N(r))
1602
1613
  r = r.value;
1603
1614
  else if ("value" in r && typeof r.value < "u") {
1604
1615
  const c = r.value;
@@ -1618,7 +1629,7 @@ function Ln(e, t, n) {
1618
1629
  const o = t.class || "", s = i.join(" ");
1619
1630
  t.class = o ? `${o} ${s}`.trim() : s;
1620
1631
  }
1621
- function mt(e) {
1632
+ function vt(e) {
1622
1633
  if (e === !0 || e === !1) return !0;
1623
1634
  if (e == null) return !1;
1624
1635
  if (typeof e === "string") return e === "" || e === "true" || e === "false";
@@ -1631,7 +1642,7 @@ function mt(e) {
1631
1642
  }
1632
1643
  return !1;
1633
1644
  }
1634
- function On(e, t, n) {
1645
+ function Nn(e, t, n) {
1635
1646
  let r;
1636
1647
  if (typeof e == "string") {
1637
1648
  if (!n) return;
@@ -1682,17 +1693,17 @@ function On(e, t, n) {
1682
1693
  const o = t.style || "";
1683
1694
  t.style = o + (o && !o.endsWith(";") ? "; " : "") + i;
1684
1695
  }
1685
- function Pn(e, t, n) {
1696
+ function Rn(e, t, n) {
1686
1697
  let r = e;
1687
- typeof e == "string" && n && (r = Fe(e, n)), R(r) ? t.reactiveRef = r : t.ref = r;
1698
+ typeof e == "string" && n && (r = Fe(e, n)), N(r) ? t.reactiveRef = r : t.ref = r;
1688
1699
  }
1689
- function Qt(e, t, n, r) {
1700
+ function nn(e, t, n, r) {
1690
1701
  const i = {}, o = { ...r || {} }, s = {};
1691
1702
  for (const [c, a] of Object.entries(e)) {
1692
1703
  const { value: l, modifiers: m, arg: y } = a;
1693
1704
  if (c === "model" || c.startsWith("model:")) {
1694
1705
  const p = c.split(":"), v = p.length > 1 ? p[1] : y;
1695
- Sn(
1706
+ Ln(
1696
1707
  l,
1697
1708
  // Pass the original value (could be string or reactive state object)
1698
1709
  m,
@@ -1707,28 +1718,28 @@ function Qt(e, t, n, r) {
1707
1718
  }
1708
1719
  switch (c) {
1709
1720
  case "bind":
1710
- Tn(l, i, o, t, n);
1721
+ On(l, i, o, t, n);
1711
1722
  break;
1712
1723
  case "show":
1713
- jn(l, o, t);
1724
+ Pn(l, o, t);
1714
1725
  break;
1715
1726
  case "class":
1716
- Ln(l, o, t);
1727
+ Mn(l, o, t);
1717
1728
  break;
1718
1729
  case "style":
1719
- On(l, o, t);
1730
+ Nn(l, o, t);
1720
1731
  break;
1721
1732
  case "ref":
1722
- Pn(l, i, t);
1733
+ Rn(l, i, t);
1723
1734
  break;
1724
1735
  }
1725
1736
  }
1726
1737
  try {
1727
- if (Object.prototype.hasOwnProperty.call(i, "disabled") && n && oe(n)) {
1738
+ if (Object.prototype.hasOwnProperty.call(i, "disabled") && n && ie(n)) {
1728
1739
  const a = i.disabled, l = a && typeof a == "object" && "value" in a;
1729
1740
  let m = !1;
1730
1741
  try {
1731
- m = R(a);
1742
+ m = N(a);
1732
1743
  } catch {
1733
1744
  m = !1;
1734
1745
  }
@@ -1751,7 +1762,7 @@ function Qt(e, t, n, r) {
1751
1762
  }
1752
1763
  return { props: i, attrs: o, listeners: s };
1753
1764
  }
1754
- function yt(e, t) {
1765
+ function wt(e, t) {
1755
1766
  if (Array.isArray(e)) {
1756
1767
  const o = /* @__PURE__ */ new Set();
1757
1768
  return e.map((s) => {
@@ -1776,15 +1787,15 @@ function yt(e, t) {
1776
1787
  a = `${c}#${l++}`;
1777
1788
  o.add(a);
1778
1789
  let m = s.children;
1779
- return Array.isArray(m) && (m = yt(m, a)), { ...s, key: a, children: m };
1790
+ return Array.isArray(m) && (m = wt(m, a)), { ...s, key: a, children: m };
1780
1791
  });
1781
1792
  }
1782
1793
  const n = e;
1783
1794
  let r = n.props?.key ?? n.key ?? t, i = n.children;
1784
- return Array.isArray(i) && (i = yt(i, r)), { ...n, key: r, children: i };
1795
+ return Array.isArray(i) && (i = wt(i, r)), { ...n, key: r, children: i };
1785
1796
  }
1786
- function Ot(e, t, n, r) {
1787
- const i = n.directives ?? {}, o = Qt(
1797
+ function Mt(e, t, n, r) {
1798
+ const i = n.directives ?? {}, o = nn(
1788
1799
  i,
1789
1800
  r,
1790
1801
  e,
@@ -1802,29 +1813,29 @@ function Ot(e, t, n, r) {
1802
1813
  for (const f in { ...a, ...l }) {
1803
1814
  const h = a[f], d = l[f];
1804
1815
  let u = h, g = d;
1805
- if (M(() => {
1806
- (R(h) || h && typeof h == "object" && "value" in h) && (u = h.value);
1807
- }), M(() => {
1808
- (R(d) || d && typeof d == "object" && "value" in d) && (g = d.value);
1816
+ if (P(() => {
1817
+ (N(h) || h && typeof h == "object" && "value" in h) && (u = h.value);
1818
+ }), P(() => {
1819
+ (N(d) || d && typeof d == "object" && "value" in d) && (g = d.value);
1809
1820
  }), !(h === d && u === g))
1810
1821
  if (y = !0, f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
1811
- const w = typeof d == "object" && d !== null && R(d) || d && typeof d == "object" && "value" in d ? d.value : d;
1822
+ const w = typeof d == "object" && d !== null && N(d) || d && typeof d == "object" && "value" in d ? d.value : d;
1812
1823
  e.value !== w && (e.value = w ?? "");
1813
1824
  } else if (f === "checked" && e instanceof HTMLInputElement) {
1814
- const w = typeof d == "object" && d !== null && R(d) || d && typeof d == "object" && "value" in d ? d.value : d;
1825
+ const w = typeof d == "object" && d !== null && N(d) || d && typeof d == "object" && "value" in d ? d.value : d;
1815
1826
  e.checked = !!w;
1816
1827
  } else if (f.startsWith("on") && typeof d == "function") {
1817
- const w = Yt(f);
1818
- typeof h == "function" && ce.removeListener(e, w, h), ce.addListener(e, w, d);
1828
+ const w = tn(f);
1829
+ typeof h == "function" && ae.removeListener(e, w, h), ae.addListener(e, w, d);
1819
1830
  try {
1820
1831
  if (w && w.startsWith("update:")) {
1821
- const k = w.split(":", 2)[1], S = l[k];
1832
+ const k = w.split(":", 2)[1], A = l[k];
1822
1833
  let C = [];
1823
1834
  try {
1824
- if (R(S)) {
1825
- const x = S.value;
1835
+ if (N(A)) {
1836
+ const x = A.value;
1826
1837
  C = x && typeof x == "object" ? Object.keys(x) : [];
1827
- } else S && typeof S == "object" && (C = Object.keys(S));
1838
+ } else A && typeof A == "object" && (C = Object.keys(A));
1828
1839
  } catch {
1829
1840
  C = [];
1830
1841
  }
@@ -1833,13 +1844,13 @@ function Ot(e, t, n, r) {
1833
1844
  );
1834
1845
  for (const x of _) {
1835
1846
  const T = `update:${x}`, $ = (b) => {
1836
- const A = b.detail !== void 0 ? b.detail : b.target?.value, j = { ...R(S) ? S.value || {} : l[k] || {}, [x]: A };
1837
- M(() => {
1847
+ const E = b.detail !== void 0 ? b.detail : b.target?.value, j = { ...N(A) ? A.value || {} : l[k] || {}, [x]: E };
1848
+ P(() => {
1838
1849
  d({ detail: j });
1839
1850
  });
1840
1851
  };
1841
- M(() => {
1842
- ce.addListener(e, T, $);
1852
+ P(() => {
1853
+ ae.addListener(e, T, $);
1843
1854
  });
1844
1855
  }
1845
1856
  }
@@ -1851,7 +1862,7 @@ function Ot(e, t, n, r) {
1851
1862
  const w = n?.isCustomElement ?? t?.isCustomElement ?? !1;
1852
1863
  if (w || f in e)
1853
1864
  try {
1854
- e[f] = d, f === "disabled" && d === !1 && !w && oe(e) && e.removeAttribute("disabled");
1865
+ e[f] = d, f === "disabled" && d === !1 && !w && ie(e) && e.removeAttribute("disabled");
1855
1866
  } catch {
1856
1867
  }
1857
1868
  else
@@ -1861,10 +1872,10 @@ function Ot(e, t, n, r) {
1861
1872
  for (const [f, h] of Object.entries(
1862
1873
  o.listeners || {}
1863
1874
  )) {
1864
- ce.addListener(e, f, h);
1875
+ ae.addListener(e, f, h);
1865
1876
  try {
1866
1877
  const d = e && e.parentElement;
1867
- d && d !== e && ce.addListener(
1878
+ d && d !== e && ae.addListener(
1868
1879
  d,
1869
1880
  f,
1870
1881
  h
@@ -1876,94 +1887,94 @@ function Ot(e, t, n, r) {
1876
1887
  for (const f in { ...p, ...v }) {
1877
1888
  const h = p[f], d = v[f];
1878
1889
  let u = h, g = d;
1879
- if (R(h) && (u = h.value), R(d) && (g = d.value), u !== g)
1890
+ if (N(h) && (u = h.value), N(d) && (g = d.value), u !== g)
1880
1891
  if (y = !0, g == null || g === !1)
1881
- M(() => {
1892
+ P(() => {
1882
1893
  e.removeAttribute(f);
1883
- }), f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? M(() => {
1894
+ }), f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? P(() => {
1884
1895
  e.value = "";
1885
- }) : e instanceof HTMLSelectElement ? M(() => {
1896
+ }) : e instanceof HTMLSelectElement ? P(() => {
1886
1897
  e.value = "";
1887
- }) : e instanceof HTMLProgressElement && M(() => {
1898
+ }) : e instanceof HTMLProgressElement && P(() => {
1888
1899
  e.value = 0;
1889
- })), f === "checked" && e instanceof HTMLInputElement && M(() => {
1900
+ })), f === "checked" && e instanceof HTMLInputElement && P(() => {
1890
1901
  e.checked = !1;
1891
- }), f === "disabled" && oe(e) && M(() => {
1902
+ }), f === "disabled" && ie(e) && P(() => {
1892
1903
  e.disabled = !1;
1893
1904
  });
1894
1905
  else {
1895
1906
  if (f === "value") {
1896
1907
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1897
- M(() => {
1908
+ P(() => {
1898
1909
  e.value = g ?? "";
1899
1910
  });
1900
1911
  continue;
1901
1912
  } else if (e instanceof HTMLSelectElement) {
1902
- M(() => {
1913
+ P(() => {
1903
1914
  e.value = g ?? "";
1904
1915
  });
1905
1916
  continue;
1906
1917
  } else if (e instanceof HTMLProgressElement) {
1907
- M(() => {
1918
+ P(() => {
1908
1919
  e.value = Number(g);
1909
1920
  });
1910
1921
  continue;
1911
1922
  }
1912
1923
  }
1913
1924
  if (f === "checked" && e instanceof HTMLInputElement) {
1914
- M(() => {
1925
+ P(() => {
1915
1926
  e.checked = !!g;
1916
1927
  });
1917
1928
  continue;
1918
1929
  }
1919
1930
  if (f === "style") {
1920
- const k = X(g);
1931
+ const k = Y(g);
1921
1932
  k !== null && e.setAttribute(f, k);
1922
1933
  continue;
1923
1934
  }
1924
- if (f === "disabled" && oe(e)) {
1925
- M(() => {
1935
+ if (f === "disabled" && ie(e)) {
1936
+ P(() => {
1926
1937
  e.disabled = Se(g);
1927
- }), Se(g) ? M(() => {
1938
+ }), Se(g) ? P(() => {
1928
1939
  e.setAttribute(f, "");
1929
- }) : M(() => {
1940
+ }) : P(() => {
1930
1941
  e.removeAttribute(f);
1931
1942
  });
1932
1943
  continue;
1933
1944
  }
1934
1945
  const w = e.namespaceURI === "http://www.w3.org/2000/svg";
1935
1946
  if (m && !w && f.includes("-"))
1936
- if (Zt(f)) {
1937
- const k = X(d ?? g);
1947
+ if (Xt(f)) {
1948
+ const k = Y(d ?? g);
1938
1949
  if (k !== null)
1939
1950
  try {
1940
1951
  e.setAttribute(f, k);
1941
1952
  } catch {
1942
1953
  }
1943
1954
  } else {
1944
- const k = xt(f);
1955
+ const k = Ct(f);
1945
1956
  try {
1946
- R(d) ? e[k] = d : e[k] = g;
1957
+ N(d) ? e[k] = d : e[k] = g;
1947
1958
  } catch {
1948
- const C = X(d ?? g);
1959
+ const C = Y(d ?? g);
1949
1960
  C !== null && e.setAttribute(f, C);
1950
1961
  }
1951
1962
  }
1952
1963
  else if (!w && f in e)
1953
1964
  try {
1954
- R(d) ? e[f] = d : e[f] = g;
1965
+ N(d) ? e[f] = d : e[f] = g;
1955
1966
  } catch {
1956
- const S = X(g);
1957
- S !== null && e.setAttribute(f, S);
1967
+ const A = Y(g);
1968
+ A !== null && e.setAttribute(f, A);
1958
1969
  }
1959
1970
  else {
1960
- const k = X(g);
1971
+ const k = Y(g);
1961
1972
  k !== null && e.setAttribute(f, k);
1962
1973
  }
1963
1974
  }
1964
1975
  }
1965
1976
  try {
1966
- if (oe(e)) {
1977
+ if (ie(e)) {
1967
1978
  const f = s.disabled;
1968
1979
  let h;
1969
1980
  try {
@@ -1972,18 +1983,18 @@ function Ot(e, t, n, r) {
1972
1983
  "disabled"
1973
1984
  ), g = f && typeof f == "object" && "value" in f;
1974
1985
  let w = !1;
1975
- M(() => {
1976
- w = !!R(f);
1986
+ P(() => {
1987
+ w = !!N(f);
1977
1988
  });
1978
- const k = mt(f);
1989
+ const k = vt(f);
1979
1990
  w || g || u || k ? h = f : h = c.disabled;
1980
1991
  } catch {
1981
1992
  h = c.disabled;
1982
1993
  }
1983
1994
  const d = Se(h);
1984
- M(() => {
1995
+ P(() => {
1985
1996
  e.disabled = d;
1986
- }), M(d ? () => {
1997
+ }), P(d ? () => {
1987
1998
  e.setAttribute("disabled", "");
1988
1999
  } : () => {
1989
2000
  e.removeAttribute("disabled");
@@ -1991,20 +2002,20 @@ function Ot(e, t, n, r) {
1991
2002
  }
1992
2003
  } catch {
1993
2004
  }
1994
- m && y && (M(() => {
2005
+ m && y && (P(() => {
1995
2006
  e._applyProps?.(e._cfg);
1996
- }), M(() => {
2007
+ }), P(() => {
1997
2008
  typeof e.requestRender == "function" ? e.requestRender() : typeof e._render == "function" && e._render(e._cfg);
1998
2009
  }));
1999
2010
  }
2000
- function re(e, t, n) {
2011
+ function ne(e, t, n) {
2001
2012
  if (typeof e == "string")
2002
2013
  return document.createTextNode(e);
2003
2014
  if (e.tag === "#text") {
2004
2015
  const p = document.createTextNode(
2005
2016
  typeof e.children == "string" ? e.children : ""
2006
2017
  );
2007
- return e.key != null && ne(p, e.key), p;
2018
+ return e.key != null && te(p, e.key), p;
2008
2019
  }
2009
2020
  if (e.tag === "#raw") {
2010
2021
  const p = typeof e.children == "string" ? e.children : "";
@@ -2012,22 +2023,22 @@ function re(e, t, n) {
2012
2023
  }
2013
2024
  if (e.tag === "#anchor") {
2014
2025
  const p = e, v = Array.isArray(p.children) ? p.children : [], f = document.createTextNode(""), h = document.createTextNode("");
2015
- p.key != null && (ne(f, `${p.key}:start`), ne(h, `${p.key}:end`)), p._startNode = f, p._endNode = h;
2026
+ p.key != null && (te(f, `${p.key}:start`), te(h, `${p.key}:end`)), p._startNode = f, p._endNode = h;
2016
2027
  const d = document.createDocumentFragment();
2017
2028
  d.appendChild(f);
2018
2029
  for (const u of v) {
2019
- const g = re(u, t);
2030
+ const g = ne(u, t);
2020
2031
  if (p.key != null && g instanceof Element && !g.hasAttribute("data-anchor-key")) {
2021
2032
  const w = u;
2022
- w && typeof w == "object" && w.key != null || ne(g, p.key);
2033
+ w && typeof w == "object" && w.key != null || te(g, p.key);
2023
2034
  }
2024
2035
  d.appendChild(g);
2025
2036
  }
2026
2037
  return d.appendChild(h), d;
2027
2038
  }
2028
2039
  const r = document.createElement(e.tag);
2029
- e.key != null && ne(r, e.key), e.props && e.props._transitionGroup && An(r, e.props._transitionGroup);
2030
- const { props: i = {}, attrs: o = {}, directives: s = {} } = e.props ?? {}, c = Qt(s, t, r, o), a = {
2040
+ e.key != null && te(r, e.key), e.props && e.props._transitionGroup && jn(r, e.props._transitionGroup);
2041
+ const { props: i = {}, attrs: o = {}, directives: s = {} } = e.props ?? {}, c = nn(s, t, r, o), a = {
2031
2042
  ...i,
2032
2043
  ...c.props
2033
2044
  }, l = {
@@ -2035,7 +2046,7 @@ function re(e, t, n) {
2035
2046
  ...c.attrs
2036
2047
  };
2037
2048
  try {
2038
- const p = (l && l.class) ?? (a && a.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), v = X(p);
2049
+ const p = (l && l.class) ?? (a && a.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), v = Y(p);
2039
2050
  if (v !== null) {
2040
2051
  const f = String(v).trim();
2041
2052
  f && r.setAttribute("class", f);
@@ -2043,15 +2054,15 @@ function re(e, t, n) {
2043
2054
  } catch {
2044
2055
  }
2045
2056
  try {
2046
- if (a.disabled !== void 0 && r && oe(r)) {
2057
+ if (a.disabled !== void 0 && r && ie(r)) {
2047
2058
  const p = a.disabled, v = p && typeof p == "object" && "value" in p;
2048
2059
  let f = !1;
2049
2060
  try {
2050
- f = R(p);
2061
+ f = N(p);
2051
2062
  } catch {
2052
2063
  f = !1;
2053
2064
  }
2054
- !v && !f && M(() => {
2065
+ !v && !f && P(() => {
2055
2066
  l.disabled = p, delete a.disabled;
2056
2067
  });
2057
2068
  }
@@ -2062,17 +2073,17 @@ function re(e, t, n) {
2062
2073
  const v = l[p];
2063
2074
  if (typeof p != "string" || /\[object Object\]/.test(p))
2064
2075
  continue;
2065
- const f = typeof v == "object" && v !== null && R(v) || v && typeof v == "object" && "value" in v ? v.value : v;
2076
+ const f = typeof v == "object" && v !== null && N(v) || v && typeof v == "object" && "value" in v ? v.value : v;
2066
2077
  if (typeof f == "boolean")
2067
- f ? r.setAttribute(p, "") : M(() => {
2078
+ f ? r.setAttribute(p, "") : P(() => {
2068
2079
  r.removeAttribute(p);
2069
2080
  });
2070
2081
  else if (f != null) {
2071
- if (p === "disabled" && oe(r)) {
2072
- const h = a.disabled, d = mt(h) ? h : f, u = Se(d);
2073
- M(() => {
2082
+ if (p === "disabled" && ie(r)) {
2083
+ const h = a.disabled, d = vt(h) ? h : f, u = Se(d);
2084
+ P(() => {
2074
2085
  r.disabled = u;
2075
- }), M(u ? () => {
2086
+ }), P(u ? () => {
2076
2087
  r.setAttribute(p, "");
2077
2088
  } : () => {
2078
2089
  r.removeAttribute(p);
@@ -2083,33 +2094,33 @@ function re(e, t, n) {
2083
2094
  try {
2084
2095
  r instanceof HTMLProgressElement ? r.value = Number(f) : r.value = f ?? "";
2085
2096
  } catch {
2086
- const d = X(f);
2097
+ const d = Y(f);
2087
2098
  d !== null && r.setAttribute(p, d);
2088
2099
  }
2089
2100
  else if (!m && p === "checked" && r instanceof HTMLInputElement)
2090
2101
  try {
2091
2102
  r.checked = !!f;
2092
2103
  } catch {
2093
- const d = X(f);
2104
+ const d = Y(f);
2094
2105
  d !== null && r.setAttribute(p, d);
2095
2106
  }
2096
2107
  else if (!m && p in r)
2097
2108
  try {
2098
- r[p] = f, p === "disabled" && f === !1 && oe(r) && r.removeAttribute("disabled");
2109
+ r[p] = f, p === "disabled" && f === !1 && ie(r) && r.removeAttribute("disabled");
2099
2110
  } catch {
2100
- const d = X(f);
2111
+ const d = Y(f);
2101
2112
  d !== null && r.setAttribute(p, d);
2102
2113
  }
2103
2114
  else if ((e.props?.isCustomElement ?? !1) && !m && p.includes("-")) {
2104
- const d = xt(p);
2115
+ const d = Ct(p);
2105
2116
  try {
2106
2117
  r[d] = f;
2107
2118
  } catch {
2108
- const g = X(f);
2119
+ const g = Y(f);
2109
2120
  g !== null && r.setAttribute(p, g);
2110
2121
  }
2111
2122
  } else {
2112
- const d = X(f);
2123
+ const d = Y(f);
2113
2124
  d !== null && r.setAttribute(p, d);
2114
2125
  }
2115
2126
  }
@@ -2119,11 +2130,11 @@ function re(e, t, n) {
2119
2130
  if (!(typeof p != "string" || /\[object Object\]/.test(p)))
2120
2131
  if (p === "value" && (r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement)) {
2121
2132
  const f = typeof v == "object" && v !== null && typeof v.value < "u" ? v.value : v;
2122
- M(() => {
2133
+ P(() => {
2123
2134
  r.value = f ?? "";
2124
2135
  });
2125
2136
  } else if (p.startsWith("on") && typeof v == "function") {
2126
- const f = Yt(p), h = f.includes(":") ? (() => {
2137
+ const f = tn(p), h = f.includes(":") ? (() => {
2127
2138
  const d = f.split(":"), u = d[1];
2128
2139
  if (u.includes("-")) {
2129
2140
  const g = u.split("-").map(
@@ -2135,17 +2146,17 @@ function re(e, t, n) {
2135
2146
  return `${d[0]}:${g}`;
2136
2147
  }
2137
2148
  })() : f;
2138
- c.listeners && (c.listeners[f] || c.listeners[h]) || ce.addListener(r, f, v);
2149
+ c.listeners && (c.listeners[f] || c.listeners[h]) || ae.addListener(r, f, v);
2139
2150
  } else {
2140
2151
  if (p.startsWith("on") && v === void 0)
2141
2152
  continue;
2142
2153
  if (v == null || v === !1)
2143
2154
  r.removeAttribute(p);
2144
2155
  else {
2145
- const f = e.props?.isCustomElement ?? !1, h = typeof v == "object" && v !== null && R(v) ? v : typeof v == "object" && v !== null && typeof v.value < "u" ? v.value : v;
2156
+ const f = e.props?.isCustomElement ?? !1, h = typeof v == "object" && v !== null && N(v) ? v : typeof v == "object" && v !== null && typeof v.value < "u" ? v.value : v;
2146
2157
  if (p === "class" || p === "style") {
2147
2158
  try {
2148
- const d = X(h);
2159
+ const d = Y(h);
2149
2160
  d !== null && r.setAttribute(p, d);
2150
2161
  } catch {
2151
2162
  }
@@ -2153,12 +2164,12 @@ function re(e, t, n) {
2153
2164
  }
2154
2165
  if (f || p in r)
2155
2166
  try {
2156
- const d = typeof v == "object" && v !== null && R(v) ? v : typeof v == "object" && v !== null && typeof v.value < "u" ? v.value : v;
2157
- if (p === "disabled" && oe(r)) {
2167
+ const d = typeof v == "object" && v !== null && N(v) ? v : typeof v == "object" && v !== null && typeof v.value < "u" ? v.value : v;
2168
+ if (p === "disabled" && ie(r)) {
2158
2169
  const u = a.disabled !== void 0 ? a.disabled : d, g = Se(u);
2159
- M(() => {
2170
+ P(() => {
2160
2171
  r.disabled = g;
2161
- }), M(g ? () => {
2172
+ }), P(g ? () => {
2162
2173
  r.setAttribute(p, "");
2163
2174
  } : () => {
2164
2175
  r.removeAttribute(p);
@@ -2182,7 +2193,7 @@ function re(e, t, n) {
2182
2193
  for (const [p, v] of Object.entries(
2183
2194
  c.listeners || {}
2184
2195
  ))
2185
- ce.addListener(r, p, v);
2196
+ ae.addListener(r, p, v);
2186
2197
  const y = {
2187
2198
  ...e,
2188
2199
  props: {
@@ -2202,7 +2213,7 @@ function re(e, t, n) {
2202
2213
  }
2203
2214
  if (Array.isArray(e.children))
2204
2215
  for (const p of e.children)
2205
- r.appendChild(re(p, t, n));
2216
+ r.appendChild(ne(p, t, n));
2206
2217
  else typeof e.children == "string" && (r.textContent = e.children);
2207
2218
  try {
2208
2219
  if (r instanceof HTMLSelectElement && l && l.hasOwnProperty("value"))
@@ -2213,18 +2224,18 @@ function re(e, t, n) {
2213
2224
  } catch {
2214
2225
  }
2215
2226
  try {
2216
- if (oe(r)) {
2227
+ if (ie(r)) {
2217
2228
  const p = a.disabled, v = l.disabled, f = p && typeof p == "object" && "value" in p;
2218
2229
  let h = !1;
2219
2230
  try {
2220
- h = !!R(p);
2231
+ h = !!N(p);
2221
2232
  } catch {
2222
2233
  h = !1;
2223
2234
  }
2224
- const u = h || f || mt(p) ? p : v, g = Se(u);
2225
- M(() => {
2235
+ const u = h || f || vt(p) ? p : v, g = Se(u);
2236
+ P(() => {
2226
2237
  r.disabled = g;
2227
- }), M(g ? () => {
2238
+ }), P(g ? () => {
2228
2239
  r.setAttribute("disabled", "");
2229
2240
  } : () => {
2230
2241
  r.removeAttribute("disabled");
@@ -2234,7 +2245,7 @@ function re(e, t, n) {
2234
2245
  }
2235
2246
  return r;
2236
2247
  }
2237
- function Mn(e, t, n, r, i) {
2248
+ function Dn(e, t, n, r, i) {
2238
2249
  if (typeof n == "string") {
2239
2250
  e.textContent !== n && (e.textContent = n);
2240
2251
  return;
@@ -2243,27 +2254,27 @@ function Mn(e, t, n, r, i) {
2243
2254
  const o = e.childNodes, s = [];
2244
2255
  for (let h = 0; h < o.length; h++)
2245
2256
  s.push(o[h]);
2246
- const c = Array.isArray(t) ? t : [], a = _n(e);
2257
+ const c = Array.isArray(t) ? t : [], a = Tn(e);
2247
2258
  if (a) {
2248
2259
  const h = (w) => typeof w == "string" && w.startsWith("each-") ? w.substring(5) : w, d = [], u = [];
2249
2260
  for (const w of n)
2250
2261
  if (w && w.tag === "#anchor") {
2251
2262
  const k = Array.isArray(w.children) ? w.children : [];
2252
- for (const S of k) {
2263
+ for (const A of k) {
2253
2264
  const C = h(
2254
- S.key || w.key || "unknown"
2265
+ A.key || w.key || "unknown"
2255
2266
  );
2256
- d.push({ ...S, key: C });
2267
+ d.push({ ...A, key: C });
2257
2268
  }
2258
2269
  } else w && d.push({ ...w, key: h(w.key) });
2259
2270
  for (const w of c)
2260
2271
  if (w && w.tag === "#anchor") {
2261
2272
  const k = Array.isArray(w.children) ? w.children : [];
2262
- for (const S of k) {
2273
+ for (const A of k) {
2263
2274
  const C = h(
2264
- S.key || w.key || "unknown"
2275
+ A.key || w.key || "unknown"
2265
2276
  );
2266
- u.push({ ...S, key: C });
2277
+ u.push({ ...A, key: C });
2267
2278
  }
2268
2279
  } else w && u.push({
2269
2280
  ...w,
@@ -2278,19 +2289,19 @@ function Mn(e, t, n, r, i) {
2278
2289
  }
2279
2290
  for (let $ = 0; $ < s.length; $++) {
2280
2291
  const b = s[$];
2281
- let A = Ve(b);
2282
- if (A = h(A), A != null && b instanceof Element && b.nodeType === Node.ELEMENT_NODE) {
2283
- let O = typeof A == "string" && A.includes(":") ? A.substring(0, A.lastIndexOf(":")) : A;
2292
+ let E = Ve(b);
2293
+ if (E = h(E), E != null && b instanceof Element && b.nodeType === Node.ELEMENT_NODE) {
2294
+ let O = typeof E == "string" && E.includes(":") ? E.substring(0, E.lastIndexOf(":")) : E;
2284
2295
  O = String(O), k.set(O, b);
2285
2296
  }
2286
2297
  }
2287
- const S = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map(), _ = s.length > 0;
2298
+ const A = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map(), _ = s.length > 0;
2288
2299
  if (a.moveClass && _)
2289
2300
  for (let $ = 0; $ < s.length; $++) {
2290
2301
  const b = s[$];
2291
2302
  if (b instanceof HTMLElement && b.parentElement) {
2292
- const A = b.getBoundingClientRect();
2293
- C.set(b, A);
2303
+ const E = b.getBoundingClientRect();
2304
+ C.set(b, E);
2294
2305
  }
2295
2306
  }
2296
2307
  const x = [];
@@ -2298,35 +2309,35 @@ function Mn(e, t, n, r, i) {
2298
2309
  let b = $.key;
2299
2310
  if (b == null) continue;
2300
2311
  b = String(b);
2301
- const A = w.get(b);
2312
+ const E = w.get(b);
2302
2313
  let O = k.get(b);
2303
- if (O && A) {
2304
- const j = Me(O, A, $, r);
2305
- S.add(O);
2306
- const E = String(b);
2307
- ne(j, E), x.push({
2314
+ if (O && E) {
2315
+ const j = Me(O, E, $, r);
2316
+ A.add(O);
2317
+ const S = String(b);
2318
+ te(j, S), x.push({
2308
2319
  node: j,
2309
2320
  key: b,
2310
2321
  newVNode: $,
2311
- oldVNode: A,
2322
+ oldVNode: E,
2312
2323
  isNew: !1
2313
2324
  });
2314
2325
  } else {
2315
- O = re($, r), ne(O, b), e.appendChild(O);
2326
+ O = ne($, r), te(O, b), e.appendChild(O);
2316
2327
  const j = _ || a.appear === !0;
2317
- O instanceof HTMLElement && j && Le(O, a).catch((E) => {
2318
- H("Enter transition error:", E);
2328
+ O instanceof HTMLElement && j && Le(O, a).catch((S) => {
2329
+ H("Enter transition error:", S);
2319
2330
  }), x.push({ node: O, key: b, newVNode: $, isNew: !0 });
2320
2331
  }
2321
2332
  }
2322
2333
  const T = [];
2323
2334
  for (let $ = 0; $ < s.length; $++) {
2324
- const b = s[$], A = Ve(b);
2325
- if (!S.has(b) && A != null && b instanceof HTMLElement) {
2326
- const j = tt(b, a).then(() => {
2335
+ const b = s[$], E = Ve(b);
2336
+ if (!A.has(b) && E != null && b instanceof HTMLElement) {
2337
+ const j = rt(b, a).then(() => {
2327
2338
  e.contains(b) && e.removeChild(b);
2328
- }).catch((E) => {
2329
- H("Leave transition error:", E), e.contains(b) && e.removeChild(b);
2339
+ }).catch((S) => {
2340
+ H("Leave transition error:", S), e.contains(b) && e.removeChild(b);
2330
2341
  });
2331
2342
  T.push(j);
2332
2343
  }
@@ -2337,42 +2348,42 @@ function Mn(e, t, n, r, i) {
2337
2348
  b !== $ && e.insertBefore(b, $), $ = b.nextSibling;
2338
2349
  if (a.moveClass && C.size > 0) {
2339
2350
  const b = [];
2340
- for (const { node: A, isNew: O } of x)
2341
- if (!O && A instanceof HTMLElement) {
2342
- const j = C.get(A);
2351
+ for (const { node: E, isNew: O } of x)
2352
+ if (!O && E instanceof HTMLElement) {
2353
+ const j = C.get(E);
2343
2354
  if (j) {
2344
- const E = A.getBoundingClientRect(), P = j.left - E.left, N = j.top - E.top;
2345
- if (P !== 0 || N !== 0) {
2346
- const Y = a.moveClass.split(/\s+/).filter((F) => F);
2347
- b.push({ node: A, deltaX: P, deltaY: N, moveClasses: Y });
2355
+ const S = E.getBoundingClientRect(), M = j.left - S.left, R = j.top - S.top;
2356
+ if (M !== 0 || R !== 0) {
2357
+ const fe = a.moveClass.split(/\s+/).filter((G) => G);
2358
+ b.push({ node: E, deltaX: M, deltaY: R, moveClasses: fe });
2348
2359
  }
2349
2360
  }
2350
2361
  }
2351
2362
  if (b.length > 0) {
2352
- for (const { node: A, deltaX: O, deltaY: j } of b)
2353
- A.style.transform = `translate(${O}px, ${j}px)`, A.style.transitionProperty = "none";
2363
+ for (const { node: E, deltaX: O, deltaY: j } of b)
2364
+ E.style.transform = `translate(${O}px, ${j}px)`, E.style.transitionProperty = "none";
2354
2365
  e.offsetHeight, requestAnimationFrame(() => {
2355
2366
  requestAnimationFrame(() => {
2356
- for (const { node: A, moveClasses: O } of b)
2367
+ for (const { node: E, moveClasses: O } of b)
2357
2368
  for (const j of O)
2358
- A.classList.add(j);
2369
+ E.classList.add(j);
2359
2370
  requestAnimationFrame(() => {
2360
- const A = a.moveClass || "", O = A.match(/duration-(\d+)/), j = O ? `${O[1]}ms` : "300ms", E = A.match(
2371
+ const E = a.moveClass || "", O = E.match(/duration-(\d+)/), j = O ? `${O[1]}ms` : "300ms", S = E.match(
2361
2372
  /ease-(out|in|in-out|linear)/
2362
- ), P = E ? `ease-${E[1]}` : "ease-out";
2363
- for (const { node: N } of b)
2364
- N.style.transition = `transform ${j} ${P}`;
2373
+ ), M = S ? `ease-${S[1]}` : "ease-out";
2374
+ for (const { node: R } of b)
2375
+ R.style.transition = `transform ${j} ${M}`;
2365
2376
  requestAnimationFrame(() => {
2366
- for (const { node: N, moveClasses: Y } of b) {
2367
- N.style.removeProperty("transform");
2368
- const F = () => {
2369
- for (const U of Y)
2370
- N.classList.remove(U);
2371
- N.style.removeProperty("transition"), N.removeEventListener("transitionend", F), N.removeEventListener("transitioncancel", F);
2377
+ for (const { node: R, moveClasses: fe } of b) {
2378
+ R.style.removeProperty("transform");
2379
+ const G = () => {
2380
+ for (const q of fe)
2381
+ R.classList.remove(q);
2382
+ R.style.removeProperty("transition"), R.removeEventListener("transitionend", G), R.removeEventListener("transitioncancel", G);
2372
2383
  };
2373
- N.addEventListener("transitionend", F, {
2384
+ R.addEventListener("transitionend", G, {
2374
2385
  once: !0
2375
- }), N.addEventListener("transitioncancel", F, {
2386
+ }), R.addEventListener("transitioncancel", G, {
2376
2387
  once: !0
2377
2388
  });
2378
2389
  }
@@ -2402,44 +2413,44 @@ function Mn(e, t, n, r, i) {
2402
2413
  u = u.nextSibling;
2403
2414
  }
2404
2415
  function f(h, d, u, g, w, k = !0) {
2405
- const S = [];
2416
+ const A = [];
2406
2417
  let C = h.nextSibling;
2407
2418
  for (; C && C !== d; )
2408
- S.push(C), C = C.nextSibling;
2419
+ A.push(C), C = C.nextSibling;
2409
2420
  const _ = Array.isArray(u) ? u : [];
2410
2421
  if (g.some((T) => T && T.key != null) || _.some((T) => T && T.key != null)) {
2411
2422
  const T = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
2412
2423
  for (const j of _)
2413
2424
  j && j.key != null && T.set(j.key, j);
2414
- for (const j of S) {
2415
- const E = Ve(j);
2416
- E != null && $.set(E, j);
2425
+ for (const j of A) {
2426
+ const S = Ve(j);
2427
+ S != null && $.set(S, j);
2417
2428
  }
2418
- const b = w && w.state === "visible" && _.length === 0 && g.length > 0, A = /* @__PURE__ */ new Set();
2429
+ const b = w && w.state === "visible" && _.length === 0 && g.length > 0, E = /* @__PURE__ */ new Set();
2419
2430
  let O = h.nextSibling;
2420
2431
  for (const j of g) {
2421
- let E;
2432
+ let S;
2422
2433
  if (j.key != null && $.has(j.key)) {
2423
- const P = T.get(j.key);
2424
- E = Me(
2434
+ const M = T.get(j.key);
2435
+ S = Me(
2425
2436
  $.get(j.key),
2426
- P,
2437
+ M,
2427
2438
  j,
2428
2439
  r
2429
- ), A.add(E), w && E instanceof HTMLElement && b && w.appear && Le(E, w).catch((N) => {
2430
- H("Transition enter error (appear):", N);
2431
- }), E !== O && e.contains(E) && e.insertBefore(E, O);
2440
+ ), E.add(S), w && S instanceof HTMLElement && b && w.appear && Le(S, w).catch((R) => {
2441
+ H("Transition enter error (appear):", R);
2442
+ }), S !== O && e.contains(S) && e.insertBefore(S, O);
2432
2443
  } else
2433
- E = re(j, r), e.insertBefore(E, O), A.add(E), w && E instanceof HTMLElement && k && Le(E, w).catch((P) => {
2434
- H("Transition enter error:", P);
2444
+ S = ne(j, r), e.insertBefore(S, O), E.add(S), w && S instanceof HTMLElement && k && Le(S, w).catch((M) => {
2445
+ H("Transition enter error:", M);
2435
2446
  });
2436
- O = E.nextSibling;
2447
+ O = S.nextSibling;
2437
2448
  }
2438
- for (const j of S)
2439
- !A.has(j) && e.contains(j) && (w && j instanceof HTMLElement && k ? tt(j, w).then(() => {
2449
+ for (const j of A)
2450
+ !E.has(j) && e.contains(j) && (w && j instanceof HTMLElement && k ? rt(j, w).then(() => {
2440
2451
  e.contains(j) && e.removeChild(j);
2441
- }).catch((E) => {
2442
- H("Transition leave error:", E), e.contains(j) && e.removeChild(j);
2452
+ }).catch((S) => {
2453
+ H("Transition leave error:", S), e.contains(j) && e.removeChild(j);
2443
2454
  }) : e.removeChild(j));
2444
2455
  } else {
2445
2456
  const T = Math.min(
@@ -2447,21 +2458,21 @@ function Mn(e, t, n, r, i) {
2447
2458
  g.length
2448
2459
  );
2449
2460
  for (let $ = 0; $ < T; $++) {
2450
- const b = _[$], A = g[$], O = Me(S[$], b, A, r);
2451
- O !== S[$] && (e.insertBefore(O, S[$]), e.removeChild(S[$]));
2461
+ const b = _[$], E = g[$], O = Me(A[$], b, E, r);
2462
+ O !== A[$] && (e.insertBefore(O, A[$]), e.removeChild(A[$]));
2452
2463
  }
2453
2464
  for (let $ = T; $ < g.length; $++) {
2454
- const b = re(g[$], r);
2455
- e.insertBefore(b, d), w && b instanceof HTMLElement && k && Le(b, w).catch((A) => {
2456
- H("Transition enter error:", A);
2465
+ const b = ne(g[$], r);
2466
+ e.insertBefore(b, d), w && b instanceof HTMLElement && k && Le(b, w).catch((E) => {
2467
+ H("Transition enter error:", E);
2457
2468
  });
2458
2469
  }
2459
- for (let $ = T; $ < S.length; $++) {
2460
- const b = S[$];
2461
- w && b instanceof HTMLElement && k ? tt(b, w).then(() => {
2470
+ for (let $ = T; $ < A.length; $++) {
2471
+ const b = A[$];
2472
+ w && b instanceof HTMLElement && k ? rt(b, w).then(() => {
2462
2473
  e.contains(b) && e.removeChild(b);
2463
- }).catch((A) => {
2464
- H("Transition leave error:", A), e.contains(b) && e.removeChild(b);
2474
+ }).catch((E) => {
2475
+ H("Transition leave error:", E), e.contains(b) && e.removeChild(b);
2465
2476
  }) : e.removeChild(b);
2466
2477
  }
2467
2478
  }
@@ -2470,30 +2481,30 @@ function Mn(e, t, n, r, i) {
2470
2481
  let d;
2471
2482
  if (h.tag === "#anchor") {
2472
2483
  const u = h.key, g = `${u}:start`, w = `${u}:end`;
2473
- let k = m.get(g), S = m.get(w);
2484
+ let k = m.get(g), A = m.get(w);
2474
2485
  const C = Array.isArray(h.children) ? h.children : [];
2475
- if (k || (k = document.createTextNode(""), ne(k, g)), S || (S = document.createTextNode(""), ne(S, w)), h._startNode = k, h._endNode = S, !e.contains(k) || !e.contains(S)) {
2486
+ if (k || (k = document.createTextNode(""), te(k, g)), A || (A = document.createTextNode(""), te(A, w)), h._startNode = k, h._endNode = A, !e.contains(k) || !e.contains(A)) {
2476
2487
  e.insertBefore(k, p);
2477
2488
  const _ = h._transition, T = !(_ && _.state === "visible" && C.length > 0) || _.appear;
2478
2489
  for (const $ of C) {
2479
- const b = re($, r);
2480
- e.insertBefore(b, p), _ && b instanceof HTMLElement && T && Le(b, _).catch((A) => {
2481
- H("Transition enter error:", A);
2490
+ const b = ne($, r);
2491
+ e.insertBefore(b, p), _ && b instanceof HTMLElement && T && Le(b, _).catch((E) => {
2492
+ H("Transition enter error:", E);
2482
2493
  });
2483
2494
  }
2484
- e.insertBefore(S, p);
2495
+ e.insertBefore(A, p);
2485
2496
  } else {
2486
- const _ = h._transition, T = l.get(u)?._transition, $ = T && T.state !== _?.state, b = _ && _.state === "visible" && C.length > 0 && !$, A = $ || !b || _?.appear === !0;
2497
+ const _ = h._transition, T = l.get(u)?._transition, $ = T && T.state !== _?.state, b = _ && _.state === "visible" && C.length > 0 && !$, E = $ || !b || _?.appear === !0;
2487
2498
  f(
2488
2499
  k,
2489
- S,
2500
+ A,
2490
2501
  l.get(u)?.children,
2491
2502
  C,
2492
2503
  _,
2493
- A
2504
+ E
2494
2505
  );
2495
2506
  }
2496
- v(k, S), p = S.nextSibling;
2507
+ v(k, A), p = A.nextSibling;
2497
2508
  continue;
2498
2509
  }
2499
2510
  if (h.key != null && m.has(h.key)) {
@@ -2506,7 +2517,7 @@ function Mn(e, t, n, r, i) {
2506
2517
  i
2507
2518
  ), y.add(d), d !== p && e.contains(d) && (p && !e.contains(p) && (p = null), e.insertBefore(d, p));
2508
2519
  } else
2509
- d = re(h, r, i), p && !e.contains(p) && (p = null), e.insertBefore(d, p), y.add(d);
2520
+ d = ne(h, r, i), p && !e.contains(p) && (p = null), e.insertBefore(d, p), y.add(d);
2510
2521
  p = d.nextSibling;
2511
2522
  }
2512
2523
  for (let h = 0; h < s.length; h++) {
@@ -2526,11 +2537,11 @@ function Me(e, t, n, r, i) {
2526
2537
  }
2527
2538
  if (n && typeof n != "string" && n.tag === "#anchor") {
2528
2539
  const s = n, c = Array.isArray(s.children) ? s.children : [], a = s._startNode ?? document.createTextNode(""), l = s._endNode ?? document.createTextNode("");
2529
- s.key != null && (ne(a, `${s.key}:start`), ne(l, `${s.key}:end`)), s._startNode = a, s._endNode = l;
2540
+ s.key != null && (te(a, `${s.key}:start`), te(l, `${s.key}:end`)), s._startNode = a, s._endNode = l;
2530
2541
  const m = document.createDocumentFragment();
2531
2542
  m.appendChild(a);
2532
2543
  for (const y of c) {
2533
- const p = re(y, r);
2544
+ const p = ne(y, r);
2534
2545
  m.appendChild(p);
2535
2546
  }
2536
2547
  return m.appendChild(l), e.parentNode?.replaceChild(m, e), a;
@@ -2542,33 +2553,33 @@ function Me(e, t, n, r, i) {
2542
2553
  }
2543
2554
  if (!t || typeof t == "string") {
2544
2555
  we(e, i);
2545
- const s = re(n, r, i);
2556
+ const s = ne(n, r, i);
2546
2557
  return Pe(n, s, i), e.parentNode?.replaceChild(s, e), s;
2547
2558
  }
2548
2559
  if (n.tag === "#anchor") {
2549
2560
  const s = Array.isArray(n.children) ? n.children : [], c = n._startNode ?? document.createTextNode(""), a = n._endNode ?? document.createTextNode("");
2550
- n.key != null && (ne(c, `${n.key}:start`), ne(a, `${n.key}:end`)), n._startNode = c, n._endNode = a;
2561
+ n.key != null && (te(c, `${n.key}:start`), te(a, `${n.key}:end`)), n._startNode = c, n._endNode = a;
2551
2562
  const l = document.createDocumentFragment();
2552
2563
  l.appendChild(c);
2553
2564
  for (const m of s)
2554
- l.appendChild(re(m, r));
2565
+ l.appendChild(ne(m, r));
2555
2566
  return l.appendChild(a), e.parentNode?.replaceChild(l, e), c;
2556
2567
  }
2557
2568
  if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && t.key === n.key) {
2558
2569
  const s = e;
2559
- return Ot(s, t.props || {}, n.props || {}, r), Mn(s, t.children, n.children, r, i), Pe(n, s, i), s;
2570
+ return Mt(s, t.props || {}, n.props || {}, r), Dn(s, t.children, n.children, r, i), Pe(n, s, i), s;
2560
2571
  }
2561
2572
  if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && (t.tag && String(t.tag).includes("-") || n.props && n.props.isCustomElement || t.props && t.props.isCustomElement))
2562
2573
  try {
2563
2574
  const c = e;
2564
- return Ot(c, t.props || {}, n.props || {}, r), Pe(n, c, i), c;
2575
+ return Mt(c, t.props || {}, n.props || {}, r), Pe(n, c, i), c;
2565
2576
  } catch {
2566
2577
  }
2567
2578
  we(e, i);
2568
- const o = re(n, r, i);
2579
+ const o = ne(n, r, i);
2569
2580
  return Pe(n, o, i), e.parentNode?.replaceChild(o, e), o;
2570
2581
  }
2571
- function Nn(e, t, n, r) {
2582
+ function Hn(e, t, n, r) {
2572
2583
  let i;
2573
2584
  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 = {
2574
2585
  tag: "div",
@@ -2577,10 +2588,10 @@ function Nn(e, t, n, r) {
2577
2588
  attrs: { "data-anchor-block-root": "", key: "__anchor_root__" }
2578
2589
  },
2579
2590
  children: [i]
2580
- }), i = yt(i, String(i.key ?? "root"));
2591
+ }), i = wt(i, String(i.key ?? "root"));
2581
2592
  const o = e._prevVNode ?? null, s = e._prevDom ?? e.firstChild ?? null;
2582
2593
  let c;
2583
- o && s ? typeof o != "string" && typeof i != "string" && o.tag === i.tag && o.key === i.key ? c = Me(s, o, i, n, r) : (c = re(i, n, r), e.replaceChild(c, s)) : (c = re(i, n, r), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
2594
+ o && s ? typeof o != "string" && typeof i != "string" && o.tag === i.tag && o.key === i.key ? c = Me(s, o, i, n, r) : (c = ne(i, n, r), e.replaceChild(c, s)) : (c = ne(i, n, r), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
2584
2595
  const a = [];
2585
2596
  for (let l = 0; l < e.childNodes.length; l++) {
2586
2597
  const m = e.childNodes[l];
@@ -2588,36 +2599,36 @@ function Nn(e, t, n, r) {
2588
2599
  }
2589
2600
  a.forEach((l) => e.removeChild(l)), e._prevVNode = i, e._prevDom = c;
2590
2601
  }
2591
- function nt(e) {
2602
+ function it(e) {
2592
2603
  if (typeof e == "string") return Ue(e);
2593
2604
  if (e.tag === "#text")
2594
2605
  return typeof e.children == "string" ? Ue(e.children) : "";
2595
2606
  if (e.tag === "#anchor")
2596
- return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(nt).join("");
2607
+ return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(it).join("");
2597
2608
  if (e.tag === "#raw")
2598
2609
  return typeof e.children == "string" ? e.children : "";
2599
2610
  let t = "";
2600
2611
  e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([r, i]) => ` ${r}="${Ue(String(i))}"`).join(""));
2601
- const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(nt).join("") : typeof e.children == "string" ? Ue(e.children) : e.children ? nt(e.children) : "";
2612
+ const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(it).join("") : typeof e.children == "string" ? Ue(e.children) : e.children ? it(e.children) : "";
2602
2613
  return `<${e.tag}${t}>${n}</${e.tag}>`;
2603
2614
  }
2604
- function Rn(e, ...t) {
2615
+ function Fn(e, ...t) {
2605
2616
  let n = "";
2606
2617
  for (let r = 0; r < e.length; r++)
2607
2618
  n += e[r], r < t.length && (n += t[r]);
2608
2619
  return n;
2609
2620
  }
2610
- function en(e) {
2621
+ function rn(e) {
2611
2622
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
2612
2623
  }
2613
2624
  let Ze = null;
2614
- function Pt() {
2615
- return Ze || (Ze = new CSSStyleSheet(), Ze.replaceSync(en(Hn))), Ze;
2625
+ function Nt() {
2626
+ return Ze || (Ze = new CSSStyleSheet(), Ze.replaceSync(rn(In))), Ze;
2616
2627
  }
2617
- function Dn(e) {
2628
+ function Wn(e) {
2618
2629
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
2619
2630
  }
2620
- const Hn = Rn`
2631
+ const In = Fn`
2621
2632
  :host,
2622
2633
  *,
2623
2634
  ::before,
@@ -2730,7 +2741,7 @@ const Hn = Rn`
2730
2741
  [hidden] {
2731
2742
  display: none;
2732
2743
  }
2733
- `, Fn = {
2744
+ `, zn = {
2734
2745
  // Existing semantic colors
2735
2746
  neutral: {
2736
2747
  50: "#fafafa",
@@ -2828,8 +2839,8 @@ const Hn = Rn`
2828
2839
  black: { DEFAULT: "#000000" },
2829
2840
  transparent: { DEFAULT: "transparent" },
2830
2841
  current: { DEFAULT: "currentColor" }
2831
- }, tn = Object.fromEntries(
2832
- Object.entries(Fn).map(([e, t]) => [
2842
+ }, on = Object.fromEntries(
2843
+ Object.entries(zn).map(([e, t]) => [
2833
2844
  e,
2834
2845
  Object.fromEntries(
2835
2846
  Object.entries(t).map(([n, r]) => [
@@ -2838,7 +2849,7 @@ const Hn = Rn`
2838
2849
  ])
2839
2850
  )
2840
2851
  ])
2841
- ), me = "0.25rem", In = {
2852
+ ), me = "0.25rem", Bn = {
2842
2853
  "3xs": 64,
2843
2854
  "2xs": 72,
2844
2855
  xs: 80,
@@ -2852,7 +2863,7 @@ const Hn = Rn`
2852
2863
  "5xl": 256,
2853
2864
  "6xl": 288,
2854
2865
  "7xl": 320
2855
- }, rt = {
2866
+ }, ot = {
2856
2867
  m: ["margin"],
2857
2868
  mx: ["margin-inline"],
2858
2869
  my: ["margin-block"],
@@ -2883,7 +2894,7 @@ const Hn = Rn`
2883
2894
  gap: ["gap"],
2884
2895
  "gap-x": ["column-gap"],
2885
2896
  "gap-y": ["row-gap"]
2886
- }, Wn = () => {
2897
+ }, Un = () => {
2887
2898
  const e = {};
2888
2899
  e["@container"] = "container-type:inline-size;", [
2889
2900
  "block",
@@ -3137,7 +3148,7 @@ const Hn = Rn`
3137
3148
  "mx-auto": "margin-inline:auto;",
3138
3149
  "my-auto": "margin-block:auto;"
3139
3150
  });
3140
- for (const [a, l] of Object.entries(In))
3151
+ for (const [a, l] of Object.entries(Bn))
3141
3152
  e[`max-w-${a}`] = `max-width:calc(${me} * ${l});`, e[`min-w-${a}`] = `min-width:calc(${me} * ${l});`, e[`w-${a}`] = `width:calc(${me} * ${l});`, e[`max-h-${a}`] = `max-height:calc(${me} * ${l});`, e[`min-h-${a}`] = `min-height:calc(${me} * ${l});`, e[`h-${a}`] = `height:calc(${me} * ${l});`;
3142
3153
  Object.assign(e, {
3143
3154
  transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
@@ -3255,8 +3266,8 @@ const Hn = Rn`
3255
3266
  "bg-conic-at-l": "background-image:conic-gradient(from 0deg at left, var(--ce-gradient-stops));",
3256
3267
  "bg-conic-at-tl": "background-image:conic-gradient(from 0deg at top left, var(--ce-gradient-stops));"
3257
3268
  }), e;
3258
- }, it = Wn();
3259
- function ie(e, t) {
3269
+ }, st = Un();
3270
+ function re(e, t) {
3260
3271
  let n = 0;
3261
3272
  for (let r = 0; r < e.length; r++) {
3262
3273
  const i = e[r];
@@ -3267,21 +3278,21 @@ function ie(e, t) {
3267
3278
  }
3268
3279
  return e + t;
3269
3280
  }
3270
- const zn = {
3281
+ const qn = {
3271
3282
  before: (e, t) => `${e}::before{${t}}`,
3272
3283
  after: (e, t) => `${e}::after{${t}}`,
3273
- hover: (e, t) => `${ie(e, ":hover")}{${t}}`,
3274
- focus: (e, t) => `${ie(e, ":focus")}{${t}}`,
3275
- active: (e, t) => `${ie(e, ":active")}{${t}}`,
3276
- disabled: (e, t) => `${ie(e, ":disabled")}{${t}}`,
3277
- visited: (e, t) => `${ie(e, ":visited")}{${t}}`,
3278
- checked: (e, t) => `${ie(e, ":checked")}{${t}}`,
3279
- first: (e, t) => `${ie(e, ":first-child")}{${t}}`,
3280
- last: (e, t) => `${ie(e, ":last-child")}{${t}}`,
3281
- odd: (e, t) => `${ie(e, ":nth-child(odd)")}{${t}}`,
3282
- even: (e, t) => `${ie(e, ":nth-child(even)")}{${t}}`,
3283
- "focus-within": (e, t) => `${ie(e, ":focus-within")}{${t}}`,
3284
- "focus-visible": (e, t) => `${ie(e, ":focus-visible")}{${t}}`,
3284
+ hover: (e, t) => `${re(e, ":hover")}{${t}}`,
3285
+ focus: (e, t) => `${re(e, ":focus")}{${t}}`,
3286
+ active: (e, t) => `${re(e, ":active")}{${t}}`,
3287
+ disabled: (e, t) => `${re(e, ":disabled")}{${t}}`,
3288
+ visited: (e, t) => `${re(e, ":visited")}{${t}}`,
3289
+ checked: (e, t) => `${re(e, ":checked")}{${t}}`,
3290
+ first: (e, t) => `${re(e, ":first-child")}{${t}}`,
3291
+ last: (e, t) => `${re(e, ":last-child")}{${t}}`,
3292
+ odd: (e, t) => `${re(e, ":nth-child(odd)")}{${t}}`,
3293
+ even: (e, t) => `${re(e, ":nth-child(even)")}{${t}}`,
3294
+ "focus-within": (e, t) => `${re(e, ":focus-within")}{${t}}`,
3295
+ "focus-visible": (e, t) => `${re(e, ":focus-visible")}{${t}}`,
3285
3296
  "group-hover": (e, t) => `.group:hover ${e}{${t}}`,
3286
3297
  "group-focus": (e, t) => `.group:focus ${e}{${t}}`,
3287
3298
  "group-active": (e, t) => `.group:active ${e}{${t}}`,
@@ -3290,14 +3301,14 @@ const zn = {
3290
3301
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
3291
3302
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
3292
3303
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
3293
- }, ot = {
3304
+ }, at = {
3294
3305
  sm: "(min-width:640px)",
3295
3306
  md: "(min-width:768px)",
3296
3307
  lg: "(min-width:1024px)",
3297
3308
  xl: "(min-width:1280px)",
3298
3309
  "2xl": "(min-width:1536px)",
3299
3310
  dark: "(prefers-color-scheme: dark)"
3300
- }, Mt = {
3311
+ }, Rt = {
3301
3312
  xs: "(min-width:20rem)",
3302
3313
  sm: "(min-width:24rem)",
3303
3314
  md: "(min-width:28rem)",
@@ -3309,7 +3320,7 @@ const zn = {
3309
3320
  "5xl": "(min-width:64rem)",
3310
3321
  "6xl": "(min-width:72rem)",
3311
3322
  "7xl": "(min-width:80rem)"
3312
- }, st = ["sm", "md", "lg", "xl", "2xl"], at = [
3323
+ }, ct = ["sm", "md", "lg", "xl", "2xl"], lt = [
3313
3324
  "xs",
3314
3325
  "sm",
3315
3326
  "md",
@@ -3322,24 +3333,24 @@ const zn = {
3322
3333
  "6xl",
3323
3334
  "7xl"
3324
3335
  ];
3325
- function ct(e) {
3336
+ function ut(e) {
3326
3337
  const t = e.startsWith("-"), n = t ? e.slice(1) : e, r = n.lastIndexOf("-");
3327
3338
  if (r === -1) return null;
3328
3339
  const i = n.slice(0, r), o = n.slice(r + 1);
3329
- if (!rt[i]) return null;
3340
+ if (!ot[i]) return null;
3330
3341
  if (o.includes("/")) {
3331
3342
  const [a, l] = o.split("/").map((y) => parseFloat(y));
3332
3343
  if (Number.isNaN(a) || Number.isNaN(l) || l === 0)
3333
3344
  return null;
3334
3345
  const m = a / l * 100;
3335
- return rt[i].map((y) => `${y}:${m}%;`).join("");
3346
+ return ot[i].map((y) => `${y}:${m}%;`).join("");
3336
3347
  }
3337
3348
  const s = parseFloat(o);
3338
3349
  if (Number.isNaN(s)) return null;
3339
3350
  const c = t ? "-" : "";
3340
- return rt[i].map((a) => `${a}:calc(${c}${me} * ${s});`).join("");
3351
+ return ot[i].map((a) => `${a}:calc(${c}${me} * ${s});`).join("");
3341
3352
  }
3342
- function lt(e) {
3353
+ function ft(e) {
3343
3354
  const t = e.startsWith("-"), r = (t ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
3344
3355
  if (!r) return null;
3345
3356
  const [, i, o] = r, s = i === "x";
@@ -3357,11 +3368,11 @@ function lt(e) {
3357
3368
  const l = `calc(${t ? "-" : ""}${me} * ${c})`;
3358
3369
  return s ? `--ce-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${l} * calc(1 - var(--ce-space-x-reverse)));margin-inline-end:calc(${l} * var(--ce-space-x-reverse));}` : `--ce-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${l} * calc(1 - var(--ce-space-y-reverse)));margin-bottom:calc(${l} * var(--ce-space-y-reverse));}`;
3359
3370
  }
3360
- function Nt(e) {
3371
+ function Dt(e) {
3361
3372
  const t = e.replace("#", ""), n = parseInt(t, 16);
3362
3373
  return `${n >> 16 & 255} ${n >> 8 & 255} ${n & 255}`;
3363
3374
  }
3364
- const Bn = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Un = {
3375
+ const Kn = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Vn = {
3365
3376
  bg: "background-color",
3366
3377
  decoration: "text-decoration-color",
3367
3378
  text: "color",
@@ -3372,36 +3383,36 @@ const Bn = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
3372
3383
  fill: "fill",
3373
3384
  stroke: "stroke"
3374
3385
  };
3375
- function qn(e) {
3376
- const t = Bn.exec(e);
3386
+ function Zn(e) {
3387
+ const t = Kn.exec(e);
3377
3388
  if (!t) return null;
3378
- const [, n, r, i = "DEFAULT"] = t, o = tn[r]?.[i];
3389
+ const [, n, r, i = "DEFAULT"] = t, o = on[r]?.[i];
3379
3390
  if (!o) return null;
3380
3391
  if (n === "shadow") return `--ce-shadow-color:${o};`;
3381
- const s = Un[n];
3392
+ const s = Vn[n];
3382
3393
  return s ? `${s}:${o};` : null;
3383
3394
  }
3384
- function Kn(e) {
3395
+ function Gn(e) {
3385
3396
  const t = e.indexOf("/");
3386
3397
  if (t === -1) return { base: e };
3387
3398
  const n = e.slice(0, t), r = e.slice(t + 1), i = parseInt(r, 10);
3388
3399
  return isNaN(i) || i < 0 || i > 100 ? { base: n } : { base: n, opacity: i / 100 };
3389
3400
  }
3390
- function ut(e) {
3391
- const { base: t, opacity: n } = Kn(e), r = qn(t);
3401
+ function dt(e) {
3402
+ const { base: t, opacity: n } = Gn(e), r = Zn(t);
3392
3403
  if (r && n !== void 0) {
3393
3404
  const o = /#([0-9a-f]{6})/i.exec(r);
3394
3405
  if (o) {
3395
- const s = Nt(o[0]);
3406
+ const s = Dt(o[0]);
3396
3407
  return r.replace(/#([0-9a-f]{6})/i, `rgb(${s} / ${n})`);
3397
3408
  }
3398
3409
  }
3399
3410
  if (r) return r;
3400
- const i = Xe(t);
3411
+ const i = Ye(t);
3401
3412
  if (i && n !== void 0) {
3402
3413
  const o = /#([0-9a-f]{6})/i.exec(i);
3403
3414
  if (o) {
3404
- const s = Nt(o[0]);
3415
+ const s = Dt(o[0]);
3405
3416
  return i.replace(
3406
3417
  /#([0-9a-f]{6})/i,
3407
3418
  `rgb(${s} / ${n})`
@@ -3410,10 +3421,10 @@ function ut(e) {
3410
3421
  }
3411
3422
  return i;
3412
3423
  }
3413
- function ft(e) {
3424
+ function pt(e) {
3414
3425
  const t = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
3415
3426
  if (!t) return null;
3416
- const [, n, r, i = "DEFAULT"] = t, o = tn[r]?.[i];
3427
+ const [, n, r, i = "DEFAULT"] = t, o = on[r]?.[i];
3417
3428
  if (!o) return null;
3418
3429
  switch (n) {
3419
3430
  case "from":
@@ -3426,13 +3437,13 @@ function ft(e) {
3426
3437
  return null;
3427
3438
  }
3428
3439
  }
3429
- function dt(e) {
3440
+ function ht(e) {
3430
3441
  const t = /^opacity-(\d{1,3})$/.exec(e);
3431
3442
  if (!t) return null;
3432
3443
  const n = parseInt(t[1], 10);
3433
3444
  return n < 0 || n > 100 ? null : `opacity:${n / 100};`;
3434
3445
  }
3435
- function Xe(e) {
3446
+ function Ye(e) {
3436
3447
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
3437
3448
  const s = e.slice(1, -1).trim(), c = s.indexOf(":");
3438
3449
  if (c === -1) return null;
@@ -3493,7 +3504,7 @@ function Xe(e) {
3493
3504
  const o = i[n] ?? n.replace(/_/g, "-");
3494
3505
  return o && r ? `${o}:${r};` : null;
3495
3506
  }
3496
- function Vn(e) {
3507
+ function Jn(e) {
3497
3508
  if (e.startsWith("[") && e.endsWith("]")) {
3498
3509
  const n = e.slice(1, -1);
3499
3510
  return n.includes("&") ? n : e;
@@ -3505,10 +3516,10 @@ function Vn(e) {
3505
3516
  }
3506
3517
  return null;
3507
3518
  }
3508
- function Rt(e) {
3519
+ function Ht(e) {
3509
3520
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
3510
3521
  }
3511
- function Zn(e) {
3522
+ function Xn(e) {
3512
3523
  const t = /class\s*=\s*(['"])([\s\S]*?)\1/g, n = [];
3513
3524
  let r;
3514
3525
  for (; r = t.exec(e); ) {
@@ -3517,12 +3528,12 @@ function Zn(e) {
3517
3528
  }
3518
3529
  return n;
3519
3530
  }
3520
- const Oe = /* @__PURE__ */ new Map(), Gn = 16, Dt = 1e3;
3521
- function nn(e) {
3531
+ const Oe = /* @__PURE__ */ new Map(), Yn = 16, Ft = 1e3;
3532
+ function sn(e) {
3522
3533
  const t = Date.now(), n = Oe.get(e);
3523
- if (n && t - n.timestamp < Gn)
3534
+ if (n && t - n.timestamp < Yn)
3524
3535
  return n.css;
3525
- const r = Zn(e);
3536
+ const r = Xn(e);
3526
3537
  if (!r.length) return "";
3527
3538
  const i = new Set(r), o = [[], [], [], []], s = {}, c = (h, d = !1) => {
3528
3539
  const u = d ? `dark|${h}` : h;
@@ -3530,8 +3541,8 @@ function nn(e) {
3530
3541
  const g = y(h, d);
3531
3542
  return s[u] = g, g;
3532
3543
  }, a = (h) => {
3533
- const d = h.some((w) => st.includes(w)), u = h.some(
3534
- (w) => w.startsWith("@") && (at.includes(w.slice(1)) || w.match(/^@\[.+\]$/))
3544
+ const d = h.some((w) => ct.includes(w)), u = h.some(
3545
+ (w) => w.startsWith("@") && (lt.includes(w.slice(1)) || w.match(/^@\[.+\]$/))
3535
3546
  ), g = h.includes("dark");
3536
3547
  return h.length ? !d && !g && !u ? 1 : g && (d || u) ? 3 : 2 : 0;
3537
3548
  }, l = (h) => {
@@ -3560,122 +3571,122 @@ function nn(e) {
3560
3571
  let g = "", w = !1;
3561
3572
  for (const L of u) {
3562
3573
  let W = L;
3563
- if (W.startsWith("!") && (w = !0, W = W.slice(1)), it[W] || ct(W) || lt(W) || dt(W) || ut(W) || ft(W) || Xe(W)) {
3574
+ if (W.startsWith("!") && (w = !0, W = W.slice(1)), st[W] || ut(W) || ft(W) || ht(W) || dt(W) || pt(W) || Ye(W)) {
3564
3575
  g = L;
3565
3576
  break;
3566
3577
  }
3567
3578
  }
3568
3579
  if (!g) return null;
3569
- const k = g.replace(/^!/, ""), S = it[k] ?? ct(k) ?? lt(k) ?? dt(k) ?? ut(k) ?? ft(k) ?? Xe(k);
3570
- if (!S) return null;
3580
+ const k = g.replace(/^!/, ""), A = st[k] ?? ut(k) ?? ft(k) ?? ht(k) ?? dt(k) ?? pt(k) ?? Ye(k);
3581
+ if (!A) return null;
3571
3582
  const C = u.indexOf(g);
3572
3583
  let _ = C >= 0 ? u.slice(0, C) : [];
3573
3584
  d && (_ = _.filter((L) => L !== "dark"));
3574
- const x = `.${Rt(h)}`, T = w ? S.replace(/;/g, " !important;") : S, $ = "__SUBJECT__";
3585
+ const x = `.${Ht(h)}`, T = w ? A.replace(/;/g, " !important;") : A, $ = "__SUBJECT__";
3575
3586
  let b = $;
3576
- const A = [];
3587
+ const E = [];
3577
3588
  for (const L of _)
3578
- L.startsWith("group-") ? (b = `.group:${L.slice(6)} ${b}`, A.push(L)) : L.startsWith("peer-") && (b = b.replace(
3589
+ L.startsWith("group-") ? (b = `.group:${L.slice(6)} ${b}`, E.push(L)) : L.startsWith("peer-") && (b = b.replace(
3579
3590
  $,
3580
3591
  `.peer:${L.slice(5)}~${$}`
3581
- ), A.push(L));
3582
- _ = _.filter((L) => !A.includes(L));
3592
+ ), E.push(L));
3593
+ _ = _.filter((L) => !E.includes(L));
3583
3594
  const O = [], j = [];
3584
- let E = null;
3595
+ let S = null;
3585
3596
  for (const L of _) {
3586
- if (L === "dark" || st.includes(L) || L.startsWith("@") && (at.includes(L.slice(1)) || L.match(/^@\[.+\]$/)))
3597
+ if (L === "dark" || ct.includes(L) || L.startsWith("@") && (lt.includes(L.slice(1)) || L.match(/^@\[.+\]$/)))
3587
3598
  continue;
3588
- const W = Vn(L);
3599
+ const W = Jn(L);
3589
3600
  if (W) {
3590
- E = W;
3601
+ S = W;
3591
3602
  continue;
3592
3603
  }
3593
- const Z = m[L];
3594
- if (Z) {
3595
- E ? j.push(Z) : O.push(Z);
3604
+ const V = m[L];
3605
+ if (V) {
3606
+ S ? j.push(V) : O.push(V);
3596
3607
  continue;
3597
3608
  }
3598
- const B = zn[L];
3599
- typeof B == "function" && (b = B(b, T).split("{")[0]);
3609
+ const z = qn[L];
3610
+ typeof z == "function" && (b = z(b, T).split("{")[0]);
3600
3611
  }
3601
- const P = O.join(""), N = j.join("");
3602
- function Y(L, W) {
3612
+ const M = O.join(""), R = j.join("");
3613
+ function fe(L, W) {
3603
3614
  if (!W) return L;
3604
- let Z = 0, B = 0;
3615
+ let V = 0, z = 0;
3605
3616
  if (L.length && (L[0] === ">" || L[0] === "+" || L[0] === "~" || L[0] === " ")) {
3606
- let K = 1;
3607
- for (; K < L.length && L[K] === " "; ) K++;
3608
- for (; K < L.length; K++) {
3609
- const G = L[K];
3610
- if (G === "[" ? Z++ : G === "]" && Z > 0 ? Z-- : G === "(" ? B++ : G === ")" && B > 0 && B--, Z === 0 && B === 0 && (L[K] === ">" || L[K] === "+" || L[K] === "~" || L[K] === " "))
3611
- return L.slice(0, K) + W + L.slice(K);
3617
+ let U = 1;
3618
+ for (; U < L.length && L[U] === " "; ) U++;
3619
+ for (; U < L.length; U++) {
3620
+ const J = L[U];
3621
+ if (J === "[" ? V++ : J === "]" && V > 0 ? V-- : J === "(" ? z++ : J === ")" && z > 0 && z--, V === 0 && z === 0 && (L[U] === ">" || L[U] === "+" || L[U] === "~" || L[U] === " "))
3622
+ return L.slice(0, U) + W + L.slice(U);
3612
3623
  }
3613
3624
  return L + W;
3614
3625
  }
3615
- for (let K = 0; K < L.length; K++) {
3616
- const G = L[K];
3617
- if (G === "[" ? Z++ : G === "]" && Z > 0 ? Z-- : G === "(" ? B++ : G === ")" && B > 0 && B--, Z === 0 && B === 0 && (G === ">" || G === "+" || G === "~" || G === " "))
3618
- return L.slice(0, K) + W + L.slice(K);
3626
+ for (let U = 0; U < L.length; U++) {
3627
+ const J = L[U];
3628
+ if (J === "[" ? V++ : J === "]" && V > 0 ? V-- : J === "(" ? z++ : J === ")" && z > 0 && z--, V === 0 && z === 0 && (J === ">" || J === "+" || J === "~" || J === " "))
3629
+ return L.slice(0, U) + W + L.slice(U);
3619
3630
  }
3620
3631
  return L + W;
3621
3632
  }
3622
- if (E)
3623
- if (E.includes("&")) {
3624
- const L = E.indexOf("&"), W = E.slice(0, L), Z = E.slice(L + 1), B = $ + P;
3633
+ if (S)
3634
+ if (S.includes("&")) {
3635
+ const L = S.indexOf("&"), W = S.slice(0, L), V = S.slice(L + 1), z = $ + M;
3625
3636
  if (O.length === 0)
3626
3637
  b = b.replace(
3627
3638
  $,
3628
- W + B + N + Z
3639
+ W + z + R + V
3629
3640
  );
3630
3641
  else {
3631
- const K = Y(Z, N);
3642
+ const U = fe(V, R);
3632
3643
  b = b.replace(
3633
3644
  $,
3634
- W + B + K
3645
+ W + z + U
3635
3646
  );
3636
3647
  }
3637
3648
  } else
3638
3649
  b = b.replace(
3639
3650
  $,
3640
- `${E}${$ + P}`
3641
- ), N && (b = b.replace($, `${$}${N}`));
3651
+ `${S}${$ + M}`
3652
+ ), R && (b = b.replace($, `${$}${R}`));
3642
3653
  else
3643
3654
  b = b.replace(
3644
3655
  $,
3645
- $ + P + N
3656
+ $ + M + R
3646
3657
  );
3647
3658
  b = b.replace(new RegExp($, "g"), x);
3648
- let F = `${b}{${T}}`;
3649
- const U = _.filter(
3650
- (L) => st.includes(L)
3659
+ let G = `${b}{${T}}`;
3660
+ const q = _.filter(
3661
+ (L) => ct.includes(L)
3651
3662
  ), D = _.filter(
3652
- (L) => L.startsWith("@") && (at.includes(L.slice(1)) || L.match(/^@\[.+\]$/))
3653
- ), V = U.length ? U[U.length - 1] : null, ae = D.length ? D[D.length - 1] : null, xe = _.includes("dark");
3654
- let I = "", le = "";
3655
- if (xe && V ? I = `@media (prefers-color-scheme: dark) and ${ot[V]}` : xe ? I = "@media (prefers-color-scheme: dark)" : V && (I = `@media ${ot[V]}`), ae)
3656
- if (ae.startsWith("@[") && ae.endsWith("]")) {
3657
- const L = ae.slice(2, -1);
3663
+ (L) => L.startsWith("@") && (lt.includes(L.slice(1)) || L.match(/^@\[.+\]$/))
3664
+ ), K = q.length ? q[q.length - 1] : null, se = D.length ? D[D.length - 1] : null, xe = _.includes("dark");
3665
+ let F = "", ce = "";
3666
+ if (xe && K ? F = `@media (prefers-color-scheme: dark) and ${at[K]}` : xe ? F = "@media (prefers-color-scheme: dark)" : K && (F = `@media ${at[K]}`), se)
3667
+ if (se.startsWith("@[") && se.endsWith("]")) {
3668
+ const L = se.slice(2, -1);
3658
3669
  if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(L))
3659
3670
  return null;
3660
- le = `@container (min-width:${L})`;
3671
+ ce = `@container (min-width:${L})`;
3661
3672
  } else {
3662
- const L = ae.slice(1);
3663
- le = `@container ${Mt[L] || `(min-width:${L})`}`;
3673
+ const L = se.slice(1);
3674
+ ce = `@container ${Rt[L] || `(min-width:${L})`}`;
3664
3675
  }
3665
- return I && le ? F = `${I}${le}{${F}}` : I ? F = `${I}{${F}}` : le && (F = `${le}{${F}}`), F;
3676
+ return F && ce ? G = `${F}${ce}{${G}}` : F ? G = `${F}{${G}}` : ce && (G = `${ce}{${G}}`), G;
3666
3677
  };
3667
3678
  for (const h of i) {
3668
3679
  const d = l(h), u = d.find(
3669
- (C) => it[C.replace(/^!/, "")] || ct(C.replace(/^!/, "")) || lt(C.replace(/^!/, "")) || dt(C.replace(/^!/, "")) || ut(C.replace(/^!/, "")) || ft(C.replace(/^!/, "")) || Xe(C.replace(/^!/, ""))
3680
+ (C) => st[C.replace(/^!/, "")] || ut(C.replace(/^!/, "")) || ft(C.replace(/^!/, "")) || ht(C.replace(/^!/, "")) || dt(C.replace(/^!/, "")) || pt(C.replace(/^!/, "")) || Ye(C.replace(/^!/, ""))
3670
3681
  );
3671
3682
  if (!u) continue;
3672
- const g = d.indexOf(u), w = g >= 0 ? d.slice(0, g) : [], k = a(w), S = c(h);
3673
- S && o[k].push(S);
3683
+ const g = d.indexOf(u), w = g >= 0 ? d.slice(0, g) : [], k = a(w), A = c(h);
3684
+ A && o[k].push(A);
3674
3685
  }
3675
3686
  const p = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
3676
3687
  for (const h of i)
3677
3688
  if (p.test(h)) {
3678
- if (o.flat().join("").includes(`.${Rt(h)}`)) continue;
3689
+ if (o.flat().join("").includes(`.${Ht(h)}`)) continue;
3679
3690
  const u = c(h);
3680
3691
  u && o[0].push(u);
3681
3692
  }
@@ -3689,7 +3700,7 @@ function nn(e) {
3689
3700
  "2xl": 1536
3690
3701
  };
3691
3702
  for (const [$, b] of Object.entries(T))
3692
- if (x.includes(`@media ${ot[$]}`)) return b;
3703
+ if (x.includes(`@media ${at[$]}`)) return b;
3693
3704
  return -1;
3694
3705
  }, w = (x) => {
3695
3706
  const T = {
@@ -3717,36 +3728,36 @@ function nn(e) {
3717
3728
  // 80rem
3718
3729
  };
3719
3730
  for (const [$, b] of Object.entries(T))
3720
- if (x.includes(`@container ${Mt[$]}`)) return b;
3731
+ if (x.includes(`@container ${Rt[$]}`)) return b;
3721
3732
  if (x.includes("@container (min-width:")) {
3722
3733
  const $ = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(x);
3723
3734
  if ($) {
3724
- const b = parseFloat($[1]), A = $[2];
3725
- return A === "rem" || A === "em" ? b * 16 : b;
3735
+ const b = parseFloat($[1]), E = $[2];
3736
+ return E === "rem" || E === "em" ? b * 16 : b;
3726
3737
  }
3727
3738
  }
3728
3739
  return -1;
3729
- }, k = g(d), S = g(u), C = w(d), _ = w(u);
3730
- return k >= 0 && S >= 0 && k !== S ? k - S : C >= 0 && _ >= 0 && C !== _ ? C - _ : 0;
3740
+ }, k = g(d), A = g(u), C = w(d), _ = w(u);
3741
+ return k >= 0 && A >= 0 && k !== A ? k - A : C >= 0 && _ >= 0 && C !== _ ? C - _ : 0;
3731
3742
  });
3732
3743
  o[2] = v(o[2]), o[3] = v(o[3]);
3733
3744
  const f = o.flat().join("");
3734
- return Oe.size >= Dt && Array.from(Oe.keys()).slice(
3745
+ return Oe.size >= Ft && Array.from(Oe.keys()).slice(
3735
3746
  0,
3736
- Math.floor(Dt / 2)
3747
+ Math.floor(Ft / 2)
3737
3748
  ).forEach((d) => Oe.delete(d)), Oe.set(e, { css: f, timestamp: t }), f;
3738
3749
  }
3739
- function Qe(e, t) {
3750
+ function et(e, t) {
3740
3751
  const n = "when-block";
3741
- return q(typeof t == "function" ? e ? t() : [] : e ? t : [], n);
3752
+ return B(typeof t == "function" ? e ? t() : [] : e ? t : [], n);
3742
3753
  }
3743
- function hr(e, t) {
3754
+ function br(e, t) {
3744
3755
  return e.map((n, r) => {
3745
3756
  const i = typeof n == "object" ? n?.key ?? n?.id ?? `idx-${r}` : String(n);
3746
- return q(t(n, r), `each-${i}`);
3757
+ return B(t(n, r), `each-${i}`);
3747
3758
  });
3748
3759
  }
3749
- function Jn() {
3760
+ function Qn() {
3750
3761
  const e = [];
3751
3762
  return {
3752
3763
  when(t, n) {
@@ -3756,21 +3767,21 @@ function Jn() {
3756
3767
  return e.push([!0, t]), this;
3757
3768
  },
3758
3769
  done() {
3759
- return Xn(...e);
3770
+ return er(...e);
3760
3771
  }
3761
3772
  };
3762
3773
  }
3763
- function Xn(...e) {
3774
+ function er(...e) {
3764
3775
  for (let t = 0; t < e.length; t++) {
3765
3776
  const [n, r] = e[t];
3766
3777
  if (n) {
3767
3778
  const i = typeof r == "function" ? r() : r;
3768
- return [q(i, `whenChain-branch-${t}`)];
3779
+ return [B(i, `whenChain-branch-${t}`)];
3769
3780
  }
3770
3781
  }
3771
- return [q([], "whenChain-empty")];
3782
+ return [B([], "whenChain-empty")];
3772
3783
  }
3773
- function q(e, t) {
3784
+ function B(e, t) {
3774
3785
  const n = e ? Array.isArray(e) ? e.filter((r) => r != null) : [e].filter((r) => r != null) : [];
3775
3786
  return {
3776
3787
  tag: "#anchor",
@@ -3870,7 +3881,7 @@ const He = {
3870
3881
  leaveTo: "rotate-[90deg] opacity-0"
3871
3882
  }
3872
3883
  };
3873
- function gr(e, t) {
3884
+ function vr(e, t) {
3874
3885
  const {
3875
3886
  preset: n,
3876
3887
  show: r,
@@ -3891,7 +3902,7 @@ function gr(e, t) {
3891
3902
  onEnterCancelled: g,
3892
3903
  onBeforeLeave: w,
3893
3904
  onLeave: k,
3894
- onAfterLeave: S,
3905
+ onAfterLeave: A,
3895
3906
  onLeaveCancelled: C
3896
3907
  } = e;
3897
3908
  let _;
@@ -3903,7 +3914,7 @@ function gr(e, t) {
3903
3914
  leaveActive: v,
3904
3915
  leaveTo: f
3905
3916
  };
3906
- const x = a || (n ? `transition-${n}` : "transition"), T = q(r ? t : [], x);
3917
+ const x = a || (n ? `transition-${n}` : "transition"), T = B(r ? t : [], x);
3907
3918
  return T._transition = {
3908
3919
  name: x,
3909
3920
  classes: _,
@@ -3919,12 +3930,12 @@ function gr(e, t) {
3919
3930
  onEnterCancelled: g,
3920
3931
  onBeforeLeave: w,
3921
3932
  onLeave: k,
3922
- onAfterLeave: S,
3933
+ onAfterLeave: A,
3923
3934
  onLeaveCancelled: C
3924
3935
  }
3925
3936
  }, T;
3926
3937
  }
3927
- function mr(e, t) {
3938
+ function wr(e, t) {
3928
3939
  const {
3929
3940
  tag: n = "div",
3930
3941
  moveClass: r = "transition-transform duration-300",
@@ -3945,7 +3956,7 @@ function mr(e, t) {
3945
3956
  leaveTo: g,
3946
3957
  onBeforeEnter: w,
3947
3958
  onEnter: k,
3948
- onAfterEnter: S,
3959
+ onAfterEnter: A,
3949
3960
  onEnterCancelled: C,
3950
3961
  onBeforeLeave: _,
3951
3962
  onLeave: x,
@@ -3961,37 +3972,37 @@ function mr(e, t) {
3961
3972
  leaveActive: u,
3962
3973
  leaveTo: g
3963
3974
  };
3964
- const A = m || (i ? `transition-group-${i}` : "transition-group"), O = [];
3975
+ const E = m || (i ? `transition-group-${i}` : "transition-group"), O = [];
3965
3976
  for (const j of o ? t : [])
3966
3977
  if (j && typeof j == "object" && j.tag === "#anchor") {
3967
- const E = Array.isArray(j.children) ? j.children : [];
3968
- for (const P of E)
3969
- if (P && typeof P == "object") {
3970
- const N = {
3971
- ...P,
3972
- key: j.key || P.key,
3978
+ const S = Array.isArray(j.children) ? j.children : [];
3979
+ for (const M of S)
3980
+ if (M && typeof M == "object") {
3981
+ const R = {
3982
+ ...M,
3983
+ key: j.key || M.key,
3973
3984
  props: {
3974
- ...P.props,
3985
+ ...M.props,
3975
3986
  _anchorKey: j.key
3976
3987
  // Preserve original anchor key
3977
3988
  }
3978
3989
  };
3979
- O.push(N);
3990
+ O.push(R);
3980
3991
  } else
3981
- O.push(P);
3992
+ O.push(M);
3982
3993
  } else
3983
3994
  O.push(j);
3984
3995
  return {
3985
3996
  tag: n,
3986
3997
  children: O,
3987
- key: A,
3998
+ key: E,
3988
3999
  props: {
3989
4000
  attrs: {
3990
4001
  ...y ? { class: y } : {},
3991
4002
  ...p ? { style: p } : {}
3992
4003
  },
3993
4004
  _transitionGroup: {
3994
- name: A,
4005
+ name: E,
3995
4006
  classes: b,
3996
4007
  moveClass: r,
3997
4008
  mode: s,
@@ -4001,7 +4012,7 @@ function mr(e, t) {
4001
4012
  hooks: {
4002
4013
  onBeforeEnter: w,
4003
4014
  onEnter: k,
4004
- onAfterEnter: S,
4015
+ onAfterEnter: A,
4005
4016
  onEnterCancelled: C,
4006
4017
  onBeforeLeave: _,
4007
4018
  onLeave: x,
@@ -4012,57 +4023,57 @@ function mr(e, t) {
4012
4023
  }
4013
4024
  };
4014
4025
  }
4015
- function yr(e) {
4026
+ function xr(e) {
4016
4027
  return { ...e };
4017
4028
  }
4018
4029
  let Ge = null;
4019
- function bt() {
4030
+ function xt() {
4020
4031
  if (!Ge) {
4021
4032
  const e = [];
4022
4033
  Object.values(He).forEach((r) => {
4023
4034
  r.enterFrom && e.push(r.enterFrom), r.enterActive && e.push(r.enterActive), r.enterTo && e.push(r.enterTo), r.leaveFrom && e.push(r.leaveFrom), r.leaveActive && e.push(r.leaveActive), r.leaveTo && e.push(r.leaveTo);
4024
4035
  });
4025
- const t = `<div class="${e.join(" ")}"></div>`, n = nn(t);
4036
+ const t = `<div class="${e.join(" ")}"></div>`, n = sn(t);
4026
4037
  Ge = new CSSStyleSheet(), Ge.replaceSync(n);
4027
4038
  }
4028
4039
  return Ge;
4029
4040
  }
4030
- function Yn() {
4031
- bt();
4041
+ function tr() {
4042
+ xt();
4032
4043
  }
4033
- Yn();
4044
+ tr();
4034
4045
  const Re = [];
4035
- function Qn(e, t, n, r, i, o, s, c) {
4046
+ function nr(e, t, n, r, i, o, s, c) {
4036
4047
  if (e) {
4037
4048
  Re.push(n);
4038
4049
  try {
4039
4050
  const a = t.render(n);
4040
4051
  if (a instanceof Promise) {
4041
4052
  o(!0), a.then((l) => {
4042
- o(!1), s(null), Ht(e, l, n, r, i), c(e.innerHTML);
4053
+ o(!1), s(null), Wt(e, l, n, r, i), c(e.innerHTML);
4043
4054
  }).catch((l) => {
4044
4055
  o(!1), s(l);
4045
4056
  });
4046
4057
  return;
4047
4058
  }
4048
- Ht(e, a, n, r, i), c(e.innerHTML);
4059
+ Wt(e, a, n, r, i), c(e.innerHTML);
4049
4060
  } finally {
4050
4061
  Re.pop();
4051
4062
  }
4052
4063
  }
4053
4064
  }
4054
- function Ht(e, t, n, r, i) {
4055
- e && (Nn(
4065
+ function Wt(e, t, n, r, i) {
4066
+ e && (Hn(
4056
4067
  e,
4057
4068
  Array.isArray(t) ? t : [t],
4058
4069
  n,
4059
4070
  r
4060
4071
  ), i(e.innerHTML));
4061
4072
  }
4062
- function er(e, t, n, r, i, o, s) {
4073
+ function rr(e, t, n, r, i, o, s) {
4063
4074
  if (o !== null && clearTimeout(o), Date.now() - t < 16) {
4064
4075
  if (i(n + 1), n === 15)
4065
- te(
4076
+ Z(
4066
4077
  `⚠️ Component is re-rendering rapidly. This might indicate:
4067
4078
  Common causes:
4068
4079
  • Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
@@ -4089,7 +4100,7 @@ Stopping runaway component render to prevent browser freeze`
4089
4100
  );
4090
4101
  s(l);
4091
4102
  }
4092
- function tr(e, t, n, r, i) {
4103
+ function ir(e, t, n, r, i) {
4093
4104
  if (!e) return;
4094
4105
  let o = n || "";
4095
4106
  try {
@@ -4107,38 +4118,38 @@ function tr(e, t, n, r, i) {
4107
4118
  }
4108
4119
  } catch {
4109
4120
  }
4110
- const s = nn(o);
4121
+ const s = sn(o);
4111
4122
  if ((!s || s.trim() === "") && !t._computedStyle) {
4112
4123
  i(null), e.adoptedStyleSheets = [
4113
- Pt(),
4114
- bt()
4124
+ Nt(),
4125
+ xt()
4115
4126
  ];
4116
4127
  return;
4117
4128
  }
4118
4129
  let c = "";
4119
4130
  t._computedStyle && (c = t._computedStyle);
4120
- let a = Dn(`${c}
4131
+ let a = Wn(`${c}
4121
4132
  ${s}
4122
4133
  `);
4123
- a = en(a);
4134
+ a = rn(a);
4124
4135
  let l = r;
4125
4136
  l || (l = new CSSStyleSheet()), (l.cssRules.length === 0 || l.cssRules.length > 0 && Array.from(l.cssRules).map((y) => y.cssText).join("") !== a) && l.replaceSync(a), e.adoptedStyleSheets = [
4126
- Pt(),
4127
- bt(),
4137
+ Nt(),
4138
+ xt(),
4128
4139
  l
4129
4140
  ], i(l);
4130
4141
  }
4131
- let z = null;
4132
- function Ft(e) {
4133
- z = e;
4142
+ let I = null;
4143
+ function It(e) {
4144
+ I = e;
4134
4145
  }
4135
- function pt() {
4136
- z = null;
4146
+ function gt() {
4147
+ I = null;
4137
4148
  }
4138
- function br() {
4139
- if (!z)
4149
+ function kr() {
4150
+ if (!I)
4140
4151
  throw new Error("useEmit must be called during component render");
4141
- const e = z.emit;
4152
+ const e = I.emit;
4142
4153
  return (t, n) => e(t, n);
4143
4154
  }
4144
4155
  function je(e) {
@@ -4149,34 +4160,36 @@ function je(e) {
4149
4160
  configurable: !1
4150
4161
  });
4151
4162
  }
4152
- function It(e) {
4153
- if (!z)
4163
+ function zt(e) {
4164
+ if (!I)
4154
4165
  throw new Error("useOnConnected must be called during component render");
4155
- je(z), z._hookCallbacks.onConnected = e;
4166
+ je(I), I._hookCallbacks.onConnected = e;
4156
4167
  }
4157
- function vr(e) {
4158
- if (!z)
4168
+ function Bt(e) {
4169
+ if (!I)
4159
4170
  throw new Error("useOnDisconnected must be called during component render");
4160
- je(z), z._hookCallbacks.onDisconnected = e;
4171
+ je(I), I._hookCallbacks.onDisconnected = e;
4161
4172
  }
4162
- function wr(e) {
4163
- if (!z)
4164
- throw new Error("useOnAttributeChanged must be called during component render");
4165
- je(z), z._hookCallbacks.onAttributeChanged = e;
4173
+ function $r(e) {
4174
+ if (!I)
4175
+ throw new Error(
4176
+ "useOnAttributeChanged must be called during component render"
4177
+ );
4178
+ je(I), I._hookCallbacks.onAttributeChanged = e;
4166
4179
  }
4167
- function xr(e) {
4168
- if (!z)
4180
+ function Cr(e) {
4181
+ if (!I)
4169
4182
  throw new Error("useOnError must be called during component render");
4170
- je(z), z._hookCallbacks.onError = e;
4183
+ je(I), I._hookCallbacks.onError = e;
4171
4184
  }
4172
- function nr(e) {
4173
- if (!z)
4185
+ function or(e) {
4186
+ if (!I)
4174
4187
  throw new Error("useProps must be called during component render");
4175
- je(z), z._hookCallbacks.props = {
4176
- ...z._hookCallbacks.props || {},
4188
+ je(I), I._hookCallbacks.props = {
4189
+ ...I._hookCallbacks.props || {},
4177
4190
  ...e
4178
4191
  };
4179
- const t = z;
4192
+ const t = I;
4180
4193
  try {
4181
4194
  const r = Object.keys(e || {});
4182
4195
  for (const i of r) {
@@ -4192,14 +4205,18 @@ function nr(e) {
4192
4205
  try {
4193
4206
  const a = t && t._host;
4194
4207
  if (a) {
4195
- const l = se(i), m = a.getAttribute(l);
4208
+ const l = oe(i), m = a.getAttribute(l);
4196
4209
  if (m !== null) {
4197
4210
  const y = typeof e[i];
4198
4211
  return y === "boolean" ? m === "" || m === "true" : y === "number" ? Number(m) : m;
4199
4212
  }
4200
4213
  if (typeof a[i] < "u") {
4201
4214
  const y = a[i];
4202
- return R(y) || y && typeof y == "object" && "value" in y && !(y instanceof Node) ? y.value : typeof e[i] === "boolean" && typeof y == "string" ? y === "" || y === "true" : y;
4215
+ if (N(y) || y && typeof y == "object" && "value" in y && !(y instanceof Node))
4216
+ return y.value;
4217
+ const p = typeof e[i];
4218
+ if (!(p === "string" && y && typeof y == "object"))
4219
+ return p === "boolean" && typeof y == "string" ? y === "" || y === "true" : y;
4203
4220
  }
4204
4221
  }
4205
4222
  } catch {
@@ -4228,39 +4245,44 @@ function nr(e) {
4228
4245
  return typeof o == "boolean" ? m === "" || m === "true" : typeof o == "number" ? Number(m) : m;
4229
4246
  }
4230
4247
  const a = c[i];
4231
- if (typeof a < "u" && a !== "")
4232
- return typeof o == "boolean" && o === !1 && a === "" ? o : R(a) || a && typeof a == "object" && "value" in a && !(a instanceof Node) ? a.value : typeof o == "boolean" && typeof a == "string" ? a === "true" || a !== "" && a !== "false" : typeof o == "number" && typeof a == "string" && !Number.isNaN(Number(a)) ? Number(a) : a;
4248
+ if (typeof a < "u" && a !== "") {
4249
+ const l = a && typeof a == "object" && "value" in a && !(a instanceof Node);
4250
+ if (!(typeof o == "string" && a && typeof a == "object" && !l && !N(a)))
4251
+ return typeof o == "boolean" && o === !1 && a === "" ? o : N(a) || l ? a.value : typeof o == "boolean" && typeof a == "string" ? a === "true" || a !== "" && a !== "false" : typeof o == "number" && typeof a == "string" && !Number.isNaN(Number(a)) ? Number(a) : a;
4252
+ }
4233
4253
  }
4234
4254
  } catch {
4235
4255
  }
4236
4256
  const s = t[i];
4237
- return typeof o == "boolean" && s === "" ? o === !1 ? o : !0 : R(s) || s && typeof s == "object" && "value" in s && !(s instanceof Node) ? s.value : s != null && s !== "" ? typeof o == "boolean" && typeof s == "string" ? s === "true" : typeof o == "number" && typeof s == "string" && !Number.isNaN(Number(s)) ? Number(s) : s : o;
4257
+ return typeof o == "boolean" && s === "" ? o === !1 ? o : !0 : N(s) || s && typeof s == "object" && "value" in s && !(s instanceof Node) ? s.value : s != null && s !== "" ? typeof o == "boolean" && typeof s == "string" ? s === "true" : typeof o == "number" && typeof s == "string" && !Number.isNaN(Number(s)) ? Number(s) : s : o;
4238
4258
  },
4239
4259
  has(r, i) {
4240
4260
  return typeof i == "string" && (i in t || i in e);
4241
4261
  },
4242
4262
  ownKeys() {
4243
- return Array.from(/* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t || {})]));
4263
+ return Array.from(
4264
+ /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t || {})])
4265
+ );
4244
4266
  },
4245
4267
  getOwnPropertyDescriptor() {
4246
4268
  return { configurable: !0, enumerable: !0 };
4247
4269
  }
4248
4270
  });
4249
4271
  }
4250
- function kr(e) {
4251
- if (!z)
4272
+ function sr(e) {
4273
+ if (!I)
4252
4274
  throw new Error("useStyle must be called during component render");
4253
- je(z);
4275
+ je(I);
4254
4276
  try {
4255
4277
  const t = e();
4256
- Object.defineProperty(z, "_computedStyle", {
4278
+ Object.defineProperty(I, "_computedStyle", {
4257
4279
  value: t,
4258
4280
  writable: !0,
4259
4281
  enumerable: !1,
4260
4282
  configurable: !0
4261
4283
  });
4262
4284
  } catch (t) {
4263
- te("Error in useStyle callback:", t), Object.defineProperty(z, "_computedStyle", {
4285
+ Z("Error in useStyle callback:", t), Object.defineProperty(I, "_computedStyle", {
4264
4286
  value: "",
4265
4287
  writable: !0,
4266
4288
  enumerable: !1,
@@ -4268,12 +4290,12 @@ function kr(e) {
4268
4290
  });
4269
4291
  }
4270
4292
  }
4271
- const Te = /* @__PURE__ */ new Map(), Wt = Symbol.for("cer.registry");
4293
+ const Te = /* @__PURE__ */ new Map(), Ut = Symbol.for("cer.registry");
4272
4294
  if (typeof window < "u") {
4273
4295
  const e = globalThis;
4274
- e[Wt] || (e[Wt] = Te);
4296
+ e[Ut] || (e[Ut] = Te);
4275
4297
  }
4276
- function rr(e, t) {
4298
+ function ar(e, t) {
4277
4299
  if (!t.render)
4278
4300
  throw new Error("Component must have a render function");
4279
4301
  return typeof window > "u" ? class {
@@ -4318,27 +4340,50 @@ function rr(e, t) {
4318
4340
  constructor() {
4319
4341
  super(), this.attachShadow({ mode: "open" }), this._cfg = Te.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
4320
4342
  const n = this._initContext(t), r = (o, s, c) => {
4321
- Object.defineProperty(o, s, { value: c, writable: !1, enumerable: !1, configurable: !1 });
4343
+ Object.defineProperty(o, s, {
4344
+ value: c,
4345
+ writable: !1,
4346
+ enumerable: !1,
4347
+ configurable: !1
4348
+ });
4322
4349
  };
4323
- r(n, "refs", this._refs), r(n, "requestRender", () => this.requestRender()), r(n, "_requestRender", () => this._requestRender()), r(n, "_componentId", this._componentId), r(n, "_triggerWatchers", (o, s) => this._triggerWatchers(o, s)), this.context = n, M(() => {
4350
+ r(n, "refs", this._refs), r(
4351
+ n,
4352
+ "requestRender",
4353
+ () => this.requestRender()
4354
+ ), r(
4355
+ n,
4356
+ "_requestRender",
4357
+ () => this._requestRender()
4358
+ ), r(n, "_componentId", this._componentId), r(
4359
+ n,
4360
+ "_triggerWatchers",
4361
+ (o, s) => this._triggerWatchers(o, s)
4362
+ ), this.context = n, P(() => {
4324
4363
  r(n, "_host", this);
4325
- }), r(this.context, "emit", (o, s, c) => {
4326
- const a = {
4327
- detail: s,
4328
- bubbles: !0,
4329
- composed: !0,
4330
- ...c || {}
4331
- }, l = new CustomEvent(o, a);
4332
- this.dispatchEvent(l);
4333
- const m = o.indexOf(":");
4334
- if (m > 0) {
4335
- const y = o.substring(0, m), p = o.substring(m + 1), v = p.includes("-") ? `${y}:${p.split("-").map((f, h) => h === 0 ? f : f.charAt(0).toUpperCase() + f.slice(1)).join("")}` : `${y}:${p.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
4336
- v !== o && M(() => {
4337
- this.dispatchEvent(new CustomEvent(v, a));
4338
- });
4364
+ }), r(
4365
+ this.context,
4366
+ "emit",
4367
+ (o, s, c) => {
4368
+ const a = {
4369
+ detail: s,
4370
+ bubbles: !0,
4371
+ composed: !0,
4372
+ ...c || {}
4373
+ }, l = new CustomEvent(o, a);
4374
+ this.dispatchEvent(l);
4375
+ const m = o.indexOf(":");
4376
+ if (m > 0) {
4377
+ const y = o.substring(0, m), p = o.substring(m + 1), v = p.includes("-") ? `${y}:${p.split("-").map(
4378
+ (f, h) => h === 0 ? f : f.charAt(0).toUpperCase() + f.slice(1)
4379
+ ).join("")}` : `${y}:${p.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
4380
+ v !== o && P(() => {
4381
+ this.dispatchEvent(new CustomEvent(v, a));
4382
+ });
4383
+ }
4384
+ return !l.defaultPrevented;
4339
4385
  }
4340
- return !l.defaultPrevented;
4341
- });
4386
+ );
4342
4387
  const i = Te.get(e) || t;
4343
4388
  for (const o in i) {
4344
4389
  const s = i[o];
@@ -4363,14 +4408,14 @@ function rr(e, t) {
4363
4408
  }
4364
4409
  connectedCallback() {
4365
4410
  this._runLogicWithinErrorBoundary(t, () => {
4366
- this._applyProps(t), this._requestRender(), bn(t, this.context, this._mounted, (n) => {
4411
+ this._applyProps(t), this._requestRender(), xn(t, this.context, this._mounted, (n) => {
4367
4412
  this._mounted = n;
4368
4413
  });
4369
4414
  });
4370
4415
  }
4371
4416
  disconnectedCallback() {
4372
4417
  this._runLogicWithinErrorBoundary(t, () => {
4373
- vn(
4418
+ kn(
4374
4419
  t,
4375
4420
  this.context,
4376
4421
  this._listeners,
@@ -4394,16 +4439,16 @@ function rr(e, t) {
4394
4439
  }
4395
4440
  attributeChangedCallback(n, r, i) {
4396
4441
  this._runLogicWithinErrorBoundary(t, () => {
4397
- this._applyProps(t), r !== i && this._requestRender(), wn(t, n, r, i, this.context);
4442
+ this._applyProps(t), r !== i && this._requestRender(), $n(t, n, r, i, this.context);
4398
4443
  });
4399
4444
  }
4400
4445
  static get observedAttributes() {
4401
- return t.props ? Object.keys(t.props).map(se) : [];
4446
+ return t.props ? Object.keys(t.props).map(oe) : [];
4402
4447
  }
4403
4448
  // --- Render ---
4404
4449
  _render(n) {
4405
4450
  this._runLogicWithinErrorBoundary(n, () => {
4406
- Qn(
4451
+ nr(
4407
4452
  this.shadowRoot,
4408
4453
  n,
4409
4454
  this.context,
@@ -4427,7 +4472,7 @@ function rr(e, t) {
4427
4472
  _requestRender() {
4428
4473
  this._runLogicWithinErrorBoundary(this._cfg, () => {
4429
4474
  ke(() => {
4430
- er(
4475
+ rr(
4431
4476
  () => this._render(this._cfg),
4432
4477
  this._lastRenderTime,
4433
4478
  this._renderCount,
@@ -4448,7 +4493,7 @@ function rr(e, t) {
4448
4493
  // --- Style ---
4449
4494
  _applyStyle(n, r) {
4450
4495
  this._runLogicWithinErrorBoundary(n, () => {
4451
- tr(
4496
+ ir(
4452
4497
  this.shadowRoot,
4453
4498
  this.context,
4454
4499
  r,
@@ -4476,7 +4521,9 @@ function rr(e, t) {
4476
4521
  } catch {
4477
4522
  c[a] = "[unreadable]";
4478
4523
  }
4479
- H(`Error rendering component <${o}> (id=${s}):`, i), H("Component props snapshot:", c), te("Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`).");
4524
+ H(`Error rendering component <${o}> (id=${s}):`, i), H("Component props snapshot:", c), Z(
4525
+ "Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`)."
4526
+ );
4480
4527
  } catch {
4481
4528
  }
4482
4529
  n.onError && n.onError(i, this.context);
@@ -4526,7 +4573,7 @@ function rr(e, t) {
4526
4573
  }
4527
4574
  });
4528
4575
  if (o && typeof o == "object") {
4529
- if (R(o))
4576
+ if (N(o))
4530
4577
  return o;
4531
4578
  for (const c in o) {
4532
4579
  const a = s ? `${s}.${c}` : c;
@@ -4561,7 +4608,7 @@ function rr(e, t) {
4561
4608
  }
4562
4609
  _initWatchers(n) {
4563
4610
  this._runLogicWithinErrorBoundary(n, () => {
4564
- hn(
4611
+ yn(
4565
4612
  this.context,
4566
4613
  this._watchers,
4567
4614
  {}
@@ -4570,12 +4617,12 @@ function rr(e, t) {
4570
4617
  });
4571
4618
  }
4572
4619
  _triggerWatchers(n, r) {
4573
- gn(this.context, this._watchers, n, r);
4620
+ bn(this.context, this._watchers, n, r);
4574
4621
  }
4575
4622
  _applyProps(n) {
4576
4623
  this._runLogicWithinErrorBoundary(n, () => {
4577
4624
  try {
4578
- yn(this, n, this.context);
4625
+ wn(this, n, this.context);
4579
4626
  } catch (r) {
4580
4627
  this._hasError = !0, n.onError && n.onError(r, this.context);
4581
4628
  }
@@ -4583,8 +4630,8 @@ function rr(e, t) {
4583
4630
  }
4584
4631
  };
4585
4632
  }
4586
- function zt(e, t) {
4587
- let n = se(e);
4633
+ function qt(e, t) {
4634
+ let n = oe(e);
4588
4635
  n.includes("-") || (n = `cer-${n}`);
4589
4636
  let r = {};
4590
4637
  const i = {
@@ -4609,7 +4656,7 @@ function zt(e, t) {
4609
4656
  o.requestRender && o.requestRender();
4610
4657
  });
4611
4658
  try {
4612
- Ft(o);
4659
+ It(o);
4613
4660
  let c;
4614
4661
  try {
4615
4662
  c = t();
@@ -4630,13 +4677,16 @@ function zt(e, t) {
4630
4677
  if (a.onConnected && (r.onConnected = a.onConnected), a.onDisconnected && (r.onDisconnected = a.onDisconnected), a.onAttributeChanged && (r.onAttributeChanged = a.onAttributeChanged), a.onError && (r.onError = a.onError), a.style && (o._styleCallback = a.style), a.props) {
4631
4678
  const l = a.props;
4632
4679
  i.props = Object.fromEntries(
4633
- Object.entries(l).map(([m, y]) => [m, { type: typeof y == "boolean" ? Boolean : typeof y == "number" ? Number : typeof y == "string" ? String : Function, default: y }])
4680
+ Object.entries(l).map(([m, y]) => [
4681
+ m,
4682
+ { type: typeof y == "boolean" ? Boolean : typeof y == "number" ? Number : typeof y == "string" ? String : Function, default: y }
4683
+ ])
4634
4684
  ), Te.set(n, i);
4635
4685
  }
4636
4686
  }
4637
4687
  return c;
4638
4688
  } finally {
4639
- pt(), ee.clearCurrentComponent();
4689
+ gt(), ee.clearCurrentComponent();
4640
4690
  }
4641
4691
  }
4642
4692
  };
@@ -4647,7 +4697,7 @@ function zt(e, t) {
4647
4697
  requestRender: () => {
4648
4698
  }
4649
4699
  };
4650
- Ft(o);
4700
+ It(o);
4651
4701
  try {
4652
4702
  t();
4653
4703
  } catch (s) {
@@ -4658,26 +4708,34 @@ function zt(e, t) {
4658
4708
  c.onError(s);
4659
4709
  } catch {
4660
4710
  }
4661
- H(`Error during component discovery render <${n}>:`, s), te("Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when().");
4711
+ H(
4712
+ `Error during component discovery render <${n}>:`,
4713
+ s
4714
+ ), Z(
4715
+ "Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when()."
4716
+ );
4662
4717
  } catch {
4663
4718
  }
4664
- throw pt(), s;
4719
+ throw gt(), s;
4665
4720
  }
4666
- if (pt(), o._hookCallbacks?.props) {
4721
+ if (gt(), o._hookCallbacks?.props) {
4667
4722
  const s = o._hookCallbacks.props;
4668
4723
  i.props = Object.fromEntries(
4669
- Object.entries(s).map(([c, a]) => [c, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
4724
+ Object.entries(s).map(([c, a]) => [
4725
+ c,
4726
+ { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }
4727
+ ])
4670
4728
  ), Te.set(n, i);
4671
4729
  }
4672
4730
  } catch {
4673
4731
  }
4674
4732
  customElements.get(n) || customElements.define(
4675
4733
  n,
4676
- rr(n, i)
4734
+ ar(n, i)
4677
4735
  );
4678
4736
  }
4679
4737
  }
4680
- class ir {
4738
+ class cr {
4681
4739
  map = /* @__PURE__ */ new Map();
4682
4740
  maxSize;
4683
4741
  constructor(t) {
@@ -4701,17 +4759,17 @@ class ir {
4701
4759
  this.map.clear();
4702
4760
  }
4703
4761
  }
4704
- const ht = new ir(500);
4705
- function or(e, t) {
4762
+ const mt = new cr(500);
4763
+ function lr(e, t) {
4706
4764
  if (e == null) {
4707
- te(
4765
+ Z(
4708
4766
  `⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`
4709
4767
  );
4710
4768
  return;
4711
4769
  }
4712
- typeof e != "function" && te(
4770
+ typeof e != "function" && Z(
4713
4771
  `🚨 Potential infinite loop detected! Event handler for '@${t}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${t}="\${functionName()}" to @${t}="\${functionName}" to pass the function reference instead of calling it immediately.`
4714
- ), e === void 0 && typeof e != "function" && te(
4772
+ ), e === void 0 && typeof e != "function" && Z(
4715
4773
  `💡 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()}"`
4716
4774
  );
4717
4775
  }
@@ -4725,10 +4783,10 @@ function De(e) {
4725
4783
  function Ne(e) {
4726
4784
  return typeof e == "object" && e !== null && "tag" in e && !De(e);
4727
4785
  }
4728
- function sr(e, t) {
4786
+ function ur(e, t) {
4729
4787
  return e.key != null ? e : { ...e, key: t };
4730
4788
  }
4731
- function ar(e, t = [], n = {}) {
4789
+ function fr(e, t = [], n = {}) {
4732
4790
  const r = {}, i = {}, o = {}, s = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)(?:=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'))?/g;
4733
4791
  let a;
4734
4792
  for (; a = c.exec(e); ) {
@@ -4747,30 +4805,30 @@ function ar(e, t = [], n = {}) {
4747
4805
  if (l === ":") {
4748
4806
  const [d, u] = m.split(":"), [g, ...w] = d.split(".");
4749
4807
  if (h.includes(g)) {
4750
- const k = [...w], S = g === "model" && u ? `model:${u}` : g;
4751
- o[S] = {
4808
+ const k = [...w], A = g === "model" && u ? `model:${u}` : g;
4809
+ o[A] = {
4752
4810
  value: f,
4753
4811
  modifiers: k,
4754
4812
  arg: u
4755
4813
  };
4756
4814
  } else if (m === "disabled") {
4757
4815
  let k = f;
4758
- k && R(k) && (k = k.value);
4759
- const S = typeof k;
4760
- if (k === "" || S === "boolean" || S === "string" && (k === "true" || k === "false") || k == null || S === "number")
4816
+ k && N(k) && (k = k.value);
4817
+ const A = typeof k;
4818
+ if (k === "" || A === "boolean" || A === "string" && (k === "true" || k === "false") || k == null || A === "number")
4761
4819
  r[m] = k;
4762
4820
  else {
4763
4821
  let x = f;
4764
- x && R(x) && (x = x.value), i[m] = x;
4822
+ x && N(x) && (x = x.value), i[m] = x;
4765
4823
  }
4766
4824
  s.push(m);
4767
4825
  } else {
4768
4826
  let k = f;
4769
- k && R(k) && (k = k.value), i[m] = k, s.push(m);
4827
+ k && N(k) && (k = k.value), i[m] = k, s.push(m);
4770
4828
  }
4771
4829
  } else if (l === "@") {
4772
4830
  const [d, ...u] = m.split("."), g = u;
4773
- or(f, d);
4831
+ lr(f, d);
4774
4832
  const w = typeof f == "function" ? f : typeof n[f] == "function" ? n[f] : void 0;
4775
4833
  if (w) {
4776
4834
  const k = (C) => {
@@ -4779,26 +4837,26 @@ function ar(e, t = [], n = {}) {
4779
4837
  d,
4780
4838
  k
4781
4839
  ), w(C);
4782
- }, S = "on" + d.charAt(0).toUpperCase() + d.slice(1);
4783
- r[S] = k;
4840
+ }, A = "on" + d.charAt(0).toUpperCase() + d.slice(1);
4841
+ r[A] = k;
4784
4842
  }
4785
4843
  } else m === "ref" ? r.ref = f : i[m] = f;
4786
4844
  }
4787
4845
  return { props: r, attrs: i, directives: o, bound: s };
4788
4846
  }
4789
- function vt(e) {
4847
+ function kt(e) {
4790
4848
  if (!Ne(e) || De(e))
4791
4849
  return e;
4792
4850
  const t = e.props?.directives;
4793
4851
  if (t && t.when) {
4794
- const n = t.when.value, r = R(n) ? n.value : n, { when: i, ...o } = t, s = { ...e.props };
4852
+ const n = t.when.value, r = N(n) ? n.value : n, { when: i, ...o } = t, s = { ...e.props };
4795
4853
  Object.keys(o).length > 0 ? s.directives = o : delete s.directives;
4796
4854
  const c = {
4797
4855
  ...e,
4798
4856
  props: s
4799
4857
  };
4800
4858
  return Array.isArray(c.children) && (c.children = c.children.map(
4801
- (l) => typeof l == "object" && l !== null ? vt(l) : l
4859
+ (l) => typeof l == "object" && l !== null ? kt(l) : l
4802
4860
  )), {
4803
4861
  tag: "#anchor",
4804
4862
  key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
@@ -4807,7 +4865,7 @@ function vt(e) {
4807
4865
  }
4808
4866
  if (Array.isArray(e.children)) {
4809
4867
  const n = e.children.map(
4810
- (r) => typeof r == "object" && r !== null ? vt(r) : r
4868
+ (r) => typeof r == "object" && r !== null ? kt(r) : r
4811
4869
  );
4812
4870
  return {
4813
4871
  ...e,
@@ -4816,17 +4874,17 @@ function vt(e) {
4816
4874
  }
4817
4875
  return e;
4818
4876
  }
4819
- function cr(e, t, n) {
4877
+ function dr(e, t, n) {
4820
4878
  const r = Re.length > 0 ? Re[Re.length - 1] : void 0, i = n ?? r, o = !n && t.length === 0, s = o ? e.join("<!--TEMPLATE_DELIM-->") : null;
4821
4879
  if (o && s) {
4822
- const x = ht.get(s);
4880
+ const x = mt.get(s);
4823
4881
  if (x) return x;
4824
4882
  }
4825
4883
  function c(x, T) {
4826
4884
  return ge("#text", {}, x, T);
4827
4885
  }
4828
4886
  function a(x, T) {
4829
- const $ = typeof x == "string" ? de(x) : x;
4887
+ const $ = typeof x == "string" ? ue(x) : x;
4830
4888
  return ge("#text", {}, $, T);
4831
4889
  }
4832
4890
  let l = "";
@@ -4843,10 +4901,10 @@ function cr(e, t, n) {
4843
4901
  ), b = x.attrs.style.replace(/^;?\s*/, "");
4844
4902
  h.attrs.style = $ + "; " + b;
4845
4903
  } else if (T === "class" && h.attrs.class) {
4846
- const $ = h.attrs.class.trim().split(/\s+/).filter(Boolean), b = x.attrs.class.trim().split(/\s+/).filter(Boolean), A = [
4904
+ const $ = h.attrs.class.trim().split(/\s+/).filter(Boolean), b = x.attrs.class.trim().split(/\s+/).filter(Boolean), E = [
4847
4905
  .../* @__PURE__ */ new Set([...$, ...b])
4848
4906
  ];
4849
- h.attrs.class = A.join(" ");
4907
+ h.attrs.class = E.join(" ");
4850
4908
  } else
4851
4909
  h.attrs[T] = x.attrs[T];
4852
4910
  }))) : (h.props || (h.props = {}), Object.assign(h.props, x)));
@@ -4855,30 +4913,30 @@ function cr(e, t, n) {
4855
4913
  const $ = f ? v : g;
4856
4914
  if (De(x)) {
4857
4915
  const b = x.key ?? T;
4858
- let A = x.children;
4916
+ let E = x.children;
4859
4917
  $.push({
4860
4918
  ...x,
4861
4919
  key: b,
4862
- children: A
4920
+ children: E
4863
4921
  });
4864
4922
  return;
4865
4923
  }
4866
4924
  if (Ne(x)) {
4867
- $.push(sr(x, void 0));
4925
+ $.push(ur(x, void 0));
4868
4926
  return;
4869
4927
  }
4870
4928
  if (Array.isArray(x)) {
4871
4929
  if (x.length === 0) return;
4872
4930
  for (let b = 0; b < x.length; b++) {
4873
- const A = x[b];
4874
- De(A) || Ne(A) || Array.isArray(A) ? k(A, `${T}-${b}`) : A !== null && typeof A == "object" ? St(A) ? $.push(
4875
- ge("#raw", {}, A.__rawHTML, `${T}-${b}`)
4876
- ) : w(A) : $.push(c(String(A), `${T}-${b}`));
4931
+ const E = x[b];
4932
+ De(E) || Ne(E) || Array.isArray(E) ? k(E, `${T}-${b}`) : E !== null && typeof E == "object" ? Lt(E) ? $.push(
4933
+ ge("#raw", {}, E.__rawHTML, `${T}-${b}`)
4934
+ ) : w(E) : $.push(c(String(E), `${T}-${b}`));
4877
4935
  }
4878
4936
  return;
4879
4937
  }
4880
4938
  if (x !== null && typeof x == "object") {
4881
- if (St(x)) {
4939
+ if (Lt(x)) {
4882
4940
  const b = x.__rawHTML ?? "";
4883
4941
  $.push(ge("#raw", {}, b, T));
4884
4942
  return;
@@ -4888,7 +4946,7 @@ function cr(e, t, n) {
4888
4946
  }
4889
4947
  $.push(c(String(x), T));
4890
4948
  }
4891
- const S = /* @__PURE__ */ new Set([
4949
+ const A = /* @__PURE__ */ new Set([
4892
4950
  "area",
4893
4951
  "base",
4894
4952
  "br",
@@ -4907,39 +4965,23 @@ function cr(e, t, n) {
4907
4965
  for (; p = m.exec(l); )
4908
4966
  if (!(p[0].startsWith("<!--") && p[0].endsWith("-->"))) {
4909
4967
  if (p[1]) {
4910
- const x = p[1], T = p[0][1] === "/", $ = p[0][p[0].length - 2] === "/" || S.has(x), {
4968
+ const x = p[1], T = p[0][1] === "/", $ = p[0][p[0].length - 2] === "/" || A.has(x), {
4911
4969
  props: b,
4912
- attrs: A,
4970
+ attrs: E,
4913
4971
  directives: O,
4914
4972
  bound: j
4915
- } = ar(
4973
+ } = fr(
4916
4974
  p[2] || "",
4917
4975
  t,
4918
4976
  i
4919
- ), E = { props: {}, attrs: {} };
4920
- for (const P in b) E.props[P] = b[P];
4921
- for (const P in A) E.attrs[P] = A[P];
4922
- try {
4923
- if (x === "router-link") {
4924
- const P = [], N = (Y) => {
4925
- try {
4926
- let F = E.attrs && E.attrs[Y];
4927
- F && R(F) && (F = F.value), typeof F == "string" && F.trim() && P.push(...F.trim().split(/\s+/));
4928
- } catch {
4929
- }
4930
- };
4931
- if (N("class"), N("activeClass"), N("exactActiveClass"), P.length > 0) {
4932
- const Y = E.attrs && E.attrs.class || "", F = typeof Y == "string" && Y.trim() ? Y.trim().split(/\s+/) : [], U = Array.from(/* @__PURE__ */ new Set([...F, ...P]));
4933
- E.attrs.class = U.join(" ");
4934
- }
4935
- }
4936
- } catch {
4937
- }
4938
- E.attrs && Object.prototype.hasOwnProperty.call(E.attrs, "key") && !(E.props && Object.prototype.hasOwnProperty.call(E.props, "key")) && M(() => {
4939
- E.props.key = E.attrs.key;
4977
+ ), S = { props: {}, attrs: {} };
4978
+ for (const M in b) S.props[M] = b[M];
4979
+ for (const M in E) S.attrs[M] = E[M];
4980
+ S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")) && P(() => {
4981
+ S.props.key = S.attrs.key;
4940
4982
  });
4941
4983
  try {
4942
- const P = {
4984
+ const M = {
4943
4985
  input: [
4944
4986
  "value",
4945
4987
  "checked",
@@ -4963,96 +5005,96 @@ function cr(e, t, n) {
4963
5005
  audio: ["muted", "autoplay", "controls", "loop"],
4964
5006
  img: ["src", "alt", "width", "height"],
4965
5007
  button: ["type", "name", "value", "autofocus", "form"]
4966
- }, N = x.toLowerCase(), Y = P[N] ?? [];
4967
- if (E.attrs) {
4968
- for (const U of Y)
4969
- if (j && j.includes(U) && U in E.attrs && !(E.props && U in E.props)) {
4970
- let D = E.attrs[U];
4971
- if (D && R(D))
4972
- D = D.value, E.props[U] = D, delete E.attrs[U];
5008
+ }, R = x.toLowerCase(), fe = M[R] ?? [];
5009
+ if (S.attrs) {
5010
+ for (const q of fe)
5011
+ if (j && j.includes(q) && q in S.attrs && !(S.props && q in S.props)) {
5012
+ let D = S.attrs[q];
5013
+ if (D && N(D))
5014
+ D = D.value, S.props[q] = D, delete S.attrs[q];
4973
5015
  else {
4974
- const V = typeof D;
4975
- U === "disabled" ? (D === "" || V === "boolean" || V === "string" && (D === "true" || D === "false") || D == null || V === "number") && (E.props[U] = D, delete E.attrs[U]) : (D === "" || V === "string" || V === "number" || V === "boolean" || D == null) && (E.props[U] = D, delete E.attrs[U]);
5016
+ const K = typeof D;
5017
+ q === "disabled" ? (D === "" || K === "boolean" || K === "string" && (D === "true" || D === "false") || D == null || K === "number") && (S.props[q] = D, delete S.attrs[q]) : (D === "" || K === "string" || K === "number" || K === "boolean" || D == null) && (S.props[q] = D, delete S.attrs[q]);
4976
5018
  }
4977
5019
  }
4978
5020
  }
4979
- if ((x.includes("-") || !!i?.__customElements?.has?.(x)) && (E.isCustomElement = !0, j && E.attrs)) {
4980
- const U = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
5021
+ if ((x.includes("-") || !!i?.__customElements?.has?.(x)) && (S.isCustomElement = !0, j && S.attrs)) {
5022
+ const q = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
4981
5023
  for (const D of j)
4982
- if (D in E.attrs && !(E.props && D in E.props)) {
4983
- const V = D.includes("-") ? xt(D) : D;
4984
- let ae = E.attrs[D];
4985
- if (E.props[V] = ae, U.has(D) || Zt(D))
5024
+ if (D in S.attrs && !(S.props && D in S.props)) {
5025
+ const K = D.includes("-") ? Ct(D) : D;
5026
+ let se = S.attrs[D];
5027
+ if (S.props[K] = se, q.has(D) || Xt(D))
4986
5028
  try {
4987
- const I = X(E.attrs[D]);
4988
- I === null ? delete E.attrs[D] : E.attrs[D] = I;
5029
+ const F = Y(S.attrs[D]);
5030
+ F === null ? delete S.attrs[D] : S.attrs[D] = F;
4989
5031
  } catch {
4990
- delete E.attrs[D];
5032
+ delete S.attrs[D];
4991
5033
  }
4992
5034
  else
4993
- delete E.attrs[D];
5035
+ delete S.attrs[D];
4994
5036
  }
4995
5037
  }
4996
5038
  } catch {
4997
5039
  }
4998
5040
  if (O && Object.keys(O).some(
4999
- (P) => P === "model" || P.startsWith("model:")
5041
+ (M) => M === "model" || M.startsWith("model:")
5000
5042
  ))
5001
5043
  try {
5002
- const P = Symbol.for("cer.registry"), N = globalThis[P], Y = !!(N && typeof N.has == "function" && N.has(x)), F = !!(i && (i.__customElements instanceof Set && i.__customElements.has(x) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(
5044
+ const M = Symbol.for("cer.registry"), R = globalThis[M], fe = !!(R && typeof R.has == "function" && R.has(x)), G = !!(i && (i.__customElements instanceof Set && i.__customElements.has(x) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(
5003
5045
  x
5004
5046
  )));
5005
- if (!!(x.includes("-") || F || Y))
5006
- for (const V of Object.keys(O)) {
5007
- if (V !== "model" && !V.startsWith("model:")) continue;
5008
- const ae = O[V], xe = ae.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), I = ae.value, le = xe ?? "modelValue", L = J, W = Ye, Z = i ? i._state || i : void 0;
5009
- let B;
5010
- typeof I == "string" && i ? B = L(Z, I) : B = I, E.props[le] = B;
5047
+ if (!!(x.includes("-") || G || fe))
5048
+ for (const K of Object.keys(O)) {
5049
+ if (K !== "model" && !K.startsWith("model:")) continue;
5050
+ const se = O[K], xe = se.arg ?? (K.includes(":") ? K.split(":", 2)[1] : void 0), F = se.value, ce = xe ?? "modelValue", L = X, W = Qe, V = i ? i._state || i : void 0;
5051
+ let z;
5052
+ typeof F == "string" && i ? z = L(V, F) : z = F, S.props[ce] = z;
5011
5053
  try {
5012
- const he = se(le);
5013
- E.attrs || (E.attrs = {}), B != null && (typeof B == "string" || typeof B == "number" || typeof B == "boolean") && (E.attrs[he] = B);
5054
+ const pe = oe(ce);
5055
+ S.attrs || (S.attrs = {}), z != null && (typeof z == "string" || typeof z == "number" || typeof z == "boolean") && (S.attrs[pe] = z);
5014
5056
  } catch {
5015
5057
  }
5016
- E.isCustomElement = !0;
5017
- const G = `update:${se(le)}`.replace(
5058
+ S.isCustomElement = !0;
5059
+ const J = `update:${oe(ce)}`.replace(
5018
5060
  /-([a-z])/g,
5019
- (he, ue) => ue.toUpperCase()
5020
- ), on = "on" + G.charAt(0).toUpperCase() + G.slice(1);
5021
- E.props[on] = function(he) {
5022
- const ue = he.detail !== void 0 ? he.detail : he.target ? he.target.value : void 0;
5023
- if (Z)
5024
- if (I && R(I)) {
5025
- const ye = I.value;
5026
- (Array.isArray(ue) && Array.isArray(ye) ? JSON.stringify([...ue].sort()) !== JSON.stringify([...ye].sort()) : ue !== ye) && (I.value = ue, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
5061
+ (pe, le) => le.toUpperCase()
5062
+ ), cn = "on" + J.charAt(0).toUpperCase() + J.slice(1);
5063
+ S.props[cn] = function(pe) {
5064
+ const le = pe.detail !== void 0 ? pe.detail : pe.target ? pe.target.value : void 0;
5065
+ if (V)
5066
+ if (F && N(F)) {
5067
+ const ye = F.value;
5068
+ (Array.isArray(le) && Array.isArray(ye) ? JSON.stringify([...le].sort()) !== JSON.stringify([...ye].sort()) : le !== ye) && (F.value = le, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
5027
5069
  } else {
5028
5070
  const ye = L(
5029
- Z,
5030
- typeof I == "string" ? I : String(I)
5071
+ V,
5072
+ typeof F == "string" ? F : String(F)
5031
5073
  );
5032
- (Array.isArray(ue) && Array.isArray(ye) ? JSON.stringify([...ue].sort()) !== JSON.stringify([...ye].sort()) : ue !== ye) && (W(
5033
- Z,
5034
- typeof I == "string" ? I : String(I),
5035
- ue
5074
+ (Array.isArray(le) && Array.isArray(ye) ? JSON.stringify([...le].sort()) !== JSON.stringify([...ye].sort()) : le !== ye) && (W(
5075
+ V,
5076
+ typeof F == "string" ? F : String(F),
5077
+ le
5036
5078
  ), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
5037
5079
  }
5038
- }, delete O[V];
5080
+ }, delete O[K];
5039
5081
  }
5040
5082
  } catch {
5041
5083
  }
5042
- if (Object.keys(O).length > 0 && (E.directives = { ...O }), T) {
5043
- const P = ge(
5084
+ if (Object.keys(O).length > 0 && (S.directives = { ...O }), T) {
5085
+ const M = ge(
5044
5086
  f,
5045
5087
  h,
5046
5088
  v.length === 1 && Ne(v[0]) && v[0].tag === "#text" ? typeof v[0].children == "string" ? v[0].children : "" : v.length ? v : void 0,
5047
5089
  d
5048
- ), N = y.pop();
5049
- N ? (f = N.tag, h = N.props, d = N.key, v = N.children, v.push(P)) : (g.push(P), f = null, h = {}, d = void 0, v = []);
5050
- } else $ ? f ? v.push(ge(x, E, void 0, void 0)) : g.push(ge(x, E, void 0, void 0)) : (f && y.push({
5090
+ ), R = y.pop();
5091
+ R ? (f = R.tag, h = R.props, d = R.key, v = R.children, v.push(M)) : (g.push(M), f = null, h = {}, d = void 0, v = []);
5092
+ } else $ ? f ? v.push(ge(x, S, void 0, void 0)) : g.push(ge(x, S, void 0, void 0)) : (f && y.push({
5051
5093
  tag: f,
5052
5094
  props: h,
5053
5095
  children: v,
5054
5096
  key: d
5055
- }), f = x, h = E, v = []);
5097
+ }), f = x, h = S, v = []);
5056
5098
  } else if (typeof p[3] < "u") {
5057
5099
  const x = Number(p[3]), T = t[x], $ = `interp-${x}`;
5058
5100
  k(T, $);
@@ -5060,10 +5102,10 @@ function cr(e, t, n) {
5060
5102
  const x = p[4], T = f ? v : g, $ = x.split(/({{\d+}})/);
5061
5103
  for (const b of $) {
5062
5104
  if (!b) continue;
5063
- const A = b.match(/^{{(\d+)}}$/);
5064
- if (A) {
5065
- const O = Number(A[1]), j = t[O], E = `interp-${O}`;
5066
- k(j, E);
5105
+ const E = b.match(/^{{(\d+)}}$/);
5106
+ if (E) {
5107
+ const O = Number(E[1]), j = t[O], S = `interp-${O}`;
5108
+ k(j, S);
5067
5109
  } else {
5068
5110
  const O = `text-${u++}`;
5069
5111
  T.push(a(b, O));
@@ -5072,70 +5114,70 @@ function cr(e, t, n) {
5072
5114
  }
5073
5115
  }
5074
5116
  const _ = g.filter((x) => Ne(x) && x.tag === "#text" ? typeof x.children == "string" && x.children.trim() !== "" : !0).map(
5075
- (x) => vt(x)
5117
+ (x) => kt(x)
5076
5118
  );
5077
5119
  if (_.length === 1) {
5078
5120
  const x = _[0];
5079
- return o && s && ht.set(s, x), x;
5121
+ return o && s && mt.set(s, x), x;
5080
5122
  } else if (_.length > 1) {
5081
5123
  const x = _;
5082
- return o && s && ht.set(s, x), x;
5124
+ return o && s && mt.set(s, x), x;
5083
5125
  }
5084
5126
  return ge("div", {}, "", "fallback-root");
5085
5127
  }
5086
- function ve(e, ...t) {
5128
+ function be(e, ...t) {
5087
5129
  const n = t[t.length - 1], r = typeof n == "object" && n && !Array.isArray(n) ? n : void 0;
5088
- return cr(e, t, r);
5130
+ return dr(e, t, r);
5089
5131
  }
5090
- function $r(e, t) {
5091
- return Qe(!e, t);
5132
+ function Er(e, t) {
5133
+ return et(!e, t);
5092
5134
  }
5093
- function Cr(e, t) {
5135
+ function _r(e, t) {
5094
5136
  const n = !e || e.length === 0;
5095
- return Qe(n, t);
5137
+ return et(n, t);
5096
5138
  }
5097
- function Er(e, t) {
5139
+ function Ar(e, t) {
5098
5140
  const n = !!(e && e.length > 0);
5099
- return Qe(n, t);
5141
+ return et(n, t);
5100
5142
  }
5101
- function _r(e, t, n) {
5143
+ function Sr(e, t, n) {
5102
5144
  const r = [];
5103
5145
  return e.forEach((i, o) => {
5104
5146
  t(i, o) && r.push({ item: i, originalIndex: o });
5105
5147
  }), r.map(({ item: i, originalIndex: o }, s) => {
5106
5148
  const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${o}` : `filtered-${o}`;
5107
- return q(n(i, o, s), `each-where-${c}`);
5149
+ return B(n(i, o, s), `each-where-${c}`);
5108
5150
  });
5109
5151
  }
5110
- function Ar(e, t) {
5152
+ function Tr(e, t) {
5111
5153
  const n = e?.length ?? 0;
5112
- return n === 0 && t.empty ? q(t.empty, "switch-length-empty") : n === 1 && t.one ? q(t.one(e[0]), "switch-length-one") : t.exactly?.[n] ? q(t.exactly[n](e), `switch-length-${n}`) : n > 1 && t.many ? q(t.many(e), "switch-length-many") : q([], "switch-length-fallback");
5154
+ return n === 0 && t.empty ? B(t.empty, "switch-length-empty") : n === 1 && t.one ? B(t.one(e[0]), "switch-length-one") : t.exactly?.[n] ? B(t.exactly[n](e), `switch-length-${n}`) : n > 1 && t.many ? B(t.many(e), "switch-length-many") : B([], "switch-length-fallback");
5113
5155
  }
5114
- function Sr(e, t, n) {
5156
+ function jr(e, t, n) {
5115
5157
  const r = /* @__PURE__ */ new Map();
5116
5158
  return e.forEach((i) => {
5117
5159
  const o = t(i);
5118
5160
  r.has(o) || r.set(o, []), r.get(o).push(i);
5119
- }), Array.from(r.entries()).map(([i, o], s) => q(
5161
+ }), Array.from(r.entries()).map(([i, o], s) => B(
5120
5162
  n(i, o, s),
5121
5163
  `each-group-${i}`
5122
5164
  ));
5123
5165
  }
5124
- function Tr(e, t, n, r) {
5166
+ function Lr(e, t, n, r) {
5125
5167
  const i = n * t, o = Math.min(i + t, e.length);
5126
5168
  return e.slice(i, o).map((c, a) => {
5127
5169
  const l = i + a, m = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${l}` : `page-${l}`;
5128
- return q(r(c, l, a), `each-page-${m}`);
5170
+ return B(r(c, l, a), `each-page-${m}`);
5129
5171
  });
5130
5172
  }
5131
- function jr(e, t) {
5132
- return e.loading && t.loading ? q(t.loading, "promise-loading") : e.error && t.error ? q(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? q(t.success(e.data), "promise-success") : t.idle ? q(t.idle, "promise-idle") : q([], "promise-fallback");
5173
+ function Or(e, t) {
5174
+ return e.loading && t.loading ? B(t.loading, "promise-loading") : e.error && t.error ? B(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? B(t.success(e.data), "promise-success") : t.idle ? B(t.idle, "promise-idle") : B([], "promise-fallback");
5133
5175
  }
5134
5176
  function Q(e, t) {
5135
5177
  const n = typeof window < "u" && window.matchMedia?.(e)?.matches;
5136
- return Qe(!!n, t);
5178
+ return et(!!n, t);
5137
5179
  }
5138
- const pe = {
5180
+ const de = {
5139
5181
  // Responsive breakpoints (matching style.ts)
5140
5182
  sm: "(min-width:640px)",
5141
5183
  md: "(min-width:768px)",
@@ -5144,15 +5186,15 @@ const pe = {
5144
5186
  "2xl": "(min-width:1536px)",
5145
5187
  // Dark mode (matching style.ts)
5146
5188
  dark: "(prefers-color-scheme: dark)"
5147
- }, rn = ["sm", "md", "lg", "xl", "2xl"], lr = {
5189
+ }, an = ["sm", "md", "lg", "xl", "2xl"], pr = {
5148
5190
  // Breakpoint-based rendering (matching style.ts exactly)
5149
- sm: (e) => Q(pe.sm, e),
5150
- md: (e) => Q(pe.md, e),
5151
- lg: (e) => Q(pe.lg, e),
5152
- xl: (e) => Q(pe.xl, e),
5153
- "2xl": (e) => Q(pe["2xl"], e),
5191
+ sm: (e) => Q(de.sm, e),
5192
+ md: (e) => Q(de.md, e),
5193
+ lg: (e) => Q(de.lg, e),
5194
+ xl: (e) => Q(de.xl, e),
5195
+ "2xl": (e) => Q(de["2xl"], e),
5154
5196
  // Dark mode (matching style.ts)
5155
- dark: (e) => Q(pe.dark, e),
5197
+ dark: (e) => Q(de.dark, e),
5156
5198
  light: (e) => Q("(prefers-color-scheme: light)", e),
5157
5199
  // Accessibility and interaction preferences
5158
5200
  touch: (e) => Q("(hover: none) and (pointer: coarse)", e),
@@ -5163,24 +5205,24 @@ const pe = {
5163
5205
  portrait: (e) => Q("(orientation: portrait)", e),
5164
5206
  landscape: (e) => Q("(orientation: landscape)", e)
5165
5207
  };
5166
- function Lr(e, t) {
5208
+ function Pr(e, t) {
5167
5209
  const n = [];
5168
- e.includes("dark") ? n.push(pe.dark) : e.includes("light") && n.push("(prefers-color-scheme: light)");
5210
+ e.includes("dark") ? n.push(de.dark) : e.includes("light") && n.push("(prefers-color-scheme: light)");
5169
5211
  const r = e.filter(
5170
- (s) => rn.includes(s)
5212
+ (s) => an.includes(s)
5171
5213
  ), i = r[r.length - 1];
5172
- i && i in pe && n.push(pe[i]);
5214
+ i && i in de && n.push(de[i]);
5173
5215
  const o = n.length > 0 ? n.join(" and ") : "all";
5174
5216
  return Q(o, t);
5175
5217
  }
5176
- function Or(e) {
5218
+ function Mr(e) {
5177
5219
  const t = [];
5178
- return e.base && t.push(q(e.base, "responsive-base")), rn.forEach((n) => {
5220
+ return e.base && t.push(B(e.base, "responsive-base")), an.forEach((n) => {
5179
5221
  const r = e[n];
5180
- r && t.push(lr[n](r));
5222
+ r && t.push(pr[n](r));
5181
5223
  }), t;
5182
5224
  }
5183
- function Pr(e) {
5225
+ function Nr(e) {
5184
5226
  const t = [];
5185
5227
  let n = null;
5186
5228
  return {
@@ -5198,9 +5240,9 @@ function Pr(e) {
5198
5240
  for (let r = 0; r < t.length; r++) {
5199
5241
  const { condition: i, content: o } = t[r];
5200
5242
  if (i(e))
5201
- return q(o, `switch-case-${r}`);
5243
+ return B(o, `switch-case-${r}`);
5202
5244
  }
5203
- return q(n || [], "switch-otherwise");
5245
+ return B(n || [], "switch-otherwise");
5204
5246
  }
5205
5247
  };
5206
5248
  }
@@ -5325,12 +5367,15 @@ class Ee extends EventTarget {
5325
5367
  this.eventCounters.clear();
5326
5368
  }
5327
5369
  }
5328
- const Ie = Ee.getInstance(), Mr = (e, t) => Ie.emit(e, t), Nr = (e, t) => Ie.on(e, t), Rr = (e, t) => Ie.off(e, t), Dr = (e, t) => Ie.once(e, t), Hr = (e, t, n) => Ie.listen(e, t, n);
5329
- function Bt(e) {
5370
+ const We = Ee.getInstance(), Rr = (e, t) => We.emit(e, t), Dr = (e, t) => We.on(e, t), Hr = (e, t) => We.off(e, t), Fr = (e, t) => We.once(e, t), Wr = (e, t, n) => We.listen(e, t, n);
5371
+ function Kt(e) {
5330
5372
  let t = { ...e };
5331
5373
  const n = [];
5332
5374
  function r(c) {
5333
- n.push(c), c(t);
5375
+ return n.push(c), c(t), () => {
5376
+ const a = n.indexOf(c);
5377
+ a !== -1 && n.splice(a, 1);
5378
+ };
5334
5379
  }
5335
5380
  function i() {
5336
5381
  return t;
@@ -5344,7 +5389,7 @@ function Bt(e) {
5344
5389
  }
5345
5390
  return { subscribe: r, getState: i, setState: o };
5346
5391
  }
5347
- const Ut = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, fe = (e, t) => {
5392
+ const Vt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, ve = (e, t) => {
5348
5393
  for (const n of e) {
5349
5394
  const r = [], i = n.path.replace(/:[^/]+/g, (c) => (r.push(c.slice(1)), "([^/]+)")), o = new RegExp(`^${i}$`), s = t.match(o);
5350
5395
  if (s) {
@@ -5355,46 +5400,50 @@ const Ut = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new
5355
5400
  }
5356
5401
  }
5357
5402
  return { route: null, params: {} };
5358
- }, gt = {};
5359
- async function ur(e) {
5403
+ };
5404
+ function Je(e, t) {
5405
+ for (const n of e)
5406
+ if (ve([n], t).route !== null) return n;
5407
+ return null;
5408
+ }
5409
+ const yt = {};
5410
+ async function hr(e) {
5360
5411
  if (e.component) return e.component;
5361
5412
  if (e.load) {
5362
- if (gt[e.path]) return gt[e.path];
5413
+ if (yt[e.path]) return yt[e.path];
5363
5414
  try {
5364
5415
  const t = await e.load();
5365
- return gt[e.path] = t.default, t.default;
5416
+ return yt[e.path] = t.default, t.default;
5366
5417
  } catch {
5367
5418
  throw new Error(`Failed to load component for route: ${e.path}`);
5368
5419
  }
5369
5420
  }
5370
5421
  throw new Error(`No component or loader defined for route: ${e.path}`);
5371
5422
  }
5372
- function fr(e) {
5423
+ function gr(e) {
5373
5424
  const { routes: t, base: n = "", initialUrl: r } = e;
5374
5425
  let i, o, s, c, a, l, m;
5375
5426
  const y = async (h, d) => {
5376
- const u = t.find((g) => fe([g], h.path).route !== null);
5377
- if (u?.beforeEnter)
5378
- try {
5379
- const g = await u.beforeEnter(h, d);
5380
- return typeof g == "string" ? (await f(g, !0), !1) : g !== !1;
5381
- } catch (g) {
5382
- return H("beforeEnter error", g), !1;
5383
- }
5384
- return !0;
5427
+ const u = Je(t, h.path);
5428
+ if (!u || !u.beforeEnter) return !0;
5429
+ try {
5430
+ const g = await u.beforeEnter(h, d);
5431
+ return typeof g == "string" ? (await f(g, !0), !1) : g !== !1;
5432
+ } catch (g) {
5433
+ return H("beforeEnter error", g), !1;
5434
+ }
5385
5435
  }, p = async (h, d) => {
5386
- const u = t.find((g) => fe([g], h.path).route !== null);
5387
- if (u?.onEnter)
5388
- try {
5389
- const g = await u.onEnter(h, d);
5390
- return typeof g == "string" ? (await f(g, !0), !1) : g !== !1;
5391
- } catch (g) {
5392
- return H("onEnter error", g), !1;
5393
- }
5394
- return !0;
5436
+ const u = Je(t, h.path);
5437
+ if (!u || !u.onEnter) return !0;
5438
+ try {
5439
+ const g = await u.onEnter(h, d);
5440
+ return typeof g == "string" ? (await f(g, !0), !1) : g !== !1;
5441
+ } catch (g) {
5442
+ return H("onEnter error", g), !1;
5443
+ }
5395
5444
  }, v = (h, d) => {
5396
- const u = t.find((g) => fe([g], h.path).route !== null);
5397
- if (u?.afterEnter)
5445
+ const u = Je(t, h.path);
5446
+ if (!(!u || !u.afterEnter))
5398
5447
  try {
5399
5448
  u.afterEnter(h, d);
5400
5449
  } catch (g) {
@@ -5405,7 +5454,7 @@ function fr(e) {
5405
5454
  const u = {
5406
5455
  path: h.replace(n, "") || "/",
5407
5456
  query: {}
5408
- }, g = fe(t, u.path);
5457
+ }, g = ve(t, u.path);
5409
5458
  if (!g) throw new Error(`No route found for ${u.path}`);
5410
5459
  const w = s.getState(), k = {
5411
5460
  path: u.path,
@@ -5420,11 +5469,11 @@ function fr(e) {
5420
5469
  };
5421
5470
  if (typeof window < "u" && typeof document < "u" && typeof r > "u") {
5422
5471
  i = () => {
5423
- const d = new URL(window.location.href), u = d.pathname.replace(n, "") || "/", g = Ut(d.search);
5472
+ const d = new URL(window.location.href), u = d.pathname.replace(n, "") || "/", g = Vt(d.search);
5424
5473
  return { path: u, query: g };
5425
5474
  }, o = i();
5426
- const h = fe(t, o.path);
5427
- s = Bt({
5475
+ const h = ve(t, o.path);
5476
+ s = Kt({
5428
5477
  path: o.path,
5429
5478
  params: h.params,
5430
5479
  query: o.query
@@ -5434,11 +5483,11 @@ function fr(e) {
5434
5483
  }, window.addEventListener("popstate", () => c(!0)), a = (d) => f(d, !1), l = (d) => f(d, !0), m = () => window.history.back();
5435
5484
  } else {
5436
5485
  i = () => {
5437
- const u = new URL(r || "/", "http://localhost"), g = u.pathname.replace(n, "") || "/", w = Ut(u.search);
5486
+ const u = new URL(r || "/", "http://localhost"), g = u.pathname.replace(n, "") || "/", w = Vt(u.search);
5438
5487
  return { path: g, query: w };
5439
5488
  }, o = i();
5440
- const h = fe(t, o.path);
5441
- s = Bt({
5489
+ const h = ve(t, o.path);
5490
+ s = Kt({
5442
5491
  path: o.path,
5443
5492
  params: h.params,
5444
5493
  query: o.query
@@ -5451,18 +5500,16 @@ function fr(e) {
5451
5500
  const g = {
5452
5501
  path: u.replace(n, "") || "/",
5453
5502
  query: {}
5454
- }, w = fe(t, g.path);
5503
+ }, w = ve(t, g.path);
5455
5504
  if (!w) throw new Error(`No route found for ${g.path}`);
5456
- const k = s.getState(), S = {
5505
+ const k = s.getState(), A = {
5457
5506
  path: g.path,
5458
5507
  params: w.params,
5459
5508
  query: g.query
5460
- }, C = t.find(
5461
- (_) => fe([_], S.path).route !== null
5462
- );
5509
+ }, C = Je(t, A.path);
5463
5510
  if (C?.beforeEnter)
5464
5511
  try {
5465
- const _ = await C.beforeEnter(S, k);
5512
+ const _ = await C.beforeEnter(A, k);
5466
5513
  if (typeof _ == "string") {
5467
5514
  await d(_);
5468
5515
  return;
@@ -5473,7 +5520,7 @@ function fr(e) {
5473
5520
  }
5474
5521
  if (C?.onEnter)
5475
5522
  try {
5476
- const _ = await C.onEnter(S, k);
5523
+ const _ = await C.onEnter(A, k);
5477
5524
  if (typeof _ == "string") {
5478
5525
  await d(_);
5479
5526
  return;
@@ -5482,9 +5529,9 @@ function fr(e) {
5482
5529
  } catch {
5483
5530
  return;
5484
5531
  }
5485
- if (s.setState(S), C?.afterEnter)
5532
+ if (s.setState(A), C?.afterEnter)
5486
5533
  try {
5487
- C.afterEnter(S, k);
5534
+ C.afterEnter(A, k);
5488
5535
  } catch {
5489
5536
  }
5490
5537
  } catch {
@@ -5499,42 +5546,54 @@ function fr(e) {
5499
5546
  replace: l,
5500
5547
  back: m,
5501
5548
  subscribe: s.subscribe,
5502
- matchRoute: (h) => fe(t, h),
5549
+ matchRoute: (h) => ve(t, h),
5503
5550
  getCurrent: () => s.getState(),
5504
- resolveRouteComponent: ur
5551
+ resolveRouteComponent: hr
5505
5552
  };
5506
5553
  }
5507
- function Fr(e, t) {
5508
- return fe(e, t);
5554
+ function Ir(e, t) {
5555
+ return ve(e, t);
5509
5556
  }
5510
- function Ir(e) {
5511
- const t = fr(e);
5512
- return zt("router-view", () => {
5513
- if (!t) return ve`<div>Router not initialized.</div>`;
5514
- const n = $t(t.getCurrent());
5515
- It(() => {
5557
+ let bt = null;
5558
+ function zr(e) {
5559
+ const t = gr(e);
5560
+ return bt = t, qt("router-view", () => {
5561
+ const n = bt || t;
5562
+ if (!n) return be`<div>Router not initialized.</div>`;
5563
+ const r = _t(n.getCurrent());
5564
+ let i;
5565
+ zt(() => {
5516
5566
  try {
5517
- t && typeof t.subscribe == "function" && t.subscribe((i) => {
5567
+ n && typeof n.subscribe == "function" && (i = n.subscribe((s) => {
5518
5568
  try {
5519
- n.value = i;
5520
- } catch {
5569
+ r.value = s;
5570
+ } catch (c) {
5571
+ Z("router-view subscription update failed", c);
5521
5572
  }
5522
- });
5523
- } catch {
5573
+ }));
5574
+ } catch (s) {
5575
+ Z("router-view subscribe failed", s);
5524
5576
  }
5577
+ }), Bt(() => {
5578
+ if (typeof i == "function")
5579
+ try {
5580
+ i();
5581
+ } catch (s) {
5582
+ Z("router-view unsubscribe failed", s);
5583
+ }
5525
5584
  });
5526
- const r = t.matchRoute(n.value.path);
5527
- return !r || !r.route ? ve`<div>Not found</div>` : t.resolveRouteComponent(r.route).then((i) => {
5528
- if (typeof i == "string")
5529
- return { tag: i, props: {}, children: [] };
5530
- if (typeof i == "function") {
5531
- const o = i();
5532
- return (o instanceof Promise ? o : Promise.resolve(o)).then((c) => typeof c == "string" ? { tag: c, props: {}, children: [] } : c);
5585
+ const o = n.matchRoute(r.value.path);
5586
+ return !o || !o.route ? be`<div>Not found</div>` : n.resolveRouteComponent(o.route).then((s) => {
5587
+ if (typeof s == "string")
5588
+ return { tag: s, props: {}, children: [] };
5589
+ if (typeof s == "function") {
5590
+ const c = s();
5591
+ return (c instanceof Promise ? c : Promise.resolve(c)).then((l) => typeof l == "string" ? { tag: l, props: {}, children: [] } : l);
5533
5592
  }
5534
- return ve`<div>Invalid route component</div>`;
5535
- }).catch(() => ve`<div>Invalid route component</div>`);
5536
- }), zt("router-link", () => {
5537
- const n = nr({
5593
+ return be`<div>Invalid route component</div>`;
5594
+ }).catch(() => be`<div>Invalid route component</div>`);
5595
+ }), qt("router-link", () => {
5596
+ const n = or({
5538
5597
  to: "",
5539
5598
  tag: "a",
5540
5599
  replace: !1,
@@ -5544,68 +5603,83 @@ function Ir(e) {
5544
5603
  ariaCurrentValue: "page",
5545
5604
  disabled: !1,
5546
5605
  external: !1,
5547
- class: "",
5548
- style: ""
5549
- }), r = $t(t.getCurrent());
5550
- It(() => {
5606
+ linkClass: "",
5607
+ linkStyle: ""
5608
+ }), r = bt || t, i = _t(r.getCurrent());
5609
+ let o;
5610
+ sr(
5611
+ () => "a,button{display:inline-block;}" + n.linkStyle
5612
+ ), zt(() => {
5551
5613
  try {
5552
- t && typeof t.subscribe == "function" && t.subscribe((f) => {
5614
+ r && typeof r.subscribe == "function" && (o = r.subscribe((h) => {
5553
5615
  try {
5554
- r.value = f;
5555
- } catch {
5616
+ i.value = h;
5617
+ } catch (d) {
5618
+ Z("router-link subscription update failed", d);
5556
5619
  }
5557
- });
5558
- } catch {
5620
+ }));
5621
+ } catch (h) {
5622
+ Z("router-link subscribe failed", h);
5559
5623
  }
5624
+ }), Bt(() => {
5625
+ if (typeof o == "function")
5626
+ try {
5627
+ o();
5628
+ } catch (h) {
5629
+ Z("router-link unsubscribe failed", h);
5630
+ }
5560
5631
  });
5561
- const i = be(
5562
- () => r.value.path === n.to
5563
- ), o = be(
5564
- () => n.exact ? i.value : r.value && typeof r.value.path == "string" ? r.value.path.startsWith(n.to) : !1
5565
- ), s = be(
5566
- () => i.value ? `aria-current="${n.ariaCurrentValue}"` : ""
5567
- ), c = (n.class || "").split(/\s+/).filter(Boolean), a = {};
5568
- for (const f of c) a[f] = !0;
5569
- const l = be(() => ({
5570
- ...a,
5571
- [n.activeClass || "active"]: o.value,
5572
- [n.exactActiveClass || "exact-active"]: i.value
5573
- })), m = be(() => n.tag === "button"), y = be(
5574
- () => n.disabled ? m.value ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : ""
5575
- ), p = be(
5576
- () => n.external && (n.tag === "a" || !n.tag) ? 'target="_blank" rel="noopener noreferrer"' : ""
5577
- ), v = (f) => {
5632
+ const s = he(
5633
+ () => i.value.path === n.to
5634
+ ), c = he(
5635
+ () => n.exact ? s.value : i.value && typeof i.value.path == "string" ? i.value.path.startsWith(n.to) : !1
5636
+ ), a = he(() => {
5637
+ const d = (n.linkClass || "").split(/\s+/).filter(Boolean), u = {};
5638
+ for (const g of d) u[g] = !0;
5639
+ return u;
5640
+ }), l = he(() => ({
5641
+ ...a.value,
5642
+ [n.activeClass || "active"]: c.value,
5643
+ [n.exactActiveClass || "exact-active"]: s.value
5644
+ })), m = he(() => n.tag === "button"), y = he(
5645
+ () => s.value ? n.ariaCurrentValue : ""
5646
+ ), p = he(() => !!n.disabled), v = he(
5647
+ () => !!n.external && (n.tag === "a" || !n.tag)
5648
+ ), f = (h) => {
5578
5649
  if (n.disabled) {
5579
- f.preventDefault();
5650
+ h.preventDefault();
5580
5651
  return;
5581
5652
  }
5582
- n.external && (n.tag === "a" || !n.tag) || (f.preventDefault(), n.replace ? t.replace(n.to) : t.push(n.to));
5653
+ n.external && (n.tag === "a" || !n.tag) || (h.preventDefault(), n.replace ? r.replace(n.to) : r.push(n.to));
5583
5654
  };
5584
- return ve`
5585
- ${Jn().when(
5655
+ return be`
5656
+ ${Qn().when(
5586
5657
  m.value,
5587
- ve`
5658
+ be`
5588
5659
  <button
5589
5660
  part="button"
5590
5661
  :class="${l.value}"
5591
- ${s.value}
5592
- ${y.value}
5593
- ${p.value}
5594
- @click="${v}"
5662
+ aria-current="${y.value}"
5663
+ disabled="${p.value ? "" : null}"
5664
+ aria-disabled="${p.value ? "true" : null}"
5665
+ tabindex="${p.value ? "-1" : null}"
5666
+ @click="${f}"
5595
5667
  >
5596
5668
  <slot></slot>
5597
5669
  </button>
5598
5670
  `
5599
5671
  ).otherwise(
5600
- ve`
5672
+ be`
5601
5673
  <a
5602
5674
  part="link"
5603
5675
  href="${n.to}"
5604
5676
  :class="${l.value}"
5605
- ${s.value}
5606
- ${y.value}
5607
- ${p.value}
5608
- @click="${v}"
5677
+ aria-current="${y.value}"
5678
+ aria-disabled="${p.value ? "true" : null}"
5679
+ tabindex="${p.value ? "-1" : null}"
5680
+ target="${v.value ? "_blank" : null}"
5681
+ rel="${v.value ? "noopener noreferrer" : null}"
5682
+ @click="${f}"
5609
5683
  ><slot></slot
5610
5684
  ></a>
5611
5685
  `
@@ -5615,58 +5689,58 @@ function Ir(e) {
5615
5689
  }
5616
5690
  export {
5617
5691
  Ee as GlobalEventBus,
5618
- gr as Transition,
5619
- mr as TransitionGroup,
5620
- q as anchorBlock,
5621
- zt as component,
5622
- be as computed,
5623
- Bt as createStore,
5624
- yr as createTransitionPreset,
5625
- Rn as css,
5626
- de as decodeEntities,
5627
- hr as each,
5628
- Sr as eachGroup,
5629
- Tr as eachPage,
5630
- _r as eachWhere,
5631
- Mr as emit,
5632
- Ie as eventBus,
5633
- bt as getTransitionStyleSheet,
5634
- ve as html,
5635
- Ir as initRouter,
5636
- Hr as listen,
5637
- Jn as match,
5638
- fe as matchRoute,
5639
- Fr as matchRouteSSR,
5640
- pe as mediaVariants,
5641
- Rr as off,
5642
- Nr as on,
5643
- Dr as once,
5644
- Ut as parseQuery,
5645
- $t as ref,
5646
- nt as renderToString,
5647
- ur as resolveRouteComponent,
5648
- lr as responsive,
5649
- rn as responsiveOrder,
5650
- Or as responsiveSwitch,
5651
- Pr as switchOn,
5652
- Ar as switchOnLength,
5653
- jr as switchOnPromise,
5692
+ vr as Transition,
5693
+ wr as TransitionGroup,
5694
+ B as anchorBlock,
5695
+ qt as component,
5696
+ he as computed,
5697
+ Kt as createStore,
5698
+ xr as createTransitionPreset,
5699
+ Fn as css,
5700
+ ue as decodeEntities,
5701
+ br as each,
5702
+ jr as eachGroup,
5703
+ Lr as eachPage,
5704
+ Sr as eachWhere,
5705
+ Rr as emit,
5706
+ We as eventBus,
5707
+ xt as getTransitionStyleSheet,
5708
+ be as html,
5709
+ zr as initRouter,
5710
+ Wr as listen,
5711
+ Qn as match,
5712
+ ve as matchRoute,
5713
+ Ir as matchRouteSSR,
5714
+ de as mediaVariants,
5715
+ Hr as off,
5716
+ Dr as on,
5717
+ Fr as once,
5718
+ Vt as parseQuery,
5719
+ _t as ref,
5720
+ it as renderToString,
5721
+ hr as resolveRouteComponent,
5722
+ pr as responsive,
5723
+ an as responsiveOrder,
5724
+ Mr as responsiveSwitch,
5725
+ Nr as switchOn,
5726
+ Tr as switchOnLength,
5727
+ Or as switchOnPromise,
5654
5728
  He as transitionPresets,
5655
- $r as unless,
5656
- pr as unsafeHTML,
5657
- br as useEmit,
5658
- wr as useOnAttributeChanged,
5659
- It as useOnConnected,
5660
- vr as useOnDisconnected,
5661
- xr as useOnError,
5662
- nr as useProps,
5663
- fr as useRouter,
5664
- kr as useStyle,
5665
- dr as watch,
5666
- Qe as when,
5667
- Cr as whenEmpty,
5729
+ Er as unless,
5730
+ yr as unsafeHTML,
5731
+ kr as useEmit,
5732
+ $r as useOnAttributeChanged,
5733
+ zt as useOnConnected,
5734
+ Bt as useOnDisconnected,
5735
+ Cr as useOnError,
5736
+ or as useProps,
5737
+ gr as useRouter,
5738
+ sr as useStyle,
5739
+ mr as watch,
5740
+ et as when,
5741
+ _r as whenEmpty,
5668
5742
  Q as whenMedia,
5669
- Er as whenNotEmpty,
5670
- Lr as whenVariants
5743
+ Ar as whenNotEmpty,
5744
+ Pr as whenVariants
5671
5745
  };
5672
5746
  //# sourceMappingURL=custom-elements-runtime.es.js.map