@jasonshimmy/custom-elements-runtime 2.2.0 → 2.2.1

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,21 +1,140 @@
1
- import { anchorBlock as be } from "./custom-elements-runtime.directives.es.js";
2
- function xe(e, ...r) {
1
+ import { anchorBlock as ve } from "./custom-elements-runtime.directives.es.js";
2
+ const we = `/*
3
+ * Custom Elements Variables CSS
4
+ * CSS variables for colors and fonts
5
+ */
6
+
7
+ :root,
8
+ :host {
9
+ /* Font families (match runtime defaults in src/lib/runtime/style.ts) */
10
+ --cer-font-sans:
11
+ ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
12
+ 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
13
+ --cer-font-serif: ui-serif, Georgia, 'Times New Roman', Times, serif;
14
+ --cer-font-mono:
15
+ ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Roboto Mono', 'Courier New',
16
+ monospace;
17
+
18
+ /* Default outline style */
19
+ --cer-outline-style: solid;
20
+
21
+ /* Colors */
22
+ --cer-color-transparent: transparent;
23
+ --cer-color-current: currentColor;
24
+ --cer-color-black: #000000;
25
+ --cer-color-white: #ffffff;
26
+ --cer-color-inherit: inherit;
27
+
28
+ /* neutral */
29
+ --cer-color-neutral-50: #fafafa;
30
+ --cer-color-neutral-100: #f4f4f5;
31
+ --cer-color-neutral-200: #e4e4e7;
32
+ --cer-color-neutral-300: #d4d4d8;
33
+ --cer-color-neutral-400: #9f9fa9;
34
+ --cer-color-neutral-500: #71717b;
35
+ --cer-color-neutral-600: #52525c;
36
+ --cer-color-neutral-700: #3f3f46;
37
+ --cer-color-neutral-800: #27272a;
38
+ --cer-color-neutral-900: #18181b;
39
+ --cer-color-neutral-950: #09090b;
40
+
41
+ /* primary */
42
+ --cer-color-primary-50: #eff6ff;
43
+ --cer-color-primary-100: #dbeafe;
44
+ --cer-color-primary-200: #bfdbfe;
45
+ --cer-color-primary-300: #93c5fd;
46
+ --cer-color-primary-400: #60a5fa;
47
+ --cer-color-primary-500: #3b82f6;
48
+ --cer-color-primary-600: #2563eb;
49
+ --cer-color-primary-700: #1d4ed8;
50
+ --cer-color-primary-800: #1e40af;
51
+ --cer-color-primary-900: #1e3a8a;
52
+ --cer-color-primary-950: #172554;
53
+
54
+ /* secondary */
55
+ --cer-color-secondary-50: #eef2ff;
56
+ --cer-color-secondary-100: #e0e7ff;
57
+ --cer-color-secondary-200: #c7d2fe;
58
+ --cer-color-secondary-300: #a5b4fc;
59
+ --cer-color-secondary-400: #818cf8;
60
+ --cer-color-secondary-500: #6366f1;
61
+ --cer-color-secondary-600: #4f46e5;
62
+ --cer-color-secondary-700: #4338ca;
63
+ --cer-color-secondary-800: #3730a3;
64
+ --cer-color-secondary-900: #312e81;
65
+ --cer-color-secondary-950: #1e1b4b;
66
+
67
+ /* success */
68
+ --cer-color-success-50: #f0fdf4;
69
+ --cer-color-success-100: #dcfce7;
70
+ --cer-color-success-200: #bbf7d0;
71
+ --cer-color-success-300: #86efac;
72
+ --cer-color-success-400: #4ade80;
73
+ --cer-color-success-500: #22c55e;
74
+ --cer-color-success-600: #16a34a;
75
+ --cer-color-success-700: #15803d;
76
+ --cer-color-success-800: #166534;
77
+ --cer-color-success-900: #14532d;
78
+ --cer-color-success-950: #052e16;
79
+
80
+ /* info */
81
+ --cer-color-info-50: #f0f9ff;
82
+ --cer-color-info-100: #e0f2fe;
83
+ --cer-color-info-200: #bae6fd;
84
+ --cer-color-info-300: #7dd3fc;
85
+ --cer-color-info-400: #38bdf8;
86
+ --cer-color-info-500: #0ea5e9;
87
+ --cer-color-info-600: #0284c7;
88
+ --cer-color-info-700: #0369a1;
89
+ --cer-color-info-800: #075985;
90
+ --cer-color-info-900: #0c4a6e;
91
+ --cer-color-info-950: #082f49;
92
+
93
+ /* warning */
94
+ --cer-color-warning-50: #fffbeb;
95
+ --cer-color-warning-100: #fef3c7;
96
+ --cer-color-warning-200: #fde68a;
97
+ --cer-color-warning-300: #fcd34d;
98
+ --cer-color-warning-400: #fbbf24;
99
+ --cer-color-warning-500: #f59e0b;
100
+ --cer-color-warning-600: #d97706;
101
+ --cer-color-warning-700: #b45309;
102
+ --cer-color-warning-800: #92400e;
103
+ --cer-color-warning-900: #78350f;
104
+ --cer-color-warning-950: #451a03;
105
+
106
+ /* error */
107
+ --cer-color-error-50: #fef2f2;
108
+ --cer-color-error-100: #fee2e2;
109
+ --cer-color-error-200: #fecaca;
110
+ --cer-color-error-300: #fca5a5;
111
+ --cer-color-error-400: #f87171;
112
+ --cer-color-error-500: #ef4444;
113
+ --cer-color-error-600: #dc2626;
114
+ --cer-color-error-700: #b91c1c;
115
+ --cer-color-error-800: #991b1b;
116
+ --cer-color-error-900: #7f1d1d;
117
+ --cer-color-error-950: #450a0a;
118
+ }
119
+ `;
120
+ function $e(e, ...r) {
3
121
  let o = "";
4
- for (let i = 0; i < e.length; i++)
5
- o += e[i], i < r.length && (o += r[i]);
122
+ for (let n = 0; n < e.length; n++)
123
+ o += e[n], n < r.length && (o += r[n]);
6
124
  return o;
7
125
  }
8
- function ve(e) {
126
+ function ye(e) {
9
127
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
10
128
  }
11
- let J = null;
12
- function We() {
13
- return J || (J = new CSSStyleSheet(), J.replaceSync(ve(we))), J;
129
+ let X = null;
130
+ function Ie() {
131
+ return X || (X = new CSSStyleSheet(), X.replaceSync(ye(ke))), X;
14
132
  }
15
133
  function De(e) {
16
134
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
17
135
  }
18
- const we = xe`
136
+ const ke = $e`
137
+ ${we}
19
138
  :host,
20
139
  *,
21
140
  ::before,
@@ -132,7 +251,7 @@ const we = xe`
132
251
  [hidden] {
133
252
  display: none;
134
253
  }
135
- `, $e = {
254
+ `, je = {
136
255
  // Existing semantic colors
137
256
  neutral: {
138
257
  50: "#fafafa",
@@ -230,17 +349,17 @@ const we = xe`
230
349
  black: { DEFAULT: "#000000" },
231
350
  transparent: { DEFAULT: "transparent" },
232
351
  current: { DEFAULT: "currentColor" }
233
- }, he = Object.fromEntries(
234
- Object.entries($e).map(([e, r]) => [
352
+ }, be = Object.fromEntries(
353
+ Object.entries(je).map(([e, r]) => [
235
354
  e,
236
355
  Object.fromEntries(
237
- Object.entries(r).map(([o, i]) => [
356
+ Object.entries(r).map(([o, n]) => [
238
357
  o,
239
- `var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${i})`
358
+ `var(--cer-color-${e}${o === "DEFAULT" ? "" : `-${o}`}, ${n})`
240
359
  ])
241
360
  )
242
361
  ])
243
- ), B = "0.25rem", ye = {
362
+ ), I = "0.25rem", Se = {
244
363
  "3xs": 64,
245
364
  "2xs": 72,
246
365
  xs: 80,
@@ -285,7 +404,7 @@ const we = xe`
285
404
  gap: ["gap"],
286
405
  "gap-x": ["column-gap"],
287
406
  "gap-y": ["row-gap"]
288
- }, ke = () => {
407
+ }, Te = () => {
289
408
  const e = {};
290
409
  e["@container"] = "container-type:inline-size;", [
291
410
  "block",
@@ -409,8 +528,8 @@ const we = xe`
409
528
  ["text-7xl", "4.5rem", "1"],
410
529
  ["text-8xl", "6rem", "1"],
411
530
  ["text-9xl", "8rem", "1"]
412
- ].forEach(([t, a, g]) => {
413
- e[t] = `font-size:${a};line-height:var(--cer-line-height,${g});`;
531
+ ].forEach(([t, a, d]) => {
532
+ e[t] = `font-size:${a};line-height:var(--cer-line-height,${d});`;
414
533
  }), [
415
534
  ["tracking-tighter", "-0.05em"],
416
535
  ["tracking-tight", "-0.025em"],
@@ -438,8 +557,8 @@ const we = xe`
438
557
  ].forEach(([t, a]) => {
439
558
  e[t] = `line-height:${a};--cer-line-height:${a};line-height:var(--cer-line-height,${a});`;
440
559
  });
441
- const l = [0, 1, 2, 4, 6, 8];
442
- for (const t of l) {
560
+ const s = [0, 1, 2, 4, 6, 8];
561
+ for (const t of s) {
443
562
  const a = `${t}px`;
444
563
  e[`outline-${t}`] = `outline-style:var(--cer-outline-style);outline-width:${a};`, e[`outline-offset-${t}`] = `outline-offset:${a};`, e[`border-${t}`] = `border-width:${a};`, e[`border-t-${t}`] = `border-top-width:${a};`, e[`border-r-${t}`] = `border-right-width:${a};`, e[`border-b-${t}`] = `border-bottom-width:${a};`, e[`border-l-${t}`] = `border-left-width:${a};`, e[`border-x-${t}`] = `border-left-width:${a};border-right-width:${a};`, e[`border-y-${t}`] = `border-top-width:${a};border-bottom-width:${a};`;
445
564
  }
@@ -480,8 +599,8 @@ const we = xe`
480
599
  full: 9999
481
600
  };
482
601
  for (const [t, a] of Object.entries(u)) {
483
- const g = a === 9999 ? "9999px" : `${a / 16}rem`;
484
- e[`rounded-${t}`] = `border-radius:${g};`, e[`rounded-t-${t}`] = `border-top-left-radius:${g};border-top-right-radius:${g};`, e[`rounded-r-${t}`] = `border-top-right-radius:${g};border-bottom-right-radius:${g};`, e[`rounded-b-${t}`] = `border-bottom-left-radius:${g};border-bottom-right-radius:${g};`, e[`rounded-l-${t}`] = `border-top-left-radius:${g};border-bottom-left-radius:${g};`, e[`rounded-tl-${t}`] = `border-top-left-radius:${g};`, e[`rounded-tr-${t}`] = `border-top-right-radius:${g};`, e[`rounded-br-${t}`] = `border-bottom-right-radius:${g};`, e[`rounded-bl-${t}`] = `border-bottom-left-radius:${g};`;
602
+ const d = a === 9999 ? "9999px" : `${a / 16}rem`;
603
+ e[`rounded-${t}`] = `border-radius:${d};`, e[`rounded-t-${t}`] = `border-top-left-radius:${d};border-top-right-radius:${d};`, e[`rounded-r-${t}`] = `border-top-right-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-b-${t}`] = `border-bottom-left-radius:${d};border-bottom-right-radius:${d};`, e[`rounded-l-${t}`] = `border-top-left-radius:${d};border-bottom-left-radius:${d};`, e[`rounded-tl-${t}`] = `border-top-left-radius:${d};`, e[`rounded-tr-${t}`] = `border-top-right-radius:${d};`, e[`rounded-br-${t}`] = `border-bottom-right-radius:${d};`, e[`rounded-bl-${t}`] = `border-bottom-left-radius:${d};`;
485
604
  }
486
605
  Object.assign(e, {
487
606
  "shadow-none": "--cer-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--cer-shadow-color, #0000);",
@@ -509,7 +628,7 @@ const we = xe`
509
628
  "overflow-y-visible": "overflow-y:visible;",
510
629
  "overflow-y-scroll": "overflow-y:scroll;"
511
630
  });
512
- const j = [
631
+ const m = [
513
632
  "auto",
514
633
  "default",
515
634
  "pointer",
@@ -521,7 +640,7 @@ const we = xe`
521
640
  "grab",
522
641
  "grabbing"
523
642
  ];
524
- for (const t of j) e[`cursor-${t}`] = `cursor:${t};`;
643
+ for (const t of m) e[`cursor-${t}`] = `cursor:${t};`;
525
644
  for (const t of [0, 10, 20, 30, 40, 50]) e[`z-${t}`] = `z-index:${t};`;
526
645
  Object.assign(e, {
527
646
  "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;",
@@ -557,8 +676,8 @@ const we = xe`
557
676
  "mx-auto": "margin-inline:auto;",
558
677
  "my-auto": "margin-block:auto;"
559
678
  });
560
- for (const [t, a] of Object.entries(ye))
561
- e[`max-w-${t}`] = `max-width:calc(${B} * ${a});`, e[`min-w-${t}`] = `min-width:calc(${B} * ${a});`, e[`w-${t}`] = `width:calc(${B} * ${a});`, e[`max-h-${t}`] = `max-height:calc(${B} * ${a});`, e[`min-h-${t}`] = `min-height:calc(${B} * ${a});`, e[`h-${t}`] = `height:calc(${B} * ${a});`;
679
+ for (const [t, a] of Object.entries(Se))
680
+ e[`max-w-${t}`] = `max-width:calc(${I} * ${a});`, e[`min-w-${t}`] = `min-width:calc(${I} * ${a});`, e[`w-${t}`] = `width:calc(${I} * ${a});`, e[`max-h-${t}`] = `max-height:calc(${I} * ${a});`, e[`min-h-${t}`] = `min-height:calc(${I} * ${a});`, e[`h-${t}`] = `height:calc(${I} * ${a});`;
562
681
  Object.assign(e, {
563
682
  transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
564
683
  "transition-none": "transition-property:none;",
@@ -675,33 +794,33 @@ const we = xe`
675
794
  "bg-conic-at-l": "background-image:conic-gradient(from 0deg at left, var(--cer-gradient-stops));",
676
795
  "bg-conic-at-tl": "background-image:conic-gradient(from 0deg at top left, var(--cer-gradient-stops));"
677
796
  }), e;
678
- }, re = ke();
679
- function L(e, r) {
797
+ }, re = Te();
798
+ function M(e, r) {
680
799
  let o = 0;
681
- for (let i = 0; i < e.length; i++) {
682
- const s = e[i];
683
- if (s === "[" || s === "(") o++;
684
- else if ((s === "]" || s === ")") && o > 0) o--;
685
- else if (o === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
686
- return e.slice(0, i) + r + e.slice(i);
800
+ for (let n = 0; n < e.length; n++) {
801
+ const c = e[n];
802
+ if (c === "[" || c === "(") o++;
803
+ else if ((c === "]" || c === ")") && o > 0) o--;
804
+ else if (o === 0 && (c === ">" || c === "+" || c === "~" || c === " "))
805
+ return e.slice(0, n) + r + e.slice(n);
687
806
  }
688
807
  return e + r;
689
808
  }
690
- const je = {
809
+ const Ae = {
691
810
  before: (e, r) => `${e}::before{${r}}`,
692
811
  after: (e, r) => `${e}::after{${r}}`,
693
- hover: (e, r) => `${L(e, ":hover")}{${r}}`,
694
- focus: (e, r) => `${L(e, ":focus")}{${r}}`,
695
- active: (e, r) => `${L(e, ":active")}{${r}}`,
696
- disabled: (e, r) => `${L(e, ":disabled")}{${r}}`,
697
- visited: (e, r) => `${L(e, ":visited")}{${r}}`,
698
- checked: (e, r) => `${L(e, ":checked")}{${r}}`,
699
- first: (e, r) => `${L(e, ":first-child")}{${r}}`,
700
- last: (e, r) => `${L(e, ":last-child")}{${r}}`,
701
- odd: (e, r) => `${L(e, ":nth-child(odd)")}{${r}}`,
702
- even: (e, r) => `${L(e, ":nth-child(even)")}{${r}}`,
703
- "focus-within": (e, r) => `${L(e, ":focus-within")}{${r}}`,
704
- "focus-visible": (e, r) => `${L(e, ":focus-visible")}{${r}}`,
812
+ hover: (e, r) => `${M(e, ":hover")}{${r}}`,
813
+ focus: (e, r) => `${M(e, ":focus")}{${r}}`,
814
+ active: (e, r) => `${M(e, ":active")}{${r}}`,
815
+ disabled: (e, r) => `${M(e, ":disabled")}{${r}}`,
816
+ visited: (e, r) => `${M(e, ":visited")}{${r}}`,
817
+ checked: (e, r) => `${M(e, ":checked")}{${r}}`,
818
+ first: (e, r) => `${M(e, ":first-child")}{${r}}`,
819
+ last: (e, r) => `${M(e, ":last-child")}{${r}}`,
820
+ odd: (e, r) => `${M(e, ":nth-child(odd)")}{${r}}`,
821
+ even: (e, r) => `${M(e, ":nth-child(even)")}{${r}}`,
822
+ "focus-within": (e, r) => `${M(e, ":focus-within")}{${r}}`,
823
+ "focus-visible": (e, r) => `${M(e, ":focus-visible")}{${r}}`,
705
824
  "group-hover": (e, r) => `.group:hover ${e}{${r}}`,
706
825
  "group-focus": (e, r) => `.group:focus ${e}{${r}}`,
707
826
  "group-active": (e, r) => `.group:active ${e}{${r}}`,
@@ -729,7 +848,7 @@ const je = {
729
848
  "5xl": "(min-width:64rem)",
730
849
  "6xl": "(min-width:72rem)",
731
850
  "7xl": "(min-width:80rem)"
732
- }, ie = ["sm", "md", "lg", "xl", "2xl"], ne = [
851
+ }, ne = ["sm", "md", "lg", "xl", "2xl"], ie = [
733
852
  "xs",
734
853
  "sm",
735
854
  "md",
@@ -743,45 +862,47 @@ const je = {
743
862
  "7xl"
744
863
  ];
745
864
  function ae(e) {
746
- const r = e.startsWith("-"), o = r ? e.slice(1) : e, i = o.lastIndexOf("-");
747
- if (i === -1) return null;
748
- const s = o.slice(0, i), l = o.slice(i + 1);
749
- if (!te[s]) return null;
750
- if (l.includes("/")) {
751
- const [t, a] = l.split("/").map((T) => parseFloat(T));
865
+ const r = e.startsWith("-"), o = r ? e.slice(1) : e, n = o.lastIndexOf("-");
866
+ if (n === -1) return null;
867
+ const c = o.slice(0, n), s = o.slice(n + 1);
868
+ if (!te[c]) return null;
869
+ if (s.includes("/")) {
870
+ const [t, a] = s.split("/").map((y) => parseFloat(y));
752
871
  if (Number.isNaN(t) || Number.isNaN(a) || a === 0)
753
872
  return null;
754
- const g = t / a * 100;
755
- return te[s].map((T) => `${T}:${g}%;`).join("");
873
+ const d = t / a * 100;
874
+ return te[c].map((y) => `${y}:${d}%;`).join("");
756
875
  }
757
- const u = parseFloat(l);
876
+ const u = parseFloat(s);
758
877
  if (Number.isNaN(u)) return null;
759
- const j = r ? "-" : "";
760
- return te[s].map((t) => `${t}:calc(${j}${B} * ${u});`).join("");
878
+ const m = r ? "-" : "";
879
+ return te[c].map((t) => `${t}:calc(${m}${I} * ${u});`).join("");
761
880
  }
762
- function se(e) {
763
- const r = e.startsWith("-"), i = (r ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
764
- if (!i) return null;
765
- const [, s, l] = i, u = s === "x";
766
- if (l === "reverse")
881
+ function ce(e) {
882
+ const r = e.startsWith("-"), n = (r ? e.slice(1) : e).match(/^space-(x|y)-(.+)$/);
883
+ if (!n) return null;
884
+ const [, c, s] = n, u = c === "x";
885
+ if (s === "reverse")
767
886
  return u ? "--cer-space-x-reverse:1;" : "--cer-space-y-reverse:1;";
768
- if (l.includes("/")) {
769
- const [g, T] = l.split("/").map((z) => parseFloat(z));
770
- if (Number.isNaN(g) || Number.isNaN(T) || T === 0)
887
+ if (s.includes("/")) {
888
+ const [d, y] = s.split("/").map((C) => parseFloat(C));
889
+ if (Number.isNaN(d) || Number.isNaN(y) || y === 0)
771
890
  return null;
772
- const A = g / T * 100, S = r ? "-" : "";
773
- return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${S}${A}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${S}${A}% * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${S}${A}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${S}${A}% * var(--cer-space-y-reverse));}`;
891
+ const v = d / y * 100, A = r ? "-" : "";
892
+ return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${A}${v}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${A}${v}% * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${A}${v}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${A}${v}% * var(--cer-space-y-reverse));}`;
774
893
  }
775
- const j = parseFloat(l);
776
- if (Number.isNaN(j)) return null;
777
- const a = `calc(${r ? "-" : ""}${B} * ${j})`;
894
+ const m = parseFloat(s);
895
+ if (Number.isNaN(m)) return null;
896
+ const a = `calc(${r ? "-" : ""}${I} * ${m})`;
778
897
  return u ? `--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${a} * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${a} * var(--cer-space-x-reverse));}` : `--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${a} * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${a} * var(--cer-space-y-reverse));}`;
779
898
  }
780
- function ue(e) {
781
- const r = e.replace("#", ""), o = parseInt(r, 16);
899
+ function q(e) {
900
+ let r = e.replace("#", "");
901
+ r.length === 3 && (r = r.split("").map((n) => n + n).join(""));
902
+ const o = parseInt(r, 16);
782
903
  return `${o >> 16 & 255} ${o >> 8 & 255} ${o & 255}`;
783
904
  }
784
- const Te = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Ae = {
905
+ const Ce = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Fe = {
785
906
  bg: "background-color",
786
907
  decoration: "text-decoration-color",
787
908
  text: "color",
@@ -792,56 +913,89 @@ const Te = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
792
913
  fill: "fill",
793
914
  stroke: "stroke"
794
915
  };
795
- function Se(e) {
796
- const r = Te.exec(e);
916
+ function Oe(e) {
917
+ const r = Ce.exec(e);
797
918
  if (!r) return null;
798
- const [, o, i, s = "DEFAULT"] = r, l = he[i]?.[s];
799
- if (!l) return null;
800
- if (o === "shadow") return `--cer-shadow-color:${l};`;
801
- const u = Ae[o];
802
- return u ? `${u}:${l};` : null;
919
+ const [, o, n, c = "DEFAULT"] = r, s = be[n]?.[c];
920
+ if (!s) return null;
921
+ if (o === "shadow") return `--cer-shadow-color:${s};`;
922
+ const u = Fe[o];
923
+ return u ? `${u}:${s};` : null;
803
924
  }
804
- function Fe(e) {
925
+ function Ee(e) {
805
926
  const r = e.indexOf("/");
806
927
  if (r === -1) return { base: e };
807
- const o = e.slice(0, r), i = e.slice(r + 1), s = parseInt(i, 10);
808
- return isNaN(s) || s < 0 || s > 100 ? { base: o } : { base: o, opacity: s / 100 };
928
+ const o = e.slice(0, r), n = e.slice(r + 1), c = parseInt(n, 10);
929
+ return isNaN(c) || c < 0 || c > 100 ? { base: o } : { base: o, opacity: c / 100 };
809
930
  }
810
- function le(e) {
811
- const { base: r, opacity: o } = Fe(e), i = Se(r);
812
- if (i && o !== void 0) {
813
- const l = /#([0-9a-f]{6})/i.exec(i);
814
- if (l) {
815
- const u = ue(l[0]);
816
- return i.replace(/#([0-9a-f]{6})/i, `rgb(${u} / ${o})`);
931
+ function se(e) {
932
+ const { base: r, opacity: o } = Ee(e), n = Oe(r);
933
+ if (n) {
934
+ if (o !== void 0) {
935
+ if (n.includes("var(")) {
936
+ const u = /var\([^)]*\)/.exec(n);
937
+ if (u) {
938
+ const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), y = /^([a-z-]+):/.exec(n), v = y ? y[1] : "background-color";
939
+ if (d) {
940
+ const C = `rgb(${q(d[0])} / ${o})`, f = m.replace(
941
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
942
+ C
943
+ );
944
+ return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
945
+ }
946
+ return `${v}:${a};`;
947
+ }
948
+ }
949
+ const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(n);
950
+ if (s) {
951
+ const u = q(s[0]);
952
+ return n.replace(
953
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
954
+ `rgb(${u} / ${o})`
955
+ );
956
+ }
817
957
  }
958
+ return n;
818
959
  }
819
- if (i) return i;
820
- const s = Q(r);
821
- if (s && o !== void 0) {
822
- const l = /#([0-9a-f]{6})/i.exec(s);
823
- if (l) {
824
- const u = ue(l[0]);
825
- return s.replace(
826
- /#([0-9a-f]{6})/i,
960
+ const c = Z(r);
961
+ if (c && o !== void 0) {
962
+ if (c.includes("var(")) {
963
+ const u = /var\([^)]*\)/.exec(c);
964
+ if (u) {
965
+ const m = u[0], t = o * 100, a = `color-mix(in srgb, ${m} ${t}%, rgba(0 0 0 / 0) ${100 - t}%)`, d = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(m), y = /^([a-z-]+):/.exec(c), v = y ? y[1] : null;
966
+ if (d && v) {
967
+ const C = `rgb(${q(d[0])} / ${o})`, f = m.replace(
968
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
969
+ C
970
+ );
971
+ return `${v}:${f};__CE_COLOR_MIX_SPLIT__${v}:${a};`;
972
+ }
973
+ return c.replace(m, a);
974
+ }
975
+ }
976
+ const s = /#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(c);
977
+ if (s) {
978
+ const u = q(s[0]);
979
+ return c.replace(
980
+ /#([0-9a-f]{6}|[0-9a-f]{3})/i,
827
981
  `rgb(${u} / ${o})`
828
982
  );
829
983
  }
830
984
  }
831
- return s;
985
+ return c;
832
986
  }
833
- function ce(e) {
987
+ function le(e) {
834
988
  const r = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
835
989
  if (!r) return null;
836
- const [, o, i, s = "DEFAULT"] = r, l = he[i]?.[s];
837
- if (!l) return null;
990
+ const [, o, n, c = "DEFAULT"] = r, s = be[n]?.[c];
991
+ if (!s) return null;
838
992
  switch (o) {
839
993
  case "from":
840
- return `--cer-gradient-from:${l} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;
994
+ return `--cer-gradient-from:${s} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;
841
995
  case "to":
842
- return `--cer-gradient-to:${l} var(--cer-gradient-to-position);`;
996
+ return `--cer-gradient-to:${s} var(--cer-gradient-to-position);`;
843
997
  case "via":
844
- return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${l} var(--cer-gradient-via-position), var(--cer-gradient-to);`;
998
+ return `--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${s} var(--cer-gradient-via-position), var(--cer-gradient-to);`;
845
999
  default:
846
1000
  return null;
847
1001
  }
@@ -852,17 +1006,17 @@ function de(e) {
852
1006
  const o = parseInt(r[1], 10);
853
1007
  return o < 0 || o > 100 ? null : `opacity:${o / 100};`;
854
1008
  }
855
- function Q(e) {
1009
+ function Z(e) {
856
1010
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
857
- const u = e.slice(1, -1).trim(), j = u.indexOf(":");
858
- if (j === -1) return null;
859
- const t = u.slice(0, j).trim();
860
- let a = u.slice(j + 1).trim();
1011
+ const u = e.slice(1, -1).trim(), m = u.indexOf(":");
1012
+ if (m === -1) return null;
1013
+ const t = u.slice(0, m).trim();
1014
+ let a = u.slice(m + 1).trim();
861
1015
  return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(t) ? (a = a.replace(/_/g, " "), a = a.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), a = a.replace(/^'([^']*)'$/g, '"$1"'), `${t}:${a};`) : null;
862
1016
  }
863
1017
  const r = e.indexOf("-[");
864
1018
  if (r <= 0 || !e.endsWith("]")) return null;
865
- const o = e.slice(0, r), i = e.slice(r + 2, -1).replace(/_/g, " "), s = {
1019
+ const o = e.slice(0, r), n = e.slice(r + 2, -1).replace(/_/g, " "), c = {
866
1020
  bg: "background-color",
867
1021
  shadow: "box-shadow",
868
1022
  p: "padding",
@@ -903,15 +1057,15 @@ function Q(e) {
903
1057
  opacity: "opacity"
904
1058
  };
905
1059
  if (o === "text")
906
- return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(i) ? `font-size:${i};` : `color:${i};`;
907
- if (o === "rotate") return `transform:rotate(${i});`;
908
- if (o === "scale") return `transform:scale(${i});`;
909
- if (o === "translate-x") return `transform:translateX(${i});`;
910
- if (o === "translate-y") return `transform:translateY(${i});`;
911
- const l = s[o] ?? o.replace(/_/g, "-");
912
- return l && i ? `${l}:${i};` : null;
1060
+ return /^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(n) ? `font-size:${n};` : `color:${n};`;
1061
+ if (o === "rotate") return `transform:rotate(${n});`;
1062
+ if (o === "scale") return `transform:scale(${n});`;
1063
+ if (o === "translate-x") return `transform:translateX(${n});`;
1064
+ if (o === "translate-y") return `transform:translateY(${n});`;
1065
+ const s = c[o] ?? o.replace(/_/g, "-");
1066
+ return s && n ? `${s}:${n};` : null;
913
1067
  }
914
- function Ce(e) {
1068
+ function _e(e) {
915
1069
  if (e.startsWith("[") && e.endsWith("]")) {
916
1070
  const o = e.slice(1, -1);
917
1071
  return o.includes("&") ? o : e;
@@ -926,41 +1080,41 @@ function Ce(e) {
926
1080
  function pe(e) {
927
1081
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
928
1082
  }
929
- function Oe(e) {
1083
+ function ze(e) {
930
1084
  const r = /class\s*=\s*(['"])([\s\S]*?)\1/g, o = [];
931
- let i;
932
- for (; i = r.exec(e); ) {
933
- const s = i[2].split(/\s+/).filter(Boolean);
934
- s.length && o.push(...s);
1085
+ let n;
1086
+ for (; n = r.exec(e); ) {
1087
+ const c = n[2].split(/\s+/).filter(Boolean);
1088
+ c.length && o.push(...c);
935
1089
  }
936
1090
  return o;
937
1091
  }
938
- const K = /* @__PURE__ */ new Map(), Ee = 16, me = 1e3;
939
- function ze(e) {
940
- const r = Date.now(), o = K.get(e);
941
- if (o && r - o.timestamp < Ee)
1092
+ const H = /* @__PURE__ */ new Map(), Re = 16, me = 1e3;
1093
+ function Le(e) {
1094
+ const r = Date.now(), o = H.get(e);
1095
+ if (o && r - o.timestamp < Re)
942
1096
  return o.css;
943
- const i = Oe(e);
944
- if (!i.length) return "";
945
- const s = new Set(i), l = [[], [], [], []], u = {}, j = (f, p = !1) => {
946
- const d = p ? `dark|${f}` : f;
947
- if (d in u) return u[d];
948
- const m = T(f, p);
949
- return u[d] = m, m;
1097
+ const n = ze(e);
1098
+ if (!n.length) return "";
1099
+ const c = new Set(n), s = [[], [], [], []], u = {}, m = (f, p = !1) => {
1100
+ const g = p ? `dark|${f}` : f;
1101
+ if (g in u) return u[g];
1102
+ const b = y(f, p);
1103
+ return u[g] = b, b;
950
1104
  }, t = (f) => {
951
- const p = f.some((w) => ie.includes(w)), d = f.some(
952
- (w) => w.startsWith("@") && (ne.includes(w.slice(1)) || w.match(/^@\[.+\]$/))
953
- ), m = f.includes("dark");
954
- return f.length ? !p && !m && !d ? 1 : m && (p || d) ? 3 : 2 : 0;
1105
+ const p = f.some((k) => ne.includes(k)), g = f.some(
1106
+ (k) => k.startsWith("@") && (ie.includes(k.slice(1)) || k.match(/^@\[.+\]$/))
1107
+ ), b = f.includes("dark");
1108
+ return f.length ? !p && !b && !g ? 1 : b && (p || g) ? 3 : 2 : 0;
955
1109
  }, a = (f) => {
956
1110
  const p = [];
957
- let d = "", m = 0;
958
- for (let w = 0; w < f.length; w++) {
959
- const b = f[w];
960
- b === "[" || b === "(" ? m++ : (b === "]" || b === ")") && m--, b === ":" && m === 0 ? (p.push(d), d = "") : d += b;
1111
+ let g = "", b = 0;
1112
+ for (let k = 0; k < f.length; k++) {
1113
+ const x = f[k];
1114
+ x === "[" || x === "(" ? b++ : (x === "]" || x === ")") && b--, x === ":" && b === 0 ? (p.push(g), g = "") : g += x;
961
1115
  }
962
- return d && p.push(d), p;
963
- }, g = {
1116
+ return g && p.push(g), p;
1117
+ }, d = {
964
1118
  hover: ":hover",
965
1119
  focus: ":focus",
966
1120
  active: ":active",
@@ -973,144 +1127,144 @@ function ze(e) {
973
1127
  even: ":nth-child(even)",
974
1128
  "focus-within": ":focus-within",
975
1129
  "focus-visible": ":focus-visible"
976
- }, T = (f, p = !1) => {
977
- const d = a(f);
978
- let m = "", w = !1;
979
- for (const n of d) {
980
- let v = n;
981
- if (v.startsWith("!") && (w = !0, v = v.slice(1)), re[v] || ae(v) || se(v) || de(v) || le(v) || ce(v) || Q(v)) {
982
- m = n;
1130
+ }, y = (f, p = !1) => {
1131
+ const g = a(f);
1132
+ let b = "", k = !1;
1133
+ for (const i of g) {
1134
+ let $ = i;
1135
+ if ($.startsWith("!") && (k = !0, $ = $.slice(1)), re[$] || ae($) || ce($) || de($) || se($) || le($) || Z($)) {
1136
+ b = i;
983
1137
  break;
984
1138
  }
985
1139
  }
986
- if (!m) return null;
987
- const b = m.replace(/^!/, ""), C = re[b] ?? ae(b) ?? se(b) ?? de(b) ?? le(b) ?? ce(b) ?? Q(b);
988
- if (!C) return null;
989
- const k = d.indexOf(m);
990
- let h = k >= 0 ? d.slice(0, k) : [];
991
- p && (h = h.filter((n) => n !== "dark"));
992
- const P = `.${pe(f)}`, W = w ? C.replace(/;/g, " !important;") : C, x = "__SUBJECT__";
993
- let c = x;
994
- const D = [];
995
- for (const n of h)
996
- n.startsWith("group-") ? (c = `.group:${n.slice(6)} ${c}`, D.push(n)) : n.startsWith("peer-") && (c = c.replace(
997
- x,
998
- `.peer:${n.slice(5)}~${x}`
999
- ), D.push(n));
1000
- h = h.filter((n) => !D.includes(n));
1001
- const _ = [], V = [];
1002
- let y = null;
1003
- for (const n of h) {
1004
- if (n === "dark" || ie.includes(n) || n.startsWith("@") && (ne.includes(n.slice(1)) || n.match(/^@\[.+\]$/)))
1140
+ if (!b) return null;
1141
+ const x = b.replace(/^!/, ""), O = re[x] ?? ae(x) ?? ce(x) ?? de(x) ?? se(x) ?? le(x) ?? Z(x);
1142
+ if (!O) return null;
1143
+ const T = g.indexOf(b);
1144
+ let h = T >= 0 ? g.slice(0, T) : [];
1145
+ p && (h = h.filter((i) => i !== "dark"));
1146
+ const R = `.${pe(f)}`, _ = k ? O.replace(/;/g, " !important;") : O, w = "__SUBJECT__";
1147
+ let l = w;
1148
+ const P = [];
1149
+ for (const i of h)
1150
+ i.startsWith("group-") ? (l = `.group:${i.slice(6)} ${l}`, P.push(i)) : i.startsWith("peer-") && (l = l.replace(
1151
+ w,
1152
+ `.peer:${i.slice(5)}~${w}`
1153
+ ), P.push(i));
1154
+ h = h.filter((i) => !P.includes(i));
1155
+ const W = [], U = [];
1156
+ let S = null;
1157
+ for (const i of h) {
1158
+ if (i === "dark" || ne.includes(i) || i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/)))
1005
1159
  continue;
1006
- const v = Ce(n);
1007
- if (v) {
1008
- y = v;
1160
+ const $ = _e(i);
1161
+ if ($) {
1162
+ S = $;
1009
1163
  continue;
1010
1164
  }
1011
- const F = g[n];
1165
+ const F = d[i];
1012
1166
  if (F) {
1013
- y ? V.push(F) : _.push(F);
1167
+ S ? U.push(F) : W.push(F);
1014
1168
  continue;
1015
1169
  }
1016
- const O = je[n];
1017
- typeof O == "function" && (c = O(c, W).split("{")[0]);
1170
+ const E = Ae[i];
1171
+ typeof E == "function" && (l = E(l, _).split("{")[0]);
1018
1172
  }
1019
- const I = _.join(""), R = V.join("");
1020
- function X(n, v) {
1021
- if (!v) return n;
1022
- let F = 0, O = 0;
1023
- if (n.length && (n[0] === ">" || n[0] === "+" || n[0] === "~" || n[0] === " ")) {
1024
- let $ = 1;
1025
- for (; $ < n.length && n[$] === " "; ) $++;
1026
- for (; $ < n.length; $++) {
1027
- const E = n[$];
1028
- if (E === "[" ? F++ : E === "]" && F > 0 ? F-- : E === "(" ? O++ : E === ")" && O > 0 && O--, F === 0 && O === 0 && (n[$] === ">" || n[$] === "+" || n[$] === "~" || n[$] === " "))
1029
- return n.slice(0, $) + v + n.slice($);
1173
+ const D = W.join(""), L = U.join("");
1174
+ function Q(i, $) {
1175
+ if (!$) return i;
1176
+ let F = 0, E = 0;
1177
+ if (i.length && (i[0] === ">" || i[0] === "+" || i[0] === "~" || i[0] === " ")) {
1178
+ let j = 1;
1179
+ for (; j < i.length && i[j] === " "; ) j++;
1180
+ for (; j < i.length; j++) {
1181
+ const z = i[j];
1182
+ if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (i[j] === ">" || i[j] === "+" || i[j] === "~" || i[j] === " "))
1183
+ return i.slice(0, j) + $ + i.slice(j);
1030
1184
  }
1031
- return n + v;
1185
+ return i + $;
1032
1186
  }
1033
- for (let $ = 0; $ < n.length; $++) {
1034
- const E = n[$];
1035
- if (E === "[" ? F++ : E === "]" && F > 0 ? F-- : E === "(" ? O++ : E === ")" && O > 0 && O--, F === 0 && O === 0 && (E === ">" || E === "+" || E === "~" || E === " "))
1036
- return n.slice(0, $) + v + n.slice($);
1187
+ for (let j = 0; j < i.length; j++) {
1188
+ const z = i[j];
1189
+ if (z === "[" ? F++ : z === "]" && F > 0 ? F-- : z === "(" ? E++ : z === ")" && E > 0 && E--, F === 0 && E === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
1190
+ return i.slice(0, j) + $ + i.slice(j);
1037
1191
  }
1038
- return n + v;
1192
+ return i + $;
1039
1193
  }
1040
- if (y)
1041
- if (y.includes("&")) {
1042
- const n = y.indexOf("&"), v = y.slice(0, n), F = y.slice(n + 1), O = x + I;
1043
- if (_.length === 0)
1044
- c = c.replace(
1045
- x,
1046
- v + O + R + F
1194
+ if (S)
1195
+ if (S.includes("&")) {
1196
+ const i = S.indexOf("&"), $ = S.slice(0, i), F = S.slice(i + 1), E = w + D;
1197
+ if (W.length === 0)
1198
+ l = l.replace(
1199
+ w,
1200
+ $ + E + L + F
1047
1201
  );
1048
1202
  else {
1049
- const $ = X(F, R);
1050
- c = c.replace(
1051
- x,
1052
- v + O + $
1203
+ const j = Q(F, L);
1204
+ l = l.replace(
1205
+ w,
1206
+ $ + E + j
1053
1207
  );
1054
1208
  }
1055
1209
  } else
1056
- c = c.replace(
1057
- x,
1058
- `${y}${x + I}`
1059
- ), R && (c = c.replace(x, `${x}${R}`));
1210
+ l = l.replace(
1211
+ w,
1212
+ `${S}${w + D}`
1213
+ ), L && (l = l.replace(w, `${w}${L}`));
1060
1214
  else
1061
- c = c.replace(
1062
- x,
1063
- x + I + R
1215
+ l = l.replace(
1216
+ w,
1217
+ w + D + L
1064
1218
  );
1065
- c = c.replace(new RegExp(x, "g"), P);
1066
- let U = `${c}{${W}}`;
1067
- const Y = h.filter(
1068
- (n) => ie.includes(n)
1219
+ l = l.replace(new RegExp(w, "g"), R);
1220
+ const fe = "__CE_COLOR_MIX_SPLIT__", he = _.includes(fe) ? _.split(fe).map((i) => `${l}{${i}}`) : [`${l}{${_}}`], Y = h.filter(
1221
+ (i) => ne.includes(i)
1069
1222
  ), ee = h.filter(
1070
- (n) => n.startsWith("@") && (ne.includes(n.slice(1)) || n.match(/^@\[.+\]$/))
1071
- ), G = Y.length ? Y[Y.length - 1] : null, H = ee.length ? ee[ee.length - 1] : null, fe = h.includes("dark");
1072
- let M = "", N = "";
1073
- if (fe && G ? M = `@media (prefers-color-scheme: dark) and ${oe[G]}` : fe ? M = "@media (prefers-color-scheme: dark)" : G && (M = `@media ${oe[G]}`), H)
1074
- if (H.startsWith("@[") && H.endsWith("]")) {
1075
- const n = H.slice(2, -1);
1076
- if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(n))
1223
+ (i) => i.startsWith("@") && (ie.includes(i.slice(1)) || i.match(/^@\[.+\]$/))
1224
+ ), G = Y.length ? Y[Y.length - 1] : null, V = ee.length ? ee[ee.length - 1] : null, ue = h.includes("dark");
1225
+ let N = "", B = "";
1226
+ if (ue && G ? N = `@media (prefers-color-scheme: dark) and ${oe[G]}` : ue ? N = "@media (prefers-color-scheme: dark)" : G && (N = `@media ${oe[G]}`), V)
1227
+ if (V.startsWith("@[") && V.endsWith("]")) {
1228
+ const i = V.slice(2, -1);
1229
+ if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(i))
1077
1230
  return null;
1078
- N = `@container (min-width:${n})`;
1231
+ B = `@container (min-width:${i})`;
1079
1232
  } else {
1080
- const n = H.slice(1);
1081
- N = `@container ${ge[n] || `(min-width:${n})`}`;
1233
+ const i = V.slice(1);
1234
+ B = `@container ${ge[i] || `(min-width:${i})`}`;
1082
1235
  }
1083
- return M && N ? U = `${M}${N}{${U}}` : M ? U = `${M}{${U}}` : N && (U = `${N}{${U}}`), U;
1236
+ const xe = (i) => N && B ? `${N}${B}{${i}}` : N ? `${N}{${i}}` : B ? `${B}{${i}}` : i;
1237
+ return he.map(xe).join("");
1084
1238
  };
1085
- for (const f of s) {
1086
- const p = a(f), d = p.find(
1087
- (k) => re[k.replace(/^!/, "")] || ae(k.replace(/^!/, "")) || se(k.replace(/^!/, "")) || de(k.replace(/^!/, "")) || le(k.replace(/^!/, "")) || ce(k.replace(/^!/, "")) || Q(k.replace(/^!/, ""))
1239
+ for (const f of c) {
1240
+ const p = a(f), g = p.find(
1241
+ (T) => re[T.replace(/^!/, "")] || ae(T.replace(/^!/, "")) || ce(T.replace(/^!/, "")) || de(T.replace(/^!/, "")) || se(T.replace(/^!/, "")) || le(T.replace(/^!/, "")) || Z(T.replace(/^!/, ""))
1088
1242
  );
1089
- if (!d) continue;
1090
- const m = p.indexOf(d), w = m >= 0 ? p.slice(0, m) : [], b = t(w), C = j(f);
1091
- C && l[b].push(C);
1243
+ if (!g) continue;
1244
+ const b = p.indexOf(g), k = b >= 0 ? p.slice(0, b) : [], x = t(k), O = m(f);
1245
+ O && s[x].push(O);
1092
1246
  }
1093
- const A = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
1094
- for (const f of s)
1095
- if (A.test(f)) {
1096
- if (l.flat().join("").includes(`.${pe(f)}`)) continue;
1097
- const d = j(f);
1098
- d && l[0].push(d);
1247
+ const v = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
1248
+ for (const f of c)
1249
+ if (v.test(f)) {
1250
+ if (s.flat().join("").includes(`.${pe(f)}`)) continue;
1251
+ const g = m(f);
1252
+ g && s[0].push(g);
1099
1253
  }
1100
- const S = (f) => f.sort((p, d) => {
1101
- const m = (P) => {
1102
- const W = {
1254
+ const A = (f) => f.sort((p, g) => {
1255
+ const b = (R) => {
1256
+ const _ = {
1103
1257
  sm: 640,
1104
1258
  md: 768,
1105
1259
  lg: 1024,
1106
1260
  xl: 1280,
1107
1261
  "2xl": 1536
1108
1262
  };
1109
- for (const [x, c] of Object.entries(W))
1110
- if (P.includes(`@media ${oe[x]}`)) return c;
1263
+ for (const [w, l] of Object.entries(_))
1264
+ if (R.includes(`@media ${oe[w]}`)) return l;
1111
1265
  return -1;
1112
- }, w = (P) => {
1113
- const W = {
1266
+ }, k = (R) => {
1267
+ const _ = {
1114
1268
  xs: 320,
1115
1269
  // 20rem
1116
1270
  sm: 384,
@@ -1134,27 +1288,27 @@ function ze(e) {
1134
1288
  "7xl": 1280
1135
1289
  // 80rem
1136
1290
  };
1137
- for (const [x, c] of Object.entries(W))
1138
- if (P.includes(`@container ${ge[x]}`)) return c;
1139
- if (P.includes("@container (min-width:")) {
1140
- const x = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(P);
1141
- if (x) {
1142
- const c = parseFloat(x[1]), D = x[2];
1143
- return D === "rem" || D === "em" ? c * 16 : c;
1291
+ for (const [w, l] of Object.entries(_))
1292
+ if (R.includes(`@container ${ge[w]}`)) return l;
1293
+ if (R.includes("@container (min-width:")) {
1294
+ const w = /@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(R);
1295
+ if (w) {
1296
+ const l = parseFloat(w[1]), P = w[2];
1297
+ return P === "rem" || P === "em" ? l * 16 : l;
1144
1298
  }
1145
1299
  }
1146
1300
  return -1;
1147
- }, b = m(p), C = m(d), k = w(p), h = w(d);
1148
- return b >= 0 && C >= 0 && b !== C ? b - C : k >= 0 && h >= 0 && k !== h ? k - h : 0;
1301
+ }, x = b(p), O = b(g), T = k(p), h = k(g);
1302
+ return x >= 0 && O >= 0 && x !== O ? x - O : T >= 0 && h >= 0 && T !== h ? T - h : 0;
1149
1303
  });
1150
- l[2] = S(l[2]), l[3] = S(l[3]);
1151
- const z = l.flat().join("");
1152
- return K.size >= me && Array.from(K.keys()).slice(
1304
+ s[2] = A(s[2]), s[3] = A(s[3]);
1305
+ const C = s.flat().join("");
1306
+ return H.size >= me && Array.from(H.keys()).slice(
1153
1307
  0,
1154
1308
  Math.floor(me / 2)
1155
- ).forEach((p) => K.delete(p)), K.set(e, { css: z, timestamp: r }), z;
1309
+ ).forEach((p) => H.delete(p)), H.set(e, { css: C, timestamp: r }), C;
1156
1310
  }
1157
- const q = {
1311
+ const K = {
1158
1312
  /** Simple fade in/out */
1159
1313
  fade: {
1160
1314
  enterFrom: "opacity-0",
@@ -1246,181 +1400,181 @@ const q = {
1246
1400
  leaveTo: "rotate-[90deg] opacity-0"
1247
1401
  }
1248
1402
  };
1249
- function _e(e, r) {
1403
+ function Ne(e, r) {
1250
1404
  const {
1251
1405
  preset: o,
1252
- show: i,
1253
- mode: s = "default",
1254
- duration: l,
1406
+ show: n,
1407
+ mode: c = "default",
1408
+ duration: s,
1255
1409
  appear: u = !1,
1256
- css: j = !0,
1410
+ css: m = !0,
1257
1411
  name: t,
1258
1412
  enterFrom: a,
1259
- enterActive: g,
1260
- enterTo: T,
1261
- leaveFrom: A,
1262
- leaveActive: S,
1263
- leaveTo: z,
1413
+ enterActive: d,
1414
+ enterTo: y,
1415
+ leaveFrom: v,
1416
+ leaveActive: A,
1417
+ leaveTo: C,
1264
1418
  onBeforeEnter: f,
1265
1419
  onEnter: p,
1266
- onAfterEnter: d,
1267
- onEnterCancelled: m,
1268
- onBeforeLeave: w,
1269
- onLeave: b,
1270
- onAfterLeave: C,
1271
- onLeaveCancelled: k
1420
+ onAfterEnter: g,
1421
+ onEnterCancelled: b,
1422
+ onBeforeLeave: k,
1423
+ onLeave: x,
1424
+ onAfterLeave: O,
1425
+ onLeaveCancelled: T
1272
1426
  } = e;
1273
1427
  let h;
1274
- o && q[o] ? (h = { ...q[o] }, a && (h.enterFrom = a), g && (h.enterActive = g), T && (h.enterTo = T), A && (h.leaveFrom = A), S && (h.leaveActive = S), z && (h.leaveTo = z)) : h = {
1428
+ o && K[o] ? (h = { ...K[o] }, a && (h.enterFrom = a), d && (h.enterActive = d), y && (h.enterTo = y), v && (h.leaveFrom = v), A && (h.leaveActive = A), C && (h.leaveTo = C)) : h = {
1275
1429
  enterFrom: a,
1276
- enterActive: g,
1277
- enterTo: T,
1278
- leaveFrom: A,
1279
- leaveActive: S,
1280
- leaveTo: z
1430
+ enterActive: d,
1431
+ enterTo: y,
1432
+ leaveFrom: v,
1433
+ leaveActive: A,
1434
+ leaveTo: C
1281
1435
  };
1282
- const P = t || (o ? `transition-${o}` : "transition"), W = be(i ? r : [], P);
1283
- return W._transition = {
1284
- name: P,
1436
+ const R = t || (o ? `transition-${o}` : "transition"), _ = ve(n ? r : [], R);
1437
+ return _._transition = {
1438
+ name: R,
1285
1439
  classes: h,
1286
- mode: s,
1287
- duration: l,
1440
+ mode: c,
1441
+ duration: s,
1288
1442
  appear: u,
1289
- css: j,
1290
- state: i ? "visible" : "hidden",
1443
+ css: m,
1444
+ state: n ? "visible" : "hidden",
1291
1445
  hooks: {
1292
1446
  onBeforeEnter: f,
1293
1447
  onEnter: p,
1294
- onAfterEnter: d,
1295
- onEnterCancelled: m,
1296
- onBeforeLeave: w,
1297
- onLeave: b,
1298
- onAfterLeave: C,
1299
- onLeaveCancelled: k
1448
+ onAfterEnter: g,
1449
+ onEnterCancelled: b,
1450
+ onBeforeLeave: k,
1451
+ onLeave: x,
1452
+ onAfterLeave: O,
1453
+ onLeaveCancelled: T
1300
1454
  }
1301
- }, W;
1455
+ }, _;
1302
1456
  }
1303
1457
  function Be(e, r) {
1304
1458
  const {
1305
1459
  tag: o = "div",
1306
- moveClass: i = "transition-transform duration-300",
1307
- preset: s,
1308
- show: l = !0,
1460
+ moveClass: n = "transition-transform duration-300",
1461
+ preset: c,
1462
+ show: s = !0,
1309
1463
  mode: u = "default",
1310
- duration: j,
1464
+ duration: m,
1311
1465
  appear: t = !1,
1312
1466
  css: a = !0,
1313
- name: g,
1314
- class: T,
1315
- style: A,
1316
- enterFrom: S,
1317
- enterActive: z,
1467
+ name: d,
1468
+ class: y,
1469
+ style: v,
1470
+ enterFrom: A,
1471
+ enterActive: C,
1318
1472
  enterTo: f,
1319
1473
  leaveFrom: p,
1320
- leaveActive: d,
1321
- leaveTo: m,
1322
- onBeforeEnter: w,
1323
- onEnter: b,
1324
- onAfterEnter: C,
1325
- onEnterCancelled: k,
1474
+ leaveActive: g,
1475
+ leaveTo: b,
1476
+ onBeforeEnter: k,
1477
+ onEnter: x,
1478
+ onAfterEnter: O,
1479
+ onEnterCancelled: T,
1326
1480
  onBeforeLeave: h,
1327
- onLeave: P,
1328
- onAfterLeave: W,
1329
- onLeaveCancelled: x
1481
+ onLeave: R,
1482
+ onAfterLeave: _,
1483
+ onLeaveCancelled: w
1330
1484
  } = e;
1331
- let c;
1332
- s && q[s] ? (c = { ...q[s] }, S && (c.enterFrom = S), z && (c.enterActive = z), f && (c.enterTo = f), p && (c.leaveFrom = p), d && (c.leaveActive = d), m && (c.leaveTo = m)) : c = {
1333
- enterFrom: S,
1334
- enterActive: z,
1485
+ let l;
1486
+ c && K[c] ? (l = { ...K[c] }, A && (l.enterFrom = A), C && (l.enterActive = C), f && (l.enterTo = f), p && (l.leaveFrom = p), g && (l.leaveActive = g), b && (l.leaveTo = b)) : l = {
1487
+ enterFrom: A,
1488
+ enterActive: C,
1335
1489
  enterTo: f,
1336
1490
  leaveFrom: p,
1337
- leaveActive: d,
1338
- leaveTo: m
1491
+ leaveActive: g,
1492
+ leaveTo: b
1339
1493
  };
1340
- const D = g || (s ? `transition-group-${s}` : "transition-group"), _ = [];
1341
- for (const y of l ? r : [])
1342
- if (y && typeof y == "object" && y.tag === "#anchor") {
1343
- const I = Array.isArray(y.children) ? y.children : [];
1344
- for (const R of I)
1345
- if (R && typeof R == "object") {
1346
- const X = {
1347
- ...R,
1348
- key: y.key || R.key,
1494
+ const P = d || (c ? `transition-group-${c}` : "transition-group"), W = [];
1495
+ for (const S of s ? r : [])
1496
+ if (S && typeof S == "object" && S.tag === "#anchor") {
1497
+ const D = Array.isArray(S.children) ? S.children : [];
1498
+ for (const L of D)
1499
+ if (L && typeof L == "object") {
1500
+ const Q = {
1501
+ ...L,
1502
+ key: S.key || L.key,
1349
1503
  props: {
1350
- ...R.props,
1351
- _anchorKey: y.key
1504
+ ...L.props,
1505
+ _anchorKey: S.key
1352
1506
  // Preserve original anchor key
1353
1507
  }
1354
1508
  };
1355
- _.push(X);
1509
+ W.push(Q);
1356
1510
  } else
1357
- _.push(R);
1511
+ W.push(L);
1358
1512
  } else
1359
- _.push(y);
1360
- const V = (() => {
1361
- if (A)
1362
- return typeof A == "string" ? A : Object.entries(A).map(([y, I]) => `${y}: ${I}`).join("; ");
1513
+ W.push(S);
1514
+ const U = (() => {
1515
+ if (v)
1516
+ return typeof v == "string" ? v : Object.entries(v).map(([S, D]) => `${S}: ${D}`).join("; ");
1363
1517
  })();
1364
1518
  return {
1365
1519
  tag: o,
1366
- children: _,
1367
- key: D,
1520
+ children: W,
1521
+ key: P,
1368
1522
  props: {
1369
1523
  attrs: {
1370
- ...T ? { class: T } : {},
1371
- ...V ? { style: V } : {}
1524
+ ...y ? { class: y } : {},
1525
+ ...U ? { style: U } : {}
1372
1526
  },
1373
1527
  _transitionGroup: {
1374
- name: D,
1375
- classes: c,
1376
- moveClass: i,
1528
+ name: P,
1529
+ classes: l,
1530
+ moveClass: n,
1377
1531
  mode: u,
1378
- duration: j,
1532
+ duration: m,
1379
1533
  appear: t,
1380
1534
  css: a,
1381
1535
  hooks: {
1382
- onBeforeEnter: w,
1383
- onEnter: b,
1384
- onAfterEnter: C,
1385
- onEnterCancelled: k,
1536
+ onBeforeEnter: k,
1537
+ onEnter: x,
1538
+ onAfterEnter: O,
1539
+ onEnterCancelled: T,
1386
1540
  onBeforeLeave: h,
1387
- onLeave: P,
1388
- onAfterLeave: W,
1389
- onLeaveCancelled: x
1541
+ onLeave: R,
1542
+ onAfterLeave: _,
1543
+ onLeaveCancelled: w
1390
1544
  }
1391
1545
  }
1392
1546
  }
1393
1547
  };
1394
1548
  }
1395
- function Ie(e) {
1549
+ function Ue(e) {
1396
1550
  return { ...e };
1397
1551
  }
1398
- let Z = null;
1399
- function Pe() {
1400
- if (!Z) {
1552
+ let J = null;
1553
+ function Me() {
1554
+ if (!J) {
1401
1555
  const e = [];
1402
- Object.values(q).forEach((i) => {
1403
- i.enterFrom && e.push(i.enterFrom), i.enterActive && e.push(i.enterActive), i.enterTo && e.push(i.enterTo), i.leaveFrom && e.push(i.leaveFrom), i.leaveActive && e.push(i.leaveActive), i.leaveTo && e.push(i.leaveTo);
1556
+ Object.values(K).forEach((n) => {
1557
+ n.enterFrom && e.push(n.enterFrom), n.enterActive && e.push(n.enterActive), n.enterTo && e.push(n.enterTo), n.leaveFrom && e.push(n.leaveFrom), n.leaveActive && e.push(n.leaveActive), n.leaveTo && e.push(n.leaveTo);
1404
1558
  });
1405
- const r = `<div class="${e.join(" ")}"></div>`, o = ze(r);
1406
- Z = new CSSStyleSheet(), Z.replaceSync(o);
1559
+ const r = `<div class="${e.join(" ")}"></div>`, o = Le(r);
1560
+ J = new CSSStyleSheet(), J.replaceSync(o);
1407
1561
  }
1408
- return Z;
1562
+ return J;
1409
1563
  }
1410
- function Re() {
1411
- Pe();
1564
+ function Pe() {
1565
+ Me();
1412
1566
  }
1413
- Re();
1567
+ Pe();
1414
1568
  export {
1415
- _e as T,
1416
- Pe as a,
1569
+ Ne as T,
1570
+ Me as a,
1417
1571
  Be as b,
1418
- xe as c,
1419
- Ie as d,
1420
- We as g,
1421
- ze as j,
1422
- ve as m,
1572
+ $e as c,
1573
+ Ue as d,
1574
+ Ie as g,
1575
+ Le as j,
1576
+ ye as m,
1423
1577
  De as s,
1424
- q as t
1578
+ K as t
1425
1579
  };
1426
- //# sourceMappingURL=transitions-CbxTVf1F.js.map
1580
+ //# sourceMappingURL=transitions-Cctsmip5.js.map