etudes 32.4.0 → 32.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,37 @@ 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, { 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
+ if (o) return window.addEventListener("contextmenu", e), () => {
6368
+ window.removeEventListener("contextmenu", e);
6369
+ };
6370
+ {
6371
+ let t = i && "current" in i ? i.current : i;
6372
+ return t?.addEventListener("contextmenu", e), () => {
6373
+ t?.removeEventListener("contextmenu", e);
6374
+ };
6375
+ }
6376
+ }, [
6377
+ o,
6378
+ i,
6379
+ a
6380
+ ]);
6381
+ }
6382
+ //#endregion
6357
6383
  //#region src/hooks/useScrollPositionObserver.ts
6358
6384
  function fn(...e) {
6359
6385
  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 +6703,8 @@ function Nn({ itemLength: e = NaN, itemPadding: t = 0, layout: n = "collection",
6677
6703
  process.env.NODE_ENV === "development" && (kn.displayName = "Collection", kn.Item.displayName = "Collection.Item");
6678
6704
  //#endregion
6679
6705
  //#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) => {
6706
+ 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 }) {
6707
+ 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
6708
  let t;
6683
6709
  t = M(e) ? (t) => t.filter((t) => t !== e) : d ? (t) => [e] : (t) => [...t.filter((t) => t !== e), e], R(T, t(T));
6684
6710
  }, I = (e, t) => {
@@ -6688,7 +6714,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6688
6714
  case "multiple":
6689
6715
  n = (n) => ({
6690
6716
  ...n,
6691
- [t]: Rn([...(n[t] ?? []).filter((t) => t !== e), e])
6717
+ [t]: zn([...(n[t] ?? []).filter((t) => t !== e), e])
6692
6718
  });
6693
6719
  break;
6694
6720
  case "single":
@@ -6715,11 +6741,11 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6715
6741
  }
6716
6742
  r.forEach((e) => h?.(e[0], e[1])), i.forEach((e) => b?.(e[0], e[1])), x?.(t);
6717
6743
  }, B = j(n, {
6718
- collapseIcon: Q.CollapseIcon,
6719
- expandIcon: Q.ExpandIcon,
6720
- header: Q.Header,
6721
- item: Q.Item,
6722
- section: Q.Section
6744
+ collapseIcon: Pn.CollapseIcon,
6745
+ expandIcon: Pn.ExpandIcon,
6746
+ header: Pn.Header,
6747
+ item: Pn.Item,
6748
+ section: Pn.Section
6723
6749
  });
6724
6750
  return /* @__PURE__ */ (0, O.jsx)("div", {
6725
6751
  ref: e,
@@ -6737,7 +6763,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6737
6763
  marginLeft: t === 0 ? "0px" : `${s}px`,
6738
6764
  ...S.width > 0 ? { width: `${T}px` } : { visibility: "hidden" }
6739
6765
  }),
6740
- element: B.section ?? /* @__PURE__ */ (0, O.jsx)(Q.Section, {}),
6766
+ element: B.section ?? /* @__PURE__ */ (0, O.jsx)(Pn.Section, {}),
6741
6767
  children: [/* @__PURE__ */ (0, O.jsx)("div", {
6742
6768
  ref: D[t],
6743
6769
  style: F(E.headerContainer),
@@ -6761,7 +6787,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6761
6787
  }),
6762
6788
  style: F(E.header),
6763
6789
  "aria-expanded": !x,
6764
- element: B.header ?? /* @__PURE__ */ (0, O.jsx)(Q.Header, {}),
6790
+ element: B.header ?? /* @__PURE__ */ (0, O.jsx)(Pn.Header, {}),
6765
6791
  role: "button",
6766
6792
  onClick: () => N(t),
6767
6793
  children: [/* @__PURE__ */ (0, O.jsx)("span", { dangerouslySetInnerHTML: { __html: e.label } }), B.expandIcon && /* @__PURE__ */ (0, O.jsx)(P, {
@@ -6806,7 +6832,7 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6806
6832
  onCustomEvent: (e, n, r) => y?.(e, t, n, r),
6807
6833
  onDeselectAt: (e) => L(e, t),
6808
6834
  onSelectAt: (e) => I(e, t),
6809
- children: !a && (B.item ?? /* @__PURE__ */ (0, O.jsx)(Q.Item, {}))
6835
+ children: !a && (B.item ?? /* @__PURE__ */ (0, O.jsx)(Pn.Item, {}))
6810
6836
  })
6811
6837
  })]
6812
6838
  });
@@ -6828,29 +6854,29 @@ function Q({ ref: e, style: t, children: n, expandedSectionIndices: r, HeaderCom
6828
6854
  ...t,
6829
6855
  children: e
6830
6856
  }), e.Item = kn.Item;
6831
- })(Q ||= {});
6832
- function Pn(e, t) {
6857
+ })(Pn ||= {});
6858
+ function Fn(e, t) {
6833
6859
  return e >= t.length || e < 0;
6834
6860
  }
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));
6861
+ function In(e, t, n) {
6862
+ return !!(Fn(t, n) || e >= (n[t].items ?? []).length || e < 0);
6840
6863
  }
6841
6864
  function Ln(e, t) {
6865
+ return zn(e).filter((e) => !Fn(e, t));
6866
+ }
6867
+ function Rn(e, t) {
6842
6868
  let n = {};
6843
6869
  for (let r in t) {
6844
6870
  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));
6871
+ let i = zn([...e[r] ?? []]);
6872
+ n[Number(r)] = zn(i).filter((e) => !In(e, Number(r), t));
6847
6873
  }
6848
6874
  return n;
6849
6875
  }
6850
- function Rn(e) {
6876
+ function zn(e) {
6851
6877
  return e.sort((e, t) => e - t);
6852
6878
  }
6853
- function zn({ orientation: e = "vertical" }) {
6879
+ function Bn({ orientation: e = "vertical" }) {
6854
6880
  return M({
6855
6881
  collapseIcon: {
6856
6882
  pointerEvents: "none",
@@ -6902,16 +6928,16 @@ function zn({ orientation: e = "vertical" }) {
6902
6928
  }
6903
6929
  });
6904
6930
  }
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");
6931
+ 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
6932
  //#endregion
6907
6933
  //#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);
6934
+ var Vn = .55, Hn = .05, Un = .55, Wn = .5, Gn = .02, Kn = 100, qn = 1e3 / 60;
6935
+ 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 }) {
6936
+ 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, {
6937
+ content: Jn.Content,
6938
+ itemContainer: Jn.ItemContainer,
6939
+ viewport: Jn.Viewport
6940
+ }), 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
6941
  le.current = {
6916
6942
  dragSpeed: i,
6917
6943
  dragStartThreshold: a,
@@ -6935,19 +6961,19 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
6935
6961
  }, de = () => {
6936
6962
  let e = le.current;
6937
6963
  if (!e.shouldTrackExposure) return;
6938
- let t = Zn(S.current, e.viewportLength, e.itemCount);
6939
- U((e) => Xn(e, t) ? e : t);
6964
+ let t = Qn(S.current, e.viewportLength, e.itemCount);
6965
+ U((e) => Zn(e, t) ? e : t);
6940
6966
  }, fe = () => {
6941
6967
  T.current ||= requestAnimationFrame(me);
6942
6968
  }, pe = () => {
6943
6969
  T.current &&= (cancelAnimationFrame(T.current), 0);
6944
6970
  }, 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();
6971
+ let { maxDisplacement: e, minDisplacement: t, orientation: n } = le.current, r = w.current, i = (r - S.current) * Hn;
6972
+ 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) {
6973
+ S.current = r, C.current = 0, T.current = 0, Yn(x.current, r, n), de();
6948
6974
  return;
6949
6975
  }
6950
- Jn(x.current, S.current, n), de(), T.current = requestAnimationFrame(me);
6976
+ Yn(x.current, S.current, n), de(), T.current = requestAnimationFrame(me);
6951
6977
  };
6952
6978
  return u(() => {
6953
6979
  let e = b.current;
@@ -6974,12 +7000,12 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
6974
7000
  }
6975
7001
  }
6976
7002
  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);
7003
+ S.current = $n(D.current + l, a, i, s), Yn(x.current, S.current, o), de(), Math.abs(l) > r && (L.current = !0);
6978
7004
  let u = performance.now(), d = E.current;
6979
7005
  for (d.push({
6980
7006
  p: c,
6981
7007
  t: u
6982
- }); d.length > 0 && u - d[0].t > Gn;) d.shift();
7008
+ }); d.length > 0 && u - d[0].t > Kn;) d.shift();
6983
7009
  }, r = (t) => {
6984
7010
  if (I.current !== t.pointerId) return;
6985
7011
  e.hasPointerCapture(t.pointerId) && e.releasePointerCapture(t.pointerId), I.current = null;
@@ -6993,8 +7019,8 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
6993
7019
  let e = l[0], t = l[l.length - 1], n = t.t - e.t;
6994
7020
  n > 0 && (d = (t.p - e.p) / n);
6995
7021
  }
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);
7022
+ 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);
7023
+ E.current = [], w.current = -c * f, C.current = d * r * qn, fe(), ee(!1), f !== a && V.current?.(f);
6998
7024
  }, i = (e) => {
6999
7025
  let t = N.current;
7000
7026
  (t === "pending" || t === "axis") && e.cancelable && e.preventDefault();
@@ -7005,7 +7031,7 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
7005
7031
  }, []), u(() => {
7006
7032
  if (W || se <= 0) return;
7007
7033
  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();
7034
+ 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
7035
  }, [
7010
7036
  ie,
7011
7037
  se,
@@ -7027,30 +7053,30 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
7027
7053
  onClick: ue,
7028
7054
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7029
7055
  ref: b,
7030
- style: F($n.viewport, {
7056
+ style: F(er.viewport, {
7031
7057
  cursor: W ? "grabbing" : "grab",
7032
7058
  touchAction: re > 1 ? s === "horizontal" ? "pan-y" : "pan-x" : "auto"
7033
7059
  }),
7034
- element: G.viewport ?? /* @__PURE__ */ (0, O.jsx)(qn.Viewport, {}),
7060
+ element: G.viewport ?? /* @__PURE__ */ (0, O.jsx)(Jn.Viewport, {}),
7035
7061
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7036
7062
  ref: x,
7037
7063
  style: {
7038
- ...$n.content,
7064
+ ...er.content,
7039
7065
  flexDirection: s === "horizontal" ? "row" : "column"
7040
7066
  },
7041
- element: G.content ?? /* @__PURE__ */ (0, O.jsx)(qn.Content, {}),
7067
+ element: G.content ?? /* @__PURE__ */ (0, O.jsx)(Jn.Content, {}),
7042
7068
  children: ne.map((e, t) => {
7043
7069
  let n = e.key ?? t, r = H?.[t], i = t === ie;
7044
- return /* @__PURE__ */ (0, O.jsx)(qn.ItemContext, {
7070
+ return /* @__PURE__ */ (0, O.jsx)(Jn.ItemContext, {
7045
7071
  value: {
7046
7072
  exposure: r,
7047
7073
  index: t,
7048
7074
  isActive: i
7049
7075
  },
7050
7076
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7051
- style: F($n.itemContainer),
7077
+ style: F(er.itemContainer),
7052
7078
  "aria-hidden": !i,
7053
- element: G.itemContainer ?? /* @__PURE__ */ (0, O.jsx)(qn.ItemContainer, {}),
7079
+ element: G.itemContainer ?? /* @__PURE__ */ (0, O.jsx)(Jn.ItemContainer, {}),
7054
7080
  children: e
7055
7081
  })
7056
7082
  }, n);
@@ -7077,20 +7103,20 @@ function qn({ ref: e, autoAdvanceInterval: n = 0, children: r, dragSpeed: i = 1,
7077
7103
  return e;
7078
7104
  }
7079
7105
  e.useItem = n;
7080
- })(qn ||= {});
7081
- function Jn(e, t, n) {
7106
+ })(Jn ||= {});
7107
+ function Yn(e, t, n) {
7082
7108
  e && (n === "horizontal" ? e.style.transform = `translate3d(${t}px,0,0)` : e.style.transform = `translate3d(0,${t}px,0)`);
7083
7109
  }
7084
- function Yn(e, t) {
7110
+ function Xn(e, t) {
7085
7111
  return t <= 0 ? 0 : Math.max(0, Math.min(t - 1, e));
7086
7112
  }
7087
- function Xn(e, t) {
7113
+ function Zn(e, t) {
7088
7114
  if (e === t) return !0;
7089
7115
  if (!e || !t || e.length !== t.length) return !1;
7090
7116
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
7091
7117
  return !0;
7092
7118
  }
7093
- function Zn(e, t, n) {
7119
+ function Qn(e, t, n) {
7094
7120
  if (n <= 0) return [];
7095
7121
  if (t <= 0) return Array(n).fill(0);
7096
7122
  let r = [];
@@ -7100,11 +7126,11 @@ function Zn(e, t, n) {
7100
7126
  }
7101
7127
  return r;
7102
7128
  }
7103
- function Qn(e, t, n, r) {
7129
+ function $n(e, t, n, r) {
7104
7130
  let i = 1 - r;
7105
7131
  return e > n ? n + (e - n) * i : e < t ? t + (e - t) * i : e;
7106
7132
  }
7107
- var $n = M({
7133
+ var er = M({
7108
7134
  content: {
7109
7135
  alignItems: "center",
7110
7136
  display: "flex",
@@ -7129,15 +7155,15 @@ var $n = M({
7129
7155
  width: "100%"
7130
7156
  }
7131
7157
  });
7132
- process.env.NODE_ENV === "development" && (qn.displayName = "Carousel", qn.Viewport.displayName = "Carousel.Viewport", qn.Content.displayName = "Carousel.Content", qn.ItemContainer.displayName = "Carousel.ItemContainer");
7158
+ process.env.NODE_ENV === "development" && (Jn.displayName = "Carousel", Jn.Viewport.displayName = "Carousel.Viewport", Jn.Content.displayName = "Carousel.Content", Jn.ItemContainer.displayName = "Carousel.ItemContainer");
7133
7159
  //#endregion
7134
7160
  //#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) => {
7161
+ 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 }) {
7162
+ let h = rr(c, s), g = f([]), _ = nr(), v = j(i, { field: tr.Field }), y = (e) => {
7137
7163
  e < 0 ? g.current[0]?.focus() : e >= s ? g.current[s - 1]?.focus() : g.current[e]?.focus();
7138
7164
  }, 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));
7165
+ let n = h[e], r = ar(t.target.value, n);
7166
+ p(ir(h.slice(), r.split("").slice(0, s), e)), y(Math.min(e + r.length, s - 1));
7141
7167
  }, x = (e) => (t) => {
7142
7168
  switch (t.key) {
7143
7169
  case "ArrowLeft":
@@ -7157,7 +7183,7 @@ function er({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7157
7183
  }, S = (e) => (t) => {
7158
7184
  t.preventDefault();
7159
7185
  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));
7186
+ p(ir(h.slice(), n.split("").slice(0, s), e)), y(Math.min(e + n.length, s - 1));
7161
7187
  };
7162
7188
  return l(() => {
7163
7189
  if (!r) return;
@@ -7176,7 +7202,7 @@ function er({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7176
7202
  "aria-required": d,
7177
7203
  autoComplete: n,
7178
7204
  disabled: u,
7179
- element: v.field ?? /* @__PURE__ */ (0, O.jsx)(er.Field, {}),
7205
+ element: v.field ?? /* @__PURE__ */ (0, O.jsx)(tr.Field, {}),
7180
7206
  inputMode: a,
7181
7207
  placeholder: o,
7182
7208
  required: d,
@@ -7195,8 +7221,8 @@ function er({ ref: e, style: t, autoComplete: n = "one-time-code", autoFocus: r
7195
7221
  autoCorrect: "off",
7196
7222
  type: "text"
7197
7223
  });
7198
- })(er ||= {});
7199
- function tr() {
7224
+ })(tr ||= {});
7225
+ function nr() {
7200
7226
  return M({
7201
7227
  field: {
7202
7228
  caretColor: "transparent",
@@ -7210,24 +7236,24 @@ function tr() {
7210
7236
  }
7211
7237
  });
7212
7238
  }
7213
- function nr(e, t) {
7239
+ function rr(e, t) {
7214
7240
  let n = e.slice(0, t);
7215
7241
  for (; n.length < t;) n.push("");
7216
7242
  return n;
7217
7243
  }
7218
- function rr(e, t, n = 0) {
7244
+ function ir(e, t, n = 0) {
7219
7245
  let r = n, i = 0;
7220
7246
  for (; i < t.length && r < e.length;) e[r] = t[i], r++, i++;
7221
7247
  for (; i < t.length;) e.shift(), e.push(t[i]), i++;
7222
7248
  return e;
7223
7249
  }
7224
- function ir(e, t) {
7250
+ function ar(e, t) {
7225
7251
  return t === "" ? e : e.startsWith(t) ? e.slice(t.length) : e.endsWith(t) ? e.slice(0, -t.length) : e;
7226
7252
  }
7227
- process.env.NODE_ENV === "development" && (er.displayName = "CodeInput", er.Field.displayName = "CodeInput.Field");
7253
+ process.env.NODE_ENV === "development" && (tr.displayName = "CodeInput", tr.Field.displayName = "CodeInput.Field");
7228
7254
  //#endregion
7229
7255
  //#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 }) {
7256
+ 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
7257
  let m = c((e) => {
7232
7258
  let t = (r?.(e) ?? e) || n;
7233
7259
  u?.(t);
@@ -7249,10 +7275,10 @@ function ar({ className: e, ref: t, emptyValue: n = "", formatter: r, placeholde
7249
7275
  onFocus: ({ target: e }) => d?.(e.value)
7250
7276
  });
7251
7277
  }
7252
- process.env.NODE_ENV === "development" && (ar.displayName = "TextField");
7278
+ process.env.NODE_ENV === "development" && (or.displayName = "TextField");
7253
7279
  //#endregion
7254
7280
  //#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 }) {
7281
+ function sr({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN, min: a = NaN, quantity: o = 0, onChange: s, ...c }) {
7256
7282
  let u = () => {
7257
7283
  s?.(_(o - 1));
7258
7284
  }, d = () => {
@@ -7268,7 +7294,7 @@ function or({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7268
7294
  }, _ = (e) => {
7269
7295
  let t = e;
7270
7296
  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;
7297
+ }, [v, y] = p(h(o)), b = un(o), x = !isNaN(i) && o + 1 > i, S = !isNaN(a) && o - 1 < a;
7272
7298
  l(() => {
7273
7299
  b === void 0 || b === o || y(h(_(o)));
7274
7300
  }, [
@@ -7277,24 +7303,24 @@ function or({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7277
7303
  i
7278
7304
  ]);
7279
7305
  let C = j(r, {
7280
- addButton: or.AddButton,
7281
- subscribeButton: or.SubtractButton,
7282
- textField: or.TextField
7306
+ addButton: sr.AddButton,
7307
+ subscribeButton: sr.SubtractButton,
7308
+ textField: sr.TextField
7283
7309
  });
7284
7310
  return /* @__PURE__ */ (0, O.jsxs)("div", {
7285
7311
  ...c,
7286
7312
  ref: e,
7287
- style: F(t, sr.root),
7313
+ style: F(t, cr.root),
7288
7314
  children: [
7289
7315
  /* @__PURE__ */ (0, O.jsx)(P, {
7290
7316
  className: w({ disabled: S }),
7291
- style: F(sr.subtract),
7292
- element: C.subscribeButton ?? /* @__PURE__ */ (0, O.jsx)(or.SubtractButton, {}),
7317
+ style: F(cr.subtract),
7318
+ element: C.subscribeButton ?? /* @__PURE__ */ (0, O.jsx)(sr.SubtractButton, {}),
7293
7319
  onClick: () => u()
7294
7320
  }),
7295
7321
  /* @__PURE__ */ (0, O.jsx)(P, {
7296
- style: F(sr.textField),
7297
- element: C.textField ?? /* @__PURE__ */ (0, O.jsx)(or.TextField, {}),
7322
+ style: F(cr.textField),
7323
+ element: C.textField ?? /* @__PURE__ */ (0, O.jsx)(sr.TextField, {}),
7298
7324
  value: v,
7299
7325
  isDisabled: !n,
7300
7326
  onChange: f,
@@ -7302,23 +7328,23 @@ function or({ ref: e, style: t, allowsInput: n = !0, children: r, max: i = NaN,
7302
7328
  }),
7303
7329
  /* @__PURE__ */ (0, O.jsx)(P, {
7304
7330
  className: w({ disabled: x }),
7305
- style: F(sr.add),
7306
- element: C.addButton ?? /* @__PURE__ */ (0, O.jsx)(or.AddButton, {}),
7331
+ style: F(cr.add),
7332
+ element: C.addButton ?? /* @__PURE__ */ (0, O.jsx)(sr.AddButton, {}),
7307
7333
  onClick: () => d()
7308
7334
  })
7309
7335
  ]
7310
7336
  });
7311
7337
  }
7312
7338
  (function(e) {
7313
- e.TextField = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)(ar, { ...e }), e.AddButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, O.jsx)("button", {
7339
+ e.TextField = ({ ...e }) => /* @__PURE__ */ (0, O.jsx)(or, { ...e }), e.AddButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, O.jsx)("button", {
7314
7340
  ...t,
7315
7341
  children: e
7316
7342
  }), e.SubtractButton = ({ children: e, ...t }) => /* @__PURE__ */ (0, O.jsx)("button", {
7317
7343
  ...t,
7318
7344
  children: e
7319
7345
  });
7320
- })(or ||= {});
7321
- var sr = M({
7346
+ })(sr ||= {});
7347
+ var cr = M({
7322
7348
  add: { flex: "0 0 auto" },
7323
7349
  root: {
7324
7350
  alignItems: "stretch",
@@ -7329,14 +7355,14 @@ var sr = M({
7329
7355
  subtract: { flex: "0 0 auto" },
7330
7356
  textField: { width: "100%" }
7331
7357
  });
7332
- process.env.NODE_ENV === "development" && (or.displayName = "Counter", or.AddButton.displayName = "Counter.AddButton", or.SubtractButton.displayName = "Counter.SubtractButton", or.TextField.displayName = "Counter.TextField");
7358
+ process.env.NODE_ENV === "development" && (sr.displayName = "Counter", sr.AddButton.displayName = "Counter.AddButton", sr.SubtractButton.displayName = "Counter.SubtractButton", sr.TextField.displayName = "Counter.TextField");
7333
7359
  //#endregion
7334
7360
  //#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 }) {
7361
+ 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
7362
  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({
7363
+ knob: lr.Knob,
7364
+ track: lr.Track
7365
+ }), p = fr({
7340
7366
  angle: n,
7341
7367
  diameter: u
7342
7368
  });
@@ -7354,7 +7380,7 @@ function cr({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7354
7380
  children: /* @__PURE__ */ (0, O.jsx)(P, {
7355
7381
  cx: o,
7356
7382
  cy: o,
7357
- element: f.track ?? /* @__PURE__ */ (0, O.jsx)(cr.Track, {}),
7383
+ element: f.track ?? /* @__PURE__ */ (0, O.jsx)(lr.Track, {}),
7358
7384
  fill: "none",
7359
7385
  r: o - c / 2,
7360
7386
  strokeDasharray: s,
@@ -7368,8 +7394,8 @@ function cr({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7368
7394
  viewBox: `0 0 ${u} ${u}`,
7369
7395
  xmlns: "http://www.w3.org/2000/svg",
7370
7396
  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, {}),
7397
+ d: dr(o, o, o - a / 2 - (c - a) / 2, -d / 2, d / 2),
7398
+ element: f.knob ?? /* @__PURE__ */ (0, O.jsx)(lr.Knob, {}),
7373
7399
  fill: "none",
7374
7400
  strokeWidth: a
7375
7401
  })
@@ -7379,16 +7405,16 @@ function cr({ ref: e, style: t, angle: n = 0, children: r, knobLength: i = 30, k
7379
7405
  }
7380
7406
  (function(e) {
7381
7407
  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) {
7408
+ })(lr ||= {});
7409
+ function ur(e, t, n, r) {
7384
7410
  let i = (r - 90) * Math.PI / 180;
7385
7411
  return {
7386
7412
  x: e + n * Math.cos(i),
7387
7413
  y: t + n * Math.sin(i)
7388
7414
  };
7389
7415
  }
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";
7416
+ function dr(e, t, n, r, i) {
7417
+ let a = ur(e, t, n, i), o = ur(e, t, n, r), s = i - r <= 180 ? "0" : "1";
7392
7418
  return [
7393
7419
  "M",
7394
7420
  a.x,
@@ -7403,7 +7429,7 @@ function ur(e, t, n, r, i) {
7403
7429
  o.y
7404
7430
  ].join(" ");
7405
7431
  }
7406
- function dr({ angle: e = 0, diameter: t = 0 }) {
7432
+ function fr({ angle: e = 0, diameter: t = 0 }) {
7407
7433
  return M({
7408
7434
  knobContainer: {
7409
7435
  backgroundPosition: "center",
@@ -7437,11 +7463,11 @@ function dr({ angle: e = 0, diameter: t = 0 }) {
7437
7463
  }
7438
7464
  });
7439
7465
  }
7440
- process.env.NODE_ENV === "development" && (cr.displayName = "Dial", cr.Track.displayName = "Dial.Track", cr.Knob.displayName = "Dial.Knob");
7466
+ process.env.NODE_ENV === "development" && (lr.displayName = "Dial", lr.Track.displayName = "Dial.Track", lr.Knob.displayName = "Dial.Knob");
7441
7467
  //#endregion
7442
7468
  //#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({
7469
+ 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 }) {
7470
+ 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
7471
  collectionPadding: i,
7446
7472
  maxVisibleItems: m,
7447
7473
  menuLength: H,
@@ -7450,11 +7476,11 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7450
7476
  isCollapsed: W,
7451
7477
  isInverted: x
7452
7478
  }), G = j(r, {
7453
- collapseIcon: fr.CollapseIcon,
7454
- collection: fr.Collection,
7455
- expandIcon: fr.ExpandIcon,
7456
- item: fr.Item,
7457
- toggle: fr.Toggle
7479
+ collapseIcon: pr.CollapseIcon,
7480
+ collection: pr.Collection,
7481
+ expandIcon: pr.ExpandIcon,
7482
+ item: pr.Item,
7483
+ toggle: pr.Toggle
7458
7484
  }), ne = () => {
7459
7485
  W && (ee(!1), k?.());
7460
7486
  }, re = () => {
@@ -7512,7 +7538,7 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7512
7538
  style: F(te.toggle),
7513
7539
  "aria-expanded": !W,
7514
7540
  "aria-haspopup": "listbox",
7515
- element: G.toggle ?? /* @__PURE__ */ (0, O.jsx)(fr.Toggle, {}),
7541
+ element: G.toggle ?? /* @__PURE__ */ (0, O.jsx)(pr.Toggle, {}),
7516
7542
  onClick: ie,
7517
7543
  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
7544
  className: w({
@@ -7524,7 +7550,7 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7524
7550
  })]
7525
7551
  }), /* @__PURE__ */ (0, O.jsx)(P, {
7526
7552
  style: F(te.collection),
7527
- element: G.collection ?? /* @__PURE__ */ (0, O.jsx)(fr.Collection, {}),
7553
+ element: G.collection ?? /* @__PURE__ */ (0, O.jsx)(pr.Collection, {}),
7528
7554
  ItemComponent: a,
7529
7555
  itemLength: V,
7530
7556
  itemPadding: s,
@@ -7539,7 +7565,7 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7539
7565
  onDeselectAt: D,
7540
7566
  onSelectAt: ae,
7541
7567
  onSelectionChange: M,
7542
- children: !a && (G.item ?? /* @__PURE__ */ (0, O.jsx)(fr.Item, {}))
7568
+ children: !a && (G.item ?? /* @__PURE__ */ (0, O.jsx)(pr.Item, {}))
7543
7569
  }, g)]
7544
7570
  })
7545
7571
  });
@@ -7557,17 +7583,17 @@ function fr({ className: e, ref: t, style: n, children: r, collectionPadding: i
7557
7583
  ...t,
7558
7584
  children: e
7559
7585
  });
7560
- })(fr ||= {});
7561
- function pr(e, t) {
7586
+ })(pr ||= {});
7587
+ function mr(e, t) {
7562
7588
  return !!(isNaN(e) || e >= t.length || e < 0);
7563
7589
  }
7564
- function mr(e, t) {
7565
- return hr(e).filter((e) => !pr(e, t));
7590
+ function hr(e, t) {
7591
+ return gr(e).filter((e) => !mr(e, t));
7566
7592
  }
7567
- function hr(e) {
7593
+ function gr(e) {
7568
7594
  return e.sort((e, t) => e - t);
7569
7595
  }
7570
- function gr(e, t, n, r) {
7596
+ function _r(e, t, n, r) {
7571
7597
  let i = e.length;
7572
7598
  switch (r) {
7573
7599
  case "grid": {
@@ -7577,7 +7603,7 @@ function gr(e, t, n, r) {
7577
7603
  default: return t < 0 ? i : Math.min(i, t);
7578
7604
  }
7579
7605
  }
7580
- function _r({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n = NaN, numItems: r = 0, orientation: i = "vertical", isCollapsed: a = !0, isInverted: o = !1 }) {
7606
+ function vr({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n = NaN, numItems: r = 0, orientation: i = "vertical", isCollapsed: a = !0, isInverted: o = !1 }) {
7581
7607
  return M({
7582
7608
  body: {
7583
7609
  height: "100%",
@@ -7636,10 +7662,10 @@ function _r({ collectionPadding: e = 0, maxVisibleItems: t = 0, menuLength: n =
7636
7662
  }
7637
7663
  });
7638
7664
  }
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");
7665
+ 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
7666
  //#endregion
7641
7667
  //#region src/primitives/Form.tsx
7642
- function vr({ ref: e, onSubmit: t, ...n }) {
7668
+ function yr({ ref: e, onSubmit: t, ...n }) {
7643
7669
  return /* @__PURE__ */ (0, O.jsx)("form", {
7644
7670
  ...n,
7645
7671
  ref: e,
@@ -7648,11 +7674,11 @@ function vr({ ref: e, onSubmit: t, ...n }) {
7648
7674
  }
7649
7675
  });
7650
7676
  }
7651
- process.env.NODE_ENV !== "production" && (vr.displayName = "Form");
7677
+ process.env.NODE_ENV !== "production" && (yr.displayName = "Form");
7652
7678
  //#endregion
7653
7679
  //#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 }) {
7680
+ var br = "base-";
7681
+ 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
7682
  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
7683
  let e = m.current;
7658
7684
  if (!e) return;
@@ -7665,29 +7691,29 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7665
7691
  let a = [...Array(r)].map(() => 0);
7666
7692
  for (let e of Array.from(t)) {
7667
7693
  if (!(e instanceof HTMLElement)) continue;
7668
- let t = Tr(e, o), [c, l] = Cr(a, t);
7694
+ let t = Er(e, o), [c, l] = wr(a, t);
7669
7695
  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
7696
  for (let n = 0; n < t; n++) a[c + n] = l + (l === 0 ? 0 : s) + X.from(e).height;
7671
7697
  if (n && c + t === r) {
7672
- let e = wr(a);
7698
+ let e = Tr(a);
7673
7699
  for (let t = 0; t < r; t++) a[t] = e;
7674
7700
  }
7675
7701
  }
7676
- let c = C(), l = wr(a, r);
7702
+ let c = C(), l = Tr(a, r);
7677
7703
  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
7704
  } else {
7679
7705
  let a = [...Array(r)].map(() => 0);
7680
7706
  for (let e of Array.from(t)) {
7681
7707
  if (!(e instanceof HTMLElement)) continue;
7682
- let t = Tr(e, o), [c, l] = Cr(a, t);
7708
+ let t = Er(e, o), [c, l] = wr(a, t);
7683
7709
  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
7710
  for (let n = 0; n < t; n++) a[c + n] = l + (l === 0 ? 0 : i) + X.from(e).width;
7685
7711
  if (n && c + t === r) {
7686
- let e = wr(a);
7712
+ let e = Tr(a);
7687
7713
  for (let t = 0; t < r; t++) a[t] = e;
7688
7714
  }
7689
7715
  }
7690
- let c = T(), l = wr(a, r);
7716
+ let c = T(), l = Tr(a, r);
7691
7717
  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
7718
  }
7693
7719
  };
@@ -7702,7 +7728,7 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7702
7728
  s,
7703
7729
  a
7704
7730
  ])), l(() => {
7705
- let e = Er(m.current?.innerHTML);
7731
+ let e = Dr(m.current?.innerHTML);
7706
7732
  if (e.length === 0) return E();
7707
7733
  let t = e.length;
7708
7734
  for (let n = 0; n < t; n++) {
@@ -7710,7 +7736,7 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7710
7736
  r.src = t, r.onload = () => E();
7711
7737
  }
7712
7738
  }, [r]);
7713
- let D = xr({ orientation: a }), k = Sr({
7739
+ let D = Sr({ orientation: a }), k = Cr({
7714
7740
  minHeight: _,
7715
7741
  minWidth: h,
7716
7742
  orientation: a
@@ -7727,10 +7753,10 @@ function br({ className: e, ref: t, alignSections: n = !1, children: r, horizont
7727
7753
  })
7728
7754
  });
7729
7755
  }
7730
- function xr({ orientation: e = "horizontal" }) {
7756
+ function Sr({ orientation: e = "horizontal" }) {
7731
7757
  return A({ root: w(e) });
7732
7758
  }
7733
- function Sr({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizontal" }) {
7759
+ function Cr({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizontal" }) {
7734
7760
  return M({ body: {
7735
7761
  height: n === "horizontal" ? "100%" : "auto",
7736
7762
  minHeight: n === "vertical" && !isNaN(e) ? `${e}px` : "",
@@ -7739,28 +7765,28 @@ function Sr({ minHeight: e = NaN, minWidth: t = NaN, orientation: n = "horizonta
7739
7765
  width: n === "horizontal" ? "auto" : "100%"
7740
7766
  } });
7741
7767
  }
7742
- function Cr(e, t) {
7768
+ function wr(e, t) {
7743
7769
  let n = e.length, r = NaN, i = Infinity;
7744
7770
  for (let a = 0; a < n; a++) {
7745
7771
  let o = e[a], s = o < i, c = a + t <= n, l = !0;
7746
7772
  for (let n = 1; n < t; n++) e[a + n] > o && (l = !1);
7747
7773
  s && c && l && (r = a, i = o);
7748
7774
  }
7749
- return isNaN(r) ? [0, wr(e, t)] : [r, i];
7775
+ return isNaN(r) ? [0, Tr(e, t)] : [r, i];
7750
7776
  }
7751
- function wr(e, t) {
7777
+ function Tr(e, t) {
7752
7778
  let n = e;
7753
7779
  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
7780
  }
7755
- function Tr(e, t) {
7781
+ function Er(e, t) {
7756
7782
  let n = e.classList;
7757
- for (let e of Array.from(n)) if (e.startsWith(yr)) {
7758
- let n = parseFloat(e.replace(yr, ""));
7783
+ for (let e of Array.from(n)) if (e.startsWith(br)) {
7784
+ let n = parseFloat(e.replace(br, ""));
7759
7785
  if (!isNaN(n)) return Math.min(Math.max(n, 1), t);
7760
7786
  }
7761
7787
  return 1;
7762
7788
  }
7763
- function Er(e) {
7789
+ function Dr(e) {
7764
7790
  if (!e) return [];
7765
7791
  let t = /<img.*?src=(["'])(.*?)\1/g, n = /<img.*?src=(["'])(.*?)\1/, r = t.exec(e) ?? [], i = [];
7766
7792
  for (let e of r) {
@@ -7769,11 +7795,11 @@ function Er(e) {
7769
7795
  }
7770
7796
  return i;
7771
7797
  }
7772
- process.env.NODE_ENV === "development" && (br.displayName = "MasonryGrid");
7798
+ process.env.NODE_ENV === "development" && (xr.displayName = "MasonryGrid");
7773
7799
  //#endregion
7774
7800
  //#region src/primitives/RangeSlider.tsx
7775
7801
  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), [
7802
+ 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
7803
  o,
7778
7804
  a,
7779
7805
  p
@@ -7784,8 +7810,8 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7784
7810
  track: $.Track,
7785
7811
  trackHighlight: $.TrackHighlight
7786
7812
  }), 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);
7813
+ 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);
7814
+ 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
7815
  }, [
7790
7816
  i,
7791
7817
  n,
@@ -7796,8 +7822,8 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7796
7822
  N.width,
7797
7823
  N.height
7798
7824
  ]), 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);
7825
+ 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);
7826
+ 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
7827
  }, [
7802
7828
  i,
7803
7829
  n,
@@ -7808,7 +7834,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7808
7834
  N.width,
7809
7835
  N.height
7810
7836
  ]), 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}%`;
7837
+ 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
7838
  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
7839
  }, [
7814
7840
  m,
@@ -7824,7 +7850,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7824
7850
  vt(S, {
7825
7851
  onDragEnd: () => {
7826
7852
  V(S.current, !1);
7827
- let e = I ? Pr(A.current, I) : A.current;
7853
+ let e = I ? Fr(A.current, I) : A.current;
7828
7854
  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
7855
  },
7830
7856
  onDragMove: ({ x: e, y: t }) => {
@@ -7837,7 +7863,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7837
7863
  }), vt(C, {
7838
7864
  onDragEnd: () => {
7839
7865
  V(C.current, !1);
7840
- let e = I ? Pr(M.current, I) : M.current;
7866
+ let e = I ? Fr(M.current, I) : M.current;
7841
7867
  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
7868
  },
7843
7869
  onDragMove: ({ x: e, y: t }) => {
@@ -7854,7 +7880,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7854
7880
  k,
7855
7881
  B
7856
7882
  ]);
7857
- let H = d(() => Dr({
7883
+ let H = d(() => Or({
7858
7884
  knobHeight: n,
7859
7885
  knobPadding: r,
7860
7886
  knobWidth: i,
@@ -7923,7 +7949,7 @@ function $({ ref: e, children: t, knobHeight: n = 28, knobPadding: r = 0, knobWi
7923
7949
  (function(e) {
7924
7950
  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
7951
  })($ ||= {});
7926
- function Dr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "horizontal" }) {
7952
+ function Or({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "horizontal" }) {
7927
7953
  return M({
7928
7954
  body: {
7929
7955
  height: "100%",
@@ -7972,10 +7998,10 @@ function Dr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientati
7972
7998
  }
7973
7999
  });
7974
8000
  }
7975
- function Or(e, t, n) {
8001
+ function kr(e, t, n) {
7976
8002
  return (e - t) / (n - t);
7977
8003
  }
7978
- function kr(e, t, n, r, i, a, o) {
8004
+ function Ar(e, t, n, r, i, a, o) {
7979
8005
  switch (t) {
7980
8006
  case "horizontal": {
7981
8007
  let t = o ? n - i : n;
@@ -7988,23 +8014,23 @@ function kr(e, t, n, r, i, a, o) {
7988
8014
  default: return console.error(`[etudes::RangeSlider] Invalid orientation: ${t}`), NaN;
7989
8015
  }
7990
8016
  }
7991
- function Ar(e, t, n) {
8017
+ function jr(e, t, n) {
7992
8018
  return e * (n - t) + t;
7993
8019
  }
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);
8020
+ function Mr(e, t, n, r, i, a, o, s, c) {
8021
+ return jr(Ar(e, r, i, a, o, s, c), t, n);
7996
8022
  }
7997
- function Mr(e, t, n, r, i, a, o) {
8023
+ function Nr(e, t, n, r, i, a, o) {
7998
8024
  switch (t) {
7999
8025
  case "horizontal": return e * (o ? n - i : n) + (o ? i * .5 : 0);
8000
8026
  case "vertical": return e * (o ? r - a : r) + (o ? a * .5 : 0);
8001
8027
  default: return console.error(`[etudes::RangeSlider] Invalid orientation: ${t}`), NaN;
8002
8028
  }
8003
8029
  }
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);
8030
+ function Pr(e, t, n, r, i, a, o, s, c) {
8031
+ return Nr(kr(e, t, n), r, i, a, o, s, c);
8006
8032
  }
8007
- function Pr(e, t) {
8033
+ function Fr(e, t) {
8008
8034
  let n = t.length, r = 0, i = Infinity;
8009
8035
  for (let a = 0; a < n; a++) {
8010
8036
  let n = t[a], o = Math.abs(e - n);
@@ -8012,21 +8038,21 @@ function Pr(e, t) {
8012
8038
  }
8013
8039
  return t[r];
8014
8040
  }
8015
- function Fr(e, t, n) {
8041
+ function Ir(e, t, n) {
8016
8042
  if (!(n < 0)) return [
8017
8043
  e,
8018
8044
  ...[...Array(n)].map((r, i) => e + (i + 1) * (t - e) / (1 + n)),
8019
8045
  t
8020
8046
  ];
8021
8047
  }
8022
- function Ir(e, t, n) {
8048
+ function Lr(e, t, n) {
8023
8049
  return Math.max(n, Math.min(t, e));
8024
8050
  }
8025
8051
  process.env.NODE_ENV === "development" && ($.displayName = "RangeSlider", $.Knob.displayName = "RangeSlider.Knob", $.Label.displayName = "RangeSlider.Label", $.Track.displayName = "RangeSlider.Track", $.TrackHighlight.displayName = "RangeSlider.TrackHighlight");
8026
8052
  //#endregion
8027
8053
  //#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({
8054
+ 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 }) {
8055
+ 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
8056
  orientation: o,
8031
8057
  scrollSnapEnabled: A || !N
8032
8058
  }), L = t > 0, R = c(() => {
@@ -8036,9 +8062,9 @@ function Lr({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
8036
8062
  clearTimeout(x.current), x.current = void 0;
8037
8063
  }, S);
8038
8064
  }, [S, R]), B = c(() => {
8039
- Rr(v, r, o), z();
8065
+ zr(v, r, o), z();
8040
8066
  }, [r, o]), V = c(() => {
8041
- M(zr(v, o));
8067
+ M(Br(v, o));
8042
8068
  }, [o]), H = c((e) => {
8043
8069
  A || (y.current = K.make(e.clientX, e.clientY), P(!0));
8044
8070
  }, [A]), U = c((e) => {
@@ -8135,7 +8161,7 @@ function Lr({ ref: e, autoAdvanceInterval: t = 0, dragSpeed: n = 1, index: r = 0
8135
8161
  })
8136
8162
  });
8137
8163
  }
8138
- function Rr(e, t, n) {
8164
+ function zr(e, t, n) {
8139
8165
  let r = e?.current;
8140
8166
  if (!r) return;
8141
8167
  let i = n === "horizontal" ? 0 : r.clientHeight * t, a = n === "horizontal" ? r.clientWidth * t : 0;
@@ -8145,14 +8171,14 @@ function Rr(e, t, n) {
8145
8171
  top: i
8146
8172
  });
8147
8173
  }
8148
- function zr(e, t) {
8174
+ function Br(e, t) {
8149
8175
  let n = e?.current;
8150
8176
  if (!n) return;
8151
8177
  let r = [];
8152
- for (let i = 0; i < n.children.length; i++) r.push(Br(i, e, t));
8178
+ for (let i = 0; i < n.children.length; i++) r.push(Vr(i, e, t));
8153
8179
  return r;
8154
8180
  }
8155
- function Br(e, t, n) {
8181
+ function Vr(e, t, n) {
8156
8182
  let r = t?.current, i = r?.children[e];
8157
8183
  if (!i) return 0;
8158
8184
  let a = X.intersecting(i, r);
@@ -8162,7 +8188,7 @@ function Br(e, t, n) {
8162
8188
  default: return console.error(`[etudes::ScrollableCarousel] Unsupported orientation: ${n}`), NaN;
8163
8189
  }
8164
8190
  }
8165
- function Vr({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
8191
+ function Hr({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
8166
8192
  return M({
8167
8193
  item: {
8168
8194
  height: "100%",
@@ -8198,40 +8224,40 @@ function Vr({ orientation: e = "horizontal", scrollSnapEnabled: t = !1 }) {
8198
8224
  }
8199
8225
  });
8200
8226
  }
8201
- process.env.NODE_ENV === "development" && (Lr.displayName = "ScrollableCarousel");
8227
+ process.env.NODE_ENV === "development" && (Rr.displayName = "ScrollableCarousel");
8202
8228
  //#endregion
8203
8229
  //#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 }) {
8230
+ 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
8231
  let d = j(n, {
8206
- expandIcon: Hr.ExpandIcon,
8207
- option: Hr.Option,
8208
- toggle: Hr.Toggle
8232
+ expandIcon: Ur.ExpandIcon,
8233
+ option: Ur.Option,
8234
+ toggle: Ur.Toggle
8209
8235
  });
8210
8236
  return /* @__PURE__ */ (0, O.jsxs)("div", {
8211
8237
  ...u,
8212
8238
  ref: t,
8213
- style: Ur.root,
8239
+ style: Wr.root,
8214
8240
  children: [/* @__PURE__ */ (0, O.jsxs)(P, {
8215
- style: Ur.select,
8241
+ style: Wr.select,
8216
8242
  "aria-required": s ? "true" : void 0,
8217
- element: d.toggle ?? /* @__PURE__ */ (0, O.jsx)(Hr.Toggle, {}),
8243
+ element: d.toggle ?? /* @__PURE__ */ (0, O.jsx)(Ur.Toggle, {}),
8218
8244
  name: r,
8219
8245
  required: s,
8220
8246
  value: o,
8221
8247
  onChange: (e) => l?.(e.target.value),
8222
8248
  children: [a !== void 0 && /* @__PURE__ */ (0, O.jsx)(P, {
8223
8249
  disabled: !0,
8224
- element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Hr.Option, {}),
8250
+ element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Ur.Option, {}),
8225
8251
  hidden: !0,
8226
8252
  value: "",
8227
8253
  children: a
8228
8254
  }), i.map((e, t) => /* @__PURE__ */ (0, O.jsx)(P, {
8229
- element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Hr.Option, {}),
8255
+ element: d.option ?? /* @__PURE__ */ (0, O.jsx)(Ur.Option, {}),
8230
8256
  value: e,
8231
8257
  children: c(e)
8232
8258
  }, `${t}-${e}`))]
8233
8259
  }), d.expandIcon && /* @__PURE__ */ (0, O.jsx)(P, {
8234
- style: Ur.expandIcon,
8260
+ style: Wr.expandIcon,
8235
8261
  element: d.expandIcon
8236
8262
  })]
8237
8263
  });
@@ -8246,8 +8272,8 @@ function Hr({ id: e, ref: t, children: n, name: r, options: i, placeholder: a, v
8246
8272
  ...t,
8247
8273
  children: e
8248
8274
  });
8249
- })(Hr ||= {});
8250
- var Ur = M({
8275
+ })(Ur ||= {});
8276
+ var Wr = M({
8251
8277
  expandIcon: {
8252
8278
  pointerEvents: "none",
8253
8279
  zIndex: 1
@@ -8269,20 +8295,20 @@ var Ur = M({
8269
8295
  width: "100%"
8270
8296
  }
8271
8297
  });
8272
- process.env.NODE_ENV === "development" && (Hr.displayName = "Select", Hr.ExpandIcon.displayName = "Select.ExpandIcon", Hr.Option.displayName = "Select.Option", Hr.Toggle.displayName = "Select.Toggle");
8298
+ process.env.NODE_ENV === "development" && (Ur.displayName = "Select", Ur.ExpandIcon.displayName = "Select.ExpandIcon", Ur.Option.displayName = "Select.Option", Ur.Toggle.displayName = "Select.Toggle");
8273
8299
  //#endregion
8274
8300
  //#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 }) {
8301
+ 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
8302
  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);
8303
+ let o = Jr(e, p);
8278
8304
  switch (a) {
8279
8305
  case "horizontal": {
8280
8306
  let n = l ? D.width - i : D.width;
8281
- return n <= 0 ? e : Kr(Jr((o * n + t) / n), p);
8307
+ return n <= 0 ? e : qr(Yr((o * n + t) / n), p);
8282
8308
  }
8283
8309
  case "vertical": {
8284
8310
  let t = l ? D.height - n : D.height;
8285
- return t <= 0 ? e : Kr(Jr((o * t + r) / t), p);
8311
+ return t <= 0 ? e : qr(Yr((o * t + r) / t), p);
8286
8312
  }
8287
8313
  default: return console.error(`[etudes::Slider] Invalid orientation: ${a}`), NaN;
8288
8314
  }
@@ -8295,7 +8321,7 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8295
8321
  n,
8296
8322
  a
8297
8323
  ]), 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`;
8324
+ 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
8325
  switch (a) {
8300
8326
  case "horizontal":
8301
8327
  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 +8351,11 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8325
8351
  switch (a) {
8326
8352
  case "horizontal":
8327
8353
  if (D.width <= 0) return;
8328
- n = Kr((e.clientX + t.left - D.left) / D.width, p);
8354
+ n = qr((e.clientX + t.left - D.left) / D.width, p);
8329
8355
  break;
8330
8356
  case "vertical":
8331
8357
  if (D.height <= 0) return;
8332
- n = Kr((e.clientY + t.top - D.top) / D.height, p);
8358
+ n = qr((e.clientY + t.top - D.top) / D.height, p);
8333
8359
  break;
8334
8360
  default:
8335
8361
  console.error(`[etudes::Slider] Invalid orientation: ${a}`);
@@ -8359,7 +8385,7 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8359
8385
  }), u(() => {
8360
8386
  E.current || (T.current = o, A(o));
8361
8387
  }, [o, A]);
8362
- let I = p ? o === 0 : o === 1, L = p ? o === 1 : o === 0, R = d(() => Gr({
8388
+ let I = p ? o === 0 : o === 1, L = p ? o === 1 : o === 0, R = d(() => Kr({
8363
8389
  knobHeight: n,
8364
8390
  knobPadding: r,
8365
8391
  knobWidth: i,
@@ -8372,10 +8398,10 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8372
8398
  a,
8373
8399
  m
8374
8400
  ]), z = j(t, {
8375
- knob: Wr.Knob,
8376
- knobContainer: Wr.KnobContainer,
8377
- label: Wr.Label,
8378
- track: Wr.Track
8401
+ knob: Gr.Knob,
8402
+ knobContainer: Gr.KnobContainer,
8403
+ label: Gr.Label,
8404
+ track: Gr.Track
8379
8405
  });
8380
8406
  return /* @__PURE__ */ (0, O.jsx)("div", {
8381
8407
  ...y,
@@ -8394,7 +8420,7 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8394
8420
  ref: C,
8395
8421
  style: F(R.track, a === "vertical" ? { top: "0" } : { left: "0" }),
8396
8422
  "data-side": p ? "end" : "start",
8397
- element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Wr.Track, {}),
8423
+ element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Gr.Track, {}),
8398
8424
  onClick: N,
8399
8425
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: R.trackHitBox })
8400
8426
  }),
@@ -8402,20 +8428,20 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8402
8428
  ref: w,
8403
8429
  style: F(R.track, a === "vertical" ? { bottom: "0" } : { right: "0" }),
8404
8430
  "data-side": p ? "start" : "end",
8405
- element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Wr.Track, {}),
8431
+ element: z.track ?? /* @__PURE__ */ (0, O.jsx)(Gr.Track, {}),
8406
8432
  onClick: N,
8407
8433
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: R.trackHitBox })
8408
8434
  }),
8409
8435
  /* @__PURE__ */ (0, O.jsx)(P, {
8410
8436
  ref: S,
8411
8437
  style: R.knobContainer,
8412
- element: z.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Wr.KnobContainer, {}),
8438
+ element: z.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Gr.KnobContainer, {}),
8413
8439
  children: /* @__PURE__ */ (0, O.jsxs)(P, {
8414
8440
  style: F(R.knob),
8415
- element: z.knob ?? /* @__PURE__ */ (0, O.jsx)(Wr.Knob, {}),
8441
+ element: z.knob ?? /* @__PURE__ */ (0, O.jsx)(Gr.Knob, {}),
8416
8442
  children: [/* @__PURE__ */ (0, O.jsx)("div", { style: R.knobHitBox }), h && /* @__PURE__ */ (0, O.jsx)(P, {
8417
8443
  style: F(R.label),
8418
- element: z.label ?? /* @__PURE__ */ (0, O.jsx)(Wr.Label, {}),
8444
+ element: z.label ?? /* @__PURE__ */ (0, O.jsx)(Gr.Label, {}),
8419
8445
  children: h(o)
8420
8446
  })]
8421
8447
  })
@@ -8426,8 +8452,8 @@ function Wr({ ref: e, children: t, knobHeight: n = 30, knobPadding: r = 0, knobW
8426
8452
  }
8427
8453
  (function(e) {
8428
8454
  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 }) {
8455
+ })(Gr ||= {});
8456
+ function Kr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "vertical", isTrackInteractive: i = !0 }) {
8431
8457
  return M({
8432
8458
  body: {
8433
8459
  height: "100%",
@@ -8486,29 +8512,29 @@ function Gr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientati
8486
8512
  }
8487
8513
  });
8488
8514
  }
8489
- function Kr(e, t) {
8515
+ function qr(e, t) {
8490
8516
  return t ? 1 - e : e;
8491
8517
  }
8492
- function qr(e, t) {
8518
+ function Jr(e, t) {
8493
8519
  return t ? 1 - e : e;
8494
8520
  }
8495
- function Jr(e, t = 1, n = 0) {
8521
+ function Yr(e, t = 1, n = 0) {
8496
8522
  return Math.max(n, Math.min(t, e));
8497
8523
  }
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");
8524
+ 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
8525
  //#endregion
8500
8526
  //#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);
8527
+ 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 }) {
8528
+ 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) => {
8529
+ let i = ni(e, m);
8504
8530
  switch (o) {
8505
8531
  case "horizontal": {
8506
8532
  let n = p ? M.width - a : M.width;
8507
- return n <= 0 ? e : ei(ni((i * n + t) / n), m);
8533
+ return n <= 0 ? e : ti(ri((i * n + t) / n), m);
8508
8534
  }
8509
8535
  case "vertical": {
8510
8536
  let t = p ? M.height - r : M.height;
8511
- return t <= 0 ? e : ei(ni((i * t + n) / t), m);
8537
+ return t <= 0 ? e : ti(ri((i * t + n) / t), m);
8512
8538
  }
8513
8539
  default: return console.error(`[etudes::StepSlider] Invalid orientation: ${o}`), NaN;
8514
8540
  }
@@ -8521,7 +8547,7 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8521
8547
  r,
8522
8548
  o
8523
8549
  ]), 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`;
8550
+ 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
8551
  switch (o) {
8526
8552
  case "horizontal":
8527
8553
  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 +8577,19 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8551
8577
  switch (o) {
8552
8578
  case "horizontal":
8553
8579
  if (M.width <= 0) return;
8554
- n = ei((e.clientX + t.left - M.left) / M.width, m);
8580
+ n = ti((e.clientX + t.left - M.left) / M.width, m);
8555
8581
  break;
8556
8582
  case "vertical":
8557
8583
  if (M.height <= 0) return;
8558
- n = ei((e.clientY + t.top - M.top) / M.height, m);
8584
+ n = ti((e.clientY + t.top - M.top) / M.height, m);
8559
8585
  break;
8560
8586
  default:
8561
8587
  console.error(`[etudes::StepSlider] Invalid orientation: ${o}`);
8562
8588
  return;
8563
8589
  }
8564
- let r = Qr(n, s), i = r === k.current ? ni(n > D.current ? r + 1 : r - 1, s.length - 1) : r;
8590
+ let r = $r(n, s), i = r === k.current ? ri(n > D.current ? r + 1 : r - 1, s.length - 1) : r;
8565
8591
  if (i !== k.current) {
8566
- let e = $r(i, s);
8592
+ let e = ei(i, s);
8567
8593
  k.current = i, D.current = e, I(e), b?.(e, !1), y?.(i, !1);
8568
8594
  }
8569
8595
  }, [
@@ -8580,14 +8606,14 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8580
8606
  vt(w, {
8581
8607
  onDragEnd: () => {
8582
8608
  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);
8609
+ let e = $r(D.current, s), t = ei(e, s);
8584
8610
  D.current = t, k.current = e, I(t), b?.(t, !1), y?.(e, !1), _?.();
8585
8611
  },
8586
8612
  onDragMove: ({ x: e, y: t }) => {
8587
8613
  let n = N(D.current, e, t);
8588
8614
  if (n !== D.current) {
8589
8615
  D.current = n, I(n), b?.(n, !0);
8590
- let e = Qr(n, s);
8616
+ let e = $r(n, s);
8591
8617
  e !== k.current && (k.current = e, y?.(e, !0));
8592
8618
  }
8593
8619
  A.current = !0, S.current?.classList.add("dragging"), w.current?.classList.add("dragging");
@@ -8597,14 +8623,14 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8597
8623
  }
8598
8624
  }), u(() => {
8599
8625
  if (A.current) return;
8600
- let e = $r(n, s);
8626
+ let e = ei(n, s);
8601
8627
  k.current = n, D.current = e, I(e);
8602
8628
  }, [
8603
8629
  n,
8604
8630
  I,
8605
8631
  _t(s)
8606
8632
  ]);
8607
- let z = $r(n, s), B = m ? z === 0 : z === 1, V = m ? z === 1 : z === 0, H = d(() => Xr({
8633
+ let z = ei(n, s), B = m ? z === 0 : z === 1, V = m ? z === 1 : z === 0, H = d(() => Zr({
8608
8634
  knobHeight: r,
8609
8635
  knobPadding: i,
8610
8636
  knobWidth: a,
@@ -8617,10 +8643,10 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8617
8643
  o,
8618
8644
  h
8619
8645
  ]), U = j(t, {
8620
- knob: Yr.Knob,
8621
- knobContainer: Yr.KnobContainer,
8622
- label: Yr.Label,
8623
- track: Yr.Track
8646
+ knob: Xr.Knob,
8647
+ knobContainer: Xr.KnobContainer,
8648
+ label: Xr.Label,
8649
+ track: Xr.Track
8624
8650
  });
8625
8651
  return /* @__PURE__ */ (0, O.jsx)("div", {
8626
8652
  ...x,
@@ -8639,7 +8665,7 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8639
8665
  ref: T,
8640
8666
  style: F(H.track, o === "vertical" ? { top: "0" } : { left: "0" }),
8641
8667
  "data-side": m ? "end" : "start",
8642
- element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Yr.Track, {}),
8668
+ element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Xr.Track, {}),
8643
8669
  onClick: R,
8644
8670
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: H.trackHitBox })
8645
8671
  }),
@@ -8647,20 +8673,20 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8647
8673
  ref: E,
8648
8674
  style: F(H.track, o === "vertical" ? { bottom: "0" } : { right: "0" }),
8649
8675
  "data-side": m ? "start" : "end",
8650
- element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Yr.Track, {}),
8676
+ element: U.track ?? /* @__PURE__ */ (0, O.jsx)(Xr.Track, {}),
8651
8677
  onClick: R,
8652
8678
  children: /* @__PURE__ */ (0, O.jsx)("div", { style: H.trackHitBox })
8653
8679
  }),
8654
8680
  /* @__PURE__ */ (0, O.jsx)(P, {
8655
8681
  ref: w,
8656
8682
  style: F(H.knobContainer),
8657
- element: U.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Yr.KnobContainer, {}),
8683
+ element: U.knobContainer ?? /* @__PURE__ */ (0, O.jsx)(Xr.KnobContainer, {}),
8658
8684
  children: /* @__PURE__ */ (0, O.jsxs)(P, {
8659
8685
  style: F(H.knob),
8660
- element: U.knob ?? /* @__PURE__ */ (0, O.jsx)(Yr.Knob, {}),
8686
+ element: U.knob ?? /* @__PURE__ */ (0, O.jsx)(Xr.Knob, {}),
8661
8687
  children: [/* @__PURE__ */ (0, O.jsx)("div", { style: H.knobHitBox }), g && /* @__PURE__ */ (0, O.jsx)(P, {
8662
8688
  style: F(H.label),
8663
- element: U.label ?? /* @__PURE__ */ (0, O.jsx)(Yr.Label, {}),
8689
+ element: U.label ?? /* @__PURE__ */ (0, O.jsx)(Xr.Label, {}),
8664
8690
  children: g(z, n)
8665
8691
  })]
8666
8692
  })
@@ -8670,9 +8696,9 @@ function Yr({ ref: e, children: t, index: n = 0, knobHeight: r = 30, knobPadding
8670
8696
  });
8671
8697
  }
8672
8698
  (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 }) {
8699
+ 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;
8700
+ })(Xr ||= {});
8701
+ function Zr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientation: r = "vertical", isTrackInteractive: i = !1 }) {
8676
8702
  return M({
8677
8703
  body: {
8678
8704
  height: "100%",
@@ -8731,38 +8757,38 @@ function Xr({ knobHeight: e = 0, knobPadding: t = 0, knobWidth: n = 0, orientati
8731
8757
  }
8732
8758
  });
8733
8759
  }
8734
- function Zr(e) {
8760
+ function Qr(e) {
8735
8761
  if (e <= 1) return console.error("[etudes::StepSlider] `length` value must be greater than or equal to 2"), [];
8736
8762
  if (Math.round(e) !== e) return console.error("[etudes::StepSlider] `length` value must be an integer"), [];
8737
8763
  let t = 1 / (e - 1);
8738
8764
  return Array(e).fill(null).map((e, n) => t * n);
8739
8765
  }
8740
- function Qr(e, t) {
8766
+ function $r(e, t) {
8741
8767
  let n = -1, r = NaN;
8742
8768
  for (let i = 0, a = t.length; i < a; i++) {
8743
- let a = $r(i, t);
8769
+ let a = ei(i, t);
8744
8770
  if (isNaN(a)) continue;
8745
8771
  let o = Math.abs(e - a);
8746
8772
  (isNaN(r) || o < r) && (r = o, n = i);
8747
8773
  }
8748
8774
  return n;
8749
8775
  }
8750
- function $r(e, t) {
8776
+ function ei(e, t) {
8751
8777
  return e >= t.length ? NaN : t[e];
8752
8778
  }
8753
- function ei(e, t) {
8779
+ function ti(e, t) {
8754
8780
  return t ? 1 - e : e;
8755
8781
  }
8756
- function ti(e, t) {
8782
+ function ni(e, t) {
8757
8783
  return t ? 1 - e : e;
8758
8784
  }
8759
- function ni(e, t = 1, n = 0) {
8785
+ function ri(e, t = 1, n = 0) {
8760
8786
  return Math.max(n, Math.min(t, e));
8761
8787
  }
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");
8788
+ 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
8789
  //#endregion
8764
8790
  //#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 }) {
8791
+ function ii({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipeDown: i, onSwipeLeft: a, onSwipeRight: o, onSwipeUp: s, ...c }) {
8766
8792
  let [l, u] = p(void 0), [d, f] = p(void 0), [m, h] = p(NaN), g = (e, t) => {
8767
8793
  if (isNaN(e) || isNaN(t)) return y();
8768
8794
  u(K.make(e, t));
@@ -8790,24 +8816,24 @@ function ri({ ref: e, children: t, threshold: n = .5, isEnabled: r = !0, onSwipe
8790
8816
  children: t
8791
8817
  });
8792
8818
  }
8793
- process.env.NODE_ENV === "development" && (ri.displayName = "SwipeRegion");
8819
+ process.env.NODE_ENV === "development" && (ii.displayName = "SwipeRegion");
8794
8820
  //#endregion
8795
8821
  //#region src/primitives/TextArea.tsx
8796
- function ii({ ref: e, onChange: t, ...n }) {
8822
+ function ai({ ref: e, onChange: t, ...n }) {
8797
8823
  return /* @__PURE__ */ (0, O.jsx)("textarea", {
8798
8824
  ...n,
8799
8825
  ref: e,
8800
8826
  onChange: (e) => t(e.target.value)
8801
8827
  });
8802
8828
  }
8803
- process.env.NODE_ENV === "development" && (ii.displayName = "TextArea");
8829
+ process.env.NODE_ENV === "development" && (ai.displayName = "TextArea");
8804
8830
  //#endregion
8805
8831
  //#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 }) {
8832
+ function oi({ className: e, ref: t, style: n, children: r, orientation: i = "horizontal", isInverted: a = !1, isOn: o = !1, onChange: s, ...c }) {
8807
8833
  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({
8834
+ knob: oi.Knob,
8835
+ track: oi.Track
8836
+ }), p = si({ isOn: o }), m = ci({
8811
8837
  knobSize: u,
8812
8838
  orientation: i,
8813
8839
  isInverted: a,
@@ -8826,7 +8852,7 @@ function ai({ className: e, ref: t, style: n, children: r, orientation: i = "hor
8826
8852
  }), /* @__PURE__ */ (0, O.jsx)(P, {
8827
8853
  className: p.track,
8828
8854
  style: m.track,
8829
- element: d.track ?? /* @__PURE__ */ (0, O.jsx)(ai.Track, {}),
8855
+ element: d.track ?? /* @__PURE__ */ (0, O.jsx)(oi.Track, {}),
8830
8856
  children: /* @__PURE__ */ (0, O.jsx)("div", {
8831
8857
  style: {
8832
8858
  height: "100%",
@@ -8837,7 +8863,7 @@ function ai({ className: e, ref: t, style: n, children: r, orientation: i = "hor
8837
8863
  className: p.knob,
8838
8864
  ref: l,
8839
8865
  style: m.knob,
8840
- element: d.knob ?? /* @__PURE__ */ (0, O.jsx)(ai.Knob, {})
8866
+ element: d.knob ?? /* @__PURE__ */ (0, O.jsx)(oi.Knob, {})
8841
8867
  })
8842
8868
  })
8843
8869
  })]
@@ -8851,15 +8877,15 @@ function ai({ className: e, ref: t, style: n, children: r, orientation: i = "hor
8851
8877
  ...t,
8852
8878
  children: e
8853
8879
  });
8854
- })(ai ||= {});
8855
- function oi({ isOn: e = !1 }) {
8880
+ })(oi ||= {});
8881
+ function si({ isOn: e = !1 }) {
8856
8882
  return A({
8857
8883
  knob: w({ active: e }),
8858
8884
  root: w({ active: e }),
8859
8885
  track: w({ active: e })
8860
8886
  });
8861
8887
  }
8862
- function si({ knobSize: e = q.zero, orientation: t = "horizontal", isInverted: n = !1, isOn: r = !1 }) {
8888
+ function ci({ knobSize: e = q.zero, orientation: t = "horizontal", isInverted: n = !1, isOn: r = !1 }) {
8863
8889
  return M({
8864
8890
  input: {
8865
8891
  height: 0,
@@ -8889,40 +8915,40 @@ function si({ knobSize: e = q.zero, orientation: t = "horizontal", isInverted: n
8889
8915
  track: { position: "relative" }
8890
8916
  });
8891
8917
  }
8892
- process.env.NODE_ENV === "development" && (ai.displayName = "Toggle", ai.Knob.displayName = "Toggle.Knob", ai.Track.displayName = "Toggle.Track");
8918
+ process.env.NODE_ENV === "development" && (oi.displayName = "Toggle", oi.Knob.displayName = "Toggle.Knob", oi.Track.displayName = "Toggle.Track");
8893
8919
  //#endregion
8894
8920
  //#region src/providers/ScrollPositionProvider.tsx
8895
- var ci = {
8921
+ var li = {
8896
8922
  current: K.zero,
8897
8923
  end: K.zero,
8898
8924
  progress: K.zero,
8899
8925
  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);
8926
+ }, ui = a(li), di = a(!0), fi = a(!1);
8927
+ function pi({ children: e, scrollBottomOffset: t = 0, scrollTopOffset: n = 0, target: r }) {
8928
+ let [i, a] = p(!0), [o, s] = p(!1), [c, l] = p(li);
8903
8929
  return fn(r, (e) => {
8904
8930
  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, {
8931
+ }), /* @__PURE__ */ (0, O.jsx)(di.Provider, {
8906
8932
  value: i,
8907
- children: /* @__PURE__ */ (0, O.jsx)(di.Provider, {
8933
+ children: /* @__PURE__ */ (0, O.jsx)(fi.Provider, {
8908
8934
  value: o,
8909
- children: /* @__PURE__ */ (0, O.jsx)(li.Provider, {
8935
+ children: /* @__PURE__ */ (0, O.jsx)(ui.Provider, {
8910
8936
  value: c,
8911
8937
  children: e
8912
8938
  })
8913
8939
  })
8914
8940
  });
8915
8941
  }
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
8942
  function mi() {
8921
8943
  let e = s(di);
8922
- return e === void 0 && console.warn("[etudes::useIsScrollBottom] `useIsScrollBottom` must be used within a `ScrollPositionProvider`"), e ?? !1;
8944
+ return e === void 0 && console.warn("[etudes::useIsScrollTop] `useIsScrollTop` must be used within a `ScrollPositionProvider`"), e ?? !0;
8923
8945
  }
8924
8946
  function hi() {
8925
- let e = s(li);
8947
+ let e = s(fi);
8948
+ return e === void 0 && console.warn("[etudes::useIsScrollBottom] `useIsScrollBottom` must be used within a `ScrollPositionProvider`"), e ?? !1;
8949
+ }
8950
+ function gi() {
8951
+ let e = s(ui);
8926
8952
  return e || console.warn("[etudes::useScrollPosition] `useScrollPosition` must be used within a `ScrollPositionProvider`"), e ?? {
8927
8953
  current: K.zero,
8928
8954
  end: K.zero,
@@ -8930,26 +8956,26 @@ function hi() {
8930
8956
  start: K.zero
8931
8957
  };
8932
8958
  }
8933
- process.env.NODE_ENV === "development" && (fi.displayName = "ScrollPositionProvider", li.displayName = "ScrollPositionContext", ui.displayName = "ScrollTopContext", di.displayName = "ScrollBottomContext");
8959
+ process.env.NODE_ENV === "development" && (pi.displayName = "ScrollPositionProvider", ui.displayName = "ScrollPositionContext", di.displayName = "ScrollTopContext", fi.displayName = "ScrollBottomContext");
8934
8960
  //#endregion
8935
8961
  //#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);
8962
+ function _i(e) {
8963
+ 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
8964
  }
8939
8965
  //#endregion
8940
8966
  //#region src/utils/ExtractChildren.tsx
8941
- function _i({ children: e, ...n }) {
8967
+ function vi({ children: e, ...n }) {
8942
8968
  return /* @__PURE__ */ (0, O.jsx)(O.Fragment, { children: t.map(e, (e) => o(e) ? N(e, { ...n }) : e) });
8943
8969
  }
8944
- process.env.NODE_ENV === "development" && (_i.displayName = "ExtractChildren");
8970
+ process.env.NODE_ENV === "development" && (vi.displayName = "ExtractChildren");
8945
8971
  //#endregion
8946
8972
  //#region src/utils/getSystemColorScheme.ts
8947
- function vi() {
8973
+ function yi() {
8948
8974
  return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
8949
8975
  }
8950
8976
  //#endregion
8951
8977
  //#region src/utils/NoSSR.tsx
8952
- function yi({ children: e, fallback: t = void 0 }) {
8978
+ function bi({ children: e, fallback: t = void 0 }) {
8953
8979
  let [n, i] = p(!1);
8954
8980
  if (l(() => {
8955
8981
  i(typeof window < "u");
@@ -8959,4 +8985,4 @@ function yi({ children: e, fallback: t = void 0 }) {
8959
8985
  });
8960
8986
  }
8961
8987
  //#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 };
8988
+ 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 };