@acrool/react-picker 0.0.4 → 0.0.5-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as Dn from "react";
2
- import Mn, { createContext as Vt, useContext as U, useLayoutEffect as ta, useEffect as ut, useRef as nt, useInsertionEffect as Zs, useCallback as mt, useMemo as Et, forwardRef as Ee, Fragment as Js, createElement as ea, useId as kn, Component as na, Children as ia, isValidElement as sa, useState as Jt } from "react";
2
+ import Mn, { createContext as Et, useContext as U, useLayoutEffect as ta, useEffect as ut, useRef as nt, useInsertionEffect as Zs, useCallback as mt, useMemo as Vt, forwardRef as Ve, Fragment as Js, createElement as ea, useId as kn, Component as na, Children as ia, isValidElement as sa, useState as Jt } from "react";
3
3
  import ra from "react-dom";
4
4
  var Ot = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Tab = "Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t))(Ot || {});
5
5
  const ce = [
@@ -55,7 +55,7 @@ const wt = {
55
55
  info: la,
56
56
  warning: ca,
57
57
  danger: ua
58
- }, Ln = Vt({
58
+ }, Ln = Et({
59
59
  hide: () => wt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
60
60
  show: () => wt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
61
61
  toggle: () => wt.warning("No toggle method detected, did you embed your app with Acrool/PickerPortal?"),
@@ -75,11 +75,11 @@ var pn = { exports: {} }, Ht = {};
75
75
  * This source code is licensed under the MIT license found in the
76
76
  * LICENSE file in the root directory of this source tree.
77
77
  */
78
- var Vi;
78
+ var Ei;
79
79
  function fa() {
80
- if (Vi)
80
+ if (Ei)
81
81
  return Ht;
82
- Vi = 1;
82
+ Ei = 1;
83
83
  var t = Mn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
84
84
  function r(a, l, c) {
85
85
  var u, f = {}, d = null, p = null;
@@ -125,16 +125,16 @@ function ha() {
125
125
  {
126
126
  var A = x.ReactDebugCurrentFrame, D = A.getStackAddendum();
127
127
  D !== "" && (m += "%s", T = T.concat([D]));
128
- var k = T.map(function(V) {
129
- return String(V);
128
+ var k = T.map(function(E) {
129
+ return String(E);
130
130
  });
131
131
  k.unshift("Warning: " + m), Function.prototype.apply.call(console[h], console, k);
132
132
  }
133
133
  }
134
- var C = !1, w = !1, L = !1, q = !1, E = !1, G;
134
+ var C = !1, w = !1, L = !1, q = !1, V = !1, G;
135
135
  G = Symbol.for("react.module.reference");
136
136
  function H(h) {
137
- return !!(typeof h == "string" || typeof h == "function" || h === i || h === o || E || h === s || h === c || h === u || q || h === p || C || w || L || typeof h == "object" && h !== null && (h.$$typeof === d || h.$$typeof === f || h.$$typeof === r || h.$$typeof === a || h.$$typeof === l || // This needs to include all possible module reference object
137
+ return !!(typeof h == "string" || typeof h == "function" || h === i || h === o || V || h === s || h === c || h === u || q || h === p || C || w || L || typeof h == "object" && h !== null && (h.$$typeof === d || h.$$typeof === f || h.$$typeof === r || h.$$typeof === a || h.$$typeof === l || // This needs to include all possible module reference object
138
138
  // types supported by any Flight configuration anywhere since
139
139
  // we don't know which Flight build this will end up being used
140
140
  // with.
@@ -185,9 +185,9 @@ function ha() {
185
185
  var A = h.displayName || null;
186
186
  return A !== null ? A : Z(h.type) || "Memo";
187
187
  case d: {
188
- var D = h, k = D._payload, V = D._init;
188
+ var D = h, k = D._payload, E = D._init;
189
189
  try {
190
- return Z(V(k));
190
+ return Z(E(k));
191
191
  } catch {
192
192
  return null;
193
193
  }
@@ -222,7 +222,7 @@ function ha() {
222
222
  F++;
223
223
  }
224
224
  }
225
- function Eo() {
225
+ function Vo() {
226
226
  {
227
227
  if (F--, F === 0) {
228
228
  var h = {
@@ -273,8 +273,8 @@ function ha() {
273
273
  }
274
274
  var ze = !1, ye;
275
275
  {
276
- var Vo = typeof WeakMap == "function" ? WeakMap : Map;
277
- ye = new Vo();
276
+ var Eo = typeof WeakMap == "function" ? WeakMap : Map;
277
+ ye = new Eo();
278
278
  }
279
279
  function mi(h, m) {
280
280
  if (!h || ze)
@@ -292,27 +292,27 @@ function ha() {
292
292
  k = Ke.current, Ke.current = null, Ro();
293
293
  try {
294
294
  if (m) {
295
- var V = function() {
295
+ var E = function() {
296
296
  throw Error();
297
297
  };
298
- if (Object.defineProperty(V.prototype, "props", {
298
+ if (Object.defineProperty(E.prototype, "props", {
299
299
  set: function() {
300
300
  throw Error();
301
301
  }
302
302
  }), typeof Reflect == "object" && Reflect.construct) {
303
303
  try {
304
- Reflect.construct(V, []);
304
+ Reflect.construct(E, []);
305
305
  } catch (Y) {
306
306
  A = Y;
307
307
  }
308
- Reflect.construct(h, [], V);
308
+ Reflect.construct(h, [], E);
309
309
  } else {
310
310
  try {
311
- V.call();
311
+ E.call();
312
312
  } catch (Y) {
313
313
  A = Y;
314
314
  }
315
- h.call(V.prototype);
315
+ h.call(E.prototype);
316
316
  }
317
317
  } else {
318
318
  try {
@@ -342,7 +342,7 @@ function ha() {
342
342
  }
343
343
  }
344
344
  } finally {
345
- ze = !1, Ke.current = k, Eo(), Error.prepareStackTrace = D;
345
+ ze = !1, Ke.current = k, Vo(), Error.prepareStackTrace = D;
346
346
  }
347
347
  var Lt = h ? h.displayName || h.name : "", Tt = Lt ? ge(Lt) : "";
348
348
  return typeof h == "function" && ye.set(h, Tt), Tt;
@@ -394,19 +394,19 @@ function ha() {
394
394
  function ko(h, m, T, A, D) {
395
395
  {
396
396
  var k = Function.call.bind(Gt);
397
- for (var V in h)
398
- if (k(h, V)) {
397
+ for (var E in h)
398
+ if (k(h, E)) {
399
399
  var R = void 0;
400
400
  try {
401
- if (typeof h[V] != "function") {
402
- var z = Error((A || "React class") + ": " + T + " type `" + V + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[V] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
401
+ if (typeof h[E] != "function") {
402
+ var z = Error((A || "React class") + ": " + T + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
403
403
  throw z.name = "Invariant Violation", z;
404
404
  }
405
- R = h[V](m, V, A, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
405
+ R = h[E](m, E, A, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
406
406
  } catch (_) {
407
407
  R = _;
408
408
  }
409
- R && !(R instanceof Error) && (Pe(D), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", A || "React class", T, V, typeof R), Pe(null)), R instanceof Error && !(R.message in gi) && (gi[R.message] = !0, Pe(D), y("Failed %s type: %s", T, R.message), Pe(null));
409
+ R && !(R instanceof Error) && (Pe(D), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", A || "React class", T, E, typeof R), Pe(null)), R instanceof Error && !(R.message in gi) && (gi[R.message] = !0, Pe(D), y("Failed %s type: %s", T, R.message), Pe(null));
410
410
  }
411
411
  }
412
412
  }
@@ -485,7 +485,7 @@ function ha() {
485
485
  });
486
486
  }
487
487
  }
488
- var Wo = function(h, m, T, A, D, k, V) {
488
+ var Wo = function(h, m, T, A, D, k, E) {
489
489
  var R = {
490
490
  // This tag allows us to uniquely identify this as a React Element
491
491
  $$typeof: e,
@@ -493,7 +493,7 @@ function ha() {
493
493
  type: h,
494
494
  key: m,
495
495
  ref: T,
496
- props: V,
496
+ props: E,
497
497
  // Record the component responsible for creating this element.
498
498
  _owner: k
499
499
  };
@@ -516,20 +516,20 @@ function ha() {
516
516
  };
517
517
  function $o(h, m, T, A, D) {
518
518
  {
519
- var k, V = {}, R = null, z = null;
519
+ var k, E = {}, R = null, z = null;
520
520
  T !== void 0 && (Pi(T), R = "" + T), Bo(m) && (Pi(m.key), R = "" + m.key), _o(m) && (z = m.ref, Io(m, D));
521
521
  for (k in m)
522
- Gt.call(m, k) && !Fo.hasOwnProperty(k) && (V[k] = m[k]);
522
+ Gt.call(m, k) && !Fo.hasOwnProperty(k) && (E[k] = m[k]);
523
523
  if (h && h.defaultProps) {
524
524
  var _ = h.defaultProps;
525
525
  for (k in _)
526
- V[k] === void 0 && (V[k] = _[k]);
526
+ E[k] === void 0 && (E[k] = _[k]);
527
527
  }
528
528
  if (R || z) {
529
529
  var I = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
530
- R && No(V, I), z && Uo(V, I);
530
+ R && No(E, I), z && Uo(E, I);
531
531
  }
532
- return Wo(h, R, z, D, A, zt.current, V);
532
+ return Wo(h, R, z, D, A, zt.current, E);
533
533
  }
534
534
  }
535
535
  var Xe = x.ReactCurrentOwner, bi = x.ReactDebugCurrentFrame;
@@ -608,8 +608,8 @@ Check the top-level render call using <` + T + ">.");
608
608
  else if (h) {
609
609
  var D = b(h);
610
610
  if (typeof D == "function" && D !== h.entries)
611
- for (var k = D.call(h), V; !(V = k.next()).done; )
612
- Ze(V.value) && Ci(V.value, m);
611
+ for (var k = D.call(h), E; !(E = k.next()).done; )
612
+ Ze(E.value) && Ci(E.value, m);
613
613
  }
614
614
  }
615
615
  }
@@ -651,10 +651,10 @@ Check the top-level render call using <` + T + ">.");
651
651
  }
652
652
  }
653
653
  var Ri = {};
654
- function Ei(h, m, T, A, D, k) {
654
+ function Vi(h, m, T, A, D, k) {
655
655
  {
656
- var V = H(h);
657
- if (!V) {
656
+ var E = H(h);
657
+ if (!E) {
658
658
  var R = "";
659
659
  (h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
660
660
  var z = Ko(D);
@@ -665,7 +665,7 @@ Check the top-level render call using <` + T + ">.");
665
665
  var I = $o(h, m, T, D, k);
666
666
  if (I == null)
667
667
  return I;
668
- if (V) {
668
+ if (E) {
669
669
  var Q = m.children;
670
670
  if (Q !== void 0)
671
671
  if (A)
@@ -696,10 +696,10 @@ React keys must be passed directly to JSX without using spread:
696
696
  }
697
697
  }
698
698
  function Yo(h, m, T) {
699
- return Ei(h, m, T, !0);
699
+ return Vi(h, m, T, !0);
700
700
  }
701
701
  function Xo(h, m, T) {
702
- return Ei(h, m, T, !1);
702
+ return Vi(h, m, T, !1);
703
703
  }
704
704
  var qo = Xo, Zo = Yo;
705
705
  Yt.Fragment = i, Yt.jsx = qo, Yt.jsxs = Zo;
@@ -734,11 +734,11 @@ class Qs extends Mn.Component {
734
734
  mn(Qs, "defaultProps", {
735
735
  containerId: "root"
736
736
  });
737
- const On = Vt({
737
+ const On = Et({
738
738
  transformPagePoint: (t) => t,
739
739
  isStatic: !1,
740
740
  reducedMotion: "never"
741
- }), je = Vt({}), Fe = Vt(null), jn = typeof window < "u", tr = jn ? ta : ut, er = Vt({ strict: !1 }), _e = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ma = "framerAppearId", nr = "data-" + _e(ma), ga = {
741
+ }), je = Et({}), Fe = Et(null), jn = typeof window < "u", tr = jn ? ta : ut, er = Et({ strict: !1 }), _e = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ma = "framerAppearId", nr = "data-" + _e(ma), ga = {
742
742
  skipAnimations: !1,
743
743
  useManualTiming: !1
744
744
  };
@@ -818,7 +818,7 @@ const { schedule: Fn, cancel: ch } = ir(queueMicrotask, !1);
818
818
  function jt(t) {
819
819
  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
820
820
  }
821
- const sr = Vt({});
821
+ const sr = Et({});
822
822
  let Mi = !1;
823
823
  function Pa(t, e, n, i, s) {
824
824
  const { visualElement: o } = U(je), r = U(er), a = U(Fe), l = U(On).reducedMotion, c = nt();
@@ -914,7 +914,7 @@ function wa(t, e) {
914
914
  }
915
915
  function Sa(t) {
916
916
  const { initial: e, animate: n } = wa(t, U(je));
917
- return Et(() => ({ initial: e, animate: n }), [ki(e), ki(n)]);
917
+ return Vt(() => ({ initial: e, animate: n }), [ki(e), ki(n)]);
918
918
  }
919
919
  function ki(t) {
920
920
  return Array.isArray(t) ? t.join(" ") : t;
@@ -950,7 +950,7 @@ function Ca(t) {
950
950
  ...t[e]
951
951
  };
952
952
  }
953
- const In = Vt({}), Aa = Symbol.for("motionComponentSymbol"), W = (t) => t;
953
+ const In = Et({}), Aa = Symbol.for("motionComponentSymbol"), W = (t) => t;
954
954
  let Wt = W, ft = W;
955
955
  process.env.NODE_ENV !== "production" && (Wt = (t, e) => {
956
956
  !t && typeof console < "u" && console.warn(e);
@@ -965,23 +965,23 @@ function Ra({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
965
965
  const u = {
966
966
  ...U(On),
967
967
  ...a,
968
- layoutId: Ea(a)
968
+ layoutId: Va(a)
969
969
  }, { isStatic: f } = u, d = Sa(a), p = i(a, f);
970
970
  if (!f && jn) {
971
- Va(u, t);
971
+ Ea(u, t);
972
972
  const g = Da(u);
973
973
  c = g.MeasureLayout, d.visualElement = Pa(s, p, u, e, g.ProjectionNode);
974
974
  }
975
975
  return O.jsxs(je.Provider, { value: d, children: [c && d.visualElement ? O.jsx(c, { visualElement: d.visualElement, ...u }) : null, n(s, a, ba(p, d.visualElement, l), p, f, d.visualElement)] });
976
976
  }
977
- const r = Ee(o);
977
+ const r = Ve(o);
978
978
  return r[Aa] = s, r;
979
979
  }
980
- function Ea({ layoutId: t }) {
980
+ function Va({ layoutId: t }) {
981
981
  const e = U(In).id;
982
982
  return e && t !== void 0 ? e + "-" + t : t;
983
983
  }
984
- function Va(t, e) {
984
+ function Ea(t, e) {
985
985
  const n = U(er).strict;
986
986
  if (process.env.NODE_ENV !== "production" && e && n) {
987
987
  const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
@@ -1061,9 +1061,9 @@ function Nn(t) {
1061
1061
  )
1062
1062
  );
1063
1063
  }
1064
- const Ve = {};
1064
+ const Ee = {};
1065
1065
  function La(t) {
1066
- Object.assign(Ve, t);
1066
+ Object.assign(Ee, t);
1067
1067
  }
1068
1068
  const he = [
1069
1069
  "transformPerspective",
@@ -1085,7 +1085,7 @@ const he = [
1085
1085
  "skewY"
1086
1086
  ], Pt = new Set(he);
1087
1087
  function ar(t, { layout: e, layoutId: n }) {
1088
- return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ve[t] || t === "opacity");
1088
+ return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ee[t] || t === "opacity");
1089
1089
  }
1090
1090
  const K = (t) => !!(t && t.getVelocity), lr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, $t = {
1091
1091
  test: (t) => typeof t == "number",
@@ -1240,7 +1240,7 @@ function fr(t, e, n) {
1240
1240
  !K(e[i]) && !ar(i, n) && (t[i] = e[i]);
1241
1241
  }
1242
1242
  function Ka({ transformTemplate: t }, e) {
1243
- return Et(() => {
1243
+ return Vt(() => {
1244
1244
  const n = Gn();
1245
1245
  return Kn(n, e, t), Object.assign({}, n.vars, n.style);
1246
1246
  }, [e]);
@@ -1349,7 +1349,7 @@ const dr = () => ({
1349
1349
  attrs: {}
1350
1350
  }), Hn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
1351
1351
  function tl(t, e, n, i) {
1352
- const s = Et(() => {
1352
+ const s = Vt(() => {
1353
1353
  const o = dr();
1354
1354
  return zn(o, e, Hn(i), t.transformTemplate), {
1355
1355
  ...o.attrs,
@@ -1364,7 +1364,7 @@ function tl(t, e, n, i) {
1364
1364
  }
1365
1365
  function el(t = !1) {
1366
1366
  return (n, i, s, { latestValues: o }, r) => {
1367
- const l = (Nn(n) ? tl : za)(i, o, r, n), c = Xa(i, typeof n == "string", t), u = n !== Js ? { ...c, ...l, ref: s } : {}, { children: f } = i, d = Et(() => K(f) ? f.get() : f, [f]);
1367
+ const l = (Nn(n) ? tl : za)(i, o, r, n), c = Xa(i, typeof n == "string", t), u = n !== Js ? { ...c, ...l, ref: s } : {}, { children: f } = i, d = Vt(() => K(f) ? f.get() : f, [f]);
1368
1368
  return ea(n, {
1369
1369
  ...u,
1370
1370
  children: d
@@ -1824,15 +1824,15 @@ const lt = (t) => t * 1e3, ct = (t) => t / 1e3, wl = {
1824
1824
  ease: [0.25, 0.1, 0.35, 1],
1825
1825
  duration: 0.3
1826
1826
  }, Rl = (t, { keyframes: e }) => e.length > 2 ? Cl : Pt.has(t) ? t.startsWith("scale") ? Sl(e[1]) : wl : Al;
1827
- function El({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: c, ...u }) {
1827
+ function Vl({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: c, ...u }) {
1828
1828
  return !!Object.keys(u).length;
1829
1829
  }
1830
1830
  function Zn(t, e) {
1831
1831
  return t[e] || t.default || t;
1832
1832
  }
1833
- const Vl = (t) => t !== null;
1833
+ const El = (t) => t !== null;
1834
1834
  function $e(t, { repeat: e, repeatType: n = "loop" }, i) {
1835
- const s = t.filter(Vl), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1835
+ const s = t.filter(El), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1836
1836
  return !o || i === void 0 ? s[o] : i;
1837
1837
  }
1838
1838
  let Ce;
@@ -1848,7 +1848,7 @@ const gt = {
1848
1848
  function Ml(t) {
1849
1849
  return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Rr(t) : !0;
1850
1850
  }
1851
- const Er = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), kl = (
1851
+ const Vr = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), kl = (
1852
1852
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1853
1853
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1854
1854
  );
@@ -1860,7 +1860,7 @@ function Ll(t) {
1860
1860
  return [`--${n ?? i}`, s];
1861
1861
  }
1862
1862
  const Ol = 4;
1863
- function Vr(t, e, n = 1) {
1863
+ function Er(t, e, n = 1) {
1864
1864
  ft(n <= Ol, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
1865
1865
  const [i, s] = Ll(t);
1866
1866
  if (!i)
@@ -1868,9 +1868,9 @@ function Vr(t, e, n = 1) {
1868
1868
  const o = window.getComputedStyle(e).getPropertyValue(i);
1869
1869
  if (o) {
1870
1870
  const r = o.trim();
1871
- return Er(r) ? parseFloat(r) : r;
1871
+ return Vr(r) ? parseFloat(r) : r;
1872
1872
  }
1873
- return $n(s) ? Vr(s, e, n + 1) : s;
1873
+ return $n(s) ? Er(s, e, n + 1) : s;
1874
1874
  }
1875
1875
  const jl = /* @__PURE__ */ new Set([
1876
1876
  "width",
@@ -2130,7 +2130,7 @@ class Nr extends Jn {
2130
2130
  for (let l = 0; l < e.length; l++) {
2131
2131
  let c = e[l];
2132
2132
  if (typeof c == "string" && (c = c.trim(), $n(c))) {
2133
- const u = Vr(c, n.current);
2133
+ const u = Er(c, n.current);
2134
2134
  u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
2135
2135
  }
2136
2136
  }
@@ -2372,19 +2372,19 @@ function qi({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
2372
2372
  const f = t[0], d = {
2373
2373
  done: !1,
2374
2374
  value: f
2375
- }, p = (E) => a !== void 0 && E < a || l !== void 0 && E > l, g = (E) => a === void 0 ? l : l === void 0 || Math.abs(a - E) < Math.abs(l - E) ? a : l;
2375
+ }, p = (V) => a !== void 0 && V < a || l !== void 0 && V > l, g = (V) => a === void 0 ? l : l === void 0 || Math.abs(a - V) < Math.abs(l - V) ? a : l;
2376
2376
  let P = n * e;
2377
2377
  const b = f + P, x = r === void 0 ? b : r(b);
2378
2378
  x !== b && (P = x - f);
2379
- const y = (E) => -P * Math.exp(-E / i), v = (E) => x + y(E), C = (E) => {
2380
- const G = y(E), H = v(E);
2379
+ const y = (V) => -P * Math.exp(-V / i), v = (V) => x + y(V), C = (V) => {
2380
+ const G = y(V), H = v(V);
2381
2381
  d.done = Math.abs(G) <= c, d.value = d.done ? x : H;
2382
2382
  };
2383
2383
  let w, L;
2384
- const q = (E) => {
2385
- p(d.value) && (w = E, L = Gr({
2384
+ const q = (V) => {
2385
+ p(d.value) && (w = V, L = Gr({
2386
2386
  keyframes: [d.value, g(d.value)],
2387
- velocity: Kr(v, E, d.value),
2387
+ velocity: Kr(v, V, d.value),
2388
2388
  // TODO: This should be passing * 1000
2389
2389
  damping: s,
2390
2390
  stiffness: o,
@@ -2394,9 +2394,9 @@ function qi({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
2394
2394
  };
2395
2395
  return q(0), {
2396
2396
  calculatedDuration: null,
2397
- next: (E) => {
2397
+ next: (V) => {
2398
2398
  let G = !1;
2399
- return !L && w === void 0 && (G = !0, C(E), q(E)), w !== void 0 && E >= w ? L.next(E - w) : (!G && C(E), d);
2399
+ return !L && w === void 0 && (G = !0, C(V), q(V)), w !== void 0 && V >= w ? L.next(V - w) : (!G && C(V), d);
2400
2400
  }
2401
2401
  };
2402
2402
  }
@@ -2485,7 +2485,7 @@ function Ac(t, e) {
2485
2485
  return (n) => j(t, e, n);
2486
2486
  }
2487
2487
  function ii(t) {
2488
- return typeof t == "number" ? Ac : typeof t == "string" ? $n(t) ? Me : $.test(t) ? ts : Vc : Array.isArray(t) ? Jr : typeof t == "object" ? $.test(t) ? ts : Rc : Me;
2488
+ return typeof t == "number" ? Ac : typeof t == "string" ? $n(t) ? Me : $.test(t) ? ts : Ec : Array.isArray(t) ? Jr : typeof t == "object" ? $.test(t) ? ts : Rc : Me;
2489
2489
  }
2490
2490
  function Jr(t, e) {
2491
2491
  const n = [...t], i = n.length, s = t.map((o, r) => ii(o)(o, e[r]));
@@ -2505,7 +2505,7 @@ function Rc(t, e) {
2505
2505
  return n;
2506
2506
  };
2507
2507
  }
2508
- function Ec(t, e) {
2508
+ function Vc(t, e) {
2509
2509
  var n;
2510
2510
  const i = [], s = { color: 0, var: 0, number: 0 };
2511
2511
  for (let o = 0; o < e.values.length; o++) {
@@ -2514,9 +2514,9 @@ function Ec(t, e) {
2514
2514
  }
2515
2515
  return i;
2516
2516
  }
2517
- const Vc = (t, e) => {
2517
+ const Ec = (t, e) => {
2518
2518
  const n = vt.createTransformer(e), i = oe(t), s = oe(e);
2519
- return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? wn.has(t) && !s.values.length || wn.has(e) && !i.values.length ? Cc(t, e) : at(Jr(Ec(i, s), s.values), n) : (Wt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Me(t, e));
2519
+ return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? wn.has(t) && !s.values.length || wn.has(e) && !i.values.length ? Cc(t, e) : at(Jr(Vc(i, s), s.values), n) : (Wt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Me(t, e));
2520
2520
  };
2521
2521
  function Qr(t, e, n) {
2522
2522
  return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) : ii(t)(t, e);
@@ -2650,8 +2650,8 @@ class si extends Wr {
2650
2650
  tick(e, n = !1) {
2651
2651
  const { resolved: i } = this;
2652
2652
  if (!i) {
2653
- const { keyframes: E } = this.options;
2654
- return { done: !0, value: E[E.length - 1] };
2653
+ const { keyframes: V } = this.options;
2654
+ return { done: !0, value: V[V.length - 1] };
2655
2655
  }
2656
2656
  const { finalKeyframe: s, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: f } = i;
2657
2657
  if (this.startTime === null)
@@ -2662,9 +2662,9 @@ class si extends Wr {
2662
2662
  this.currentTime = Math.max(x, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
2663
2663
  let v = this.currentTime, C = o;
2664
2664
  if (p) {
2665
- const E = Math.min(this.currentTime, u) / f;
2666
- let G = Math.floor(E), H = E % 1;
2667
- !H && E >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (g === "reverse" ? (H = 1 - H, P && (H -= P / f)) : g === "mirror" && (C = r)), v = yt(0, 1, H) * f;
2665
+ const V = Math.min(this.currentTime, u) / f;
2666
+ let G = Math.floor(V), H = V % 1;
2667
+ !H && V >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (g === "reverse" ? (H = 1 - H, P && (H -= P / f)) : g === "mirror" && (C = r)), v = yt(0, 1, H) * f;
2668
2668
  }
2669
2669
  const w = y ? { done: !1, value: l[0] } : C.next(v);
2670
2670
  a && (w.value = a(w.value));
@@ -3030,7 +3030,7 @@ const oi = (t, e, n, i = {}, s, o, r) => (a) => {
3030
3030
  motionValue: e,
3031
3031
  element: o ? void 0 : s
3032
3032
  };
3033
- El(l) || (f = {
3033
+ Vl(l) || (f = {
3034
3034
  ...f,
3035
3035
  ...Rl(t, f)
3036
3036
  }), f.duration && (f.duration = lt(f.duration)), f.repeatDelay && (f.repeatDelay = lt(f.repeatDelay)), f.from !== void 0 && (f.keyframes[0] = f.from);
@@ -3429,7 +3429,7 @@ function au(t) {
3429
3429
  !v && !y.prevProp || // Or if the prop doesn't define an animation
3430
3430
  re(v) || typeof v == "boolean")
3431
3431
  continue;
3432
- let E = lu(y.prevProp, v) || // If we're making this variant active, we want to always make it active
3432
+ let V = lu(y.prevProp, v) || // If we're making this variant active, we want to always make it active
3433
3433
  x === l && y.isActive && !L && C || // If we removed a higher-priority variant (i is in reverse order)
3434
3434
  b > g && C, G = !1;
3435
3435
  const H = Array.isArray(v) ? v : [v];
@@ -3439,7 +3439,7 @@ function au(t) {
3439
3439
  ...Kt,
3440
3440
  ...dt
3441
3441
  }, it = (F) => {
3442
- E = !0, d.has(F) && (G = !0, d.delete(F)), y.needsAnimating[F] = !0;
3442
+ V = !0, d.has(F) && (G = !0, d.delete(F)), y.needsAnimating[F] = !0;
3443
3443
  const J = t.getValue(F);
3444
3444
  J && (J.liveStyle = !1);
3445
3445
  };
@@ -3450,7 +3450,7 @@ function au(t) {
3450
3450
  let Mt = !1;
3451
3451
  gn(J) && gn(Dt) ? Mt = !Ar(J, Dt) : Mt = J !== Dt, Mt ? J != null ? it(F) : d.add(F) : J !== void 0 && d.has(F) ? it(F) : y.protectedKeys[F] = !0;
3452
3452
  }
3453
- y.prevProp = v, y.prevResolvedValues = dt, y.isActive && (p = { ...p, ...dt }), i && t.blockInitialAnimation && (E = !1), E && (!L || G) && f.push(...H.map((F) => ({
3453
+ y.prevProp = v, y.prevResolvedValues = dt, y.isActive && (p = { ...p, ...dt }), i && t.blockInitialAnimation && (V = !1), V && (!L || G) && f.push(...H.map((F) => ({
3454
3454
  animation: F,
3455
3455
  options: { type: x }
3456
3456
  })));
@@ -3741,10 +3741,10 @@ function uo({ top: t, left: e, right: n, bottom: i }) {
3741
3741
  y: { min: t, max: i }
3742
3742
  };
3743
3743
  }
3744
- function Eu({ x: t, y: e }) {
3744
+ function Vu({ x: t, y: e }) {
3745
3745
  return { top: e.min, right: t.max, bottom: e.max, left: t.min };
3746
3746
  }
3747
- function Vu(t, e) {
3747
+ function Eu(t, e) {
3748
3748
  if (!e)
3749
3749
  return t;
3750
3750
  const n = e({ x: t.left, y: t.top }), i = e({ x: t.right, y: t.bottom });
@@ -3777,11 +3777,11 @@ function Oe(t, e, n) {
3777
3777
  function vs(t, e, n, i, s) {
3778
3778
  return s !== void 0 && (t = Oe(t, s, i)), Oe(t, n, i) + e;
3779
3779
  }
3780
- function En(t, e = 0, n = 1, i, s) {
3780
+ function Vn(t, e = 0, n = 1, i, s) {
3781
3781
  t.min = vs(t.min, e, n, i, s), t.max = vs(t.max, e, n, i, s);
3782
3782
  }
3783
3783
  function ho(t, { x: e, y: n }) {
3784
- En(t.x, e.translate, e.scale, e.originPoint), En(t.y, n.translate, n.scale, n.originPoint);
3784
+ Vn(t.x, e.translate, e.scale, e.originPoint), Vn(t.y, n.translate, n.scale, n.originPoint);
3785
3785
  }
3786
3786
  const Ps = 0.999999999999, xs = 1.0000000000001;
3787
3787
  function Du(t, e, n, i = !1) {
@@ -3805,13 +3805,13 @@ function Bt(t, e) {
3805
3805
  }
3806
3806
  function Ts(t, e, n, i, s = 0.5) {
3807
3807
  const o = j(t.min, t.max, s);
3808
- En(t, e, n, o, i);
3808
+ Vn(t, e, n, o, i);
3809
3809
  }
3810
3810
  function It(t, e) {
3811
3811
  Ts(t.x, e.x, e.scaleX, e.scale, e.originX), Ts(t.y, e.y, e.scaleY, e.scale, e.originY);
3812
3812
  }
3813
3813
  function po(t, e) {
3814
- return uo(Vu(t.getBoundingClientRect(), e));
3814
+ return uo(Eu(t.getBoundingClientRect(), e));
3815
3815
  }
3816
3816
  function Mu(t, e, n) {
3817
3817
  const i = po(t, n), { scroll: s } = e;
@@ -3918,7 +3918,7 @@ class Lu {
3918
3918
  const o = Mu(i, s.root, this.visualElement.getTransformPagePoint());
3919
3919
  let r = Su(s.layout.layoutBox, o);
3920
3920
  if (n) {
3921
- const a = n(Eu(r));
3921
+ const a = n(Vu(r));
3922
3922
  this.hasMutatedConstraints = !!a, a && (r = uo(a));
3923
3923
  }
3924
3924
  return r;
@@ -4235,17 +4235,17 @@ function Rs(t, e) {
4235
4235
  function tt(t, e) {
4236
4236
  Rs(t.x, e.x), Rs(t.y, e.y);
4237
4237
  }
4238
- function Es(t, e) {
4238
+ function Vs(t, e) {
4239
4239
  t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
4240
4240
  }
4241
- function Vs(t, e, n, i, s) {
4241
+ function Es(t, e, n, i, s) {
4242
4242
  return t -= e, t = Oe(t, 1 / n, i), s !== void 0 && (t = Oe(t, 1 / s, i)), t;
4243
4243
  }
4244
4244
  function Gu(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
4245
4245
  if (st.test(e) && (e = parseFloat(e), e = j(r.min, r.max, e / 100) - r.min), typeof e != "number")
4246
4246
  return;
4247
4247
  let a = j(o.min, o.max, i);
4248
- t === o && (a -= e), t.min = Vs(t.min, e, n, a, s), t.max = Vs(t.max, e, n, a, s);
4248
+ t === o && (a -= e), t.min = Es(t.min, e, n, a, s), t.max = Es(t.max, e, n, a, s);
4249
4249
  }
4250
4250
  function Ds(t, e, [n, i, s], o, r) {
4251
4251
  Gu(t, e[n], e[i], e[s], e.scale, o, r);
@@ -4669,7 +4669,7 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4669
4669
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
4670
4670
  return;
4671
4671
  }
4672
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Es(this.prevProjectionDelta.x, this.projectionDelta.x), Es(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Fs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Fs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Zt && Ct.recalculatedProjection++;
4672
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Vs(this.prevProjectionDelta.x, this.projectionDelta.x), Vs(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Fs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Fs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Zt && Ct.recalculatedProjection++;
4673
4673
  }
4674
4674
  hide() {
4675
4675
  this.isVisible = !1;
@@ -4806,10 +4806,10 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4806
4806
  this.applyTransformsToTarget(), c.transform = qu(this.projectionDeltaWithTransform, this.treeScale, d), u && (c.transform = u(d, c.transform));
4807
4807
  const { x: p, y: g } = this.projectionDelta;
4808
4808
  c.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`, f.animationValues ? c.opacity = f === this ? (l = (a = d.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : c.opacity = f === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
4809
- for (const P in Ve) {
4809
+ for (const P in Ee) {
4810
4810
  if (d[P] === void 0)
4811
4811
  continue;
4812
- const { correct: b, applyTo: x } = Ve[P], y = c.transform === "none" ? d[P] : b(d[P], f);
4812
+ const { correct: b, applyTo: x } = Ee[P], y = c.transform === "none" ? d[P] : b(d[P], f);
4813
4813
  if (x) {
4814
4814
  const v = x.length;
4815
4815
  for (let C = 0; C < v; C++)
@@ -4975,14 +4975,14 @@ const Tf = bo({
4975
4975
  ProjectionNode: So,
4976
4976
  MeasureLayout: go
4977
4977
  }
4978
- }, Vn = { current: null }, Co = { current: !1 };
4978
+ }, En = { current: null }, Co = { current: !1 };
4979
4979
  function wf() {
4980
4980
  if (Co.current = !0, !!jn)
4981
4981
  if (window.matchMedia) {
4982
- const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Vn.current = t.matches;
4982
+ const t = window.matchMedia("(prefers-reduced-motion)"), e = () => En.current = t.matches;
4983
4983
  t.addListener(e), e();
4984
4984
  } else
4985
- Vn.current = !1;
4985
+ En.current = !1;
4986
4986
  }
4987
4987
  function Sf(t, e, n) {
4988
4988
  for (const i in e) {
@@ -5013,7 +5013,7 @@ const Gs = /* @__PURE__ */ new WeakMap(), Cf = [...Mr, $, vt], Af = (t) => Cf.fi
5013
5013
  "LayoutAnimationStart",
5014
5014
  "LayoutAnimationComplete"
5015
5015
  ], Rf = Bn.length;
5016
- class Ef {
5016
+ class Vf {
5017
5017
  /**
5018
5018
  * This method takes React props and returns found MotionValues. For example, HTML
5019
5019
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -5039,7 +5039,7 @@ class Ef {
5039
5039
  }
5040
5040
  }
5041
5041
  mount(e) {
5042
- this.current = e, Gs.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, i) => this.bindToMotionValue(i, n)), Co.current || wf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Vn.current, process.env.NODE_ENV !== "production" && li(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
5042
+ this.current = e, Gs.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, i) => this.bindToMotionValue(i, n)), Co.current || wf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : En.current, process.env.NODE_ENV !== "production" && li(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
5043
5043
  }
5044
5044
  unmount() {
5045
5045
  Gs.delete(this.current), this.projection && this.projection.unmount(), ht(this.notifyUpdate), ht(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
@@ -5184,7 +5184,7 @@ class Ef {
5184
5184
  readValue(e, n) {
5185
5185
  var i;
5186
5186
  let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) !== null && i !== void 0 ? i : this.readValueFromInstance(this.current, e, this.options);
5187
- return s != null && (typeof s == "string" && (Er(s) || Rr(s)) ? s = parseFloat(s) : !Af(s) && vt.test(n) && (s = Ir(e, n)), this.setBaseTarget(e, K(s) ? s.get() : s)), K(s) ? s.get() : s;
5187
+ return s != null && (typeof s == "string" && (Vr(s) || Rr(s)) ? s = parseFloat(s) : !Af(s) && vt.test(n) && (s = Ir(e, n)), this.setBaseTarget(e, K(s) ? s.get() : s)), K(s) ? s.get() : s;
5188
5188
  }
5189
5189
  /**
5190
5190
  * Set the base target to later animate back to. This is currently
@@ -5217,7 +5217,7 @@ class Ef {
5217
5217
  this.events[e] && this.events[e].notify(...n);
5218
5218
  }
5219
5219
  }
5220
- class Ao extends Ef {
5220
+ class Ao extends Vf {
5221
5221
  constructor() {
5222
5222
  super(...arguments), this.KeyframeResolver = Nr;
5223
5223
  }
@@ -5231,7 +5231,7 @@ class Ao extends Ef {
5231
5231
  delete n[e], delete i[e];
5232
5232
  }
5233
5233
  }
5234
- function Vf(t) {
5234
+ function Ef(t) {
5235
5235
  return window.getComputedStyle(t);
5236
5236
  }
5237
5237
  class Df extends Ao {
@@ -5243,7 +5243,7 @@ class Df extends Ao {
5243
5243
  const i = ti(n);
5244
5244
  return i && i.default || 0;
5245
5245
  } else {
5246
- const i = Vf(e), s = (ur(n) ? i.getPropertyValue(n) : i[n]) || 0;
5246
+ const i = Ef(e), s = (ur(n) ? i.getPropertyValue(n) : i[n]) || 0;
5247
5247
  return typeof s == "string" ? s.trim() : s;
5248
5248
  }
5249
5249
  }
@@ -5349,7 +5349,7 @@ function _f({ children: t, isPresent: e }) {
5349
5349
  }, [e]), O.jsx(Ff, { isPresent: e, childRef: i, sizeRef: s, children: Dn.cloneElement(t, { ref: i }) });
5350
5350
  }
5351
5351
  const Bf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r }) => {
5352
- const a = qn(If), l = kn(), c = Et(
5352
+ const a = qn(If), l = kn(), c = Vt(
5353
5353
  () => ({
5354
5354
  id: l,
5355
5355
  initial: e,
@@ -5371,7 +5371,7 @@ const Bf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
5371
5371
  */
5372
5372
  o ? [Math.random()] : [n]
5373
5373
  );
5374
- return Et(() => {
5374
+ return Vt(() => {
5375
5375
  a.forEach((u, f) => a.set(f, !1));
5376
5376
  }, [n]), Dn.useEffect(() => {
5377
5377
  !n && !a.size && i && i();
@@ -5389,7 +5389,7 @@ function Hs(t) {
5389
5389
  }
5390
5390
  const Nf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
5391
5391
  ft(!e, "Replace exitBeforeEnter with mode='wait'");
5392
- const a = Et(() => Hs(t), [t]), l = a.map(we), c = nt(!0), u = nt(a), f = qn(() => /* @__PURE__ */ new Map()), [d, p] = Jt(a), [g, P] = Jt(a);
5392
+ const a = Vt(() => Hs(t), [t]), l = a.map(we), c = nt(!0), u = nt(a), f = qn(() => /* @__PURE__ */ new Map()), [d, p] = Jt(a), [g, P] = Jt(a);
5393
5393
  tr(() => {
5394
5394
  c.current = !1, u.current = a;
5395
5395
  for (let y = 0; y < g.length; y++) {
@@ -5531,14 +5531,14 @@ const Xs = ({
5531
5531
  var r;
5532
5532
  if (e.current && i.current) {
5533
5533
  const l = (((r = o == null ? void 0 : o[0]) == null ? void 0 : r.contentRect) ?? i.current.getBoundingClientRect()).height, c = e.current.getBoundingClientRect(), u = c.height, f = c.bottom, d = c.left, p = window.pageYOffset || document.documentElement.scrollTop, g = window.pageXOffset || document.documentElement.scrollLeft, P = window.innerHeight || document.documentElement.clientHeight, b = 15, x = f + l + b >= P ? "top" : "bottom";
5534
- i.current.style.top = x === "bottom" ? `${f + p}px` : `${f + p - (l + u)}px`, i.current.style.left = `${d + g}px`, i.current.style.transformOrigin = x === "bottom" ? "top" : "bottom";
5534
+ i.current.style.top = x === "bottom" ? `${f + p}px` : `${f + p - (l + u)}px`, i.current.style.left = `${d + g}px`, i.current.style.transformOrigin = x === "bottom" ? "top" : "bottom", requestAnimationFrame(s);
5535
5535
  }
5536
5536
  };
5537
5537
  if (e.current && i.current) {
5538
5538
  i.current.style.display = "block";
5539
5539
  const o = new ResizeObserver(s);
5540
- return o.observe(i.current), window.addEventListener("scroll", s), window.addEventListener("resize", s), () => {
5541
- o.disconnect(), window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
5540
+ return o.observe(i.current), () => {
5541
+ o.disconnect();
5542
5542
  };
5543
5543
  }
5544
5544
  }, [e, i]), /* @__PURE__ */ O.jsx(
@@ -5555,10 +5555,10 @@ const Xs = ({
5555
5555
  children: t
5556
5556
  }
5557
5557
  );
5558
- }, sh = Ee(ih);
5558
+ }, sh = Ve(ih);
5559
5559
  function fh(t, e) {
5560
- const n = Ee(t);
5561
- return Ee((s, o) => {
5560
+ const n = Ve(t);
5561
+ return Ve((s, o) => {
5562
5562
  const [r, a] = Jt(!1), [l, c] = Jt(!1), [u, f] = Jt(), d = nt(null), p = nt(null), g = nt(u);
5563
5563
  ut(() => {
5564
5564
  f(s.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-picker",
3
- "version": "0.0.4",
3
+ "version": "0.0.5-alpha.0",
4
4
  "description": "This is a react method to quickly combine buttons with Picker",
5
5
  "keywords": [
6
6
  "acrool",