etudes 28.1.0 → 28.2.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.
Files changed (105) hide show
  1. package/build/etudes.js +1251 -1019
  2. package/build/etudes.umd.cjs +7 -7
  3. package/package.json +16 -15
  4. /package/build/{components → src/components}/Burger.d.ts +0 -0
  5. /package/build/{components → src/components}/BurgerButton.d.ts +0 -0
  6. /package/build/{components → src/components}/CoverImage.d.ts +0 -0
  7. /package/build/{components → src/components}/CoverVideo.d.ts +0 -0
  8. /package/build/{components → src/components}/OptionButton.d.ts +0 -0
  9. /package/build/{components → src/components}/PanoramaSlider.d.ts +0 -0
  10. /package/build/{components → src/components}/SelectableButton.d.ts +0 -0
  11. /package/build/{flows → src/flows}/Conditional.d.ts +0 -0
  12. /package/build/{flows → src/flows}/Each.d.ts +0 -0
  13. /package/build/{flows → src/flows}/Repeat.d.ts +0 -0
  14. /package/build/{flows → src/flows}/Switch.d.ts +0 -0
  15. /package/build/{hocs → src/hocs}/WithTooltip.d.ts +0 -0
  16. /package/build/{hooks → src/hooks}/useClassName.d.ts +0 -0
  17. /package/build/{hooks → src/hooks}/useClickOutside.d.ts +0 -0
  18. /package/build/{hooks → src/hooks}/useClickOutside.spec.d.ts +0 -0
  19. /package/build/{hooks → src/hooks}/useCopyBlobToClipboard.d.ts +0 -0
  20. /package/build/{hooks → src/hooks}/useDPR.d.ts +0 -0
  21. /package/build/{hooks → src/hooks}/useDownloadBlob.d.ts +0 -0
  22. /package/build/{hooks → src/hooks}/useDrag.d.ts +0 -0
  23. /package/build/{hooks → src/hooks}/useDropzone.d.ts +0 -0
  24. /package/build/{hooks → src/hooks}/useImageLoader.d.ts +0 -0
  25. /package/build/{hooks → src/hooks}/useImageSize.d.ts +0 -0
  26. /package/build/{hooks → src/hooks}/useInertiaDrag.d.ts +0 -0
  27. /package/build/{hooks → src/hooks}/useInertiaDragValue.d.ts +0 -0
  28. /package/build/{hooks → src/hooks}/useIntersectionObserver.d.ts +0 -0
  29. /package/build/{hooks → src/hooks}/useInterval.d.ts +0 -0
  30. /package/build/{hooks → src/hooks}/useInterval.spec.d.ts +0 -0
  31. /package/build/{hooks → src/hooks}/useIsMounted.d.ts +0 -0
  32. /package/build/{hooks → src/hooks}/useIsTouchDevice.d.ts +0 -0
  33. /package/build/{hooks → src/hooks}/useKeyboardShortcut.d.ts +0 -0
  34. /package/build/{hooks → src/hooks}/useKeyboardShortcut.spec.d.ts +0 -0
  35. /package/build/{hooks → src/hooks}/useLatest.d.ts +0 -0
  36. /package/build/{hooks → src/hooks}/useLatest.spec.d.ts +0 -0
  37. /package/build/{hooks → src/hooks}/useLocalCache.d.ts +0 -0
  38. /package/build/{hooks → src/hooks}/useMouseEnter.d.ts +0 -0
  39. /package/build/{hooks → src/hooks}/useMouseLeave.d.ts +0 -0
  40. /package/build/{hooks → src/hooks}/useOS.d.ts +0 -0
  41. /package/build/{hooks → src/hooks}/usePrevious.d.ts +0 -0
  42. /package/build/{hooks → src/hooks}/usePrevious.spec.d.ts +0 -0
  43. /package/build/{hooks → src/hooks}/useRect.d.ts +0 -0
  44. /package/build/{hooks → src/hooks}/useScrollPosition.d.ts +0 -0
  45. /package/build/{hooks → src/hooks}/useSessionCache.d.ts +0 -0
  46. /package/build/{hooks → src/hooks}/useSize.d.ts +0 -0
  47. /package/build/{hooks → src/hooks}/useSizeObserver.d.ts +0 -0
  48. /package/build/{hooks → src/hooks}/useStyle.d.ts +0 -0
  49. /package/build/{hooks → src/hooks}/useSystemColorScheme.d.ts +0 -0
  50. /package/build/{hooks → src/hooks}/useTimeout.d.ts +0 -0
  51. /package/build/{hooks → src/hooks}/useTimeout.spec.d.ts +0 -0
  52. /package/build/{hooks → src/hooks}/useVideoMetadataLoader.d.ts +0 -0
  53. /package/build/{hooks → src/hooks}/useVideoSize.d.ts +0 -0
  54. /package/build/{hooks → src/hooks}/useViewportSize.d.ts +0 -0
  55. /package/build/{index.d.ts → src/index.d.ts} +0 -0
  56. /package/build/{primitives → src/primitives}/Accordion.d.ts +0 -0
  57. /package/build/{primitives → src/primitives}/Button.d.ts +0 -0
  58. /package/build/{primitives → src/primitives}/Carousel.d.ts +0 -0
  59. /package/build/{primitives → src/primitives}/CodeInput.d.ts +0 -0
  60. /package/build/{primitives → src/primitives}/Collection.d.ts +0 -0
  61. /package/build/{primitives → src/primitives}/Counter.d.ts +0 -0
  62. /package/build/{primitives → src/primitives}/Dial.d.ts +0 -0
  63. /package/build/{primitives → src/primitives}/Dropdown.d.ts +0 -0
  64. /package/build/{primitives → src/primitives}/FlatSVG.d.ts +0 -0
  65. /package/build/{primitives → src/primitives}/Form.d.ts +0 -0
  66. /package/build/{primitives → src/primitives}/Image.d.ts +0 -0
  67. /package/build/{primitives → src/primitives}/MasonryGrid.d.ts +0 -0
  68. /package/build/{primitives → src/primitives}/Panorama.d.ts +0 -0
  69. /package/build/{primitives → src/primitives}/Picture.d.ts +0 -0
  70. /package/build/{primitives → src/primitives}/RangeSlider.d.ts +0 -0
  71. /package/build/{primitives → src/primitives}/Select.d.ts +0 -0
  72. /package/build/{primitives → src/primitives}/Slider.d.ts +0 -0
  73. /package/build/{primitives → src/primitives}/StepSlider.d.ts +0 -0
  74. /package/build/{primitives → src/primitives}/SwipeRegion.d.ts +0 -0
  75. /package/build/{primitives → src/primitives}/TextArea.d.ts +0 -0
  76. /package/build/{primitives → src/primitives}/TextField.d.ts +0 -0
  77. /package/build/{primitives → src/primitives}/Toggle.d.ts +0 -0
  78. /package/build/{primitives → src/primitives}/Video.d.ts +0 -0
  79. /package/build/{types → src/types}/ImageSource.d.ts +0 -0
  80. /package/build/{utils → src/utils}/ExtractChild.d.ts +0 -0
  81. /package/build/{utils → src/utils}/ExtractChildren.d.ts +0 -0
  82. /package/build/{utils → src/utils}/NoSSR.d.ts +0 -0
  83. /package/build/{utils → src/utils}/Styled.d.ts +0 -0
  84. /package/build/{utils → src/utils}/asClassNameDict.d.ts +0 -0
  85. /package/build/{utils → src/utils}/asComponentDict.d.ts +0 -0
  86. /package/build/{utils → src/utils}/asStyleDict.d.ts +0 -0
  87. /package/build/{utils → src/utils}/cloneStyledElement.d.ts +0 -0
  88. /package/build/{utils → src/utils}/cloneStyledElement.spec.d.ts +0 -0
  89. /package/build/{utils → src/utils}/createKey.d.ts +0 -0
  90. /package/build/{utils → src/utils}/createKey.spec.d.ts +0 -0
  91. /package/build/{utils → src/utils}/createKeyDeep.d.ts +0 -0
  92. /package/build/{utils → src/utils}/createKeyDeep.spec.d.ts +0 -0
  93. /package/build/{utils → src/utils}/createLocalCache.d.ts +0 -0
  94. /package/build/{utils → src/utils}/createLocalCache.spec.d.ts +0 -0
  95. /package/build/{utils → src/utils}/createSessionCache.d.ts +0 -0
  96. /package/build/{utils → src/utils}/createSessionCache.spec.d.ts +0 -0
  97. /package/build/{utils → src/utils}/getDPR.d.ts +0 -0
  98. /package/build/{utils → src/utils}/getStyle.d.ts +0 -0
  99. /package/build/{utils → src/utils}/getSystemColorScheme.d.ts +0 -0
  100. /package/build/{utils → src/utils}/isTouchDevice.d.ts +0 -0
  101. /package/build/{utils → src/utils}/measureIntrinsicSize.d.ts +0 -0
  102. /package/build/{utils → src/utils}/setStyle.d.ts +0 -0
  103. /package/build/{utils → src/utils}/setStyles.d.ts +0 -0
  104. /package/build/{utils → src/utils}/styles.d.ts +0 -0
  105. /package/build/{utils → src/utils}/styles.spec.d.ts +0 -0
package/build/etudes.js CHANGED
@@ -540,58 +540,58 @@ var B;
540
540
  e.zero = t();
541
541
  function t(e = 0, t = 0) {
542
542
  if (typeof e == "number") return {
543
- width: e,
544
- height: t
543
+ height: t,
544
+ width: e
545
545
  };
546
546
  if (!f(e)) throw Error("Invalid parameters passed to constructor");
547
547
  return e instanceof Array ? {
548
- width: e[0],
549
- height: e[1]
548
+ height: e[1],
549
+ width: e[0]
550
550
  } : {
551
- width: e.width,
552
- height: e.height
551
+ height: e.height,
552
+ width: e.width
553
553
  };
554
554
  }
555
555
  e.make = t;
556
556
  function n(e, n = {}) {
557
557
  return t({
558
- width: typeof n.width == "number" ? n.width : e.width,
559
- height: typeof n.height == "number" ? n.height : e.height
558
+ height: typeof n.height == "number" ? n.height : e.height,
559
+ width: typeof n.width == "number" ? n.width : e.width
560
560
  });
561
561
  }
562
562
  e.clone = n;
563
563
  function r(e, n) {
564
564
  return t({
565
- width: e.width + n.width,
566
- height: e.height + n.height
565
+ height: e.height + n.height,
566
+ width: e.width + n.width
567
567
  });
568
568
  }
569
569
  e.add = r;
570
570
  function i(e, n) {
571
571
  return t({
572
- width: e.width - n.width,
573
- height: e.height - n.height
572
+ height: e.height - n.height,
573
+ width: e.width - n.width
574
574
  });
575
575
  }
576
576
  e.subtract = i;
577
577
  function a(e, n) {
578
578
  return t({
579
- width: e.width * n.width,
580
- height: e.height * n.height
579
+ height: e.height * n.height,
580
+ width: e.width * n.width
581
581
  });
582
582
  }
583
583
  e.multiply = a;
584
584
  function o(e, n) {
585
585
  return t({
586
- width: e.width / n.width,
587
- height: e.height / n.height
586
+ height: e.height / n.height,
587
+ width: e.width / n.width
588
588
  });
589
589
  }
590
590
  e.divide = o;
591
591
  function s(e) {
592
592
  return t({
593
- width: e.height,
594
- height: e.width
593
+ height: e.width,
594
+ width: e.height
595
595
  });
596
596
  }
597
597
  e.rotate = s;
@@ -605,8 +605,8 @@ var B;
605
605
  e.toString = l;
606
606
  function u(e) {
607
607
  return Object.freeze({
608
- width: e.width,
609
- height: e.height
608
+ height: e.height,
609
+ width: e.width
610
610
  });
611
611
  }
612
612
  e.toJSON = u;
@@ -634,33 +634,33 @@ var V;
634
634
  if (typeof e == "number" && typeof t == "number") {
635
635
  let i = e, a = t;
636
636
  return {
637
- top: a,
638
- right: i + n,
639
637
  bottom: a + r,
638
+ height: r,
640
639
  left: i,
641
- width: n,
642
- height: r
640
+ right: i + n,
641
+ top: a,
642
+ width: n
643
643
  };
644
644
  } else if (R.isPoint(e) && B.isSize(t)) {
645
645
  let n = e, r = t;
646
646
  return {
647
- top: n.y,
648
- right: n.x + r.width,
649
647
  bottom: n.y + r.height,
648
+ height: r.height,
650
649
  left: n.x,
651
- width: r.width,
652
- height: r.height
650
+ right: n.x + r.width,
651
+ top: n.y,
652
+ width: r.width
653
653
  };
654
654
  } else {
655
655
  let t = e;
656
656
  if (!v(t)) throw Error("Invalid parameters passed to constructor");
657
657
  return {
658
- top: t.y,
659
- right: t.x + t.width,
660
658
  bottom: t.y + t.height,
659
+ height: t.height,
661
660
  left: t.x,
662
- width: t.width,
663
- height: t.height
661
+ right: t.x + t.width,
662
+ top: t.y,
663
+ width: t.width
664
664
  };
665
665
  }
666
666
  }
@@ -674,8 +674,8 @@ var V;
674
674
  e.center = n;
675
675
  function r(e) {
676
676
  return B.make({
677
- width: e.width,
678
- height: e.height
677
+ height: e.height,
678
+ width: e.width
679
679
  });
680
680
  }
681
681
  e.size = r;
@@ -689,10 +689,10 @@ var V;
689
689
  let d;
690
690
  for (let e = 0; e < s; e++) {
691
691
  let n = o[e], i = n.getBoundingClientRect(), a = t({
692
- x: i.left + l.left - (H(c) ? 0 : u.left),
693
- y: i.top + l.top - (H(c) ? 0 : u.top),
692
+ height: r.overflow ? n.scrollHeight : n instanceof HTMLElement ? n.offsetHeight : i.height,
694
693
  width: r.overflow ? n.scrollWidth : n instanceof HTMLElement ? n.offsetWidth : i.width,
695
- height: r.overflow ? n.scrollHeight : n instanceof HTMLElement ? n.offsetHeight : i.height
694
+ x: i.left + l.left - (H(c) ? 0 : u.left),
695
+ y: i.top + l.top - (H(c) ? 0 : u.top)
696
696
  });
697
697
  d = d ? f(d, a) : a;
698
698
  }
@@ -703,12 +703,12 @@ var V;
703
703
  }
704
704
  e.from = i;
705
705
  function a() {
706
- let e = Math.max(document.documentElement.clientWidth, window.innerWidth || 0), n = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
706
+ let e = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
707
707
  return t({
708
- x: window.pageXOffset === void 0 ? (document.documentElement || document.body.parentNode || document.body).scrollLeft : window.pageXOffset,
709
- y: window.pageYOffset === void 0 ? (document.documentElement || document.body.parentNode || document.body).scrollTop : window.pageYOffset,
708
+ height: Math.max(document.documentElement.clientHeight, window.innerHeight || 0),
710
709
  width: e,
711
- height: n
710
+ x: window.pageXOffset === void 0 ? (document.documentElement || document.body.parentNode || document.body).scrollLeft : window.pageXOffset,
711
+ y: window.pageYOffset === void 0 ? (document.documentElement || document.body.parentNode || document.body).scrollTop : window.pageYOffset
712
712
  });
713
713
  }
714
714
  e.fromViewport = a;
@@ -723,11 +723,11 @@ var V;
723
723
  if (!r) return e.zero;
724
724
  let o = Array.from(r.children);
725
725
  return n <= 0 ? t() : n >= o.length ? i(o, {
726
- reference: a.reference,
727
- overflow: !1
726
+ overflow: !1,
727
+ reference: a.reference
728
728
  }) : (o.splice(n), i(o, {
729
- reference: a.reference || r,
730
- overflow: !1
729
+ overflow: !1,
730
+ reference: a.reference || r
731
731
  }));
732
732
  }
733
733
  e.fromChildrenBefore = s;
@@ -735,11 +735,11 @@ var V;
735
735
  if (!r) return e.zero;
736
736
  let o = Array.from(r.children);
737
737
  return n < 0 ? i(o, {
738
- reference: a.reference,
739
- overflow: !1
738
+ overflow: !1,
739
+ reference: a.reference
740
740
  }) : n >= o.length - 1 ? t() : (o.splice(0, o.length - n - 1), i(o, {
741
- reference: a.reference || r,
742
- overflow: !1
741
+ overflow: !1,
742
+ reference: a.reference || r
743
743
  }));
744
744
  }
745
745
  e.fromChildrenAfter = c;
@@ -769,28 +769,28 @@ var V;
769
769
  e.intersecting = u;
770
770
  function d(e, n = {}) {
771
771
  return t({
772
- x: typeof n.x == "number" ? n.x : e.left,
773
- y: typeof n.y == "number" ? n.y : e.top,
772
+ height: typeof n.height == "number" ? n.height : e.height,
774
773
  width: typeof n.width == "number" ? n.width : e.width,
775
- height: typeof n.height == "number" ? n.height : e.height
774
+ x: typeof n.x == "number" ? n.x : e.left,
775
+ y: typeof n.y == "number" ? n.y : e.top
776
776
  });
777
777
  }
778
778
  e.clone = d;
779
779
  function f(e, n) {
780
780
  return t({
781
- x: Math.min(e.left, n.left),
782
- y: Math.min(e.top, n.top),
781
+ height: Math.max(e.bottom, n.bottom) - Math.min(e.top, n.top),
783
782
  width: Math.max(e.right, n.right) - Math.min(e.left, n.left),
784
- height: Math.max(e.bottom, n.bottom) - Math.min(e.top, n.top)
783
+ x: Math.min(e.left, n.left),
784
+ y: Math.min(e.top, n.top)
785
785
  });
786
786
  }
787
787
  e.concat = f;
788
788
  function p(e) {
789
789
  return t({
790
- x: e.left,
791
- y: e.top,
790
+ height: e.width,
792
791
  width: e.height,
793
- height: e.width
792
+ x: e.left,
793
+ y: e.top
794
794
  });
795
795
  }
796
796
  e.rotate = p;
@@ -808,12 +808,12 @@ var V;
808
808
  e.toString = g;
809
809
  function _(e) {
810
810
  return Object.freeze({
811
- top: e.top,
812
- right: e.right,
813
811
  bottom: e.bottom,
812
+ height: e.height,
814
813
  left: e.left,
815
- width: e.width,
816
- height: e.height
814
+ right: e.right,
815
+ top: e.top,
816
+ width: e.width
817
817
  });
818
818
  }
819
819
  e.toJSON = _;
@@ -1353,7 +1353,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
1353
1353
  }
1354
1354
  return t !== t && n !== n;
1355
1355
  };
1356
- })), ye = /* @__PURE__ */ b((/* @__PURE__ */ v(((e, t) => {
1356
+ })), ye = /* @__PURE__ */ v(((e, t) => {
1357
1357
  (function(n, r) {
1358
1358
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).interact = r();
1359
1359
  })(e, (function() {
@@ -2579,7 +2579,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
2579
2579
  if (!(a && o && s)) return !1;
2580
2580
  for (var d = 0, f = r.interactions.list; d < f.length; d++) {
2581
2581
  var p = f[d], m = p.prepared.name;
2582
- if (p.interacting() && (++c >= s || p.interactable === e && ((l += m === n.name ? 1 : 0) >= a || p.element === t && (u++, m === n.name && u >= o)))) return !1;
2582
+ if (p.interacting() && (++c >= s || p.interactable === e && ((l += +(m === n.name)) >= a || p.element === t && (u++, m === n.name && u >= o)))) return !1;
2583
2583
  }
2584
2584
  return s > 0;
2585
2585
  }
@@ -3533,7 +3533,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3533
3533
  n.x += i, n.y += a, r.x += i, r.y += a;
3534
3534
  }
3535
3535
  kt.offsetBy = "";
3536
- var Y = {
3536
+ var It = {
3537
3537
  id: "offset",
3538
3538
  before: [
3539
3539
  "modifiers",
@@ -3573,7 +3573,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3573
3573
  t.offset.total.x = 0, t.offset.total.y = 0, t.offset.pending.x = 0, t.offset.pending.y = 0;
3574
3574
  }
3575
3575
  }
3576
- }, It = function() {
3576
+ }, Lt = function() {
3577
3577
  function e(t) {
3578
3578
  i(this, e), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = t;
3579
3579
  }
@@ -3581,7 +3581,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3581
3581
  {
3582
3582
  key: "start",
3583
3583
  value: function(e) {
3584
- var t = this.interaction, n = Lt(t);
3584
+ var t = this.interaction, n = Rt(t);
3585
3585
  if (!n || !n.enabled) return !1;
3586
3586
  var r = t.coords.velocity.client, i = ae(r.x, r.y), a = this.modification ||= new bt(t);
3587
3587
  if (a.copyFrom(t.modification), this.t0 = t._now(), this.allowResume = n.allowResume, this.v0 = i, this.currentOffset = {
@@ -3609,7 +3609,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3609
3609
  {
3610
3610
  key: "startInertia",
3611
3611
  value: function() {
3612
- var e = this, t = this.interaction.coords.velocity.client, n = Lt(this.interaction), r = n.resistance, i = -Math.log(n.endSpeed / this.v0) / r;
3612
+ var e = this, t = this.interaction.coords.velocity.client, n = Rt(this.interaction), r = n.resistance, i = -Math.log(n.endSpeed / this.v0) / r;
3613
3613
  this.targetOffset = {
3614
3614
  x: (t.x - i) / r,
3615
3615
  y: (t.y - i) / r
@@ -3650,12 +3650,12 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3650
3650
  {
3651
3651
  key: "inertiaTick",
3652
3652
  value: function() {
3653
- var e, t, n, r, i, a, o, s = this, c = this.interaction, l = Lt(c).resistance, u = (c._now() - this.t0) / 1e3;
3653
+ var e, t, n, r, i, a, o, s = this, c = this.interaction, l = Rt(c).resistance, u = (c._now() - this.t0) / 1e3;
3654
3654
  if (u < this.te) {
3655
3655
  var d, f = 1 - (Math.exp(-l * u) - this.lambda_v0) / this.one_ve_v0;
3656
3656
  this.isModified ? (e = 0, t = 0, n = this.targetOffset.x, r = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, d = {
3657
- x: zt(o = f, e, n, i),
3658
- y: zt(o, t, r, a)
3657
+ x: Bt(o = f, e, n, i),
3658
+ y: Bt(o, t, r, a)
3659
3659
  }) : d = {
3660
3660
  x: this.targetOffset.x * f,
3661
3661
  y: this.targetOffset.y * f
@@ -3676,11 +3676,11 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3676
3676
  {
3677
3677
  key: "smoothEndTick",
3678
3678
  value: function() {
3679
- var e = this, t = this.interaction, n = t._now() - this.t0, r = Lt(t).smoothEndDuration;
3679
+ var e = this, t = this.interaction, n = t._now() - this.t0, r = Rt(t).smoothEndDuration;
3680
3680
  if (n < r) {
3681
3681
  var i = {
3682
- x: Bt(n, 0, this.targetOffset.x, r),
3683
- y: Bt(n, 0, this.targetOffset.y, r)
3682
+ x: Vt(n, 0, this.targetOffset.x, r),
3683
+ y: Vt(n, 0, this.targetOffset.y, r)
3684
3684
  }, a = {
3685
3685
  x: i.x - this.currentOffset.x,
3686
3686
  y: i.y - this.currentOffset.y
@@ -3722,16 +3722,16 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3722
3722
  }
3723
3723
  ]), e;
3724
3724
  }();
3725
- function Lt(e) {
3725
+ function Rt(e) {
3726
3726
  var t = e.interactable, n = e.prepared;
3727
3727
  return t && t.options && n.name && t.options[n.name].inertia;
3728
3728
  }
3729
- var Rt = {
3729
+ var zt = {
3730
3730
  id: "inertia",
3731
3731
  before: ["modifiers", "actions"],
3732
3732
  install: function(e) {
3733
3733
  var t = e.defaults;
3734
- e.usePlugin(Y), e.usePlugin(wt), e.actions.phases.inertiastart = !0, e.actions.phases.resume = !0, t.perAction.inertia = {
3734
+ e.usePlugin(It), e.usePlugin(wt), e.actions.phases.inertiastart = !0, e.actions.phases.resume = !0, t.perAction.inertia = {
3735
3735
  enabled: !1,
3736
3736
  resistance: 10,
3737
3737
  minSpeed: 100,
@@ -3743,7 +3743,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3743
3743
  listeners: {
3744
3744
  "interactions:new": function(e) {
3745
3745
  var t = e.interaction;
3746
- t.inertia = new It(t);
3746
+ t.inertia = new Lt(t);
3747
3747
  },
3748
3748
  "interactions:before-action-end": function(e) {
3749
3749
  var t = e.interaction, n = e.event;
@@ -3780,22 +3780,22 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3780
3780
  }
3781
3781
  }
3782
3782
  };
3783
- function zt(e, t, n, r) {
3783
+ function Bt(e, t, n, r) {
3784
3784
  var i = 1 - e;
3785
3785
  return i * i * t + 2 * i * e * n + e * e * r;
3786
3786
  }
3787
- function Bt(e, t, n, r) {
3787
+ function Vt(e, t, n, r) {
3788
3788
  return -n * (e /= r) * (e - 2) + t;
3789
3789
  }
3790
- var Vt = Rt;
3791
- function Ht(e, t) {
3790
+ var Ht = zt;
3791
+ function Ut(e, t) {
3792
3792
  for (var n = 0; n < t.length; n++) {
3793
3793
  var r = t[n];
3794
3794
  if (e.immediatePropagationStopped) break;
3795
3795
  r(e);
3796
3796
  }
3797
3797
  }
3798
- var Ut = function() {
3798
+ var Wt = function() {
3799
3799
  function e(t) {
3800
3800
  i(this, e), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = W({}, t || {});
3801
3801
  }
@@ -3804,7 +3804,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3804
3804
  key: "fire",
3805
3805
  value: function(e) {
3806
3806
  var t, n = this.global;
3807
- (t = this.types[e.type]) && Ht(e, t), !e.propagationStopped && n && (t = n[e.type]) && Ht(e, t);
3807
+ (t = this.types[e.type]) && Ut(e, t), !e.propagationStopped && n && (t = n[e.type]) && Ut(e, t);
3808
3808
  }
3809
3809
  },
3810
3810
  {
@@ -3834,7 +3834,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3834
3834
  }
3835
3835
  }
3836
3836
  ]), e;
3837
- }(), Wt = function() {
3837
+ }(), Gt = function() {
3838
3838
  function e(t) {
3839
3839
  i(this, e), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = t, se(this, t);
3840
3840
  }
@@ -3859,7 +3859,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3859
3859
  }
3860
3860
  ]), e;
3861
3861
  }();
3862
- function Gt(e) {
3862
+ function Kt(e) {
3863
3863
  return S.object(e) ? {
3864
3864
  capture: !!e.capture,
3865
3865
  passive: !!e.passive
@@ -3868,17 +3868,17 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3868
3868
  passive: !1
3869
3869
  };
3870
3870
  }
3871
- function Kt(e, t) {
3871
+ function qt(e, t) {
3872
3872
  return e === t || (typeof e == "boolean" ? !!t.capture === e && !!t.passive == 0 : !!e.capture == !!t.capture && !!e.passive == !!t.passive);
3873
3873
  }
3874
- var qt = {
3874
+ var Jt = {
3875
3875
  id: "events",
3876
3876
  install: function(e) {
3877
3877
  var t, n = [], r = {}, i = [], a = {
3878
3878
  add: o,
3879
3879
  remove: s,
3880
3880
  addDelegate: function(e, t, n, a, s) {
3881
- var u = Gt(s);
3881
+ var u = Kt(s);
3882
3882
  if (!r[n]) {
3883
3883
  r[n] = [];
3884
3884
  for (var d = 0; d < i.length; d++) {
@@ -3899,13 +3899,13 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3899
3899
  });
3900
3900
  },
3901
3901
  removeDelegate: function(e, t, n, i, a) {
3902
- var o, u = Gt(a), d = r[n], f = !1;
3902
+ var o, u = Kt(a), d = r[n], f = !1;
3903
3903
  if (d) for (o = d.length - 1; o >= 0; o--) {
3904
3904
  var p = d[o];
3905
3905
  if (p.selector === e && p.context === t) {
3906
3906
  for (var m = p.listeners, h = m.length - 1; h >= 0; h--) {
3907
3907
  var g = m[h];
3908
- if (g.func === i && Kt(g.options, u)) {
3908
+ if (g.func === i && qt(g.options, u)) {
3909
3909
  m.splice(h, 1), m.length || (d.splice(o, 1), s(t, n, c), s(t, n, l, !0)), f = !0;
3910
3910
  break;
3911
3911
  }
@@ -3924,14 +3924,14 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3924
3924
  };
3925
3925
  function o(e, t, r, i) {
3926
3926
  if (e.addEventListener) {
3927
- var o = Gt(i), s = Ee(n, (function(t) {
3927
+ var o = Kt(i), s = Ee(n, (function(t) {
3928
3928
  return t.eventTarget === e;
3929
3929
  }));
3930
3930
  s || (s = {
3931
3931
  eventTarget: e,
3932
3932
  events: {}
3933
3933
  }, n.push(s)), s.events[t] || (s.events[t] = []), Ee(s.events[t], (function(e) {
3934
- return e.func === r && Kt(e.options, o);
3934
+ return e.func === r && qt(e.options, o);
3935
3935
  })) || (e.addEventListener(t, r, a.supportsOptions ? o : o.capture), s.events[t].push({
3936
3936
  func: r,
3937
3937
  options: o
@@ -3953,9 +3953,9 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3953
3953
  }
3954
3954
  return;
3955
3955
  }
3956
- for (var p = Gt(i), m = 0; m < u.length; m++) {
3956
+ for (var p = Kt(i), m = 0; m < u.length; m++) {
3957
3957
  var h = u[m];
3958
- if (h.func === r && Kt(h.options, p)) {
3958
+ if (h.func === r && qt(h.options, p)) {
3959
3959
  e.removeEventListener(t, r, a.supportsOptions ? p : p.capture), u.splice(m, 1), u.length === 0 && (delete c.events[t], l = !0);
3960
3960
  break;
3961
3961
  }
@@ -3966,7 +3966,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3966
3966
  }
3967
3967
  }
3968
3968
  function c(e, t) {
3969
- for (var n = Gt(t), i = new Wt(e), a = r[e.type], o = xe(e)[0], s = o; S.element(s);) {
3969
+ for (var n = Kt(t), i = new Gt(e), a = r[e.type], o = xe(e)[0], s = o; S.element(s);) {
3970
3970
  for (var c = 0; c < a.length; c++) {
3971
3971
  var l = a[c], u = l.selector, d = l.context;
3972
3972
  if (F(s, u) && M(d, o) && M(d, s)) {
@@ -3974,7 +3974,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3974
3974
  i.currentTarget = s;
3975
3975
  for (var p = 0; p < f.length; p++) {
3976
3976
  var m = f[p];
3977
- Kt(m.options, n) && m.func(i);
3977
+ qt(m.options, n) && m.func(i);
3978
3978
  }
3979
3979
  }
3980
3980
  }
@@ -3993,7 +3993,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
3993
3993
  }
3994
3994
  }), e.events = a, a;
3995
3995
  }
3996
- }, Jt = {
3996
+ }, Yt = {
3997
3997
  methodOrder: [
3998
3998
  "simulationResume",
3999
3999
  "mouseOrPen",
@@ -4001,8 +4001,8 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4001
4001
  "idle"
4002
4002
  ],
4003
4003
  search: function(e) {
4004
- for (var t = 0, n = Jt.methodOrder; t < n.length; t++) {
4005
- var r = Jt[n[t]](e);
4004
+ for (var t = 0, n = Yt.methodOrder; t < n.length; t++) {
4005
+ var r = Yt[n[t]](e);
4006
4006
  if (r) return r;
4007
4007
  }
4008
4008
  return null;
@@ -4025,7 +4025,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4025
4025
  for (var o = 0, s = a.interactions.list; o < s.length; o++) {
4026
4026
  var c = s[o];
4027
4027
  if (c.pointerType === r) {
4028
- if (c.simulation && !Yt(c, n)) continue;
4028
+ if (c.simulation && !Xt(c, n)) continue;
4029
4029
  if (c.interacting()) return c;
4030
4030
  t ||= c;
4031
4031
  }
@@ -4040,7 +4040,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4040
4040
  hasPointer: function(e) {
4041
4041
  for (var t = e.pointerId, n = 0, r = e.scope.interactions.list; n < r.length; n++) {
4042
4042
  var i = r[n];
4043
- if (Yt(i, t)) return i;
4043
+ if (Xt(i, t)) return i;
4044
4044
  }
4045
4045
  return null;
4046
4046
  },
@@ -4056,12 +4056,12 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4056
4056
  return null;
4057
4057
  }
4058
4058
  };
4059
- function Yt(e, t) {
4059
+ function Xt(e, t) {
4060
4060
  return e.pointers.some((function(e) {
4061
4061
  return e.id === t;
4062
4062
  }));
4063
4063
  }
4064
- var Xt = Jt, Zt = [
4064
+ var Zt = Yt, Qt = [
4065
4065
  "pointerDown",
4066
4066
  "pointerMove",
4067
4067
  "pointerUp",
@@ -4069,7 +4069,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4069
4069
  "removePointer",
4070
4070
  "windowBlur"
4071
4071
  ];
4072
- function Qt(e, t) {
4072
+ function $t(e, t) {
4073
4073
  return function(n) {
4074
4074
  var r = t.interactions.list, i = be(n), a = xe(n), o = a[0], s = a[1], c = [];
4075
4075
  if (/^touch/.test(n.type)) {
@@ -4083,7 +4083,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4083
4083
  eventTarget: o,
4084
4084
  curEventTarget: s,
4085
4085
  scope: t
4086
- }, p = $t(f);
4086
+ }, p = en(f);
4087
4087
  c.push([
4088
4088
  f.pointer,
4089
4089
  f.eventTarget,
@@ -4106,7 +4106,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4106
4106
  curEventTarget: s,
4107
4107
  eventTarget: o,
4108
4108
  scope: t
4109
- }, _ = $t(g);
4109
+ }, _ = en(g);
4110
4110
  c.push([
4111
4111
  g.pointer,
4112
4112
  g.eventTarget,
@@ -4121,14 +4121,14 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4121
4121
  }
4122
4122
  };
4123
4123
  }
4124
- function $t(e) {
4124
+ function en(e) {
4125
4125
  var t = e.pointerType, n = e.scope, r = {
4126
- interaction: Xt.search(e),
4126
+ interaction: Zt.search(e),
4127
4127
  searchDetails: e
4128
4128
  };
4129
4129
  return n.fire("interactions:find", r), r.interaction || n.interactions.new({ pointerType: t });
4130
4130
  }
4131
- function en(e, t) {
4131
+ function tn(e, t) {
4132
4132
  var n = e.doc, r = e.scope, i = e.options, a = r.interactions.docEvents, o = r.events, s = o[t];
4133
4133
  for (var c in r.browser.isIOS && !i.events && (i.events = { passive: !1 }), o.delegatedEvents) s(n, c, o.delegateListener), s(n, c, o.delegateUseCapture, !0);
4134
4134
  for (var l = i && i.events, u = 0; u < a.length; u++) {
@@ -4136,12 +4136,12 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4136
4136
  s(n, d.type, d.listener, l);
4137
4137
  }
4138
4138
  }
4139
- var tn = {
4139
+ var nn = {
4140
4140
  id: "core/interactions",
4141
4141
  install: function(e) {
4142
- for (var t = {}, n = 0; n < Zt.length; n++) {
4143
- var r = Zt[n];
4144
- t[r] = Qt(r, e);
4142
+ for (var t = {}, n = 0; n < Qt.length; n++) {
4143
+ var r = Qt[n];
4144
+ t[r] = $t(r, e);
4145
4145
  }
4146
4146
  var a, s = j.pEventTypes;
4147
4147
  function l() {
@@ -4250,10 +4250,10 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4250
4250
  },
4251
4251
  listeners: {
4252
4252
  "scope:add-document": function(e) {
4253
- return en(e, "add");
4253
+ return tn(e, "add");
4254
4254
  },
4255
4255
  "scope:remove-document": function(e) {
4256
- return en(e, "remove");
4256
+ return tn(e, "remove");
4257
4257
  },
4258
4258
  "interactable:unset": function(e, t) {
4259
4259
  for (var n = e.interactable, r = t.interactions.list.length - 1; r >= 0; r--) {
@@ -4262,14 +4262,14 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4262
4262
  }
4263
4263
  }
4264
4264
  },
4265
- onDocSignal: en,
4266
- doOnInteractions: Qt,
4267
- methodNames: Zt
4268
- }, nn = function(e) {
4265
+ onDocSignal: tn,
4266
+ doOnInteractions: $t,
4267
+ methodNames: Qt
4268
+ }, Y = function(e) {
4269
4269
  return e[e.On = 0] = "On", e[e.Off = 1] = "Off", e;
4270
- }(nn || {}), rn = function() {
4270
+ }(Y || {}), rn = function() {
4271
4271
  function e(t, n, r, a) {
4272
- i(this, e), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new Ut(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = t, this._context = n.context || r, this._win = y(U(t) ? this._context : t), this._doc = this._win.document, this._scopeEvents = a, this.set(n);
4272
+ i(this, e), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new Wt(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = t, this._context = n.context || r, this._win = y(U(t) ? this._context : t), this._doc = this._win.document, this._scopeEvents = a, this.set(n);
4273
4273
  }
4274
4274
  return o(e, [
4275
4275
  {
@@ -4294,7 +4294,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4294
4294
  var r = this, i = this._actions.map[e]?.filterEventType, a = function(e) {
4295
4295
  return (i == null || i(e)) && vt(e, r._actions);
4296
4296
  };
4297
- (S.array(t) || S.object(t)) && this._onOff(nn.Off, e, t, void 0, a), (S.array(n) || S.object(n)) && this._onOff(nn.On, e, n, void 0, a);
4297
+ (S.array(t) || S.object(t)) && this._onOff(Y.Off, e, t, void 0, a), (S.array(n) || S.object(n)) && this._onOff(Y.On, e, n, void 0, a);
4298
4298
  }
4299
4299
  },
4300
4300
  {
@@ -4397,7 +4397,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4397
4397
  o === "wheel" && (o = j.wheelEvent);
4398
4398
  for (var s = 0, c = a[o]; s < c.length; s++) {
4399
4399
  var l = c[s];
4400
- vt(o, this._actions) ? this.events[e === nn.On ? "on" : "off"](o, l) : S.string(this.target) ? this._scopeEvents[e === nn.On ? "addDelegate" : "removeDelegate"](this.target, this._context, o, l, r) : this._scopeEvents[e === nn.On ? "add" : "remove"](this.target, o, l, r);
4400
+ vt(o, this._actions) ? this.events[e === Y.On ? "on" : "off"](o, l) : S.string(this.target) ? this._scopeEvents[e === Y.On ? "addDelegate" : "removeDelegate"](this.target, this._context, o, l, r) : this._scopeEvents[e === Y.On ? "add" : "remove"](this.target, o, l, r);
4401
4401
  }
4402
4402
  }
4403
4403
  return this;
@@ -4406,13 +4406,13 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4406
4406
  {
4407
4407
  key: "on",
4408
4408
  value: function(e, t, n) {
4409
- return this._onOff(nn.On, e, t, n);
4409
+ return this._onOff(Y.On, e, t, n);
4410
4410
  }
4411
4411
  },
4412
4412
  {
4413
4413
  key: "off",
4414
4414
  value: function(e, t, n) {
4415
- return this._onOff(nn.Off, e, t, n);
4415
+ return this._onOff(Y.Off, e, t, n);
4416
4416
  }
4417
4417
  },
4418
4418
  {
@@ -4485,10 +4485,10 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4485
4485
  }
4486
4486
  }
4487
4487
  ]), e;
4488
- }(), X = function() {
4488
+ }(), on = function() {
4489
4489
  function e() {
4490
4490
  var t = this;
4491
- i(this, e), this.id = `__interact_scope_${Math.floor(100 * Math.random())}`, this.isInitialized = !1, this.listenerMaps = [], this.browser = j, this.defaults = yt(Tt), this.Eventable = Ut, this.actions = {
4491
+ i(this, e), this.id = `__interact_scope_${Math.floor(100 * Math.random())}`, this.isInitialized = !1, this.listenerMaps = [], this.browser = j, this.defaults = yt(Tt), this.Eventable = Wt, this.actions = {
4492
4492
  map: {},
4493
4493
  phases: {
4494
4494
  start: !0,
@@ -4612,7 +4612,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4612
4612
  key: "init",
4613
4613
  value: function(e) {
4614
4614
  return this.isInitialized ? this : function(e, t) {
4615
- return e.isInitialized = !0, S.window(t) && v(t), k.init(t), j.init(t), qe.init(t), e.window = t, e.document = t.document, e.usePlugin(tn), e.usePlugin(qt), e;
4615
+ return e.isInitialized = !0, S.window(t) && v(t), k.init(t), j.init(t), qe.init(t), e.window = t, e.document = t.document, e.usePlugin(nn), e.usePlugin(Jt), e;
4616
4616
  }(this, e);
4617
4617
  }
4618
4618
  },
@@ -4629,10 +4629,10 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4629
4629
  if (!this.isInitialized || this.pluginIsInstalled(e)) return this;
4630
4630
  if (e.id && (this._plugins.map[e.id] = e), this._plugins.list.push(e), e.install && e.install(this, t), e.listeners && e.before) {
4631
4631
  for (var n = 0, r = this.listenerMaps.length, i = e.before.reduce((function(e, t) {
4632
- return e[t] = !0, e[on(t)] = !0, e;
4632
+ return e[t] = !0, e[X(t)] = !0, e;
4633
4633
  }), {}); n < r; n++) {
4634
4634
  var a = this.listenerMaps[n].id;
4635
- if (a && (i[a] || i[on(a)])) break;
4635
+ if (a && (i[a] || i[X(a)])) break;
4636
4636
  }
4637
4637
  this.listenerMaps.splice(n, 0, {
4638
4638
  id: e.id,
@@ -4695,10 +4695,10 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4695
4695
  }
4696
4696
  ]), e;
4697
4697
  }();
4698
- function on(e) {
4698
+ function X(e) {
4699
4699
  return e && e.replace(/\/.*$/, "");
4700
4700
  }
4701
- var sn = new X(), cn = sn.interactStatic, ln = typeof globalThis < "u" ? globalThis : window;
4701
+ var sn = new on(), cn = sn.interactStatic, ln = typeof globalThis < "u" ? globalThis : window;
4702
4702
  sn.init(ln);
4703
4703
  var un = Object.freeze({
4704
4704
  __proto__: null,
@@ -4941,7 +4941,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
4941
4941
  endOnly: !1,
4942
4942
  enabled: !1
4943
4943
  }
4944
- }, "restrictSize"), Z = {
4944
+ }, "restrictSize"), jn = {
4945
4945
  start: function(e) {
4946
4946
  var t, n = e.interaction, r = e.interactable, i = e.element, a = e.rect, o = e.state, s = e.startOffset, c = o.options, l = c.offsetWithOrigin ? function(e) {
4947
4947
  var t = e.interaction.element;
@@ -5015,15 +5015,15 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5015
5015
  endOnly: !1,
5016
5016
  enabled: !1
5017
5017
  }
5018
- }, jn = St(Z, "snap"), Mn = {
5018
+ }, Z = St(jn, "snap"), Mn = {
5019
5019
  start: function(e) {
5020
5020
  var t = e.state, n = e.edges, r = t.options;
5021
5021
  if (!n) return null;
5022
5022
  e.state = { options: {
5023
5023
  targets: null,
5024
5024
  relativePoints: [{
5025
- x: n.left ? 0 : 1,
5026
- y: n.top ? 0 : 1
5025
+ x: +!n.left,
5026
+ y: +!n.top
5027
5027
  }],
5028
5028
  offset: r.offset || "self",
5029
5029
  origin: {
@@ -5031,7 +5031,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5031
5031
  y: 0
5032
5032
  },
5033
5033
  range: r.range
5034
- } }, t.targetFields = t.targetFields || [["width", "height"], ["x", "y"]], Z.start(e), t.offsets = e.state.offsets, e.state = t;
5034
+ } }, t.targetFields = t.targetFields || [["width", "height"], ["x", "y"]], jn.start(e), t.offsets = e.state.offsets, e.state = t;
5035
5035
  },
5036
5036
  set: function(e) {
5037
5037
  var t = e.interaction, n = e.state, r = e.coords, i = n.options, a = n.offsets, o = {
@@ -5052,7 +5052,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5052
5052
  n.options.targets.push(u);
5053
5053
  }
5054
5054
  }
5055
- var g = Z.set(e);
5055
+ var g = jn.set(e);
5056
5056
  return n.options = i, g;
5057
5057
  },
5058
5058
  defaults: {
@@ -5062,7 +5062,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5062
5062
  endOnly: !1,
5063
5063
  enabled: !1
5064
5064
  }
5065
- }, Nn = St(Mn, "snapSize"), Pn = {
5065
+ }, Nn = St(Mn, "snapSize"), Q = {
5066
5066
  aspectRatio: hn,
5067
5067
  restrictEdges: Tn,
5068
5068
  restrict: bn,
@@ -5083,22 +5083,22 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5083
5083
  }
5084
5084
  })
5085
5085
  }, "snapEdges"),
5086
- snap: jn,
5086
+ snap: Z,
5087
5087
  snapSize: Nn,
5088
5088
  spring: _n,
5089
5089
  avoid: _n,
5090
5090
  transform: _n,
5091
5091
  rubberband: _n
5092
- }, Fn = {
5092
+ }, Pn = {
5093
5093
  id: "modifiers",
5094
5094
  install: function(e) {
5095
5095
  var t = e.interactStatic;
5096
- for (var n in e.usePlugin(wt), e.usePlugin(dn), t.modifiers = Pn, Pn) {
5097
- var r = Pn[n], i = r._defaults;
5096
+ for (var n in e.usePlugin(wt), e.usePlugin(dn), t.modifiers = Q, Q) {
5097
+ var r = Q[n], i = r._defaults;
5098
5098
  i._methods = r._methods, e.defaults.perAction[n] = i;
5099
5099
  }
5100
5100
  }
5101
- }, In = function(e) {
5101
+ }, Fn = function(e) {
5102
5102
  c(n, e);
5103
5103
  var t = f(n);
5104
5104
  function n(e, r, a, o, s, c) {
@@ -5133,7 +5133,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5133
5133
  }
5134
5134
  }
5135
5135
  ]), n;
5136
- }(Se), Ln = {
5136
+ }(Se), In = {
5137
5137
  id: "pointer-events/base",
5138
5138
  before: [
5139
5139
  "inertia",
@@ -5142,7 +5142,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5142
5142
  "actions"
5143
5143
  ],
5144
5144
  install: function(e) {
5145
- e.pointerEvents = Ln, e.defaults.actions.pointerEvents = Ln.defaults, W(e.actions.phaselessTypes, Ln.types);
5145
+ e.pointerEvents = In, e.defaults.actions.pointerEvents = In.defaults, W(e.actions.phaselessTypes, In.types);
5146
5146
  },
5147
5147
  listeners: {
5148
5148
  "interactions:new": function(e) {
@@ -5158,7 +5158,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5158
5158
  },
5159
5159
  "interactions:move": function(e, t) {
5160
5160
  var n = e.interaction, r = e.pointer, i = e.event, a = e.eventTarget;
5161
- e.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && Bn(e), Rn({
5161
+ e.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && zn(e), Ln({
5162
5162
  interaction: n,
5163
5163
  pointer: r,
5164
5164
  event: i,
@@ -5184,7 +5184,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5184
5184
  m < d && (d = m);
5185
5185
  }
5186
5186
  s.duration = d, s.timeout = setTimeout((function() {
5187
- Rn({
5187
+ Ln({
5188
5188
  interaction: n,
5189
5189
  eventTarget: a,
5190
5190
  pointer: r,
@@ -5193,12 +5193,12 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5193
5193
  }, t);
5194
5194
  }), d);
5195
5195
  }
5196
- })(e, t), Rn(e, t);
5196
+ })(e, t), Ln(e, t);
5197
5197
  },
5198
5198
  "interactions:up": function(e, t) {
5199
- Bn(e), Rn(e, t), function(e, t) {
5199
+ zn(e), Ln(e, t), function(e, t) {
5200
5200
  var n = e.interaction, r = e.pointer, i = e.event, a = e.eventTarget;
5201
- n.pointerWasMoved || Rn({
5201
+ n.pointerWasMoved || Ln({
5202
5202
  interaction: n,
5203
5203
  eventTarget: a,
5204
5204
  pointer: r,
@@ -5208,12 +5208,12 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5208
5208
  }(e, t);
5209
5209
  },
5210
5210
  "interactions:cancel": function(e, t) {
5211
- Bn(e), Rn(e, t);
5211
+ zn(e), Ln(e, t);
5212
5212
  }
5213
5213
  },
5214
- PointerEvent: In,
5215
- fire: Rn,
5216
- collectEventTargets: zn,
5214
+ PointerEvent: Fn,
5215
+ fire: Ln,
5216
+ collectEventTargets: Rn,
5217
5217
  defaults: {
5218
5218
  holdDuration: 600,
5219
5219
  ignoreFrom: null,
@@ -5233,8 +5233,8 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5233
5233
  hold: !0
5234
5234
  }
5235
5235
  };
5236
- function Rn(e, t) {
5237
- var n = e.interaction, r = e.pointer, i = e.event, a = e.eventTarget, o = e.type, s = e.targets, c = s === void 0 ? zn(e, t) : s, l = new In(o, r, i, a, n, t.now());
5236
+ function Ln(e, t) {
5237
+ var n = e.interaction, r = e.pointer, i = e.event, a = e.eventTarget, o = e.type, s = e.targets, c = s === void 0 ? Rn(e, t) : s, l = new Fn(o, r, i, a, n, t.now());
5238
5238
  t.fire("pointerEvents:new", { pointerEvent: l });
5239
5239
  for (var u = {
5240
5240
  interaction: n,
@@ -5251,7 +5251,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5251
5251
  if (l._subtractOrigin(m), l.eventable = f.eventable, l.currentTarget = f.node, f.eventable.fire(l), l._addOrigin(m), l.immediatePropagationStopped || l.propagationStopped && d + 1 < c.length && c[d + 1].node !== l.currentTarget) break;
5252
5252
  }
5253
5253
  if (t.fire("pointerEvents:fired", u), o === "tap") {
5254
- var h = l.double ? Rn({
5254
+ var h = l.double ? Ln({
5255
5255
  interaction: n,
5256
5256
  pointer: r,
5257
5257
  event: i,
@@ -5262,7 +5262,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5262
5262
  }
5263
5263
  return l;
5264
5264
  }
5265
- function zn(e, t) {
5265
+ function Rn(e, t) {
5266
5266
  var n = e.interaction, r = e.pointer, i = e.event, a = e.eventTarget, o = e.type, s = n.getPointerIndex(r), c = n.pointers[s];
5267
5267
  if (o === "tap" && (n.pointerWasMoved || !c || c.downTarget !== a)) return [];
5268
5268
  for (var l = H(a), u = {
@@ -5280,22 +5280,22 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5280
5280
  return e.eventable.options.holdDuration === ((t = n.pointers[s]) == null || (r = t.hold) == null ? void 0 : r.duration);
5281
5281
  }))), u.targets;
5282
5282
  }
5283
- function Bn(e) {
5283
+ function zn(e) {
5284
5284
  var t = e.interaction, n = e.pointerIndex, r = t.pointers[n].hold;
5285
5285
  r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);
5286
5286
  }
5287
- var Vn = Object.freeze({
5287
+ var Bn = Object.freeze({
5288
5288
  __proto__: null,
5289
- default: Ln
5289
+ default: In
5290
5290
  });
5291
- function Hn(e) {
5291
+ function Vn(e) {
5292
5292
  var t = e.interaction;
5293
5293
  t.holdIntervalHandle &&= (clearInterval(t.holdIntervalHandle), null);
5294
5294
  }
5295
- var Un = {
5295
+ var Hn = {
5296
5296
  id: "pointer-events/holdRepeat",
5297
5297
  install: function(e) {
5298
- e.usePlugin(Ln);
5298
+ e.usePlugin(In);
5299
5299
  var t = e.pointerEvents;
5300
5300
  t.defaults.holdRepeatInterval = 0, t.types.holdrepeat = e.actions.phaselessTypes.holdrepeat = !0;
5301
5301
  },
@@ -5305,7 +5305,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5305
5305
  "cancel",
5306
5306
  "endall"
5307
5307
  ].reduce((function(e, t) {
5308
- return e[`pointerEvents:${t}`] = Hn, e;
5308
+ return e[`pointerEvents:${t}`] = Vn, e;
5309
5309
  }), {
5310
5310
  "pointerEvents:new": function(e) {
5311
5311
  var t = e.pointerEvent;
@@ -5327,7 +5327,7 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5327
5327
  }
5328
5328
  }
5329
5329
  })
5330
- }, Wn = {
5330
+ }, Un = {
5331
5331
  id: "pointer-events/interactableTargets",
5332
5332
  install: function(e) {
5333
5333
  var t = e.Interactable;
@@ -5364,12 +5364,12 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5364
5364
  }
5365
5365
  }
5366
5366
  };
5367
- if (cn.use(_t), cn.use(Y), cn.use({
5367
+ if (cn.use(_t), cn.use(It), cn.use({
5368
5368
  id: "pointer-events",
5369
5369
  install: function(e) {
5370
- e.usePlugin(Vn), e.usePlugin(Un), e.usePlugin(Wn);
5370
+ e.usePlugin(Bn), e.usePlugin(Hn), e.usePlugin(Un);
5371
5371
  }
5372
- }), cn.use(Vt), cn.use(Fn), cn.use(mt), cn.use(Ge), cn.use(Xe), cn.use({
5372
+ }), cn.use(Ht), cn.use(Pn), cn.use(mt), cn.use(Ge), cn.use(Xe), cn.use({
5373
5373
  id: "reflow",
5374
5374
  install: function(e) {
5375
5375
  var t = e.Interactable;
@@ -5471,19 +5471,19 @@ var ve = /* @__PURE__ */ v(((e, t) => {
5471
5471
  } catch {}
5472
5472
  return cn.default = cn, cn;
5473
5473
  }));
5474
- })))(), 1), be = /* @__PURE__ */ b(ve(), 1);
5475
- function xe(e) {
5476
- return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "function" ? e.toString() : e instanceof Date ? e.toISOString() : e instanceof RegExp ? e.toString() : e instanceof Map ? JSON.stringify(Array.from(e.entries())) : e instanceof Set ? JSON.stringify(Array.from(e.values())) : e instanceof WeakMap || e instanceof WeakSet ? "" : e instanceof ArrayBuffer ? e.toString() : Array.isArray(e) ? JSON.stringify(e.map(xe)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([e], [t]) => e.localeCompare(t))) : "";
5474
+ })), be = /* @__PURE__ */ b(ve(), 1), xe = /* @__PURE__ */ b(ye(), 1);
5475
+ function Se(e) {
5476
+ return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "function" ? e.toString() : e instanceof Date ? e.toISOString() : e instanceof RegExp ? e.toString() : e instanceof Map ? JSON.stringify(Array.from(e.entries())) : e instanceof Set ? JSON.stringify(Array.from(e.values())) : e instanceof WeakMap || e instanceof WeakSet ? "" : e instanceof ArrayBuffer ? e.toString() : Array.isArray(e) ? JSON.stringify(e.map(Se)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([e], [t]) => e.localeCompare(t))) : "";
5477
5477
  }
5478
5478
  //#endregion
5479
5479
  //#region src/hooks/useInertiaDrag.ts
5480
- function Se(e, { isEnabled: t = !0, onDragEnd: n, onDragMove: r, onDragStart: i, ...a }) {
5480
+ function Ce(e, { isEnabled: t = !0, onDragEnd: n, onDragMove: r, onDragStart: i, ...a }) {
5481
5481
  let o = U(i), s = U(r), l = U(n);
5482
5482
  c(() => {
5483
5483
  if (!t) return;
5484
5484
  let n = e && "current" in e ? e.current : e;
5485
5485
  if (!n) return;
5486
- let r = (0, ye.default)(n).draggable({
5486
+ let r = (0, xe.default)(n).draggable({
5487
5487
  inertia: !0,
5488
5488
  ...a,
5489
5489
  onend: ({ client: e, clientX0: t, clientY0: n }) => {
@@ -5505,27 +5505,27 @@ function Se(e, { isEnabled: t = !0, onDragEnd: n, onDragMove: r, onDragStart: i,
5505
5505
  }, [
5506
5506
  e,
5507
5507
  t,
5508
- xe(a)
5508
+ Se(a)
5509
5509
  ]);
5510
5510
  }
5511
5511
  //#endregion
5512
5512
  //#region src/hooks/useInertiaDragValue.ts
5513
- function Ce(e, { initialValue: t, transform: n, onDragEnd: r, onDragMove: i, onDragStart: a, ...o }) {
5513
+ function we(e, { initialValue: t, transform: n, onDragEnd: r, onDragMove: i, onDragStart: a, ...o }) {
5514
5514
  let c = u(t), [l, f] = d(!1), [p, m] = d(!1), [h, g] = d(t), _ = U(a), v = U(i), y = U(r), b = U(n);
5515
- return Se(e, {
5515
+ return Ce(e, {
5516
5516
  onDragEnd: (e, t) => {
5517
5517
  f(!1), m(!0), y.current?.(e, t);
5518
5518
  },
5519
5519
  onDragMove: (e, t, n) => {
5520
5520
  let r = b.current(c.current, e.x, e.y);
5521
- we(c, r) && g(r), f(!0), m(!1), v.current?.(e, t, n);
5521
+ Te(c, r) && g(r), f(!0), m(!1), v.current?.(e, t, n);
5522
5522
  },
5523
5523
  onDragStart: (e) => {
5524
5524
  f(!0), m(!1), _.current?.(e);
5525
5525
  },
5526
5526
  ...o
5527
5527
  }), s(() => {
5528
- we(c, h);
5528
+ Te(c, h);
5529
5529
  }, [h]), {
5530
5530
  setValue: g,
5531
5531
  value: h,
@@ -5533,17 +5533,17 @@ function Ce(e, { initialValue: t, transform: n, onDragEnd: r, onDragMove: i, onD
5533
5533
  isReleasing: p
5534
5534
  };
5535
5535
  }
5536
- function we(e, t) {
5536
+ function Te(e, t) {
5537
5537
  return (0, be.default)(e.current, t) ? !1 : (e.current = t, !0);
5538
5538
  }
5539
5539
  //#endregion
5540
5540
  //#region src/primitives/Panorama.tsx
5541
- function Te({ ref: e, angle: t = 0, speed: n = 1, src: r, zeroAnchor: i = 0, onAngleChange: a, onDragEnd: c, onDragStart: l, onImageSizeChange: f, onLoadImageComplete: p, onLoadImageError: m, onLoadImageStart: h, onPositionChange: g, ..._ }) {
5541
+ function Ee({ ref: e, angle: t = 0, speed: n = 1, src: r, zeroAnchor: i = 0, onAngleChange: a, onDragEnd: c, onDragStart: l, onImageSizeChange: f, onLoadImageComplete: p, onLoadImageError: m, onLoadImageStart: h, onPositionChange: g, ..._ }) {
5542
5542
  let v = o((e, t, r) => e - t * n, [n]), y = u(null), b = ee(y), x = ne({ src: r }, {
5543
5543
  onError: m,
5544
5544
  onLoad: p,
5545
5545
  onLoadStart: h
5546
- }), [S, C] = d(t), { setValue: w, value: T, isDragging: D } = Ce(y, {
5546
+ }), [S, C] = d(t), { setValue: w, value: T, isDragging: D } = we(y, {
5547
5547
  initialValue: 0,
5548
5548
  transform: v,
5549
5549
  onDragEnd: c,
@@ -5551,7 +5551,7 @@ function Te({ ref: e, angle: t = 0, speed: n = 1, src: r, zeroAnchor: i = 0, onA
5551
5551
  });
5552
5552
  s(() => {
5553
5553
  if (D || !x) return;
5554
- let e = Oe(t, x, V.size(b), i);
5554
+ let e = ke(t, x, V.size(b), i);
5555
5555
  e !== T && w(e), t !== S && C(t);
5556
5556
  }, [
5557
5557
  t,
@@ -5561,7 +5561,7 @@ function Te({ ref: e, angle: t = 0, speed: n = 1, src: r, zeroAnchor: i = 0, onA
5561
5561
  i
5562
5562
  ]), s(() => {
5563
5563
  if (!D || !x) return;
5564
- let e = ke(T, x, V.size(b), i);
5564
+ let e = Ae(T, x, V.size(b), i);
5565
5565
  S !== e && C(e);
5566
5566
  }, [
5567
5567
  T,
@@ -5574,7 +5574,7 @@ function Te({ ref: e, angle: t = 0, speed: n = 1, src: r, zeroAnchor: i = 0, onA
5574
5574
  }, [S]), s(() => {
5575
5575
  f?.(x);
5576
5576
  }, [x?.width, x?.height]);
5577
- let O = Ee({
5577
+ let O = De({
5578
5578
  displacement: T,
5579
5579
  src: r
5580
5580
  });
@@ -5589,7 +5589,7 @@ function Te({ ref: e, angle: t = 0, speed: n = 1, src: r, zeroAnchor: i = 0, onA
5589
5589
  })
5590
5590
  });
5591
5591
  }
5592
- function Ee({ displacement: e = NaN, src: t = "" }) {
5592
+ function De({ displacement: e = NaN, src: t = "" }) {
5593
5593
  return A({ body: {
5594
5594
  backgroundImage: `url(${t})`,
5595
5595
  backgroundPositionX: `${-e}px`,
@@ -5600,25 +5600,25 @@ function Ee({ displacement: e = NaN, src: t = "" }) {
5600
5600
  width: "100%"
5601
5601
  } });
5602
5602
  }
5603
- function De(e, t) {
5603
+ function Oe(e, t) {
5604
5604
  let { height: n, width: r } = e, { height: i } = t;
5605
5605
  if (n <= 0) return B.zero;
5606
5606
  let a = i / n * r;
5607
5607
  return B.make(a, i);
5608
5608
  }
5609
- function Oe(e, t, n, r) {
5610
- let { width: i } = De(t, n), { width: a } = n, o = a * r;
5609
+ function ke(e, t, n, r) {
5610
+ let { width: i } = Oe(t, n), { width: a } = n, o = a * r;
5611
5611
  return e / 360 * i - o;
5612
5612
  }
5613
- function ke(e, t, n, r) {
5614
- let { width: i } = De(t, n), { width: a } = n, o = (e + a * r) % i / i * 360;
5613
+ function Ae(e, t, n, r) {
5614
+ let { width: i } = Oe(t, n), { width: a } = n, o = (e + a * r) % i / i * 360;
5615
5615
  for (; o < 0;) o += 360;
5616
5616
  return o;
5617
5617
  }
5618
- process.env.NODE_ENV === "development" && (Te.displayName = "Panorama");
5618
+ process.env.NODE_ENV === "development" && (Ee.displayName = "Panorama");
5619
5619
  //#endregion
5620
5620
  //#region src/components/PanoramaSlider.tsx
5621
- function Ae({ className: e, ref: t, style: n, angle: r = 0, autoDimension: i = "width", children: a, fov: s, speed: c = 1, src: l, viewportSize: f, zeroAnchor: p = 0, onAngleChange: m, onDragEnd: h, onDragStart: g, onImageSizeChange: _, onLoadImageComplete: v, onLoadImageError: y, onLoadImageStart: b, onPositionChange: x, ...C }) {
5621
+ function je({ className: e, ref: t, style: n, angle: r = 0, autoDimension: i = "width", children: a, fov: s, speed: c = 1, src: l, viewportSize: f, zeroAnchor: p = 0, onAngleChange: m, onDragEnd: h, onDragStart: g, onImageSizeChange: _, onLoadImageComplete: v, onLoadImageError: y, onLoadImageStart: b, onPositionChange: x, ...C }) {
5622
5622
  let w = u(null), T = ee(w), [D, O] = d(), [A, j] = d(!1), P = o(() => {
5623
5623
  if (!D) return 0;
5624
5624
  let { height: e, width: t } = D;
@@ -5641,10 +5641,10 @@ function Ae({ className: e, ref: t, style: n, angle: r = 0, autoDimension: i = "
5641
5641
  }, [g]), R = o(() => {
5642
5642
  j(!1), h?.();
5643
5643
  }, [h]), z = k(a, {
5644
- indicator: Ae.Indicator,
5645
- reticle: Ae.Reticle,
5646
- track: Ae.Track
5647
- }), B = je({
5644
+ indicator: je.Indicator,
5645
+ reticle: je.Reticle,
5646
+ track: je.Track
5647
+ }), B = Me({
5648
5648
  aspectRatio: P,
5649
5649
  autoDimension: i,
5650
5650
  panoramaRect: T,
@@ -5656,7 +5656,7 @@ function Ae({ className: e, ref: t, style: n, angle: r = 0, autoDimension: i = "
5656
5656
  ref: t,
5657
5657
  style: N(n, B.root),
5658
5658
  children: [
5659
- /* @__PURE__ */ (0, E.jsx)(Te, {
5659
+ /* @__PURE__ */ (0, E.jsx)(Ee, {
5660
5660
  ref: w,
5661
5661
  style: B.panorama,
5662
5662
  angle: r,
@@ -5680,17 +5680,17 @@ function Ae({ className: e, ref: t, style: n, angle: r = 0, autoDimension: i = "
5680
5680
  /* @__PURE__ */ (0, E.jsx)(M, {
5681
5681
  className: S({ dragging: A }),
5682
5682
  style: B.track,
5683
- element: z.track ?? /* @__PURE__ */ (0, E.jsx)(Ae.Track, {})
5683
+ element: z.track ?? /* @__PURE__ */ (0, E.jsx)(je.Track, {})
5684
5684
  }),
5685
5685
  /* @__PURE__ */ (0, E.jsx)(M, {
5686
5686
  className: S({ dragging: A }),
5687
5687
  style: B.reticle,
5688
- element: z.reticle ?? /* @__PURE__ */ (0, E.jsx)(Ae.Reticle, {})
5688
+ element: z.reticle ?? /* @__PURE__ */ (0, E.jsx)(je.Reticle, {})
5689
5689
  }),
5690
5690
  /* @__PURE__ */ (0, E.jsx)(M, {
5691
5691
  className: S({ dragging: A }),
5692
5692
  style: B.track,
5693
- element: z.track ?? /* @__PURE__ */ (0, E.jsx)(Ae.Track, {})
5693
+ element: z.track ?? /* @__PURE__ */ (0, E.jsx)(je.Track, {})
5694
5694
  })
5695
5695
  ]
5696
5696
  })
@@ -5698,15 +5698,15 @@ function Ae({ className: e, ref: t, style: n, angle: r = 0, autoDimension: i = "
5698
5698
  /* @__PURE__ */ (0, E.jsx)(M, {
5699
5699
  className: S({ dragging: A }),
5700
5700
  style: B.indicator,
5701
- element: z.indicator ?? /* @__PURE__ */ (0, E.jsx)(Ae.Indicator, {})
5701
+ element: z.indicator ?? /* @__PURE__ */ (0, E.jsx)(je.Indicator, {})
5702
5702
  })
5703
5703
  ]
5704
5704
  });
5705
5705
  }
5706
5706
  (function(e) {
5707
5707
  e.Indicator = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.Reticle = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.Track = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e });
5708
- })(Ae ||= {});
5709
- function je({ aspectRatio: e = 0, autoDimension: t = "width", panoramaRect: n = V.zero, reticleWidth: r = 0 }) {
5708
+ })(je ||= {});
5709
+ function Me({ aspectRatio: e = 0, autoDimension: t = "width", panoramaRect: n = V.zero, reticleWidth: r = 0 }) {
5710
5710
  return A({
5711
5711
  body: {
5712
5712
  height: "100%",
@@ -5738,10 +5738,10 @@ function je({ aspectRatio: e = 0, autoDimension: t = "width", panoramaRect: n =
5738
5738
  track: { flex: "1 0 auto" }
5739
5739
  });
5740
5740
  }
5741
- process.env.NODE_ENV === "development" && (Ae.displayName = "PanoramaSlider", Ae.Indicator.displayName = "PanoramaSlider.Indicator", Ae.Reticle.displayName = "PanoramaSlider.Reticle", Ae.Track.displayName = "PanoramaSlider.Track");
5741
+ process.env.NODE_ENV === "development" && (je.displayName = "PanoramaSlider", je.Indicator.displayName = "PanoramaSlider.Indicator", je.Reticle.displayName = "PanoramaSlider.Reticle", je.Track.displayName = "PanoramaSlider.Track");
5742
5742
  //#endregion
5743
5743
  //#region src/components/SelectableButton.tsx
5744
- function Me({ className: e, ref: t, children: n, label: r, isDeselectable: i = !1, isDisabled: a = !1, isSelected: o = !1, onDeselect: s, onSelect: c, onToggle: l, ...u }) {
5744
+ function Ne({ className: e, ref: t, children: n, label: r, isDeselectable: i = !1, isDisabled: a = !1, isSelected: o = !1, onDeselect: s, onSelect: c, onToggle: l, ...u }) {
5745
5745
  let d = () => {
5746
5746
  if (!a) if (o) {
5747
5747
  if (!i) return;
@@ -5763,31 +5763,31 @@ function Me({ className: e, ref: t, children: n, label: r, isDeselectable: i = !
5763
5763
  children: n ?? r
5764
5764
  });
5765
5765
  }
5766
- process.env.NODE_ENV === "development" && (Me.displayName = "SelectableButton");
5766
+ process.env.NODE_ENV === "development" && (Ne.displayName = "SelectableButton");
5767
5767
  //#endregion
5768
5768
  //#region src/flows/Conditional.tsx
5769
- function Ne({ children: e, if: t }) {
5769
+ function Pe({ children: e, if: t }) {
5770
5770
  switch (typeof t) {
5771
5771
  case "function": return t() ? /* @__PURE__ */ (0, E.jsx)(E.Fragment, { children: e }) : /* @__PURE__ */ (0, E.jsx)(E.Fragment, {});
5772
5772
  default: return t ? /* @__PURE__ */ (0, E.jsx)(E.Fragment, { children: e }) : /* @__PURE__ */ (0, E.jsx)(E.Fragment, {});
5773
5773
  }
5774
5774
  }
5775
- process.env.NODE_ENV === "development" && (Ne.displayName = "Conditional");
5775
+ process.env.NODE_ENV === "development" && (Pe.displayName = "Conditional");
5776
5776
  //#endregion
5777
5777
  //#region src/flows/Each.tsx
5778
- function Pe({ children: e, in: t, render: r }) {
5778
+ function Fe({ children: e, in: t, render: r }) {
5779
5779
  if (t == null) return /* @__PURE__ */ (0, E.jsx)(E.Fragment, {});
5780
5780
  if (!(t instanceof Array)) throw TypeError(`Provided list <${t}> is not an array`);
5781
5781
  return /* @__PURE__ */ (0, E.jsx)(E.Fragment, { children: t.map((t, i) => /* @__PURE__ */ (0, E.jsx)(n, { children: r?.(t, i) ?? (typeof e == "function" ? e(t, i) : e) }, `item-${i}`)) });
5782
5782
  }
5783
- process.env.NODE_ENV === "development" && (Pe.displayName = "Each");
5783
+ process.env.NODE_ENV === "development" && (Fe.displayName = "Each");
5784
5784
  //#endregion
5785
5785
  //#region src/flows/Switch.tsx
5786
- function Fe({ children: e, condition: n }) {
5786
+ function Ie({ children: e, condition: n }) {
5787
5787
  let r = t.toArray(e);
5788
5788
  if (r.length === 0) return console.error("[etudes::Switch] `Switch` must have at least one child"), /* @__PURE__ */ (0, E.jsx)(E.Fragment, {});
5789
- if (!Ie(r)) return console.error("[etudes::Switch] `Switch` children must be of `Case` type or `Default` type"), /* @__PURE__ */ (0, E.jsx)(E.Fragment, {});
5790
- let i = r.filter((e) => e.type === Fe.Default);
5789
+ if (!Le(r)) return console.error("[etudes::Switch] `Switch` children must be of `Case` type or `Default` type"), /* @__PURE__ */ (0, E.jsx)(E.Fragment, {});
5790
+ let i = r.filter((e) => e.type === Ie.Default);
5791
5791
  if (i.length > 1) return console.error("[etudes::Switch] `Switch` can only have maximum one `Default` child"), /* @__PURE__ */ (0, E.jsx)(E.Fragment, {});
5792
5792
  let a = i[0];
5793
5793
  for (let e of r) if (typeof n == "function") {
@@ -5804,14 +5804,14 @@ function Fe({ children: e, condition: n }) {
5804
5804
  return e;
5805
5805
  }
5806
5806
  e.Default = n;
5807
- })(Fe ||= {});
5808
- function Ie(e) {
5809
- return e.every((e) => a(e) && (e.type === Fe.Case || e.type === Fe.Default));
5807
+ })(Ie ||= {});
5808
+ function Le(e) {
5809
+ return e.every((e) => a(e) && (e.type === Ie.Case || e.type === Ie.Default));
5810
5810
  }
5811
- process.env.NODE_ENV === "development" && (Fe.displayName = "Switch", Fe.Case.displayName = "Switch.Case", Fe.Default.displayName = "Switch.Default");
5811
+ process.env.NODE_ENV === "development" && (Ie.displayName = "Switch", Ie.Case.displayName = "Switch.Case", Ie.Default.displayName = "Switch.Default");
5812
5812
  //#endregion
5813
5813
  //#region src/utils/ExtractChild.tsx
5814
- function Le({ ref: e, children: n, ...r }) {
5814
+ function Re({ ref: e, children: n, ...r }) {
5815
5815
  return Array.isArray(n) && console.error(`[etudes::ExtractChild] Only one child is expected, but found ${n.length}. Only the first child is extracted while the rest are discarded.`), t.map(n, (t, n) => {
5816
5816
  if (!(n > 0)) return a(t) ? j(t, {
5817
5817
  ...r,
@@ -5819,10 +5819,10 @@ function Le({ ref: e, children: n, ...r }) {
5819
5819
  }) : t;
5820
5820
  });
5821
5821
  }
5822
- process.env.NODE_ENV === "development" && (Le.displayName = "ExtractChild");
5822
+ process.env.NODE_ENV === "development" && (Re.displayName = "ExtractChild");
5823
5823
  //#endregion
5824
5824
  //#region src/utils/measureIntrinsicSize.ts
5825
- function Re(e, t) {
5825
+ function ze(e, t) {
5826
5826
  if (typeof window > "u") return B.zero;
5827
5827
  let n = e.cloneNode(!0);
5828
5828
  n.style.position = "fixed", n.style.visibility = "hidden";
@@ -5843,7 +5843,7 @@ function Re(e, t) {
5843
5843
  }
5844
5844
  //#endregion
5845
5845
  //#region src/utils/setStyles.ts
5846
- function ze(e, { target: t } = {}) {
5846
+ function Be(e, { target: t } = {}) {
5847
5847
  if (typeof window > "u") return;
5848
5848
  let n = t ?? window.document.documentElement;
5849
5849
  Object.keys(e).forEach((t) => {
@@ -5852,7 +5852,7 @@ function ze(e, { target: t } = {}) {
5852
5852
  }
5853
5853
  //#endregion
5854
5854
  //#region src/hocs/WithTooltip.tsx
5855
- function Be({ className: e = "", style: t, alignment: n, arrowHeight: r = 6, arrowWidth: i = 12, children: a, forwardProps: c = !1, gap: l = 4, hint: d, maxWidth: f = 200 }) {
5855
+ function Ve({ className: e = "", style: t, alignment: n, arrowHeight: r = 6, arrowWidth: i = 12, children: a, forwardProps: c = !1, gap: l = 4, hint: d, maxWidth: f = 200 }) {
5856
5856
  let p = u(null), m = u(null), h = u(null), g = u(void 0), _ = o(() => {
5857
5857
  let e = p.current, a = m.current, o = h.current;
5858
5858
  if (!e || !a || !o) return;
@@ -5861,8 +5861,8 @@ function Be({ className: e = "", style: t, alignment: n, arrowHeight: r = 6, arr
5861
5861
  width: s.width,
5862
5862
  x: s.left - c.left,
5863
5863
  y: s.top - c.top
5864
- }), d = B.make(i, r), g = Re(e, f), _ = n ?? He(u, c);
5865
- ze(N(t, Ue(_, g, d, l, u)), { target: e }), ze(We(_, g, d, u), { target: a });
5864
+ }), d = B.make(i, r), g = ze(e, f), _ = n ?? Ue(u, c);
5865
+ Be(N(t, We(_, g, d, l, u)), { target: e }), Be(Ge(_, g, d, u), { target: a });
5866
5866
  }, [
5867
5867
  n,
5868
5868
  f,
@@ -5885,11 +5885,11 @@ function Be({ className: e = "", style: t, alignment: n, arrowHeight: r = 6, arr
5885
5885
  e && (g.current?.disconnect(), g.current = void 0, window.removeEventListener("resize", _), e.isConnected && window.document.body.removeChild(e));
5886
5886
  }, [_]);
5887
5887
  return s(() => {
5888
- let { arrow: t, dialog: n } = Ve(e, d);
5888
+ let { arrow: t, dialog: n } = He(e, d);
5889
5889
  return m.current = t, p.current = n, () => {
5890
5890
  n.isConnected && window.document.body.removeChild(n), m.current = null, p.current = null, g.current?.disconnect(), g.current = void 0, window.removeEventListener("resize", _);
5891
5891
  };
5892
- }, [e, d]), c ? /* @__PURE__ */ (0, E.jsx)(Le, {
5892
+ }, [e, d]), c ? /* @__PURE__ */ (0, E.jsx)(Re, {
5893
5893
  ref: h,
5894
5894
  onMouseEnter: v,
5895
5895
  onMouseLeave: y,
@@ -5901,9 +5901,9 @@ function Be({ className: e = "", style: t, alignment: n, arrowHeight: r = 6, arr
5901
5901
  children: a
5902
5902
  });
5903
5903
  }
5904
- function Ve(e, t) {
5904
+ function He(e, t) {
5905
5905
  let n = window.document.createElement("span");
5906
- n.className = e, n.innerHTML = t, n.role = "tooltip", ze({
5906
+ n.className = e, n.innerHTML = t, n.role = "tooltip", Be({
5907
5907
  boxSizing: "border-box",
5908
5908
  height: "auto",
5909
5909
  margin: "0",
@@ -5913,7 +5913,7 @@ function Ve(e, t) {
5913
5913
  zIndex: 100
5914
5914
  }, { target: n });
5915
5915
  let r = window.document.createElement("span");
5916
- return ze({
5916
+ return Be({
5917
5917
  background: "inherit",
5918
5918
  position: "absolute"
5919
5919
  }, { target: r }), n.appendChild(r), {
@@ -5921,7 +5921,7 @@ function Ve(e, t) {
5921
5921
  dialog: n
5922
5922
  };
5923
5923
  }
5924
- function He(e, t) {
5924
+ function Ue(e, t) {
5925
5925
  let n = e.top, r = t.height - e.bottom, i = e.left, a = t.width - e.right, o = 1.5, s = a <= 0 || i / a > o ? "left" : i <= 0 || a / i > o ? "right" : "center", c = r <= 0 || n / r > o ? "top" : n <= 0 || r / n > o ? "bottom" : "center";
5926
5926
  if (s === "center" && c === "center") return "bc";
5927
5927
  if (s === "center") switch (c) {
@@ -5934,7 +5934,7 @@ function He(e, t) {
5934
5934
  }
5935
5935
  else return c.charAt(0) + s.charAt(0);
5936
5936
  }
5937
- function Ue(e, t, n, r, i) {
5937
+ function We(e, t, n, r, i) {
5938
5938
  let a = t.width, o = i.width > a, s = i.left + i.width / 2, c = i.top + i.height / 2, l = { width: `${a}px` };
5939
5939
  switch (e) {
5940
5940
  case "bc": return {
@@ -5988,81 +5988,81 @@ function Ue(e, t, n, r, i) {
5988
5988
  default: return console.error(`[etudes::WithTooltip] Invalid alignment: ${e}`), {};
5989
5989
  }
5990
5990
  }
5991
- function We(e, t, n, r) {
5992
- let i = r.width, a = i > t.width, o = {
5991
+ function Ge(e, t, n, r) {
5992
+ let i = r.width, a = i > t.width, o = e === "cl" || e === "cr" ? B.rotate(n) : n, s = {
5993
5993
  bottom: "auto",
5994
- height: `${n.height}px`,
5994
+ height: `${o.height}px`,
5995
5995
  left: "auto",
5996
5996
  right: "auto",
5997
5997
  top: "auto",
5998
- width: `${n.width}px`
5998
+ width: `${o.width}px`
5999
5999
  };
6000
6000
  switch (e) {
6001
6001
  case "bc": return {
6002
- ...o,
6002
+ ...s,
6003
6003
  clipPath: "polygon(50% 0,100% 100%,0 100%)",
6004
6004
  left: "50%",
6005
6005
  top: "0",
6006
6006
  transform: "translate(-50%, -100%)"
6007
6007
  };
6008
6008
  case "bl": return {
6009
- ...o,
6009
+ ...s,
6010
6010
  clipPath: "polygon(50% 0,100% 100%,0 100%)",
6011
6011
  left: a ? "50%" : "",
6012
- right: a ? "" : `${i - n.width / 2 - i / 2}px`,
6012
+ right: a ? "" : `${i - o.width / 2 - i / 2}px`,
6013
6013
  top: "0",
6014
6014
  transform: `translate(${a ? "-50%" : "0"}, -100%)`
6015
6015
  };
6016
6016
  case "br": return {
6017
- ...o,
6017
+ ...s,
6018
6018
  clipPath: "polygon(50% 0,100% 100%,0 100%)",
6019
- left: a ? "50%" : `${i - n.width / 2 - i / 2}px`,
6019
+ left: a ? "50%" : `${i - o.width / 2 - i / 2}px`,
6020
6020
  top: "0",
6021
6021
  transform: `translate(${a ? "-50%" : "0"}, -100%)`
6022
6022
  };
6023
6023
  case "cl": return {
6024
- ...o,
6024
+ ...s,
6025
6025
  clipPath: "polygon(0 0,100% 50%,0 100%)",
6026
6026
  right: "0",
6027
6027
  top: "50%",
6028
6028
  transform: "translate(100%, -50%)"
6029
6029
  };
6030
6030
  case "cr": return {
6031
- ...o,
6031
+ ...s,
6032
6032
  clipPath: "polygon(100% 0,0 50%,100% 100%)",
6033
6033
  left: "0",
6034
6034
  top: "50%",
6035
6035
  transform: "translate(-100%, -50%)"
6036
6036
  };
6037
6037
  case "tc": return {
6038
- ...o,
6038
+ ...s,
6039
6039
  bottom: 0,
6040
6040
  clipPath: "polygon(50% 100%, 100% 0, 0 0)",
6041
6041
  left: "50%",
6042
6042
  transform: "translate(-50%, 100%)"
6043
6043
  };
6044
6044
  case "tl": return {
6045
- ...o,
6045
+ ...s,
6046
6046
  bottom: 0,
6047
6047
  clipPath: "polygon(50% 100%, 100% 0, 0 0)",
6048
6048
  left: a ? "50%" : "",
6049
- right: a ? "" : `${i - n.width / 2 - i / 2}px`,
6049
+ right: a ? "" : `${i - o.width / 2 - i / 2}px`,
6050
6050
  transform: `translate(${a ? "-50%" : "0"}, 100%)`
6051
6051
  };
6052
6052
  case "tr": return {
6053
- ...o,
6053
+ ...s,
6054
6054
  bottom: 0,
6055
6055
  clipPath: "polygon(50% 100%, 100% 0, 0 0)",
6056
- left: a ? "50%" : `${i - n.width / 2 - i / 2}px`,
6056
+ left: a ? "50%" : `${i - o.width / 2 - i / 2}px`,
6057
6057
  transform: `translate(${a ? "-50%" : "0"}, 100%)`
6058
6058
  };
6059
6059
  default: return console.error(`[etudes::WithTooltip] Invalid alignment: ${e}`), {};
6060
6060
  }
6061
6061
  }
6062
- process.env.NODE_ENV === "development" && (Be.displayName = "WithTooltip");
6062
+ process.env.NODE_ENV === "development" && (Ve.displayName = "WithTooltip");
6063
6063
  //#endregion
6064
6064
  //#region src/hooks/useClassName.ts
6065
- function Ge(e, { target: t, isEnabled: n = !0 } = {}) {
6065
+ function Ke(e, { target: t, isEnabled: n = !0 } = {}) {
6066
6066
  c(() => {
6067
6067
  if (!n) return;
6068
6068
  let r = t ?? window.document.documentElement, i = r.classList.contains(e);
@@ -6077,7 +6077,7 @@ function Ge(e, { target: t, isEnabled: n = !0 } = {}) {
6077
6077
  }
6078
6078
  //#endregion
6079
6079
  //#region src/hooks/useClickOutside.ts
6080
- function Ke(e, t, { isEnabled: n = !0 } = {}) {
6080
+ function qe(e, t, { isEnabled: n = !0 } = {}) {
6081
6081
  let r = U(t), i = U([].concat(e));
6082
6082
  s(() => {
6083
6083
  if (!n) return;
@@ -6093,7 +6093,7 @@ function Ke(e, t, { isEnabled: n = !0 } = {}) {
6093
6093
  }
6094
6094
  //#endregion
6095
6095
  //#region src/hooks/useCopyBlobToClipboard.ts
6096
- function qe() {
6096
+ function J() {
6097
6097
  return o(async (e) => {
6098
6098
  let t = e.type, n = new ClipboardItem({ [t]: e });
6099
6099
  try {
@@ -6105,7 +6105,7 @@ function qe() {
6105
6105
  }
6106
6106
  //#endregion
6107
6107
  //#region src/hooks/useDownloadBlob.ts
6108
- function J() {
6108
+ function Je() {
6109
6109
  return o((e, t) => {
6110
6110
  let n = URL.createObjectURL(e), r = document.createElement("a");
6111
6111
  r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
@@ -6113,17 +6113,17 @@ function J() {
6113
6113
  }
6114
6114
  //#endregion
6115
6115
  //#region src/utils/getDPR.ts
6116
- function Je() {
6116
+ function Ye() {
6117
6117
  return typeof window > "u" ? 1 : window.devicePixelRatio || 1;
6118
6118
  }
6119
6119
  //#endregion
6120
6120
  //#region src/hooks/useDPR.ts
6121
- function Ye() {
6122
- return l(() => Je(), []);
6121
+ function Xe() {
6122
+ return l(() => Ye(), []);
6123
6123
  }
6124
6124
  //#endregion
6125
6125
  //#region src/hooks/useDrag.ts
6126
- function Xe(e, { isEnabled: t = !0, shouldUpdateCursor: n = !0, onDragEnd: r, onDragMove: i, onDragStart: a }) {
6126
+ function Ze(e, { isEnabled: t = !0, shouldUpdateCursor: n = !0, onDragEnd: r, onDragMove: i, onDragStart: a }) {
6127
6127
  let s = u(void 0), l = u(void 0), d = U(a), f = U(i), p = U(r), m = o((e) => {
6128
6128
  if (!s.current) return;
6129
6129
  let t = R.make(e.clientX, e.clientY), n = R.subtract(t, l.current ?? s.current);
@@ -6175,7 +6175,7 @@ function Xe(e, { isEnabled: t = !0, shouldUpdateCursor: n = !0, onDragEnd: r, on
6175
6175
  }
6176
6176
  //#endregion
6177
6177
  //#region src/hooks/useDropzone.ts
6178
- function Ze(e) {
6178
+ function Qe(e) {
6179
6179
  let t = U(e), [n, r] = d(!1), i = o((e) => {
6180
6180
  e.preventDefault(), e.stopPropagation(), r(!0);
6181
6181
  }, []);
@@ -6194,7 +6194,7 @@ function Ze(e) {
6194
6194
  }
6195
6195
  //#endregion
6196
6196
  //#region src/hooks/useInterval.ts
6197
- function Qe(e, { shouldAutoStart: t = !0, shouldInvokeInitially: n = !1, onInterval: r }, i = []) {
6197
+ function $e(e, { shouldAutoStart: t = !0, shouldInvokeInitially: n = !1, onInterval: r }, i = []) {
6198
6198
  let a = u(void 0), c = U(r), l = o(() => {
6199
6199
  clearInterval(a.current), a.current = void 0;
6200
6200
  }, []), d = o(() => {
@@ -6219,7 +6219,7 @@ function Qe(e, { shouldAutoStart: t = !0, shouldInvokeInitially: n = !1, onInter
6219
6219
  }
6220
6220
  //#endregion
6221
6221
  //#region src/hooks/useIsMounted.ts
6222
- function $e() {
6222
+ function et() {
6223
6223
  let [e, t] = d(!1);
6224
6224
  return s(() => (t(!0), () => {
6225
6225
  t(!1);
@@ -6227,17 +6227,17 @@ function $e() {
6227
6227
  }
6228
6228
  //#endregion
6229
6229
  //#region src/utils/isTouchDevice.ts
6230
- function et() {
6230
+ function tt() {
6231
6231
  return typeof window > "u" ? !1 : !!(window.navigator !== void 0 && (window.navigator.maxTouchPoints > 0 || "msMaxTouchPoints" in window.navigator && window.navigator.msMaxTouchPoints > 0) || window.matchMedia("(pointer: coarse)").matches || window.matchMedia("(hover: none)").matches || "ontouchstart" in window || "ontouchstart" in window.document.documentElement);
6232
6232
  }
6233
6233
  //#endregion
6234
6234
  //#region src/hooks/useIsTouchDevice.ts
6235
- function tt() {
6236
- return l(() => et(), []);
6235
+ function nt() {
6236
+ return l(() => tt(), []);
6237
6237
  }
6238
6238
  //#endregion
6239
6239
  //#region src/hooks/useKeyboardShortcut.ts
6240
- function nt(e, t, { capture: n = !1, preventsDefault: r = !0, stopsPropagation: i = !0, target: a, isEnabled: o = !0 } = {}) {
6240
+ function rt(e, t, { capture: n = !1, preventsDefault: r = !0, stopsPropagation: i = !0, target: a, isEnabled: o = !0 } = {}) {
6241
6241
  let c = U(t), u = Array.isArray(e) ? e : [e], d = l(() => u.map((e) => e.toLowerCase()).sort(), [u.join(",")]);
6242
6242
  s(() => {
6243
6243
  if (!o || d.length === 0) return;
@@ -6266,46 +6266,46 @@ function nt(e, t, { capture: n = !1, preventsDefault: r = !0, stopsPropagation:
6266
6266
  }
6267
6267
  //#endregion
6268
6268
  //#region src/utils/createLocalCache.ts
6269
- var rt = typeof window < "u" ? window.localStorage : void 0;
6270
- function it({ defaultTTL: e = 300 } = {}) {
6269
+ var it = typeof window < "u" ? window.localStorage : void 0;
6270
+ function at({ defaultTTL: e = 300 } = {}) {
6271
6271
  return {
6272
- get: st,
6273
- invalidate: at,
6274
- set: (t, n, r = e) => ct(t, n, r)
6272
+ get: ct,
6273
+ invalidate: ot,
6274
+ set: (t, n, r = e) => lt(t, n, r)
6275
6275
  };
6276
6276
  }
6277
- function at(e) {
6278
- rt?.removeItem(e);
6279
- }
6280
6277
  function ot(e) {
6278
+ it?.removeItem(e);
6279
+ }
6280
+ function st(e) {
6281
6281
  let { timestamp: t, ttl: n } = e;
6282
6282
  return (Date.now() - t) / 1e3 >= n;
6283
6283
  }
6284
- function st(e) {
6285
- let t = rt?.getItem(e);
6284
+ function ct(e) {
6285
+ let t = it?.getItem(e);
6286
6286
  if (!t) return;
6287
6287
  let n = JSON.parse(t);
6288
- if (n) if (ot(n)) {
6289
- at(e);
6288
+ if (n) if (st(n)) {
6289
+ ot(e);
6290
6290
  return;
6291
6291
  } else return n.value;
6292
6292
  }
6293
- function ct(e, t, n) {
6293
+ function lt(e, t, n) {
6294
6294
  let r = {
6295
6295
  timestamp: Date.now(),
6296
6296
  ttl: n,
6297
6297
  value: e
6298
6298
  };
6299
- return rt?.setItem(t, JSON.stringify(r)), e;
6299
+ return it?.setItem(t, JSON.stringify(r)), e;
6300
6300
  }
6301
6301
  //#endregion
6302
6302
  //#region src/hooks/useLocalCache.ts
6303
- function lt(e) {
6304
- return l(() => it({ defaultTTL: e }), [e]);
6303
+ function ut(e) {
6304
+ return l(() => at({ defaultTTL: e }), [e]);
6305
6305
  }
6306
6306
  //#endregion
6307
6307
  //#region src/hooks/useMouseEnter.ts
6308
- function ut(e, t, { isEnabled: n = !0 } = {}) {
6308
+ function dt(e, t, { isEnabled: n = !0 } = {}) {
6309
6309
  let r = U(t);
6310
6310
  c(() => {
6311
6311
  if (!n) return;
@@ -6320,7 +6320,7 @@ function ut(e, t, { isEnabled: n = !0 } = {}) {
6320
6320
  }
6321
6321
  //#endregion
6322
6322
  //#region src/hooks/useMouseLeave.ts
6323
- function dt(e, t, { isEnabled: n = !0 } = {}) {
6323
+ function ft(e, t, { isEnabled: n = !0 } = {}) {
6324
6324
  let r = U(t);
6325
6325
  c(() => {
6326
6326
  if (!n) return;
@@ -6335,7 +6335,7 @@ function dt(e, t, { isEnabled: n = !0 } = {}) {
6335
6335
  }
6336
6336
  //#endregion
6337
6337
  //#region src/hooks/useOS.ts
6338
- function ft() {
6338
+ function pt() {
6339
6339
  let e = navigator.userAgent || navigator.vendor || window.opera;
6340
6340
  return l(() => {
6341
6341
  switch (!0) {
@@ -6350,7 +6350,7 @@ function ft() {
6350
6350
  }
6351
6351
  //#endregion
6352
6352
  //#region src/hooks/usePrevious.ts
6353
- function pt(e) {
6353
+ function mt(e) {
6354
6354
  let t = u(void 0);
6355
6355
  return s(() => {
6356
6356
  t.current = e;
@@ -6358,11 +6358,11 @@ function pt(e) {
6358
6358
  }
6359
6359
  //#endregion
6360
6360
  //#region src/hooks/useScrollPosition.ts
6361
- function mt(...e) {
6361
+ function ht(...e) {
6362
6362
  let t = typeof e[0] == "function" ? void 0 : e[0], n = typeof e[0] == "function" ? e[0] : e[1], r = typeof e[0] == "function" ? e[1] ?? [] : e[2] ?? [], i = U(n), a = u(void 0), o = u(!1);
6363
6363
  c(() => {
6364
- let e = ht(t), n = () => {
6365
- let t = e ? _t(e) : gt();
6364
+ let e = gt(t), n = () => {
6365
+ let t = e ? vt(e) : _t();
6366
6366
  t && (i.current(t, a.current), a.current = t);
6367
6367
  }, r = () => {
6368
6368
  o.current || typeof requestAnimationFrame == "function" && (o.current = !0, requestAnimationFrame(() => {
@@ -6374,10 +6374,10 @@ function mt(...e) {
6374
6374
  };
6375
6375
  }, [...r]);
6376
6376
  }
6377
- function ht(e) {
6377
+ function gt(e) {
6378
6378
  if (e != null) return e instanceof HTMLElement ? e : e.current ?? void 0;
6379
6379
  }
6380
- function gt() {
6380
+ function _t() {
6381
6381
  let e = window.scrollX, t = window.scrollY, n = document.documentElement.scrollWidth - window.innerWidth, r = document.documentElement.scrollHeight - window.innerHeight;
6382
6382
  return {
6383
6383
  current: R.make(e, t),
@@ -6386,7 +6386,7 @@ function gt() {
6386
6386
  start: R.make(0, 0)
6387
6387
  };
6388
6388
  }
6389
- function _t(e) {
6389
+ function vt(e) {
6390
6390
  let t = e.scrollLeft, n = e.scrollTop, r = e.scrollWidth - e.clientWidth, i = e.scrollHeight - e.clientHeight;
6391
6391
  return {
6392
6392
  current: R.make(t, n),
@@ -6397,46 +6397,46 @@ function _t(e) {
6397
6397
  }
6398
6398
  //#endregion
6399
6399
  //#region src/utils/createSessionCache.ts
6400
- var vt = typeof window < "u" ? window.sessionStorage : void 0;
6401
- function yt({ defaultTTL: e = 300 } = {}) {
6400
+ var yt = typeof window < "u" ? window.sessionStorage : void 0;
6401
+ function bt({ defaultTTL: e = 300 } = {}) {
6402
6402
  return {
6403
- get: St,
6404
- invalidate: bt,
6405
- set: (t, n, r = e) => Ct(t, n, r)
6403
+ get: Ct,
6404
+ invalidate: xt,
6405
+ set: (t, n, r = e) => wt(t, n, r)
6406
6406
  };
6407
6407
  }
6408
- function bt(e) {
6409
- vt?.removeItem(e);
6410
- }
6411
6408
  function xt(e) {
6409
+ yt?.removeItem(e);
6410
+ }
6411
+ function St(e) {
6412
6412
  let { timestamp: t, ttl: n } = e;
6413
6413
  return (Date.now() - t) / 1e3 >= n;
6414
6414
  }
6415
- function St(e) {
6416
- let t = vt?.getItem(e);
6415
+ function Ct(e) {
6416
+ let t = yt?.getItem(e);
6417
6417
  if (!t) return;
6418
6418
  let n = JSON.parse(t);
6419
- if (n) if (xt(n)) {
6420
- bt(e);
6419
+ if (n) if (St(n)) {
6420
+ xt(e);
6421
6421
  return;
6422
6422
  } else return n.value;
6423
6423
  }
6424
- function Ct(e, t, n) {
6424
+ function wt(e, t, n) {
6425
6425
  let r = {
6426
6426
  timestamp: Date.now(),
6427
6427
  ttl: n,
6428
6428
  value: e
6429
6429
  };
6430
- return vt?.setItem(t, JSON.stringify(r)), e;
6430
+ return yt?.setItem(t, JSON.stringify(r)), e;
6431
6431
  }
6432
6432
  //#endregion
6433
6433
  //#region src/hooks/useSessionCache.ts
6434
- function wt(e) {
6435
- return l(() => yt({ defaultTTL: e }), [e]);
6434
+ function Tt(e) {
6435
+ return l(() => bt({ defaultTTL: e }), [e]);
6436
6436
  }
6437
6437
  //#endregion
6438
6438
  //#region src/hooks/useSize.ts
6439
- function Tt(e) {
6439
+ function Et(e) {
6440
6440
  let [t, n] = d(B.zero);
6441
6441
  return G(e, (e) => {
6442
6442
  let t = V.from(e), r = V.size(t);
@@ -6445,29 +6445,29 @@ function Tt(e) {
6445
6445
  }
6446
6446
  //#endregion
6447
6447
  //#region src/utils/getStyle.ts
6448
- function Et(e, { computed: t, target: n }) {
6448
+ function Dt(e, { computed: t, target: n }) {
6449
6449
  if (typeof window > "u") return;
6450
6450
  let r = n ?? window.document.documentElement;
6451
6451
  return t ? window.getComputedStyle(r).getPropertyValue(e) || void 0 : r.style.getPropertyValue(e) || void 0;
6452
6452
  }
6453
6453
  //#endregion
6454
6454
  //#region src/utils/setStyle.ts
6455
- function Dt(e, t, { target: n } = {}) {
6455
+ function Ot(e, t, { target: n } = {}) {
6456
6456
  if (typeof window > "u") return;
6457
6457
  let r = n ?? window.document.documentElement;
6458
6458
  t === void 0 ? r.style.removeProperty(e) : r.style.setProperty(e, t);
6459
6459
  }
6460
6460
  //#endregion
6461
6461
  //#region src/hooks/useStyle.ts
6462
- function Ot(e, t, { target: n, isEnabled: r = !0 } = {}) {
6462
+ function kt(e, t, { target: n, isEnabled: r = !0 } = {}) {
6463
6463
  c(() => {
6464
6464
  if (!r) return;
6465
- let i = n ?? window.document.documentElement, a = Et(e, {
6465
+ let i = n ?? window.document.documentElement, a = Dt(e, {
6466
6466
  computed: !1,
6467
6467
  target: i
6468
6468
  });
6469
- return Dt(e, t, { target: i }), () => {
6470
- Dt(e, a, { target: i });
6469
+ return Ot(e, t, { target: i }), () => {
6470
+ Ot(e, a, { target: i });
6471
6471
  };
6472
6472
  }, [
6473
6473
  e,
@@ -6478,7 +6478,7 @@ function Ot(e, t, { target: n, isEnabled: r = !0 } = {}) {
6478
6478
  }
6479
6479
  //#endregion
6480
6480
  //#region src/hooks/useSystemColorScheme.ts
6481
- function kt(e = "light") {
6481
+ function At(e = "light") {
6482
6482
  let [t, n] = d(e);
6483
6483
  return c(() => {
6484
6484
  let e = window.matchMedia("(prefers-color-scheme: dark)");
@@ -6492,7 +6492,7 @@ function kt(e = "light") {
6492
6492
  }
6493
6493
  //#endregion
6494
6494
  //#region src/hooks/useTimeout.ts
6495
- function At(e, { shouldAutoStart: t = !0, onTimeout: n }, r = []) {
6495
+ function jt(e, { shouldAutoStart: t = !0, onTimeout: n }, r = []) {
6496
6496
  let i = u(void 0), a = U(n), c = o(() => {
6497
6497
  i.current !== void 0 && (clearTimeout(i.current), i.current = void 0);
6498
6498
  }, []), l = o(() => {
@@ -6513,8 +6513,8 @@ function At(e, { shouldAutoStart: t = !0, onTimeout: n }, r = []) {
6513
6513
  }
6514
6514
  //#endregion
6515
6515
  //#region src/primitives/Collection.tsx
6516
- function jt({ className: e, ref: t, style: n, children: r, ItemComponent: i, itemLength: a, itemPadding: o = 0, items: c = [], layout: l = "list", numSegments: u = 1, orientation: d = "vertical", selection: f, selectionMode: p = "none", isSelectionTogglable: m = !1, onActivateAt: h, onCustomEvent: g, onDeselectAt: _, onSelectAt: v, onSelectionChange: y, ...b }) {
6517
- let x = Nt(f ?? [], c), C = Ft({
6516
+ function Mt({ className: e, ref: t, style: n, children: r, ItemComponent: i, itemLength: a, itemPadding: o = 0, items: c = [], layout: l = "list", numSegments: u = 1, orientation: d = "vertical", selection: f, selectionMode: p = "none", isSelectionTogglable: m = !1, onActivateAt: h, onCustomEvent: g, onDeselectAt: _, onSelectAt: v, onSelectionChange: y, ...b }) {
6517
+ let x = Pt(f ?? [], c), C = It({
6518
6518
  itemLength: a,
6519
6519
  itemPadding: o,
6520
6520
  layout: l,
@@ -6527,7 +6527,7 @@ function jt({ className: e, ref: t, style: n, children: r, ItemComponent: i, ite
6527
6527
  let t;
6528
6528
  switch (p) {
6529
6529
  case "multiple":
6530
- t = (t) => Pt([...t.filter((t) => t !== e), e]);
6530
+ t = (t) => Ft([...t.filter((t) => t !== e), e]);
6531
6531
  break;
6532
6532
  case "single":
6533
6533
  t = (t) => [e];
@@ -6559,7 +6559,7 @@ function jt({ className: e, ref: t, style: n, children: r, ItemComponent: i, ite
6559
6559
  }
6560
6560
  j(e, t);
6561
6561
  }, [p]);
6562
- let P = k(r, { item: jt.Item });
6562
+ let P = k(r, { item: Mt.Item });
6563
6563
  return /* @__PURE__ */ (0, E.jsx)("div", {
6564
6564
  ...b,
6565
6565
  className: S(e),
@@ -6567,7 +6567,7 @@ function jt({ className: e, ref: t, style: n, children: r, ItemComponent: i, ite
6567
6567
  style: N(n, C.root),
6568
6568
  "aria-multiselectable": p === "multiple",
6569
6569
  role: l === "grid" ? "grid" : p === "none" ? "list" : "listbox",
6570
- children: /* @__PURE__ */ (0, E.jsx)(Pe, {
6570
+ children: /* @__PURE__ */ (0, E.jsx)(Fe, {
6571
6571
  in: c,
6572
6572
  children: (e, t) => {
6573
6573
  let n = l === "grid" ? "gridcell" : p === "none" ? "listitem" : "option", r = w(t), a = N(C.item, {
@@ -6589,7 +6589,7 @@ function jt({ className: e, ref: t, style: n, children: r, ItemComponent: i, ite
6589
6589
  className: S({ active: r }),
6590
6590
  style: a,
6591
6591
  "aria-selected": r,
6592
- element: P.item ?? /* @__PURE__ */ (0, E.jsx)(jt.Item, {}),
6592
+ element: P.item ?? /* @__PURE__ */ (0, E.jsx)(Mt.Item, {}),
6593
6593
  role: n,
6594
6594
  selectionMode: p,
6595
6595
  onActivateAt: h,
@@ -6608,17 +6608,17 @@ function jt({ className: e, ref: t, style: n, children: r, ItemComponent: i, ite
6608
6608
  ...r,
6609
6609
  children: e
6610
6610
  });
6611
- })(jt ||= {});
6612
- function Mt(e, t) {
6611
+ })(Mt ||= {});
6612
+ function Nt(e, t) {
6613
6613
  return !!(isNaN(e) || e >= t.length || e < 0);
6614
6614
  }
6615
- function Nt(e, t) {
6616
- return Pt(e).filter((e) => !Mt(e, t));
6615
+ function Pt(e, t) {
6616
+ return Ft(e).filter((e) => !Nt(e, t));
6617
6617
  }
6618
- function Pt(e) {
6618
+ function Ft(e) {
6619
6619
  return e.sort((e, t) => e - t);
6620
6620
  }
6621
- function Ft({ itemLength: e = NaN, itemPadding: t = 0, layout: n = "collection", numSegments: r = 1, orientation: i = "vertical" }) {
6621
+ function It({ itemLength: e = NaN, itemPadding: t = 0, layout: n = "collection", numSegments: r = 1, orientation: i = "vertical" }) {
6622
6622
  return A({
6623
6623
  item: {
6624
6624
  counterIncrement: "item-counter",
@@ -6656,11 +6656,11 @@ function Ft({ itemLength: e = NaN, itemPadding: t = 0, layout: n = "collection",
6656
6656
  }
6657
6657
  });
6658
6658
  }
6659
- process.env.NODE_ENV === "development" && (jt.displayName = "Collection", jt.Item.displayName = "Collection.Item");
6659
+ process.env.NODE_ENV === "development" && (Mt.displayName = "Collection", Mt.Item.displayName = "Collection.Item");
6660
6660
  //#endregion
6661
6661
  //#region src/primitives/Accordion.tsx
6662
- function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderComponent: i, ItemComponent: a, orientation: o = "vertical", sectionPadding: s = 0, sections: c, selection: l, selectionMode: d = "single", shouldAutoCollapse: f = !1, onActivateAt: p, onCollapseSectionAt: m, onDeselectAt: h, onExpandedSectionsChange: g, onExpandSectionAt: _, onHeaderCustomEvent: v, onItemCustomEvent: y, onSelectAt: b, onSelectionChange: x, ...C }) {
6663
- let w = zt(l ?? {}, c), T = Rt(r ?? [], c), D = Vt({ orientation: o }), O = c.map(() => u(null)), A = O.map(Tt), j = (e, t) => (w[t]?.indexOf(e) ?? -1) >= 0, P = (e) => T.indexOf(e) >= 0, F = (e) => {
6662
+ function Lt({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderComponent: i, ItemComponent: a, orientation: o = "vertical", sectionPadding: s = 0, sections: c, selection: l, selectionMode: d = "single", shouldAutoCollapse: f = !1, onActivateAt: p, onCollapseSectionAt: m, onDeselectAt: h, onExpandedSectionsChange: g, onExpandSectionAt: _, onHeaderCustomEvent: v, onItemCustomEvent: y, onSelectAt: b, onSelectionChange: x, ...C }) {
6663
+ let w = Vt(l ?? {}, c), T = Bt(r ?? [], c), D = Ut({ orientation: o }), O = c.map(() => u(null)), A = O.map(Et), j = (e, t) => (w[t]?.indexOf(e) ?? -1) >= 0, P = (e) => T.indexOf(e) >= 0, F = (e) => {
6664
6664
  let t;
6665
6665
  t = P(e) ? (t) => t.filter((t) => t !== e) : f ? (t) => [e] : (t) => [...t.filter((t) => t !== e), e], R(T, t(T));
6666
6666
  }, I = (e, t) => {
@@ -6670,7 +6670,7 @@ function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6670
6670
  case "multiple":
6671
6671
  n = (n) => ({
6672
6672
  ...n,
6673
- [t]: Bt([...(n[t] ?? []).filter((t) => t !== e), e])
6673
+ [t]: Ht([...(n[t] ?? []).filter((t) => t !== e), e])
6674
6674
  });
6675
6675
  break;
6676
6676
  case "single":
@@ -6697,17 +6697,17 @@ function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6697
6697
  }
6698
6698
  r.forEach((e) => h?.(e[0], e[1])), i.forEach((e) => b?.(e[0], e[1])), x?.(t);
6699
6699
  }, B = k(n, {
6700
- collapseIcon: Y.CollapseIcon,
6701
- expandIcon: Y.ExpandIcon,
6702
- header: Y.Header,
6703
- item: Y.Item,
6704
- section: Y.Section
6700
+ collapseIcon: Lt.CollapseIcon,
6701
+ expandIcon: Lt.ExpandIcon,
6702
+ header: Lt.Header,
6703
+ item: Lt.Item,
6704
+ section: Lt.Section
6705
6705
  });
6706
6706
  return /* @__PURE__ */ (0, E.jsx)("div", {
6707
6707
  ref: e,
6708
6708
  style: N(t, D.root),
6709
6709
  ...C,
6710
- children: /* @__PURE__ */ (0, E.jsx)(Pe, {
6710
+ children: /* @__PURE__ */ (0, E.jsx)(Fe, {
6711
6711
  in: c,
6712
6712
  children: (e, t) => {
6713
6713
  let { collectionPadding: n = 0, itemLength: r = 50, itemPadding: c = 0, items: l = [], layout: u = "list", maxVisible: f = -1, numSegments: m = 1, isSelectionTogglable: h } = e, g = u === "list" ? l.length : Math.ceil(l.length / m), _ = f < 0 ? g : Math.min(g, f), b = r * _ + c * (_ - 1), x = !P(t), C = A[t], T = x ? C.width : b + C.width + n, k = x ? C.height : b + C.height + n;
@@ -6719,7 +6719,7 @@ function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6719
6719
  marginLeft: t === 0 ? "0px" : `${s}px`,
6720
6720
  ...C.width > 0 ? { width: `${T}px` } : { visibility: "hidden" }
6721
6721
  }),
6722
- element: B.section ?? /* @__PURE__ */ (0, E.jsx)(Y.Section, {}),
6722
+ element: B.section ?? /* @__PURE__ */ (0, E.jsx)(Lt.Section, {}),
6723
6723
  children: [/* @__PURE__ */ (0, E.jsx)("div", {
6724
6724
  ref: O[t],
6725
6725
  style: N(D.headerContainer),
@@ -6743,7 +6743,7 @@ function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6743
6743
  }),
6744
6744
  style: N(D.header),
6745
6745
  "aria-expanded": !x,
6746
- element: B.header ?? /* @__PURE__ */ (0, E.jsx)(Y.Header, {}),
6746
+ element: B.header ?? /* @__PURE__ */ (0, E.jsx)(Lt.Header, {}),
6747
6747
  role: "button",
6748
6748
  onClick: () => F(t),
6749
6749
  children: [/* @__PURE__ */ (0, E.jsx)("span", { dangerouslySetInnerHTML: { __html: e.label } }), B.expandIcon && /* @__PURE__ */ (0, E.jsx)(M, {
@@ -6768,7 +6768,7 @@ function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6768
6768
  width: `${b}px`
6769
6769
  }),
6770
6770
  role: "region",
6771
- children: /* @__PURE__ */ (0, E.jsx)(jt, {
6771
+ children: /* @__PURE__ */ (0, E.jsx)(Mt, {
6772
6772
  className: S({
6773
6773
  collapsed: x,
6774
6774
  expanded: !x
@@ -6788,7 +6788,7 @@ function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6788
6788
  onCustomEvent: (e, n, r) => y?.(e, t, n, r),
6789
6789
  onDeselectAt: (e) => L(e, t),
6790
6790
  onSelectAt: (e) => I(e, t),
6791
- children: !a && (B.item ?? /* @__PURE__ */ (0, E.jsx)(Y.Item, {}))
6791
+ children: !a && (B.item ?? /* @__PURE__ */ (0, E.jsx)(Lt.Item, {}))
6792
6792
  })
6793
6793
  })]
6794
6794
  });
@@ -6809,30 +6809,30 @@ function Y({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6809
6809
  }), e.Section = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("div", {
6810
6810
  ...t,
6811
6811
  children: e
6812
- }), e.Item = jt.Item;
6813
- })(Y ||= {});
6814
- function It(e, t) {
6812
+ }), e.Item = Mt.Item;
6813
+ })(Lt ||= {});
6814
+ function Rt(e, t) {
6815
6815
  return e >= t.length || e < 0;
6816
6816
  }
6817
- function Lt(e, t, n) {
6818
- return !!(It(t, n) || e >= (n[t].items ?? []).length || e < 0);
6817
+ function zt(e, t, n) {
6818
+ return !!(Rt(t, n) || e >= (n[t].items ?? []).length || e < 0);
6819
6819
  }
6820
- function Rt(e, t) {
6821
- return Bt(e).filter((e) => !It(e, t));
6820
+ function Bt(e, t) {
6821
+ return Ht(e).filter((e) => !Rt(e, t));
6822
6822
  }
6823
- function zt(e, t) {
6823
+ function Vt(e, t) {
6824
6824
  let n = {};
6825
6825
  for (let r in t) {
6826
6826
  if (!Object.hasOwn(t, r)) continue;
6827
- let i = Bt([...e[r] ?? []]);
6828
- n[Number(r)] = Bt(i).filter((e) => !Lt(e, Number(r), t));
6827
+ let i = Ht([...e[r] ?? []]);
6828
+ n[Number(r)] = Ht(i).filter((e) => !zt(e, Number(r), t));
6829
6829
  }
6830
6830
  return n;
6831
6831
  }
6832
- function Bt(e) {
6832
+ function Ht(e) {
6833
6833
  return e.sort((e, t) => e - t);
6834
6834
  }
6835
- function Vt({ orientation: e = "vertical" }) {
6835
+ function Ut({ orientation: e = "vertical" }) {
6836
6836
  return A({
6837
6837
  collapseIcon: {
6838
6838
  pointerEvents: "none",
@@ -6884,11 +6884,11 @@ function Vt({ orientation: e = "vertical" }) {
6884
6884
  }
6885
6885
  });
6886
6886
  }
6887
- process.env.NODE_ENV === "development" && (Y.displayName = "Accordion", Y.Header.displayName = "Accordion.Header", Y.ExpandIcon.displayName = "Accordion.ExpandIcon", Y.CollapseIcon.displayName = "Accordion.CollapseIcon", Y.Item.displayName = "Accordion.Item");
6887
+ process.env.NODE_ENV === "development" && (Lt.displayName = "Accordion", Lt.Header.displayName = "Accordion.Header", Lt.ExpandIcon.displayName = "Accordion.ExpandIcon", Lt.CollapseIcon.displayName = "Accordion.CollapseIcon", Lt.Item.displayName = "Accordion.Item");
6888
6888
  //#endregion
6889
6889
  //#region src/primitives/Carousel.tsx
6890
- function Ht({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0, ItemComponent: i, items: a = [], orientation: s = "horizontal", isDragEnabled: l = !0, shouldTrackExposure: f = !1, onAutoAdvancePause: p, onAutoAdvanceResume: m, onIndexChange: h, ...g }) {
6891
- let _ = u(void 0), v = u(null), y = u(void 0), b = u(void 0), x = u(void 0), S = 1e3, C = U(p), w = U(m), T = U(h), D = u(R.zero), O = u(!1), k = u(!1), A = tt(), [j, M] = d(Wt(v, s)), [P, F] = d(!1), I = Kt({
6890
+ function Wt({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0, ItemComponent: i, items: a = [], orientation: s = "horizontal", isDragEnabled: l = !0, shouldTrackExposure: f = !1, onAutoAdvancePause: p, onAutoAdvanceResume: m, onIndexChange: h, ...g }) {
6891
+ let _ = u(void 0), v = u(null), y = u(void 0), b = u(void 0), x = u(void 0), S = 1e3, C = U(p), w = U(m), T = U(h), D = u(R.zero), O = u(!1), k = u(!1), A = nt(), [j, M] = d(Kt(v, s)), [P, F] = d(!1), I = Jt({
6892
6892
  orientation: s,
6893
6893
  scrollSnapEnabled: A || !P
6894
6894
  }), L = t > 0, z = o(() => {
@@ -6898,9 +6898,9 @@ function Ht({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
6898
6898
  clearTimeout(x.current), x.current = void 0;
6899
6899
  }, S);
6900
6900
  }, [S, z]), V = o(() => {
6901
- Ut(v, r, s), B();
6901
+ Gt(v, r, s), B();
6902
6902
  }, [r, s]), H = o(() => {
6903
- M(Wt(v, s));
6903
+ M(Kt(v, s));
6904
6904
  }, [s]), W = o((e) => {
6905
6905
  A || (y.current = R.make(e.clientX, e.clientY), F(!0));
6906
6906
  }, [A]), G = o((e) => {
@@ -6948,10 +6948,10 @@ function Ht({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
6948
6948
  f,
6949
6949
  H
6950
6950
  ]);
6951
- return Xe(v, {
6951
+ return Ze(v, {
6952
6952
  isEnabled: !A && l && a.length > 1,
6953
6953
  onDragMove: q
6954
- }), Qe(P || !L ? -1 : t, { onInterval: ee }, [r]), c(() => {
6954
+ }), $e(P || !L ? -1 : t, { onInterval: ee }, [r]), c(() => {
6955
6955
  !L || A || (P ? C.current?.() : w.current?.());
6956
6956
  }, [
6957
6957
  A,
@@ -6982,7 +6982,7 @@ function Ht({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
6982
6982
  children: /* @__PURE__ */ (0, E.jsx)("div", {
6983
6983
  ref: v,
6984
6984
  style: N(I.viewport),
6985
- children: /* @__PURE__ */ (0, E.jsx)(Pe, {
6985
+ children: /* @__PURE__ */ (0, E.jsx)(Fe, {
6986
6986
  in: a,
6987
6987
  children: ({ style: e, ...t }, n) => /* @__PURE__ */ (0, E.jsx)("div", {
6988
6988
  style: N(I.itemContainer),
@@ -6997,7 +6997,7 @@ function Ht({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
6997
6997
  })
6998
6998
  });
6999
6999
  }
7000
- function Ut(e, t, n) {
7000
+ function Gt(e, t, n) {
7001
7001
  let r = e?.current;
7002
7002
  if (!r) return;
7003
7003
  let i = n === "horizontal" ? 0 : r.clientHeight * t, a = n === "horizontal" ? r.clientWidth * t : 0;
@@ -7007,14 +7007,14 @@ function Ut(e, t, n) {
7007
7007
  top: i
7008
7008
  });
7009
7009
  }
7010
- function Wt(e, t) {
7010
+ function Kt(e, t) {
7011
7011
  let n = e?.current;
7012
7012
  if (!n) return;
7013
7013
  let r = [];
7014
- for (let i = 0; i < n.children.length; i++) r.push(Gt(i, e, t));
7014
+ for (let i = 0; i < n.children.length; i++) r.push(qt(i, e, t));
7015
7015
  return r;
7016
7016
  }
7017
- function Gt(e, t, n) {
7017
+ function qt(e, t, n) {
7018
7018
  let r = t?.current, i = r?.children[e];
7019
7019
  if (!i) return 0;
7020
7020
  let a = V.intersecting(i, r);
@@ -7024,7 +7024,7 @@ function Gt(e, t, n) {
7024
7024
  default: return console.error(`[etudes::Carousel] Unsupported orientation: ${n}`), NaN;
7025
7025
  }
7026
7026
  }
7027
- function Kt({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
7027
+ function Jt({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
7028
7028
  return A({
7029
7029
  item: {
7030
7030
  height: "100%",
@@ -7060,15 +7060,15 @@ function Kt({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
7060
7060
  }
7061
7061
  });
7062
7062
  }
7063
- process.env.NODE_ENV === "development" && (Ht.displayName = "Carousel");
7063
+ process.env.NODE_ENV === "development" && (Wt.displayName = "Carousel");
7064
7064
  //#endregion
7065
7065
  //#region src/primitives/CodeInput.tsx
7066
- function qt({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r = !1, children: i, inputMode: a = "numeric", placeholder: o, size: c, value: l, isDisabled: d = !1, isRequired: f = !0, onChange: p, ...m }) {
7067
- let h = Yt(l, c), g = u([]), _ = Jt(), v = k(i, { field: qt.Field }), y = (e) => {
7066
+ function Yt({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r = !1, children: i, inputMode: a = "numeric", placeholder: o, size: c, value: l, isDisabled: d = !1, isRequired: f = !0, onChange: p, ...m }) {
7067
+ let h = Zt(l, c), g = u([]), _ = Xt(), v = k(i, { field: Yt.Field }), y = (e) => {
7068
7068
  e < 0 ? g.current[0]?.focus() : e >= c ? g.current[c - 1]?.focus() : g.current[e]?.focus();
7069
7069
  }, b = (e) => (t) => {
7070
- let n = h[e], r = Zt(t.target.value, n);
7071
- p(Xt(h.slice(), r.split("").slice(0, c), e)), y(Math.min(e + r.length, c - 1));
7070
+ let n = h[e], r = $t(t.target.value, n);
7071
+ p(Qt(h.slice(), r.split("").slice(0, c), e)), y(Math.min(e + r.length, c - 1));
7072
7072
  }, x = (e) => (t) => {
7073
7073
  switch (t.key) {
7074
7074
  case "ArrowLeft":
@@ -7088,7 +7088,7 @@ function qt({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7088
7088
  }, S = (e) => (t) => {
7089
7089
  t.preventDefault();
7090
7090
  let n = t.clipboardData.getData("text").trim();
7091
- p(Xt(h.slice(), n.split("").slice(0, c), e)), y(Math.min(e + n.length, c - 1));
7091
+ p(Qt(h.slice(), n.split("").slice(0, c), e)), y(Math.min(e + n.length, c - 1));
7092
7092
  };
7093
7093
  return s(() => {
7094
7094
  if (!r) return;
@@ -7107,7 +7107,7 @@ function qt({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7107
7107
  "aria-required": f,
7108
7108
  autoComplete: n,
7109
7109
  disabled: d,
7110
- element: v.field ?? /* @__PURE__ */ (0, E.jsx)(qt.Field, {}),
7110
+ element: v.field ?? /* @__PURE__ */ (0, E.jsx)(Yt.Field, {}),
7111
7111
  inputMode: a,
7112
7112
  placeholder: o,
7113
7113
  required: f,
@@ -7126,8 +7126,8 @@ function qt({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7126
7126
  autoCorrect: "off",
7127
7127
  type: "text"
7128
7128
  });
7129
- })(qt ||= {});
7130
- function Jt() {
7129
+ })(Yt ||= {});
7130
+ function Xt() {
7131
7131
  return A({
7132
7132
  field: {
7133
7133
  caretColor: "transparent",
@@ -7141,24 +7141,24 @@ function Jt() {
7141
7141
  }
7142
7142
  });
7143
7143
  }
7144
- function Yt(e, t) {
7144
+ function Zt(e, t) {
7145
7145
  let n = e.slice(0, t);
7146
7146
  for (; n.length < t;) n.push("");
7147
7147
  return n;
7148
7148
  }
7149
- function Xt(e, t, n = 0) {
7149
+ function Qt(e, t, n = 0) {
7150
7150
  let r = n, i = 0;
7151
7151
  for (; i < t.length && r < e.length;) e[r] = t[i], r++, i++;
7152
7152
  for (; i < t.length;) e.shift(), e.push(t[i]), i++;
7153
7153
  return e;
7154
7154
  }
7155
- function Zt(e, t) {
7155
+ function $t(e, t) {
7156
7156
  return t === "" ? e : e.startsWith(t) ? e.slice(t.length) : e.endsWith(t) ? e.slice(0, -t.length) : e;
7157
7157
  }
7158
- process.env.NODE_ENV === "development" && (qt.displayName = "CodeInput", qt.Field.displayName = "CodeInput.Field");
7158
+ process.env.NODE_ENV === "development" && (Yt.displayName = "CodeInput", Yt.Field.displayName = "CodeInput.Field");
7159
7159
  //#endregion
7160
7160
  //#region src/primitives/TextField.tsx
7161
- function Qt({ className: e, ref: t, emptyValue: n = "", formatter: r, placeholder: i, type: a = "text", value: s, isDisabled: c = !1, isRequired: l = !1, onChange: u, onFocus: d, onUnfocus: f, ...p }) {
7161
+ function en({ className: e, ref: t, emptyValue: n = "", formatter: r, placeholder: i, type: a = "text", value: s, isDisabled: c = !1, isRequired: l = !1, onChange: u, onFocus: d, onUnfocus: f, ...p }) {
7162
7162
  let m = o((e) => {
7163
7163
  let t = (r?.(e) ?? e) || n;
7164
7164
  u?.(t);
@@ -7180,10 +7180,10 @@ function Qt({ className: e, ref: t, emptyValue: n = "", formatter: r, placeholde
7180
7180
  onFocus: ({ target: e }) => d?.(e.value)
7181
7181
  });
7182
7182
  }
7183
- process.env.NODE_ENV === "development" && (Qt.displayName = "TextField");
7183
+ process.env.NODE_ENV === "development" && (en.displayName = "TextField");
7184
7184
  //#endregion
7185
7185
  //#region src/primitives/Counter.tsx
7186
- function $t({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN, min: a = NaN, quantity: o = 0, onChange: c, ...l }) {
7186
+ function tn({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN, min: a = NaN, quantity: o = 0, onChange: c, ...l }) {
7187
7187
  let u = () => {
7188
7188
  c?.(_(o - 1));
7189
7189
  }, f = () => {
@@ -7199,7 +7199,7 @@ function $t({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7199
7199
  }, _ = (e) => {
7200
7200
  let t = e;
7201
7201
  return isNaN(a) || (t = Math.max(a, t)), isNaN(i) || (t = Math.min(i, t)), t;
7202
- }, [v, y] = d(h(o)), b = pt(o), x = !isNaN(i) && o + 1 > i, C = !isNaN(a) && o - 1 < a;
7202
+ }, [v, y] = d(h(o)), b = mt(o), x = !isNaN(i) && o + 1 > i, C = !isNaN(a) && o - 1 < a;
7203
7203
  s(() => {
7204
7204
  b === void 0 || b === o || y(h(_(o)));
7205
7205
  }, [
@@ -7208,24 +7208,24 @@ function $t({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7208
7208
  i
7209
7209
  ]);
7210
7210
  let w = k(r, {
7211
- addButton: $t.AddButton,
7212
- subscribeButton: $t.SubtractButton,
7213
- textField: $t.TextField
7211
+ addButton: tn.AddButton,
7212
+ subscribeButton: tn.SubtractButton,
7213
+ textField: tn.TextField
7214
7214
  });
7215
7215
  return /* @__PURE__ */ (0, E.jsxs)("div", {
7216
7216
  ...l,
7217
7217
  ref: e,
7218
- style: N(t, en.root),
7218
+ style: N(t, nn.root),
7219
7219
  children: [
7220
7220
  /* @__PURE__ */ (0, E.jsx)(M, {
7221
7221
  className: S({ disabled: C }),
7222
- style: N(en.subtract),
7223
- element: w.subscribeButton ?? /* @__PURE__ */ (0, E.jsx)($t.SubtractButton, {}),
7222
+ style: N(nn.subtract),
7223
+ element: w.subscribeButton ?? /* @__PURE__ */ (0, E.jsx)(tn.SubtractButton, {}),
7224
7224
  onClick: () => u()
7225
7225
  }),
7226
7226
  /* @__PURE__ */ (0, E.jsx)(M, {
7227
- style: N(en.textField),
7228
- element: w.textField ?? /* @__PURE__ */ (0, E.jsx)($t.TextField, {}),
7227
+ style: N(nn.textField),
7228
+ element: w.textField ?? /* @__PURE__ */ (0, E.jsx)(tn.TextField, {}),
7229
7229
  value: v,
7230
7230
  isDisabled: !n,
7231
7231
  onChange: p,
@@ -7233,23 +7233,23 @@ function $t({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7233
7233
  }),
7234
7234
  /* @__PURE__ */ (0, E.jsx)(M, {
7235
7235
  className: S({ disabled: x }),
7236
- style: N(en.add),
7237
- element: w.addButton ?? /* @__PURE__ */ (0, E.jsx)($t.AddButton, {}),
7236
+ style: N(nn.add),
7237
+ element: w.addButton ?? /* @__PURE__ */ (0, E.jsx)(tn.AddButton, {}),
7238
7238
  onClick: () => f()
7239
7239
  })
7240
7240
  ]
7241
7241
  });
7242
7242
  }
7243
7243
  (function(e) {
7244
- e.TextField = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)(Qt, { ...e }), e.AddButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("button", {
7244
+ e.TextField = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)(en, { ...e }), e.AddButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("button", {
7245
7245
  ...t,
7246
7246
  children: e
7247
7247
  }), e.SubtractButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("button", {
7248
7248
  ...t,
7249
7249
  children: e
7250
7250
  });
7251
- })($t ||= {});
7252
- var en = A({
7251
+ })(tn ||= {});
7252
+ var nn = A({
7253
7253
  add: { flex: "0 0 auto" },
7254
7254
  root: {
7255
7255
  alignItems: "stretch",
@@ -7260,14 +7260,14 @@ var en = A({
7260
7260
  subtract: { flex: "0 0 auto" },
7261
7261
  textField: { width: "100%" }
7262
7262
  });
7263
- process.env.NODE_ENV === "development" && ($t.displayName = "Counter", $t.AddButton.displayName = "Counter.AddButton", $t.SubtractButton.displayName = "Counter.SubtractButton", $t.TextField.displayName = "Counter.TextField");
7263
+ process.env.NODE_ENV === "development" && (tn.displayName = "Counter", tn.AddButton.displayName = "Counter.AddButton", tn.SubtractButton.displayName = "Counter.SubtractButton", tn.TextField.displayName = "Counter.TextField");
7264
7264
  //#endregion
7265
7265
  //#region src/primitives/Dial.tsx
7266
- function tn({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, knobThickness: a = 10, radius: o = 50, trackGap: s = 0, trackThickness: c = 2, ...l }) {
7266
+ function Y({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, knobThickness: a = 10, radius: o = 50, trackGap: s = 0, trackThickness: c = 2, ...l }) {
7267
7267
  let u = o * 2, d = Math.max(0, Math.min(360, i)), f = k(r, {
7268
- knob: tn.Knob,
7269
- track: tn.Track
7270
- }), p = an({
7268
+ knob: Y.Knob,
7269
+ track: Y.Track
7270
+ }), p = on({
7271
7271
  angle: n,
7272
7272
  diameter: u
7273
7273
  });
@@ -7285,7 +7285,7 @@ function tn({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7285
7285
  children: /* @__PURE__ */ (0, E.jsx)(M, {
7286
7286
  cx: o,
7287
7287
  cy: o,
7288
- element: f.track ?? /* @__PURE__ */ (0, E.jsx)(tn.Track, {}),
7288
+ element: f.track ?? /* @__PURE__ */ (0, E.jsx)(Y.Track, {}),
7289
7289
  fill: "none",
7290
7290
  r: o - c / 2,
7291
7291
  strokeDasharray: s,
@@ -7299,8 +7299,8 @@ function tn({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7299
7299
  viewBox: `0 0 ${u} ${u}`,
7300
7300
  xmlns: "http://www.w3.org/2000/svg",
7301
7301
  children: /* @__PURE__ */ (0, E.jsx)(M, {
7302
- d: rn(o, o, o - a / 2 - (c - a) / 2, -d / 2, d / 2),
7303
- element: f.knob ?? /* @__PURE__ */ (0, E.jsx)(tn.Knob, {}),
7302
+ d: an(o, o, o - a / 2 - (c - a) / 2, -d / 2, d / 2),
7303
+ element: f.knob ?? /* @__PURE__ */ (0, E.jsx)(Y.Knob, {}),
7304
7304
  fill: "none",
7305
7305
  strokeWidth: a
7306
7306
  })
@@ -7310,16 +7310,16 @@ function tn({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7310
7310
  }
7311
7311
  (function(e) {
7312
7312
  e.Track = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("circle", { ...e }), e.Knob = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("path", { ...e });
7313
- })(tn ||= {});
7314
- function nn(e, t, n, r) {
7313
+ })(Y ||= {});
7314
+ function rn(e, t, n, r) {
7315
7315
  let i = (r - 90) * Math.PI / 180;
7316
7316
  return {
7317
7317
  x: e + n * Math.cos(i),
7318
7318
  y: t + n * Math.sin(i)
7319
7319
  };
7320
7320
  }
7321
- function rn(e, t, n, r, i) {
7322
- let a = nn(e, t, n, i), o = nn(e, t, n, r), s = i - r <= 180 ? "0" : "1";
7321
+ function an(e, t, n, r, i) {
7322
+ let a = rn(e, t, n, i), o = rn(e, t, n, r), s = i - r <= 180 ? "0" : "1";
7323
7323
  return [
7324
7324
  "M",
7325
7325
  a.x,
@@ -7334,7 +7334,7 @@ function rn(e, t, n, r, i) {
7334
7334
  o.y
7335
7335
  ].join(" ");
7336
7336
  }
7337
- function an({ angle: e = 0, diameter: t = 0 }) {
7337
+ function on({ angle: e = 0, diameter: t = 0 }) {
7338
7338
  return A({
7339
7339
  knobContainer: {
7340
7340
  backgroundPosition: "center",
@@ -7368,11 +7368,11 @@ function an({ angle: e = 0, diameter: t = 0 }) {
7368
7368
  }
7369
7369
  });
7370
7370
  }
7371
- process.env.NODE_ENV === "development" && (tn.displayName = "Dial", tn.Track.displayName = "Dial.Track", tn.Knob.displayName = "Dial.Knob");
7371
+ process.env.NODE_ENV === "development" && (Y.displayName = "Dial", Y.Track.displayName = "Dial.Track", Y.Knob.displayName = "Dial.Knob");
7372
7372
  //#endregion
7373
7373
  //#region src/primitives/Dropdown.tsx
7374
7374
  function X({ className: e, ref: t, style: n, children: r, collectionPadding: i = 0, ItemComponent: a, itemLength: o, itemPadding: c = 0, items: l = [], label: f, layout: p = "list", maxVisibleItems: m = -1, numSegments: h = 1, orientation: g = "vertical", selection: _ = [], selectionMode: v = "single", ToggleComponent: y, isCollapsed: b, isInverted: x = !1, isSelectionTogglable: C = !1, shouldCollapseOnSelect: w = !0, onActivateAt: T, onCollapse: D, onDeselectAt: O, onExpand: A, onSelectAt: j, onSelectionChange: P, onToggleCustomEvent: F, ...I }) {
7375
- let L = u(null), R = ee(L), z = l.length, B = ln(l, m, h, p), V = o ?? (g === "vertical" ? R.height : R.width), H = V * B + c * (B - 1), U = sn(_, l), [W, G] = d(b ?? !0), K = un({
7375
+ let L = u(null), R = ee(L), z = l.length, B = un(l, m, h, p), V = o ?? (g === "vertical" ? R.height : R.width), H = V * B + c * (B - 1), U = cn(_, l), [W, G] = d(b ?? !0), K = dn({
7376
7376
  collectionPadding: i,
7377
7377
  maxVisibleItems: m,
7378
7378
  menuLength: H,
@@ -7476,7 +7476,7 @@ function X({ className: e, ref: t, style: n, children: r, collectionPadding: i =
7476
7476
  });
7477
7477
  }
7478
7478
  (function(e) {
7479
- e.Collection = jt, e.CollapseIcon = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("figure", {
7479
+ e.Collection = Mt, e.CollapseIcon = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("figure", {
7480
7480
  ...t,
7481
7481
  "aria-hidden": !0,
7482
7482
  children: e
@@ -7484,21 +7484,21 @@ function X({ className: e, ref: t, style: n, children: r, collectionPadding: i =
7484
7484
  ...t,
7485
7485
  "aria-hidden": !0,
7486
7486
  children: e
7487
- }), e.Item = jt.Item, e.Toggle = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("button", {
7487
+ }), e.Item = Mt.Item, e.Toggle = ({ children: e, ...t }) => /* @__PURE__ */ (0, E.jsx)("button", {
7488
7488
  ...t,
7489
7489
  children: e
7490
7490
  });
7491
7491
  })(X ||= {});
7492
- function on(e, t) {
7492
+ function sn(e, t) {
7493
7493
  return !!(isNaN(e) || e >= t.length || e < 0);
7494
7494
  }
7495
- function sn(e, t) {
7496
- return cn(e).filter((e) => !on(e, t));
7495
+ function cn(e, t) {
7496
+ return ln(e).filter((e) => !sn(e, t));
7497
7497
  }
7498
- function cn(e) {
7498
+ function ln(e) {
7499
7499
  return e.sort((e, t) => e - t);
7500
7500
  }
7501
- function ln(e, t, n, r) {
7501
+ function un(e, t, n, r) {
7502
7502
  let i = e.length;
7503
7503
  switch (r) {
7504
7504
  case "grid": {
@@ -7508,7 +7508,7 @@ function ln(e, t, n, r) {
7508
7508
  default: return t < 0 ? i : Math.min(i, t);
7509
7509
  }
7510
7510
  }
7511
- function un({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n = NaN, numItems: r = 0, orientation: i = "vertical", isCollapsed: a = !0, isInverted: o = !1 }) {
7511
+ function dn({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n = NaN, numItems: r = 0, orientation: i = "vertical", isCollapsed: a = !0, isInverted: o = !1 }) {
7512
7512
  return A({
7513
7513
  body: {
7514
7514
  height: "100%",
@@ -7570,10 +7570,10 @@ function un({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n =
7570
7570
  process.env.NODE_ENV === "development" && (X.displayName = "Dropdown", X.Collection.displayName = "Dropdown.Collection", X.CollapseIcon.displayName = "Dropdown.CollapseIcon", X.ExpandIcon.displayName = "Dropdown.ExpandIcon", X.Item.displayName = "Dropdown.Item", X.Toggle.displayName = "Dropdown.Toggle");
7571
7571
  //#endregion
7572
7572
  //#region node_modules/fast-xml-parser/src/util.js
7573
- var dn = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
7574
- dn + "";
7575
- var fn = "[" + dn + "][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*", pn = RegExp("^" + fn + "$");
7576
- function mn(e, t) {
7573
+ var fn = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
7574
+ fn + "";
7575
+ var pn = "[" + fn + "][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*", mn = RegExp("^" + pn + "$");
7576
+ function hn(e, t) {
7577
7577
  let n = [], r = t.exec(e);
7578
7578
  for (; r;) {
7579
7579
  let i = [];
@@ -7584,13 +7584,13 @@ function mn(e, t) {
7584
7584
  }
7585
7585
  return n;
7586
7586
  }
7587
- var hn = function(e) {
7588
- return pn.exec(e) != null;
7587
+ var gn = function(e) {
7588
+ return mn.exec(e) != null;
7589
7589
  };
7590
- function gn(e) {
7590
+ function _n(e) {
7591
7591
  return e !== void 0;
7592
7592
  }
7593
- var _n = [
7593
+ var vn = [
7594
7594
  "hasOwnProperty",
7595
7595
  "toString",
7596
7596
  "valueOf",
@@ -7598,94 +7598,94 @@ var _n = [
7598
7598
  "__defineSetter__",
7599
7599
  "__lookupGetter__",
7600
7600
  "__lookupSetter__"
7601
- ], vn = [
7601
+ ], yn = [
7602
7602
  "__proto__",
7603
7603
  "constructor",
7604
7604
  "prototype"
7605
- ], yn = {
7605
+ ], bn = {
7606
7606
  allowBooleanAttributes: !1,
7607
7607
  unpairedTags: []
7608
7608
  };
7609
- function bn(e, t) {
7610
- t = Object.assign({}, yn, t);
7609
+ function xn(e, t) {
7610
+ t = Object.assign({}, bn, t);
7611
7611
  let n = [], r = !1, i = !1;
7612
7612
  e[0] === "" && (e = e.substr(1));
7613
7613
  for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
7614
- if (a += 2, a = Sn(e, a), a.err) return a;
7614
+ if (a += 2, a = Cn(e, a), a.err) return a;
7615
7615
  } else if (e[a] === "<") {
7616
7616
  let o = a;
7617
7617
  if (a++, e[a] === "!") {
7618
- a = Cn(e, a);
7618
+ a = wn(e, a);
7619
7619
  continue;
7620
7620
  } else {
7621
7621
  let s = !1;
7622
7622
  e[a] === "/" && (s = !0, a++);
7623
7623
  let c = "";
7624
7624
  for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
7625
- if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Mn(c)) {
7625
+ if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Nn(c)) {
7626
7626
  let t;
7627
- return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", Z("InvalidTag", t, Nn(e, a));
7627
+ return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", Z("InvalidTag", t, Q(e, a));
7628
7628
  }
7629
- let l = En(e, a);
7630
- if (l === !1) return Z("InvalidAttr", "Attributes for '" + c + "' have open quote.", Nn(e, a));
7629
+ let l = Dn(e, a);
7630
+ if (l === !1) return Z("InvalidAttr", "Attributes for '" + c + "' have open quote.", Q(e, a));
7631
7631
  let u = l.value;
7632
7632
  if (a = l.index, u[u.length - 1] === "/") {
7633
7633
  let n = a - u.length;
7634
7634
  u = u.substring(0, u.length - 1);
7635
- let i = On(u, t);
7635
+ let i = kn(u, t);
7636
7636
  if (i === !0) r = !0;
7637
- else return Z(i.err.code, i.err.msg, Nn(e, n + i.err.line));
7637
+ else return Z(i.err.code, i.err.msg, Q(e, n + i.err.line));
7638
7638
  } else if (s) {
7639
- if (!l.tagClosed) return Z("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", Nn(e, a));
7640
- if (u.trim().length > 0) return Z("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", Nn(e, o));
7641
- if (n.length === 0) return Z("InvalidTag", "Closing tag '" + c + "' has not been opened.", Nn(e, o));
7639
+ if (!l.tagClosed) return Z("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", Q(e, a));
7640
+ if (u.trim().length > 0) return Z("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", Q(e, o));
7641
+ if (n.length === 0) return Z("InvalidTag", "Closing tag '" + c + "' has not been opened.", Q(e, o));
7642
7642
  {
7643
7643
  let t = n.pop();
7644
7644
  if (c !== t.tagName) {
7645
- let n = Nn(e, t.tagStartPos);
7646
- return Z("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", Nn(e, o));
7645
+ let n = Q(e, t.tagStartPos);
7646
+ return Z("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", Q(e, o));
7647
7647
  }
7648
7648
  n.length == 0 && (i = !0);
7649
7649
  }
7650
7650
  } else {
7651
- let s = On(u, t);
7652
- if (s !== !0) return Z(s.err.code, s.err.msg, Nn(e, a - u.length + s.err.line));
7653
- if (i === !0) return Z("InvalidXml", "Multiple possible root nodes found.", Nn(e, a));
7651
+ let s = kn(u, t);
7652
+ if (s !== !0) return Z(s.err.code, s.err.msg, Q(e, a - u.length + s.err.line));
7653
+ if (i === !0) return Z("InvalidXml", "Multiple possible root nodes found.", Q(e, a));
7654
7654
  t.unpairedTags.indexOf(c) !== -1 || n.push({
7655
7655
  tagName: c,
7656
7656
  tagStartPos: o
7657
7657
  }), r = !0;
7658
7658
  }
7659
7659
  for (a++; a < e.length; a++) if (e[a] === "<") if (e[a + 1] === "!") {
7660
- a++, a = Cn(e, a);
7660
+ a++, a = wn(e, a);
7661
7661
  continue;
7662
7662
  } else if (e[a + 1] === "?") {
7663
- if (a = Sn(e, ++a), a.err) return a;
7663
+ if (a = Cn(e, ++a), a.err) return a;
7664
7664
  } else break;
7665
7665
  else if (e[a] === "&") {
7666
- let t = An(e, a);
7667
- if (t == -1) return Z("InvalidChar", "char '&' is not expected.", Nn(e, a));
7666
+ let t = jn(e, a);
7667
+ if (t == -1) return Z("InvalidChar", "char '&' is not expected.", Q(e, a));
7668
7668
  a = t;
7669
- } else if (i === !0 && !xn(e[a])) return Z("InvalidXml", "Extra text at the end", Nn(e, a));
7669
+ } else if (i === !0 && !Sn(e[a])) return Z("InvalidXml", "Extra text at the end", Q(e, a));
7670
7670
  e[a] === "<" && a--;
7671
7671
  }
7672
7672
  } else {
7673
- if (xn(e[a])) continue;
7674
- return Z("InvalidChar", "char '" + e[a] + "' is not expected.", Nn(e, a));
7673
+ if (Sn(e[a])) continue;
7674
+ return Z("InvalidChar", "char '" + e[a] + "' is not expected.", Q(e, a));
7675
7675
  }
7676
- return r ? n.length == 1 ? Z("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", Nn(e, n[0].tagStartPos)) : n.length > 0 ? Z("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
7676
+ return r ? n.length == 1 ? Z("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", Q(e, n[0].tagStartPos)) : n.length > 0 ? Z("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
7677
7677
  line: 1,
7678
7678
  col: 1
7679
7679
  }) : !0 : Z("InvalidXml", "Start tag expected.", 1);
7680
7680
  }
7681
- function xn(e) {
7681
+ function Sn(e) {
7682
7682
  return e === " " || e === " " || e === "\n" || e === "\r";
7683
7683
  }
7684
- function Sn(e, t) {
7684
+ function Cn(e, t) {
7685
7685
  let n = t;
7686
7686
  for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
7687
7687
  let r = e.substr(n, t - n);
7688
- if (t > 5 && r === "xml") return Z("InvalidXml", "XML declaration allowed only at the start of the document.", Nn(e, t));
7688
+ if (t > 5 && r === "xml") return Z("InvalidXml", "XML declaration allowed only at the start of the document.", Q(e, t));
7689
7689
  if (e[t] == "?" && e[t + 1] == ">") {
7690
7690
  t++;
7691
7691
  break;
@@ -7693,7 +7693,7 @@ function Sn(e, t) {
7693
7693
  }
7694
7694
  return t;
7695
7695
  }
7696
- function Cn(e, t) {
7696
+ function wn(e, t) {
7697
7697
  if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
7698
7698
  for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
7699
7699
  t += 2;
@@ -7711,11 +7711,11 @@ function Cn(e, t) {
7711
7711
  }
7712
7712
  return t;
7713
7713
  }
7714
- var wn = "\"", Tn = "'";
7715
- function En(e, t) {
7714
+ var Tn = "\"", En = "'";
7715
+ function Dn(e, t) {
7716
7716
  let n = "", r = "", i = !1;
7717
7717
  for (; t < e.length; t++) {
7718
- if (e[t] === wn || e[t] === Tn) r === "" ? r = e[t] : r !== e[t] || (r = "");
7718
+ if (e[t] === Tn || e[t] === En) r === "" ? r = e[t] : r !== e[t] || (r = "");
7719
7719
  else if (e[t] === ">" && r === "") {
7720
7720
  i = !0;
7721
7721
  break;
@@ -7728,21 +7728,21 @@ function En(e, t) {
7728
7728
  tagClosed: i
7729
7729
  } : !1;
7730
7730
  }
7731
- var Dn = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
7732
- function On(e, t) {
7733
- let n = mn(e, Dn), r = {};
7731
+ var On = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
7732
+ function kn(e, t) {
7733
+ let n = hn(e, On), r = {};
7734
7734
  for (let e = 0; e < n.length; e++) {
7735
7735
  if (n[e][1].length === 0) return Z("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", Pn(n[e]));
7736
7736
  if (n[e][3] !== void 0 && n[e][4] === void 0) return Z("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", Pn(n[e]));
7737
7737
  if (n[e][3] === void 0 && !t.allowBooleanAttributes) return Z("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", Pn(n[e]));
7738
7738
  let i = n[e][2];
7739
- if (!jn(i)) return Z("InvalidAttr", "Attribute '" + i + "' is an invalid name.", Pn(n[e]));
7739
+ if (!Mn(i)) return Z("InvalidAttr", "Attribute '" + i + "' is an invalid name.", Pn(n[e]));
7740
7740
  if (!Object.prototype.hasOwnProperty.call(r, i)) r[i] = 1;
7741
7741
  else return Z("InvalidAttr", "Attribute '" + i + "' is repeated.", Pn(n[e]));
7742
7742
  }
7743
7743
  return !0;
7744
7744
  }
7745
- function kn(e, t) {
7745
+ function An(e, t) {
7746
7746
  let n = /\d/;
7747
7747
  for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
7748
7748
  if (e[t] === ";") return t;
@@ -7750,9 +7750,9 @@ function kn(e, t) {
7750
7750
  }
7751
7751
  return -1;
7752
7752
  }
7753
- function An(e, t) {
7753
+ function jn(e, t) {
7754
7754
  if (t++, e[t] === ";") return -1;
7755
- if (e[t] === "#") return t++, kn(e, t);
7755
+ if (e[t] === "#") return t++, An(e, t);
7756
7756
  let n = 0;
7757
7757
  for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
7758
7758
  if (e[t] === ";") break;
@@ -7768,13 +7768,13 @@ function Z(e, t, n) {
7768
7768
  col: n.col
7769
7769
  } };
7770
7770
  }
7771
- function jn(e) {
7772
- return hn(e);
7773
- }
7774
7771
  function Mn(e) {
7775
- return hn(e);
7772
+ return gn(e);
7773
+ }
7774
+ function Nn(e) {
7775
+ return gn(e);
7776
7776
  }
7777
- function Nn(e, t) {
7777
+ function Q(e, t) {
7778
7778
  let n = e.substring(0, t).split(/\r?\n/);
7779
7779
  return {
7780
7780
  line: n.length,
@@ -7786,7 +7786,7 @@ function Pn(e) {
7786
7786
  }
7787
7787
  //#endregion
7788
7788
  //#region node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js
7789
- var Fn = (e) => _n.includes(e) ? "__" + e : e, In = {
7789
+ var Fn = (e) => vn.includes(e) ? "__" + e : e, In = {
7790
7790
  preserveOrder: !1,
7791
7791
  attributeNamePrefix: "@_",
7792
7792
  attributesGroupName: !1,
@@ -7832,7 +7832,7 @@ var Fn = (e) => _n.includes(e) ? "__" + e : e, In = {
7832
7832
  function Ln(e, t) {
7833
7833
  if (typeof e != "string") return;
7834
7834
  let n = e.toLowerCase();
7835
- if (_n.some((e) => n === e.toLowerCase()) || vn.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
7835
+ if (vn.some((e) => n === e.toLowerCase()) || yn.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
7836
7836
  }
7837
7837
  function Rn(e) {
7838
7838
  return typeof e == "boolean" ? {
@@ -7847,10 +7847,10 @@ function Rn(e) {
7847
7847
  } : typeof e == "object" && e ? {
7848
7848
  enabled: e.enabled !== !1,
7849
7849
  maxEntitySize: Math.max(1, e.maxEntitySize ?? 1e4),
7850
- maxExpansionDepth: Math.max(1, e.maxExpansionDepth ?? 10),
7851
- maxTotalExpansions: Math.max(1, e.maxTotalExpansions ?? 1e3),
7850
+ maxExpansionDepth: Math.max(1, e.maxExpansionDepth ?? 1e4),
7851
+ maxTotalExpansions: Math.max(1, e.maxTotalExpansions ?? Infinity),
7852
7852
  maxExpandedLength: Math.max(1, e.maxExpandedLength ?? 1e5),
7853
- maxEntityCount: Math.max(1, e.maxEntityCount ?? 100),
7853
+ maxEntityCount: Math.max(1, e.maxEntityCount ?? 1e3),
7854
7854
  allowedTags: e.allowedTags ?? null,
7855
7855
  tagFilter: e.tagFilter ?? null
7856
7856
  } : Rn(!0);
@@ -7879,7 +7879,7 @@ var zn = function(e) {
7879
7879
  }
7880
7880
  ];
7881
7881
  for (let { value: e, name: t } of n) e && Ln(e, t);
7882
- return t.onDangerousProperty === null && (t.onDangerousProperty = Fn), t.processEntities = Rn(t.processEntities), t.stopNodes && Array.isArray(t.stopNodes) && (t.stopNodes = t.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), t;
7882
+ return t.onDangerousProperty === null && (t.onDangerousProperty = Fn), t.processEntities = Rn(t.processEntities), t.unpairedTagsSet = new Set(t.unpairedTags), t.stopNodes && Array.isArray(t.stopNodes) && (t.stopNodes = t.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), t;
7883
7883
  }, Bn = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", Vn = class {
7884
7884
  constructor(e) {
7885
7885
  this.tagname = e, this.child = [], this[":@"] = Object.create(null);
@@ -7989,7 +7989,7 @@ var zn = function(e) {
7989
7989
  let n = t;
7990
7990
  for (; t < e.length && !/\s/.test(e[t]);) t++;
7991
7991
  let r = e.substring(n, t);
7992
- if (!this.suppressValidationErr && !hn(r)) throw Error(`Invalid element name: "${r}"`);
7992
+ if (!this.suppressValidationErr && !gn(r)) throw Error(`Invalid element name: "${r}"`);
7993
7993
  t = Un(e, t);
7994
7994
  let i = "";
7995
7995
  if (e[t] === "E" && Wn(e, "MPTY", t)) t += 4;
@@ -8062,7 +8062,7 @@ function Wn(e, t, n) {
8062
8062
  return !0;
8063
8063
  }
8064
8064
  function Gn(e) {
8065
- if (hn(e)) return e;
8065
+ if (gn(e)) return e;
8066
8066
  throw Error(`Invalid entity name ${e}`);
8067
8067
  }
8068
8068
  //#endregion
@@ -8135,8 +8135,8 @@ function tr(e) {
8135
8135
  //#endregion
8136
8136
  //#region node_modules/path-expression-matcher/src/Expression.js
8137
8137
  var nr = class {
8138
- constructor(e, t = {}) {
8139
- this.pattern = e, this.separator = t.separator || ".", this.segments = this._parse(e), this._hasDeepWildcard = this.segments.some((e) => e.type === "deep-wildcard"), this._hasAttributeCondition = this.segments.some((e) => e.attrName !== void 0), this._hasPositionSelector = this.segments.some((e) => e.position !== void 0);
8138
+ constructor(e, t = {}, n) {
8139
+ this.pattern = e, this.separator = t.separator || ".", this.segments = this._parse(e), this.data = n, this._hasDeepWildcard = this.segments.some((e) => e.type === "deep-wildcard"), this._hasAttributeCondition = this.segments.some((e) => e.attrName !== void 0), this._hasPositionSelector = this.segments.some((e) => e.position !== void 0);
8140
8140
  }
8141
8141
  _parse(e) {
8142
8142
  let t = [], n = 0, r = "";
@@ -8190,21 +8190,110 @@ var nr = class {
8190
8190
  toString() {
8191
8191
  return this.pattern;
8192
8192
  }
8193
- }, rr = new Set([
8194
- "push",
8195
- "pop",
8196
- "reset",
8197
- "updateCurrent",
8198
- "restore"
8199
- ]), ir = class {
8193
+ }, rr = class {
8194
+ constructor() {
8195
+ this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._patterns = /* @__PURE__ */ new Set(), this._sealed = !1;
8196
+ }
8197
+ add(e) {
8198
+ if (this._sealed) throw TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");
8199
+ if (this._patterns.has(e.pattern)) return this;
8200
+ if (this._patterns.add(e.pattern), e.hasDeepWildcard()) return this._deepWildcards.push(e), this;
8201
+ let t = e.length, n = e.segments[e.segments.length - 1]?.tag;
8202
+ if (!n || n === "*") this._wildcardByDepth.has(t) || this._wildcardByDepth.set(t, []), this._wildcardByDepth.get(t).push(e);
8203
+ else {
8204
+ let r = `${t}:${n}`;
8205
+ this._byDepthAndTag.has(r) || this._byDepthAndTag.set(r, []), this._byDepthAndTag.get(r).push(e);
8206
+ }
8207
+ return this;
8208
+ }
8209
+ addAll(e) {
8210
+ for (let t of e) this.add(t);
8211
+ return this;
8212
+ }
8213
+ has(e) {
8214
+ return this._patterns.has(e.pattern);
8215
+ }
8216
+ get size() {
8217
+ return this._patterns.size;
8218
+ }
8219
+ seal() {
8220
+ return this._sealed = !0, this;
8221
+ }
8222
+ get isSealed() {
8223
+ return this._sealed;
8224
+ }
8225
+ matchesAny(e) {
8226
+ return this.findMatch(e) !== null;
8227
+ }
8228
+ findMatch(e) {
8229
+ let t = e.getDepth(), n = `${t}:${e.getCurrentTag()}`, r = this._byDepthAndTag.get(n);
8230
+ if (r) {
8231
+ for (let t = 0; t < r.length; t++) if (e.matches(r[t])) return r[t];
8232
+ }
8233
+ let i = this._wildcardByDepth.get(t);
8234
+ if (i) {
8235
+ for (let t = 0; t < i.length; t++) if (e.matches(i[t])) return i[t];
8236
+ }
8237
+ for (let t = 0; t < this._deepWildcards.length; t++) if (e.matches(this._deepWildcards[t])) return this._deepWildcards[t];
8238
+ return null;
8239
+ }
8240
+ }, ir = class {
8241
+ constructor(e) {
8242
+ this._matcher = e;
8243
+ }
8244
+ get separator() {
8245
+ return this._matcher.separator;
8246
+ }
8247
+ getCurrentTag() {
8248
+ let e = this._matcher.path;
8249
+ return e.length > 0 ? e[e.length - 1].tag : void 0;
8250
+ }
8251
+ getCurrentNamespace() {
8252
+ let e = this._matcher.path;
8253
+ return e.length > 0 ? e[e.length - 1].namespace : void 0;
8254
+ }
8255
+ getAttrValue(e) {
8256
+ let t = this._matcher.path;
8257
+ if (t.length !== 0) return t[t.length - 1].values?.[e];
8258
+ }
8259
+ hasAttr(e) {
8260
+ let t = this._matcher.path;
8261
+ if (t.length === 0) return !1;
8262
+ let n = t[t.length - 1];
8263
+ return n.values !== void 0 && e in n.values;
8264
+ }
8265
+ getPosition() {
8266
+ let e = this._matcher.path;
8267
+ return e.length === 0 ? -1 : e[e.length - 1].position ?? 0;
8268
+ }
8269
+ getCounter() {
8270
+ let e = this._matcher.path;
8271
+ return e.length === 0 ? -1 : e[e.length - 1].counter ?? 0;
8272
+ }
8273
+ getIndex() {
8274
+ return this.getPosition();
8275
+ }
8276
+ getDepth() {
8277
+ return this._matcher.path.length;
8278
+ }
8279
+ toString(e, t = !0) {
8280
+ return this._matcher.toString(e, t);
8281
+ }
8282
+ toArray() {
8283
+ return this._matcher.path.map((e) => e.tag);
8284
+ }
8285
+ matches(e) {
8286
+ return this._matcher.matches(e);
8287
+ }
8288
+ matchesAny(e) {
8289
+ return e.matchesAny(this._matcher);
8290
+ }
8291
+ }, ar = class {
8200
8292
  constructor(e = {}) {
8201
- this.separator = e.separator || ".", this.path = [], this.siblingStacks = [];
8293
+ this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new ir(this);
8202
8294
  }
8203
8295
  push(e, t = null, n = null) {
8204
- if (this.path.length > 0) {
8205
- let e = this.path[this.path.length - 1];
8206
- e.values = void 0;
8207
- }
8296
+ this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
8208
8297
  let r = this.path.length;
8209
8298
  this.siblingStacks[r] || (this.siblingStacks[r] = /* @__PURE__ */ new Map());
8210
8299
  let i = this.siblingStacks[r], a = n ? `${n}:${e}` : e, o = i.get(a) || 0, s = 0;
@@ -8219,6 +8308,7 @@ var nr = class {
8219
8308
  }
8220
8309
  pop() {
8221
8310
  if (this.path.length === 0) return;
8311
+ this._pathStringCache = null;
8222
8312
  let e = this.path.pop();
8223
8313
  return this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1), e;
8224
8314
  }
@@ -8256,13 +8346,18 @@ var nr = class {
8256
8346
  }
8257
8347
  toString(e, t = !0) {
8258
8348
  let n = e || this.separator;
8349
+ if (n === this.separator && t === !0) {
8350
+ if (this._pathStringCache !== null) return this._pathStringCache;
8351
+ let e = this.path.map((e) => e.namespace ? `${e.namespace}:${e.tag}` : e.tag).join(n);
8352
+ return this._pathStringCache = e, e;
8353
+ }
8259
8354
  return this.path.map((e) => t && e.namespace ? `${e.namespace}:${e.tag}` : e.tag).join(n);
8260
8355
  }
8261
8356
  toArray() {
8262
8357
  return this.path.map((e) => e.tag);
8263
8358
  }
8264
8359
  reset() {
8265
- this.path = [], this.siblingStacks = [];
8360
+ this._pathStringCache = null, this.path = [], this.siblingStacks = [];
8266
8361
  }
8267
8362
  matches(e) {
8268
8363
  let t = e.segments;
@@ -8270,10 +8365,7 @@ var nr = class {
8270
8365
  }
8271
8366
  _matchSimple(e) {
8272
8367
  if (this.path.length !== e.length) return !1;
8273
- for (let t = 0; t < e.length; t++) {
8274
- let n = e[t], r = this.path[t], i = t === this.path.length - 1;
8275
- if (!this._matchSegment(n, r, i)) return !1;
8276
- }
8368
+ for (let t = 0; t < e.length; t++) if (!this._matchSegment(e[t], this.path[t], t === this.path.length - 1)) return !1;
8277
8369
  return !0;
8278
8370
  }
8279
8371
  _matchWithDeepWildcard(e) {
@@ -8283,31 +8375,20 @@ var nr = class {
8283
8375
  if (r.type === "deep-wildcard") {
8284
8376
  if (n--, n < 0) return !0;
8285
8377
  let r = e[n], i = !1;
8286
- for (let e = t; e >= 0; e--) {
8287
- let a = e === this.path.length - 1;
8288
- if (this._matchSegment(r, this.path[e], a)) {
8289
- t = e - 1, n--, i = !0;
8290
- break;
8291
- }
8378
+ for (let e = t; e >= 0; e--) if (this._matchSegment(r, this.path[e], e === this.path.length - 1)) {
8379
+ t = e - 1, n--, i = !0;
8380
+ break;
8292
8381
  }
8293
8382
  if (!i) return !1;
8294
8383
  } else {
8295
- let e = t === this.path.length - 1;
8296
- if (!this._matchSegment(r, this.path[t], e)) return !1;
8384
+ if (!this._matchSegment(r, this.path[t], t === this.path.length - 1)) return !1;
8297
8385
  t--, n--;
8298
8386
  }
8299
8387
  }
8300
8388
  return n < 0;
8301
8389
  }
8302
8390
  _matchSegment(e, t, n) {
8303
- if (e.tag !== "*" && e.tag !== t.tag || e.namespace !== void 0 && e.namespace !== "*" && e.namespace !== t.namespace) return !1;
8304
- if (e.attrName !== void 0) {
8305
- if (!n || !t.values || !(e.attrName in t.values)) return !1;
8306
- if (e.attrValue !== void 0) {
8307
- let n = t.values[e.attrName];
8308
- if (String(n) !== String(e.attrValue)) return !1;
8309
- }
8310
- }
8391
+ if (e.tag !== "*" && e.tag !== t.tag || e.namespace !== void 0 && e.namespace !== "*" && e.namespace !== t.namespace || e.attrName !== void 0 && (!n || !t.values || !(e.attrName in t.values) || e.attrValue !== void 0 && String(t.values[e.attrName]) !== String(e.attrValue))) return !1;
8311
8392
  if (e.position !== void 0) {
8312
8393
  if (!n) return !1;
8313
8394
  let r = t.counter ?? 0;
@@ -8315,6 +8396,9 @@ var nr = class {
8315
8396
  }
8316
8397
  return !0;
8317
8398
  }
8399
+ matchesAny(e) {
8400
+ return e.matchesAny(this);
8401
+ }
8318
8402
  snapshot() {
8319
8403
  return {
8320
8404
  path: this.path.map((e) => ({ ...e })),
@@ -8322,29 +8406,246 @@ var nr = class {
8322
8406
  };
8323
8407
  }
8324
8408
  restore(e) {
8325
- this.path = e.path.map((e) => ({ ...e })), this.siblingStacks = e.siblingStacks.map((e) => new Map(e));
8409
+ this._pathStringCache = null, this.path = e.path.map((e) => ({ ...e })), this.siblingStacks = e.siblingStacks.map((e) => new Map(e));
8326
8410
  }
8327
8411
  readOnly() {
8328
- return new Proxy(this, {
8329
- get(e, t, n) {
8330
- if (rr.has(t)) return () => {
8331
- throw TypeError(`Cannot call '${t}' on a read-only Matcher. Obtain a writable instance to mutate state.`);
8332
- };
8333
- let r = Reflect.get(e, t, n);
8334
- return t === "path" || t === "siblingStacks" ? Object.freeze(Array.isArray(r) ? r.map((e) => e instanceof Map ? Object.freeze(new Map(e)) : Object.freeze({ ...e })) : r) : typeof r == "function" ? r.bind(e) : r;
8335
- },
8336
- set(e, t) {
8337
- throw TypeError(`Cannot set property '${String(t)}' on a read-only Matcher.`);
8338
- },
8339
- deleteProperty(e, t) {
8340
- throw TypeError(`Cannot delete property '${String(t)}' from a read-only Matcher.`);
8412
+ return this._view;
8413
+ }
8414
+ }, or = {
8415
+ apos: {
8416
+ regex: /&(apos|#0*39|#x0*27);/g,
8417
+ val: "'"
8418
+ },
8419
+ gt: {
8420
+ regex: /&(gt|#0*62|#x0*3[Ee]);/g,
8421
+ val: ">"
8422
+ },
8423
+ lt: {
8424
+ regex: /&(lt|#0*60|#x0*3[Cc]);/g,
8425
+ val: "<"
8426
+ },
8427
+ quot: {
8428
+ regex: /&(quot|#0*34|#x0*22);/g,
8429
+ val: "\""
8430
+ }
8431
+ }, sr = {
8432
+ regex: /&(amp|#0*38|#x0*26);/g,
8433
+ val: "&"
8434
+ }, cr = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
8435
+ function lr(e) {
8436
+ for (let t of e) if (cr.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
8437
+ return e;
8438
+ }
8439
+ function ur(e) {
8440
+ return e.replace(/[.\-+*:]/g, "\\$&");
8441
+ }
8442
+ function dr(e, t, n = !1) {
8443
+ return e === !1 || e === null ? null : e === !0 ? t : e === void 0 ? n ? t : null : typeof e == "object" ? e : null;
8444
+ }
8445
+ function fr(e) {
8446
+ return e === "all" ? "all" : typeof e == "string" ? new Set([e]) : Array.isArray(e) ? new Set(e) : new Set(["external"]);
8447
+ }
8448
+ function pr(e) {
8449
+ let t = [];
8450
+ for (let n of Object.keys(e)) {
8451
+ let r = e[n];
8452
+ if (typeof r == "object" && r && r.val !== void 0) t.push([n, {
8453
+ regex: r.regex ?? r.regx,
8454
+ val: r.val
8455
+ }]);
8456
+ else if (typeof r == "string") {
8457
+ if (r.indexOf("&") !== -1) continue;
8458
+ lr(n), t.push([n, {
8459
+ regex: RegExp("&" + ur(n) + ";", "g"),
8460
+ val: r
8461
+ }]);
8462
+ }
8463
+ }
8464
+ return t;
8465
+ }
8466
+ var mr = class {
8467
+ constructor(e = {}) {
8468
+ this._defaultTable = dr(e.default, or, !0), this._systemTable = dr(e.system, null, !1), this._ampEnabled = e.amp !== !1 && e.amp !== null, this._maxTotalExpansions = e.maxTotalExpansions || 0, this._maxExpandedLength = e.maxExpandedLength || 0, this._applyLimitsTo = fr(e.applyLimitsTo ?? "external"), this._postCheck = typeof e.postCheck == "function" ? e.postCheck : (e) => e, this._limitExternal = this._applyLimitsTo === "all" || this._applyLimitsTo instanceof Set && this._applyLimitsTo.has("external"), this._limitSystem = this._applyLimitsTo === "all" || this._applyLimitsTo instanceof Set && this._applyLimitsTo.has("system"), this._limitDefault = this._applyLimitsTo === "all" || this._applyLimitsTo instanceof Set && this._applyLimitsTo.has("default"), this._defaultEntries = this._defaultTable ? Object.entries(this._defaultTable) : [], this._systemEntries = this._systemTable ? Object.entries(this._systemTable) : [], this._persistentEntries = [], this._inputEntries = [], this._totalExpansions = 0, this._expandedLength = 0;
8469
+ }
8470
+ setExternalEntities(e) {
8471
+ this._persistentEntries = pr(e);
8472
+ }
8473
+ addExternalEntity(e, t) {
8474
+ lr(e), typeof t == "string" && t.indexOf("&") === -1 && this._persistentEntries.push([e, {
8475
+ regex: RegExp("&" + ur(e) + ";", "g"),
8476
+ val: t
8477
+ }]);
8478
+ }
8479
+ addInputEntities(e) {
8480
+ this._totalExpansions = 0, this._expandedLength = 0, this._inputEntries = pr(e);
8481
+ }
8482
+ reset() {
8483
+ this._inputEntries = [], this._totalExpansions = 0, this._expandedLength = 0;
8484
+ }
8485
+ replace(e) {
8486
+ if (typeof e != "string" || e.length === 0 || e.indexOf("&") === -1) return e;
8487
+ let t = e;
8488
+ return this._persistentEntries.length > 0 && (e = this._applyEntries(e, this._persistentEntries, this._limitExternal)), this._inputEntries.length > 0 && e.indexOf("&") !== -1 && (e = this._applyEntries(e, this._inputEntries, this._limitExternal)), this._defaultEntries.length > 0 && e.indexOf("&") !== -1 && (e = this._applyEntries(e, this._defaultEntries, this._limitDefault)), this._systemEntries.length > 0 && e.indexOf("&") !== -1 && (e = this._applyEntries(e, this._systemEntries, this._limitSystem)), this._ampEnabled && e.indexOf("&") !== -1 && (e = e.replace(sr.regex, sr.val)), e = this._postCheck(e, t), e;
8489
+ }
8490
+ parse(e) {
8491
+ return this.replace(e);
8492
+ }
8493
+ _applyEntries(e, t, n) {
8494
+ let r = n && this._maxTotalExpansions > 0, i = n && this._maxExpandedLength > 0, a = r || i;
8495
+ for (let n = 0; n < t.length && e.indexOf("&") !== -1; n++) {
8496
+ let o = t[n][1];
8497
+ if (!a) {
8498
+ e = e.replace(o.regex, o.val);
8499
+ continue;
8341
8500
  }
8342
- });
8501
+ if (r && !i) {
8502
+ let t = 0;
8503
+ if (e = e.replace(o.regex, (...e) => (t++, typeof o.val == "function" ? o.val(...e) : o.val)), t > 0 && (this._totalExpansions += t, this._totalExpansions > this._maxTotalExpansions)) throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);
8504
+ } else if (i && !r) {
8505
+ let t = e.length;
8506
+ e = e.replace(o.regex, o.val);
8507
+ let n = e.length - t;
8508
+ if (n > 0 && (this._expandedLength += n, this._expandedLength > this._maxExpandedLength)) throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`);
8509
+ } else {
8510
+ let t = e.length, n = 0;
8511
+ if (e = e.replace(o.regex, (...e) => (n++, typeof o.val == "function" ? o.val(...e) : o.val)), n > 0 && (this._totalExpansions += n, this._totalExpansions > this._maxTotalExpansions)) throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);
8512
+ let r = e.length - t;
8513
+ if (r > 0 && (this._expandedLength += r, this._expandedLength > this._maxExpandedLength)) throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`);
8514
+ }
8515
+ }
8516
+ return e;
8517
+ }
8518
+ }, hr = {
8519
+ nbsp: {
8520
+ regex: /&(nbsp|#0*160|#x0*[Aa]0);/g,
8521
+ val: "\xA0"
8522
+ },
8523
+ copy: {
8524
+ regex: /&(copy|#0*169|#x0*[Aa]9);/g,
8525
+ val: "©"
8526
+ },
8527
+ reg: {
8528
+ regex: /&(reg|#0*174|#x0*[Aa][Ee]);/g,
8529
+ val: "®"
8530
+ },
8531
+ trade: {
8532
+ regex: /&(trade|#0*8482|#x0*2122);/g,
8533
+ val: "™"
8534
+ },
8535
+ mdash: {
8536
+ regex: /&(mdash|#0*8212|#x0*2014);/g,
8537
+ val: "—"
8538
+ },
8539
+ ndash: {
8540
+ regex: /&(ndash|#0*8211|#x0*2013);/g,
8541
+ val: "–"
8542
+ },
8543
+ hellip: {
8544
+ regex: /&(hellip|#0*8230|#x0*2026);/g,
8545
+ val: "…"
8546
+ },
8547
+ laquo: {
8548
+ regex: /&(laquo|#0*171|#x0*[Aa][Bb]);/g,
8549
+ val: "«"
8550
+ },
8551
+ raquo: {
8552
+ regex: /&(raquo|#0*187|#x0*[Bb][Bb]);/g,
8553
+ val: "»"
8554
+ },
8555
+ lsquo: {
8556
+ regex: /&(lsquo|#0*8216|#x0*2018);/g,
8557
+ val: "‘"
8558
+ },
8559
+ rsquo: {
8560
+ regex: /&(rsquo|#0*8217|#x0*2019);/g,
8561
+ val: "’"
8562
+ },
8563
+ ldquo: {
8564
+ regex: /&(ldquo|#0*8220|#x0*201[Cc]);/g,
8565
+ val: "“"
8566
+ },
8567
+ rdquo: {
8568
+ regex: /&(rdquo|#0*8221|#x0*201[Dd]);/g,
8569
+ val: "”"
8570
+ },
8571
+ bull: {
8572
+ regex: /&(bull|#0*8226|#x0*2022);/g,
8573
+ val: "•"
8574
+ },
8575
+ para: {
8576
+ regex: /&(para|#0*182|#x0*[Bb]6);/g,
8577
+ val: "¶"
8578
+ },
8579
+ sect: {
8580
+ regex: /&(sect|#0*167|#x0*[Aa]7);/g,
8581
+ val: "§"
8582
+ },
8583
+ deg: {
8584
+ regex: /&(deg|#0*176|#x0*[Bb]0);/g,
8585
+ val: "°"
8586
+ },
8587
+ frac12: {
8588
+ regex: /&(frac12|#0*189|#x0*[Bb][Dd]);/g,
8589
+ val: "½"
8590
+ },
8591
+ frac14: {
8592
+ regex: /&(frac14|#0*188|#x0*[Bb][Cc]);/g,
8593
+ val: "¼"
8594
+ },
8595
+ frac34: {
8596
+ regex: /&(frac34|#0*190|#x0*[Bb][Ee]);/g,
8597
+ val: "¾"
8598
+ },
8599
+ inr: {
8600
+ regex: /&(inr|#0*8377);/g,
8601
+ val: "₹"
8602
+ }
8603
+ }, gr = {
8604
+ cent: {
8605
+ regex: /&(cent|#0*162|#x0*[Aa]2);/g,
8606
+ val: "¢"
8607
+ },
8608
+ pound: {
8609
+ regex: /&(pound|#0*163|#x0*[Aa]3);/g,
8610
+ val: "£"
8611
+ },
8612
+ yen: {
8613
+ regex: /&(yen|#0*165|#x0*[Aa]5);/g,
8614
+ val: "¥"
8615
+ },
8616
+ euro: {
8617
+ regex: /&(euro|#0*8364|#x0*20[Aa][Cc]);/g,
8618
+ val: "€"
8619
+ },
8620
+ inr: {
8621
+ regex: /&(inr|#0*8377|#x0*20[Bb]9);/g,
8622
+ val: "₹"
8623
+ },
8624
+ curren: {
8625
+ regex: /&(curren|#0*164|#x0*[Aa]4);/g,
8626
+ val: "¤"
8627
+ },
8628
+ fnof: {
8629
+ regex: /&(fnof|#0*402|#x0*192);/g,
8630
+ val: "ƒ"
8631
+ }
8632
+ }, _r = {
8633
+ num_dec: {
8634
+ regex: /&#0*([0-9]{1,7});/g,
8635
+ val: (e, t) => vr(t, 10, "&#")
8636
+ },
8637
+ num_hex: {
8638
+ regex: /&#x0*([0-9a-fA-F]{1,6});/g,
8639
+ val: (e, t) => vr(t, 16, "&#x")
8343
8640
  }
8344
8641
  };
8642
+ function vr(e, t, n) {
8643
+ let r = Number.parseInt(e, t);
8644
+ return r >= 0 && r <= 1114111 ? String.fromCodePoint(r) : n + e + ";";
8645
+ }
8345
8646
  //#endregion
8346
8647
  //#region node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
8347
- function ar(e, t) {
8648
+ function yr(e, t) {
8348
8649
  if (!e) return {};
8349
8650
  let n = t.attributesGroupName ? e[t.attributesGroupName] : e;
8350
8651
  if (!n) return {};
@@ -8355,7 +8656,7 @@ function ar(e, t) {
8355
8656
  } else r[e] = n[e];
8356
8657
  return r;
8357
8658
  }
8358
- function or(e) {
8659
+ function br(e) {
8359
8660
  if (!e || typeof e != "string") return;
8360
8661
  let t = e.indexOf(":");
8361
8662
  if (t !== -1 && t > 0) {
@@ -8363,96 +8664,38 @@ function or(e) {
8363
8664
  if (n !== "xmlns") return n;
8364
8665
  }
8365
8666
  }
8366
- var sr = class {
8667
+ var xr = class {
8367
8668
  constructor(e) {
8368
- if (this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
8369
- apos: {
8370
- regex: /&(apos|#39|#x27);/g,
8371
- val: "'"
8372
- },
8373
- gt: {
8374
- regex: /&(gt|#62|#x3E);/g,
8375
- val: ">"
8376
- },
8377
- lt: {
8378
- regex: /&(lt|#60|#x3C);/g,
8379
- val: "<"
8380
- },
8381
- quot: {
8382
- regex: /&(quot|#34|#x22);/g,
8383
- val: "\""
8384
- }
8385
- }, this.ampEntity = {
8386
- regex: /&(amp|#38|#x26);/g,
8387
- val: "&"
8388
- }, this.htmlEntities = {
8389
- space: {
8390
- regex: /&(nbsp|#160);/g,
8391
- val: " "
8392
- },
8393
- cent: {
8394
- regex: /&(cent|#162);/g,
8395
- val: "¢"
8396
- },
8397
- pound: {
8398
- regex: /&(pound|#163);/g,
8399
- val: "£"
8400
- },
8401
- yen: {
8402
- regex: /&(yen|#165);/g,
8403
- val: "¥"
8404
- },
8405
- euro: {
8406
- regex: /&(euro|#8364);/g,
8407
- val: "€"
8408
- },
8409
- copyright: {
8410
- regex: /&(copy|#169);/g,
8411
- val: "©"
8412
- },
8413
- reg: {
8414
- regex: /&(reg|#174);/g,
8415
- val: "®"
8416
- },
8417
- inr: {
8418
- regex: /&(inr|#8377);/g,
8419
- val: "₹"
8420
- },
8421
- num_dec: {
8422
- regex: /&#([0-9]{1,7});/g,
8423
- val: (e, t) => Cr(t, 10, "&#")
8424
- },
8425
- num_hex: {
8426
- regex: /&#x([0-9a-fA-F]{1,6});/g,
8427
- val: (e, t) => Cr(t, 16, "&#x")
8428
- }
8429
- }, this.addExternalEntities = cr, this.parseXml = pr, this.parseTextData = lr, this.resolveNameSpace = ur, this.buildAttributesMap = fr, this.isItStopNode = _r, this.replaceEntitiesValue = hr, this.readStopNodeData = xr, this.saveTextToParentTag = gr, this.addChild = mr, this.ignoreAttributesFn = tr(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new ir(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.options.stopNodes && this.options.stopNodes.length > 0) {
8430
- this.stopNodeExpressions = [];
8431
- for (let e = 0; e < this.options.stopNodes.length; e++) {
8432
- let t = this.options.stopNodes[e];
8433
- typeof t == "string" ? this.stopNodeExpressions.push(new nr(t)) : t instanceof nr && this.stopNodeExpressions.push(t);
8434
- }
8669
+ this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Er, this.parseTextData = Sr, this.resolveNameSpace = Cr, this.buildAttributesMap = Tr, this.isItStopNode = Ar, this.replaceEntitiesValue = Or, this.readStopNodeData = Fr, this.saveTextToParentTag = kr, this.addChild = Dr, this.ignoreAttributesFn = tr(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.entityReplacer = new mr({
8670
+ default: !0,
8671
+ system: this.options.htmlEntities ? {
8672
+ ...hr,
8673
+ ..._r,
8674
+ ...gr
8675
+ } : {},
8676
+ maxTotalExpansions: this.options.processEntities.maxTotalExpansions,
8677
+ maxExpandedLength: this.options.processEntities.maxExpandedLength,
8678
+ applyLimitsTo: "all"
8679
+ }), this.matcher = new ar(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new rr();
8680
+ let t = this.options.stopNodes;
8681
+ if (t && t.length > 0) {
8682
+ for (let e = 0; e < t.length; e++) {
8683
+ let n = t[e];
8684
+ typeof n == "string" ? this.stopNodeExpressionsSet.add(new nr(n)) : n instanceof nr && this.stopNodeExpressionsSet.add(n);
8685
+ }
8686
+ this.stopNodeExpressionsSet.seal();
8435
8687
  }
8436
8688
  }
8437
8689
  };
8438
- function cr(e) {
8439
- let t = Object.keys(e);
8440
- for (let n = 0; n < t.length; n++) {
8441
- let r = t[n], i = r.replace(/[.\-+*:]/g, "\\.");
8442
- this.lastEntities[r] = {
8443
- regex: RegExp("&" + i + ";", "g"),
8444
- val: e[r]
8445
- };
8446
- }
8447
- }
8448
- function lr(e, t, n, r, i, a, o) {
8449
- if (e !== void 0 && (this.options.trimValues && !r && (e = e.trim()), e.length > 0)) {
8690
+ function Sr(e, t, n, r, i, a, o) {
8691
+ let s = this.options;
8692
+ if (e !== void 0 && (s.trimValues && !r && (e = e.trim()), e.length > 0)) {
8450
8693
  o || (e = this.replaceEntitiesValue(e, t, n));
8451
- let r = this.options.jPath ? n.toString() : n, s = this.options.tagValueProcessor(t, e, r, i, a);
8452
- return s == null ? e : typeof s != typeof e || s !== e ? s : this.options.trimValues || e.trim() === e ? Sr(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
8694
+ let r = s.jPath ? n.toString() : n, c = s.tagValueProcessor(t, e, r, i, a);
8695
+ return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? Ir(e, s.parseTagValue, s.numberParseOptions) : e;
8453
8696
  }
8454
8697
  }
8455
- function ur(e) {
8698
+ function Cr(e) {
8456
8699
  if (this.options.removeNSPrefix) {
8457
8700
  let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
8458
8701
  if (t[0] === "xmlns") return "";
@@ -8460,127 +8703,130 @@ function ur(e) {
8460
8703
  }
8461
8704
  return e;
8462
8705
  }
8463
- var dr = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
8464
- function fr(e, t, n) {
8465
- if (this.options.ignoreAttributes !== !0 && typeof e == "string") {
8466
- let r = mn(e, dr), i = r.length, a = {}, o = {};
8467
- for (let e = 0; e < i; e++) {
8468
- let t = this.resolveNameSpace(r[e][1]), i = r[e][4];
8469
- if (t.length && i !== void 0) {
8470
- let e = i;
8471
- this.options.trimValues && (e = e.trim()), e = this.replaceEntitiesValue(e, n, this.readonlyMatcher), o[t] = e;
8472
- }
8473
- }
8474
- Object.keys(o).length > 0 && typeof t == "object" && t.updateCurrent && t.updateCurrent(o);
8475
- for (let e = 0; e < i; e++) {
8476
- let i = this.resolveNameSpace(r[e][1]), o = this.options.jPath ? t.toString() : this.readonlyMatcher;
8477
- if (this.ignoreAttributesFn(i, o)) continue;
8478
- let s = r[e][4], c = this.options.attributeNamePrefix + i;
8479
- if (i.length) if (this.options.transformAttributeName && (c = this.options.transformAttributeName(c)), c = Tr(c, this.options), s !== void 0) {
8480
- this.options.trimValues && (s = s.trim()), s = this.replaceEntitiesValue(s, n, this.readonlyMatcher);
8481
- let e = this.options.jPath ? t.toString() : this.readonlyMatcher, r = this.options.attributeValueProcessor(i, s, e);
8482
- r == null ? a[c] = s : typeof r != typeof s || r !== s ? a[c] = r : a[c] = Sr(s, this.options.parseAttributeValue, this.options.numberParseOptions);
8483
- } else this.options.allowBooleanAttributes && (a[c] = !0);
8484
- }
8485
- if (!Object.keys(a).length) return;
8486
- if (this.options.attributesGroupName) {
8706
+ var wr = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
8707
+ function Tr(e, t, n) {
8708
+ let r = this.options;
8709
+ if (r.ignoreAttributes !== !0 && typeof e == "string") {
8710
+ let i = hn(e, wr), a = i.length, o = {}, s = Array(a), c = !1, l = {};
8711
+ for (let e = 0; e < a; e++) {
8712
+ let t = this.resolveNameSpace(i[e][1]), a = i[e][4];
8713
+ if (t.length && a !== void 0) {
8714
+ let i = a;
8715
+ r.trimValues && (i = i.trim()), i = this.replaceEntitiesValue(i, n, this.readonlyMatcher), s[e] = i, l[t] = i, c = !0;
8716
+ }
8717
+ }
8718
+ c && typeof t == "object" && t.updateCurrent && t.updateCurrent(l);
8719
+ let u = r.jPath ? t.toString() : this.readonlyMatcher, d = !1;
8720
+ for (let e = 0; e < a; e++) {
8721
+ let t = this.resolveNameSpace(i[e][1]);
8722
+ if (this.ignoreAttributesFn(t, u)) continue;
8723
+ let n = r.attributeNamePrefix + t;
8724
+ if (t.length) if (r.transformAttributeName && (n = r.transformAttributeName(n)), n = Rr(n, r), i[e][4] !== void 0) {
8725
+ let i = s[e], a = r.attributeValueProcessor(t, i, u);
8726
+ a == null ? o[n] = i : typeof a != typeof i || a !== i ? o[n] = a : o[n] = Ir(i, r.parseAttributeValue, r.numberParseOptions), d = !0;
8727
+ } else r.allowBooleanAttributes && (o[n] = !0, d = !0);
8728
+ }
8729
+ if (!d) return;
8730
+ if (r.attributesGroupName) {
8487
8731
  let e = {};
8488
- return e[this.options.attributesGroupName] = a, e;
8732
+ return e[r.attributesGroupName] = o, e;
8489
8733
  }
8490
- return a;
8734
+ return o;
8491
8735
  }
8492
8736
  }
8493
- var pr = function(e) {
8737
+ var Er = function(e) {
8494
8738
  e = e.replace(/\r\n?/g, "\n");
8495
8739
  let t = new Vn("!xml"), n = t, r = "";
8496
8740
  this.matcher.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
8497
- let i = new Hn(this.options.processEntities);
8498
- for (let a = 0; a < e.length; a++) if (e[a] === "<") if (e[a + 1] === "/") {
8499
- let t = yr(e, ">", a, "Closing Tag is not closed."), i = e.substring(a + 2, t).trim();
8500
- if (this.options.removeNSPrefix) {
8501
- let e = i.indexOf(":");
8502
- e !== -1 && (i = i.substr(e + 1));
8503
- }
8504
- i = wr(this.options.transformTagName, i, "", this.options).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
8505
- let o = this.matcher.getCurrentTag();
8506
- if (i && this.options.unpairedTags.indexOf(i) !== -1) throw Error(`Unpaired tag can not be used as closing tag: </${i}>`);
8507
- o && this.options.unpairedTags.indexOf(o) !== -1 && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = !1, n = this.tagsNodeStack.pop(), r = "", a = t;
8508
- } else if (e[a + 1] === "?") {
8509
- let t = br(e, a, !1, "?>");
8510
- if (!t) throw Error("Pi Tag is not closed.");
8511
- if (r = this.saveTextToParentTag(r, n, this.readonlyMatcher), !(this.options.ignoreDeclaration && t.tagName === "?xml" || this.options.ignorePiTags)) {
8512
- let e = new Vn(t.tagName);
8513
- e.add(this.options.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && (e[":@"] = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName)), this.addChild(n, e, this.readonlyMatcher, a);
8514
- }
8515
- a = t.closeIndex + 1;
8516
- } else if (e.substr(a + 1, 3) === "!--") {
8517
- let t = yr(e, "-->", a + 4, "Comment is not closed.");
8518
- if (this.options.commentPropName) {
8519
- let i = e.substring(a + 4, t - 2);
8520
- r = this.saveTextToParentTag(r, n, this.readonlyMatcher), n.add(this.options.commentPropName, [{ [this.options.textNodeName]: i }]);
8521
- }
8522
- a = t;
8523
- } else if (e.substr(a + 1, 2) === "!D") {
8524
- let t = i.readDocType(e, a);
8525
- this.docTypeEntities = t.entities, a = t.i;
8526
- } else if (e.substr(a + 1, 2) === "![") {
8527
- let t = yr(e, "]]>", a, "CDATA is not closed.") - 2, i = e.substring(a + 9, t);
8528
- r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
8529
- let o = this.parseTextData(i, n.tagname, this.readonlyMatcher, !0, !1, !0, !0);
8530
- o ??= "", this.options.cdataPropName ? n.add(this.options.cdataPropName, [{ [this.options.textNodeName]: i }]) : n.add(this.options.textNodeName, o), a = t + 2;
8531
- } else {
8532
- let i = br(e, a, this.options.removeNSPrefix);
8533
- if (!i) {
8534
- let t = e.substring(Math.max(0, a - 50), Math.min(e.length, a + 50));
8535
- throw Error(`readTagExp returned undefined at position ${a}. Context: "${t}"`);
8536
- }
8537
- let o = i.tagName, s = i.rawTagName, c = i.tagExp, l = i.attrExpPresent, u = i.closeIndex;
8538
- if ({tagName: o, tagExp: c} = wr(this.options.transformTagName, o, c, this.options), this.options.strictReservedNames && (o === this.options.commentPropName || o === this.options.cdataPropName || o === this.options.textNodeName || o === this.options.attributesGroupName)) throw Error(`Invalid tag name: ${o}`);
8539
- n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher, !1));
8540
- let d = n;
8541
- d && this.options.unpairedTags.indexOf(d.tagname) !== -1 && (n = this.tagsNodeStack.pop(), this.matcher.pop());
8542
- let f = !1;
8543
- c.length > 0 && c.lastIndexOf("/") === c.length - 1 && (f = !0, o[o.length - 1] === "/" ? (o = o.substr(0, o.length - 1), c = o) : c = c.substr(0, c.length - 1), l = o !== c);
8544
- let p = null, m;
8545
- m = or(s), o !== t.tagname && this.matcher.push(o, {}, m), o !== c && l && (p = this.buildAttributesMap(c, this.matcher, o), p && ar(p, this.options)), o !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode(this.stopNodeExpressions, this.matcher));
8546
- let h = a;
8547
- if (this.isCurrentNodeStopNode) {
8548
- let t = "";
8549
- if (f) a = i.closeIndex;
8550
- else if (this.options.unpairedTags.indexOf(o) !== -1) a = i.closeIndex;
8551
- else {
8552
- let n = this.readStopNodeData(e, s, u + 1);
8553
- if (!n) throw Error(`Unexpected end of ${s}`);
8554
- a = n.i, t = n.tagContent;
8555
- }
8556
- let r = new Vn(o);
8557
- p && (r[":@"] = p), r.add(this.options.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, h);
8741
+ let i = this.options, a = new Hn(i.processEntities), o = e.length;
8742
+ for (let s = 0; s < o; s++) if (e[s] === "<") {
8743
+ let c = e.charCodeAt(s + 1);
8744
+ if (c === 47) {
8745
+ let t = Mr(e, ">", s, "Closing Tag is not closed."), a = e.substring(s + 2, t).trim();
8746
+ if (i.removeNSPrefix) {
8747
+ let e = a.indexOf(":");
8748
+ e !== -1 && (a = a.substr(e + 1));
8749
+ }
8750
+ a = Lr(i.transformTagName, a, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
8751
+ let o = this.matcher.getCurrentTag();
8752
+ if (a && i.unpairedTagsSet.has(a)) throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);
8753
+ o && i.unpairedTagsSet.has(o) && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = !1, n = this.tagsNodeStack.pop(), r = "", s = t;
8754
+ } else if (c === 63) {
8755
+ let t = Pr(e, s, !1, "?>");
8756
+ if (!t) throw Error("Pi Tag is not closed.");
8757
+ if (r = this.saveTextToParentTag(r, n, this.readonlyMatcher), !(i.ignoreDeclaration && t.tagName === "?xml" || i.ignorePiTags)) {
8758
+ let e = new Vn(t.tagName);
8759
+ e.add(i.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && (e[":@"] = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName)), this.addChild(n, e, this.readonlyMatcher, s);
8760
+ }
8761
+ s = t.closeIndex + 1;
8762
+ } else if (c === 33 && e.charCodeAt(s + 2) === 45 && e.charCodeAt(s + 3) === 45) {
8763
+ let t = Mr(e, "-->", s + 4, "Comment is not closed.");
8764
+ if (i.commentPropName) {
8765
+ let a = e.substring(s + 4, t - 2);
8766
+ r = this.saveTextToParentTag(r, n, this.readonlyMatcher), n.add(i.commentPropName, [{ [i.textNodeName]: a }]);
8767
+ }
8768
+ s = t;
8769
+ } else if (c === 33 && e.charCodeAt(s + 2) === 68) {
8770
+ let t = a.readDocType(e, s);
8771
+ this.entityReplacer.addInputEntities(t.entities), s = t.i;
8772
+ } else if (c === 33 && e.charCodeAt(s + 2) === 91) {
8773
+ let t = Mr(e, "]]>", s, "CDATA is not closed.") - 2, a = e.substring(s + 9, t);
8774
+ r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
8775
+ let o = this.parseTextData(a, n.tagname, this.readonlyMatcher, !0, !1, !0, !0);
8776
+ o ??= "", i.cdataPropName ? n.add(i.cdataPropName, [{ [i.textNodeName]: a }]) : n.add(i.textNodeName, o), s = t + 2;
8558
8777
  } else {
8559
- if (f) {
8560
- ({tagName: o, tagExp: c} = wr(this.options.transformTagName, o, c, this.options));
8561
- let e = new Vn(o);
8562
- p && (e[":@"] = p), this.addChild(n, e, this.readonlyMatcher, h), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
8563
- } else if (this.options.unpairedTags.indexOf(o) !== -1) {
8564
- let e = new Vn(o);
8565
- p && (e[":@"] = p), this.addChild(n, e, this.readonlyMatcher, h), this.matcher.pop(), this.isCurrentNodeStopNode = !1, a = i.closeIndex;
8566
- continue;
8778
+ let a = Pr(e, s, i.removeNSPrefix);
8779
+ if (!a) {
8780
+ let t = e.substring(Math.max(0, s - 50), Math.min(o, s + 50));
8781
+ throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`);
8782
+ }
8783
+ let c = a.tagName, l = a.rawTagName, u = a.tagExp, d = a.attrExpPresent, f = a.closeIndex;
8784
+ if ({tagName: c, tagExp: u} = Lr(i.transformTagName, c, u, i), i.strictReservedNames && (c === i.commentPropName || c === i.cdataPropName || c === i.textNodeName || c === i.attributesGroupName)) throw Error(`Invalid tag name: ${c}`);
8785
+ n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher, !1));
8786
+ let p = n;
8787
+ p && i.unpairedTagsSet.has(p.tagname) && (n = this.tagsNodeStack.pop(), this.matcher.pop());
8788
+ let m = !1;
8789
+ u.length > 0 && u.lastIndexOf("/") === u.length - 1 && (m = !0, c[c.length - 1] === "/" ? (c = c.substr(0, c.length - 1), u = c) : u = u.substr(0, u.length - 1), d = c !== u);
8790
+ let h = null, g;
8791
+ g = br(l), c !== t.tagname && this.matcher.push(c, {}, g), c !== u && d && (h = this.buildAttributesMap(u, this.matcher, c), h && yr(h, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
8792
+ let _ = s;
8793
+ if (this.isCurrentNodeStopNode) {
8794
+ let t = "";
8795
+ if (m) s = a.closeIndex;
8796
+ else if (i.unpairedTagsSet.has(c)) s = a.closeIndex;
8797
+ else {
8798
+ let n = this.readStopNodeData(e, l, f + 1);
8799
+ if (!n) throw Error(`Unexpected end of ${l}`);
8800
+ s = n.i, t = n.tagContent;
8801
+ }
8802
+ let r = new Vn(c);
8803
+ h && (r[":@"] = h), r.add(i.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, _);
8567
8804
  } else {
8568
- let e = new Vn(o);
8569
- if (this.tagsNodeStack.length > this.options.maxNestedTags) throw Error("Maximum nested tags exceeded");
8570
- this.tagsNodeStack.push(n), p && (e[":@"] = p), this.addChild(n, e, this.readonlyMatcher, h), n = e;
8805
+ if (m) {
8806
+ ({tagName: c, tagExp: u} = Lr(i.transformTagName, c, u, i));
8807
+ let e = new Vn(c);
8808
+ h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
8809
+ } else if (i.unpairedTagsSet.has(c)) {
8810
+ let e = new Vn(c);
8811
+ h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1, s = a.closeIndex;
8812
+ continue;
8813
+ } else {
8814
+ let e = new Vn(c);
8815
+ if (this.tagsNodeStack.length > i.maxNestedTags) throw Error("Maximum nested tags exceeded");
8816
+ this.tagsNodeStack.push(n), h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), n = e;
8817
+ }
8818
+ r = "", s = f;
8571
8819
  }
8572
- r = "", a = u;
8573
8820
  }
8574
- }
8575
- else r += e[a];
8821
+ } else r += e[s];
8576
8822
  return t.child;
8577
8823
  };
8578
- function mr(e, t, n, r) {
8824
+ function Dr(e, t, n, r) {
8579
8825
  this.options.captureMetaData || (r = void 0);
8580
8826
  let i = this.options.jPath ? n.toString() : n, a = this.options.updateTag(t.tagname, i, t[":@"]);
8581
8827
  a === !1 || (typeof a == "string" && (t.tagname = a), e.addChild(t, r));
8582
8828
  }
8583
- function hr(e, t, n) {
8829
+ function Or(e, t, n) {
8584
8830
  let r = this.options.processEntities;
8585
8831
  if (!r || !r.enabled) return e;
8586
8832
  if (r.allowedTags) {
@@ -8591,61 +8837,48 @@ function hr(e, t, n) {
8591
8837
  let i = this.options.jPath ? n.toString() : n;
8592
8838
  if (!r.tagFilter(t, i)) return e;
8593
8839
  }
8594
- for (let t of Object.keys(this.docTypeEntities)) {
8595
- let n = this.docTypeEntities[t], i = e.match(n.regx);
8596
- if (i) {
8597
- if (this.entityExpansionCount += i.length, r.maxTotalExpansions && this.entityExpansionCount > r.maxTotalExpansions) throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);
8598
- let t = e.length;
8599
- if (e = e.replace(n.regx, n.val), r.maxExpandedLength && (this.currentExpandedLength += e.length - t, this.currentExpandedLength > r.maxExpandedLength)) throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${r.maxExpandedLength}`);
8600
- }
8601
- }
8602
- for (let t of Object.keys(this.lastEntities)) {
8603
- let n = this.lastEntities[t], i = e.match(n.regex);
8604
- if (i && (this.entityExpansionCount += i.length, r.maxTotalExpansions && this.entityExpansionCount > r.maxTotalExpansions)) throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);
8605
- e = e.replace(n.regex, n.val);
8606
- }
8607
- if (e.indexOf("&") === -1) return e;
8608
- if (this.options.htmlEntities) for (let t of Object.keys(this.htmlEntities)) {
8609
- let n = this.htmlEntities[t], i = e.match(n.regex);
8610
- if (i && (this.entityExpansionCount += i.length, r.maxTotalExpansions && this.entityExpansionCount > r.maxTotalExpansions)) throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);
8611
- e = e.replace(n.regex, n.val);
8612
- }
8613
- return e = e.replace(this.ampEntity.regex, this.ampEntity.val), e;
8840
+ return this.entityReplacer.replace(e);
8614
8841
  }
8615
- function gr(e, t, n, r) {
8842
+ function kr(e, t, n, r) {
8616
8843
  return e &&= (r === void 0 && (r = t.child.length === 0), e = this.parseTextData(e, t.tagname, n, !1, t[":@"] ? Object.keys(t[":@"]).length !== 0 : !1, r), e !== void 0 && e !== "" && t.add(this.options.textNodeName, e), ""), e;
8617
8844
  }
8618
- function _r(e, t) {
8619
- if (!e || e.length === 0) return !1;
8620
- for (let n = 0; n < e.length; n++) if (t.matches(e[n])) return !0;
8621
- return !1;
8622
- }
8623
- function vr(e, t, n = ">") {
8624
- let r, i = "";
8625
- for (let a = t; a < e.length; a++) {
8626
- let t = e[a];
8627
- if (r) t === r && (r = "");
8628
- else if (t === "\"" || t === "'") r = t;
8629
- else if (t === n[0]) if (n[1]) {
8630
- if (e[a + 1] === n[1]) return {
8631
- data: i,
8632
- index: a
8845
+ function Ar() {
8846
+ return this.stopNodeExpressionsSet.size === 0 ? !1 : this.matcher.matchesAny(this.stopNodeExpressionsSet);
8847
+ }
8848
+ function jr(e, t, n = ">") {
8849
+ let r = 0, i = [], a = e.length, o = n.charCodeAt(0), s = n.length > 1 ? n.charCodeAt(1) : -1;
8850
+ for (let n = t; n < a; n++) {
8851
+ let t = e.charCodeAt(n);
8852
+ if (r) t === r && (r = 0);
8853
+ else if (t === 34 || t === 39) r = t;
8854
+ else if (t === o) if (s !== -1) {
8855
+ if (e.charCodeAt(n + 1) === s) return {
8856
+ data: String.fromCharCode(...i),
8857
+ index: n
8633
8858
  };
8634
8859
  } else return {
8635
- data: i,
8636
- index: a
8860
+ data: String.fromCharCode(...i),
8861
+ index: n
8637
8862
  };
8638
- else t === " " && (t = " ");
8639
- i += t;
8863
+ else if (t === 9) {
8864
+ i.push(32);
8865
+ continue;
8866
+ }
8867
+ i.push(t);
8640
8868
  }
8641
8869
  }
8642
- function yr(e, t, n, r) {
8870
+ function Mr(e, t, n, r) {
8643
8871
  let i = e.indexOf(t, n);
8644
8872
  if (i === -1) throw Error(r);
8645
8873
  return i + t.length - 1;
8646
8874
  }
8647
- function br(e, t, n, r = ">") {
8648
- let i = vr(e, t + 1, r);
8875
+ function Nr(e, t, n, r) {
8876
+ let i = e.indexOf(t, n);
8877
+ if (i === -1) throw Error(r);
8878
+ return i;
8879
+ }
8880
+ function Pr(e, t, n, r = ">") {
8881
+ let i = jr(e, t + 1, r);
8649
8882
  if (!i) return;
8650
8883
  let a = i.data, o = i.index, s = a.search(/\s/), c = a, l = !0;
8651
8884
  s !== -1 && (c = a.substring(0, s), a = a.substring(s + 1).trimStart());
@@ -8662,52 +8895,51 @@ function br(e, t, n, r = ">") {
8662
8895
  rawTagName: u
8663
8896
  };
8664
8897
  }
8665
- function xr(e, t, n) {
8666
- let r = n, i = 1;
8667
- for (; n < e.length; n++) if (e[n] === "<") if (e[n + 1] === "/") {
8668
- let a = yr(e, ">", n, `${t} is not closed`);
8669
- if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
8670
- tagContent: e.substring(r, n),
8671
- i: a
8672
- };
8673
- n = a;
8674
- } else if (e[n + 1] === "?") n = yr(e, "?>", n + 1, "StopNode is not closed.");
8675
- else if (e.substr(n + 1, 3) === "!--") n = yr(e, "-->", n + 3, "StopNode is not closed.");
8676
- else if (e.substr(n + 1, 2) === "![") n = yr(e, "]]>", n, "StopNode is not closed.") - 2;
8677
- else {
8678
- let r = br(e, n, ">");
8679
- r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
8898
+ function Fr(e, t, n) {
8899
+ let r = n, i = 1, a = e.length;
8900
+ for (; n < a; n++) if (e[n] === "<") {
8901
+ let a = e.charCodeAt(n + 1);
8902
+ if (a === 47) {
8903
+ let a = Nr(e, ">", n, `${t} is not closed`);
8904
+ if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
8905
+ tagContent: e.substring(r, n),
8906
+ i: a
8907
+ };
8908
+ n = a;
8909
+ } else if (a === 63) n = Mr(e, "?>", n + 1, "StopNode is not closed.");
8910
+ else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = Mr(e, "-->", n + 3, "StopNode is not closed.");
8911
+ else if (a === 33 && e.charCodeAt(n + 2) === 91) n = Mr(e, "]]>", n, "StopNode is not closed.") - 2;
8912
+ else {
8913
+ let r = Pr(e, n, ">");
8914
+ r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
8915
+ }
8680
8916
  }
8681
8917
  }
8682
- function Sr(e, t, n) {
8918
+ function Ir(e, t, n) {
8683
8919
  if (t && typeof e == "string") {
8684
8920
  let t = e.trim();
8685
8921
  return t === "true" ? !0 : t === "false" ? !1 : Yn(e, n);
8686
- } else if (gn(e)) return e;
8922
+ } else if (_n(e)) return e;
8687
8923
  else return "";
8688
8924
  }
8689
- function Cr(e, t, n) {
8690
- let r = Number.parseInt(e, t);
8691
- return r >= 0 && r <= 1114111 ? String.fromCodePoint(r) : n + e + ";";
8692
- }
8693
- function wr(e, t, n, r) {
8925
+ function Lr(e, t, n, r) {
8694
8926
  if (e) {
8695
8927
  let r = e(t);
8696
8928
  n === t && (n = r), t = r;
8697
8929
  }
8698
- return t = Tr(t, r), {
8930
+ return t = Rr(t, r), {
8699
8931
  tagName: t,
8700
8932
  tagExp: n
8701
8933
  };
8702
8934
  }
8703
- function Tr(e, t) {
8704
- if (vn.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
8705
- return _n.includes(e) ? t.onDangerousProperty(e) : e;
8935
+ function Rr(e, t) {
8936
+ if (yn.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
8937
+ return vn.includes(e) ? t.onDangerousProperty(e) : e;
8706
8938
  }
8707
8939
  //#endregion
8708
8940
  //#region node_modules/fast-xml-parser/src/xmlparser/node2json.js
8709
- var Er = Vn.getMetaDataSymbol();
8710
- function Dr(e, t) {
8941
+ var zr = Vn.getMetaDataSymbol();
8942
+ function Br(e, t) {
8711
8943
  if (!e || typeof e != "object") return {};
8712
8944
  if (!t) return e;
8713
8945
  let n = {};
@@ -8717,22 +8949,22 @@ function Dr(e, t) {
8717
8949
  } else n[r] = e[r];
8718
8950
  return n;
8719
8951
  }
8720
- function Or(e, t, n, r) {
8721
- return kr(e, t, n, r);
8952
+ function Vr(e, t, n, r) {
8953
+ return Hr(e, t, n, r);
8722
8954
  }
8723
- function kr(e, t, n, r) {
8955
+ function Hr(e, t, n, r) {
8724
8956
  let i, a = {};
8725
8957
  for (let o = 0; o < e.length; o++) {
8726
- let s = e[o], c = Ar(s);
8958
+ let s = e[o], c = Ur(s);
8727
8959
  if (c !== void 0 && c !== t.textNodeName) {
8728
- let e = Dr(s[":@"] || {}, t.attributeNamePrefix);
8960
+ let e = Br(s[":@"] || {}, t.attributeNamePrefix);
8729
8961
  n.push(c, e);
8730
8962
  }
8731
8963
  if (c === t.textNodeName) i === void 0 ? i = s[c] : i += "" + s[c];
8732
8964
  else if (c === void 0) continue;
8733
8965
  else if (s[c]) {
8734
- let e = kr(s[c], t, n, r), i = Mr(e, t);
8735
- if (s[":@"] ? jr(e, s[":@"], r, t) : Object.keys(e).length === 1 && e[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? e = e[t.textNodeName] : Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = ""), s[Er] !== void 0 && typeof e == "object" && e && (e[Er] = s[Er]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
8966
+ let e = Hr(s[c], t, n, r), i = Gr(e, t);
8967
+ if (s[":@"] ? Wr(e, s[":@"], r, t) : Object.keys(e).length === 1 && e[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? e = e[t.textNodeName] : Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = ""), s[zr] !== void 0 && typeof e == "object" && e && (e[zr] = s[zr]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
8736
8968
  else {
8737
8969
  let n = t.jPath ? r.toString() : r;
8738
8970
  t.isArray(c, n, i) ? a[c] = [e] : a[c] = e;
@@ -8742,14 +8974,14 @@ function kr(e, t, n, r) {
8742
8974
  }
8743
8975
  return typeof i == "string" ? i.length > 0 && (a[t.textNodeName] = i) : i !== void 0 && (a[t.textNodeName] = i), a;
8744
8976
  }
8745
- function Ar(e) {
8977
+ function Ur(e) {
8746
8978
  let t = Object.keys(e);
8747
8979
  for (let e = 0; e < t.length; e++) {
8748
8980
  let n = t[e];
8749
8981
  if (n !== ":@") return n;
8750
8982
  }
8751
8983
  }
8752
- function jr(e, t, n, r) {
8984
+ function Wr(e, t, n, r) {
8753
8985
  if (t) {
8754
8986
  let i = Object.keys(t), a = i.length;
8755
8987
  for (let o = 0; o < a; o++) {
@@ -8758,13 +8990,13 @@ function jr(e, t, n, r) {
8758
8990
  }
8759
8991
  }
8760
8992
  }
8761
- function Mr(e, t) {
8993
+ function Gr(e, t) {
8762
8994
  let { textNodeName: n } = t, r = Object.keys(e).length;
8763
8995
  return !!(r === 0 || r === 1 && (e[n] || typeof e[n] == "boolean" || e[n] === 0));
8764
8996
  }
8765
8997
  //#endregion
8766
8998
  //#region node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
8767
- var Nr = class {
8999
+ var Kr = class {
8768
9000
  constructor(e) {
8769
9001
  this.externalEntities = {}, this.options = zn(e);
8770
9002
  }
@@ -8773,13 +9005,13 @@ var Nr = class {
8773
9005
  else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
8774
9006
  if (t) {
8775
9007
  t === !0 && (t = {});
8776
- let n = bn(e, t);
9008
+ let n = xn(e, t);
8777
9009
  if (n !== !0) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
8778
9010
  }
8779
- let n = new sr(this.options);
8780
- n.addExternalEntities(this.externalEntities);
9011
+ let n = new xr(this.options);
9012
+ n.entityReplacer.setExternalEntities(this.externalEntities);
8781
9013
  let r = n.parseXml(e);
8782
- return this.options.preserveOrder || r === void 0 ? r : Or(r, this.options, n.matcher, n.readonlyMatcher);
9014
+ return this.options.preserveOrder || r === void 0 ? r : Vr(r, this.options, n.matcher, n.readonlyMatcher);
8783
9015
  }
8784
9016
  addEntity(e, t) {
8785
9017
  if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
@@ -8790,37 +9022,37 @@ var Nr = class {
8790
9022
  static getMetaDataSymbol() {
8791
9023
  return Vn.getMetaDataSymbol();
8792
9024
  }
8793
- }, Pr = "\n";
8794
- function Fr(e, t) {
9025
+ }, qr = "\n";
9026
+ function Jr(e, t) {
8795
9027
  let n = "";
8796
- t.format && t.indentBy.length > 0 && (n = Pr);
9028
+ t.format && t.indentBy.length > 0 && (n = qr);
8797
9029
  let r = [];
8798
9030
  if (t.stopNodes && Array.isArray(t.stopNodes)) for (let e = 0; e < t.stopNodes.length; e++) {
8799
9031
  let n = t.stopNodes[e];
8800
9032
  typeof n == "string" ? r.push(new nr(n)) : n instanceof nr && r.push(n);
8801
9033
  }
8802
- let i = new ir();
8803
- return Ir(e, t, n, i, r);
9034
+ let i = new ar();
9035
+ return Yr(e, t, n, i, r);
8804
9036
  }
8805
- function Ir(e, t, n, r, i) {
9037
+ function Yr(e, t, n, r, i) {
8806
9038
  let a = "", o = !1;
8807
9039
  if (t.maxNestedTags && r.getDepth() > t.maxNestedTags) throw Error("Maximum nested tags exceeded");
8808
9040
  if (!Array.isArray(e)) {
8809
9041
  if (e != null) {
8810
9042
  let n = e.toString();
8811
- return n = Ur(n, t), n;
9043
+ return n = ni(n, t), n;
8812
9044
  }
8813
9045
  return "";
8814
9046
  }
8815
9047
  for (let s = 0; s < e.length; s++) {
8816
- let c = e[s], l = Br(c);
9048
+ let c = e[s], l = $r(c);
8817
9049
  if (l === void 0) continue;
8818
- let u = Lr(c[":@"], t);
9050
+ let u = Xr(c[":@"], t);
8819
9051
  r.push(l, u);
8820
- let d = Hr(r, i);
9052
+ let d = ti(r, i);
8821
9053
  if (l === t.textNodeName) {
8822
9054
  let e = c[l];
8823
- d || (e = t.tagValueProcessor(l, e), e = Ur(e, t)), o && (a += n), a += e, o = !1, r.pop();
9055
+ d || (e = t.tagValueProcessor(l, e), e = ni(e, t)), o && (a += n), a += e, o = !1, r.pop();
8824
9056
  continue;
8825
9057
  } else if (l === t.cdataPropName) {
8826
9058
  o && (a += n), a += `<![CDATA[${c[l][0][t.textNodeName]}]]>`, o = !1, r.pop();
@@ -8829,18 +9061,18 @@ function Ir(e, t, n, r, i) {
8829
9061
  a += n + `<!--${c[l][0][t.textNodeName]}-->`, o = !0, r.pop();
8830
9062
  continue;
8831
9063
  } else if (l[0] === "?") {
8832
- let e = Vr(c[":@"], t, d), i = l === "?xml" ? "" : n, s = c[l][0][t.textNodeName];
9064
+ let e = ei(c[":@"], t, d), i = l === "?xml" ? "" : n, s = c[l][0][t.textNodeName];
8833
9065
  s = s.length === 0 ? "" : " " + s, a += i + `<${l}${s}${e}?>`, o = !0, r.pop();
8834
9066
  continue;
8835
9067
  }
8836
9068
  let f = n;
8837
9069
  f !== "" && (f += t.indentBy);
8838
- let p = n + `<${l}${Vr(c[":@"], t, d)}`, m;
8839
- m = d ? Rr(c[l], t) : Ir(c[l], t, f, r, i), t.unpairedTags.indexOf(l) === -1 ? (!m || m.length === 0) && t.suppressEmptyNode ? a += p + "/>" : m && m.endsWith(">") ? a += p + `>${m}${n}</${l}>` : (a += p + ">", m && n !== "" && (m.includes("/>") || m.includes("</")) ? a += n + t.indentBy + m + n : a += m, a += `</${l}>`) : t.suppressUnpairedNode ? a += p + ">" : a += p + "/>", o = !0, r.pop();
9070
+ let p = n + `<${l}${ei(c[":@"], t, d)}`, m;
9071
+ m = d ? Zr(c[l], t) : Yr(c[l], t, f, r, i), t.unpairedTags.indexOf(l) === -1 ? (!m || m.length === 0) && t.suppressEmptyNode ? a += p + "/>" : m && m.endsWith(">") ? a += p + `>${m}${n}</${l}>` : (a += p + ">", m && n !== "" && (m.includes("/>") || m.includes("</")) ? a += n + t.indentBy + m + n : a += m, a += `</${l}>`) : t.suppressUnpairedNode ? a += p + ">" : a += p + "/>", o = !0, r.pop();
8840
9072
  }
8841
9073
  return a;
8842
9074
  }
8843
- function Lr(e, t) {
9075
+ function Xr(e, t) {
8844
9076
  if (!e || t.ignoreAttributes) return null;
8845
9077
  let n = {}, r = !1;
8846
9078
  for (let i in e) {
@@ -8850,23 +9082,23 @@ function Lr(e, t) {
8850
9082
  }
8851
9083
  return r ? n : null;
8852
9084
  }
8853
- function Rr(e, t) {
9085
+ function Zr(e, t) {
8854
9086
  if (!Array.isArray(e)) return e == null ? "" : e.toString();
8855
9087
  let n = "";
8856
9088
  for (let r = 0; r < e.length; r++) {
8857
- let i = e[r], a = Br(i);
9089
+ let i = e[r], a = $r(i);
8858
9090
  if (a === t.textNodeName) n += i[a];
8859
9091
  else if (a === t.cdataPropName) n += i[a][0][t.textNodeName];
8860
9092
  else if (a === t.commentPropName) n += i[a][0][t.textNodeName];
8861
9093
  else if (a && a[0] === "?") continue;
8862
9094
  else if (a) {
8863
- let e = zr(i[":@"], t), r = Rr(i[a], t);
9095
+ let e = Qr(i[":@"], t), r = Zr(i[a], t);
8864
9096
  !r || r.length === 0 ? n += `<${a}${e}/>` : n += `<${a}${e}>${r}</${a}>`;
8865
9097
  }
8866
9098
  }
8867
9099
  return n;
8868
9100
  }
8869
- function zr(e, t) {
9101
+ function Qr(e, t) {
8870
9102
  let n = "";
8871
9103
  if (e && !t.ignoreAttributes) for (let r in e) {
8872
9104
  if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
@@ -8875,28 +9107,28 @@ function zr(e, t) {
8875
9107
  }
8876
9108
  return n;
8877
9109
  }
8878
- function Br(e) {
9110
+ function $r(e) {
8879
9111
  let t = Object.keys(e);
8880
9112
  for (let n = 0; n < t.length; n++) {
8881
9113
  let r = t[n];
8882
9114
  if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
8883
9115
  }
8884
9116
  }
8885
- function Vr(e, t, n) {
9117
+ function ei(e, t, n) {
8886
9118
  let r = "";
8887
9119
  if (e && !t.ignoreAttributes) for (let i in e) {
8888
9120
  if (!Object.prototype.hasOwnProperty.call(e, i)) continue;
8889
9121
  let a;
8890
- n ? a = e[i] : (a = t.attributeValueProcessor(i, e[i]), a = Ur(a, t)), a === !0 && t.suppressBooleanAttributes ? r += ` ${i.substr(t.attributeNamePrefix.length)}` : r += ` ${i.substr(t.attributeNamePrefix.length)}="${a}"`;
9122
+ n ? a = e[i] : (a = t.attributeValueProcessor(i, e[i]), a = ni(a, t)), a === !0 && t.suppressBooleanAttributes ? r += ` ${i.substr(t.attributeNamePrefix.length)}` : r += ` ${i.substr(t.attributeNamePrefix.length)}="${a}"`;
8891
9123
  }
8892
9124
  return r;
8893
9125
  }
8894
- function Hr(e, t) {
9126
+ function ti(e, t) {
8895
9127
  if (!t || t.length === 0) return !1;
8896
9128
  for (let n = 0; n < t.length; n++) if (e.matches(t[n])) return !0;
8897
9129
  return !1;
8898
9130
  }
8899
- function Ur(e, t) {
9131
+ function ni(e, t) {
8900
9132
  if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
8901
9133
  let r = t.entities[n];
8902
9134
  e = e.replace(r.regex, r.val);
@@ -8905,14 +9137,14 @@ function Ur(e, t) {
8905
9137
  }
8906
9138
  //#endregion
8907
9139
  //#region node_modules/fast-xml-builder/src/ignoreAttributes.js
8908
- function Wr(e) {
9140
+ function ri(e) {
8909
9141
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
8910
9142
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
8911
9143
  } : () => !1;
8912
9144
  }
8913
9145
  //#endregion
8914
9146
  //#region node_modules/fast-xml-builder/src/fxb.js
8915
- var Gr = {
9147
+ var ii = {
8916
9148
  attributeNamePrefix: "@_",
8917
9149
  attributesGroupName: !1,
8918
9150
  textNodeName: "#text",
@@ -8960,25 +9192,25 @@ var Gr = {
8960
9192
  maxNestedTags: 100,
8961
9193
  jPath: !0
8962
9194
  };
8963
- function Kr(e) {
8964
- if (this.options = Object.assign({}, Gr, e), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let e = 0; e < this.options.stopNodes.length; e++) {
9195
+ function ai(e) {
9196
+ if (this.options = Object.assign({}, ii, e), this.options.stopNodes && Array.isArray(this.options.stopNodes) && (this.options.stopNodes = this.options.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), this.stopNodeExpressions = [], this.options.stopNodes && Array.isArray(this.options.stopNodes)) for (let e = 0; e < this.options.stopNodes.length; e++) {
8965
9197
  let t = this.options.stopNodes[e];
8966
9198
  typeof t == "string" ? this.stopNodeExpressions.push(new nr(t)) : t instanceof nr && this.stopNodeExpressions.push(t);
8967
9199
  }
8968
9200
  this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
8969
9201
  return !1;
8970
- } : (this.ignoreAttributesFn = Wr(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Yr), this.processTextOrObjNode = qr, this.options.format ? (this.indentate = Jr, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
9202
+ } : (this.ignoreAttributesFn = ri(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ci), this.processTextOrObjNode = oi, this.options.format ? (this.indentate = si, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
8971
9203
  return "";
8972
9204
  }, this.tagEndChar = ">", this.newLine = "");
8973
9205
  }
8974
- Kr.prototype.build = function(e) {
8975
- if (this.options.preserveOrder) return Fr(e, this.options);
9206
+ ai.prototype.build = function(e) {
9207
+ if (this.options.preserveOrder) return Jr(e, this.options);
8976
9208
  {
8977
9209
  Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (e = { [this.options.arrayNodeName]: e });
8978
- let t = new ir();
9210
+ let t = new ar();
8979
9211
  return this.j2x(e, 0, t).val;
8980
9212
  }
8981
- }, Kr.prototype.j2x = function(e, t, n) {
9213
+ }, ai.prototype.j2x = function(e, t, n) {
8982
9214
  let r = "", i = "";
8983
9215
  if (this.options.maxNestedTags && n.getDepth() >= this.options.maxNestedTags) throw Error("Maximum nested tags exceeded");
8984
9216
  let a = this.options.jPath ? n.toString() : n, o = this.checkStopNode(n);
@@ -9030,10 +9262,10 @@ Kr.prototype.build = function(e) {
9030
9262
  attrStr: r,
9031
9263
  val: i
9032
9264
  };
9033
- }, Kr.prototype.buildAttrPairStr = function(e, t, n) {
9265
+ }, ai.prototype.buildAttrPairStr = function(e, t, n) {
9034
9266
  return n || (t = this.options.attributeValueProcessor(e, "" + t), t = this.replaceEntitiesValue(t)), this.options.suppressBooleanAttributes && t === "true" ? " " + e : " " + e + "=\"" + t + "\"";
9035
9267
  };
9036
- function qr(e, t, n, r) {
9268
+ function oi(e, t, n, r) {
9037
9269
  let i = this.extractAttributes(e);
9038
9270
  if (r.push(t, i), this.checkStopNode(r)) {
9039
9271
  let i = this.buildRawContent(e), a = this.buildAttributesForStopNode(e);
@@ -9042,7 +9274,7 @@ function qr(e, t, n, r) {
9042
9274
  let a = this.j2x(e, n + 1, r);
9043
9275
  return r.pop(), e[this.options.textNodeName] !== void 0 && Object.keys(e).length === 1 ? this.buildTextValNode(e[this.options.textNodeName], t, a.attrStr, n, r) : this.buildObjectNode(a.val, t, a.attrStr, n);
9044
9276
  }
9045
- Kr.prototype.extractAttributes = function(e) {
9277
+ ai.prototype.extractAttributes = function(e) {
9046
9278
  if (!e || typeof e != "object") return null;
9047
9279
  let t = {}, n = !1;
9048
9280
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -9058,7 +9290,7 @@ Kr.prototype.extractAttributes = function(e) {
9058
9290
  i && (t[i] = e[r], n = !0);
9059
9291
  }
9060
9292
  return n ? t : null;
9061
- }, Kr.prototype.buildRawContent = function(e) {
9293
+ }, ai.prototype.buildRawContent = function(e) {
9062
9294
  if (typeof e == "string") return e;
9063
9295
  if (typeof e != "object" || !e) return String(e);
9064
9296
  if (e[this.options.textNodeName] !== void 0) return e[this.options.textNodeName];
@@ -9079,7 +9311,7 @@ Kr.prototype.extractAttributes = function(e) {
9079
9311
  } else t += `<${n}>${r}</${n}>`;
9080
9312
  }
9081
9313
  return t;
9082
- }, Kr.prototype.buildAttributesForStopNode = function(e) {
9314
+ }, ai.prototype.buildAttributesForStopNode = function(e) {
9083
9315
  if (!e || typeof e != "object") return "";
9084
9316
  let t = "";
9085
9317
  if (this.options.attributesGroupName && e[this.options.attributesGroupName]) {
@@ -9098,20 +9330,20 @@ Kr.prototype.extractAttributes = function(e) {
9098
9330
  }
9099
9331
  }
9100
9332
  return t;
9101
- }, Kr.prototype.buildObjectNode = function(e, t, n, r) {
9333
+ }, ai.prototype.buildObjectNode = function(e, t, n, r) {
9102
9334
  if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
9103
9335
  {
9104
9336
  let i = "</" + t + this.tagEndChar, a = "";
9105
9337
  return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${e}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
9106
9338
  }
9107
- }, Kr.prototype.closeTag = function(e) {
9339
+ }, ai.prototype.closeTag = function(e) {
9108
9340
  let t = "";
9109
9341
  return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
9110
- }, Kr.prototype.checkStopNode = function(e) {
9342
+ }, ai.prototype.checkStopNode = function(e) {
9111
9343
  if (!this.stopNodeExpressions || this.stopNodeExpressions.length === 0) return !1;
9112
9344
  for (let t = 0; t < this.stopNodeExpressions.length; t++) if (e.matches(this.stopNodeExpressions[t])) return !0;
9113
9345
  return !1;
9114
- }, Kr.prototype.buildTextValNode = function(e, t, n, r, i) {
9346
+ }, ai.prototype.buildTextValNode = function(e, t, n, r, i) {
9115
9347
  if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) return this.indentate(r) + `<![CDATA[${e}]]>` + this.newLine;
9116
9348
  if (this.options.commentPropName !== !1 && t === this.options.commentPropName) return this.indentate(r) + `<!--${e}-->` + this.newLine;
9117
9349
  if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
@@ -9119,31 +9351,31 @@ Kr.prototype.extractAttributes = function(e) {
9119
9351
  let i = this.options.tagValueProcessor(t, e);
9120
9352
  return i = this.replaceEntitiesValue(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
9121
9353
  }
9122
- }, Kr.prototype.replaceEntitiesValue = function(e) {
9354
+ }, ai.prototype.replaceEntitiesValue = function(e) {
9123
9355
  if (e && e.length > 0 && this.options.processEntities) for (let t = 0; t < this.options.entities.length; t++) {
9124
9356
  let n = this.options.entities[t];
9125
9357
  e = e.replace(n.regex, n.val);
9126
9358
  }
9127
9359
  return e;
9128
9360
  };
9129
- function Jr(e) {
9361
+ function si(e) {
9130
9362
  return this.options.indentBy.repeat(e);
9131
9363
  }
9132
- function Yr(e) {
9364
+ function ci(e) {
9133
9365
  return e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName ? e.substr(this.attrPrefixLen) : !1;
9134
9366
  }
9135
9367
  //#endregion
9136
9368
  //#region node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js
9137
- var Xr = Kr;
9369
+ var li = ai;
9138
9370
  //#endregion
9139
9371
  //#region src/primitives/FlatSVG.tsx
9140
- function Zr({ ref: e, fillMode: t = "preserve", svg: n, shouldStripClasses: r = !0, shouldStripIds: i = !0, shouldStripPositions: a = !0, shouldStripStyles: o = !0, ...s }) {
9372
+ function ui({ ref: e, fillMode: t = "preserve", svg: n, shouldStripClasses: r = !0, shouldStripIds: i = !0, shouldStripPositions: a = !0, shouldStripStyles: o = !0, ...s }) {
9141
9373
  let c = ["id"].map((e) => `@_${e}`), l = ["class"].map((e) => `@_${e}`), u = [
9142
9374
  "fill",
9143
9375
  "stroke",
9144
9376
  "style"
9145
9377
  ].map((e) => `@_${e}`), d = ["x", "y"].map((e) => `@_${e}`), f = () => {
9146
- let e = new Nr({
9378
+ let e = new Kr({
9147
9379
  attributeNamePrefix: "@_",
9148
9380
  ignoreAttributes: !1,
9149
9381
  ignoreDeclaration: !0,
@@ -9168,7 +9400,7 @@ function Zr({ ref: e, fillMode: t = "preserve", svg: n, shouldStripClasses: r =
9168
9400
  }
9169
9401
  return e;
9170
9402
  }
9171
- }), s = new Xr({
9403
+ }), s = new li({
9172
9404
  attributeNamePrefix: "@_",
9173
9405
  format: !1,
9174
9406
  ignoreAttributes: !1
@@ -9181,10 +9413,10 @@ function Zr({ ref: e, fillMode: t = "preserve", svg: n, shouldStripClasses: r =
9181
9413
  dangerouslySetInnerHTML: { __html: f() }
9182
9414
  });
9183
9415
  }
9184
- process.env.NODE_ENV === "development" && (Zr.displayName = "FlatSVG");
9416
+ process.env.NODE_ENV === "development" && (ui.displayName = "FlatSVG");
9185
9417
  //#endregion
9186
9418
  //#region src/primitives/Form.tsx
9187
- function Qr({ ref: e, onSubmit: t, ...n }) {
9419
+ function di({ ref: e, onSubmit: t, ...n }) {
9188
9420
  return /* @__PURE__ */ (0, E.jsx)("form", {
9189
9421
  ...n,
9190
9422
  ref: e,
@@ -9193,11 +9425,11 @@ function Qr({ ref: e, onSubmit: t, ...n }) {
9193
9425
  }
9194
9426
  });
9195
9427
  }
9196
- process.env.NODE_ENV !== "production" && (Qr.displayName = "Form");
9428
+ process.env.NODE_ENV !== "production" && (di.displayName = "Form");
9197
9429
  //#endregion
9198
9430
  //#region src/primitives/MasonryGrid.tsx
9199
- var $r = "base-";
9200
- function ei({ className: e, ref: t, alignSections: n = !1, children: r, horizontalSpacing: i = 0, orientation: a = "vertical", sections: c = 3, verticalSpacing: l = 0, isReversed: f = !1, ...p }) {
9431
+ var fi = "base-";
9432
+ function pi({ className: e, ref: t, alignSections: n = !1, children: r, horizontalSpacing: i = 0, orientation: a = "vertical", sections: c = 3, verticalSpacing: l = 0, isReversed: f = !1, ...p }) {
9201
9433
  let m = u(null), [h, g] = d(NaN), [_, v] = d(NaN), [y, b] = d(NaN), [x, C] = d(NaN), w = () => V.from(m.current).width, T = () => V.from(m.current).height, D = () => {
9202
9434
  let e = m.current;
9203
9435
  if (!e) return;
@@ -9210,29 +9442,29 @@ function ei({ className: e, ref: t, alignSections: n = !1, children: r, horizont
9210
9442
  let a = [...Array(r)].map(() => 0);
9211
9443
  for (let e of Array.from(t)) {
9212
9444
  if (!(e instanceof HTMLElement)) continue;
9213
- let t = ai(e, c), [o, s] = ri(a, t);
9445
+ let t = vi(e, c), [o, s] = gi(a, t);
9214
9446
  e.role = "gridcell", e.style.position = "absolute", e.style.width = `calc(${100 / r * t}% - ${i * (r - 1) / r * t}px + ${i * (t - 1)}px)`, e.style.height = "", e.style.left = `calc(${100 / r * o}% - ${i * (r - 1) / r * o}px + ${i * o}px)`, e.style.top = `${s + (s === 0 ? 0 : l)}px`;
9215
9447
  for (let n = 0; n < t; n++) a[o + n] = s + (s === 0 ? 0 : l) + V.from(e).height;
9216
9448
  if (n && o + t === r) {
9217
- let e = ii(a);
9449
+ let e = _i(a);
9218
9450
  for (let t = 0; t < r; t++) a[t] = e;
9219
9451
  }
9220
9452
  }
9221
- let o = w(), s = ii(a, r);
9453
+ let o = w(), s = _i(a, r);
9222
9454
  if (g(o), v(s), isNaN(s) || (e.style.height = `${s}px`), f) for (let e of Array.from(t)) e instanceof HTMLElement && (e.style.left = `calc(${o}px - ${e.style.left} - ${e.getBoundingClientRect().width}px)`);
9223
9455
  } else {
9224
9456
  let a = [...Array(r)].map(() => 0);
9225
9457
  for (let e of Array.from(t)) {
9226
9458
  if (!(e instanceof HTMLElement)) continue;
9227
- let t = ai(e, c), [o, s] = ri(a, t);
9459
+ let t = vi(e, c), [o, s] = gi(a, t);
9228
9460
  e.style.position = "absolute", e.style.width = "", e.style.height = `calc(${100 / r * t}% - ${l * (r - 1) / r * t}px + ${l * (t - 1)}px)`, e.style.top = `calc(${100 / r * o}% - ${l * (r - 1) / r * o}px + ${l * o}px)`, e.style.left = `${s + (s === 0 ? 0 : i)}px`;
9229
9461
  for (let n = 0; n < t; n++) a[o + n] = s + (s === 0 ? 0 : i) + V.from(e).width;
9230
9462
  if (n && o + t === r) {
9231
- let e = ii(a);
9463
+ let e = _i(a);
9232
9464
  for (let t = 0; t < r; t++) a[t] = e;
9233
9465
  }
9234
9466
  }
9235
- let o = T(), s = ii(a, r);
9467
+ let o = T(), s = _i(a, r);
9236
9468
  if (v(o), g(s), isNaN(s) || (e.style.width = `${s}px`), f) for (let e of Array.from(t)) e instanceof HTMLElement && (e.style.top = `calc(${o}px - ${e.style.top} - ${e.getBoundingClientRect().height}px)`);
9237
9469
  }
9238
9470
  };
@@ -9247,7 +9479,7 @@ function ei({ className: e, ref: t, alignSections: n = !1, children: r, horizont
9247
9479
  l,
9248
9480
  a
9249
9481
  ])), s(() => {
9250
- let e = oi(m.current?.innerHTML);
9482
+ let e = yi(m.current?.innerHTML);
9251
9483
  if (e.length === 0) return D();
9252
9484
  let t = e.length;
9253
9485
  for (let n = 0; n < t; n++) {
@@ -9255,7 +9487,7 @@ function ei({ className: e, ref: t, alignSections: n = !1, children: r, horizont
9255
9487
  r.src = t, r.onload = () => D();
9256
9488
  }
9257
9489
  }, [r]);
9258
- let O = ti({ orientation: a }), k = ni({
9490
+ let O = mi({ orientation: a }), k = hi({
9259
9491
  minHeight: _,
9260
9492
  minWidth: h,
9261
9493
  orientation: a
@@ -9272,10 +9504,10 @@ function ei({ className: e, ref: t, alignSections: n = !1, children: r, horizont
9272
9504
  })
9273
9505
  });
9274
9506
  }
9275
- function ti({ orientation: e = "horizontal" }) {
9507
+ function mi({ orientation: e = "horizontal" }) {
9276
9508
  return O({ root: S(e) });
9277
9509
  }
9278
- function ni({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizontal" }) {
9510
+ function hi({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizontal" }) {
9279
9511
  return A({ body: {
9280
9512
  height: n === "horizontal" ? "100%" : "auto",
9281
9513
  minHeight: n === "vertical" && !isNaN(e) ? `${e}px` : "",
@@ -9284,28 +9516,28 @@ function ni({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizonta
9284
9516
  width: n === "horizontal" ? "auto" : "100%"
9285
9517
  } });
9286
9518
  }
9287
- function ri(e, t) {
9519
+ function gi(e, t) {
9288
9520
  let n = e.length, r = NaN, i = Infinity;
9289
9521
  for (let a = 0; a < n; a++) {
9290
9522
  let o = e[a], s = o < i, c = a + t <= n, l = !0;
9291
9523
  for (let n = 1; n < t; n++) e[a + n] > o && (l = !1);
9292
9524
  s && c && l && (r = a, i = o);
9293
9525
  }
9294
- return isNaN(r) ? [0, ii(e, t)] : [r, i];
9526
+ return isNaN(r) ? [0, _i(e, t)] : [r, i];
9295
9527
  }
9296
- function ii(e, t) {
9528
+ function _i(e, t) {
9297
9529
  let n = e;
9298
9530
  return t != null && !isNaN(t) && (n = n.slice(0, Math.max(1, Math.min(t, e.length)))), n.reduce((e, t, n) => t > e ? t : e, 0);
9299
9531
  }
9300
- function ai(e, t) {
9532
+ function vi(e, t) {
9301
9533
  let n = e.classList;
9302
- for (let e of Array.from(n)) if (e.startsWith($r)) {
9303
- let n = parseFloat(e.replace($r, ""));
9534
+ for (let e of Array.from(n)) if (e.startsWith(fi)) {
9535
+ let n = parseFloat(e.replace(fi, ""));
9304
9536
  if (!isNaN(n)) return Math.min(Math.max(n, 1), t);
9305
9537
  }
9306
9538
  return 1;
9307
9539
  }
9308
- function oi(e) {
9540
+ function yi(e) {
9309
9541
  if (!e) return [];
9310
9542
  let t = /<img.*?src=(["'])(.*?)\1/g, n = /<img.*?src=(["'])(.*?)\1/, r = t.exec(e) ?? [], i = [];
9311
9543
  for (let e of r) {
@@ -9314,19 +9546,19 @@ function oi(e) {
9314
9546
  }
9315
9547
  return i;
9316
9548
  }
9317
- process.env.NODE_ENV === "development" && (ei.displayName = "MasonryGrid");
9549
+ process.env.NODE_ENV === "development" && (pi.displayName = "MasonryGrid");
9318
9550
  //#endregion
9319
9551
  //#region src/primitives/RangeSlider.tsx
9320
- function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight: i = 28, knobPadding: a = 0, knobWidth: c = 40, max: l, min: f, orientation: p = "vertical", range: m, steps: h = -1, isClipped: g = !1, onChange: _, ...v }) {
9321
- let y = u(null), b = ee(y), x = u(null), C = u(null), [w, T] = d(m ?? [f, l]), D = gi(f, l, h), [O, A] = w.map((e) => mi(e, f, l, p, b, c, i, g)), j = A - O, P = k(n, {
9322
- gutter: Q.Gutter,
9323
- highlight: Q.Highlight,
9324
- knob: Q.Knob,
9325
- knobContainer: Q.KnobContainer,
9326
- label: Q.Label
9552
+ function $({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight: i = 28, knobPadding: a = 0, knobWidth: c = 40, max: l, min: f, orientation: p = "vertical", range: m, steps: h = -1, isClipped: g = !1, onChange: _, ...v }) {
9553
+ let y = u(null), b = ee(y), x = u(null), C = u(null), [w, T] = d(m ?? [f, l]), D = ki(f, l, h), [O, A] = w.map((e) => Di(e, f, l, p, b, c, i, g)), j = A - O, P = k(n, {
9554
+ gutter: $.Gutter,
9555
+ highlight: $.Highlight,
9556
+ knob: $.Knob,
9557
+ knobContainer: $.KnobContainer,
9558
+ label: $.Label
9327
9559
  }), F = o((e, t, n) => {
9328
- let r = p === "horizontal" ? t : n, a = mi(f, f, l, p, b, c, i, g), o = mi(w[1], f, l, p, b, c, i, g), s = mi(e, f, l, p, b, c, i, g) + r;
9329
- return fi(Math.max(a, Math.min(o, s)), f, l, p, b, c, i, g);
9560
+ let r = p === "horizontal" ? t : n, a = Di(f, f, l, p, b, c, i, g), o = Di(w[1], f, l, p, b, c, i, g), s = Di(e, f, l, p, b, c, i, g) + r;
9561
+ return Ti(Math.max(a, Math.min(o, s)), f, l, p, b, c, i, g);
9330
9562
  }, [
9331
9563
  c,
9332
9564
  i,
@@ -9337,8 +9569,8 @@ function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight
9337
9569
  w[1],
9338
9570
  V.toString(b)
9339
9571
  ]), I = o((e, t, n) => {
9340
- let r = p === "horizontal" ? t : n, a = mi(w[0], f, l, p, b, c, i, g), o = mi(l, f, l, p, b, c, i, g), s = mi(e, f, l, p, b, c, i, g) + r;
9341
- return fi(Math.max(a, Math.min(o, s)), f, l, p, b, c, i, g);
9572
+ let r = p === "horizontal" ? t : n, a = Di(w[0], f, l, p, b, c, i, g), o = Di(l, f, l, p, b, c, i, g), s = Di(e, f, l, p, b, c, i, g) + r;
9573
+ return Ti(Math.max(a, Math.min(o, s)), f, l, p, b, c, i, g);
9342
9574
  }, [
9343
9575
  c,
9344
9576
  i,
@@ -9348,18 +9580,18 @@ function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight
9348
9580
  p,
9349
9581
  w[0],
9350
9582
  V.toString(b)
9351
- ]), { setValue: L, value: R, isDragging: z, isReleasing: B } = Ce(x, {
9583
+ ]), { setValue: L, value: R, isDragging: z, isReleasing: B } = we(x, {
9352
9584
  initialValue: m?.[0] ?? f,
9353
9585
  transform: F
9354
- }), { setValue: H, value: U, isDragging: W, isReleasing: G } = Ce(C, {
9586
+ }), { setValue: H, value: U, isDragging: W, isReleasing: G } = we(C, {
9355
9587
  initialValue: m?.[1] ?? l,
9356
9588
  transform: I
9357
- }), K = si({
9589
+ }), K = bi({
9358
9590
  isDraggingEndKnob: W,
9359
9591
  isDraggingStartKnob: z,
9360
9592
  isReleasingEndKnob: G,
9361
9593
  isReleasingStartKnob: B
9362
- }), q = ci({
9594
+ }), q = xi({
9363
9595
  highlightLength: j,
9364
9596
  knobHeight: i,
9365
9597
  knobPadding: a,
@@ -9380,10 +9612,10 @@ function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight
9380
9612
  W,
9381
9613
  G
9382
9614
  ]), s(() => {
9383
- D && L(hi(R, D));
9384
- }, [B, xe(D)]), s(() => {
9385
- !D || !G || H(hi(U, D));
9386
- }, [G, xe(D)]), /* @__PURE__ */ (0, E.jsx)("div", {
9615
+ D && L(Oi(R, D));
9616
+ }, [B, Se(D)]), s(() => {
9617
+ !D || !G || H(Oi(U, D));
9618
+ }, [G, Se(D)]), /* @__PURE__ */ (0, E.jsx)("div", {
9387
9619
  ...v,
9388
9620
  className: S(e, p),
9389
9621
  ref: t,
@@ -9396,11 +9628,11 @@ function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight
9396
9628
  children: [
9397
9629
  /* @__PURE__ */ (0, E.jsx)(M, {
9398
9630
  style: N(q.gutter),
9399
- element: P.gutter ?? /* @__PURE__ */ (0, E.jsx)(Q.Gutter, {})
9631
+ element: P.gutter ?? /* @__PURE__ */ (0, E.jsx)($.Gutter, {})
9400
9632
  }),
9401
9633
  /* @__PURE__ */ (0, E.jsx)(M, {
9402
9634
  style: N(q.highlight),
9403
- element: P.highlight ?? /* @__PURE__ */ (0, E.jsx)(Q.Highlight, {})
9635
+ element: P.highlight ?? /* @__PURE__ */ (0, E.jsx)($.Highlight, {})
9404
9636
  }),
9405
9637
  /* @__PURE__ */ (0, E.jsx)(M, {
9406
9638
  className: K.startKnobContainer,
@@ -9413,15 +9645,15 @@ function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight
9413
9645
  top: `${O}px`
9414
9646
  }),
9415
9647
  disabled: (0, be.default)([R, U], [f, f]),
9416
- element: P.knobContainer ?? /* @__PURE__ */ (0, E.jsx)(Q.KnobContainer, {}),
9648
+ element: P.knobContainer ?? /* @__PURE__ */ (0, E.jsx)($.KnobContainer, {}),
9417
9649
  children: /* @__PURE__ */ (0, E.jsxs)(M, {
9418
9650
  className: K.startKnob,
9419
9651
  style: N(q.knob),
9420
- element: P.knob ?? /* @__PURE__ */ (0, E.jsx)(Q.Knob, {}),
9652
+ element: P.knob ?? /* @__PURE__ */ (0, E.jsx)($.Knob, {}),
9421
9653
  children: [/* @__PURE__ */ (0, E.jsx)("div", { style: q.knobHitBox }), P.label && /* @__PURE__ */ (0, E.jsx)(M, {
9422
9654
  className: K.startLabel,
9423
9655
  style: N(q.label),
9424
- element: P.label ?? /* @__PURE__ */ (0, E.jsx)(Q.Label, {}),
9656
+ element: P.label ?? /* @__PURE__ */ (0, E.jsx)($.Label, {}),
9425
9657
  children: Number(R.toFixed(r)).toLocaleString()
9426
9658
  })]
9427
9659
  })
@@ -9437,15 +9669,15 @@ function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight
9437
9669
  top: `${A}px`
9438
9670
  }),
9439
9671
  disabled: (0, be.default)([R, U], [l, l]),
9440
- element: P.knobContainer ?? /* @__PURE__ */ (0, E.jsx)(Q.KnobContainer, {}),
9672
+ element: P.knobContainer ?? /* @__PURE__ */ (0, E.jsx)($.KnobContainer, {}),
9441
9673
  children: /* @__PURE__ */ (0, E.jsxs)(M, {
9442
9674
  className: K.endKnob,
9443
9675
  style: N(q.knob),
9444
- element: P.knob ?? /* @__PURE__ */ (0, E.jsx)(Q.Knob, {}),
9676
+ element: P.knob ?? /* @__PURE__ */ (0, E.jsx)($.Knob, {}),
9445
9677
  children: [/* @__PURE__ */ (0, E.jsx)("div", { style: q.knobHitBox }), P.label && /* @__PURE__ */ (0, E.jsx)(M, {
9446
9678
  className: K.endLabel,
9447
9679
  style: N(q.label),
9448
- element: P.label ?? /* @__PURE__ */ (0, E.jsx)(Q.Label, {}),
9680
+ element: P.label ?? /* @__PURE__ */ (0, E.jsx)($.Label, {}),
9449
9681
  children: Number(U.toFixed(r)).toLocaleString()
9450
9682
  })]
9451
9683
  })
@@ -9456,8 +9688,8 @@ function Q({ className: e, ref: t, children: n, decimalPlaces: r = 2, knobHeight
9456
9688
  }
9457
9689
  (function(e) {
9458
9690
  e.Gutter = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.Highlight = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.Knob = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e });
9459
- })(Q ||= {});
9460
- function si({ isDraggingEndKnob: e = !1, isDraggingStartKnob: t = !1, isReleasingEndKnob: n = !1, isReleasingStartKnob: r = !1 }) {
9691
+ })($ ||= {});
9692
+ function bi({ isDraggingEndKnob: e = !1, isDraggingStartKnob: t = !1, isReleasingEndKnob: n = !1, isReleasingStartKnob: r = !1 }) {
9461
9693
  return O({
9462
9694
  endKnob: S({
9463
9695
  dragging: e,
@@ -9485,7 +9717,7 @@ function si({ isDraggingEndKnob: e = !1, isDraggingStartKnob: t = !1, isReleasin
9485
9717
  })
9486
9718
  });
9487
9719
  }
9488
- function ci({ highlightLength: e = 0, knobHeight: t = 0, knobPadding: n = 0, knobWidth: r = 0, orientation: i = "horizontal", start: a = 0 }) {
9720
+ function xi({ highlightLength: e = 0, knobHeight: t = 0, knobPadding: n = 0, knobWidth: r = 0, orientation: i = "horizontal", start: a = 0 }) {
9489
9721
  return A({
9490
9722
  body: {
9491
9723
  height: "100%",
@@ -9542,10 +9774,10 @@ function ci({ highlightLength: e = 0, knobHeight: t = 0, knobPadding: n = 0, kno
9542
9774
  }
9543
9775
  });
9544
9776
  }
9545
- function li(e, t, n) {
9777
+ function Si(e, t, n) {
9546
9778
  return (e - t) / (n - t);
9547
9779
  }
9548
- function ui(e, t, n, r, i, a) {
9780
+ function Ci(e, t, n, r, i, a) {
9549
9781
  switch (t) {
9550
9782
  case "horizontal": {
9551
9783
  let t = a ? n.width - r : n.width;
@@ -9558,23 +9790,23 @@ function ui(e, t, n, r, i, a) {
9558
9790
  default: return console.error(`[etudes::RangeSlider] Invalid orientation: ${t}`), NaN;
9559
9791
  }
9560
9792
  }
9561
- function di(e, t, n) {
9793
+ function wi(e, t, n) {
9562
9794
  return e * (n - t) + t;
9563
9795
  }
9564
- function fi(e, t, n, r, i, a, o, s) {
9565
- return di(ui(e, r, i, a, o, s), t, n);
9796
+ function Ti(e, t, n, r, i, a, o, s) {
9797
+ return wi(Ci(e, r, i, a, o, s), t, n);
9566
9798
  }
9567
- function pi(e, t, n, r, i, a) {
9799
+ function Ei(e, t, n, r, i, a) {
9568
9800
  switch (t) {
9569
9801
  case "horizontal": return e * (a ? n.width - r : n.width) + (a ? r * .5 : 0);
9570
9802
  case "vertical": return e * (a ? n.height - i : n.height) + (a ? i * .5 : 0);
9571
9803
  default: return console.error(`[etudes::RangeSlider] Invalid orientation: ${t}`), NaN;
9572
9804
  }
9573
9805
  }
9574
- function mi(e, t, n, r, i, a, o, s) {
9575
- return pi(li(e, t, n), r, i, a, o, s);
9806
+ function Di(e, t, n, r, i, a, o, s) {
9807
+ return Ei(Si(e, t, n), r, i, a, o, s);
9576
9808
  }
9577
- function hi(e, t) {
9809
+ function Oi(e, t) {
9578
9810
  let n = t.length, r = 0, i = Infinity;
9579
9811
  for (let a = 0; a < n; a++) {
9580
9812
  let n = t[a], o = Math.abs(e - n);
@@ -9582,47 +9814,47 @@ function hi(e, t) {
9582
9814
  }
9583
9815
  return t[r];
9584
9816
  }
9585
- function gi(e, t, n) {
9817
+ function ki(e, t, n) {
9586
9818
  if (!(n < 0)) return [
9587
9819
  e,
9588
9820
  ...[...Array(n)].map((r, i) => e + (i + 1) * (t - e) / (1 + n)),
9589
9821
  t
9590
9822
  ];
9591
9823
  }
9592
- process.env.NODE_ENV === "development" && (Q.displayName = "RangeSlider", Q.Gutter.displayName = "RangeSlider.Gutter", Q.Label.displayName = "RangeSlider.Label", Q.Highlight.displayName = "RangeSlider.Highlight", Q.Knob.displayName = "RangeSlider.Knob");
9824
+ process.env.NODE_ENV === "development" && ($.displayName = "RangeSlider", $.Gutter.displayName = "RangeSlider.Gutter", $.Label.displayName = "RangeSlider.Label", $.Highlight.displayName = "RangeSlider.Highlight", $.Knob.displayName = "RangeSlider.Knob");
9593
9825
  //#endregion
9594
9826
  //#region src/primitives/Select.tsx
9595
- function _i({ id: e, ref: t, children: n, formatValue: r = (e) => e, name: i, options: a, placeholder: o, value: s, isRequired: c = !1, onChange: l, ...u }) {
9827
+ function Ai({ id: e, ref: t, children: n, formatValue: r = (e) => e, name: i, options: a, placeholder: o, value: s, isRequired: c = !1, onChange: l, ...u }) {
9596
9828
  let d = k(n, {
9597
- expandIcon: _i.ExpandIcon,
9598
- option: _i.Option,
9599
- toggle: _i.Toggle
9829
+ expandIcon: Ai.ExpandIcon,
9830
+ option: Ai.Option,
9831
+ toggle: Ai.Toggle
9600
9832
  });
9601
9833
  return /* @__PURE__ */ (0, E.jsxs)("div", {
9602
9834
  ...u,
9603
9835
  ref: t,
9604
- style: vi.root,
9836
+ style: ji.root,
9605
9837
  children: [/* @__PURE__ */ (0, E.jsxs)(M, {
9606
- style: vi.select,
9838
+ style: ji.select,
9607
9839
  "aria-required": c ? "true" : void 0,
9608
- element: d.toggle ?? /* @__PURE__ */ (0, E.jsx)(_i.Toggle, {}),
9840
+ element: d.toggle ?? /* @__PURE__ */ (0, E.jsx)(Ai.Toggle, {}),
9609
9841
  name: i,
9610
9842
  required: c,
9611
9843
  value: s,
9612
9844
  onChange: (e) => l?.(e.target.value),
9613
9845
  children: [o !== void 0 && /* @__PURE__ */ (0, E.jsx)(M, {
9614
9846
  disabled: !0,
9615
- element: d.option ?? /* @__PURE__ */ (0, E.jsx)(_i.Option, {}),
9847
+ element: d.option ?? /* @__PURE__ */ (0, E.jsx)(Ai.Option, {}),
9616
9848
  hidden: !0,
9617
9849
  value: "",
9618
9850
  children: o
9619
9851
  }), a.map((e, t) => /* @__PURE__ */ (0, E.jsx)(M, {
9620
- element: d.option ?? /* @__PURE__ */ (0, E.jsx)(_i.Option, {}),
9852
+ element: d.option ?? /* @__PURE__ */ (0, E.jsx)(Ai.Option, {}),
9621
9853
  value: e,
9622
9854
  children: r(e)
9623
9855
  }, `${t}-${e}`))]
9624
9856
  }), d.expandIcon && /* @__PURE__ */ (0, E.jsx)(M, {
9625
- style: vi.expandIcon,
9857
+ style: ji.expandIcon,
9626
9858
  element: d.expandIcon
9627
9859
  })]
9628
9860
  });
@@ -9637,8 +9869,8 @@ function _i({ id: e, ref: t, children: n, formatValue: r = (e) => e, name: i, op
9637
9869
  ...t,
9638
9870
  children: e
9639
9871
  });
9640
- })(_i ||= {});
9641
- var vi = A({
9872
+ })(Ai ||= {});
9873
+ var ji = A({
9642
9874
  expandIcon: {
9643
9875
  pointerEvents: "none",
9644
9876
  zIndex: 1
@@ -9660,10 +9892,10 @@ var vi = A({
9660
9892
  width: "100%"
9661
9893
  }
9662
9894
  });
9663
- process.env.NODE_ENV === "development" && (_i.displayName = "Select", _i.ExpandIcon.displayName = "Select.ExpandIcon", _i.Option.displayName = "Select.Option", _i.Toggle.displayName = "Select.Toggle");
9895
+ process.env.NODE_ENV === "development" && (Ai.displayName = "Select", Ai.ExpandIcon.displayName = "Select.ExpandIcon", Ai.Option.displayName = "Select.Option", Ai.Toggle.displayName = "Select.Toggle");
9664
9896
  //#endregion
9665
9897
  //#region src/primitives/Slider.tsx
9666
- function yi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding: i = 0, knobWidth: a = 30, labelProvider: c, orientation: l = "vertical", position: d = 0, trackPadding: f = 0, isClipped: p = !1, isInverted: m = !1, isTrackInteractive: h = !0, shouldOnlyDispatchOnDragEnd: g = !1, onChange: _, onDragEnd: v, onDragStart: y, ...b }) {
9898
+ function Mi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding: i = 0, knobWidth: a = 30, labelProvider: c, orientation: l = "vertical", position: d = 0, trackPadding: f = 0, isClipped: p = !1, isInverted: m = !1, isTrackInteractive: h = !0, shouldOnlyDispatchOnDragEnd: g = !1, onChange: _, onDragEnd: v, onDragStart: y, ...b }) {
9667
9899
  let x = u(null), C = u(null), w = o((e, t, n) => {
9668
9900
  let i = V.from(x.current), o = m ? 1 - e : e;
9669
9901
  switch (l) {
@@ -9705,18 +9937,18 @@ function yi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding
9705
9937
  m,
9706
9938
  h,
9707
9939
  l
9708
- ]), { setValue: D, value: O, isDragging: A, isReleasing: j } = Ce(C, {
9940
+ ]), { setValue: D, value: O, isDragging: A, isReleasing: j } = we(C, {
9709
9941
  initialValue: d,
9710
9942
  transform: w,
9711
9943
  onDragEnd: v,
9712
9944
  onDragStart: y
9713
- }), P = m ? 1 - O : O, F = bi({
9945
+ }), P = m ? 1 - O : O, F = Ni({
9714
9946
  orientation: l,
9715
9947
  isAtEnd: m ? O === 0 : O === 1,
9716
9948
  isAtStart: m ? O === 1 : O === 0,
9717
9949
  isDragging: A,
9718
9950
  isReleasing: j
9719
- }), I = xi({
9951
+ }), I = Pi({
9720
9952
  knobHeight: r,
9721
9953
  knobPadding: i,
9722
9954
  knobWidth: a,
@@ -9733,10 +9965,10 @@ function yi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding
9733
9965
  A || !g || _?.(O, !0);
9734
9966
  }, [A]);
9735
9967
  let L = k(n, {
9736
- knob: yi.Knob,
9737
- knobContainer: yi.KnobContainer,
9738
- label: yi.Label,
9739
- track: yi.Track
9968
+ knob: Mi.Knob,
9969
+ knobContainer: Mi.KnobContainer,
9970
+ label: Mi.Label,
9971
+ track: Mi.Track
9740
9972
  });
9741
9973
  return /* @__PURE__ */ (0, E.jsx)("div", {
9742
9974
  ...b,
@@ -9758,7 +9990,7 @@ function yi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding
9758
9990
  left: "0",
9759
9991
  width: `calc(${P * 100}% - ${f <= 0 ? 0 : a * .5}px - ${f}px)`
9760
9992
  }),
9761
- element: L.track ?? /* @__PURE__ */ (0, E.jsx)(yi.Track, {}),
9993
+ element: L.track ?? /* @__PURE__ */ (0, E.jsx)(Mi.Track, {}),
9762
9994
  onClick: T,
9763
9995
  children: /* @__PURE__ */ (0, E.jsx)("div", { style: I.trackHitBox })
9764
9996
  }),
@@ -9771,7 +10003,7 @@ function yi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding
9771
10003
  right: "0",
9772
10004
  width: `calc(${(1 - P) * 100}% - ${f <= 0 ? 0 : a * .5}px - ${f}px)`
9773
10005
  }),
9774
- element: L.track ?? /* @__PURE__ */ (0, E.jsx)(yi.Track, {}),
10006
+ element: L.track ?? /* @__PURE__ */ (0, E.jsx)(Mi.Track, {}),
9775
10007
  onClick: T,
9776
10008
  children: /* @__PURE__ */ (0, E.jsx)("div", { style: I.trackHitBox })
9777
10009
  }),
@@ -9779,15 +10011,15 @@ function yi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding
9779
10011
  className: S(F.knobContainer),
9780
10012
  ref: C,
9781
10013
  style: I.knobContainer,
9782
- element: L.knobContainer ?? /* @__PURE__ */ (0, E.jsx)(yi.KnobContainer, {}),
10014
+ element: L.knobContainer ?? /* @__PURE__ */ (0, E.jsx)(Mi.KnobContainer, {}),
9783
10015
  children: /* @__PURE__ */ (0, E.jsxs)(M, {
9784
10016
  className: S(F.knob),
9785
10017
  style: N(I.knob),
9786
- element: L.knob ?? /* @__PURE__ */ (0, E.jsx)(yi.Knob, {}),
10018
+ element: L.knob ?? /* @__PURE__ */ (0, E.jsx)(Mi.Knob, {}),
9787
10019
  children: [/* @__PURE__ */ (0, E.jsx)("div", { style: I.knobHitBox }), c && /* @__PURE__ */ (0, E.jsx)(M, {
9788
10020
  className: S(F.label),
9789
10021
  style: N(I.label),
9790
- element: L.label ?? /* @__PURE__ */ (0, E.jsx)(yi.Label, {}),
10022
+ element: L.label ?? /* @__PURE__ */ (0, E.jsx)(Mi.Label, {}),
9791
10023
  children: c(O)
9792
10024
  })]
9793
10025
  })
@@ -9798,8 +10030,8 @@ function yi({ className: e, ref: t, children: n, knobHeight: r = 30, knobPadding
9798
10030
  }
9799
10031
  (function(e) {
9800
10032
  e.Track = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.Knob = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e });
9801
- })(yi ||= {});
9802
- function bi({ orientation: e = "vertical", isAtEnd: t = !1, isAtStart: n = !1, isDragging: r = !1, isReleasing: i = !1 }) {
10033
+ })(Mi ||= {});
10034
+ function Ni({ orientation: e = "vertical", isAtEnd: t = !1, isAtStart: n = !1, isDragging: r = !1, isReleasing: i = !1 }) {
9803
10035
  return O({
9804
10036
  knob: S(e, {
9805
10037
  "at-end": t,
@@ -9833,7 +10065,7 @@ function bi({ orientation: e = "vertical", isAtEnd: t = !1, isAtStart: n = !1, i
9833
10065
  })
9834
10066
  });
9835
10067
  }
9836
- function xi({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, naturalPosition: r = 0, orientation: i = "vertical", isClipped: a = !1, isTrackInteractive: o = !0 }) {
10068
+ function Pi({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, naturalPosition: r = 0, orientation: i = "vertical", isClipped: a = !1, isTrackInteractive: o = !0 }) {
9837
10069
  return A({
9838
10070
  body: {
9839
10071
  height: "100%",
@@ -9898,20 +10130,20 @@ function xi({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, naturalPo
9898
10130
  }
9899
10131
  });
9900
10132
  }
9901
- process.env.NODE_ENV === "development" && (yi.displayName = "Slider", yi.Track.displayName = "Slider.Track", yi.Knob.displayName = "Slider.Knob", yi.KnobContainer.displayName = "Slider.KnobContainer", yi.Label.displayName = "Slider.Label");
10133
+ process.env.NODE_ENV === "development" && (Mi.displayName = "Slider", Mi.Track.displayName = "Slider.Track", Mi.Knob.displayName = "Slider.Knob", Mi.KnobContainer.displayName = "Slider.KnobContainer", Mi.Label.displayName = "Slider.Label");
9902
10134
  //#endregion
9903
10135
  //#region src/primitives/StepSlider.tsx
9904
- function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30, knobPadding: a = 0, knobWidth: c = 30, labelProvider: l, orientation: f = "vertical", steps: p = Si(10), trackPadding: m = 0, isClipped: h = !1, isInverted: g = !1, isTrackInteractive: _ = !0, shouldOnlyDispatchOnDragEnd: v = !1, onDragEnd: y, onDragStart: b, onIndexChange: x, onPositionChange: C, ...w }) {
10136
+ function Fi({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30, knobPadding: a = 0, knobWidth: c = 30, labelProvider: l, orientation: f = "vertical", steps: p = Ii(10), trackPadding: m = 0, isClipped: h = !1, isInverted: g = !1, isTrackInteractive: _ = !0, shouldOnlyDispatchOnDragEnd: v = !1, onDragEnd: y, onDragStart: b, onIndexChange: x, onPositionChange: C, ...w }) {
9905
10137
  let T = u(null), D = u(null), O = ee(T), [A, j] = d(r), P = o((e, t, n) => {
9906
- let r = g ? Di(e) : e;
10138
+ let r = g ? Vi(e) : e;
9907
10139
  switch (f) {
9908
10140
  case "horizontal": {
9909
- let e = h ? O.width - c : O.width, n = Oi((r * e + t) / e);
9910
- return g ? Di(n) : n;
10141
+ let e = h ? O.width - c : O.width, n = Hi((r * e + t) / e);
10142
+ return g ? Vi(n) : n;
9911
10143
  }
9912
10144
  case "vertical": {
9913
- let e = h ? O.height - i : O.height, t = Oi((r * e + n) / e);
9914
- return g ? Di(t) : t;
10145
+ let e = h ? O.height - i : O.height, t = Hi((r * e + n) / e);
10146
+ return g ? Vi(t) : t;
9915
10147
  }
9916
10148
  default: return console.error(`[etudes::StepSlider] Invalid orientation: ${f}`), NaN;
9917
10149
  }
@@ -9923,8 +10155,8 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
9923
10155
  c,
9924
10156
  i,
9925
10157
  f
9926
- ]), { setValue: F, value: I, isDragging: L, isReleasing: R } = Ce(D, {
9927
- initialValue: wi(r, p),
10158
+ ]), { setValue: F, value: I, isDragging: L, isReleasing: R } = we(D, {
10159
+ initialValue: Ri(r, p),
9928
10160
  transform: P,
9929
10161
  onDragEnd: y,
9930
10162
  onDragStart: b
@@ -9933,16 +10165,16 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
9933
10165
  let t = V.fromViewport();
9934
10166
  switch (f) {
9935
10167
  case "horizontal": {
9936
- let n = (e.clientX + t.left - O.left) / O.width, r = g ? Di(n) : n, i = Ci(r, p);
9937
- j(i === A ? Oi(r > I ? i + 1 : i - 1, p.length - 1) : i);
10168
+ let n = (e.clientX + t.left - O.left) / O.width, r = g ? Vi(n) : n, i = Li(r, p);
10169
+ j(i === A ? Hi(r > I ? i + 1 : i - 1, p.length - 1) : i);
9938
10170
  break;
9939
10171
  }
9940
10172
  case "vertical": {
9941
- let n = (e.clientY + t.top - O.top) / O.height, r = g ? Di(n) : n, i = Ci(r, p);
10173
+ let n = (e.clientY + t.top - O.top) / O.height, r = g ? Vi(n) : n, i = Li(r, p);
9942
10174
  if (i === A) {
9943
10175
  let e = r > I ? i + 1 : i - 1;
9944
- F(wi(e, p)), j(Oi(e, p.length - 1));
9945
- } else F(wi(i, p)), j(i);
10176
+ F(Ri(e, p)), j(Hi(e, p.length - 1));
10177
+ } else F(Ri(i, p)), j(i);
9946
10178
  break;
9947
10179
  }
9948
10180
  default: console.error(`[etudes::StepSlider] Invalid orientation: ${f}`);
@@ -9957,14 +10189,14 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
9957
10189
  g,
9958
10190
  _,
9959
10191
  f,
9960
- xe(p)
9961
- ]), B = g ? Di(I) : I, H = Ti({
10192
+ Se(p)
10193
+ ]), B = g ? Vi(I) : I, H = zi({
9962
10194
  orientation: f,
9963
10195
  isAtEnd: g ? I === 0 : I === 1,
9964
10196
  isAtStart: g ? I === 1 : I === 0,
9965
10197
  isDragging: L,
9966
10198
  isReleasing: R
9967
- }), U = Ei({
10199
+ }), U = Bi({
9968
10200
  knobHeight: i,
9969
10201
  knobPadding: a,
9970
10202
  knobWidth: c,
@@ -9973,30 +10205,30 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
9973
10205
  isClipped: h,
9974
10206
  isTrackInteractive: _
9975
10207
  }), W = k(n, {
9976
- knob: $.Knob,
9977
- knobContainer: $.KnobContainer,
9978
- label: $.Label,
9979
- track: $.Track
10208
+ knob: Fi.Knob,
10209
+ knobContainer: Fi.KnobContainer,
10210
+ label: Fi.Label,
10211
+ track: Fi.Track
9980
10212
  });
9981
10213
  return s(() => {
9982
- L || (F(wi(r, p)), j(r));
10214
+ L || (F(Ri(r, p)), j(r));
9983
10215
  }, [
9984
10216
  r,
9985
10217
  L,
9986
- xe(p)
10218
+ Se(p)
9987
10219
  ]), s(() => {
9988
10220
  if (L) {
9989
10221
  if (v) return;
9990
- j(Ci(I, p));
10222
+ j(Li(I, p));
9991
10223
  } else {
9992
- let e = Ci(I, p);
9993
- F(wi(e, p)), j(e);
10224
+ let e = Li(I, p);
10225
+ F(Ri(e, p)), j(e);
9994
10226
  }
9995
10227
  }, [
9996
10228
  I,
9997
10229
  L,
9998
10230
  v,
9999
- xe(p)
10231
+ Se(p)
10000
10232
  ]), s(() => {
10001
10233
  C?.(I, L);
10002
10234
  }, [I, L]), s(() => {
@@ -10020,7 +10252,7 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
10020
10252
  left: "0",
10021
10253
  width: `calc(${B * 100}% - ${m <= 0 ? 0 : c * .5}px - ${m}px)`
10022
10254
  }),
10023
- element: W.track ?? /* @__PURE__ */ (0, E.jsx)($.Track, {}),
10255
+ element: W.track ?? /* @__PURE__ */ (0, E.jsx)(Fi.Track, {}),
10024
10256
  onClick: z,
10025
10257
  children: /* @__PURE__ */ (0, E.jsx)("div", { style: U.trackHitBox })
10026
10258
  }),
@@ -10028,12 +10260,12 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
10028
10260
  className: S(g ? "start" : "end", H.track),
10029
10261
  style: N(U.track, f === "vertical" ? {
10030
10262
  bottom: "0",
10031
- height: `calc(${Di(B) * 100}% - ${m <= 0 ? 0 : i * .5}px - ${m}px)`
10263
+ height: `calc(${Vi(B) * 100}% - ${m <= 0 ? 0 : i * .5}px - ${m}px)`
10032
10264
  } : {
10033
10265
  right: "0",
10034
- width: `calc(${Di(B) * 100}% - ${m <= 0 ? 0 : c * .5}px - ${m}px)`
10266
+ width: `calc(${Vi(B) * 100}% - ${m <= 0 ? 0 : c * .5}px - ${m}px)`
10035
10267
  }),
10036
- element: W.track ?? /* @__PURE__ */ (0, E.jsx)($.Track, {}),
10268
+ element: W.track ?? /* @__PURE__ */ (0, E.jsx)(Fi.Track, {}),
10037
10269
  onClick: z,
10038
10270
  children: /* @__PURE__ */ (0, E.jsx)("div", { style: U.trackHitBox })
10039
10271
  }),
@@ -10041,16 +10273,16 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
10041
10273
  className: S(H.knobContainer),
10042
10274
  ref: D,
10043
10275
  style: N(U.knobContainer),
10044
- element: W.knobContainer ?? /* @__PURE__ */ (0, E.jsx)($.KnobContainer, {}),
10276
+ element: W.knobContainer ?? /* @__PURE__ */ (0, E.jsx)(Fi.KnobContainer, {}),
10045
10277
  children: /* @__PURE__ */ (0, E.jsxs)(M, {
10046
10278
  className: S(H.knob),
10047
10279
  style: N(U.knob),
10048
- element: W.knob ?? /* @__PURE__ */ (0, E.jsx)($.Knob, {}),
10280
+ element: W.knob ?? /* @__PURE__ */ (0, E.jsx)(Fi.Knob, {}),
10049
10281
  children: [/* @__PURE__ */ (0, E.jsx)("div", { style: U.knobHitBox }), p && l && /* @__PURE__ */ (0, E.jsx)(M, {
10050
10282
  className: S(H.label),
10051
10283
  style: N(U.label),
10052
- element: W.label ?? /* @__PURE__ */ (0, E.jsx)($.Label, {}),
10053
- children: l(I, Ci(I, p))
10284
+ element: W.label ?? /* @__PURE__ */ (0, E.jsx)(Fi.Label, {}),
10285
+ children: l(I, Li(I, p))
10054
10286
  })]
10055
10287
  })
10056
10288
  })
@@ -10058,29 +10290,29 @@ function $({ className: e, ref: t, children: n, index: r = 0, knobHeight: i = 30
10058
10290
  })
10059
10291
  });
10060
10292
  }
10061
- function Si(e) {
10293
+ function Ii(e) {
10062
10294
  if (e <= 1) return console.error("[etudes::StepSlider] `length` value must be greater than or equal to 2"), [];
10063
10295
  if (Math.round(e) !== e) return console.error("[etudes::StepSlider] `length` value must be an integer"), [];
10064
10296
  let t = 1 / (e - 1);
10065
10297
  return Array(e).fill(null).map((e, n) => t * n);
10066
10298
  }
10067
10299
  (function(e) {
10068
- e.Knob = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.Track = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.generateSteps = Si;
10069
- })($ ||= {});
10070
- function Ci(e, t) {
10300
+ e.Knob = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.Track = ({ ...e }) => /* @__PURE__ */ (0, E.jsx)("div", { ...e }), e.generateSteps = Ii;
10301
+ })(Fi ||= {});
10302
+ function Li(e, t) {
10071
10303
  let n = -1, r = NaN;
10072
10304
  for (let i = 0, a = t.length; i < a; i++) {
10073
- let a = wi(i, t);
10305
+ let a = Ri(i, t);
10074
10306
  if (isNaN(a)) continue;
10075
10307
  let o = Math.abs(e - a);
10076
10308
  (isNaN(r) || o < r) && (r = o, n = i);
10077
10309
  }
10078
10310
  return n;
10079
10311
  }
10080
- function wi(e, t) {
10312
+ function Ri(e, t) {
10081
10313
  return e >= t.length ? NaN : t[e];
10082
10314
  }
10083
- function Ti({ orientation: e = "vertical", isAtEnd: t = !1, isAtStart: n = !1, isDragging: r = !1, isReleasing: i = !1 }) {
10315
+ function zi({ orientation: e = "vertical", isAtEnd: t = !1, isAtStart: n = !1, isDragging: r = !1, isReleasing: i = !1 }) {
10084
10316
  return O({
10085
10317
  knob: S(e, {
10086
10318
  "at-end": t,
@@ -10114,7 +10346,7 @@ function Ti({ orientation: e = "vertical", isAtEnd: t = !1, isAtStart: n = !1, i
10114
10346
  })
10115
10347
  });
10116
10348
  }
10117
- function Ei({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, naturalPosition: r = 0, orientation: i = "vertical", isClipped: a = !1, isTrackInteractive: o = !1 }) {
10349
+ function Bi({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, naturalPosition: r = 0, orientation: i = "vertical", isClipped: a = !1, isTrackInteractive: o = !1 }) {
10118
10350
  return A({
10119
10351
  body: {
10120
10352
  height: "100%",
@@ -10179,16 +10411,16 @@ function Ei({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, naturalPo
10179
10411
  }
10180
10412
  });
10181
10413
  }
10182
- function Di(e) {
10414
+ function Vi(e) {
10183
10415
  return 1 - e;
10184
10416
  }
10185
- function Oi(e, t = 1, n = 0) {
10417
+ function Hi(e, t = 1, n = 0) {
10186
10418
  return Math.max(n, Math.min(t, e));
10187
10419
  }
10188
- process.env.NODE_ENV === "development" && ($.displayName = "StepSlider", $.Track.displayName = "StepSlider.Track", $.Knob.displayName = "StepSlider.Knob", $.KnobContainer.displayName = "StepSlider.KnobContainer", $.Label.displayName = "StepSlider.Label");
10420
+ process.env.NODE_ENV === "development" && (Fi.displayName = "StepSlider", Fi.Track.displayName = "StepSlider.Track", Fi.Knob.displayName = "StepSlider.Knob", Fi.KnobContainer.displayName = "StepSlider.KnobContainer", Fi.Label.displayName = "StepSlider.Label");
10189
10421
  //#endregion
10190
10422
  //#region src/primitives/SwipeRegion.tsx
10191
- function ki({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipeDown: i, onSwipeLeft: a, onSwipeRight: o, onSwipeUp: s, ...c }) {
10423
+ function Ui({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipeDown: i, onSwipeLeft: a, onSwipeRight: o, onSwipeUp: s, ...c }) {
10192
10424
  let [l, u] = d(void 0), [f, p] = d(void 0), [m, h] = d(NaN), g = (e, t) => {
10193
10425
  if (isNaN(e) || isNaN(t)) return y();
10194
10426
  u(R.make(e, t));
@@ -10216,24 +10448,24 @@ function ki({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipe
10216
10448
  children: t
10217
10449
  });
10218
10450
  }
10219
- process.env.NODE_ENV === "development" && (ki.displayName = "SwipeRegion");
10451
+ process.env.NODE_ENV === "development" && (Ui.displayName = "SwipeRegion");
10220
10452
  //#endregion
10221
10453
  //#region src/primitives/TextArea.tsx
10222
- function Ai({ ref: e, onChange: t, ...n }) {
10454
+ function Wi({ ref: e, onChange: t, ...n }) {
10223
10455
  return /* @__PURE__ */ (0, E.jsx)("textarea", {
10224
10456
  ...n,
10225
10457
  ref: e,
10226
10458
  onChange: (e) => t(e.target.value)
10227
10459
  });
10228
10460
  }
10229
- process.env.NODE_ENV === "development" && (Ai.displayName = "TextArea");
10461
+ process.env.NODE_ENV === "development" && (Wi.displayName = "TextArea");
10230
10462
  //#endregion
10231
10463
  //#region src/primitives/Toggle.tsx
10232
- function ji({ className: e, ref: t, style: n, children: r, orientation: i = "horizontal", isInverted: a = !1, isOn: o = !1, onChange: s, ...c }) {
10233
- let l = u(null), d = Tt(l), f = k(r, {
10234
- knob: ji.Knob,
10235
- track: ji.Track
10236
- }), p = Mi({ isOn: o }), m = Ni({
10464
+ function Gi({ className: e, ref: t, style: n, children: r, orientation: i = "horizontal", isInverted: a = !1, isOn: o = !1, onChange: s, ...c }) {
10465
+ let l = u(null), d = Et(l), f = k(r, {
10466
+ knob: Gi.Knob,
10467
+ track: Gi.Track
10468
+ }), p = Ki({ isOn: o }), m = qi({
10237
10469
  knobSize: d,
10238
10470
  orientation: i,
10239
10471
  isInverted: a,
@@ -10252,7 +10484,7 @@ function ji({ className: e, ref: t, style: n, children: r, orientation: i = "hor
10252
10484
  }), /* @__PURE__ */ (0, E.jsx)(M, {
10253
10485
  className: p.track,
10254
10486
  style: m.track,
10255
- element: f.track ?? /* @__PURE__ */ (0, E.jsx)(ji.Track, {}),
10487
+ element: f.track ?? /* @__PURE__ */ (0, E.jsx)(Gi.Track, {}),
10256
10488
  children: /* @__PURE__ */ (0, E.jsx)("div", {
10257
10489
  style: {
10258
10490
  height: "100%",
@@ -10263,7 +10495,7 @@ function ji({ className: e, ref: t, style: n, children: r, orientation: i = "hor
10263
10495
  className: p.knob,
10264
10496
  ref: l,
10265
10497
  style: m.knob,
10266
- element: f.knob ?? /* @__PURE__ */ (0, E.jsx)(ji.Knob, {})
10498
+ element: f.knob ?? /* @__PURE__ */ (0, E.jsx)(Gi.Knob, {})
10267
10499
  })
10268
10500
  })
10269
10501
  })]
@@ -10277,15 +10509,15 @@ function ji({ className: e, ref: t, style: n, children: r, orientation: i = "hor
10277
10509
  ...t,
10278
10510
  children: e
10279
10511
  });
10280
- })(ji ||= {});
10281
- function Mi({ isOn: e = !1 }) {
10512
+ })(Gi ||= {});
10513
+ function Ki({ isOn: e = !1 }) {
10282
10514
  return O({
10283
10515
  knob: S({ active: e }),
10284
10516
  root: S({ active: e }),
10285
10517
  track: S({ active: e })
10286
10518
  });
10287
10519
  }
10288
- function Ni({ knobSize: e = B.zero, orientation: t = "horizontal", isInverted: n = !1, isOn: r = !1 }) {
10520
+ function qi({ knobSize: e = B.zero, orientation: t = "horizontal", isInverted: n = !1, isOn: r = !1 }) {
10289
10521
  return A({
10290
10522
  input: {
10291
10523
  height: 0,
@@ -10315,26 +10547,26 @@ function Ni({ knobSize: e = B.zero, orientation: t = "horizontal", isInverted: n
10315
10547
  track: { position: "relative" }
10316
10548
  });
10317
10549
  }
10318
- process.env.NODE_ENV === "development" && (ji.displayName = "Toggle", ji.Knob.displayName = "Toggle.Knob", ji.Track.displayName = "Toggle.Track");
10550
+ process.env.NODE_ENV === "development" && (Gi.displayName = "Toggle", Gi.Knob.displayName = "Toggle.Knob", Gi.Track.displayName = "Toggle.Track");
10319
10551
  //#endregion
10320
10552
  //#region src/utils/createKeyDeep.ts
10321
- function Pi(e) {
10322
- return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(Pi)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, Pi(t)])) : xe(e);
10553
+ function Ji(e) {
10554
+ return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(Ji)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, Ji(t)])) : Se(e);
10323
10555
  }
10324
10556
  //#endregion
10325
10557
  //#region src/utils/ExtractChildren.tsx
10326
- function Fi({ children: e, ...n }) {
10558
+ function Yi({ children: e, ...n }) {
10327
10559
  return /* @__PURE__ */ (0, E.jsx)(E.Fragment, { children: t.map(e, (e) => a(e) ? j(e, { ...n }) : e) });
10328
10560
  }
10329
- process.env.NODE_ENV === "development" && (Fi.displayName = "ExtractChildren");
10561
+ process.env.NODE_ENV === "development" && (Yi.displayName = "ExtractChildren");
10330
10562
  //#endregion
10331
10563
  //#region src/utils/getSystemColorScheme.ts
10332
- function Ii() {
10564
+ function Xi() {
10333
10565
  return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
10334
10566
  }
10335
10567
  //#endregion
10336
10568
  //#region src/utils/NoSSR.tsx
10337
- function Li({ children: e, fallback: t = void 0 }) {
10569
+ function Zi({ children: e, fallback: t = void 0 }) {
10338
10570
  let [n, i] = d(!1);
10339
10571
  if (s(() => {
10340
10572
  i(typeof window < "u");
@@ -10344,4 +10576,4 @@ function Li({ children: e, fallback: t = void 0 }) {
10344
10576
  });
10345
10577
  }
10346
10578
  //#endregion
10347
- export { Y as Accordion, P as Burger, I as BurgerButton, me as Button, Ht as Carousel, qt as CodeInput, jt as Collection, Ne as Conditional, $t as Counter, oe as CoverImage, fe as CoverVideo, tn as Dial, X as Dropdown, Pe as Each, Le as ExtractChild, Fi as ExtractChildren, Zr as FlatSVG, Qr as Form, ie as Image, q as ImageSource, ei as MasonryGrid, Li as NoSSR, _e as OptionButton, Te as Panorama, Ae as PanoramaSlider, ae as Picture, Q as RangeSlider, D as Repeat, _i as Select, Me as SelectableButton, yi as Slider, $ as StepSlider, M as Styled, ki as SwipeRegion, Fe as Switch, Ai as TextArea, Qt as TextField, ji as Toggle, de as Video, Be as WithTooltip, O as asClassNameDict, k as asComponentDict, A as asStyleDict, j as cloneStyledElement, xe as createKey, Pi as createKeyDeep, it as createLocalCache, yt as createSessionCache, Et as getStyle, Ii as getSystemColorScheme, et as isTouchDevice, Re as measureIntrinsicSize, Dt as setStyle, ze as setStyles, N as styles, Ge as useClassName, Ke as useClickOutside, qe as useCopyBlobToClipboard, Ye as useDPR, J as useDownloadBlob, Xe as useDrag, Ze as useDropzone, te as useImageLoader, ne as useImageSize, Se as useInertiaDrag, Ce as useInertiaDragValue, W as useIntersectionObserver, Qe as useInterval, $e as useIsMounted, tt as useIsTouchDevice, nt as useKeyboardShortcut, U as useLatest, lt as useLocalCache, ut as useMouseEnter, dt as useMouseLeave, ft as useOS, pt as usePrevious, ee as useRect, mt as useScrollPosition, wt as useSessionCache, Tt as useSize, G as useSizeObserver, Ot as useStyle, kt as useSystemColorScheme, At as useTimeout, ce as useVideoMetadataLoader, le as useVideoSize, K as useViewportSize };
10579
+ export { Lt as Accordion, P as Burger, I as BurgerButton, me as Button, Wt as Carousel, Yt as CodeInput, Mt as Collection, Pe as Conditional, tn as Counter, oe as CoverImage, fe as CoverVideo, Y as Dial, X as Dropdown, Fe as Each, Re as ExtractChild, Yi as ExtractChildren, ui as FlatSVG, di as Form, ie as Image, q as ImageSource, pi as MasonryGrid, Zi as NoSSR, _e as OptionButton, Ee as Panorama, je as PanoramaSlider, ae as Picture, $ as RangeSlider, D as Repeat, Ai as Select, Ne as SelectableButton, Mi as Slider, Fi as StepSlider, M as Styled, Ui as SwipeRegion, Ie as Switch, Wi as TextArea, en as TextField, Gi as Toggle, de as Video, Ve as WithTooltip, O as asClassNameDict, k as asComponentDict, A as asStyleDict, j as cloneStyledElement, Se as createKey, Ji as createKeyDeep, at as createLocalCache, bt as createSessionCache, Dt as getStyle, Xi as getSystemColorScheme, tt as isTouchDevice, ze as measureIntrinsicSize, Ot as setStyle, Be as setStyles, N as styles, Ke as useClassName, qe as useClickOutside, J as useCopyBlobToClipboard, Xe as useDPR, Je as useDownloadBlob, Ze as useDrag, Qe as useDropzone, te as useImageLoader, ne as useImageSize, Ce as useInertiaDrag, we as useInertiaDragValue, W as useIntersectionObserver, $e as useInterval, et as useIsMounted, nt as useIsTouchDevice, rt as useKeyboardShortcut, U as useLatest, ut as useLocalCache, dt as useMouseEnter, ft as useMouseLeave, pt as useOS, mt as usePrevious, ee as useRect, ht as useScrollPosition, Tt as useSessionCache, Et as useSize, G as useSizeObserver, kt as useStyle, At as useSystemColorScheme, jt as useTimeout, ce as useVideoMetadataLoader, le as useVideoSize, K as useViewportSize };