tailwind-clamp 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- var gt = Object.defineProperty;
2
- var vt = (t, e, n) => e in t ? gt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var C = (t, e, n) => vt(t, typeof e != "symbol" ? e + "" : e, n);
4
- function _e(t, e) {
5
- return { handler: t, config: e };
1
+ var vn = Object.defineProperty;
2
+ var hn = (n, e, t) => e in n ? vn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var y = (n, e, t) => hn(n, typeof e != "symbol" ? e + "" : e, t);
4
+ function en(n, e) {
5
+ return { handler: n, config: e };
6
6
  }
7
- _e.withOptions = function(t, e = () => ({})) {
8
- function n(r) {
9
- return { handler: t(r), config: e(r) };
7
+ en.withOptions = function(n, e = () => ({})) {
8
+ function t(r) {
9
+ return { handler: n(r), config: e(r) };
10
10
  }
11
- return n.__isOptionsFunction = !0, n;
11
+ return t.__isOptionsFunction = !0, t;
12
12
  };
13
- var mt = _e;
14
- const ht = (t) => {
15
- switch (t) {
13
+ var yn = en;
14
+ const Cn = (n) => {
15
+ switch (n) {
16
16
  // Sizing & Spacing
17
17
  case "p":
18
18
  return {
@@ -146,6 +146,20 @@ const ht = (t) => {
146
146
  key: "margin",
147
147
  props: ["marginBlockEnd"]
148
148
  };
149
+ case "space-x":
150
+ return {
151
+ type: "spacing",
152
+ key: "margin",
153
+ selector: "& > :not(:last-child)",
154
+ props: ["marginInlineEnd"]
155
+ };
156
+ case "space-y":
157
+ return {
158
+ type: "spacing",
159
+ key: "margin",
160
+ selector: "& > :not(:last-child)",
161
+ props: ["marginBlockEnd"]
162
+ };
149
163
  case "inset":
150
164
  return {
151
165
  type: "spacing",
@@ -164,6 +178,18 @@ const ht = (t) => {
164
178
  key: "inset",
165
179
  props: ["insetBlock"]
166
180
  };
181
+ case "inset-bs":
182
+ return {
183
+ type: "spacing",
184
+ key: "inset",
185
+ props: ["insetBlockStart"]
186
+ };
187
+ case "inset-be":
188
+ return {
189
+ type: "spacing",
190
+ key: "inset",
191
+ props: ["insetBlockEnd"]
192
+ };
167
193
  case "start":
168
194
  return {
169
195
  type: "spacing",
@@ -260,6 +286,54 @@ const ht = (t) => {
260
286
  key: "maxHeight",
261
287
  props: ["maxHeight"]
262
288
  };
289
+ case "inline":
290
+ return {
291
+ type: "spacing",
292
+ key: "inlineSize",
293
+ props: ["inlineSize"]
294
+ };
295
+ case "min-inline":
296
+ return {
297
+ type: "spacing",
298
+ key: "minInlineSize",
299
+ props: ["minInlineSize"]
300
+ };
301
+ case "max-inline":
302
+ return {
303
+ type: "spacing",
304
+ key: "maxInlineSize",
305
+ props: ["maxInlineSize"]
306
+ };
307
+ case "block":
308
+ return {
309
+ type: "spacing",
310
+ key: "blockSize",
311
+ props: ["blockSize"]
312
+ };
313
+ case "min-block":
314
+ return {
315
+ type: "spacing",
316
+ key: "minBlockSize",
317
+ props: ["minBlockSize"]
318
+ };
319
+ case "max-block":
320
+ return {
321
+ type: "spacing",
322
+ key: "maxBlockSize",
323
+ props: ["maxBlockSize"]
324
+ };
325
+ case "basis":
326
+ return {
327
+ type: "spacing",
328
+ key: "flexBasis",
329
+ props: ["flexBasis"]
330
+ };
331
+ case "indent":
332
+ return {
333
+ type: "spacing",
334
+ key: "textIndent",
335
+ props: ["textIndent"]
336
+ };
263
337
  case "scroll-m":
264
338
  return {
265
339
  type: "spacing",
@@ -487,6 +561,30 @@ const ht = (t) => {
487
561
  key: "borderWidth",
488
562
  props: ["borderBlockWidth"]
489
563
  };
564
+ case "border-bs":
565
+ return {
566
+ type: "regular",
567
+ key: "borderWidth",
568
+ props: ["borderBlockStartWidth"]
569
+ };
570
+ case "border-be":
571
+ return {
572
+ type: "regular",
573
+ key: "borderWidth",
574
+ props: ["borderBlockEndWidth"]
575
+ };
576
+ case "outline":
577
+ return {
578
+ type: "regular",
579
+ key: "outlineWidth",
580
+ props: ["outlineWidth"]
581
+ };
582
+ case "outline-offset":
583
+ return {
584
+ type: "regular",
585
+ key: "outlineOffset",
586
+ props: ["outlineOffset"]
587
+ };
490
588
  case "decoration":
491
589
  return {
492
590
  type: "regular",
@@ -620,83 +718,83 @@ const ht = (t) => {
620
718
  console.log("\x1B[90m", ...arguments, "\x1B[0m");
621
719
  }
622
720
  };
623
- class De extends Error {
624
- constructor(n, r, o, i) {
625
- super(n);
626
- C(this, "sourceStart");
627
- C(this, "sourceEnd");
628
- C(this, "parserState");
721
+ class Be extends Error {
722
+ constructor(t, r, o, i) {
723
+ super(t);
724
+ y(this, "sourceStart");
725
+ y(this, "sourceEnd");
726
+ y(this, "parserState");
629
727
  this.name = "ParseError", this.sourceStart = r, this.sourceEnd = o, this.parserState = i;
630
728
  }
631
729
  }
632
- class Y extends De {
633
- constructor(n, r, o, i, a) {
634
- super(n, r, o, i);
635
- C(this, "token");
730
+ class Y extends Be {
731
+ constructor(t, r, o, i, a) {
732
+ super(t, r, o, i);
733
+ y(this, "token");
636
734
  this.token = a;
637
735
  }
638
736
  }
639
737
  const H = { UnexpectedNewLineInString: "Unexpected newline while consuming a string token.", UnexpectedEOFInString: "Unexpected EOF while consuming a string token.", UnexpectedEOFInComment: "Unexpected EOF while consuming a comment.", UnexpectedEOFInURL: "Unexpected EOF while consuming a url token.", UnexpectedEOFInEscapedCodePoint: "Unexpected EOF while consuming an escaped code point.", UnexpectedCharacterInURL: "Unexpected character while consuming a url token.", InvalidEscapeSequenceInURL: "Invalid escape sequence while consuming a url token.", InvalidEscapeSequenceAfterBackslash: 'Invalid escape sequence after "\\"' };
640
- function G(...t) {
738
+ function G(...n) {
641
739
  let e = "";
642
- for (let n = 0; n < t.length; n++) e += t[n][1];
740
+ for (let t = 0; t < n.length; t++) e += n[t][1];
643
741
  return e;
644
742
  }
645
- const ne = 13, A = 45, re = 10, oe = 43, Z = 65533;
646
- function Ct(t) {
647
- return t.source.codePointAt(t.cursor) === 60 && t.source.codePointAt(t.cursor + 1) === 33 && t.source.codePointAt(t.cursor + 2) === A && t.source.codePointAt(t.cursor + 3) === A;
743
+ const te = 13, A = 45, re = 10, oe = 43, Z = 65533;
744
+ function kn(n) {
745
+ return n.source.codePointAt(n.cursor) === 60 && n.source.codePointAt(n.cursor + 1) === 33 && n.source.codePointAt(n.cursor + 2) === A && n.source.codePointAt(n.cursor + 3) === A;
648
746
  }
649
- function W(t) {
650
- return t >= 48 && t <= 57;
747
+ function W(n) {
748
+ return n >= 48 && n <= 57;
651
749
  }
652
- function yt(t) {
653
- return t >= 65 && t <= 90;
750
+ function En(n) {
751
+ return n >= 65 && n <= 90;
654
752
  }
655
- function kt(t) {
656
- return t >= 97 && t <= 122;
753
+ function Pn(n) {
754
+ return n >= 97 && n <= 122;
657
755
  }
658
- function te(t) {
659
- return t >= 48 && t <= 57 || t >= 97 && t <= 102 || t >= 65 && t <= 70;
756
+ function ne(n) {
757
+ return n >= 48 && n <= 57 || n >= 97 && n <= 102 || n >= 65 && n <= 70;
660
758
  }
661
- function Et(t) {
662
- return kt(t) || yt(t);
759
+ function bn(n) {
760
+ return Pn(n) || En(n);
663
761
  }
664
- function ie(t) {
665
- return Et(t) || Pt(t) || t === 95;
762
+ function ie(n) {
763
+ return bn(n) || Sn(n) || n === 95;
666
764
  }
667
- function qe(t) {
668
- return ie(t) || W(t) || t === A;
765
+ function ze(n) {
766
+ return ie(n) || W(n) || n === A;
669
767
  }
670
- function Pt(t) {
671
- return t === 183 || t === 8204 || t === 8205 || t === 8255 || t === 8256 || t === 8204 || 192 <= t && t <= 214 || 216 <= t && t <= 246 || 248 <= t && t <= 893 || 895 <= t && t <= 8191 || 8304 <= t && t <= 8591 || 11264 <= t && t <= 12271 || 12289 <= t && t <= 55295 || 63744 <= t && t <= 64975 || 65008 <= t && t <= 65533 || t === 0 || !!se(t) || t >= 65536;
768
+ function Sn(n) {
769
+ return n === 183 || n === 8204 || n === 8205 || n === 8255 || n === 8256 || n === 8204 || 192 <= n && n <= 214 || 216 <= n && n <= 246 || 248 <= n && n <= 893 || 895 <= n && n <= 8191 || 8304 <= n && n <= 8591 || 11264 <= n && n <= 12271 || 12289 <= n && n <= 55295 || 63744 <= n && n <= 64975 || 65008 <= n && n <= 65533 || n === 0 || !!se(n) || n >= 65536;
672
770
  }
673
- function be(t) {
674
- return t === re || t === ne || t === 12;
771
+ function be(n) {
772
+ return n === re || n === te || n === 12;
675
773
  }
676
- function X(t) {
677
- return t === 32 || t === re || t === 9 || t === ne || t === 12;
774
+ function X(n) {
775
+ return n === 32 || n === re || n === 9 || n === te || n === 12;
678
776
  }
679
- function se(t) {
680
- return t >= 55296 && t <= 57343;
777
+ function se(n) {
778
+ return n >= 55296 && n <= 57343;
681
779
  }
682
- function pe(t) {
683
- return t.source.codePointAt(t.cursor) === 92 && !be(t.source.codePointAt(t.cursor + 1) ?? -1);
780
+ function pe(n) {
781
+ return n.source.codePointAt(n.cursor) === 92 && !be(n.source.codePointAt(n.cursor + 1) ?? -1);
684
782
  }
685
- function Se(t, e) {
783
+ function Se(n, e) {
686
784
  return e.source.codePointAt(e.cursor) === A ? e.source.codePointAt(e.cursor + 1) === A || !!ie(e.source.codePointAt(e.cursor + 1) ?? -1) || e.source.codePointAt(e.cursor + 1) === 92 && !be(e.source.codePointAt(e.cursor + 2) ?? -1) : !!ie(e.source.codePointAt(e.cursor) ?? -1) || pe(e);
687
785
  }
688
- function Ye(t) {
689
- return t.source.codePointAt(t.cursor) === oe || t.source.codePointAt(t.cursor) === A ? !!W(t.source.codePointAt(t.cursor + 1) ?? -1) || t.source.codePointAt(t.cursor + 1) === 46 && W(t.source.codePointAt(t.cursor + 2) ?? -1) : t.source.codePointAt(t.cursor) === 46 ? W(t.source.codePointAt(t.cursor + 1) ?? -1) : W(t.source.codePointAt(t.cursor) ?? -1);
786
+ function Ze(n) {
787
+ return n.source.codePointAt(n.cursor) === oe || n.source.codePointAt(n.cursor) === A ? !!W(n.source.codePointAt(n.cursor + 1) ?? -1) || n.source.codePointAt(n.cursor + 1) === 46 && W(n.source.codePointAt(n.cursor + 2) ?? -1) : n.source.codePointAt(n.cursor) === 46 ? W(n.source.codePointAt(n.cursor + 1) ?? -1) : W(n.source.codePointAt(n.cursor) ?? -1);
690
788
  }
691
- function bt(t) {
692
- return t.source.codePointAt(t.cursor) === 47 && t.source.codePointAt(t.cursor + 1) === 42;
789
+ function An(n) {
790
+ return n.source.codePointAt(n.cursor) === 47 && n.source.codePointAt(n.cursor + 1) === 42;
693
791
  }
694
- function St(t) {
695
- return t.source.codePointAt(t.cursor) === A && t.source.codePointAt(t.cursor + 1) === A && t.source.codePointAt(t.cursor + 2) === 62;
792
+ function Bn(n) {
793
+ return n.source.codePointAt(n.cursor) === A && n.source.codePointAt(n.cursor + 1) === A && n.source.codePointAt(n.cursor + 2) === 62;
696
794
  }
697
795
  var s, p, Ae;
698
- function At(t) {
699
- switch (t) {
796
+ function Dn(n) {
797
+ switch (n) {
700
798
  case s.OpenParen:
701
799
  return s.CloseParen;
702
800
  case s.CloseParen:
@@ -713,8 +811,8 @@ function At(t) {
713
811
  return null;
714
812
  }
715
813
  }
716
- function Dt(t) {
717
- switch (t[0]) {
814
+ function Fn(n) {
815
+ switch (n[0]) {
718
816
  case s.OpenParen:
719
817
  return [s.CloseParen, ")", -1, -1, void 0];
720
818
  case s.CloseParen:
@@ -731,100 +829,100 @@ function Dt(t) {
731
829
  return null;
732
830
  }
733
831
  }
734
- function Bt(t, e) {
832
+ function Nn(n, e) {
735
833
  for (e.advanceCodePoint(2); ; ) {
736
- const n = e.readCodePoint();
737
- if (n === void 0) {
834
+ const t = e.readCodePoint();
835
+ if (t === void 0) {
738
836
  const r = [s.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
739
- return t.onParseError(new Y(H.UnexpectedEOFInComment, e.representationStart, e.representationEnd, ["4.3.2. Consume comments", "Unexpected EOF"], r)), r;
837
+ return n.onParseError(new Y(H.UnexpectedEOFInComment, e.representationStart, e.representationEnd, ["4.3.2. Consume comments", "Unexpected EOF"], r)), r;
740
838
  }
741
- if (n === 42 && e.source.codePointAt(e.cursor) !== void 0 && e.source.codePointAt(e.cursor) === 47) {
839
+ if (t === 42 && e.source.codePointAt(e.cursor) !== void 0 && e.source.codePointAt(e.cursor) === 47) {
742
840
  e.advanceCodePoint();
743
841
  break;
744
842
  }
745
843
  }
746
844
  return [s.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
747
845
  }
748
- function Be(t, e) {
749
- const n = e.readCodePoint();
750
- if (n === void 0) return t.onParseError(new De(H.UnexpectedEOFInEscapedCodePoint, e.representationStart, e.representationEnd, ["4.3.7. Consume an escaped code point", "Unexpected EOF"])), Z;
751
- if (te(n)) {
752
- const r = [n];
846
+ function De(n, e) {
847
+ const t = e.readCodePoint();
848
+ if (t === void 0) return n.onParseError(new Be(H.UnexpectedEOFInEscapedCodePoint, e.representationStart, e.representationEnd, ["4.3.7. Consume an escaped code point", "Unexpected EOF"])), Z;
849
+ if (ne(t)) {
850
+ const r = [t];
753
851
  let o;
754
- for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && te(o) && r.length < 6; ) r.push(o), e.advanceCodePoint();
755
- X(e.source.codePointAt(e.cursor) ?? -1) && (e.source.codePointAt(e.cursor) === ne && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint());
852
+ for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && ne(o) && r.length < 6; ) r.push(o), e.advanceCodePoint();
853
+ X(e.source.codePointAt(e.cursor) ?? -1) && (e.source.codePointAt(e.cursor) === te && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint());
756
854
  const i = parseInt(String.fromCodePoint(...r), 16);
757
855
  return i === 0 || se(i) || i > 1114111 ? Z : i;
758
856
  }
759
- return n === 0 || se(n) ? Z : n;
857
+ return t === 0 || se(t) ? Z : t;
760
858
  }
761
- function Fe(t, e) {
762
- const n = [];
859
+ function Fe(n, e) {
860
+ const t = [];
763
861
  for (; ; ) {
764
862
  const r = e.source.codePointAt(e.cursor) ?? -1;
765
- if (r === 0 || se(r)) n.push(Z), e.advanceCodePoint(+(r > 65535) + 1);
766
- else if (qe(r)) n.push(r), e.advanceCodePoint(+(r > 65535) + 1);
863
+ if (r === 0 || se(r)) t.push(Z), e.advanceCodePoint(+(r > 65535) + 1);
864
+ else if (ze(r)) t.push(r), e.advanceCodePoint(+(r > 65535) + 1);
767
865
  else {
768
- if (!pe(e)) return n;
769
- e.advanceCodePoint(), n.push(Be(t, e));
866
+ if (!pe(e)) return t;
867
+ e.advanceCodePoint(), t.push(De(n, e));
770
868
  }
771
869
  }
772
870
  }
773
- function Ft(t, e) {
871
+ function wn(n, e) {
774
872
  e.advanceCodePoint();
775
- const n = e.source.codePointAt(e.cursor);
776
- if (n !== void 0 && (qe(n) || pe(e))) {
873
+ const t = e.source.codePointAt(e.cursor);
874
+ if (t !== void 0 && (ze(t) || pe(e))) {
777
875
  let r = Ae.Unrestricted;
778
876
  Se(0, e) && (r = Ae.ID);
779
- const o = Fe(t, e);
877
+ const o = Fe(n, e);
780
878
  return [s.Hash, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...o), type: r }];
781
879
  }
782
880
  return [s.Delim, "#", e.representationStart, e.representationEnd, { value: "#" }];
783
881
  }
784
- function Nt(t, e) {
785
- let n = p.Integer;
882
+ function In(n, e) {
883
+ let t = p.Integer;
786
884
  for (e.source.codePointAt(e.cursor) !== oe && e.source.codePointAt(e.cursor) !== A || e.advanceCodePoint(); W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
787
- if (e.source.codePointAt(e.cursor) === 46 && W(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(2), n = p.Number; W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
885
+ if (e.source.codePointAt(e.cursor) === 46 && W(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(2), t = p.Number; W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
788
886
  if (e.source.codePointAt(e.cursor) === 101 || e.source.codePointAt(e.cursor) === 69) {
789
887
  if (W(e.source.codePointAt(e.cursor + 1) ?? -1)) e.advanceCodePoint(2);
790
888
  else {
791
- if (e.source.codePointAt(e.cursor + 1) !== A && e.source.codePointAt(e.cursor + 1) !== oe || !W(e.source.codePointAt(e.cursor + 2) ?? -1)) return n;
889
+ if (e.source.codePointAt(e.cursor + 1) !== A && e.source.codePointAt(e.cursor + 1) !== oe || !W(e.source.codePointAt(e.cursor + 2) ?? -1)) return t;
792
890
  e.advanceCodePoint(3);
793
891
  }
794
- for (n = p.Number; W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
892
+ for (t = p.Number; W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
795
893
  }
796
- return n;
894
+ return t;
797
895
  }
798
- function Me(t, e) {
799
- let n;
896
+ function Me(n, e) {
897
+ let t;
800
898
  {
801
899
  const i = e.source.codePointAt(e.cursor);
802
- i === A ? n = "-" : i === oe && (n = "+");
900
+ i === A ? t = "-" : i === oe && (t = "+");
803
901
  }
804
- const r = Nt(0, e), o = parseFloat(e.source.slice(e.representationStart, e.representationEnd + 1));
902
+ const r = In(0, e), o = parseFloat(e.source.slice(e.representationStart, e.representationEnd + 1));
805
903
  if (Se(0, e)) {
806
- const i = Fe(t, e);
807
- return [s.Dimension, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n, type: r, unit: String.fromCodePoint(...i) }];
904
+ const i = Fe(n, e);
905
+ return [s.Dimension, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: t, type: r, unit: String.fromCodePoint(...i) }];
808
906
  }
809
- return e.source.codePointAt(e.cursor) === 37 ? (e.advanceCodePoint(), [s.Percentage, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n }]) : [s.Number, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: n, type: r }];
907
+ return e.source.codePointAt(e.cursor) === 37 ? (e.advanceCodePoint(), [s.Percentage, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: t }]) : [s.Number, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: t, type: r }];
810
908
  }
811
- function wt(t) {
812
- for (; X(t.source.codePointAt(t.cursor) ?? -1); ) t.advanceCodePoint();
813
- return [s.Whitespace, t.source.slice(t.representationStart, t.representationEnd + 1), t.representationStart, t.representationEnd, void 0];
909
+ function xn(n) {
910
+ for (; X(n.source.codePointAt(n.cursor) ?? -1); ) n.advanceCodePoint();
911
+ return [s.Whitespace, n.source.slice(n.representationStart, n.representationEnd + 1), n.representationStart, n.representationEnd, void 0];
814
912
  }
815
- (function(t) {
816
- t.Comment = "comment", t.AtKeyword = "at-keyword-token", t.BadString = "bad-string-token", t.BadURL = "bad-url-token", t.CDC = "CDC-token", t.CDO = "CDO-token", t.Colon = "colon-token", t.Comma = "comma-token", t.Delim = "delim-token", t.Dimension = "dimension-token", t.EOF = "EOF-token", t.Function = "function-token", t.Hash = "hash-token", t.Ident = "ident-token", t.Number = "number-token", t.Percentage = "percentage-token", t.Semicolon = "semicolon-token", t.String = "string-token", t.URL = "url-token", t.Whitespace = "whitespace-token", t.OpenParen = "(-token", t.CloseParen = ")-token", t.OpenSquare = "[-token", t.CloseSquare = "]-token", t.OpenCurly = "{-token", t.CloseCurly = "}-token", t.UnicodeRange = "unicode-range-token";
817
- })(s || (s = {})), (function(t) {
818
- t.Integer = "integer", t.Number = "number";
819
- })(p || (p = {})), (function(t) {
820
- t.Unrestricted = "unrestricted", t.ID = "id";
913
+ (function(n) {
914
+ n.Comment = "comment", n.AtKeyword = "at-keyword-token", n.BadString = "bad-string-token", n.BadURL = "bad-url-token", n.CDC = "CDC-token", n.CDO = "CDO-token", n.Colon = "colon-token", n.Comma = "comma-token", n.Delim = "delim-token", n.Dimension = "dimension-token", n.EOF = "EOF-token", n.Function = "function-token", n.Hash = "hash-token", n.Ident = "ident-token", n.Number = "number-token", n.Percentage = "percentage-token", n.Semicolon = "semicolon-token", n.String = "string-token", n.URL = "url-token", n.Whitespace = "whitespace-token", n.OpenParen = "(-token", n.CloseParen = ")-token", n.OpenSquare = "[-token", n.CloseSquare = "]-token", n.OpenCurly = "{-token", n.CloseCurly = "}-token", n.UnicodeRange = "unicode-range-token";
915
+ })(s || (s = {})), (function(n) {
916
+ n.Integer = "integer", n.Number = "number";
917
+ })(p || (p = {})), (function(n) {
918
+ n.Unrestricted = "unrestricted", n.ID = "id";
821
919
  })(Ae || (Ae = {}));
822
- class It {
920
+ class On {
823
921
  constructor(e) {
824
- C(this, "cursor", 0);
825
- C(this, "source", "");
826
- C(this, "representationStart", 0);
827
- C(this, "representationEnd", -1);
922
+ y(this, "cursor", 0);
923
+ y(this, "source", "");
924
+ y(this, "representationStart", 0);
925
+ y(this, "representationEnd", -1);
828
926
  this.source = e;
829
927
  }
830
928
  advanceCodePoint(e = 1) {
@@ -841,83 +939,83 @@ class It {
841
939
  this.representationStart = this.cursor, this.representationEnd = -1;
842
940
  }
843
941
  }
844
- function xt(t, e) {
845
- let n = "";
942
+ function Tn(n, e) {
943
+ let t = "";
846
944
  const r = e.readCodePoint();
847
945
  for (; ; ) {
848
946
  const o = e.readCodePoint();
849
947
  if (o === void 0) {
850
- const i = [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
851
- return t.onParseError(new Y(H.UnexpectedEOFInString, e.representationStart, e.representationEnd, ["4.3.5. Consume a string token", "Unexpected EOF"], i)), i;
948
+ const i = [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
949
+ return n.onParseError(new Y(H.UnexpectedEOFInString, e.representationStart, e.representationEnd, ["4.3.5. Consume a string token", "Unexpected EOF"], i)), i;
852
950
  }
853
951
  if (be(o)) {
854
952
  e.unreadCodePoint();
855
953
  const i = [s.BadString, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
856
- return t.onParseError(new Y(H.UnexpectedNewLineInString, e.representationStart, e.source.codePointAt(e.cursor) === ne && e.source.codePointAt(e.cursor + 1) === re ? e.representationEnd + 2 : e.representationEnd + 1, ["4.3.5. Consume a string token", "Unexpected newline"], i)), i;
954
+ return n.onParseError(new Y(H.UnexpectedNewLineInString, e.representationStart, e.source.codePointAt(e.cursor) === te && e.source.codePointAt(e.cursor + 1) === re ? e.representationEnd + 2 : e.representationEnd + 1, ["4.3.5. Consume a string token", "Unexpected newline"], i)), i;
857
955
  }
858
- if (o === r) return [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
859
- if (o !== 92) o === 0 || se(o) ? n += String.fromCodePoint(Z) : n += String.fromCodePoint(o);
956
+ if (o === r) return [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
957
+ if (o !== 92) o === 0 || se(o) ? t += String.fromCodePoint(Z) : t += String.fromCodePoint(o);
860
958
  else {
861
959
  if (e.source.codePointAt(e.cursor) === void 0) continue;
862
960
  if (be(e.source.codePointAt(e.cursor) ?? -1)) {
863
- e.source.codePointAt(e.cursor) === ne && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint();
961
+ e.source.codePointAt(e.cursor) === te && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint();
864
962
  continue;
865
963
  }
866
- n += String.fromCodePoint(Be(t, e));
964
+ t += String.fromCodePoint(De(n, e));
867
965
  }
868
966
  }
869
967
  }
870
- function Ot(t) {
871
- return !(t.length !== 3 || t[0] !== 117 && t[0] !== 85 || t[1] !== 114 && t[1] !== 82 || t[2] !== 108 && t[2] !== 76);
968
+ function Mn(n) {
969
+ return !(n.length !== 3 || n[0] !== 117 && n[0] !== 85 || n[1] !== 114 && n[1] !== 82 || n[2] !== 108 && n[2] !== 76);
872
970
  }
873
- function Re(t, e) {
971
+ function Re(n, e) {
874
972
  for (; ; ) {
875
- const n = e.source.codePointAt(e.cursor);
876
- if (n === void 0) return;
877
- if (n === 41) return void e.advanceCodePoint();
878
- pe(e) ? (e.advanceCodePoint(), Be(t, e)) : e.advanceCodePoint();
973
+ const t = e.source.codePointAt(e.cursor);
974
+ if (t === void 0) return;
975
+ if (t === 41) return void e.advanceCodePoint();
976
+ pe(e) ? (e.advanceCodePoint(), De(n, e)) : e.advanceCodePoint();
879
977
  }
880
978
  }
881
- function Tt(t, e) {
979
+ function Rn(n, e) {
882
980
  for (; X(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
883
- let n = "";
981
+ let t = "";
884
982
  for (; ; ) {
885
983
  if (e.source.codePointAt(e.cursor) === void 0) {
886
- const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
887
- return t.onParseError(new Y(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Unexpected EOF"], i)), i;
984
+ const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
985
+ return n.onParseError(new Y(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Unexpected EOF"], i)), i;
888
986
  }
889
- if (e.source.codePointAt(e.cursor) === 41) return e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
987
+ if (e.source.codePointAt(e.cursor) === 41) return e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
890
988
  if (X(e.source.codePointAt(e.cursor) ?? -1)) {
891
989
  for (e.advanceCodePoint(); X(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
892
990
  if (e.source.codePointAt(e.cursor) === void 0) {
893
- const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }];
894
- return t.onParseError(new Y(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Consume as much whitespace as possible", "Unexpected EOF"], i)), i;
991
+ const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
992
+ return n.onParseError(new Y(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Consume as much whitespace as possible", "Unexpected EOF"], i)), i;
895
993
  }
896
- return e.source.codePointAt(e.cursor) === 41 ? (e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: n }]) : (Re(t, e), [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0]);
994
+ return e.source.codePointAt(e.cursor) === 41 ? (e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }]) : (Re(n, e), [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0]);
897
995
  }
898
996
  const o = e.source.codePointAt(e.cursor);
899
997
  if (o === 34 || o === 39 || o === 40 || (r = o ?? -1) === 11 || r === 127 || 0 <= r && r <= 8 || 14 <= r && r <= 31) {
900
- Re(t, e);
998
+ Re(n, e);
901
999
  const i = [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
902
- return t.onParseError(new Y(H.UnexpectedCharacterInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", `Unexpected U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point`], i)), i;
1000
+ return n.onParseError(new Y(H.UnexpectedCharacterInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", `Unexpected U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point`], i)), i;
903
1001
  }
904
1002
  if (o === 92) {
905
1003
  if (pe(e)) {
906
- e.advanceCodePoint(), n += String.fromCodePoint(Be(t, e));
1004
+ e.advanceCodePoint(), t += String.fromCodePoint(De(n, e));
907
1005
  continue;
908
1006
  }
909
- Re(t, e);
1007
+ Re(n, e);
910
1008
  const i = [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
911
- return t.onParseError(new Y(H.InvalidEscapeSequenceInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], i)), i;
1009
+ return n.onParseError(new Y(H.InvalidEscapeSequenceInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], i)), i;
912
1010
  }
913
- e.source.codePointAt(e.cursor) === 0 || se(e.source.codePointAt(e.cursor) ?? -1) ? (n += String.fromCodePoint(Z), e.advanceCodePoint()) : (n += e.source[e.cursor], e.advanceCodePoint());
1011
+ e.source.codePointAt(e.cursor) === 0 || se(e.source.codePointAt(e.cursor) ?? -1) ? (t += String.fromCodePoint(Z), e.advanceCodePoint()) : (t += e.source[e.cursor], e.advanceCodePoint());
914
1012
  }
915
1013
  var r;
916
1014
  }
917
- function Ue(t, e) {
918
- const n = Fe(t, e);
919
- if (e.source.codePointAt(e.cursor) !== 40) return [s.Ident, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
920
- if (Ot(n)) {
1015
+ function Ue(n, e) {
1016
+ const t = Fe(n, e);
1017
+ if (e.source.codePointAt(e.cursor) !== 40) return [s.Ident, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...t) }];
1018
+ if (Mn(t)) {
921
1019
  e.advanceCodePoint();
922
1020
  let r = 0;
923
1021
  for (; ; ) {
@@ -927,43 +1025,43 @@ function Ue(t, e) {
927
1025
  continue;
928
1026
  }
929
1027
  const a = o ? e.source.codePointAt(e.cursor + 1) : e.source.codePointAt(e.cursor);
930
- if (a === 34 || a === 39) return r > 0 && e.unreadCodePoint(r), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
1028
+ if (a === 34 || a === 39) return r > 0 && e.unreadCodePoint(r), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...t) }];
931
1029
  break;
932
1030
  }
933
- return Tt(t, e);
1031
+ return Rn(n, e);
934
1032
  }
935
- return e.advanceCodePoint(), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...n) }];
1033
+ return e.advanceCodePoint(), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...t) }];
936
1034
  }
937
- function Mt(t) {
938
- return !(t.source.codePointAt(t.cursor) !== 117 && t.source.codePointAt(t.cursor) !== 85 || t.source.codePointAt(t.cursor + 1) !== oe || t.source.codePointAt(t.cursor + 2) !== 63 && !te(t.source.codePointAt(t.cursor + 2) ?? -1));
1035
+ function Un(n) {
1036
+ return !(n.source.codePointAt(n.cursor) !== 117 && n.source.codePointAt(n.cursor) !== 85 || n.source.codePointAt(n.cursor + 1) !== oe || n.source.codePointAt(n.cursor + 2) !== 63 && !ne(n.source.codePointAt(n.cursor + 2) ?? -1));
939
1037
  }
940
- function Rt(t, e) {
1038
+ function Wn(n, e) {
941
1039
  e.advanceCodePoint(2);
942
- const n = [], r = [];
1040
+ const t = [], r = [];
943
1041
  let o;
944
- for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && n.length < 6 && te(o); ) n.push(o), e.advanceCodePoint();
945
- for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && n.length < 6 && o === 63; ) r.length === 0 && r.push(...n), n.push(48), r.push(70), e.advanceCodePoint();
946
- if (!r.length && e.source.codePointAt(e.cursor) === A && te(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(); (o = e.source.codePointAt(e.cursor)) !== void 0 && r.length < 6 && te(o); ) r.push(o), e.advanceCodePoint();
1042
+ for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && t.length < 6 && ne(o); ) t.push(o), e.advanceCodePoint();
1043
+ for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && t.length < 6 && o === 63; ) r.length === 0 && r.push(...t), t.push(48), r.push(70), e.advanceCodePoint();
1044
+ if (!r.length && e.source.codePointAt(e.cursor) === A && ne(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(); (o = e.source.codePointAt(e.cursor)) !== void 0 && r.length < 6 && ne(o); ) r.push(o), e.advanceCodePoint();
947
1045
  if (!r.length) {
948
- const u = parseInt(String.fromCodePoint(...n), 16);
1046
+ const u = parseInt(String.fromCodePoint(...t), 16);
949
1047
  return [s.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: u, endOfRange: u }];
950
1048
  }
951
- const i = parseInt(String.fromCodePoint(...n), 16), a = parseInt(String.fromCodePoint(...r), 16);
1049
+ const i = parseInt(String.fromCodePoint(...t), 16), a = parseInt(String.fromCodePoint(...r), 16);
952
1050
  return [s.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: i, endOfRange: a }];
953
1051
  }
954
- function Ut(t, e) {
955
- const n = Wt(t), r = [];
956
- for (; !n.endOfFile(); ) r.push(n.nextToken());
957
- return r.push(n.nextToken()), r;
1052
+ function Ln(n, e) {
1053
+ const t = $n(n), r = [];
1054
+ for (; !t.endOfFile(); ) r.push(t.nextToken());
1055
+ return r.push(t.nextToken()), r;
958
1056
  }
959
- function Wt(t, e) {
960
- const n = t.css.valueOf(), r = t.unicodeRangesAllowed ?? !1, o = new It(n), i = { onParseError: Lt };
1057
+ function $n(n, e) {
1058
+ const t = n.css.valueOf(), r = n.unicodeRangesAllowed ?? !1, o = new On(t), i = { onParseError: zn };
961
1059
  return { nextToken: function() {
962
1060
  o.resetRepresentation();
963
1061
  const u = o.source.codePointAt(o.cursor);
964
1062
  if (u === void 0) return [s.EOF, "", -1, -1, void 0];
965
- if (u === 47 && bt(o)) return Bt(i, o);
966
- if (r && (u === 117 || u === 85) && Mt(o)) return Rt(0, o);
1063
+ if (u === 47 && An(o)) return Nn(i, o);
1064
+ if (r && (u === 117 || u === 85) && Un(o)) return Wn(0, o);
967
1065
  if (ie(u)) return Ue(i, o);
968
1066
  if (W(u)) return Me(i, o);
969
1067
  switch (u) {
@@ -987,22 +1085,22 @@ function Wt(t, e) {
987
1085
  return o.advanceCodePoint(), [s.CloseCurly, "}", o.representationStart, o.representationEnd, void 0];
988
1086
  case 39:
989
1087
  case 34:
990
- return xt(i, o);
1088
+ return Tn(i, o);
991
1089
  case 35:
992
- return Ft(i, o);
1090
+ return wn(i, o);
993
1091
  case oe:
994
1092
  case 46:
995
- return Ye(o) ? Me(i, o) : (o.advanceCodePoint(), [s.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }]);
1093
+ return Ze(o) ? Me(i, o) : (o.advanceCodePoint(), [s.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }]);
996
1094
  case re:
997
- case ne:
1095
+ case te:
998
1096
  case 12:
999
1097
  case 9:
1000
1098
  case 32:
1001
- return wt(o);
1099
+ return xn(o);
1002
1100
  case A:
1003
- return Ye(o) ? Me(i, o) : St(o) ? (o.advanceCodePoint(3), [s.CDC, "-->", o.representationStart, o.representationEnd, void 0]) : Se(0, o) ? Ue(i, o) : (o.advanceCodePoint(), [s.Delim, "-", o.representationStart, o.representationEnd, { value: "-" }]);
1101
+ return Ze(o) ? Me(i, o) : Bn(o) ? (o.advanceCodePoint(3), [s.CDC, "-->", o.representationStart, o.representationEnd, void 0]) : Se(0, o) ? Ue(i, o) : (o.advanceCodePoint(), [s.Delim, "-", o.representationStart, o.representationEnd, { value: "-" }]);
1004
1102
  case 60:
1005
- return Ct(o) ? (o.advanceCodePoint(4), [s.CDO, "<!--", o.representationStart, o.representationEnd, void 0]) : (o.advanceCodePoint(), [s.Delim, "<", o.representationStart, o.representationEnd, { value: "<" }]);
1103
+ return kn(o) ? (o.advanceCodePoint(4), [s.CDO, "<!--", o.representationStart, o.representationEnd, void 0]) : (o.advanceCodePoint(), [s.Delim, "<", o.representationStart, o.representationEnd, { value: "<" }]);
1006
1104
  case 64:
1007
1105
  if (o.advanceCodePoint(), Se(0, o)) {
1008
1106
  const c = Fe(i, o);
@@ -1021,43 +1119,43 @@ function Wt(t, e) {
1021
1119
  return o.source.codePointAt(o.cursor) === void 0;
1022
1120
  } };
1023
1121
  }
1024
- function Lt() {
1122
+ function zn() {
1025
1123
  }
1026
- function $t(t, e) {
1027
- const n = [];
1028
- for (const u of e) n.push(u.codePointAt(0));
1029
- const r = qt(n);
1124
+ function qn(n, e) {
1125
+ const t = [];
1126
+ for (const u of e) t.push(u.codePointAt(0));
1127
+ const r = Vn(t);
1030
1128
  r[0] === 101 && Le(r, 0, r[0]);
1031
- const o = String.fromCodePoint(...r), i = t[4].signCharacter === "+" ? t[4].signCharacter : "", a = t[4].value.toString();
1032
- t[1] = `${i}${a}${o}`, t[4].unit = e;
1129
+ const o = String.fromCodePoint(...r), i = n[4].signCharacter === "+" ? n[4].signCharacter : "", a = n[4].value.toString();
1130
+ n[1] = `${i}${a}${o}`, n[4].unit = e;
1033
1131
  }
1034
- function qt(t) {
1132
+ function Vn(n) {
1035
1133
  let e = 0;
1036
- if (t[0] === 0) t.splice(0, 1, Z), e = 1;
1037
- else if (t[0] === A && t[1] === A) e = 2;
1038
- else if (t[0] === A && t[1]) e = 2, ie(t[1]) || (e += Le(t, 1, t[1]));
1134
+ if (n[0] === 0) n.splice(0, 1, Z), e = 1;
1135
+ else if (n[0] === A && n[1] === A) e = 2;
1136
+ else if (n[0] === A && n[1]) e = 2, ie(n[1]) || (e += Le(n, 1, n[1]));
1039
1137
  else {
1040
- if (t[0] === A && !t[1]) return [92, t[0]];
1041
- ie(t[0]) ? e = 1 : (e = 1, e += Le(t, 0, t[0]));
1138
+ if (n[0] === A && !n[1]) return [92, n[0]];
1139
+ ie(n[0]) ? e = 1 : (e = 1, e += Le(n, 0, n[0]));
1042
1140
  }
1043
- for (let n = e; n < t.length; n++) t[n] !== 0 ? qe(t[n]) || (n += zt(t, n, t[n])) : (t.splice(n, 1, Z), n++);
1044
- return t;
1141
+ for (let t = e; t < n.length; t++) n[t] !== 0 ? ze(n[t]) || (t += jn(n, t, n[t])) : (n.splice(t, 1, Z), t++);
1142
+ return n;
1045
1143
  }
1046
- function zt(t, e, n) {
1047
- return t.splice(e, 1, 92, n), 1;
1144
+ function jn(n, e, t) {
1145
+ return n.splice(e, 1, 92, t), 1;
1048
1146
  }
1049
- function Le(t, e, n) {
1050
- const r = n.toString(16), o = [];
1147
+ function Le(n, e, t) {
1148
+ const r = t.toString(16), o = [];
1051
1149
  for (const i of r) o.push(i.codePointAt(0));
1052
- return t.splice(e, 1, 92, ...o, 32), 1 + o.length;
1150
+ return n.splice(e, 1, 92, ...o, 32), 1 + o.length;
1053
1151
  }
1054
- const Vt = Object.values(s);
1055
- function et(t) {
1056
- return !!Array.isArray(t) && !(t.length < 4) && !!Vt.includes(t[0]) && typeof t[1] == "string" && typeof t[2] == "number" && typeof t[3] == "number";
1152
+ const Hn = Object.values(s);
1153
+ function nn(n) {
1154
+ return !!Array.isArray(n) && !(n.length < 4) && !!Hn.includes(n[0]) && typeof n[1] == "string" && typeof n[2] == "number" && typeof n[3] == "number";
1057
1155
  }
1058
- function D(t) {
1059
- if (!t) return !1;
1060
- switch (t[0]) {
1156
+ function B(n) {
1157
+ if (!n) return !1;
1158
+ switch (n[0]) {
1061
1159
  case s.Dimension:
1062
1160
  case s.Number:
1063
1161
  case s.Percentage:
@@ -1066,9 +1164,9 @@ function D(t) {
1066
1164
  return !1;
1067
1165
  }
1068
1166
  }
1069
- function tt(t) {
1070
- if (!t) return !1;
1071
- switch (t[0]) {
1167
+ function tn(n) {
1168
+ if (!n) return !1;
1169
+ switch (n[0]) {
1072
1170
  case s.Whitespace:
1073
1171
  case s.Comment:
1074
1172
  return !0;
@@ -1076,83 +1174,83 @@ function tt(t) {
1076
1174
  return !1;
1077
1175
  }
1078
1176
  }
1079
- function ae(t) {
1080
- return !!t && t[0] === s.Comma;
1177
+ function ae(n) {
1178
+ return !!n && n[0] === s.Comma;
1081
1179
  }
1082
- function nt(t) {
1083
- return !!t && t[0] === s.Comment;
1180
+ function rn(n) {
1181
+ return !!n && n[0] === s.Comment;
1084
1182
  }
1085
- function Ze(t) {
1086
- return !!t && t[0] === s.Delim;
1183
+ function Ke(n) {
1184
+ return !!n && n[0] === s.Delim;
1087
1185
  }
1088
- function P(t) {
1089
- return !!t && t[0] === s.Dimension;
1186
+ function P(n) {
1187
+ return !!n && n[0] === s.Dimension;
1090
1188
  }
1091
- function K(t) {
1092
- return !!t && t[0] === s.EOF;
1189
+ function K(n) {
1190
+ return !!n && n[0] === s.EOF;
1093
1191
  }
1094
- function jt(t) {
1095
- return !!t && t[0] === s.Function;
1192
+ function Gn(n) {
1193
+ return !!n && n[0] === s.Function;
1096
1194
  }
1097
- function ve(t) {
1098
- return !!t && t[0] === s.Ident;
1195
+ function me(n) {
1196
+ return !!n && n[0] === s.Ident;
1099
1197
  }
1100
- function v(t) {
1101
- return !!t && t[0] === s.Number;
1198
+ function m(n) {
1199
+ return !!n && n[0] === s.Number;
1102
1200
  }
1103
- function b(t) {
1104
- return !!t && t[0] === s.Percentage;
1201
+ function b(n) {
1202
+ return !!n && n[0] === s.Percentage;
1105
1203
  }
1106
- function ze(t) {
1107
- return !!t && t[0] === s.Whitespace;
1204
+ function qe(n) {
1205
+ return !!n && n[0] === s.Whitespace;
1108
1206
  }
1109
- function rt(t) {
1110
- return !!t && t[0] === s.OpenParen;
1207
+ function on(n) {
1208
+ return !!n && n[0] === s.OpenParen;
1111
1209
  }
1112
- function Ht(t) {
1113
- return !!t && t[0] === s.CloseParen;
1210
+ function Jn(n) {
1211
+ return !!n && n[0] === s.CloseParen;
1114
1212
  }
1115
- function Gt(t) {
1116
- return !!t && t[0] === s.OpenSquare;
1213
+ function Yn(n) {
1214
+ return !!n && n[0] === s.OpenSquare;
1117
1215
  }
1118
- function Jt(t) {
1119
- return !!t && t[0] === s.OpenCurly;
1216
+ function Zn(n) {
1217
+ return !!n && n[0] === s.OpenCurly;
1120
1218
  }
1121
1219
  var $;
1122
- function ot(t) {
1123
- let e = t.slice();
1124
- return (n, r, o) => {
1220
+ function sn(n) {
1221
+ let e = n.slice();
1222
+ return (t, r, o) => {
1125
1223
  let i = -1;
1126
- for (let a = e.indexOf(r); a < e.length && (i = n.indexOf(e[a]), i === -1 || i < o); a++) ;
1127
- return i === -1 || i === o && r === n[o] && (i++, i >= n.length) ? -1 : (e = n.slice(), i);
1224
+ for (let a = e.indexOf(r); a < e.length && (i = t.indexOf(e[a]), i === -1 || i < o); a++) ;
1225
+ return i === -1 || i === o && r === t[o] && (i++, i >= t.length) ? -1 : (e = t.slice(), i);
1128
1226
  };
1129
1227
  }
1130
- function Ve(t, e) {
1131
- const n = e[0];
1132
- if (rt(n) || Jt(n) || Gt(n)) {
1133
- const r = Zt(t, e);
1228
+ function Ve(n, e) {
1229
+ const t = e[0];
1230
+ if (on(t) || Zn(t) || Yn(t)) {
1231
+ const r = Qn(n, e);
1134
1232
  return { advance: r.advance, node: r.node };
1135
1233
  }
1136
- if (jt(n)) {
1137
- const r = Yt(t, e);
1234
+ if (Gn(t)) {
1235
+ const r = Kn(n, e);
1138
1236
  return { advance: r.advance, node: r.node };
1139
1237
  }
1140
- if (ze(n)) {
1141
- const r = st(t, e);
1238
+ if (qe(t)) {
1239
+ const r = un(n, e);
1142
1240
  return { advance: r.advance, node: r.node };
1143
1241
  }
1144
- if (nt(n)) {
1145
- const r = Kt(t, e);
1242
+ if (rn(t)) {
1243
+ const r = Xn(n, e);
1146
1244
  return { advance: r.advance, node: r.node };
1147
1245
  }
1148
- return { advance: 1, node: new f(n) };
1246
+ return { advance: 1, node: new f(t) };
1149
1247
  }
1150
- (function(t) {
1151
- t.Function = "function", t.SimpleBlock = "simple-block", t.Whitespace = "whitespace", t.Comment = "comment", t.Token = "token";
1248
+ (function(n) {
1249
+ n.Function = "function", n.SimpleBlock = "simple-block", n.Whitespace = "whitespace", n.Comment = "comment", n.Token = "token";
1152
1250
  })($ || ($ = {}));
1153
- class it {
1251
+ class an {
1154
1252
  constructor() {
1155
- C(this, "value", []);
1253
+ y(this, "value", []);
1156
1254
  }
1157
1255
  indexOf(e) {
1158
1256
  return this.value.indexOf(e);
@@ -1160,28 +1258,28 @@ class it {
1160
1258
  at(e) {
1161
1259
  if (typeof e == "number") return e < 0 && (e = this.value.length + e), this.value[e];
1162
1260
  }
1163
- forEach(e, n) {
1261
+ forEach(e, t) {
1164
1262
  if (this.value.length === 0) return;
1165
- const r = ot(this.value);
1263
+ const r = sn(this.value);
1166
1264
  let o = 0;
1167
1265
  for (; o < this.value.length; ) {
1168
1266
  const i = this.value[o];
1169
1267
  let a;
1170
- if (n && (a = { ...n }), e({ node: i, parent: this, state: a }, o) === !1) return !1;
1268
+ if (t && (a = { ...t }), e({ node: i, parent: this, state: a }, o) === !1) return !1;
1171
1269
  if (o = r(this.value, i, o), o === -1) break;
1172
1270
  }
1173
1271
  }
1174
- walk(e, n) {
1175
- this.value.length !== 0 && this.forEach(((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !this.value.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0), n);
1272
+ walk(e, t) {
1273
+ this.value.length !== 0 && this.forEach(((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !this.value.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0), t);
1176
1274
  }
1177
1275
  }
1178
- class N extends it {
1179
- constructor(n, r, o) {
1276
+ class N extends an {
1277
+ constructor(t, r, o) {
1180
1278
  super();
1181
- C(this, "type", $.Function);
1182
- C(this, "name");
1183
- C(this, "endToken");
1184
- this.name = n, this.endToken = r, this.value = o;
1279
+ y(this, "type", $.Function);
1280
+ y(this, "name");
1281
+ y(this, "endToken");
1282
+ this.name = t, this.endToken = r, this.value = o;
1185
1283
  }
1186
1284
  getName() {
1187
1285
  return this.name[4].value;
@@ -1190,91 +1288,91 @@ class N extends it {
1190
1288
  K(this.endToken) && (this.endToken = [s.CloseParen, ")", -1, -1, void 0]);
1191
1289
  }
1192
1290
  tokens() {
1193
- return K(this.endToken) ? [this.name, ...this.value.flatMap(((n) => n.tokens()))] : [this.name, ...this.value.flatMap(((n) => n.tokens())), this.endToken];
1291
+ return K(this.endToken) ? [this.name, ...this.value.flatMap(((t) => t.tokens()))] : [this.name, ...this.value.flatMap(((t) => t.tokens())), this.endToken];
1194
1292
  }
1195
1293
  toString() {
1196
- const n = this.value.map(((r) => et(r) ? G(r) : r.toString())).join("");
1197
- return G(this.name) + n + G(this.endToken);
1294
+ const t = this.value.map(((r) => nn(r) ? G(r) : r.toString())).join("");
1295
+ return G(this.name) + t + G(this.endToken);
1198
1296
  }
1199
1297
  toJSON() {
1200
- return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map(((n) => n.toJSON())) };
1298
+ return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map(((t) => t.toJSON())) };
1201
1299
  }
1202
1300
  isFunctionNode() {
1203
1301
  return N.isFunctionNode(this);
1204
1302
  }
1205
- static isFunctionNode(n) {
1206
- return !!n && n instanceof N && n.type === $.Function;
1303
+ static isFunctionNode(t) {
1304
+ return !!t && t instanceof N && t.type === $.Function;
1207
1305
  }
1208
1306
  }
1209
- function Yt(t, e) {
1210
- const n = [];
1307
+ function Kn(n, e) {
1308
+ const t = [];
1211
1309
  let r = 1;
1212
1310
  for (; ; ) {
1213
1311
  const o = e[r];
1214
- if (!o || K(o)) return t.onParseError(new De("Unexpected EOF while consuming a function.", e[0][2], e[e.length - 1][3], ["5.4.9. Consume a function", "Unexpected EOF"])), { advance: e.length, node: new N(e[0], o, n) };
1215
- if (Ht(o)) return { advance: r + 1, node: new N(e[0], o, n) };
1216
- if (tt(o)) {
1217
- const a = at(t, e.slice(r));
1218
- r += a.advance, n.push(...a.nodes);
1312
+ if (!o || K(o)) return n.onParseError(new Be("Unexpected EOF while consuming a function.", e[0][2], e[e.length - 1][3], ["5.4.9. Consume a function", "Unexpected EOF"])), { advance: e.length, node: new N(e[0], o, t) };
1313
+ if (Jn(o)) return { advance: r + 1, node: new N(e[0], o, t) };
1314
+ if (tn(o)) {
1315
+ const a = cn(n, e.slice(r));
1316
+ r += a.advance, t.push(...a.nodes);
1219
1317
  continue;
1220
1318
  }
1221
- const i = Ve(t, e.slice(r));
1222
- r += i.advance, n.push(i.node);
1319
+ const i = Ve(n, e.slice(r));
1320
+ r += i.advance, t.push(i.node);
1223
1321
  }
1224
1322
  }
1225
- class ue extends it {
1226
- constructor(n, r, o) {
1323
+ class ue extends an {
1324
+ constructor(t, r, o) {
1227
1325
  super();
1228
- C(this, "type", $.SimpleBlock);
1229
- C(this, "startToken");
1230
- C(this, "endToken");
1231
- this.startToken = n, this.endToken = r, this.value = o;
1326
+ y(this, "type", $.SimpleBlock);
1327
+ y(this, "startToken");
1328
+ y(this, "endToken");
1329
+ this.startToken = t, this.endToken = r, this.value = o;
1232
1330
  }
1233
1331
  normalize() {
1234
1332
  if (K(this.endToken)) {
1235
- const n = Dt(this.startToken);
1236
- n && (this.endToken = n);
1333
+ const t = Fn(this.startToken);
1334
+ t && (this.endToken = t);
1237
1335
  }
1238
1336
  }
1239
1337
  tokens() {
1240
- return K(this.endToken) ? [this.startToken, ...this.value.flatMap(((n) => n.tokens()))] : [this.startToken, ...this.value.flatMap(((n) => n.tokens())), this.endToken];
1338
+ return K(this.endToken) ? [this.startToken, ...this.value.flatMap(((t) => t.tokens()))] : [this.startToken, ...this.value.flatMap(((t) => t.tokens())), this.endToken];
1241
1339
  }
1242
1340
  toString() {
1243
- const n = this.value.map(((r) => et(r) ? G(r) : r.toString())).join("");
1244
- return G(this.startToken) + n + G(this.endToken);
1341
+ const t = this.value.map(((r) => nn(r) ? G(r) : r.toString())).join("");
1342
+ return G(this.startToken) + t + G(this.endToken);
1245
1343
  }
1246
1344
  toJSON() {
1247
- return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map(((n) => n.toJSON())) };
1345
+ return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map(((t) => t.toJSON())) };
1248
1346
  }
1249
1347
  isSimpleBlockNode() {
1250
1348
  return ue.isSimpleBlockNode(this);
1251
1349
  }
1252
- static isSimpleBlockNode(n) {
1253
- return !!n && n instanceof ue && n.type === $.SimpleBlock;
1350
+ static isSimpleBlockNode(t) {
1351
+ return !!t && t instanceof ue && t.type === $.SimpleBlock;
1254
1352
  }
1255
1353
  }
1256
- function Zt(t, e) {
1257
- const n = At(e[0][0]);
1258
- if (!n) throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");
1354
+ function Qn(n, e) {
1355
+ const t = Dn(e[0][0]);
1356
+ if (!t) throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");
1259
1357
  const r = [];
1260
1358
  let o = 1;
1261
1359
  for (; ; ) {
1262
1360
  const i = e[o];
1263
- if (!i || K(i)) return t.onParseError(new De("Unexpected EOF while consuming a simple block.", e[0][2], e[e.length - 1][3], ["5.4.8. Consume a simple block", "Unexpected EOF"])), { advance: e.length, node: new ue(e[0], i, r) };
1264
- if (i[0] === n) return { advance: o + 1, node: new ue(e[0], i, r) };
1265
- if (tt(i)) {
1266
- const u = at(t, e.slice(o));
1361
+ if (!i || K(i)) return n.onParseError(new Be("Unexpected EOF while consuming a simple block.", e[0][2], e[e.length - 1][3], ["5.4.8. Consume a simple block", "Unexpected EOF"])), { advance: e.length, node: new ue(e[0], i, r) };
1362
+ if (i[0] === t) return { advance: o + 1, node: new ue(e[0], i, r) };
1363
+ if (tn(i)) {
1364
+ const u = cn(n, e.slice(o));
1267
1365
  o += u.advance, r.push(...u.nodes);
1268
1366
  continue;
1269
1367
  }
1270
- const a = Ve(t, e.slice(o));
1368
+ const a = Ve(n, e.slice(o));
1271
1369
  o += a.advance, r.push(a.node);
1272
1370
  }
1273
1371
  }
1274
- class T {
1372
+ class M {
1275
1373
  constructor(e) {
1276
- C(this, "type", $.Whitespace);
1277
- C(this, "value");
1374
+ y(this, "type", $.Whitespace);
1375
+ y(this, "value");
1278
1376
  this.value = e;
1279
1377
  }
1280
1378
  tokens() {
@@ -1287,24 +1385,24 @@ class T {
1287
1385
  return { type: this.type, tokens: this.tokens() };
1288
1386
  }
1289
1387
  isWhitespaceNode() {
1290
- return T.isWhitespaceNode(this);
1388
+ return M.isWhitespaceNode(this);
1291
1389
  }
1292
1390
  static isWhitespaceNode(e) {
1293
- return !!e && e instanceof T && e.type === $.Whitespace;
1391
+ return !!e && e instanceof M && e.type === $.Whitespace;
1294
1392
  }
1295
1393
  }
1296
- function st(t, e) {
1297
- let n = 0;
1394
+ function un(n, e) {
1395
+ let t = 0;
1298
1396
  for (; ; ) {
1299
- const r = e[n];
1300
- if (!ze(r)) return { advance: n, node: new T(e.slice(0, n)) };
1301
- n++;
1397
+ const r = e[t];
1398
+ if (!qe(r)) return { advance: t, node: new M(e.slice(0, t)) };
1399
+ t++;
1302
1400
  }
1303
1401
  }
1304
1402
  class ce {
1305
1403
  constructor(e) {
1306
- C(this, "type", $.Comment);
1307
- C(this, "value");
1404
+ y(this, "type", $.Comment);
1405
+ y(this, "value");
1308
1406
  this.value = e;
1309
1407
  }
1310
1408
  tokens() {
@@ -1323,24 +1421,24 @@ class ce {
1323
1421
  return !!e && e instanceof ce && e.type === $.Comment;
1324
1422
  }
1325
1423
  }
1326
- function Kt(t, e) {
1424
+ function Xn(n, e) {
1327
1425
  return { advance: 1, node: new ce(e[0]) };
1328
1426
  }
1329
- function at(t, e) {
1330
- const n = [];
1427
+ function cn(n, e) {
1428
+ const t = [];
1331
1429
  let r = 0;
1332
- for (; ; ) if (ze(e[r])) {
1333
- const o = st(0, e.slice(r));
1334
- r += o.advance, n.push(o.node);
1430
+ for (; ; ) if (qe(e[r])) {
1431
+ const o = un(0, e.slice(r));
1432
+ r += o.advance, t.push(o.node);
1335
1433
  } else {
1336
- if (!nt(e[r])) return { advance: r, nodes: n };
1337
- n.push(new ce(e[r])), r++;
1434
+ if (!rn(e[r])) return { advance: r, nodes: t };
1435
+ t.push(new ce(e[r])), r++;
1338
1436
  }
1339
1437
  }
1340
1438
  class f {
1341
1439
  constructor(e) {
1342
- C(this, "type", $.Token);
1343
- C(this, "value");
1440
+ y(this, "type", $.Token);
1441
+ y(this, "value");
1344
1442
  this.value = e;
1345
1443
  }
1346
1444
  tokens() {
@@ -1359,10 +1457,10 @@ class f {
1359
1457
  return !!e && e instanceof f && e.type === $.Token;
1360
1458
  }
1361
1459
  }
1362
- function Qt(t, e) {
1363
- const n = { onParseError: (e == null ? void 0 : e.onParseError) ?? (() => {
1364
- }) }, r = [...t];
1365
- if (t.length === 0) return [];
1460
+ function _n(n, e) {
1461
+ const t = { onParseError: (e == null ? void 0 : e.onParseError) ?? (() => {
1462
+ }) }, r = [...n];
1463
+ if (n.length === 0) return [];
1366
1464
  K(r[r.length - 1]) && r.push([s.EOF, "", r[r.length - 1][2], r[r.length - 1][3], void 0]);
1367
1465
  const o = [];
1368
1466
  let i = [], a = 0;
@@ -1372,328 +1470,328 @@ function Qt(t, e) {
1372
1470
  o.push(i), i = [], a++;
1373
1471
  continue;
1374
1472
  }
1375
- const u = Ve(n, t.slice(a));
1473
+ const u = Ve(t, n.slice(a));
1376
1474
  i.push(u.node), a += u.advance;
1377
1475
  }
1378
1476
  }
1379
- function Xt(t, e, n) {
1380
- if (t.length === 0) return;
1381
- const r = ot(t);
1477
+ function et(n, e, t) {
1478
+ if (n.length === 0) return;
1479
+ const r = sn(n);
1382
1480
  let o = 0;
1383
- for (; o < t.length; ) {
1384
- const i = t[o];
1385
- if (e({ node: i, parent: { value: t }, state: void 0 }, o) === !1) return !1;
1386
- if (o = r(t, i, o), o === -1) break;
1481
+ for (; o < n.length; ) {
1482
+ const i = n[o];
1483
+ if (e({ node: i, parent: { value: n }, state: void 0 }, o) === !1) return !1;
1484
+ if (o = r(n, i, o), o === -1) break;
1387
1485
  }
1388
1486
  }
1389
- function _t(t, e, n) {
1390
- t.length !== 0 && Xt(t, ((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !t.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0));
1487
+ function nt(n, e, t) {
1488
+ n.length !== 0 && et(n, ((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !n.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0));
1391
1489
  }
1392
- function en(t, e) {
1393
- for (let n = 0; n < t.length; n++)
1394
- _t(t[n], ((r, o) => {
1490
+ function tt(n, e) {
1491
+ for (let t = 0; t < n.length; t++)
1492
+ nt(n[t], ((r, o) => {
1395
1493
  if (typeof o != "number") return;
1396
1494
  const i = e(r.node);
1397
1495
  i && (Array.isArray(i) ? r.parent.value.splice(o, 1, ...i) : r.parent.value.splice(o, 1, i));
1398
1496
  }));
1399
- return t;
1497
+ return n;
1400
1498
  }
1401
- function tn(t) {
1402
- return ue.isSimpleBlockNode(t);
1499
+ function rt(n) {
1500
+ return ue.isSimpleBlockNode(n);
1403
1501
  }
1404
- function de(t) {
1405
- return N.isFunctionNode(t);
1502
+ function de(n) {
1503
+ return N.isFunctionNode(n);
1406
1504
  }
1407
- function ut(t) {
1408
- return T.isWhitespaceNode(t);
1505
+ function ln(n) {
1506
+ return M.isWhitespaceNode(n);
1409
1507
  }
1410
- function ct(t) {
1411
- return ce.isCommentNode(t);
1508
+ function pn(n) {
1509
+ return ce.isCommentNode(n);
1412
1510
  }
1413
- function _(t) {
1414
- return ut(t) || ct(t);
1511
+ function _(n) {
1512
+ return ln(n) || pn(n);
1415
1513
  }
1416
- function h(t) {
1417
- return f.isTokenNode(t);
1514
+ function h(n) {
1515
+ return f.isTokenNode(n);
1418
1516
  }
1419
- const nn = /[A-Z]/g;
1420
- function M(t) {
1421
- return t.replace(nn, ((e) => String.fromCharCode(e.charCodeAt(0) + 32)));
1517
+ const ot = /[A-Z]/g;
1518
+ function R(n) {
1519
+ return n.replace(ot, ((e) => String.fromCharCode(e.charCodeAt(0) + 32)));
1422
1520
  }
1423
- const rn = /* @__PURE__ */ new Map([["cm", (t) => t], ["mm", (t) => 10 * t], ["q", (t) => 40 * t], ["in", (t) => t / 2.54], ["pc", (t) => t / 2.54 * 6], ["pt", (t) => t / 2.54 * 72], ["px", (t) => t / 2.54 * 96]]), Ne = /* @__PURE__ */ new Map([["deg", (t) => t], ["grad", (t) => t / 0.9], ["rad", (t) => t / 180 * Math.PI], ["turn", (t) => t / 360]]), me = /* @__PURE__ */ new Map([["deg", (t) => 0.9 * t], ["grad", (t) => t], ["rad", (t) => 0.9 * t / 180 * Math.PI], ["turn", (t) => 0.9 * t / 360]]), on = /* @__PURE__ */ new Map([["hz", (t) => t], ["khz", (t) => t / 1e3]]), sn = /* @__PURE__ */ new Map([["cm", (t) => 2.54 * t], ["mm", (t) => 25.4 * t], ["q", (t) => 25.4 * t * 4], ["in", (t) => t], ["pc", (t) => 6 * t], ["pt", (t) => 72 * t], ["px", (t) => 96 * t]]), an = /* @__PURE__ */ new Map([["hz", (t) => 1e3 * t], ["khz", (t) => t]]), un = /* @__PURE__ */ new Map([["cm", (t) => t / 10], ["mm", (t) => t], ["q", (t) => 4 * t], ["in", (t) => t / 25.4], ["pc", (t) => t / 25.4 * 6], ["pt", (t) => t / 25.4 * 72], ["px", (t) => t / 25.4 * 96]]), cn = /* @__PURE__ */ new Map([["ms", (t) => t], ["s", (t) => t / 1e3]]), ln = /* @__PURE__ */ new Map([["cm", (t) => t / 6 * 2.54], ["mm", (t) => t / 6 * 25.4], ["q", (t) => t / 6 * 25.4 * 4], ["in", (t) => t / 6], ["pc", (t) => t], ["pt", (t) => t / 6 * 72], ["px", (t) => t / 6 * 96]]), pn = /* @__PURE__ */ new Map([["cm", (t) => t / 72 * 2.54], ["mm", (t) => t / 72 * 25.4], ["q", (t) => t / 72 * 25.4 * 4], ["in", (t) => t / 72], ["pc", (t) => t / 72 * 6], ["pt", (t) => t], ["px", (t) => t / 72 * 96]]), dn = /* @__PURE__ */ new Map([["cm", (t) => t / 96 * 2.54], ["mm", (t) => t / 96 * 25.4], ["q", (t) => t / 96 * 25.4 * 4], ["in", (t) => t / 96], ["pc", (t) => t / 96 * 6], ["pt", (t) => t / 96 * 72], ["px", (t) => t]]), fn = /* @__PURE__ */ new Map([["cm", (t) => t / 4 / 10], ["mm", (t) => t / 4], ["q", (t) => t], ["in", (t) => t / 4 / 25.4], ["pc", (t) => t / 4 / 25.4 * 6], ["pt", (t) => t / 4 / 25.4 * 72], ["px", (t) => t / 4 / 25.4 * 96]]), lt = /* @__PURE__ */ new Map([["deg", (t) => 180 * t / Math.PI], ["grad", (t) => 180 * t / Math.PI / 0.9], ["rad", (t) => t], ["turn", (t) => 180 * t / Math.PI / 360]]), gn = /* @__PURE__ */ new Map([["ms", (t) => 1e3 * t], ["s", (t) => t]]), he = /* @__PURE__ */ new Map([["deg", (t) => 360 * t], ["grad", (t) => 360 * t / 0.9], ["rad", (t) => 360 * t / 180 * Math.PI], ["turn", (t) => t]]), vn = /* @__PURE__ */ new Map([["cm", rn], ["mm", un], ["q", fn], ["in", sn], ["pc", ln], ["pt", pn], ["px", dn], ["ms", cn], ["s", gn], ["deg", Ne], ["grad", me], ["rad", lt], ["turn", he], ["hz", on], ["khz", an]]);
1424
- function R(t, e) {
1425
- if (!P(t) || !P(e)) return e;
1426
- const n = M(t[4].unit), r = M(e[4].unit);
1427
- if (n === r) return e;
1428
- const o = vn.get(r);
1521
+ const it = /* @__PURE__ */ new Map([["cm", (n) => n], ["mm", (n) => 10 * n], ["q", (n) => 40 * n], ["in", (n) => n / 2.54], ["pc", (n) => n / 2.54 * 6], ["pt", (n) => n / 2.54 * 72], ["px", (n) => n / 2.54 * 96]]), Ne = /* @__PURE__ */ new Map([["deg", (n) => n], ["grad", (n) => n / 0.9], ["rad", (n) => n / 180 * Math.PI], ["turn", (n) => n / 360]]), ve = /* @__PURE__ */ new Map([["deg", (n) => 0.9 * n], ["grad", (n) => n], ["rad", (n) => 0.9 * n / 180 * Math.PI], ["turn", (n) => 0.9 * n / 360]]), st = /* @__PURE__ */ new Map([["hz", (n) => n], ["khz", (n) => n / 1e3]]), at = /* @__PURE__ */ new Map([["cm", (n) => 2.54 * n], ["mm", (n) => 25.4 * n], ["q", (n) => 25.4 * n * 4], ["in", (n) => n], ["pc", (n) => 6 * n], ["pt", (n) => 72 * n], ["px", (n) => 96 * n]]), ut = /* @__PURE__ */ new Map([["hz", (n) => 1e3 * n], ["khz", (n) => n]]), ct = /* @__PURE__ */ new Map([["cm", (n) => n / 10], ["mm", (n) => n], ["q", (n) => 4 * n], ["in", (n) => n / 25.4], ["pc", (n) => n / 25.4 * 6], ["pt", (n) => n / 25.4 * 72], ["px", (n) => n / 25.4 * 96]]), lt = /* @__PURE__ */ new Map([["ms", (n) => n], ["s", (n) => n / 1e3]]), pt = /* @__PURE__ */ new Map([["cm", (n) => n / 6 * 2.54], ["mm", (n) => n / 6 * 25.4], ["q", (n) => n / 6 * 25.4 * 4], ["in", (n) => n / 6], ["pc", (n) => n], ["pt", (n) => n / 6 * 72], ["px", (n) => n / 6 * 96]]), dt = /* @__PURE__ */ new Map([["cm", (n) => n / 72 * 2.54], ["mm", (n) => n / 72 * 25.4], ["q", (n) => n / 72 * 25.4 * 4], ["in", (n) => n / 72], ["pc", (n) => n / 72 * 6], ["pt", (n) => n], ["px", (n) => n / 72 * 96]]), ft = /* @__PURE__ */ new Map([["cm", (n) => n / 96 * 2.54], ["mm", (n) => n / 96 * 25.4], ["q", (n) => n / 96 * 25.4 * 4], ["in", (n) => n / 96], ["pc", (n) => n / 96 * 6], ["pt", (n) => n / 96 * 72], ["px", (n) => n]]), gt = /* @__PURE__ */ new Map([["cm", (n) => n / 4 / 10], ["mm", (n) => n / 4], ["q", (n) => n], ["in", (n) => n / 4 / 25.4], ["pc", (n) => n / 4 / 25.4 * 6], ["pt", (n) => n / 4 / 25.4 * 72], ["px", (n) => n / 4 / 25.4 * 96]]), dn = /* @__PURE__ */ new Map([["deg", (n) => 180 * n / Math.PI], ["grad", (n) => 180 * n / Math.PI / 0.9], ["rad", (n) => n], ["turn", (n) => 180 * n / Math.PI / 360]]), mt = /* @__PURE__ */ new Map([["ms", (n) => 1e3 * n], ["s", (n) => n]]), he = /* @__PURE__ */ new Map([["deg", (n) => 360 * n], ["grad", (n) => 360 * n / 0.9], ["rad", (n) => 360 * n / 180 * Math.PI], ["turn", (n) => n]]), vt = /* @__PURE__ */ new Map([["cm", it], ["mm", ct], ["q", gt], ["in", at], ["pc", pt], ["pt", dt], ["px", ft], ["ms", lt], ["s", mt], ["deg", Ne], ["grad", ve], ["rad", dn], ["turn", he], ["hz", st], ["khz", ut]]);
1522
+ function U(n, e) {
1523
+ if (!P(n) || !P(e)) return e;
1524
+ const t = R(n[4].unit), r = R(e[4].unit);
1525
+ if (t === r) return e;
1526
+ const o = vt.get(r);
1429
1527
  if (!o) return e;
1430
- const i = o.get(n);
1528
+ const i = o.get(t);
1431
1529
  if (!i) return e;
1432
1530
  const a = i(e[4].value), u = [s.Dimension, "", e[2], e[3], { ...e[4], signCharacter: a < 0 ? "-" : void 0, type: Number.isInteger(a) ? p.Integer : p.Number, value: a }];
1433
- return $t(u, t[4].unit), u;
1531
+ return qn(u, n[4].unit), u;
1434
1532
  }
1435
- function mn(t) {
1436
- if (t.length !== 2) return -1;
1437
- const e = t[0].value;
1438
- let n = t[1].value;
1439
- if (v(e) && v(n)) {
1440
- const r = e[4].value + n[4].value;
1441
- return new f([s.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === p.Integer && n[4].type === p.Integer ? p.Integer : p.Number }]);
1533
+ function ht(n) {
1534
+ if (n.length !== 2) return -1;
1535
+ const e = n[0].value;
1536
+ let t = n[1].value;
1537
+ if (m(e) && m(t)) {
1538
+ const r = e[4].value + t[4].value;
1539
+ return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number }]);
1442
1540
  }
1443
- if (b(e) && b(n)) {
1444
- const r = e[4].value + n[4].value;
1445
- return new f([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1541
+ if (b(e) && b(t)) {
1542
+ const r = e[4].value + t[4].value;
1543
+ return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
1446
1544
  }
1447
- if (P(e) && P(n) && (n = R(e, n), M(e[4].unit) === M(n[4].unit))) {
1448
- const r = e[4].value + n[4].value;
1449
- return new f([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === p.Integer && n[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
1545
+ if (P(e) && P(t) && (t = U(e, t), R(e[4].unit) === R(t[4].unit))) {
1546
+ const r = e[4].value + t[4].value;
1547
+ return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
1450
1548
  }
1451
1549
  return -1;
1452
1550
  }
1453
- function hn(t) {
1454
- if (t.length !== 2) return -1;
1455
- const e = t[0].value, n = t[1].value;
1456
- if (v(e) && v(n)) {
1457
- const r = e[4].value / n[4].value;
1458
- return new f([s.Number, r.toString(), e[2], n[3], { value: r, type: Number.isInteger(r) ? p.Integer : p.Number }]);
1551
+ function yt(n) {
1552
+ if (n.length !== 2) return -1;
1553
+ const e = n[0].value, t = n[1].value;
1554
+ if (m(e) && m(t)) {
1555
+ const r = e[4].value / t[4].value;
1556
+ return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: Number.isInteger(r) ? p.Integer : p.Number }]);
1459
1557
  }
1460
- if (b(e) && v(n)) {
1461
- const r = e[4].value / n[4].value;
1462
- return new f([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1558
+ if (b(e) && m(t)) {
1559
+ const r = e[4].value / t[4].value;
1560
+ return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
1463
1561
  }
1464
- if (P(e) && v(n)) {
1465
- const r = e[4].value / n[4].value;
1466
- return new f([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: Number.isInteger(r) ? p.Integer : p.Number, unit: e[4].unit }]);
1562
+ if (P(e) && m(t)) {
1563
+ const r = e[4].value / t[4].value;
1564
+ return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: Number.isInteger(r) ? p.Integer : p.Number, unit: e[4].unit }]);
1467
1565
  }
1468
1566
  return -1;
1469
1567
  }
1470
- function Q(t) {
1471
- return !!t && typeof t == "object" && "inputs" in t && Array.isArray(t.inputs) && "operation" in t;
1568
+ function Q(n) {
1569
+ return !!n && typeof n == "object" && "inputs" in n && Array.isArray(n.inputs) && "operation" in n;
1472
1570
  }
1473
- function w(t) {
1474
- if (t === -1) return -1;
1571
+ function I(n) {
1572
+ if (n === -1) return -1;
1475
1573
  const e = [];
1476
- for (let n = 0; n < t.inputs.length; n++) {
1477
- const r = t.inputs[n];
1574
+ for (let t = 0; t < n.inputs.length; t++) {
1575
+ const r = n.inputs[t];
1478
1576
  if (h(r)) {
1479
1577
  e.push(r);
1480
1578
  continue;
1481
1579
  }
1482
- const o = w(r);
1580
+ const o = I(r);
1483
1581
  if (o === -1) return -1;
1484
1582
  e.push(o);
1485
1583
  }
1486
- return t.operation(e);
1584
+ return n.operation(e);
1487
1585
  }
1488
- function Cn(t) {
1489
- if (t.length !== 2) return -1;
1490
- const e = t[0].value, n = t[1].value;
1491
- if (v(e) && v(n)) {
1492
- const r = e[4].value * n[4].value;
1493
- return new f([s.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === p.Integer && n[4].type === p.Integer ? p.Integer : p.Number }]);
1586
+ function Ct(n) {
1587
+ if (n.length !== 2) return -1;
1588
+ const e = n[0].value, t = n[1].value;
1589
+ if (m(e) && m(t)) {
1590
+ const r = e[4].value * t[4].value;
1591
+ return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number }]);
1494
1592
  }
1495
- if (b(e) && v(n)) {
1496
- const r = e[4].value * n[4].value;
1497
- return new f([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1593
+ if (b(e) && m(t)) {
1594
+ const r = e[4].value * t[4].value;
1595
+ return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
1498
1596
  }
1499
- if (v(e) && b(n)) {
1500
- const r = e[4].value * n[4].value;
1501
- return new f([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1597
+ if (m(e) && b(t)) {
1598
+ const r = e[4].value * t[4].value;
1599
+ return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
1502
1600
  }
1503
- if (P(e) && v(n)) {
1504
- const r = e[4].value * n[4].value;
1505
- return new f([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === p.Integer && n[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
1601
+ if (P(e) && m(t)) {
1602
+ const r = e[4].value * t[4].value;
1603
+ return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
1506
1604
  }
1507
- if (v(e) && P(n)) {
1508
- const r = e[4].value * n[4].value;
1509
- return new f([s.Dimension, r.toString() + n[4].unit, e[2], n[3], { value: r, type: e[4].type === p.Integer && n[4].type === p.Integer ? p.Integer : p.Number, unit: n[4].unit }]);
1605
+ if (m(e) && P(t)) {
1606
+ const r = e[4].value * t[4].value;
1607
+ return new f([s.Dimension, r.toString() + t[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: t[4].unit }]);
1510
1608
  }
1511
1609
  return -1;
1512
1610
  }
1513
- function le(t, e) {
1514
- for (let n = 0; n < t.length; n++) {
1515
- const r = t[n];
1611
+ function le(n, e) {
1612
+ for (let t = 0; t < n.length; t++) {
1613
+ const r = n[t];
1516
1614
  if (!h(r)) continue;
1517
1615
  const o = r.value;
1518
- if (!ve(o)) continue;
1519
- const i = M(o[4].value);
1616
+ if (!me(o)) continue;
1617
+ const i = R(o[4].value);
1520
1618
  switch (i) {
1521
1619
  case "e":
1522
- t.splice(n, 1, new f([s.Number, Math.E.toString(), o[2], o[3], { value: Math.E, type: p.Number }]));
1620
+ n.splice(t, 1, new f([s.Number, Math.E.toString(), o[2], o[3], { value: Math.E, type: p.Number }]));
1523
1621
  break;
1524
1622
  case "pi":
1525
- t.splice(n, 1, new f([s.Number, Math.PI.toString(), o[2], o[3], { value: Math.PI, type: p.Number }]));
1623
+ n.splice(t, 1, new f([s.Number, Math.PI.toString(), o[2], o[3], { value: Math.PI, type: p.Number }]));
1526
1624
  break;
1527
1625
  case "infinity":
1528
- t.splice(n, 1, new f([s.Number, "infinity", o[2], o[3], { value: 1 / 0, type: p.Number }]));
1626
+ n.splice(t, 1, new f([s.Number, "infinity", o[2], o[3], { value: 1 / 0, type: p.Number }]));
1529
1627
  break;
1530
1628
  case "-infinity":
1531
- t.splice(n, 1, new f([s.Number, "-infinity", o[2], o[3], { value: -1 / 0, type: p.Number }]));
1629
+ n.splice(t, 1, new f([s.Number, "-infinity", o[2], o[3], { value: -1 / 0, type: p.Number }]));
1532
1630
  break;
1533
1631
  case "nan":
1534
- t.splice(n, 1, new f([s.Number, "NaN", o[2], o[3], { value: Number.NaN, type: p.Number }]));
1632
+ n.splice(t, 1, new f([s.Number, "NaN", o[2], o[3], { value: Number.NaN, type: p.Number }]));
1535
1633
  break;
1536
1634
  default:
1537
1635
  if (e.has(i)) {
1538
1636
  const a = e.get(i);
1539
- t.splice(n, 1, new f(a));
1637
+ n.splice(t, 1, new f(a));
1540
1638
  }
1541
1639
  }
1542
1640
  }
1543
- return t;
1641
+ return n;
1544
1642
  }
1545
- function we(t) {
1546
- if (t.length !== 1) return -1;
1547
- const e = t[0].value;
1548
- return D(e) ? t[0] : -1;
1643
+ function we(n) {
1644
+ if (n.length !== 1) return -1;
1645
+ const e = n[0].value;
1646
+ return B(e) ? n[0] : -1;
1549
1647
  }
1550
- function I(t, e, n) {
1551
- return P(e) ? Ce(t, e[4].unit, n) : b(e) ? yn(t, n) : v(e) ? j(t, n) : -1;
1648
+ function x(n, e, t) {
1649
+ return P(e) ? ye(n, e[4].unit, t) : b(e) ? kt(n, t) : m(e) ? j(n, t) : -1;
1552
1650
  }
1553
- function Ce(t, e, n) {
1554
- const r = t.tokens();
1555
- return { inputs: [new f([s.Dimension, n.toString() + e, r[0][2], r[r.length - 1][3], { value: n, type: Number.isInteger(n) ? p.Integer : p.Number, unit: e }])], operation: we };
1651
+ function ye(n, e, t) {
1652
+ const r = n.tokens();
1653
+ return { inputs: [new f([s.Dimension, t.toString() + e, r[0][2], r[r.length - 1][3], { value: t, type: Number.isInteger(t) ? p.Integer : p.Number, unit: e }])], operation: we };
1556
1654
  }
1557
- function yn(t, e) {
1558
- const n = t.tokens();
1559
- return { inputs: [new f([s.Percentage, e.toString() + "%", n[0][2], n[n.length - 1][3], { value: e }])], operation: we };
1655
+ function kt(n, e) {
1656
+ const t = n.tokens();
1657
+ return { inputs: [new f([s.Percentage, e.toString() + "%", t[0][2], t[t.length - 1][3], { value: e }])], operation: we };
1560
1658
  }
1561
- function j(t, e) {
1562
- const n = t.tokens();
1563
- return { inputs: [new f([s.Number, e.toString(), n[0][2], n[n.length - 1][3], { value: e, type: Number.isInteger(e) ? p.Integer : p.Number }])], operation: we };
1659
+ function j(n, e) {
1660
+ const t = n.tokens();
1661
+ return { inputs: [new f([s.Number, e.toString(), t[0][2], t[t.length - 1][3], { value: e, type: Number.isInteger(e) ? p.Integer : p.Number }])], operation: we };
1564
1662
  }
1565
- function kn(t, e) {
1566
- const n = e.value;
1567
- return v(n) ? Ce(t, "rad", Math.acos(n[4].value)) : -1;
1663
+ function Et(n, e) {
1664
+ const t = e.value;
1665
+ return m(t) ? ye(n, "rad", Math.acos(t[4].value)) : -1;
1568
1666
  }
1569
- function En(t, e) {
1570
- const n = e.value;
1571
- return v(n) ? Ce(t, "rad", Math.asin(n[4].value)) : -1;
1667
+ function Pt(n, e) {
1668
+ const t = e.value;
1669
+ return m(t) ? ye(n, "rad", Math.asin(t[4].value)) : -1;
1572
1670
  }
1573
- function Pn(t, e) {
1574
- const n = e.value;
1575
- return v(n) ? Ce(t, "rad", Math.atan(n[4].value)) : -1;
1671
+ function bt(n, e) {
1672
+ const t = e.value;
1673
+ return m(t) ? ye(n, "rad", Math.atan(t[4].value)) : -1;
1576
1674
  }
1577
- function Ie(t) {
1578
- return P(t) || v(t);
1675
+ function Ie(n) {
1676
+ return P(n) || m(n);
1579
1677
  }
1580
- function je(t) {
1581
- if (t.length === 0) return !0;
1582
- const e = t[0];
1583
- if (!D(e)) return !1;
1584
- if (t.length === 1) return !0;
1678
+ function je(n) {
1679
+ if (n.length === 0) return !0;
1680
+ const e = n[0];
1681
+ if (!B(e)) return !1;
1682
+ if (n.length === 1) return !0;
1585
1683
  if (P(e)) {
1586
- const n = M(e[4].unit);
1587
- for (let r = 1; r < t.length; r++) {
1588
- const o = t[r];
1589
- if (e[0] !== o[0] || n !== M(o[4].unit)) return !1;
1684
+ const t = R(e[4].unit);
1685
+ for (let r = 1; r < n.length; r++) {
1686
+ const o = n[r];
1687
+ if (e[0] !== o[0] || t !== R(o[4].unit)) return !1;
1590
1688
  }
1591
1689
  return !0;
1592
1690
  }
1593
- for (let n = 1; n < t.length; n++) {
1594
- const r = t[n];
1691
+ for (let t = 1; t < n.length; t++) {
1692
+ const r = n[t];
1595
1693
  if (e[0] !== r[0]) return !1;
1596
1694
  }
1597
1695
  return !0;
1598
1696
  }
1599
- function J(t, e) {
1600
- return !!D(t) && (P(t) ? t[0] === e[0] && M(t[4].unit) === M(e[4].unit) : t[0] === e[0]);
1697
+ function J(n, e) {
1698
+ return !!B(n) && (P(n) ? n[0] === e[0] && R(n[4].unit) === R(e[4].unit) : n[0] === e[0]);
1601
1699
  }
1602
- function bn(t, e, n) {
1700
+ function St(n, e, t) {
1603
1701
  const r = e.value;
1604
1702
  if (!Ie(r)) return -1;
1605
- const o = R(r, n.value);
1606
- return J(r, o) ? Ce(t, "rad", Math.atan2(r[4].value, o[4].value)) : -1;
1703
+ const o = U(r, t.value);
1704
+ return J(r, o) ? ye(n, "rad", Math.atan2(r[4].value, o[4].value)) : -1;
1607
1705
  }
1608
- function Sn(t, e, n) {
1706
+ function At(n, e, t) {
1609
1707
  const r = e.value;
1610
- return !D(r) || !n.rawPercentages && b(r) ? -1 : I(t, r, Math.abs(r[4].value));
1708
+ return !B(r) || !t.rawPercentages && b(r) ? -1 : x(n, r, Math.abs(r[4].value));
1611
1709
  }
1612
- function An(t, e, n, r, o) {
1613
- if (!h(e) || !h(n) || !h(r)) return -1;
1710
+ function Bt(n, e, t, r, o) {
1711
+ if (!h(e) || !h(t) || !h(r)) return -1;
1614
1712
  const i = e.value;
1615
- if (!D(i) || !o.rawPercentages && b(i)) return -1;
1616
- const a = R(i, n.value);
1713
+ if (!B(i) || !o.rawPercentages && b(i)) return -1;
1714
+ const a = U(i, t.value);
1617
1715
  if (!J(i, a)) return -1;
1618
- const u = R(i, r.value);
1619
- return J(i, u) ? I(t, i, Math.max(i[4].value, Math.min(a[4].value, u[4].value))) : -1;
1620
- }
1621
- function Dn(t, e) {
1622
- const n = e.value;
1623
- if (!Ie(n)) return -1;
1624
- let r = n[4].value;
1625
- if (P(n)) switch (n[4].unit.toLowerCase()) {
1716
+ const u = U(i, r.value);
1717
+ return J(i, u) ? x(n, i, Math.max(i[4].value, Math.min(a[4].value, u[4].value))) : -1;
1718
+ }
1719
+ function Dt(n, e) {
1720
+ const t = e.value;
1721
+ if (!Ie(t)) return -1;
1722
+ let r = t[4].value;
1723
+ if (P(t)) switch (t[4].unit.toLowerCase()) {
1626
1724
  case "rad":
1627
1725
  break;
1628
1726
  case "deg":
1629
- r = Ne.get("rad")(n[4].value);
1727
+ r = Ne.get("rad")(t[4].value);
1630
1728
  break;
1631
1729
  case "grad":
1632
- r = me.get("rad")(n[4].value);
1730
+ r = ve.get("rad")(t[4].value);
1633
1731
  break;
1634
1732
  case "turn":
1635
- r = he.get("rad")(n[4].value);
1733
+ r = he.get("rad")(t[4].value);
1636
1734
  break;
1637
1735
  default:
1638
1736
  return -1;
1639
1737
  }
1640
- return r = Math.cos(r), j(t, r);
1738
+ return r = Math.cos(r), j(n, r);
1641
1739
  }
1642
- function Bn(t, e) {
1643
- const n = e.value;
1644
- return v(n) ? j(t, Math.exp(n[4].value)) : -1;
1740
+ function Ft(n, e) {
1741
+ const t = e.value;
1742
+ return m(t) ? j(n, Math.exp(t[4].value)) : -1;
1645
1743
  }
1646
- function Fn(t, e, n) {
1744
+ function Nt(n, e, t) {
1647
1745
  if (!e.every(h)) return -1;
1648
1746
  const r = e[0].value;
1649
- if (!D(r) || !n.rawPercentages && b(r)) return -1;
1650
- const o = e.map(((u) => R(r, u.value)));
1747
+ if (!B(r) || !t.rawPercentages && b(r)) return -1;
1748
+ const o = e.map(((u) => U(r, u.value)));
1651
1749
  if (!je(o)) return -1;
1652
1750
  const i = o.map(((u) => u[4].value)), a = Math.hypot(...i);
1653
- return I(t, r, a);
1751
+ return x(n, r, a);
1654
1752
  }
1655
- function Ke(t, e, n) {
1753
+ function Qe(n, e, t) {
1656
1754
  if (!e.every(h)) return -1;
1657
1755
  const r = e[0].value;
1658
- if (!D(r) || !n.rawPercentages && b(r)) return -1;
1659
- const o = e.map(((u) => R(r, u.value)));
1756
+ if (!B(r) || !t.rawPercentages && b(r)) return -1;
1757
+ const o = e.map(((u) => U(r, u.value)));
1660
1758
  if (!je(o)) return -1;
1661
1759
  const i = o.map(((u) => u[4].value)), a = Math.max(...i);
1662
- return I(t, r, a);
1760
+ return x(n, r, a);
1663
1761
  }
1664
- function Qe(t, e, n) {
1762
+ function Xe(n, e, t) {
1665
1763
  if (!e.every(h)) return -1;
1666
1764
  const r = e[0].value;
1667
- if (!D(r) || !n.rawPercentages && b(r)) return -1;
1668
- const o = e.map(((u) => R(r, u.value)));
1765
+ if (!B(r) || !t.rawPercentages && b(r)) return -1;
1766
+ const o = e.map(((u) => U(r, u.value)));
1669
1767
  if (!je(o)) return -1;
1670
1768
  const i = o.map(((u) => u[4].value)), a = Math.min(...i);
1671
- return I(t, r, a);
1769
+ return x(n, r, a);
1672
1770
  }
1673
- function Nn(t, e, n) {
1771
+ function wt(n, e, t) {
1674
1772
  const r = e.value;
1675
- if (!D(r)) return -1;
1676
- const o = R(r, n.value);
1773
+ if (!B(r)) return -1;
1774
+ const o = U(r, t.value);
1677
1775
  if (!J(r, o)) return -1;
1678
1776
  let i;
1679
- return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) && (Number.isFinite(o[4].value) || (o[4].value !== Number.POSITIVE_INFINITY || r[4].value !== Number.NEGATIVE_INFINITY && !Object.is(0 * r[4].value, -0)) && (o[4].value !== Number.NEGATIVE_INFINITY || r[4].value !== Number.POSITIVE_INFINITY && !Object.is(0 * r[4].value, 0))) ? Number.isFinite(o[4].value) ? (r[4].value % o[4].value + o[4].value) % o[4].value : r[4].value : Number.NaN, I(t, r, i);
1777
+ return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) && (Number.isFinite(o[4].value) || (o[4].value !== Number.POSITIVE_INFINITY || r[4].value !== Number.NEGATIVE_INFINITY && !Object.is(0 * r[4].value, -0)) && (o[4].value !== Number.NEGATIVE_INFINITY || r[4].value !== Number.POSITIVE_INFINITY && !Object.is(0 * r[4].value, 0))) ? Number.isFinite(o[4].value) ? (r[4].value % o[4].value + o[4].value) % o[4].value : r[4].value : Number.NaN, x(n, r, i);
1680
1778
  }
1681
- function wn(t, e, n) {
1682
- const r = e.value, o = n.value;
1683
- return !v(r) || !J(r, o) ? -1 : j(t, Math.pow(r[4].value, o[4].value));
1779
+ function It(n, e, t) {
1780
+ const r = e.value, o = t.value;
1781
+ return !m(r) || !J(r, o) ? -1 : j(n, Math.pow(r[4].value, o[4].value));
1684
1782
  }
1685
- function In(t, e, n) {
1783
+ function xt(n, e, t) {
1686
1784
  const r = e.value;
1687
- if (!D(r)) return -1;
1688
- const o = R(r, n.value);
1785
+ if (!B(r)) return -1;
1786
+ const o = U(r, t.value);
1689
1787
  if (!J(r, o)) return -1;
1690
1788
  let i;
1691
- return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) ? Number.isFinite(o[4].value) ? r[4].value % o[4].value : r[4].value : Number.NaN, I(t, r, i);
1789
+ return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) ? Number.isFinite(o[4].value) ? r[4].value % o[4].value : r[4].value : Number.NaN, x(n, r, i);
1692
1790
  }
1693
- function xn(t, e, n, r, o) {
1694
- const i = n.value;
1695
- if (!D(i) || !o.rawPercentages && b(i)) return -1;
1696
- const a = R(i, r.value);
1791
+ function Ot(n, e, t, r, o) {
1792
+ const i = t.value;
1793
+ if (!B(i) || !o.rawPercentages && b(i)) return -1;
1794
+ const a = U(i, r.value);
1697
1795
  if (!J(i, a)) return -1;
1698
1796
  let u;
1699
1797
  if (a[4].value === 0) u = Number.NaN;
@@ -1721,8 +1819,8 @@ function xn(t, e, n, r, o) {
1721
1819
  default: {
1722
1820
  let c = Math.floor(i[4].value / a[4].value) * a[4].value, d = Math.ceil(i[4].value / a[4].value) * a[4].value;
1723
1821
  if (c > d) {
1724
- const y = c;
1725
- c = d, d = y;
1822
+ const C = c;
1823
+ c = d, d = C;
1726
1824
  }
1727
1825
  const l = Math.abs(i[4].value - c), g = Math.abs(i[4].value - d);
1728
1826
  u = l === g ? d : l < g ? c : d;
@@ -1731,51 +1829,51 @@ function xn(t, e, n, r, o) {
1731
1829
  }
1732
1830
  else u = i[4].value;
1733
1831
  else u = Number.NaN;
1734
- return I(t, i, u);
1832
+ return x(n, i, u);
1735
1833
  }
1736
- function On(t, e, n) {
1834
+ function Tt(n, e, t) {
1737
1835
  const r = e.value;
1738
- return !D(r) || !n.rawPercentages && b(r) ? -1 : j(t, Math.sign(r[4].value));
1836
+ return !B(r) || !t.rawPercentages && b(r) ? -1 : j(n, Math.sign(r[4].value));
1739
1837
  }
1740
- function Tn(t, e) {
1741
- const n = e.value;
1742
- if (!Ie(n)) return -1;
1743
- let r = n[4].value;
1744
- if (P(n)) switch (M(n[4].unit)) {
1838
+ function Mt(n, e) {
1839
+ const t = e.value;
1840
+ if (!Ie(t)) return -1;
1841
+ let r = t[4].value;
1842
+ if (P(t)) switch (R(t[4].unit)) {
1745
1843
  case "rad":
1746
1844
  break;
1747
1845
  case "deg":
1748
- r = Ne.get("rad")(n[4].value);
1846
+ r = Ne.get("rad")(t[4].value);
1749
1847
  break;
1750
1848
  case "grad":
1751
- r = me.get("rad")(n[4].value);
1849
+ r = ve.get("rad")(t[4].value);
1752
1850
  break;
1753
1851
  case "turn":
1754
- r = he.get("rad")(n[4].value);
1852
+ r = he.get("rad")(t[4].value);
1755
1853
  break;
1756
1854
  default:
1757
1855
  return -1;
1758
1856
  }
1759
- return r = Math.sin(r), j(t, r);
1857
+ return r = Math.sin(r), j(n, r);
1760
1858
  }
1761
- function Mn(t, e) {
1762
- const n = e.value;
1763
- return v(n) ? j(t, Math.sqrt(n[4].value)) : -1;
1859
+ function Rt(n, e) {
1860
+ const t = e.value;
1861
+ return m(t) ? j(n, Math.sqrt(t[4].value)) : -1;
1764
1862
  }
1765
- function Rn(t, e) {
1766
- const n = e.value;
1767
- if (!Ie(n)) return -1;
1768
- const r = n[4].value;
1769
- let o = 0, i = n[4].value;
1770
- if (P(n)) switch (M(n[4].unit)) {
1863
+ function Ut(n, e) {
1864
+ const t = e.value;
1865
+ if (!Ie(t)) return -1;
1866
+ const r = t[4].value;
1867
+ let o = 0, i = t[4].value;
1868
+ if (P(t)) switch (R(t[4].unit)) {
1771
1869
  case "rad":
1772
- o = lt.get("deg")(r);
1870
+ o = dn.get("deg")(r);
1773
1871
  break;
1774
1872
  case "deg":
1775
1873
  o = r, i = Ne.get("rad")(r);
1776
1874
  break;
1777
1875
  case "grad":
1778
- o = me.get("deg")(r), i = me.get("rad")(r);
1876
+ o = ve.get("deg")(r), i = ve.get("rad")(r);
1779
1877
  break;
1780
1878
  case "turn":
1781
1879
  o = he.get("deg")(r), i = he.get("rad")(r);
@@ -1784,184 +1882,184 @@ function Rn(t, e) {
1784
1882
  return -1;
1785
1883
  }
1786
1884
  const a = o / 90;
1787
- return i = o % 90 == 0 && a % 2 != 0 ? a > 0 ? 1 / 0 : -1 / 0 : Math.tan(i), j(t, i);
1885
+ return i = o % 90 == 0 && a % 2 != 0 ? a > 0 ? 1 / 0 : -1 / 0 : Math.tan(i), j(n, i);
1788
1886
  }
1789
- function Un(t) {
1790
- if (t.length !== 2) return -1;
1791
- const e = t[0].value;
1792
- let n = t[1].value;
1793
- if (v(e) && v(n)) {
1794
- const r = e[4].value - n[4].value;
1795
- return new f([s.Number, r.toString(), e[2], n[3], { value: r, type: e[4].type === p.Integer && n[4].type === p.Integer ? p.Integer : p.Number }]);
1887
+ function Wt(n) {
1888
+ if (n.length !== 2) return -1;
1889
+ const e = n[0].value;
1890
+ let t = n[1].value;
1891
+ if (m(e) && m(t)) {
1892
+ const r = e[4].value - t[4].value;
1893
+ return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number }]);
1796
1894
  }
1797
- if (b(e) && b(n)) {
1798
- const r = e[4].value - n[4].value;
1799
- return new f([s.Percentage, r.toString() + "%", e[2], n[3], { value: r }]);
1895
+ if (b(e) && b(t)) {
1896
+ const r = e[4].value - t[4].value;
1897
+ return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
1800
1898
  }
1801
- if (P(e) && P(n) && (n = R(e, n), M(e[4].unit) === M(n[4].unit))) {
1802
- const r = e[4].value - n[4].value;
1803
- return new f([s.Dimension, r.toString() + e[4].unit, e[2], n[3], { value: r, type: e[4].type === p.Integer && n[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
1899
+ if (P(e) && P(t) && (t = U(e, t), R(e[4].unit) === R(t[4].unit))) {
1900
+ const r = e[4].value - t[4].value;
1901
+ return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
1804
1902
  }
1805
1903
  return -1;
1806
1904
  }
1807
- function Wn(t, e) {
1905
+ function Lt(n, e) {
1808
1906
  if (e.length === 1) {
1809
- const n = e[0];
1810
- if (!n || !h(n)) return -1;
1811
- const r = n.value;
1812
- return v(r) ? j(t, Math.log(r[4].value)) : -1;
1907
+ const t = e[0];
1908
+ if (!t || !h(t)) return -1;
1909
+ const r = t.value;
1910
+ return m(r) ? j(n, Math.log(r[4].value)) : -1;
1813
1911
  }
1814
1912
  if (e.length === 2) {
1815
- const n = e[0];
1816
- if (!n || !h(n)) return -1;
1817
- const r = n.value;
1818
- if (!v(r)) return -1;
1913
+ const t = e[0];
1914
+ if (!t || !h(t)) return -1;
1915
+ const r = t.value;
1916
+ if (!m(r)) return -1;
1819
1917
  const o = e[1];
1820
1918
  if (!o || !h(o)) return -1;
1821
1919
  const i = o.value;
1822
- return v(i) ? j(t, Math.log(r[4].value) / Math.log(i[4].value)) : -1;
1920
+ return m(i) ? j(n, Math.log(r[4].value) / Math.log(i[4].value)) : -1;
1823
1921
  }
1824
1922
  return -1;
1825
1923
  }
1826
- const Ln = /^none$/i;
1827
- function $e(t) {
1828
- if (Array.isArray(t)) {
1829
- const n = t.filter(((r) => !(ut(r) && ct(r))));
1830
- return n.length === 1 && $e(n[0]);
1924
+ const $t = /^none$/i;
1925
+ function $e(n) {
1926
+ if (Array.isArray(n)) {
1927
+ const t = n.filter(((r) => !(ln(r) && pn(r))));
1928
+ return t.length === 1 && $e(t[0]);
1831
1929
  }
1832
- if (!h(t)) return !1;
1833
- const e = t.value;
1834
- return !!ve(e) && Ln.test(e[4].value);
1930
+ if (!h(n)) return !1;
1931
+ const e = n.value;
1932
+ return !!me(e) && $t.test(e[4].value);
1835
1933
  }
1836
- const $n = String.fromCodePoint(0);
1837
- function qn(t, e, n, r, o, i) {
1934
+ const zt = String.fromCodePoint(0);
1935
+ function qt(n, e, t, r, o, i) {
1838
1936
  var k;
1839
1937
  if (e.fixed === -1 && !i.randomCaching) return -1;
1840
1938
  i.randomCaching || (i.randomCaching = { propertyName: "", propertyN: 0, elementID: "", documentID: "" }), i.randomCaching && !i.randomCaching.propertyN && (i.randomCaching.propertyN = 0);
1841
- const a = n.value;
1842
- if (!D(a)) return -1;
1843
- const u = R(a, r.value);
1939
+ const a = t.value;
1940
+ if (!B(a)) return -1;
1941
+ const u = U(a, r.value);
1844
1942
  if (!J(a, u)) return -1;
1845
1943
  let c = null;
1846
- if (o && (c = R(a, o.value), !J(a, c))) return -1;
1847
- if (!Number.isFinite(a[4].value) || !Number.isFinite(u[4].value) || !Number.isFinite(u[4].value - a[4].value)) return I(t, a, Number.NaN);
1848
- if (c && !Number.isFinite(c[4].value)) return I(t, a, a[4].value);
1849
- const d = e.fixed === -1 ? zn(Vn([e.dashedIdent ? e.dashedIdent : `${(k = i.randomCaching) == null ? void 0 : k.propertyName} ${i.randomCaching.propertyN++}`, e.elementShared ? "" : i.randomCaching.elementID, i.randomCaching.documentID].join($n))) : () => e.fixed;
1944
+ if (o && (c = U(a, o.value), !J(a, c))) return -1;
1945
+ if (!Number.isFinite(a[4].value) || !Number.isFinite(u[4].value) || !Number.isFinite(u[4].value - a[4].value)) return x(n, a, Number.NaN);
1946
+ if (c && !Number.isFinite(c[4].value)) return x(n, a, a[4].value);
1947
+ const d = e.fixed === -1 ? Vt(jt([e.dashedIdent ? e.dashedIdent : `${(k = i.randomCaching) == null ? void 0 : k.propertyName} ${i.randomCaching.propertyN++}`, e.elementShared ? "" : i.randomCaching.elementID, i.randomCaching.documentID].join(zt))) : () => e.fixed;
1850
1948
  let l = a[4].value, g = u[4].value;
1851
1949
  if (l > g && ([l, g] = [g, l]), c && (c[4].value <= 0 || Math.abs(l - g) / c[4].value > 1e10) && (c = null), c) {
1852
- const E = Math.max(c[4].value / 1e3, 1e-9), m = [l];
1853
- let z = 0;
1950
+ const E = Math.max(c[4].value / 1e3, 1e-9), v = [l];
1951
+ let q = 0;
1854
1952
  for (; ; ) {
1855
- z += c[4].value;
1856
- const x = l + z;
1857
- if (!(x + E < g)) {
1858
- m.push(g);
1953
+ q += c[4].value;
1954
+ const O = l + q;
1955
+ if (!(O + E < g)) {
1956
+ v.push(g);
1859
1957
  break;
1860
1958
  }
1861
- if (m.push(x), x + c[4].value - E > g) break;
1959
+ if (v.push(O), O + c[4].value - E > g) break;
1862
1960
  }
1863
- const U = d();
1864
- return I(t, a, Number(m[Math.floor(m.length * U)].toFixed(5)));
1961
+ const w = d();
1962
+ return x(n, a, Number(v[Math.floor(v.length * w)].toFixed(5)));
1865
1963
  }
1866
- const y = d();
1867
- return I(t, a, Number((y * (g - l) + l).toFixed(5)));
1964
+ const C = d();
1965
+ return x(n, a, Number((C * (g - l) + l).toFixed(5)));
1868
1966
  }
1869
- function zn(t = 0.34944106645296036, e = 0.19228640875738723, n = 0.8784393832007205, r = 0.04850964319275053) {
1967
+ function Vt(n = 0.34944106645296036, e = 0.19228640875738723, t = 0.8784393832007205, r = 0.04850964319275053) {
1870
1968
  return () => {
1871
- const o = ((t |= 0) + (e |= 0) | 0) + (r |= 0) | 0;
1872
- return r = r + 1 | 0, t = e ^ e >>> 9, e = (n |= 0) + (n << 3) | 0, n = (n = n << 21 | n >>> 11) + o | 0, (o >>> 0) / 4294967296;
1969
+ const o = ((n |= 0) + (e |= 0) | 0) + (r |= 0) | 0;
1970
+ return r = r + 1 | 0, n = e ^ e >>> 9, e = (t |= 0) + (t << 3) | 0, t = (t = t << 21 | t >>> 11) + o | 0, (o >>> 0) / 4294967296;
1873
1971
  };
1874
1972
  }
1875
- function Vn(t) {
1876
- let e = 0, n = 0, r = 0;
1973
+ function jt(n) {
1974
+ let e = 0, t = 0, r = 0;
1877
1975
  e ^= -1;
1878
- for (let o = 0, i = t.length; o < i; o++) r = 255 & (e ^ t.charCodeAt(o)), n = +("0x" + "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substring(9 * r, 9 * r + 8)), e = e >>> 8 ^ n;
1976
+ for (let o = 0, i = n.length; o < i; o++) r = 255 & (e ^ n.charCodeAt(o)), t = +("0x" + "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substring(9 * r, 9 * r + 8)), e = e >>> 8 ^ t;
1879
1977
  return (-1 ^ e) >>> 0;
1880
1978
  }
1881
- const He = /* @__PURE__ */ new Map([["abs", function(e, n, r) {
1882
- return V(e, n, r, Sn);
1883
- }], ["acos", function(e, n, r) {
1884
- return V(e, n, r, kn);
1885
- }], ["asin", function(e, n, r) {
1886
- return V(e, n, r, En);
1887
- }], ["atan", function(e, n, r) {
1888
- return V(e, n, r, Pn);
1889
- }], ["atan2", function(e, n, r) {
1890
- return ke(e, n, r, bn);
1891
- }], ["calc", F], ["clamp", function(e, n, r) {
1892
- const o = le([...e.value.filter(((m) => !_(m)))], n), i = [], a = [], u = [];
1979
+ const He = /* @__PURE__ */ new Map([["abs", function(e, t, r) {
1980
+ return V(e, t, r, At);
1981
+ }], ["acos", function(e, t, r) {
1982
+ return V(e, t, r, Et);
1983
+ }], ["asin", function(e, t, r) {
1984
+ return V(e, t, r, Pt);
1985
+ }], ["atan", function(e, t, r) {
1986
+ return V(e, t, r, bt);
1987
+ }], ["atan2", function(e, t, r) {
1988
+ return ke(e, t, r, St);
1989
+ }], ["calc", F], ["clamp", function(e, t, r) {
1990
+ const o = le([...e.value.filter(((v) => !_(v)))], t), i = [], a = [], u = [];
1893
1991
  {
1894
- let m = i;
1895
- for (let z = 0; z < o.length; z++) {
1896
- const U = o[z];
1897
- if (h(U) && ae(U.value)) {
1898
- if (m === u) return -1;
1899
- if (m === a) {
1900
- m = u;
1992
+ let v = i;
1993
+ for (let q = 0; q < o.length; q++) {
1994
+ const w = o[q];
1995
+ if (h(w) && ae(w.value)) {
1996
+ if (v === u) return -1;
1997
+ if (v === a) {
1998
+ v = u;
1901
1999
  continue;
1902
2000
  }
1903
- if (m === i) {
1904
- m = a;
2001
+ if (v === i) {
2002
+ v = a;
1905
2003
  continue;
1906
2004
  }
1907
2005
  return -1;
1908
2006
  }
1909
- m.push(U);
2007
+ v.push(w);
1910
2008
  }
1911
2009
  }
1912
2010
  const c = $e(i), d = $e(u);
1913
- if (c && d) return F(O(a), n, r);
1914
- const l = w(F(O(a), n, r));
2011
+ if (c && d) return F(T(a), t, r);
2012
+ const l = I(F(T(a), t, r));
1915
2013
  if (l === -1) return -1;
1916
2014
  if (c) {
1917
- const m = w(F(O(u), n, r));
1918
- return m === -1 ? -1 : Qe((g = l, y = m, new N([s.Function, "min(", -1, -1, { value: "min" }], [s.CloseParen, ")", -1, -1, void 0], [g, new f([s.Comma, ",", -1, -1, void 0]), y])), [l, m], r);
2015
+ const v = I(F(T(u), t, r));
2016
+ return v === -1 ? -1 : Xe((g = l, C = v, new N([s.Function, "min(", -1, -1, { value: "min" }], [s.CloseParen, ")", -1, -1, void 0], [g, new f([s.Comma, ",", -1, -1, void 0]), C])), [l, v], r);
1919
2017
  }
1920
2018
  if (d) {
1921
- const m = w(F(O(i), n, r));
1922
- return m === -1 ? -1 : Ke(Yn(m, l), [m, l], r);
2019
+ const v = I(F(T(i), t, r));
2020
+ return v === -1 ? -1 : Qe(Zt(v, l), [v, l], r);
1923
2021
  }
1924
- var g, y;
1925
- const k = w(F(O(i), n, r));
2022
+ var g, C;
2023
+ const k = I(F(T(i), t, r));
1926
2024
  if (k === -1) return -1;
1927
- const E = w(F(O(u), n, r));
1928
- return E === -1 ? -1 : An(e, k, l, E, r);
1929
- }], ["cos", function(e, n, r) {
1930
- return V(e, n, r, Dn);
1931
- }], ["exp", function(e, n, r) {
1932
- return V(e, n, r, Bn);
1933
- }], ["hypot", function(e, n, r) {
1934
- return Ee(e, e.value, n, r, Fn);
1935
- }], ["log", function(e, n, r) {
1936
- return Ee(e, e.value, n, r, Wn);
1937
- }], ["max", function(e, n, r) {
1938
- return Ee(e, e.value, n, r, Ke);
1939
- }], ["min", function(e, n, r) {
1940
- return Ee(e, e.value, n, r, Qe);
1941
- }], ["mod", function(e, n, r) {
1942
- return ke(e, n, r, Nn);
1943
- }], ["pow", function(e, n, r) {
1944
- return ke(e, n, r, wn);
1945
- }], ["random", function(e, n, r) {
1946
- const o = Jn(e.value.filter(((g) => !_(g))), n, r);
2025
+ const E = I(F(T(u), t, r));
2026
+ return E === -1 ? -1 : Bt(e, k, l, E, r);
2027
+ }], ["cos", function(e, t, r) {
2028
+ return V(e, t, r, Dt);
2029
+ }], ["exp", function(e, t, r) {
2030
+ return V(e, t, r, Ft);
2031
+ }], ["hypot", function(e, t, r) {
2032
+ return Ee(e, e.value, t, r, Nt);
2033
+ }], ["log", function(e, t, r) {
2034
+ return Ee(e, e.value, t, r, Lt);
2035
+ }], ["max", function(e, t, r) {
2036
+ return Ee(e, e.value, t, r, Qe);
2037
+ }], ["min", function(e, t, r) {
2038
+ return Ee(e, e.value, t, r, Xe);
2039
+ }], ["mod", function(e, t, r) {
2040
+ return ke(e, t, r, wt);
2041
+ }], ["pow", function(e, t, r) {
2042
+ return ke(e, t, r, It);
2043
+ }], ["random", function(e, t, r) {
2044
+ const o = Yt(e.value.filter(((g) => !_(g))), t, r);
1947
2045
  if (o === -1) return -1;
1948
- const [i, a] = o, u = pt(a, n, r);
2046
+ const [i, a] = o, u = fn(a, t, r);
1949
2047
  if (u === -1) return -1;
1950
2048
  const [c, d, l] = u;
1951
- return !c || !d ? -1 : qn(e, i, c, d, l, r);
1952
- }], ["rem", function(e, n, r) {
1953
- return ke(e, n, r, In);
1954
- }], ["round", function(e, n, r) {
1955
- const o = le([...e.value.filter(((g) => !_(g)))], n);
2049
+ return !c || !d ? -1 : qt(e, i, c, d, l, r);
2050
+ }], ["rem", function(e, t, r) {
2051
+ return ke(e, t, r, xt);
2052
+ }], ["round", function(e, t, r) {
2053
+ const o = le([...e.value.filter(((g) => !_(g)))], t);
1956
2054
  let i = "", a = !1;
1957
2055
  const u = [], c = [];
1958
2056
  {
1959
2057
  let g = u;
1960
- for (let y = 0; y < o.length; y++) {
1961
- const k = o[y];
1962
- if (!i && u.length === 0 && c.length === 0 && h(k) && ve(k.value)) {
2058
+ for (let C = 0; C < o.length; C++) {
2059
+ const k = o[C];
2060
+ if (!i && u.length === 0 && c.length === 0 && h(k) && me(k.value)) {
1963
2061
  const E = k.value[4].value.toLowerCase();
1964
- if (Gn.has(E)) {
2062
+ if (Jt.has(E)) {
1965
2063
  i = E;
1966
2064
  continue;
1967
2065
  }
@@ -1978,34 +2076,34 @@ const He = /* @__PURE__ */ new Map([["abs", function(e, n, r) {
1978
2076
  g.push(k);
1979
2077
  }
1980
2078
  }
1981
- const d = w(F(O(u), n, r));
2079
+ const d = I(F(T(u), t, r));
1982
2080
  if (d === -1) return -1;
1983
2081
  a || c.length !== 0 || c.push(new f([s.Number, "1", -1, -1, { value: 1, type: p.Integer }]));
1984
- const l = w(F(O(c), n, r));
1985
- return l === -1 ? -1 : (i || (i = "nearest"), xn(e, i, d, l, r));
1986
- }], ["sign", function(e, n, r) {
1987
- return V(e, n, r, On);
1988
- }], ["sin", function(e, n, r) {
1989
- return V(e, n, r, Tn);
1990
- }], ["sqrt", function(e, n, r) {
1991
- return V(e, n, r, Mn);
1992
- }], ["tan", function(e, n, r) {
1993
- return V(e, n, r, Rn);
2082
+ const l = I(F(T(c), t, r));
2083
+ return l === -1 ? -1 : (i || (i = "nearest"), Ot(e, i, d, l, r));
2084
+ }], ["sign", function(e, t, r) {
2085
+ return V(e, t, r, Tt);
2086
+ }], ["sin", function(e, t, r) {
2087
+ return V(e, t, r, Mt);
2088
+ }], ["sqrt", function(e, t, r) {
2089
+ return V(e, t, r, Rt);
2090
+ }], ["tan", function(e, t, r) {
2091
+ return V(e, t, r, Ut);
1994
2092
  }]]);
1995
- function F(t, e, n) {
1996
- const r = le([...t.value.filter(((i) => !_(i)))], e);
2093
+ function F(n, e, t) {
2094
+ const r = le([...n.value.filter(((i) => !_(i)))], e);
1997
2095
  if (r.length === 1 && h(r[0])) return { inputs: [r[0]], operation: we };
1998
2096
  let o = 0;
1999
2097
  for (; o < r.length; ) {
2000
2098
  const i = r[o];
2001
- if (tn(i) && rt(i.startToken)) {
2002
- const a = F(i, e, n);
2099
+ if (rt(i) && on(i.startToken)) {
2100
+ const a = F(i, e, t);
2003
2101
  if (a === -1) return -1;
2004
2102
  r.splice(o, 1, a);
2005
2103
  } else if (de(i)) {
2006
2104
  const a = He.get(i.getName().toLowerCase());
2007
2105
  if (!a) return -1;
2008
- const u = a(i, e, n);
2106
+ const u = a(i, e, t);
2009
2107
  if (u === -1) return -1;
2010
2108
  r.splice(o, 1, u);
2011
2109
  } else o++;
@@ -2023,13 +2121,13 @@ function F(t, e, n) {
2023
2121
  continue;
2024
2122
  }
2025
2123
  const u = a.value;
2026
- if (!Ze(u) || u[4].value !== "*" && u[4].value !== "/") {
2124
+ if (!Ke(u) || u[4].value !== "*" && u[4].value !== "/") {
2027
2125
  o++;
2028
2126
  continue;
2029
2127
  }
2030
2128
  const c = r[o + 2];
2031
2129
  if (!c || !h(c) && !Q(c)) return -1;
2032
- u[4].value !== "*" ? u[4].value !== "/" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: hn }) : r.splice(o, 3, { inputs: [i, c], operation: Cn });
2130
+ u[4].value !== "*" ? u[4].value !== "/" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: yt }) : r.splice(o, 3, { inputs: [i, c], operation: Ct });
2033
2131
  }
2034
2132
  if (o = 0, r.length === 1 && Q(r[0])) return r[0];
2035
2133
  for (; o < r.length; ) {
@@ -2044,32 +2142,32 @@ function F(t, e, n) {
2044
2142
  continue;
2045
2143
  }
2046
2144
  const u = a.value;
2047
- if (!Ze(u) || u[4].value !== "+" && u[4].value !== "-") {
2145
+ if (!Ke(u) || u[4].value !== "+" && u[4].value !== "-") {
2048
2146
  o++;
2049
2147
  continue;
2050
2148
  }
2051
2149
  const c = r[o + 2];
2052
2150
  if (!c || !h(c) && !Q(c)) return -1;
2053
- u[4].value !== "+" ? u[4].value !== "-" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: Un }) : r.splice(o, 3, { inputs: [i, c], operation: mn });
2151
+ u[4].value !== "+" ? u[4].value !== "-" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: Wt }) : r.splice(o, 3, { inputs: [i, c], operation: ht });
2054
2152
  }
2055
2153
  return r.length === 1 && Q(r[0]) ? r[0] : -1;
2056
2154
  }
2057
- function V(t, e, n, r) {
2058
- const o = jn(t.value, e, n);
2059
- return o === -1 ? -1 : r(t, o, n);
2155
+ function V(n, e, t, r) {
2156
+ const o = Ht(n.value, e, t);
2157
+ return o === -1 ? -1 : r(n, o, t);
2060
2158
  }
2061
- function jn(t, e, n) {
2062
- const r = w(F(O(le([...t.filter(((o) => !_(o)))], e)), e, n));
2159
+ function Ht(n, e, t) {
2160
+ const r = I(F(T(le([...n.filter(((o) => !_(o)))], e)), e, t));
2063
2161
  return r === -1 ? -1 : r;
2064
2162
  }
2065
- function ke(t, e, n, r) {
2066
- const o = Hn(t.value, e, n);
2163
+ function ke(n, e, t, r) {
2164
+ const o = Gt(n.value, e, t);
2067
2165
  if (o === -1) return -1;
2068
2166
  const [i, a] = o;
2069
- return r(t, i, a, n);
2167
+ return r(n, i, a, t);
2070
2168
  }
2071
- function Hn(t, e, n) {
2072
- const r = le([...t.filter(((c) => !_(c)))], e), o = [], i = [];
2169
+ function Gt(n, e, t) {
2170
+ const r = le([...n.filter(((c) => !_(c)))], e), o = [], i = [];
2073
2171
  {
2074
2172
  let c = o;
2075
2173
  for (let d = 0; d < r.length; d++) {
@@ -2085,17 +2183,17 @@ function Hn(t, e, n) {
2085
2183
  c.push(l);
2086
2184
  }
2087
2185
  }
2088
- const a = w(F(O(o), e, n));
2186
+ const a = I(F(T(o), e, t));
2089
2187
  if (a === -1) return -1;
2090
- const u = w(F(O(i), e, n));
2188
+ const u = I(F(T(i), e, t));
2091
2189
  return u === -1 ? -1 : [a, u];
2092
2190
  }
2093
- function Ee(t, e, n, r, o) {
2094
- const i = pt(t.value, n, r);
2095
- return i === -1 ? -1 : o(t, i, r);
2191
+ function Ee(n, e, t, r, o) {
2192
+ const i = fn(n.value, t, r);
2193
+ return i === -1 ? -1 : o(n, i, r);
2096
2194
  }
2097
- function pt(t, e, n) {
2098
- const r = le([...t.filter(((i) => !_(i)))], e), o = [];
2195
+ function fn(n, e, t) {
2196
+ const r = le([...n.filter(((i) => !_(i)))], e), o = [];
2099
2197
  {
2100
2198
  const i = [];
2101
2199
  let a = [];
@@ -2106,22 +2204,22 @@ function pt(t, e, n) {
2106
2204
  i.push(a);
2107
2205
  for (let u = 0; u < i.length; u++) {
2108
2206
  if (i[u].length === 0) return -1;
2109
- const c = w(F(O(i[u]), e, n));
2207
+ const c = I(F(T(i[u]), e, t));
2110
2208
  if (c === -1) return -1;
2111
2209
  o.push(c);
2112
2210
  }
2113
2211
  }
2114
2212
  return o;
2115
2213
  }
2116
- const Gn = /* @__PURE__ */ new Set(["nearest", "up", "down", "to-zero"]);
2117
- function Jn(t, e, n) {
2118
- const r = { isAuto: !1, dashedIdent: "", fixed: -1, elementShared: !1 }, o = t[0];
2119
- if (!h(o) || !ve(o.value)) return [r, t];
2120
- for (let i = 0; i < t.length; i++) {
2121
- const a = t[i];
2214
+ const Jt = /* @__PURE__ */ new Set(["nearest", "up", "down", "to-zero"]);
2215
+ function Yt(n, e, t) {
2216
+ const r = { isAuto: !1, dashedIdent: "", fixed: -1, elementShared: !1 }, o = n[0];
2217
+ if (!h(o) || !me(o.value)) return [r, n];
2218
+ for (let i = 0; i < n.length; i++) {
2219
+ const a = n[i];
2122
2220
  if (!h(a)) return -1;
2123
- if (ae(a.value)) return [r, t.slice(i + 1)];
2124
- if (!ve(a.value)) return -1;
2221
+ if (ae(a.value)) return [r, n.slice(i + 1)];
2222
+ if (!me(a.value)) return -1;
2125
2223
  const u = a.value[4].value.toLowerCase();
2126
2224
  if (u !== "element-shared") if (u !== "fixed") if (u !== "auto") {
2127
2225
  if (u.startsWith("--")) {
@@ -2135,10 +2233,10 @@ function Jn(t, e, n) {
2135
2233
  else {
2136
2234
  if (r.elementShared || r.dashedIdent || r.isAuto) return -1;
2137
2235
  i++;
2138
- const c = t[i];
2236
+ const c = n[i];
2139
2237
  if (!c) return -1;
2140
- const d = w(F(O([c]), e, n));
2141
- if (d === -1 || !v(d.value) || d.value[4].value < 0 || d.value[4].value > 1) return -1;
2238
+ const d = I(F(T([c]), e, t));
2239
+ if (d === -1 || !m(d.value) || d.value[4].value < 0 || d.value[4].value > 1) return -1;
2142
2240
  r.fixed = Math.max(0, Math.min(d.value[4].value, 1 - 1e-9));
2143
2241
  }
2144
2242
  else {
@@ -2148,218 +2246,218 @@ function Jn(t, e, n) {
2148
2246
  }
2149
2247
  return -1;
2150
2248
  }
2151
- function O(t) {
2152
- return new N([s.Function, "calc(", -1, -1, { value: "calc" }], [s.CloseParen, ")", -1, -1, void 0], t);
2153
- }
2154
- function Yn(t, e) {
2155
- return new N([s.Function, "max(", -1, -1, { value: "max" }], [s.CloseParen, ")", -1, -1, void 0], [t, new f([s.Comma, ",", -1, -1, void 0]), e]);
2156
- }
2157
- function Zn(t) {
2158
- if (t === -1) return -1;
2159
- if (de(t)) return t;
2160
- const e = t.value;
2161
- return D(e) && Number.isNaN(e[4].value) ? v(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }])]) : P(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: p.Integer, unit: e[4].unit }])]) : b(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Percentage, "1%", e[2], e[3], { value: 1 }])]) : -1 : t;
2162
- }
2163
- function Kn(t) {
2164
- if (t === -1) return -1;
2165
- if (de(t)) return t;
2166
- const e = t.value;
2167
- if (!D(e) || Number.isFinite(e[4].value) || Number.isNaN(e[4].value)) return t;
2168
- let n = "";
2169
- return Number.NEGATIVE_INFINITY === e[4].value && (n = "-"), v(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }])]) : P(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: p.Integer, unit: e[4].unit }])]) : new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, n + "infinity", e[2], e[3], { value: n + "infinity" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new T([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Percentage, "1%", e[2], e[3], { value: 1 }])]);
2170
- }
2171
- function Qn(t) {
2172
- if (t === -1) return -1;
2173
- if (de(t)) return t;
2174
- const e = t.value;
2175
- return D(e) && Object.is(-0, e[4].value) && (e[1] === "-0" || (b(e) ? e[1] = "-0%" : P(e) ? e[1] = "-0" + e[4].unit : e[1] = "-0")), t;
2176
- }
2177
- function Xn(t, e = 13) {
2178
- if (t === -1) return -1;
2179
- if (e <= 0 || de(t)) return t;
2180
- const n = t.value;
2181
- if (!D(n) || Number.isInteger(n[4].value)) return t;
2182
- const r = Number(n[4].value.toFixed(e)).toString();
2183
- return v(n) ? n[1] = r : b(n) ? n[1] = r + "%" : P(n) && (n[1] = r + n[4].unit), t;
2184
- }
2185
- function _n(t, e) {
2186
- let n = t;
2187
- return n = Xn(n, e == null ? void 0 : e.precision), n = Qn(n), n = Zn(n), n = Kn(n), n;
2188
- }
2189
- function er(t) {
2249
+ function T(n) {
2250
+ return new N([s.Function, "calc(", -1, -1, { value: "calc" }], [s.CloseParen, ")", -1, -1, void 0], n);
2251
+ }
2252
+ function Zt(n, e) {
2253
+ return new N([s.Function, "max(", -1, -1, { value: "max" }], [s.CloseParen, ")", -1, -1, void 0], [n, new f([s.Comma, ",", -1, -1, void 0]), e]);
2254
+ }
2255
+ function Kt(n) {
2256
+ if (n === -1) return -1;
2257
+ if (de(n)) return n;
2258
+ const e = n.value;
2259
+ return B(e) && Number.isNaN(e[4].value) ? m(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }])]) : P(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: p.Integer, unit: e[4].unit }])]) : b(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Percentage, "1%", e[2], e[3], { value: 1 }])]) : -1 : n;
2260
+ }
2261
+ function Qt(n) {
2262
+ if (n === -1) return -1;
2263
+ if (de(n)) return n;
2264
+ const e = n.value;
2265
+ if (!B(e) || Number.isFinite(e[4].value) || Number.isNaN(e[4].value)) return n;
2266
+ let t = "";
2267
+ return Number.NEGATIVE_INFINITY === e[4].value && (t = "-"), m(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, t + "infinity", e[2], e[3], { value: t + "infinity" }])]) : P(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, t + "infinity", e[2], e[3], { value: t + "infinity" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: p.Integer, unit: e[4].unit }])]) : new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, t + "infinity", e[2], e[3], { value: t + "infinity" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Percentage, "1%", e[2], e[3], { value: 1 }])]);
2268
+ }
2269
+ function Xt(n) {
2270
+ if (n === -1) return -1;
2271
+ if (de(n)) return n;
2272
+ const e = n.value;
2273
+ return B(e) && Object.is(-0, e[4].value) && (e[1] === "-0" || (b(e) ? e[1] = "-0%" : P(e) ? e[1] = "-0" + e[4].unit : e[1] = "-0")), n;
2274
+ }
2275
+ function _t(n, e = 13) {
2276
+ if (n === -1) return -1;
2277
+ if (e <= 0 || de(n)) return n;
2278
+ const t = n.value;
2279
+ if (!B(t) || Number.isInteger(t[4].value)) return n;
2280
+ const r = Number(t[4].value.toFixed(e)).toString();
2281
+ return m(t) ? t[1] = r : b(t) ? t[1] = r + "%" : P(t) && (t[1] = r + t[4].unit), n;
2282
+ }
2283
+ function er(n, e) {
2284
+ let t = n;
2285
+ return t = _t(t, e == null ? void 0 : e.precision), t = Xt(t), t = Kt(t), t = Qt(t), t;
2286
+ }
2287
+ function nr(n) {
2190
2288
  return /* @__PURE__ */ new Map();
2191
2289
  }
2192
- function tr(t, e) {
2193
- return nr(Qt(Ut({ css: t }), {}), e).map(((n) => n.map(((r) => G(...r.tokens()))).join(""))).join(",");
2290
+ function tr(n, e) {
2291
+ return rr(_n(Ln({ css: n }), {}), e).map(((t) => t.map(((r) => G(...r.tokens()))).join(""))).join(",");
2194
2292
  }
2195
- function nr(t, e) {
2196
- const n = er();
2197
- return en(t, ((r) => {
2293
+ function rr(n, e) {
2294
+ const t = nr();
2295
+ return tt(n, ((r) => {
2198
2296
  if (!de(r)) return;
2199
2297
  const o = He.get(r.getName().toLowerCase());
2200
2298
  if (!o) return;
2201
- const i = _n(w(o(r, n, {})), e);
2299
+ const i = er(I(o(r, t, {})), e);
2202
2300
  return i !== -1 ? i : void 0;
2203
2301
  }));
2204
2302
  }
2205
2303
  new Set(He.keys());
2206
- const L = (t) => {
2207
- const e = `${t}`, n = parseFloat(e);
2304
+ const L = (n) => {
2305
+ const e = `${n}`, t = parseFloat(e);
2208
2306
  let r = "unsupported";
2209
2307
  const o = e.match(/px|rem|em/);
2210
- return o && (r = o[0]), n === 0 && r === "unsupported" && (r = "zero"), { number: n, unit: r };
2211
- }, Xe = (t) => {
2308
+ return o && (r = o[0]), t === 0 && r === "unsupported" && (r = "zero"), { number: t, unit: r };
2309
+ }, _e = (n) => {
2212
2310
  const e = {};
2213
- if (typeof t == "string")
2214
- e.fontSize = L(t);
2215
- else if (Array.isArray(t)) {
2216
- if (e.fontSize = L(t[0]), typeof t[1] == "string")
2217
- e.lineHeight = L(t[1]);
2218
- else if (typeof t[1] == "object") {
2219
- if ("lineHeight" in t[1]) {
2220
- let n = t[1].lineHeight;
2221
- typeof n == "string" && n.includes("calc") && (n = tr(n));
2222
- const r = L(n);
2311
+ if (typeof n == "string")
2312
+ e.fontSize = L(n);
2313
+ else if (Array.isArray(n)) {
2314
+ if (e.fontSize = L(n[0]), typeof n[1] == "string")
2315
+ e.lineHeight = L(n[1]);
2316
+ else if (typeof n[1] == "object") {
2317
+ if ("lineHeight" in n[1]) {
2318
+ let t = n[1].lineHeight;
2319
+ typeof t == "string" && t.includes("calc") && (t = tr(t));
2320
+ const r = L(t);
2223
2321
  r.unit === "unsupported" ? e.lineHeight = {
2224
- number: n * e.fontSize.number,
2322
+ number: t * e.fontSize.number,
2225
2323
  unit: e.fontSize.unit
2226
2324
  } : e.lineHeight = r;
2227
2325
  }
2228
- "letterSpacing" in t[1] && (e.letterSpacing = L(t[1].letterSpacing));
2326
+ "letterSpacing" in n[1] && (e.letterSpacing = L(n[1].letterSpacing));
2229
2327
  }
2230
2328
  }
2231
2329
  return e;
2232
- }, ge = (t, e, n, r = null) => t.number === e.number ? (ee.error(
2233
- `Same value for start an end${r ? ` (${r})` : ""}: "clamp-[${n}]".`
2234
- ), null) : t.unit !== e.unit && t.unit !== "zero" && e.unit !== "zero" ? (ee.error(
2235
- `Units need to match${r ? ` (${r})` : ""}: "clamp-[${n}]" ${t.unit} !== ${e.unit}.`
2236
- ), null) : t.unit === "unsupported" || e.unit === "unsupported" ? (ee.error(
2237
- `Only px, rem and em units are supported${r ? ` (${r})` : ""}: "clamp-[${n}]".`
2238
- ), null) : !0, We = (t, e, n = { number: 23.4375, unit: "rem" }, r = { number: 90, unit: "rem" }, o = !1) => {
2239
- const i = t.unit === "zero" ? e.unit : t.unit, a = i === "px";
2240
- let u = t.number, c = e.number, d = !1, l = n.number, g = r.number;
2241
- n.unit !== "px" && a && (l = n.number * 16), n.unit === "px" && !a && (l = n.number / 16), r.unit !== "px" && a && (g = r.number * 16), r.unit === "px" && !a && (g = r.number / 16), c < u && u < 0 && c < 0 ? (u = Math.abs(u), c = Math.abs(c), d = !0) : c < u && u > 0 && c > 0 ? (u = u * -1, c = c * -1, d = !0) : c < u && (u = Math.abs(u) * -1, c = Math.abs(c), d = !0);
2242
- const y = (c - u) / (g - l), k = `${(u - l * y).toFixed(6)}${i} + ${(100 * y).toFixed(6)}${o ? "cqw" : "vw"}`, E = `clamp(${u}${i}, ${k}, ${c}${i})`;
2330
+ }, ge = (n, e, t, r = null) => n.number === e.number ? (ee.error(
2331
+ `Same value for start an end${r ? ` (${r})` : ""}: "clamp-[${t}]".`
2332
+ ), null) : n.unit !== e.unit && n.unit !== "zero" && e.unit !== "zero" ? (ee.error(
2333
+ `Units need to match${r ? ` (${r})` : ""}: "clamp-[${t}]" ${n.unit} !== ${e.unit}.`
2334
+ ), null) : n.unit === "unsupported" || e.unit === "unsupported" ? (ee.error(
2335
+ `Only px, rem and em units are supported${r ? ` (${r})` : ""}: "clamp-[${t}]".`
2336
+ ), null) : !0, We = (n, e, t = { number: 23.4375, unit: "rem" }, r = { number: 90, unit: "rem" }, o = !1) => {
2337
+ const i = n.unit === "zero" ? e.unit : n.unit, a = i === "px";
2338
+ let u = n.number, c = e.number, d = !1, l = t.number, g = r.number;
2339
+ t.unit !== "px" && a && (l = t.number * 16), t.unit === "px" && !a && (l = t.number / 16), r.unit !== "px" && a && (g = r.number * 16), r.unit === "px" && !a && (g = r.number / 16), c < u && u < 0 && c < 0 ? (u = Math.abs(u), c = Math.abs(c), d = !0) : c < u && u > 0 && c > 0 ? (u = u * -1, c = c * -1, d = !0) : c < u && (u = Math.abs(u) * -1, c = Math.abs(c), d = !0);
2340
+ const C = (c - u) / (g - l), k = `${(u - l * C).toFixed(6)}${i} + ${(100 * C).toFixed(6)}${o ? "cqw" : "vw"}`, E = `clamp(${u}${i}, ${k}, ${c}${i})`;
2243
2341
  return d ? `calc(${E} * -1)` : E;
2244
- }, rr = {
2342
+ }, or = {
2245
2343
  minSize: "23.4375rem",
2246
2344
  maxSize: "90rem"
2247
2345
  };
2248
- function Pe(t, e, n, r) {
2249
- if (!t)
2346
+ function Pe(n, e, t, r) {
2347
+ if (!n)
2250
2348
  return {
2251
2349
  ...L(e),
2252
2350
  isContainer: !1
2253
2351
  };
2254
- const o = t.startsWith("@"), i = o ? t.slice(1) : t, a = o ? r[i] || i : n[i] || i;
2352
+ const o = n.startsWith("@"), i = o ? n.slice(1) : n, a = o ? r[i] || i : t[i] || i;
2255
2353
  return {
2256
2354
  ...L(a),
2257
2355
  isContainer: o
2258
2356
  };
2259
2357
  }
2260
- const or = (t) => /^-?\d*\.?\d+(px|rem|em)$/.test(t.trim()) || t.trim() === "0", ar = mt.withOptions(function(t = {}) {
2261
- const e = { ...rr, ...t };
2262
- return function({ matchUtilities: n, addBase: r, theme: o, config: i }) {
2358
+ const ir = (n) => /^-?\d*\.?\d+(px|rem|em)$/.test(n.trim()) || n.trim() === "0", ar = yn.withOptions(function(n = {}) {
2359
+ const e = { ...or, ...n };
2360
+ return function({ matchUtilities: t, addBase: r, theme: o, config: i }) {
2263
2361
  const a = o("clamp") || {}, u = {}, c = {};
2264
2362
  for (const [d, l] of Object.entries(a)) {
2265
2363
  if (typeof l != "string") continue;
2266
2364
  const g = l.split(",")[0];
2267
- or(g) ? c[d] = l : u[d] = l;
2365
+ ir(g) ? c[d] = l : u[d] = l;
2268
2366
  }
2269
2367
  if (Object.keys(c).length > 0) {
2270
2368
  const d = o("screens"), l = o("containers"), g = {};
2271
- for (const [y, k] of Object.entries(c)) {
2272
- const E = k.split(",").map((ye) => ye.trim());
2369
+ for (const [C, k] of Object.entries(c)) {
2370
+ const E = k.split(",").map((Ce) => Ce.trim());
2273
2371
  if (E.length < 2) {
2274
2372
  ee.error(
2275
- `Theme clamp variable "--clamp-${y}" requires at least 2 values (start, end).`
2373
+ `Theme clamp variable "--clamp-${C}" requires at least 2 values (start, end).`
2276
2374
  );
2277
2375
  continue;
2278
2376
  }
2279
- const m = L(E[0]), z = L(E[1]), U = Pe(
2377
+ const v = L(E[0]), q = L(E[1]), w = Pe(
2280
2378
  E[2],
2281
2379
  e.minSize,
2282
2380
  d,
2283
2381
  l
2284
- ), x = Pe(
2382
+ ), O = Pe(
2285
2383
  E[3],
2286
2384
  e.maxSize,
2287
2385
  d,
2288
2386
  l
2289
2387
  );
2290
- if (!ge(U, x, `--clamp-${y}`) || !ge(m, z, `--clamp-${y}`)) continue;
2291
- const xe = U.isContainer;
2292
- g[`--clamp-${y}`] = We(
2293
- m,
2294
- z,
2295
- U,
2296
- x,
2388
+ if (!ge(w, O, `--clamp-${C}`) || !ge(v, q, `--clamp-${C}`)) continue;
2389
+ const xe = w.isContainer;
2390
+ g[`--clamp-${C}`] = We(
2391
+ v,
2392
+ q,
2393
+ w,
2394
+ O,
2297
2395
  xe
2298
2396
  );
2299
2397
  }
2300
2398
  Object.keys(g).length > 0 && r({ ":root": g });
2301
2399
  }
2302
- n(
2400
+ t(
2303
2401
  {
2304
2402
  clamp: (d) => {
2305
- var Ge, Je;
2403
+ var Je, Ye;
2306
2404
  const l = d.split(",");
2307
2405
  if (l.length < 3)
2308
2406
  return ee.error(
2309
2407
  `The clamp utility requires at least 3 arguments: "clamp-[${d}]".`
2310
2408
  ), {};
2311
- const g = o("screens"), y = o("containers"), k = Pe(
2409
+ const g = o("screens"), C = o("containers"), k = Pe(
2312
2410
  l[3],
2313
2411
  e.minSize,
2314
2412
  g,
2315
- y
2413
+ C
2316
2414
  ), E = Pe(
2317
2415
  l[4],
2318
2416
  e.maxSize,
2319
2417
  g,
2320
- y
2418
+ C
2321
2419
  );
2322
2420
  if (!ge(k, E, d))
2323
2421
  return {};
2324
- const m = k.isContainer, U = l[0].startsWith("--") ? { type: "regular", key: null, props: [l[0]] } : ht(l[0]);
2325
- if (!U)
2422
+ const v = k.isContainer, w = l[0].startsWith("--") ? { type: "regular", key: null, props: [l[0]] } : Cn(l[0]);
2423
+ if (!w)
2326
2424
  return ee.error(
2327
2425
  `Property "${l[0]}" is not supported: "clamp-[${d}]".`
2328
2426
  ), {};
2329
- const { key: x, props: xe, type: ye } = U;
2330
- if (ye === "fontSize") {
2331
- const S = Xe(
2332
- i().theme[x][l[1]] || l[1]
2333
- ), q = Xe(
2334
- i().theme[x][l[2]] || l[2]
2427
+ const { key: O, props: xe, type: Ce } = w;
2428
+ if (Ce === "fontSize") {
2429
+ const S = _e(
2430
+ i().theme[O][l[1]] || l[1]
2431
+ ), z = _e(
2432
+ i().theme[O][l[2]] || l[2]
2335
2433
  ), fe = {};
2336
- return Object.keys(S).forEach((B) => {
2337
- if (B in q) {
2338
- if ((B === "letterSpacing" || B === "lineHeight") && S[B].number === q[B].number && S[B].unit === q[B].unit)
2339
- fe[B] = `${S[B].number}${S[B].unit}`;
2340
- else if (ge(S[B], q[B], d, B)) {
2341
- const ft = We(
2342
- S[B],
2343
- q[B],
2434
+ return Object.keys(S).forEach((D) => {
2435
+ if (D in z) {
2436
+ if ((D === "letterSpacing" || D === "lineHeight") && S[D].number === z[D].number && S[D].unit === z[D].unit)
2437
+ fe[D] = `${S[D].number}${S[D].unit}`;
2438
+ else if (ge(S[D], z[D], d, D)) {
2439
+ const mn = We(
2440
+ S[D],
2441
+ z[D],
2344
2442
  k,
2345
2443
  E,
2346
- m
2444
+ v
2347
2445
  );
2348
- fe[B] = ft;
2446
+ fe[D] = mn;
2349
2447
  }
2350
2448
  }
2351
2449
  }), fe;
2352
2450
  }
2353
2451
  let Oe = L(
2354
- x && ((Ge = i().theme[x]) == null ? void 0 : Ge[l[1]]) || l[1]
2452
+ O && ((Je = i().theme[O]) == null ? void 0 : Je[l[1]]) || l[1]
2355
2453
  ), Te = L(
2356
- x && ((Je = i().theme[x]) == null ? void 0 : Je[l[2]]) || l[2]
2454
+ O && ((Ye = i().theme[O]) == null ? void 0 : Ye[l[2]]) || l[2]
2357
2455
  );
2358
- if (ye === "spacing") {
2456
+ if (Ce === "spacing") {
2359
2457
  const S = L(
2360
2458
  typeof o("spacing") == "string" ? o("spacing") : o("spacing.1")
2361
- ), q = /^-?\d*\.?\d+$/.test(l[1]), fe = /^-?\d*\.?\d+$/.test(l[2]);
2362
- q && (Oe = {
2459
+ ), z = /^-?\d*\.?\d+$/.test(l[1]), fe = /^-?\d*\.?\d+$/.test(l[2]);
2460
+ z && (Oe = {
2363
2461
  number: S.number * parseFloat(l[1]),
2364
2462
  unit: S.unit
2365
2463
  }), fe && (Te = {
@@ -2369,8 +2467,8 @@ const or = (t) => /^-?\d*\.?\d+(px|rem|em)$/.test(t.trim()) || t.trim() === "0",
2369
2467
  }
2370
2468
  if (!ge(Oe, Te, d))
2371
2469
  return {};
2372
- const dt = We(Oe, Te, k, E, m);
2373
- return xe.reduce((S, q) => (typeof q == "string" ? S[q] = dt : S = { ...S, ...q }, S), {});
2470
+ const gn = We(Oe, Te, k, E, v), Ge = xe.reduce((S, z) => (typeof z == "string" ? S[z] = gn : S = { ...S, ...z }, S), {});
2471
+ return w.selector ? { [w.selector]: Ge } : Ge;
2374
2472
  }
2375
2473
  },
2376
2474
  { values: u },