@jasonshimmy/custom-elements-runtime 1.0.4 → 1.0.6

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.
@@ -6,8 +6,8 @@ class dt {
6
6
  * Uses component identity to deduplicate multiple render requests for the same component
7
7
  */
8
8
  schedule(t, r) {
9
- const n = r || t.toString();
10
- this.pendingUpdates.set(n, t), this.isFlushScheduled || (this.isFlushScheduled = !0, typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && (window.__vitest__ || window.Cypress) ? this.flush() : queueMicrotask(() => this.flush()));
9
+ const i = r || t.toString();
10
+ this.pendingUpdates.set(i, t), this.isFlushScheduled || (this.isFlushScheduled = !0, typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && (window.__vitest__ || window.Cypress) ? this.flush() : queueMicrotask(() => this.flush()));
11
11
  }
12
12
  /**
13
13
  * Execute all pending updates
@@ -18,8 +18,8 @@ class dt {
18
18
  for (const r of t)
19
19
  try {
20
20
  r();
21
- } catch (n) {
22
- typeof console < "u" && console.error && console.error("Error in batched update:", n);
21
+ } catch (i) {
22
+ typeof console < "u" && console.error && console.error("Error in batched update:", i);
23
23
  }
24
24
  }
25
25
  /**
@@ -29,23 +29,23 @@ class dt {
29
29
  return this.pendingUpdates.size;
30
30
  }
31
31
  }
32
- const pt = new dt();
32
+ const ht = new dt();
33
33
  function fe(e, t) {
34
- pt.schedule(e, t);
34
+ ht.schedule(e, t);
35
35
  }
36
36
  const Fe = /* @__PURE__ */ new WeakSet();
37
- class ht {
37
+ class pt {
38
38
  static cache = /* @__PURE__ */ new WeakMap();
39
39
  static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
40
40
  static objectHandlerCache = /* @__PURE__ */ new WeakMap();
41
41
  /**
42
42
  * Get or create a reactive proxy for an object
43
43
  */
44
- static getOrCreateProxy(t, r, n = !1) {
45
- const i = this.cache.get(t);
46
- if (i)
47
- return i;
48
- const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
44
+ static getOrCreateProxy(t, r, i = !1) {
45
+ const n = this.cache.get(t);
46
+ if (n)
47
+ return n;
48
+ const s = i ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
49
49
  try {
50
50
  nt.markAsProxy(o);
51
51
  } catch {
@@ -58,9 +58,9 @@ class ht {
58
58
  static getOrCreateArrayHandler(t) {
59
59
  if (!this.arrayHandlerCache.has(t)) {
60
60
  const r = {
61
- get: (n, i, s) => {
62
- const o = Reflect.get(n, i, s);
63
- return typeof o == "function" && typeof i == "string" && [
61
+ get: (i, n, s) => {
62
+ const o = Reflect.get(i, n, s);
63
+ return typeof o == "function" && typeof n == "string" && [
64
64
  "push",
65
65
  "pop",
66
66
  "shift",
@@ -70,13 +70,13 @@ class ht {
70
70
  "reverse",
71
71
  "fill",
72
72
  "copyWithin"
73
- ].includes(i) ? function(...u) {
74
- const m = o.apply(n, u);
73
+ ].includes(n) ? function(...u) {
74
+ const m = o.apply(i, u);
75
75
  return t.triggerUpdate(), m;
76
76
  } : o;
77
77
  },
78
- set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
79
- deleteProperty: (n, i) => (delete n[i], t.triggerUpdate(), !0)
78
+ set: (i, n, s) => (i[n] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
79
+ deleteProperty: (i, n) => (delete i[n], t.triggerUpdate(), !0)
80
80
  };
81
81
  this.arrayHandlerCache.set(t, r);
82
82
  }
@@ -88,9 +88,9 @@ class ht {
88
88
  static getOrCreateObjectHandler(t) {
89
89
  if (!this.objectHandlerCache.has(t)) {
90
90
  const r = {
91
- get: (n, i, s) => Reflect.get(n, i, s),
92
- set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
93
- deleteProperty: (n, i) => (delete n[i], t.triggerUpdate(), !0)
91
+ get: (i, n, s) => Reflect.get(i, n, s),
92
+ set: (i, n, s) => (i[n] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
93
+ deleteProperty: (i, n) => (delete i[n], t.triggerUpdate(), !0)
94
94
  };
95
95
  this.objectHandlerCache.set(t, r);
96
96
  }
@@ -127,19 +127,19 @@ class nt {
127
127
  /**
128
128
  * Create an optimized reactive proxy with minimal overhead
129
129
  */
130
- static createReactiveProxy(t, r, n) {
130
+ static createReactiveProxy(t, r, i) {
131
131
  try {
132
132
  if (Fe.has(t)) return t;
133
133
  } catch {
134
134
  }
135
- const i = Array.isArray(t);
135
+ const n = Array.isArray(t);
136
136
  let s = this.contextCache.get(r);
137
137
  s || (s = /* @__PURE__ */ new WeakMap(), this.contextCache.set(r, s));
138
- let o = s.get(n);
138
+ let o = s.get(i);
139
139
  return o || (o = {
140
140
  triggerUpdate: r,
141
- makeReactiveValue: n
142
- }, s.set(n, o)), ht.getOrCreateProxy(t, o, i);
141
+ makeReactiveValue: i
142
+ }, s.set(i, o)), pt.getOrCreateProxy(t, o, n);
143
143
  }
144
144
  /**
145
145
  * Mark an object as a proxy (for optimization)
@@ -198,8 +198,8 @@ class gt {
198
198
  */
199
199
  shouldEmitRenderWarning() {
200
200
  if (!this.currentComponent) return !0;
201
- const t = this.currentComponent, r = this.lastWarningTime.get(t) || 0, n = Date.now();
202
- return n - r < 1e3 ? !1 : (this.lastWarningTime.set(t, n), !0);
201
+ const t = this.currentComponent, r = this.lastWarningTime.get(t) || 0, i = Date.now();
202
+ return i - r < 1e3 ? !1 : (this.lastWarningTime.set(t, i), !0);
203
203
  }
204
204
  /**
205
205
  * Execute a function with tracking disabled
@@ -219,11 +219,11 @@ class gt {
219
219
  getOrCreateState(t) {
220
220
  if (!this.currentComponent)
221
221
  return new He(t);
222
- const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
223
- if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
224
- return this.stateStorage.get(i);
222
+ const r = this.currentComponent, i = this.stateIndexCounter.get(r) || 0, n = `${r}:${i}`;
223
+ if (this.stateIndexCounter.set(r, i + 1), this.stateStorage.has(n))
224
+ return this.stateStorage.get(n);
225
225
  const s = new He(t);
226
- return this.stateStorage.set(i, s), s;
226
+ return this.stateStorage.set(n, s), s;
227
227
  }
228
228
  /**
229
229
  * Track a dependency for the current component
@@ -236,8 +236,8 @@ class gt {
236
236
  */
237
237
  triggerUpdate(t) {
238
238
  t.getDependents().forEach((r) => {
239
- const n = this.componentRenderFunctions.get(r);
240
- n && fe(n, r);
239
+ const i = this.componentRenderFunctions.get(r);
240
+ i && fe(i, r);
241
241
  });
242
242
  }
243
243
  /**
@@ -245,9 +245,9 @@ class gt {
245
245
  */
246
246
  cleanup(t) {
247
247
  const r = this.componentDependencies.get(t);
248
- r && (r.forEach((n) => n.removeDependent(t)), this.componentDependencies.delete(t)), this.componentRenderFunctions.delete(t);
249
- for (const n of Array.from(this.stateStorage.keys()))
250
- n.startsWith(t + ":") && this.stateStorage.delete(n);
248
+ r && (r.forEach((i) => i.removeDependent(t)), this.componentDependencies.delete(t)), this.componentRenderFunctions.delete(t);
249
+ for (const i of Array.from(this.stateStorage.keys()))
250
+ i.startsWith(t + ":") && this.stateStorage.delete(i);
251
251
  this.stateIndexCounter.delete(t);
252
252
  }
253
253
  }
@@ -291,7 +291,7 @@ class He {
291
291
  );
292
292
  }
293
293
  }
294
- function ur(e) {
294
+ function dr(e) {
295
295
  return F.getOrCreateState(e === void 0 ? null : e);
296
296
  }
297
297
  function ee(e) {
@@ -307,7 +307,7 @@ function ee(e) {
307
307
  return !1;
308
308
  }
309
309
  }
310
- function fr(e) {
310
+ function hr(e) {
311
311
  const t = new He(e());
312
312
  return {
313
313
  get value() {
@@ -315,19 +315,19 @@ function fr(e) {
315
315
  }
316
316
  };
317
317
  }
318
- function dr(e, t, r = {}) {
319
- let n = e();
320
- r.immediate && t(n, n);
321
- const i = `watch-${Math.random().toString(36).substr(2, 9)}`, s = () => {
322
- F.setCurrentComponent(i, s);
318
+ function pr(e, t, r = {}) {
319
+ let i = e();
320
+ r.immediate && t(i, i);
321
+ const n = `watch-${Math.random().toString(36).substr(2, 9)}`, s = () => {
322
+ F.setCurrentComponent(n, s);
323
323
  const o = e();
324
- F.clearCurrentComponent(), o !== n && (t(o, n), n = o);
324
+ F.clearCurrentComponent(), o !== i && (t(o, i), i = o);
325
325
  };
326
- return F.setCurrentComponent(i, s), e(), F.clearCurrentComponent(), () => {
327
- F.cleanup(i);
326
+ return F.setCurrentComponent(n, s), e(), F.clearCurrentComponent(), () => {
327
+ F.cleanup(n);
328
328
  };
329
329
  }
330
- const xe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ue = 500;
330
+ const xe = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map(), Ue = 500;
331
331
  function re(e) {
332
332
  if (xe.has(e))
333
333
  return xe.get(e);
@@ -337,13 +337,13 @@ function re(e) {
337
337
  function it(e) {
338
338
  if (ve.has(e))
339
339
  return ve.get(e);
340
- const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
340
+ const t = e.replace(/-([a-z])/g, (r, i) => i.toUpperCase());
341
341
  return ve.size < Ue && ve.set(e, t), t;
342
342
  }
343
343
  function ie(e) {
344
344
  if (typeof e == "string") {
345
- if (ke.has(e))
346
- return ke.get(e);
345
+ if ($e.has(e))
346
+ return $e.get(e);
347
347
  const t = e.replace(
348
348
  /[&<>"']/g,
349
349
  (r) => ({
@@ -354,22 +354,22 @@ function ie(e) {
354
354
  "'": "&#39;"
355
355
  })[r]
356
356
  );
357
- return t !== e && ke.size < Ue && ke.set(e, t), t;
357
+ return t !== e && $e.size < Ue && $e.set(e, t), t;
358
358
  }
359
359
  return e;
360
360
  }
361
361
  function H(e, t) {
362
362
  if (typeof t == "string") {
363
- const r = t.split(".").reduce((n, i) => n?.[i], e);
363
+ const r = t.split(".").reduce((i, n) => i?.[n], e);
364
364
  return ee(r) ? r.value : r;
365
365
  }
366
366
  return t;
367
367
  }
368
- function Ee(e, t, r) {
369
- const n = String(t).split("."), i = n.pop();
370
- if (!i) return;
371
- const s = n.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
372
- ee(s[i]) ? s[i].value = r : s[i] = r;
368
+ function _e(e, t, r) {
369
+ const i = String(t).split("."), n = i.pop();
370
+ if (!n) return;
371
+ const s = i.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
372
+ ee(s[n]) ? s[n].value = r : s[n] = r;
373
373
  }
374
374
  const st = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
375
  function se(e, ...t) {
@@ -380,33 +380,33 @@ function Oe(e, ...t) {
380
380
  }
381
381
  function mt(e, t, r) {
382
382
  if (r)
383
- for (const [n, i] of Object.entries(r)) {
383
+ for (const [i, n] of Object.entries(r)) {
384
384
  let s, o = {};
385
- if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(n, {
385
+ if (Array.isArray(n) ? (s = n[0], o = n[1] || {}) : s = n, t.set(i, {
386
386
  callback: s,
387
387
  options: o,
388
- oldValue: H(e, n)
388
+ oldValue: H(e, i)
389
389
  }), o.immediate)
390
390
  try {
391
- const a = H(e, n);
391
+ const a = H(e, i);
392
392
  s(a, void 0, e);
393
393
  } catch (a) {
394
- se(`Error in immediate watcher for "${n}":`, a);
394
+ se(`Error in immediate watcher for "${i}":`, a);
395
395
  }
396
396
  }
397
397
  }
398
- function yt(e, t, r, n) {
399
- const i = (o, a) => {
398
+ function yt(e, t, r, i) {
399
+ const n = (o, a) => {
400
400
  if (o === a) return !0;
401
401
  if (typeof o != typeof a || typeof o != "object" || o === null || a === null) return !1;
402
402
  if (Array.isArray(o) && Array.isArray(a))
403
- return o.length !== a.length ? !1 : o.every((g, b) => i(g, a[b]));
403
+ return o.length !== a.length ? !1 : o.every((g, b) => n(g, a[b]));
404
404
  const u = Object.keys(o), m = Object.keys(a);
405
- return u.length !== m.length ? !1 : u.every((g) => i(o[g], a[g]));
405
+ return u.length !== m.length ? !1 : u.every((g) => n(o[g], a[g]));
406
406
  }, s = t.get(r);
407
- if (s && !i(n, s.oldValue))
407
+ if (s && !n(i, s.oldValue))
408
408
  try {
409
- s.callback(n, s.oldValue, e), s.oldValue = n;
409
+ s.callback(i, s.oldValue, e), s.oldValue = i;
410
410
  } catch (o) {
411
411
  se(`Error in watcher for "${r}":`, o);
412
412
  }
@@ -414,7 +414,7 @@ function yt(e, t, r, n) {
414
414
  if (a.options.deep && r.startsWith(o + "."))
415
415
  try {
416
416
  const u = H(e, o);
417
- i(u, a.oldValue) || (a.callback(u, a.oldValue, e), a.oldValue = u);
417
+ n(u, a.oldValue) || (a.callback(u, a.oldValue, e), a.oldValue = u);
418
418
  } catch (u) {
419
419
  se(`Error in deep watcher for "${o}":`, u);
420
420
  }
@@ -423,33 +423,33 @@ function Ke(e, t) {
423
423
  return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
424
424
  }
425
425
  function bt(e, t, r) {
426
- t && Object.entries(t).forEach(([n, i]) => {
427
- const s = re(n), o = e.getAttribute(s);
428
- if (i.type === Function && typeof e[n] == "function")
429
- r[n] = e[n];
430
- else if (typeof e[n] < "u")
426
+ t && Object.entries(t).forEach(([i, n]) => {
427
+ const s = re(i), o = e.getAttribute(s);
428
+ if (n.type === Function && typeof e[i] == "function")
429
+ r[i] = e[i];
430
+ else if (typeof e[i] < "u")
431
431
  try {
432
- const a = e[n];
433
- i.type === Boolean && typeof a == "boolean" || i.type === Number && typeof a == "number" || i.type === Function && typeof a == "function" ? r[n] = a : r[n] = ie(Ke(String(a), i.type));
432
+ const a = e[i];
433
+ n.type === Boolean && typeof a == "boolean" || n.type === Number && typeof a == "number" || n.type === Function && typeof a == "function" ? r[i] = a : r[i] = ie(Ke(String(a), n.type));
434
434
  } catch {
435
- r[n] = e[n];
435
+ r[i] = e[i];
436
436
  }
437
- else o !== null ? r[n] = ie(Ke(o, i.type)) : "default" in i && i.default !== void 0 && (r[n] = ie(i.default));
437
+ else o !== null ? r[i] = ie(Ke(o, n.type)) : "default" in n && n.default !== void 0 && (r[i] = ie(n.default));
438
438
  });
439
439
  }
440
440
  function wt(e, t, r) {
441
441
  t.props && bt(e, t.props, r);
442
442
  }
443
- function xt(e, t, r, n) {
444
- e.onConnected && !r && (e.onConnected(t), n(!0));
443
+ function xt(e, t, r, i) {
444
+ e.onConnected && !r && (e.onConnected(t), i(!0));
445
445
  }
446
- function vt(e, t, r, n, i, s, o, a) {
447
- e.onDisconnected && e.onDisconnected(t), r.forEach((u) => u()), n(), i(), s(!1), o(null), a(!1);
446
+ function vt(e, t, r, i, n, s, o, a) {
447
+ e.onDisconnected && e.onDisconnected(t), r.forEach((u) => u()), i(), n(), s(!1), o(null), a(!1);
448
448
  }
449
- function kt(e, t, r, n, i) {
450
- e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
449
+ function $t(e, t, r, i, n) {
450
+ e.onAttributeChanged && e.onAttributeChanged(t, r, i, n);
451
451
  }
452
- class Ct {
452
+ class kt {
453
453
  static cache = /* @__PURE__ */ new Map();
454
454
  static maxCacheSize = 1e3;
455
455
  // Dangerous patterns to block
@@ -471,24 +471,24 @@ class Ct {
471
471
  /XMLHttpRequest/i
472
472
  ];
473
473
  static evaluate(t, r) {
474
- const n = this.cache.get(t);
475
- if (n) {
476
- if (!n.isSecure) {
474
+ const i = this.cache.get(t);
475
+ if (i) {
476
+ if (!i.isSecure) {
477
477
  Oe("Blocked cached dangerous expression:", t);
478
478
  return;
479
479
  }
480
- return n.evaluator(r);
480
+ return i.evaluator(r);
481
481
  }
482
- const i = this.createEvaluator(t);
482
+ const n = this.createEvaluator(t);
483
483
  if (this.cache.size >= this.maxCacheSize) {
484
484
  const s = this.cache.keys().next().value;
485
485
  s && this.cache.delete(s);
486
486
  }
487
- if (this.cache.set(t, i), !i.isSecure) {
487
+ if (this.cache.set(t, n), !n.isSecure) {
488
488
  Oe("Blocked dangerous expression:", t);
489
489
  return;
490
490
  }
491
- return i.evaluator(r);
491
+ return n.evaluator(r);
492
492
  }
493
493
  static createEvaluator(t) {
494
494
  if (this.hasDangerousPatterns(t))
@@ -512,21 +512,21 @@ class Ct {
512
512
  return this.createObjectEvaluator(t);
513
513
  if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
514
514
  const r = t.trim().slice(4);
515
- return (n) => H(n, r);
515
+ return (i) => H(i, r);
516
516
  }
517
517
  return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => H(r, t);
518
518
  }
519
519
  static createObjectEvaluator(t) {
520
- const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
521
- return (i) => {
520
+ const r = t.trim().slice(1, -1), i = this.parseObjectProperties(r);
521
+ return (n) => {
522
522
  const s = {};
523
- for (const { key: o, value: a } of n)
523
+ for (const { key: o, value: a } of i)
524
524
  try {
525
525
  if (a.startsWith("ctx.")) {
526
526
  const u = a.slice(4);
527
- s[o] = H(i, u);
527
+ s[o] = H(n, u);
528
528
  } else
529
- s[o] = this.evaluateSimpleValue(a, i);
529
+ s[o] = this.evaluateSimpleValue(a, n);
530
530
  } catch {
531
531
  s[o] = void 0;
532
532
  }
@@ -534,11 +534,11 @@ class Ct {
534
534
  };
535
535
  }
536
536
  static parseObjectProperties(t) {
537
- const r = [], n = t.split(",");
538
- for (const i of n) {
539
- const s = i.indexOf(":");
537
+ const r = [], i = t.split(",");
538
+ for (const n of i) {
539
+ const s = n.indexOf(":");
540
540
  if (s === -1) continue;
541
- const o = i.slice(0, s).trim(), a = i.slice(s + 1).trim(), u = o.replace(/^['"]|['"]$/g, "");
541
+ const o = n.slice(0, s).trim(), a = n.slice(s + 1).trim(), u = o.replace(/^['"]|['"]$/g, "");
542
542
  r.push({ key: u, value: a });
543
543
  }
544
544
  return r;
@@ -546,39 +546,39 @@ class Ct {
546
546
  static createSimpleEvaluator(t) {
547
547
  return (r) => {
548
548
  try {
549
- let n = t;
550
- const i = [];
551
- n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
552
- const s = n.match(/ctx\.[\w.]+/g) || [];
549
+ let i = t;
550
+ const n = [];
551
+ i = i.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${n.push(b) - 1}#>>`);
552
+ const s = i.match(/ctx\.[\w.]+/g) || [];
553
553
  for (const b of s) {
554
- const h = b.slice(4), l = H(r, h);
554
+ const p = b.slice(4), l = H(r, p);
555
555
  if (l === void 0) return;
556
- const d = i.push(JSON.stringify(l)) - 1;
557
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
556
+ const d = n.push(JSON.stringify(l)) - 1;
557
+ i = i.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
558
558
  }
559
- const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, a = n.match(o) || [];
559
+ const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, a = i.match(o) || [];
560
560
  for (const b of a) {
561
561
  if (b.startsWith("ctx.")) continue;
562
- const h = H(r, b);
563
- if (h === void 0) return;
564
- const l = i.push(JSON.stringify(h)) - 1;
565
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
562
+ const p = H(r, b);
563
+ if (p === void 0) return;
564
+ const l = n.push(JSON.stringify(p)) - 1;
565
+ i = i.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
566
566
  }
567
567
  const u = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
568
568
  let m;
569
569
  const g = /* @__PURE__ */ new Set();
570
- for (; (m = u.exec(n)) !== null; ) {
570
+ for (; (m = u.exec(i)) !== null; ) {
571
571
  const b = m[1];
572
572
  if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || g.has(b)) continue;
573
573
  g.add(b);
574
- const h = H(r, b);
575
- if (h === void 0) return;
576
- const l = JSON.stringify(h), d = i.push(l) - 1;
577
- b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${d}#>>`);
574
+ const p = H(r, b);
575
+ if (p === void 0) return;
576
+ const l = JSON.stringify(p), d = n.push(l) - 1;
577
+ b.includes(".") ? i = i.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`) : i = i.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${d}#>>`);
578
578
  }
579
- n = n.replace(/<<#(\d+)#>>/g, (b, h) => i[Number(h)]);
579
+ i = i.replace(/<<#(\d+)#>>/g, (b, p) => n[Number(p)]);
580
580
  try {
581
- return this.evaluateBasicExpression(n);
581
+ return this.evaluateBasicExpression(i);
582
582
  } catch {
583
583
  return;
584
584
  }
@@ -594,55 +594,55 @@ class Ct {
594
594
  */
595
595
  static evaluateBasicExpression(t) {
596
596
  const r = this.tokenize(t);
597
- let n = 0;
598
- function i() {
599
- return r[n];
597
+ let i = 0;
598
+ function n() {
599
+ return r[i];
600
600
  }
601
601
  function s(c) {
602
- const p = r[n++];
603
- if (c && !p)
602
+ const h = r[i++];
603
+ if (c && !h)
604
604
  throw new Error(`Unexpected token EOF, expected ${c}`);
605
- if (c && p && p.type !== c && p.value !== c)
606
- throw new Error(`Unexpected token ${p.type}/${p.value}, expected ${c}`);
607
- return p;
605
+ if (c && h && h.type !== c && h.value !== c)
606
+ throw new Error(`Unexpected token ${h.type}/${h.value}, expected ${c}`);
607
+ return h;
608
608
  }
609
609
  function o() {
610
610
  return a();
611
611
  }
612
612
  function a() {
613
613
  let c = u();
614
- if (i() && i().value === "?") {
614
+ if (n() && n().value === "?") {
615
615
  s("?");
616
- const p = o();
616
+ const h = o();
617
617
  s(":");
618
618
  const y = o();
619
- return c ? p : y;
619
+ return c ? h : y;
620
620
  }
621
621
  return c;
622
622
  }
623
623
  function u() {
624
624
  let c = m();
625
- for (; i() && i().value === "||"; ) {
625
+ for (; n() && n().value === "||"; ) {
626
626
  s("OP");
627
- const p = m();
628
- c = c || p;
627
+ const h = m();
628
+ c = c || h;
629
629
  }
630
630
  return c;
631
631
  }
632
632
  function m() {
633
633
  let c = g();
634
- for (; i() && i().value === "&&"; ) {
634
+ for (; n() && n().value === "&&"; ) {
635
635
  s("OP");
636
- const p = g();
637
- c = c && p;
636
+ const h = g();
637
+ c = c && h;
638
638
  }
639
639
  return c;
640
640
  }
641
641
  function g() {
642
642
  let c = b();
643
- for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
644
- const p = s("OP").value, y = b();
645
- switch (p) {
643
+ for (; n() && ["==", "!=", "===", "!=="].includes(n().value); ) {
644
+ const h = s("OP").value, y = b();
645
+ switch (h) {
646
646
  case "==":
647
647
  c = c == y;
648
648
  break;
@@ -660,10 +660,10 @@ class Ct {
660
660
  return c;
661
661
  }
662
662
  function b() {
663
- let c = h();
664
- for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
665
- const p = s("OP").value, y = h();
666
- switch (p) {
663
+ let c = p();
664
+ for (; n() && [">", "<", ">=", "<="].includes(n().value); ) {
665
+ const h = s("OP").value, y = p();
666
+ switch (h) {
667
667
  case ">":
668
668
  c = c > y;
669
669
  break;
@@ -680,19 +680,19 @@ class Ct {
680
680
  }
681
681
  return c;
682
682
  }
683
- function h() {
683
+ function p() {
684
684
  let c = l();
685
- for (; i() && (i().value === "+" || i().value === "-"); ) {
686
- const p = s("OP").value, y = l();
687
- c = p === "+" ? c + y : c - y;
685
+ for (; n() && (n().value === "+" || n().value === "-"); ) {
686
+ const h = s("OP").value, y = l();
687
+ c = h === "+" ? c + y : c - y;
688
688
  }
689
689
  return c;
690
690
  }
691
691
  function l() {
692
692
  let c = d();
693
- for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
694
- const p = s("OP").value, y = d();
695
- switch (p) {
693
+ for (; n() && (n().value === "*" || n().value === "/" || n().value === "%"); ) {
694
+ const h = s("OP").value, y = d();
695
+ switch (h) {
696
696
  case "*":
697
697
  c = c * y;
698
698
  break;
@@ -707,10 +707,10 @@ class Ct {
707
707
  return c;
708
708
  }
709
709
  function d() {
710
- return i() && i().value === "!" ? (s("OP"), !d()) : i() && i().value === "-" ? (s("OP"), -d()) : x();
710
+ return n() && n().value === "!" ? (s("OP"), !d()) : n() && n().value === "-" ? (s("OP"), -d()) : x();
711
711
  }
712
712
  function x() {
713
- const c = i();
713
+ const c = n();
714
714
  if (c) {
715
715
  if (c.type === "NUMBER")
716
716
  return s("NUMBER"), Number(c.value);
@@ -720,15 +720,15 @@ class Ct {
720
720
  return s("IDENT"), c.value === "true" ? !0 : c.value === "false" ? !1 : c.value === "null" ? null : void 0;
721
721
  if (c.value === "[") {
722
722
  s("PUNC");
723
- const p = [];
724
- for (; i() && i().value !== "]"; )
725
- p.push(o()), i() && i().value === "," && s("PUNC");
726
- return s("PUNC"), p;
723
+ const h = [];
724
+ for (; n() && n().value !== "]"; )
725
+ h.push(o()), n() && n().value === "," && s("PUNC");
726
+ return s("PUNC"), h;
727
727
  }
728
728
  if (c.value === "(") {
729
729
  s("PUNC");
730
- const p = o();
731
- return s("PUNC"), p;
730
+ const h = o();
731
+ return s("PUNC"), h;
732
732
  }
733
733
  throw new Error("Unexpected token in expression");
734
734
  }
@@ -736,10 +736,10 @@ class Ct {
736
736
  return o();
737
737
  }
738
738
  static tokenize(t) {
739
- const r = [], n = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
740
- let i;
741
- for (; (i = n.exec(t)) !== null; ) {
742
- const s = i[1];
739
+ const r = [], i = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,\[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"[^"]*"|'[^']*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
740
+ let n;
741
+ for (; (n = i.exec(t)) !== null; ) {
742
+ const s = n[1];
743
743
  s && (/^\d/.test(s) ? r.push({ type: "NUMBER", value: s }) : /^"/.test(s) || /^'/.test(s) ? r.push({ type: "STRING", value: s }) : /^[a-zA-Z_]/.test(s) ? r.push({ type: "IDENT", value: s }) : /^[()?:,\[\]]$/.test(s) ? r.push({ type: "PUNC", value: s }) : r.push({ type: "OP", value: s }));
744
744
  }
745
745
  return r;
@@ -749,8 +749,8 @@ class Ct {
749
749
  if (t === "false") return !1;
750
750
  if (!isNaN(Number(t))) return Number(t);
751
751
  if (t.startsWith("ctx.")) {
752
- const n = t.slice(4);
753
- return H(r, n);
752
+ const i = t.slice(4);
753
+ return H(r, i);
754
754
  }
755
755
  return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
756
756
  }
@@ -766,9 +766,9 @@ class oe {
766
766
  /**
767
767
  * Add an event listener with automatic cleanup tracking
768
768
  */
769
- static addListener(t, r, n, i) {
770
- t.addEventListener(r, n, i);
771
- const o = { event: r, handler: n, options: i, cleanup: () => t.removeEventListener(r, n, i), addedAt: Date.now() };
769
+ static addListener(t, r, i, n) {
770
+ t.addEventListener(r, i, n);
771
+ const o = { event: r, handler: i, options: n, cleanup: () => t.removeEventListener(r, i, n), addedAt: Date.now() };
772
772
  this.cleanupFunctions.has(t) || this.cleanupFunctions.set(t, []);
773
773
  const a = this.cleanupFunctions.get(t);
774
774
  a.push(o), this.cleanupFunctions.get(t).__metaList = a;
@@ -776,13 +776,13 @@ class oe {
776
776
  /**
777
777
  * Remove a specific event listener
778
778
  */
779
- static removeListener(t, r, n, i) {
780
- t.removeEventListener(r, n, i);
779
+ static removeListener(t, r, i, n) {
780
+ t.removeEventListener(r, i, n);
781
781
  const s = this.cleanupFunctions.get(t);
782
782
  if (s) {
783
783
  const o = s.__metaList || null;
784
784
  if (o) {
785
- const a = o.findIndex((u) => u.event === r && u.handler === n && JSON.stringify(u.options) === JSON.stringify(i));
785
+ const a = o.findIndex((u) => u.event === r && u.handler === i && JSON.stringify(u.options) === JSON.stringify(n));
786
786
  if (a >= 0) {
787
787
  try {
788
788
  o[a].cleanup();
@@ -802,9 +802,9 @@ class oe {
802
802
  */
803
803
  static cleanup(t) {
804
804
  const r = this.cleanupFunctions.get(t);
805
- r && ((r.__metaList || r).forEach((i) => {
805
+ r && ((r.__metaList || r).forEach((n) => {
806
806
  try {
807
- typeof i == "function" ? i() : i && typeof i.cleanup == "function" && i.cleanup();
807
+ typeof n == "function" ? n() : n && typeof n.cleanup == "function" && n.cleanup();
808
808
  } catch (s) {
809
809
  console.error("Error during event cleanup:", s);
810
810
  }
@@ -824,15 +824,15 @@ class oe {
824
824
  * Check if an element has any tracked event listeners
825
825
  */
826
826
  static hasListeners(t) {
827
- const r = this.cleanupFunctions.get(t), n = r ? r.__metaList || r : void 0;
828
- return !!(n && n.length > 0);
827
+ const r = this.cleanupFunctions.get(t), i = r ? r.__metaList || r : void 0;
828
+ return !!(i && i.length > 0);
829
829
  }
830
830
  /**
831
831
  * Get the number of tracked event listeners for an element
832
832
  */
833
833
  static getListenerCount(t) {
834
- const r = this.cleanupFunctions.get(t), n = r ? r.__metaList || r : void 0;
835
- return n ? n.length : 0;
834
+ const r = this.cleanupFunctions.get(t), i = r ? r.__metaList || r : void 0;
835
+ return i ? i.length : 0;
836
836
  }
837
837
  }
838
838
  function ue(e, t) {
@@ -844,38 +844,38 @@ function ue(e, t) {
844
844
  ue(r, t);
845
845
  }
846
846
  }
847
- function he(e, t, r) {
847
+ function pe(e, t, r) {
848
848
  if (typeof e == "string") return;
849
- const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
- n ? n.value = t : i && r && (r[i] = t);
849
+ const i = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), n = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
+ i ? i.value = t : n && r && (r[n] = t);
851
851
  }
852
- function _t(e, t, r, n, i, s, o, a) {
852
+ function Ct(e, t, r, i, n, s, o, a) {
853
853
  if (!s) return;
854
- const u = t.includes("lazy"), m = t.includes("trim"), g = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", h = () => {
854
+ const u = t.includes("lazy"), m = t.includes("trim"), g = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", p = () => {
855
855
  if (b) {
856
- const C = e.value;
857
- return a && typeof C == "object" && C !== null ? C[a] : C;
856
+ const k = e.value;
857
+ return a && typeof k == "object" && k !== null ? k[a] : k;
858
858
  }
859
859
  return H(s._state || s, e);
860
- }, l = h();
860
+ }, l = p();
861
861
  let d = "text";
862
- o instanceof HTMLInputElement ? d = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? d = "select" : o instanceof HTMLTextAreaElement && (d = "textarea");
862
+ o instanceof HTMLInputElement ? d = i?.type || o.type || "text" : o instanceof HTMLSelectElement ? d = "select" : o instanceof HTMLTextAreaElement && (d = "textarea");
863
863
  const x = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, c = x ? d === "checkbox" || d === "radio" ? "checked" : "value" : a ?? "modelValue";
864
864
  if (d === "checkbox")
865
865
  if (Array.isArray(l))
866
- r[c] = l.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
866
+ r[c] = l.includes(String(o?.getAttribute("value") ?? i?.value ?? ""));
867
867
  else {
868
- const C = o?.getAttribute("true-value") ?? !0;
869
- r[c] = l === C;
868
+ const k = o?.getAttribute("true-value") ?? !0;
869
+ r[c] = l === k;
870
870
  }
871
871
  else if (d === "radio")
872
- r[c] = l === (n?.value ?? "");
872
+ r[c] = l === (i?.value ?? "");
873
873
  else if (d === "select")
874
874
  if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
875
- const C = Array.isArray(l) ? l.map(String) : [];
875
+ const k = Array.isArray(l) ? l.map(String) : [];
876
876
  setTimeout(() => {
877
- Array.from(o.options).forEach((k) => {
878
- k.selected = C.includes(k.value);
877
+ Array.from(o.options).forEach(($) => {
878
+ $.selected = k.includes($.value);
879
879
  });
880
880
  }, 0), r[c] = Array.isArray(l) ? l : [];
881
881
  } else
@@ -883,20 +883,20 @@ function _t(e, t, r, n, i, s, o, a) {
883
883
  else {
884
884
  r[c] = l;
885
885
  try {
886
- const C = re(c);
887
- n && (n[C] = l);
886
+ const k = re(c);
887
+ i && (i[k] = l);
888
888
  } catch {
889
889
  }
890
890
  }
891
- const p = u || d === "checkbox" || d === "radio" || d === "select" ? "change" : "input", y = (C) => {
892
- if (C.isComposing || i._isComposing) return;
893
- const k = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
- if (C.isTrusted === !1 && !k) return;
895
- const f = C.target;
891
+ const h = u || d === "checkbox" || d === "radio" || d === "select" ? "change" : "input", y = (k) => {
892
+ if (k.isComposing || n._isComposing) return;
893
+ const $ = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
+ if (k.isTrusted === !1 && !$) return;
895
+ const f = k.target;
896
896
  if (!f || f._modelUpdating) return;
897
897
  let v = f.value;
898
898
  if (d === "checkbox") {
899
- const T = h();
899
+ const T = p();
900
900
  if (Array.isArray(T)) {
901
901
  const R = f.getAttribute("value") ?? "", S = Array.from(T);
902
902
  if (f.checked)
@@ -918,8 +918,8 @@ function _t(e, t, r, n, i, s, o, a) {
918
918
  const T = Number(v);
919
919
  isNaN(T) || (v = T);
920
920
  }
921
- const A = s._state || s, _ = h();
922
- if (Array.isArray(v) && Array.isArray(_) ? JSON.stringify([...v].sort()) !== JSON.stringify([..._].sort()) : v !== _) {
921
+ const A = s._state || s, C = p();
922
+ if (Array.isArray(v) && Array.isArray(C) ? JSON.stringify([...v].sort()) !== JSON.stringify([...C].sort()) : v !== C) {
923
923
  f._modelUpdating = !0;
924
924
  try {
925
925
  if (b)
@@ -929,7 +929,7 @@ function _t(e, t, r, n, i, s, o, a) {
929
929
  } else
930
930
  e.value = v;
931
931
  else
932
- Ee(A, e, v);
932
+ _e(A, e, v);
933
933
  if (s._requestRender && s._requestRender(), s._triggerWatchers) {
934
934
  const T = b ? "reactiveState" : e;
935
935
  s._triggerWatchers(T, v);
@@ -948,52 +948,52 @@ function _t(e, t, r, n, i, s, o, a) {
948
948
  }
949
949
  };
950
950
  if (x) {
951
- if (i[p]) {
952
- const C = i[p];
953
- o && oe.removeListener(o, p, C);
951
+ if (n[h]) {
952
+ const k = n[h];
953
+ o && oe.removeListener(o, h, k);
954
954
  }
955
- i[p] = y;
955
+ n[h] = y;
956
956
  } else {
957
- const C = `update:${re(c)}`;
958
- if (i[C]) {
959
- const k = i[C];
960
- o && oe.removeListener(o, C, k);
957
+ const k = `update:${re(c)}`;
958
+ if (n[k]) {
959
+ const $ = n[k];
960
+ o && oe.removeListener(o, k, $);
961
961
  }
962
- i[C] = (k) => {
963
- const f = s._state || s, v = k.detail !== void 0 ? k.detail : k.target?.value, A = H(f, e);
962
+ n[k] = ($) => {
963
+ const f = s._state || s, v = $.detail !== void 0 ? $.detail : $.target?.value, A = H(f, e);
964
964
  if (Array.isArray(v) && Array.isArray(A) ? JSON.stringify([...v].sort()) !== JSON.stringify([...A].sort()) : v !== A) {
965
- Ee(f, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
966
- const $ = k.target;
967
- if ($) {
968
- $[c] = v;
965
+ _e(f, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
966
+ const E = $.target;
967
+ if (E) {
968
+ E[c] = v;
969
969
  try {
970
970
  const T = re(c);
971
- typeof v == "boolean" ? v ? $.setAttribute(T, "true") : $.setAttribute(T, "false") : $.setAttribute(T, String(v));
971
+ typeof v == "boolean" ? v ? E.setAttribute(T, "true") : E.setAttribute(T, "false") : E.setAttribute(T, String(v));
972
972
  } catch {
973
973
  }
974
974
  queueMicrotask(() => {
975
- typeof $._applyProps == "function" && $._applyProps($._cfg), typeof $._requestRender == "function" && $._requestRender();
975
+ typeof E._applyProps == "function" && E._applyProps(E._cfg), typeof E._requestRender == "function" && E._requestRender();
976
976
  });
977
977
  }
978
978
  }
979
979
  };
980
980
  }
981
- (d === "text" || d === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (C) => {
982
- i._isComposing = !1;
983
- const k = C.target;
984
- k && setTimeout(() => {
985
- const f = k.value, v = s._state || s, A = H(v, e);
986
- let _ = f;
987
- if (m && (_ = _.trim()), g) {
988
- const T = Number(_);
989
- isNaN(T) || (_ = T);
981
+ (d === "text" || d === "textarea") && (n.compositionstart = (() => n._isComposing = !0), n.compositionend = (k) => {
982
+ n._isComposing = !1;
983
+ const $ = k.target;
984
+ $ && setTimeout(() => {
985
+ const f = $.value, v = s._state || s, A = H(v, e);
986
+ let C = f;
987
+ if (m && (C = C.trim()), g) {
988
+ const T = Number(C);
989
+ isNaN(T) || (C = T);
990
990
  }
991
- if (Array.isArray(_) && Array.isArray(A) ? JSON.stringify([..._].sort()) !== JSON.stringify([...A].sort()) : _ !== A) {
992
- k._modelUpdating = !0;
991
+ if (Array.isArray(C) && Array.isArray(A) ? JSON.stringify([...C].sort()) !== JSON.stringify([...A].sort()) : C !== A) {
992
+ $._modelUpdating = !0;
993
993
  try {
994
- Ee(v, e, _), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, _);
994
+ _e(v, e, C), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, C);
995
995
  } finally {
996
- setTimeout(() => k._modelUpdating = !1, 0);
996
+ setTimeout(() => $._modelUpdating = !1, 0);
997
997
  }
998
998
  }
999
999
  }, 0);
@@ -1003,85 +1003,85 @@ function ot(e) {
1003
1003
  const t = e.slice(2);
1004
1004
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
1005
1005
  }
1006
- function Et(e, t, r, n) {
1006
+ function _t(e, t, r, i) {
1007
1007
  if (typeof e == "object" && e !== null)
1008
- for (const [i, s] of Object.entries(e))
1009
- i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
1008
+ for (const [n, s] of Object.entries(e))
1009
+ n.startsWith("data-") || n.startsWith("aria-") || n === "class" ? r[n] = s : t[n] = s;
1010
1010
  else if (typeof e == "string") {
1011
- if (!n) return;
1011
+ if (!i) return;
1012
1012
  try {
1013
- const i = me(e, n);
1014
- if (typeof i == "object" && i !== null) {
1015
- for (const [s, o] of Object.entries(i))
1013
+ const n = me(e, i);
1014
+ if (typeof n == "object" && n !== null) {
1015
+ for (const [s, o] of Object.entries(n))
1016
1016
  s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? r[s] = o : t[s] = o;
1017
1017
  return;
1018
1018
  } else {
1019
- r[e] = i;
1019
+ r[e] = n;
1020
1020
  return;
1021
1021
  }
1022
1022
  } catch {
1023
- const i = H(n, e);
1024
- r[e] = i;
1023
+ const n = H(i, e);
1024
+ r[e] = n;
1025
1025
  }
1026
1026
  }
1027
1027
  }
1028
- function $t(e, t, r) {
1029
- let n;
1028
+ function Et(e, t, r) {
1029
+ let i;
1030
1030
  if (typeof e == "string") {
1031
1031
  if (!r) return;
1032
- n = me(e, r);
1032
+ i = me(e, r);
1033
1033
  } else
1034
- n = e;
1035
- const i = t.style || "";
1036
- let s = i;
1037
- if (n) {
1038
- if (i) {
1039
- const o = i.split(";").map((u) => u.trim()).filter(Boolean), a = o.findIndex(
1034
+ i = e;
1035
+ const n = t.style || "";
1036
+ let s = n;
1037
+ if (i) {
1038
+ if (n) {
1039
+ const o = n.split(";").map((u) => u.trim()).filter(Boolean), a = o.findIndex(
1040
1040
  (u) => u.startsWith("display:")
1041
1041
  );
1042
1042
  a >= 0 && o[a] === "display: none" && (o.splice(a, 1), s = o.length > 0 ? o.join("; ") + ";" : "");
1043
1043
  }
1044
- } else if (i) {
1045
- const o = i.split(";").filter(Boolean), a = o.findIndex(
1044
+ } else if (n) {
1045
+ const o = n.split(";").filter(Boolean), a = o.findIndex(
1046
1046
  (u) => u.trim().startsWith("display:")
1047
1047
  );
1048
1048
  a >= 0 ? o[a] = "display: none" : o.push("display: none"), s = o.join("; ");
1049
1049
  } else
1050
1050
  s = "display: none";
1051
- s !== i && (s ? t.style = s : delete t.style);
1051
+ s !== n && (s ? t.style = s : delete t.style);
1052
1052
  }
1053
1053
  function me(e, t) {
1054
- return Ct.evaluate(e, t);
1054
+ return kt.evaluate(e, t);
1055
1055
  }
1056
1056
  function St(e, t, r) {
1057
- let n;
1057
+ let i;
1058
1058
  if (typeof e == "string") {
1059
1059
  if (!r) return;
1060
- n = me(e, r);
1060
+ i = me(e, r);
1061
1061
  } else
1062
- n = e;
1063
- let i = [];
1064
- typeof n == "string" ? i = [n] : Array.isArray(n) ? i = n.filter(Boolean) : typeof n == "object" && n !== null && (i = Object.entries(n).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
1065
- const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
1062
+ i = e;
1063
+ let n = [];
1064
+ typeof i == "string" ? n = [i] : Array.isArray(i) ? n = i.filter(Boolean) : typeof i == "object" && i !== null && (n = Object.entries(i).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
1065
+ const s = t.class || "", o = s ? `${s} ${n.join(" ")}`.trim() : n.join(" ");
1066
1066
  o && (t.class = o);
1067
1067
  }
1068
1068
  function At(e, t, r) {
1069
- let n;
1069
+ let i;
1070
1070
  if (typeof e == "string") {
1071
1071
  if (!r) return;
1072
- n = me(e, r);
1072
+ i = me(e, r);
1073
1073
  } else
1074
- n = e;
1075
- let i = "";
1076
- if (typeof n == "string")
1077
- i = n;
1078
- else if (n && typeof n == "object") {
1074
+ i = e;
1075
+ let n = "";
1076
+ if (typeof i == "string")
1077
+ n = i;
1078
+ else if (i && typeof i == "object") {
1079
1079
  const o = [];
1080
- for (const [a, u] of Object.entries(n))
1080
+ for (const [a, u] of Object.entries(i))
1081
1081
  if (u != null && u !== "") {
1082
1082
  const m = a.replace(
1083
1083
  /[A-Z]/g,
1084
- (h) => `-${h.toLowerCase()}`
1084
+ (p) => `-${p.toLowerCase()}`
1085
1085
  ), g = [
1086
1086
  "width",
1087
1087
  "height",
@@ -1111,26 +1111,26 @@ function At(e, t, r) {
1111
1111
  let b = String(u);
1112
1112
  typeof u == "number" && g.includes(m) && (b = `${u}px`), o.push(`${m}: ${b}`);
1113
1113
  }
1114
- i = o.join("; ") + (o.length > 0 ? ";" : "");
1114
+ n = o.join("; ") + (o.length > 0 ? ";" : "");
1115
1115
  }
1116
1116
  const s = t.style || "";
1117
- t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
1117
+ t.style = s + (s && !s.endsWith(";") ? "; " : "") + n;
1118
1118
  }
1119
1119
  function Tt(e, t, r) {
1120
- let n = e;
1121
- typeof e == "string" && r && (n = me(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1120
+ let i = e;
1121
+ typeof e == "string" && r && (i = me(e, r)), ee(i) ? t.reactiveRef = i : t.ref = i;
1122
1122
  }
1123
- function at(e, t, r, n) {
1124
- const i = {}, s = { ...n || {} }, o = {};
1123
+ function at(e, t, r, i) {
1124
+ const n = {}, s = { ...i || {} }, o = {};
1125
1125
  for (const [a, u] of Object.entries(e)) {
1126
1126
  const { value: m, modifiers: g, arg: b } = u;
1127
1127
  if (a === "model" || a.startsWith("model:")) {
1128
- const h = a.split(":"), l = h.length > 1 ? h[1] : b;
1129
- _t(
1128
+ const p = a.split(":"), l = p.length > 1 ? p[1] : b;
1129
+ Ct(
1130
1130
  m,
1131
1131
  // Pass the original value (could be string or reactive state object)
1132
1132
  g,
1133
- i,
1133
+ n,
1134
1134
  s,
1135
1135
  o,
1136
1136
  t,
@@ -1141,10 +1141,10 @@ function at(e, t, r, n) {
1141
1141
  }
1142
1142
  switch (a) {
1143
1143
  case "bind":
1144
- Et(m, i, s, t);
1144
+ _t(m, n, s, t);
1145
1145
  break;
1146
1146
  case "show":
1147
- $t(m, s, t);
1147
+ Et(m, s, t);
1148
1148
  break;
1149
1149
  case "class":
1150
1150
  St(m, s, t);
@@ -1153,11 +1153,11 @@ function at(e, t, r, n) {
1153
1153
  At(m, s, t);
1154
1154
  break;
1155
1155
  case "ref":
1156
- Tt(m, i, t);
1156
+ Tt(m, n, t);
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
- return { props: i, attrs: s, listeners: o };
1160
+ return { props: n, attrs: s, listeners: o };
1161
1161
  }
1162
1162
  function Be(e, t) {
1163
1163
  if (Array.isArray(e)) {
@@ -1188,13 +1188,13 @@ function Be(e, t) {
1188
1188
  });
1189
1189
  }
1190
1190
  const r = e;
1191
- let n = r.props?.key ?? r.key ?? t, i = r.children;
1192
- return Array.isArray(i) && (i = Be(i, n)), { ...r, key: n, children: i };
1191
+ let i = r.props?.key ?? r.key ?? t, n = r.children;
1192
+ return Array.isArray(n) && (n = Be(n, i)), { ...r, key: i, children: n };
1193
1193
  }
1194
- function Ve(e, t, r, n) {
1195
- const i = r.directives ?? {}, s = at(
1196
- i,
1194
+ function Ve(e, t, r, i) {
1195
+ const n = r.directives ?? {}, s = at(
1197
1196
  n,
1197
+ i,
1198
1198
  e,
1199
1199
  r.attrs
1200
1200
  ), o = {
@@ -1231,12 +1231,12 @@ function Ve(e, t, r, n) {
1231
1231
  s.listeners || {}
1232
1232
  ))
1233
1233
  oe.addListener(e, d, x);
1234
- const h = t.attrs ?? {}, l = a;
1235
- for (const d in { ...h, ...l }) {
1236
- const x = h[d], w = l[d];
1237
- let c = x, p = w;
1238
- if (ee(x) && (c = x.value), ee(w) && (p = w.value), c !== p)
1239
- if (b = !0, p == null || p === !1) {
1234
+ const p = t.attrs ?? {}, l = a;
1235
+ for (const d in { ...p, ...l }) {
1236
+ const x = p[d], w = l[d];
1237
+ let c = x, h = w;
1238
+ if (ee(x) && (c = x.value), ee(w) && (h = w.value), c !== h)
1239
+ if (b = !0, h == null || h === !1) {
1240
1240
  if (e.removeAttribute(d), d === "value") {
1241
1241
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
1242
1242
  try {
@@ -1268,20 +1268,20 @@ function Ve(e, t, r, n) {
1268
1268
  if (d === "value") {
1269
1269
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1270
1270
  try {
1271
- e.value = p ?? "";
1271
+ e.value = h ?? "";
1272
1272
  } catch {
1273
- e.setAttribute(d, String(p));
1273
+ e.setAttribute(d, String(h));
1274
1274
  }
1275
1275
  continue;
1276
1276
  } else if (e instanceof HTMLSelectElement) {
1277
1277
  try {
1278
- e.value = p ?? "";
1278
+ e.value = h ?? "";
1279
1279
  } catch {
1280
1280
  }
1281
1281
  continue;
1282
1282
  } else if (e instanceof HTMLProgressElement) {
1283
1283
  try {
1284
- e.value = Number(p);
1284
+ e.value = Number(h);
1285
1285
  } catch {
1286
1286
  }
1287
1287
  continue;
@@ -1289,31 +1289,31 @@ function Ve(e, t, r, n) {
1289
1289
  }
1290
1290
  if (d === "checked" && e instanceof HTMLInputElement) {
1291
1291
  try {
1292
- e.checked = !!p;
1292
+ e.checked = !!h;
1293
1293
  } catch {
1294
1294
  }
1295
1295
  continue;
1296
1296
  }
1297
1297
  if (d === "style") {
1298
- e.setAttribute(d, String(p));
1298
+ e.setAttribute(d, String(h));
1299
1299
  continue;
1300
1300
  }
1301
1301
  const y = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
1302
  if (g && !y && d.includes("-")) {
1303
- const C = it(d);
1303
+ const k = it(d);
1304
1304
  try {
1305
- e[C] = p;
1305
+ e[k] = h;
1306
1306
  } catch {
1307
- e.setAttribute(d, String(p));
1307
+ e.setAttribute(d, String(h));
1308
1308
  }
1309
1309
  } else if (!y && d in e)
1310
1310
  try {
1311
- e[d] = p;
1311
+ e[d] = h;
1312
1312
  } catch {
1313
- e.setAttribute(d, String(p));
1313
+ e.setAttribute(d, String(h));
1314
1314
  }
1315
1315
  else
1316
- e.setAttribute(d, String(p));
1316
+ e.setAttribute(d, String(h));
1317
1317
  }
1318
1318
  }
1319
1319
  if (g && b)
@@ -1331,94 +1331,94 @@ function X(e, t, r) {
1331
1331
  if (typeof e == "string")
1332
1332
  return document.createTextNode(e);
1333
1333
  if (e.tag === "#text") {
1334
- const h = document.createTextNode(
1334
+ const p = document.createTextNode(
1335
1335
  typeof e.children == "string" ? e.children : ""
1336
1336
  );
1337
- return e.key != null && (h.key = e.key), h;
1337
+ return e.key != null && (p.key = e.key), p;
1338
1338
  }
1339
1339
  if (e.tag === "#anchor") {
1340
- const h = e, l = Array.isArray(h.children) ? h.children : [], d = document.createTextNode(""), x = document.createTextNode("");
1341
- h.key != null && (d.key = `${h.key}:start`, x.key = `${h.key}:end`), h._startNode = d, h._endNode = x;
1340
+ const p = e, l = Array.isArray(p.children) ? p.children : [], d = document.createTextNode(""), x = document.createTextNode("");
1341
+ p.key != null && (d.key = `${p.key}:start`, x.key = `${p.key}:end`), p._startNode = d, p._endNode = x;
1342
1342
  const w = document.createDocumentFragment();
1343
1343
  w.appendChild(d);
1344
1344
  for (const c of l) {
1345
- const p = X(c, t);
1346
- w.appendChild(p);
1345
+ const h = X(c, t);
1346
+ w.appendChild(h);
1347
1347
  }
1348
1348
  return w.appendChild(x), w;
1349
1349
  }
1350
- const n = document.createElement(e.tag);
1351
- e.key != null && (n.key = e.key);
1352
- const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = at(o, t, n, s), u = {
1353
- ...i,
1350
+ const i = document.createElement(e.tag);
1351
+ e.key != null && (i.key = e.key);
1352
+ const { props: n = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = at(o, t, i, s), u = {
1353
+ ...n,
1354
1354
  ...a.props
1355
1355
  }, m = {
1356
1356
  ...s,
1357
1357
  ...a.attrs
1358
- }, g = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
- for (const h in m) {
1360
- const l = m[h];
1361
- if (!(typeof h != "string" || /\[object Object\]/.test(h))) {
1358
+ }, g = i.namespaceURI === "http://www.w3.org/2000/svg";
1359
+ for (const p in m) {
1360
+ const l = m[p];
1361
+ if (!(typeof p != "string" || /\[object Object\]/.test(p))) {
1362
1362
  if (typeof l == "boolean")
1363
- l && n.setAttribute(h, "");
1363
+ l && i.setAttribute(p, "");
1364
1364
  else if (l != null)
1365
- if (!g && h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1365
+ if (!g && p === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement || i instanceof HTMLProgressElement))
1366
1366
  try {
1367
- n instanceof HTMLProgressElement ? n.value = Number(l) : n.value = l ?? "";
1367
+ i instanceof HTMLProgressElement ? i.value = Number(l) : i.value = l ?? "";
1368
1368
  } catch {
1369
- n.setAttribute(h, String(l));
1369
+ i.setAttribute(p, String(l));
1370
1370
  }
1371
- else if (!g && h === "checked" && n instanceof HTMLInputElement)
1371
+ else if (!g && p === "checked" && i instanceof HTMLInputElement)
1372
1372
  try {
1373
- n.checked = !!l;
1373
+ i.checked = !!l;
1374
1374
  } catch {
1375
- n.setAttribute(h, String(l));
1375
+ i.setAttribute(p, String(l));
1376
1376
  }
1377
- else if (!g && h in n)
1377
+ else if (!g && p in i)
1378
1378
  try {
1379
- n[h] = l;
1379
+ i[p] = l;
1380
1380
  } catch {
1381
- n.setAttribute(h, String(l));
1381
+ i.setAttribute(p, String(l));
1382
1382
  }
1383
- else if ((e.props?.isCustomElement ?? !1) && !g && h.includes("-")) {
1384
- const x = it(h);
1383
+ else if ((e.props?.isCustomElement ?? !1) && !g && p.includes("-")) {
1384
+ const x = it(p);
1385
1385
  try {
1386
- n[x] = l;
1386
+ i[x] = l;
1387
1387
  } catch {
1388
- n.setAttribute(h, String(l));
1388
+ i.setAttribute(p, String(l));
1389
1389
  }
1390
1390
  } else
1391
- n.setAttribute(h, String(l));
1391
+ i.setAttribute(p, String(l));
1392
1392
  }
1393
1393
  }
1394
- for (const h in u) {
1395
- const l = u[h];
1396
- if (!(typeof h != "string" || /\[object Object\]/.test(h)))
1397
- if (h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1394
+ for (const p in u) {
1395
+ const l = u[p];
1396
+ if (!(typeof p != "string" || /\[object Object\]/.test(p)))
1397
+ if (p === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement)) {
1398
1398
  const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1399
- n.value = d ?? "";
1400
- } else if (h === "checked" && n instanceof HTMLInputElement) {
1399
+ i.value = d ?? "";
1400
+ } else if (p === "checked" && i instanceof HTMLInputElement) {
1401
1401
  const d = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1402
- n.checked = !!d;
1403
- } else if (h.startsWith("on") && typeof l == "function")
1404
- oe.addListener(n, ot(h), l);
1402
+ i.checked = !!d;
1403
+ } else if (p.startsWith("on") && typeof l == "function")
1404
+ oe.addListener(i, ot(p), l);
1405
1405
  else {
1406
- if (h.startsWith("on") && l === void 0)
1406
+ if (p.startsWith("on") && l === void 0)
1407
1407
  continue;
1408
1408
  if (l == null || l === !1)
1409
- n.removeAttribute(h);
1410
- else if ((e.props?.isCustomElement ?? !1) || h in n)
1409
+ i.removeAttribute(p);
1410
+ else if ((e.props?.isCustomElement ?? !1) || p in i)
1411
1411
  try {
1412
1412
  const x = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
1413
- n[h] = x;
1413
+ i[p] = x;
1414
1414
  } catch {
1415
1415
  }
1416
1416
  }
1417
1417
  }
1418
- for (const [h, l] of Object.entries(
1418
+ for (const [p, l] of Object.entries(
1419
1419
  a.listeners || {}
1420
1420
  ))
1421
- oe.addListener(n, h, l);
1421
+ oe.addListener(i, p, l);
1422
1422
  const b = {
1423
1423
  ...e,
1424
1424
  props: {
@@ -1426,31 +1426,31 @@ function X(e, t, r) {
1426
1426
  ...a.props
1427
1427
  }
1428
1428
  };
1429
- he(b, n, r);
1429
+ pe(b, i, r);
1430
1430
  try {
1431
- if (typeof n._applyProps == "function")
1431
+ if (typeof i._applyProps == "function")
1432
1432
  try {
1433
- n._applyProps(n._cfg);
1433
+ i._applyProps(i._cfg);
1434
1434
  } catch {
1435
1435
  }
1436
- typeof n.requestRender == "function" ? n.requestRender() : typeof n._render == "function" && n._render(n._cfg);
1436
+ typeof i.requestRender == "function" ? i.requestRender() : typeof i._render == "function" && i._render(i._cfg);
1437
1437
  } catch {
1438
1438
  }
1439
1439
  if (Array.isArray(e.children))
1440
- for (const h of e.children)
1441
- n.appendChild(X(h, t, r));
1442
- else typeof e.children == "string" && (n.textContent = e.children);
1440
+ for (const p of e.children)
1441
+ i.appendChild(X(p, t, r));
1442
+ else typeof e.children == "string" && (i.textContent = e.children);
1443
1443
  try {
1444
- if (n instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1444
+ if (i instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1445
1445
  try {
1446
- n.value = m.value ?? "";
1446
+ i.value = m.value ?? "";
1447
1447
  } catch {
1448
1448
  }
1449
1449
  } catch {
1450
1450
  }
1451
- return n;
1451
+ return i;
1452
1452
  }
1453
- function Rt(e, t, r, n, i) {
1453
+ function Rt(e, t, r, i, n) {
1454
1454
  if (typeof r == "string") {
1455
1455
  e.textContent !== r && (e.textContent = r);
1456
1456
  return;
@@ -1471,50 +1471,50 @@ function Rt(e, t, r, n, i) {
1471
1471
  for (; x && (m.add(x), x !== d); )
1472
1472
  x = x.nextSibling;
1473
1473
  }
1474
- function h(l, d, x, w) {
1474
+ function p(l, d, x, w) {
1475
1475
  const c = [];
1476
- let p = l.nextSibling;
1477
- for (; p && p !== d; )
1478
- c.push(p), p = p.nextSibling;
1476
+ let h = l.nextSibling;
1477
+ for (; h && h !== d; )
1478
+ c.push(h), h = h.nextSibling;
1479
1479
  const y = Array.isArray(x) ? x : [];
1480
- if (w.some((k) => k && k.key != null) || y.some((k) => k && k.key != null)) {
1481
- const k = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1482
- for (const _ of y)
1483
- _ && _.key != null && k.set(_.key, _);
1484
- for (const _ of c) {
1485
- const $ = _.key;
1486
- $ != null && f.set($, _);
1480
+ if (w.some(($) => $ && $.key != null) || y.some(($) => $ && $.key != null)) {
1481
+ const $ = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1482
+ for (const C of y)
1483
+ C && C.key != null && $.set(C.key, C);
1484
+ for (const C of c) {
1485
+ const E = C.key;
1486
+ E != null && f.set(E, C);
1487
1487
  }
1488
1488
  const v = /* @__PURE__ */ new Set();
1489
1489
  let A = l.nextSibling;
1490
- for (const _ of w) {
1491
- let $;
1492
- if (_.key != null && f.has(_.key)) {
1493
- const T = k.get(_.key);
1494
- $ = $e(
1495
- f.get(_.key),
1490
+ for (const C of w) {
1491
+ let E;
1492
+ if (C.key != null && f.has(C.key)) {
1493
+ const T = $.get(C.key);
1494
+ E = Ee(
1495
+ f.get(C.key),
1496
1496
  T,
1497
- _,
1498
- n
1499
- ), v.add($), $ !== A && e.contains($) && e.insertBefore($, A);
1497
+ C,
1498
+ i
1499
+ ), v.add(E), E !== A && e.contains(E) && e.insertBefore(E, A);
1500
1500
  } else
1501
- $ = X(_, n), e.insertBefore($, A), v.add($);
1502
- A = $.nextSibling;
1501
+ E = X(C, i), e.insertBefore(E, A), v.add(E);
1502
+ A = E.nextSibling;
1503
1503
  }
1504
- for (const _ of c)
1505
- !v.has(_) && e.contains(_) && e.removeChild(_);
1504
+ for (const C of c)
1505
+ !v.has(C) && e.contains(C) && e.removeChild(C);
1506
1506
  } else {
1507
- const k = Math.min(
1507
+ const $ = Math.min(
1508
1508
  y.length,
1509
1509
  w.length
1510
1510
  );
1511
- for (let f = 0; f < k; f++) {
1512
- const v = y[f], A = w[f], _ = $e(c[f], v, A, n);
1513
- _ !== c[f] && (e.insertBefore(_, c[f]), e.removeChild(c[f]));
1511
+ for (let f = 0; f < $; f++) {
1512
+ const v = y[f], A = w[f], C = Ee(c[f], v, A, i);
1513
+ C !== c[f] && (e.insertBefore(C, c[f]), e.removeChild(c[f]));
1514
1514
  }
1515
- for (let f = k; f < w.length; f++)
1516
- e.insertBefore(X(w[f], n), d);
1517
- for (let f = k; f < c.length; f++)
1515
+ for (let f = $; f < w.length; f++)
1516
+ e.insertBefore(X(w[f], i), d);
1517
+ for (let f = $; f < c.length; f++)
1518
1518
  e.removeChild(c[f]);
1519
1519
  }
1520
1520
  }
@@ -1522,41 +1522,41 @@ function Rt(e, t, r, n, i) {
1522
1522
  let d;
1523
1523
  if (l.tag === "#anchor") {
1524
1524
  const x = l.key, w = `${x}:start`, c = `${x}:end`;
1525
- let p = u.get(w), y = u.get(c);
1526
- const C = Array.isArray(l.children) ? l.children : [];
1527
- if (p || (p = document.createTextNode(""), p.key = w), y || (y = document.createTextNode(""), y.key = c), l._startNode = p, l._endNode = y, !e.contains(p) || !e.contains(y)) {
1528
- e.insertBefore(p, g);
1529
- for (const k of C)
1530
- e.insertBefore(X(k, n), g);
1525
+ let h = u.get(w), y = u.get(c);
1526
+ const k = Array.isArray(l.children) ? l.children : [];
1527
+ if (h || (h = document.createTextNode(""), h.key = w), y || (y = document.createTextNode(""), y.key = c), l._startNode = h, l._endNode = y, !e.contains(h) || !e.contains(y)) {
1528
+ e.insertBefore(h, g);
1529
+ for (const $ of k)
1530
+ e.insertBefore(X($, i), g);
1531
1531
  e.insertBefore(y, g);
1532
1532
  } else
1533
- h(
1534
- p,
1533
+ p(
1534
+ h,
1535
1535
  y,
1536
1536
  a.get(x)?.children,
1537
- C
1537
+ k
1538
1538
  );
1539
- b(p, y), g = y.nextSibling;
1539
+ b(h, y), g = y.nextSibling;
1540
1540
  continue;
1541
1541
  }
1542
1542
  if (l.key != null && u.has(l.key)) {
1543
1543
  const x = a.get(l.key);
1544
- d = $e(
1544
+ d = Ee(
1545
1545
  u.get(l.key),
1546
1546
  x,
1547
1547
  l,
1548
- n,
1549
- i
1548
+ i,
1549
+ n
1550
1550
  ), m.add(d), d !== g && e.contains(d) && (g && !e.contains(g) && (g = null), e.insertBefore(d, g));
1551
1551
  } else
1552
- d = X(l, n, i), g && !e.contains(g) && (g = null), e.insertBefore(d, g), m.add(d);
1552
+ d = X(l, i, n), g && !e.contains(g) && (g = null), e.insertBefore(d, g), m.add(d);
1553
1553
  g = d.nextSibling;
1554
1554
  }
1555
1555
  for (const l of s)
1556
- !m.has(l) && e.contains(l) && (ue(l, i), e.removeChild(l));
1556
+ !m.has(l) && e.contains(l) && (ue(l, n), e.removeChild(l));
1557
1557
  }
1558
- function $e(e, t, r, n, i) {
1559
- if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === r) return e;
1558
+ function Ee(e, t, r, i, n) {
1559
+ if (t && typeof t != "string" && t.props?.ref && n && ue(e, n), t === r) return e;
1560
1560
  if (typeof r == "string") {
1561
1561
  if (e.nodeType === Node.TEXT_NODE)
1562
1562
  return e.textContent !== r && (e.textContent = r), e;
@@ -1571,20 +1571,20 @@ function $e(e, t, r, n, i) {
1571
1571
  const g = document.createDocumentFragment();
1572
1572
  g.appendChild(u);
1573
1573
  for (const b of a) {
1574
- const h = X(b, n);
1575
- g.appendChild(h);
1574
+ const p = X(b, i);
1575
+ g.appendChild(p);
1576
1576
  }
1577
1577
  return g.appendChild(m), e.parentNode?.replaceChild(g, e), u;
1578
1578
  }
1579
1579
  if (!r) {
1580
- ue(e, i);
1580
+ ue(e, n);
1581
1581
  const o = document.createComment("removed");
1582
1582
  return e.parentNode?.replaceChild(o, e), o;
1583
1583
  }
1584
1584
  if (!t || typeof t == "string") {
1585
- ue(e, i);
1586
- const o = X(r, n, i);
1587
- return he(r, o, i), e.parentNode?.replaceChild(o, e), o;
1585
+ ue(e, n);
1586
+ const o = X(r, i, n);
1587
+ return pe(r, o, n), e.parentNode?.replaceChild(o, e), o;
1588
1588
  }
1589
1589
  if (r.tag === "#anchor") {
1590
1590
  const o = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), u = r._endNode ?? document.createTextNode("");
@@ -1592,40 +1592,40 @@ function $e(e, t, r, n, i) {
1592
1592
  const m = document.createDocumentFragment();
1593
1593
  m.appendChild(a);
1594
1594
  for (const g of o)
1595
- m.appendChild(X(g, n));
1595
+ m.appendChild(X(g, i));
1596
1596
  return m.appendChild(u), e.parentNode?.replaceChild(m, e), a;
1597
1597
  }
1598
1598
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
1599
1599
  const o = e;
1600
- return Ve(o, t.props || {}, r.props || {}, n), Rt(o, t.children, r.children, n, i), he(r, o, i), o;
1600
+ return Ve(o, t.props || {}, r.props || {}, i), Rt(o, t.children, r.children, i, n), pe(r, o, n), o;
1601
1601
  }
1602
1602
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
1603
1603
  try {
1604
1604
  const a = e;
1605
- return Ve(a, t.props || {}, r.props || {}, n), he(r, a, i), a;
1605
+ return Ve(a, t.props || {}, r.props || {}, i), pe(r, a, n), a;
1606
1606
  } catch {
1607
1607
  }
1608
- ue(e, i);
1609
- const s = X(r, n, i);
1610
- return he(r, s, i), e.parentNode?.replaceChild(s, e), s;
1608
+ ue(e, n);
1609
+ const s = X(r, i, n);
1610
+ return pe(r, s, n), e.parentNode?.replaceChild(s, e), s;
1611
1611
  }
1612
- function Ot(e, t, r, n) {
1613
- let i;
1614
- Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })) : i = { tag: "div", key: "__root__", children: t } : (i = t, i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })), i && typeof i == "object" && i.tag === "#anchor" && (i = {
1612
+ function Ot(e, t, r, i) {
1613
+ let n;
1614
+ Array.isArray(t) ? t.length === 1 ? (n = t[0], n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })) : n = { tag: "div", key: "__root__", children: t } : (n = t, n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })), n && typeof n == "object" && n.tag === "#anchor" && (n = {
1615
1615
  tag: "div",
1616
1616
  key: "__anchor_root__",
1617
1617
  props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
1618
- children: [i]
1619
- }), i = Be(i, String(i.key ?? "root"));
1618
+ children: [n]
1619
+ }), n = Be(n, String(n.key ?? "root"));
1620
1620
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
1621
1621
  let a;
1622
- s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? a = $e(o, s, i, r, n) : (a = X(i, r, n), e.replaceChild(a, o)) : (a = X(i, r, n), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
1622
+ s && o ? typeof s != "string" && typeof n != "string" && s.tag === n.tag && s.key === n.key ? a = Ee(o, s, n, r, i) : (a = X(n, r, i), e.replaceChild(a, o)) : (a = X(n, r, i), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
1623
1623
  const u = [];
1624
1624
  for (let m = 0; m < e.childNodes.length; m++) {
1625
1625
  const g = e.childNodes[m];
1626
- g !== a && g.nodeName !== "STYLE" && (ue(g, n), u.push(g));
1626
+ g !== a && g.nodeName !== "STYLE" && (ue(g, i), u.push(g));
1627
1627
  }
1628
- u.forEach((m) => e.removeChild(m)), e._prevVNode = i, e._prevDom = a;
1628
+ u.forEach((m) => e.removeChild(m)), e._prevVNode = n, e._prevDom = a;
1629
1629
  }
1630
1630
  function Pe(e) {
1631
1631
  if (typeof e == "string") return ie(e);
@@ -1634,24 +1634,24 @@ function Pe(e) {
1634
1634
  if (e.tag === "#anchor")
1635
1635
  return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Pe).join("");
1636
1636
  let t = "";
1637
- e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${ie(String(s))}"`).join(""));
1637
+ e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([n, s]) => ` ${n}="${ie(String(s))}"`).join(""));
1638
1638
  let r = "";
1639
- e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${ie(String(s))}"`).join(""));
1640
- const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? ie(e.children) : e.children ? Pe(e.children) : "";
1641
- return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
1639
+ e.props && (r = Object.entries(e.props).filter(([n]) => n !== "attrs" && n !== "directives" && n !== "ref" && n !== "key").map(([n, s]) => ` ${n}="${ie(String(s))}"`).join(""));
1640
+ const i = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? ie(e.children) : e.children ? Pe(e.children) : "";
1641
+ return `<${e.tag}${t}${r}>${i}</${e.tag}>`;
1642
1642
  }
1643
1643
  function Pt(e, ...t) {
1644
1644
  let r = "";
1645
- for (let n = 0; n < e.length; n++)
1646
- r += e[n], n < t.length && (r += t[n]);
1645
+ for (let i = 0; i < e.length; i++)
1646
+ r += e[i], i < t.length && (r += t[i]);
1647
1647
  return r;
1648
1648
  }
1649
1649
  function ct(e) {
1650
1650
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
1651
1651
  }
1652
- let Ce = null;
1652
+ let ke = null;
1653
1653
  function Je() {
1654
- return Ce || (Ce = new CSSStyleSheet(), Ce.replaceSync(ct(Mt))), Ce;
1654
+ return ke || (ke = new CSSStyleSheet(), ke.replaceSync(ct(Mt))), ke;
1655
1655
  }
1656
1656
  function Lt(e) {
1657
1657
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
@@ -1810,17 +1810,17 @@ const Mt = Pt`
1810
1810
  black: { DEFAULT: "#000000" },
1811
1811
  transparent: { DEFAULT: "transparent" },
1812
1812
  current: { DEFAULT: "currentColor" }
1813
- }, Nt = Object.fromEntries(
1813
+ }, Wt = Object.fromEntries(
1814
1814
  Object.entries(jt).map(([e, t]) => [
1815
1815
  e,
1816
1816
  Object.fromEntries(
1817
- Object.entries(t).map(([r, n]) => [
1817
+ Object.entries(t).map(([r, i]) => [
1818
1818
  r,
1819
- `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${n})`
1819
+ `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${i})`
1820
1820
  ])
1821
1821
  )
1822
1822
  ])
1823
- ), le = "0.25rem", Wt = {
1823
+ ), le = "0.25rem", Nt = {
1824
1824
  // Tailwind container widths
1825
1825
  // 3xs: 16rem => 16 / 0.25 = 64
1826
1826
  "3xs": 64,
@@ -1850,13 +1850,38 @@ const Mt = Pt`
1850
1850
  "7xl": 320
1851
1851
  }, zt = () => {
1852
1852
  const e = {};
1853
- for (const [t, r] of Object.entries(Wt))
1853
+ for (const [t, r] of Object.entries(Nt))
1854
1854
  e[`max-w-${t}`] = `max-width:calc(${le} * ${r});`, e[`min-w-${t}`] = `min-width:calc(${le} * ${r});`, e[`w-${t}`] = `width:calc(${le} * ${r});`, e[`max-h-${t}`] = `max-height:calc(${le} * ${r});`, e[`min-h-${t}`] = `min-height:calc(${le} * ${r});`, e[`h-${t}`] = `height:calc(${le} * ${r});`;
1855
1855
  return e;
1856
1856
  }, Dt = () => {
1857
- const e = {};
1858
- for (const t of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
1859
- e[`grid-cols-${t}`] = `grid-template-columns:repeat(${t},minmax(0,1fr));`, e[`grid-rows-${t}`] = `grid-template-rows:repeat(${t},minmax(0,1fr));`, e[`col-span-${t}`] = `grid-column:span ${t} / span ${t};`, e[`row-span-${t}`] = `grid-row:span ${t} / span ${t};`;
1857
+ const e = {}, t = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
1858
+ for (const r of t)
1859
+ e[`grid-cols-${r}`] = `grid-template-columns:repeat(${r},minmax(0,1fr));`, e[`grid-rows-${r}`] = `grid-template-rows:repeat(${r},minmax(0,1fr));`, e[`col-span-${r}`] = `grid-column:span ${r} / span ${r};`, e[`row-span-${r}`] = `grid-row:span ${r} / span ${r};`, e[`col-start-${r}`] = `grid-column-start:${r};`, e[`col-end-${r}`] = `grid-column-end:${r};`, e[`row-start-${r}`] = `grid-row-start:${r};`, e[`row-end-${r}`] = `grid-row-end:${r};`;
1860
+ return e["grid-cols-none"] = "grid-template-columns:none;", e["grid-rows-none"] = "grid-template-rows:none;", e["col-span-full"] = "grid-column:1 / -1;", e["row-span-full"] = "grid-row:1 / -1;", e["auto-cols-auto"] = "grid-auto-columns:auto;", e["auto-cols-min"] = "grid-auto-columns:min-content;", e["auto-cols-max"] = "grid-auto-columns:max-content;", e["auto-cols-fr"] = "grid-auto-columns:1fr;", e["auto-rows-auto"] = "grid-auto-rows:auto;", e["auto-rows-min"] = "grid-auto-rows:min-content;", e["auto-rows-max"] = "grid-auto-rows:max-content;", e["auto-rows-fr"] = "grid-auto-rows:1fr;", e["grid-flow-row"] = "grid-auto-flow:row;", e["grid-flow-col"] = "grid-auto-flow:column;", e["grid-flow-row-dense"] = "grid-auto-flow:row dense;", e["grid-flow-col-dense"] = "grid-auto-flow:column dense;", e;
1861
+ }, It = () => {
1862
+ const e = {}, t = [0, 1, 2, 4, 6, 8];
1863
+ for (const r of t) {
1864
+ const i = `${r}px`;
1865
+ e[`border-${r}`] = `border-width:${i};`, e[`border-s-${r}`] = `border-inline-start-width:${i};`, e[`border-e-${r}`] = `border-inline-end-width:${i};`, e[`border-bs-${r}`] = `border-block-start-width:${i};`, e[`border-be-${r}`] = `border-block-end-width:${i};`, e[`border-x-${r}`] = `border-inline-width:${i};`, e[`border-y-${r}`] = `border-block-width:${i};`, e[`border-t-${r}`] = `border-top-width:${i};`, e[`border-r-${r}`] = `border-right-width:${i};`, e[`border-b-${r}`] = `border-bottom-width:${i};`, e[`border-l-${r}`] = `border-left-width:${i};`;
1866
+ }
1867
+ return e.border = "border-width:1px;", e["border-t"] = "border-top-width:1px;", e["border-r"] = "border-right-width:1px;", e["border-b"] = "border-bottom-width:1px;", e["border-l"] = "border-left-width:1px;", e["border-x"] = "border-left-width:1px;border-right-width:1px;", e["border-y"] = "border-top-width:1px;border-bottom-width:1px;", e["border-s"] = "border-inline-start-width:1px;", e["border-e"] = "border-inline-end-width:1px;", e["border-bs"] = "border-block-start-width:1px;", e["border-be"] = "border-block-end-width:1px;", e;
1868
+ }, Ht = () => {
1869
+ const e = {}, t = {
1870
+ none: 0,
1871
+ xs: 2,
1872
+ sm: 4,
1873
+ md: 6,
1874
+ lg: 8,
1875
+ xl: 12,
1876
+ "2xl": 16,
1877
+ "3xl": 24,
1878
+ "4xl": 32,
1879
+ full: 9999
1880
+ };
1881
+ for (const [r, i] of Object.entries(t)) {
1882
+ const n = i === 9999 ? "9999px" : `${i / 16}rem`;
1883
+ e[`rounded-${r}`] = `border-radius:${n};`, e[`rounded-s-${r}`] = `border-start-start-radius:${n};border-end-start-radius:${n};`, e[`rounded-e-${r}`] = `border-start-end-radius:${n};border-end-end-radius:${n};`, e[`rounded-t-${r}`] = `border-top-left-radius:${n};border-top-right-radius:${n};`, e[`rounded-r-${r}`] = `border-top-right-radius:${n};border-bottom-right-radius:${n};`, e[`rounded-b-${r}`] = `border-bottom-left-radius:${n};border-bottom-right-radius:${n};`, e[`rounded-l-${r}`] = `border-top-left-radius:${n};border-bottom-left-radius:${n};`, e[`rounded-x-${r}`] = `border-top-left-radius:${n};border-bottom-left-radius:${n};border-top-right-radius:${n};border-bottom-right-radius:${n};`, e[`rounded-y-${r}`] = `border-top-left-radius:${n};border-top-right-radius:${n};border-bottom-left-radius:${n};border-bottom-right-radius:${n};`;
1884
+ }
1860
1885
  return e;
1861
1886
  }, Le = {
1862
1887
  /* Display */
@@ -1889,6 +1914,14 @@ const Mt = Pt`
1889
1914
  "overflow-hidden": "overflow:hidden;",
1890
1915
  "overflow-visible": "overflow:visible;",
1891
1916
  "overflow-scroll": "overflow:scroll;",
1917
+ "overflow-y-auto": "overflow-y:auto;",
1918
+ "overflow-y-hidden": "overflow-y:hidden;",
1919
+ "overflow-y-visible": "overflow-y:visible;",
1920
+ "overflow-y-scroll": "overflow-y:scroll;",
1921
+ "overflow-x-auto": "overflow-x:auto;",
1922
+ "overflow-x-hidden": "overflow-x:hidden;",
1923
+ "overflow-x-visible": "overflow-x:visible;",
1924
+ "overflow-x-scroll": "overflow-x:scroll;",
1892
1925
  /* Pointer Events */
1893
1926
  "pointer-events-none": "pointer-events:none;",
1894
1927
  "pointer-events-auto": "pointer-events:auto;",
@@ -1933,63 +1966,8 @@ const Mt = Pt`
1933
1966
  "text-7xl": "font-size:4.5rem;line-height:1",
1934
1967
  "text-8xl": "font-size:6rem;line-height:1",
1935
1968
  /* Borders */
1936
- border: "border-width:1px;",
1937
- "border-t": "border-top-width:1px;",
1938
- "border-r": "border-right-width:1px;",
1939
- "border-b": "border-bottom-width:1px;",
1940
- "border-l": "border-left-width:1px;",
1941
- "border-x": "border-inline-width:1px;",
1942
- "border-y": "border-block-width:1px;",
1943
- "border-2": "border-width:2px;",
1944
- "border-4": "border-width:4px;",
1945
- "border-6": "border-width:6px;",
1946
- "border-8": "border-width:8px;",
1947
- "rounded-none": "border-radius:0;",
1948
- "rounded-xs": "border-radius:0.125rem;",
1949
- "rounded-t-xs": "border-top-left-radius:0.125rem;border-top-right-radius:0.125rem;",
1950
- "rounded-r-xs": "border-top-right-radius:0.125rem;border-bottom-right-radius:0.125rem;",
1951
- "rounded-b-xs": "border-bottom-left-radius:0.125rem;border-bottom-right-radius:0.125rem;",
1952
- "rounded-l-xs": "border-top-left-radius:0.125rem;border-bottom-left-radius:0.125rem;",
1953
- "rounded-sm": "border-radius:0.25rem;",
1954
- "rounded-t-sm": "border-top-left-radius:0.25rem;border-top-right-radius:0.25rem;",
1955
- "rounded-r-sm": "border-top-right-radius:0.25rem;border-bottom-right-radius:0.25rem;",
1956
- "rounded-b-sm": "border-bottom-left-radius:0.25rem;border-bottom-right-radius:0.25rem;",
1957
- "rounded-l-sm": "border-top-left-radius:0.25rem;border-bottom-left-radius:0.25rem;",
1958
- "rounded-md": "border-radius:0.375rem;",
1959
- "rounded-t-md": "border-top-left-radius:0.375rem;border-top-right-radius:0.375rem;",
1960
- "rounded-r-md": "border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem;",
1961
- "rounded-b-md": "border-bottom-left-radius:0.375rem;border-bottom-right-radius:0.375rem;",
1962
- "rounded-l-md": "border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem;",
1963
- "rounded-lg": "border-radius:0.5rem;",
1964
- "rounded-t-lg": "border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;",
1965
- "rounded-r-lg": "border-top-right-radius:0.5rem;border-bottom-right-radius:0.5rem;",
1966
- "rounded-b-lg": "border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem;",
1967
- "rounded-l-lg": "border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem;",
1968
- "rounded-xl": "border-radius:0.75rem;",
1969
- "rounded-t-xl": "border-top-left-radius:0.75rem;border-top-right-radius:0.75rem;",
1970
- "rounded-r-xl": "border-top-right-radius:0.75rem;border-bottom-right-radius:0.75rem;",
1971
- "rounded-b-xl": "border-bottom-left-radius:0.75rem;border-bottom-right-radius:0.75rem;",
1972
- "rounded-l-xl": "border-top-left-radius:0.75rem;border-bottom-left-radius:0.75rem;",
1973
- "rounded-2xl": "border-radius:1rem;",
1974
- "rounded-t-2xl": "border-top-left-radius:1rem;border-top-right-radius:1rem;",
1975
- "rounded-r-2xl": "border-top-right-radius:1rem;border-bottom-right-radius:1rem;",
1976
- "rounded-b-2xl": "border-bottom-left-radius:1rem;border-bottom-right-radius:1rem;",
1977
- "rounded-l-2xl": "border-top-left-radius:1rem;border-bottom-left-radius:1rem;",
1978
- "rounded-3xl": "border-radius:1.5rem;",
1979
- "rounded-t-3xl": "border-top-left-radius:1.5rem;border-top-right-radius:1.5rem;",
1980
- "rounded-r-3xl": "border-top-right-radius:1.5rem;border-bottom-right-radius:1.5rem;",
1981
- "rounded-b-3xl": "border-bottom-left-radius:1.5rem;border-bottom-right-radius:1.5rem;",
1982
- "rounded-l-3xl": "border-top-left-radius:1.5rem;border-bottom-left-radius:1.5rem;",
1983
- "rounded-4xl": "border-radius:2rem;",
1984
- "rounded-t-4xl": "border-top-left-radius:2rem;border-top-right-radius:2rem;",
1985
- "rounded-r-4xl": "border-top-right-radius:2rem;border-bottom-right-radius:2rem;",
1986
- "rounded-b-4xl": "border-bottom-left-radius:2rem;border-bottom-right-radius:2rem;",
1987
- "rounded-l-4xl": "border-top-left-radius:2rem;border-bottom-left-radius:2rem;",
1988
- "rounded-full": "border-radius:9999px;",
1989
- "rounded-t-full": "border-top-left-radius:9999px;border-top-right-radius:9999px;",
1990
- "rounded-r-full": "border-top-right-radius:9999px;border-bottom-right-radius:9999px;",
1991
- "rounded-b-full": "border-bottom-left-radius:9999px;border-bottom-right-radius:9999px;",
1992
- "rounded-l-full": "border-top-left-radius:9999px;border-bottom-left-radius:9999px;",
1969
+ ...It(),
1970
+ ...Ht(),
1993
1971
  /* Shadow and effects */
1994
1972
  // Shadows use a CSS variable for color so color utilities can modify --ce-shadow-color
1995
1973
  "shadow-none": "--ce-shadow-color: rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
@@ -2106,19 +2084,19 @@ const Mt = Pt`
2106
2084
  "gap-y": ["row-gap"]
2107
2085
  };
2108
2086
  function G(e, t) {
2109
- let r = 0, n = 0;
2110
- for (let i = 0; i < e.length; i++) {
2111
- const s = e[i];
2087
+ let r = 0, i = 0;
2088
+ for (let n = 0; n < e.length; n++) {
2089
+ const s = e[n];
2112
2090
  if (s === "[") r++;
2113
2091
  else if (s === "]" && r > 0) r--;
2114
- else if (s === "(") n++;
2115
- else if (s === ")" && n > 0) n--;
2116
- else if (r === 0 && n === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2117
- return e.slice(0, i) + t + e.slice(i);
2092
+ else if (s === "(") i++;
2093
+ else if (s === ")" && i > 0) i--;
2094
+ else if (r === 0 && i === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2095
+ return e.slice(0, n) + t + e.slice(n);
2118
2096
  }
2119
2097
  return e + t;
2120
2098
  }
2121
- const It = {
2099
+ const Bt = {
2122
2100
  before: (e, t) => `${e}::before{${t}}`,
2123
2101
  after: (e, t) => `${e}::after{${t}}`,
2124
2102
  hover: (e, t) => `${G(e, ":hover")}{${t}}`,
@@ -2151,22 +2129,22 @@ const It = {
2151
2129
  // Dark mode (now plain string)
2152
2130
  dark: "(prefers-color-scheme: dark)"
2153
2131
  }, je = ["sm", "md", "lg", "xl", "2xl"];
2154
- function Ne(e) {
2155
- const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
2156
- if (n.length < 2) return null;
2157
- const i = n.slice(0, -1).join("-"), s = n[n.length - 1], o = parseFloat(s);
2158
- if (Number.isNaN(o) || !Ze[i]) return null;
2132
+ function We(e) {
2133
+ const t = e.startsWith("-"), i = (t ? e.slice(1) : e).split("-");
2134
+ if (i.length < 2) return null;
2135
+ const n = i.slice(0, -1).join("-"), s = i[i.length - 1], o = parseFloat(s);
2136
+ if (Number.isNaN(o) || !Ze[n]) return null;
2159
2137
  const a = t ? "-" : "";
2160
- return Ze[i].map((u) => `${u}:calc(${a}${le} * ${o});`).join("");
2138
+ return Ze[n].map((u) => `${u}:calc(${a}${le} * ${o});`).join("");
2161
2139
  }
2162
2140
  function Ge(e) {
2163
- const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, i = r >> 8 & 255, s = r & 255;
2164
- return `${n} ${i} ${s}`;
2141
+ const t = e.replace("#", ""), r = parseInt(t, 16), i = r >> 16 & 255, n = r >> 8 & 255, s = r & 255;
2142
+ return `${i} ${n} ${s}`;
2165
2143
  }
2166
- function Ht(e) {
2144
+ function Ut(e) {
2167
2145
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2168
2146
  if (!t) return null;
2169
- const [, r, n, i = "DEFAULT"] = t, s = Nt[n]?.[i];
2147
+ const [, r, i, n = "DEFAULT"] = t, s = Wt[i]?.[n];
2170
2148
  if (!s) return null;
2171
2149
  if (r === "shadow") return `--ce-shadow-color:${s};`;
2172
2150
  const a = {
@@ -2182,33 +2160,33 @@ function Ht(e) {
2182
2160
  }[r];
2183
2161
  return a ? `${a}:${s};` : null;
2184
2162
  }
2185
- function Bt(e) {
2163
+ function qt(e) {
2186
2164
  const [t, r] = e.split("/");
2187
2165
  if (!r) return { base: t };
2188
- const n = parseInt(r, 10);
2189
- return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
2166
+ const i = parseInt(r, 10);
2167
+ return isNaN(i) || i < 0 || i > 100 ? { base: t } : { base: t, opacity: i / 100 };
2190
2168
  }
2191
- function We(e) {
2192
- const { base: t, opacity: r } = Bt(e), n = Ht(t);
2193
- if (n) {
2169
+ function Ne(e) {
2170
+ const { base: t, opacity: r } = qt(e), i = Ut(t);
2171
+ if (i) {
2194
2172
  if (r !== void 0) {
2195
- const s = /#([0-9a-f]{6})/i.exec(n);
2173
+ const s = /#([0-9a-f]{6})/i.exec(i);
2196
2174
  if (s) {
2197
2175
  const o = Ge(s[0]);
2198
- return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2176
+ return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2199
2177
  }
2200
2178
  }
2201
- return n;
2179
+ return i;
2202
2180
  }
2203
- const i = Se(t);
2204
- if (i && r !== void 0) {
2205
- const s = /#([0-9a-f]{6})/i.exec(i);
2181
+ const n = Se(t);
2182
+ if (n && r !== void 0) {
2183
+ const s = /#([0-9a-f]{6})/i.exec(n);
2206
2184
  if (s) {
2207
2185
  const o = Ge(s[0]);
2208
- return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2186
+ return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2209
2187
  }
2210
2188
  }
2211
- return i;
2189
+ return n;
2212
2190
  }
2213
2191
  function ze(e) {
2214
2192
  const t = /^opacity-(\d{1,3})$/.exec(e);
@@ -2218,19 +2196,19 @@ function ze(e) {
2218
2196
  }
2219
2197
  function Se(e) {
2220
2198
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
2221
- const i = e.slice(1, -1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);
2222
- if (i) {
2223
- const s = i[1].trim();
2224
- let o = i[2].trim();
2199
+ const n = e.slice(1, -1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);
2200
+ if (n) {
2201
+ const s = n[1].trim();
2202
+ let o = n[2].trim();
2225
2203
  return o = o.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), o = o.replace(/^'([^']*)'$/g, '"$1"'), `${s}:${o};`;
2226
2204
  }
2227
2205
  return null;
2228
2206
  }
2229
2207
  const t = e.indexOf("-["), r = e.endsWith("]");
2230
2208
  if (t > 0 && r) {
2231
- const n = e.slice(0, t);
2232
- let i = e.slice(t + 2, -1);
2233
- i = i.replace(/_/g, " ");
2209
+ const i = e.slice(0, t);
2210
+ let n = e.slice(t + 2, -1);
2211
+ n = n.replace(/_/g, " ");
2234
2212
  const s = {
2235
2213
  bg: "background-color",
2236
2214
  text: "color",
@@ -2275,14 +2253,14 @@ function Se(e) {
2275
2253
  leading: "line-height",
2276
2254
  z: "z-index"
2277
2255
  };
2278
- if (n === "rotate")
2279
- return `transform:rotate(${i});`;
2280
- const o = s[n] ?? n.replace(/_/g, "-");
2281
- if (o && i) return `${o}:${i};`;
2256
+ if (i === "rotate")
2257
+ return `transform:rotate(${n});`;
2258
+ const o = s[i] ?? i.replace(/_/g, "-");
2259
+ if (o && n) return `${o}:${n};`;
2282
2260
  }
2283
2261
  return null;
2284
2262
  }
2285
- function Ut(e) {
2263
+ function Ft(e) {
2286
2264
  if (e.startsWith("[") && e.endsWith("]")) {
2287
2265
  const r = e.slice(1, -1);
2288
2266
  return r.includes("&") ? r : e;
@@ -2294,41 +2272,41 @@ function Ut(e) {
2294
2272
  }
2295
2273
  return null;
2296
2274
  }
2297
- function qt(e) {
2275
+ function Kt(e) {
2298
2276
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
2299
2277
  }
2300
- function Ft(e) {
2278
+ function Vt(e) {
2301
2279
  const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
2302
- let n;
2303
- for (; n = t.exec(e); ) {
2304
- const i = n[2].split(/\s+/).filter(Boolean);
2305
- i.length && r.push(...i);
2280
+ let i;
2281
+ for (; i = t.exec(e); ) {
2282
+ const n = i[2].split(/\s+/).filter(Boolean);
2283
+ n.length && r.push(...n);
2306
2284
  }
2307
2285
  return r.filter(Boolean);
2308
2286
  }
2309
- const Xe = /* @__PURE__ */ new Map(), Kt = 16;
2310
- function Vt(e) {
2287
+ const Xe = /* @__PURE__ */ new Map(), Jt = 16;
2288
+ function Zt(e) {
2311
2289
  const t = Date.now(), r = Xe.get(e);
2312
- if (r && t - r.timestamp < Kt) return r.css;
2313
- const n = Ft(e), i = new Set(n), s = [], o = [], a = [], u = [], m = {};
2290
+ if (r && t - r.timestamp < Jt) return r.css;
2291
+ const i = Vt(e), n = new Set(i), s = [], o = [], a = [], u = [], m = {};
2314
2292
  function g(w, c = !1) {
2315
- const p = (c ? "dark|" : "") + w;
2316
- if (p in m) return m[p];
2293
+ const h = (c ? "dark|" : "") + w;
2294
+ if (h in m) return m[h];
2317
2295
  const y = d(w, c);
2318
- return m[p] = y, y;
2296
+ return m[h] = y, y;
2319
2297
  }
2320
2298
  function b(w) {
2321
- const c = w.some((y) => je.includes(y)), p = w.includes("dark");
2322
- return w.length === 0 ? 1 : !c && !p ? 2 : c && !p ? 3 : 4;
2299
+ const c = w.some((y) => je.includes(y)), h = w.includes("dark");
2300
+ return w.length === 0 ? 1 : !c && !h ? 2 : c && !h ? 3 : 4;
2323
2301
  }
2324
- function h(w) {
2302
+ function p(w) {
2325
2303
  const c = [];
2326
- let p = "", y = 0, C = 0;
2327
- for (let k = 0; k < w.length; k++) {
2328
- const f = w[k];
2329
- f === "[" ? y++ : f === "]" && y > 0 ? y-- : f === "(" ? C++ : f === ")" && C > 0 && C--, f === ":" && y === 0 && C === 0 ? (c.push(p), p = "") : p += f;
2304
+ let h = "", y = 0, k = 0;
2305
+ for (let $ = 0; $ < w.length; $++) {
2306
+ const f = w[$];
2307
+ f === "[" ? y++ : f === "]" && y > 0 ? y-- : f === "(" ? k++ : f === ")" && k > 0 && k--, f === ":" && y === 0 && k === 0 ? (c.push(h), h = "") : h += f;
2330
2308
  }
2331
- return p && c.push(p), c;
2309
+ return h && c.push(h), c;
2332
2310
  }
2333
2311
  function l(w) {
2334
2312
  switch (w) {
@@ -2361,125 +2339,125 @@ function Vt(e) {
2361
2339
  }
2362
2340
  }
2363
2341
  function d(w, c = !1) {
2364
- const p = h(w);
2342
+ const h = p(w);
2365
2343
  let y = !1;
2366
- const C = p.find((E) => (E.startsWith("!") && (y = !0, E = E.slice(1)), Le[E] || Ne(E) || ze(E) || We(E) || Se(E)));
2367
- if (!C) return null;
2368
- const k = C.replace(/^!/, ""), f = Le[k] ?? Ne(k) ?? ze(k) ?? We(k) ?? Se(k);
2344
+ const k = h.find((_) => (_.startsWith("!") && (y = !0, _ = _.slice(1)), Le[_] || We(_) || ze(_) || Ne(_) || Se(_)));
2345
+ if (!k) return null;
2346
+ const $ = k.replace(/^!/, ""), f = Le[$] ?? We($) ?? ze($) ?? Ne($) ?? Se($);
2369
2347
  if (!f) return null;
2370
- const v = p.indexOf(C);
2371
- let A = v >= 0 ? p.slice(0, v) : [];
2372
- c && (A = A.filter((E) => E !== "dark"));
2373
- const _ = `.${qt(w)}`, $ = "__SUBJECT__", T = y ? f.replace(/;$/, " !important;") : f;
2374
- let R = $;
2348
+ const v = h.indexOf(k);
2349
+ let A = v >= 0 ? h.slice(0, v) : [];
2350
+ c && (A = A.filter((_) => _ !== "dark"));
2351
+ const C = `.${Kt(w)}`, E = "__SUBJECT__", T = y ? f.replace(/;$/, " !important;") : f;
2352
+ let R = E;
2375
2353
  const S = [];
2376
- for (const E of A)
2377
- E.startsWith("group-") ? (R = `.group:${E.slice(6)} ${R}`, S.push(E)) : E.startsWith("peer-") && (R = R.replace($, `.peer:${E.slice(5)}~${$}`), S.push(E));
2378
- A = A.filter((E) => !S.includes(E));
2354
+ for (const _ of A)
2355
+ _.startsWith("group-") ? (R = `.group:${_.slice(6)} ${R}`, S.push(_)) : _.startsWith("peer-") && (R = R.replace(E, `.peer:${_.slice(5)}~${E}`), S.push(_));
2356
+ A = A.filter((_) => !S.includes(_));
2379
2357
  const P = [], B = [];
2380
2358
  let V = null;
2381
- for (const E of A) {
2382
- if (E === "dark" || je.includes(E)) continue;
2383
- const U = Ut(E);
2359
+ for (const _ of A) {
2360
+ if (_ === "dark" || je.includes(_)) continue;
2361
+ const U = Ft(_);
2384
2362
  if (U) {
2385
2363
  V = U;
2386
2364
  continue;
2387
2365
  }
2388
- const D = l(E);
2366
+ const D = l(_);
2389
2367
  if (D) {
2390
2368
  V ? B.push(D) : P.push(D);
2391
2369
  continue;
2392
2370
  }
2393
- const W = It[E];
2394
- typeof W == "function" && (R = W(R, T).split("{")[0]);
2371
+ const N = Bt[_];
2372
+ typeof N == "function" && (R = N(R, T).split("{")[0]);
2395
2373
  }
2396
- function we(E, U) {
2397
- if (!U) return E;
2398
- let D = 0, W = 0;
2399
- if (E.length && (E[0] === ">" || E[0] === "+" || E[0] === "~" || E[0] === " ")) {
2374
+ function we(_, U) {
2375
+ if (!U) return _;
2376
+ let D = 0, N = 0;
2377
+ if (_.length && (_[0] === ">" || _[0] === "+" || _[0] === "~" || _[0] === " ")) {
2400
2378
  let O = 1;
2401
- for (; O < E.length && E[O] === " "; ) O++;
2402
- for (; O < E.length; O++) {
2403
- const I = E[O];
2404
- if (I === "[" ? D++ : I === "]" && D > 0 ? D-- : I === "(" ? W++ : I === ")" && W > 0 && W--, D === 0 && W === 0 && (E[O] === ">" || E[O] === "+" || E[O] === "~" || E[O] === " "))
2405
- return E.slice(0, O) + U + E.slice(O);
2379
+ for (; O < _.length && _[O] === " "; ) O++;
2380
+ for (; O < _.length; O++) {
2381
+ const I = _[O];
2382
+ if (I === "[" ? D++ : I === "]" && D > 0 ? D-- : I === "(" ? N++ : I === ")" && N > 0 && N--, D === 0 && N === 0 && (_[O] === ">" || _[O] === "+" || _[O] === "~" || _[O] === " "))
2383
+ return _.slice(0, O) + U + _.slice(O);
2406
2384
  }
2407
- return E + U;
2385
+ return _ + U;
2408
2386
  }
2409
- for (let O = 0; O < E.length; O++) {
2410
- const I = E[O];
2411
- if (I === "[" ? D++ : I === "]" && D > 0 ? D-- : I === "(" ? W++ : I === ")" && W > 0 && W--, D === 0 && W === 0 && (I === ">" || I === "+" || I === "~" || I === " "))
2412
- return E.slice(0, O) + U + E.slice(O);
2387
+ for (let O = 0; O < _.length; O++) {
2388
+ const I = _[O];
2389
+ if (I === "[" ? D++ : I === "]" && D > 0 ? D-- : I === "(" ? N++ : I === ")" && N > 0 && N--, D === 0 && N === 0 && (I === ">" || I === "+" || I === "~" || I === " "))
2390
+ return _.slice(0, O) + U + _.slice(O);
2413
2391
  }
2414
- return E + U;
2392
+ return _ + U;
2415
2393
  }
2416
2394
  const K = P.join(""), L = B.join("");
2417
2395
  if (V)
2418
2396
  if (V.includes("&")) {
2419
- const E = V.indexOf("&"), U = V.slice(0, E), D = V.slice(E + 1), W = $ + K, O = R;
2397
+ const _ = V.indexOf("&"), U = V.slice(0, _), D = V.slice(_ + 1), N = E + K, O = R;
2420
2398
  if (P.length === 0)
2421
- R = O.replace($, U + W + L + D);
2399
+ R = O.replace(E, U + N + L + D);
2422
2400
  else {
2423
2401
  const I = we(D, L);
2424
- R = O.replace($, U + W + I);
2402
+ R = O.replace(E, U + N + I);
2425
2403
  }
2426
2404
  } else
2427
- R = R.replace($, `${V}${$ + K}`), L && (R = R.replace($, `${$}${L}`));
2405
+ R = R.replace(E, `${V}${E + K}`), L && (R = R.replace(E, `${E}${L}`));
2428
2406
  else
2429
- R = $ + K + L;
2430
- R = R.replace(new RegExp($, "g"), _);
2407
+ R = E + K + L;
2408
+ R = R.replace(new RegExp(E, "g"), C);
2431
2409
  let M = `${R}{${T}}`;
2432
- const J = A.filter((E) => je.includes(E)), Z = J.length ? J[J.length - 1] : null, z = A.includes("dark");
2410
+ const J = A.filter((_) => je.includes(_)), Z = J.length ? J[J.length - 1] : null, z = A.includes("dark");
2433
2411
  return c && Z ? M = `@media (prefers-color-scheme: dark) and ${Me[Z]}{${M}}` : c ? M = `@media (prefers-color-scheme: dark){${M}}` : z && Z ? M = `@media (prefers-color-scheme: dark) and ${Me[Z]}{${M}}` : z ? M = `@media (prefers-color-scheme: dark){${M}}` : Z && (M = `@media ${Me[Z]}{${M}}`), M;
2434
2412
  }
2435
- for (const w of i) {
2436
- const c = h(w), p = c.find(
2437
- (f) => Le[f] || Ne(f) || ze(f) || We(f) || Se(f)
2413
+ for (const w of n) {
2414
+ const c = p(w), h = c.find(
2415
+ (f) => Le[f] || We(f) || ze(f) || Ne(f) || Se(f)
2438
2416
  );
2439
- if (!p) continue;
2440
- const y = c.indexOf(p), C = y >= 0 ? c.slice(0, y) : [], k = b(C);
2441
- if (k === 4) {
2417
+ if (!h) continue;
2418
+ const y = c.indexOf(h), k = y >= 0 ? c.slice(0, y) : [], $ = b(k);
2419
+ if ($ === 4) {
2442
2420
  const f = g(w, !0);
2443
2421
  f && u.push(f);
2444
2422
  } else {
2445
2423
  const f = g(w);
2446
- f && (k === 1 ? s.push(f) : k === 2 ? o.push(f) : k === 3 && a.push(f));
2424
+ f && ($ === 1 ? s.push(f) : $ === 2 ? o.push(f) : $ === 3 && a.push(f));
2447
2425
  }
2448
2426
  }
2449
2427
  const x = [...s, ...o, ...a, ...u].join("");
2450
2428
  return Xe.set(e, { css: x, timestamp: t }), x;
2451
2429
  }
2452
2430
  const ge = [];
2453
- function Jt(e, t, r, n, i, s, o, a) {
2431
+ function Gt(e, t, r, i, n, s, o, a) {
2454
2432
  if (e) {
2455
2433
  ge.push(r);
2456
2434
  try {
2457
2435
  const u = t.render(r);
2458
2436
  if (u instanceof Promise) {
2459
2437
  s(!0), u.then((m) => {
2460
- s(!1), o(null), Ye(e, m, r, n, i), a(e.innerHTML);
2438
+ s(!1), o(null), Ye(e, m, r, i, n), a(e.innerHTML);
2461
2439
  }).catch((m) => {
2462
2440
  s(!1), o(m);
2463
2441
  });
2464
2442
  return;
2465
2443
  }
2466
- Ye(e, u, r, n, i), a(e.innerHTML);
2444
+ Ye(e, u, r, i, n), a(e.innerHTML);
2467
2445
  } finally {
2468
2446
  ge.pop();
2469
2447
  }
2470
2448
  }
2471
2449
  }
2472
- function Ye(e, t, r, n, i) {
2450
+ function Ye(e, t, r, i, n) {
2473
2451
  e && (Ot(
2474
2452
  e,
2475
2453
  Array.isArray(t) ? t : [t],
2476
2454
  r,
2477
- n
2478
- ), i(e.innerHTML));
2455
+ i
2456
+ ), n(e.innerHTML));
2479
2457
  }
2480
- function Zt(e, t, r, n, i, s, o) {
2458
+ function Xt(e, t, r, i, n, s, o) {
2481
2459
  if (s !== null && clearTimeout(s), Date.now() - t < 16) {
2482
- if (i(r + 1), r === 15)
2460
+ if (n(r + 1), r === 15)
2483
2461
  console.warn(
2484
2462
  `⚠️ Component is re-rendering rapidly. This might indicate:
2485
2463
  Common causes:
@@ -2498,17 +2476,17 @@ Stopping runaway component render to prevent browser freeze`
2498
2476
  return;
2499
2477
  }
2500
2478
  } else
2501
- i(0);
2479
+ n(0);
2502
2480
  const m = setTimeout(() => {
2503
- n(Date.now()), e(), o(null);
2481
+ i(Date.now()), e(), o(null);
2504
2482
  }, r > 10 ? 100 : 0);
2505
2483
  o(m);
2506
2484
  }
2507
- function Gt(e, t, r, n, i) {
2485
+ function Yt(e, t, r, i, n) {
2508
2486
  if (!e) return;
2509
- const s = Vt(r);
2487
+ const s = Zt(r);
2510
2488
  if ((!s || s.trim() === "") && !t._computedStyle) {
2511
- i(null), e.adoptedStyleSheets = [Je()];
2489
+ n(null), e.adoptedStyleSheets = [Je()];
2512
2490
  return;
2513
2491
  }
2514
2492
  let o = "";
@@ -2517,20 +2495,20 @@ function Gt(e, t, r, n, i) {
2517
2495
  ${s}
2518
2496
  `);
2519
2497
  a = ct(a);
2520
- let u = n;
2521
- u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== a) && u.replaceSync(a), e.adoptedStyleSheets = [Je(), u], i(u);
2498
+ let u = i;
2499
+ u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== a) && u.replaceSync(a), e.adoptedStyleSheets = [Je(), u], n(u);
2522
2500
  }
2523
- let N = null;
2524
- function Xt(e) {
2525
- N = e;
2501
+ let W = null;
2502
+ function Qt(e) {
2503
+ W = e;
2526
2504
  }
2527
- function Yt() {
2528
- N = null;
2505
+ function er() {
2506
+ W = null;
2529
2507
  }
2530
- function pr() {
2531
- if (!N)
2508
+ function gr() {
2509
+ if (!W)
2532
2510
  throw new Error("useEmit must be called during component render");
2533
- const e = N.emit;
2511
+ const e = W.emit;
2534
2512
  return (t, r) => e(t, r);
2535
2513
  }
2536
2514
  function ye(e) {
@@ -2541,40 +2519,40 @@ function ye(e) {
2541
2519
  configurable: !1
2542
2520
  });
2543
2521
  }
2544
- function hr(e) {
2545
- if (!N)
2522
+ function mr(e) {
2523
+ if (!W)
2546
2524
  throw new Error("useOnConnected must be called during component render");
2547
- ye(N), N._hookCallbacks.onConnected = e;
2525
+ ye(W), W._hookCallbacks.onConnected = e;
2548
2526
  }
2549
- function gr(e) {
2550
- if (!N)
2527
+ function yr(e) {
2528
+ if (!W)
2551
2529
  throw new Error("useOnDisconnected must be called during component render");
2552
- ye(N), N._hookCallbacks.onDisconnected = e;
2530
+ ye(W), W._hookCallbacks.onDisconnected = e;
2553
2531
  }
2554
- function mr(e) {
2555
- if (!N)
2532
+ function br(e) {
2533
+ if (!W)
2556
2534
  throw new Error("useOnAttributeChanged must be called during component render");
2557
- ye(N), N._hookCallbacks.onAttributeChanged = e;
2535
+ ye(W), W._hookCallbacks.onAttributeChanged = e;
2558
2536
  }
2559
- function yr(e) {
2560
- if (!N)
2537
+ function wr(e) {
2538
+ if (!W)
2561
2539
  throw new Error("useOnError must be called during component render");
2562
- ye(N), N._hookCallbacks.onError = e;
2540
+ ye(W), W._hookCallbacks.onError = e;
2563
2541
  }
2564
- function br(e) {
2565
- if (!N)
2542
+ function xr(e) {
2543
+ if (!W)
2566
2544
  throw new Error("useStyle must be called during component render");
2567
- ye(N);
2545
+ ye(W);
2568
2546
  try {
2569
2547
  const t = e();
2570
- Object.defineProperty(N, "_computedStyle", {
2548
+ Object.defineProperty(W, "_computedStyle", {
2571
2549
  value: t,
2572
2550
  writable: !0,
2573
2551
  enumerable: !1,
2574
2552
  configurable: !0
2575
2553
  });
2576
2554
  } catch (t) {
2577
- console.warn("Error in useStyle callback:", t), Object.defineProperty(N, "_computedStyle", {
2555
+ console.warn("Error in useStyle callback:", t), Object.defineProperty(W, "_computedStyle", {
2578
2556
  value: "",
2579
2557
  writable: !0,
2580
2558
  enumerable: !1,
@@ -2587,7 +2565,7 @@ if (typeof window < "u") {
2587
2565
  const e = globalThis;
2588
2566
  e[Qe] || (e[Qe] = Te);
2589
2567
  }
2590
- function Qt(e, t) {
2568
+ function tr(e, t) {
2591
2569
  if (!t.render)
2592
2570
  throw new Error(
2593
2571
  "Component must have a render function"
@@ -2655,13 +2633,13 @@ function Qt(e, t) {
2655
2633
  enumerable: !1,
2656
2634
  configurable: !1
2657
2635
  }), Object.defineProperty(r, "_triggerWatchers", {
2658
- value: (i, s) => this._triggerWatchers(i, s),
2636
+ value: (n, s) => this._triggerWatchers(n, s),
2659
2637
  writable: !1,
2660
2638
  enumerable: !1,
2661
2639
  configurable: !1
2662
2640
  }), this.context = r, Object.defineProperty(this.context, "emit", {
2663
- value: (i, s, o) => {
2664
- const a = new CustomEvent(i, {
2641
+ value: (n, s, o) => {
2642
+ const a = new CustomEvent(n, {
2665
2643
  detail: s,
2666
2644
  bubbles: !0,
2667
2645
  composed: !0,
@@ -2673,24 +2651,24 @@ function Qt(e, t) {
2673
2651
  enumerable: !1,
2674
2652
  configurable: !1
2675
2653
  });
2676
- const n = Te.get(e) || t;
2677
- Object.keys(n).forEach((i) => {
2678
- const s = n[i];
2679
- typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
2680
- }), this._applyComputed(n), n.props && Object.keys(n.props).forEach((i) => {
2681
- let s = this[i];
2682
- Object.defineProperty(this, i, {
2654
+ const i = Te.get(e) || t;
2655
+ Object.keys(i).forEach((n) => {
2656
+ const s = i[n];
2657
+ typeof s == "function" && (this.context[n] = (...o) => s(...o, this.context));
2658
+ }), this._applyComputed(i), i.props && Object.keys(i.props).forEach((n) => {
2659
+ let s = this[n];
2660
+ Object.defineProperty(this, n, {
2683
2661
  get() {
2684
2662
  return s;
2685
2663
  },
2686
2664
  set(o) {
2687
2665
  const a = s;
2688
- s = o, this.context[i] = o, this._initializing || (this._applyProps(n), a !== o && this._requestRender());
2666
+ s = o, this.context[n] = o, this._initializing || (this._applyProps(i), a !== o && this._requestRender());
2689
2667
  },
2690
2668
  enumerable: !0,
2691
2669
  configurable: !0
2692
2670
  });
2693
- }), this._initializing = !1, this._initWatchers(n), this._applyProps(n), this._render(n);
2671
+ }), this._initializing = !1, this._initWatchers(i), this._applyProps(i), this._render(i);
2694
2672
  }
2695
2673
  connectedCallback() {
2696
2674
  this._runLogicWithinErrorBoundary(t, () => {
@@ -2728,13 +2706,13 @@ function Qt(e, t) {
2728
2706
  );
2729
2707
  });
2730
2708
  }
2731
- attributeChangedCallback(r, n, i) {
2709
+ attributeChangedCallback(r, i, n) {
2732
2710
  this._runLogicWithinErrorBoundary(t, () => {
2733
- this._applyProps(t), n !== i && this._requestRender(), kt(
2711
+ this._applyProps(t), i !== n && this._requestRender(), $t(
2734
2712
  t,
2735
2713
  r,
2736
- n,
2737
2714
  i,
2715
+ n,
2738
2716
  this.context
2739
2717
  );
2740
2718
  });
@@ -2747,21 +2725,21 @@ function Qt(e, t) {
2747
2725
  // --- Render ---
2748
2726
  _render(r) {
2749
2727
  this._runLogicWithinErrorBoundary(r, () => {
2750
- Jt(
2728
+ Gt(
2751
2729
  this.shadowRoot,
2752
2730
  r,
2753
2731
  this.context,
2754
2732
  this._refs,
2755
- (n) => {
2756
- this._lastHtmlStringForJitCSS = n, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(n);
2733
+ (i) => {
2734
+ this._lastHtmlStringForJitCSS = i, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(i);
2757
2735
  },
2758
- (n) => {
2759
- this._templateLoading = n, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(n);
2736
+ (i) => {
2737
+ this._templateLoading = i, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(i);
2760
2738
  },
2761
- (n) => {
2762
- this._templateError = n, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(n);
2739
+ (i) => {
2740
+ this._templateError = i, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(i);
2763
2741
  },
2764
- (n) => this._applyStyle(r, n)
2742
+ (i) => this._applyStyle(r, i)
2765
2743
  );
2766
2744
  });
2767
2745
  }
@@ -2771,7 +2749,7 @@ function Qt(e, t) {
2771
2749
  _requestRender() {
2772
2750
  this._runLogicWithinErrorBoundary(this._cfg, () => {
2773
2751
  fe(() => {
2774
- Zt(
2752
+ Xt(
2775
2753
  () => this._render(this._cfg),
2776
2754
  this._lastRenderTime,
2777
2755
  this._renderCount,
@@ -2790,32 +2768,32 @@ function Qt(e, t) {
2790
2768
  });
2791
2769
  }
2792
2770
  // --- Style ---
2793
- _applyStyle(r, n) {
2771
+ _applyStyle(r, i) {
2794
2772
  this._runLogicWithinErrorBoundary(r, () => {
2795
- Gt(
2773
+ Yt(
2796
2774
  this.shadowRoot,
2797
2775
  this.context,
2798
- n,
2776
+ i,
2799
2777
  this._styleSheet,
2800
- (i) => {
2801
- this._styleSheet = i;
2778
+ (n) => {
2779
+ this._styleSheet = n;
2802
2780
  }
2803
2781
  );
2804
2782
  });
2805
2783
  }
2806
2784
  // --- Error Boundary function ---
2807
- _runLogicWithinErrorBoundary(r, n) {
2785
+ _runLogicWithinErrorBoundary(r, i) {
2808
2786
  this._hasError && (this._hasError = !1);
2809
2787
  try {
2810
- n();
2811
- } catch (i) {
2812
- this._hasError = !0, r.onError && r.onError(i, this.context);
2788
+ i();
2789
+ } catch (n) {
2790
+ this._hasError = !0, r.onError && r.onError(n, this.context);
2813
2791
  }
2814
2792
  }
2815
2793
  // --- State, props, computed ---
2816
2794
  _initContext(r) {
2817
2795
  try {
2818
- let n = function(s, o = "") {
2796
+ let i = function(s, o = "") {
2819
2797
  return Array.isArray(s) ? new Proxy(s, {
2820
2798
  get(a, u, m) {
2821
2799
  const g = Reflect.get(a, u, m);
@@ -2827,47 +2805,47 @@ function Qt(e, t) {
2827
2805
  "splice",
2828
2806
  "sort",
2829
2807
  "reverse"
2830
- ].includes(u) ? function(...h) {
2831
- const l = g.apply(a, h);
2832
- if (!i._initializing) {
2808
+ ].includes(u) ? function(...p) {
2809
+ const l = g.apply(a, p);
2810
+ if (!n._initializing) {
2833
2811
  const d = o || "root";
2834
- i._triggerWatchers(d, a), fe(() => i._render(r), i._componentId);
2812
+ n._triggerWatchers(d, a), fe(() => n._render(r), n._componentId);
2835
2813
  }
2836
2814
  return l;
2837
2815
  } : g;
2838
2816
  },
2839
2817
  set(a, u, m) {
2840
- if (a[u] = m, !i._initializing) {
2818
+ if (a[u] = m, !n._initializing) {
2841
2819
  const g = o ? `${o}.${String(u)}` : String(u);
2842
- i._triggerWatchers(g, m), fe(() => i._render(r), i._componentId);
2820
+ n._triggerWatchers(g, m), fe(() => n._render(r), n._componentId);
2843
2821
  }
2844
2822
  return !0;
2845
2823
  },
2846
2824
  deleteProperty(a, u) {
2847
- if (delete a[u], !i._initializing) {
2825
+ if (delete a[u], !n._initializing) {
2848
2826
  const m = o ? `${o}.${String(u)}` : String(u);
2849
- i._triggerWatchers(m, void 0), fe(() => i._render(r), i._componentId);
2827
+ n._triggerWatchers(m, void 0), fe(() => n._render(r), n._componentId);
2850
2828
  }
2851
2829
  return !0;
2852
2830
  }
2853
2831
  }) : s && typeof s == "object" ? s.constructor && s.constructor.name === "ReactiveState" ? s : (Object.keys(s).forEach((a) => {
2854
2832
  const u = o ? `${o}.${a}` : a;
2855
- s[a] = n(s[a], u);
2833
+ s[a] = i(s[a], u);
2856
2834
  }), new Proxy(s, {
2857
2835
  set(a, u, m) {
2858
2836
  const g = o ? `${o}.${String(u)}` : String(u);
2859
- return a[u] = n(m, g), i._initializing || (i._triggerWatchers(
2837
+ return a[u] = i(m, g), n._initializing || (n._triggerWatchers(
2860
2838
  g,
2861
2839
  a[u]
2862
- ), fe(() => i._render(r), i._componentId)), !0;
2840
+ ), fe(() => n._render(r), n._componentId)), !0;
2863
2841
  },
2864
2842
  get(a, u, m) {
2865
2843
  return Reflect.get(a, u, m);
2866
2844
  }
2867
2845
  })) : s;
2868
2846
  };
2869
- const i = this;
2870
- return n({
2847
+ const n = this;
2848
+ return i({
2871
2849
  // For functional components, state is managed by state() function calls
2872
2850
  // Include prop defaults in initial reactive context so prop updates trigger reactivity
2873
2851
  ...r.props ? Object.fromEntries(
@@ -2888,15 +2866,15 @@ function Qt(e, t) {
2888
2866
  );
2889
2867
  });
2890
2868
  }
2891
- _triggerWatchers(r, n) {
2892
- yt(this.context, this._watchers, r, n);
2869
+ _triggerWatchers(r, i) {
2870
+ yt(this.context, this._watchers, r, i);
2893
2871
  }
2894
2872
  _applyProps(r) {
2895
2873
  this._runLogicWithinErrorBoundary(r, () => {
2896
2874
  try {
2897
2875
  wt(this, r, this.context);
2898
- } catch (n) {
2899
- this._hasError = !0, r.onError && r.onError(n, this.context);
2876
+ } catch (i) {
2877
+ this._hasError = !0, r.onError && r.onError(i, this.context);
2900
2878
  }
2901
2879
  });
2902
2880
  }
@@ -2905,7 +2883,7 @@ function Qt(e, t) {
2905
2883
  function et(e, t) {
2906
2884
  let r = re(e);
2907
2885
  r.includes("-") || (r = `cer-${r}`);
2908
- let n = {};
2886
+ let i = {};
2909
2887
  if (typeof window < "u")
2910
2888
  try {
2911
2889
  const a = t.toString().match(/\(\s*{\s*([^}]+)\s*}/);
@@ -2914,38 +2892,38 @@ function et(e, t) {
2914
2892
  for (const g of m) {
2915
2893
  const b = g.indexOf("=");
2916
2894
  if (b !== -1) {
2917
- const h = g.substring(0, b).trim(), l = g.substring(b + 1).trim();
2895
+ const p = g.substring(0, b).trim(), l = g.substring(b + 1).trim();
2918
2896
  try {
2919
- l === "true" ? n[h] = !0 : l === "false" ? n[h] = !1 : l === "[]" ? n[h] = [] : l === "{}" ? n[h] = {} : /^\d+$/.test(l) ? n[h] = parseInt(l) : /^'.*'$/.test(l) || /^".*"$/.test(l) ? n[h] = l.slice(1, -1) : n[h] = l;
2897
+ l === "true" ? i[p] = !0 : l === "false" ? i[p] = !1 : l === "[]" ? i[p] = [] : l === "{}" ? i[p] = {} : /^\d+$/.test(l) ? i[p] = parseInt(l) : /^'.*'$/.test(l) || /^".*"$/.test(l) ? i[p] = l.slice(1, -1) : i[p] = l;
2920
2898
  } catch {
2921
- n[h] = "";
2899
+ i[p] = "";
2922
2900
  }
2923
2901
  } else {
2924
- const h = g.split(":")[0].trim();
2925
- h && !h.includes("}") && (n[h] = "");
2902
+ const p = g.split(":")[0].trim();
2903
+ p && !p.includes("}") && (i[p] = "");
2926
2904
  }
2927
2905
  }
2928
2906
  }
2929
2907
  } catch {
2930
2908
  }
2931
- let i = {};
2909
+ let n = {};
2932
2910
  const s = {
2933
2911
  // Generate props config from defaults
2934
2912
  props: Object.fromEntries(
2935
- Object.entries(n).map(([o, a]) => [o, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
2913
+ Object.entries(i).map(([o, a]) => [o, { type: typeof a == "boolean" ? Boolean : typeof a == "number" ? Number : typeof a == "string" ? String : Function, default: a }])
2936
2914
  ),
2937
2915
  // Add lifecycle hooks from the stored functions
2938
2916
  onConnected: (o) => {
2939
- i.onConnected && i.onConnected();
2917
+ n.onConnected && n.onConnected();
2940
2918
  },
2941
2919
  onDisconnected: (o) => {
2942
- i.onDisconnected && i.onDisconnected();
2920
+ n.onDisconnected && n.onDisconnected();
2943
2921
  },
2944
2922
  onAttributeChanged: (o, a, u, m) => {
2945
- i.onAttributeChanged && i.onAttributeChanged(o, a, u);
2923
+ n.onAttributeChanged && n.onAttributeChanged(o, a, u);
2946
2924
  },
2947
2925
  onError: (o, a) => {
2948
- i.onError && o && i.onError(o);
2926
+ n.onError && o && n.onError(o);
2949
2927
  },
2950
2928
  render: (o) => {
2951
2929
  const a = o._componentId || `${r}-${Math.random().toString(36).substr(2, 9)}`;
@@ -2953,29 +2931,29 @@ function et(e, t) {
2953
2931
  o.requestRender && o.requestRender();
2954
2932
  });
2955
2933
  try {
2956
- Xt(o);
2957
- const u = Object.keys(n).length > 0;
2934
+ Qt(o);
2935
+ const u = Object.keys(i).length > 0;
2958
2936
  let m;
2959
2937
  if (u) {
2960
2938
  const g = {};
2961
- Object.keys(n).forEach((b) => {
2962
- g[b] = o[b] ?? n[b];
2939
+ Object.keys(i).forEach((b) => {
2940
+ g[b] = o[b] ?? i[b];
2963
2941
  }), m = t(g);
2964
2942
  } else
2965
2943
  m = t();
2966
2944
  if (o._hookCallbacks) {
2967
2945
  const g = o._hookCallbacks;
2968
- g.onConnected && (i.onConnected = g.onConnected), g.onDisconnected && (i.onDisconnected = g.onDisconnected), g.onAttributeChanged && (i.onAttributeChanged = g.onAttributeChanged), g.onError && (i.onError = g.onError), g.style && (o._styleCallback = g.style);
2946
+ g.onConnected && (n.onConnected = g.onConnected), g.onDisconnected && (n.onDisconnected = g.onDisconnected), g.onAttributeChanged && (n.onAttributeChanged = g.onAttributeChanged), g.onError && (n.onError = g.onError), g.style && (o._styleCallback = g.style);
2969
2947
  }
2970
2948
  return m;
2971
2949
  } finally {
2972
- Yt(), F.clearCurrentComponent();
2950
+ er(), F.clearCurrentComponent();
2973
2951
  }
2974
2952
  }
2975
2953
  };
2976
- Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(r, Qt(r, s)));
2954
+ Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(r, tr(r, s)));
2977
2955
  }
2978
- class er {
2956
+ class rr {
2979
2957
  map = /* @__PURE__ */ new Map();
2980
2958
  maxSize;
2981
2959
  constructor(t) {
@@ -2988,8 +2966,8 @@ class er {
2988
2966
  }
2989
2967
  set(t, r) {
2990
2968
  if (this.map.has(t) && this.map.delete(t), this.map.set(t, r), this.map.size > this.maxSize) {
2991
- const n = this.map.keys().next().value;
2992
- n !== void 0 && this.map.delete(n);
2969
+ const i = this.map.keys().next().value;
2970
+ i !== void 0 && this.map.delete(i);
2993
2971
  }
2994
2972
  }
2995
2973
  has(t) {
@@ -2999,8 +2977,8 @@ class er {
2999
2977
  this.map.clear();
3000
2978
  }
3001
2979
  }
3002
- const De = new er(500);
3003
- function tr(e, t) {
2980
+ const De = new rr(500);
2981
+ function nr(e, t) {
3004
2982
  if (e == null) {
3005
2983
  console.warn(
3006
2984
  `⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`
@@ -3013,117 +2991,117 @@ function tr(e, t) {
3013
2991
  `💡 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()}"`
3014
2992
  );
3015
2993
  }
3016
- function pe(e, t = {}, r, n) {
3017
- const i = n ?? t.key;
3018
- return { tag: e, key: i, props: t, children: r };
2994
+ function he(e, t = {}, r, i) {
2995
+ const n = i ?? t.key;
2996
+ return { tag: e, key: n, props: t, children: r };
3019
2997
  }
3020
2998
  function Ae(e) {
3021
2999
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
3022
3000
  }
3023
- function _e(e) {
3001
+ function Ce(e) {
3024
3002
  return typeof e == "object" && e !== null && "tag" in e && !Ae(e);
3025
3003
  }
3026
- function rr(e, t) {
3004
+ function ir(e, t) {
3027
3005
  return e.key != null ? e : { ...e, key: t };
3028
3006
  }
3029
- function nr(e, t = [], r = {}) {
3030
- const n = {}, i = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3007
+ function sr(e, t = [], r = {}) {
3008
+ const i = {}, n = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3031
3009
  let u;
3032
3010
  for (; u = a.exec(e); ) {
3033
- const m = u[1], g = u[2], b = (u[4] || u[6]) ?? "", h = b.match(/^{{(\d+)}}$/);
3034
- let l = h ? t[Number(h[1])] ?? null : b;
3035
- h || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
3011
+ const m = u[1], g = u[2], b = (u[4] || u[6]) ?? "", p = b.match(/^{{(\d+)}}$/);
3012
+ let l = p ? t[Number(p[1])] ?? null : b;
3013
+ p || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
3036
3014
  const d = ["model", "bind", "show", "class", "style", "ref"];
3037
3015
  if (m === ":") {
3038
- const [x, w] = g.split(":"), [c, ...p] = x.split(".");
3016
+ const [x, w] = g.split(":"), [c, ...h] = x.split(".");
3039
3017
  if (d.includes(c)) {
3040
- const y = [...p], C = c === "model" && w ? `model:${w}` : c;
3041
- s[C] = {
3018
+ const y = [...h], k = c === "model" && w ? `model:${w}` : c;
3019
+ s[k] = {
3042
3020
  value: l,
3043
3021
  modifiers: y,
3044
3022
  arg: w
3045
3023
  };
3046
3024
  } else {
3047
3025
  let y = l;
3048
- y && ee(y) && (y = y.value), i[g] = y, o.push(g);
3026
+ y && ee(y) && (y = y.value), n[g] = y, o.push(g);
3049
3027
  }
3050
3028
  } else if (m === "@") {
3051
3029
  const [x, ...w] = g.split("."), c = w;
3052
- tr(l, x);
3053
- const p = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
3054
- if (p) {
3055
- const y = (k) => {
3056
- if (c.includes("prevent") && k.preventDefault(), c.includes("stop") && k.stopPropagation(), !(c.includes("self") && k.target !== k.currentTarget))
3057
- return c.includes("once") && k.currentTarget?.removeEventListener(x, y), p(k);
3058
- }, C = "on" + x.charAt(0).toUpperCase() + x.slice(1);
3059
- n[C] = y;
3030
+ nr(l, x);
3031
+ const h = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
3032
+ if (h) {
3033
+ const y = ($) => {
3034
+ if (c.includes("prevent") && $.preventDefault(), c.includes("stop") && $.stopPropagation(), !(c.includes("self") && $.target !== $.currentTarget))
3035
+ return c.includes("once") && $.currentTarget?.removeEventListener(x, y), h($);
3036
+ }, k = "on" + x.charAt(0).toUpperCase() + x.slice(1);
3037
+ i[k] = y;
3060
3038
  }
3061
- } else g === "ref" ? n.ref = l : i[g] = l;
3039
+ } else g === "ref" ? i.ref = l : n[g] = l;
3062
3040
  }
3063
- return { props: n, attrs: i, directives: s, bound: o };
3041
+ return { props: i, attrs: n, directives: s, bound: o };
3064
3042
  }
3065
- function ir(e, t, r) {
3066
- const n = ge.length > 0 ? ge[ge.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3043
+ function or(e, t, r) {
3044
+ const i = ge.length > 0 ? ge[ge.length - 1] : void 0, n = r ?? i, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3067
3045
  if (s && o) {
3068
3046
  const f = De.get(o);
3069
3047
  if (f) return f;
3070
3048
  }
3071
3049
  function a(f, v) {
3072
- return pe("#text", {}, f, v);
3050
+ return he("#text", {}, f, v);
3073
3051
  }
3074
3052
  let u = "";
3075
3053
  for (let f = 0; f < e.length; f++)
3076
3054
  u += e[f], f < t.length && (u += `{{${f}}}`);
3077
3055
  const m = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, g = [];
3078
- let b, h = [], l = null, d = {}, x, w = 0, c = [];
3079
- function p(f) {
3056
+ let b, p = [], l = null, d = {}, x, w = 0, c = [];
3057
+ function h(f) {
3080
3058
  !f || typeof f != "object" || Ae(f) || (f.props || f.attrs ? (f.props && (d.props || (d.props = {}), Object.assign(d.props, f.props)), f.attrs && (d.attrs || (d.attrs = {}), Object.keys(f.attrs).forEach((v) => {
3081
3059
  if (v === "style" && d.attrs.style) {
3082
3060
  const A = d.attrs.style.replace(
3083
3061
  /;?\s*$/,
3084
3062
  ""
3085
- ), _ = f.attrs.style.replace(/^;?\s*/, "");
3086
- d.attrs.style = A + "; " + _;
3063
+ ), C = f.attrs.style.replace(/^;?\s*/, "");
3064
+ d.attrs.style = A + "; " + C;
3087
3065
  } else if (v === "class" && d.attrs.class) {
3088
- const A = d.attrs.class.trim().split(/\s+/).filter(Boolean), _ = f.attrs.class.trim().split(/\s+/).filter(Boolean), $ = [
3089
- .../* @__PURE__ */ new Set([...A, ..._])
3066
+ const A = d.attrs.class.trim().split(/\s+/).filter(Boolean), C = f.attrs.class.trim().split(/\s+/).filter(Boolean), E = [
3067
+ .../* @__PURE__ */ new Set([...A, ...C])
3090
3068
  ];
3091
- d.attrs.class = $.join(" ");
3069
+ d.attrs.class = E.join(" ");
3092
3070
  } else
3093
3071
  d.attrs[v] = f.attrs[v];
3094
3072
  }))) : (d.props || (d.props = {}), Object.assign(d.props, f)));
3095
3073
  }
3096
3074
  function y(f, v) {
3097
- const A = l ? h : c;
3075
+ const A = l ? p : c;
3098
3076
  if (Ae(f)) {
3099
- const _ = f.key ?? v;
3100
- let $ = f.children;
3077
+ const C = f.key ?? v;
3078
+ let E = f.children;
3101
3079
  A.push({
3102
3080
  ...f,
3103
- key: _,
3104
- children: $
3081
+ key: C,
3082
+ children: E
3105
3083
  });
3106
3084
  return;
3107
3085
  }
3108
- if (_e(f)) {
3109
- A.push(rr(f, void 0));
3086
+ if (Ce(f)) {
3087
+ A.push(ir(f, void 0));
3110
3088
  return;
3111
3089
  }
3112
3090
  if (Array.isArray(f)) {
3113
3091
  if (f.length === 0) return;
3114
- for (let _ = 0; _ < f.length; _++) {
3115
- const $ = f[_];
3116
- Ae($) || _e($) || Array.isArray($) ? y($, `${v}-${_}`) : $ !== null && typeof $ == "object" ? p($) : A.push(a(String($), `${v}-${_}`));
3092
+ for (let C = 0; C < f.length; C++) {
3093
+ const E = f[C];
3094
+ Ae(E) || Ce(E) || Array.isArray(E) ? y(E, `${v}-${C}`) : E !== null && typeof E == "object" ? h(E) : A.push(a(String(E), `${v}-${C}`));
3117
3095
  }
3118
3096
  return;
3119
3097
  }
3120
3098
  if (f !== null && typeof f == "object") {
3121
- p(f);
3099
+ h(f);
3122
3100
  return;
3123
3101
  }
3124
3102
  A.push(a(String(f), v));
3125
3103
  }
3126
- const C = /* @__PURE__ */ new Set([
3104
+ const k = /* @__PURE__ */ new Set([
3127
3105
  "area",
3128
3106
  "base",
3129
3107
  "br",
@@ -3142,14 +3120,14 @@ function ir(e, t, r) {
3142
3120
  for (; b = m.exec(u); )
3143
3121
  if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
3144
3122
  if (b[1]) {
3145
- const f = b[1], v = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || C.has(f), {
3146
- props: _,
3147
- attrs: $,
3123
+ const f = b[1], v = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || k.has(f), {
3124
+ props: C,
3125
+ attrs: E,
3148
3126
  directives: T,
3149
3127
  bound: R
3150
- } = nr(b[2] || "", t, i), S = { props: {}, attrs: {} };
3151
- for (const P in _) S.props[P] = _[P];
3152
- for (const P in $) S.attrs[P] = $[P];
3128
+ } = sr(b[2] || "", t, n), S = { props: {}, attrs: {} };
3129
+ for (const P in C) S.props[P] = C[P];
3130
+ for (const P in E) S.attrs[P] = E[P];
3153
3131
  if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
3154
3132
  try {
3155
3133
  S.props.key = S.attrs.key;
@@ -3173,7 +3151,7 @@ function ir(e, t, r) {
3173
3151
  L && ee(L) && (L = L.value), S.props[K] = L, delete S.attrs[K];
3174
3152
  }
3175
3153
  }
3176
- if ((f.includes("-") || !!i?.__customElements?.has?.(f)) && (S.isCustomElement = !0, R && S.attrs)) {
3154
+ if ((f.includes("-") || !!n?.__customElements?.has?.(f)) && (S.isCustomElement = !0, R && S.attrs)) {
3177
3155
  const K = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3178
3156
  for (const L of R)
3179
3157
  if (L in S.attrs && !(S.props && L in S.props)) {
@@ -3186,90 +3164,90 @@ function ir(e, t, r) {
3186
3164
  }
3187
3165
  if (T && Object.keys(T).some((P) => P === "model" || P.startsWith("model:")))
3188
3166
  try {
3189
- const P = Symbol.for("cer.registry"), B = globalThis[P], V = !!(B && typeof B.has == "function" && B.has(f)), we = !!(i && (i.__customElements instanceof Set && i.__customElements.has(f) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(f)));
3167
+ const P = Symbol.for("cer.registry"), B = globalThis[P], V = !!(B && typeof B.has == "function" && B.has(f)), we = !!(n && (n.__customElements instanceof Set && n.__customElements.has(f) || Array.isArray(n.__isCustomElements) && n.__isCustomElements.includes(f)));
3190
3168
  if (!!(f.includes("-") || we || V))
3191
3169
  for (const M of Object.keys(T)) {
3192
3170
  if (M !== "model" && !M.startsWith("model:")) continue;
3193
- const J = T[M], Z = J.arg ?? (M.includes(":") ? M.split(":", 2)[1] : void 0), z = J.value, E = Z ?? "modelValue", U = H, D = Ee, W = i ? i._state || i : void 0;
3171
+ const J = T[M], Z = J.arg ?? (M.includes(":") ? M.split(":", 2)[1] : void 0), z = J.value, _ = Z ?? "modelValue", U = H, D = _e, N = n ? n._state || n : void 0;
3194
3172
  let O;
3195
- typeof z == "string" && i ? O = U(W, z) : (O = z, O && ee(O) && (O = O.value)), S.props[E] = O;
3173
+ typeof z == "string" && n ? O = U(N, z) : (O = z, O && ee(O) && (O = O.value)), S.props[_] = O;
3196
3174
  try {
3197
- const ne = re(E);
3175
+ const ne = re(_);
3198
3176
  S.attrs || (S.attrs = {}), O !== void 0 && (S.attrs[ne] = O);
3199
3177
  } catch {
3200
3178
  }
3201
3179
  S.isCustomElement = !0;
3202
- const qe = `update:${re(E)}`.replace(/-([a-z])/g, (ne, Y) => Y.toUpperCase()), ut = "on" + qe.charAt(0).toUpperCase() + qe.slice(1);
3180
+ const qe = `update:${re(_)}`.replace(/-([a-z])/g, (ne, Y) => Y.toUpperCase()), ut = "on" + qe.charAt(0).toUpperCase() + qe.slice(1);
3203
3181
  S.props[ut] = function(ne) {
3204
3182
  const Y = ne.detail !== void 0 ? ne.detail : ne.target ? ne.target.value : void 0;
3205
- if (W)
3183
+ if (N)
3206
3184
  if (z && ee(z)) {
3207
3185
  const ae = z.value;
3208
- (Array.isArray(Y) && Array.isArray(ae) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...ae].sort()) : Y !== ae) && (z.value = Y, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3186
+ (Array.isArray(Y) && Array.isArray(ae) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...ae].sort()) : Y !== ae) && (z.value = Y, n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
3209
3187
  } else {
3210
- const ae = U(W, typeof z == "string" ? z : String(z));
3211
- (Array.isArray(Y) && Array.isArray(ae) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...ae].sort()) : Y !== ae) && (D(W, typeof z == "string" ? z : String(z), Y), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3188
+ const ae = U(N, typeof z == "string" ? z : String(z));
3189
+ (Array.isArray(Y) && Array.isArray(ae) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...ae].sort()) : Y !== ae) && (D(N, typeof z == "string" ? z : String(z), Y), n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
3212
3190
  }
3213
3191
  }, delete T[M];
3214
3192
  }
3215
3193
  } catch {
3216
3194
  }
3217
3195
  if (Object.keys(T).length > 0 && (S.directives = { ...T }), v) {
3218
- const P = pe(
3196
+ const P = he(
3219
3197
  l,
3220
3198
  d,
3221
- h.length === 1 && _e(h[0]) && h[0].tag === "#text" ? typeof h[0].children == "string" ? h[0].children : "" : h.length ? h : void 0,
3199
+ p.length === 1 && Ce(p[0]) && p[0].tag === "#text" ? typeof p[0].children == "string" ? p[0].children : "" : p.length ? p : void 0,
3222
3200
  x
3223
3201
  ), B = g.pop();
3224
- B ? (l = B.tag, d = B.props, x = B.key, h = B.children, h.push(P)) : (c.push(P), l = null, d = {}, x = void 0, h = []);
3225
- } else A ? l ? h.push(pe(f, S, void 0, void 0)) : c.push(pe(f, S, void 0, void 0)) : (l && g.push({
3202
+ B ? (l = B.tag, d = B.props, x = B.key, p = B.children, p.push(P)) : (c.push(P), l = null, d = {}, x = void 0, p = []);
3203
+ } else A ? l ? p.push(he(f, S, void 0, void 0)) : c.push(he(f, S, void 0, void 0)) : (l && g.push({
3226
3204
  tag: l,
3227
3205
  props: d,
3228
- children: h,
3206
+ children: p,
3229
3207
  key: x
3230
- }), l = f, d = S, h = []);
3208
+ }), l = f, d = S, p = []);
3231
3209
  } else if (typeof b[3] < "u") {
3232
3210
  const f = Number(b[3]), v = t[f], A = `interp-${f}`;
3233
3211
  y(v, A);
3234
3212
  } else if (b[4]) {
3235
- const f = b[4], v = l ? h : c, A = f.split(/({{\d+}})/);
3236
- for (const _ of A) {
3237
- if (!_) continue;
3238
- const $ = _.match(/^{{(\d+)}}$/);
3239
- if ($) {
3240
- const T = Number($[1]), R = t[T], S = `interp-${T}`;
3213
+ const f = b[4], v = l ? p : c, A = f.split(/({{\d+}})/);
3214
+ for (const C of A) {
3215
+ if (!C) continue;
3216
+ const E = C.match(/^{{(\d+)}}$/);
3217
+ if (E) {
3218
+ const T = Number(E[1]), R = t[T], S = `interp-${T}`;
3241
3219
  y(R, S);
3242
3220
  } else {
3243
3221
  const T = `text-${w++}`;
3244
- v.push(a(_, T));
3222
+ v.push(a(C, T));
3245
3223
  }
3246
3224
  }
3247
3225
  }
3248
3226
  }
3249
- const k = c.filter((f) => _e(f) && f.tag === "#text" ? typeof f.children == "string" && f.children.trim() !== "" : !0);
3250
- if (k.length === 1) {
3251
- const f = k[0];
3227
+ const $ = c.filter((f) => Ce(f) && f.tag === "#text" ? typeof f.children == "string" && f.children.trim() !== "" : !0);
3228
+ if ($.length === 1) {
3229
+ const f = $[0];
3252
3230
  return s && o && De.set(o, f), f;
3253
- } else if (k.length > 1) {
3254
- const f = k;
3231
+ } else if ($.length > 1) {
3232
+ const f = $;
3255
3233
  return s && o && De.set(o, f), f;
3256
3234
  }
3257
- return pe("div", {}, "", "fallback-root");
3235
+ return he("div", {}, "", "fallback-root");
3258
3236
  }
3259
3237
  function ce(e, ...t) {
3260
- const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3261
- return ir(e, t, n);
3238
+ const r = t[t.length - 1], i = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3239
+ return or(e, t, i);
3262
3240
  }
3263
3241
  function Re(e, t) {
3264
3242
  return j(e ? t : [], "when-block");
3265
3243
  }
3266
- function wr(e, t) {
3267
- return e.map((r, n) => {
3268
- const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
3269
- return j(t(r, n), `each-${i}`);
3244
+ function vr(e, t) {
3245
+ return e.map((r, i) => {
3246
+ const n = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${i}` : String(r);
3247
+ return j(t(r, i), `each-${n}`);
3270
3248
  });
3271
3249
  }
3272
- function sr() {
3250
+ function ar() {
3273
3251
  const e = [];
3274
3252
  return {
3275
3253
  when(t, r) {
@@ -3279,14 +3257,14 @@ function sr() {
3279
3257
  return e.push([!0, t]), this;
3280
3258
  },
3281
3259
  done() {
3282
- return or(...e);
3260
+ return cr(...e);
3283
3261
  }
3284
3262
  };
3285
3263
  }
3286
- function or(...e) {
3264
+ function cr(...e) {
3287
3265
  for (let t = 0; t < e.length; t++) {
3288
- const [r, n] = e[t];
3289
- if (r) return [j(n, `whenChain-branch-${t}`)];
3266
+ const [r, i] = e[t];
3267
+ if (r) return [j(i, `whenChain-branch-${t}`)];
3290
3268
  }
3291
3269
  return [j([], "whenChain-empty")];
3292
3270
  }
@@ -3298,48 +3276,48 @@ function j(e, t) {
3298
3276
  children: r
3299
3277
  };
3300
3278
  }
3301
- function xr(e, t) {
3279
+ function $r(e, t) {
3302
3280
  return Re(!e, t);
3303
3281
  }
3304
- function vr(e, t) {
3282
+ function kr(e, t) {
3305
3283
  const r = !e || e.length === 0;
3306
3284
  return Re(r, t);
3307
3285
  }
3308
- function kr(e, t) {
3286
+ function Cr(e, t) {
3309
3287
  const r = !!(e && e.length > 0);
3310
3288
  return Re(r, t);
3311
3289
  }
3312
- function Cr(e, t, r) {
3313
- const n = [];
3314
- return e.forEach((i, s) => {
3315
- t(i, s) && n.push({ item: i, originalIndex: s });
3316
- }), n.map(({ item: i, originalIndex: s }, o) => {
3317
- const a = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
3318
- return j(r(i, s, o), `each-where-${a}`);
3290
+ function _r(e, t, r) {
3291
+ const i = [];
3292
+ return e.forEach((n, s) => {
3293
+ t(n, s) && i.push({ item: n, originalIndex: s });
3294
+ }), i.map(({ item: n, originalIndex: s }, o) => {
3295
+ const a = typeof n == "object" && n != null ? n?.key ?? n?.id ?? `filtered-${s}` : `filtered-${s}`;
3296
+ return j(r(n, s, o), `each-where-${a}`);
3319
3297
  });
3320
3298
  }
3321
- function _r(e, t) {
3299
+ function Er(e, t) {
3322
3300
  const r = e?.length ?? 0;
3323
3301
  return r === 0 && t.empty ? j(t.empty, "switch-length-empty") : r === 1 && t.one ? j(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? j(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? j(t.many(e), "switch-length-many") : j([], "switch-length-fallback");
3324
3302
  }
3325
- function Er(e, t, r) {
3326
- const n = /* @__PURE__ */ new Map();
3327
- return e.forEach((i) => {
3328
- const s = t(i);
3329
- n.has(s) || n.set(s, []), n.get(s).push(i);
3330
- }), Array.from(n.entries()).map(([i, s], o) => j(
3331
- r(i, s, o),
3332
- `each-group-${i}`
3303
+ function Sr(e, t, r) {
3304
+ const i = /* @__PURE__ */ new Map();
3305
+ return e.forEach((n) => {
3306
+ const s = t(n);
3307
+ i.has(s) || i.set(s, []), i.get(s).push(n);
3308
+ }), Array.from(i.entries()).map(([n, s], o) => j(
3309
+ r(n, s, o),
3310
+ `each-group-${n}`
3333
3311
  ));
3334
3312
  }
3335
- function $r(e, t, r, n) {
3336
- const i = r * t, s = Math.min(i + t, e.length);
3337
- return e.slice(i, s).map((a, u) => {
3338
- const m = i + u, g = typeof a == "object" && a != null ? a?.key ?? a?.id ?? `page-${m}` : `page-${m}`;
3339
- return j(n(a, m, u), `each-page-${g}`);
3313
+ function Ar(e, t, r, i) {
3314
+ const n = r * t, s = Math.min(n + t, e.length);
3315
+ return e.slice(n, s).map((a, u) => {
3316
+ const m = n + u, g = typeof a == "object" && a != null ? a?.key ?? a?.id ?? `page-${m}` : `page-${m}`;
3317
+ return j(i(a, m, u), `each-page-${g}`);
3340
3318
  });
3341
3319
  }
3342
- function Sr(e, t) {
3320
+ function Tr(e, t) {
3343
3321
  return e.loading && t.loading ? j(t.loading, "promise-loading") : e.error && t.error ? j(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? j(t.success(e.data), "promise-success") : t.idle ? j(t.idle, "promise-idle") : j([], "promise-fallback");
3344
3322
  }
3345
3323
  function q(e, t) {
@@ -3355,7 +3333,7 @@ const te = {
3355
3333
  "2xl": "(min-width:1536px)",
3356
3334
  // Dark mode (matching style.ts)
3357
3335
  dark: "(prefers-color-scheme: dark)"
3358
- }, lt = ["sm", "md", "lg", "xl", "2xl"], ar = {
3336
+ }, lt = ["sm", "md", "lg", "xl", "2xl"], lr = {
3359
3337
  // Breakpoint-based rendering (matching style.ts exactly)
3360
3338
  sm: (e) => q(te.sm, e),
3361
3339
  md: (e) => q(te.md, e),
@@ -3374,42 +3352,42 @@ const te = {
3374
3352
  portrait: (e) => q("(orientation: portrait)", e),
3375
3353
  landscape: (e) => q("(orientation: landscape)", e)
3376
3354
  };
3377
- function Ar(e, t) {
3355
+ function Rr(e, t) {
3378
3356
  const r = [];
3379
3357
  e.includes("dark") ? r.push(te.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3380
- const n = e.filter(
3358
+ const i = e.filter(
3381
3359
  (o) => lt.includes(o)
3382
- ), i = n[n.length - 1];
3383
- i && i in te && r.push(te[i]);
3360
+ ), n = i[i.length - 1];
3361
+ n && n in te && r.push(te[n]);
3384
3362
  const s = r.length > 0 ? r.join(" and ") : "all";
3385
3363
  return q(s, t);
3386
3364
  }
3387
- function Tr(e) {
3365
+ function Or(e) {
3388
3366
  const t = [];
3389
3367
  return e.base && t.push(j(e.base, "responsive-base")), lt.forEach((r) => {
3390
- const n = e[r];
3391
- n && t.push(ar[r](n));
3368
+ const i = e[r];
3369
+ i && t.push(lr[r](i));
3392
3370
  }), t;
3393
3371
  }
3394
- function Rr(e) {
3372
+ function Pr(e) {
3395
3373
  const t = [];
3396
3374
  let r = null;
3397
3375
  return {
3398
- case(n, i) {
3399
- const s = typeof n == "function" ? n : (o) => o === n;
3400
- return t.push({ condition: s, content: i }), this;
3376
+ case(i, n) {
3377
+ const s = typeof i == "function" ? i : (o) => o === i;
3378
+ return t.push({ condition: s, content: n }), this;
3401
3379
  },
3402
- when(n, i) {
3403
- return t.push({ condition: n, content: i }), this;
3380
+ when(i, n) {
3381
+ return t.push({ condition: i, content: n }), this;
3404
3382
  },
3405
- otherwise(n) {
3406
- return r = n, this;
3383
+ otherwise(i) {
3384
+ return r = i, this;
3407
3385
  },
3408
3386
  done() {
3409
- for (let n = 0; n < t.length; n++) {
3410
- const { condition: i, content: s } = t[n];
3411
- if (i(e))
3412
- return j(s, `switch-case-${n}`);
3387
+ for (let i = 0; i < t.length; i++) {
3388
+ const { condition: n, content: s } = t[i];
3389
+ if (n(e))
3390
+ return j(s, `switch-case-${i}`);
3413
3391
  }
3414
3392
  return j(r || [], "switch-otherwise");
3415
3393
  }
@@ -3431,10 +3409,10 @@ class de extends EventTarget {
3431
3409
  * @param data - Optional event payload
3432
3410
  */
3433
3411
  emit(t, r) {
3434
- const n = Date.now(), i = this.eventCounters.get(t);
3435
- if (!i || n - i.window > 1e3)
3436
- this.eventCounters.set(t, { count: 1, window: n });
3437
- else if (i.count++, i.count > 50 && i.count > 100)
3412
+ const i = Date.now(), n = this.eventCounters.get(t);
3413
+ if (!n || i - n.window > 1e3)
3414
+ this.eventCounters.set(t, { count: 1, window: i });
3415
+ else if (n.count++, n.count > 50 && n.count > 100)
3438
3416
  return;
3439
3417
  this.dispatchEvent(new CustomEvent(t, {
3440
3418
  detail: r,
@@ -3465,8 +3443,8 @@ class de extends EventTarget {
3465
3443
  * @param handler - Handler function to remove
3466
3444
  */
3467
3445
  off(t, r) {
3468
- const n = this.handlers[t];
3469
- n && n.delete(r);
3446
+ const i = this.handlers[t];
3447
+ i && i.delete(r);
3470
3448
  }
3471
3449
  /**
3472
3450
  * Remove all handlers for a specific event.
@@ -3481,8 +3459,8 @@ class de extends EventTarget {
3481
3459
  * @param handler - CustomEvent handler
3482
3460
  * @param options - AddEventListener options
3483
3461
  */
3484
- listen(t, r, n) {
3485
- return this.addEventListener(t, r, n), () => this.removeEventListener(t, r);
3462
+ listen(t, r, i) {
3463
+ return this.addEventListener(t, r, i), () => this.removeEventListener(t, r);
3486
3464
  }
3487
3465
  /**
3488
3466
  * Register a one-time event handler. Returns a promise that resolves with the event data.
@@ -3490,9 +3468,9 @@ class de extends EventTarget {
3490
3468
  * @param handler - Handler function
3491
3469
  */
3492
3470
  once(t, r) {
3493
- return new Promise((n) => {
3494
- const i = this.on(t, (s) => {
3495
- i(), r(s), n(s);
3471
+ return new Promise((i) => {
3472
+ const n = this.on(t, (s) => {
3473
+ n(), r(s), i(s);
3496
3474
  });
3497
3475
  });
3498
3476
  }
@@ -3522,9 +3500,9 @@ class de extends EventTarget {
3522
3500
  */
3523
3501
  getEventStats() {
3524
3502
  const t = {};
3525
- for (const [r, n] of this.eventCounters.entries())
3503
+ for (const [r, i] of this.eventCounters.entries())
3526
3504
  t[r] = {
3527
- count: n.count,
3505
+ count: i.count,
3528
3506
  handlersCount: this.getHandlerCount(r)
3529
3507
  };
3530
3508
  return t;
@@ -3536,14 +3514,14 @@ class de extends EventTarget {
3536
3514
  this.eventCounters.clear();
3537
3515
  }
3538
3516
  }
3539
- const be = de.getInstance(), Or = (e, t) => be.emit(e, t), Pr = (e, t) => be.on(e, t), Lr = (e, t) => be.off(e, t), Mr = (e, t) => be.once(e, t), jr = (e, t, r) => be.listen(e, t, r);
3517
+ const be = de.getInstance(), Lr = (e, t) => be.emit(e, t), Mr = (e, t) => be.on(e, t), jr = (e, t) => be.off(e, t), Wr = (e, t) => be.once(e, t), Nr = (e, t, r) => be.listen(e, t, r);
3540
3518
  function tt(e) {
3541
3519
  let t = { ...e };
3542
3520
  const r = [];
3543
- function n(a) {
3521
+ function i(a) {
3544
3522
  r.push(a), a(t);
3545
3523
  }
3546
- function i() {
3524
+ function n() {
3547
3525
  return t;
3548
3526
  }
3549
3527
  function s(a) {
@@ -3553,21 +3531,21 @@ function tt(e) {
3553
3531
  function o() {
3554
3532
  r.forEach((a) => a(t));
3555
3533
  }
3556
- return { subscribe: n, getState: i, setState: s };
3534
+ return { subscribe: i, getState: n, setState: s };
3557
3535
  }
3558
3536
  const rt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Q = (e, t) => {
3559
3537
  for (const r of e) {
3560
- const n = [], i = r.path.replace(/:[^/]+/g, (a) => (n.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3538
+ const i = [], n = r.path.replace(/:[^/]+/g, (a) => (i.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${n}$`), o = t.match(s);
3561
3539
  if (o) {
3562
3540
  const a = {};
3563
- return n.forEach((u, m) => {
3541
+ return i.forEach((u, m) => {
3564
3542
  a[u] = o[m + 1];
3565
3543
  }), { route: r, params: a };
3566
3544
  }
3567
3545
  }
3568
3546
  return { route: null, params: {} };
3569
3547
  }, Ie = {};
3570
- async function cr(e) {
3548
+ async function ur(e) {
3571
3549
  if (e.component) return e.component;
3572
3550
  if (e.load) {
3573
3551
  if (Ie[e.path]) return Ie[e.path];
@@ -3580,98 +3558,98 @@ async function cr(e) {
3580
3558
  }
3581
3559
  throw new Error(`No component or loader defined for route: ${e.path}`);
3582
3560
  }
3583
- function lr(e) {
3584
- const { routes: t, base: r = "", initialUrl: n } = e;
3585
- let i, s, o, a, u, m, g;
3561
+ function fr(e) {
3562
+ const { routes: t, base: r = "", initialUrl: i } = e;
3563
+ let n, s, o, a, u, m, g;
3586
3564
  const b = async (x, w) => {
3587
- const c = t.find((p) => Q([p], x.path).route !== null);
3565
+ const c = t.find((h) => Q([h], x.path).route !== null);
3588
3566
  if (c?.beforeEnter)
3589
3567
  try {
3590
- const p = await c.beforeEnter(x, w);
3591
- return typeof p == "string" ? (await d(p, !0), !1) : p !== !1;
3592
- } catch (p) {
3593
- return se("beforeEnter error", p), !1;
3568
+ const h = await c.beforeEnter(x, w);
3569
+ return typeof h == "string" ? (await d(h, !0), !1) : h !== !1;
3570
+ } catch (h) {
3571
+ return se("beforeEnter error", h), !1;
3594
3572
  }
3595
3573
  return !0;
3596
- }, h = async (x, w) => {
3597
- const c = t.find((p) => Q([p], x.path).route !== null);
3574
+ }, p = async (x, w) => {
3575
+ const c = t.find((h) => Q([h], x.path).route !== null);
3598
3576
  if (c?.onEnter)
3599
3577
  try {
3600
- const p = await c.onEnter(x, w);
3601
- return typeof p == "string" ? (await d(p, !0), !1) : p !== !1;
3602
- } catch (p) {
3603
- return se("onEnter error", p), !1;
3578
+ const h = await c.onEnter(x, w);
3579
+ return typeof h == "string" ? (await d(h, !0), !1) : h !== !1;
3580
+ } catch (h) {
3581
+ return se("onEnter error", h), !1;
3604
3582
  }
3605
3583
  return !0;
3606
3584
  }, l = (x, w) => {
3607
- const c = t.find((p) => Q([p], x.path).route !== null);
3585
+ const c = t.find((h) => Q([h], x.path).route !== null);
3608
3586
  if (c?.afterEnter)
3609
3587
  try {
3610
3588
  c.afterEnter(x, w);
3611
- } catch (p) {
3612
- se("afterEnter error", p);
3589
+ } catch (h) {
3590
+ se("afterEnter error", h);
3613
3591
  }
3614
3592
  }, d = async (x, w = !1) => {
3615
3593
  try {
3616
3594
  const c = {
3617
3595
  path: x.replace(r, "") || "/",
3618
3596
  query: {}
3619
- }, p = Q(t, c.path);
3620
- if (!p) throw new Error(`No route found for ${c.path}`);
3621
- const y = o.getState(), C = {
3597
+ }, h = Q(t, c.path);
3598
+ if (!h) throw new Error(`No route found for ${c.path}`);
3599
+ const y = o.getState(), k = {
3622
3600
  path: c.path,
3623
- params: p.params,
3601
+ params: h.params,
3624
3602
  query: c.query
3625
3603
  };
3626
- if (!await b(C, y) || !await h(C, y)) return;
3627
- typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + x) : window.history.pushState({}, "", r + x)), o.setState(C), l(C, y);
3604
+ if (!await b(k, y) || !await p(k, y)) return;
3605
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + x) : window.history.pushState({}, "", r + x)), o.setState(k), l(k, y);
3628
3606
  } catch (c) {
3629
3607
  se("Navigation error:", c);
3630
3608
  }
3631
3609
  };
3632
- if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
3633
- i = () => {
3634
- const w = new URL(window.location.href), c = w.pathname.replace(r, "") || "/", p = rt(w.search);
3635
- return { path: c, query: p };
3636
- }, s = i();
3610
+ if (typeof window < "u" && typeof document < "u" && typeof i > "u") {
3611
+ n = () => {
3612
+ const w = new URL(window.location.href), c = w.pathname.replace(r, "") || "/", h = rt(w.search);
3613
+ return { path: c, query: h };
3614
+ }, s = n();
3637
3615
  const x = Q(t, s.path);
3638
3616
  o = tt({
3639
3617
  path: s.path,
3640
3618
  params: x.params,
3641
3619
  query: s.query
3642
3620
  }), a = async (w = !1) => {
3643
- const c = i();
3621
+ const c = n();
3644
3622
  await d(c.path, w);
3645
3623
  }, window.addEventListener("popstate", () => a(!0)), u = (w) => d(w, !1), m = (w) => d(w, !0), g = () => window.history.back();
3646
3624
  } else {
3647
- i = () => {
3648
- const c = new URL(n || "/", "http://localhost"), p = c.pathname.replace(r, "") || "/", y = rt(c.search);
3649
- return { path: p, query: y };
3650
- }, s = i();
3625
+ n = () => {
3626
+ const c = new URL(i || "/", "http://localhost"), h = c.pathname.replace(r, "") || "/", y = rt(c.search);
3627
+ return { path: h, query: y };
3628
+ }, s = n();
3651
3629
  const x = Q(t, s.path);
3652
3630
  o = tt({
3653
3631
  path: s.path,
3654
3632
  params: x.params,
3655
3633
  query: s.query
3656
3634
  }), a = async () => {
3657
- const c = i();
3635
+ const c = n();
3658
3636
  await w(c.path);
3659
3637
  };
3660
3638
  const w = async (c) => {
3661
3639
  try {
3662
- const p = {
3640
+ const h = {
3663
3641
  path: c.replace(r, "") || "/",
3664
3642
  query: {}
3665
- }, y = Q(t, p.path);
3666
- if (!y) throw new Error(`No route found for ${p.path}`);
3667
- const C = o.getState(), k = {
3668
- path: p.path,
3643
+ }, y = Q(t, h.path);
3644
+ if (!y) throw new Error(`No route found for ${h.path}`);
3645
+ const k = o.getState(), $ = {
3646
+ path: h.path,
3669
3647
  params: y.params,
3670
- query: p.query
3671
- }, f = t.find((v) => Q([v], k.path).route !== null);
3648
+ query: h.query
3649
+ }, f = t.find((v) => Q([v], $.path).route !== null);
3672
3650
  if (f?.beforeEnter)
3673
3651
  try {
3674
- const v = await f.beforeEnter(k, C);
3652
+ const v = await f.beforeEnter($, k);
3675
3653
  if (typeof v == "string") {
3676
3654
  await w(v);
3677
3655
  return;
@@ -3682,7 +3660,7 @@ function lr(e) {
3682
3660
  }
3683
3661
  if (f?.onEnter)
3684
3662
  try {
3685
- const v = await f.onEnter(k, C);
3663
+ const v = await f.onEnter($, k);
3686
3664
  if (typeof v == "string") {
3687
3665
  await w(v);
3688
3666
  return;
@@ -3691,9 +3669,9 @@ function lr(e) {
3691
3669
  } catch {
3692
3670
  return;
3693
3671
  }
3694
- if (o.setState(k), f?.afterEnter)
3672
+ if (o.setState($), f?.afterEnter)
3695
3673
  try {
3696
- f.afterEnter(k, C);
3674
+ f.afterEnter($, k);
3697
3675
  } catch {
3698
3676
  }
3699
3677
  } catch {
@@ -3710,17 +3688,17 @@ function lr(e) {
3710
3688
  subscribe: o.subscribe,
3711
3689
  matchRoute: (x) => Q(t, x),
3712
3690
  getCurrent: () => o.getState(),
3713
- resolveRouteComponent: cr
3691
+ resolveRouteComponent: ur
3714
3692
  };
3715
3693
  }
3716
- function Nr(e, t) {
3694
+ function zr(e, t) {
3717
3695
  return Q(e, t);
3718
3696
  }
3719
- function Wr(e) {
3720
- const t = lr(e);
3721
- return et("router-view", (r = {}, n = {}) => {
3722
- const { onConnected: i } = n;
3723
- if (i && i(() => {
3697
+ function Dr(e) {
3698
+ const t = fr(e);
3699
+ return et("router-view", (r = {}, i = {}) => {
3700
+ const { onConnected: n } = i;
3701
+ if (n && n(() => {
3724
3702
  t && typeof t.subscribe == "function" && t.subscribe(() => {
3725
3703
  });
3726
3704
  }), !t) return ce`<div>Router not initialized.</div>`;
@@ -3734,9 +3712,9 @@ function Wr(e) {
3734
3712
  }
3735
3713
  return ce`<div>Invalid route component</div>`;
3736
3714
  }).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
3737
- }), et("router-link", (r = {}, n = {}) => {
3715
+ }), et("router-link", (r = {}, i = {}) => {
3738
3716
  const {
3739
- to: i = "",
3717
+ to: n = "",
3740
3718
  tag: s = "a",
3741
3719
  replace: o = !1,
3742
3720
  exact: a = !1,
@@ -3744,27 +3722,27 @@ function Wr(e) {
3744
3722
  exactActiveClass: m = "exact-active",
3745
3723
  ariaCurrentValue: g = "page",
3746
3724
  disabled: b = !1,
3747
- external: h = !1,
3725
+ external: p = !1,
3748
3726
  class: l = ""
3749
- } = r, d = t.getCurrent(), x = d.path === i, w = a ? x : d && typeof d.path == "string" ? d.path.startsWith(i) : !1, c = x ? `aria-current="${g}"` : "", p = (l || "").split(/\s+/).filter(Boolean), y = {};
3750
- for (const _ of p) y[_] = !0;
3751
- const C = {
3727
+ } = r, d = t.getCurrent(), x = d.path === n, w = a ? x : d && typeof d.path == "string" ? d.path.startsWith(n) : !1, c = x ? `aria-current="${g}"` : "", h = (l || "").split(/\s+/).filter(Boolean), y = {};
3728
+ for (const C of h) y[C] = !0;
3729
+ const k = {
3752
3730
  ...y,
3753
3731
  // Also include the configurable names (may duplicate the above)
3754
3732
  [u]: w,
3755
3733
  [m]: x
3756
- }, k = s === "button", f = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", v = h && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (_) => {
3734
+ }, $ = s === "button", f = b ? $ ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", v = p && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (C) => {
3757
3735
  if (b) {
3758
- _.preventDefault();
3736
+ C.preventDefault();
3759
3737
  return;
3760
3738
  }
3761
- h && (s === "a" || !s) || (_.preventDefault(), o ? t.replace(i) : t.push(i));
3739
+ p && (s === "a" || !s) || (C.preventDefault(), o ? t.replace(n) : t.push(n));
3762
3740
  };
3763
3741
  return ce`
3764
- ${sr().when(k, ce`
3742
+ ${ar().when($, ce`
3765
3743
  <button
3766
3744
  part="button"
3767
- :class="${C}"
3745
+ :class="${k}"
3768
3746
  ${c}
3769
3747
  ${f}
3770
3748
  ${v}
@@ -3773,8 +3751,8 @@ function Wr(e) {
3773
3751
  `).otherwise(ce`
3774
3752
  <a
3775
3753
  part="link"
3776
- href="${i}"
3777
- :class="${C}"
3754
+ href="${n}"
3755
+ :class="${k}"
3778
3756
  ${c}
3779
3757
  ${f}
3780
3758
  ${v}
@@ -3788,48 +3766,48 @@ export {
3788
3766
  de as GlobalEventBus,
3789
3767
  j as anchorBlock,
3790
3768
  et as component,
3791
- fr as computed,
3769
+ hr as computed,
3792
3770
  tt as createStore,
3793
3771
  Pt as css,
3794
- wr as each,
3795
- Er as eachGroup,
3796
- $r as eachPage,
3797
- Cr as eachWhere,
3798
- Or as emit,
3772
+ vr as each,
3773
+ Sr as eachGroup,
3774
+ Ar as eachPage,
3775
+ _r as eachWhere,
3776
+ Lr as emit,
3799
3777
  be as eventBus,
3800
3778
  ce as html,
3801
- Wr as initRouter,
3802
- jr as listen,
3803
- sr as match,
3779
+ Dr as initRouter,
3780
+ Nr as listen,
3781
+ ar as match,
3804
3782
  Q as matchRoute,
3805
- Nr as matchRouteSSR,
3783
+ zr as matchRouteSSR,
3806
3784
  te as mediaVariants,
3807
- Lr as off,
3808
- Pr as on,
3809
- Mr as once,
3785
+ jr as off,
3786
+ Mr as on,
3787
+ Wr as once,
3810
3788
  rt as parseQuery,
3811
- ur as ref,
3789
+ dr as ref,
3812
3790
  Pe as renderToString,
3813
- cr as resolveRouteComponent,
3814
- ar as responsive,
3791
+ ur as resolveRouteComponent,
3792
+ lr as responsive,
3815
3793
  lt as responsiveOrder,
3816
- Tr as responsiveSwitch,
3817
- Rr as switchOn,
3818
- _r as switchOnLength,
3819
- Sr as switchOnPromise,
3820
- xr as unless,
3821
- pr as useEmit,
3822
- mr as useOnAttributeChanged,
3823
- hr as useOnConnected,
3824
- gr as useOnDisconnected,
3825
- yr as useOnError,
3826
- lr as useRouter,
3827
- br as useStyle,
3828
- dr as watch,
3794
+ Or as responsiveSwitch,
3795
+ Pr as switchOn,
3796
+ Er as switchOnLength,
3797
+ Tr as switchOnPromise,
3798
+ $r as unless,
3799
+ gr as useEmit,
3800
+ br as useOnAttributeChanged,
3801
+ mr as useOnConnected,
3802
+ yr as useOnDisconnected,
3803
+ wr as useOnError,
3804
+ fr as useRouter,
3805
+ xr as useStyle,
3806
+ pr as watch,
3829
3807
  Re as when,
3830
- vr as whenEmpty,
3808
+ kr as whenEmpty,
3831
3809
  q as whenMedia,
3832
- kr as whenNotEmpty,
3833
- Ar as whenVariants
3810
+ Cr as whenNotEmpty,
3811
+ Rr as whenVariants
3834
3812
  };
3835
3813
  //# sourceMappingURL=custom-elements-runtime.es.js.map