@kommo-crm/crm-react-ui-kit 1.3.0-beta.1 → 1.3.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/ContextMenu-CeyT26LX.mjs +229 -0
  2. package/dist/components/ContextMenu/ContextMenu.d.ts +2 -2
  3. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  4. package/dist/components/ContextMenu/ContextMenu.js +5 -5
  5. package/dist/components/ContextMenu/ContextMenu.props.d.ts +19 -3
  6. package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
  7. package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +1 -1
  8. package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
  9. package/dist/components/ContextMenu/components/Content/Content.js +1 -1
  10. package/dist/components/ContextMenu/components/Content/index.js +1 -1
  11. package/dist/components/ContextMenu/components/Item/Item.js +1 -1
  12. package/dist/components/ContextMenu/components/Label/Label.js +1 -1
  13. package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +1 -1
  14. package/dist/components/ContextMenu/components/Sub/Sub.js +1 -1
  15. package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts +3 -3
  16. package/dist/components/ContextMenu/components/Sub/Sub.props.d.ts.map +1 -1
  17. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.d.ts.map +1 -1
  18. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js +80 -88
  19. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts +2 -2
  20. package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.types.d.ts.map +1 -1
  21. package/dist/components/ContextMenu/components/Sub/index.js +1 -1
  22. package/dist/components/ContextMenu/components/SubContent/SubContent.js +1 -1
  23. package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +1 -1
  24. package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +1 -1
  25. package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +1 -1
  26. package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +1 -1
  27. package/dist/components/ContextMenu/hooks/index.js +1 -1
  28. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.d.ts.map +1 -1
  29. package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
  30. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts.map +1 -1
  31. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +142 -133
  32. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts +14 -2
  33. package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.d.ts.map +1 -1
  34. package/dist/components/ContextMenu/hooks/useContextMenu/utils/contextMenuBus/contextMenuBus.d.ts +3 -1
  35. package/dist/components/ContextMenu/hooks/useContextMenu/utils/contextMenuBus/contextMenuBus.d.ts.map +1 -1
  36. package/dist/components/ContextMenu/hooks/useContextMenu/utils/contextMenuBus/contextMenuBus.js +16 -10
  37. package/dist/components/ContextMenu/hooks/useContextMenu/utils/contextMenuBus/contextMenuBus.types.d.ts +4 -0
  38. package/dist/components/ContextMenu/hooks/useContextMenu/utils/contextMenuBus/contextMenuBus.types.d.ts.map +1 -1
  39. package/dist/components/ContextMenu/hooks/useContextMenuItemFocus/useContextMenuItemFocus.d.ts.map +1 -1
  40. package/dist/components/ContextMenu/hooks/useContextMenuItemFocus/useContextMenuItemFocus.js +47 -42
  41. package/dist/components/ContextMenu/index.js +1 -1
  42. package/dist/components/List/List.js +1 -1
  43. package/dist/components/Select/components/List/List.js +1 -1
  44. package/dist/index-DBS3EIVR.mjs +273 -0
  45. package/dist/{useContentPositioning-DfyirIME.mjs → useContentPositioning-Dfjbylz5.mjs} +456 -451
  46. package/package.json +3 -3
  47. package/dist/ContextMenu-BUiakpJf.mjs +0 -223
  48. package/dist/index-BH2CXQ4d.mjs +0 -257
@@ -1,6 +1,6 @@
1
- import * as Zt from "react";
2
- import { useEffect as Re, useLayoutEffect as ke, useState as ee, useRef as H, forwardRef as Xt, useCallback as Xn, useMemo as Oe, useContext as Yn } from "react";
3
- import { jsx as Xe, jsxs as Jn } from "react/jsx-runtime";
1
+ import * as Wt from "react";
2
+ import { useEffect as Ie, useLayoutEffect as Ee, useState as ee, useRef as X, forwardRef as Kt, useCallback as Xn, useMemo as Oe, useContext as Yn } from "react";
3
+ import { jsx as Ke, jsxs as Jn } from "react/jsx-runtime";
4
4
  import { g as ei } from "./index-aPaPKjUe.mjs";
5
5
  import { c as ti } from "./index-L8X2o7IH.mjs";
6
6
  import { unstable_batchedUpdates as ni } from "react-dom";
@@ -8,33 +8,33 @@ import { mergeRefs as ii } from "./lib/utils.js";
8
8
  import { KeyboardKey as si } from "./lib/keyboard/index.js";
9
9
  import { LevelProvider as ri } from "./components/ContextMenu/providers/LevelProvider/LevelProvider.js";
10
10
  import { useContextMenuContext as ai, useContextMenuRootContext as oi } from "./components/ContextMenu/ContextMenu.context.js";
11
- import { ContextMenuMode as ue } from "./components/ContextMenu/ContextMenu.enums.js";
12
- import { Direction as k } from "./components/ContextMenu/components/Content/Content.enums.js";
11
+ import { ContextMenuMode as ce } from "./components/ContextMenu/ContextMenu.enums.js";
12
+ import { Direction as F } from "./components/ContextMenu/components/Content/Content.enums.js";
13
13
  import { directionToSide as ui } from "./components/ContextMenu/components/Content/Content.utils.js";
14
14
  import "./components/ContextMenu/providers/SubMenuProvider/SubMenuProvider.js";
15
15
  import { FocusBlocker as ci } from "./components/ContextMenu/components/FocusBlocker/FocusBlocker.js";
16
- import './assets/Content.css';var ht = xe(), _ = (e) => Ie(e, ht), mt = xe();
17
- _.write = (e) => Ie(e, mt);
18
- var je = xe();
19
- _.onStart = (e) => Ie(e, je);
20
- var pt = xe();
21
- _.onFrame = (e) => Ie(e, pt);
22
- var gt = xe();
23
- _.onFinish = (e) => Ie(e, gt);
16
+ import './assets/Content.css';var dt = Ce(), _ = (e) => xe(e, dt), ft = Ce();
17
+ _.write = (e) => xe(e, ft);
18
+ var $e = Ce();
19
+ _.onStart = (e) => xe(e, $e);
20
+ var ht = Ce();
21
+ _.onFrame = (e) => xe(e, ht);
22
+ var mt = Ce();
23
+ _.onFinish = (e) => xe(e, mt);
24
24
  var se = [];
25
25
  _.setTimeout = (e, t) => {
26
26
  const n = _.now() + t, i = () => {
27
27
  const r = se.findIndex((a) => a.cancel == i);
28
28
  ~r && se.splice(r, 1), Z -= ~r ? 1 : 0;
29
29
  }, s = { time: n, handler: e, cancel: i };
30
- return se.splice(Yt(n), 0, s), Z += 1, Jt(), s;
30
+ return se.splice(Zt(n), 0, s), Z += 1, Xt(), s;
31
31
  };
32
- var Yt = (e) => ~(~se.findIndex((t) => t.time > e) || ~se.length);
32
+ var Zt = (e) => ~(~se.findIndex((t) => t.time > e) || ~se.length);
33
33
  _.cancel = (e) => {
34
- je.delete(e), pt.delete(e), gt.delete(e), ht.delete(e), mt.delete(e);
34
+ $e.delete(e), ht.delete(e), mt.delete(e), dt.delete(e), ft.delete(e);
35
35
  };
36
36
  _.sync = (e) => {
37
- st = !0, _.batchedUpdates(e), st = !1;
37
+ nt = !0, _.batchedUpdates(e), nt = !1;
38
38
  };
39
39
  _.throttle = (e) => {
40
40
  let t;
@@ -49,15 +49,15 @@ _.throttle = (e) => {
49
49
  t = s, _.onStart(n);
50
50
  }
51
51
  return i.handler = e, i.cancel = () => {
52
- je.delete(n), t = null;
52
+ $e.delete(n), t = null;
53
53
  }, i;
54
54
  };
55
- var vt = typeof window < "u" ? window.requestAnimationFrame : (
55
+ var pt = typeof window < "u" ? window.requestAnimationFrame : (
56
56
  // eslint-disable-next-line @typescript-eslint/no-empty-function
57
57
  () => {
58
58
  }
59
59
  );
60
- _.use = (e) => vt = e;
60
+ _.use = (e) => pt = e;
61
61
  _.now = typeof performance < "u" ? () => performance.now() : Date.now;
62
62
  _.batchedUpdates = (e) => e();
63
63
  _.catch = console.error;
@@ -65,32 +65,32 @@ _.frameLoop = "always";
65
65
  _.advance = () => {
66
66
  _.frameLoop !== "demand" ? console.warn(
67
67
  "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"
68
- ) : tn();
68
+ ) : Jt();
69
69
  };
70
- var K = -1, Z = 0, st = !1;
71
- function Ie(e, t) {
72
- st ? (t.delete(e), e(0)) : (t.add(e), Jt());
70
+ var K = -1, Z = 0, nt = !1;
71
+ function xe(e, t) {
72
+ nt ? (t.delete(e), e(0)) : (t.add(e), Xt());
73
73
  }
74
- function Jt() {
75
- K < 0 && (K = 0, _.frameLoop !== "demand" && vt(en));
74
+ function Xt() {
75
+ K < 0 && (K = 0, _.frameLoop !== "demand" && pt(Yt));
76
76
  }
77
77
  function li() {
78
78
  K = -1;
79
79
  }
80
- function en() {
81
- ~K && (vt(en), _.batchedUpdates(tn));
80
+ function Yt() {
81
+ ~K && (pt(Yt), _.batchedUpdates(Jt));
82
82
  }
83
- function tn() {
83
+ function Jt() {
84
84
  const e = K;
85
85
  K = _.now();
86
- const t = Yt(K);
87
- if (t && (nn(se.splice(0, t), (n) => n.handler()), Z -= t), !Z) {
86
+ const t = Zt(K);
87
+ if (t && (en(se.splice(0, t), (n) => n.handler()), Z -= t), !Z) {
88
88
  li();
89
89
  return;
90
90
  }
91
- je.flush(), ht.flush(e ? Math.min(64, K - e) : 16.667), pt.flush(), mt.flush(), gt.flush();
91
+ $e.flush(), dt.flush(e ? Math.min(64, K - e) : 16.667), ht.flush(), ft.flush(), mt.flush();
92
92
  }
93
- function xe() {
93
+ function Ce() {
94
94
  let e = /* @__PURE__ */ new Set(), t = e;
95
95
  return {
96
96
  add(n) {
@@ -100,11 +100,11 @@ function xe() {
100
100
  return Z -= t == e && e.has(n) ? 1 : 0, e.delete(n);
101
101
  },
102
102
  flush(n) {
103
- t.size && (e = /* @__PURE__ */ new Set(), Z -= t.size, nn(t, (i) => i(n) && e.add(i)), Z += e.size, t = e);
103
+ t.size && (e = /* @__PURE__ */ new Set(), Z -= t.size, en(t, (i) => i(n) && e.add(i)), Z += e.size, t = e);
104
104
  }
105
105
  };
106
106
  }
107
- function nn(e, t) {
107
+ function en(e, t) {
108
108
  e.forEach((n) => {
109
109
  try {
110
110
  t(n);
@@ -119,13 +119,13 @@ var di = Object.defineProperty, fi = (e, t) => {
119
119
  }, L = {};
120
120
  fi(L, {
121
121
  assign: () => mi,
122
- colors: () => X,
123
- createStringInterpolator: () => bt,
124
- skipAnimation: () => rn,
125
- to: () => sn,
126
- willAdvance: () => _t
122
+ colors: () => Y,
123
+ createStringInterpolator: () => vt,
124
+ skipAnimation: () => nn,
125
+ to: () => tn,
126
+ willAdvance: () => yt
127
127
  });
128
- function rt() {
128
+ function it() {
129
129
  }
130
130
  var hi = (e, t, n) => Object.defineProperty(e, t, { value: n, writable: !0, configurable: !0 }), c = {
131
131
  arr: Array.isArray,
@@ -154,32 +154,32 @@ function B(e, t, n) {
154
154
  for (const i in e)
155
155
  e.hasOwnProperty(i) && t.call(n, e[i], i);
156
156
  }
157
- var U = (e) => c.und(e) ? [] : c.arr(e) ? e : [e];
158
- function he(e, t) {
157
+ var q = (e) => c.und(e) ? [] : c.arr(e) ? e : [e];
158
+ function me(e, t) {
159
159
  if (e.size) {
160
160
  const n = Array.from(e);
161
161
  e.clear(), A(n, t);
162
162
  }
163
163
  }
164
- var fe = (e, ...t) => he(e, (n) => n(...t)), yt = () => typeof window > "u" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), bt, sn, X = null, rn = !1, _t = rt, mi = (e) => {
165
- e.to && (sn = e.to), e.now && (_.now = e.now), e.colors !== void 0 && (X = e.colors), e.skipAnimation != null && (rn = e.skipAnimation), e.createStringInterpolator && (bt = e.createStringInterpolator), e.requestAnimationFrame && _.use(e.requestAnimationFrame), e.batchedUpdates && (_.batchedUpdates = e.batchedUpdates), e.willAdvance && (_t = e.willAdvance), e.frameLoop && (_.frameLoop = e.frameLoop);
166
- }, me = /* @__PURE__ */ new Set(), $ = [], Ye = [], De = 0, $e = {
164
+ var he = (e, ...t) => me(e, (n) => n(...t)), gt = () => typeof window > "u" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), vt, tn, Y = null, nn = !1, yt = it, mi = (e) => {
165
+ e.to && (tn = e.to), e.now && (_.now = e.now), e.colors !== void 0 && (Y = e.colors), e.skipAnimation != null && (nn = e.skipAnimation), e.createStringInterpolator && (vt = e.createStringInterpolator), e.requestAnimationFrame && _.use(e.requestAnimationFrame), e.batchedUpdates && (_.batchedUpdates = e.batchedUpdates), e.willAdvance && (yt = e.willAdvance), e.frameLoop && (_.frameLoop = e.frameLoop);
166
+ }, pe = /* @__PURE__ */ new Set(), $ = [], Ze = [], Ne = 0, ze = {
167
167
  get idle() {
168
- return !me.size && !$.length;
168
+ return !pe.size && !$.length;
169
169
  },
170
170
  /** Advance the given animation on every frame until idle. */
171
171
  start(e) {
172
- De > e.priority ? (me.add(e), _.onStart(pi)) : (an(e), _(at));
172
+ Ne > e.priority ? (pe.add(e), _.onStart(pi)) : (sn(e), _(st));
173
173
  },
174
174
  /** Advance all animations by the given time. */
175
- advance: at,
175
+ advance: st,
176
176
  /** Call this when an animation's priority changes. */
177
177
  sort(e) {
178
- if (De)
179
- _.onFrame(() => $e.sort(e));
178
+ if (Ne)
179
+ _.onFrame(() => ze.sort(e));
180
180
  else {
181
181
  const t = $.indexOf(e);
182
- ~t && ($.splice(t, 1), on(e));
182
+ ~t && ($.splice(t, 1), rn(e));
183
183
  }
184
184
  },
185
185
  /**
@@ -188,29 +188,29 @@ var fe = (e, ...t) => he(e, (n) => n(...t)), yt = () => typeof window > "u" || !
188
188
  * ☠️ Never call this from within the frameloop.
189
189
  */
190
190
  clear() {
191
- $ = [], me.clear();
191
+ $ = [], pe.clear();
192
192
  }
193
193
  };
194
194
  function pi() {
195
- me.forEach(an), me.clear(), _(at);
195
+ pe.forEach(sn), pe.clear(), _(st);
196
196
  }
197
- function an(e) {
198
- $.includes(e) || on(e);
197
+ function sn(e) {
198
+ $.includes(e) || rn(e);
199
199
  }
200
- function on(e) {
200
+ function rn(e) {
201
201
  $.splice(
202
202
  gi($, (t) => t.priority > e.priority),
203
203
  0,
204
204
  e
205
205
  );
206
206
  }
207
- function at(e) {
208
- const t = Ye;
207
+ function st(e) {
208
+ const t = Ze;
209
209
  for (let n = 0; n < $.length; n++) {
210
210
  const i = $[n];
211
- De = i.priority, i.idle || (_t(i), i.advance(e), i.idle || t.push(i));
211
+ Ne = i.priority, i.idle || (yt(i), i.advance(e), i.idle || t.push(i));
212
212
  }
213
- return De = 0, Ye = $, Ye.length = 0, $ = t, $.length > 0;
213
+ return Ne = 0, Ze = $, Ze.length = 0, $ = t, $.length > 0;
214
214
  }
215
215
  function gi(e, t) {
216
216
  const n = e.findIndex(t);
@@ -367,16 +367,16 @@ var vi = {
367
367
  whitesmoke: 4126537215,
368
368
  yellow: 4294902015,
369
369
  yellowgreen: 2597139199
370
- }, M = "[-+]?\\d*\\.?\\d+", Ne = M + "%";
371
- function ze(...e) {
370
+ }, M = "[-+]?\\d*\\.?\\d+", Ue = M + "%";
371
+ function Me(...e) {
372
372
  return "\\(\\s*(" + e.join(")\\s*,\\s*(") + ")\\s*\\)";
373
373
  }
374
- var yi = new RegExp("rgb" + ze(M, M, M)), bi = new RegExp("rgba" + ze(M, M, M, M)), _i = new RegExp("hsl" + ze(M, Ne, Ne)), wi = new RegExp(
375
- "hsla" + ze(M, Ne, Ne, M)
374
+ var yi = new RegExp("rgb" + Me(M, M, M)), bi = new RegExp("rgba" + Me(M, M, M, M)), _i = new RegExp("hsl" + Me(M, Ue, Ue)), wi = new RegExp(
375
+ "hsla" + Me(M, Ue, Ue, M)
376
376
  ), Ai = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Pi = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Si = /^#([0-9a-fA-F]{6})$/, Ri = /^#([0-9a-fA-F]{8})$/;
377
377
  function Ii(e) {
378
378
  let t;
379
- return typeof e == "number" ? e >>> 0 === e && e >= 0 && e <= 4294967295 ? e : null : (t = Si.exec(e)) ? parseInt(t[1] + "ff", 16) >>> 0 : X && X[e] !== void 0 ? X[e] : (t = yi.exec(e)) ? (ie(t[1]) << 24 | // r
379
+ return typeof e == "number" ? e >>> 0 === e && e >= 0 && e <= 4294967295 ? e : null : (t = Si.exec(e)) ? parseInt(t[1] + "ff", 16) >>> 0 : Y && Y[e] !== void 0 ? Y[e] : (t = yi.exec(e)) ? (ie(t[1]) << 24 | // r
380
380
  ie(t[2]) << 16 | // g
381
381
  ie(t[3]) << 8 | // b
382
382
  255) >>> // a
@@ -398,43 +398,43 @@ function Ii(e) {
398
398
  t[4] + t[4],
399
399
  // a
400
400
  16
401
- ) >>> 0 : (t = _i.exec(e)) ? (Ft(
402
- Ot(t[1]),
401
+ ) >>> 0 : (t = _i.exec(e)) ? (xt(
402
+ Ct(t[1]),
403
403
  // h
404
- Te(t[2]),
404
+ Fe(t[2]),
405
405
  // s
406
- Te(t[3])
406
+ Fe(t[3])
407
407
  // l
408
408
  ) | 255) >>> // a
409
- 0 : (t = wi.exec(e)) ? (Ft(
410
- Ot(t[1]),
409
+ 0 : (t = wi.exec(e)) ? (xt(
410
+ Ct(t[1]),
411
411
  // h
412
- Te(t[2]),
412
+ Fe(t[2]),
413
413
  // s
414
- Te(t[3])
414
+ Fe(t[3])
415
415
  // l
416
416
  ) | Tt(t[4])) >>> // a
417
417
  0 : null;
418
418
  }
419
- function Je(e, t, n) {
419
+ function Xe(e, t, n) {
420
420
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
421
421
  }
422
- function Ft(e, t, n) {
423
- const i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i, r = Je(s, i, e + 1 / 3), a = Je(s, i, e), o = Je(s, i, e - 1 / 3);
422
+ function xt(e, t, n) {
423
+ const i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i, r = Xe(s, i, e + 1 / 3), a = Xe(s, i, e), o = Xe(s, i, e - 1 / 3);
424
424
  return Math.round(r * 255) << 24 | Math.round(a * 255) << 16 | Math.round(o * 255) << 8;
425
425
  }
426
426
  function ie(e) {
427
427
  const t = parseInt(e, 10);
428
428
  return t < 0 ? 0 : t > 255 ? 255 : t;
429
429
  }
430
- function Ot(e) {
430
+ function Ct(e) {
431
431
  return (parseFloat(e) % 360 + 360) % 360 / 360;
432
432
  }
433
433
  function Tt(e) {
434
434
  const t = parseFloat(e);
435
435
  return t < 0 ? 0 : t > 1 ? 255 : Math.round(t * 255);
436
436
  }
437
- function Te(e) {
437
+ function Fe(e) {
438
438
  const t = parseFloat(e);
439
439
  return t < 0 ? 0 : t > 100 ? 1 : t / 100;
440
440
  }
@@ -445,17 +445,17 @@ function kt(e) {
445
445
  const n = (t & 4278190080) >>> 24, i = (t & 16711680) >>> 16, s = (t & 65280) >>> 8, r = (t & 255) / 255;
446
446
  return `rgba(${n}, ${i}, ${s}, ${r})`;
447
447
  }
448
- var ve = (e, t, n) => {
448
+ var ye = (e, t, n) => {
449
449
  if (c.fun(e))
450
450
  return e;
451
451
  if (c.arr(e))
452
- return ve({
452
+ return ye({
453
453
  range: e,
454
454
  output: t,
455
455
  extrapolate: n
456
456
  });
457
457
  if (c.str(e.output[0]))
458
- return bt(e);
458
+ return vt(e);
459
459
  const i = e, s = i.output, r = i.range || [0, 1], a = i.extrapolateLeft || i.extrapolate || "extend", o = i.extrapolateRight || i.extrapolate || "extend", l = i.easing || ((u) => u);
460
460
  return (u) => {
461
461
  const h = Ci(u, r);
@@ -489,47 +489,47 @@ function Ci(e, t) {
489
489
  ;
490
490
  return n - 1;
491
491
  }
492
- var un = {
492
+ var an = {
493
493
  linear: (e) => e,
494
494
  easeInOutCubic: (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2
495
- }, ye = Symbol.for("FluidValue.get"), ae = Symbol.for("FluidValue.observers"), j = (e) => !!(e && e[ye]), N = (e) => e && e[ye] ? e[ye]() : e, Et = (e) => e[ae] || null;
496
- function Fi(e, t) {
495
+ }, be = Symbol.for("FluidValue.get"), ae = Symbol.for("FluidValue.observers"), j = (e) => !!(e && e[be]), N = (e) => e && e[be] ? e[be]() : e, Ot = (e) => e[ae] || null;
496
+ function Ti(e, t) {
497
497
  e.eventObserved ? e.eventObserved(t) : e(t);
498
498
  }
499
- function be(e, t) {
499
+ function _e(e, t) {
500
500
  const n = e[ae];
501
501
  n && n.forEach((i) => {
502
- Fi(i, t);
502
+ Ti(i, t);
503
503
  });
504
504
  }
505
- var cn = class {
505
+ var on = class {
506
506
  constructor(e) {
507
507
  if (!e && !(e = this.get))
508
508
  throw Error("Unknown getter");
509
- Oi(this, e);
509
+ ki(this, e);
510
510
  }
511
- }, Oi = (e, t) => ln(e, ye, t);
511
+ }, ki = (e, t) => un(e, be, t);
512
512
  function oe(e, t) {
513
- if (e[ye]) {
513
+ if (e[be]) {
514
514
  let n = e[ae];
515
- n || ln(e, ae, n = /* @__PURE__ */ new Set()), n.has(t) || (n.add(t), e.observerAdded && e.observerAdded(n.size, t));
515
+ n || un(e, ae, n = /* @__PURE__ */ new Set()), n.has(t) || (n.add(t), e.observerAdded && e.observerAdded(n.size, t));
516
516
  }
517
517
  return t;
518
518
  }
519
- function _e(e, t) {
519
+ function we(e, t) {
520
520
  const n = e[ae];
521
521
  if (n && n.has(t)) {
522
522
  const i = n.size - 1;
523
523
  i ? n.delete(t) : e[ae] = null, e.observerRemoved && e.observerRemoved(i, t);
524
524
  }
525
525
  }
526
- var ln = (e, t, n) => Object.defineProperty(e, t, {
526
+ var un = (e, t, n) => Object.defineProperty(e, t, {
527
527
  value: n,
528
528
  writable: !0,
529
529
  configurable: !0
530
- }), Ee = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, Ti = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi, Vt = new RegExp(`(${Ee.source})(%|[a-z]+)`, "i"), ki = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, Me = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/, dn = (e) => {
530
+ }), Ve = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, Oi = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi, Ft = new RegExp(`(${Ve.source})(%|[a-z]+)`, "i"), Fi = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, Le = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/, cn = (e) => {
531
531
  const [t, n] = Ei(e);
532
- if (!t || yt())
532
+ if (!t || gt())
533
533
  return e;
534
534
  const i = window.getComputedStyle(document.documentElement).getPropertyValue(t);
535
535
  if (i)
@@ -538,101 +538,101 @@ var ln = (e, t, n) => Object.defineProperty(e, t, {
538
538
  const s = window.getComputedStyle(document.documentElement).getPropertyValue(n);
539
539
  return s || e;
540
540
  } else {
541
- if (n && Me.test(n))
542
- return dn(n);
541
+ if (n && Le.test(n))
542
+ return cn(n);
543
543
  if (n)
544
544
  return n;
545
545
  }
546
546
  return e;
547
547
  }, Ei = (e) => {
548
- const t = Me.exec(e);
548
+ const t = Le.exec(e);
549
549
  if (!t) return [,];
550
550
  const [, n, i] = t;
551
551
  return [n, i];
552
- }, et, Vi = (e, t, n, i, s) => `rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(i)}, ${s})`, fn = (e) => {
553
- et || (et = X ? (
552
+ }, Ye, Vi = (e, t, n, i, s) => `rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(i)}, ${s})`, ln = (e) => {
553
+ Ye || (Ye = Y ? (
554
554
  // match color names, ignore partial matches
555
- new RegExp(`(${Object.keys(X).join("|")})(?!\\w)`, "g")
555
+ new RegExp(`(${Object.keys(Y).join("|")})(?!\\w)`, "g")
556
556
  ) : (
557
557
  // never match
558
558
  /^\b$/
559
559
  ));
560
- const t = e.output.map((r) => N(r).replace(Me, dn).replace(Ti, kt).replace(et, kt)), n = t.map((r) => r.match(Ee).map(Number)), s = n[0].map(
560
+ const t = e.output.map((r) => N(r).replace(Le, cn).replace(Oi, kt).replace(Ye, kt)), n = t.map((r) => r.match(Ve).map(Number)), s = n[0].map(
561
561
  (r, a) => n.map((o) => {
562
562
  if (!(a in o))
563
563
  throw Error('The arity of each "output" value must be equal');
564
564
  return o[a];
565
565
  })
566
566
  ).map(
567
- (r) => ve({ ...e, output: r })
567
+ (r) => ye({ ...e, output: r })
568
568
  );
569
569
  return (r) => {
570
570
  var l;
571
- const a = !Vt.test(t[0]) && ((l = t.find((u) => Vt.test(u))) == null ? void 0 : l.replace(Ee, ""));
571
+ const a = !Ft.test(t[0]) && ((l = t.find((u) => Ft.test(u))) == null ? void 0 : l.replace(Ve, ""));
572
572
  let o = 0;
573
573
  return t[0].replace(
574
- Ee,
574
+ Ve,
575
575
  () => `${s[o++](r)}${a || ""}`
576
- ).replace(ki, Vi);
576
+ ).replace(Fi, Vi);
577
577
  };
578
- }, wt = "react-spring: ", hn = (e) => {
578
+ }, bt = "react-spring: ", dn = (e) => {
579
579
  const t = e;
580
580
  let n = !1;
581
581
  if (typeof t != "function")
582
- throw new TypeError(`${wt}once requires a function parameter`);
582
+ throw new TypeError(`${bt}once requires a function parameter`);
583
583
  return (...i) => {
584
584
  n || (t(...i), n = !0);
585
585
  };
586
- }, Di = hn(console.warn);
586
+ }, Di = dn(console.warn);
587
587
  function Ni() {
588
588
  Di(
589
- `${wt}The "interpolate" function is deprecated in v9 (use "to" instead)`
589
+ `${bt}The "interpolate" function is deprecated in v9 (use "to" instead)`
590
590
  );
591
591
  }
592
- var Ui = hn(console.warn);
592
+ var Ui = dn(console.warn);
593
593
  function qi() {
594
594
  Ui(
595
- `${wt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`
595
+ `${bt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`
596
596
  );
597
597
  }
598
- function Le(e) {
598
+ function Qe(e) {
599
599
  return c.str(e) && (e[0] == "#" || /\d/.test(e) || // Do not identify a CSS variable as an AnimatedString if its SSR
600
- !yt() && Me.test(e) || e in (X || {}));
600
+ !gt() && Le.test(e) || e in (Y || {}));
601
601
  }
602
- var At = yt() ? Re : ke, ji = () => {
603
- const e = H(!1);
604
- return At(() => (e.current = !0, () => {
602
+ var _t = gt() ? Ie : Ee, ji = () => {
603
+ const e = X(!1);
604
+ return _t(() => (e.current = !0, () => {
605
605
  e.current = !1;
606
606
  }), []), e;
607
607
  };
608
- function mn() {
608
+ function fn() {
609
609
  const e = ee()[1], t = ji();
610
610
  return () => {
611
611
  t.current && e(Math.random());
612
612
  };
613
613
  }
614
- var pn = (e) => Re(e, $i), $i = [];
615
- function Dt(e) {
616
- const t = H(void 0);
617
- return Re(() => {
614
+ var hn = (e) => Ie(e, $i), $i = [];
615
+ function Et(e) {
616
+ const t = X(void 0);
617
+ return Ie(() => {
618
618
  t.current = e;
619
619
  }), t.current;
620
620
  }
621
- var we = Symbol.for("Animated:node"), zi = (e) => !!e && e[we] === e, Q = (e) => e && e[we], Pt = (e, t) => hi(e, we, t), Qe = (e) => e && e[we] && e[we].getPayload(), gn = class {
621
+ var Ae = Symbol.for("Animated:node"), zi = (e) => !!e && e[Ae] === e, Q = (e) => e && e[Ae], wt = (e, t) => hi(e, Ae, t), Be = (e) => e && e[Ae] && e[Ae].getPayload(), mn = class {
622
622
  constructor() {
623
- Pt(this, this);
623
+ wt(this, this);
624
624
  }
625
625
  /** Get every `AnimatedValue` used by this node. */
626
626
  getPayload() {
627
627
  return this.payload || [];
628
628
  }
629
- }, Be = class vn extends gn {
629
+ }, Ge = class pn extends mn {
630
630
  constructor(t) {
631
631
  super(), this._value = t, this.done = !0, this.durationProgress = 0, c.num(this._value) && (this.lastPosition = this._value);
632
632
  }
633
633
  /** @internal */
634
634
  static create(t) {
635
- return new vn(t);
635
+ return new pn(t);
636
636
  }
637
637
  getPayload() {
638
638
  return [this];
@@ -647,15 +647,15 @@ var we = Symbol.for("Animated:node"), zi = (e) => !!e && e[we] === e, Q = (e) =>
647
647
  const { done: t } = this;
648
648
  this.done = !1, c.num(this._value) && (this.elapsedTime = 0, this.durationProgress = 0, this.lastPosition = this._value, t && (this.lastVelocity = null), this.v0 = null);
649
649
  }
650
- }, Ue = class yn extends Be {
650
+ }, qe = class gn extends Ge {
651
651
  constructor(t) {
652
- super(0), this._string = null, this._toString = ve({
652
+ super(0), this._string = null, this._toString = ye({
653
653
  output: [t, t]
654
654
  });
655
655
  }
656
656
  /** @internal */
657
657
  static create(t) {
658
- return new yn(t);
658
+ return new gn(t);
659
659
  }
660
660
  getValue() {
661
661
  const t = this._string;
@@ -673,11 +673,11 @@ var we = Symbol.for("Animated:node"), zi = (e) => !!e && e[we] === e, Q = (e) =>
673
673
  return !0;
674
674
  }
675
675
  reset(t) {
676
- t && (this._toString = ve({
676
+ t && (this._toString = ye({
677
677
  output: [this.getValue(), t]
678
678
  })), this._value = 0, super.reset();
679
679
  }
680
- }, qe = { dependencies: null }, Ge = class extends gn {
680
+ }, je = { dependencies: null }, He = class extends mn {
681
681
  constructor(e) {
682
682
  super(), this.source = e, this.setValue(e);
683
683
  }
@@ -703,17 +703,17 @@ var we = Symbol.for("Animated:node"), zi = (e) => !!e && e[we] === e, Q = (e) =>
703
703
  }
704
704
  /** Add to a payload set. */
705
705
  _addToPayload(e) {
706
- qe.dependencies && j(e) && qe.dependencies.add(e);
707
- const t = Qe(e);
706
+ je.dependencies && j(e) && je.dependencies.add(e);
707
+ const t = Be(e);
708
708
  t && A(t, (n) => this.add(n));
709
709
  }
710
- }, Mi = class bn extends Ge {
710
+ }, Mi = class vn extends He {
711
711
  constructor(t) {
712
712
  super(t);
713
713
  }
714
714
  /** @internal */
715
715
  static create(t) {
716
- return new bn(t);
716
+ return new vn(t);
717
717
  }
718
718
  getValue() {
719
719
  return this.source.map((t) => t.getValue());
@@ -724,42 +724,42 @@ var we = Symbol.for("Animated:node"), zi = (e) => !!e && e[we] === e, Q = (e) =>
724
724
  }
725
725
  };
726
726
  function Li(e) {
727
- return (Le(e) ? Ue : Be).create(e);
727
+ return (Qe(e) ? qe : Ge).create(e);
728
728
  }
729
- function ot(e) {
729
+ function rt(e) {
730
730
  const t = Q(e);
731
- return t ? t.constructor : c.arr(e) ? Mi : Le(e) ? Ue : Be;
731
+ return t ? t.constructor : c.arr(e) ? Mi : Qe(e) ? qe : Ge;
732
732
  }
733
- var Nt = (e, t) => {
733
+ var Vt = (e, t) => {
734
734
  const n = (
735
735
  // Function components must use "forwardRef" to avoid being
736
736
  // re-rendered on every animation frame.
737
737
  !c.fun(e) || e.prototype && e.prototype.isReactComponent
738
738
  );
739
- return Xt((i, s) => {
740
- const r = H(null), a = n && // eslint-disable-next-line react-hooks/rules-of-hooks
739
+ return Kt((i, s) => {
740
+ const r = X(null), a = n && // eslint-disable-next-line react-hooks/rules-of-hooks
741
741
  Xn(
742
742
  (v) => {
743
743
  r.current = Gi(s, v);
744
744
  },
745
745
  [s]
746
- ), [o, l] = Bi(i, t), u = mn(), h = () => {
746
+ ), [o, l] = Bi(i, t), u = fn(), h = () => {
747
747
  const v = r.current;
748
748
  if (n && !v)
749
749
  return;
750
750
  (v ? t.applyAnimatedValues(v, o.getValue(!0)) : !1) === !1 && u();
751
- }, d = new Qi(h, l), m = H(void 0);
752
- At(() => (m.current = d, A(l, (v) => oe(v, d)), () => {
751
+ }, d = new Qi(h, l), m = X(void 0);
752
+ _t(() => (m.current = d, A(l, (v) => oe(v, d)), () => {
753
753
  m.current && (A(
754
754
  m.current.deps,
755
- (v) => _e(v, m.current)
755
+ (v) => we(v, m.current)
756
756
  ), _.cancel(m.current.update));
757
- })), Re(h, []), pn(() => () => {
757
+ })), Ie(h, []), hn(() => () => {
758
758
  const v = m.current;
759
- A(v.deps, (g) => _e(g, v));
759
+ A(v.deps, (g) => we(g, v));
760
760
  });
761
761
  const p = t.getComponentProps(o.getValue());
762
- return /* @__PURE__ */ Zt.createElement(e, { ...p, ref: a });
762
+ return /* @__PURE__ */ Wt.createElement(e, { ...p, ref: a });
763
763
  });
764
764
  }, Qi = class {
765
765
  constructor(e, t) {
@@ -771,17 +771,17 @@ var Nt = (e, t) => {
771
771
  };
772
772
  function Bi(e, t) {
773
773
  const n = /* @__PURE__ */ new Set();
774
- return qe.dependencies = n, e.style && (e = {
774
+ return je.dependencies = n, e.style && (e = {
775
775
  ...e,
776
776
  style: t.createAnimatedStyle(e.style)
777
- }), e = new Ge(e), qe.dependencies = null, [e, n];
777
+ }), e = new He(e), je.dependencies = null, [e, n];
778
778
  }
779
779
  function Gi(e, t) {
780
780
  return e && (c.fun(e) ? e(t) : e.current = t), t;
781
781
  }
782
- var Ut = Symbol.for("AnimatedComponent"), Hi = (e, {
782
+ var Dt = Symbol.for("AnimatedComponent"), Hi = (e, {
783
783
  applyAnimatedValues: t = () => !1,
784
- createAnimatedStyle: n = (s) => new Ge(s),
784
+ createAnimatedStyle: n = (s) => new He(s),
785
785
  getComponentProps: i = (s) => s
786
786
  } = {}) => {
787
787
  const s = {
@@ -789,19 +789,19 @@ var Ut = Symbol.for("AnimatedComponent"), Hi = (e, {
789
789
  createAnimatedStyle: n,
790
790
  getComponentProps: i
791
791
  }, r = (a) => {
792
- const o = qt(a) || "Anonymous";
793
- return c.str(a) ? a = r[a] || (r[a] = Nt(a, s)) : a = a[Ut] || (a[Ut] = Nt(a, s)), a.displayName = `Animated(${o})`, a;
792
+ const o = Nt(a) || "Anonymous";
793
+ return c.str(a) ? a = r[a] || (r[a] = Vt(a, s)) : a = a[Dt] || (a[Dt] = Vt(a, s)), a.displayName = `Animated(${o})`, a;
794
794
  };
795
795
  return B(e, (a, o) => {
796
- c.arr(e) && (o = qt(a)), r[o] = r(a);
796
+ c.arr(e) && (o = Nt(a)), r[o] = r(a);
797
797
  }), {
798
798
  animated: r
799
799
  };
800
- }, qt = (e) => c.str(e) ? e : e && c.str(e.displayName) ? e.displayName : c.fun(e) && e.name || null;
800
+ }, Nt = (e) => c.str(e) ? e : e && c.str(e.displayName) ? e.displayName : c.fun(e) && e.name || null;
801
801
  function te(e, ...t) {
802
802
  return c.fun(e) ? e(...t) : e;
803
803
  }
804
- var pe = (e, t) => e === !0 || !!(t && e && (c.fun(e) ? e(t) : U(e).includes(t))), _n = (e, t) => c.obj(e) ? t && e[t] : e, wn = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, Wi = (e) => e, St = (e, t = Wi) => {
804
+ var ge = (e, t) => e === !0 || !!(t && e && (c.fun(e) ? e(t) : q(e).includes(t))), yn = (e, t) => c.obj(e) ? t && e[t] : e, bn = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, Wi = (e) => e, At = (e, t = Wi) => {
805
805
  let n = Ki;
806
806
  e.default && e.default !== !0 && (e = e.default, n = Object.keys(e));
807
807
  const i = {};
@@ -862,7 +862,7 @@ function Xi(e) {
862
862
  }), n)
863
863
  return t;
864
864
  }
865
- function An(e) {
865
+ function _n(e) {
866
866
  const t = Xi(e);
867
867
  if (t) {
868
868
  const n = { to: t };
@@ -870,8 +870,8 @@ function An(e) {
870
870
  }
871
871
  return { ...e };
872
872
  }
873
- function Ae(e) {
874
- return e = N(e), c.arr(e) ? e.map(Ae) : Le(e) ? L.createStringInterpolator({
873
+ function Pe(e) {
874
+ return e = N(e), c.arr(e) ? e.map(Pe) : Qe(e) ? L.createStringInterpolator({
875
875
  range: [0, 1],
876
876
  output: [e, e]
877
877
  })(1) : e;
@@ -880,7 +880,7 @@ function Yi(e) {
880
880
  for (const t in e) return !0;
881
881
  return !1;
882
882
  }
883
- function ut(e) {
883
+ function at(e) {
884
884
  return c.fun(e) || c.arr(e) && c.obj(e[0]);
885
885
  }
886
886
  function Ji(e, t) {
@@ -893,26 +893,26 @@ function es(e, t) {
893
893
  }
894
894
  var ts = {
895
895
  default: { tension: 170, friction: 26 }
896
- }, ct = {
896
+ }, ot = {
897
897
  ...ts.default,
898
898
  mass: 1,
899
899
  damping: 1,
900
- easing: un.linear,
900
+ easing: an.linear,
901
901
  clamp: !1
902
902
  }, ns = class {
903
903
  constructor() {
904
- this.velocity = 0, Object.assign(this, ct);
904
+ this.velocity = 0, Object.assign(this, ot);
905
905
  }
906
906
  };
907
907
  function is(e, t, n) {
908
- n && (n = { ...n }, jt(n, t), t = { ...n, ...t }), jt(e, t), Object.assign(e, t);
909
- for (const a in ct)
910
- e[a] == null && (e[a] = ct[a]);
908
+ n && (n = { ...n }, Ut(n, t), t = { ...n, ...t }), Ut(e, t), Object.assign(e, t);
909
+ for (const a in ot)
910
+ e[a] == null && (e[a] = ot[a]);
911
911
  let { frequency: i, damping: s } = e;
912
912
  const { mass: r } = e;
913
913
  return c.und(i) || (i < 0.01 && (i = 0.01), s < 0 && (s = 0), e.tension = Math.pow(2 * Math.PI / i, 2) * r, e.friction = 4 * Math.PI * s * r / i), e;
914
914
  }
915
- function jt(e, t) {
915
+ function Ut(e, t) {
916
916
  if (!c.und(t.decay))
917
917
  e.duration = void 0;
918
918
  else {
@@ -920,20 +920,20 @@ function jt(e, t) {
920
920
  (n || !c.und(t.frequency) || !c.und(t.damping) || !c.und(t.mass)) && (e.duration = void 0, e.decay = void 0), n && (e.frequency = void 0);
921
921
  }
922
922
  }
923
- var $t = [], ss = class {
923
+ var qt = [], ss = class {
924
924
  constructor() {
925
- this.changed = !1, this.values = $t, this.toValues = null, this.fromValues = $t, this.config = new ns(), this.immediate = !1;
925
+ this.changed = !1, this.values = qt, this.toValues = null, this.fromValues = qt, this.config = new ns(), this.immediate = !1;
926
926
  }
927
927
  };
928
- function Pn(e, { key: t, props: n, defaultProps: i, state: s, actions: r }) {
928
+ function wn(e, { key: t, props: n, defaultProps: i, state: s, actions: r }) {
929
929
  return new Promise((a, o) => {
930
- let l, u, h = pe(n.cancel ?? (i == null ? void 0 : i.cancel), t);
930
+ let l, u, h = ge(n.cancel ?? (i == null ? void 0 : i.cancel), t);
931
931
  if (h)
932
932
  p();
933
933
  else {
934
- c.und(n.pause) || (s.paused = pe(n.pause, t));
934
+ c.und(n.pause) || (s.paused = ge(n.pause, t));
935
935
  let v = i == null ? void 0 : i.pause;
936
- v !== !0 && (v = s.paused || pe(v, t)), l = te(n.delay || 0, t), v ? (s.resumeQueue.add(m), r.pause()) : (r.resume(), m());
936
+ v !== !0 && (v = s.paused || ge(v, t)), l = te(n.delay || 0, t), v ? (s.resumeQueue.add(m), r.pause()) : (r.resume(), m());
937
937
  }
938
938
  function d() {
939
939
  s.resumeQueue.add(m), s.timeouts.delete(u), u.cancel(), l = u.time - _.now();
@@ -951,10 +951,10 @@ function Pn(e, { key: t, props: n, defaultProps: i, state: s, actions: r }) {
951
951
  }
952
952
  });
953
953
  }
954
- var Rt = (e, t) => t.length == 1 ? t[0] : t.some((n) => n.cancelled) ? re(e.get()) : t.every((n) => n.noop) ? Sn(e.get()) : z(
954
+ var Pt = (e, t) => t.length == 1 ? t[0] : t.some((n) => n.cancelled) ? re(e.get()) : t.every((n) => n.noop) ? An(e.get()) : z(
955
955
  e.get(),
956
956
  t.every((n) => n.finished)
957
- ), Sn = (e) => ({
957
+ ), An = (e) => ({
958
958
  value: e,
959
959
  noop: !0,
960
960
  finished: !0,
@@ -968,11 +968,11 @@ var Rt = (e, t) => t.length == 1 ? t[0] : t.some((n) => n.cancelled) ? re(e.get(
968
968
  cancelled: !0,
969
969
  finished: !1
970
970
  });
971
- function Rn(e, t, n, i) {
971
+ function Pn(e, t, n, i) {
972
972
  const { callId: s, parentId: r, onRest: a } = t, { asyncTo: o, promise: l } = n;
973
973
  return !r && e === o && !t.reset ? l : n.promise = (async () => {
974
974
  n.asyncId = s, n.asyncTo = e;
975
- const u = St(
975
+ const u = At(
976
976
  t,
977
977
  (b, f) => (
978
978
  // The `onRest` prop is only called when the `runAsync` promise is resolved.
@@ -991,10 +991,10 @@ function Rn(e, t, n, i) {
991
991
  if (f)
992
992
  throw b.result = f, d(b), b;
993
993
  }, v = (b, f) => {
994
- const w = new zt(), y = new Mt();
994
+ const w = new jt(), y = new $t();
995
995
  return (async () => {
996
996
  if (L.skipAnimation)
997
- throw Pe(n), y.result = z(i, !1), d(y), y;
997
+ throw Se(n), y.result = z(i, !1), d(y), y;
998
998
  p(w);
999
999
  const P = c.obj(b) ? { ...b } : { ...f, to: b };
1000
1000
  P.parentId = s, B(u, (E, x) => {
@@ -1008,7 +1008,7 @@ function Rn(e, t, n, i) {
1008
1008
  };
1009
1009
  let g;
1010
1010
  if (L.skipAnimation)
1011
- return Pe(n), z(i, !1);
1011
+ return Se(n), z(i, !1);
1012
1012
  try {
1013
1013
  let b;
1014
1014
  c.arr(e) ? b = (async (f) => {
@@ -1016,9 +1016,9 @@ function Rn(e, t, n, i) {
1016
1016
  await v(w);
1017
1017
  })(e) : b = Promise.resolve(e(v, i.stop.bind(i))), await Promise.all([b.then(h), m]), g = z(i.get(), !0, !1);
1018
1018
  } catch (b) {
1019
- if (b instanceof zt)
1019
+ if (b instanceof jt)
1020
1020
  g = b.result;
1021
- else if (b instanceof Mt)
1021
+ else if (b instanceof $t)
1022
1022
  g = b.result;
1023
1023
  else
1024
1024
  throw b;
@@ -1030,20 +1030,20 @@ function Rn(e, t, n, i) {
1030
1030
  }), g;
1031
1031
  })();
1032
1032
  }
1033
- function Pe(e, t) {
1034
- he(e.timeouts, (n) => n.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
1033
+ function Se(e, t) {
1034
+ me(e.timeouts, (n) => n.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
1035
1035
  }
1036
- var zt = class extends Error {
1036
+ var jt = class extends Error {
1037
1037
  constructor() {
1038
1038
  super(
1039
1039
  "An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."
1040
1040
  );
1041
1041
  }
1042
- }, Mt = class extends Error {
1042
+ }, $t = class extends Error {
1043
1043
  constructor() {
1044
1044
  super("SkipAnimationSignal");
1045
1045
  }
1046
- }, lt = (e) => e instanceof It, rs = 1, It = class extends cn {
1046
+ }, ut = (e) => e instanceof St, rs = 1, St = class extends on {
1047
1047
  constructor() {
1048
1048
  super(...arguments), this.id = rs++, this._priority = 0;
1049
1049
  }
@@ -1083,7 +1083,7 @@ var zt = class extends Error {
1083
1083
  }
1084
1084
  /** Tell our children about our new value */
1085
1085
  _onChange(e, t = !1) {
1086
- be(this, {
1086
+ _e(this, {
1087
1087
  type: "change",
1088
1088
  parent: this,
1089
1089
  value: e,
@@ -1092,13 +1092,13 @@ var zt = class extends Error {
1092
1092
  }
1093
1093
  /** Tell our children about our new priority */
1094
1094
  _onPriorityChange(e) {
1095
- this.idle || $e.sort(this), be(this, {
1095
+ this.idle || ze.sort(this), _e(this, {
1096
1096
  type: "priority",
1097
1097
  parent: this,
1098
1098
  priority: e
1099
1099
  });
1100
1100
  }
1101
- }, ne = Symbol.for("SpringPhase"), In = 1, xn = 2, Cn = 4, tt = (e) => (e[ne] & In) > 0, W = (e) => (e[ne] & xn) > 0, ce = (e) => (e[ne] & Cn) > 0, Lt = (e, t) => t ? e[ne] |= xn | In : e[ne] &= -3, Qt = (e, t) => t ? e[ne] |= Cn : e[ne] &= -5, as = class extends It {
1101
+ }, ne = Symbol.for("SpringPhase"), Sn = 1, Rn = 2, In = 4, Je = (e) => (e[ne] & Sn) > 0, W = (e) => (e[ne] & Rn) > 0, le = (e) => (e[ne] & In) > 0, zt = (e, t) => t ? e[ne] |= Rn | Sn : e[ne] &= -3, Mt = (e, t) => t ? e[ne] |= In : e[ne] &= -5, as = class extends St {
1102
1102
  constructor(e, t) {
1103
1103
  if (super(), this.animation = new ss(), this.defaultProps = {}, this._state = {
1104
1104
  paused: !1,
@@ -1113,20 +1113,20 @@ var zt = class extends Error {
1113
1113
  }
1114
1114
  /** Equals true when not advancing on each frame. */
1115
1115
  get idle() {
1116
- return !(W(this) || this._state.asyncTo) || ce(this);
1116
+ return !(W(this) || this._state.asyncTo) || le(this);
1117
1117
  }
1118
1118
  get goal() {
1119
1119
  return N(this.animation.to);
1120
1120
  }
1121
1121
  get velocity() {
1122
1122
  const e = Q(this);
1123
- return e instanceof Be ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
1123
+ return e instanceof Ge ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
1124
1124
  }
1125
1125
  /**
1126
1126
  * When true, this value has been animated at least once.
1127
1127
  */
1128
1128
  get hasAnimated() {
1129
- return tt(this);
1129
+ return Je(this);
1130
1130
  }
1131
1131
  /**
1132
1132
  * When true, this value has an unfinished animation,
@@ -1139,7 +1139,7 @@ var zt = class extends Error {
1139
1139
  * When true, all current and future animations are paused.
1140
1140
  */
1141
1141
  get isPaused() {
1142
- return ce(this);
1142
+ return le(this);
1143
1143
  }
1144
1144
  /**
1145
1145
  *
@@ -1153,12 +1153,12 @@ var zt = class extends Error {
1153
1153
  let t = !0, n = !1;
1154
1154
  const i = this.animation;
1155
1155
  let { toValues: s } = i;
1156
- const { config: r } = i, a = Qe(i.to);
1157
- !a && j(i.to) && (s = U(N(i.to))), i.values.forEach((u, h) => {
1156
+ const { config: r } = i, a = Be(i.to);
1157
+ !a && j(i.to) && (s = q(N(i.to))), i.values.forEach((u, h) => {
1158
1158
  if (u.done) return;
1159
1159
  const d = (
1160
1160
  // Animated strings always go from 0 to 1.
1161
- u.constructor == Ue ? 1 : a ? a[h].lastPosition : s[h]
1161
+ u.constructor == qe ? 1 : a ? a[h].lastPosition : s[h]
1162
1162
  );
1163
1163
  let m = i.immediate, p = d;
1164
1164
  if (!m) {
@@ -1177,12 +1177,12 @@ var zt = class extends Error {
1177
1177
  } else {
1178
1178
  f = u.lastVelocity == null ? b : u.lastVelocity;
1179
1179
  const y = r.restVelocity || w / 10, P = r.clamp ? 0 : r.bounce, S = !c.und(P), E = g == d ? u.v0 > 0 : g < d;
1180
- let x, q = !1;
1181
- const F = 1, V = Math.ceil(e / F);
1182
- for (let I = 0; I < V && (x = Math.abs(f) > y, !(!x && (m = Math.abs(d - p) <= w, m))); ++I) {
1183
- S && (q = p == d || p > d == E, q && (f = -f * P, p = d));
1180
+ let x, U = !1;
1181
+ const C = 1, V = Math.ceil(e / C);
1182
+ for (let R = 0; R < V && (x = Math.abs(f) > y, !(!x && (m = Math.abs(d - p) <= w, m))); ++R) {
1183
+ S && (U = p == d || p > d == E, U && (f = -f * P, p = d));
1184
1184
  const O = -r.tension * 1e-6 * (p - d), T = -r.friction * 1e-3 * f, D = (O + T) / r.mass;
1185
- f = f + D * F, p = p + f * F;
1185
+ f = f + D * C, p = p + f * C;
1186
1186
  }
1187
1187
  }
1188
1188
  else {
@@ -1234,7 +1234,7 @@ var zt = class extends Error {
1234
1234
  let n;
1235
1235
  return c.und(e) ? (n = this.queue || [], this.queue = []) : n = [c.obj(e) ? e : { ...t, to: e }], Promise.all(
1236
1236
  n.map((i) => this._update(i))
1237
- ).then((i) => Rt(this, i));
1237
+ ).then((i) => Pt(this, i));
1238
1238
  }
1239
1239
  /**
1240
1240
  * Stop the current animation, and cancel any delayed updates.
@@ -1243,7 +1243,7 @@ var zt = class extends Error {
1243
1243
  */
1244
1244
  stop(e) {
1245
1245
  const { to: t } = this.animation;
1246
- return this._focus(this.get()), Pe(this._state, e && this._lastCallId), _.batchedUpdates(() => this._stop(t, e)), this;
1246
+ return this._focus(this.get()), Se(this._state, e && this._lastCallId), _.batchedUpdates(() => this._stop(t, e)), this;
1247
1247
  }
1248
1248
  /** Restart the animation. */
1249
1249
  reset() {
@@ -1262,45 +1262,45 @@ var zt = class extends Error {
1262
1262
  _prepareNode(e) {
1263
1263
  const t = this.key || "";
1264
1264
  let { to: n, from: i } = e;
1265
- n = c.obj(n) ? n[t] : n, (n == null || ut(n)) && (n = void 0), i = c.obj(i) ? i[t] : i, i == null && (i = void 0);
1265
+ n = c.obj(n) ? n[t] : n, (n == null || at(n)) && (n = void 0), i = c.obj(i) ? i[t] : i, i == null && (i = void 0);
1266
1266
  const s = { to: n, from: i };
1267
- return tt(this) || (e.reverse && ([n, i] = [i, n]), i = N(i), c.und(i) ? Q(this) || this._set(n) : this._set(i)), s;
1267
+ return Je(this) || (e.reverse && ([n, i] = [i, n]), i = N(i), c.und(i) ? Q(this) || this._set(n) : this._set(i)), s;
1268
1268
  }
1269
1269
  /** Every update is processed by this method before merging. */
1270
1270
  _update({ ...e }, t) {
1271
1271
  const { key: n, defaultProps: i } = this;
1272
1272
  e.default && Object.assign(
1273
1273
  i,
1274
- St(
1274
+ At(
1275
1275
  e,
1276
- (a, o) => /^on/.test(o) ? _n(a, n) : a
1276
+ (a, o) => /^on/.test(o) ? yn(a, n) : a
1277
1277
  )
1278
- ), Gt(this, e, "onProps"), de(this, "onProps", e, this);
1278
+ ), Qt(this, e, "onProps"), fe(this, "onProps", e, this);
1279
1279
  const s = this._prepareNode(e);
1280
1280
  if (Object.isFrozen(this))
1281
1281
  throw Error(
1282
1282
  "Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?"
1283
1283
  );
1284
1284
  const r = this._state;
1285
- return Pn(++this._lastCallId, {
1285
+ return wn(++this._lastCallId, {
1286
1286
  key: n,
1287
1287
  props: e,
1288
1288
  defaultProps: i,
1289
1289
  state: r,
1290
1290
  actions: {
1291
1291
  pause: () => {
1292
- ce(this) || (Qt(this, !0), fe(r.pauseQueue), de(
1292
+ le(this) || (Mt(this, !0), he(r.pauseQueue), fe(
1293
1293
  this,
1294
1294
  "onPause",
1295
- z(this, le(this, this.animation.to)),
1295
+ z(this, de(this, this.animation.to)),
1296
1296
  this
1297
1297
  ));
1298
1298
  },
1299
1299
  resume: () => {
1300
- ce(this) && (Qt(this, !1), W(this) && this._resume(), fe(r.resumeQueue), de(
1300
+ le(this) && (Mt(this, !1), W(this) && this._resume(), he(r.resumeQueue), fe(
1301
1301
  this,
1302
1302
  "onResume",
1303
- z(this, le(this, this.animation.to)),
1303
+ z(this, de(this, this.animation.to)),
1304
1304
  this
1305
1305
  ));
1306
1306
  },
@@ -1308,7 +1308,7 @@ var zt = class extends Error {
1308
1308
  }
1309
1309
  }).then((a) => {
1310
1310
  if (e.loop && a.finished && !(t && a.noop)) {
1311
- const o = Fn(e);
1311
+ const o = xn(e);
1312
1312
  if (o)
1313
1313
  return this._update(o, !0);
1314
1314
  }
@@ -1332,7 +1332,7 @@ var zt = class extends Error {
1332
1332
  m && (o.from = d), d = N(d);
1333
1333
  const p = !G(h, l);
1334
1334
  p && this._focus(h);
1335
- const v = ut(t.to), { config: g } = o, { decay: b, velocity: f } = g;
1335
+ const v = at(t.to), { config: g } = o, { decay: b, velocity: f } = g;
1336
1336
  (i || s) && (g.velocity = 0), t.config && !v && is(
1337
1337
  g,
1338
1338
  te(t.config, r),
@@ -1346,48 +1346,48 @@ var zt = class extends Error {
1346
1346
  // When `reset` is undefined, the `from` prop implies `reset: true`,
1347
1347
  // except for declarative updates. When `reset` is defined, there
1348
1348
  // must exist a value to animate from.
1349
- c.und(t.reset) ? s && !t.default : !c.und(d) && pe(t.reset, r)
1350
- ), P = y ? d : this.get(), S = Ae(h), E = c.num(S) || c.arr(S) || Le(S), x = !v && (!E || pe(a.immediate || t.immediate, r));
1349
+ c.und(t.reset) ? s && !t.default : !c.und(d) && ge(t.reset, r)
1350
+ ), P = y ? d : this.get(), S = Pe(h), E = c.num(S) || c.arr(S) || Qe(S), x = !v && (!E || ge(a.immediate || t.immediate, r));
1351
1351
  if (p) {
1352
- const I = ot(h);
1353
- if (I !== w.constructor)
1352
+ const R = rt(h);
1353
+ if (R !== w.constructor)
1354
1354
  if (x)
1355
1355
  w = this._set(S);
1356
1356
  else
1357
1357
  throw Error(
1358
- `Cannot animate between ${w.constructor.name} and ${I.name}, as the "to" prop suggests`
1358
+ `Cannot animate between ${w.constructor.name} and ${R.name}, as the "to" prop suggests`
1359
1359
  );
1360
1360
  }
1361
- const q = w.constructor;
1362
- let F = j(h), V = !1;
1363
- if (!F) {
1364
- const I = y || !tt(this) && m;
1365
- (p || I) && (V = G(Ae(P), S), F = !V), (!G(o.immediate, x) && !x || !G(g.decay, b) || !G(g.velocity, f)) && (F = !0);
1361
+ const U = w.constructor;
1362
+ let C = j(h), V = !1;
1363
+ if (!C) {
1364
+ const R = y || !Je(this) && m;
1365
+ (p || R) && (V = G(Pe(P), S), C = !V), (!G(o.immediate, x) && !x || !G(g.decay, b) || !G(g.velocity, f)) && (C = !0);
1366
1366
  }
1367
- if (V && W(this) && (o.changed && !y ? F = !0 : F || this._stop(l)), !v && ((F || j(l)) && (o.values = w.getPayload(), o.toValues = j(h) ? null : q == Ue ? [1] : U(S)), o.immediate != x && (o.immediate = x, !x && !y && this._set(l)), F)) {
1368
- const { onRest: I } = o;
1369
- A(us, (T) => Gt(this, t, T));
1370
- const O = z(this, le(this, l));
1371
- fe(this._pendingCalls, O), this._pendingCalls.add(n), o.changed && _.batchedUpdates(() => {
1367
+ if (V && W(this) && (o.changed && !y ? C = !0 : C || this._stop(l)), !v && ((C || j(l)) && (o.values = w.getPayload(), o.toValues = j(h) ? null : U == qe ? [1] : q(S)), o.immediate != x && (o.immediate = x, !x && !y && this._set(l)), C)) {
1368
+ const { onRest: R } = o;
1369
+ A(us, (T) => Qt(this, t, T));
1370
+ const O = z(this, de(this, l));
1371
+ he(this._pendingCalls, O), this._pendingCalls.add(n), o.changed && _.batchedUpdates(() => {
1372
1372
  var T;
1373
- o.changed = !y, I == null || I(O, this), y ? te(a.onRest, O) : (T = o.onStart) == null || T.call(o, O, this);
1373
+ o.changed = !y, R == null || R(O, this), y ? te(a.onRest, O) : (T = o.onStart) == null || T.call(o, O, this);
1374
1374
  });
1375
1375
  }
1376
- y && this._set(P), v ? n(Rn(t.to, t, this._state, this)) : F ? this._start() : W(this) && !p ? this._pendingCalls.add(n) : n(Sn(P));
1376
+ y && this._set(P), v ? n(Pn(t.to, t, this._state, this)) : C ? this._start() : W(this) && !p ? this._pendingCalls.add(n) : n(An(P));
1377
1377
  }
1378
1378
  /** Update the `animation.to` value, which might be a `FluidValue` */
1379
1379
  _focus(e) {
1380
1380
  const t = this.animation;
1381
- e !== t.to && (Et(this) && this._detach(), t.to = e, Et(this) && this._attach());
1381
+ e !== t.to && (Ot(this) && this._detach(), t.to = e, Ot(this) && this._attach());
1382
1382
  }
1383
1383
  _attach() {
1384
1384
  let e = 0;
1385
1385
  const { to: t } = this.animation;
1386
- j(t) && (oe(t, this), lt(t) && (e = t.priority + 1)), this.priority = e;
1386
+ j(t) && (oe(t, this), ut(t) && (e = t.priority + 1)), this.priority = e;
1387
1387
  }
1388
1388
  _detach() {
1389
1389
  const { to: e } = this.animation;
1390
- j(e) && _e(e, this);
1390
+ j(e) && we(e, this);
1391
1391
  }
1392
1392
  /**
1393
1393
  * Update the current value from outside the frameloop,
@@ -1398,8 +1398,8 @@ var zt = class extends Error {
1398
1398
  if (!c.und(n)) {
1399
1399
  const i = Q(this);
1400
1400
  if (!i || !G(n, i.getValue())) {
1401
- const s = ot(n);
1402
- !i || i.constructor != s ? Pt(this, s.create(n)) : i.setValue(n), i && _.batchedUpdates(() => {
1401
+ const s = rt(n);
1402
+ !i || i.constructor != s ? wt(this, s.create(n)) : i.setValue(n), i && _.batchedUpdates(() => {
1403
1403
  this._onChange(n, t);
1404
1404
  });
1405
1405
  }
@@ -1408,10 +1408,10 @@ var zt = class extends Error {
1408
1408
  }
1409
1409
  _onStart() {
1410
1410
  const e = this.animation;
1411
- e.changed || (e.changed = !0, de(
1411
+ e.changed || (e.changed = !0, fe(
1412
1412
  this,
1413
1413
  "onStart",
1414
- z(this, le(this, e.to)),
1414
+ z(this, de(this, e.to)),
1415
1415
  this
1416
1416
  ));
1417
1417
  }
@@ -1423,10 +1423,10 @@ var zt = class extends Error {
1423
1423
  // is added to the frameloop.
1424
1424
  _start() {
1425
1425
  const e = this.animation;
1426
- Q(this).reset(N(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), W(this) || (Lt(this, !0), ce(this) || this._resume());
1426
+ Q(this).reset(N(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), W(this) || (zt(this, !0), le(this) || this._resume());
1427
1427
  }
1428
1428
  _resume() {
1429
- L.skipAnimation ? this.finish() : $e.start(this);
1429
+ L.skipAnimation ? this.finish() : ze.start(this);
1430
1430
  }
1431
1431
  /**
1432
1432
  * Exit the frameloop and notify `onRest` listeners.
@@ -1435,28 +1435,28 @@ var zt = class extends Error {
1435
1435
  */
1436
1436
  _stop(e, t) {
1437
1437
  if (W(this)) {
1438
- Lt(this, !1);
1438
+ zt(this, !1);
1439
1439
  const n = this.animation;
1440
1440
  A(n.values, (s) => {
1441
1441
  s.done = !0;
1442
- }), n.toValues && (n.onChange = n.onPause = n.onResume = void 0), be(this, {
1442
+ }), n.toValues && (n.onChange = n.onPause = n.onResume = void 0), _e(this, {
1443
1443
  type: "idle",
1444
1444
  parent: this
1445
1445
  });
1446
- const i = t ? re(this.get()) : z(this.get(), le(this, e ?? n.to));
1447
- fe(this._pendingCalls, i), n.changed && (n.changed = !1, de(this, "onRest", i, this));
1446
+ const i = t ? re(this.get()) : z(this.get(), de(this, e ?? n.to));
1447
+ he(this._pendingCalls, i), n.changed && (n.changed = !1, fe(this, "onRest", i, this));
1448
1448
  }
1449
1449
  }
1450
1450
  };
1451
- function le(e, t) {
1452
- const n = Ae(t), i = Ae(e.get());
1451
+ function de(e, t) {
1452
+ const n = Pe(t), i = Pe(e.get());
1453
1453
  return G(i, n);
1454
1454
  }
1455
- function Fn(e, t = e.loop, n = e.to) {
1455
+ function xn(e, t = e.loop, n = e.to) {
1456
1456
  const i = te(t);
1457
1457
  if (i) {
1458
- const s = i !== !0 && An(i), r = (s || e).reverse, a = !s || s.reset;
1459
- return Se({
1458
+ const s = i !== !0 && _n(i), r = (s || e).reverse, a = !s || s.reset;
1459
+ return Re({
1460
1460
  ...e,
1461
1461
  loop: t,
1462
1462
  // Avoid updating default props when looping.
@@ -1466,7 +1466,7 @@ function Fn(e, t = e.loop, n = e.to) {
1466
1466
  // For the "reverse" prop to loop as expected, the "to" prop
1467
1467
  // must be undefined. The "reverse" prop is ignored when the
1468
1468
  // "to" prop is an array or function.
1469
- to: !r || ut(n) ? n : void 0,
1469
+ to: !r || at(n) ? n : void 0,
1470
1470
  // Ignore the "from" prop except on reset.
1471
1471
  from: a ? e.from : void 0,
1472
1472
  reset: a,
@@ -1476,15 +1476,15 @@ function Fn(e, t = e.loop, n = e.to) {
1476
1476
  });
1477
1477
  }
1478
1478
  }
1479
- function Se(e) {
1480
- const { to: t, from: n } = e = An(e), i = /* @__PURE__ */ new Set();
1481
- return c.obj(t) && Bt(t, i), c.obj(n) && Bt(n, i), e.keys = i.size ? Array.from(i) : null, e;
1479
+ function Re(e) {
1480
+ const { to: t, from: n } = e = _n(e), i = /* @__PURE__ */ new Set();
1481
+ return c.obj(t) && Lt(t, i), c.obj(n) && Lt(n, i), e.keys = i.size ? Array.from(i) : null, e;
1482
1482
  }
1483
1483
  function os(e) {
1484
- const t = Se(e);
1485
- return c.und(t.default) && (t.default = St(t)), t;
1484
+ const t = Re(e);
1485
+ return c.und(t.default) && (t.default = At(t)), t;
1486
1486
  }
1487
- function Bt(e, t) {
1487
+ function Lt(e, t) {
1488
1488
  B(e, (n, i) => n != null && t.add(i));
1489
1489
  }
1490
1490
  var us = [
@@ -1494,10 +1494,10 @@ var us = [
1494
1494
  "onPause",
1495
1495
  "onResume"
1496
1496
  ];
1497
- function Gt(e, t, n) {
1498
- e.animation[n] = t[n] !== wn(t, n) ? _n(t[n], e.key) : void 0;
1497
+ function Qt(e, t, n) {
1498
+ e.animation[n] = t[n] !== bn(t, n) ? yn(t[n], e.key) : void 0;
1499
1499
  }
1500
- function de(e, t, ...n) {
1500
+ function fe(e, t, ...n) {
1501
1501
  var i, s, r, a;
1502
1502
  (s = (i = e.animation)[t]) == null || s.call(i, ...n), (a = (r = e.defaultProps)[t]) == null || a.call(r, ...n);
1503
1503
  }
@@ -1541,7 +1541,7 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
1541
1541
  }
1542
1542
  /** Push an update onto the queue of each value. */
1543
1543
  update(e) {
1544
- return e && this.queue.push(Se(e)), this;
1544
+ return e && this.queue.push(Re(e)), this;
1545
1545
  }
1546
1546
  /**
1547
1547
  * Start the queued animations for every spring, and resolve the returned
@@ -1552,15 +1552,15 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
1552
1552
  */
1553
1553
  start(e) {
1554
1554
  let { queue: t } = this;
1555
- return e ? t = U(e).map(Se) : this.queue = [], this._flush ? this._flush(this, t) : (Vn(this, t), dt(this, t));
1555
+ return e ? t = q(e).map(Re) : this.queue = [], this._flush ? this._flush(this, t) : (Fn(this, t), ct(this, t));
1556
1556
  }
1557
1557
  /** @internal */
1558
1558
  stop(e, t) {
1559
1559
  if (e !== !!e && (t = e), t) {
1560
1560
  const n = this.springs;
1561
- A(U(t), (i) => n[i].stop(!!e));
1561
+ A(q(t), (i) => n[i].stop(!!e));
1562
1562
  } else
1563
- Pe(this._state, this._lastAsyncId), this.each((n) => n.stop(!!e));
1563
+ Se(this._state, this._lastAsyncId), this.each((n) => n.stop(!!e));
1564
1564
  return this;
1565
1565
  }
1566
1566
  /** Freeze the active animation in time */
@@ -1569,7 +1569,7 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
1569
1569
  this.start({ pause: !0 });
1570
1570
  else {
1571
1571
  const t = this.springs;
1572
- A(U(e), (n) => t[n].pause());
1572
+ A(q(e), (n) => t[n].pause());
1573
1573
  }
1574
1574
  return this;
1575
1575
  }
@@ -1579,7 +1579,7 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
1579
1579
  this.start({ pause: !1 });
1580
1580
  else {
1581
1581
  const t = this.springs;
1582
- A(U(e), (n) => t[n].resume());
1582
+ A(q(e), (n) => t[n].resume());
1583
1583
  }
1584
1584
  return this;
1585
1585
  }
@@ -1590,13 +1590,13 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
1590
1590
  /** @internal Called at the end of every animation frame */
1591
1591
  _onFrame() {
1592
1592
  const { onStart: e, onChange: t, onRest: n } = this._events, i = this._active.size > 0, s = this._changed.size > 0;
1593
- (i && !this._started || s && !this._started) && (this._started = !0, he(e, ([o, l]) => {
1593
+ (i && !this._started || s && !this._started) && (this._started = !0, me(e, ([o, l]) => {
1594
1594
  l.value = this.get(), o(l, this, this._item);
1595
1595
  }));
1596
1596
  const r = !i && this._started, a = s || r && n.size ? this.get() : null;
1597
- s && t.size && he(t, ([o, l]) => {
1597
+ s && t.size && me(t, ([o, l]) => {
1598
1598
  l.value = a, o(l, this, this._item);
1599
- }), r && (this._started = !1, he(n, ([o, l]) => {
1599
+ }), r && (this._started = !1, me(n, ([o, l]) => {
1600
1600
  l.value = a, o(l, this, this._item);
1601
1601
  }));
1602
1602
  }
@@ -1610,12 +1610,12 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
1610
1610
  _.onFrame(this._onFrame);
1611
1611
  }
1612
1612
  };
1613
- function dt(e, t) {
1614
- return Promise.all(t.map((n) => On(e, n))).then(
1615
- (n) => Rt(e, n)
1613
+ function ct(e, t) {
1614
+ return Promise.all(t.map((n) => Cn(e, n))).then(
1615
+ (n) => Pt(e, n)
1616
1616
  );
1617
1617
  }
1618
- async function On(e, t, n) {
1618
+ async function Cn(e, t, n) {
1619
1619
  const { keys: i, to: s, from: r, loop: a, onRest: o, onResolve: l } = t, u = c.obj(t.default) && t.default;
1620
1620
  a && (t.loop = !1), s === !1 && (t.to = null), r === !1 && (t.from = null);
1621
1621
  const h = c.arr(s) || c.fun(s) ? s : void 0;
@@ -1634,20 +1634,20 @@ async function On(e, t, n) {
1634
1634
  }
1635
1635
  });
1636
1636
  const d = e._state;
1637
- t.pause === !d.paused ? (d.paused = t.pause, fe(t.pause ? d.pauseQueue : d.resumeQueue)) : d.paused && (t.pause = !0);
1637
+ t.pause === !d.paused ? (d.paused = t.pause, he(t.pause ? d.pauseQueue : d.resumeQueue)) : d.paused && (t.pause = !0);
1638
1638
  const m = (i || Object.keys(e.springs)).map(
1639
1639
  (g) => e.springs[g].start(t)
1640
- ), p = t.cancel === !0 || wn(t, "cancel") === !0;
1640
+ ), p = t.cancel === !0 || bn(t, "cancel") === !0;
1641
1641
  (h || p && d.asyncId) && m.push(
1642
- Pn(++e._lastAsyncId, {
1642
+ wn(++e._lastAsyncId, {
1643
1643
  props: t,
1644
1644
  state: d,
1645
1645
  actions: {
1646
- pause: rt,
1647
- resume: rt,
1646
+ pause: it,
1647
+ resume: it,
1648
1648
  start(g, b) {
1649
- p ? (Pe(d, e._lastAsyncId), b(re(e))) : (g.onRest = o, b(
1650
- Rn(
1649
+ p ? (Se(d, e._lastAsyncId), b(re(e))) : (g.onRest = o, b(
1650
+ Pn(
1651
1651
  h,
1652
1652
  g,
1653
1653
  d,
@@ -1660,18 +1660,18 @@ async function On(e, t, n) {
1660
1660
  ), d.paused && await new Promise((g) => {
1661
1661
  d.resumeQueue.add(g);
1662
1662
  });
1663
- const v = Rt(e, await Promise.all(m));
1663
+ const v = Pt(e, await Promise.all(m));
1664
1664
  if (a && v.finished && !(n && v.noop)) {
1665
- const g = Fn(t, a, s);
1665
+ const g = xn(t, a, s);
1666
1666
  if (g)
1667
- return Vn(e, [g]), On(e, g, !0);
1667
+ return Fn(e, [g]), Cn(e, g, !0);
1668
1668
  }
1669
1669
  return l && _.batchedUpdates(() => l(v, e, e.item)), v;
1670
1670
  }
1671
- function Ht(e, t) {
1671
+ function Bt(e, t) {
1672
1672
  const n = { ...e.springs };
1673
- return t && A(U(t), (i) => {
1674
- c.und(i.keys) && (i = Se(i)), c.obj(i.to) || (i = { ...i, to: void 0 }), En(n, i, (s) => kn(s));
1673
+ return t && A(q(t), (i) => {
1674
+ c.und(i.keys) && (i = Re(i)), c.obj(i.to) || (i = { ...i, to: void 0 }), On(n, i, (s) => kn(s));
1675
1675
  }), Tn(e, n), n;
1676
1676
  }
1677
1677
  function Tn(e, t) {
@@ -1683,17 +1683,17 @@ function kn(e, t) {
1683
1683
  const n = new as();
1684
1684
  return n.key = e, t && oe(n, t), n;
1685
1685
  }
1686
- function En(e, t, n) {
1686
+ function On(e, t, n) {
1687
1687
  t.keys && A(t.keys, (i) => {
1688
1688
  (e[i] || (e[i] = n(i)))._prepareNode(t);
1689
1689
  });
1690
1690
  }
1691
- function Vn(e, t) {
1691
+ function Fn(e, t) {
1692
1692
  A(t, (n) => {
1693
- En(e.springs, n, (i) => kn(i, e));
1693
+ On(e.springs, n, (i) => kn(i, e));
1694
1694
  });
1695
1695
  }
1696
- var fs = Zt.createContext({
1696
+ var fs = Wt.createContext({
1697
1697
  pause: !1,
1698
1698
  immediate: !1
1699
1699
  }), hs = () => {
@@ -1749,21 +1749,21 @@ function ms(e, t, n) {
1749
1749
  const s = Oe(
1750
1750
  () => i || arguments.length == 3 ? hs() : void 0,
1751
1751
  []
1752
- ), r = H(0), a = mn(), o = Oe(
1752
+ ), r = X(0), a = fn(), o = Oe(
1753
1753
  () => ({
1754
1754
  ctrls: [],
1755
1755
  queue: [],
1756
1756
  flush(f, w) {
1757
- const y = Ht(f, w);
1758
- return r.current > 0 && !o.queue.length && !Object.keys(y).some((S) => !f.springs[S]) ? dt(f, w) : new Promise((S) => {
1757
+ const y = Bt(f, w);
1758
+ return r.current > 0 && !o.queue.length && !Object.keys(y).some((S) => !f.springs[S]) ? ct(f, w) : new Promise((S) => {
1759
1759
  Tn(f, y), o.queue.push(() => {
1760
- S(dt(f, w));
1760
+ S(ct(f, w));
1761
1761
  }), a();
1762
1762
  });
1763
1763
  }
1764
1764
  }),
1765
1765
  []
1766
- ), l = H([...o.ctrls]), u = H([]), h = Dt(e) || 0;
1766
+ ), l = X([...o.ctrls]), u = X([]), h = Et(e) || 0;
1767
1767
  Oe(() => {
1768
1768
  A(l.current.slice(e, h), (f) => {
1769
1769
  Ji(f, s), f.stop(!0);
@@ -1778,9 +1778,9 @@ function ms(e, t, n) {
1778
1778
  }
1779
1779
  }
1780
1780
  const m = l.current.map(
1781
- (f, w) => Ht(f, u.current[w])
1782
- ), p = Yn(fs), v = Dt(p), g = p !== v && Yi(p);
1783
- At(() => {
1781
+ (f, w) => Bt(f, u.current[w])
1782
+ ), p = Yn(fs), v = Et(p), g = p !== v && Yi(p);
1783
+ _t(() => {
1784
1784
  r.current++, o.ctrls = l.current;
1785
1785
  const { queue: f } = o;
1786
1786
  f.length && (o.queue = [], A(f, (w) => w())), A(l.current, (w, y) => {
@@ -1788,7 +1788,7 @@ function ms(e, t, n) {
1788
1788
  const P = u.current[y];
1789
1789
  P && (es(w, P.ref), w.ref ? w.queue.push(P) : w.start(P));
1790
1790
  });
1791
- }), pn(() => () => {
1791
+ }), hn(() => () => {
1792
1792
  A(o.ctrls, (f) => f.stop(!0));
1793
1793
  });
1794
1794
  const b = m.map((f) => ({ ...f }));
@@ -1802,42 +1802,42 @@ function ps(e, t) {
1802
1802
  );
1803
1803
  return n || arguments.length == 2 ? [i, s] : i;
1804
1804
  }
1805
- var gs = class extends It {
1805
+ var gs = class extends St {
1806
1806
  constructor(e, t) {
1807
- super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc = ve(...t);
1808
- const n = this._get(), i = ot(n);
1809
- Pt(this, i.create(n));
1807
+ super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc = ye(...t);
1808
+ const n = this._get(), i = rt(n);
1809
+ wt(this, i.create(n));
1810
1810
  }
1811
1811
  advance(e) {
1812
1812
  const t = this._get(), n = this.get();
1813
- G(t, n) || (Q(this).setValue(t), this._onChange(t, this.idle)), !this.idle && Wt(this._active) && nt(this);
1813
+ G(t, n) || (Q(this).setValue(t), this._onChange(t, this.idle)), !this.idle && Gt(this._active) && et(this);
1814
1814
  }
1815
1815
  _get() {
1816
- const e = c.arr(this.source) ? this.source.map(N) : U(N(this.source));
1816
+ const e = c.arr(this.source) ? this.source.map(N) : q(N(this.source));
1817
1817
  return this.calc(...e);
1818
1818
  }
1819
1819
  _start() {
1820
- this.idle && !Wt(this._active) && (this.idle = !1, A(Qe(this), (e) => {
1820
+ this.idle && !Gt(this._active) && (this.idle = !1, A(Be(this), (e) => {
1821
1821
  e.done = !1;
1822
- }), L.skipAnimation ? (_.batchedUpdates(() => this.advance()), nt(this)) : $e.start(this));
1822
+ }), L.skipAnimation ? (_.batchedUpdates(() => this.advance()), et(this)) : ze.start(this));
1823
1823
  }
1824
1824
  // Observe our sources only when we're observed.
1825
1825
  _attach() {
1826
1826
  let e = 1;
1827
- A(U(this.source), (t) => {
1828
- j(t) && oe(t, this), lt(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
1827
+ A(q(this.source), (t) => {
1828
+ j(t) && oe(t, this), ut(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
1829
1829
  }), this.priority = e, this._start();
1830
1830
  }
1831
1831
  // Stop observing our sources once we have no observers.
1832
1832
  _detach() {
1833
- A(U(this.source), (e) => {
1834
- j(e) && _e(e, this);
1835
- }), this._active.clear(), nt(this);
1833
+ A(q(this.source), (e) => {
1834
+ j(e) && we(e, this);
1835
+ }), this._active.clear(), et(this);
1836
1836
  }
1837
1837
  /** @internal */
1838
1838
  eventObserved(e) {
1839
- e.type == "change" ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : e.type == "idle" ? this._active.delete(e.parent) : e.type == "priority" && (this.priority = U(this.source).reduce(
1840
- (t, n) => Math.max(t, (lt(n) ? n.priority : 0) + 1),
1839
+ e.type == "change" ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : e.type == "idle" ? this._active.delete(e.parent) : e.type == "priority" && (this.priority = q(this.source).reduce(
1840
+ (t, n) => Math.max(t, (ut(n) ? n.priority : 0) + 1),
1841
1841
  0
1842
1842
  ));
1843
1843
  }
@@ -1845,26 +1845,26 @@ var gs = class extends It {
1845
1845
  function vs(e) {
1846
1846
  return e.idle !== !1;
1847
1847
  }
1848
- function Wt(e) {
1848
+ function Gt(e) {
1849
1849
  return !e.size || Array.from(e).every(vs);
1850
1850
  }
1851
- function nt(e) {
1852
- e.idle || (e.idle = !0, A(Qe(e), (t) => {
1851
+ function et(e) {
1852
+ e.idle || (e.idle = !0, A(Be(e), (t) => {
1853
1853
  t.done = !0;
1854
- }), be(e, {
1854
+ }), _e(e, {
1855
1855
  type: "idle",
1856
1856
  parent: e
1857
1857
  }));
1858
1858
  }
1859
1859
  L.assign({
1860
- createStringInterpolator: fn,
1860
+ createStringInterpolator: ln,
1861
1861
  to: (e, t) => new gs(e, t)
1862
1862
  });
1863
- var Dn = /^--/;
1863
+ var En = /^--/;
1864
1864
  function ys(e, t) {
1865
- return t == null || typeof t == "boolean" || t === "" ? "" : typeof t == "number" && t !== 0 && !Dn.test(e) && !(ge.hasOwnProperty(e) && ge[e]) ? t + "px" : ("" + t).trim();
1865
+ return t == null || typeof t == "boolean" || t === "" ? "" : typeof t == "number" && t !== 0 && !En.test(e) && !(ve.hasOwnProperty(e) && ve[e]) ? t + "px" : ("" + t).trim();
1866
1866
  }
1867
- var Kt = {};
1867
+ var Ht = {};
1868
1868
  function bs(e, t) {
1869
1869
  if (!e.nodeType || !e.setAttribute)
1870
1870
  return !1;
@@ -1877,7 +1877,7 @@ function bs(e, t) {
1877
1877
  viewBox: l,
1878
1878
  ...u
1879
1879
  } = t, h = Object.values(u), d = Object.keys(u).map(
1880
- (m) => n || e.hasAttribute(m) ? m : Kt[m] || (Kt[m] = m.replace(
1880
+ (m) => n || e.hasAttribute(m) ? m : Ht[m] || (Ht[m] = m.replace(
1881
1881
  /([A-Z])/g,
1882
1882
  // Attributes are written in dash case
1883
1883
  (p) => "-" + p.toLowerCase()
@@ -1887,13 +1887,13 @@ function bs(e, t) {
1887
1887
  for (const m in s)
1888
1888
  if (s.hasOwnProperty(m)) {
1889
1889
  const p = ys(m, s[m]);
1890
- Dn.test(m) ? e.style.setProperty(m, p) : e.style[m] = p;
1890
+ En.test(m) ? e.style.setProperty(m, p) : e.style[m] = p;
1891
1891
  }
1892
1892
  d.forEach((m, p) => {
1893
1893
  e.setAttribute(m, h[p]);
1894
1894
  }), i !== void 0 && (e.className = i), a !== void 0 && (e.scrollTop = a), o !== void 0 && (e.scrollLeft = o), l !== void 0 && e.setAttribute("viewBox", l);
1895
1895
  }
1896
- var ge = {
1896
+ var ve = {
1897
1897
  animationIterationCount: !0,
1898
1898
  borderImageOutset: !0,
1899
1899
  borderImageSlice: !0,
@@ -1937,33 +1937,33 @@ var ge = {
1937
1937
  strokeOpacity: !0,
1938
1938
  strokeWidth: !0
1939
1939
  }, _s = (e, t) => e + t.charAt(0).toUpperCase() + t.substring(1), ws = ["Webkit", "Ms", "Moz", "O"];
1940
- ge = Object.keys(ge).reduce((e, t) => (ws.forEach((n) => e[_s(n, t)] = e[t]), e), ge);
1941
- var As = /^(matrix|translate|scale|rotate|skew)/, Ps = /^(translate)/, Ss = /^(rotate|skew)/, it = (e, t) => c.num(e) && e !== 0 ? e + t : e, Ve = (e, t) => c.arr(e) ? e.every((n) => Ve(n, t)) : c.num(e) ? e === t : parseFloat(e) === t, Rs = class extends Ge {
1940
+ ve = Object.keys(ve).reduce((e, t) => (ws.forEach((n) => e[_s(n, t)] = e[t]), e), ve);
1941
+ var As = /^(matrix|translate|scale|rotate|skew)/, Ps = /^(translate)/, Ss = /^(rotate|skew)/, tt = (e, t) => c.num(e) && e !== 0 ? e + t : e, De = (e, t) => c.arr(e) ? e.every((n) => De(n, t)) : c.num(e) ? e === t : parseFloat(e) === t, Rs = class extends He {
1942
1942
  constructor({ x: e, y: t, z: n, ...i }) {
1943
1943
  const s = [], r = [];
1944
1944
  (e || t || n) && (s.push([e || 0, t || 0, n || 0]), r.push((a) => [
1945
- `translate3d(${a.map((o) => it(o, "px")).join(",")})`,
1945
+ `translate3d(${a.map((o) => tt(o, "px")).join(",")})`,
1946
1946
  // prettier-ignore
1947
- Ve(a, 0)
1947
+ De(a, 0)
1948
1948
  ])), B(i, (a, o) => {
1949
1949
  if (o === "transform")
1950
1950
  s.push([a || ""]), r.push((l) => [l, l === ""]);
1951
1951
  else if (As.test(o)) {
1952
1952
  if (delete i[o], c.und(a)) return;
1953
1953
  const l = Ps.test(o) ? "px" : Ss.test(o) ? "deg" : "";
1954
- s.push(U(a)), r.push(
1954
+ s.push(q(a)), r.push(
1955
1955
  o === "rotate3d" ? ([u, h, d, m]) => [
1956
- `rotate3d(${u},${h},${d},${it(m, l)})`,
1957
- Ve(m, 0)
1956
+ `rotate3d(${u},${h},${d},${tt(m, l)})`,
1957
+ De(m, 0)
1958
1958
  ] : (u) => [
1959
- `${o}(${u.map((h) => it(h, l)).join(",")})`,
1960
- Ve(u, o.startsWith("scale") ? 1 : 0)
1959
+ `${o}(${u.map((h) => tt(h, l)).join(",")})`,
1960
+ De(u, o.startsWith("scale") ? 1 : 0)
1961
1961
  ]
1962
1962
  );
1963
1963
  }
1964
1964
  }), s.length && (i.transform = new Is(s, r)), super(i);
1965
1965
  }
1966
- }, Is = class extends cn {
1966
+ }, Is = class extends on {
1967
1967
  constructor(e, t) {
1968
1968
  super(), this.inputs = e, this.transforms = t, this._value = null;
1969
1969
  }
@@ -1995,12 +1995,12 @@ var As = /^(matrix|translate|scale|rotate|skew)/, Ps = /^(translate)/, Ss = /^(r
1995
1995
  this.inputs,
1996
1996
  (t) => A(
1997
1997
  t,
1998
- (n) => j(n) && _e(n, this)
1998
+ (n) => j(n) && we(n, this)
1999
1999
  )
2000
2000
  );
2001
2001
  }
2002
2002
  eventObserved(e) {
2003
- e.type == "change" && (this._value = null), be(this, e);
2003
+ e.type == "change" && (this._value = null), _e(this, e);
2004
2004
  }
2005
2005
  }, xs = [
2006
2006
  "a",
@@ -2140,7 +2140,7 @@ var As = /^(matrix|translate|scale|rotate|skew)/, Ps = /^(translate)/, Ss = /^(r
2140
2140
  ];
2141
2141
  L.assign({
2142
2142
  batchedUpdates: ni,
2143
- createStringInterpolator: fn,
2143
+ createStringInterpolator: ln,
2144
2144
  colors: vi
2145
2145
  });
2146
2146
  var Cs = Hi(xs, {
@@ -2148,10 +2148,10 @@ var Cs = Hi(xs, {
2148
2148
  createAnimatedStyle: (e) => new Rs(e),
2149
2149
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2150
2150
  getComponentProps: ({ scrollTop: e, scrollLeft: t, ...n }) => n
2151
- }), Fs = Cs.animated;
2152
- const Os = "_content_f2h52_1", Ts = {
2153
- content: Os
2154
- }, ft = "ContextMenu.Content", ks = Xt((e, t) => {
2151
+ }), Ts = Cs.animated;
2152
+ const ks = "_content_f2h52_1", Os = {
2153
+ content: ks
2154
+ }, lt = "ContextMenu.Content", Fs = Kt((e, t) => {
2155
2155
  const {
2156
2156
  style: n,
2157
2157
  className: i,
@@ -2159,7 +2159,7 @@ const Os = "_content_f2h52_1", Ts = {
2159
2159
  alignOffset: r,
2160
2160
  arrowPadding: a = 5,
2161
2161
  collisionBoundary: o,
2162
- direction: l = k.DOWN_RIGHT,
2162
+ direction: l = F.DOWN_RIGHT,
2163
2163
  disableAutoPositioning: u = !1,
2164
2164
  disableRepositioning: h = !1,
2165
2165
  onMouseEnter: d,
@@ -2171,81 +2171,82 @@ const Os = "_content_f2h52_1", Ts = {
2171
2171
  onOpenAutoFocus: f,
2172
2172
  onFocusOutside: w,
2173
2173
  ...y
2174
- } = e, [P, S] = ee(null), E = () => !1, x = H(!1), q = () => x.current, F = (R) => {
2175
- x.current = R;
2176
- }, {
2177
- triggerRef: V,
2178
- contentRef: I,
2179
- isOpen: O,
2180
- isAnimatedOpen: T,
2181
- animationDuration: D,
2182
- mode: C,
2183
- isRootContentBlocked: Ce,
2184
- isChildOpen: Fe,
2185
- shouldCloseCurrentMenuOnSelect: He,
2186
- closeMenuImmediately: Y,
2187
- onContentEnter: We,
2188
- onContentLeave: Ke,
2189
- onChildOpen: Nn,
2190
- itemWithFocusedInput: Un,
2191
- setItemWithFocusedInput: qn,
2192
- shouldPreventFocusRestore: Ze,
2193
- setOnFocusOutside: J
2194
- } = ai(ft), { align: jn, offset: $n, isPositioned: xt } = Es({
2174
+ } = e, [P, S] = ee(null), E = () => !1, {
2175
+ triggerRef: x,
2176
+ contentRef: U,
2177
+ isOpen: C,
2178
+ isAnimatedOpen: V,
2179
+ skipAnimation: R,
2180
+ animationDuration: O,
2181
+ mode: T,
2182
+ isRootContentBlocked: D,
2183
+ isChildOpen: k,
2184
+ shouldCloseCurrentMenuOnSelect: Te,
2185
+ closeMenuImmediately: ke,
2186
+ onContentEnter: ue,
2187
+ onContentLeave: H,
2188
+ onChildOpen: Vn,
2189
+ itemWithFocusedInput: Dn,
2190
+ setItemWithFocusedInput: Nn,
2191
+ shouldPreventFocusRestore: We,
2192
+ setOnFocusOutside: J,
2193
+ isChildAiming: Un,
2194
+ onChildAiming: qn
2195
+ } = ai(lt), { align: jn, offset: $n, isPositioned: Rt } = Es({
2195
2196
  direction: l,
2196
2197
  alignOffset: r,
2197
2198
  disableAutoPositioning: u,
2198
- triggerRef: V,
2199
- contentRef: I,
2199
+ triggerRef: x,
2200
+ contentRef: U,
2200
2201
  collisionBoundary: o,
2201
2202
  children: s,
2202
2203
  disableRepositioning: h
2203
- }), { navigationContentRef: zn } = oi(ft);
2204
- Re(() => {
2204
+ }), { navigationContentRef: zn } = oi(lt);
2205
+ Ie(() => {
2205
2206
  if (w)
2206
2207
  return J == null || J(w), () => {
2207
2208
  J == null || J(void 0);
2208
2209
  };
2209
2210
  }, [w, J]);
2210
2211
  const Mn = ps({
2211
- opacity: xt && (C === ue.CLICK || T) ? 1 : 0,
2212
- config: C === ue.CLICK ? { duration: 0 } : { duration: D, easing: un.easeInOutCubic }
2213
- }), Ln = (R) => {
2214
- We == null || We(R), d == null || d(R);
2215
- }, Qn = (R) => {
2216
- Ke == null || Ke(R), m == null || m(R);
2217
- }, Bn = (R) => {
2218
- R.preventDefault();
2219
- }, Gn = (R) => {
2220
- Fe && R.preventDefault(), g == null || g(R);
2221
- }, Hn = (R) => {
2222
- Fe ? R.preventDefault() : O && Y(), v == null || v(R);
2223
- }, Wn = (R) => {
2224
- var Ct;
2225
- C === ue.HOVER && (R.preventDefault(), R.key === si.ESCAPE && ((Ct = V.current) == null || Ct.focus())), p == null || p(R);
2226
- }, Kn = (R) => {
2227
- (C === ue.HOVER || Ze != null && Ze()) && R.preventDefault(), b == null || b(R);
2228
- }, Zn = (R) => {
2229
- C === ue.HOVER && R.preventDefault(), f == null || f(R);
2212
+ opacity: Rt && (T === ce.CLICK || V) ? 1 : 0,
2213
+ config: T === ce.CLICK || R ? { duration: 0 } : { duration: O, easing: an.easeInOutCubic }
2214
+ }), Ln = (I) => {
2215
+ ue == null || ue(I), d == null || d(I);
2216
+ }, Qn = (I) => {
2217
+ H == null || H(I), m == null || m(I);
2218
+ }, Bn = (I) => {
2219
+ I.preventDefault();
2220
+ }, Gn = (I) => {
2221
+ k && I.preventDefault(), g == null || g(I);
2222
+ }, Hn = (I) => {
2223
+ k ? I.preventDefault() : C && ke(), v == null || v(I);
2224
+ }, Wn = (I) => {
2225
+ var It;
2226
+ T === ce.HOVER && (I.preventDefault(), I.key === si.ESCAPE && ((It = x.current) == null || It.focus())), p == null || p(I);
2227
+ }, Kn = (I) => {
2228
+ (T === ce.HOVER || We != null && We()) && I.preventDefault(), b == null || b(I);
2229
+ }, Zn = (I) => {
2230
+ T === ce.HOVER && I.preventDefault(), f == null || f(I);
2230
2231
  };
2231
- return /* @__PURE__ */ Xe(
2232
+ return /* @__PURE__ */ Ke(
2232
2233
  ri,
2233
2234
  {
2234
2235
  activeItemId: P,
2235
2236
  setActiveItemId: S,
2236
- onChildOpen: Nn,
2237
- shouldCloseCurrentMenuOnSelect: He,
2238
- closeMenuImmediately: Y,
2237
+ onChildOpen: Vn,
2238
+ shouldCloseCurrentMenuOnSelect: Te,
2239
+ closeMenuImmediately: ke,
2239
2240
  shouldCloseRootMenuOnSelect: !1,
2240
- isAnimatedOpen: T,
2241
- itemWithFocusedInput: Un,
2242
- setItemWithFocusedInput: qn,
2241
+ isAnimatedOpen: V,
2242
+ itemWithFocusedInput: Dn,
2243
+ setItemWithFocusedInput: Nn,
2243
2244
  isAiming: E,
2244
- isChildAiming: q,
2245
- onChildAiming: F,
2245
+ isChildAiming: Un,
2246
+ onChildAiming: qn,
2246
2247
  level: 1,
2247
- children: O && /* @__PURE__ */ Xe(
2248
- Fs.div,
2248
+ children: C && /* @__PURE__ */ Ke(
2249
+ Ts.div,
2249
2250
  {
2250
2251
  style: {
2251
2252
  zIndex: Number.MAX_SAFE_INTEGER - 10,
@@ -2255,11 +2256,11 @@ const Os = "_content_f2h52_1", Ts = {
2255
2256
  children: /* @__PURE__ */ Jn(
2256
2257
  ei,
2257
2258
  {
2258
- ref: ii(I, zn, t),
2259
- className: ti(Ts.content, i),
2259
+ ref: ii(U, zn, t),
2260
+ className: ti(Os.content, i),
2260
2261
  style: {
2261
2262
  ...n || {},
2262
- pointerEvents: u || xt ? "auto" : "none"
2263
+ pointerEvents: u || Rt ? "auto" : "none"
2263
2264
  },
2264
2265
  collisionBoundary: o,
2265
2266
  side: ui[l],
@@ -2278,7 +2279,7 @@ const Os = "_content_f2h52_1", Ts = {
2278
2279
  ...y,
2279
2280
  children: [
2280
2281
  s,
2281
- Ce && /* @__PURE__ */ Xe(ci, {})
2282
+ D && /* @__PURE__ */ Ke(ci, {})
2282
2283
  ]
2283
2284
  }
2284
2285
  )
@@ -2287,7 +2288,7 @@ const Os = "_content_f2h52_1", Ts = {
2287
2288
  }
2288
2289
  );
2289
2290
  });
2290
- ks.displayName = ft;
2291
+ Fs.displayName = lt;
2291
2292
  const Es = (e) => {
2292
2293
  const {
2293
2294
  direction: t,
@@ -2300,59 +2301,61 @@ const Es = (e) => {
2300
2301
  children: l,
2301
2302
  isSubContent: u
2302
2303
  } = e, [h, d] = ee(
2303
- t === k.UP_RIGHT || t === k.DOWN_RIGHT || t === k.RIGHT_DOWN || t === k.LEFT_DOWN || !t ? "start" : "end"
2304
- ), [m, p] = ee(n), [v, g] = ee(!1), [b, f] = ee(!1), [w, y] = ee(!1), P = H(!1);
2305
- return ke(() => {
2304
+ t === F.UP_RIGHT || t === F.DOWN_RIGHT || t === F.RIGHT_DOWN || t === F.LEFT_DOWN || !t ? "start" : "end"
2305
+ ), [m, p] = ee(n), [v, g] = ee(!1), [b, f] = ee(!1), [w, y] = ee(!1), P = X(!1);
2306
+ return Ee(() => {
2306
2307
  if (u || i || !(s != null && s.current) || !t) {
2307
2308
  g(!0);
2308
2309
  return;
2309
2310
  }
2310
2311
  let S = null, E = !0;
2311
- const x = a instanceof Element && a || document.documentElement, q = () => {
2312
+ const x = a instanceof Element && a || document.documentElement, U = () => {
2312
2313
  if (!E)
2313
2314
  return;
2314
- const F = s.current, V = r.current;
2315
- if (!F || !V)
2315
+ const C = s.current, V = r.current;
2316
+ if (!C || !V)
2316
2317
  return;
2317
- const I = F.getBoundingClientRect(), O = V.getBoundingClientRect();
2318
+ const R = C.getBoundingClientRect(), O = V.getBoundingClientRect();
2318
2319
  if (O.width <= 0)
2319
2320
  return;
2320
2321
  const T = x.getBoundingClientRect(), D = {
2321
- right: T.right - I.right >= O.width,
2322
- left: I.left - T.left >= O.width,
2323
- bottom: T.bottom - I.bottom >= O.height,
2324
- top: I.top - T.top >= O.height
2322
+ right: T.right - R.right >= O.width,
2323
+ left: R.left - T.left >= O.width,
2324
+ bottom: T.bottom - R.bottom >= O.height,
2325
+ top: R.top - T.top >= O.height
2325
2326
  };
2326
- let C = "start";
2327
+ let k = "start";
2327
2328
  switch (t) {
2328
- case k.UP_RIGHT:
2329
- case k.DOWN_RIGHT: {
2330
- D.right ? C = "start" : D.left ? C = "end" : C = "start";
2329
+ case F.UP_RIGHT:
2330
+ case F.DOWN_RIGHT: {
2331
+ D.right ? k = "start" : D.left ? k = "end" : k = "start";
2331
2332
  break;
2332
2333
  }
2333
- case k.UP_LEFT:
2334
- case k.DOWN_LEFT: {
2335
- D.left ? C = "end" : D.right ? C = "start" : C = "end";
2334
+ case F.UP_LEFT:
2335
+ case F.DOWN_LEFT: {
2336
+ D.left ? k = "end" : D.right ? k = "start" : k = "end";
2336
2337
  break;
2337
2338
  }
2338
- case k.RIGHT_DOWN:
2339
- case k.LEFT_DOWN: {
2340
- D.bottom ? C = "start" : D.top ? C = "end" : C = "start";
2339
+ case F.RIGHT_DOWN:
2340
+ case F.LEFT_DOWN: {
2341
+ D.bottom ? k = "start" : D.top ? k = "end" : k = "start";
2341
2342
  break;
2342
2343
  }
2343
- case k.RIGHT_UP:
2344
- case k.LEFT_UP: {
2345
- D.top ? C = "end" : D.bottom ? C = "start" : C = "end";
2344
+ case F.RIGHT_UP:
2345
+ case F.LEFT_UP: {
2346
+ D.top ? k = "end" : D.bottom ? k = "start" : k = "end";
2346
2347
  break;
2347
2348
  }
2348
2349
  }
2349
- d(C), g(!0), P.current = !0;
2350
+ d(k), g(!0), P.current = !0;
2350
2351
  };
2351
2352
  if (o && P.current) {
2352
2353
  g(!0);
2353
2354
  return;
2354
2355
  }
2355
- return requestAnimationFrame(q), !o && r.current && typeof ResizeObserver < "u" && (S = new ResizeObserver(q), S.observe(r.current)), () => {
2356
+ return setTimeout(() => {
2357
+ U();
2358
+ }, 0), !o && r.current && typeof ResizeObserver < "u" && (S = new ResizeObserver(U), S.observe(r.current)), () => {
2356
2359
  E = !1, S == null || S.disconnect();
2357
2360
  };
2358
2361
  }, [
@@ -2362,41 +2365,43 @@ const Es = (e) => {
2362
2365
  s,
2363
2366
  r,
2364
2367
  a
2365
- ]), ke(() => {
2368
+ ]), Ee(() => {
2366
2369
  if (o && P.current) {
2367
2370
  f(!0);
2368
2371
  return;
2369
2372
  }
2370
2373
  const S = r == null ? void 0 : r.current, E = s == null ? void 0 : s.current;
2371
2374
  if (!S || !E || i || [
2372
- k.DOWN_LEFT,
2373
- k.DOWN_RIGHT,
2374
- k.UP_LEFT,
2375
- k.UP_RIGHT
2375
+ F.DOWN_LEFT,
2376
+ F.DOWN_RIGHT,
2377
+ F.UP_LEFT,
2378
+ F.UP_RIGHT
2376
2379
  ].includes(t)) {
2377
2380
  f(!0);
2378
2381
  return;
2379
2382
  }
2380
2383
  const x = Array.from(S.querySelectorAll("[data-item]")).filter(
2381
- (I) => !I.hasAttribute("data-non-selectable")
2384
+ (R) => !R.hasAttribute("data-non-selectable")
2382
2385
  );
2383
2386
  if (x.length === 0)
2384
2387
  return;
2385
- const q = h === "start" ? x[0] : x[x.length - 1], F = () => {
2386
- const I = E.getBoundingClientRect(), O = S.getBoundingClientRect(), T = q.getBoundingClientRect(), D = (Y) => !Y.width || !Y.height || !isFinite(Y.top) || !isFinite(Y.left);
2387
- if ([I, O, T].some(D)) {
2388
- requestAnimationFrame(F);
2388
+ const U = h === "start" ? x[0] : x[x.length - 1], C = () => {
2389
+ const R = E.getBoundingClientRect(), O = S.getBoundingClientRect(), T = U.getBoundingClientRect(), D = (H) => !H.width || !H.height || !isFinite(H.top) || !isFinite(H.left);
2390
+ if ([R, O, T].some(D)) {
2391
+ requestAnimationFrame(C);
2389
2392
  return;
2390
2393
  }
2391
- const C = I.height / 2, Ce = T.height / 2, Fe = T.top - O.top, He = T.bottom - O.bottom;
2392
- p(h === "start" ? n + C - Fe - Ce : n + C + He - Ce), P.current = !0, f(!0);
2394
+ const k = R.height / 2, Te = T.height / 2, ke = T.top - O.top, ue = T.bottom - O.bottom;
2395
+ p(h === "start" ? n + k - ke - Te : n + k + ue - Te), P.current = !0, f(!0);
2393
2396
  };
2394
- if (requestAnimationFrame(F), o)
2397
+ if (setTimeout(() => {
2398
+ C();
2399
+ }, 0), o)
2395
2400
  return;
2396
2401
  const V = new ResizeObserver(() => {
2397
- F();
2402
+ C();
2398
2403
  });
2399
- return V.observe(q), V.observe(E), () => V.disconnect();
2404
+ return V.observe(U), V.observe(E), () => V.disconnect();
2400
2405
  }, [
2401
2406
  l,
2402
2407
  t,
@@ -2406,14 +2411,14 @@ const Es = (e) => {
2406
2411
  s,
2407
2412
  n,
2408
2413
  i
2409
- ]), ke(() => {
2414
+ ]), Ee(() => {
2410
2415
  v && b && y(!0);
2411
2416
  }, [v, b]), { align: h, offset: m, isPositioned: w };
2412
2417
  };
2413
2418
  export {
2414
- ks as C,
2419
+ Fs as C,
2415
2420
  ps as a,
2416
- Fs as b,
2417
- un as e,
2421
+ Ts as b,
2422
+ an as e,
2418
2423
  Es as u
2419
2424
  };