etudes 32.4.0 → 32.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/etudes.js CHANGED
@@ -4713,9 +4713,9 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4713
4713
  function an(e) {
4714
4714
  return e && e.replace(/\/.*$/, "");
4715
4715
  }
4716
- var on = new rn(), sn = on.interactStatic, cn = typeof globalThis < "u" ? globalThis : window;
4717
- on.init(cn);
4718
- var ln = Object.freeze({
4716
+ var on = new rn(), Q = on.interactStatic, sn = typeof globalThis < "u" ? globalThis : window;
4717
+ on.init(sn);
4718
+ var cn = Object.freeze({
4719
4719
  __proto__: null,
4720
4720
  edgeTarget: function() {},
4721
4721
  elements: function() {},
@@ -4750,13 +4750,13 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4750
4750
  };
4751
4751
  return n.grid = e, n.coordFields = t, n;
4752
4752
  }
4753
- }), un = {
4753
+ }), ln = {
4754
4754
  id: "snappers",
4755
4755
  install: function(e) {
4756
4756
  var t = e.interactStatic;
4757
- t.snappers = W(t.snappers || {}, ln), t.createSnapGrid = t.snappers.grid;
4757
+ t.snappers = W(t.snappers || {}, cn), t.createSnapGrid = t.snappers.grid;
4758
4758
  }
4759
- }, dn = {
4759
+ }, un = {
4760
4760
  start: function(e) {
4761
4761
  var t = e.state, r = e.rect, i = e.edges, a = e.pageCoords, o = t.options, s = o.ratio, c = o.enabled, l = t.options, u = l.equalDelta, d = l.modifiers;
4762
4762
  s === "preserve" && (s = r.width / r.height), t.startCoords = W({}, a), t.startRect = W({}, r), t.ratio = s, t.equalDelta = u;
@@ -4782,7 +4782,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4782
4782
  }
4783
4783
  },
4784
4784
  set: function(e) {
4785
- var t = e.state, r = e.rect, i = e.coords, a = t.linkedEdges, o = W({}, i), s = t.equalDelta ? fn : pn;
4785
+ var t = e.state, r = e.rect, i = e.coords, a = t.linkedEdges, o = W({}, i), s = t.equalDelta ? dn : fn;
4786
4786
  if (W(e.edges, a), s(t, t.xIsPrimaryAxis, i, r), !t.subModification) return null;
4787
4787
  var c = W({}, r);
4788
4788
  re(a, c, {
@@ -4805,11 +4805,11 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4805
4805
  enabled: !1
4806
4806
  }
4807
4807
  };
4808
- function fn(e, t, n) {
4808
+ function dn(e, t, n) {
4809
4809
  var r = e.startCoords, i = e.edgeSign;
4810
4810
  t ? n.y = r.y + (n.x - r.x) * i.y : n.x = r.x + (n.y - r.y) * i.x;
4811
4811
  }
4812
- function pn(e, t, n, r) {
4812
+ function fn(e, t, n, r) {
4813
4813
  var i = e.startRect, a = e.startCoords, o = e.ratio, s = e.edgeSign;
4814
4814
  if (t) {
4815
4815
  var c = r.width / o;
@@ -4819,17 +4819,17 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4819
4819
  n.x = a.x + (l - i.width) * s.x;
4820
4820
  }
4821
4821
  }
4822
- var mn = yt(dn, "aspectRatio"), hn = function() {};
4823
- hn._defaults = {};
4824
- var gn = hn;
4825
- function _n(e, t, n) {
4822
+ var pn = yt(un, "aspectRatio"), mn = function() {};
4823
+ mn._defaults = {};
4824
+ var hn = mn;
4825
+ function gn(e, t, n) {
4826
4826
  return S.func(e) ? te(e, t.interactable, t.element, [
4827
4827
  n.x,
4828
4828
  n.y,
4829
4829
  t
4830
4830
  ]) : te(e, t.interactable, t.element);
4831
4831
  }
4832
- var vn = {
4832
+ var _n = {
4833
4833
  start: function(e) {
4834
4834
  var t = e.rect, n = e.startOffset, r = e.state, i = e.interaction, a = e.pageCoords, o = r.options, s = o.elementRect, c = W({
4835
4835
  left: 0,
@@ -4838,7 +4838,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4838
4838
  bottom: 0
4839
4839
  }, o.offset || {});
4840
4840
  if (t && s) {
4841
- var l = _n(o.restriction, i, a);
4841
+ var l = gn(o.restriction, i, a);
4842
4842
  if (l) {
4843
4843
  var u = l.right - l.left - t.width, d = l.bottom - l.top - t.height;
4844
4844
  u < 0 && (c.left += u, c.right += u), d < 0 && (c.top += d, c.bottom += d);
@@ -4848,7 +4848,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4848
4848
  r.offset = c;
4849
4849
  },
4850
4850
  set: function(e) {
4851
- var t = e.coords, n = e.interaction, r = e.state, i = r.options, a = r.offset, o = _n(i.restriction, n, t);
4851
+ var t = e.coords, n = e.interaction, r = e.state, i = r.options, a = r.offset, o = gn(i.restriction, n, t);
4852
4852
  if (o) {
4853
4853
  var s = function(e) {
4854
4854
  return !e || "left" in e && "top" in e || ((e = W({}, e)).left = e.x || 0, e.top = e.y || 0, e.right = e.right || e.left + e.width, e.bottom = e.bottom || e.top + e.height), e;
@@ -4863,18 +4863,18 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4863
4863
  endOnly: !1,
4864
4864
  enabled: !1
4865
4865
  }
4866
- }, yn = yt(vn, "restrict"), bn = {
4866
+ }, vn = yt(_n, "restrict"), yn = {
4867
4867
  top: Infinity,
4868
4868
  left: Infinity,
4869
4869
  bottom: -Infinity,
4870
4870
  right: -Infinity
4871
- }, xn = {
4871
+ }, bn = {
4872
4872
  top: -Infinity,
4873
4873
  left: -Infinity,
4874
4874
  bottom: Infinity,
4875
4875
  right: Infinity
4876
4876
  };
4877
- function Sn(e, t) {
4877
+ function xn(e, t) {
4878
4878
  for (var n = 0, r = [
4879
4879
  "top",
4880
4880
  "left",
@@ -4886,12 +4886,12 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4886
4886
  }
4887
4887
  return e;
4888
4888
  }
4889
- var Cn = {
4890
- noInner: bn,
4891
- noOuter: xn,
4889
+ var Sn = {
4890
+ noInner: yn,
4891
+ noOuter: bn,
4892
4892
  start: function(e) {
4893
4893
  var t, n = e.interaction, r = e.startOffset, i = e.state, a = i.options;
4894
- a && (t = G(_n(a.offset, n, n.coords.start.page))), t ||= {
4894
+ a && (t = G(gn(a.offset, n, n.coords.start.page))), t ||= {
4895
4895
  x: 0,
4896
4896
  y: 0
4897
4897
  }, i.offset = {
@@ -4904,8 +4904,8 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4904
4904
  set: function(e) {
4905
4905
  var t = e.coords, n = e.edges, r = e.interaction, i = e.state, a = i.offset, o = i.options;
4906
4906
  if (n) {
4907
- var s = W({}, t), c = _n(o.inner, r, s) || {}, l = _n(o.outer, r, s) || {};
4908
- Sn(c, bn), Sn(l, xn), n.top ? t.y = Math.min(Math.max(l.top + a.top, s.y), c.top + a.top) : n.bottom && (t.y = Math.max(Math.min(l.bottom + a.bottom, s.y), c.bottom + a.bottom)), n.left ? t.x = Math.min(Math.max(l.left + a.left, s.x), c.left + a.left) : n.right && (t.x = Math.max(Math.min(l.right + a.right, s.x), c.right + a.right));
4907
+ var s = W({}, t), c = gn(o.inner, r, s) || {}, l = gn(o.outer, r, s) || {};
4908
+ xn(c, yn), xn(l, bn), n.top ? t.y = Math.min(Math.max(l.top + a.top, s.y), c.top + a.top) : n.bottom && (t.y = Math.max(Math.min(l.bottom + a.bottom, s.y), c.bottom + a.bottom)), n.left ? t.x = Math.min(Math.max(l.left + a.left, s.x), c.left + a.left) : n.right && (t.x = Math.max(Math.min(l.right + a.right, s.x), c.right + a.right));
4909
4909
  }
4910
4910
  },
4911
4911
  defaults: {
@@ -4915,7 +4915,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4915
4915
  endOnly: !1,
4916
4916
  enabled: !1
4917
4917
  }
4918
- }, wn = yt(Cn, "restrictEdges"), Tn = W({
4918
+ }, Cn = yt(Sn, "restrictEdges"), wn = W({
4919
4919
  get elementRect() {
4920
4920
  return {
4921
4921
  top: 0,
@@ -4925,29 +4925,29 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4925
4925
  };
4926
4926
  },
4927
4927
  set elementRect(e) {}
4928
- }, vn.defaults), En = yt({
4929
- start: vn.start,
4930
- set: vn.set,
4931
- defaults: Tn
4932
- }, "restrictRect"), Dn = {
4928
+ }, _n.defaults), Tn = yt({
4929
+ start: _n.start,
4930
+ set: _n.set,
4931
+ defaults: wn
4932
+ }, "restrictRect"), En = {
4933
4933
  width: -Infinity,
4934
4934
  height: -Infinity
4935
- }, On = {
4935
+ }, Dn = {
4936
4936
  width: Infinity,
4937
4937
  height: Infinity
4938
- }, kn = yt({
4938
+ }, On = yt({
4939
4939
  start: function(e) {
4940
- return Cn.start(e);
4940
+ return Sn.start(e);
4941
4941
  },
4942
4942
  set: function(e) {
4943
4943
  var t = e.interaction, n = e.state, r = e.rect, i = e.edges, a = n.options;
4944
4944
  if (i) {
4945
- var o = ne(_n(a.min, t, e.coords)) || Dn, s = ne(_n(a.max, t, e.coords)) || On;
4945
+ var o = ne(gn(a.min, t, e.coords)) || En, s = ne(gn(a.max, t, e.coords)) || Dn;
4946
4946
  n.options = {
4947
4947
  endOnly: a.endOnly,
4948
- inner: W({}, Cn.noInner),
4949
- outer: W({}, Cn.noOuter)
4950
- }, i.top ? (n.options.inner.top = r.bottom - o.height, n.options.outer.top = r.bottom - s.height) : i.bottom && (n.options.inner.bottom = r.top + o.height, n.options.outer.bottom = r.top + s.height), i.left ? (n.options.inner.left = r.right - o.width, n.options.outer.left = r.right - s.width) : i.right && (n.options.inner.right = r.left + o.width, n.options.outer.right = r.left + s.width), Cn.set(e), n.options = a;
4948
+ inner: W({}, Sn.noInner),
4949
+ outer: W({}, Sn.noOuter)
4950
+ }, i.top ? (n.options.inner.top = r.bottom - o.height, n.options.outer.top = r.bottom - s.height) : i.bottom && (n.options.inner.bottom = r.top + o.height, n.options.outer.bottom = r.top + s.height), i.left ? (n.options.inner.left = r.right - o.width, n.options.outer.left = r.right - s.width) : i.right && (n.options.inner.right = r.left + o.width, n.options.outer.right = r.left + s.width), Sn.set(e), n.options = a;
4951
4951
  }
4952
4952
  },
4953
4953
  defaults: {
@@ -4956,7 +4956,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
4956
4956
  endOnly: !1,
4957
4957
  enabled: !1
4958
4958
  }
4959
- }, "restrictSize"), An = {
4959
+ }, "restrictSize"), kn = {
4960
4960
  start: function(e) {
4961
4961
  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) {
4962
4962
  var t = e.interaction.element;
@@ -5030,7 +5030,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
5030
5030
  endOnly: !1,
5031
5031
  enabled: !1
5032
5032
  }
5033
- }, jn = yt(An, "snap"), Mn = {
5033
+ }, An = yt(kn, "snap"), jn = {
5034
5034
  start: function(e) {
5035
5035
  var t = e.state, n = e.edges, r = t.options;
5036
5036
  if (!n) return null;
@@ -5046,7 +5046,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
5046
5046
  y: 0
5047
5047
  },
5048
5048
  range: r.range
5049
- } }, t.targetFields = t.targetFields || [["width", "height"], ["x", "y"]], An.start(e), t.offsets = e.state.offsets, e.state = t;
5049
+ } }, t.targetFields = t.targetFields || [["width", "height"], ["x", "y"]], kn.start(e), t.offsets = e.state.offsets, e.state = t;
5050
5050
  },
5051
5051
  set: function(e) {
5052
5052
  var t = e.interaction, n = e.state, r = e.coords, i = n.options, a = n.offsets, o = {
@@ -5067,7 +5067,7 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
5067
5067
  n.options.targets.push(u);
5068
5068
  }
5069
5069
  }
5070
- var g = An.set(e);
5070
+ var g = kn.set(e);
5071
5071
  return n.options = i, g;
5072
5072
  },
5073
5073
  defaults: {
@@ -5077,19 +5077,19 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
5077
5077
  endOnly: !1,
5078
5078
  enabled: !1
5079
5079
  }
5080
- }, Nn = yt(Mn, "snapSize"), Q = {
5081
- aspectRatio: mn,
5082
- restrictEdges: wn,
5083
- restrict: yn,
5084
- restrictRect: En,
5085
- restrictSize: kn,
5080
+ }, Mn = yt(jn, "snapSize"), Nn = {
5081
+ aspectRatio: pn,
5082
+ restrictEdges: Cn,
5083
+ restrict: vn,
5084
+ restrictRect: Tn,
5085
+ restrictSize: On,
5086
5086
  snapEdges: yt({
5087
5087
  start: function(e) {
5088
5088
  var t = e.edges;
5089
- return t ? (e.state.targetFields = e.state.targetFields || [[t.left ? "left" : "right", t.top ? "top" : "bottom"]], Mn.start(e)) : null;
5089
+ return t ? (e.state.targetFields = e.state.targetFields || [[t.left ? "left" : "right", t.top ? "top" : "bottom"]], jn.start(e)) : null;
5090
5090
  },
5091
- set: Mn.set,
5092
- defaults: W(gt(Mn.defaults), {
5091
+ set: jn.set,
5092
+ defaults: W(gt(jn.defaults), {
5093
5093
  targets: void 0,
5094
5094
  range: void 0,
5095
5095
  offset: {
@@ -5098,18 +5098,18 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
5098
5098
  }
5099
5099
  })
5100
5100
  }, "snapEdges"),
5101
- snap: jn,
5102
- snapSize: Nn,
5103
- spring: gn,
5104
- avoid: gn,
5105
- transform: gn,
5106
- rubberband: gn
5101
+ snap: An,
5102
+ snapSize: Mn,
5103
+ spring: hn,
5104
+ avoid: hn,
5105
+ transform: hn,
5106
+ rubberband: hn
5107
5107
  }, Pn = {
5108
5108
  id: "modifiers",
5109
5109
  install: function(e) {
5110
5110
  var t = e.interactStatic;
5111
- for (var n in e.usePlugin(xt), e.usePlugin(un), t.modifiers = Q, Q) {
5112
- var r = Q[n], i = r._defaults;
5111
+ for (var n in e.usePlugin(xt), e.usePlugin(ln), t.modifiers = Nn, Nn) {
5112
+ var r = Nn[n], i = r._defaults;
5113
5113
  i._methods = r._methods, e.defaults.perAction[n] = i;
5114
5114
  }
5115
5115
  }
@@ -5379,12 +5379,12 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
5379
5379
  }
5380
5380
  }
5381
5381
  };
5382
- if (sn.use(mt), sn.use(Nt), sn.use({
5382
+ if (Q.use(mt), Q.use(Nt), Q.use({
5383
5383
  id: "pointer-events",
5384
5384
  install: function(e) {
5385
5385
  e.usePlugin(Bn), e.usePlugin(Hn), e.usePlugin(Un);
5386
5386
  }
5387
- }), sn.use(zt), sn.use(Pn), sn.use(dt), sn.use(We), sn.use(Z), sn.use({
5387
+ }), Q.use(zt), Q.use(Pn), Q.use(dt), Q.use(We), Q.use(Z), Q.use({
5388
5388
  id: "reflow",
5389
5389
  install: function(e) {
5390
5390
  var t = e.Interactable;
@@ -5481,10 +5481,10 @@ var gt = /* @__PURE__ */ S((/* @__PURE__ */ b(((e, t) => {
5481
5481
  e.splice(e.indexOf(t), 1);
5482
5482
  }(t.interactions.list, n));
5483
5483
  } }
5484
- }), sn.default = sn, (t === void 0 ? "undefined" : r(t)) === "object" && t) try {
5485
- t.exports = sn;
5484
+ }), Q.default = Q, (t === void 0 ? "undefined" : r(t)) === "object" && t) try {
5485
+ t.exports = Q;
5486
5486
  } catch {}
5487
- return sn.default = sn, sn;
5487
+ return Q.default = Q, Q;
5488
5488
  }));
5489
5489
  })))(), 1);
5490
5490
  function _t(e) {
@@ -6076,9 +6076,11 @@ function Ht(e, t, { isEnabled: n = !0 } = {}) {
6076
6076
  e = !t(n.target);
6077
6077
  }, o = (n) => {
6078
6078
  !e || t(n.target) || (e = !1, r.current());
6079
+ }, s = (n) => {
6080
+ !e || t(n.target) || (n.preventDefault(), e = !1, r.current());
6079
6081
  };
6080
- return window.addEventListener("pointerdown", a, !0), window.addEventListener("click", o, !0), () => {
6081
- window.removeEventListener("pointerdown", a, !0), window.removeEventListener("click", o, !0);
6082
+ return window.addEventListener("pointerdown", a, !0), window.addEventListener("click", o, !0), window.addEventListener("contextmenu", s, !0), () => {
6083
+ window.removeEventListener("pointerdown", a, !0), window.removeEventListener("click", o, !0), window.removeEventListener("contextmenu", s, !0);
6082
6084
  };
6083
6085
  }, [...[].concat(e).map((e) => e && "current" in e ? e.current : void 0), n]);
6084
6086
  }
@@ -6293,12 +6295,12 @@ function on(e, t, n) {
6293
6295
  }
6294
6296
  //#endregion
6295
6297
  //#region src/hooks/useLocalCache.ts
6296
- function sn(e) {
6298
+ function Q(e) {
6297
6299
  return d(() => tn({ defaultTTL: e }), [e]);
6298
6300
  }
6299
6301
  //#endregion
6300
6302
  //#region src/hooks/useMouseEnter.ts
6301
- function cn(e, t, { isEnabled: n = !0 } = {}) {
6303
+ function sn(e, t, { isEnabled: n = !0 } = {}) {
6302
6304
  let r = Z(t);
6303
6305
  u(() => {
6304
6306
  if (!n) return;
@@ -6315,7 +6317,7 @@ function cn(e, t, { isEnabled: n = !0 } = {}) {
6315
6317
  }
6316
6318
  //#endregion
6317
6319
  //#region src/hooks/useMouseLeave.ts
6318
- function ln(e, t, { isEnabled: n = !0 } = {}) {
6320
+ function cn(e, t, { isEnabled: n = !0 } = {}) {
6319
6321
  let r = Z(t);
6320
6322
  u(() => {
6321
6323
  if (!n) return;
@@ -6332,7 +6334,7 @@ function ln(e, t, { isEnabled: n = !0 } = {}) {
6332
6334
  }
6333
6335
  //#endregion
6334
6336
  //#region src/hooks/useOS.ts
6335
- function un() {
6337
+ function ln() {
6336
6338
  let e = navigator.userAgent || navigator.vendor || window.opera;
6337
6339
  return d(() => {
6338
6340
  switch (!0) {
@@ -6347,13 +6349,33 @@ function un() {
6347
6349
  }
6348
6350
  //#endregion
6349
6351
  //#region src/hooks/usePrevious.ts
6350
- function dn(e, t) {
6352
+ function un(e, t) {
6351
6353
  let n = f(t);
6352
6354
  return u(() => {
6353
6355
  n.current = e;
6354
6356
  }, [e]), n.current;
6355
6357
  }
6356
6358
  //#endregion
6359
+ //#region src/hooks/useRightClick.ts
6360
+ function dn(e, t, n = {}) {
6361
+ let r = Z(typeof e == "function" ? e : typeof t == "function" ? t : () => {}), i = typeof e == "function" ? void 0 : e && "current" in e ? e.current : e, { isEnabled: a = !0 } = typeof t == "function" ? n : t ?? {}, o = typeof e == "function";
6362
+ l(() => {
6363
+ if (!a) return;
6364
+ let e = (e) => {
6365
+ e.preventDefault(), r.current?.();
6366
+ };
6367
+ return o ? (window.addEventListener("contextmenu", e), () => {
6368
+ window.removeEventListener("contextmenu", e);
6369
+ }) : (i?.addEventListener("contextmenu", e), () => {
6370
+ i?.removeEventListener("contextmenu", e);
6371
+ });
6372
+ }, [
6373
+ o,
6374
+ i,
6375
+ a
6376
+ ]);
6377
+ }
6378
+ //#endregion
6357
6379
  //#region src/hooks/useScrollPositionObserver.ts
6358
6380
  function fn(...e) {
6359
6381
  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 = Z(n), a = f(void 0), o = f(!1);
@@ -6677,8 +6699,8 @@ function Nn({ itemLength: e = NaN, itemPadding: t = 0, layout: n = "collection",
6677
6699
  process.env.NODE_ENV === "development" && (kn.displayName = "Collection", kn.Item.displayName = "Collection.Item");
6678
6700
  //#endregion
6679
6701
  //#region src/primitives/Accordion.tsx
6680
- function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderComponent: i, ItemComponent: a, orientation: o = "vertical", sectionPadding: s = 0, sections: c, selection: l, selectionMode: u = "single", shouldAutoCollapse: d = !1, onActivateAt: p, onCollapseSectionAt: m, onDeselectAt: h, onExpandedSectionsChange: g, onExpandSectionAt: _, onHeaderCustomEvent: v, onItemCustomEvent: y, onSelectAt: b, onSelectionChange: x, ...S }) {
6681
- let C = Ln(l ?? {}, c), T = In(r ?? [], c), E = zn({ orientation: o }), D = c.map(() => f(null)), k = D.map(yt), A = (e, t) => (C[t]?.indexOf(e) ?? -1) >= 0, M = (e) => T.indexOf(e) >= 0, N = (e) => {
6702
+ function Pn({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderComponent: i, ItemComponent: a, orientation: o = "vertical", sectionPadding: s = 0, sections: c, selection: l, selectionMode: u = "single", shouldAutoCollapse: d = !1, onActivateAt: p, onCollapseSectionAt: m, onDeselectAt: h, onExpandedSectionsChange: g, onExpandSectionAt: _, onHeaderCustomEvent: v, onItemCustomEvent: y, onSelectAt: b, onSelectionChange: x, ...S }) {
6703
+ let C = Rn(l ?? {}, c), T = Ln(r ?? [], c), E = Bn({ orientation: o }), D = c.map(() => f(null)), k = D.map(yt), A = (e, t) => (C[t]?.indexOf(e) ?? -1) >= 0, M = (e) => T.indexOf(e) >= 0, N = (e) => {
6682
6704
  let t;
6683
6705
  t = M(e) ? (t) => t.filter((t) => t !== e) : d ? (t) => [e] : (t) => [...t.filter((t) => t !== e), e], R(T, t(T));
6684
6706
  }, I = (e, t) => {
@@ -6688,7 +6710,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6688
6710
  case "multiple":
6689
6711
  n = (n) => ({
6690
6712
  ...n,
6691
- [t]: Rn([...(n[t] ?? []).filter((t) => t !== e), e])
6713
+ [t]: zn([...(n[t] ?? []).filter((t) => t !== e), e])
6692
6714
  });
6693
6715
  break;
6694
6716
  case "single":
@@ -6715,11 +6737,11 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6715
6737
  }
6716
6738
  r.forEach((e) => h?.(e[0], e[1])), i.forEach((e) => b?.(e[0], e[1])), x?.(t);
6717
6739
  }, B = j(n, {
6718
- collapseIcon: Q.CollapseIcon,
6719
- expandIcon: Q.ExpandIcon,
6720
- header: Q.Header,
6721
- item: Q.Item,
6722
- section: Q.Section
6740
+ collapseIcon: Pn.CollapseIcon,
6741
+ expandIcon: Pn.ExpandIcon,
6742
+ header: Pn.Header,
6743
+ item: Pn.Item,
6744
+ section: Pn.Section
6723
6745
  });
6724
6746
  return /* @__PURE__ */ (0, O.jsx)("div", {
6725
6747
  ref: e,
@@ -6737,7 +6759,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6737
6759
  marginLeft: t === 0 ? "0px" : `${s}px`,
6738
6760
  ...S.width > 0 ? { width: `${T}px` } : { visibility: "hidden" }
6739
6761
  }),
6740
- element: B.section ?? /* @__PURE__ */ (0, O.jsx)(Q.Section, {}),
6762
+ element: B.section ?? /* @__PURE__ */ (0, O.jsx)(Pn.Section, {}),
6741
6763
  children: [/* @__PURE__ */ (0, O.jsx)("div", {
6742
6764
  ref: D[t],
6743
6765
  style: F(E.headerContainer),
@@ -6761,7 +6783,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6761
6783
  }),
6762
6784
  style: F(E.header),
6763
6785
  "aria-expanded": !x,
6764
- element: B.header ?? /* @__PURE__ */ (0, O.jsx)(Q.Header, {}),
6786
+ element: B.header ?? /* @__PURE__ */ (0, O.jsx)(Pn.Header, {}),
6765
6787
  role: "button",
6766
6788
  onClick: () => N(t),
6767
6789
  children: [/* @__PURE__ */ (0, O.jsx)("span", { dangerouslySetInnerHTML: { __html: e.label } }), B.expandIcon && /* @__PURE__ */ (0, O.jsx)(P, {
@@ -6806,7 +6828,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6806
6828
  onCustomEvent: (e, n, r) => y?.(e, t, n, r),
6807
6829
  onDeselectAt: (e) => L(e, t),
6808
6830
  onSelectAt: (e) => I(e, t),
6809
- children: !a && (B.item ?? /* @__PURE__ */ (0, O.jsx)(Q.Item, {}))
6831
+ children: !a && (B.item ?? /* @__PURE__ */ (0, O.jsx)(Pn.Item, {}))
6810
6832
  })
6811
6833
  })]
6812
6834
  });
@@ -6828,29 +6850,29 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6828
6850
  ...t,
6829
6851
  children: e
6830
6852
  }), e.Item = kn.Item;
6831
- })(Q ||= {});
6832
- function Pn(e, t) {
6853
+ })(Pn ||= {});
6854
+ function Fn(e, t) {
6833
6855
  return e >= t.length || e < 0;
6834
6856
  }
6835
- function Fn(e, t, n) {
6836
- return !!(Pn(t, n) || e >= (n[t].items ?? []).length || e < 0);
6837
- }
6838
- function In(e, t) {
6839
- return Rn(e).filter((e) => !Pn(e, t));
6857
+ function In(e, t, n) {
6858
+ return !!(Fn(t, n) || e >= (n[t].items ?? []).length || e < 0);
6840
6859
  }
6841
6860
  function Ln(e, t) {
6861
+ return zn(e).filter((e) => !Fn(e, t));
6862
+ }
6863
+ function Rn(e, t) {
6842
6864
  let n = {};
6843
6865
  for (let r in t) {
6844
6866
  if (!Object.hasOwn(t, r)) continue;
6845
- let i = Rn([...e[r] ?? []]);
6846
- n[Number(r)] = Rn(i).filter((e) => !Fn(e, Number(r), t));
6867
+ let i = zn([...e[r] ?? []]);
6868
+ n[Number(r)] = zn(i).filter((e) => !In(e, Number(r), t));
6847
6869
  }
6848
6870
  return n;
6849
6871
  }
6850
- function Rn(e) {
6872
+ function zn(e) {
6851
6873
  return e.sort((e, t) => e - t);
6852
6874
  }
6853
- function zn({ orientation: e = "vertical" }) {
6875
+ function Bn({ orientation: e = "vertical" }) {
6854
6876
  return M({
6855
6877
  collapseIcon: {
6856
6878
  pointerEvents: "none",
@@ -6902,16 +6924,16 @@ function zn({ orientation: e = "vertical" }) {
6902
6924
  }
6903
6925
  });
6904
6926
  }
6905
- process.env.NODE_ENV === "development" && (Q.displayName = "Accordion", Q.Header.displayName = "Accordion.Header", Q.ExpandIcon.displayName = "Accordion.ExpandIcon", Q.CollapseIcon.displayName = "Accordion.CollapseIcon", Q.Item.displayName = "Accordion.Item");
6927
+ process.env.NODE_ENV === "development" && (Pn.displayName = "Accordion", Pn.Header.displayName = "Accordion.Header", Pn.ExpandIcon.displayName = "Accordion.ExpandIcon", Pn.CollapseIcon.displayName = "Accordion.CollapseIcon", Pn.Item.displayName = "Accordion.Item");
6906
6928
  //#endregion
6907
6929
  //#region src/primitives/Carousel.tsx
6908
- var Bn = .55, Vn = .05, Hn = .55, Un = .5, Wn = .02, Gn = 100, Kn = 1e3 / 60;
6909
- function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1, dragStartThreshold: a = 5, index: o = 0, orientation: s = "horizontal", overscrollResistance: c = .7, swipeLiftWindow: d = 100, swipeVelocityThreshold: m = .4, shouldTrackExposure: h = !1, onAutoAdvancePause: g, onAutoAdvanceResume: _, onIndexChange: v, ...y }) {
6910
- let b = f(null), x = f(null), S = f(0), C = f(0), w = f(0), T = f(0), E = f([]), D = f(0), k = f(0), A = f(0), M = f(0), N = f("idle"), I = f(null), L = f(!1), R = f(0), z = Z(g), B = Z(_), V = Z(v), [H, U] = p(), [W, ee] = p(!1), te = dn(W, W), G = j(r, {
6911
- content: qn.Content,
6912
- itemContainer: qn.ItemContainer,
6913
- viewport: qn.Viewport
6914
- }), ne = t.toArray(G.content?.props.children), re = ne.length, ie = Yn(o, re), { height: ae, width: oe } = yt(b), se = s === "horizontal" ? oe : ae, ce = -se * Math.max(0, re - 1), le = f(void 0);
6930
+ var Vn = .55, Hn = .05, Un = .55, Wn = .5, Gn = .02, Kn = 100, qn = 1e3 / 60;
6931
+ function Jn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1, dragStartThreshold: a = 5, index: o = 0, orientation: s = "horizontal", overscrollResistance: c = .7, swipeLiftWindow: d = 100, swipeVelocityThreshold: m = .4, shouldTrackExposure: h = !1, onAutoAdvancePause: g, onAutoAdvanceResume: _, onIndexChange: v, ...y }) {
6932
+ let b = f(null), x = f(null), S = f(0), C = f(0), w = f(0), T = f(0), E = f([]), D = f(0), k = f(0), A = f(0), M = f(0), N = f("idle"), I = f(null), L = f(!1), R = f(0), z = Z(g), B = Z(_), V = Z(v), [H, U] = p(), [W, ee] = p(!1), te = un(W, W), G = j(r, {
6933
+ content: Jn.Content,
6934
+ itemContainer: Jn.ItemContainer,
6935
+ viewport: Jn.Viewport
6936
+ }), ne = t.toArray(G.content?.props.children), re = ne.length, ie = Xn(o, re), { height: ae, width: oe } = yt(b), se = s === "horizontal" ? oe : ae, ce = -se * Math.max(0, re - 1), le = f(void 0);
6915
6937
  le.current = {
6916
6938
  dragSpeed: i,
6917
6939
  dragStartThreshold: a,
@@ -6935,19 +6957,19 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
6935
6957
  }, de = () => {
6936
6958
  let e = le.current;
6937
6959
  if (!e.shouldTrackExposure) return;
6938
- let t = Zn(S.current, e.viewportLength, e.itemCount);
6939
- U((e) => Xn(e, t) ? e : t);
6960
+ let t = Qn(S.current, e.viewportLength, e.itemCount);
6961
+ U((e) => Zn(e, t) ? e : t);
6940
6962
  }, fe = () => {
6941
6963
  T.current ||= requestAnimationFrame(me);
6942
6964
  }, pe = () => {
6943
6965
  T.current &&= (cancelAnimationFrame(T.current), 0);
6944
6966
  }, me = () => {
6945
- let { maxDisplacement: e, minDisplacement: t, orientation: n } = le.current, r = w.current, i = (r - S.current) * Vn;
6946
- if (C.current = C.current * Bn + i, S.current += C.current, (S.current > e || S.current < t) && (C.current *= Hn), Math.abs(C.current) < Wn && Math.abs(r - S.current) < Un) {
6947
- S.current = r, C.current = 0, T.current = 0, Jn(x.current, r, n), de();
6967
+ let { maxDisplacement: e, minDisplacement: t, orientation: n } = le.current, r = w.current, i = (r - S.current) * Hn;
6968
+ if (C.current = C.current * Vn + i, S.current += C.current, (S.current > e || S.current < t) && (C.current *= Un), Math.abs(C.current) < Gn && Math.abs(r - S.current) < Wn) {
6969
+ S.current = r, C.current = 0, T.current = 0, Yn(x.current, r, n), de();
6948
6970
  return;
6949
6971
  }
6950
- Jn(x.current, S.current, n), de(), T.current = requestAnimationFrame(me);
6972
+ Yn(x.current, S.current, n), de(), T.current = requestAnimationFrame(me);
6951
6973
  };
6952
6974
  return u(() => {
6953
6975
  let e = b.current;
@@ -6974,12 +6996,12 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
6974
6996
  }
6975
6997
  }
6976
6998
  let c = o === "horizontal" ? t.clientX : t.clientY, l = (c - k.current) * n;
6977
- S.current = Qn(D.current + l, a, i, s), Jn(x.current, S.current, o), de(), Math.abs(l) > r && (L.current = !0);
6999
+ S.current = $n(D.current + l, a, i, s), Yn(x.current, S.current, o), de(), Math.abs(l) > r && (L.current = !0);
6978
7000
  let u = performance.now(), d = E.current;
6979
7001
  for (d.push({
6980
7002
  p: c,
6981
7003
  t: u
6982
- }); d.length > 0 && u - d[0].t > Gn;) d.shift();
7004
+ }); d.length > 0 && u - d[0].t > Kn;) d.shift();
6983
7005
  }, r = (t) => {
6984
7006
  if (I.current !== t.pointerId) return;
6985
7007
  e.hasPointerCapture(t.pointerId) && e.releasePointerCapture(t.pointerId), I.current = null;
@@ -6993,8 +7015,8 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
6993
7015
  let e = l[0], t = l[l.length - 1], n = t.t - e.t;
6994
7016
  n > 0 && (d = (t.p - e.p) / n);
6995
7017
  }
6996
- let f = Yn((l.length > 0 ? u - l[l.length - 1].t : Infinity) <= o && Math.abs(d) > s ? a + (d < 0 ? 1 : -1) : c > 0 ? Math.round(-S.current / c) : a, i);
6997
- E.current = [], w.current = -c * f, C.current = d * r * Kn, fe(), ee(!1), f !== a && V.current?.(f);
7018
+ let f = Xn((l.length > 0 ? u - l[l.length - 1].t : Infinity) <= o && Math.abs(d) > s ? a + (d < 0 ? 1 : -1) : c > 0 ? Math.round(-S.current / c) : a, i);
7019
+ E.current = [], w.current = -c * f, C.current = d * r * qn, fe(), ee(!1), f !== a && V.current?.(f);
6998
7020
  }, i = (e) => {
6999
7021
  let t = N.current;
7000
7022
  (t === "pending" || t === "axis") && e.cancelable && e.preventDefault();
@@ -7005,7 +7027,7 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
7005
7027
  }, []), u(() => {
7006
7028
  if (W || se <= 0) return;
7007
7029
  let e = -se * ie, t = R.current !== se;
7008
- R.current = se, w.current = e, t ? (pe(), S.current = e, C.current = 0, Jn(x.current, e, s), de()) : (S.current !== e || C.current !== 0) && fe();
7030
+ R.current = se, w.current = e, t ? (pe(), S.current = e, C.current = 0, Yn(x.current, e, s), de()) : (S.current !== e || C.current !== 0) && fe();
7009
7031
  }, [
7010
7032
  ie,
7011
7033
  se,
@@ -7027,30 +7049,30 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
7027
7049
  onClick: ue,
7028
7050
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7029
7051
  ref: b,
7030
- style: F($n.viewport, {
7052
+ style: F(er.viewport, {
7031
7053
  cursor: W ? "grabbing" : "grab",
7032
7054
  touchAction: re > 1 ? s === "horizontal" ? "pan-y" : "pan-x" : "auto"
7033
7055
  }),
7034
- element: G.viewport ?? /* @__PURE__ */ (0, O.jsx)(qn.Viewport, {}),
7056
+ element: G.viewport ?? /* @__PURE__ */ (0, O.jsx)(Jn.Viewport, {}),
7035
7057
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7036
7058
  ref: x,
7037
7059
  style: {
7038
- ...$n.content,
7060
+ ...er.content,
7039
7061
  flexDirection: s === "horizontal" ? "row" : "column"
7040
7062
  },
7041
- element: G.content ?? /* @__PURE__ */ (0, O.jsx)(qn.Content, {}),
7063
+ element: G.content ?? /* @__PURE__ */ (0, O.jsx)(Jn.Content, {}),
7042
7064
  children: ne.map((e, t) => {
7043
7065
  let n = e.key ?? t, r = H?.[t], i = t === ie;
7044
- return /* @__PURE__ */ (0, O.jsx)(qn.ItemContext, {
7066
+ return /* @__PURE__ */ (0, O.jsx)(Jn.ItemContext, {
7045
7067
  value: {
7046
7068
  exposure: r,
7047
7069
  index: t,
7048
7070
  isActive: i
7049
7071
  },
7050
7072
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7051
- style: F($n.itemContainer),
7073
+ style: F(er.itemContainer),
7052
7074
  "aria-hidden": !i,
7053
- element: G.itemContainer ?? /* @__PURE__ */ (0, O.jsx)(qn.ItemContainer, {}),
7075
+ element: G.itemContainer ?? /* @__PURE__ */ (0, O.jsx)(Jn.ItemContainer, {}),
7054
7076
  children: e
7055
7077
  })
7056
7078
  }, n);
@@ -7077,20 +7099,20 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
7077
7099
  return e;
7078
7100
  }
7079
7101
  e.useItem = n;
7080
- })(qn ||= {});
7081
- function Jn(e, t, n) {
7102
+ })(Jn ||= {});
7103
+ function Yn(e, t, n) {
7082
7104
  e && (n === "horizontal" ? e.style.transform = `translate3d(${t}px,0,0)` : e.style.transform = `translate3d(0,${t}px,0)`);
7083
7105
  }
7084
- function Yn(e, t) {
7106
+ function Xn(e, t) {
7085
7107
  return t <= 0 ? 0 : Math.max(0, Math.min(t - 1, e));
7086
7108
  }
7087
- function Xn(e, t) {
7109
+ function Zn(e, t) {
7088
7110
  if (e === t) return !0;
7089
7111
  if (!e || !t || e.length !== t.length) return !1;
7090
7112
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
7091
7113
  return !0;
7092
7114
  }
7093
- function Zn(e, t, n) {
7115
+ function Qn(e, t, n) {
7094
7116
  if (n <= 0) return [];
7095
7117
  if (t <= 0) return Array(n).fill(0);
7096
7118
  let r = [];
@@ -7100,11 +7122,11 @@ function Zn(e, t, n) {
7100
7122
  }
7101
7123
  return r;
7102
7124
  }
7103
- function Qn(e, t, n, r) {
7125
+ function $n(e, t, n, r) {
7104
7126
  let i = 1 - r;
7105
7127
  return e > n ? n + (e - n) * i : e < t ? t + (e - t) * i : e;
7106
7128
  }
7107
- var $n = M({
7129
+ var er = M({
7108
7130
  content: {
7109
7131
  alignItems: "center",
7110
7132
  display: "flex",
@@ -7129,15 +7151,15 @@ var $n = M({
7129
7151
  width: "100%"
7130
7152
  }
7131
7153
  });
7132
- process.env.NODE_ENV === "development" && (qn.displayName = "Carousel", qn.Viewport.displayName = "Carousel.Viewport", qn.Content.displayName = "Carousel.Content", qn.ItemContainer.displayName = "Carousel.ItemContainer");
7154
+ process.env.NODE_ENV === "development" && (Jn.displayName = "Carousel", Jn.Viewport.displayName = "Carousel.Viewport", Jn.Content.displayName = "Carousel.Content", Jn.ItemContainer.displayName = "Carousel.ItemContainer");
7133
7155
  //#endregion
7134
7156
  //#region src/primitives/CodeInput.tsx
7135
- function er({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r = !1, children: i, inputMode: a = "numeric", placeholder: o, size: s, value: c, isDisabled: u = !1, isRequired: d = !0, onChange: p, ...m }) {
7136
- let h = nr(c, s), g = f([]), _ = tr(), v = j(i, { field: er.Field }), y = (e) => {
7157
+ function tr({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r = !1, children: i, inputMode: a = "numeric", placeholder: o, size: s, value: c, isDisabled: u = !1, isRequired: d = !0, onChange: p, ...m }) {
7158
+ let h = rr(c, s), g = f([]), _ = nr(), v = j(i, { field: tr.Field }), y = (e) => {
7137
7159
  e < 0 ? g.current[0]?.focus() : e >= s ? g.current[s - 1]?.focus() : g.current[e]?.focus();
7138
7160
  }, b = (e) => (t) => {
7139
- let n = h[e], r = ir(t.target.value, n);
7140
- p(rr(h.slice(), r.split("").slice(0, s), e)), y(Math.min(e + r.length, s - 1));
7161
+ let n = h[e], r = ar(t.target.value, n);
7162
+ p(ir(h.slice(), r.split("").slice(0, s), e)), y(Math.min(e + r.length, s - 1));
7141
7163
  }, x = (e) => (t) => {
7142
7164
  switch (t.key) {
7143
7165
  case "ArrowLeft":
@@ -7157,7 +7179,7 @@ function er({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7157
7179
  }, S = (e) => (t) => {
7158
7180
  t.preventDefault();
7159
7181
  let n = t.clipboardData.getData("text").trim();
7160
- p(rr(h.slice(), n.split("").slice(0, s), e)), y(Math.min(e + n.length, s - 1));
7182
+ p(ir(h.slice(), n.split("").slice(0, s), e)), y(Math.min(e + n.length, s - 1));
7161
7183
  };
7162
7184
  return l(() => {
7163
7185
  if (!r) return;
@@ -7176,7 +7198,7 @@ function er({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7176
7198
  "aria-required": d,
7177
7199
  autoComplete: n,
7178
7200
  disabled: u,
7179
- element: v.field ?? /* @__PURE__ */ (0, O.jsx)(er.Field, {}),
7201
+ element: v.field ?? /* @__PURE__ */ (0, O.jsx)(tr.Field, {}),
7180
7202
  inputMode: a,
7181
7203
  placeholder: o,
7182
7204
  required: d,
@@ -7195,8 +7217,8 @@ function er({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7195
7217
  autoCorrect: "off",
7196
7218
  type: "text"
7197
7219
  });
7198
- })(er ||= {});
7199
- function tr() {
7220
+ })(tr ||= {});
7221
+ function nr() {
7200
7222
  return M({
7201
7223
  field: {
7202
7224
  caretColor: "transparent",
@@ -7210,24 +7232,24 @@ function tr() {
7210
7232
  }
7211
7233
  });
7212
7234
  }
7213
- function nr(e, t) {
7235
+ function rr(e, t) {
7214
7236
  let n = e.slice(0, t);
7215
7237
  for (; n.length < t;) n.push("");
7216
7238
  return n;
7217
7239
  }
7218
- function rr(e, t, n = 0) {
7240
+ function ir(e, t, n = 0) {
7219
7241
  let r = n, i = 0;
7220
7242
  for (; i < t.length && r < e.length;) e[r] = t[i], r++, i++;
7221
7243
  for (; i < t.length;) e.shift(), e.push(t[i]), i++;
7222
7244
  return e;
7223
7245
  }
7224
- function ir(e, t) {
7246
+ function ar(e, t) {
7225
7247
  return t === "" ? e : e.startsWith(t) ? e.slice(t.length) : e.endsWith(t) ? e.slice(0, -t.length) : e;
7226
7248
  }
7227
- process.env.NODE_ENV === "development" && (er.displayName = "CodeInput", er.Field.displayName = "CodeInput.Field");
7249
+ process.env.NODE_ENV === "development" && (tr.displayName = "CodeInput", tr.Field.displayName = "CodeInput.Field");
7228
7250
  //#endregion
7229
7251
  //#region src/primitives/TextField.tsx
7230
- function ar({ className: e, ref: t, emptyValue: n = "", formatter: r, placeholder: i, type: a = "text", value: o, isDisabled: s = !1, isRequired: l = !1, onChange: u, onFocus: d, onUnfocus: f, ...p }) {
7252
+ function or({ className: e, ref: t, emptyValue: n = "", formatter: r, placeholder: i, type: a = "text", value: o, isDisabled: s = !1, isRequired: l = !1, onChange: u, onFocus: d, onUnfocus: f, ...p }) {
7231
7253
  let m = c((e) => {
7232
7254
  let t = (r?.(e) ?? e) || n;
7233
7255
  u?.(t);
@@ -7249,10 +7271,10 @@ function ar({ className: e, ref: t, emptyValue: n = "", formatter: r, placeholde
7249
7271
  onFocus: ({ target: e }) => d?.(e.value)
7250
7272
  });
7251
7273
  }
7252
- process.env.NODE_ENV === "development" && (ar.displayName = "TextField");
7274
+ process.env.NODE_ENV === "development" && (or.displayName = "TextField");
7253
7275
  //#endregion
7254
7276
  //#region src/primitives/Counter.tsx
7255
- function or({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN, min: a = NaN, quantity: o = 0, onChange: s, ...c }) {
7277
+ function sr({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN, min: a = NaN, quantity: o = 0, onChange: s, ...c }) {
7256
7278
  let u = () => {
7257
7279
  s?.(_(o - 1));
7258
7280
  }, d = () => {
@@ -7268,7 +7290,7 @@ function or({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7268
7290
  }, _ = (e) => {
7269
7291
  let t = e;
7270
7292
  return isNaN(a) || (t = Math.max(a, t)), isNaN(i) || (t = Math.min(i, t)), t;
7271
- }, [v, y] = p(h(o)), b = dn(o), x = !isNaN(i) && o + 1 > i, S = !isNaN(a) && o - 1 < a;
7293
+ }, [v, y] = p(h(o)), b = un(o), x = !isNaN(i) && o + 1 > i, S = !isNaN(a) && o - 1 < a;
7272
7294
  l(() => {
7273
7295
  b === void 0 || b === o || y(h(_(o)));
7274
7296
  }, [
@@ -7277,24 +7299,24 @@ function or({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7277
7299
  i
7278
7300
  ]);
7279
7301
  let C = j(r, {
7280
- addButton: or.AddButton,
7281
- subscribeButton: or.SubtractButton,
7282
- textField: or.TextField
7302
+ addButton: sr.AddButton,
7303
+ subscribeButton: sr.SubtractButton,
7304
+ textField: sr.TextField
7283
7305
  });
7284
7306
  return /* @__PURE__ */ (0, O.jsxs)("div", {
7285
7307
  ...c,
7286
7308
  ref: e,
7287
- style: F(t, sr.root),
7309
+ style: F(t, cr.root),
7288
7310
  children: [
7289
7311
  /* @__PURE__ */ (0, O.jsx)(P, {
7290
7312
  className: w({ disabled: S }),
7291
- style: F(sr.subtract),
7292
- element: C.subscribeButton ?? /* @__PURE__ */ (0, O.jsx)(or.SubtractButton, {}),
7313
+ style: F(cr.subtract),
7314
+ element: C.subscribeButton ?? /* @__PURE__ */ (0, O.jsx)(sr.SubtractButton, {}),
7293
7315
  onClick: () => u()
7294
7316
  }),
7295
7317
  /* @__PURE__ */ (0, O.jsx)(P, {
7296
- style: F(sr.textField),
7297
- element: C.textField ?? /* @__PURE__ */ (0, O.jsx)(or.TextField, {}),
7318
+ style: F(cr.textField),
7319
+ element: C.textField ?? /* @__PURE__ */ (0, O.jsx)(sr.TextField, {}),
7298
7320
  value: v,
7299
7321
  isDisabled: !n,
7300
7322
  onChange: f,
@@ -7302,23 +7324,23 @@ function or({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7302
7324
  }),
7303
7325
  /* @__PURE__ */ (0, O.jsx)(P, {
7304
7326
  className: w({ disabled: x }),
7305
- style: F(sr.add),
7306
- element: C.addButton ?? /* @__PURE__ */ (0, O.jsx)(or.AddButton, {}),
7327
+ style: F(cr.add),
7328
+ element: C.addButton ?? /* @__PURE__ */ (0, O.jsx)(sr.AddButton, {}),
7307
7329
  onClick: () => d()
7308
7330
  })
7309
7331
  ]
7310
7332
  });
7311
7333
  }
7312
7334
  (function(e) {
7313
- e.TextField = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)(ar, { ...e }), e.AddButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, O.jsx)("button", {
7335
+ e.TextField = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)(or, { ...e }), e.AddButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, O.jsx)("button", {
7314
7336
  ...t,
7315
7337
  children: e
7316
7338
  }), e.SubtractButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, O.jsx)("button", {
7317
7339
  ...t,
7318
7340
  children: e
7319
7341
  });
7320
- })(or ||= {});
7321
- var sr = M({
7342
+ })(sr ||= {});
7343
+ var cr = M({
7322
7344
  add: { flex: "0 0 auto" },
7323
7345
  root: {
7324
7346
  alignItems: "stretch",
@@ -7329,14 +7351,14 @@ var sr = M({
7329
7351
  subtract: { flex: "0 0 auto" },
7330
7352
  textField: { width: "100%" }
7331
7353
  });
7332
- process.env.NODE_ENV === "development" && (or.displayName = "Counter", or.AddButton.displayName = "Counter.AddButton", or.SubtractButton.displayName = "Counter.SubtractButton", or.TextField.displayName = "Counter.TextField");
7354
+ process.env.NODE_ENV === "development" && (sr.displayName = "Counter", sr.AddButton.displayName = "Counter.AddButton", sr.SubtractButton.displayName = "Counter.SubtractButton", sr.TextField.displayName = "Counter.TextField");
7333
7355
  //#endregion
7334
7356
  //#region src/primitives/Dial.tsx
7335
- function cr({ 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 }) {
7357
+ function lr({ 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 }) {
7336
7358
  let u = o * 2, d = Math.max(0, Math.min(360, i)), f = j(r, {
7337
- knob: cr.Knob,
7338
- track: cr.Track
7339
- }), p = dr({
7359
+ knob: lr.Knob,
7360
+ track: lr.Track
7361
+ }), p = fr({
7340
7362
  angle: n,
7341
7363
  diameter: u
7342
7364
  });
@@ -7354,7 +7376,7 @@ function cr({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7354
7376
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7355
7377
  cx: o,
7356
7378
  cy: o,
7357
- element: f.track ?? /* @__PURE__ */ (0, O.jsx)(cr.Track, {}),
7379
+ element: f.track ?? /* @__PURE__ */ (0, O.jsx)(lr.Track, {}),
7358
7380
  fill: "none",
7359
7381
  r: o - c / 2,
7360
7382
  strokeDasharray: s,
@@ -7368,8 +7390,8 @@ function cr({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7368
7390
  viewBox: `0 0 ${u} ${u}`,
7369
7391
  xmlns: "http://www.w3.org/2000/svg",
7370
7392
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7371
- d: ur(o, o, o - a / 2 - (c - a) / 2, -d / 2, d / 2),
7372
- element: f.knob ?? /* @__PURE__ */ (0, O.jsx)(cr.Knob, {}),
7393
+ d: dr(o, o, o - a / 2 - (c - a) / 2, -d / 2, d / 2),
7394
+ element: f.knob ?? /* @__PURE__ */ (0, O.jsx)(lr.Knob, {}),
7373
7395
  fill: "none",
7374
7396
  strokeWidth: a
7375
7397
  })
@@ -7379,16 +7401,16 @@ function cr({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7379
7401
  }
7380
7402
  (function(e) {
7381
7403
  e.Track = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("circle", { ...e }), e.Knob = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("path", { ...e });
7382
- })(cr ||= {});
7383
- function lr(e, t, n, r) {
7404
+ })(lr ||= {});
7405
+ function ur(e, t, n, r) {
7384
7406
  let i = (r - 90) * Math.PI / 180;
7385
7407
  return {
7386
7408
  x: e + n * Math.cos(i),
7387
7409
  y: t + n * Math.sin(i)
7388
7410
  };
7389
7411
  }
7390
- function ur(e, t, n, r, i) {
7391
- let a = lr(e, t, n, i), o = lr(e, t, n, r), s = i - r <= 180 ? "0" : "1";
7412
+ function dr(e, t, n, r, i) {
7413
+ let a = ur(e, t, n, i), o = ur(e, t, n, r), s = i - r <= 180 ? "0" : "1";
7392
7414
  return [
7393
7415
  "M",
7394
7416
  a.x,
@@ -7403,7 +7425,7 @@ function ur(e, t, n, r, i) {
7403
7425
  o.y
7404
7426
  ].join(" ");
7405
7427
  }
7406
- function dr({ angle: e = 0, diameter: t = 0 }) {
7428
+ function fr({ angle: e = 0, diameter: t = 0 }) {
7407
7429
  return M({
7408
7430
  knobContainer: {
7409
7431
  backgroundPosition: "center",
@@ -7437,11 +7459,11 @@ function dr({ angle: e = 0, diameter: t = 0 }) {
7437
7459
  }
7438
7460
  });
7439
7461
  }
7440
- process.env.NODE_ENV === "development" && (cr.displayName = "Dial", cr.Track.displayName = "Dial.Track", cr.Knob.displayName = "Dial.Knob");
7462
+ process.env.NODE_ENV === "development" && (lr.displayName = "Dial", lr.Track.displayName = "Dial.Track", lr.Knob.displayName = "Dial.Knob");
7441
7463
  //#endregion
7442
7464
  //#region src/primitives/Dropdown.tsx
7443
- function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i = 0, ItemComponent: a, itemLength: o, itemPadding: s = 0, items: c = [], label: u, layout: d = "list", maxVisibleItems: m = -1, numSegments: h = 1, orientation: g = "vertical", selection: _ = [], selectionMode: v = "single", ToggleComponent: y, isCollapsed: b, isInverted: x = !1, isSelectionTogglable: S = !1, shouldCollapseOnSelect: C = !0, onActivateAt: T, onCollapse: E, onDeselectAt: D, onExpand: k, onSelectAt: A, onSelectionChange: M, onToggleCustomEvent: N, ...I }) {
7444
- let L = f(null), R = Ze(L), z = c.length, B = gr(c, m, h, d), V = o ?? (g === "vertical" ? R.height : R.width), H = V * B + s * (B - 1), U = mr(_, c), [W, ee] = p(b ?? !0), te = _r({
7465
+ function pr({ className: e, ref: t, style: n, children: r, collectionPadding: i = 0, ItemComponent: a, itemLength: o, itemPadding: s = 0, items: c = [], label: u, layout: d = "list", maxVisibleItems: m = -1, numSegments: h = 1, orientation: g = "vertical", selection: _ = [], selectionMode: v = "single", ToggleComponent: y, isCollapsed: b, isInverted: x = !1, isSelectionTogglable: S = !1, shouldCollapseOnSelect: C = !0, onActivateAt: T, onCollapse: E, onDeselectAt: D, onExpand: k, onSelectAt: A, onSelectionChange: M, onToggleCustomEvent: N, ...I }) {
7466
+ let L = f(null), R = Ze(L), z = c.length, B = _r(c, m, h, d), V = o ?? (g === "vertical" ? R.height : R.width), H = V * B + s * (B - 1), U = hr(_, c), [W, ee] = p(b ?? !0), te = vr({
7445
7467
  collectionPadding: i,
7446
7468
  maxVisibleItems: m,
7447
7469
  menuLength: H,
@@ -7450,11 +7472,11 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7450
7472
  isCollapsed: W,
7451
7473
  isInverted: x
7452
7474
  }), G = j(r, {
7453
- collapseIcon: fr.CollapseIcon,
7454
- collection: fr.Collection,
7455
- expandIcon: fr.ExpandIcon,
7456
- item: fr.Item,
7457
- toggle: fr.Toggle
7475
+ collapseIcon: pr.CollapseIcon,
7476
+ collection: pr.Collection,
7477
+ expandIcon: pr.ExpandIcon,
7478
+ item: pr.Item,
7479
+ toggle: pr.Toggle
7458
7480
  }), ne = () => {
7459
7481
  W && (ee(!1), k?.());
7460
7482
  }, re = () => {
@@ -7512,7 +7534,7 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7512
7534
  style: F(te.toggle),
7513
7535
  "aria-expanded": !W,
7514
7536
  "aria-haspopup": "listbox",
7515
- element: G.toggle ?? /* @__PURE__ */ (0, O.jsx)(fr.Toggle, {}),
7537
+ element: G.toggle ?? /* @__PURE__ */ (0, O.jsx)(pr.Toggle, {}),
7516
7538
  onClick: ie,
7517
7539
  children: [/* @__PURE__ */ (0, O.jsx)("span", { dangerouslySetInnerHTML: { __html: u?.(U) ?? (U.length > 0 ? U.map((e) => c[e]).join(", ") : "") } }), G.expandIcon && /* @__PURE__ */ (0, O.jsx)(P, {
7518
7540
  className: w({
@@ -7524,7 +7546,7 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7524
7546
  })]
7525
7547
  }), /* @__PURE__ */ (0, O.jsx)(P, {
7526
7548
  style: F(te.collection),
7527
- element: G.collection ?? /* @__PURE__ */ (0, O.jsx)(fr.Collection, {}),
7549
+ element: G.collection ?? /* @__PURE__ */ (0, O.jsx)(pr.Collection, {}),
7528
7550
  ItemComponent: a,
7529
7551
  itemLength: V,
7530
7552
  itemPadding: s,
@@ -7539,7 +7561,7 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7539
7561
  onDeselectAt: D,
7540
7562
  onSelectAt: ae,
7541
7563
  onSelectionChange: M,
7542
- children: !a && (G.item ?? /* @__PURE__ */ (0, O.jsx)(fr.Item, {}))
7564
+ children: !a && (G.item ?? /* @__PURE__ */ (0, O.jsx)(pr.Item, {}))
7543
7565
  }, g)]
7544
7566
  })
7545
7567
  });
@@ -7557,17 +7579,17 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7557
7579
  ...t,
7558
7580
  children: e
7559
7581
  });
7560
- })(fr ||= {});
7561
- function pr(e, t) {
7582
+ })(pr ||= {});
7583
+ function mr(e, t) {
7562
7584
  return !!(isNaN(e) || e >= t.length || e < 0);
7563
7585
  }
7564
- function mr(e, t) {
7565
- return hr(e).filter((e) => !pr(e, t));
7586
+ function hr(e, t) {
7587
+ return gr(e).filter((e) => !mr(e, t));
7566
7588
  }
7567
- function hr(e) {
7589
+ function gr(e) {
7568
7590
  return e.sort((e, t) => e - t);
7569
7591
  }
7570
- function gr(e, t, n, r) {
7592
+ function _r(e, t, n, r) {
7571
7593
  let i = e.length;
7572
7594
  switch (r) {
7573
7595
  case "grid": {
@@ -7577,7 +7599,7 @@ function gr(e, t, n, r) {
7577
7599
  default: return t < 0 ? i : Math.min(i, t);
7578
7600
  }
7579
7601
  }
7580
- function _r({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n = NaN, numItems: r = 0, orientation: i = "vertical", isCollapsed: a = !0, isInverted: o = !1 }) {
7602
+ function vr({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n = NaN, numItems: r = 0, orientation: i = "vertical", isCollapsed: a = !0, isInverted: o = !1 }) {
7581
7603
  return M({
7582
7604
  body: {
7583
7605
  height: "100%",
@@ -7636,10 +7658,10 @@ function _r({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n =
7636
7658
  }
7637
7659
  });
7638
7660
  }
7639
- process.env.NODE_ENV === "development" && (fr.displayName = "Dropdown", fr.Collection.displayName = "Dropdown.Collection", fr.CollapseIcon.displayName = "Dropdown.CollapseIcon", fr.ExpandIcon.displayName = "Dropdown.ExpandIcon", fr.Item.displayName = "Dropdown.Item", fr.Toggle.displayName = "Dropdown.Toggle");
7661
+ process.env.NODE_ENV === "development" && (pr.displayName = "Dropdown", pr.Collection.displayName = "Dropdown.Collection", pr.CollapseIcon.displayName = "Dropdown.CollapseIcon", pr.ExpandIcon.displayName = "Dropdown.ExpandIcon", pr.Item.displayName = "Dropdown.Item", pr.Toggle.displayName = "Dropdown.Toggle");
7640
7662
  //#endregion
7641
7663
  //#region src/primitives/Form.tsx
7642
- function vr({ ref: e, onSubmit: t, ...n }) {
7664
+ function yr({ ref: e, onSubmit: t, ...n }) {
7643
7665
  return /* @__PURE__ */ (0, O.jsx)("form", {
7644
7666
  ...n,
7645
7667
  ref: e,
@@ -7648,11 +7670,11 @@ function vr({ ref: e, onSubmit: t, ...n }) {
7648
7670
  }
7649
7671
  });
7650
7672
  }
7651
- process.env.NODE_ENV !== "production" && (vr.displayName = "Form");
7673
+ process.env.NODE_ENV !== "production" && (yr.displayName = "Form");
7652
7674
  //#endregion
7653
7675
  //#region src/primitives/MasonryGrid.tsx
7654
- var yr = "base-";
7655
- function br({ className: e, ref: t, alignSections: n = !1, children: r, horizontalSpacing: i = 0, orientation: a = "vertical", sections: o = 3, verticalSpacing: s = 0, isReversed: u = !1, ...d }) {
7676
+ var br = "base-";
7677
+ function xr({ className: e, ref: t, alignSections: n = !1, children: r, horizontalSpacing: i = 0, orientation: a = "vertical", sections: o = 3, verticalSpacing: s = 0, isReversed: u = !1, ...d }) {
7656
7678
  let m = f(null), [h, g] = p(NaN), [_, v] = p(NaN), [y, b] = p(NaN), [x, S] = p(NaN), C = () => X.from(m.current).width, T = () => X.from(m.current).height, E = () => {
7657
7679
  let e = m.current;
7658
7680
  if (!e) return;
@@ -7665,29 +7687,29 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7665
7687
  let a = [...Array(r)].map(() => 0);
7666
7688
  for (let e of Array.from(t)) {
7667
7689
  if (!(e instanceof HTMLElement)) continue;
7668
- let t = Tr(e, o), [c, l] = Cr(a, t);
7690
+ let t = Er(e, o), [c, l] = wr(a, t);
7669
7691
  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 * c}% - ${i * (r - 1) / r * c}px + ${i * c}px)`, e.style.top = `${l + (l === 0 ? 0 : s)}px`;
7670
7692
  for (let n = 0; n < t; n++) a[c + n] = l + (l === 0 ? 0 : s) + X.from(e).height;
7671
7693
  if (n && c + t === r) {
7672
- let e = wr(a);
7694
+ let e = Tr(a);
7673
7695
  for (let t = 0; t < r; t++) a[t] = e;
7674
7696
  }
7675
7697
  }
7676
- let c = C(), l = wr(a, r);
7698
+ let c = C(), l = Tr(a, r);
7677
7699
  if (g(c), v(l), isNaN(l) || (e.style.height = `${l}px`), u) for (let e of Array.from(t)) e instanceof HTMLElement && (e.style.left = `calc(${c}px - ${e.style.left} - ${e.getBoundingClientRect().width}px)`);
7678
7700
  } else {
7679
7701
  let a = [...Array(r)].map(() => 0);
7680
7702
  for (let e of Array.from(t)) {
7681
7703
  if (!(e instanceof HTMLElement)) continue;
7682
- let t = Tr(e, o), [c, l] = Cr(a, t);
7704
+ let t = Er(e, o), [c, l] = wr(a, t);
7683
7705
  e.style.position = "absolute", e.style.width = "", e.style.height = `calc(${100 / r * t}% - ${s * (r - 1) / r * t}px + ${s * (t - 1)}px)`, e.style.top = `calc(${100 / r * c}% - ${s * (r - 1) / r * c}px + ${s * c}px)`, e.style.left = `${l + (l === 0 ? 0 : i)}px`;
7684
7706
  for (let n = 0; n < t; n++) a[c + n] = l + (l === 0 ? 0 : i) + X.from(e).width;
7685
7707
  if (n && c + t === r) {
7686
- let e = wr(a);
7708
+ let e = Tr(a);
7687
7709
  for (let t = 0; t < r; t++) a[t] = e;
7688
7710
  }
7689
7711
  }
7690
- let c = T(), l = wr(a, r);
7712
+ let c = T(), l = Tr(a, r);
7691
7713
  if (v(c), g(l), isNaN(l) || (e.style.width = `${l}px`), u) for (let e of Array.from(t)) e instanceof HTMLElement && (e.style.top = `calc(${c}px - ${e.style.top} - ${e.getBoundingClientRect().height}px)`);
7692
7714
  }
7693
7715
  };
@@ -7702,7 +7724,7 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7702
7724
  s,
7703
7725
  a
7704
7726
  ])), l(() => {
7705
- let e = Er(m.current?.innerHTML);
7727
+ let e = Dr(m.current?.innerHTML);
7706
7728
  if (e.length === 0) return E();
7707
7729
  let t = e.length;
7708
7730
  for (let n = 0; n < t; n++) {
@@ -7710,7 +7732,7 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7710
7732
  r.src = t, r.onload = () => E();
7711
7733
  }
7712
7734
  }, [r]);
7713
- let D = xr({ orientation: a }), k = Sr({
7735
+ let D = Sr({ orientation: a }), k = Cr({
7714
7736
  minHeight: _,
7715
7737
  minWidth: h,
7716
7738
  orientation: a
@@ -7727,10 +7749,10 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7727
7749
  })
7728
7750
  });
7729
7751
  }
7730
- function xr({ orientation: e = "horizontal" }) {
7752
+ function Sr({ orientation: e = "horizontal" }) {
7731
7753
  return A({ root: w(e) });
7732
7754
  }
7733
- function Sr({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizontal" }) {
7755
+ function Cr({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizontal" }) {
7734
7756
  return M({ body: {
7735
7757
  height: n === "horizontal" ? "100%" : "auto",
7736
7758
  minHeight: n === "vertical" && !isNaN(e) ? `${e}px` : "",
@@ -7739,28 +7761,28 @@ function Sr({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizonta
7739
7761
  width: n === "horizontal" ? "auto" : "100%"
7740
7762
  } });
7741
7763
  }
7742
- function Cr(e, t) {
7764
+ function wr(e, t) {
7743
7765
  let n = e.length, r = NaN, i = Infinity;
7744
7766
  for (let a = 0; a < n; a++) {
7745
7767
  let o = e[a], s = o < i, c = a + t <= n, l = !0;
7746
7768
  for (let n = 1; n < t; n++) e[a + n] > o && (l = !1);
7747
7769
  s && c && l && (r = a, i = o);
7748
7770
  }
7749
- return isNaN(r) ? [0, wr(e, t)] : [r, i];
7771
+ return isNaN(r) ? [0, Tr(e, t)] : [r, i];
7750
7772
  }
7751
- function wr(e, t) {
7773
+ function Tr(e, t) {
7752
7774
  let n = e;
7753
7775
  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);
7754
7776
  }
7755
- function Tr(e, t) {
7777
+ function Er(e, t) {
7756
7778
  let n = e.classList;
7757
- for (let e of Array.from(n)) if (e.startsWith(yr)) {
7758
- let n = parseFloat(e.replace(yr, ""));
7779
+ for (let e of Array.from(n)) if (e.startsWith(br)) {
7780
+ let n = parseFloat(e.replace(br, ""));
7759
7781
  if (!isNaN(n)) return Math.min(Math.max(n, 1), t);
7760
7782
  }
7761
7783
  return 1;
7762
7784
  }
7763
- function Er(e) {
7785
+ function Dr(e) {
7764
7786
  if (!e) return [];
7765
7787
  let t = /<img.*?src=(["'])(.*?)\1/g, n = /<img.*?src=(["'])(.*?)\1/, r = t.exec(e) ?? [], i = [];
7766
7788
  for (let e of r) {
@@ -7769,11 +7791,11 @@ function Er(e) {
7769
7791
  }
7770
7792
  return i;
7771
7793
  }
7772
- process.env.NODE_ENV === "development" && (br.displayName = "MasonryGrid");
7794
+ process.env.NODE_ENV === "development" && (xr.displayName = "MasonryGrid");
7773
7795
  //#endregion
7774
7796
  //#region src/primitives/RangeSlider.tsx
7775
7797
  function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWidth: i = 40, max: a, min: o, orientation: s = "vertical", range: l = [o, a], steps: p = -1, isClipped: m = !1, formatLabel: h, onChange: g, onDragEnd: _, onDragStart: v, ...y }) {
7776
- let b = e ?? f(null), x = f(null), S = f(null), C = f(null), w = f(null), T = f(!1), E = f(!1), [D, k] = l, A = f(D), M = f(k), N = yt(x), I = d(() => Fr(o, a, p), [
7798
+ let b = e ?? f(null), x = f(null), S = f(null), C = f(null), w = f(null), T = f(!1), E = f(!1), [D, k] = l, A = f(D), M = f(k), N = yt(x), I = d(() => Ir(o, a, p), [
7777
7799
  o,
7778
7800
  a,
7779
7801
  p
@@ -7784,8 +7806,8 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7784
7806
  track: $.Track,
7785
7807
  trackHighlight: $.TrackHighlight
7786
7808
  }), R = c((e, t, r) => {
7787
- let c = s === "horizontal" ? t : r, l = Nr(o, o, a, s, N.width, N.height, i, n, m), u = Nr(M.current, o, a, s, N.width, N.height, i, n, m);
7788
- return jr(Ir(Nr(e, o, a, s, N.width, N.height, i, n, m) + c, u, l), o, a, s, N.width, N.height, i, n, m);
7809
+ let c = s === "horizontal" ? t : r, l = Pr(o, o, a, s, N.width, N.height, i, n, m), u = Pr(M.current, o, a, s, N.width, N.height, i, n, m);
7810
+ return Mr(Lr(Pr(e, o, a, s, N.width, N.height, i, n, m) + c, u, l), o, a, s, N.width, N.height, i, n, m);
7789
7811
  }, [
7790
7812
  i,
7791
7813
  n,
@@ -7796,8 +7818,8 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7796
7818
  N.width,
7797
7819
  N.height
7798
7820
  ]), z = c((e, t, r) => {
7799
- let c = s === "horizontal" ? t : r, l = Nr(A.current, o, a, s, N.width, N.height, i, n, m), u = Nr(a, o, a, s, N.width, N.height, i, n, m);
7800
- return jr(Ir(Nr(e, o, a, s, N.width, N.height, i, n, m) + c, u, l), o, a, s, N.width, N.height, i, n, m);
7821
+ let c = s === "horizontal" ? t : r, l = Pr(A.current, o, a, s, N.width, N.height, i, n, m), u = Pr(a, o, a, s, N.width, N.height, i, n, m);
7822
+ return Mr(Lr(Pr(e, o, a, s, N.width, N.height, i, n, m) + c, u, l), o, a, s, N.width, N.height, i, n, m);
7801
7823
  }, [
7802
7824
  i,
7803
7825
  n,
@@ -7808,7 +7830,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7808
7830
  N.width,
7809
7831
  N.height
7810
7832
  ]), B = c(([e, t]) => {
7811
- let r = S.current, c = C.current, l = w.current, u = Or(e, o, a), d = `${u * 100}%`, f = Or(t, o, a), p = `${f * 100}%`;
7833
+ let r = S.current, c = C.current, l = w.current, u = kr(e, o, a), d = `${u * 100}%`, f = kr(t, o, a), p = `${f * 100}%`;
7812
7834
  s === "horizontal" ? (r && (r.style.left = m ? `calc(${d} + ${i * .5 - u * i}px)` : d), c && (c.style.left = m ? `calc(${p} + ${i * .5 - f * i}px)` : p), l && (l.style.left = d, l.style.width = `${(f - u) * 100}%`)) : (r && (r.style.top = m ? `calc(${d} + ${n * .5 - u * n}px)` : d), c && (c.style.top = m ? `calc(${p} + ${n * .5 - f * n}px)` : p), l && (l.style.top = d, l.style.height = `${(f - u) * 100}%`));
7813
7835
  }, [
7814
7836
  m,
@@ -7824,7 +7846,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7824
7846
  vt(S, {
7825
7847
  onDragEnd: () => {
7826
7848
  V(S.current, !1);
7827
- let e = I ? Pr(A.current, I) : A.current;
7849
+ let e = I ? Fr(A.current, I) : A.current;
7828
7850
  A.current = e, T.current = !1, b.current?.classList.remove("dragging"), S.current?.classList.remove("dragging"), C.current?.classList.remove("dragging"), g?.([e, M.current], !1), _?.();
7829
7851
  },
7830
7852
  onDragMove: ({ x: e, y: t }) => {
@@ -7837,7 +7859,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7837
7859
  }), vt(C, {
7838
7860
  onDragEnd: () => {
7839
7861
  V(C.current, !1);
7840
- let e = I ? Pr(M.current, I) : M.current;
7862
+ let e = I ? Fr(M.current, I) : M.current;
7841
7863
  M.current = e, E.current = !1, b.current?.classList.remove("dragging"), S.current?.classList.remove("dragging"), C.current?.classList.remove("dragging"), g?.([A.current, e], !1), _?.();
7842
7864
  },
7843
7865
  onDragMove: ({ x: e, y: t }) => {
@@ -7854,7 +7876,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7854
7876
  k,
7855
7877
  B
7856
7878
  ]);
7857
- let H = d(() => Dr({
7879
+ let H = d(() => Or({
7858
7880
  knobHeight: n,
7859
7881
  knobPadding: r,
7860
7882
  knobWidth: i,
@@ -7923,7 +7945,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7923
7945
  (function(e) {
7924
7946
  e.Track = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.TrackHighlight = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.Knob = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e });
7925
7947
  })($ ||= {});
7926
- function Dr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "horizontal" }) {
7948
+ function Or({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "horizontal" }) {
7927
7949
  return M({
7928
7950
  body: {
7929
7951
  height: "100%",
@@ -7972,10 +7994,10 @@ function Dr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientati
7972
7994
  }
7973
7995
  });
7974
7996
  }
7975
- function Or(e, t, n) {
7997
+ function kr(e, t, n) {
7976
7998
  return (e - t) / (n - t);
7977
7999
  }
7978
- function kr(e, t, n, r, i, a, o) {
8000
+ function Ar(e, t, n, r, i, a, o) {
7979
8001
  switch (t) {
7980
8002
  case "horizontal": {
7981
8003
  let t = o ? n - i : n;
@@ -7988,23 +8010,23 @@ function kr(e, t, n, r, i, a, o) {
7988
8010
  default: return console.error(`[etudes::RangeSlider] Invalid orientation: ${t}`), NaN;
7989
8011
  }
7990
8012
  }
7991
- function Ar(e, t, n) {
8013
+ function jr(e, t, n) {
7992
8014
  return e * (n - t) + t;
7993
8015
  }
7994
- function jr(e, t, n, r, i, a, o, s, c) {
7995
- return Ar(kr(e, r, i, a, o, s, c), t, n);
8016
+ function Mr(e, t, n, r, i, a, o, s, c) {
8017
+ return jr(Ar(e, r, i, a, o, s, c), t, n);
7996
8018
  }
7997
- function Mr(e, t, n, r, i, a, o) {
8019
+ function Nr(e, t, n, r, i, a, o) {
7998
8020
  switch (t) {
7999
8021
  case "horizontal": return e * (o ? n - i : n) + (o ? i * .5 : 0);
8000
8022
  case "vertical": return e * (o ? r - a : r) + (o ? a * .5 : 0);
8001
8023
  default: return console.error(`[etudes::RangeSlider] Invalid orientation: ${t}`), NaN;
8002
8024
  }
8003
8025
  }
8004
- function Nr(e, t, n, r, i, a, o, s, c) {
8005
- return Mr(Or(e, t, n), r, i, a, o, s, c);
8026
+ function Pr(e, t, n, r, i, a, o, s, c) {
8027
+ return Nr(kr(e, t, n), r, i, a, o, s, c);
8006
8028
  }
8007
- function Pr(e, t) {
8029
+ function Fr(e, t) {
8008
8030
  let n = t.length, r = 0, i = Infinity;
8009
8031
  for (let a = 0; a < n; a++) {
8010
8032
  let n = t[a], o = Math.abs(e - n);
@@ -8012,21 +8034,21 @@ function Pr(e, t) {
8012
8034
  }
8013
8035
  return t[r];
8014
8036
  }
8015
- function Fr(e, t, n) {
8037
+ function Ir(e, t, n) {
8016
8038
  if (!(n < 0)) return [
8017
8039
  e,
8018
8040
  ...[...Array(n)].map((r, i) => e + (i + 1) * (t - e) / (1 + n)),
8019
8041
  t
8020
8042
  ];
8021
8043
  }
8022
- function Ir(e, t, n) {
8044
+ function Lr(e, t, n) {
8023
8045
  return Math.max(n, Math.min(t, e));
8024
8046
  }
8025
8047
  process.env.NODE_ENV === "development" && ($.displayName = "RangeSlider", $.Knob.displayName = "RangeSlider.Knob", $.Label.displayName = "RangeSlider.Label", $.Track.displayName = "RangeSlider.Track", $.TrackHighlight.displayName = "RangeSlider.TrackHighlight");
8026
8048
  //#endregion
8027
8049
  //#region src/primitives/ScrollableCarousel.tsx
8028
- function Lr({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0, ItemComponent: i, items: a = [], orientation: o = "horizontal", isDragEnabled: s = !0, shouldTrackExposure: l = !1, onAutoAdvancePause: d, onAutoAdvanceResume: m, onIndexChange: h, ...g }) {
8029
- let _ = f(void 0), v = f(null), y = f(void 0), b = f(void 0), x = f(void 0), S = 1e3, C = Z(d), w = Z(m), T = Z(h), E = f(K.zero), D = f(!1), k = f(!1), A = Qt(), [j, M] = p(zr(v, o)), [N, P] = p(!1), I = Vr({
8050
+ function Rr({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0, ItemComponent: i, items: a = [], orientation: o = "horizontal", isDragEnabled: s = !0, shouldTrackExposure: l = !1, onAutoAdvancePause: d, onAutoAdvanceResume: m, onIndexChange: h, ...g }) {
8051
+ let _ = f(void 0), v = f(null), y = f(void 0), b = f(void 0), x = f(void 0), S = 1e3, C = Z(d), w = Z(m), T = Z(h), E = f(K.zero), D = f(!1), k = f(!1), A = Qt(), [j, M] = p(Br(v, o)), [N, P] = p(!1), I = Hr({
8030
8052
  orientation: o,
8031
8053
  scrollSnapEnabled: A || !N
8032
8054
  }), L = t > 0, R = c(() => {
@@ -8036,9 +8058,9 @@ function Lr({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
8036
8058
  clearTimeout(x.current), x.current = void 0;
8037
8059
  }, S);
8038
8060
  }, [S, R]), B = c(() => {
8039
- Rr(v, r, o), z();
8061
+ zr(v, r, o), z();
8040
8062
  }, [r, o]), V = c(() => {
8041
- M(zr(v, o));
8063
+ M(Br(v, o));
8042
8064
  }, [o]), H = c((e) => {
8043
8065
  A || (y.current = K.make(e.clientX, e.clientY), P(!0));
8044
8066
  }, [A]), U = c((e) => {
@@ -8135,7 +8157,7 @@ function Lr({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
8135
8157
  })
8136
8158
  });
8137
8159
  }
8138
- function Rr(e, t, n) {
8160
+ function zr(e, t, n) {
8139
8161
  let r = e?.current;
8140
8162
  if (!r) return;
8141
8163
  let i = n === "horizontal" ? 0 : r.clientHeight * t, a = n === "horizontal" ? r.clientWidth * t : 0;
@@ -8145,14 +8167,14 @@ function Rr(e, t, n) {
8145
8167
  top: i
8146
8168
  });
8147
8169
  }
8148
- function zr(e, t) {
8170
+ function Br(e, t) {
8149
8171
  let n = e?.current;
8150
8172
  if (!n) return;
8151
8173
  let r = [];
8152
- for (let i = 0; i < n.children.length; i++) r.push(Br(i, e, t));
8174
+ for (let i = 0; i < n.children.length; i++) r.push(Vr(i, e, t));
8153
8175
  return r;
8154
8176
  }
8155
- function Br(e, t, n) {
8177
+ function Vr(e, t, n) {
8156
8178
  let r = t?.current, i = r?.children[e];
8157
8179
  if (!i) return 0;
8158
8180
  let a = X.intersecting(i, r);
@@ -8162,7 +8184,7 @@ function Br(e, t, n) {
8162
8184
  default: return console.error(`[etudes::ScrollableCarousel] Unsupported orientation: ${n}`), NaN;
8163
8185
  }
8164
8186
  }
8165
- function Vr({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
8187
+ function Hr({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
8166
8188
  return M({
8167
8189
  item: {
8168
8190
  height: "100%",
@@ -8198,40 +8220,40 @@ function Vr({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
8198
8220
  }
8199
8221
  });
8200
8222
  }
8201
- process.env.NODE_ENV === "development" && (Lr.displayName = "ScrollableCarousel");
8223
+ process.env.NODE_ENV === "development" && (Rr.displayName = "ScrollableCarousel");
8202
8224
  //#endregion
8203
8225
  //#region src/primitives/Select.tsx
8204
- function Hr({ id: e, ref: t, children: n, name: r, options: i, placeholder: a, value: o, isRequired: s = !1, formatValue: c = (e) => e, onChange: l, ...u }) {
8226
+ function Ur({ id: e, ref: t, children: n, name: r, options: i, placeholder: a, value: o, isRequired: s = !1, formatValue: c = (e) => e, onChange: l, ...u }) {
8205
8227
  let d = j(n, {
8206
- expandIcon: Hr.ExpandIcon,
8207
- option: Hr.Option,
8208
- toggle: Hr.Toggle
8228
+ expandIcon: Ur.ExpandIcon,
8229
+ option: Ur.Option,
8230
+ toggle: Ur.Toggle
8209
8231
  });
8210
8232
  return /* @__PURE__ */ (0, O.jsxs)("div", {
8211
8233
  ...u,
8212
8234
  ref: t,
8213
- style: Ur.root,
8235
+ style: Wr.root,
8214
8236
  children: [/* @__PURE__ */ (0, O.jsxs)(P, {
8215
- style: Ur.select,
8237
+ style: Wr.select,
8216
8238
  "aria-required": s ? "true" : void 0,
8217
- element: d.toggle ?? /* @__PURE__ */ (0, O.jsx)(Hr.Toggle, {}),
8239
+ element: d.toggle ?? /* @__PURE__ */ (0, O.jsx)(Ur.Toggle, {}),
8218
8240
  name: r,
8219
8241
  required: s,
8220
8242
  value: o,
8221
8243
  onChange: (e) => l?.(e.target.value),
8222
8244
  children: [a !== void 0 && /* @__PURE__ */ (0, O.jsx)(P, {
8223
8245
  disabled: !0,
8224
- element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Hr.Option, {}),
8246
+ element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Ur.Option, {}),
8225
8247
  hidden: !0,
8226
8248
  value: "",
8227
8249
  children: a
8228
8250
  }), i.map((e, t) => /* @__PURE__ */ (0, O.jsx)(P, {
8229
- element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Hr.Option, {}),
8251
+ element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Ur.Option, {}),
8230
8252
  value: e,
8231
8253
  children: c(e)
8232
8254
  }, `${t}-${e}`))]
8233
8255
  }), d.expandIcon && /* @__PURE__ */ (0, O.jsx)(P, {
8234
- style: Ur.expandIcon,
8256
+ style: Wr.expandIcon,
8235
8257
  element: d.expandIcon
8236
8258
  })]
8237
8259
  });
@@ -8246,8 +8268,8 @@ function Hr({ id: e, ref: t, children: n, name: r, options: i, placeholder: a, v
8246
8268
  ...t,
8247
8269
  children: e
8248
8270
  });
8249
- })(Hr ||= {});
8250
- var Ur = M({
8271
+ })(Ur ||= {});
8272
+ var Wr = M({
8251
8273
  expandIcon: {
8252
8274
  pointerEvents: "none",
8253
8275
  zIndex: 1
@@ -8269,20 +8291,20 @@ var Ur = M({
8269
8291
  width: "100%"
8270
8292
  }
8271
8293
  });
8272
- process.env.NODE_ENV === "development" && (Hr.displayName = "Select", Hr.ExpandIcon.displayName = "Select.ExpandIcon", Hr.Option.displayName = "Select.Option", Hr.Toggle.displayName = "Select.Toggle");
8294
+ process.env.NODE_ENV === "development" && (Ur.displayName = "Select", Ur.ExpandIcon.displayName = "Select.ExpandIcon", Ur.Option.displayName = "Select.Option", Ur.Toggle.displayName = "Select.Toggle");
8273
8295
  //#endregion
8274
8296
  //#region src/primitives/Slider.tsx
8275
- function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobWidth: i = 30, orientation: a = "vertical", position: o = 0, trackPadding: s = 0, isClipped: l = !1, isInverted: p = !1, isTrackInteractive: m = !0, formatLabel: h, onChange: g, onDragEnd: _, onDragStart: v, ...y }) {
8297
+ function Gr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobWidth: i = 30, orientation: a = "vertical", position: o = 0, trackPadding: s = 0, isClipped: l = !1, isInverted: p = !1, isTrackInteractive: m = !0, formatLabel: h, onChange: g, onDragEnd: _, onDragStart: v, ...y }) {
8276
8298
  let b = e ?? f(null), x = f(null), S = f(null), C = f(null), w = f(null), T = f(o), E = f(!1), D = Ze(x), k = c((e, t, r) => {
8277
- let o = qr(e, p);
8299
+ let o = Jr(e, p);
8278
8300
  switch (a) {
8279
8301
  case "horizontal": {
8280
8302
  let n = l ? D.width - i : D.width;
8281
- return n <= 0 ? e : Kr(Jr((o * n + t) / n), p);
8303
+ return n <= 0 ? e : qr(Yr((o * n + t) / n), p);
8282
8304
  }
8283
8305
  case "vertical": {
8284
8306
  let t = l ? D.height - n : D.height;
8285
- return t <= 0 ? e : Kr(Jr((o * t + r) / t), p);
8307
+ return t <= 0 ? e : qr(Yr((o * t + r) / t), p);
8286
8308
  }
8287
8309
  default: return console.error(`[etudes::Slider] Invalid orientation: ${a}`), NaN;
8288
8310
  }
@@ -8295,7 +8317,7 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8295
8317
  n,
8296
8318
  a
8297
8319
  ]), A = c((e) => {
8298
- let t = qr(e, p), r = S.current, o = C.current, c = w.current, u = (e) => `${s <= 0 ? 0 : e * .5}px - ${s}px`;
8320
+ let t = Jr(e, p), r = S.current, o = C.current, c = w.current, u = (e) => `${s <= 0 ? 0 : e * .5}px - ${s}px`;
8299
8321
  switch (a) {
8300
8322
  case "horizontal":
8301
8323
  r && (r.style.left = l ? `calc(${t * 100}% + ${i * .5 - t * i}px)` : `${t * 100}%`), o && (o.style.width = `calc(${t * 100}% - ${u(i)})`), c && (c.style.width = `calc(${(1 - t) * 100}% - ${u(i)})`);
@@ -8325,11 +8347,11 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8325
8347
  switch (a) {
8326
8348
  case "horizontal":
8327
8349
  if (D.width <= 0) return;
8328
- n = Kr((e.clientX + t.left - D.left) / D.width, p);
8350
+ n = qr((e.clientX + t.left - D.left) / D.width, p);
8329
8351
  break;
8330
8352
  case "vertical":
8331
8353
  if (D.height <= 0) return;
8332
- n = Kr((e.clientY + t.top - D.top) / D.height, p);
8354
+ n = qr((e.clientY + t.top - D.top) / D.height, p);
8333
8355
  break;
8334
8356
  default:
8335
8357
  console.error(`[etudes::Slider] Invalid orientation: ${a}`);
@@ -8359,7 +8381,7 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8359
8381
  }), u(() => {
8360
8382
  E.current || (T.current = o, A(o));
8361
8383
  }, [o, A]);
8362
- let I = p ? o === 0 : o === 1, L = p ? o === 1 : o === 0, R = d(() => Gr({
8384
+ let I = p ? o === 0 : o === 1, L = p ? o === 1 : o === 0, R = d(() => Kr({
8363
8385
  knobHeight: n,
8364
8386
  knobPadding: r,
8365
8387
  knobWidth: i,
@@ -8372,10 +8394,10 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8372
8394
  a,
8373
8395
  m
8374
8396
  ]), z = j(t, {
8375
- knob: Wr.Knob,
8376
- knobContainer: Wr.KnobContainer,
8377
- label: Wr.Label,
8378
- track: Wr.Track
8397
+ knob: Gr.Knob,
8398
+ knobContainer: Gr.KnobContainer,
8399
+ label: Gr.Label,
8400
+ track: Gr.Track
8379
8401
  });
8380
8402
  return /* @__PURE__ */ (0, O.jsx)("div", {
8381
8403
  ...y,
@@ -8394,7 +8416,7 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8394
8416
  ref: C,
8395
8417
  style: F(R.track, a === "vertical" ? { top: "0" } : { left: "0" }),
8396
8418
  "data-side": p ? "end" : "start",
8397
- element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Wr.Track, {}),
8419
+ element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Gr.Track, {}),
8398
8420
  onClick: N,
8399
8421
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: R.trackHitBox })
8400
8422
  }),
@@ -8402,20 +8424,20 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8402
8424
  ref: w,
8403
8425
  style: F(R.track, a === "vertical" ? { bottom: "0" } : { right: "0" }),
8404
8426
  "data-side": p ? "start" : "end",
8405
- element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Wr.Track, {}),
8427
+ element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Gr.Track, {}),
8406
8428
  onClick: N,
8407
8429
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: R.trackHitBox })
8408
8430
  }),
8409
8431
  /* @__PURE__ */ (0, O.jsx)(P, {
8410
8432
  ref: S,
8411
8433
  style: R.knobContainer,
8412
- element: z.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Wr.KnobContainer, {}),
8434
+ element: z.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Gr.KnobContainer, {}),
8413
8435
  children: /* @__PURE__ */ (0, O.jsxs)(P, {
8414
8436
  style: F(R.knob),
8415
- element: z.knob ?? /* @__PURE__ */ (0, O.jsx)(Wr.Knob, {}),
8437
+ element: z.knob ?? /* @__PURE__ */ (0, O.jsx)(Gr.Knob, {}),
8416
8438
  children: [/* @__PURE__ */ (0, O.jsx)("div", { style: R.knobHitBox }), h && /* @__PURE__ */ (0, O.jsx)(P, {
8417
8439
  style: F(R.label),
8418
- element: z.label ?? /* @__PURE__ */ (0, O.jsx)(Wr.Label, {}),
8440
+ element: z.label ?? /* @__PURE__ */ (0, O.jsx)(Gr.Label, {}),
8419
8441
  children: h(o)
8420
8442
  })]
8421
8443
  })
@@ -8426,8 +8448,8 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8426
8448
  }
8427
8449
  (function(e) {
8428
8450
  e.Track = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.Knob = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e });
8429
- })(Wr ||= {});
8430
- function Gr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "vertical", isTrackInteractive: i = !0 }) {
8451
+ })(Gr ||= {});
8452
+ function Kr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "vertical", isTrackInteractive: i = !0 }) {
8431
8453
  return M({
8432
8454
  body: {
8433
8455
  height: "100%",
@@ -8486,29 +8508,29 @@ function Gr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientati
8486
8508
  }
8487
8509
  });
8488
8510
  }
8489
- function Kr(e, t) {
8511
+ function qr(e, t) {
8490
8512
  return t ? 1 - e : e;
8491
8513
  }
8492
- function qr(e, t) {
8514
+ function Jr(e, t) {
8493
8515
  return t ? 1 - e : e;
8494
8516
  }
8495
- function Jr(e, t = 1, n = 0) {
8517
+ function Yr(e, t = 1, n = 0) {
8496
8518
  return Math.max(n, Math.min(t, e));
8497
8519
  }
8498
- process.env.NODE_ENV === "development" && (Wr.displayName = "Slider", Wr.Track.displayName = "Slider.Track", Wr.Knob.displayName = "Slider.Knob", Wr.KnobContainer.displayName = "Slider.KnobContainer", Wr.Label.displayName = "Slider.Label");
8520
+ process.env.NODE_ENV === "development" && (Gr.displayName = "Slider", Gr.Track.displayName = "Slider.Track", Gr.Knob.displayName = "Slider.Knob", Gr.KnobContainer.displayName = "Slider.KnobContainer", Gr.Label.displayName = "Slider.Label");
8499
8521
  //#endregion
8500
8522
  //#region src/primitives/StepSlider.tsx
8501
- function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding: i = 0, knobWidth: a = 30, orientation: o = "vertical", steps: s = Zr(10), trackPadding: l = 0, isClipped: p = !1, isInverted: m = !1, isTrackInteractive: h = !0, formatLabel: g, onDragEnd: _, onDragStart: v, onIndexChange: y, onPositionChange: b, ...x }) {
8502
- let S = e || f(null), C = f(null), w = f(null), T = f(null), E = f(null), D = f($r(n, s)), k = f(n), A = f(!1), M = Ze(C), N = c((e, t, n) => {
8503
- let i = ti(e, m);
8523
+ function Xr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding: i = 0, knobWidth: a = 30, orientation: o = "vertical", steps: s = Qr(10), trackPadding: l = 0, isClipped: p = !1, isInverted: m = !1, isTrackInteractive: h = !0, formatLabel: g, onDragEnd: _, onDragStart: v, onIndexChange: y, onPositionChange: b, ...x }) {
8524
+ let S = e || f(null), C = f(null), w = f(null), T = f(null), E = f(null), D = f(ei(n, s)), k = f(n), A = f(!1), M = Ze(C), N = c((e, t, n) => {
8525
+ let i = ni(e, m);
8504
8526
  switch (o) {
8505
8527
  case "horizontal": {
8506
8528
  let n = p ? M.width - a : M.width;
8507
- return n <= 0 ? e : ei(ni((i * n + t) / n), m);
8529
+ return n <= 0 ? e : ti(ri((i * n + t) / n), m);
8508
8530
  }
8509
8531
  case "vertical": {
8510
8532
  let t = p ? M.height - r : M.height;
8511
- return t <= 0 ? e : ei(ni((i * t + n) / t), m);
8533
+ return t <= 0 ? e : ti(ri((i * t + n) / t), m);
8512
8534
  }
8513
8535
  default: return console.error(`[etudes::StepSlider] Invalid orientation: ${o}`), NaN;
8514
8536
  }
@@ -8521,7 +8543,7 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8521
8543
  r,
8522
8544
  o
8523
8545
  ]), I = c((e) => {
8524
- let t = ti(e, m), n = w.current, i = T.current, s = E.current, c = (e) => `${l <= 0 ? 0 : e * .5}px - ${l}px`;
8546
+ let t = ni(e, m), n = w.current, i = T.current, s = E.current, c = (e) => `${l <= 0 ? 0 : e * .5}px - ${l}px`;
8525
8547
  switch (o) {
8526
8548
  case "horizontal":
8527
8549
  n && (n.style.left = p ? `calc(${t * 100}% + ${a * .5 - t * a}px)` : `${t * 100}%`), i && (i.style.width = `calc(${t * 100}% - ${c(a)})`), s && (s.style.width = `calc(${(1 - t) * 100}% - ${c(a)})`);
@@ -8551,19 +8573,19 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8551
8573
  switch (o) {
8552
8574
  case "horizontal":
8553
8575
  if (M.width <= 0) return;
8554
- n = ei((e.clientX + t.left - M.left) / M.width, m);
8576
+ n = ti((e.clientX + t.left - M.left) / M.width, m);
8555
8577
  break;
8556
8578
  case "vertical":
8557
8579
  if (M.height <= 0) return;
8558
- n = ei((e.clientY + t.top - M.top) / M.height, m);
8580
+ n = ti((e.clientY + t.top - M.top) / M.height, m);
8559
8581
  break;
8560
8582
  default:
8561
8583
  console.error(`[etudes::StepSlider] Invalid orientation: ${o}`);
8562
8584
  return;
8563
8585
  }
8564
- let r = Qr(n, s), i = r === k.current ? ni(n > D.current ? r + 1 : r - 1, s.length - 1) : r;
8586
+ let r = $r(n, s), i = r === k.current ? ri(n > D.current ? r + 1 : r - 1, s.length - 1) : r;
8565
8587
  if (i !== k.current) {
8566
- let e = $r(i, s);
8588
+ let e = ei(i, s);
8567
8589
  k.current = i, D.current = e, I(e), b?.(e, !1), y?.(i, !1);
8568
8590
  }
8569
8591
  }, [
@@ -8580,14 +8602,14 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8580
8602
  vt(w, {
8581
8603
  onDragEnd: () => {
8582
8604
  L(!1), A.current = !1, S.current?.classList.remove("dragging"), w.current?.classList.remove("dragging");
8583
- let e = Qr(D.current, s), t = $r(e, s);
8605
+ let e = $r(D.current, s), t = ei(e, s);
8584
8606
  D.current = t, k.current = e, I(t), b?.(t, !1), y?.(e, !1), _?.();
8585
8607
  },
8586
8608
  onDragMove: ({ x: e, y: t }) => {
8587
8609
  let n = N(D.current, e, t);
8588
8610
  if (n !== D.current) {
8589
8611
  D.current = n, I(n), b?.(n, !0);
8590
- let e = Qr(n, s);
8612
+ let e = $r(n, s);
8591
8613
  e !== k.current && (k.current = e, y?.(e, !0));
8592
8614
  }
8593
8615
  A.current = !0, S.current?.classList.add("dragging"), w.current?.classList.add("dragging");
@@ -8597,14 +8619,14 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8597
8619
  }
8598
8620
  }), u(() => {
8599
8621
  if (A.current) return;
8600
- let e = $r(n, s);
8622
+ let e = ei(n, s);
8601
8623
  k.current = n, D.current = e, I(e);
8602
8624
  }, [
8603
8625
  n,
8604
8626
  I,
8605
8627
  _t(s)
8606
8628
  ]);
8607
- let z = $r(n, s), B = m ? z === 0 : z === 1, V = m ? z === 1 : z === 0, H = d(() => Xr({
8629
+ let z = ei(n, s), B = m ? z === 0 : z === 1, V = m ? z === 1 : z === 0, H = d(() => Zr({
8608
8630
  knobHeight: r,
8609
8631
  knobPadding: i,
8610
8632
  knobWidth: a,
@@ -8617,10 +8639,10 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8617
8639
  o,
8618
8640
  h
8619
8641
  ]), U = j(t, {
8620
- knob: Yr.Knob,
8621
- knobContainer: Yr.KnobContainer,
8622
- label: Yr.Label,
8623
- track: Yr.Track
8642
+ knob: Xr.Knob,
8643
+ knobContainer: Xr.KnobContainer,
8644
+ label: Xr.Label,
8645
+ track: Xr.Track
8624
8646
  });
8625
8647
  return /* @__PURE__ */ (0, O.jsx)("div", {
8626
8648
  ...x,
@@ -8639,7 +8661,7 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8639
8661
  ref: T,
8640
8662
  style: F(H.track, o === "vertical" ? { top: "0" } : { left: "0" }),
8641
8663
  "data-side": m ? "end" : "start",
8642
- element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Yr.Track, {}),
8664
+ element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Xr.Track, {}),
8643
8665
  onClick: R,
8644
8666
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: H.trackHitBox })
8645
8667
  }),
@@ -8647,20 +8669,20 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8647
8669
  ref: E,
8648
8670
  style: F(H.track, o === "vertical" ? { bottom: "0" } : { right: "0" }),
8649
8671
  "data-side": m ? "start" : "end",
8650
- element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Yr.Track, {}),
8672
+ element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Xr.Track, {}),
8651
8673
  onClick: R,
8652
8674
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: H.trackHitBox })
8653
8675
  }),
8654
8676
  /* @__PURE__ */ (0, O.jsx)(P, {
8655
8677
  ref: w,
8656
8678
  style: F(H.knobContainer),
8657
- element: U.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Yr.KnobContainer, {}),
8679
+ element: U.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Xr.KnobContainer, {}),
8658
8680
  children: /* @__PURE__ */ (0, O.jsxs)(P, {
8659
8681
  style: F(H.knob),
8660
- element: U.knob ?? /* @__PURE__ */ (0, O.jsx)(Yr.Knob, {}),
8682
+ element: U.knob ?? /* @__PURE__ */ (0, O.jsx)(Xr.Knob, {}),
8661
8683
  children: [/* @__PURE__ */ (0, O.jsx)("div", { style: H.knobHitBox }), g && /* @__PURE__ */ (0, O.jsx)(P, {
8662
8684
  style: F(H.label),
8663
- element: U.label ?? /* @__PURE__ */ (0, O.jsx)(Yr.Label, {}),
8685
+ element: U.label ?? /* @__PURE__ */ (0, O.jsx)(Xr.Label, {}),
8664
8686
  children: g(z, n)
8665
8687
  })]
8666
8688
  })
@@ -8670,9 +8692,9 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8670
8692
  });
8671
8693
  }
8672
8694
  (function(e) {
8673
- e.Knob = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.Track = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.generateSteps = Zr;
8674
- })(Yr ||= {});
8675
- function Xr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "vertical", isTrackInteractive: i = !1 }) {
8695
+ e.Knob = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.KnobContainer = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("button", { ...e }), e.Label = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.Track = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)("div", { ...e }), e.generateSteps = Qr;
8696
+ })(Xr ||= {});
8697
+ function Zr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "vertical", isTrackInteractive: i = !1 }) {
8676
8698
  return M({
8677
8699
  body: {
8678
8700
  height: "100%",
@@ -8731,38 +8753,38 @@ function Xr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientati
8731
8753
  }
8732
8754
  });
8733
8755
  }
8734
- function Zr(e) {
8756
+ function Qr(e) {
8735
8757
  if (e <= 1) return console.error("[etudes::StepSlider] `length` value must be greater than or equal to 2"), [];
8736
8758
  if (Math.round(e) !== e) return console.error("[etudes::StepSlider] `length` value must be an integer"), [];
8737
8759
  let t = 1 / (e - 1);
8738
8760
  return Array(e).fill(null).map((e, n) => t * n);
8739
8761
  }
8740
- function Qr(e, t) {
8762
+ function $r(e, t) {
8741
8763
  let n = -1, r = NaN;
8742
8764
  for (let i = 0, a = t.length; i < a; i++) {
8743
- let a = $r(i, t);
8765
+ let a = ei(i, t);
8744
8766
  if (isNaN(a)) continue;
8745
8767
  let o = Math.abs(e - a);
8746
8768
  (isNaN(r) || o < r) && (r = o, n = i);
8747
8769
  }
8748
8770
  return n;
8749
8771
  }
8750
- function $r(e, t) {
8772
+ function ei(e, t) {
8751
8773
  return e >= t.length ? NaN : t[e];
8752
8774
  }
8753
- function ei(e, t) {
8775
+ function ti(e, t) {
8754
8776
  return t ? 1 - e : e;
8755
8777
  }
8756
- function ti(e, t) {
8778
+ function ni(e, t) {
8757
8779
  return t ? 1 - e : e;
8758
8780
  }
8759
- function ni(e, t = 1, n = 0) {
8781
+ function ri(e, t = 1, n = 0) {
8760
8782
  return Math.max(n, Math.min(t, e));
8761
8783
  }
8762
- process.env.NODE_ENV === "development" && (Yr.displayName = "StepSlider", Yr.Track.displayName = "StepSlider.Track", Yr.Knob.displayName = "StepSlider.Knob", Yr.KnobContainer.displayName = "StepSlider.KnobContainer", Yr.Label.displayName = "StepSlider.Label");
8784
+ process.env.NODE_ENV === "development" && (Xr.displayName = "StepSlider", Xr.Track.displayName = "StepSlider.Track", Xr.Knob.displayName = "StepSlider.Knob", Xr.KnobContainer.displayName = "StepSlider.KnobContainer", Xr.Label.displayName = "StepSlider.Label");
8763
8785
  //#endregion
8764
8786
  //#region src/primitives/SwipeRegion.tsx
8765
- function ri({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipeDown: i, onSwipeLeft: a, onSwipeRight: o, onSwipeUp: s, ...c }) {
8787
+ function ii({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipeDown: i, onSwipeLeft: a, onSwipeRight: o, onSwipeUp: s, ...c }) {
8766
8788
  let [l, u] = p(void 0), [d, f] = p(void 0), [m, h] = p(NaN), g = (e, t) => {
8767
8789
  if (isNaN(e) || isNaN(t)) return y();
8768
8790
  u(K.make(e, t));
@@ -8790,24 +8812,24 @@ function ri({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipe
8790
8812
  children: t
8791
8813
  });
8792
8814
  }
8793
- process.env.NODE_ENV === "development" && (ri.displayName = "SwipeRegion");
8815
+ process.env.NODE_ENV === "development" && (ii.displayName = "SwipeRegion");
8794
8816
  //#endregion
8795
8817
  //#region src/primitives/TextArea.tsx
8796
- function ii({ ref: e, onChange: t, ...n }) {
8818
+ function ai({ ref: e, onChange: t, ...n }) {
8797
8819
  return /* @__PURE__ */ (0, O.jsx)("textarea", {
8798
8820
  ...n,
8799
8821
  ref: e,
8800
8822
  onChange: (e) => t(e.target.value)
8801
8823
  });
8802
8824
  }
8803
- process.env.NODE_ENV === "development" && (ii.displayName = "TextArea");
8825
+ process.env.NODE_ENV === "development" && (ai.displayName = "TextArea");
8804
8826
  //#endregion
8805
8827
  //#region src/primitives/Toggle.tsx
8806
- function ai({ className: e, ref: t, style: n, children: r, orientation: i = "horizontal", isInverted: a = !1, isOn: o = !1, onChange: s, ...c }) {
8828
+ function oi({ className: e, ref: t, style: n, children: r, orientation: i = "horizontal", isInverted: a = !1, isOn: o = !1, onChange: s, ...c }) {
8807
8829
  let l = f(null), u = yt(l), d = j(r, {
8808
- knob: ai.Knob,
8809
- track: ai.Track
8810
- }), p = oi({ isOn: o }), m = si({
8830
+ knob: oi.Knob,
8831
+ track: oi.Track
8832
+ }), p = si({ isOn: o }), m = ci({
8811
8833
  knobSize: u,
8812
8834
  orientation: i,
8813
8835
  isInverted: a,
@@ -8826,7 +8848,7 @@ function ai({ className: e, ref: t, style: n, children: r, orientation: i = "hor
8826
8848
  }), /* @__PURE__ */ (0, O.jsx)(P, {
8827
8849
  className: p.track,
8828
8850
  style: m.track,
8829
- element: d.track ?? /* @__PURE__ */ (0, O.jsx)(ai.Track, {}),
8851
+ element: d.track ?? /* @__PURE__ */ (0, O.jsx)(oi.Track, {}),
8830
8852
  children: /* @__PURE__ */ (0, O.jsx)("div", {
8831
8853
  style: {
8832
8854
  height: "100%",
@@ -8837,7 +8859,7 @@ function ai({ className: e, ref: t, style: n, children: r, orientation: i = "hor
8837
8859
  className: p.knob,
8838
8860
  ref: l,
8839
8861
  style: m.knob,
8840
- element: d.knob ?? /* @__PURE__ */ (0, O.jsx)(ai.Knob, {})
8862
+ element: d.knob ?? /* @__PURE__ */ (0, O.jsx)(oi.Knob, {})
8841
8863
  })
8842
8864
  })
8843
8865
  })]
@@ -8851,15 +8873,15 @@ function ai({ className: e, ref: t, style: n, children: r, orientation: i = "hor
8851
8873
  ...t,
8852
8874
  children: e
8853
8875
  });
8854
- })(ai ||= {});
8855
- function oi({ isOn: e = !1 }) {
8876
+ })(oi ||= {});
8877
+ function si({ isOn: e = !1 }) {
8856
8878
  return A({
8857
8879
  knob: w({ active: e }),
8858
8880
  root: w({ active: e }),
8859
8881
  track: w({ active: e })
8860
8882
  });
8861
8883
  }
8862
- function si({ knobSize: e = q.zero, orientation: t = "horizontal", isInverted: n = !1, isOn: r = !1 }) {
8884
+ function ci({ knobSize: e = q.zero, orientation: t = "horizontal", isInverted: n = !1, isOn: r = !1 }) {
8863
8885
  return M({
8864
8886
  input: {
8865
8887
  height: 0,
@@ -8889,40 +8911,40 @@ function si({ knobSize: e = q.zero, orientation: t = "horizontal", isInverted: n
8889
8911
  track: { position: "relative" }
8890
8912
  });
8891
8913
  }
8892
- process.env.NODE_ENV === "development" && (ai.displayName = "Toggle", ai.Knob.displayName = "Toggle.Knob", ai.Track.displayName = "Toggle.Track");
8914
+ process.env.NODE_ENV === "development" && (oi.displayName = "Toggle", oi.Knob.displayName = "Toggle.Knob", oi.Track.displayName = "Toggle.Track");
8893
8915
  //#endregion
8894
8916
  //#region src/providers/ScrollPositionProvider.tsx
8895
- var ci = {
8917
+ var li = {
8896
8918
  current: K.zero,
8897
8919
  end: K.zero,
8898
8920
  progress: K.zero,
8899
8921
  start: K.zero
8900
- }, li = a(ci), ui = a(!0), di = a(!1);
8901
- function fi({ children: e, scrollBottomOffset: t = 0, scrollTopOffset: n = 0, target: r }) {
8902
- let [i, a] = p(!0), [o, s] = p(!1), [c, l] = p(ci);
8922
+ }, ui = a(li), di = a(!0), fi = a(!1);
8923
+ function pi({ children: e, scrollBottomOffset: t = 0, scrollTopOffset: n = 0, target: r }) {
8924
+ let [i, a] = p(!0), [o, s] = p(!1), [c, l] = p(li);
8903
8925
  return fn(r, (e) => {
8904
8926
  l(e), a(e.current.y <= e.start.y + n), s(e.current.y >= e.end.y - t);
8905
- }), /* @__PURE__ */ (0, O.jsx)(ui.Provider, {
8927
+ }), /* @__PURE__ */ (0, O.jsx)(di.Provider, {
8906
8928
  value: i,
8907
- children: /* @__PURE__ */ (0, O.jsx)(di.Provider, {
8929
+ children: /* @__PURE__ */ (0, O.jsx)(fi.Provider, {
8908
8930
  value: o,
8909
- children: /* @__PURE__ */ (0, O.jsx)(li.Provider, {
8931
+ children: /* @__PURE__ */ (0, O.jsx)(ui.Provider, {
8910
8932
  value: c,
8911
8933
  children: e
8912
8934
  })
8913
8935
  })
8914
8936
  });
8915
8937
  }
8916
- function pi() {
8917
- let e = s(ui);
8918
- return e === void 0 && console.warn("[etudes::useIsScrollTop] `useIsScrollTop` must be used within a `ScrollPositionProvider`"), e ?? !0;
8919
- }
8920
8938
  function mi() {
8921
8939
  let e = s(di);
8922
- return e === void 0 && console.warn("[etudes::useIsScrollBottom] `useIsScrollBottom` must be used within a `ScrollPositionProvider`"), e ?? !1;
8940
+ return e === void 0 && console.warn("[etudes::useIsScrollTop] `useIsScrollTop` must be used within a `ScrollPositionProvider`"), e ?? !0;
8923
8941
  }
8924
8942
  function hi() {
8925
- let e = s(li);
8943
+ let e = s(fi);
8944
+ return e === void 0 && console.warn("[etudes::useIsScrollBottom] `useIsScrollBottom` must be used within a `ScrollPositionProvider`"), e ?? !1;
8945
+ }
8946
+ function gi() {
8947
+ let e = s(ui);
8926
8948
  return e || console.warn("[etudes::useScrollPosition] `useScrollPosition` must be used within a `ScrollPositionProvider`"), e ?? {
8927
8949
  current: K.zero,
8928
8950
  end: K.zero,
@@ -8930,26 +8952,26 @@ function hi() {
8930
8952
  start: K.zero
8931
8953
  };
8932
8954
  }
8933
- process.env.NODE_ENV === "development" && (fi.displayName = "ScrollPositionProvider", li.displayName = "ScrollPositionContext", ui.displayName = "ScrollTopContext", di.displayName = "ScrollBottomContext");
8955
+ process.env.NODE_ENV === "development" && (pi.displayName = "ScrollPositionProvider", ui.displayName = "ScrollPositionContext", di.displayName = "ScrollTopContext", fi.displayName = "ScrollBottomContext");
8934
8956
  //#endregion
8935
8957
  //#region src/utils/createKeyDeep.ts
8936
- function gi(e) {
8937
- return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(gi)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, gi(t)])) : _t(e);
8958
+ function _i(e) {
8959
+ return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(_i)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, _i(t)])) : _t(e);
8938
8960
  }
8939
8961
  //#endregion
8940
8962
  //#region src/utils/ExtractChildren.tsx
8941
- function _i({ children: e, ...n }) {
8963
+ function vi({ children: e, ...n }) {
8942
8964
  return /* @__PURE__ */ (0, O.jsx)(O.Fragment, { children: t.map(e, (e) => o(e) ? N(e, { ...n }) : e) });
8943
8965
  }
8944
- process.env.NODE_ENV === "development" && (_i.displayName = "ExtractChildren");
8966
+ process.env.NODE_ENV === "development" && (vi.displayName = "ExtractChildren");
8945
8967
  //#endregion
8946
8968
  //#region src/utils/getSystemColorScheme.ts
8947
- function vi() {
8969
+ function yi() {
8948
8970
  return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
8949
8971
  }
8950
8972
  //#endregion
8951
8973
  //#region src/utils/NoSSR.tsx
8952
- function yi({ children: e, fallback: t = void 0 }) {
8974
+ function bi({ children: e, fallback: t = void 0 }) {
8953
8975
  let [n, i] = p(!1);
8954
8976
  if (l(() => {
8955
8977
  i(typeof window < "u");
@@ -8959,4 +8981,4 @@ function yi({ children: e, fallback: t = void 0 }) {
8959
8981
  });
8960
8982
  }
8961
8983
  //#endregion
8962
- export { Q as Accordion, I as Burger, R as BurgerButton, ft as Button, qn as Carousel, er as CodeInput, kn as Collection, kt as Conditional, or as Counter, it as CoverImage, ut as CoverVideo, cr as Dial, fr as Dropdown, At as Each, Nt as ExtractChild, _i as ExtractChildren, vr as Form, nt as Image, Qe as ImageSource, br as MasonryGrid, yi as NoSSR, ht as OptionButton, bt as Panorama, Et as PanoramaSlider, rt as Picture, $ as RangeSlider, k as Repeat, fi as ScrollPositionProvider, Lr as ScrollableCarousel, Hr as Select, Ot as SelectableButton, Wr as Slider, Yr as StepSlider, P as Styled, ri as SwipeRegion, jt as Switch, ii as TextArea, ar as TextField, ai as Toggle, lt as Video, It as WithTooltip, A as asClassNameDict, j as asComponentDict, M as asStyleDict, N as cloneStyledElement, _t as createKey, gi as createKeyDeep, tn as createLocalCache, _n as createSessionCache, Cn as getStyle, vi as getSystemColorScheme, Zt as isTouchDevice, Pt as measureIntrinsicSize, wn as setStyle, Ft as setStyles, F as styles, Vt as useClassName, Ht as useClickOutside, Ut as useCopyBlobToClipboard, Kt as useDPR, Wt as useDownloadBlob, qt as useDrag, Jt as useDropzone, $e as useImageLoader, et as useImageSize, vt as useInertiaDrag, Je as useIntersectionObserver, Yt as useInterval, Xt as useIsMounted, mi as useIsScrollBottom, pi as useIsScrollTop, Qt as useIsTouchDevice, $t as useKeyboardShortcut, Z as useLatest, sn as useLocalCache, cn as useMouseEnter, ln as useMouseLeave, un as useOS, dn as usePrevious, Ze as useRect, hi as useScrollPosition, fn as useScrollPositionObserver, Sn as useSessionCache, yt as useSize, Ye as useSizeObserver, Tn as useStyle, En as useSystemColorScheme, Dn as useTimeout, ot as useVideoMetadataLoader, st as useVideoSize, Xe as useViewportSize };
8984
+ export { Pn as Accordion, I as Burger, R as BurgerButton, ft as Button, Jn as Carousel, tr as CodeInput, kn as Collection, kt as Conditional, sr as Counter, it as CoverImage, ut as CoverVideo, lr as Dial, pr as Dropdown, At as Each, Nt as ExtractChild, vi as ExtractChildren, yr as Form, nt as Image, Qe as ImageSource, xr as MasonryGrid, bi as NoSSR, ht as OptionButton, bt as Panorama, Et as PanoramaSlider, rt as Picture, $ as RangeSlider, k as Repeat, pi as ScrollPositionProvider, Rr as ScrollableCarousel, Ur as Select, Ot as SelectableButton, Gr as Slider, Xr as StepSlider, P as Styled, ii as SwipeRegion, jt as Switch, ai as TextArea, or as TextField, oi as Toggle, lt as Video, It as WithTooltip, A as asClassNameDict, j as asComponentDict, M as asStyleDict, N as cloneStyledElement, _t as createKey, _i as createKeyDeep, tn as createLocalCache, _n as createSessionCache, Cn as getStyle, yi as getSystemColorScheme, Zt as isTouchDevice, Pt as measureIntrinsicSize, wn as setStyle, Ft as setStyles, F as styles, Vt as useClassName, Ht as useClickOutside, Ut as useCopyBlobToClipboard, Kt as useDPR, Wt as useDownloadBlob, qt as useDrag, Jt as useDropzone, $e as useImageLoader, et as useImageSize, vt as useInertiaDrag, Je as useIntersectionObserver, Yt as useInterval, Xt as useIsMounted, hi as useIsScrollBottom, mi as useIsScrollTop, Qt as useIsTouchDevice, $t as useKeyboardShortcut, Z as useLatest, Q as useLocalCache, sn as useMouseEnter, cn as useMouseLeave, ln as useOS, un as usePrevious, Ze as useRect, dn as useRightClick, gi as useScrollPosition, fn as useScrollPositionObserver, Sn as useSessionCache, yt as useSize, Ye as useSizeObserver, Tn as useStyle, En as useSystemColorScheme, Dn as useTimeout, ot as useVideoMetadataLoader, st as useVideoSize, Xe as useViewportSize };