@jasonshimmy/custom-elements-runtime 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- class dt {
1
+ class mt {
2
2
  pendingUpdates = /* @__PURE__ */ new Map();
3
3
  isFlushScheduled = !1;
4
4
  /**
@@ -29,12 +29,12 @@ class dt {
29
29
  return this.pendingUpdates.size;
30
30
  }
31
31
  }
32
- const ht = new dt();
33
- function ue(e, t) {
34
- ht.schedule(e, t);
32
+ const yt = new mt();
33
+ function fe(e, t) {
34
+ yt.schedule(e, t);
35
35
  }
36
- const Fe = /* @__PURE__ */ new WeakSet();
37
- class pt {
36
+ const Ke = /* @__PURE__ */ new WeakSet();
37
+ class bt {
38
38
  static cache = /* @__PURE__ */ new WeakMap();
39
39
  static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
40
40
  static objectHandlerCache = /* @__PURE__ */ new WeakMap();
@@ -47,7 +47,7 @@ class pt {
47
47
  return i;
48
48
  const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
49
49
  try {
50
- nt.markAsProxy(o);
50
+ ot.markAsProxy(o);
51
51
  } catch {
52
52
  }
53
53
  return this.cache.set(t, o), o;
@@ -70,9 +70,9 @@ class pt {
70
70
  "reverse",
71
71
  "fill",
72
72
  "copyWithin"
73
- ].includes(i) ? function(...u) {
74
- const m = o.apply(n, u);
75
- return t.triggerUpdate(), m;
73
+ ].includes(i) ? function(...a) {
74
+ const p = o.apply(n, a);
75
+ return t.triggerUpdate(), p;
76
76
  } : o;
77
77
  },
78
78
  set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
@@ -118,7 +118,7 @@ class pt {
118
118
  };
119
119
  }
120
120
  }
121
- class nt {
121
+ class ot {
122
122
  // Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
123
123
  // This allows handler caches in ReactiveProxyCache to reuse handlers
124
124
  // for identical reactive contexts instead of creating a new context object
@@ -129,7 +129,7 @@ class nt {
129
129
  */
130
130
  static createReactiveProxy(t, r, n) {
131
131
  try {
132
- if (Fe.has(t)) return t;
132
+ if (Ke.has(t)) return t;
133
133
  } catch {
134
134
  }
135
135
  const i = Array.isArray(t);
@@ -139,7 +139,7 @@ class nt {
139
139
  return o || (o = {
140
140
  triggerUpdate: r,
141
141
  makeReactiveValue: n
142
- }, s.set(n, o)), pt.getOrCreateProxy(t, o, i);
142
+ }, s.set(n, o)), bt.getOrCreateProxy(t, o, i);
143
143
  }
144
144
  /**
145
145
  * Mark an object as a proxy (for optimization)
@@ -147,12 +147,12 @@ class nt {
147
147
  static markAsProxy(t) {
148
148
  if (t)
149
149
  try {
150
- Fe.add(t);
150
+ Ke.add(t);
151
151
  } catch {
152
152
  }
153
153
  }
154
154
  }
155
- class gt {
155
+ class wt {
156
156
  currentComponent = null;
157
157
  componentDependencies = /* @__PURE__ */ new Map();
158
158
  componentRenderFunctions = /* @__PURE__ */ new Map();
@@ -218,11 +218,11 @@ class gt {
218
218
  */
219
219
  getOrCreateState(t) {
220
220
  if (!this.currentComponent)
221
- return new He(t);
221
+ return new Ue(t);
222
222
  const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
223
223
  if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
224
224
  return this.stateStorage.get(i);
225
- const s = new He(t);
225
+ const s = new Ue(t);
226
226
  return this.stateStorage.set(i, s), s;
227
227
  }
228
228
  /**
@@ -237,7 +237,7 @@ class gt {
237
237
  triggerUpdate(t) {
238
238
  t.getDependents().forEach((r) => {
239
239
  const n = this.componentRenderFunctions.get(r);
240
- n && ue(n, r);
240
+ n && fe(n, r);
241
241
  });
242
242
  }
243
243
  /**
@@ -251,8 +251,8 @@ class gt {
251
251
  this.stateIndexCounter.delete(t);
252
252
  }
253
253
  }
254
- const F = new gt();
255
- class He {
254
+ const F = new wt();
255
+ class Ue {
256
256
  _value;
257
257
  dependents = /* @__PURE__ */ new Set();
258
258
  constructor(t) {
@@ -284,14 +284,14 @@ class He {
284
284
  return this.dependents;
285
285
  }
286
286
  makeReactive(t) {
287
- return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : nt.createReactiveProxy(
287
+ return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : ot.createReactiveProxy(
288
288
  t,
289
289
  () => F.triggerUpdate(this),
290
290
  (r) => this.makeReactive(r)
291
291
  );
292
292
  }
293
293
  }
294
- function dr(e) {
294
+ function gr(e) {
295
295
  return F.getOrCreateState(e === void 0 ? null : e);
296
296
  }
297
297
  function ee(e) {
@@ -307,15 +307,15 @@ function ee(e) {
307
307
  return !1;
308
308
  }
309
309
  }
310
- function hr(e) {
311
- const t = new He(e());
310
+ function mr(e) {
311
+ const t = new Ue(e());
312
312
  return {
313
313
  get value() {
314
314
  return F.trackDependency(t), e();
315
315
  }
316
316
  };
317
317
  }
318
- function pr(e, t, r = {}) {
318
+ function yr(e, t, r = {}) {
319
319
  let n = e();
320
320
  r.immediate && t(n, n);
321
321
  const i = `watch-${Math.random().toString(36).substr(2, 9)}`, s = () => {
@@ -327,23 +327,23 @@ function pr(e, t, r = {}) {
327
327
  F.cleanup(i);
328
328
  };
329
329
  }
330
- const ve = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map(), Ue = 500;
330
+ const $e = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), Fe = 500;
331
331
  function re(e) {
332
- if (ve.has(e))
333
- return ve.get(e);
332
+ if ($e.has(e))
333
+ return $e.get(e);
334
334
  const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
335
- return ve.size < Ue && ve.set(e, t), t;
335
+ return $e.size < Fe && $e.set(e, t), t;
336
336
  }
337
- function it(e) {
338
- if (xe.has(e))
339
- return xe.get(e);
337
+ function at(e) {
338
+ if (ke.has(e))
339
+ return ke.get(e);
340
340
  const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
341
- return xe.size < Ue && xe.set(e, t), t;
341
+ return ke.size < Fe && ke.set(e, t), t;
342
342
  }
343
- function de(e) {
343
+ function pe(e) {
344
344
  if (typeof e == "string") {
345
- if ($e.has(e))
346
- return $e.get(e);
345
+ if (Ce.has(e))
346
+ return Ce.get(e);
347
347
  const t = e.replace(
348
348
  /[&<>"']/g,
349
349
  (r) => ({
@@ -354,75 +354,75 @@ function de(e) {
354
354
  "'": "&#39;"
355
355
  })[r]
356
356
  );
357
- return t !== e && $e.size < Ue && $e.set(e, t), t;
357
+ return t !== e && Ce.size < Fe && Ce.set(e, t), t;
358
358
  }
359
359
  return e;
360
360
  }
361
- function H(e, t) {
361
+ function B(e, t) {
362
362
  if (typeof t == "string") {
363
363
  const r = t.split(".").reduce((n, i) => n?.[i], e);
364
364
  return ee(r) ? r.value : r;
365
365
  }
366
366
  return t;
367
367
  }
368
- function _e(e, t, r) {
368
+ function Se(e, t, r) {
369
369
  const n = String(t).split("."), i = n.pop();
370
370
  if (!i) return;
371
371
  const s = n.reduce((o, c) => (o[c] == null && (o[c] = {}), o[c]), e);
372
372
  ee(s[i]) ? s[i].value = r : s[i] = r;
373
373
  }
374
- const st = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
- function ie(e, ...t) {
376
- st && console.error(e, ...t);
374
+ const ct = typeof process < "u" && process.env?.NODE_ENV !== "production";
375
+ function se(e, ...t) {
376
+ ct && console.error(e, ...t);
377
377
  }
378
- function Oe(e, ...t) {
379
- st && console.warn(e, ...t);
378
+ function Le(e, ...t) {
379
+ ct && console.warn(e, ...t);
380
380
  }
381
- function mt(e, t, r) {
381
+ function xt(e, t, r) {
382
382
  if (r)
383
383
  for (const [n, i] of Object.entries(r)) {
384
384
  let s, o = {};
385
385
  if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(n, {
386
386
  callback: s,
387
387
  options: o,
388
- oldValue: H(e, n)
388
+ oldValue: B(e, n)
389
389
  }), o.immediate)
390
390
  try {
391
- const c = H(e, n);
391
+ const c = B(e, n);
392
392
  s(c, void 0, e);
393
393
  } catch (c) {
394
- ie(`Error in immediate watcher for "${n}":`, c);
394
+ se(`Error in immediate watcher for "${n}":`, c);
395
395
  }
396
396
  }
397
397
  }
398
- function yt(e, t, r, n) {
398
+ function vt(e, t, r, n) {
399
399
  const i = (o, c) => {
400
400
  if (o === c) return !0;
401
401
  if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
402
402
  if (Array.isArray(o) && Array.isArray(c))
403
- return o.length !== c.length ? !1 : o.every((g, b) => i(g, c[b]));
404
- const u = Object.keys(o), m = Object.keys(c);
405
- return u.length !== m.length ? !1 : u.every((g) => i(o[g], c[g]));
403
+ return o.length !== c.length ? !1 : o.every((h, b) => i(h, c[b]));
404
+ const a = Object.keys(o), p = Object.keys(c);
405
+ return a.length !== p.length ? !1 : a.every((h) => i(o[h], c[h]));
406
406
  }, s = t.get(r);
407
407
  if (s && !i(n, s.oldValue))
408
408
  try {
409
409
  s.callback(n, s.oldValue, e), s.oldValue = n;
410
410
  } catch (o) {
411
- ie(`Error in watcher for "${r}":`, o);
411
+ se(`Error in watcher for "${r}":`, o);
412
412
  }
413
413
  for (const [o, c] of t.entries())
414
414
  if (c.options.deep && r.startsWith(o + "."))
415
415
  try {
416
- const u = H(e, o);
417
- i(u, c.oldValue) || (c.callback(u, c.oldValue, e), c.oldValue = u);
418
- } catch (u) {
419
- ie(`Error in deep watcher for "${o}":`, u);
416
+ const a = B(e, o);
417
+ i(a, c.oldValue) || (c.callback(a, c.oldValue, e), c.oldValue = a);
418
+ } catch (a) {
419
+ se(`Error in deep watcher for "${o}":`, a);
420
420
  }
421
421
  }
422
- function Ke(e, t) {
422
+ function Ve(e, t) {
423
423
  return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
424
424
  }
425
- function bt(e, t, r) {
425
+ function $t(e, t, r) {
426
426
  t && Object.entries(t).forEach(([n, i]) => {
427
427
  const s = re(n), o = e.getAttribute(s);
428
428
  if (i.type === Function && typeof e[n] == "function")
@@ -430,26 +430,26 @@ function bt(e, t, r) {
430
430
  else if (typeof e[n] < "u")
431
431
  try {
432
432
  const c = e[n];
433
- i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ke(String(c), i.type);
433
+ i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ve(String(c), i.type);
434
434
  } catch {
435
435
  r[n] = e[n];
436
436
  }
437
- else o !== null ? r[n] = Ke(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
437
+ else o !== null ? r[n] = Ve(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
438
438
  });
439
439
  }
440
- function wt(e, t, r) {
441
- t.props && bt(e, t.props, r);
440
+ function kt(e, t, r) {
441
+ t.props && $t(e, t.props, r);
442
442
  }
443
- function vt(e, t, r, n) {
443
+ function Ct(e, t, r, n) {
444
444
  e.onConnected && !r && (e.onConnected(t), n(!0));
445
445
  }
446
- function xt(e, t, r, n, i, s, o, c) {
447
- e.onDisconnected && e.onDisconnected(t), r.forEach((u) => u()), n(), i(), s(!1), o(null), c(!1);
446
+ function _t(e, t, r, n, i, s, o, c) {
447
+ e.onDisconnected && e.onDisconnected(t), r.forEach((a) => a()), n(), i(), s(!1), o(null), c(!1);
448
448
  }
449
- function $t(e, t, r, n, i) {
449
+ function Et(e, t, r, n, i) {
450
450
  e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
451
451
  }
452
- class kt {
452
+ class St {
453
453
  static cache = /* @__PURE__ */ new Map();
454
454
  static maxCacheSize = 1e3;
455
455
  // Dangerous patterns to block
@@ -474,7 +474,7 @@ class kt {
474
474
  const n = this.cache.get(t);
475
475
  if (n) {
476
476
  if (!n.isSecure) {
477
- Oe("Blocked cached dangerous expression:", t);
477
+ Le("Blocked cached dangerous expression:", t);
478
478
  return;
479
479
  }
480
480
  return n.evaluator(r);
@@ -485,7 +485,7 @@ class kt {
485
485
  s && this.cache.delete(s);
486
486
  }
487
487
  if (this.cache.set(t, i), !i.isSecure) {
488
- Oe("Blocked dangerous expression:", t);
488
+ Le("Blocked dangerous expression:", t);
489
489
  return;
490
490
  }
491
491
  return i.evaluator(r);
@@ -500,7 +500,7 @@ class kt {
500
500
  try {
501
501
  return { evaluator: this.createSafeEvaluator(t), isSecure: !0 };
502
502
  } catch (r) {
503
- return Oe("Failed to create evaluator for expression:", t, r), { evaluator: () => {
503
+ return Le("Failed to create evaluator for expression:", t, r), { evaluator: () => {
504
504
  }, isSecure: !1 };
505
505
  }
506
506
  }
@@ -512,9 +512,9 @@ class kt {
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 (n) => B(n, r);
516
516
  }
517
- return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => H(r, t);
517
+ return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => B(r, t);
518
518
  }
519
519
  static createObjectEvaluator(t) {
520
520
  const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
@@ -523,8 +523,8 @@ class kt {
523
523
  for (const { key: o, value: c } of n)
524
524
  try {
525
525
  if (c.startsWith("ctx.")) {
526
- const u = c.slice(4);
527
- s[o] = H(i, u);
526
+ const a = c.slice(4);
527
+ s[o] = B(i, a);
528
528
  } else
529
529
  s[o] = this.evaluateSimpleValue(c, i);
530
530
  } catch {
@@ -538,8 +538,8 @@ class kt {
538
538
  for (const i of n) {
539
539
  const s = i.indexOf(":");
540
540
  if (s === -1) continue;
541
- const o = i.slice(0, s).trim(), c = i.slice(s + 1).trim(), u = o.replace(/^['"]|['"]$/g, "");
542
- r.push({ key: u, value: c });
541
+ const o = i.slice(0, s).trim(), c = i.slice(s + 1).trim(), a = o.replace(/^['"]|['"]$/g, "");
542
+ r.push({ key: a, value: c });
543
543
  }
544
544
  return r;
545
545
  }
@@ -551,32 +551,32 @@ class kt {
551
551
  n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (b) => `<<#${i.push(b) - 1}#>>`);
552
552
  const s = n.match(/ctx\.[\w.]+/g) || [];
553
553
  for (const b of s) {
554
- const p = b.slice(4), f = H(r, p);
555
- if (f === void 0) return;
556
- const h = i.push(JSON.stringify(f)) - 1;
557
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${h}#>>`);
554
+ const g = b.slice(4), u = B(r, g);
555
+ if (u === void 0) return;
556
+ const f = i.push(JSON.stringify(u)) - 1;
557
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`);
558
558
  }
559
559
  const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = n.match(o) || [];
560
560
  for (const b of c) {
561
561
  if (b.startsWith("ctx.")) continue;
562
- const p = H(r, b);
563
- if (p === void 0) return;
564
- const f = i.push(JSON.stringify(p)) - 1;
565
- n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`);
562
+ const g = B(r, b);
563
+ if (g === void 0) return;
564
+ const u = i.push(JSON.stringify(g)) - 1;
565
+ n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
566
566
  }
567
- const u = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
568
- let m;
569
- const g = /* @__PURE__ */ new Set();
570
- for (; (m = u.exec(n)) !== null; ) {
571
- const b = m[1];
572
- if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || g.has(b)) continue;
573
- g.add(b);
574
- const p = H(r, b);
575
- if (p === void 0) return;
576
- const f = JSON.stringify(p), h = i.push(f) - 1;
577
- b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${h}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${h}#>>`);
567
+ const a = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
568
+ let p;
569
+ const h = /* @__PURE__ */ new Set();
570
+ for (; (p = a.exec(n)) !== null; ) {
571
+ const b = p[1];
572
+ if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || h.has(b)) continue;
573
+ h.add(b);
574
+ const g = B(r, b);
575
+ if (g === void 0) return;
576
+ const u = JSON.stringify(g), f = i.push(u) - 1;
577
+ b.includes(".") ? n = n.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${f}#>>`) : n = n.replace(new RegExp("\\b" + b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${f}#>>`);
578
578
  }
579
- n = n.replace(/<<#(\d+)#>>/g, (b, p) => i[Number(p)]);
579
+ n = n.replace(/<<#(\d+)#>>/g, (b, g) => i[Number(g)]);
580
580
  try {
581
581
  return this.evaluateBasicExpression(n);
582
582
  } catch {
@@ -598,137 +598,137 @@ class kt {
598
598
  function i() {
599
599
  return r[n];
600
600
  }
601
- function s(a) {
602
- const l = r[n++];
603
- if (a && !l)
604
- throw new Error(`Unexpected token EOF, expected ${a}`);
605
- if (a && l && l.type !== a && l.value !== a)
606
- throw new Error(`Unexpected token ${l.type}/${l.value}, expected ${a}`);
607
- return l;
601
+ function s(l) {
602
+ const d = r[n++];
603
+ if (l && !d)
604
+ throw new Error(`Unexpected token EOF, expected ${l}`);
605
+ if (l && d && d.type !== l && d.value !== l)
606
+ throw new Error(`Unexpected token ${d.type}/${d.value}, expected ${l}`);
607
+ return d;
608
608
  }
609
609
  function o() {
610
610
  return c();
611
611
  }
612
612
  function c() {
613
- let a = u();
613
+ let l = a();
614
614
  if (i() && i().value === "?") {
615
615
  s("?");
616
- const l = o();
616
+ const d = o();
617
617
  s(":");
618
- const y = o();
619
- return a ? l : y;
618
+ const w = o();
619
+ return l ? d : w;
620
620
  }
621
- return a;
621
+ return l;
622
622
  }
623
- function u() {
624
- let a = m();
623
+ function a() {
624
+ let l = p();
625
625
  for (; i() && i().value === "||"; ) {
626
626
  s("OP");
627
- const l = m();
628
- a = a || l;
627
+ const d = p();
628
+ l = l || d;
629
629
  }
630
- return a;
630
+ return l;
631
631
  }
632
- function m() {
633
- let a = g();
632
+ function p() {
633
+ let l = h();
634
634
  for (; i() && i().value === "&&"; ) {
635
635
  s("OP");
636
- const l = g();
637
- a = a && l;
636
+ const d = h();
637
+ l = l && d;
638
638
  }
639
- return a;
639
+ return l;
640
640
  }
641
- function g() {
642
- let a = b();
641
+ function h() {
642
+ let l = b();
643
643
  for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
644
- const l = s("OP").value, y = b();
645
- switch (l) {
644
+ const d = s("OP").value, w = b();
645
+ switch (d) {
646
646
  case "==":
647
- a = a == y;
647
+ l = l == w;
648
648
  break;
649
649
  case "!=":
650
- a = a != y;
650
+ l = l != w;
651
651
  break;
652
652
  case "===":
653
- a = a === y;
653
+ l = l === w;
654
654
  break;
655
655
  case "!==":
656
- a = a !== y;
656
+ l = l !== w;
657
657
  break;
658
658
  }
659
659
  }
660
- return a;
660
+ return l;
661
661
  }
662
662
  function b() {
663
- let a = p();
663
+ let l = g();
664
664
  for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
665
- const l = s("OP").value, y = p();
666
- switch (l) {
665
+ const d = s("OP").value, w = g();
666
+ switch (d) {
667
667
  case ">":
668
- a = a > y;
668
+ l = l > w;
669
669
  break;
670
670
  case "<":
671
- a = a < y;
671
+ l = l < w;
672
672
  break;
673
673
  case ">=":
674
- a = a >= y;
674
+ l = l >= w;
675
675
  break;
676
676
  case "<=":
677
- a = a <= y;
677
+ l = l <= w;
678
678
  break;
679
679
  }
680
680
  }
681
- return a;
681
+ return l;
682
682
  }
683
- function p() {
684
- let a = f();
683
+ function g() {
684
+ let l = u();
685
685
  for (; i() && (i().value === "+" || i().value === "-"); ) {
686
- const l = s("OP").value, y = f();
687
- a = l === "+" ? a + y : a - y;
686
+ const d = s("OP").value, w = u();
687
+ l = d === "+" ? l + w : l - w;
688
688
  }
689
- return a;
689
+ return l;
690
690
  }
691
- function f() {
692
- let a = h();
691
+ function u() {
692
+ let l = f();
693
693
  for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
694
- const l = s("OP").value, y = h();
695
- switch (l) {
694
+ const d = s("OP").value, w = f();
695
+ switch (d) {
696
696
  case "*":
697
- a = a * y;
697
+ l = l * w;
698
698
  break;
699
699
  case "/":
700
- a = a / y;
700
+ l = l / w;
701
701
  break;
702
702
  case "%":
703
- a = a % y;
703
+ l = l % w;
704
704
  break;
705
705
  }
706
706
  }
707
- return a;
707
+ return l;
708
708
  }
709
- function h() {
710
- return i() && i().value === "!" ? (s("OP"), !h()) : i() && i().value === "-" ? (s("OP"), -h()) : v();
711
- }
712
- function v() {
713
- const a = i();
714
- if (a) {
715
- if (a.type === "NUMBER")
716
- return s("NUMBER"), Number(a.value);
717
- if (a.type === "STRING")
718
- return s("STRING"), a.value.slice(1, -1);
719
- if (a.type === "IDENT")
720
- return s("IDENT"), a.value === "true" ? !0 : a.value === "false" ? !1 : a.value === "null" ? null : void 0;
721
- if (a.value === "[") {
709
+ function f() {
710
+ return i() && i().value === "!" ? (s("OP"), !f()) : i() && i().value === "-" ? (s("OP"), -f()) : y();
711
+ }
712
+ function y() {
713
+ const l = i();
714
+ if (l) {
715
+ if (l.type === "NUMBER")
716
+ return s("NUMBER"), Number(l.value);
717
+ if (l.type === "STRING")
718
+ return s("STRING"), l.value.slice(1, -1);
719
+ if (l.type === "IDENT")
720
+ return s("IDENT"), l.value === "true" ? !0 : l.value === "false" ? !1 : l.value === "null" ? null : void 0;
721
+ if (l.value === "[") {
722
722
  s("PUNC");
723
- const l = [];
723
+ const d = [];
724
724
  for (; i() && i().value !== "]"; )
725
- l.push(o()), i() && i().value === "," && s("PUNC");
726
- return s("PUNC"), l;
725
+ d.push(o()), i() && i().value === "," && s("PUNC");
726
+ return s("PUNC"), d;
727
727
  }
728
- if (a.value === "(") {
728
+ if (l.value === "(") {
729
729
  s("PUNC");
730
- const l = o();
731
- return s("PUNC"), l;
730
+ const d = o();
731
+ return s("PUNC"), d;
732
732
  }
733
733
  throw new Error("Unexpected token in expression");
734
734
  }
@@ -750,7 +750,7 @@ class kt {
750
750
  if (!isNaN(Number(t))) return Number(t);
751
751
  if (t.startsWith("ctx.")) {
752
752
  const n = t.slice(4);
753
- return H(r, n);
753
+ return B(r, n);
754
754
  }
755
755
  return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
756
756
  }
@@ -761,7 +761,7 @@ class kt {
761
761
  return this.cache.size;
762
762
  }
763
763
  }
764
- class se {
764
+ class oe {
765
765
  static cleanupFunctions = /* @__PURE__ */ new WeakMap();
766
766
  /**
767
767
  * Add an event listener with automatic cleanup tracking
@@ -782,7 +782,7 @@ class se {
782
782
  if (s) {
783
783
  const o = s.__metaList || null;
784
784
  if (o) {
785
- const c = o.findIndex((u) => u.event === r && u.handler === n && JSON.stringify(u.options) === JSON.stringify(i));
785
+ const c = o.findIndex((a) => a.event === r && a.handler === n && JSON.stringify(a.options) === JSON.stringify(i));
786
786
  if (c >= 0) {
787
787
  try {
788
788
  o[c].cleanup();
@@ -835,182 +835,182 @@ class se {
835
835
  return n ? n.length : 0;
836
836
  }
837
837
  }
838
- function le(e, t) {
838
+ function ue(e, t) {
839
839
  if (t && e instanceof HTMLElement) {
840
- se.cleanup(e);
840
+ oe.cleanup(e);
841
841
  for (const r in t)
842
842
  t[r] === e && delete t[r];
843
843
  for (const r of Array.from(e.childNodes))
844
- le(r, t);
844
+ ue(r, t);
845
845
  }
846
846
  }
847
- function pe(e, t, r) {
847
+ function ye(e, t, r) {
848
848
  if (typeof e == "string") return;
849
849
  const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
850
850
  n ? n.value = t : i && r && (r[i] = t);
851
851
  }
852
- function Ct(e, t, r, n, i, s, o, c) {
852
+ function At(e, t, r, n, i, s, o, c) {
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", p = () => {
854
+ const a = t.includes("lazy"), p = t.includes("trim"), h = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", g = () => {
855
855
  if (b) {
856
- const $ = e.value;
857
- return c && typeof $ == "object" && $ !== null ? $[c] : $;
858
- }
859
- return H(s._state || s, e);
860
- }, f = p();
861
- let h = "text";
862
- o instanceof HTMLInputElement ? h = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? h = "select" : o instanceof HTMLTextAreaElement && (h = "textarea");
863
- const v = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, a = v ? h === "checkbox" || h === "radio" ? "checked" : "value" : c ?? "modelValue";
864
- if (h === "checkbox")
865
- if (Array.isArray(f))
866
- r[a] = f.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
856
+ const k = e.value;
857
+ return c && typeof k == "object" && k !== null ? k[c] : k;
858
+ }
859
+ return B(s._state || s, e);
860
+ }, u = g();
861
+ let f = "text";
862
+ o instanceof HTMLInputElement ? f = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? f = "select" : o instanceof HTMLTextAreaElement && (f = "textarea");
863
+ const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ? f === "checkbox" || f === "radio" ? "checked" : "value" : c ?? "modelValue";
864
+ if (f === "checkbox")
865
+ if (Array.isArray(u))
866
+ r[l] = u.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
867
867
  else {
868
- const $ = o?.getAttribute("true-value") ?? !0;
869
- r[a] = f === $;
868
+ const k = o?.getAttribute("true-value") ?? !0;
869
+ r[l] = u === k;
870
870
  }
871
- else if (h === "radio")
872
- r[a] = f === (n?.value ?? "");
873
- else if (h === "select")
871
+ else if (f === "radio")
872
+ r[l] = u === (n?.value ?? "");
873
+ else if (f === "select")
874
874
  if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
875
- const $ = Array.isArray(f) ? f.map(String) : [];
875
+ const k = Array.isArray(u) ? u.map(String) : [];
876
876
  setTimeout(() => {
877
- Array.from(o.options).forEach((k) => {
878
- k.selected = $.includes(k.value);
877
+ Array.from(o.options).forEach((C) => {
878
+ C.selected = k.includes(C.value);
879
879
  });
880
- }, 0), r[a] = Array.isArray(f) ? f : [];
880
+ }, 0), r[l] = Array.isArray(u) ? u : [];
881
881
  } else
882
- r[a] = f;
882
+ r[l] = u;
883
883
  else {
884
- r[a] = f;
884
+ r[l] = u;
885
885
  try {
886
- const $ = re(a);
887
- n && (n[$] = f);
886
+ const k = re(l);
887
+ n && (n[k] = u);
888
888
  } catch {
889
889
  }
890
890
  }
891
- const l = u || h === "checkbox" || h === "radio" || h === "select" ? "change" : "input", y = ($) => {
892
- if ($.isComposing || i._isComposing) return;
893
- const k = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
- if ($.isTrusted === !1 && !k) return;
895
- const d = $.target;
896
- if (!d || d._modelUpdating) return;
897
- let x = d.value;
898
- if (h === "checkbox") {
899
- const T = p();
900
- if (Array.isArray(T)) {
901
- const R = d.getAttribute("value") ?? "", S = Array.from(T);
902
- if (d.checked)
903
- S.includes(R) || S.push(R);
891
+ const d = a || f === "checkbox" || f === "radio" || f === "select" ? "change" : "input", w = (k) => {
892
+ if (k.isComposing || i._isComposing) return;
893
+ const C = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
894
+ if (k.isTrusted === !1 && !C) return;
895
+ const m = k.target;
896
+ if (!m || m._modelUpdating) return;
897
+ let $ = m.value;
898
+ if (f === "checkbox") {
899
+ const j = g();
900
+ if (Array.isArray(j)) {
901
+ const N = m.getAttribute("value") ?? "", E = Array.from(j);
902
+ if (m.checked)
903
+ E.includes(N) || E.push(N);
904
904
  else {
905
- const P = S.indexOf(R);
906
- P > -1 && S.splice(P, 1);
905
+ const O = E.indexOf(N);
906
+ O > -1 && E.splice(O, 1);
907
907
  }
908
- x = S;
908
+ $ = E;
909
909
  } else {
910
- const R = d.getAttribute("true-value") ?? !0, S = d.getAttribute("false-value") ?? !1;
911
- x = d.checked ? R : S;
910
+ const N = m.getAttribute("true-value") ?? !0, E = m.getAttribute("false-value") ?? !1;
911
+ $ = m.checked ? N : E;
912
912
  }
913
- } else if (h === "radio")
914
- x = d.getAttribute("value") ?? d.value;
915
- else if (h === "select" && d.multiple)
916
- x = Array.from(d.selectedOptions).map((T) => T.value);
917
- else if (m && typeof x == "string" && (x = x.trim()), g) {
918
- const T = Number(x);
919
- isNaN(T) || (x = T);
920
- }
921
- const A = s._state || s, C = p();
922
- if (Array.isArray(x) && Array.isArray(C) ? JSON.stringify([...x].sort()) !== JSON.stringify([...C].sort()) : x !== C) {
923
- d._modelUpdating = !0;
913
+ } else if (f === "radio")
914
+ $ = m.getAttribute("value") ?? m.value;
915
+ else if (f === "select" && m.multiple)
916
+ $ = Array.from(m.selectedOptions).map((j) => j.value);
917
+ else if (p && typeof $ == "string" && ($ = $.trim()), h) {
918
+ const j = Number($);
919
+ isNaN(j) || ($ = j);
920
+ }
921
+ const S = s._state || s, v = g();
922
+ if (Array.isArray($) && Array.isArray(v) ? JSON.stringify([...$].sort()) !== JSON.stringify([...v].sort()) : $ !== v) {
923
+ m._modelUpdating = !0;
924
924
  try {
925
925
  if (b)
926
926
  if (c && typeof e.value == "object" && e.value !== null) {
927
- const T = { ...e.value };
928
- T[c] = x, e.value = T;
927
+ const j = { ...e.value };
928
+ j[c] = $, e.value = j;
929
929
  } else
930
- e.value = x;
930
+ e.value = $;
931
931
  else
932
- _e(A, e, x);
932
+ Se(S, e, $);
933
933
  if (s._requestRender && s._requestRender(), s._triggerWatchers) {
934
- const T = b ? "reactiveState" : e;
935
- s._triggerWatchers(T, x);
934
+ const j = b ? "reactiveState" : e;
935
+ s._triggerWatchers(j, $);
936
936
  }
937
- if (d) {
938
- const T = `update:${re(a)}`, R = new CustomEvent(T, {
939
- detail: x,
937
+ if (m) {
938
+ const j = `update:${re(l)}`, N = new CustomEvent(j, {
939
+ detail: $,
940
940
  bubbles: !0,
941
941
  composed: !0
942
942
  });
943
- d.dispatchEvent(R);
943
+ m.dispatchEvent(N);
944
944
  }
945
945
  } finally {
946
- setTimeout(() => d._modelUpdating = !1, 0);
946
+ setTimeout(() => m._modelUpdating = !1, 0);
947
947
  }
948
948
  }
949
949
  };
950
- if (v) {
951
- if (i[l]) {
952
- const $ = i[l];
953
- o && se.removeListener(o, l, $);
950
+ if (y) {
951
+ if (i[d]) {
952
+ const k = i[d];
953
+ o && oe.removeListener(o, d, k);
954
954
  }
955
- i[l] = y;
955
+ i[d] = w;
956
956
  } else {
957
- const $ = `update:${re(a)}`;
958
- if (i[$]) {
959
- const k = i[$];
960
- o && se.removeListener(o, $, k);
961
- }
962
- i[$] = (k) => {
963
- const d = s._state || s, x = k.detail !== void 0 ? k.detail : k.target?.value, A = H(d, e);
964
- if (Array.isArray(x) && Array.isArray(A) ? JSON.stringify([...x].sort()) !== JSON.stringify([...A].sort()) : x !== A) {
965
- _e(d, e, x), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, x);
966
- const E = k.target;
967
- if (E) {
968
- E[a] = x;
957
+ const k = `update:${re(l)}`;
958
+ if (i[k]) {
959
+ const C = i[k];
960
+ o && oe.removeListener(o, k, C);
961
+ }
962
+ i[k] = (C) => {
963
+ const m = s._state || s, $ = C.detail !== void 0 ? C.detail : C.target?.value, S = B(m, e);
964
+ if (Array.isArray($) && Array.isArray(S) ? JSON.stringify([...$].sort()) !== JSON.stringify([...S].sort()) : $ !== S) {
965
+ Se(m, e, $), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, $);
966
+ const A = C.target;
967
+ if (A) {
968
+ A[l] = $;
969
969
  try {
970
- const T = re(a);
971
- typeof x == "boolean" ? x ? E.setAttribute(T, "true") : E.setAttribute(T, "false") : E.setAttribute(T, String(x));
970
+ const j = re(l);
971
+ typeof $ == "boolean" ? $ ? A.setAttribute(j, "true") : A.setAttribute(j, "false") : A.setAttribute(j, String($));
972
972
  } catch {
973
973
  }
974
974
  queueMicrotask(() => {
975
- typeof E._applyProps == "function" && E._applyProps(E._cfg), typeof E._requestRender == "function" && E._requestRender();
975
+ typeof A._applyProps == "function" && A._applyProps(A._cfg), typeof A._requestRender == "function" && A._requestRender();
976
976
  });
977
977
  }
978
978
  }
979
979
  };
980
980
  }
981
- (h === "text" || h === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = ($) => {
981
+ (f === "text" || f === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (k) => {
982
982
  i._isComposing = !1;
983
- const k = $.target;
984
- k && setTimeout(() => {
985
- const d = k.value, x = s._state || s, A = H(x, e);
986
- let C = d;
987
- if (m && (C = C.trim()), g) {
988
- const T = Number(C);
989
- isNaN(T) || (C = T);
983
+ const C = k.target;
984
+ C && setTimeout(() => {
985
+ const m = C.value, $ = s._state || s, S = B($, e);
986
+ let v = m;
987
+ if (p && (v = v.trim()), h) {
988
+ const j = Number(v);
989
+ isNaN(j) || (v = j);
990
990
  }
991
- if (Array.isArray(C) && Array.isArray(A) ? JSON.stringify([...C].sort()) !== JSON.stringify([...A].sort()) : C !== A) {
992
- k._modelUpdating = !0;
991
+ if (Array.isArray(v) && Array.isArray(S) ? JSON.stringify([...v].sort()) !== JSON.stringify([...S].sort()) : v !== S) {
992
+ C._modelUpdating = !0;
993
993
  try {
994
- _e(x, e, C), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, C);
994
+ Se($, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
995
995
  } finally {
996
- setTimeout(() => k._modelUpdating = !1, 0);
996
+ setTimeout(() => C._modelUpdating = !1, 0);
997
997
  }
998
998
  }
999
999
  }, 0);
1000
1000
  });
1001
1001
  }
1002
- function ot(e) {
1002
+ function lt(e) {
1003
1003
  const t = e.slice(2);
1004
1004
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
1005
1005
  }
1006
- function _t(e, t, r, n) {
1006
+ function jt(e, t, r, n) {
1007
1007
  if (typeof e == "object" && e !== null)
1008
1008
  for (const [i, s] of Object.entries(e))
1009
1009
  i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
1010
1010
  else if (typeof e == "string") {
1011
1011
  if (!n) return;
1012
1012
  try {
1013
- const i = me(e, n);
1013
+ const i = we(e, n);
1014
1014
  if (typeof i == "object" && i !== null) {
1015
1015
  for (const [s, o] of Object.entries(i))
1016
1016
  s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? r[s] = o : t[s] = o;
@@ -1020,44 +1020,44 @@ function _t(e, t, r, n) {
1020
1020
  return;
1021
1021
  }
1022
1022
  } catch {
1023
- const i = H(n, e);
1023
+ const i = B(n, e);
1024
1024
  r[e] = i;
1025
1025
  }
1026
1026
  }
1027
1027
  }
1028
- function Et(e, t, r) {
1028
+ function Ot(e, t, r) {
1029
1029
  let n;
1030
1030
  if (typeof e == "string") {
1031
1031
  if (!r) return;
1032
- n = me(e, r);
1032
+ n = we(e, r);
1033
1033
  } else
1034
1034
  n = e;
1035
1035
  const i = t.style || "";
1036
1036
  let s = i;
1037
1037
  if (n) {
1038
1038
  if (i) {
1039
- const o = i.split(";").map((u) => u.trim()).filter(Boolean), c = o.findIndex(
1040
- (u) => u.startsWith("display:")
1039
+ const o = i.split(";").map((a) => a.trim()).filter(Boolean), c = o.findIndex(
1040
+ (a) => a.startsWith("display:")
1041
1041
  );
1042
1042
  c >= 0 && o[c] === "display: none" && (o.splice(c, 1), s = o.length > 0 ? o.join("; ") + ";" : "");
1043
1043
  }
1044
1044
  } else if (i) {
1045
1045
  const o = i.split(";").filter(Boolean), c = o.findIndex(
1046
- (u) => u.trim().startsWith("display:")
1046
+ (a) => a.trim().startsWith("display:")
1047
1047
  );
1048
1048
  c >= 0 ? o[c] = "display: none" : o.push("display: none"), s = o.join("; ");
1049
1049
  } else
1050
1050
  s = "display: none";
1051
1051
  s !== i && (s ? t.style = s : delete t.style);
1052
1052
  }
1053
- function me(e, t) {
1054
- return kt.evaluate(e, t);
1053
+ function we(e, t) {
1054
+ return St.evaluate(e, t);
1055
1055
  }
1056
- function St(e, t, r) {
1056
+ function Tt(e, t, r) {
1057
1057
  let n;
1058
1058
  if (typeof e == "string") {
1059
1059
  if (!r) return;
1060
- n = me(e, r);
1060
+ n = we(e, r);
1061
1061
  } else
1062
1062
  n = e;
1063
1063
  let i = [];
@@ -1065,11 +1065,11 @@ function St(e, t, r) {
1065
1065
  const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
1066
1066
  o && (t.class = o);
1067
1067
  }
1068
- function At(e, t, r) {
1068
+ function Rt(e, t, r) {
1069
1069
  let n;
1070
1070
  if (typeof e == "string") {
1071
1071
  if (!r) return;
1072
- n = me(e, r);
1072
+ n = we(e, r);
1073
1073
  } else
1074
1074
  n = e;
1075
1075
  let i = "";
@@ -1077,12 +1077,12 @@ function At(e, t, r) {
1077
1077
  i = n;
1078
1078
  else if (n && typeof n == "object") {
1079
1079
  const o = [];
1080
- for (const [c, u] of Object.entries(n))
1081
- if (u != null && u !== "") {
1082
- const m = c.replace(
1080
+ for (const [c, a] of Object.entries(n))
1081
+ if (a != null && a !== "") {
1082
+ const p = c.replace(
1083
1083
  /[A-Z]/g,
1084
- (p) => `-${p.toLowerCase()}`
1085
- ), g = [
1084
+ (g) => `-${g.toLowerCase()}`
1085
+ ), h = [
1086
1086
  "width",
1087
1087
  "height",
1088
1088
  "top",
@@ -1108,65 +1108,65 @@ function At(e, t, r) {
1108
1108
  "min-height",
1109
1109
  "max-height"
1110
1110
  ];
1111
- let b = String(u);
1112
- typeof u == "number" && g.includes(m) && (b = `${u}px`), o.push(`${m}: ${b}`);
1111
+ let b = String(a);
1112
+ typeof a == "number" && h.includes(p) && (b = `${a}px`), o.push(`${p}: ${b}`);
1113
1113
  }
1114
1114
  i = o.join("; ") + (o.length > 0 ? ";" : "");
1115
1115
  }
1116
1116
  const s = t.style || "";
1117
1117
  t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
1118
1118
  }
1119
- function Tt(e, t, r) {
1119
+ function Lt(e, t, r) {
1120
1120
  let n = e;
1121
- typeof e == "string" && r && (n = me(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1121
+ typeof e == "string" && r && (n = we(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
1122
1122
  }
1123
- function at(e, t, r, n) {
1123
+ function ut(e, t, r, n) {
1124
1124
  const i = {}, s = { ...n || {} }, o = {};
1125
- for (const [c, u] of Object.entries(e)) {
1126
- const { value: m, modifiers: g, arg: b } = u;
1125
+ for (const [c, a] of Object.entries(e)) {
1126
+ const { value: p, modifiers: h, arg: b } = a;
1127
1127
  if (c === "model" || c.startsWith("model:")) {
1128
- const p = c.split(":"), f = p.length > 1 ? p[1] : b;
1129
- Ct(
1130
- m,
1128
+ const g = c.split(":"), u = g.length > 1 ? g[1] : b;
1129
+ At(
1130
+ p,
1131
1131
  // Pass the original value (could be string or reactive state object)
1132
- g,
1132
+ h,
1133
1133
  i,
1134
1134
  s,
1135
1135
  o,
1136
1136
  t,
1137
1137
  r,
1138
- f
1138
+ u
1139
1139
  );
1140
1140
  continue;
1141
1141
  }
1142
1142
  switch (c) {
1143
1143
  case "bind":
1144
- _t(m, i, s, t);
1144
+ jt(p, i, s, t);
1145
1145
  break;
1146
1146
  case "show":
1147
- Et(m, s, t);
1147
+ Ot(p, s, t);
1148
1148
  break;
1149
1149
  case "class":
1150
- St(m, s, t);
1150
+ Tt(p, s, t);
1151
1151
  break;
1152
1152
  case "style":
1153
- At(m, s, t);
1153
+ Rt(p, s, t);
1154
1154
  break;
1155
1155
  case "ref":
1156
- Tt(m, i, t);
1156
+ Lt(p, i, t);
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
1160
  return { props: i, attrs: s, listeners: o };
1161
1161
  }
1162
- function Be(e, t) {
1162
+ function qe(e, t) {
1163
1163
  if (Array.isArray(e)) {
1164
1164
  const s = /* @__PURE__ */ new Set();
1165
1165
  return e.map((o) => {
1166
1166
  if (!o || typeof o != "object") return o;
1167
1167
  let c = o.props?.key ?? o.key;
1168
1168
  if (!c) {
1169
- const b = o.tag || "node", f = [
1169
+ const b = o.tag || "node", u = [
1170
1170
  // attrs (kebab-case)
1171
1171
  o.props?.attrs?.id,
1172
1172
  o.props?.attrs?.name,
@@ -1176,23 +1176,23 @@ function Be(e, t) {
1176
1176
  o.props?.props?.name,
1177
1177
  o.props?.props?.dataKey,
1178
1178
  o.props?.props?.["data-key"]
1179
- ].find((h) => h != null) ?? "";
1180
- c = f ? `${t}:${b}:${f}` : `${t}:${b}`;
1179
+ ].find((f) => f != null) ?? "";
1180
+ c = u ? `${t}:${b}:${u}` : `${t}:${b}`;
1181
1181
  }
1182
- let u = c, m = 1;
1183
- for (; s.has(u); )
1184
- u = `${c}#${m++}`;
1185
- s.add(u);
1186
- let g = o.children;
1187
- return Array.isArray(g) && (g = Be(g, u)), { ...o, key: u, children: g };
1182
+ let a = c, p = 1;
1183
+ for (; s.has(a); )
1184
+ a = `${c}#${p++}`;
1185
+ s.add(a);
1186
+ let h = o.children;
1187
+ return Array.isArray(h) && (h = qe(h, a)), { ...o, key: a, children: h };
1188
1188
  });
1189
1189
  }
1190
1190
  const r = e;
1191
1191
  let n = r.props?.key ?? r.key ?? t, i = r.children;
1192
- return Array.isArray(i) && (i = Be(i, n)), { ...r, key: n, children: i };
1192
+ return Array.isArray(i) && (i = qe(i, n)), { ...r, key: n, children: i };
1193
1193
  }
1194
- function Ve(e, t, r, n) {
1195
- const i = r.directives ?? {}, s = at(
1194
+ function Je(e, t, r, n) {
1195
+ const i = r.directives ?? {}, s = ut(
1196
1196
  i,
1197
1197
  n,
1198
1198
  e,
@@ -1205,39 +1205,39 @@ function Ve(e, t, r, n) {
1205
1205
  ...t.attrs,
1206
1206
  ...r.attrs,
1207
1207
  ...s.attrs
1208
- }, u = t.props ?? {}, m = o, g = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1208
+ }, a = t.props ?? {}, p = o, h = r?.isCustomElement ?? t?.isCustomElement ?? !1;
1209
1209
  let b = !1;
1210
- for (const h in { ...u, ...m }) {
1211
- const v = u[h], w = m[h];
1212
- if (v !== w)
1213
- if (b = !0, h === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
- e.value !== w && (e.value = w ?? "");
1215
- else if (h === "checked" && e instanceof HTMLInputElement)
1216
- e.checked = !!w;
1217
- else if (h.startsWith("on") && typeof w == "function") {
1218
- const a = ot(h);
1219
- typeof v == "function" && se.removeListener(e, a, v), se.addListener(e, a, w);
1220
- } else if (w == null)
1221
- e.removeAttribute(h);
1222
- else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || h in e)
1210
+ for (const f in { ...a, ...p }) {
1211
+ const y = a[f], x = p[f];
1212
+ if (y !== x)
1213
+ if (b = !0, f === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
1214
+ e.value !== x && (e.value = x ?? "");
1215
+ else if (f === "checked" && e instanceof HTMLInputElement)
1216
+ e.checked = !!x;
1217
+ else if (f.startsWith("on") && typeof x == "function") {
1218
+ const l = lt(f);
1219
+ typeof y == "function" && oe.removeListener(e, l, y), oe.addListener(e, l, x);
1220
+ } else if (x == null)
1221
+ e.removeAttribute(f);
1222
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || f in e)
1223
1223
  try {
1224
- e[h] = w;
1224
+ e[f] = x;
1225
1225
  } catch {
1226
1226
  }
1227
1227
  else
1228
- w === !1 && e.removeAttribute(h);
1228
+ x === !1 && e.removeAttribute(f);
1229
1229
  }
1230
- for (const [h, v] of Object.entries(
1230
+ for (const [f, y] of Object.entries(
1231
1231
  s.listeners || {}
1232
1232
  ))
1233
- se.addListener(e, h, v);
1234
- const p = t.attrs ?? {}, f = c;
1235
- for (const h in { ...p, ...f }) {
1236
- const v = p[h], w = f[h];
1237
- let a = v, l = w;
1238
- if (ee(v) && (a = v.value), ee(w) && (l = w.value), a !== l)
1239
- if (b = !0, l == null || l === !1) {
1240
- if (e.removeAttribute(h), h === "value") {
1233
+ oe.addListener(e, f, y);
1234
+ const g = t.attrs ?? {}, u = c;
1235
+ for (const f in { ...g, ...u }) {
1236
+ const y = g[f], x = u[f];
1237
+ let l = y, d = x;
1238
+ if (ee(y) && (l = y.value), ee(x) && (d = x.value), l !== d)
1239
+ if (b = !0, d == null || d === !1) {
1240
+ if (e.removeAttribute(f), f === "value") {
1241
1241
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
1242
1242
  try {
1243
1243
  e.value = "";
@@ -1254,69 +1254,69 @@ function Ve(e, t, r, n) {
1254
1254
  } catch {
1255
1255
  }
1256
1256
  }
1257
- if (h === "checked" && e instanceof HTMLInputElement)
1257
+ if (f === "checked" && e instanceof HTMLInputElement)
1258
1258
  try {
1259
1259
  e.checked = !1;
1260
1260
  } catch {
1261
1261
  }
1262
- if (h === "disabled")
1262
+ if (f === "disabled")
1263
1263
  try {
1264
1264
  e.disabled = !1;
1265
1265
  } catch {
1266
1266
  }
1267
1267
  } else {
1268
- if (h === "value") {
1268
+ if (f === "value") {
1269
1269
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1270
1270
  try {
1271
- e.value = l ?? "";
1271
+ e.value = d ?? "";
1272
1272
  } catch {
1273
- e.setAttribute(h, String(l));
1273
+ e.setAttribute(f, String(d));
1274
1274
  }
1275
1275
  continue;
1276
1276
  } else if (e instanceof HTMLSelectElement) {
1277
1277
  try {
1278
- e.value = l ?? "";
1278
+ e.value = d ?? "";
1279
1279
  } catch {
1280
1280
  }
1281
1281
  continue;
1282
1282
  } else if (e instanceof HTMLProgressElement) {
1283
1283
  try {
1284
- e.value = Number(l);
1284
+ e.value = Number(d);
1285
1285
  } catch {
1286
1286
  }
1287
1287
  continue;
1288
1288
  }
1289
1289
  }
1290
- if (h === "checked" && e instanceof HTMLInputElement) {
1290
+ if (f === "checked" && e instanceof HTMLInputElement) {
1291
1291
  try {
1292
- e.checked = !!l;
1292
+ e.checked = !!d;
1293
1293
  } catch {
1294
1294
  }
1295
1295
  continue;
1296
1296
  }
1297
- if (h === "style") {
1298
- e.setAttribute(h, String(l));
1297
+ if (f === "style") {
1298
+ e.setAttribute(f, String(d));
1299
1299
  continue;
1300
1300
  }
1301
- const y = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
- if (g && !y && h.includes("-")) {
1303
- const $ = it(h);
1301
+ const w = e.namespaceURI === "http://www.w3.org/2000/svg";
1302
+ if (h && !w && f.includes("-")) {
1303
+ const k = at(f);
1304
1304
  try {
1305
- e[$] = l;
1305
+ e[k] = d;
1306
1306
  } catch {
1307
- e.setAttribute(h, String(l));
1307
+ e.setAttribute(f, String(d));
1308
1308
  }
1309
- } else if (!y && h in e)
1309
+ } else if (!w && f in e)
1310
1310
  try {
1311
- e[h] = l;
1311
+ e[f] = d;
1312
1312
  } catch {
1313
- e.setAttribute(h, String(l));
1313
+ e.setAttribute(f, String(d));
1314
1314
  }
1315
1315
  else
1316
- e.setAttribute(h, String(l));
1316
+ e.setAttribute(f, String(d));
1317
1317
  }
1318
1318
  }
1319
- if (g && b)
1319
+ if (h && b)
1320
1320
  try {
1321
1321
  if (typeof e._applyProps == "function")
1322
1322
  try {
@@ -1327,98 +1327,98 @@ function Ve(e, t, r, n) {
1327
1327
  } catch {
1328
1328
  }
1329
1329
  }
1330
- function X(e, t, r) {
1330
+ function Z(e, t, r) {
1331
1331
  if (typeof e == "string")
1332
1332
  return document.createTextNode(e);
1333
1333
  if (e.tag === "#text") {
1334
- const p = document.createTextNode(
1334
+ const g = document.createTextNode(
1335
1335
  typeof e.children == "string" ? e.children : ""
1336
1336
  );
1337
- return e.key != null && (p.key = e.key), p;
1337
+ return e.key != null && (g.key = e.key), g;
1338
1338
  }
1339
1339
  if (e.tag === "#anchor") {
1340
- const p = e, f = Array.isArray(p.children) ? p.children : [], h = document.createTextNode(""), v = document.createTextNode("");
1341
- p.key != null && (h.key = `${p.key}:start`, v.key = `${p.key}:end`), p._startNode = h, p._endNode = v;
1342
- const w = document.createDocumentFragment();
1343
- w.appendChild(h);
1344
- for (const a of f) {
1345
- const l = X(a, t);
1346
- w.appendChild(l);
1340
+ const g = e, u = Array.isArray(g.children) ? g.children : [], f = document.createTextNode(""), y = document.createTextNode("");
1341
+ g.key != null && (f.key = `${g.key}:start`, y.key = `${g.key}:end`), g._startNode = f, g._endNode = y;
1342
+ const x = document.createDocumentFragment();
1343
+ x.appendChild(f);
1344
+ for (const l of u) {
1345
+ const d = Z(l, t);
1346
+ x.appendChild(d);
1347
1347
  }
1348
- return w.appendChild(v), w;
1348
+ return x.appendChild(y), x;
1349
1349
  }
1350
1350
  const n = document.createElement(e.tag);
1351
1351
  e.key != null && (n.key = e.key);
1352
- const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = at(o, t, n, s), u = {
1352
+ const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = ut(o, t, n, s), a = {
1353
1353
  ...i,
1354
1354
  ...c.props
1355
- }, m = {
1355
+ }, p = {
1356
1356
  ...s,
1357
1357
  ...c.attrs
1358
- }, g = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
- for (const p in m) {
1360
- const f = m[p];
1361
- if (!(typeof p != "string" || /\[object Object\]/.test(p))) {
1362
- if (typeof f == "boolean")
1363
- f && n.setAttribute(p, "");
1364
- else if (f != null)
1365
- if (!g && p === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1358
+ }, h = n.namespaceURI === "http://www.w3.org/2000/svg";
1359
+ for (const g in p) {
1360
+ const u = p[g];
1361
+ if (!(typeof g != "string" || /\[object Object\]/.test(g))) {
1362
+ if (typeof u == "boolean")
1363
+ u && n.setAttribute(g, "");
1364
+ else if (u != null)
1365
+ if (!h && g === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
1366
1366
  try {
1367
- n instanceof HTMLProgressElement ? n.value = Number(f) : n.value = f ?? "";
1367
+ n instanceof HTMLProgressElement ? n.value = Number(u) : n.value = u ?? "";
1368
1368
  } catch {
1369
- n.setAttribute(p, String(f));
1369
+ n.setAttribute(g, String(u));
1370
1370
  }
1371
- else if (!g && p === "checked" && n instanceof HTMLInputElement)
1371
+ else if (!h && g === "checked" && n instanceof HTMLInputElement)
1372
1372
  try {
1373
- n.checked = !!f;
1373
+ n.checked = !!u;
1374
1374
  } catch {
1375
- n.setAttribute(p, String(f));
1375
+ n.setAttribute(g, String(u));
1376
1376
  }
1377
- else if (!g && p in n)
1377
+ else if (!h && g in n)
1378
1378
  try {
1379
- n[p] = f;
1379
+ n[g] = u;
1380
1380
  } catch {
1381
- n.setAttribute(p, String(f));
1381
+ n.setAttribute(g, String(u));
1382
1382
  }
1383
- else if ((e.props?.isCustomElement ?? !1) && !g && p.includes("-")) {
1384
- const v = it(p);
1383
+ else if ((e.props?.isCustomElement ?? !1) && !h && g.includes("-")) {
1384
+ const y = at(g);
1385
1385
  try {
1386
- n[v] = f;
1386
+ n[y] = u;
1387
1387
  } catch {
1388
- n.setAttribute(p, String(f));
1388
+ n.setAttribute(g, String(u));
1389
1389
  }
1390
1390
  } else
1391
- n.setAttribute(p, String(f));
1392
- }
1393
- }
1394
- for (const p in u) {
1395
- const f = u[p];
1396
- if (!(typeof p != "string" || /\[object Object\]/.test(p)))
1397
- if (p === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
- const h = typeof f == "object" && f !== null && typeof f.value < "u" ? f.value : f;
1399
- n.value = h ?? "";
1400
- } else if (p === "checked" && n instanceof HTMLInputElement) {
1401
- const h = typeof f == "object" && f !== null && typeof f.value < "u" ? f.value : f;
1402
- n.checked = !!h;
1403
- } else if (p.startsWith("on") && typeof f == "function")
1404
- se.addListener(n, ot(p), f);
1391
+ n.setAttribute(g, String(u));
1392
+ }
1393
+ }
1394
+ for (const g in a) {
1395
+ const u = a[g];
1396
+ if (!(typeof g != "string" || /\[object Object\]/.test(g)))
1397
+ if (g === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
1398
+ const f = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1399
+ n.value = f ?? "";
1400
+ } else if (g === "checked" && n instanceof HTMLInputElement) {
1401
+ const f = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1402
+ n.checked = !!f;
1403
+ } else if (g.startsWith("on") && typeof u == "function")
1404
+ oe.addListener(n, lt(g), u);
1405
1405
  else {
1406
- if (p.startsWith("on") && f === void 0)
1406
+ if (g.startsWith("on") && u === void 0)
1407
1407
  continue;
1408
- if (f == null || f === !1)
1409
- n.removeAttribute(p);
1410
- else if ((e.props?.isCustomElement ?? !1) || p in n)
1408
+ if (u == null || u === !1)
1409
+ n.removeAttribute(g);
1410
+ else if ((e.props?.isCustomElement ?? !1) || g in n)
1411
1411
  try {
1412
- const v = typeof f == "object" && f !== null && typeof f.value < "u" ? f.value : f;
1413
- n[p] = v;
1412
+ const y = typeof u == "object" && u !== null && typeof u.value < "u" ? u.value : u;
1413
+ n[g] = y;
1414
1414
  } catch {
1415
1415
  }
1416
1416
  }
1417
1417
  }
1418
- for (const [p, f] of Object.entries(
1418
+ for (const [g, u] of Object.entries(
1419
1419
  c.listeners || {}
1420
1420
  ))
1421
- se.addListener(n, p, f);
1421
+ oe.addListener(n, g, u);
1422
1422
  const b = {
1423
1423
  ...e,
1424
1424
  props: {
@@ -1426,7 +1426,7 @@ function X(e, t, r) {
1426
1426
  ...c.props
1427
1427
  }
1428
1428
  };
1429
- pe(b, n, r);
1429
+ ye(b, n, r);
1430
1430
  try {
1431
1431
  if (typeof n._applyProps == "function")
1432
1432
  try {
@@ -1437,126 +1437,126 @@ function X(e, t, r) {
1437
1437
  } catch {
1438
1438
  }
1439
1439
  if (Array.isArray(e.children))
1440
- for (const p of e.children)
1441
- n.appendChild(X(p, t, r));
1440
+ for (const g of e.children)
1441
+ n.appendChild(Z(g, t, r));
1442
1442
  else typeof e.children == "string" && (n.textContent = e.children);
1443
1443
  try {
1444
- if (n instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
1444
+ if (n instanceof HTMLSelectElement && p && p.hasOwnProperty("value"))
1445
1445
  try {
1446
- n.value = m.value ?? "";
1446
+ n.value = p.value ?? "";
1447
1447
  } catch {
1448
1448
  }
1449
1449
  } catch {
1450
1450
  }
1451
1451
  return n;
1452
1452
  }
1453
- function Rt(e, t, r, n, i) {
1453
+ function Pt(e, t, r, n, i) {
1454
1454
  if (typeof r == "string") {
1455
1455
  e.textContent !== r && (e.textContent = r);
1456
1456
  return;
1457
1457
  }
1458
1458
  if (!Array.isArray(r)) return;
1459
1459
  const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], c = /* @__PURE__ */ new Map();
1460
- for (const f of o)
1461
- f && f.key != null && c.set(f.key, f);
1462
- const u = /* @__PURE__ */ new Map();
1463
- for (const f of s) {
1464
- const h = f.key;
1465
- h != null && u.set(h, f);
1466
- }
1467
- const m = /* @__PURE__ */ new Set();
1468
- let g = e.firstChild;
1469
- function b(f, h) {
1470
- let v = f;
1471
- for (; v && (m.add(v), v !== h); )
1472
- v = v.nextSibling;
1473
- }
1474
- function p(f, h, v, w) {
1475
- const a = [];
1476
- let l = f.nextSibling;
1477
- for (; l && l !== h; )
1478
- a.push(l), l = l.nextSibling;
1479
- const y = Array.isArray(v) ? v : [];
1480
- if (w.some((k) => k && k.key != null) || y.some((k) => k && k.key != null)) {
1481
- const k = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
1482
- for (const C of y)
1483
- C && C.key != null && k.set(C.key, C);
1484
- for (const C of a) {
1485
- const E = C.key;
1486
- E != null && d.set(E, C);
1460
+ for (const u of o)
1461
+ u && u.key != null && c.set(u.key, u);
1462
+ const a = /* @__PURE__ */ new Map();
1463
+ for (const u of s) {
1464
+ const f = u.key;
1465
+ f != null && a.set(f, u);
1466
+ }
1467
+ const p = /* @__PURE__ */ new Set();
1468
+ let h = e.firstChild;
1469
+ function b(u, f) {
1470
+ let y = u;
1471
+ for (; y && (p.add(y), y !== f); )
1472
+ y = y.nextSibling;
1473
+ }
1474
+ function g(u, f, y, x) {
1475
+ const l = [];
1476
+ let d = u.nextSibling;
1477
+ for (; d && d !== f; )
1478
+ l.push(d), d = d.nextSibling;
1479
+ const w = Array.isArray(y) ? y : [];
1480
+ if (x.some((C) => C && C.key != null) || w.some((C) => C && C.key != null)) {
1481
+ const C = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
1482
+ for (const v of w)
1483
+ v && v.key != null && C.set(v.key, v);
1484
+ for (const v of l) {
1485
+ const A = v.key;
1486
+ A != null && m.set(A, v);
1487
1487
  }
1488
- const x = /* @__PURE__ */ new Set();
1489
- let A = f.nextSibling;
1490
- for (const C of w) {
1491
- let E;
1492
- if (C.key != null && d.has(C.key)) {
1493
- const T = k.get(C.key);
1494
- E = Ee(
1495
- d.get(C.key),
1496
- T,
1497
- C,
1488
+ const $ = /* @__PURE__ */ new Set();
1489
+ let S = u.nextSibling;
1490
+ for (const v of x) {
1491
+ let A;
1492
+ if (v.key != null && m.has(v.key)) {
1493
+ const j = C.get(v.key);
1494
+ A = Ae(
1495
+ m.get(v.key),
1496
+ j,
1497
+ v,
1498
1498
  n
1499
- ), x.add(E), E !== A && e.contains(E) && e.insertBefore(E, A);
1499
+ ), $.add(A), A !== S && e.contains(A) && e.insertBefore(A, S);
1500
1500
  } else
1501
- E = X(C, n), e.insertBefore(E, A), x.add(E);
1502
- A = E.nextSibling;
1501
+ A = Z(v, n), e.insertBefore(A, S), $.add(A);
1502
+ S = A.nextSibling;
1503
1503
  }
1504
- for (const C of a)
1505
- !x.has(C) && e.contains(C) && e.removeChild(C);
1504
+ for (const v of l)
1505
+ !$.has(v) && e.contains(v) && e.removeChild(v);
1506
1506
  } else {
1507
- const k = Math.min(
1508
- y.length,
1509
- w.length
1507
+ const C = Math.min(
1508
+ w.length,
1509
+ x.length
1510
1510
  );
1511
- for (let d = 0; d < k; d++) {
1512
- const x = y[d], A = w[d], C = Ee(a[d], x, A, n);
1513
- C !== a[d] && (e.insertBefore(C, a[d]), e.removeChild(a[d]));
1511
+ for (let m = 0; m < C; m++) {
1512
+ const $ = w[m], S = x[m], v = Ae(l[m], $, S, n);
1513
+ v !== l[m] && (e.insertBefore(v, l[m]), e.removeChild(l[m]));
1514
1514
  }
1515
- for (let d = k; d < w.length; d++)
1516
- e.insertBefore(X(w[d], n), h);
1517
- for (let d = k; d < a.length; d++)
1518
- e.removeChild(a[d]);
1519
- }
1520
- }
1521
- for (const f of r) {
1522
- let h;
1523
- if (f.tag === "#anchor") {
1524
- const v = f.key, w = `${v}:start`, a = `${v}:end`;
1525
- let l = u.get(w), y = u.get(a);
1526
- const $ = Array.isArray(f.children) ? f.children : [];
1527
- if (l || (l = document.createTextNode(""), l.key = w), y || (y = document.createTextNode(""), y.key = a), f._startNode = l, f._endNode = y, !e.contains(l) || !e.contains(y)) {
1528
- e.insertBefore(l, g);
1529
- for (const k of $)
1530
- e.insertBefore(X(k, n), g);
1531
- e.insertBefore(y, g);
1515
+ for (let m = C; m < x.length; m++)
1516
+ e.insertBefore(Z(x[m], n), f);
1517
+ for (let m = C; m < l.length; m++)
1518
+ e.removeChild(l[m]);
1519
+ }
1520
+ }
1521
+ for (const u of r) {
1522
+ let f;
1523
+ if (u.tag === "#anchor") {
1524
+ const y = u.key, x = `${y}:start`, l = `${y}:end`;
1525
+ let d = a.get(x), w = a.get(l);
1526
+ const k = Array.isArray(u.children) ? u.children : [];
1527
+ if (d || (d = document.createTextNode(""), d.key = x), w || (w = document.createTextNode(""), w.key = l), u._startNode = d, u._endNode = w, !e.contains(d) || !e.contains(w)) {
1528
+ e.insertBefore(d, h);
1529
+ for (const C of k)
1530
+ e.insertBefore(Z(C, n), h);
1531
+ e.insertBefore(w, h);
1532
1532
  } else
1533
- p(
1534
- l,
1535
- y,
1536
- c.get(v)?.children,
1537
- $
1533
+ g(
1534
+ d,
1535
+ w,
1536
+ c.get(y)?.children,
1537
+ k
1538
1538
  );
1539
- b(l, y), g = y.nextSibling;
1539
+ b(d, w), h = w.nextSibling;
1540
1540
  continue;
1541
1541
  }
1542
- if (f.key != null && u.has(f.key)) {
1543
- const v = c.get(f.key);
1544
- h = Ee(
1545
- u.get(f.key),
1546
- v,
1547
- f,
1542
+ if (u.key != null && a.has(u.key)) {
1543
+ const y = c.get(u.key);
1544
+ f = Ae(
1545
+ a.get(u.key),
1546
+ y,
1547
+ u,
1548
1548
  n,
1549
1549
  i
1550
- ), m.add(h), h !== g && e.contains(h) && (g && !e.contains(g) && (g = null), e.insertBefore(h, g));
1550
+ ), p.add(f), f !== h && e.contains(f) && (h && !e.contains(h) && (h = null), e.insertBefore(f, h));
1551
1551
  } else
1552
- h = X(f, n, i), g && !e.contains(g) && (g = null), e.insertBefore(h, g), m.add(h);
1553
- g = h.nextSibling;
1552
+ f = Z(u, n, i), h && !e.contains(h) && (h = null), e.insertBefore(f, h), p.add(f);
1553
+ h = f.nextSibling;
1554
1554
  }
1555
- for (const f of s)
1556
- !m.has(f) && e.contains(f) && (le(f, i), e.removeChild(f));
1555
+ for (const u of s)
1556
+ !p.has(u) && e.contains(u) && (ue(u, i), e.removeChild(u));
1557
1557
  }
1558
- function Ee(e, t, r, n, i) {
1559
- if (t && typeof t != "string" && t.props?.ref && i && le(e, i), t === r) return e;
1558
+ function Ae(e, t, r, n, i) {
1559
+ if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === r) return e;
1560
1560
  if (typeof r == "string") {
1561
1561
  if (e.nodeType === Node.TEXT_NODE)
1562
1562
  return e.textContent !== r && (e.textContent = r), e;
@@ -1566,98 +1566,101 @@ function Ee(e, t, r, n, i) {
1566
1566
  }
1567
1567
  }
1568
1568
  if (r && typeof r != "string" && r.tag === "#anchor") {
1569
- const o = r, c = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""), m = o._endNode ?? document.createTextNode("");
1570
- o.key != null && (u.key = `${o.key}:start`, m.key = `${o.key}:end`), o._startNode = u, o._endNode = m;
1571
- const g = document.createDocumentFragment();
1572
- g.appendChild(u);
1569
+ const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""), p = o._endNode ?? document.createTextNode("");
1570
+ o.key != null && (a.key = `${o.key}:start`, p.key = `${o.key}:end`), o._startNode = a, o._endNode = p;
1571
+ const h = document.createDocumentFragment();
1572
+ h.appendChild(a);
1573
1573
  for (const b of c) {
1574
- const p = X(b, n);
1575
- g.appendChild(p);
1574
+ const g = Z(b, n);
1575
+ h.appendChild(g);
1576
1576
  }
1577
- return g.appendChild(m), e.parentNode?.replaceChild(g, e), u;
1577
+ return h.appendChild(p), e.parentNode?.replaceChild(h, e), a;
1578
1578
  }
1579
1579
  if (!r) {
1580
- le(e, i);
1580
+ ue(e, i);
1581
1581
  const o = document.createComment("removed");
1582
1582
  return e.parentNode?.replaceChild(o, e), o;
1583
1583
  }
1584
1584
  if (!t || typeof t == "string") {
1585
- le(e, i);
1586
- const o = X(r, n, i);
1587
- return pe(r, o, i), e.parentNode?.replaceChild(o, e), o;
1585
+ ue(e, i);
1586
+ const o = Z(r, n, i);
1587
+ return ye(r, o, i), e.parentNode?.replaceChild(o, e), o;
1588
1588
  }
1589
1589
  if (r.tag === "#anchor") {
1590
- const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), u = r._endNode ?? document.createTextNode("");
1591
- r.key != null && (c.key = `${r.key}:start`, u.key = `${r.key}:end`), r._startNode = c, r._endNode = u;
1592
- const m = document.createDocumentFragment();
1593
- m.appendChild(c);
1594
- for (const g of o)
1595
- m.appendChild(X(g, n));
1596
- return m.appendChild(u), e.parentNode?.replaceChild(m, e), c;
1590
+ const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), a = r._endNode ?? document.createTextNode("");
1591
+ r.key != null && (c.key = `${r.key}:start`, a.key = `${r.key}:end`), r._startNode = c, r._endNode = a;
1592
+ const p = document.createDocumentFragment();
1593
+ p.appendChild(c);
1594
+ for (const h of o)
1595
+ p.appendChild(Z(h, n));
1596
+ return p.appendChild(a), e.parentNode?.replaceChild(p, e), c;
1597
1597
  }
1598
1598
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
1599
1599
  const o = e;
1600
- return Ve(o, t.props || {}, r.props || {}, n), Rt(o, t.children, r.children, n, i), pe(r, o, i), o;
1600
+ return Je(o, t.props || {}, r.props || {}, n), Pt(o, t.children, r.children, n, i), ye(r, o, i), o;
1601
1601
  }
1602
1602
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
1603
1603
  try {
1604
1604
  const c = e;
1605
- return Ve(c, t.props || {}, r.props || {}, n), pe(r, c, i), c;
1605
+ return Je(c, t.props || {}, r.props || {}, n), ye(r, c, i), c;
1606
1606
  } catch {
1607
1607
  }
1608
- le(e, i);
1609
- const s = X(r, n, i);
1610
- return pe(r, s, i), e.parentNode?.replaceChild(s, e), s;
1608
+ ue(e, i);
1609
+ const s = Z(r, n, i);
1610
+ return ye(r, s, i), e.parentNode?.replaceChild(s, e), s;
1611
1611
  }
1612
- function Ot(e, t, r, n) {
1612
+ function Mt(e, t, r, n) {
1613
1613
  let i;
1614
1614
  Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })) : i = { tag: "div", key: "__root__", children: t } : (i = t, i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })), i && typeof i == "object" && i.tag === "#anchor" && (i = {
1615
1615
  tag: "div",
1616
1616
  key: "__anchor_root__",
1617
1617
  props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
1618
1618
  children: [i]
1619
- }), i = Be(i, String(i.key ?? "root"));
1619
+ }), i = qe(i, String(i.key ?? "root"));
1620
1620
  const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
1621
1621
  let c;
1622
- s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = Ee(o, s, i, r, n) : (c = X(i, r, n), e.replaceChild(c, o)) : (c = X(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
1623
- const u = [];
1624
- for (let m = 0; m < e.childNodes.length; m++) {
1625
- const g = e.childNodes[m];
1626
- g !== c && g.nodeName !== "STYLE" && (le(g, n), u.push(g));
1622
+ s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = Ae(o, s, i, r, n) : (c = Z(i, r, n), e.replaceChild(c, o)) : (c = Z(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
1623
+ const a = [];
1624
+ for (let p = 0; p < e.childNodes.length; p++) {
1625
+ const h = e.childNodes[p];
1626
+ h !== c && h.nodeName !== "STYLE" && (ue(h, n), a.push(h));
1627
1627
  }
1628
- u.forEach((m) => e.removeChild(m)), e._prevVNode = i, e._prevDom = c;
1628
+ a.forEach((p) => e.removeChild(p)), e._prevVNode = i, e._prevDom = c;
1629
1629
  }
1630
1630
  function Pe(e) {
1631
- if (typeof e == "string") return de(e);
1631
+ if (typeof e == "string") return pe(e);
1632
1632
  if (e.tag === "#text")
1633
- return typeof e.children == "string" ? de(e.children) : "";
1633
+ return typeof e.children == "string" ? pe(e.children) : "";
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}="${de(String(s))}"`).join(""));
1637
+ e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${pe(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}="${de(String(s))}"`).join(""));
1640
- const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? de(e.children) : e.children ? Pe(e.children) : "";
1639
+ e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${pe(String(s))}"`).join(""));
1640
+ const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Pe).join("") : typeof e.children == "string" ? pe(e.children) : e.children ? Pe(e.children) : "";
1641
1641
  return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
1642
1642
  }
1643
- function Pt(e, ...t) {
1643
+ function Wt(e, ...t) {
1644
1644
  let r = "";
1645
1645
  for (let n = 0; n < e.length; n++)
1646
1646
  r += e[n], n < t.length && (r += t[n]);
1647
1647
  return r;
1648
1648
  }
1649
- function ct(e) {
1649
+ function ft(e) {
1650
1650
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
1651
1651
  }
1652
- let ke = null;
1653
- function Je() {
1654
- return ke || (ke = new CSSStyleSheet(), ke.replaceSync(ct(Mt))), ke;
1652
+ let _e = null;
1653
+ function Ze() {
1654
+ return _e || (_e = new CSSStyleSheet(), _e.replaceSync(ft(It))), _e;
1655
1655
  }
1656
- function Lt(e) {
1656
+ function Dt(e) {
1657
1657
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
1658
1658
  }
1659
- const Mt = Pt`
1660
- :host, *, ::before, ::after {
1659
+ const It = Wt`
1660
+ :host,
1661
+ *,
1662
+ ::before,
1663
+ ::after {
1661
1664
  all: isolate;
1662
1665
  box-sizing: border-box;
1663
1666
  border: 0 solid currentColor;
@@ -1675,46 +1678,90 @@ const Mt = Pt`
1675
1678
  -webkit-text-size-adjust: 100%;
1676
1679
  text-size-adjust: 100%;
1677
1680
  }
1678
- button, input, select, textarea {
1681
+ button,
1682
+ input,
1683
+ select,
1684
+ textarea {
1679
1685
  background: transparent;
1680
1686
  outline: none;
1681
1687
  }
1682
- textarea { resize: vertical }
1683
- progress { vertical-align: baseline }
1684
- button, textarea { overflow: visible }
1685
- img, svg, video, canvas, audio, iframe, embed, object {
1688
+ textarea {
1689
+ resize: vertical;
1690
+ }
1691
+ progress {
1692
+ vertical-align: baseline;
1693
+ }
1694
+ button,
1695
+ textarea {
1696
+ overflow: visible;
1697
+ }
1698
+ img,
1699
+ svg,
1700
+ video,
1701
+ canvas,
1702
+ audio,
1703
+ iframe,
1704
+ embed,
1705
+ object {
1686
1706
  display: block;
1687
1707
  max-width: 100%;
1688
1708
  height: auto;
1689
1709
  }
1690
- svg { fill: currentColor; stroke: none }
1691
- a { text-decoration: inherit; cursor: pointer }
1692
- button, [type=button], [type=reset], [type=submit] {
1710
+ svg {
1711
+ fill: currentColor;
1712
+ stroke: none;
1713
+ }
1714
+ a {
1715
+ text-decoration: inherit;
1716
+ cursor: pointer;
1717
+ }
1718
+ button,
1719
+ [type="button"],
1720
+ [type="reset"],
1721
+ [type="submit"] {
1693
1722
  cursor: pointer;
1694
1723
  appearance: button;
1695
1724
  background: none;
1696
1725
  -webkit-user-select: none;
1697
1726
  user-select: none;
1698
1727
  }
1699
- ::-webkit-input-placeholder, ::placeholder {
1700
- color: inherit; opacity: .5;
1728
+ ::-webkit-input-placeholder,
1729
+ ::placeholder {
1730
+ color: inherit;
1731
+ opacity: 0.5;
1701
1732
  }
1702
1733
  *:focus-visible {
1703
1734
  outline: 2px solid var(--color-primary-500, #3b82f6);
1704
1735
  outline-offset: 2px;
1705
1736
  }
1706
- ol, ul { list-style: none }
1707
- table { border-collapse: collapse }
1708
- sub, sup {
1709
- font-size: .75em;
1737
+ ol,
1738
+ ul {
1739
+ list-style: none;
1740
+ }
1741
+ table {
1742
+ border-collapse: collapse;
1743
+ }
1744
+ sub,
1745
+ sup {
1746
+ font-size: 0.75em;
1710
1747
  line-height: 0;
1711
1748
  position: relative;
1712
1749
  }
1713
- sub { bottom: -.25em }
1714
- sup { top: -.5em }
1715
- [disabled], [aria-disabled=true] { cursor: not-allowed }
1716
- [hidden] { display: none }
1717
- `, jt = {
1750
+ sub {
1751
+ bottom: -0.25em;
1752
+ }
1753
+ sup {
1754
+ top: -0.5em;
1755
+ }
1756
+ [disabled],
1757
+ [aria-disabled="true"] {
1758
+ cursor: not-allowed;
1759
+ }
1760
+ [hidden] {
1761
+ display: none;
1762
+ }
1763
+ `, Nt = {
1764
+ // Existing semantic colors
1718
1765
  neutral: {
1719
1766
  50: "#fafafa",
1720
1767
  100: "#f4f4f5",
@@ -1806,12 +1853,13 @@ const Mt = Pt`
1806
1853
  900: "#7f1d1d",
1807
1854
  950: "#450a0a"
1808
1855
  },
1856
+ // Special colors
1809
1857
  white: { DEFAULT: "#ffffff" },
1810
1858
  black: { DEFAULT: "#000000" },
1811
1859
  transparent: { DEFAULT: "transparent" },
1812
1860
  current: { DEFAULT: "currentColor" }
1813
- }, Wt = Object.fromEntries(
1814
- Object.entries(jt).map(([e, t]) => [
1861
+ }, dt = Object.fromEntries(
1862
+ Object.entries(Nt).map(([e, t]) => [
1815
1863
  e,
1816
1864
  Object.fromEntries(
1817
1865
  Object.entries(t).map(([r, n]) => [
@@ -1820,238 +1868,21 @@ const Mt = Pt`
1820
1868
  ])
1821
1869
  )
1822
1870
  ])
1823
- ), ce = "0.25rem", Nt = {
1824
- // Tailwind container widths
1825
- // 3xs: 16rem => 16 / 0.25 = 64
1871
+ ), le = "0.25rem", Ht = {
1826
1872
  "3xs": 64,
1827
- // 2xs: 18rem => 72
1828
1873
  "2xs": 72,
1829
- // xs: 20rem => 80
1830
1874
  xs: 80,
1831
- // sm: 24rem => 96
1832
1875
  sm: 96,
1833
- // md: 28rem => 112
1834
1876
  md: 112,
1835
- // lg: 32rem => 128
1836
1877
  lg: 128,
1837
- // xl: 36rem => 144
1838
1878
  xl: 144,
1839
- // 2xl: 42rem => 168
1840
1879
  "2xl": 168,
1841
- // 3xl: 48rem => 192
1842
1880
  "3xl": 192,
1843
- // 4xl: 56rem => 224
1844
1881
  "4xl": 224,
1845
- // 5xl: 64rem => 256
1846
1882
  "5xl": 256,
1847
- // 6xl: 72rem => 288
1848
1883
  "6xl": 288,
1849
- // 7xl: 80rem => 320
1850
1884
  "7xl": 320
1851
- }, zt = () => {
1852
- const e = {};
1853
- for (const [t, r] of Object.entries(Nt))
1854
- e[`max-w-${t}`] = `max-width:calc(${ce} * ${r});`, e[`min-w-${t}`] = `min-width:calc(${ce} * ${r});`, e[`w-${t}`] = `width:calc(${ce} * ${r});`, e[`max-h-${t}`] = `max-height:calc(${ce} * ${r});`, e[`min-h-${t}`] = `min-height:calc(${ce} * ${r});`, e[`h-${t}`] = `height:calc(${ce} * ${r});`;
1855
- return e;
1856
- }, It = () => {
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
- }, Dt = () => {
1862
- const e = {}, t = [0, 1, 2, 4, 6, 8];
1863
- for (const r of t) {
1864
- const n = `${r}px`;
1865
- e[`border-${r}`] = `border-width:${n};`, e[`border-s-${r}`] = `border-inline-start-width:${n};`, e[`border-e-${r}`] = `border-inline-end-width:${n};`, e[`border-bs-${r}`] = `border-block-start-width:${n};`, e[`border-be-${r}`] = `border-block-end-width:${n};`, e[`border-x-${r}`] = `border-inline-width:${n};`, e[`border-y-${r}`] = `border-block-width:${n};`, e[`border-t-${r}`] = `border-top-width:${n};`, e[`border-r-${r}`] = `border-right-width:${n};`, e[`border-b-${r}`] = `border-bottom-width:${n};`, e[`border-l-${r}`] = `border-left-width:${n};`;
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, n] of Object.entries(t)) {
1882
- const i = n === 9999 ? "9999px" : `${n / 16}rem`;
1883
- e[`rounded-${r}`] = `border-radius:${i};`, e[`rounded-s-${r}`] = `border-start-start-radius:${i};border-end-start-radius:${i};`, e[`rounded-e-${r}`] = `border-start-end-radius:${i};border-end-end-radius:${i};`, e[`rounded-t-${r}`] = `border-top-left-radius:${i};border-top-right-radius:${i};`, e[`rounded-r-${r}`] = `border-top-right-radius:${i};border-bottom-right-radius:${i};`, e[`rounded-b-${r}`] = `border-bottom-left-radius:${i};border-bottom-right-radius:${i};`, e[`rounded-l-${r}`] = `border-top-left-radius:${i};border-bottom-left-radius:${i};`, e[`rounded-x-${r}`] = `border-top-left-radius:${i};border-bottom-left-radius:${i};border-top-right-radius:${i};border-bottom-right-radius:${i};`, e[`rounded-y-${r}`] = `border-top-left-radius:${i};border-top-right-radius:${i};border-bottom-left-radius:${i};border-bottom-right-radius:${i};`;
1884
- }
1885
- return e;
1886
- }, Le = {
1887
- /* Display */
1888
- block: "display:block;",
1889
- inline: "display:inline;",
1890
- "inline-block": "display:inline-block;",
1891
- flex: "display:flex;",
1892
- "inline-flex": "display:inline-flex;",
1893
- grid: "display:grid;",
1894
- hidden: "display:none;",
1895
- /* Sizing & Spacing */
1896
- "w-full": "width:100%;",
1897
- "w-screen": "width:100dvw;",
1898
- "h-full": "height:100%;",
1899
- "h-screen": "height:100dvw;",
1900
- "max-w-full": "max-width:100%;",
1901
- "max-h-full": "max-height:100%;",
1902
- "max-w-screen": "max-width:100dvw;",
1903
- "max-h-screen": "max-height:100dvh;",
1904
- "min-w-0": "min-width:0;",
1905
- "min-h-0": "min-height:0;",
1906
- "min-w-screen": "min-width:100dvw;",
1907
- "min-h-screen": "min-height:100dvh;",
1908
- ...zt(),
1909
- "m-auto": "margin:auto;",
1910
- "mx-auto": "margin-inline:auto;",
1911
- "my-auto": "margin-block:auto;",
1912
- /* Overflow */
1913
- "overflow-auto": "overflow:auto;",
1914
- "overflow-hidden": "overflow:hidden;",
1915
- "overflow-visible": "overflow:visible;",
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;",
1925
- /* Pointer Events */
1926
- "pointer-events-none": "pointer-events:none;",
1927
- "pointer-events-auto": "pointer-events:auto;",
1928
- /* Accessibility */
1929
- "sr-only": "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",
1930
- "not-sr-only": "position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;",
1931
- /* Grid Layout & Placement */
1932
- ...It(),
1933
- /* Positioning */
1934
- absolute: "position:absolute;",
1935
- relative: "position:relative;",
1936
- fixed: "position:fixed;",
1937
- sticky: "position:sticky;",
1938
- /* Typography */
1939
- "font-bold": "font-weight:700;",
1940
- "font-semibold": "font-weight:600;",
1941
- "font-medium": "font-weight:500;",
1942
- "font-light": "font-weight:300;",
1943
- underline: "text-decoration-line:underline;",
1944
- overline: "text-decoration-line:overline;",
1945
- "line-through": "text-decoration-line:line-through;",
1946
- "no-underline": "text-decoration-line:none;",
1947
- italic: "font-style:italic;",
1948
- "not-italic": "font-style:normal;",
1949
- uppercase: "text-transform:uppercase;",
1950
- lowercase: "text-transform:lowercase;",
1951
- capitalize: "text-transform:capitalize;",
1952
- "normal-case": "text-transform:none;",
1953
- "text-left": "text-align:left;",
1954
- "text-center": "text-align:center;",
1955
- "text-right": "text-align:right;",
1956
- "text-xs": "font-size:0.75rem;line-height:calc(1 / 0.75)",
1957
- "text-sm": "font-size:0.875rem;line-height:calc(1.25 / 0.875)",
1958
- "text-base": "font-size:1rem;line-height:calc(1.5 / 1)",
1959
- "text-lg": "font-size:1.125rem;line-height:calc(1.75 / 1.125)",
1960
- "text-xl": "font-size:1.25rem;line-height:calc(1.75 / 1.25)",
1961
- "text-2xl": "font-size:1.5rem;line-height:calc(2 / 1.5)",
1962
- "text-3xl": "font-size:1.875rem;line-height:calc(2.25 / 1.875)",
1963
- "text-4xl": "font-size:2.25rem;line-height:calc(2.5 / 2.25)",
1964
- "text-5xl": "font-size:3rem;line-height:1",
1965
- "text-6xl": "font-size:3.75rem;line-height:1",
1966
- "text-7xl": "font-size:4.5rem;line-height:1",
1967
- "text-8xl": "font-size:6rem;line-height:1",
1968
- /* Borders */
1969
- ...Dt(),
1970
- ...Ht(),
1971
- /* Shadow and effects */
1972
- // Shadows use a CSS variable for color so color utilities can modify --ce-shadow-color
1973
- "shadow-none": "--ce-shadow-color: rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
1974
- "shadow-xs": "--ce-shadow-color: rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
1975
- "shadow-sm": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1976
- "shadow-md": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1977
- "shadow-lg": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1978
- "shadow-xl": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1979
- "shadow-2xl": "--ce-shadow-color: rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));",
1980
- /* Text Overflow & Whitespace */
1981
- truncate: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",
1982
- /* Visibility */
1983
- visible: "visibility:visible;",
1984
- invisible: "visibility:hidden;",
1985
- /* Flex Grow/Shrink/Basis */
1986
- "items-center": "align-items:center;",
1987
- "items-start": "align-items:flex-start;",
1988
- "items-end": "align-items:flex-end;",
1989
- "items-baseline": "align-items:baseline;",
1990
- "items-stretch": "align-items:stretch;",
1991
- "justify-center": "justify-content:center;",
1992
- "justify-start": "justify-content:flex-start;",
1993
- "justify-between": "justify-content:space-between;",
1994
- "justify-around": "justify-content:space-around;",
1995
- "justify-evenly": "justify-content:space-evenly;",
1996
- "justify-end": "justify-content:flex-end;",
1997
- "flex-wrap": "flex-wrap:wrap;",
1998
- "flex-nowrap": "flex-wrap:nowrap;",
1999
- "flex-wrap-reverse": "flex-wrap:wrap-reverse;",
2000
- "content-center": "align-content:center;",
2001
- "content-start": "align-content:flex-start;",
2002
- "content-end": "align-content:flex-end;",
2003
- "content-between": "align-content:space-between;",
2004
- "content-around": "align-content:space-around;",
2005
- "content-stretch": "align-content:stretch;",
2006
- "self-auto": "align-self:auto;",
2007
- "self-start": "align-self:flex-start;",
2008
- "self-end": "align-self:flex-end;",
2009
- "self-center": "align-self:center;",
2010
- "self-stretch": "align-self:stretch;",
2011
- "flex-1": "flex:1 1 0%;",
2012
- "flex-auto": "flex:1 1 auto;",
2013
- "flex-initial": "flex:0 1 auto;",
2014
- "flex-none": "flex:0 0 auto;",
2015
- "flex-col": "flex-direction:column;",
2016
- "flex-row": "flex-direction:row;",
2017
- grow: "flex-grow:1;",
2018
- shrink: "flex-shrink:1;",
2019
- "grow-0": "flex-grow:0;",
2020
- "shrink-0": "flex-shrink:0;",
2021
- /* Font Family */
2022
- "font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
2023
- "font-serif": "font-family:var(--font-serif, ui-serif,Georgia,serif);",
2024
- "font-mono": "font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);",
2025
- /* Line Clamp (for webkit) */
2026
- "line-clamp-1": "display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;",
2027
- "line-clamp-2": "display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;",
2028
- "line-clamp-3": "display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;",
2029
- "line-clamp-4": "display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;",
2030
- /* Transitions */
2031
- transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
2032
- "transition-all": "transition-property:all;",
2033
- "transition-colors": "transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;",
2034
- "transition-shadow": "transition-property:box-shadow;",
2035
- "transition-opacity": "transition-property:opacity;",
2036
- "transition-transform": "transition-property:transform;",
2037
- "transition-none": "transition-property:none;",
2038
- /* Cursor */
2039
- "cursor-auto": "cursor:auto;",
2040
- "cursor-default": "cursor:default;",
2041
- "cursor-pointer": "cursor:pointer;",
2042
- "cursor-wait": "cursor:wait;",
2043
- "cursor-text": "cursor:text;",
2044
- "cursor-move": "cursor:move;",
2045
- "cursor-help": "cursor:help;",
2046
- "cursor-not-allowed": "cursor:not-allowed;",
2047
- /* Z-index */
2048
- "z-0": "z-index:0;",
2049
- "z-10": "z-index:10;",
2050
- "z-20": "z-index:20;",
2051
- "z-30": "z-index:30;",
2052
- "z-40": "z-index:40;",
2053
- "z-50": "z-index:50;"
2054
- }, Ze = {
1885
+ }, Ge = {
2055
1886
  m: ["margin"],
2056
1887
  mx: ["margin-inline"],
2057
1888
  my: ["margin-block"],
@@ -2082,35 +1913,377 @@ const Mt = Pt`
2082
1913
  gap: ["gap"],
2083
1914
  "gap-x": ["column-gap"],
2084
1915
  "gap-y": ["row-gap"]
2085
- };
2086
- function G(e, t) {
2087
- let r = 0, n = 0;
2088
- for (let i = 0; i < e.length; i++) {
2089
- const s = e[i];
2090
- if (s === "[") r++;
2091
- else if (s === "]" && r > 0) r--;
2092
- else if (s === "(") n++;
2093
- else if (s === ")" && n > 0) n--;
2094
- else if (r === 0 && n === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
2095
- return e.slice(0, i) + t + e.slice(i);
1916
+ }, zt = () => {
1917
+ const e = {};
1918
+ e["@container"] = "container-type:inline-size;", [
1919
+ "block",
1920
+ "inline",
1921
+ "inline-block",
1922
+ "flex",
1923
+ "inline-flex",
1924
+ "grid",
1925
+ "inline-grid",
1926
+ "table",
1927
+ "table-cell",
1928
+ "table-row",
1929
+ "hidden"
1930
+ ].forEach((a) => {
1931
+ e[a] = a === "hidden" ? "display:none;" : `display:${a};`;
1932
+ }), ["absolute", "relative", "fixed", "sticky", "static"].forEach((a) => {
1933
+ e[a] = `position:${a};`;
1934
+ }), Object.assign(e, {
1935
+ "items-center": "align-items:center;",
1936
+ "items-start": "align-items:flex-start;",
1937
+ "items-end": "align-items:flex-end;",
1938
+ "items-baseline": "align-items:baseline;",
1939
+ "items-stretch": "align-items:stretch;",
1940
+ "justify-center": "justify-content:center;",
1941
+ "justify-start": "justify-content:flex-start;",
1942
+ "justify-between": "justify-content:space-between;",
1943
+ "justify-around": "justify-content:space-around;",
1944
+ "justify-evenly": "justify-content:space-evenly;",
1945
+ "justify-end": "justify-content:flex-end;",
1946
+ "flex-wrap": "flex-wrap:wrap;",
1947
+ "flex-nowrap": "flex-wrap:nowrap;",
1948
+ "flex-wrap-reverse": "flex-wrap:wrap-reverse;",
1949
+ "content-center": "align-content:center;",
1950
+ "content-start": "align-content:flex-start;",
1951
+ "content-end": "align-content:flex-end;",
1952
+ "content-between": "align-content:space-between;",
1953
+ "content-around": "align-content:space-around;",
1954
+ "content-evenly": "align-content:space-evenly;",
1955
+ "content-stretch": "align-content:stretch;",
1956
+ "self-auto": "align-self:auto;",
1957
+ "self-start": "align-self:flex-start;",
1958
+ "self-end": "align-self:flex-end;",
1959
+ "self-center": "align-self:center;",
1960
+ "self-stretch": "align-self:stretch;",
1961
+ "flex-col": "flex-direction:column;",
1962
+ "flex-row": "flex-direction:row;",
1963
+ "flex-col-reverse": "flex-direction:column-reverse;",
1964
+ "flex-row-reverse": "flex-direction:row-reverse;",
1965
+ "flex-1": "flex:1 1 0%;",
1966
+ "flex-auto": "flex:1 1 auto;",
1967
+ "flex-initial": "flex:0 1 auto;",
1968
+ "flex-none": "flex:0 0 auto;",
1969
+ grow: "flex-grow:1;",
1970
+ shrink: "flex-shrink:1;",
1971
+ "grow-0": "flex-grow:0;",
1972
+ "shrink-0": "flex-shrink:0;"
1973
+ });
1974
+ for (let a = 1; a <= 12; a++)
1975
+ e[`grid-cols-${a}`] = `grid-template-columns:repeat(${a},minmax(0,1fr));`, e[`grid-rows-${a}`] = `grid-template-rows:repeat(${a},minmax(0,1fr));`, e[`col-span-${a}`] = `grid-column:span ${a} / span ${a};`, e[`row-span-${a}`] = `grid-row:span ${a} / span ${a};`, e[`col-start-${a}`] = `grid-column-start:${a};`, e[`col-end-${a}`] = `grid-column-end:${a};`, e[`row-start-${a}`] = `grid-row-start:${a};`, e[`row-end-${a}`] = `grid-row-end:${a};`;
1976
+ Object.assign(e, {
1977
+ "grid-cols-none": "grid-template-columns:none;",
1978
+ "grid-rows-none": "grid-template-rows:none;",
1979
+ "col-span-full": "grid-column:1 / -1;",
1980
+ "row-span-full": "grid-row:1 / -1;",
1981
+ "auto-cols-auto": "grid-auto-columns:auto;",
1982
+ "auto-cols-min": "grid-auto-columns:min-content;",
1983
+ "auto-cols-max": "grid-auto-columns:max-content;",
1984
+ "auto-cols-fr": "grid-auto-columns:1fr;",
1985
+ "auto-rows-auto": "grid-auto-rows:auto;",
1986
+ "auto-rows-min": "grid-auto-rows:min-content;",
1987
+ "auto-rows-max": "grid-auto-rows:max-content;",
1988
+ "auto-rows-fr": "grid-auto-rows:1fr;",
1989
+ "grid-flow-row": "grid-auto-flow:row;",
1990
+ "grid-flow-col": "grid-auto-flow:column;",
1991
+ "grid-flow-row-dense": "grid-auto-flow:row dense;",
1992
+ "grid-flow-col-dense": "grid-auto-flow:column dense;"
1993
+ }), Object.assign(e, {
1994
+ "text-left": "text-align:left;",
1995
+ "text-center": "text-align:center;",
1996
+ "text-right": "text-align:right;",
1997
+ "text-justify": "text-align:justify;",
1998
+ "font-thin": "font-weight:100;",
1999
+ "font-extralight": "font-weight:200;",
2000
+ "font-light": "font-weight:300;",
2001
+ "font-normal": "font-weight:400;",
2002
+ "font-medium": "font-weight:500;",
2003
+ "font-semibold": "font-weight:600;",
2004
+ "font-bold": "font-weight:700;",
2005
+ "font-extrabold": "font-weight:800;",
2006
+ "font-black": "font-weight:900;",
2007
+ italic: "font-style:italic;",
2008
+ "not-italic": "font-style:normal;",
2009
+ uppercase: "text-transform:uppercase;",
2010
+ lowercase: "text-transform:lowercase;",
2011
+ capitalize: "text-transform:capitalize;",
2012
+ "normal-case": "text-transform:none;",
2013
+ underline: "text-decoration-line:underline;",
2014
+ overline: "text-decoration-line:overline;",
2015
+ "line-through": "text-decoration-line:line-through;",
2016
+ "no-underline": "text-decoration-line:none;",
2017
+ truncate: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",
2018
+ "whitespace-normal": "white-space:normal;",
2019
+ "whitespace-nowrap": "white-space:nowrap;",
2020
+ "whitespace-pre": "white-space:pre;",
2021
+ "whitespace-pre-line": "white-space:pre-line;",
2022
+ "whitespace-pre-wrap": "white-space:pre-wrap;",
2023
+ "break-normal": "overflow-wrap:normal;word-break:normal;",
2024
+ "break-words": "overflow-wrap:break-word;",
2025
+ "break-all": "word-break:break-all;"
2026
+ }), [
2027
+ ["text-xs", "0.75rem", "1"],
2028
+ ["text-sm", "0.875rem", "1.25"],
2029
+ ["text-base", "1rem", "1.5"],
2030
+ ["text-lg", "1.125rem", "1.75"],
2031
+ ["text-xl", "1.25rem", "1.75"],
2032
+ ["text-2xl", "1.5rem", "2"],
2033
+ ["text-3xl", "1.875rem", "2.25"],
2034
+ ["text-4xl", "2.25rem", "2.5"],
2035
+ ["text-5xl", "3rem", "1"],
2036
+ ["text-6xl", "3.75rem", "1"],
2037
+ ["text-7xl", "4.5rem", "1"],
2038
+ ["text-8xl", "6rem", "1"],
2039
+ ["text-9xl", "8rem", "1"]
2040
+ ].forEach(([a, p, h]) => {
2041
+ e[a] = `font-size:${p};line-height:${h};`;
2042
+ }), [
2043
+ ["tracking-tighter", "-0.05em"],
2044
+ ["tracking-tight", "-0.025em"],
2045
+ ["tracking-normal", "0em"],
2046
+ ["tracking-wide", "0.025em"],
2047
+ ["tracking-wider", "0.05em"],
2048
+ ["tracking-widest", "0.1em"]
2049
+ ].forEach(([a, p]) => {
2050
+ e[a] = `letter-spacing:${p};`;
2051
+ }), [
2052
+ ["leading-3", "0.75rem"],
2053
+ ["leading-4", "1rem"],
2054
+ ["leading-5", "1.25rem"],
2055
+ ["leading-6", "1.5rem"],
2056
+ ["leading-7", "1.75rem"],
2057
+ ["leading-8", "2rem"],
2058
+ ["leading-9", "2.25rem"],
2059
+ ["leading-10", "2.5rem"],
2060
+ ["leading-none", "1"],
2061
+ ["leading-tight", "1.25"],
2062
+ ["leading-snug", "1.375"],
2063
+ ["leading-normal", "1.5"],
2064
+ ["leading-relaxed", "1.625"],
2065
+ ["leading-loose", "2"]
2066
+ ].forEach(([a, p]) => {
2067
+ e[a] = `line-height:${p};`;
2068
+ }), Object.assign(e, {
2069
+ "font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
2070
+ "font-serif": "font-family:var(--font-serif, ui-serif,Georgia,serif);",
2071
+ "font-mono": "font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);"
2072
+ }), [0, 1, 2, 4, 6, 8].forEach((a) => {
2073
+ const p = `${a}px`;
2074
+ e[`border-${a}`] = `border-width:${p};`, e[`border-t-${a}`] = `border-top-width:${p};`, e[`border-r-${a}`] = `border-right-width:${p};`, e[`border-b-${a}`] = `border-bottom-width:${p};`, e[`border-l-${a}`] = `border-left-width:${p};`, e[`border-x-${a}`] = `border-left-width:${p};border-right-width:${p};`, e[`border-y-${a}`] = `border-top-width:${p};border-bottom-width:${p};`;
2075
+ }), e.border = "border-width:1px;", e["border-t"] = "border-top-width:1px;", e["border-r"] = "border-right-width:1px;", e["border-b"] = "border-bottom-width:1px;", e["border-l"] = "border-left-width:1px;", e["border-x"] = "border-left-width:1px;border-right-width:1px;", e["border-y"] = "border-top-width:1px;border-bottom-width:1px;", Object.assign(e, {
2076
+ "border-solid": "border-style:solid;",
2077
+ "border-dashed": "border-style:dashed;",
2078
+ "border-dotted": "border-style:dotted;",
2079
+ "border-double": "border-style:double;",
2080
+ "border-none": "border-style:none;"
2081
+ }), Object.entries({
2082
+ none: 0,
2083
+ xs: 2,
2084
+ sm: 4,
2085
+ md: 6,
2086
+ lg: 8,
2087
+ xl: 12,
2088
+ "2xl": 16,
2089
+ "3xl": 24,
2090
+ "4xl": 32,
2091
+ full: 9999
2092
+ }).forEach(([a, p]) => {
2093
+ const h = p === 9999 ? "9999px" : `${p / 16}rem`;
2094
+ e[`rounded-${a}`] = `border-radius:${h};`, e[`rounded-t-${a}`] = `border-top-left-radius:${h};border-top-right-radius:${h};`, e[`rounded-r-${a}`] = `border-top-right-radius:${h};border-bottom-right-radius:${h};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${h};border-bottom-right-radius:${h};`, e[`rounded-l-${a}`] = `border-top-left-radius:${h};border-bottom-left-radius:${h};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${h};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${h};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${h};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${h};`;
2095
+ }), Object.assign(e, {
2096
+ "shadow-none": "--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
2097
+ "shadow-xs": "--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
2098
+ "shadow-sm": "--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
2099
+ shadow: "--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
2100
+ "shadow-md": "--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
2101
+ "shadow-lg": "--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
2102
+ "shadow-xl": "--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
2103
+ "shadow-2xl": "--ce-shadow-color:rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));",
2104
+ "shadow-inner": "box-shadow:inset 0 2px 4px 0 rgb(0 0 0 / 0.05);"
2105
+ }), Object.assign(e, {
2106
+ rounded: "border-radius:0.25rem;",
2107
+ shadow: "--ce-shadow-color:rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));"
2108
+ }), Object.assign(e, {
2109
+ "overflow-auto": "overflow:auto;",
2110
+ "overflow-hidden": "overflow:hidden;",
2111
+ "overflow-visible": "overflow:visible;",
2112
+ "overflow-scroll": "overflow:scroll;",
2113
+ "overflow-x-auto": "overflow-x:auto;",
2114
+ "overflow-x-hidden": "overflow-x:hidden;",
2115
+ "overflow-x-visible": "overflow-x:visible;",
2116
+ "overflow-x-scroll": "overflow-x:scroll;",
2117
+ "overflow-y-auto": "overflow-y:auto;",
2118
+ "overflow-y-hidden": "overflow-y:hidden;",
2119
+ "overflow-y-visible": "overflow-y:visible;",
2120
+ "overflow-y-scroll": "overflow-y:scroll;"
2121
+ }), Object.assign(e, {
2122
+ "sr-only": "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",
2123
+ "not-sr-only": "position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;"
2124
+ }), Object.assign(e, {
2125
+ "pointer-events-none": "pointer-events:none;",
2126
+ "pointer-events-auto": "pointer-events:auto;"
2127
+ }), [
2128
+ "auto",
2129
+ "default",
2130
+ "pointer",
2131
+ "wait",
2132
+ "text",
2133
+ "move",
2134
+ "help",
2135
+ "not-allowed",
2136
+ "grab",
2137
+ "grabbing"
2138
+ ].forEach((a) => {
2139
+ e[`cursor-${a}`] = `cursor:${a};`;
2140
+ }), [0, 10, 20, 30, 40, 50].forEach((a) => {
2141
+ e[`z-${a}`] = `z-index:${a};`;
2142
+ }), Object.assign(e, {
2143
+ visible: "visibility:visible;",
2144
+ invisible: "visibility:hidden;"
2145
+ }), Object.assign(e, {
2146
+ "w-full": "width:100%;",
2147
+ "w-screen": "width:100dvw;",
2148
+ "h-full": "height:100%;",
2149
+ "h-screen": "height:100dvh;",
2150
+ "max-w-full": "max-width:100%;",
2151
+ "max-h-full": "max-height:100%;",
2152
+ "max-w-screen": "max-width:100dvw;",
2153
+ "max-h-screen": "max-height:100dvh;",
2154
+ "min-w-0": "min-width:0;",
2155
+ "min-h-0": "min-height:0;",
2156
+ "min-w-full": "min-width:100%;",
2157
+ "min-h-full": "min-height:100%;",
2158
+ "min-w-screen": "min-width:100dvw;",
2159
+ "min-h-screen": "min-height:100dvh;",
2160
+ "w-auto": "width:auto;",
2161
+ "h-auto": "height:auto;",
2162
+ "w-fit": "width:fit-content;",
2163
+ "h-fit": "height:fit-content;",
2164
+ "w-min": "width:min-content;",
2165
+ "h-min": "height:min-content;",
2166
+ "w-max": "width:max-content;",
2167
+ "h-max": "height:max-content;"
2168
+ }), Object.assign(e, {
2169
+ "m-auto": "margin:auto;",
2170
+ "mx-auto": "margin-inline:auto;",
2171
+ "my-auto": "margin-block:auto;"
2172
+ }), Object.entries(Ht).forEach(([a, p]) => {
2173
+ e[`max-w-${a}`] = `max-width:calc(${le} * ${p});`, e[`min-w-${a}`] = `min-width:calc(${le} * ${p});`, e[`w-${a}`] = `width:calc(${le} * ${p});`, e[`max-h-${a}`] = `max-height:calc(${le} * ${p});`, e[`min-h-${a}`] = `min-height:calc(${le} * ${p});`, e[`h-${a}`] = `height:calc(${le} * ${p});`;
2174
+ }), Object.assign(e, {
2175
+ transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
2176
+ "transition-none": "transition-property:none;",
2177
+ "transition-all": "transition-property:all;",
2178
+ "transition-colors": "transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;",
2179
+ "transition-shadow": "transition-property:box-shadow;",
2180
+ "transition-opacity": "transition-property:opacity;",
2181
+ "transition-transform": "transition-property:transform;",
2182
+ "ease-linear": "transition-timing-function:linear;",
2183
+ "ease-in": "transition-timing-function:ease-in;",
2184
+ "ease-out": "transition-timing-function:ease-out;",
2185
+ "ease-in-out": "transition-timing-function:ease-in-out;",
2186
+ "duration-75": "transition-duration:75ms;",
2187
+ "duration-100": "transition-duration:100ms;",
2188
+ "duration-150": "transition-duration:150ms;",
2189
+ "duration-200": "transition-duration:200ms;",
2190
+ "duration-300": "transition-duration:300ms;",
2191
+ "duration-500": "transition-duration:500ms;",
2192
+ "duration-700": "transition-duration:700ms;",
2193
+ "duration-1000": "transition-duration:1000ms;"
2194
+ }), Object.assign(e, {
2195
+ "scale-0": "transform:scale(0);",
2196
+ "scale-50": "transform:scale(0.5);",
2197
+ "scale-75": "transform:scale(0.75);",
2198
+ "scale-90": "transform:scale(0.9);",
2199
+ "scale-95": "transform:scale(0.95);",
2200
+ "scale-100": "transform:scale(1);",
2201
+ "scale-105": "transform:scale(1.05);",
2202
+ "scale-110": "transform:scale(1.1);",
2203
+ "scale-125": "transform:scale(1.25);",
2204
+ "scale-150": "transform:scale(1.5);",
2205
+ "rotate-0": "transform:rotate(0deg);",
2206
+ "rotate-1": "transform:rotate(1deg);",
2207
+ "rotate-2": "transform:rotate(2deg);",
2208
+ "rotate-3": "transform:rotate(3deg);",
2209
+ "rotate-6": "transform:rotate(6deg);",
2210
+ "rotate-12": "transform:rotate(12deg);",
2211
+ "rotate-45": "transform:rotate(45deg);",
2212
+ "rotate-90": "transform:rotate(90deg);",
2213
+ "rotate-180": "transform:rotate(180deg);",
2214
+ "-rotate-1": "transform:rotate(-1deg);",
2215
+ "-rotate-2": "transform:rotate(-2deg);",
2216
+ "-rotate-3": "transform:rotate(-3deg);",
2217
+ "-rotate-6": "transform:rotate(-6deg);",
2218
+ "-rotate-12": "transform:rotate(-12deg);",
2219
+ "-rotate-45": "transform:rotate(-45deg);",
2220
+ "-rotate-90": "transform:rotate(-90deg);",
2221
+ "-rotate-180": "transform:rotate(-180deg);"
2222
+ }), Object.assign(e, {
2223
+ "aspect-auto": "aspect-ratio:auto;",
2224
+ "aspect-square": "aspect-ratio:1 / 1;",
2225
+ "aspect-video": "aspect-ratio:16 / 9;"
2226
+ }), Object.assign(e, {
2227
+ "object-contain": "object-fit:contain;",
2228
+ "object-cover": "object-fit:cover;",
2229
+ "object-fill": "object-fit:fill;",
2230
+ "object-none": "object-fit:none;",
2231
+ "object-scale-down": "object-fit:scale-down;",
2232
+ "object-bottom": "object-position:bottom;",
2233
+ "object-center": "object-position:center;",
2234
+ "object-left": "object-position:left;",
2235
+ "object-left-bottom": "object-position:left bottom;",
2236
+ "object-left-top": "object-position:left top;",
2237
+ "object-right": "object-position:right;",
2238
+ "object-right-bottom": "object-position:right bottom;",
2239
+ "object-right-top": "object-position:right top;",
2240
+ "object-top": "object-position:top;"
2241
+ });
2242
+ for (let a = 1; a <= 6; a++)
2243
+ e[`line-clamp-${a}`] = `display:-webkit-box;-webkit-line-clamp:${a};-webkit-box-orient:vertical;overflow:hidden;`;
2244
+ e["line-clamp-none"] = "overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none;";
2245
+ for (let a = 1; a <= 12; a++)
2246
+ e[`order-${a}`] = `order:${a};`;
2247
+ e["order-first"] = "order:-9999;", e["order-last"] = "order:9999;", e["order-none"] = "order:0;";
2248
+ for (let a = 0; a <= 12; a++)
2249
+ a <= 1 || (e[`grow-${a}`] = `flex-grow:${a};`, e[`shrink-${a}`] = `flex-shrink:${a};`);
2250
+ return Object.assign(e, {
2251
+ "bg-gradient-to-t": "background-image:linear-gradient(to top, var(--tw-gradient-stops));",
2252
+ "bg-gradient-to-tr": "background-image:linear-gradient(to top right, var(--tw-gradient-stops));",
2253
+ "bg-gradient-to-r": "background-image:linear-gradient(to right, var(--tw-gradient-stops));",
2254
+ "bg-gradient-to-br": "background-image:linear-gradient(to bottom right, var(--tw-gradient-stops));",
2255
+ "bg-gradient-to-b": "background-image:linear-gradient(to bottom, var(--tw-gradient-stops));",
2256
+ "bg-gradient-to-bl": "background-image:linear-gradient(to bottom left, var(--tw-gradient-stops));",
2257
+ "bg-gradient-to-l": "background-image:linear-gradient(to left, var(--tw-gradient-stops));",
2258
+ "bg-gradient-to-tl": "background-image:linear-gradient(to top left, var(--tw-gradient-stops));"
2259
+ }), e;
2260
+ }, Me = zt();
2261
+ function J(e, t) {
2262
+ let r = 0;
2263
+ for (let n = 0; n < e.length; n++) {
2264
+ const i = e[n];
2265
+ if (i === "[" || i === "(") r++;
2266
+ else if ((i === "]" || i === ")") && r > 0) r--;
2267
+ else if (r === 0 && (i === ">" || i === "+" || i === "~" || i === " "))
2268
+ return e.slice(0, n) + t + e.slice(n);
2096
2269
  }
2097
2270
  return e + t;
2098
2271
  }
2099
2272
  const Bt = {
2100
2273
  before: (e, t) => `${e}::before{${t}}`,
2101
2274
  after: (e, t) => `${e}::after{${t}}`,
2102
- hover: (e, t) => `${G(e, ":hover")}{${t}}`,
2103
- focus: (e, t) => `${G(e, ":focus")}{${t}}`,
2104
- active: (e, t) => `${G(e, ":active")}{${t}}`,
2105
- disabled: (e, t) => `${G(e, ":disabled")}{${t}}`,
2106
- visited: (e, t) => `${G(e, ":visited")}{${t}}`,
2107
- checked: (e, t) => `${G(e, ":checked")}{${t}}`,
2108
- first: (e, t) => `${G(e, ":first-child")}{${t}}`,
2109
- last: (e, t) => `${G(e, ":last-child")}{${t}}`,
2110
- odd: (e, t) => `${G(e, ":nth-child(odd)")}{${t}}`,
2111
- even: (e, t) => `${G(e, ":nth-child(even)")}{${t}}`,
2112
- "focus-within": (e, t) => `${G(e, ":focus-within")}{${t}}`,
2113
- "focus-visible": (e, t) => `${G(e, ":focus-visible")}{${t}}`,
2275
+ hover: (e, t) => `${J(e, ":hover")}{${t}}`,
2276
+ focus: (e, t) => `${J(e, ":focus")}{${t}}`,
2277
+ active: (e, t) => `${J(e, ":active")}{${t}}`,
2278
+ disabled: (e, t) => `${J(e, ":disabled")}{${t}}`,
2279
+ visited: (e, t) => `${J(e, ":visited")}{${t}}`,
2280
+ checked: (e, t) => `${J(e, ":checked")}{${t}}`,
2281
+ first: (e, t) => `${J(e, ":first-child")}{${t}}`,
2282
+ last: (e, t) => `${J(e, ":last-child")}{${t}}`,
2283
+ odd: (e, t) => `${J(e, ":nth-child(odd)")}{${t}}`,
2284
+ even: (e, t) => `${J(e, ":nth-child(even)")}{${t}}`,
2285
+ "focus-within": (e, t) => `${J(e, ":focus-within")}{${t}}`,
2286
+ "focus-visible": (e, t) => `${J(e, ":focus-visible")}{${t}}`,
2114
2287
  "group-hover": (e, t) => `.group:hover ${e}{${t}}`,
2115
2288
  "group-focus": (e, t) => `.group:focus ${e}{${t}}`,
2116
2289
  "group-active": (e, t) => `.group:active ${e}{${t}}`,
@@ -2119,148 +2292,183 @@ const Bt = {
2119
2292
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
2120
2293
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
2121
2294
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
2122
- }, Me = {
2123
- // Responsive
2295
+ }, Xe = {
2124
2296
  sm: "(min-width:640px)",
2125
2297
  md: "(min-width:768px)",
2126
2298
  lg: "(min-width:1024px)",
2127
2299
  xl: "(min-width:1280px)",
2128
2300
  "2xl": "(min-width:1536px)",
2129
- // Dark mode (now plain string)
2130
2301
  dark: "(prefers-color-scheme: dark)"
2131
- }, je = ["sm", "md", "lg", "xl", "2xl"];
2132
- function We(e) {
2133
- const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
2134
- if (n.length < 2) return null;
2135
- const i = n.slice(0, -1).join("-"), s = n[n.length - 1], o = parseFloat(s);
2136
- if (Number.isNaN(o) || !Ze[i]) return null;
2302
+ }, Ut = {
2303
+ xs: "(min-width:20rem)",
2304
+ sm: "(min-width:24rem)",
2305
+ md: "(min-width:28rem)",
2306
+ lg: "(min-width:32rem)",
2307
+ xl: "(min-width:36rem)",
2308
+ "2xl": "(min-width:42rem)",
2309
+ "3xl": "(min-width:48rem)",
2310
+ "4xl": "(min-width:56rem)",
2311
+ "5xl": "(min-width:64rem)",
2312
+ "6xl": "(min-width:72rem)",
2313
+ "7xl": "(min-width:80rem)"
2314
+ }, We = ["sm", "md", "lg", "xl", "2xl"], De = [
2315
+ "xs",
2316
+ "sm",
2317
+ "md",
2318
+ "lg",
2319
+ "xl",
2320
+ "2xl",
2321
+ "3xl",
2322
+ "4xl",
2323
+ "5xl",
2324
+ "6xl",
2325
+ "7xl"
2326
+ ];
2327
+ function Ie(e) {
2328
+ const t = e.startsWith("-"), r = t ? e.slice(1) : e, n = r.lastIndexOf("-");
2329
+ if (n === -1) return null;
2330
+ const i = r.slice(0, n), s = r.slice(n + 1), o = parseFloat(s);
2331
+ if (Number.isNaN(o) || !Ge[i]) return null;
2137
2332
  const c = t ? "-" : "";
2138
- return Ze[i].map((u) => `${u}:calc(${c}${ce} * ${o});`).join("");
2333
+ return Ge[i].map((a) => `${a}:calc(${c}${le} * ${o});`).join("");
2139
2334
  }
2140
- function Ge(e) {
2141
- const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, i = r >> 8 & 255, s = r & 255;
2142
- return `${n} ${i} ${s}`;
2335
+ function Qe(e) {
2336
+ const t = e.replace("#", ""), r = parseInt(t, 16);
2337
+ return `${r >> 16 & 255} ${r >> 8 & 255} ${r & 255}`;
2143
2338
  }
2144
- function Ut(e) {
2145
- const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2339
+ const qt = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Ft = {
2340
+ bg: "background-color",
2341
+ decoration: "text-decoration-color",
2342
+ text: "color",
2343
+ border: "border-color",
2344
+ outline: "outline-color",
2345
+ caret: "caret-color",
2346
+ accent: "accent-color",
2347
+ fill: "fill",
2348
+ stroke: "stroke"
2349
+ };
2350
+ function Kt(e) {
2351
+ const t = qt.exec(e);
2146
2352
  if (!t) return null;
2147
- const [, r, n, i = "DEFAULT"] = t, s = Wt[n]?.[i];
2353
+ const [, r, n, i = "DEFAULT"] = t, s = dt[n]?.[i];
2148
2354
  if (!s) return null;
2149
2355
  if (r === "shadow") return `--ce-shadow-color:${s};`;
2150
- const c = {
2151
- bg: "background-color",
2152
- decoration: "text-decoration-color",
2153
- text: "color",
2154
- border: "border-color",
2155
- outline: "outline-color",
2156
- caret: "caret-color",
2157
- accent: "accent-color",
2158
- fill: "fill",
2159
- stroke: "stroke"
2160
- }[r];
2161
- return c ? `${c}:${s};` : null;
2162
- }
2163
- function qt(e) {
2164
- const [t, r] = e.split("/");
2165
- if (!r) return { base: t };
2166
- const n = parseInt(r, 10);
2167
- return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
2356
+ const o = Ft[r];
2357
+ return o ? `${o}:${s};` : null;
2358
+ }
2359
+ function Vt(e) {
2360
+ const t = e.indexOf("/");
2361
+ if (t === -1) return { base: e };
2362
+ const r = e.slice(0, t), n = e.slice(t + 1), i = parseInt(n, 10);
2363
+ return isNaN(i) || i < 0 || i > 100 ? { base: r } : { base: r, opacity: i / 100 };
2168
2364
  }
2169
2365
  function Ne(e) {
2170
- const { base: t, opacity: r } = qt(e), n = Ut(t);
2171
- if (n) {
2172
- if (r !== void 0) {
2173
- const s = /#([0-9a-f]{6})/i.exec(n);
2174
- if (s) {
2175
- const o = Ge(s[0]);
2176
- return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2177
- }
2366
+ const { base: t, opacity: r } = Vt(e), n = Kt(t);
2367
+ if (n && r !== void 0) {
2368
+ const s = /#([0-9a-f]{6})/i.exec(n);
2369
+ if (s) {
2370
+ const o = Qe(s[0]);
2371
+ return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2178
2372
  }
2179
- return n;
2180
2373
  }
2181
- const i = Se(t);
2374
+ if (n) return n;
2375
+ const i = je(t);
2182
2376
  if (i && r !== void 0) {
2183
2377
  const s = /#([0-9a-f]{6})/i.exec(i);
2184
2378
  if (s) {
2185
- const o = Ge(s[0]);
2186
- return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
2379
+ const o = Qe(s[0]);
2380
+ return i.replace(
2381
+ /#([0-9a-f]{6})/i,
2382
+ `rgb(${o} / ${r})`
2383
+ );
2187
2384
  }
2188
2385
  }
2189
2386
  return i;
2190
2387
  }
2191
- function ze(e) {
2388
+ function Ye(e) {
2389
+ const t = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
2390
+ if (!t) return null;
2391
+ const [, r, n, i = "DEFAULT"] = t, s = dt[n]?.[i];
2392
+ if (!s) return null;
2393
+ switch (r) {
2394
+ case "from":
2395
+ return `--tw-gradient-from:${s} var(--tw-gradient-from-position);--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);`;
2396
+ case "to":
2397
+ return `--tw-gradient-to:${s} var(--tw-gradient-to-position);`;
2398
+ case "via":
2399
+ return `--tw-gradient-to:rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), ${s} var(--tw-gradient-via-position), var(--tw-gradient-to);`;
2400
+ default:
2401
+ return null;
2402
+ }
2403
+ }
2404
+ function He(e) {
2192
2405
  const t = /^opacity-(\d{1,3})$/.exec(e);
2193
2406
  if (!t) return null;
2194
2407
  const r = parseInt(t[1], 10);
2195
2408
  return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
2196
2409
  }
2197
- function Se(e) {
2410
+ function je(e) {
2198
2411
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
2199
- const i = e.slice(1, -1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);
2200
- if (i) {
2201
- const s = i[1].trim();
2202
- let o = i[2].trim();
2203
- return o = o.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), o = o.replace(/^'([^']*)'$/g, '"$1"'), `${s}:${o};`;
2204
- }
2205
- return null;
2206
- }
2207
- const t = e.indexOf("-["), r = e.endsWith("]");
2208
- if (t > 0 && r) {
2209
- const n = e.slice(0, t);
2210
- let i = e.slice(t + 2, -1);
2211
- i = i.replace(/_/g, " ");
2212
- const s = {
2213
- bg: "background-color",
2214
- text: "color",
2215
- shadow: "box-shadow",
2216
- p: "padding",
2217
- px: "padding-inline",
2218
- py: "padding-block",
2219
- m: "margin",
2220
- mx: "margin-inline",
2221
- my: "margin-block",
2222
- w: "width",
2223
- h: "height",
2224
- "min-w": "min-width",
2225
- "max-w": "max-width",
2226
- "min-h": "min-height",
2227
- "max-h": "max-height",
2228
- "border-t": "border-top-width",
2229
- "border-b": "border-bottom-width",
2230
- "border-l": "border-left-width",
2231
- "border-r": "border-right-width",
2232
- "border-x": "border-inline-width",
2233
- "border-y": "border-block-width",
2234
- "grid-cols": "grid-template-columns",
2235
- "grid-rows": "grid-template-rows",
2236
- transition: "transition-property",
2237
- ease: "transition-timing-function",
2238
- delay: "transition-delay",
2239
- duration: "transition-duration",
2240
- list: "list-style",
2241
- break: "word-break",
2242
- flex: "flex-direction",
2243
- items: "align-items",
2244
- justify: "justify-content",
2245
- whitespace: "white-space",
2246
- select: "user-select",
2247
- content: "align-content",
2248
- self: "align-self",
2249
- basis: "flex-basis",
2250
- tracking: "letter-spacing",
2251
- scroll: "scroll-behavior",
2252
- weight: "font-weight",
2253
- leading: "line-height",
2254
- z: "z-index"
2255
- };
2256
- if (n === "rotate")
2257
- return `transform:rotate(${i});`;
2258
- const o = s[n] ?? n.replace(/_/g, "-");
2259
- if (o && i) return `${o}:${i};`;
2412
+ const o = e.slice(1, -1).trim(), c = o.indexOf(":");
2413
+ if (c === -1) return null;
2414
+ const a = o.slice(0, c).trim();
2415
+ let p = o.slice(c + 1).trim();
2416
+ return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (p = p.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), p = p.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${p};`) : null;
2260
2417
  }
2261
- return null;
2418
+ const t = e.indexOf("-[");
2419
+ if (t <= 0 || !e.endsWith("]")) return null;
2420
+ const r = e.slice(0, t);
2421
+ let n = e.slice(t + 2, -1).replace(/_/g, " ");
2422
+ const i = {
2423
+ bg: "background-color",
2424
+ shadow: "box-shadow",
2425
+ p: "padding",
2426
+ px: "padding-inline",
2427
+ py: "padding-block",
2428
+ m: "margin",
2429
+ mx: "margin-inline",
2430
+ my: "margin-block",
2431
+ w: "width",
2432
+ h: "height",
2433
+ "min-w": "min-width",
2434
+ "max-w": "max-width",
2435
+ "min-h": "min-height",
2436
+ "max-h": "max-height",
2437
+ "border-t": "border-top-width",
2438
+ "border-b": "border-bottom-width",
2439
+ "border-l": "border-left-width",
2440
+ "border-r": "border-right-width",
2441
+ "border-x": "border-inline-width",
2442
+ "border-y": "border-block-width",
2443
+ "grid-cols": "grid-template-columns",
2444
+ "grid-rows": "grid-template-rows",
2445
+ transition: "transition-property",
2446
+ ease: "transition-timing-function",
2447
+ delay: "transition-delay",
2448
+ duration: "transition-duration",
2449
+ list: "list-style",
2450
+ break: "word-break",
2451
+ flex: "flex-direction",
2452
+ items: "align-items",
2453
+ justify: "justify-content",
2454
+ content: "align-content",
2455
+ self: "align-self",
2456
+ basis: "flex-basis",
2457
+ tracking: "letter-spacing",
2458
+ leading: "line-height",
2459
+ z: "z-index",
2460
+ opacity: "opacity"
2461
+ };
2462
+ if (r === "text")
2463
+ return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n) ? `font-size:${n};` : `color:${n};`;
2464
+ if (r === "rotate") return `transform:rotate(${n});`;
2465
+ if (r === "scale") return `transform:scale(${n});`;
2466
+ if (r === "translate-x") return `transform:translateX(${n});`;
2467
+ if (r === "translate-y") return `transform:translateY(${n});`;
2468
+ const s = i[r] ?? r.replace(/_/g, "-");
2469
+ return s && n ? `${s}:${n};` : null;
2262
2470
  }
2263
- function Ft(e) {
2471
+ function Jt(e) {
2264
2472
  if (e.startsWith("[") && e.endsWith("]")) {
2265
2473
  const r = e.slice(1, -1);
2266
2474
  return r.includes("&") ? r : e;
@@ -2272,190 +2480,207 @@ function Ft(e) {
2272
2480
  }
2273
2481
  return null;
2274
2482
  }
2275
- function Kt(e) {
2483
+ function Zt(e) {
2276
2484
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
2277
2485
  }
2278
- function Vt(e) {
2486
+ function Gt(e) {
2279
2487
  const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
2280
2488
  let n;
2281
2489
  for (; n = t.exec(e); ) {
2282
2490
  const i = n[2].split(/\s+/).filter(Boolean);
2283
2491
  i.length && r.push(...i);
2284
2492
  }
2285
- return r.filter(Boolean);
2493
+ return r;
2286
2494
  }
2287
- const Xe = /* @__PURE__ */ new Map(), Jt = 16;
2288
- function Zt(e) {
2289
- const t = Date.now(), r = Xe.get(e);
2290
- if (r && t - r.timestamp < Jt) return r.css;
2291
- const n = Vt(e), i = new Set(n), s = [], o = [], c = [], u = [], m = {};
2292
- function g(w, a = !1) {
2293
- const l = (a ? "dark|" : "") + w;
2294
- if (l in m) return m[l];
2295
- const y = h(w, a);
2296
- return m[l] = y, y;
2297
- }
2298
- function b(w) {
2299
- const a = w.some((y) => je.includes(y)), l = w.includes("dark");
2300
- return w.length === 0 ? 1 : !a && !l ? 2 : a && !l ? 3 : 4;
2301
- }
2302
- function p(w) {
2303
- const a = [];
2304
- let l = "", y = 0, $ = 0;
2305
- for (let k = 0; k < w.length; k++) {
2306
- const d = w[k];
2307
- d === "[" ? y++ : d === "]" && y > 0 ? y-- : d === "(" ? $++ : d === ")" && $ > 0 && $--, d === ":" && y === 0 && $ === 0 ? (a.push(l), l = "") : l += d;
2308
- }
2309
- return l && a.push(l), a;
2310
- }
2311
- function f(w) {
2312
- switch (w) {
2313
- case "hover":
2314
- return ":hover";
2315
- case "focus":
2316
- return ":focus";
2317
- case "active":
2318
- return ":active";
2319
- case "visited":
2320
- return ":visited";
2321
- case "disabled":
2322
- return ":disabled";
2323
- case "checked":
2324
- return ":checked";
2325
- case "first":
2326
- return ":first-child";
2327
- case "last":
2328
- return ":last-child";
2329
- case "odd":
2330
- return ":nth-child(odd)";
2331
- case "even":
2332
- return ":nth-child(even)";
2333
- case "focus-within":
2334
- return ":focus-within";
2335
- case "focus-visible":
2336
- return ":focus-visible";
2337
- default:
2338
- return null;
2339
- }
2340
- }
2341
- function h(w, a = !1) {
2342
- const l = p(w);
2343
- let y = !1;
2344
- const $ = l.find((_) => (_.startsWith("!") && (y = !0, _ = _.slice(1)), Le[_] || We(_) || ze(_) || Ne(_) || Se(_)));
2345
- if (!$) return null;
2346
- const k = $.replace(/^!/, ""), d = Le[k] ?? We(k) ?? ze(k) ?? Ne(k) ?? Se(k);
2347
- if (!d) return null;
2348
- const x = l.indexOf($);
2349
- let A = x >= 0 ? l.slice(0, x) : [];
2350
- a && (A = A.filter((_) => _ !== "dark"));
2351
- const C = `.${Kt(w)}`, E = "__SUBJECT__", T = y ? d.replace(/;$/, " !important;") : d;
2352
- let R = E;
2353
- const S = [];
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(_));
2357
- const P = [], B = [];
2358
- let V = null;
2359
- for (const _ of A) {
2360
- if (_ === "dark" || je.includes(_)) continue;
2361
- const U = Ft(_);
2362
- if (U) {
2363
- V = U;
2495
+ const ge = /* @__PURE__ */ new Map(), Xt = 16, et = 1e3;
2496
+ function Qt(e) {
2497
+ const t = Date.now(), r = ge.get(e);
2498
+ if (r && t - r.timestamp < Xt) return r.css;
2499
+ const n = Gt(e);
2500
+ if (!n.length) return "";
2501
+ const i = new Set(n), s = [[], [], [], []], o = {}, c = (u, f = !1) => {
2502
+ const y = f ? `dark|${u}` : u;
2503
+ if (y in o) return o[y];
2504
+ const x = b(u, f);
2505
+ return o[y] = x, x;
2506
+ }, a = (u) => {
2507
+ const f = u.some((l) => We.includes(l)), y = u.some(
2508
+ (l) => l.startsWith("@") && (De.includes(l.slice(1)) || l.match(/^@\[.+\]$/))
2509
+ ), x = u.includes("dark");
2510
+ return u.length ? !f && !x && !y ? 1 : x && (f || y) ? 3 : 2 : 0;
2511
+ }, p = (u) => {
2512
+ const f = [];
2513
+ let y = "", x = 0;
2514
+ for (let l = 0; l < u.length; l++) {
2515
+ const d = u[l];
2516
+ d === "[" || d === "(" ? x++ : (d === "]" || d === ")") && x--, d === ":" && x === 0 ? (f.push(y), y = "") : y += d;
2517
+ }
2518
+ return y && f.push(y), f;
2519
+ }, h = {
2520
+ hover: ":hover",
2521
+ focus: ":focus",
2522
+ active: ":active",
2523
+ visited: ":visited",
2524
+ disabled: ":disabled",
2525
+ checked: ":checked",
2526
+ first: ":first-child",
2527
+ last: ":last-child",
2528
+ odd: ":nth-child(odd)",
2529
+ even: ":nth-child(even)",
2530
+ "focus-within": ":focus-within",
2531
+ "focus-visible": ":focus-visible"
2532
+ }, b = (u, f = !1) => {
2533
+ const y = p(u);
2534
+ let x = "", l = !1;
2535
+ for (const _ of y) {
2536
+ let L = _;
2537
+ if (L.startsWith("!") && (l = !0, L = L.slice(1)), Me[L] || Ie(L) || He(L) || Ne(L) || je(L)) {
2538
+ x = _;
2539
+ break;
2540
+ }
2541
+ }
2542
+ if (!x) return null;
2543
+ const d = x.replace(/^!/, ""), w = Me[d] ?? Ie(d) ?? He(d) ?? Ne(d) ?? Ye(d) ?? je(d);
2544
+ if (!w) return null;
2545
+ const k = y.indexOf(x);
2546
+ let C = k >= 0 ? y.slice(0, k) : [];
2547
+ f && (C = C.filter((_) => _ !== "dark"));
2548
+ const m = `.${Zt(u)}`, $ = l ? w.replace(/;/g, " !important;") : w, S = "__SUBJECT__";
2549
+ let v = S;
2550
+ const A = [];
2551
+ for (const _ of C)
2552
+ _.startsWith("group-") ? (v = `.group:${_.slice(6)} ${v}`, A.push(_)) : _.startsWith("peer-") && (v = v.replace(
2553
+ S,
2554
+ `.peer:${_.slice(5)}~${S}`
2555
+ ), A.push(_));
2556
+ C = C.filter((_) => !A.includes(_));
2557
+ const j = [], N = [];
2558
+ let E = null;
2559
+ for (const _ of C) {
2560
+ if (_ === "dark" || We.includes(_) || _.startsWith("@") && (De.includes(_.slice(1)) || _.match(/^@\[.+\]$/)))
2561
+ continue;
2562
+ const L = Jt(_);
2563
+ if (L) {
2564
+ E = L;
2364
2565
  continue;
2365
2566
  }
2366
- const I = f(_);
2367
- if (I) {
2368
- V ? B.push(I) : P.push(I);
2567
+ const M = h[_];
2568
+ if (M) {
2569
+ E ? N.push(M) : j.push(M);
2369
2570
  continue;
2370
2571
  }
2371
- const N = Bt[_];
2372
- typeof N == "function" && (R = N(R, T).split("{")[0]);
2572
+ const T = Bt[_];
2573
+ typeof T == "function" && (v = T(v, $).split("{")[0]);
2373
2574
  }
2374
- function we(_, U) {
2375
- if (!U) return _;
2376
- let I = 0, N = 0;
2575
+ const O = j.join(""), H = N.join("");
2576
+ function he(_, L) {
2577
+ if (!L) return _;
2578
+ let M = 0, T = 0;
2377
2579
  if (_.length && (_[0] === ">" || _[0] === "+" || _[0] === "~" || _[0] === " ")) {
2378
- let O = 1;
2379
- for (; O < _.length && _[O] === " "; ) O++;
2380
- for (; O < _.length; O++) {
2381
- const D = _[O];
2382
- if (D === "[" ? I++ : D === "]" && I > 0 ? I-- : D === "(" ? N++ : D === ")" && N > 0 && N--, I === 0 && N === 0 && (_[O] === ">" || _[O] === "+" || _[O] === "~" || _[O] === " "))
2383
- return _.slice(0, O) + U + _.slice(O);
2580
+ let P = 1;
2581
+ for (; P < _.length && _[P] === " "; ) P++;
2582
+ for (; P < _.length; P++) {
2583
+ const z = _[P];
2584
+ if (z === "[" ? M++ : z === "]" && M > 0 ? M-- : z === "(" ? T++ : z === ")" && T > 0 && T--, M === 0 && T === 0 && (_[P] === ">" || _[P] === "+" || _[P] === "~" || _[P] === " "))
2585
+ return _.slice(0, P) + L + _.slice(P);
2384
2586
  }
2385
- return _ + U;
2587
+ return _ + L;
2386
2588
  }
2387
- for (let O = 0; O < _.length; O++) {
2388
- const D = _[O];
2389
- if (D === "[" ? I++ : D === "]" && I > 0 ? I-- : D === "(" ? N++ : D === ")" && N > 0 && N--, I === 0 && N === 0 && (D === ">" || D === "+" || D === "~" || D === " "))
2390
- return _.slice(0, O) + U + _.slice(O);
2589
+ for (let P = 0; P < _.length; P++) {
2590
+ const z = _[P];
2591
+ if (z === "[" ? M++ : z === "]" && M > 0 ? M-- : z === "(" ? T++ : z === ")" && T > 0 && T--, M === 0 && T === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
2592
+ return _.slice(0, P) + L + _.slice(P);
2391
2593
  }
2392
- return _ + U;
2393
- }
2394
- const K = P.join(""), L = B.join("");
2395
- if (V)
2396
- if (V.includes("&")) {
2397
- const _ = V.indexOf("&"), U = V.slice(0, _), I = V.slice(_ + 1), N = E + K, O = R;
2398
- if (P.length === 0)
2399
- R = O.replace(E, U + N + L + I);
2594
+ return _ + L;
2595
+ }
2596
+ if (E)
2597
+ if (E.includes("&")) {
2598
+ const _ = E.indexOf("&"), L = E.slice(0, _), M = E.slice(_ + 1), T = S + O;
2599
+ if (j.length === 0)
2600
+ v = v.replace(
2601
+ S,
2602
+ L + T + H + M
2603
+ );
2400
2604
  else {
2401
- const D = we(I, L);
2402
- R = O.replace(E, U + N + D);
2605
+ const P = he(M, H);
2606
+ v = v.replace(
2607
+ S,
2608
+ L + T + P
2609
+ );
2403
2610
  }
2404
2611
  } else
2405
- R = R.replace(E, `${V}${E + K}`), L && (R = R.replace(E, `${E}${L}`));
2612
+ v = v.replace(
2613
+ S,
2614
+ `${E}${S + O}`
2615
+ ), H && (v = v.replace(S, `${S}${H}`));
2406
2616
  else
2407
- R = E + K + L;
2408
- R = R.replace(new RegExp(E, "g"), C);
2409
- let M = `${R}{${T}}`;
2410
- const J = A.filter((_) => je.includes(_)), Z = J.length ? J[J.length - 1] : null, z = A.includes("dark");
2411
- return a && Z ? M = `@media (prefers-color-scheme: dark) and ${Me[Z]}{${M}}` : a ? 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;
2412
- }
2413
- for (const w of i) {
2414
- const a = p(w), l = a.find(
2415
- (d) => Le[d] || We(d) || ze(d) || Ne(d) || Se(d)
2617
+ v = v.replace(
2618
+ S,
2619
+ S + O + H
2620
+ );
2621
+ v = v.replace(new RegExp(S, "g"), m);
2622
+ let G = `${v}{${$}}`;
2623
+ const K = C.filter(
2624
+ (_) => We.includes(_)
2625
+ ), I = C.filter(
2626
+ (_) => _.startsWith("@") && (De.includes(_.slice(1)) || _.match(/^@\[.+\]$/))
2627
+ ), V = K.length ? K[K.length - 1] : null, U = I.length ? I[I.length - 1] : null, ne = C.includes("dark");
2628
+ let R = "", X = "";
2629
+ if (ne && V ? R = `@media (prefers-color-scheme: dark) and ${Xe[V]}` : ne ? R = "@media (prefers-color-scheme: dark)" : V && (R = `@media ${Xe[V]}`), U)
2630
+ if (U.startsWith("@[") && U.endsWith("]")) {
2631
+ const _ = U.slice(2, -1);
2632
+ if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(_))
2633
+ return null;
2634
+ X = `@container (min-width:${_})`;
2635
+ } else {
2636
+ const _ = U.slice(1);
2637
+ X = `@container ${Ut[_] || `(min-width:${_})`}`;
2638
+ }
2639
+ return R && X ? G = `${R}${X}{${G}}` : R ? G = `${R}{${G}}` : X && (G = `${X}{${G}}`), G;
2640
+ };
2641
+ for (const u of i) {
2642
+ const f = p(u), y = f.find(
2643
+ (k) => Me[k.replace(/^!/, "")] || Ie(k.replace(/^!/, "")) || He(k.replace(/^!/, "")) || Ne(k.replace(/^!/, "")) || Ye(k.replace(/^!/, "")) || je(k.replace(/^!/, ""))
2416
2644
  );
2417
- if (!l) continue;
2418
- const y = a.indexOf(l), $ = y >= 0 ? a.slice(0, y) : [], k = b($);
2419
- if (k === 4) {
2420
- const d = g(w, !0);
2421
- d && u.push(d);
2422
- } else {
2423
- const d = g(w);
2424
- d && (k === 1 ? s.push(d) : k === 2 ? o.push(d) : k === 3 && c.push(d));
2425
- }
2426
- }
2427
- const v = [...s, ...o, ...c, ...u].join("");
2428
- return Xe.set(e, { css: v, timestamp: t }), v;
2645
+ if (!y) continue;
2646
+ const x = f.indexOf(y), l = x >= 0 ? f.slice(0, x) : [], d = a(l), w = c(u);
2647
+ w && s[d].push(w);
2648
+ }
2649
+ const g = s.flat().join("");
2650
+ return ge.size >= et && Array.from(ge.keys()).slice(
2651
+ 0,
2652
+ Math.floor(et / 2)
2653
+ ).forEach((f) => ge.delete(f)), ge.set(e, { css: g, timestamp: t }), g;
2429
2654
  }
2430
- const ge = [];
2431
- function Gt(e, t, r, n, i, s, o, c) {
2655
+ const be = [];
2656
+ function Yt(e, t, r, n, i, s, o, c) {
2432
2657
  if (e) {
2433
- ge.push(r);
2658
+ be.push(r);
2434
2659
  try {
2435
- const u = t.render(r);
2436
- if (u instanceof Promise) {
2437
- s(!0), u.then((m) => {
2438
- s(!1), o(null), Ye(e, m, r, n, i), c(e.innerHTML);
2439
- }).catch((m) => {
2440
- s(!1), o(m);
2660
+ const a = t.render(r);
2661
+ if (a instanceof Promise) {
2662
+ s(!0), a.then((p) => {
2663
+ s(!1), o(null), tt(e, p, r, n, i), c(e.innerHTML);
2664
+ }).catch((p) => {
2665
+ s(!1), o(p);
2441
2666
  });
2442
2667
  return;
2443
2668
  }
2444
- Ye(e, u, r, n, i), c(e.innerHTML);
2669
+ tt(e, a, r, n, i), c(e.innerHTML);
2445
2670
  } finally {
2446
- ge.pop();
2671
+ be.pop();
2447
2672
  }
2448
2673
  }
2449
2674
  }
2450
- function Ye(e, t, r, n, i) {
2451
- e && (Ot(
2675
+ function tt(e, t, r, n, i) {
2676
+ e && (Mt(
2452
2677
  e,
2453
2678
  Array.isArray(t) ? t : [t],
2454
2679
  r,
2455
2680
  n
2456
2681
  ), i(e.innerHTML));
2457
2682
  }
2458
- function Xt(e, t, r, n, i, s, o) {
2683
+ function er(e, t, r, n, i, s, o) {
2459
2684
  if (s !== null && clearTimeout(s), Date.now() - t < 16) {
2460
2685
  if (i(r + 1), r === 15)
2461
2686
  console.warn(
@@ -2477,41 +2702,41 @@ Stopping runaway component render to prevent browser freeze`
2477
2702
  }
2478
2703
  } else
2479
2704
  i(0);
2480
- const m = setTimeout(() => {
2705
+ const p = setTimeout(() => {
2481
2706
  n(Date.now()), e(), o(null);
2482
2707
  }, r > 10 ? 100 : 0);
2483
- o(m);
2708
+ o(p);
2484
2709
  }
2485
- function Yt(e, t, r, n, i) {
2710
+ function tr(e, t, r, n, i) {
2486
2711
  if (!e) return;
2487
- const s = Zt(r);
2712
+ const s = Qt(r);
2488
2713
  if ((!s || s.trim() === "") && !t._computedStyle) {
2489
- i(null), e.adoptedStyleSheets = [Je()];
2714
+ i(null), e.adoptedStyleSheets = [Ze()];
2490
2715
  return;
2491
2716
  }
2492
2717
  let o = "";
2493
2718
  t._computedStyle && (o = t._computedStyle);
2494
- let c = Lt(`${o}
2719
+ let c = Dt(`${o}
2495
2720
  ${s}
2496
2721
  `);
2497
- c = ct(c);
2498
- let u = n;
2499
- u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== c) && u.replaceSync(c), e.adoptedStyleSheets = [Je(), u], i(u);
2722
+ c = ft(c);
2723
+ let a = n;
2724
+ a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Ze(), a], i(a);
2500
2725
  }
2501
- let W = null;
2502
- function Qt(e) {
2503
- W = e;
2726
+ let D = null;
2727
+ function rr(e) {
2728
+ D = e;
2504
2729
  }
2505
- function er() {
2506
- W = null;
2730
+ function nr() {
2731
+ D = null;
2507
2732
  }
2508
- function gr() {
2509
- if (!W)
2733
+ function br() {
2734
+ if (!D)
2510
2735
  throw new Error("useEmit must be called during component render");
2511
- const e = W.emit;
2736
+ const e = D.emit;
2512
2737
  return (t, r) => e(t, r);
2513
2738
  }
2514
- function ye(e) {
2739
+ function xe(e) {
2515
2740
  e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
2516
2741
  value: {},
2517
2742
  writable: !0,
@@ -2519,40 +2744,40 @@ function ye(e) {
2519
2744
  configurable: !1
2520
2745
  });
2521
2746
  }
2522
- function mr(e) {
2523
- if (!W)
2747
+ function wr(e) {
2748
+ if (!D)
2524
2749
  throw new Error("useOnConnected must be called during component render");
2525
- ye(W), W._hookCallbacks.onConnected = e;
2750
+ xe(D), D._hookCallbacks.onConnected = e;
2526
2751
  }
2527
- function yr(e) {
2528
- if (!W)
2752
+ function xr(e) {
2753
+ if (!D)
2529
2754
  throw new Error("useOnDisconnected must be called during component render");
2530
- ye(W), W._hookCallbacks.onDisconnected = e;
2755
+ xe(D), D._hookCallbacks.onDisconnected = e;
2531
2756
  }
2532
- function br(e) {
2533
- if (!W)
2757
+ function vr(e) {
2758
+ if (!D)
2534
2759
  throw new Error("useOnAttributeChanged must be called during component render");
2535
- ye(W), W._hookCallbacks.onAttributeChanged = e;
2760
+ xe(D), D._hookCallbacks.onAttributeChanged = e;
2536
2761
  }
2537
- function wr(e) {
2538
- if (!W)
2762
+ function $r(e) {
2763
+ if (!D)
2539
2764
  throw new Error("useOnError must be called during component render");
2540
- ye(W), W._hookCallbacks.onError = e;
2765
+ xe(D), D._hookCallbacks.onError = e;
2541
2766
  }
2542
- function vr(e) {
2543
- if (!W)
2767
+ function kr(e) {
2768
+ if (!D)
2544
2769
  throw new Error("useStyle must be called during component render");
2545
- ye(W);
2770
+ xe(D);
2546
2771
  try {
2547
2772
  const t = e();
2548
- Object.defineProperty(W, "_computedStyle", {
2773
+ Object.defineProperty(D, "_computedStyle", {
2549
2774
  value: t,
2550
2775
  writable: !0,
2551
2776
  enumerable: !1,
2552
2777
  configurable: !0
2553
2778
  });
2554
2779
  } catch (t) {
2555
- console.warn("Error in useStyle callback:", t), Object.defineProperty(W, "_computedStyle", {
2780
+ console.warn("Error in useStyle callback:", t), Object.defineProperty(D, "_computedStyle", {
2556
2781
  value: "",
2557
2782
  writable: !0,
2558
2783
  enumerable: !1,
@@ -2560,12 +2785,12 @@ function vr(e) {
2560
2785
  });
2561
2786
  }
2562
2787
  }
2563
- const Te = /* @__PURE__ */ new Map(), Qe = Symbol.for("cer.registry");
2788
+ const Te = /* @__PURE__ */ new Map(), rt = Symbol.for("cer.registry");
2564
2789
  if (typeof window < "u") {
2565
2790
  const e = globalThis;
2566
- e[Qe] || (e[Qe] = Te);
2791
+ e[rt] || (e[rt] = Te);
2567
2792
  }
2568
- function tr(e, t) {
2793
+ function ir(e, t) {
2569
2794
  if (!t.render)
2570
2795
  throw new Error("Component must have a render function");
2571
2796
  return typeof window > "u" ? class {
@@ -2670,14 +2895,14 @@ function tr(e, t) {
2670
2895
  }
2671
2896
  connectedCallback() {
2672
2897
  this._runLogicWithinErrorBoundary(t, () => {
2673
- this._applyProps(t), this._requestRender(), vt(t, this.context, this._mounted, (r) => {
2898
+ this._applyProps(t), this._requestRender(), Ct(t, this.context, this._mounted, (r) => {
2674
2899
  this._mounted = r;
2675
2900
  });
2676
2901
  });
2677
2902
  }
2678
2903
  disconnectedCallback() {
2679
2904
  this._runLogicWithinErrorBoundary(t, () => {
2680
- xt(
2905
+ _t(
2681
2906
  t,
2682
2907
  this.context,
2683
2908
  this._listeners,
@@ -2701,7 +2926,7 @@ function tr(e, t) {
2701
2926
  }
2702
2927
  attributeChangedCallback(r, n, i) {
2703
2928
  this._runLogicWithinErrorBoundary(t, () => {
2704
- this._applyProps(t), n !== i && this._requestRender(), $t(t, r, n, i, this.context);
2929
+ this._applyProps(t), n !== i && this._requestRender(), Et(t, r, n, i, this.context);
2705
2930
  });
2706
2931
  }
2707
2932
  static get observedAttributes() {
@@ -2712,7 +2937,7 @@ function tr(e, t) {
2712
2937
  // --- Render ---
2713
2938
  _render(r) {
2714
2939
  this._runLogicWithinErrorBoundary(r, () => {
2715
- Gt(
2940
+ Yt(
2716
2941
  this.shadowRoot,
2717
2942
  r,
2718
2943
  this.context,
@@ -2735,8 +2960,8 @@ function tr(e, t) {
2735
2960
  }
2736
2961
  _requestRender() {
2737
2962
  this._runLogicWithinErrorBoundary(this._cfg, () => {
2738
- ue(() => {
2739
- Xt(
2963
+ fe(() => {
2964
+ er(
2740
2965
  () => this._render(this._cfg),
2741
2966
  this._lastRenderTime,
2742
2967
  this._renderCount,
@@ -2757,7 +2982,7 @@ function tr(e, t) {
2757
2982
  // --- Style ---
2758
2983
  _applyStyle(r, n) {
2759
2984
  this._runLogicWithinErrorBoundary(r, () => {
2760
- Yt(
2985
+ tr(
2761
2986
  this.shadowRoot,
2762
2987
  this.context,
2763
2988
  n,
@@ -2782,9 +3007,9 @@ function tr(e, t) {
2782
3007
  try {
2783
3008
  let n = function(s, o = "") {
2784
3009
  return Array.isArray(s) ? new Proxy(s, {
2785
- get(c, u, m) {
2786
- const g = Reflect.get(c, u, m);
2787
- return typeof g == "function" && typeof u == "string" && [
3010
+ get(c, a, p) {
3011
+ const h = Reflect.get(c, a, p);
3012
+ return typeof h == "function" && typeof a == "string" && [
2788
3013
  "push",
2789
3014
  "pop",
2790
3015
  "shift",
@@ -2792,42 +3017,42 @@ function tr(e, t) {
2792
3017
  "splice",
2793
3018
  "sort",
2794
3019
  "reverse"
2795
- ].includes(u) ? function(...p) {
2796
- const f = g.apply(c, p);
3020
+ ].includes(a) ? function(...g) {
3021
+ const u = h.apply(c, g);
2797
3022
  if (!i._initializing) {
2798
- const h = o || "root";
2799
- i._triggerWatchers(h, c), ue(
3023
+ const f = o || "root";
3024
+ i._triggerWatchers(f, c), fe(
2800
3025
  () => i._render(r),
2801
3026
  i._componentId
2802
3027
  );
2803
3028
  }
2804
- return f;
2805
- } : g;
3029
+ return u;
3030
+ } : h;
2806
3031
  },
2807
- set(c, u, m) {
2808
- if (c[u] = m, !i._initializing) {
2809
- const g = o ? `${o}.${String(u)}` : String(u);
2810
- i._triggerWatchers(g, m), ue(() => i._render(r), i._componentId);
3032
+ set(c, a, p) {
3033
+ if (c[a] = p, !i._initializing) {
3034
+ const h = o ? `${o}.${String(a)}` : String(a);
3035
+ i._triggerWatchers(h, p), fe(() => i._render(r), i._componentId);
2811
3036
  }
2812
3037
  return !0;
2813
3038
  },
2814
- deleteProperty(c, u) {
2815
- if (delete c[u], !i._initializing) {
2816
- const m = o ? `${o}.${String(u)}` : String(u);
2817
- i._triggerWatchers(m, void 0), ue(() => i._render(r), i._componentId);
3039
+ deleteProperty(c, a) {
3040
+ if (delete c[a], !i._initializing) {
3041
+ const p = o ? `${o}.${String(a)}` : String(a);
3042
+ i._triggerWatchers(p, void 0), fe(() => i._render(r), i._componentId);
2818
3043
  }
2819
3044
  return !0;
2820
3045
  }
2821
3046
  }) : s && typeof s == "object" ? s.constructor && s.constructor.name === "ReactiveState" ? s : (Object.keys(s).forEach((c) => {
2822
- const u = o ? `${o}.${c}` : c;
2823
- s[c] = n(s[c], u);
3047
+ const a = o ? `${o}.${c}` : c;
3048
+ s[c] = n(s[c], a);
2824
3049
  }), new Proxy(s, {
2825
- set(c, u, m) {
2826
- const g = o ? `${o}.${String(u)}` : String(u);
2827
- return c[u] = n(m, g), i._initializing || (i._triggerWatchers(g, c[u]), ue(() => i._render(r), i._componentId)), !0;
3050
+ set(c, a, p) {
3051
+ const h = o ? `${o}.${String(a)}` : String(a);
3052
+ return c[a] = n(p, h), i._initializing || (i._triggerWatchers(h, c[a]), fe(() => i._render(r), i._componentId)), !0;
2828
3053
  },
2829
- get(c, u, m) {
2830
- return Reflect.get(c, u, m);
3054
+ get(c, a, p) {
3055
+ return Reflect.get(c, a, p);
2831
3056
  }
2832
3057
  })) : s;
2833
3058
  };
@@ -2848,7 +3073,7 @@ function tr(e, t) {
2848
3073
  }
2849
3074
  _initWatchers(r) {
2850
3075
  this._runLogicWithinErrorBoundary(r, () => {
2851
- mt(
3076
+ xt(
2852
3077
  this.context,
2853
3078
  this._watchers,
2854
3079
  {}
@@ -2857,12 +3082,12 @@ function tr(e, t) {
2857
3082
  });
2858
3083
  }
2859
3084
  _triggerWatchers(r, n) {
2860
- yt(this.context, this._watchers, r, n);
3085
+ vt(this.context, this._watchers, r, n);
2861
3086
  }
2862
3087
  _applyProps(r) {
2863
3088
  this._runLogicWithinErrorBoundary(r, () => {
2864
3089
  try {
2865
- wt(this, r, this.context);
3090
+ kt(this, r, this.context);
2866
3091
  } catch (n) {
2867
3092
  this._hasError = !0, r.onError && r.onError(n, this.context);
2868
3093
  }
@@ -2870,7 +3095,7 @@ function tr(e, t) {
2870
3095
  }
2871
3096
  };
2872
3097
  }
2873
- function et(e, t) {
3098
+ function nt(e, t) {
2874
3099
  let r = re(e);
2875
3100
  r.includes("-") || (r = `cer-${r}`);
2876
3101
  let n = {};
@@ -2878,153 +3103,153 @@ function et(e, t) {
2878
3103
  try {
2879
3104
  const o = t.toString();
2880
3105
  let c = null;
2881
- const u = o.indexOf("({");
2882
- if (u !== -1) {
2883
- let m = 0, g = !1, b = null, p = !1, f = -1;
2884
- for (let h = u + 2; h < o.length; h++) {
2885
- const v = o[h];
2886
- if (p) {
2887
- p = !1;
3106
+ const a = o.indexOf("({");
3107
+ if (a !== -1) {
3108
+ let p = 0, h = !1, b = null, g = !1, u = -1;
3109
+ for (let f = a + 2; f < o.length; f++) {
3110
+ const y = o[f];
3111
+ if (g) {
3112
+ g = !1;
2888
3113
  continue;
2889
3114
  }
2890
- if (v === "\\") {
2891
- p = !0;
3115
+ if (y === "\\") {
3116
+ g = !0;
2892
3117
  continue;
2893
3118
  }
2894
- if (!g && (v === '"' || v === "'" || v === "`")) {
2895
- g = !0, b = v;
3119
+ if (!h && (y === '"' || y === "'" || y === "`")) {
3120
+ h = !0, b = y;
2896
3121
  continue;
2897
3122
  }
2898
- if (g && v === b) {
2899
- g = !1, b = null;
3123
+ if (h && y === b) {
3124
+ h = !1, b = null;
2900
3125
  continue;
2901
3126
  }
2902
- if (!g) {
2903
- if (v === "{")
2904
- m++;
2905
- else if (v === "}") {
2906
- if (m === 0) {
2907
- f = h;
3127
+ if (!h) {
3128
+ if (y === "{")
3129
+ p++;
3130
+ else if (y === "}") {
3131
+ if (p === 0) {
3132
+ u = f;
2908
3133
  break;
2909
3134
  }
2910
- m--;
3135
+ p--;
2911
3136
  }
2912
3137
  }
2913
3138
  }
2914
- if (f !== -1) {
2915
- const h = o.substring(u, f + 2), v = o.substring(u + 2, f).trim();
2916
- c = [h, v];
3139
+ if (u !== -1) {
3140
+ const f = o.substring(a, u + 2), y = o.substring(a + 2, u).trim();
3141
+ c = [f, y];
2917
3142
  }
2918
3143
  }
2919
3144
  if (c) {
2920
- const m = c[1];
2921
- let g = "", b = "", p = !0, f = 0, h = null, v = !1, w = 0;
2922
- for (; w < m.length; ) {
2923
- const a = m[w];
2924
- if (v) {
2925
- p ? g += a : b += a, v = !1, w++;
3145
+ const p = c[1];
3146
+ let h = "", b = "", g = !0, u = 0, f = null, y = !1, x = 0;
3147
+ for (; x < p.length; ) {
3148
+ const l = p[x];
3149
+ if (y) {
3150
+ g ? h += l : b += l, y = !1, x++;
2926
3151
  continue;
2927
3152
  }
2928
- if (a === "\\") {
2929
- v = !0, p ? g += a : b += a, w++;
3153
+ if (l === "\\") {
3154
+ y = !0, g ? h += l : b += l, x++;
2930
3155
  continue;
2931
3156
  }
2932
- if ((a === '"' || a === "'" || a === "`") && !h) {
2933
- h = a, p ? g += a : b += a, w++;
3157
+ if ((l === '"' || l === "'" || l === "`") && !f) {
3158
+ f = l, g ? h += l : b += l, x++;
2934
3159
  continue;
2935
3160
  }
2936
- if (a === h) {
2937
- h = null, p ? g += a : b += a, w++;
3161
+ if (l === f) {
3162
+ f = null, g ? h += l : b += l, x++;
2938
3163
  continue;
2939
3164
  }
2940
- if (h) {
2941
- p ? g += a : b += a, w++;
3165
+ if (f) {
3166
+ g ? h += l : b += l, x++;
2942
3167
  continue;
2943
3168
  }
2944
- if (a === "{" || a === "[") {
2945
- f++, p ? g += a : b += a, w++;
3169
+ if (l === "{" || l === "[") {
3170
+ u++, g ? h += l : b += l, x++;
2946
3171
  continue;
2947
3172
  }
2948
- if (a === "}" || a === "]") {
2949
- f--, p ? g += a : b += a, w++;
3173
+ if (l === "}" || l === "]") {
3174
+ u--, g ? h += l : b += l, x++;
2950
3175
  continue;
2951
3176
  }
2952
- if (a === "=" && f === 0 && p) {
2953
- p = !1, w++;
3177
+ if (l === "=" && u === 0 && g) {
3178
+ g = !1, x++;
2954
3179
  continue;
2955
3180
  }
2956
- if (a === "," && f === 0) {
2957
- if (g.trim() && b.trim()) {
2958
- const l = g.trim(), y = b.trim();
3181
+ if (l === "," && u === 0) {
3182
+ if (h.trim() && b.trim()) {
3183
+ const d = h.trim(), w = b.trim();
2959
3184
  try {
2960
- if (y === "true") n[l] = !0;
2961
- else if (y === "false") n[l] = !1;
2962
- else if (y === "[]") n[l] = [];
2963
- else if (y === "{}") n[l] = {};
2964
- else if (/^\d+$/.test(y))
2965
- n[l] = parseInt(y);
2966
- else if (/^'.*'$/s.test(y))
2967
- n[l] = y.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
2968
- else if (/^".*"$/s.test(y))
2969
- n[l] = y.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
2970
- else if (/^`.*`$/s.test(y)) {
2971
- const $ = y.slice(1, -1);
2972
- if ($.includes("${"))
3185
+ if (w === "true") n[d] = !0;
3186
+ else if (w === "false") n[d] = !1;
3187
+ else if (w === "[]") n[d] = [];
3188
+ else if (w === "{}") n[d] = {};
3189
+ else if (/^\d+$/.test(w))
3190
+ n[d] = parseInt(w);
3191
+ else if (/^'.*'$/s.test(w))
3192
+ n[d] = w.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3193
+ else if (/^".*"$/s.test(w))
3194
+ n[d] = w.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3195
+ else if (/^`.*`$/s.test(w)) {
3196
+ const k = w.slice(1, -1);
3197
+ if (k.includes("${"))
2973
3198
  try {
2974
- n[l] = new Function(
2975
- `return \`${$}\`;`
3199
+ n[d] = new Function(
3200
+ `return \`${k}\`;`
2976
3201
  )();
2977
3202
  } catch {
2978
- n[l] = $;
3203
+ n[d] = k;
2979
3204
  }
2980
3205
  else
2981
- n[l] = $;
3206
+ n[d] = k;
2982
3207
  } else
2983
- n[l] = y;
3208
+ n[d] = w;
2984
3209
  } catch {
2985
- n[l] = "";
3210
+ n[d] = "";
2986
3211
  }
2987
- } else if (g.trim()) {
2988
- const l = g.split(":")[0].trim();
2989
- l && !l.includes("}") && (n[l] = "");
3212
+ } else if (h.trim()) {
3213
+ const d = h.split(":")[0].trim();
3214
+ d && !d.includes("}") && (n[d] = "");
2990
3215
  }
2991
- g = "", b = "", p = !0, w++;
3216
+ h = "", b = "", g = !0, x++;
2992
3217
  continue;
2993
3218
  }
2994
- p ? g += a : b += a, w++;
3219
+ g ? h += l : b += l, x++;
2995
3220
  }
2996
- if (g.trim() && b.trim()) {
2997
- const a = g.trim(), l = b.trim();
3221
+ if (h.trim() && b.trim()) {
3222
+ const l = h.trim(), d = b.trim();
2998
3223
  try {
2999
- if (l === "true") n[a] = !0;
3000
- else if (l === "false") n[a] = !1;
3001
- else if (l === "[]") n[a] = [];
3002
- else if (l === "{}") n[a] = {};
3003
- else if (/^\d+$/.test(l)) n[a] = parseInt(l);
3004
- else if (/^'.*'$/s.test(l))
3005
- n[a] = l.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3006
- else if (/^".*"$/s.test(l))
3007
- n[a] = l.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3008
- else if (/^`.*`$/s.test(l)) {
3009
- const y = l.slice(1, -1);
3010
- if (y.includes("${"))
3224
+ if (d === "true") n[l] = !0;
3225
+ else if (d === "false") n[l] = !1;
3226
+ else if (d === "[]") n[l] = [];
3227
+ else if (d === "{}") n[l] = {};
3228
+ else if (/^\d+$/.test(d)) n[l] = parseInt(d);
3229
+ else if (/^'.*'$/s.test(d))
3230
+ n[l] = d.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
3231
+ else if (/^".*"$/s.test(d))
3232
+ n[l] = d.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
3233
+ else if (/^`.*`$/s.test(d)) {
3234
+ const w = d.slice(1, -1);
3235
+ if (w.includes("${"))
3011
3236
  try {
3012
- n[a] = new Function(
3013
- `return \`${y}\`;`
3237
+ n[l] = new Function(
3238
+ `return \`${w}\`;`
3014
3239
  )();
3015
3240
  } catch {
3016
- n[a] = y;
3241
+ n[l] = w;
3017
3242
  }
3018
3243
  else
3019
- n[a] = y;
3244
+ n[l] = w;
3020
3245
  } else
3021
- n[a] = l;
3246
+ n[l] = d;
3022
3247
  } catch {
3023
- n[a] = "";
3248
+ n[l] = "";
3024
3249
  }
3025
- } else if (g.trim()) {
3026
- const a = g.split(":")[0].trim();
3027
- a && !a.includes("}") && (n[a] = "");
3250
+ } else if (h.trim()) {
3251
+ const l = h.split(":")[0].trim();
3252
+ l && !l.includes("}") && (n[l] = "");
3028
3253
  }
3029
3254
  }
3030
3255
  } catch {
@@ -3042,8 +3267,8 @@ function et(e, t) {
3042
3267
  onDisconnected: (o) => {
3043
3268
  i.onDisconnected && i.onDisconnected();
3044
3269
  },
3045
- onAttributeChanged: (o, c, u, m) => {
3046
- i.onAttributeChanged && i.onAttributeChanged(o, c, u);
3270
+ onAttributeChanged: (o, c, a, p) => {
3271
+ i.onAttributeChanged && i.onAttributeChanged(o, c, a);
3047
3272
  },
3048
3273
  onError: (o, c) => {
3049
3274
  i.onError && o && i.onError(o);
@@ -3054,33 +3279,33 @@ function et(e, t) {
3054
3279
  o.requestRender && o.requestRender();
3055
3280
  });
3056
3281
  try {
3057
- Qt(o);
3058
- const u = Object.keys(n).length > 0;
3059
- let m;
3060
- if (u) {
3061
- const g = {};
3282
+ rr(o);
3283
+ const a = Object.keys(n).length > 0;
3284
+ let p;
3285
+ if (a) {
3286
+ const h = {};
3062
3287
  Object.keys(n).forEach((b) => {
3063
- const p = o[b], f = n[b];
3064
- g[b] = p != null && p !== "" ? p : f;
3065
- }), m = t(g);
3288
+ const g = o[b], u = n[b];
3289
+ h[b] = g != null && g !== "" ? g : u;
3290
+ }), p = t(h);
3066
3291
  } else
3067
- m = t();
3292
+ p = t();
3068
3293
  if (o._hookCallbacks) {
3069
- const g = o._hookCallbacks;
3070
- 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);
3294
+ const h = o._hookCallbacks;
3295
+ h.onConnected && (i.onConnected = h.onConnected), h.onDisconnected && (i.onDisconnected = h.onDisconnected), h.onAttributeChanged && (i.onAttributeChanged = h.onAttributeChanged), h.onError && (i.onError = h.onError), h.style && (o._styleCallback = h.style);
3071
3296
  }
3072
- return m;
3297
+ return p;
3073
3298
  } finally {
3074
- er(), F.clearCurrentComponent();
3299
+ nr(), F.clearCurrentComponent();
3075
3300
  }
3076
3301
  }
3077
3302
  };
3078
3303
  Te.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
3079
3304
  r,
3080
- tr(r, s)
3305
+ ir(r, s)
3081
3306
  ));
3082
3307
  }
3083
- class rr {
3308
+ class sr {
3084
3309
  map = /* @__PURE__ */ new Map();
3085
3310
  maxSize;
3086
3311
  constructor(t) {
@@ -3104,8 +3329,8 @@ class rr {
3104
3329
  this.map.clear();
3105
3330
  }
3106
3331
  }
3107
- const Ie = new rr(500);
3108
- function nr(e, t) {
3332
+ const ze = new sr(500);
3333
+ function or(e, t) {
3109
3334
  if (e == null) {
3110
3335
  console.warn(
3111
3336
  `⚠️ Event handler for '@${t}' is ${e}. This will prevent the event from working. Use a function reference instead: @${t}="\${functionName}"`
@@ -3118,117 +3343,117 @@ function nr(e, t) {
3118
3343
  `💡 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()}"`
3119
3344
  );
3120
3345
  }
3121
- function he(e, t = {}, r, n) {
3346
+ function me(e, t = {}, r, n) {
3122
3347
  const i = n ?? t.key;
3123
3348
  return { tag: e, key: i, props: t, children: r };
3124
3349
  }
3125
- function Ae(e) {
3350
+ function Oe(e) {
3126
3351
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
3127
3352
  }
3128
- function Ce(e) {
3129
- return typeof e == "object" && e !== null && "tag" in e && !Ae(e);
3353
+ function Ee(e) {
3354
+ return typeof e == "object" && e !== null && "tag" in e && !Oe(e);
3130
3355
  }
3131
- function ir(e, t) {
3356
+ function ar(e, t) {
3132
3357
  return e.key != null ? e : { ...e, key: t };
3133
3358
  }
3134
- function sr(e, t = [], r = {}) {
3359
+ function cr(e, t = [], r = {}) {
3135
3360
  const n = {}, i = {}, s = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
3136
- let u;
3137
- for (; u = c.exec(e); ) {
3138
- const m = u[1], g = u[2], b = (u[4] || u[6]) ?? "", p = b.match(/^{{(\d+)}}$/);
3139
- let f = p ? t[Number(p[1])] ?? null : b;
3140
- p || (f === "true" ? f = !0 : f === "false" ? f = !1 : f === "null" ? f = null : isNaN(Number(f)) || (f = Number(f)));
3141
- const h = ["model", "bind", "show", "class", "style", "ref"];
3142
- if (m === ":") {
3143
- const [v, w] = g.split(":"), [a, ...l] = v.split(".");
3144
- if (h.includes(a)) {
3145
- const y = [...l], $ = a === "model" && w ? `model:${w}` : a;
3146
- s[$] = {
3147
- value: f,
3148
- modifiers: y,
3149
- arg: w
3361
+ let a;
3362
+ for (; a = c.exec(e); ) {
3363
+ const p = a[1], h = a[2], b = (a[4] || a[6]) ?? "", g = b.match(/^{{(\d+)}}$/);
3364
+ let u = g ? t[Number(g[1])] ?? null : b;
3365
+ g || (u === "true" ? u = !0 : u === "false" ? u = !1 : u === "null" ? u = null : isNaN(Number(u)) || (u = Number(u)));
3366
+ const f = ["model", "bind", "show", "class", "style", "ref"];
3367
+ if (p === ":") {
3368
+ const [y, x] = h.split(":"), [l, ...d] = y.split(".");
3369
+ if (f.includes(l)) {
3370
+ const w = [...d], k = l === "model" && x ? `model:${x}` : l;
3371
+ s[k] = {
3372
+ value: u,
3373
+ modifiers: w,
3374
+ arg: x
3150
3375
  };
3151
3376
  } else {
3152
- let y = f;
3153
- y && ee(y) && (y = y.value), i[g] = y, o.push(g);
3377
+ let w = u;
3378
+ w && ee(w) && (w = w.value), i[h] = w, o.push(h);
3154
3379
  }
3155
- } else if (m === "@") {
3156
- const [v, ...w] = g.split("."), a = w;
3157
- nr(f, v);
3158
- const l = typeof f == "function" ? f : typeof r[f] == "function" ? r[f] : void 0;
3159
- if (l) {
3160
- const y = (k) => {
3161
- if (a.includes("prevent") && k.preventDefault(), a.includes("stop") && k.stopPropagation(), !(a.includes("self") && k.target !== k.currentTarget))
3162
- return a.includes("once") && k.currentTarget?.removeEventListener(v, y), l(k);
3163
- }, $ = "on" + v.charAt(0).toUpperCase() + v.slice(1);
3164
- n[$] = y;
3380
+ } else if (p === "@") {
3381
+ const [y, ...x] = h.split("."), l = x;
3382
+ or(u, y);
3383
+ const d = typeof u == "function" ? u : typeof r[u] == "function" ? r[u] : void 0;
3384
+ if (d) {
3385
+ const w = (C) => {
3386
+ if (l.includes("prevent") && C.preventDefault(), l.includes("stop") && C.stopPropagation(), !(l.includes("self") && C.target !== C.currentTarget))
3387
+ return l.includes("once") && C.currentTarget?.removeEventListener(y, w), d(C);
3388
+ }, k = "on" + y.charAt(0).toUpperCase() + y.slice(1);
3389
+ n[k] = w;
3165
3390
  }
3166
- } else g === "ref" ? n.ref = f : i[g] = f;
3391
+ } else h === "ref" ? n.ref = u : i[h] = u;
3167
3392
  }
3168
3393
  return { props: n, attrs: i, directives: s, bound: o };
3169
3394
  }
3170
- function or(e, t, r) {
3171
- 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;
3395
+ function lr(e, t, r) {
3396
+ const n = be.length > 0 ? be[be.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
3172
3397
  if (s && o) {
3173
- const d = Ie.get(o);
3174
- if (d) return d;
3175
- }
3176
- function c(d, x) {
3177
- return he("#text", {}, d, x);
3178
- }
3179
- let u = "";
3180
- for (let d = 0; d < e.length; d++)
3181
- u += e[d], d < t.length && (u += `{{${d}}}`);
3182
- const m = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, g = [];
3183
- let b, p = [], f = null, h = {}, v, w = 0, a = [];
3184
- function l(d) {
3185
- !d || typeof d != "object" || Ae(d) || (d.props || d.attrs ? (d.props && (h.props || (h.props = {}), Object.assign(h.props, d.props)), d.attrs && (h.attrs || (h.attrs = {}), Object.keys(d.attrs).forEach((x) => {
3186
- if (x === "style" && h.attrs.style) {
3187
- const A = h.attrs.style.replace(
3398
+ const m = ze.get(o);
3399
+ if (m) return m;
3400
+ }
3401
+ function c(m, $) {
3402
+ return me("#text", {}, m, $);
3403
+ }
3404
+ let a = "";
3405
+ for (let m = 0; m < e.length; m++)
3406
+ a += e[m], m < t.length && (a += `{{${m}}}`);
3407
+ const p = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, h = [];
3408
+ let b, g = [], u = null, f = {}, y, x = 0, l = [];
3409
+ function d(m) {
3410
+ !m || typeof m != "object" || Oe(m) || (m.props || m.attrs ? (m.props && (f.props || (f.props = {}), Object.assign(f.props, m.props)), m.attrs && (f.attrs || (f.attrs = {}), Object.keys(m.attrs).forEach(($) => {
3411
+ if ($ === "style" && f.attrs.style) {
3412
+ const S = f.attrs.style.replace(
3188
3413
  /;?\s*$/,
3189
3414
  ""
3190
- ), C = d.attrs.style.replace(/^;?\s*/, "");
3191
- h.attrs.style = A + "; " + C;
3192
- } else if (x === "class" && h.attrs.class) {
3193
- const A = h.attrs.class.trim().split(/\s+/).filter(Boolean), C = d.attrs.class.trim().split(/\s+/).filter(Boolean), E = [
3194
- .../* @__PURE__ */ new Set([...A, ...C])
3415
+ ), v = m.attrs.style.replace(/^;?\s*/, "");
3416
+ f.attrs.style = S + "; " + v;
3417
+ } else if ($ === "class" && f.attrs.class) {
3418
+ const S = f.attrs.class.trim().split(/\s+/).filter(Boolean), v = m.attrs.class.trim().split(/\s+/).filter(Boolean), A = [
3419
+ .../* @__PURE__ */ new Set([...S, ...v])
3195
3420
  ];
3196
- h.attrs.class = E.join(" ");
3421
+ f.attrs.class = A.join(" ");
3197
3422
  } else
3198
- h.attrs[x] = d.attrs[x];
3199
- }))) : (h.props || (h.props = {}), Object.assign(h.props, d)));
3200
- }
3201
- function y(d, x) {
3202
- const A = f ? p : a;
3203
- if (Ae(d)) {
3204
- const C = d.key ?? x;
3205
- let E = d.children;
3206
- A.push({
3207
- ...d,
3208
- key: C,
3209
- children: E
3423
+ f.attrs[$] = m.attrs[$];
3424
+ }))) : (f.props || (f.props = {}), Object.assign(f.props, m)));
3425
+ }
3426
+ function w(m, $) {
3427
+ const S = u ? g : l;
3428
+ if (Oe(m)) {
3429
+ const v = m.key ?? $;
3430
+ let A = m.children;
3431
+ S.push({
3432
+ ...m,
3433
+ key: v,
3434
+ children: A
3210
3435
  });
3211
3436
  return;
3212
3437
  }
3213
- if (Ce(d)) {
3214
- A.push(ir(d, void 0));
3438
+ if (Ee(m)) {
3439
+ S.push(ar(m, void 0));
3215
3440
  return;
3216
3441
  }
3217
- if (Array.isArray(d)) {
3218
- if (d.length === 0) return;
3219
- for (let C = 0; C < d.length; C++) {
3220
- const E = d[C];
3221
- Ae(E) || Ce(E) || Array.isArray(E) ? y(E, `${x}-${C}`) : E !== null && typeof E == "object" ? l(E) : A.push(c(String(E), `${x}-${C}`));
3442
+ if (Array.isArray(m)) {
3443
+ if (m.length === 0) return;
3444
+ for (let v = 0; v < m.length; v++) {
3445
+ const A = m[v];
3446
+ Oe(A) || Ee(A) || Array.isArray(A) ? w(A, `${$}-${v}`) : A !== null && typeof A == "object" ? d(A) : S.push(c(String(A), `${$}-${v}`));
3222
3447
  }
3223
3448
  return;
3224
3449
  }
3225
- if (d !== null && typeof d == "object") {
3226
- l(d);
3450
+ if (m !== null && typeof m == "object") {
3451
+ d(m);
3227
3452
  return;
3228
3453
  }
3229
- A.push(c(String(d), x));
3454
+ S.push(c(String(m), $));
3230
3455
  }
3231
- const $ = /* @__PURE__ */ new Set([
3456
+ const k = /* @__PURE__ */ new Set([
3232
3457
  "area",
3233
3458
  "base",
3234
3459
  "br",
@@ -3244,24 +3469,24 @@ function or(e, t, r) {
3244
3469
  "track",
3245
3470
  "wbr"
3246
3471
  ]);
3247
- for (; b = m.exec(u); )
3472
+ for (; b = p.exec(a); )
3248
3473
  if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
3249
3474
  if (b[1]) {
3250
- const d = b[1], x = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || $.has(d), {
3251
- props: C,
3252
- attrs: E,
3253
- directives: T,
3254
- bound: R
3255
- } = sr(b[2] || "", t, i), S = { props: {}, attrs: {} };
3256
- for (const P in C) S.props[P] = C[P];
3257
- for (const P in E) S.attrs[P] = E[P];
3258
- if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
3475
+ const m = b[1], $ = b[0][1] === "/", S = b[0][b[0].length - 2] === "/" || k.has(m), {
3476
+ props: v,
3477
+ attrs: A,
3478
+ directives: j,
3479
+ bound: N
3480
+ } = cr(b[2] || "", t, i), E = { props: {}, attrs: {} };
3481
+ for (const O in v) E.props[O] = v[O];
3482
+ for (const O in A) E.attrs[O] = A[O];
3483
+ if (E.attrs && Object.prototype.hasOwnProperty.call(E.attrs, "key") && !(E.props && Object.prototype.hasOwnProperty.call(E.props, "key")))
3259
3484
  try {
3260
- S.props.key = S.attrs.key;
3485
+ E.props.key = E.attrs.key;
3261
3486
  } catch {
3262
3487
  }
3263
3488
  try {
3264
- const P = {
3489
+ const O = {
3265
3490
  input: ["value", "checked", "disabled", "readonly", "required", "placeholder", "maxlength", "minlength"],
3266
3491
  textarea: ["value", "disabled", "readonly", "required", "placeholder", "maxlength", "minlength"],
3267
3492
  select: ["value", "disabled", "required", "multiple"],
@@ -3270,111 +3495,111 @@ function or(e, t, r) {
3270
3495
  audio: ["muted", "autoplay", "controls", "loop"],
3271
3496
  img: ["src", "alt", "width", "height"],
3272
3497
  button: ["type", "name", "value", "disabled", "autofocus", "form"]
3273
- }, B = d.toLowerCase(), V = P[B] ?? [];
3274
- if (S.attrs) {
3275
- for (const K of V)
3276
- if (R && R.includes(K) && K in S.attrs && !(S.props && K in S.props)) {
3277
- let L = S.attrs[K];
3278
- L && ee(L) && (L = L.value), S.props[K] = L, delete S.attrs[K];
3498
+ }, H = m.toLowerCase(), he = O[H] ?? [];
3499
+ if (E.attrs) {
3500
+ for (const K of he)
3501
+ if (N && N.includes(K) && K in E.attrs && !(E.props && K in E.props)) {
3502
+ let I = E.attrs[K];
3503
+ I && ee(I) && (I = I.value), E.props[K] = I, delete E.attrs[K];
3279
3504
  }
3280
3505
  }
3281
- if ((d.includes("-") || !!i?.__customElements?.has?.(d)) && (S.isCustomElement = !0, R && S.attrs)) {
3506
+ if ((m.includes("-") || !!i?.__customElements?.has?.(m)) && (E.isCustomElement = !0, N && E.attrs)) {
3282
3507
  const K = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3283
- for (const L of R)
3284
- if (L in S.attrs && !(S.props && L in S.props)) {
3285
- const M = L.includes("-") ? L.split("-").map((Z, z) => z === 0 ? Z : Z.charAt(0).toUpperCase() + Z.slice(1)).join("") : L;
3286
- let J = S.attrs[L];
3287
- J && ee(J) && (J = J.value), S.props[M] = J, K.has(L) || delete S.attrs[L];
3508
+ for (const I of N)
3509
+ if (I in E.attrs && !(E.props && I in E.props)) {
3510
+ const V = I.includes("-") ? I.split("-").map((ne, R) => R === 0 ? ne : ne.charAt(0).toUpperCase() + ne.slice(1)).join("") : I;
3511
+ let U = E.attrs[I];
3512
+ U && ee(U) && (U = U.value), E.props[V] = U, K.has(I) || delete E.attrs[I];
3288
3513
  }
3289
3514
  }
3290
3515
  } catch {
3291
3516
  }
3292
- if (T && Object.keys(T).some((P) => P === "model" || P.startsWith("model:")))
3517
+ if (j && Object.keys(j).some((O) => O === "model" || O.startsWith("model:")))
3293
3518
  try {
3294
- const P = Symbol.for("cer.registry"), B = globalThis[P], V = !!(B && typeof B.has == "function" && B.has(d)), we = !!(i && (i.__customElements instanceof Set && i.__customElements.has(d) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(d)));
3295
- if (!!(d.includes("-") || we || V))
3296
- for (const M of Object.keys(T)) {
3297
- if (M !== "model" && !M.startsWith("model:")) continue;
3298
- const J = T[M], Z = J.arg ?? (M.includes(":") ? M.split(":", 2)[1] : void 0), z = J.value, _ = Z ?? "modelValue", U = H, I = _e, N = i ? i._state || i : void 0;
3299
- let O;
3300
- typeof z == "string" && i ? O = U(N, z) : (O = z, O && ee(O) && (O = O.value)), S.props[_] = O;
3519
+ const O = Symbol.for("cer.registry"), H = globalThis[O], he = !!(H && typeof H.has == "function" && H.has(m)), G = !!(i && (i.__customElements instanceof Set && i.__customElements.has(m) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(m)));
3520
+ if (!!(m.includes("-") || G || he))
3521
+ for (const V of Object.keys(j)) {
3522
+ if (V !== "model" && !V.startsWith("model:")) continue;
3523
+ const U = j[V], ne = U.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), R = U.value, X = ne ?? "modelValue", _ = B, L = Se, M = i ? i._state || i : void 0;
3524
+ let T;
3525
+ typeof R == "string" && i ? T = _(M, R) : (T = R, T && ee(T) && (T = T.value)), E.props[X] = T;
3301
3526
  try {
3302
- const ne = re(_);
3303
- S.attrs || (S.attrs = {}), O !== void 0 && (S.attrs[ne] = O);
3527
+ const ie = re(X);
3528
+ E.attrs || (E.attrs = {}), T !== void 0 && (E.attrs[ie] = T);
3304
3529
  } catch {
3305
3530
  }
3306
- S.isCustomElement = !0;
3307
- const qe = `update:${re(_)}`.replace(/-([a-z])/g, (ne, Y) => Y.toUpperCase()), ut = "on" + qe.charAt(0).toUpperCase() + qe.slice(1);
3308
- S.props[ut] = function(ne) {
3309
- const Y = ne.detail !== void 0 ? ne.detail : ne.target ? ne.target.value : void 0;
3310
- if (N)
3311
- if (z && ee(z)) {
3312
- const oe = z.value;
3313
- (Array.isArray(Y) && Array.isArray(oe) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...oe].sort()) : Y !== oe) && (z.value = Y, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3531
+ E.isCustomElement = !0;
3532
+ const z = `update:${re(X)}`.replace(/-([a-z])/g, (ie, Q) => Q.toUpperCase()), pt = "on" + z.charAt(0).toUpperCase() + z.slice(1);
3533
+ E.props[pt] = function(ie) {
3534
+ const Q = ie.detail !== void 0 ? ie.detail : ie.target ? ie.target.value : void 0;
3535
+ if (M)
3536
+ if (R && ee(R)) {
3537
+ const ae = R.value;
3538
+ (Array.isArray(Q) && Array.isArray(ae) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ae].sort()) : Q !== ae) && (R.value = Q, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3314
3539
  } else {
3315
- const oe = U(N, typeof z == "string" ? z : String(z));
3316
- (Array.isArray(Y) && Array.isArray(oe) ? JSON.stringify([...Y].sort()) !== JSON.stringify([...oe].sort()) : Y !== oe) && (I(N, typeof z == "string" ? z : String(z), Y), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3540
+ const ae = _(M, typeof R == "string" ? R : String(R));
3541
+ (Array.isArray(Q) && Array.isArray(ae) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ae].sort()) : Q !== ae) && (L(M, typeof R == "string" ? R : String(R), Q), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
3317
3542
  }
3318
- }, delete T[M];
3543
+ }, delete j[V];
3319
3544
  }
3320
3545
  } catch {
3321
3546
  }
3322
- if (Object.keys(T).length > 0 && (S.directives = { ...T }), x) {
3323
- const P = he(
3547
+ if (Object.keys(j).length > 0 && (E.directives = { ...j }), $) {
3548
+ const O = me(
3549
+ u,
3324
3550
  f,
3325
- h,
3326
- p.length === 1 && Ce(p[0]) && p[0].tag === "#text" ? typeof p[0].children == "string" ? p[0].children : "" : p.length ? p : void 0,
3327
- v
3328
- ), B = g.pop();
3329
- B ? (f = B.tag, h = B.props, v = B.key, p = B.children, p.push(P)) : (a.push(P), f = null, h = {}, v = void 0, p = []);
3330
- } else A ? f ? p.push(he(d, S, void 0, void 0)) : a.push(he(d, S, void 0, void 0)) : (f && g.push({
3331
- tag: f,
3332
- props: h,
3333
- children: p,
3334
- key: v
3335
- }), f = d, h = S, p = []);
3551
+ g.length === 1 && Ee(g[0]) && g[0].tag === "#text" ? typeof g[0].children == "string" ? g[0].children : "" : g.length ? g : void 0,
3552
+ y
3553
+ ), H = h.pop();
3554
+ H ? (u = H.tag, f = H.props, y = H.key, g = H.children, g.push(O)) : (l.push(O), u = null, f = {}, y = void 0, g = []);
3555
+ } else S ? u ? g.push(me(m, E, void 0, void 0)) : l.push(me(m, E, void 0, void 0)) : (u && h.push({
3556
+ tag: u,
3557
+ props: f,
3558
+ children: g,
3559
+ key: y
3560
+ }), u = m, f = E, g = []);
3336
3561
  } else if (typeof b[3] < "u") {
3337
- const d = Number(b[3]), x = t[d], A = `interp-${d}`;
3338
- y(x, A);
3562
+ const m = Number(b[3]), $ = t[m], S = `interp-${m}`;
3563
+ w($, S);
3339
3564
  } else if (b[4]) {
3340
- const d = b[4], x = f ? p : a, A = d.split(/({{\d+}})/);
3341
- for (const C of A) {
3342
- if (!C) continue;
3343
- const E = C.match(/^{{(\d+)}}$/);
3344
- if (E) {
3345
- const T = Number(E[1]), R = t[T], S = `interp-${T}`;
3346
- y(R, S);
3565
+ const m = b[4], $ = u ? g : l, S = m.split(/({{\d+}})/);
3566
+ for (const v of S) {
3567
+ if (!v) continue;
3568
+ const A = v.match(/^{{(\d+)}}$/);
3569
+ if (A) {
3570
+ const j = Number(A[1]), N = t[j], E = `interp-${j}`;
3571
+ w(N, E);
3347
3572
  } else {
3348
- const T = `text-${w++}`;
3349
- x.push(c(C, T));
3573
+ const j = `text-${x++}`;
3574
+ $.push(c(v, j));
3350
3575
  }
3351
3576
  }
3352
3577
  }
3353
3578
  }
3354
- const k = a.filter((d) => Ce(d) && d.tag === "#text" ? typeof d.children == "string" && d.children.trim() !== "" : !0);
3355
- if (k.length === 1) {
3356
- const d = k[0];
3357
- return s && o && Ie.set(o, d), d;
3358
- } else if (k.length > 1) {
3359
- const d = k;
3360
- return s && o && Ie.set(o, d), d;
3361
- }
3362
- return he("div", {}, "", "fallback-root");
3579
+ const C = l.filter((m) => Ee(m) && m.tag === "#text" ? typeof m.children == "string" && m.children.trim() !== "" : !0);
3580
+ if (C.length === 1) {
3581
+ const m = C[0];
3582
+ return s && o && ze.set(o, m), m;
3583
+ } else if (C.length > 1) {
3584
+ const m = C;
3585
+ return s && o && ze.set(o, m), m;
3586
+ }
3587
+ return me("div", {}, "", "fallback-root");
3363
3588
  }
3364
- function ae(e, ...t) {
3589
+ function ce(e, ...t) {
3365
3590
  const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
3366
- return or(e, t, n);
3591
+ return lr(e, t, n);
3367
3592
  }
3368
3593
  function Re(e, t) {
3369
- return j(e ? t : [], "when-block");
3594
+ return W(e ? t : [], "when-block");
3370
3595
  }
3371
- function xr(e, t) {
3596
+ function Cr(e, t) {
3372
3597
  return e.map((r, n) => {
3373
3598
  const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
3374
- return j(t(r, n), `each-${i}`);
3599
+ return W(t(r, n), `each-${i}`);
3375
3600
  });
3376
3601
  }
3377
- function ar() {
3602
+ function ur() {
3378
3603
  const e = [];
3379
3604
  return {
3380
3605
  when(t, r) {
@@ -3384,18 +3609,18 @@ function ar() {
3384
3609
  return e.push([!0, t]), this;
3385
3610
  },
3386
3611
  done() {
3387
- return cr(...e);
3612
+ return fr(...e);
3388
3613
  }
3389
3614
  };
3390
3615
  }
3391
- function cr(...e) {
3616
+ function fr(...e) {
3392
3617
  for (let t = 0; t < e.length; t++) {
3393
3618
  const [r, n] = e[t];
3394
- if (r) return [j(n, `whenChain-branch-${t}`)];
3619
+ if (r) return [W(n, `whenChain-branch-${t}`)];
3395
3620
  }
3396
- return [j([], "whenChain-empty")];
3621
+ return [W([], "whenChain-empty")];
3397
3622
  }
3398
- function j(e, t) {
3623
+ function W(e, t) {
3399
3624
  const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
3400
3625
  return {
3401
3626
  tag: "#anchor",
@@ -3403,49 +3628,49 @@ function j(e, t) {
3403
3628
  children: r
3404
3629
  };
3405
3630
  }
3406
- function $r(e, t) {
3631
+ function _r(e, t) {
3407
3632
  return Re(!e, t);
3408
3633
  }
3409
- function kr(e, t) {
3634
+ function Er(e, t) {
3410
3635
  const r = !e || e.length === 0;
3411
3636
  return Re(r, t);
3412
3637
  }
3413
- function Cr(e, t) {
3638
+ function Sr(e, t) {
3414
3639
  const r = !!(e && e.length > 0);
3415
3640
  return Re(r, t);
3416
3641
  }
3417
- function _r(e, t, r) {
3642
+ function Ar(e, t, r) {
3418
3643
  const n = [];
3419
3644
  return e.forEach((i, s) => {
3420
3645
  t(i, s) && n.push({ item: i, originalIndex: s });
3421
3646
  }), n.map(({ item: i, originalIndex: s }, o) => {
3422
3647
  const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
3423
- return j(r(i, s, o), `each-where-${c}`);
3648
+ return W(r(i, s, o), `each-where-${c}`);
3424
3649
  });
3425
3650
  }
3426
- function Er(e, t) {
3651
+ function jr(e, t) {
3427
3652
  const r = e?.length ?? 0;
3428
- 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");
3653
+ return r === 0 && t.empty ? W(t.empty, "switch-length-empty") : r === 1 && t.one ? W(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? W(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? W(t.many(e), "switch-length-many") : W([], "switch-length-fallback");
3429
3654
  }
3430
- function Sr(e, t, r) {
3655
+ function Or(e, t, r) {
3431
3656
  const n = /* @__PURE__ */ new Map();
3432
3657
  return e.forEach((i) => {
3433
3658
  const s = t(i);
3434
3659
  n.has(s) || n.set(s, []), n.get(s).push(i);
3435
- }), Array.from(n.entries()).map(([i, s], o) => j(
3660
+ }), Array.from(n.entries()).map(([i, s], o) => W(
3436
3661
  r(i, s, o),
3437
3662
  `each-group-${i}`
3438
3663
  ));
3439
3664
  }
3440
- function Ar(e, t, r, n) {
3665
+ function Tr(e, t, r, n) {
3441
3666
  const i = r * t, s = Math.min(i + t, e.length);
3442
- return e.slice(i, s).map((c, u) => {
3443
- const m = i + u, g = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${m}` : `page-${m}`;
3444
- return j(n(c, m, u), `each-page-${g}`);
3667
+ return e.slice(i, s).map((c, a) => {
3668
+ const p = i + a, h = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${p}` : `page-${p}`;
3669
+ return W(n(c, p, a), `each-page-${h}`);
3445
3670
  });
3446
3671
  }
3447
- function Tr(e, t) {
3448
- 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");
3672
+ function Rr(e, t) {
3673
+ return e.loading && t.loading ? W(t.loading, "promise-loading") : e.error && t.error ? W(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? W(t.success(e.data), "promise-success") : t.idle ? W(t.idle, "promise-idle") : W([], "promise-fallback");
3449
3674
  }
3450
3675
  function q(e, t) {
3451
3676
  const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
@@ -3460,7 +3685,7 @@ const te = {
3460
3685
  "2xl": "(min-width:1536px)",
3461
3686
  // Dark mode (matching style.ts)
3462
3687
  dark: "(prefers-color-scheme: dark)"
3463
- }, lt = ["sm", "md", "lg", "xl", "2xl"], lr = {
3688
+ }, ht = ["sm", "md", "lg", "xl", "2xl"], dr = {
3464
3689
  // Breakpoint-based rendering (matching style.ts exactly)
3465
3690
  sm: (e) => q(te.sm, e),
3466
3691
  md: (e) => q(te.md, e),
@@ -3479,24 +3704,24 @@ const te = {
3479
3704
  portrait: (e) => q("(orientation: portrait)", e),
3480
3705
  landscape: (e) => q("(orientation: landscape)", e)
3481
3706
  };
3482
- function Rr(e, t) {
3707
+ function Lr(e, t) {
3483
3708
  const r = [];
3484
3709
  e.includes("dark") ? r.push(te.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
3485
3710
  const n = e.filter(
3486
- (o) => lt.includes(o)
3711
+ (o) => ht.includes(o)
3487
3712
  ), i = n[n.length - 1];
3488
3713
  i && i in te && r.push(te[i]);
3489
3714
  const s = r.length > 0 ? r.join(" and ") : "all";
3490
3715
  return q(s, t);
3491
3716
  }
3492
- function Or(e) {
3717
+ function Pr(e) {
3493
3718
  const t = [];
3494
- return e.base && t.push(j(e.base, "responsive-base")), lt.forEach((r) => {
3719
+ return e.base && t.push(W(e.base, "responsive-base")), ht.forEach((r) => {
3495
3720
  const n = e[r];
3496
- n && t.push(lr[r](n));
3721
+ n && t.push(dr[r](n));
3497
3722
  }), t;
3498
3723
  }
3499
- function Pr(e) {
3724
+ function Mr(e) {
3500
3725
  const t = [];
3501
3726
  let r = null;
3502
3727
  return {
@@ -3514,13 +3739,13 @@ function Pr(e) {
3514
3739
  for (let n = 0; n < t.length; n++) {
3515
3740
  const { condition: i, content: s } = t[n];
3516
3741
  if (i(e))
3517
- return j(s, `switch-case-${n}`);
3742
+ return W(s, `switch-case-${n}`);
3518
3743
  }
3519
- return j(r || [], "switch-otherwise");
3744
+ return W(r || [], "switch-otherwise");
3520
3745
  }
3521
3746
  };
3522
3747
  }
3523
- class fe extends EventTarget {
3748
+ class de extends EventTarget {
3524
3749
  handlers = {};
3525
3750
  static instance;
3526
3751
  eventCounters = /* @__PURE__ */ new Map();
@@ -3528,7 +3753,7 @@ class fe extends EventTarget {
3528
3753
  * Returns the singleton instance of GlobalEventBus
3529
3754
  */
3530
3755
  static getInstance() {
3531
- return fe.instance || (fe.instance = new fe()), fe.instance;
3756
+ return de.instance || (de.instance = new de()), de.instance;
3532
3757
  }
3533
3758
  /**
3534
3759
  * Emit a global event with optional data. Includes event storm protection.
@@ -3552,7 +3777,7 @@ class fe extends EventTarget {
3552
3777
  try {
3553
3778
  o(r);
3554
3779
  } catch (c) {
3555
- ie(`Error in global event handler for "${t}":`, c);
3780
+ se(`Error in global event handler for "${t}":`, c);
3556
3781
  }
3557
3782
  });
3558
3783
  }
@@ -3641,8 +3866,8 @@ class fe extends EventTarget {
3641
3866
  this.eventCounters.clear();
3642
3867
  }
3643
3868
  }
3644
- const be = fe.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);
3645
- function tt(e) {
3869
+ const ve = de.getInstance(), Wr = (e, t) => ve.emit(e, t), Dr = (e, t) => ve.on(e, t), Ir = (e, t) => ve.off(e, t), Nr = (e, t) => ve.once(e, t), Hr = (e, t, r) => ve.listen(e, t, r);
3870
+ function it(e) {
3646
3871
  let t = { ...e };
3647
3872
  const r = [];
3648
3873
  function n(c) {
@@ -3652,289 +3877,289 @@ function tt(e) {
3652
3877
  return t;
3653
3878
  }
3654
3879
  function s(c) {
3655
- const u = typeof c == "function" ? c(t) : c;
3656
- t = { ...t, ...u }, o();
3880
+ const a = typeof c == "function" ? c(t) : c;
3881
+ t = { ...t, ...a }, o();
3657
3882
  }
3658
3883
  function o() {
3659
3884
  r.forEach((c) => c(t));
3660
3885
  }
3661
3886
  return { subscribe: n, getState: i, setState: s };
3662
3887
  }
3663
- const rt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Q = (e, t) => {
3888
+ const st = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Y = (e, t) => {
3664
3889
  for (const r of e) {
3665
3890
  const n = [], i = r.path.replace(/:[^/]+/g, (c) => (n.push(c.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
3666
3891
  if (o) {
3667
3892
  const c = {};
3668
- return n.forEach((u, m) => {
3669
- c[u] = o[m + 1];
3893
+ return n.forEach((a, p) => {
3894
+ c[a] = o[p + 1];
3670
3895
  }), { route: r, params: c };
3671
3896
  }
3672
3897
  }
3673
3898
  return { route: null, params: {} };
3674
- }, De = {};
3675
- async function ur(e) {
3899
+ }, Be = {};
3900
+ async function hr(e) {
3676
3901
  if (e.component) return e.component;
3677
3902
  if (e.load) {
3678
- if (De[e.path]) return De[e.path];
3903
+ if (Be[e.path]) return Be[e.path];
3679
3904
  try {
3680
3905
  const t = await e.load();
3681
- return De[e.path] = t.default, t.default;
3906
+ return Be[e.path] = t.default, t.default;
3682
3907
  } catch {
3683
3908
  throw new Error(`Failed to load component for route: ${e.path}`);
3684
3909
  }
3685
3910
  }
3686
3911
  throw new Error(`No component or loader defined for route: ${e.path}`);
3687
3912
  }
3688
- function fr(e) {
3913
+ function pr(e) {
3689
3914
  const { routes: t, base: r = "", initialUrl: n } = e;
3690
- let i, s, o, c, u, m, g;
3691
- const b = async (v, w) => {
3692
- const a = t.find((l) => Q([l], v.path).route !== null);
3693
- if (a?.beforeEnter)
3915
+ let i, s, o, c, a, p, h;
3916
+ const b = async (y, x) => {
3917
+ const l = t.find((d) => Y([d], y.path).route !== null);
3918
+ if (l?.beforeEnter)
3694
3919
  try {
3695
- const l = await a.beforeEnter(v, w);
3696
- return typeof l == "string" ? (await h(l, !0), !1) : l !== !1;
3697
- } catch (l) {
3698
- return ie("beforeEnter error", l), !1;
3920
+ const d = await l.beforeEnter(y, x);
3921
+ return typeof d == "string" ? (await f(d, !0), !1) : d !== !1;
3922
+ } catch (d) {
3923
+ return se("beforeEnter error", d), !1;
3699
3924
  }
3700
3925
  return !0;
3701
- }, p = async (v, w) => {
3702
- const a = t.find((l) => Q([l], v.path).route !== null);
3703
- if (a?.onEnter)
3926
+ }, g = async (y, x) => {
3927
+ const l = t.find((d) => Y([d], y.path).route !== null);
3928
+ if (l?.onEnter)
3704
3929
  try {
3705
- const l = await a.onEnter(v, w);
3706
- return typeof l == "string" ? (await h(l, !0), !1) : l !== !1;
3707
- } catch (l) {
3708
- return ie("onEnter error", l), !1;
3930
+ const d = await l.onEnter(y, x);
3931
+ return typeof d == "string" ? (await f(d, !0), !1) : d !== !1;
3932
+ } catch (d) {
3933
+ return se("onEnter error", d), !1;
3709
3934
  }
3710
3935
  return !0;
3711
- }, f = (v, w) => {
3712
- const a = t.find((l) => Q([l], v.path).route !== null);
3713
- if (a?.afterEnter)
3936
+ }, u = (y, x) => {
3937
+ const l = t.find((d) => Y([d], y.path).route !== null);
3938
+ if (l?.afterEnter)
3714
3939
  try {
3715
- a.afterEnter(v, w);
3716
- } catch (l) {
3717
- ie("afterEnter error", l);
3940
+ l.afterEnter(y, x);
3941
+ } catch (d) {
3942
+ se("afterEnter error", d);
3718
3943
  }
3719
- }, h = async (v, w = !1) => {
3944
+ }, f = async (y, x = !1) => {
3720
3945
  try {
3721
- const a = {
3722
- path: v.replace(r, "") || "/",
3946
+ const l = {
3947
+ path: y.replace(r, "") || "/",
3723
3948
  query: {}
3724
- }, l = Q(t, a.path);
3725
- if (!l) throw new Error(`No route found for ${a.path}`);
3726
- const y = o.getState(), $ = {
3727
- path: a.path,
3728
- params: l.params,
3729
- query: a.query
3949
+ }, d = Y(t, l.path);
3950
+ if (!d) throw new Error(`No route found for ${l.path}`);
3951
+ const w = o.getState(), k = {
3952
+ path: l.path,
3953
+ params: d.params,
3954
+ query: l.query
3730
3955
  };
3731
- if (!await b($, y) || !await p($, y)) return;
3732
- typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + v) : window.history.pushState({}, "", r + v)), o.setState($), f($, y);
3733
- } catch (a) {
3734
- ie("Navigation error:", a);
3956
+ if (!await b(k, w) || !await g(k, w)) return;
3957
+ typeof window < "u" && typeof document < "u" && (x ? window.history.replaceState({}, "", r + y) : window.history.pushState({}, "", r + y)), o.setState(k), u(k, w);
3958
+ } catch (l) {
3959
+ se("Navigation error:", l);
3735
3960
  }
3736
3961
  };
3737
3962
  if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
3738
3963
  i = () => {
3739
- const w = new URL(window.location.href), a = w.pathname.replace(r, "") || "/", l = rt(w.search);
3740
- return { path: a, query: l };
3964
+ const x = new URL(window.location.href), l = x.pathname.replace(r, "") || "/", d = st(x.search);
3965
+ return { path: l, query: d };
3741
3966
  }, s = i();
3742
- const v = Q(t, s.path);
3743
- o = tt({
3967
+ const y = Y(t, s.path);
3968
+ o = it({
3744
3969
  path: s.path,
3745
- params: v.params,
3970
+ params: y.params,
3746
3971
  query: s.query
3747
- }), c = async (w = !1) => {
3748
- const a = i();
3749
- await h(a.path, w);
3750
- }, window.addEventListener("popstate", () => c(!0)), u = (w) => h(w, !1), m = (w) => h(w, !0), g = () => window.history.back();
3972
+ }), c = async (x = !1) => {
3973
+ const l = i();
3974
+ await f(l.path, x);
3975
+ }, window.addEventListener("popstate", () => c(!0)), a = (x) => f(x, !1), p = (x) => f(x, !0), h = () => window.history.back();
3751
3976
  } else {
3752
3977
  i = () => {
3753
- const a = new URL(n || "/", "http://localhost"), l = a.pathname.replace(r, "") || "/", y = rt(a.search);
3754
- return { path: l, query: y };
3978
+ const l = new URL(n || "/", "http://localhost"), d = l.pathname.replace(r, "") || "/", w = st(l.search);
3979
+ return { path: d, query: w };
3755
3980
  }, s = i();
3756
- const v = Q(t, s.path);
3757
- o = tt({
3981
+ const y = Y(t, s.path);
3982
+ o = it({
3758
3983
  path: s.path,
3759
- params: v.params,
3984
+ params: y.params,
3760
3985
  query: s.query
3761
3986
  }), c = async () => {
3762
- const a = i();
3763
- await w(a.path);
3987
+ const l = i();
3988
+ await x(l.path);
3764
3989
  };
3765
- const w = async (a) => {
3990
+ const x = async (l) => {
3766
3991
  try {
3767
- const l = {
3768
- path: a.replace(r, "") || "/",
3992
+ const d = {
3993
+ path: l.replace(r, "") || "/",
3769
3994
  query: {}
3770
- }, y = Q(t, l.path);
3771
- if (!y) throw new Error(`No route found for ${l.path}`);
3772
- const $ = o.getState(), k = {
3773
- path: l.path,
3774
- params: y.params,
3775
- query: l.query
3776
- }, d = t.find((x) => Q([x], k.path).route !== null);
3777
- if (d?.beforeEnter)
3995
+ }, w = Y(t, d.path);
3996
+ if (!w) throw new Error(`No route found for ${d.path}`);
3997
+ const k = o.getState(), C = {
3998
+ path: d.path,
3999
+ params: w.params,
4000
+ query: d.query
4001
+ }, m = t.find(($) => Y([$], C.path).route !== null);
4002
+ if (m?.beforeEnter)
3778
4003
  try {
3779
- const x = await d.beforeEnter(k, $);
3780
- if (typeof x == "string") {
3781
- await w(x);
4004
+ const $ = await m.beforeEnter(C, k);
4005
+ if (typeof $ == "string") {
4006
+ await x($);
3782
4007
  return;
3783
4008
  }
3784
- if (x === !1) return;
4009
+ if ($ === !1) return;
3785
4010
  } catch {
3786
4011
  return;
3787
4012
  }
3788
- if (d?.onEnter)
4013
+ if (m?.onEnter)
3789
4014
  try {
3790
- const x = await d.onEnter(k, $);
3791
- if (typeof x == "string") {
3792
- await w(x);
4015
+ const $ = await m.onEnter(C, k);
4016
+ if (typeof $ == "string") {
4017
+ await x($);
3793
4018
  return;
3794
4019
  }
3795
- if (x === !1) return;
4020
+ if ($ === !1) return;
3796
4021
  } catch {
3797
4022
  return;
3798
4023
  }
3799
- if (o.setState(k), d?.afterEnter)
4024
+ if (o.setState(C), m?.afterEnter)
3800
4025
  try {
3801
- d.afterEnter(k, $);
4026
+ m.afterEnter(C, k);
3802
4027
  } catch {
3803
4028
  }
3804
4029
  } catch {
3805
4030
  }
3806
4031
  };
3807
- u = async (a) => w(a), m = async (a) => w(a), g = () => {
4032
+ a = async (l) => x(l), p = async (l) => x(l), h = () => {
3808
4033
  };
3809
4034
  }
3810
4035
  return {
3811
4036
  store: o,
3812
- push: u,
3813
- replace: m,
3814
- back: g,
4037
+ push: a,
4038
+ replace: p,
4039
+ back: h,
3815
4040
  subscribe: o.subscribe,
3816
- matchRoute: (v) => Q(t, v),
4041
+ matchRoute: (y) => Y(t, y),
3817
4042
  getCurrent: () => o.getState(),
3818
- resolveRouteComponent: ur
4043
+ resolveRouteComponent: hr
3819
4044
  };
3820
4045
  }
3821
4046
  function zr(e, t) {
3822
- return Q(e, t);
4047
+ return Y(e, t);
3823
4048
  }
3824
- function Ir(e) {
3825
- const t = fr(e);
3826
- return et("router-view", (r = {}, n = {}) => {
4049
+ function Br(e) {
4050
+ const t = pr(e);
4051
+ return nt("router-view", (r = {}, n = {}) => {
3827
4052
  const { onConnected: i } = n;
3828
4053
  if (i && i(() => {
3829
4054
  t && typeof t.subscribe == "function" && t.subscribe(() => {
3830
4055
  });
3831
- }), !t) return ae`<div>Router not initialized.</div>`;
4056
+ }), !t) return ce`<div>Router not initialized.</div>`;
3832
4057
  const s = t.getCurrent(), { path: o } = s, c = t.matchRoute(o);
3833
- return c.route ? t.resolveRouteComponent(c.route).then((u) => {
3834
- if (typeof u == "string")
3835
- return { tag: u, props: {}, children: [] };
3836
- if (typeof u == "function") {
3837
- const m = u();
3838
- return (m instanceof Promise ? m : Promise.resolve(m)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
4058
+ return c.route ? t.resolveRouteComponent(c.route).then((a) => {
4059
+ if (typeof a == "string")
4060
+ return { tag: a, props: {}, children: [] };
4061
+ if (typeof a == "function") {
4062
+ const p = a();
4063
+ return (p instanceof Promise ? p : Promise.resolve(p)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
3839
4064
  }
3840
- return ae`<div>Invalid route component</div>`;
3841
- }).catch(() => ae`<div>Invalid route component</div>`) : ae`<div>Not found</div>`;
3842
- }), et("router-link", (r = {}, n = {}) => {
4065
+ return ce`<div>Invalid route component</div>`;
4066
+ }).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
4067
+ }), nt("router-link", (r = {}, n = {}) => {
3843
4068
  const {
3844
4069
  to: i = "",
3845
4070
  tag: s = "a",
3846
4071
  replace: o = !1,
3847
4072
  exact: c = !1,
3848
- activeClass: u = "active",
3849
- exactActiveClass: m = "exact-active",
3850
- ariaCurrentValue: g = "page",
4073
+ activeClass: a = "active",
4074
+ exactActiveClass: p = "exact-active",
4075
+ ariaCurrentValue: h = "page",
3851
4076
  disabled: b = !1,
3852
- external: p = !1,
3853
- class: f = ""
3854
- } = r, h = t.getCurrent(), v = h.path === i, w = c ? v : h && typeof h.path == "string" ? h.path.startsWith(i) : !1, a = v ? `aria-current="${g}"` : "", l = (f || "").split(/\s+/).filter(Boolean), y = {};
3855
- for (const C of l) y[C] = !0;
3856
- const $ = {
3857
- ...y,
4077
+ external: g = !1,
4078
+ class: u = ""
4079
+ } = r, f = t.getCurrent(), y = f.path === i, x = c ? y : f && typeof f.path == "string" ? f.path.startsWith(i) : !1, l = y ? `aria-current="${h}"` : "", d = (u || "").split(/\s+/).filter(Boolean), w = {};
4080
+ for (const v of d) w[v] = !0;
4081
+ const k = {
4082
+ ...w,
3858
4083
  // Also include the configurable names (may duplicate the above)
3859
- [u]: w,
3860
- [m]: v
3861
- }, k = s === "button", d = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", x = p && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (C) => {
4084
+ [a]: x,
4085
+ [p]: y
4086
+ }, C = s === "button", m = b ? C ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", $ = g && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", S = (v) => {
3862
4087
  if (b) {
3863
- C.preventDefault();
4088
+ v.preventDefault();
3864
4089
  return;
3865
4090
  }
3866
- p && (s === "a" || !s) || (C.preventDefault(), o ? t.replace(i) : t.push(i));
4091
+ g && (s === "a" || !s) || (v.preventDefault(), o ? t.replace(i) : t.push(i));
3867
4092
  };
3868
- return ae`
3869
- ${ar().when(k, ae`
4093
+ return ce`
4094
+ ${ur().when(C, ce`
3870
4095
  <button
3871
4096
  part="button"
3872
- :class="${$}"
3873
- ${a}
3874
- ${d}
3875
- ${x}
3876
- @click="${A}"
4097
+ :class="${k}"
4098
+ ${l}
4099
+ ${m}
4100
+ ${$}
4101
+ @click="${S}"
3877
4102
  ><slot></slot></button>
3878
- `).otherwise(ae`
4103
+ `).otherwise(ce`
3879
4104
  <a
3880
4105
  part="link"
3881
4106
  href="${i}"
3882
- :class="${$}"
3883
- ${a}
3884
- ${d}
3885
- ${x}
3886
- @click="${A}"
4107
+ :class="${k}"
4108
+ ${l}
4109
+ ${m}
4110
+ ${$}
4111
+ @click="${S}"
3887
4112
  ><slot></slot></a>
3888
4113
  `).done()}
3889
4114
  `;
3890
4115
  }), t;
3891
4116
  }
3892
4117
  export {
3893
- fe as GlobalEventBus,
3894
- j as anchorBlock,
3895
- et as component,
3896
- hr as computed,
3897
- tt as createStore,
3898
- Pt as css,
3899
- xr as each,
3900
- Sr as eachGroup,
3901
- Ar as eachPage,
3902
- _r as eachWhere,
3903
- Lr as emit,
3904
- be as eventBus,
3905
- ae as html,
3906
- Ir as initRouter,
3907
- Nr as listen,
3908
- ar as match,
3909
- Q as matchRoute,
4118
+ de as GlobalEventBus,
4119
+ W as anchorBlock,
4120
+ nt as component,
4121
+ mr as computed,
4122
+ it as createStore,
4123
+ Wt as css,
4124
+ Cr as each,
4125
+ Or as eachGroup,
4126
+ Tr as eachPage,
4127
+ Ar as eachWhere,
4128
+ Wr as emit,
4129
+ ve as eventBus,
4130
+ ce as html,
4131
+ Br as initRouter,
4132
+ Hr as listen,
4133
+ ur as match,
4134
+ Y as matchRoute,
3910
4135
  zr as matchRouteSSR,
3911
4136
  te as mediaVariants,
3912
- jr as off,
3913
- Mr as on,
3914
- Wr as once,
3915
- rt as parseQuery,
3916
- dr as ref,
4137
+ Ir as off,
4138
+ Dr as on,
4139
+ Nr as once,
4140
+ st as parseQuery,
4141
+ gr as ref,
3917
4142
  Pe as renderToString,
3918
- ur as resolveRouteComponent,
3919
- lr as responsive,
3920
- lt as responsiveOrder,
3921
- Or as responsiveSwitch,
3922
- Pr as switchOn,
3923
- Er as switchOnLength,
3924
- Tr as switchOnPromise,
3925
- $r as unless,
3926
- gr as useEmit,
3927
- br as useOnAttributeChanged,
3928
- mr as useOnConnected,
3929
- yr as useOnDisconnected,
3930
- wr as useOnError,
3931
- fr as useRouter,
3932
- vr as useStyle,
3933
- pr as watch,
4143
+ hr as resolveRouteComponent,
4144
+ dr as responsive,
4145
+ ht as responsiveOrder,
4146
+ Pr as responsiveSwitch,
4147
+ Mr as switchOn,
4148
+ jr as switchOnLength,
4149
+ Rr as switchOnPromise,
4150
+ _r as unless,
4151
+ br as useEmit,
4152
+ vr as useOnAttributeChanged,
4153
+ wr as useOnConnected,
4154
+ xr as useOnDisconnected,
4155
+ $r as useOnError,
4156
+ pr as useRouter,
4157
+ kr as useStyle,
4158
+ yr as watch,
3934
4159
  Re as when,
3935
- kr as whenEmpty,
4160
+ Er as whenEmpty,
3936
4161
  q as whenMedia,
3937
- Cr as whenNotEmpty,
3938
- Rr as whenVariants
4162
+ Sr as whenNotEmpty,
4163
+ Lr as whenVariants
3939
4164
  };
3940
4165
  //# sourceMappingURL=custom-elements-runtime.es.js.map