@telegraph/combobox 0.1.26 → 0.1.27

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,29 +1,29 @@
1
- import { jsx as T, jsxs as G, Fragment as Ze } from "react/jsx-runtime";
2
- import { DismissableLayer as rr } from "@radix-ui/react-dismissable-layer";
3
- import * as ir from "@radix-ui/react-portal";
4
- import { useControllableState as or } from "@radix-ui/react-use-controllable-state";
1
+ import { jsx as T, jsxs as U, Fragment as tt } from "react/jsx-runtime";
2
+ import { DismissableLayer as ir } from "@radix-ui/react-dismissable-layer";
3
+ import * as or from "@radix-ui/react-portal";
4
+ import { useControllableState as en } from "@radix-ui/react-use-controllable-state";
5
5
  import * as ar from "@radix-ui/react-visually-hidden";
6
6
  import { Button as le } from "@telegraph/button";
7
- import { useComposedRefs as Rn } from "@telegraph/compose-refs";
8
- import { Icon as Dn } from "@telegraph/icon";
7
+ import { useComposedRefs as St } from "@telegraph/compose-refs";
8
+ import { Icon as In } from "@telegraph/icon";
9
9
  import { Input as cr } from "@telegraph/input";
10
- import { Stack as ae, Box as On } from "@telegraph/layout";
11
- import { Menu as Ne } from "@telegraph/menu";
12
- import { Text as Tt } from "@telegraph/typography";
13
- import { X as wt, ChevronsUpDown as lr, Plus as ur, Search as In } from "lucide-react";
14
- import b, { createContext as ue, useRef as ve, useLayoutEffect as fr, useEffect as xt, useState as dr, useContext as L, useMemo as Ke, Fragment as En, createElement as hr, useCallback as pr, useInsertionEffect as mr, forwardRef as gr } from "react";
10
+ import { Stack as ae, Box as En } from "@telegraph/layout";
11
+ import { Menu as $e } from "@telegraph/menu";
12
+ import { Text as Vt } from "@telegraph/typography";
13
+ import { X as Ct, ChevronsUpDown as lr, Plus as ur, Search as kn } from "lucide-react";
14
+ import y, { createContext as ue, useRef as ve, useLayoutEffect as fr, useEffect as At, useState as dr, useContext as L, useMemo as je, Fragment as Bn, createElement as hr, useCallback as pr, useInsertionEffect as mr, forwardRef as gr } from "react";
15
15
  import { RefToTgphRef as yr } from "@telegraph/helpers";
16
- import { Tag as St } from "@telegraph/tag";
16
+ import { Tag as Mt } from "@telegraph/tag";
17
17
  import { Tooltip as br } from "@telegraph/tooltip";
18
- import { TooltipIfTruncated as kn } from "@telegraph/truncate";
18
+ import { TooltipIfTruncated as Ln } from "@telegraph/truncate";
19
19
  const vr = {
20
20
  0: "5",
21
21
  1: "6",
22
22
  2: "8",
23
23
  3: "10"
24
- }, $ = (e) => Array.isArray(e), Z = (e) => typeof e == "object" && !Array.isArray(e) || typeof e == "string" || !e, Tr = (e) => {
25
- const t = (r, i = []) => (b.Children.toArray(r).forEach((a) => {
26
- if (b.isValidElement(a)) {
24
+ }, K = (e) => Array.isArray(e), z = (e) => typeof e == "object" && !Array.isArray(e) || typeof e == "string" || !e, Tr = (e) => {
25
+ const t = (r, i = []) => (y.Children.toArray(r).forEach((a) => {
26
+ if (y.isValidElement(a)) {
27
27
  const c = a.props;
28
28
  c.value ? i.push(a) : c.children && t(
29
29
  c.children,
@@ -39,13 +39,13 @@ const vr = {
39
39
  label: ((o = i.props) == null ? void 0 : o.label) || i.props.children || i.props.value
40
40
  };
41
41
  });
42
- }, H = (e, t) => {
42
+ }, $ = (e, t) => {
43
43
  if (e)
44
44
  return t === !0 ? e == null ? void 0 : e.value : e;
45
- }, Je = (e, t, n) => {
45
+ }, nt = (e, t, n) => {
46
46
  if (!e || !t || t.length === 0) return;
47
47
  const s = t.find(
48
- (r) => r.value === H(e, n)
48
+ (r) => r.value === $(e, n)
49
49
  );
50
50
  if (s)
51
51
  return s;
@@ -54,17 +54,17 @@ const vr = {
54
54
  value: t,
55
55
  searchQuery: n
56
56
  }) => {
57
- const s = Bn(e);
57
+ const s = Nn(e);
58
58
  return (t == null ? void 0 : t.toLowerCase().includes(n.toLowerCase())) || s.some(
59
59
  (r) => r.toLowerCase().includes(n.toLowerCase())
60
60
  );
61
- }, Bn = (e) => {
62
- const t = b.Children.toArray(e), n = [];
61
+ }, Nn = (e) => {
62
+ const t = y.Children.toArray(e), n = [];
63
63
  return t.forEach((s) => {
64
- if (typeof s == "string" && n.push(s), b.isValidElement(s)) {
64
+ if (typeof s == "string" && n.push(s), y.isValidElement(s)) {
65
65
  const r = s.props;
66
66
  r.children && n.push(
67
- ...Bn(r.children)
67
+ ...Nn(r.children)
68
68
  );
69
69
  }
70
70
  }), n;
@@ -73,7 +73,7 @@ function Sr(e) {
73
73
  const t = ve(null);
74
74
  return t.current === null && (t.current = e()), t.current;
75
75
  }
76
- const Vt = typeof window < "u", Vr = Vt ? fr : xt, Ln = /* @__PURE__ */ ue(null);
76
+ const Pt = typeof window < "u", Vr = Pt ? fr : At, Kn = /* @__PURE__ */ ue(null);
77
77
  function Cr(e, t) {
78
78
  e.indexOf(t) === -1 && e.push(t);
79
79
  }
@@ -81,34 +81,34 @@ function Ar(e, t) {
81
81
  const n = e.indexOf(t);
82
82
  n > -1 && e.splice(n, 1);
83
83
  }
84
- const J = (e, t, n) => n > t ? t : n < e ? e : n;
85
- function et(e, t) {
84
+ const ee = (e, t, n) => n > t ? t : n < e ? e : n;
85
+ function st(e, t) {
86
86
  return t ? `${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}` : e;
87
87
  }
88
88
  let Ce = () => {
89
- }, ee = () => {
89
+ }, te = () => {
90
90
  };
91
91
  process.env.NODE_ENV !== "production" && (Ce = (e, t, n) => {
92
- !e && typeof console < "u" && console.warn(et(t, n));
93
- }, ee = (e, t, n) => {
92
+ !e && typeof console < "u" && console.warn(st(t, n));
93
+ }, te = (e, t, n) => {
94
94
  if (!e)
95
- throw new Error(et(t, n));
95
+ throw new Error(st(t, n));
96
96
  });
97
- const W = {}, Nn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
97
+ const _ = {}, $n = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
98
98
  function Mr(e) {
99
99
  return typeof e == "object" && e !== null;
100
100
  }
101
- const Kn = (e) => /^0[^.\s]+$/u.test(e);
101
+ const jn = (e) => /^0[^.\s]+$/u.test(e);
102
102
  // @__NO_SIDE_EFFECTS__
103
- function Ct(e) {
103
+ function Rt(e) {
104
104
  let t;
105
105
  return () => (t === void 0 && (t = e()), t);
106
106
  }
107
- const fe = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Pr = (e, t) => (n) => t(e(n)), $e = (...e) => e.reduce(Pr), $n = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
107
+ const fe = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Pr = (e, t) => (n) => t(e(n)), We = (...e) => e.reduce(Pr), Wn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
108
108
  const s = t - e;
109
109
  return s === 0 ? 1 : (n - e) / s;
110
110
  };
111
- class jn {
111
+ class _n {
112
112
  constructor() {
113
113
  this.subscriptions = [];
114
114
  }
@@ -133,49 +133,49 @@ class jn {
133
133
  this.subscriptions.length = 0;
134
134
  }
135
135
  }
136
- const K = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, j = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
137
- function Wn(e, t) {
136
+ const j = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, W = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
137
+ function Hn(e, t) {
138
138
  return t ? e * (1e3 / t) : 0;
139
139
  }
140
- const Zt = /* @__PURE__ */ new Set();
141
- function _n(e, t, n) {
142
- e || Zt.has(t) || (console.warn(et(t, n)), Zt.add(t));
140
+ const tn = /* @__PURE__ */ new Set();
141
+ function Gn(e, t, n) {
142
+ e || tn.has(t) || (console.warn(st(t, n)), tn.add(t));
143
143
  }
144
- const Hn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Fr = 1e-7, Rr = 12;
144
+ const Un = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Rr = 1e-7, Fr = 12;
145
145
  function Dr(e, t, n, s, r) {
146
146
  let i, o, a = 0;
147
147
  do
148
- o = t + (n - t) / 2, i = Hn(o, s, r) - e, i > 0 ? n = o : t = o;
149
- while (Math.abs(i) > Fr && ++a < Rr);
148
+ o = t + (n - t) / 2, i = Un(o, s, r) - e, i > 0 ? n = o : t = o;
149
+ while (Math.abs(i) > Rr && ++a < Fr);
150
150
  return o;
151
151
  }
152
152
  function Ae(e, t, n, s) {
153
153
  if (e === t && n === s)
154
154
  return fe;
155
155
  const r = (i) => Dr(i, 0, 1, e, n);
156
- return (i) => i === 0 || i === 1 ? i : Hn(r(i), t, s);
156
+ return (i) => i === 0 || i === 1 ? i : Un(r(i), t, s);
157
157
  }
158
- const Gn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Un = (e) => (t) => 1 - e(1 - t), zn = /* @__PURE__ */ Ae(0.33, 1.53, 0.69, 0.99), At = /* @__PURE__ */ Un(zn), Yn = /* @__PURE__ */ Gn(At), Xn = (e) => (e *= 2) < 1 ? 0.5 * At(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Mt = (e) => 1 - Math.sin(Math.acos(e)), Or = Un(Mt), qn = Gn(Mt), Ir = /* @__PURE__ */ Ae(0.42, 0, 1, 1), Er = /* @__PURE__ */ Ae(0, 0, 0.58, 1), Qn = /* @__PURE__ */ Ae(0.42, 0, 0.58, 1), kr = (e) => Array.isArray(e) && typeof e[0] != "number", Zn = (e) => Array.isArray(e) && typeof e[0] == "number", Jt = {
158
+ const zn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Yn = (e) => (t) => 1 - e(1 - t), Xn = /* @__PURE__ */ Ae(0.33, 1.53, 0.69, 0.99), Ft = /* @__PURE__ */ Yn(Xn), qn = /* @__PURE__ */ zn(Ft), Qn = (e) => (e *= 2) < 1 ? 0.5 * Ft(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Dt = (e) => 1 - Math.sin(Math.acos(e)), Or = Yn(Dt), Zn = zn(Dt), Ir = /* @__PURE__ */ Ae(0.42, 0, 1, 1), Er = /* @__PURE__ */ Ae(0, 0, 0.58, 1), Jn = /* @__PURE__ */ Ae(0.42, 0, 0.58, 1), kr = (e) => Array.isArray(e) && typeof e[0] != "number", es = (e) => Array.isArray(e) && typeof e[0] == "number", nn = {
159
159
  linear: fe,
160
160
  easeIn: Ir,
161
- easeInOut: Qn,
161
+ easeInOut: Jn,
162
162
  easeOut: Er,
163
- circIn: Mt,
164
- circInOut: qn,
163
+ circIn: Dt,
164
+ circInOut: Zn,
165
165
  circOut: Or,
166
- backIn: At,
167
- backInOut: Yn,
168
- backOut: zn,
169
- anticipate: Xn
170
- }, Br = (e) => typeof e == "string", en = (e) => {
171
- if (Zn(e)) {
172
- ee(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
166
+ backIn: Ft,
167
+ backInOut: qn,
168
+ backOut: Xn,
169
+ anticipate: Qn
170
+ }, Br = (e) => typeof e == "string", sn = (e) => {
171
+ if (es(e)) {
172
+ te(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
173
173
  const [t, n, s, r] = e;
174
174
  return Ae(t, n, s, r);
175
175
  } else if (Br(e))
176
- return ee(Jt[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), Jt[e];
176
+ return te(nn[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), nn[e];
177
177
  return e;
178
- }, Pe = [
178
+ }, Fe = [
179
179
  "setup",
180
180
  // Compute
181
181
  "read",
@@ -232,67 +232,67 @@ function Lr(e, t) {
232
232
  return u;
233
233
  }
234
234
  const Nr = 40;
235
- function Jn(e, t) {
235
+ function ts(e, t) {
236
236
  let n = !1, s = !0;
237
237
  const r = {
238
238
  delta: 0,
239
239
  timestamp: 0,
240
240
  isProcessing: !1
241
- }, i = () => n = !0, o = Pe.reduce((v, A) => (v[A] = Lr(i), v), {}), { setup: a, read: c, resolveKeyframes: u, preUpdate: l, update: d, preRender: f, render: h, postRender: m } = o, g = () => {
242
- const v = W.useManualTiming ? r.timestamp : performance.now();
243
- n = !1, W.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(v - r.timestamp, Nr), 1)), r.timestamp = v, r.isProcessing = !0, a.process(r), c.process(r), u.process(r), l.process(r), d.process(r), f.process(r), h.process(r), m.process(r), r.isProcessing = !1, n && t && (s = !1, e(g));
244
- }, y = () => {
241
+ }, i = () => n = !0, o = Fe.reduce((v, C) => (v[C] = Lr(i), v), {}), { setup: a, read: c, resolveKeyframes: u, preUpdate: l, update: d, preRender: f, render: h, postRender: m } = o, g = () => {
242
+ const v = _.useManualTiming ? r.timestamp : performance.now();
243
+ n = !1, _.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(v - r.timestamp, Nr), 1)), r.timestamp = v, r.isProcessing = !0, a.process(r), c.process(r), u.process(r), l.process(r), d.process(r), f.process(r), h.process(r), m.process(r), r.isProcessing = !1, n && t && (s = !1, e(g));
244
+ }, b = () => {
245
245
  n = !0, s = !0, r.isProcessing || e(g);
246
246
  };
247
- return { schedule: Pe.reduce((v, A) => {
248
- const S = o[A];
249
- return v[A] = (C, M = !1, V = !1) => (n || y(), S.schedule(C, M, V)), v;
247
+ return { schedule: Fe.reduce((v, C) => {
248
+ const S = o[C];
249
+ return v[C] = (A, P = !1, V = !1) => (n || b(), S.schedule(A, P, V)), v;
250
250
  }, {}), cancel: (v) => {
251
- for (let A = 0; A < Pe.length; A++)
252
- o[Pe[A]].cancel(v);
251
+ for (let C = 0; C < Fe.length; C++)
252
+ o[Fe[C]].cancel(v);
253
253
  }, state: r, steps: o };
254
254
  }
255
- const { schedule: N, cancel: tt, state: Oe } = /* @__PURE__ */ Jn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : fe, !0);
256
- let Re;
255
+ const { schedule: N, cancel: rt, state: Ee } = /* @__PURE__ */ ts(typeof requestAnimationFrame < "u" ? requestAnimationFrame : fe, !0);
256
+ let Oe;
257
257
  function Kr() {
258
- Re = void 0;
258
+ Oe = void 0;
259
259
  }
260
260
  const B = {
261
- now: () => (Re === void 0 && B.set(Oe.isProcessing || W.useManualTiming ? Oe.timestamp : performance.now()), Re),
261
+ now: () => (Oe === void 0 && B.set(Ee.isProcessing || _.useManualTiming ? Ee.timestamp : performance.now()), Oe),
262
262
  set: (e) => {
263
- Re = e, queueMicrotask(Kr);
263
+ Oe = e, queueMicrotask(Kr);
264
264
  }
265
- }, es = (e) => (t) => typeof t == "string" && t.startsWith(e), ts = /* @__PURE__ */ es("--"), $r = /* @__PURE__ */ es("var(--"), Pt = (e) => $r(e) ? jr.test(e.split("/*")[0].trim()) : !1, jr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, de = {
265
+ }, ns = (e) => (t) => typeof t == "string" && t.startsWith(e), ss = /* @__PURE__ */ ns("--"), $r = /* @__PURE__ */ ns("var(--"), Ot = (e) => $r(e) ? jr.test(e.split("/*")[0].trim()) : !1, jr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, de = {
266
266
  test: (e) => typeof e == "number",
267
267
  parse: parseFloat,
268
268
  transform: (e) => e
269
269
  }, xe = {
270
270
  ...de,
271
- transform: (e) => J(0, 1, e)
272
- }, Fe = {
271
+ transform: (e) => ee(0, 1, e)
272
+ }, De = {
273
273
  ...de,
274
274
  default: 1
275
- }, Te = (e) => Math.round(e * 1e5) / 1e5, Ft = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
275
+ }, Te = (e) => Math.round(e * 1e5) / 1e5, It = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
276
276
  function Wr(e) {
277
277
  return e == null;
278
278
  }
279
- const _r = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Rt = (e, t) => (n) => !!(typeof n == "string" && _r.test(n) && n.startsWith(e) || t && !Wr(n) && Object.prototype.hasOwnProperty.call(n, t)), ns = (e, t, n) => (s) => {
279
+ const _r = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Et = (e, t) => (n) => !!(typeof n == "string" && _r.test(n) && n.startsWith(e) || t && !Wr(n) && Object.prototype.hasOwnProperty.call(n, t)), rs = (e, t, n) => (s) => {
280
280
  if (typeof s != "string")
281
281
  return s;
282
- const [r, i, o, a] = s.match(Ft);
282
+ const [r, i, o, a] = s.match(It);
283
283
  return {
284
284
  [e]: parseFloat(r),
285
285
  [t]: parseFloat(i),
286
286
  [n]: parseFloat(o),
287
287
  alpha: a !== void 0 ? parseFloat(a) : 1
288
288
  };
289
- }, Hr = (e) => J(0, 255, e), Ge = {
289
+ }, Hr = (e) => ee(0, 255, e), Ye = {
290
290
  ...de,
291
291
  transform: (e) => Math.round(Hr(e))
292
- }, Y = {
293
- test: /* @__PURE__ */ Rt("rgb", "red"),
294
- parse: /* @__PURE__ */ ns("red", "green", "blue"),
295
- transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ge.transform(e) + ", " + Ge.transform(t) + ", " + Ge.transform(n) + ", " + Te(xe.transform(s)) + ")"
292
+ }, q = {
293
+ test: /* @__PURE__ */ Et("rgb", "red"),
294
+ parse: /* @__PURE__ */ rs("red", "green", "blue"),
295
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ye.transform(e) + ", " + Ye.transform(t) + ", " + Ye.transform(n) + ", " + Te(xe.transform(s)) + ")"
296
296
  };
297
297
  function Gr(e) {
298
298
  let t = "", n = "", s = "", r = "";
@@ -303,36 +303,36 @@ function Gr(e) {
303
303
  alpha: r ? parseInt(r, 16) / 255 : 1
304
304
  };
305
305
  }
306
- const nt = {
307
- test: /* @__PURE__ */ Rt("#"),
306
+ const it = {
307
+ test: /* @__PURE__ */ Et("#"),
308
308
  parse: Gr,
309
- transform: Y.transform
309
+ transform: q.transform
310
310
  }, Me = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
311
311
  test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
312
312
  parse: parseFloat,
313
313
  transform: (t) => `${t}${e}`
314
- }), _ = /* @__PURE__ */ Me("deg"), ie = /* @__PURE__ */ Me("%"), w = /* @__PURE__ */ Me("px"), Ur = /* @__PURE__ */ Me("vh"), zr = /* @__PURE__ */ Me("vw"), tn = {
314
+ }), G = /* @__PURE__ */ Me("deg"), ie = /* @__PURE__ */ Me("%"), w = /* @__PURE__ */ Me("px"), Ur = /* @__PURE__ */ Me("vh"), zr = /* @__PURE__ */ Me("vw"), rn = {
315
315
  ...ie,
316
316
  parse: (e) => ie.parse(e) / 100,
317
317
  transform: (e) => ie.transform(e * 100)
318
318
  }, se = {
319
- test: /* @__PURE__ */ Rt("hsl", "hue"),
320
- parse: /* @__PURE__ */ ns("hue", "saturation", "lightness"),
319
+ test: /* @__PURE__ */ Et("hsl", "hue"),
320
+ parse: /* @__PURE__ */ rs("hue", "saturation", "lightness"),
321
321
  transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ie.transform(Te(t)) + ", " + ie.transform(Te(n)) + ", " + Te(xe.transform(s)) + ")"
322
- }, F = {
323
- test: (e) => Y.test(e) || nt.test(e) || se.test(e),
324
- parse: (e) => Y.test(e) ? Y.parse(e) : se.test(e) ? se.parse(e) : nt.parse(e),
325
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Y.transform(e) : se.transform(e),
322
+ }, R = {
323
+ test: (e) => q.test(e) || it.test(e) || se.test(e),
324
+ parse: (e) => q.test(e) ? q.parse(e) : se.test(e) ? se.parse(e) : it.parse(e),
325
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? q.transform(e) : se.transform(e),
326
326
  getAnimatableNone: (e) => {
327
- const t = F.parse(e);
328
- return t.alpha = 0, F.transform(t);
327
+ const t = R.parse(e);
328
+ return t.alpha = 0, R.transform(t);
329
329
  }
330
330
  }, Yr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
331
331
  function Xr(e) {
332
332
  var t, n;
333
- return isNaN(e) && typeof e == "string" && (((t = e.match(Ft)) == null ? void 0 : t.length) || 0) + (((n = e.match(Yr)) == null ? void 0 : n.length) || 0) > 0;
333
+ return isNaN(e) && typeof e == "string" && (((t = e.match(It)) == null ? void 0 : t.length) || 0) + (((n = e.match(Yr)) == null ? void 0 : n.length) || 0) > 0;
334
334
  }
335
- const ss = "number", rs = "color", qr = "var", Qr = "var(", nn = "${}", Zr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
335
+ const is = "number", os = "color", qr = "var", Qr = "var(", on = "${}", Zr = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
336
336
  function Se(e) {
337
337
  const t = e.toString(), n = [], s = {
338
338
  color: [],
@@ -340,36 +340,36 @@ function Se(e) {
340
340
  var: []
341
341
  }, r = [];
342
342
  let i = 0;
343
- const a = t.replace(Zr, (c) => (F.test(c) ? (s.color.push(i), r.push(rs), n.push(F.parse(c))) : c.startsWith(Qr) ? (s.var.push(i), r.push(qr), n.push(c)) : (s.number.push(i), r.push(ss), n.push(parseFloat(c))), ++i, nn)).split(nn);
343
+ const a = t.replace(Zr, (c) => (R.test(c) ? (s.color.push(i), r.push(os), n.push(R.parse(c))) : c.startsWith(Qr) ? (s.var.push(i), r.push(qr), n.push(c)) : (s.number.push(i), r.push(is), n.push(parseFloat(c))), ++i, on)).split(on);
344
344
  return { values: n, split: a, indexes: s, types: r };
345
345
  }
346
- function is(e) {
346
+ function as(e) {
347
347
  return Se(e).values;
348
348
  }
349
- function os(e) {
349
+ function cs(e) {
350
350
  const { split: t, types: n } = Se(e), s = t.length;
351
351
  return (r) => {
352
352
  let i = "";
353
353
  for (let o = 0; o < s; o++)
354
354
  if (i += t[o], r[o] !== void 0) {
355
355
  const a = n[o];
356
- a === ss ? i += Te(r[o]) : a === rs ? i += F.transform(r[o]) : i += r[o];
356
+ a === is ? i += Te(r[o]) : a === os ? i += R.transform(r[o]) : i += r[o];
357
357
  }
358
358
  return i;
359
359
  };
360
360
  }
361
- const Jr = (e) => typeof e == "number" ? 0 : F.test(e) ? F.getAnimatableNone(e) : e;
361
+ const Jr = (e) => typeof e == "number" ? 0 : R.test(e) ? R.getAnimatableNone(e) : e;
362
362
  function ei(e) {
363
- const t = is(e);
364
- return os(e)(t.map(Jr));
363
+ const t = as(e);
364
+ return cs(e)(t.map(Jr));
365
365
  }
366
366
  const he = {
367
367
  test: Xr,
368
- parse: is,
369
- createTransformer: os,
368
+ parse: as,
369
+ createTransformer: cs,
370
370
  getAnimatableNone: ei
371
371
  };
372
- function Ue(e, t, n) {
372
+ function Xe(e, t, n) {
373
373
  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;
374
374
  }
375
375
  function ti({ hue: e, saturation: t, lightness: n, alpha: s }) {
@@ -379,7 +379,7 @@ function ti({ hue: e, saturation: t, lightness: n, alpha: s }) {
379
379
  r = i = o = n;
380
380
  else {
381
381
  const a = n < 0.5 ? n * (1 + t) : n + t - n * t, c = 2 * n - a;
382
- r = Ue(c, a, e + 1 / 3), i = Ue(c, a, e), o = Ue(c, a, e - 1 / 3);
382
+ r = Xe(c, a, e + 1 / 3), i = Xe(c, a, e), o = Xe(c, a, e - 1 / 3);
383
383
  }
384
384
  return {
385
385
  red: Math.round(r * 255),
@@ -388,38 +388,38 @@ function ti({ hue: e, saturation: t, lightness: n, alpha: s }) {
388
388
  alpha: s
389
389
  };
390
390
  }
391
- function Ie(e, t) {
391
+ function ke(e, t) {
392
392
  return (n) => n > 0 ? t : e;
393
393
  }
394
- const je = (e, t, n) => e + (t - e) * n, ze = (e, t, n) => {
394
+ const _e = (e, t, n) => e + (t - e) * n, qe = (e, t, n) => {
395
395
  const s = e * e, r = n * (t * t - s) + s;
396
396
  return r < 0 ? 0 : Math.sqrt(r);
397
- }, ni = [nt, Y, se], si = (e) => ni.find((t) => t.test(e));
398
- function sn(e) {
397
+ }, ni = [it, q, se], si = (e) => ni.find((t) => t.test(e));
398
+ function an(e) {
399
399
  const t = si(e);
400
400
  if (Ce(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
401
401
  return !1;
402
402
  let n = t.parse(e);
403
403
  return t === se && (n = ti(n)), n;
404
404
  }
405
- const rn = (e, t) => {
406
- const n = sn(e), s = sn(t);
405
+ const cn = (e, t) => {
406
+ const n = an(e), s = an(t);
407
407
  if (!n || !s)
408
- return Ie(e, t);
408
+ return ke(e, t);
409
409
  const r = { ...n };
410
- return (i) => (r.red = ze(n.red, s.red, i), r.green = ze(n.green, s.green, i), r.blue = ze(n.blue, s.blue, i), r.alpha = je(n.alpha, s.alpha, i), Y.transform(r));
411
- }, st = /* @__PURE__ */ new Set(["none", "hidden"]);
410
+ return (i) => (r.red = qe(n.red, s.red, i), r.green = qe(n.green, s.green, i), r.blue = qe(n.blue, s.blue, i), r.alpha = _e(n.alpha, s.alpha, i), q.transform(r));
411
+ }, ot = /* @__PURE__ */ new Set(["none", "hidden"]);
412
412
  function ri(e, t) {
413
- return st.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
413
+ return ot.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
414
414
  }
415
415
  function ii(e, t) {
416
- return (n) => je(e, t, n);
416
+ return (n) => _e(e, t, n);
417
417
  }
418
- function Dt(e) {
419
- return typeof e == "number" ? ii : typeof e == "string" ? Pt(e) ? Ie : F.test(e) ? rn : ci : Array.isArray(e) ? as : typeof e == "object" ? F.test(e) ? rn : oi : Ie;
418
+ function kt(e) {
419
+ return typeof e == "number" ? ii : typeof e == "string" ? Ot(e) ? ke : R.test(e) ? cn : ci : Array.isArray(e) ? ls : typeof e == "object" ? R.test(e) ? cn : oi : ke;
420
420
  }
421
- function as(e, t) {
422
- const n = [...e], s = n.length, r = e.map((i, o) => Dt(i)(i, t[o]));
421
+ function ls(e, t) {
422
+ const n = [...e], s = n.length, r = e.map((i, o) => kt(i)(i, t[o]));
423
423
  return (i) => {
424
424
  for (let o = 0; o < s; o++)
425
425
  n[o] = r[o](i);
@@ -429,7 +429,7 @@ function as(e, t) {
429
429
  function oi(e, t) {
430
430
  const n = { ...e, ...t }, s = {};
431
431
  for (const r in n)
432
- e[r] !== void 0 && t[r] !== void 0 && (s[r] = Dt(e[r])(e[r], t[r]));
432
+ e[r] !== void 0 && t[r] !== void 0 && (s[r] = kt(e[r])(e[r], t[r]));
433
433
  return (r) => {
434
434
  for (const i in s)
435
435
  n[i] = s[i](r);
@@ -446,51 +446,51 @@ function ai(e, t) {
446
446
  }
447
447
  const ci = (e, t) => {
448
448
  const n = he.createTransformer(t), s = Se(e), r = Se(t);
449
- return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? st.has(e) && !r.values.length || st.has(t) && !s.values.length ? ri(e, t) : $e(as(ai(s, r), r.values), n) : (Ce(!0, `Complex values '${e}' and '${t}' 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.`, "complex-values-different"), Ie(e, t));
449
+ return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? ot.has(e) && !r.values.length || ot.has(t) && !s.values.length ? ri(e, t) : We(ls(ai(s, r), r.values), n) : (Ce(!0, `Complex values '${e}' and '${t}' 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.`, "complex-values-different"), ke(e, t));
450
450
  };
451
- function cs(e, t, n) {
452
- return typeof e == "number" && typeof t == "number" && typeof n == "number" ? je(e, t, n) : Dt(e)(e, t);
451
+ function us(e, t, n) {
452
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? _e(e, t, n) : kt(e)(e, t);
453
453
  }
454
454
  const li = (e) => {
455
455
  const t = ({ timestamp: n }) => e(n);
456
456
  return {
457
457
  start: (n = !0) => N.update(t, n),
458
- stop: () => tt(t),
458
+ stop: () => rt(t),
459
459
  /**
460
460
  * If we're processing this frame we can use the
461
461
  * framelocked timestamp to keep things in sync.
462
462
  */
463
- now: () => Oe.isProcessing ? Oe.timestamp : B.now()
463
+ now: () => Ee.isProcessing ? Ee.timestamp : B.now()
464
464
  };
465
- }, ls = (e, t, n = 10) => {
465
+ }, fs = (e, t, n = 10) => {
466
466
  let s = "";
467
467
  const r = Math.max(Math.round(t / n), 2);
468
468
  for (let i = 0; i < r; i++)
469
469
  s += Math.round(e(i / (r - 1)) * 1e4) / 1e4 + ", ";
470
470
  return `linear(${s.substring(0, s.length - 2)})`;
471
- }, Ee = 2e4;
472
- function Ot(e) {
471
+ }, Be = 2e4;
472
+ function Bt(e) {
473
473
  let t = 0;
474
474
  const n = 50;
475
475
  let s = e.next(t);
476
- for (; !s.done && t < Ee; )
476
+ for (; !s.done && t < Be; )
477
477
  t += n, s = e.next(t);
478
- return t >= Ee ? 1 / 0 : t;
478
+ return t >= Be ? 1 / 0 : t;
479
479
  }
480
480
  function ui(e, t = 100, n) {
481
- const s = n({ ...e, keyframes: [0, t] }), r = Math.min(Ot(s), Ee);
481
+ const s = n({ ...e, keyframes: [0, t] }), r = Math.min(Bt(s), Be);
482
482
  return {
483
483
  type: "keyframes",
484
484
  ease: (i) => s.next(r * i).value / t,
485
- duration: /* @__PURE__ */ j(r)
485
+ duration: /* @__PURE__ */ W(r)
486
486
  };
487
487
  }
488
488
  const fi = 5;
489
- function us(e, t, n) {
489
+ function ds(e, t, n) {
490
490
  const s = Math.max(t - fi, 0);
491
- return Wn(n - e(s), t - s);
491
+ return Hn(n - e(s), t - s);
492
492
  }
493
- const P = {
493
+ const M = {
494
494
  // Default spring physics
495
495
  stiffness: 100,
496
496
  damping: 10,
@@ -518,29 +518,29 @@ const P = {
518
518
  // in seconds
519
519
  minDamping: 0.05,
520
520
  maxDamping: 1
521
- }, Ye = 1e-3;
522
- function di({ duration: e = P.duration, bounce: t = P.bounce, velocity: n = P.velocity, mass: s = P.mass }) {
521
+ }, Qe = 1e-3;
522
+ function di({ duration: e = M.duration, bounce: t = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
523
523
  let r, i;
524
- Ce(e <= /* @__PURE__ */ K(P.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
524
+ Ce(e <= /* @__PURE__ */ j(M.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
525
525
  let o = 1 - t;
526
- o = J(P.minDamping, P.maxDamping, o), e = J(P.minDuration, P.maxDuration, /* @__PURE__ */ j(e)), o < 1 ? (r = (u) => {
527
- const l = u * o, d = l * e, f = l - n, h = rt(u, o), m = Math.exp(-d);
528
- return Ye - f / h * m;
526
+ o = ee(M.minDamping, M.maxDamping, o), e = ee(M.minDuration, M.maxDuration, /* @__PURE__ */ W(e)), o < 1 ? (r = (u) => {
527
+ const l = u * o, d = l * e, f = l - n, h = at(u, o), m = Math.exp(-d);
528
+ return Qe - f / h * m;
529
529
  }, i = (u) => {
530
- const d = u * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(u, 2) * e, m = Math.exp(-d), g = rt(Math.pow(u, 2), o);
531
- return (-r(u) + Ye > 0 ? -1 : 1) * ((f - h) * m) / g;
530
+ const d = u * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(u, 2) * e, m = Math.exp(-d), g = at(Math.pow(u, 2), o);
531
+ return (-r(u) + Qe > 0 ? -1 : 1) * ((f - h) * m) / g;
532
532
  }) : (r = (u) => {
533
533
  const l = Math.exp(-u * e), d = (u - n) * e + 1;
534
- return -Ye + l * d;
534
+ return -Qe + l * d;
535
535
  }, i = (u) => {
536
536
  const l = Math.exp(-u * e), d = (n - u) * (e * e);
537
537
  return l * d;
538
538
  });
539
539
  const a = 5 / e, c = pi(r, i, a);
540
- if (e = /* @__PURE__ */ K(e), isNaN(c))
540
+ if (e = /* @__PURE__ */ j(e), isNaN(c))
541
541
  return {
542
- stiffness: P.stiffness,
543
- damping: P.damping,
542
+ stiffness: M.stiffness,
543
+ damping: M.damping,
544
544
  duration: e
545
545
  };
546
546
  {
@@ -559,28 +559,28 @@ function pi(e, t, n) {
559
559
  s = s - e(s) / t(s);
560
560
  return s;
561
561
  }
562
- function rt(e, t) {
562
+ function at(e, t) {
563
563
  return e * Math.sqrt(1 - t * t);
564
564
  }
565
565
  const mi = ["duration", "bounce"], gi = ["stiffness", "damping", "mass"];
566
- function on(e, t) {
566
+ function ln(e, t) {
567
567
  return t.some((n) => e[n] !== void 0);
568
568
  }
569
569
  function yi(e) {
570
570
  let t = {
571
- velocity: P.velocity,
572
- stiffness: P.stiffness,
573
- damping: P.damping,
574
- mass: P.mass,
571
+ velocity: M.velocity,
572
+ stiffness: M.stiffness,
573
+ damping: M.damping,
574
+ mass: M.mass,
575
575
  isResolvedFromDuration: !1,
576
576
  ...e
577
577
  };
578
- if (!on(e, gi) && on(e, mi))
578
+ if (!ln(e, gi) && ln(e, mi))
579
579
  if (e.visualDuration) {
580
- const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * J(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
580
+ const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * ee(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
581
581
  t = {
582
582
  ...t,
583
- mass: P.mass,
583
+ mass: M.mass,
584
584
  stiffness: r,
585
585
  damping: i
586
586
  };
@@ -589,12 +589,12 @@ function yi(e) {
589
589
  t = {
590
590
  ...t,
591
591
  ...n,
592
- mass: P.mass
592
+ mass: M.mass
593
593
  }, t.isResolvedFromDuration = !0;
594
594
  }
595
595
  return t;
596
596
  }
597
- function ke(e = P.visualDuration, t = P.bounce) {
597
+ function Le(e = M.visualDuration, t = M.bounce) {
598
598
  const n = typeof e != "object" ? {
599
599
  visualDuration: e,
600
600
  keyframes: [0, 1],
@@ -603,69 +603,69 @@ function ke(e = P.visualDuration, t = P.bounce) {
603
603
  let { restSpeed: s, restDelta: r } = n;
604
604
  const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: c, damping: u, mass: l, duration: d, velocity: f, isResolvedFromDuration: h } = yi({
605
605
  ...n,
606
- velocity: -/* @__PURE__ */ j(n.velocity || 0)
607
- }), m = f || 0, g = u / (2 * Math.sqrt(c * l)), y = o - i, p = /* @__PURE__ */ j(Math.sqrt(c / l)), x = Math.abs(y) < 5;
608
- s || (s = x ? P.restSpeed.granular : P.restSpeed.default), r || (r = x ? P.restDelta.granular : P.restDelta.default);
606
+ velocity: -/* @__PURE__ */ W(n.velocity || 0)
607
+ }), m = f || 0, g = u / (2 * Math.sqrt(c * l)), b = o - i, p = /* @__PURE__ */ W(Math.sqrt(c / l)), x = Math.abs(b) < 5;
608
+ s || (s = x ? M.restSpeed.granular : M.restSpeed.default), r || (r = x ? M.restDelta.granular : M.restDelta.default);
609
609
  let v;
610
610
  if (g < 1) {
611
- const S = rt(p, g);
612
- v = (C) => {
613
- const M = Math.exp(-g * p * C);
614
- return o - M * ((m + g * p * y) / S * Math.sin(S * C) + y * Math.cos(S * C));
611
+ const S = at(p, g);
612
+ v = (A) => {
613
+ const P = Math.exp(-g * p * A);
614
+ return o - P * ((m + g * p * b) / S * Math.sin(S * A) + b * Math.cos(S * A));
615
615
  };
616
616
  } else if (g === 1)
617
- v = (S) => o - Math.exp(-p * S) * (y + (m + p * y) * S);
617
+ v = (S) => o - Math.exp(-p * S) * (b + (m + p * b) * S);
618
618
  else {
619
619
  const S = p * Math.sqrt(g * g - 1);
620
- v = (C) => {
621
- const M = Math.exp(-g * p * C), V = Math.min(S * C, 300);
622
- return o - M * ((m + g * p * y) * Math.sinh(V) + S * y * Math.cosh(V)) / S;
620
+ v = (A) => {
621
+ const P = Math.exp(-g * p * A), V = Math.min(S * A, 300);
622
+ return o - P * ((m + g * p * b) * Math.sinh(V) + S * b * Math.cosh(V)) / S;
623
623
  };
624
624
  }
625
- const A = {
625
+ const C = {
626
626
  calculatedDuration: h && d || null,
627
627
  next: (S) => {
628
- const C = v(S);
628
+ const A = v(S);
629
629
  if (h)
630
630
  a.done = S >= d;
631
631
  else {
632
- let M = S === 0 ? m : 0;
633
- g < 1 && (M = S === 0 ? /* @__PURE__ */ K(m) : us(v, S, C));
634
- const V = Math.abs(M) <= s, D = Math.abs(o - C) <= r;
635
- a.done = V && D;
632
+ let P = S === 0 ? m : 0;
633
+ g < 1 && (P = S === 0 ? /* @__PURE__ */ j(m) : ds(v, S, A));
634
+ const V = Math.abs(P) <= s, F = Math.abs(o - A) <= r;
635
+ a.done = V && F;
636
636
  }
637
- return a.value = a.done ? o : C, a;
637
+ return a.value = a.done ? o : A, a;
638
638
  },
639
639
  toString: () => {
640
- const S = Math.min(Ot(A), Ee), C = ls((M) => A.next(S * M).value, S, 30);
641
- return S + "ms " + C;
640
+ const S = Math.min(Bt(C), Be), A = fs((P) => C.next(S * P).value, S, 30);
641
+ return S + "ms " + A;
642
642
  },
643
643
  toTransition: () => {
644
644
  }
645
645
  };
646
- return A;
646
+ return C;
647
647
  }
648
- ke.applyToOptions = (e) => {
649
- const t = ui(e, 100, ke);
650
- return e.ease = t.ease, e.duration = /* @__PURE__ */ K(t.duration), e.type = "keyframes", e;
648
+ Le.applyToOptions = (e) => {
649
+ const t = ui(e, 100, Le);
650
+ return e.ease = t.ease, e.duration = /* @__PURE__ */ j(t.duration), e.type = "keyframes", e;
651
651
  };
652
- function it({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: c, restDelta: u = 0.5, restSpeed: l }) {
652
+ function ct({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: c, restDelta: u = 0.5, restSpeed: l }) {
653
653
  const d = e[0], f = {
654
654
  done: !1,
655
655
  value: d
656
656
  }, h = (V) => a !== void 0 && V < a || c !== void 0 && V > c, m = (V) => a === void 0 ? c : c === void 0 || Math.abs(a - V) < Math.abs(c - V) ? a : c;
657
657
  let g = n * t;
658
- const y = d + g, p = o === void 0 ? y : o(y);
659
- p !== y && (g = p - d);
660
- const x = (V) => -g * Math.exp(-V / s), v = (V) => p + x(V), A = (V) => {
661
- const D = x(V), E = v(V);
662
- f.done = Math.abs(D) <= u, f.value = f.done ? p : E;
658
+ const b = d + g, p = o === void 0 ? b : o(b);
659
+ p !== b && (g = p - d);
660
+ const x = (V) => -g * Math.exp(-V / s), v = (V) => p + x(V), C = (V) => {
661
+ const F = x(V), D = v(V);
662
+ f.done = Math.abs(F) <= u, f.value = f.done ? p : D;
663
663
  };
664
- let S, C;
665
- const M = (V) => {
666
- h(f.value) && (S = V, C = ke({
664
+ let S, A;
665
+ const P = (V) => {
666
+ h(f.value) && (S = V, A = Le({
667
667
  keyframes: [f.value, m(f.value)],
668
- velocity: us(v, V, f.value),
668
+ velocity: ds(v, V, f.value),
669
669
  // TODO: This should be passing * 1000
670
670
  damping: r,
671
671
  stiffness: i,
@@ -673,21 +673,21 @@ function it({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
673
673
  restSpeed: l
674
674
  }));
675
675
  };
676
- return M(0), {
676
+ return P(0), {
677
677
  calculatedDuration: null,
678
678
  next: (V) => {
679
- let D = !1;
680
- return !C && S === void 0 && (D = !0, A(V), M(V)), S !== void 0 && V >= S ? C.next(V - S) : (!D && A(V), f);
679
+ let F = !1;
680
+ return !A && S === void 0 && (F = !0, C(V), P(V)), S !== void 0 && V >= S ? A.next(V - S) : (!F && C(V), f);
681
681
  }
682
682
  };
683
683
  }
684
684
  function bi(e, t, n) {
685
- const s = [], r = n || W.mix || cs, i = e.length - 1;
685
+ const s = [], r = n || _.mix || us, i = e.length - 1;
686
686
  for (let o = 0; o < i; o++) {
687
687
  let a = r(e[o], e[o + 1]);
688
688
  if (t) {
689
689
  const c = Array.isArray(t) ? t[o] || fe : t;
690
- a = $e(c, a);
690
+ a = We(c, a);
691
691
  }
692
692
  s.push(a);
693
693
  }
@@ -695,7 +695,7 @@ function bi(e, t, n) {
695
695
  }
696
696
  function vi(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
697
697
  const i = e.length;
698
- if (ee(i === t.length, "Both input and output ranges must be the same length", "range-length"), i === 1)
698
+ if (te(i === t.length, "Both input and output ranges must be the same length", "range-length"), i === 1)
699
699
  return () => t[0];
700
700
  if (i === 2 && t[0] === t[1])
701
701
  return () => t[1];
@@ -708,16 +708,16 @@ function vi(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
708
708
  if (c > 1)
709
709
  for (; d < e.length - 2 && !(l < e[d + 1]); d++)
710
710
  ;
711
- const f = /* @__PURE__ */ $n(e[d], e[d + 1], l);
711
+ const f = /* @__PURE__ */ Wn(e[d], e[d + 1], l);
712
712
  return a[d](f);
713
713
  };
714
- return n ? (l) => u(J(e[0], e[i - 1], l)) : u;
714
+ return n ? (l) => u(ee(e[0], e[i - 1], l)) : u;
715
715
  }
716
716
  function Ti(e, t) {
717
717
  const n = e[e.length - 1];
718
718
  for (let s = 1; s <= t; s++) {
719
- const r = /* @__PURE__ */ $n(0, t, s);
720
- e.push(je(n, 1, r));
719
+ const r = /* @__PURE__ */ Wn(0, t, s);
720
+ e.push(_e(n, 1, r));
721
721
  }
722
722
  }
723
723
  function wi(e) {
@@ -728,10 +728,10 @@ function xi(e, t) {
728
728
  return e.map((n) => n * t);
729
729
  }
730
730
  function Si(e, t) {
731
- return e.map(() => t || Qn).splice(0, e.length - 1);
731
+ return e.map(() => t || Jn).splice(0, e.length - 1);
732
732
  }
733
733
  function re({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
734
- const r = kr(s) ? s.map(en) : en(s), i = {
734
+ const r = kr(s) ? s.map(sn) : sn(s), i = {
735
735
  done: !1,
736
736
  value: t[0]
737
737
  }, o = xi(
@@ -748,21 +748,21 @@ function re({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }
748
748
  };
749
749
  }
750
750
  const Vi = (e) => e !== null;
751
- function It(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
751
+ function Lt(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
752
752
  const i = e.filter(Vi), a = r < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
753
753
  return !a || s === void 0 ? i[a] : s;
754
754
  }
755
755
  const Ci = {
756
- decay: it,
757
- inertia: it,
756
+ decay: ct,
757
+ inertia: ct,
758
758
  tween: re,
759
759
  keyframes: re,
760
- spring: ke
760
+ spring: Le
761
761
  };
762
- function fs(e) {
762
+ function hs(e) {
763
763
  typeof e.type == "string" && (e.type = Ci[e.type]);
764
764
  }
765
- class Et {
765
+ class Nt {
766
766
  constructor() {
767
767
  this.updateFinished();
768
768
  }
@@ -787,7 +787,7 @@ class Et {
787
787
  }
788
788
  }
789
789
  const Ai = (e) => e / 100;
790
- class kt extends Et {
790
+ class Kt extends Nt {
791
791
  constructor(t) {
792
792
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
793
793
  var s, r;
@@ -797,17 +797,17 @@ class kt extends Et {
797
797
  }
798
798
  initAnimation() {
799
799
  const { options: t } = this;
800
- fs(t);
800
+ hs(t);
801
801
  const { type: n = re, repeat: s = 0, repeatDelay: r = 0, repeatType: i, velocity: o = 0 } = t;
802
802
  let { keyframes: a } = t;
803
803
  const c = n || re;
804
- process.env.NODE_ENV !== "production" && c !== re && ee(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== re && typeof a[0] != "number" && (this.mixKeyframes = $e(Ai, cs(a[0], a[1])), a = [0, 100]);
804
+ process.env.NODE_ENV !== "production" && c !== re && te(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== re && typeof a[0] != "number" && (this.mixKeyframes = We(Ai, us(a[0], a[1])), a = [0, 100]);
805
805
  const u = c({ ...t, keyframes: a });
806
806
  i === "mirror" && (this.mirroredGenerator = c({
807
807
  ...t,
808
808
  keyframes: [...a].reverse(),
809
809
  velocity: -o
810
- })), u.calculatedDuration === null && (u.calculatedDuration = Ot(u));
810
+ })), u.calculatedDuration === null && (u.calculatedDuration = Bt(u));
811
811
  const { calculatedDuration: l } = u;
812
812
  this.calculatedDuration = l, this.resolvedDuration = l + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = u;
813
813
  }
@@ -819,22 +819,22 @@ class kt extends Et {
819
819
  const { generator: s, totalDuration: r, mixKeyframes: i, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
820
820
  if (this.startTime === null)
821
821
  return s.next(0);
822
- const { delay: u = 0, keyframes: l, repeat: d, repeatType: f, repeatDelay: h, type: m, onUpdate: g, finalKeyframe: y } = this.options;
822
+ const { delay: u = 0, keyframes: l, repeat: d, repeatType: f, repeatDelay: h, type: m, onUpdate: g, finalKeyframe: b } = this.options;
823
823
  this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
824
824
  const p = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), x = this.playbackSpeed >= 0 ? p < 0 : p > r;
825
825
  this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
826
- let v = this.currentTime, A = s;
826
+ let v = this.currentTime, C = s;
827
827
  if (d) {
828
828
  const V = Math.min(this.currentTime, r) / a;
829
- let D = Math.floor(V), E = V % 1;
830
- !E && V >= 1 && (E = 1), E === 1 && D--, D = Math.min(D, d + 1), !!(D % 2) && (f === "reverse" ? (E = 1 - E, h && (E -= h / a)) : f === "mirror" && (A = o)), v = J(0, 1, E) * a;
829
+ let F = Math.floor(V), D = V % 1;
830
+ !D && V >= 1 && (D = 1), D === 1 && F--, F = Math.min(F, d + 1), !!(F % 2) && (f === "reverse" ? (D = 1 - D, h && (D -= h / a)) : f === "mirror" && (C = o)), v = ee(0, 1, D) * a;
831
831
  }
832
- const S = x ? { done: !1, value: l[0] } : A.next(v);
832
+ const S = x ? { done: !1, value: l[0] } : C.next(v);
833
833
  i && (S.value = i(S.value));
834
- let { done: C } = S;
835
- !x && c !== null && (C = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
836
- const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && C);
837
- return M && m !== it && (S.value = It(l, this.options, y, this.speed)), g && g(S.value), M && this.finish(), S;
834
+ let { done: A } = S;
835
+ !x && c !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
836
+ const P = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
837
+ return P && m !== ct && (S.value = Lt(l, this.options, b, this.speed)), g && g(S.value), P && this.finish(), S;
838
838
  }
839
839
  /**
840
840
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -845,14 +845,14 @@ class kt extends Et {
845
845
  return this.finished.then(t, n);
846
846
  }
847
847
  get duration() {
848
- return /* @__PURE__ */ j(this.calculatedDuration);
848
+ return /* @__PURE__ */ W(this.calculatedDuration);
849
849
  }
850
850
  get time() {
851
- return /* @__PURE__ */ j(this.currentTime);
851
+ return /* @__PURE__ */ W(this.currentTime);
852
852
  }
853
853
  set time(t) {
854
854
  var n;
855
- t = /* @__PURE__ */ K(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
855
+ t = /* @__PURE__ */ j(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
856
856
  }
857
857
  get speed() {
858
858
  return this.playbackSpeed;
@@ -860,7 +860,7 @@ class kt extends Et {
860
860
  set speed(t) {
861
861
  this.updateTime(B.now());
862
862
  const n = this.playbackSpeed !== t;
863
- this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ j(this.currentTime));
863
+ this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ W(this.currentTime));
864
864
  }
865
865
  play() {
866
866
  var r, i;
@@ -903,9 +903,9 @@ function Mi(e) {
903
903
  for (let t = 1; t < e.length; t++)
904
904
  e[t] ?? (e[t] = e[t - 1]);
905
905
  }
906
- const X = (e) => e * 180 / Math.PI, ot = (e) => {
907
- const t = X(Math.atan2(e[1], e[0]));
908
- return at(t);
906
+ const Q = (e) => e * 180 / Math.PI, lt = (e) => {
907
+ const t = Q(Math.atan2(e[1], e[0]));
908
+ return ut(t);
909
909
  }, Pi = {
910
910
  x: 4,
911
911
  y: 5,
@@ -914,51 +914,51 @@ const X = (e) => e * 180 / Math.PI, ot = (e) => {
914
914
  scaleX: 0,
915
915
  scaleY: 3,
916
916
  scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
917
- rotate: ot,
918
- rotateZ: ot,
919
- skewX: (e) => X(Math.atan(e[1])),
920
- skewY: (e) => X(Math.atan(e[2])),
917
+ rotate: lt,
918
+ rotateZ: lt,
919
+ skewX: (e) => Q(Math.atan(e[1])),
920
+ skewY: (e) => Q(Math.atan(e[2])),
921
921
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
922
- }, at = (e) => (e = e % 360, e < 0 && (e += 360), e), an = ot, cn = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), ln = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Fi = {
922
+ }, ut = (e) => (e = e % 360, e < 0 && (e += 360), e), un = lt, fn = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), dn = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Ri = {
923
923
  x: 12,
924
924
  y: 13,
925
925
  z: 14,
926
926
  translateX: 12,
927
927
  translateY: 13,
928
928
  translateZ: 14,
929
- scaleX: cn,
930
- scaleY: ln,
931
- scale: (e) => (cn(e) + ln(e)) / 2,
932
- rotateX: (e) => at(X(Math.atan2(e[6], e[5]))),
933
- rotateY: (e) => at(X(Math.atan2(-e[2], e[0]))),
934
- rotateZ: an,
935
- rotate: an,
936
- skewX: (e) => X(Math.atan(e[4])),
937
- skewY: (e) => X(Math.atan(e[1])),
929
+ scaleX: fn,
930
+ scaleY: dn,
931
+ scale: (e) => (fn(e) + dn(e)) / 2,
932
+ rotateX: (e) => ut(Q(Math.atan2(e[6], e[5]))),
933
+ rotateY: (e) => ut(Q(Math.atan2(-e[2], e[0]))),
934
+ rotateZ: un,
935
+ rotate: un,
936
+ skewX: (e) => Q(Math.atan(e[4])),
937
+ skewY: (e) => Q(Math.atan(e[1])),
938
938
  skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
939
939
  };
940
- function ct(e) {
940
+ function ft(e) {
941
941
  return e.includes("scale") ? 1 : 0;
942
942
  }
943
- function lt(e, t) {
943
+ function dt(e, t) {
944
944
  if (!e || e === "none")
945
- return ct(t);
945
+ return ft(t);
946
946
  const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
947
947
  let s, r;
948
948
  if (n)
949
- s = Fi, r = n;
949
+ s = Ri, r = n;
950
950
  else {
951
951
  const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
952
952
  s = Pi, r = a;
953
953
  }
954
954
  if (!r)
955
- return ct(t);
955
+ return ft(t);
956
956
  const i = s[t], o = r[1].split(",").map(Di);
957
957
  return typeof i == "function" ? i(o) : o[i];
958
958
  }
959
- const Ri = (e, t) => {
959
+ const Fi = (e, t) => {
960
960
  const { transform: n = "none" } = getComputedStyle(e);
961
- return lt(n, t);
961
+ return dt(n, t);
962
962
  };
963
963
  function Di(e) {
964
964
  return parseFloat(e.trim());
@@ -981,7 +981,7 @@ const pe = [
981
981
  "skew",
982
982
  "skewX",
983
983
  "skewY"
984
- ], me = new Set(pe), un = (e) => e === de || e === w, Oi = /* @__PURE__ */ new Set(["x", "y", "z"]), Ii = pe.filter((e) => !Oi.has(e));
984
+ ], me = new Set(pe), hn = (e) => e === de || e === w, Oi = /* @__PURE__ */ new Set(["x", "y", "z"]), Ii = pe.filter((e) => !Oi.has(e));
985
985
  function Ei(e) {
986
986
  const t = [];
987
987
  return Ii.forEach((n) => {
@@ -989,7 +989,7 @@ function Ei(e) {
989
989
  s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
990
990
  }), t;
991
991
  }
992
- const q = {
992
+ const Z = {
993
993
  // Dimensions
994
994
  width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
995
995
  height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
@@ -998,16 +998,16 @@ const q = {
998
998
  bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
999
999
  right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
1000
1000
  // Transform
1001
- x: (e, { transform: t }) => lt(t, "x"),
1002
- y: (e, { transform: t }) => lt(t, "y")
1001
+ x: (e, { transform: t }) => dt(t, "x"),
1002
+ y: (e, { transform: t }) => dt(t, "y")
1003
1003
  };
1004
- q.translateX = q.x;
1005
- q.translateY = q.y;
1006
- const Q = /* @__PURE__ */ new Set();
1007
- let ut = !1, ft = !1, dt = !1;
1008
- function ds() {
1009
- if (ft) {
1010
- const e = Array.from(Q).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
1004
+ Z.translateX = Z.x;
1005
+ Z.translateY = Z.y;
1006
+ const J = /* @__PURE__ */ new Set();
1007
+ let ht = !1, pt = !1, mt = !1;
1008
+ function ps() {
1009
+ if (pt) {
1010
+ const e = Array.from(J).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
1011
1011
  t.forEach((s) => {
1012
1012
  const r = Ei(s);
1013
1013
  r.length && (n.set(s, r), s.render());
@@ -1022,22 +1022,22 @@ function ds() {
1022
1022
  s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
1023
1023
  });
1024
1024
  }
1025
- ft = !1, ut = !1, Q.forEach((e) => e.complete(dt)), Q.clear();
1025
+ pt = !1, ht = !1, J.forEach((e) => e.complete(mt)), J.clear();
1026
1026
  }
1027
- function hs() {
1028
- Q.forEach((e) => {
1029
- e.readKeyframes(), e.needsMeasurement && (ft = !0);
1027
+ function ms() {
1028
+ J.forEach((e) => {
1029
+ e.readKeyframes(), e.needsMeasurement && (pt = !0);
1030
1030
  });
1031
1031
  }
1032
1032
  function ki() {
1033
- dt = !0, hs(), ds(), dt = !1;
1033
+ mt = !0, ms(), ps(), mt = !1;
1034
1034
  }
1035
- class Bt {
1035
+ class $t {
1036
1036
  constructor(t, n, s, r, i, o = !1) {
1037
1037
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = r, this.element = i, this.isAsync = o;
1038
1038
  }
1039
1039
  scheduleResolve() {
1040
- this.state = "scheduled", this.isAsync ? (Q.add(this), ut || (ut = !0, N.read(hs), N.resolveKeyframes(ds))) : (this.readKeyframes(), this.complete());
1040
+ this.state = "scheduled", this.isAsync ? (J.add(this), ht || (ht = !0, N.read(ms), N.resolveKeyframes(ps))) : (this.readKeyframes(), this.complete());
1041
1041
  }
1042
1042
  readKeyframes() {
1043
1043
  const { unresolvedKeyframes: t, name: n, element: s, motionValue: r } = this;
@@ -1062,10 +1062,10 @@ class Bt {
1062
1062
  measureEndState() {
1063
1063
  }
1064
1064
  complete(t = !1) {
1065
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), Q.delete(this);
1065
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), J.delete(this);
1066
1066
  }
1067
1067
  cancel() {
1068
- this.state === "scheduled" && (Q.delete(this), this.state = "pending");
1068
+ this.state === "scheduled" && (J.delete(this), this.state = "pending");
1069
1069
  }
1070
1070
  resume() {
1071
1071
  this.state === "pending" && this.scheduleResolve();
@@ -1075,19 +1075,19 @@ const Bi = (e) => e.startsWith("--");
1075
1075
  function Li(e, t, n) {
1076
1076
  Bi(t) ? e.style.setProperty(t, n) : e.style[t] = n;
1077
1077
  }
1078
- const Ni = /* @__PURE__ */ Ct(() => window.ScrollTimeline !== void 0), Ki = {};
1078
+ const Ni = /* @__PURE__ */ Rt(() => window.ScrollTimeline !== void 0), Ki = {};
1079
1079
  function $i(e, t) {
1080
- const n = /* @__PURE__ */ Ct(e);
1080
+ const n = /* @__PURE__ */ Rt(e);
1081
1081
  return () => Ki[t] ?? n();
1082
1082
  }
1083
- const ps = /* @__PURE__ */ $i(() => {
1083
+ const gs = /* @__PURE__ */ $i(() => {
1084
1084
  try {
1085
1085
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1086
1086
  } catch {
1087
1087
  return !1;
1088
1088
  }
1089
1089
  return !0;
1090
- }, "linearEasing"), ye = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, fn = {
1090
+ }, "linearEasing"), ye = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, pn = {
1091
1091
  linear: "linear",
1092
1092
  ease: "ease",
1093
1093
  easeIn: "ease-in",
@@ -1098,16 +1098,16 @@ const ps = /* @__PURE__ */ $i(() => {
1098
1098
  backIn: /* @__PURE__ */ ye([0.31, 0.01, 0.66, -0.59]),
1099
1099
  backOut: /* @__PURE__ */ ye([0.33, 1.53, 0.69, 0.99])
1100
1100
  };
1101
- function ms(e, t) {
1101
+ function ys(e, t) {
1102
1102
  if (e)
1103
- return typeof e == "function" ? ps() ? ls(e, t) : "ease-out" : Zn(e) ? ye(e) : Array.isArray(e) ? e.map((n) => ms(n, t) || fn.easeOut) : fn[e];
1103
+ return typeof e == "function" ? gs() ? fs(e, t) : "ease-out" : es(e) ? ye(e) : Array.isArray(e) ? e.map((n) => ys(n, t) || pn.easeOut) : pn[e];
1104
1104
  }
1105
1105
  function ji(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, u = void 0) {
1106
1106
  const l = {
1107
1107
  [t]: n
1108
1108
  };
1109
1109
  c && (l.offset = c);
1110
- const d = ms(a, r);
1110
+ const d = ys(a, r);
1111
1111
  Array.isArray(d) && (l.easing = d);
1112
1112
  const f = {
1113
1113
  delay: s,
@@ -1119,22 +1119,22 @@ function ji(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatTyp
1119
1119
  };
1120
1120
  return u && (f.pseudoElement = u), e.animate(l, f);
1121
1121
  }
1122
- function gs(e) {
1122
+ function bs(e) {
1123
1123
  return typeof e == "function" && "applyToOptions" in e;
1124
1124
  }
1125
1125
  function Wi({ type: e, ...t }) {
1126
- return gs(e) && ps() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1126
+ return bs(e) && gs() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1127
1127
  }
1128
- class _i extends Et {
1128
+ class _i extends Nt {
1129
1129
  constructor(t) {
1130
1130
  if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1131
1131
  return;
1132
1132
  const { element: n, name: s, keyframes: r, pseudoElement: i, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = t;
1133
- this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, ee(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1133
+ this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, te(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1134
1134
  const u = Wi(t);
1135
1135
  this.animation = ji(n, s, r, u, i), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1136
1136
  if (this.finishedTime = this.time, !i) {
1137
- const l = It(r, this.options, a, this.speed);
1137
+ const l = Lt(r, this.options, a, this.speed);
1138
1138
  this.updateMotionValue ? this.updateMotionValue(l) : Li(n, s, l), this.animation.cancel();
1139
1139
  }
1140
1140
  c == null || c(), this.notifyFinished();
@@ -1182,13 +1182,13 @@ class _i extends Et {
1182
1182
  get duration() {
1183
1183
  var n, s;
1184
1184
  const t = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
1185
- return /* @__PURE__ */ j(Number(t));
1185
+ return /* @__PURE__ */ W(Number(t));
1186
1186
  }
1187
1187
  get time() {
1188
- return /* @__PURE__ */ j(Number(this.animation.currentTime) || 0);
1188
+ return /* @__PURE__ */ W(Number(this.animation.currentTime) || 0);
1189
1189
  }
1190
1190
  set time(t) {
1191
- this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ K(t);
1191
+ this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ j(t);
1192
1192
  }
1193
1193
  /**
1194
1194
  * The playback speed of the animation.
@@ -1217,21 +1217,21 @@ class _i extends Et {
1217
1217
  return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Ni() ? (this.animation.timeline = t, fe) : n(this);
1218
1218
  }
1219
1219
  }
1220
- const ys = {
1221
- anticipate: Xn,
1222
- backInOut: Yn,
1223
- circInOut: qn
1220
+ const vs = {
1221
+ anticipate: Qn,
1222
+ backInOut: qn,
1223
+ circInOut: Zn
1224
1224
  };
1225
1225
  function Hi(e) {
1226
- return e in ys;
1226
+ return e in vs;
1227
1227
  }
1228
1228
  function Gi(e) {
1229
- typeof e.ease == "string" && Hi(e.ease) && (e.ease = ys[e.ease]);
1229
+ typeof e.ease == "string" && Hi(e.ease) && (e.ease = vs[e.ease]);
1230
1230
  }
1231
- const dn = 10;
1231
+ const mn = 10;
1232
1232
  class Ui extends _i {
1233
1233
  constructor(t) {
1234
- Gi(t), fs(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1234
+ Gi(t), hs(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1235
1235
  }
1236
1236
  /**
1237
1237
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1249,14 +1249,14 @@ class Ui extends _i {
1249
1249
  n.set(t);
1250
1250
  return;
1251
1251
  }
1252
- const a = new kt({
1252
+ const a = new Kt({
1253
1253
  ...o,
1254
1254
  autoplay: !1
1255
- }), c = /* @__PURE__ */ K(this.finishedTime ?? this.time);
1256
- n.setWithVelocity(a.sample(c - dn).value, a.sample(c).value, dn), a.stop();
1255
+ }), c = /* @__PURE__ */ j(this.finishedTime ?? this.time);
1256
+ n.setWithVelocity(a.sample(c - mn).value, a.sample(c).value, mn), a.stop();
1257
1257
  }
1258
1258
  }
1259
- const hn = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1259
+ const gn = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1260
1260
  (he.test(e) || e === "0") && // And it contains numbers and/or colors
1261
1261
  !e.startsWith("url("));
1262
1262
  function zi(e) {
@@ -1273,10 +1273,10 @@ function Yi(e, t, n, s) {
1273
1273
  return !1;
1274
1274
  if (t === "display" || t === "visibility")
1275
1275
  return !0;
1276
- const i = e[e.length - 1], o = hn(r, t), a = hn(i, t);
1277
- return Ce(o === a, `You are trying to animate ${t} from "${r}" to "${i}". "${o ? i : r}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : zi(e) || (n === "spring" || gs(n)) && s;
1276
+ const i = e[e.length - 1], o = gn(r, t), a = gn(i, t);
1277
+ return Ce(o === a, `You are trying to animate ${t} from "${r}" to "${i}". "${o ? i : r}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : zi(e) || (n === "spring" || bs(n)) && s;
1278
1278
  }
1279
- function ht(e) {
1279
+ function gt(e) {
1280
1280
  e.duration = 0, e.type;
1281
1281
  }
1282
1282
  const Xi = /* @__PURE__ */ new Set([
@@ -1286,7 +1286,7 @@ const Xi = /* @__PURE__ */ new Set([
1286
1286
  "transform"
1287
1287
  // TODO: Could be re-enabled now we have support for linear() easing
1288
1288
  // "background-color"
1289
- ]), qi = /* @__PURE__ */ Ct(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1289
+ ]), qi = /* @__PURE__ */ Rt(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1290
1290
  function Qi(e) {
1291
1291
  var l;
1292
1292
  const { motionValue: t, name: n, repeatDelay: s, repeatType: r, damping: i, type: o } = e;
@@ -1300,12 +1300,12 @@ function Qi(e) {
1300
1300
  !c && !s && r !== "mirror" && i !== 0 && o !== "inertia";
1301
1301
  }
1302
1302
  const Zi = 40;
1303
- class Ji extends Et {
1303
+ class Ji extends Nt {
1304
1304
  constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: u, element: l, ...d }) {
1305
1305
  var m;
1306
1306
  super(), this.stop = () => {
1307
- var g, y;
1308
- this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (y = this.keyframeResolver) == null || y.cancel();
1307
+ var g, b;
1308
+ this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (b = this.keyframeResolver) == null || b.cancel();
1309
1309
  }, this.createdAt = B.now();
1310
1310
  const f = {
1311
1311
  autoplay: t,
@@ -1318,13 +1318,13 @@ class Ji extends Et {
1318
1318
  motionValue: u,
1319
1319
  element: l,
1320
1320
  ...d
1321
- }, h = (l == null ? void 0 : l.KeyframeResolver) || Bt;
1322
- this.keyframeResolver = new h(a, (g, y, p) => this.onKeyframesResolved(g, y, f, !p), c, u, l), (m = this.keyframeResolver) == null || m.scheduleResolve();
1321
+ }, h = (l == null ? void 0 : l.KeyframeResolver) || $t;
1322
+ this.keyframeResolver = new h(a, (g, b, p) => this.onKeyframesResolved(g, b, f, !p), c, u, l), (m = this.keyframeResolver) == null || m.scheduleResolve();
1323
1323
  }
1324
1324
  onKeyframesResolved(t, n, s, r) {
1325
1325
  this.keyframeResolver = void 0;
1326
1326
  const { name: i, type: o, velocity: a, delay: c, isHandoff: u, onUpdate: l } = s;
1327
- this.resolvedAt = B.now(), Yi(t, i, o, a) || ((W.instantAnimations || !c) && (l == null || l(It(t, s, n))), t[0] = t[t.length - 1], ht(s), s.repeat = 0);
1327
+ this.resolvedAt = B.now(), Yi(t, i, o, a) || ((_.instantAnimations || !c) && (l == null || l(Lt(t, s, n))), t[0] = t[t.length - 1], gt(s), s.repeat = 0);
1328
1328
  const f = {
1329
1329
  startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > Zi ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1330
1330
  finalKeyframe: n,
@@ -1333,7 +1333,7 @@ class Ji extends Et {
1333
1333
  }, h = !u && Qi(f) ? new Ui({
1334
1334
  ...f,
1335
1335
  element: f.motionValue.owner.current
1336
- }) : new kt(f);
1336
+ }) : new Kt(f);
1337
1337
  h.finished.then(() => this.notifyFinished()).catch(fe), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
1338
1338
  }
1339
1339
  get finished() {
@@ -1397,22 +1397,22 @@ function to(e) {
1397
1397
  return [`--${n ?? s}`, r];
1398
1398
  }
1399
1399
  const no = 4;
1400
- function bs(e, t, n = 1) {
1401
- ee(n <= no, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1400
+ function Ts(e, t, n = 1) {
1401
+ te(n <= no, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1402
1402
  const [s, r] = to(e);
1403
1403
  if (!s)
1404
1404
  return;
1405
1405
  const i = window.getComputedStyle(t).getPropertyValue(s);
1406
1406
  if (i) {
1407
1407
  const o = i.trim();
1408
- return Nn(o) ? parseFloat(o) : o;
1408
+ return $n(o) ? parseFloat(o) : o;
1409
1409
  }
1410
- return Pt(r) ? bs(r, t, n + 1) : r;
1410
+ return Ot(r) ? Ts(r, t, n + 1) : r;
1411
1411
  }
1412
- function vs(e, t) {
1412
+ function ws(e, t) {
1413
1413
  return (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
1414
1414
  }
1415
- const Ts = /* @__PURE__ */ new Set([
1415
+ const xs = /* @__PURE__ */ new Set([
1416
1416
  "width",
1417
1417
  "height",
1418
1418
  "top",
@@ -1423,43 +1423,43 @@ const Ts = /* @__PURE__ */ new Set([
1423
1423
  ]), so = {
1424
1424
  test: (e) => e === "auto",
1425
1425
  parse: (e) => e
1426
- }, ws = (e) => (t) => t.test(e), xs = [de, w, ie, _, zr, Ur, so], pn = (e) => xs.find(ws(e));
1426
+ }, Ss = (e) => (t) => t.test(e), Vs = [de, w, ie, G, zr, Ur, so], yn = (e) => Vs.find(Ss(e));
1427
1427
  function ro(e) {
1428
- return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Kn(e) : !0;
1428
+ return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || jn(e) : !0;
1429
1429
  }
1430
1430
  const io = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1431
1431
  function oo(e) {
1432
1432
  const [t, n] = e.slice(0, -1).split("(");
1433
1433
  if (t === "drop-shadow")
1434
1434
  return e;
1435
- const [s] = n.match(Ft) || [];
1435
+ const [s] = n.match(It) || [];
1436
1436
  if (!s)
1437
1437
  return e;
1438
1438
  const r = n.replace(s, "");
1439
1439
  let i = io.has(t) ? 1 : 0;
1440
1440
  return s !== n && (i *= 100), t + "(" + i + r + ")";
1441
1441
  }
1442
- const ao = /\b([a-z-]*)\(.*?\)/gu, pt = {
1442
+ const ao = /\b([a-z-]*)\(.*?\)/gu, yt = {
1443
1443
  ...he,
1444
1444
  getAnimatableNone: (e) => {
1445
1445
  const t = e.match(ao);
1446
1446
  return t ? t.map(oo).join(" ") : e;
1447
1447
  }
1448
- }, mn = {
1448
+ }, bn = {
1449
1449
  ...de,
1450
1450
  transform: Math.round
1451
1451
  }, co = {
1452
- rotate: _,
1453
- rotateX: _,
1454
- rotateY: _,
1455
- rotateZ: _,
1456
- scale: Fe,
1457
- scaleX: Fe,
1458
- scaleY: Fe,
1459
- scaleZ: Fe,
1460
- skew: _,
1461
- skewX: _,
1462
- skewY: _,
1452
+ rotate: G,
1453
+ rotateX: G,
1454
+ rotateY: G,
1455
+ rotateZ: G,
1456
+ scale: De,
1457
+ scaleX: De,
1458
+ scaleY: De,
1459
+ scaleZ: De,
1460
+ skew: G,
1461
+ skewX: G,
1462
+ skewY: G,
1463
1463
  distance: w,
1464
1464
  translateX: w,
1465
1465
  translateY: w,
@@ -1470,10 +1470,10 @@ const ao = /\b([a-z-]*)\(.*?\)/gu, pt = {
1470
1470
  perspective: w,
1471
1471
  transformPerspective: w,
1472
1472
  opacity: xe,
1473
- originX: tn,
1474
- originY: tn,
1473
+ originX: rn,
1474
+ originY: rn,
1475
1475
  originZ: w
1476
- }, Lt = {
1476
+ }, jt = {
1477
1477
  // Border props
1478
1478
  borderWidth: w,
1479
1479
  borderTopWidth: w,
@@ -1510,31 +1510,31 @@ const ao = /\b([a-z-]*)\(.*?\)/gu, pt = {
1510
1510
  backgroundPositionX: w,
1511
1511
  backgroundPositionY: w,
1512
1512
  ...co,
1513
- zIndex: mn,
1513
+ zIndex: bn,
1514
1514
  // SVG
1515
1515
  fillOpacity: xe,
1516
1516
  strokeOpacity: xe,
1517
- numOctaves: mn
1517
+ numOctaves: bn
1518
1518
  }, lo = {
1519
- ...Lt,
1519
+ ...jt,
1520
1520
  // Color props
1521
- color: F,
1522
- backgroundColor: F,
1523
- outlineColor: F,
1524
- fill: F,
1525
- stroke: F,
1521
+ color: R,
1522
+ backgroundColor: R,
1523
+ outlineColor: R,
1524
+ fill: R,
1525
+ stroke: R,
1526
1526
  // Border props
1527
- borderColor: F,
1528
- borderTopColor: F,
1529
- borderRightColor: F,
1530
- borderBottomColor: F,
1531
- borderLeftColor: F,
1532
- filter: pt,
1533
- WebkitFilter: pt
1534
- }, Ss = (e) => lo[e];
1535
- function Vs(e, t) {
1536
- let n = Ss(e);
1537
- return n !== pt && (n = he), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1527
+ borderColor: R,
1528
+ borderTopColor: R,
1529
+ borderRightColor: R,
1530
+ borderBottomColor: R,
1531
+ borderLeftColor: R,
1532
+ filter: yt,
1533
+ WebkitFilter: yt
1534
+ }, Cs = (e) => lo[e];
1535
+ function As(e, t) {
1536
+ let n = Cs(e);
1537
+ return n !== yt && (n = he), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1538
1538
  }
1539
1539
  const uo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1540
1540
  function fo(e, t, n) {
@@ -1545,9 +1545,9 @@ function fo(e, t, n) {
1545
1545
  }
1546
1546
  if (r && n)
1547
1547
  for (const i of t)
1548
- e[i] = Vs(n, r);
1548
+ e[i] = As(n, r);
1549
1549
  }
1550
- class ho extends Bt {
1550
+ class ho extends $t {
1551
1551
  constructor(t, n, s, r, i) {
1552
1552
  super(t, n, s, r, i, !0);
1553
1553
  }
@@ -1558,21 +1558,21 @@ class ho extends Bt {
1558
1558
  super.readKeyframes();
1559
1559
  for (let c = 0; c < t.length; c++) {
1560
1560
  let u = t[c];
1561
- if (typeof u == "string" && (u = u.trim(), Pt(u))) {
1562
- const l = bs(u, n.current);
1561
+ if (typeof u == "string" && (u = u.trim(), Ot(u))) {
1562
+ const l = Ts(u, n.current);
1563
1563
  l !== void 0 && (t[c] = l), c === t.length - 1 && (this.finalKeyframe = u);
1564
1564
  }
1565
1565
  }
1566
- if (this.resolveNoneKeyframes(), !Ts.has(s) || t.length !== 2)
1566
+ if (this.resolveNoneKeyframes(), !xs.has(s) || t.length !== 2)
1567
1567
  return;
1568
- const [r, i] = t, o = pn(r), a = pn(i);
1568
+ const [r, i] = t, o = yn(r), a = yn(i);
1569
1569
  if (o !== a)
1570
- if (un(o) && un(a))
1570
+ if (hn(o) && hn(a))
1571
1571
  for (let c = 0; c < t.length; c++) {
1572
1572
  const u = t[c];
1573
1573
  typeof u == "string" && (t[c] = parseFloat(u));
1574
1574
  }
1575
- else q[s] && (this.needsMeasurement = !0);
1575
+ else Z[s] && (this.needsMeasurement = !0);
1576
1576
  }
1577
1577
  resolveNoneKeyframes() {
1578
1578
  const { unresolvedKeyframes: t, name: n } = this, s = [];
@@ -1584,7 +1584,7 @@ class ho extends Bt {
1584
1584
  const { element: t, unresolvedKeyframes: n, name: s } = this;
1585
1585
  if (!t || !t.current)
1586
1586
  return;
1587
- s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = q[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1587
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Z[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1588
1588
  const r = n[n.length - 1];
1589
1589
  r !== void 0 && t.getValue(s, r).jump(r, !1);
1590
1590
  }
@@ -1596,7 +1596,7 @@ class ho extends Bt {
1596
1596
  const r = t.getValue(n);
1597
1597
  r && r.jump(this.measuredOrigin, !1);
1598
1598
  const i = s.length - 1, o = s[i];
1599
- s[i] = q[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, u]) => {
1599
+ s[i] = Z[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, u]) => {
1600
1600
  t.getValue(c).set(u);
1601
1601
  }), this.resolveNoneKeyframes();
1602
1602
  }
@@ -1611,11 +1611,11 @@ function po(e, t, n) {
1611
1611
  }
1612
1612
  return Array.from(e);
1613
1613
  }
1614
- const Cs = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
1614
+ const Ms = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
1615
1615
  function mo(e) {
1616
1616
  return Mr(e) && "offsetHeight" in e;
1617
1617
  }
1618
- const gn = 30, go = (e) => !isNaN(parseFloat(e));
1618
+ const vn = 30, go = (e) => !isNaN(parseFloat(e));
1619
1619
  class yo {
1620
1620
  /**
1621
1621
  * @param init - The initiating value
@@ -1679,10 +1679,10 @@ class yo {
1679
1679
  * @deprecated
1680
1680
  */
1681
1681
  onChange(t) {
1682
- return process.env.NODE_ENV !== "production" && _n(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
1682
+ return process.env.NODE_ENV !== "production" && Gn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
1683
1683
  }
1684
1684
  on(t, n) {
1685
- this.events[t] || (this.events[t] = new jn());
1685
+ this.events[t] || (this.events[t] = new _n());
1686
1686
  const s = this.events[t].add(n);
1687
1687
  return t === "change" ? () => {
1688
1688
  s(), N.read(() => {
@@ -1763,10 +1763,10 @@ class yo {
1763
1763
  */
1764
1764
  getVelocity() {
1765
1765
  const t = B.now();
1766
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > gn)
1766
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > vn)
1767
1767
  return 0;
1768
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, gn);
1769
- return Wn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1768
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, vn);
1769
+ return Hn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1770
1770
  }
1771
1771
  /**
1772
1772
  * Registers a new animation to control this `MotionValue`. Only one
@@ -1818,16 +1818,16 @@ class yo {
1818
1818
  (t = this.dependents) == null || t.clear(), (n = this.events.destroy) == null || n.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1819
1819
  }
1820
1820
  }
1821
- function Be(e, t) {
1821
+ function Ne(e, t) {
1822
1822
  return new yo(e, t);
1823
1823
  }
1824
- const { schedule: bo } = /* @__PURE__ */ Jn(queueMicrotask, !1), vo = {
1824
+ const { schedule: bo } = /* @__PURE__ */ ts(queueMicrotask, !1), vo = {
1825
1825
  y: !1
1826
1826
  };
1827
1827
  function To() {
1828
1828
  return vo.y;
1829
1829
  }
1830
- function As(e, t) {
1830
+ function Ps(e, t) {
1831
1831
  const n = po(e), s = new AbortController(), r = {
1832
1832
  passive: !0,
1833
1833
  ...t,
@@ -1835,18 +1835,18 @@ function As(e, t) {
1835
1835
  };
1836
1836
  return [n, r, () => s.abort()];
1837
1837
  }
1838
- function yn(e) {
1838
+ function Tn(e) {
1839
1839
  return !(e.pointerType === "touch" || To());
1840
1840
  }
1841
1841
  function wo(e, t, n = {}) {
1842
- const [s, r, i] = As(e, n), o = (a) => {
1843
- if (!yn(a))
1842
+ const [s, r, i] = Ps(e, n), o = (a) => {
1843
+ if (!Tn(a))
1844
1844
  return;
1845
1845
  const { target: c } = a, u = t(c, a);
1846
1846
  if (typeof u != "function" || !c)
1847
1847
  return;
1848
1848
  const l = (d) => {
1849
- yn(d) && (u(d), c.removeEventListener("pointerleave", l));
1849
+ Tn(d) && (u(d), c.removeEventListener("pointerleave", l));
1850
1850
  };
1851
1851
  c.addEventListener("pointerleave", l, r);
1852
1852
  };
@@ -1854,7 +1854,7 @@ function wo(e, t, n = {}) {
1854
1854
  a.addEventListener("pointerenter", o, r);
1855
1855
  }), i;
1856
1856
  }
1857
- const Ms = (e, t) => t ? e === t ? !0 : Ms(e, t.parentElement) : !1, xo = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, So = /* @__PURE__ */ new Set([
1857
+ const Rs = (e, t) => t ? e === t ? !0 : Rs(e, t.parentElement) : !1, xo = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, So = /* @__PURE__ */ new Set([
1858
1858
  "BUTTON",
1859
1859
  "INPUT",
1860
1860
  "SELECT",
@@ -1864,43 +1864,43 @@ const Ms = (e, t) => t ? e === t ? !0 : Ms(e, t.parentElement) : !1, xo = (e) =>
1864
1864
  function Vo(e) {
1865
1865
  return So.has(e.tagName) || e.tabIndex !== -1;
1866
1866
  }
1867
- const De = /* @__PURE__ */ new WeakSet();
1868
- function bn(e) {
1867
+ const Ie = /* @__PURE__ */ new WeakSet();
1868
+ function wn(e) {
1869
1869
  return (t) => {
1870
1870
  t.key === "Enter" && e(t);
1871
1871
  };
1872
1872
  }
1873
- function Xe(e, t) {
1873
+ function Ze(e, t) {
1874
1874
  e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
1875
1875
  }
1876
1876
  const Co = (e, t) => {
1877
1877
  const n = e.currentTarget;
1878
1878
  if (!n)
1879
1879
  return;
1880
- const s = bn(() => {
1881
- if (De.has(n))
1880
+ const s = wn(() => {
1881
+ if (Ie.has(n))
1882
1882
  return;
1883
- Xe(n, "down");
1884
- const r = bn(() => {
1885
- Xe(n, "up");
1886
- }), i = () => Xe(n, "cancel");
1883
+ Ze(n, "down");
1884
+ const r = wn(() => {
1885
+ Ze(n, "up");
1886
+ }), i = () => Ze(n, "cancel");
1887
1887
  n.addEventListener("keyup", r, t), n.addEventListener("blur", i, t);
1888
1888
  });
1889
1889
  n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
1890
1890
  };
1891
- function vn(e) {
1891
+ function xn(e) {
1892
1892
  return xo(e) && !0;
1893
1893
  }
1894
1894
  function Ao(e, t, n = {}) {
1895
- const [s, r, i] = As(e, n), o = (a) => {
1895
+ const [s, r, i] = Ps(e, n), o = (a) => {
1896
1896
  const c = a.currentTarget;
1897
- if (!vn(a))
1897
+ if (!xn(a))
1898
1898
  return;
1899
- De.add(c);
1899
+ Ie.add(c);
1900
1900
  const u = t(c, a), l = (h, m) => {
1901
- window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), De.has(c) && De.delete(c), vn(h) && typeof u == "function" && u(h, { success: m });
1901
+ window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Ie.has(c) && Ie.delete(c), xn(h) && typeof u == "function" && u(h, { success: m });
1902
1902
  }, d = (h) => {
1903
- l(h, c === window || c === document || n.useGlobalTarget || Ms(c, h.target));
1903
+ l(h, c === window || c === document || n.useGlobalTarget || Rs(c, h.target));
1904
1904
  }, f = (h) => {
1905
1905
  l(h, !1);
1906
1906
  };
@@ -1910,11 +1910,11 @@ function Ao(e, t, n = {}) {
1910
1910
  (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, r), mo(a) && (a.addEventListener("focus", (u) => Co(u, r)), !Vo(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
1911
1911
  }), i;
1912
1912
  }
1913
- const I = (e) => !!(e && e.getVelocity), Mo = [...xs, F, he], Po = (e) => Mo.find(ws(e)), Ps = ue({
1913
+ const E = (e) => !!(e && e.getVelocity), Mo = [...Vs, R, he], Po = (e) => Mo.find(Ss(e)), Fs = ue({
1914
1914
  transformPagePoint: (e) => e,
1915
1915
  isStatic: !1,
1916
1916
  reducedMotion: "never"
1917
- }), Nt = ue({ strict: !1 }), Tn = {
1917
+ }), Wt = ue({ strict: !1 }), Sn = {
1918
1918
  animation: [
1919
1919
  "animate",
1920
1920
  "variants",
@@ -1934,33 +1934,33 @@ const I = (e) => !!(e && e.getVelocity), Mo = [...xs, F, he], Po = (e) => Mo.fin
1934
1934
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
1935
1935
  layout: ["layout", "layoutId"]
1936
1936
  }, ce = {};
1937
- for (const e in Tn)
1937
+ for (const e in Sn)
1938
1938
  ce[e] = {
1939
- isEnabled: (t) => Tn[e].some((n) => !!t[n])
1939
+ isEnabled: (t) => Sn[e].some((n) => !!t[n])
1940
1940
  };
1941
- function wn(e) {
1941
+ function Vn(e) {
1942
1942
  for (const t in e)
1943
1943
  ce[t] = {
1944
1944
  ...ce[t],
1945
1945
  ...e[t]
1946
1946
  };
1947
1947
  }
1948
- function Fo({ children: e, features: t, strict: n = !1 }) {
1949
- const [, s] = dr(!qe(t)), r = ve(void 0);
1950
- if (!qe(t)) {
1948
+ function Ro({ children: e, features: t, strict: n = !1 }) {
1949
+ const [, s] = dr(!Je(t)), r = ve(void 0);
1950
+ if (!Je(t)) {
1951
1951
  const { renderer: i, ...o } = t;
1952
- r.current = i, wn(o);
1952
+ r.current = i, Vn(o);
1953
1953
  }
1954
- return xt(() => {
1955
- qe(t) && t().then(({ renderer: i, ...o }) => {
1956
- wn(o), r.current = i, s(!0);
1954
+ return At(() => {
1955
+ Je(t) && t().then(({ renderer: i, ...o }) => {
1956
+ Vn(o), r.current = i, s(!0);
1957
1957
  });
1958
- }, []), T(Nt.Provider, { value: { renderer: r.current, strict: n }, children: e });
1958
+ }, []), T(Wt.Provider, { value: { renderer: r.current, strict: n }, children: e });
1959
1959
  }
1960
- function qe(e) {
1960
+ function Je(e) {
1961
1961
  return typeof e == "function";
1962
1962
  }
1963
- const Ro = /* @__PURE__ */ new Set([
1963
+ const Fo = /* @__PURE__ */ new Set([
1964
1964
  "animate",
1965
1965
  "exit",
1966
1966
  "variants",
@@ -1992,12 +1992,12 @@ const Ro = /* @__PURE__ */ new Set([
1992
1992
  "ignoreStrict",
1993
1993
  "viewport"
1994
1994
  ]);
1995
- function Le(e) {
1996
- return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Ro.has(e);
1995
+ function Ke(e) {
1996
+ return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Fo.has(e);
1997
1997
  }
1998
- let Fs = (e) => !Le(e);
1998
+ let Ds = (e) => !Ke(e);
1999
1999
  function Do(e) {
2000
- typeof e == "function" && (Fs = (t) => t.startsWith("on") ? !Le(t) : e(t));
2000
+ typeof e == "function" && (Ds = (t) => t.startsWith("on") ? !Ke(t) : e(t));
2001
2001
  }
2002
2002
  try {
2003
2003
  Do(require("@emotion/is-prop-valid").default);
@@ -2006,18 +2006,18 @@ try {
2006
2006
  function Oo(e, t, n) {
2007
2007
  const s = {};
2008
2008
  for (const r in e)
2009
- r === "values" && typeof e.values == "object" || (Fs(r) || n === !0 && Le(r) || !t && !Le(r) || // If trying to use native HTML drag events, forward drag listeners
2009
+ r === "values" && typeof e.values == "object" || (Ds(r) || n === !0 && Ke(r) || !t && !Ke(r) || // If trying to use native HTML drag events, forward drag listeners
2010
2010
  e.draggable && r.startsWith("onDrag")) && (s[r] = e[r]);
2011
2011
  return s;
2012
2012
  }
2013
- const We = /* @__PURE__ */ ue({});
2014
- function _e(e) {
2013
+ const He = /* @__PURE__ */ ue({});
2014
+ function Ge(e) {
2015
2015
  return e !== null && typeof e == "object" && typeof e.start == "function";
2016
2016
  }
2017
2017
  function Ve(e) {
2018
2018
  return typeof e == "string" || Array.isArray(e);
2019
2019
  }
2020
- const Kt = [
2020
+ const _t = [
2021
2021
  "animate",
2022
2022
  "whileInView",
2023
2023
  "whileFocus",
@@ -2025,15 +2025,15 @@ const Kt = [
2025
2025
  "whileTap",
2026
2026
  "whileDrag",
2027
2027
  "exit"
2028
- ], $t = ["initial", ...Kt];
2029
- function He(e) {
2030
- return _e(e.animate) || $t.some((t) => Ve(e[t]));
2028
+ ], Ht = ["initial", ..._t];
2029
+ function Ue(e) {
2030
+ return Ge(e.animate) || Ht.some((t) => Ve(e[t]));
2031
2031
  }
2032
- function Rs(e) {
2033
- return !!(He(e) || e.variants);
2032
+ function Os(e) {
2033
+ return !!(Ue(e) || e.variants);
2034
2034
  }
2035
2035
  function Io(e, t) {
2036
- if (He(e)) {
2036
+ if (Ue(e)) {
2037
2037
  const { initial: n, animate: s } = e;
2038
2038
  return {
2039
2039
  initial: n === !1 || Ve(n) ? n : void 0,
@@ -2043,14 +2043,14 @@ function Io(e, t) {
2043
2043
  return e.inherit !== !1 ? t : {};
2044
2044
  }
2045
2045
  function Eo(e) {
2046
- const { initial: t, animate: n } = Io(e, L(We));
2047
- return Ke(() => ({ initial: t, animate: n }), [xn(t), xn(n)]);
2046
+ const { initial: t, animate: n } = Io(e, L(He));
2047
+ return je(() => ({ initial: t, animate: n }), [Cn(t), Cn(n)]);
2048
2048
  }
2049
- function xn(e) {
2049
+ function Cn(e) {
2050
2050
  return Array.isArray(e) ? e.join(" ") : e;
2051
2051
  }
2052
2052
  const ko = {};
2053
- function Ds(e, { layout: t, layoutId: n }) {
2053
+ function Is(e, { layout: t, layoutId: n }) {
2054
2054
  return me.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!ko[e] || e === "opacity");
2055
2055
  }
2056
2056
  const Bo = {
@@ -2067,7 +2067,7 @@ function No(e, t, n) {
2067
2067
  continue;
2068
2068
  let c = !0;
2069
2069
  if (typeof a == "number" ? c = a === (o.startsWith("scale") ? 1 : 0) : c = parseFloat(a) === 0, !c || n) {
2070
- const u = Cs(a, Lt[o]);
2070
+ const u = Ms(a, jt[o]);
2071
2071
  if (!c) {
2072
2072
  r = !1;
2073
2073
  const l = Bo[o] || o;
@@ -2078,7 +2078,7 @@ function No(e, t, n) {
2078
2078
  }
2079
2079
  return s = s.trim(), n ? s = n(t, r ? "" : s) : r && (s = "none"), s;
2080
2080
  }
2081
- function jt(e, t, n) {
2081
+ function Gt(e, t, n) {
2082
2082
  const { style: s, vars: r, transformOrigin: i } = e;
2083
2083
  let o = !1, a = !1;
2084
2084
  for (const c in t) {
@@ -2086,11 +2086,11 @@ function jt(e, t, n) {
2086
2086
  if (me.has(c)) {
2087
2087
  o = !0;
2088
2088
  continue;
2089
- } else if (ts(c)) {
2089
+ } else if (ss(c)) {
2090
2090
  r[c] = u;
2091
2091
  continue;
2092
2092
  } else {
2093
- const l = Cs(u, Lt[c]);
2093
+ const l = Ms(u, jt[c]);
2094
2094
  c.startsWith("origin") ? (a = !0, i[c] = l) : s[c] = l;
2095
2095
  }
2096
2096
  }
@@ -2099,25 +2099,25 @@ function jt(e, t, n) {
2099
2099
  s.transformOrigin = `${c} ${u} ${l}`;
2100
2100
  }
2101
2101
  }
2102
- const Wt = () => ({
2102
+ const Ut = () => ({
2103
2103
  style: {},
2104
2104
  transform: {},
2105
2105
  transformOrigin: {},
2106
2106
  vars: {}
2107
2107
  });
2108
- function Os(e, t, n) {
2108
+ function Es(e, t, n) {
2109
2109
  for (const s in t)
2110
- !I(t[s]) && !Ds(s, n) && (e[s] = t[s]);
2110
+ !E(t[s]) && !Is(s, n) && (e[s] = t[s]);
2111
2111
  }
2112
2112
  function Ko({ transformTemplate: e }, t) {
2113
- return Ke(() => {
2114
- const n = Wt();
2115
- return jt(n, t, e), Object.assign({}, n.vars, n.style);
2113
+ return je(() => {
2114
+ const n = Ut();
2115
+ return Gt(n, t, e), Object.assign({}, n.vars, n.style);
2116
2116
  }, [t]);
2117
2117
  }
2118
2118
  function $o(e, t) {
2119
2119
  const n = e.style || {}, s = {};
2120
- return Os(s, n, e), Object.assign(s, Ko(e, t)), s;
2120
+ return Es(s, n, e), Object.assign(s, Ko(e, t)), s;
2121
2121
  }
2122
2122
  function jo(e, t) {
2123
2123
  const n = {}, s = $o(e, t);
@@ -2137,7 +2137,7 @@ function Ho(e, t, n = 1, s = 0, r = !0) {
2137
2137
  const o = w.transform(t), a = w.transform(n);
2138
2138
  e[i.array] = `${o} ${a}`;
2139
2139
  }
2140
- function Is(e, {
2140
+ function ks(e, {
2141
2141
  attrX: t,
2142
2142
  attrY: n,
2143
2143
  attrScale: s,
@@ -2147,7 +2147,7 @@ function Is(e, {
2147
2147
  // This is object creation, which we try to avoid per-frame.
2148
2148
  ...a
2149
2149
  }, c, u, l) {
2150
- if (jt(e, a, u), c) {
2150
+ if (Gt(e, a, u), c) {
2151
2151
  e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
2152
2152
  return;
2153
2153
  }
@@ -2155,21 +2155,21 @@ function Is(e, {
2155
2155
  const { attrs: d, style: f } = e;
2156
2156
  d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = (l == null ? void 0 : l.transformBox) ?? "fill-box", delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), r !== void 0 && Ho(d, r, i, o, !1);
2157
2157
  }
2158
- const Es = () => ({
2159
- ...Wt(),
2158
+ const Bs = () => ({
2159
+ ...Ut(),
2160
2160
  attrs: {}
2161
- }), ks = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2161
+ }), Ls = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2162
2162
  function Go(e, t, n, s) {
2163
- const r = Ke(() => {
2164
- const i = Es();
2165
- return Is(i, t, ks(s), e.transformTemplate, e.style), {
2163
+ const r = je(() => {
2164
+ const i = Bs();
2165
+ return ks(i, t, Ls(s), e.transformTemplate, e.style), {
2166
2166
  ...i.attrs,
2167
2167
  style: { ...i.style }
2168
2168
  };
2169
2169
  }, [t]);
2170
2170
  if (e.style) {
2171
2171
  const i = {};
2172
- Os(i, e.style, e), r.style = { ...i, ...r.style };
2172
+ Es(i, e.style, e), r.style = { ...i, ...r.style };
2173
2173
  }
2174
2174
  return r;
2175
2175
  }
@@ -2200,7 +2200,7 @@ const Uo = [
2200
2200
  "use",
2201
2201
  "view"
2202
2202
  ];
2203
- function _t(e) {
2203
+ function zt(e) {
2204
2204
  return (
2205
2205
  /**
2206
2206
  * If it's not a string, it's a custom React component. Currently we only support
@@ -2221,31 +2221,31 @@ function _t(e) {
2221
2221
  );
2222
2222
  }
2223
2223
  function zo(e, t, n, { latestValues: s }, r, i = !1) {
2224
- const a = (_t(e) ? Go : jo)(t, s, r, e), c = Oo(t, typeof e == "string", i), u = e !== En ? { ...c, ...a, ref: n } : {}, { children: l } = t, d = Ke(() => I(l) ? l.get() : l, [l]);
2224
+ const a = (zt(e) ? Go : jo)(t, s, r, e), c = Oo(t, typeof e == "string", i), u = e !== Bn ? { ...c, ...a, ref: n } : {}, { children: l } = t, d = je(() => E(l) ? l.get() : l, [l]);
2225
2225
  return hr(e, {
2226
2226
  ...u,
2227
2227
  children: d
2228
2228
  });
2229
2229
  }
2230
- function Sn(e) {
2230
+ function An(e) {
2231
2231
  const t = [{}, {}];
2232
2232
  return e == null || e.values.forEach((n, s) => {
2233
2233
  t[0][s] = n.get(), t[1][s] = n.getVelocity();
2234
2234
  }), t;
2235
2235
  }
2236
- function Ht(e, t, n, s) {
2236
+ function Yt(e, t, n, s) {
2237
2237
  if (typeof t == "function") {
2238
- const [r, i] = Sn(s);
2238
+ const [r, i] = An(s);
2239
2239
  t = t(n !== void 0 ? n : e.custom, r, i);
2240
2240
  }
2241
2241
  if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
2242
- const [r, i] = Sn(s);
2242
+ const [r, i] = An(s);
2243
2243
  t = t(n !== void 0 ? n : e.custom, r, i);
2244
2244
  }
2245
2245
  return t;
2246
2246
  }
2247
2247
  function Yo(e) {
2248
- return I(e) ? e.get() : e;
2248
+ return E(e) ? e.get() : e;
2249
2249
  }
2250
2250
  function Xo({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, r) {
2251
2251
  return {
@@ -2258,22 +2258,22 @@ function qo(e, t, n, s) {
2258
2258
  for (const f in i)
2259
2259
  r[f] = Yo(i[f]);
2260
2260
  let { initial: o, animate: a } = e;
2261
- const c = He(e), u = Rs(e);
2261
+ const c = Ue(e), u = Os(e);
2262
2262
  t && u && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), a === void 0 && (a = t.animate));
2263
2263
  let l = n ? n.initial === !1 : !1;
2264
2264
  l = l || o === !1;
2265
2265
  const d = l ? a : o;
2266
- if (d && typeof d != "boolean" && !_e(d)) {
2266
+ if (d && typeof d != "boolean" && !Ge(d)) {
2267
2267
  const f = Array.isArray(d) ? d : [d];
2268
2268
  for (let h = 0; h < f.length; h++) {
2269
- const m = Ht(e, f[h]);
2269
+ const m = Yt(e, f[h]);
2270
2270
  if (m) {
2271
- const { transitionEnd: g, transition: y, ...p } = m;
2271
+ const { transitionEnd: g, transition: b, ...p } = m;
2272
2272
  for (const x in p) {
2273
2273
  let v = p[x];
2274
2274
  if (Array.isArray(v)) {
2275
- const A = l ? v.length - 1 : 0;
2276
- v = v[A];
2275
+ const C = l ? v.length - 1 : 0;
2276
+ v = v[C];
2277
2277
  }
2278
2278
  v !== null && (r[x] = v);
2279
2279
  }
@@ -2284,41 +2284,41 @@ function qo(e, t, n, s) {
2284
2284
  }
2285
2285
  return r;
2286
2286
  }
2287
- const Bs = (e) => (t, n) => {
2288
- const s = L(We), r = L(Ln), i = () => Xo(e, t, s, r);
2287
+ const Ns = (e) => (t, n) => {
2288
+ const s = L(He), r = L(Kn), i = () => Xo(e, t, s, r);
2289
2289
  return n ? i() : Sr(i);
2290
2290
  };
2291
- function Gt(e, t, n) {
2291
+ function Xt(e, t, n) {
2292
2292
  var i;
2293
2293
  const { style: s } = e, r = {};
2294
2294
  for (const o in s)
2295
- (I(s[o]) || t.style && I(t.style[o]) || Ds(o, e) || ((i = n == null ? void 0 : n.getValue(o)) == null ? void 0 : i.liveStyle) !== void 0) && (r[o] = s[o]);
2295
+ (E(s[o]) || t.style && E(t.style[o]) || Is(o, e) || ((i = n == null ? void 0 : n.getValue(o)) == null ? void 0 : i.liveStyle) !== void 0) && (r[o] = s[o]);
2296
2296
  return r;
2297
2297
  }
2298
- const Qo = /* @__PURE__ */ Bs({
2299
- scrapeMotionValuesFromProps: Gt,
2300
- createRenderState: Wt
2298
+ const Qo = /* @__PURE__ */ Ns({
2299
+ scrapeMotionValuesFromProps: Xt,
2300
+ createRenderState: Ut
2301
2301
  });
2302
- function Ls(e, t, n) {
2303
- const s = Gt(e, t, n);
2302
+ function Ks(e, t, n) {
2303
+ const s = Xt(e, t, n);
2304
2304
  for (const r in e)
2305
- if (I(e[r]) || I(t[r])) {
2305
+ if (E(e[r]) || E(t[r])) {
2306
2306
  const i = pe.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
2307
2307
  s[i] = e[r];
2308
2308
  }
2309
2309
  return s;
2310
2310
  }
2311
- const Zo = /* @__PURE__ */ Bs({
2312
- scrapeMotionValuesFromProps: Ls,
2313
- createRenderState: Es
2311
+ const Zo = /* @__PURE__ */ Ns({
2312
+ scrapeMotionValuesFromProps: Ks,
2313
+ createRenderState: Bs
2314
2314
  }), Jo = Symbol.for("motionComponentSymbol");
2315
- function Ns(e) {
2315
+ function $s(e) {
2316
2316
  return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
2317
2317
  }
2318
2318
  function ea(e, t, n) {
2319
2319
  return pr(
2320
2320
  (s) => {
2321
- s && e.onMount && e.onMount(s), t && (s ? t.mount(s) : t.unmount()), n && (typeof n == "function" ? n(s) : Ns(n) && (n.current = s));
2321
+ s && e.onMount && e.onMount(s), t && (s ? t.mount(s) : t.unmount()), n && (typeof n == "function" ? n(s) : $s(n) && (n.current = s));
2322
2322
  },
2323
2323
  /**
2324
2324
  * Only pass a new ref callback to React if we've received a visual element
@@ -2328,10 +2328,10 @@ function ea(e, t, n) {
2328
2328
  [t]
2329
2329
  );
2330
2330
  }
2331
- const Ut = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ta = "framerAppearId", Ks = "data-" + Ut(ta), na = ue({});
2331
+ const qt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ta = "framerAppearId", js = "data-" + qt(ta), na = ue({});
2332
2332
  function sa(e, t, n, s, r) {
2333
- var g, y;
2334
- const { visualElement: i } = L(We), o = L(Nt), a = L(Ln), c = L(Ps).reducedMotion, u = ve(null);
2333
+ var g, b;
2334
+ const { visualElement: i } = L(He), o = L(Wt), a = L(Kn), c = L(Fs).reducedMotion, u = ve(null);
2335
2335
  s = s || o.renderer, !u.current && s && (u.current = s(e, {
2336
2336
  visualState: t,
2337
2337
  parent: i,
@@ -2346,10 +2346,10 @@ function sa(e, t, n, s, r) {
2346
2346
  mr(() => {
2347
2347
  l && f.current && l.update(n, a);
2348
2348
  });
2349
- const h = n[Ks], m = ve(!!h && !((g = window.MotionHandoffIsComplete) != null && g.call(window, h)) && ((y = window.MotionHasOptimisedAnimation) == null ? void 0 : y.call(window, h)));
2349
+ const h = n[js], m = ve(!!h && !((g = window.MotionHandoffIsComplete) != null && g.call(window, h)) && ((b = window.MotionHasOptimisedAnimation) == null ? void 0 : b.call(window, h)));
2350
2350
  return Vr(() => {
2351
2351
  l && (f.current = !0, window.MotionIsMounted = !0, l.updateFeatures(), l.scheduleRenderMicrotask(), m.current && l.animationState && l.animationState.animateChanges());
2352
- }), xt(() => {
2352
+ }), At(() => {
2353
2353
  l && (!m.current && l.animationState && l.animationState.animateChanges(), m.current && (queueMicrotask(() => {
2354
2354
  var p;
2355
2355
  (p = window.MotionHandoffMarkAsComplete) == null || p.call(window, h);
@@ -2358,10 +2358,10 @@ function sa(e, t, n, s, r) {
2358
2358
  }
2359
2359
  function ra(e, t, n, s) {
2360
2360
  const { layoutId: r, layout: i, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: u, layoutCrossfade: l } = t;
2361
- e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : $s(e.parent)), e.projection.setOptions({
2361
+ e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Ws(e.parent)), e.projection.setOptions({
2362
2362
  layoutId: r,
2363
2363
  layout: i,
2364
- alwaysMeasureLayout: !!o || a && Ns(a),
2364
+ alwaysMeasureLayout: !!o || a && $s(a),
2365
2365
  visualElement: e,
2366
2366
  /**
2367
2367
  * TODO: Update options in an effect. This could be tricky as it'll be too late
@@ -2377,25 +2377,25 @@ function ra(e, t, n, s) {
2377
2377
  layoutRoot: u
2378
2378
  });
2379
2379
  }
2380
- function $s(e) {
2380
+ function Ws(e) {
2381
2381
  if (e)
2382
- return e.options.allowProjection !== !1 ? e.projection : $s(e.parent);
2382
+ return e.options.allowProjection !== !1 ? e.projection : Ws(e.parent);
2383
2383
  }
2384
2384
  function ia(e, { forwardMotionProps: t = !1 } = {}, n, s) {
2385
- const r = _t(e) ? Zo : Qo;
2385
+ const r = zt(e) ? Zo : Qo;
2386
2386
  function i(a, c) {
2387
2387
  let u;
2388
2388
  const l = {
2389
- ...L(Ps),
2389
+ ...L(Fs),
2390
2390
  ...a,
2391
2391
  layoutId: oa(a)
2392
2392
  }, { isStatic: d } = l, f = Eo(a), h = r(a, d);
2393
- if (!d && Vt) {
2393
+ if (!d && Pt) {
2394
2394
  aa(l, n);
2395
2395
  const m = ca(l);
2396
2396
  u = m.MeasureLayout, f.visualElement = sa(e, h, l, s, m.ProjectionNode);
2397
2397
  }
2398
- return G(We.Provider, { value: f, children: [u && f.visualElement ? T(u, { visualElement: f.visualElement, ...l }) : null, zo(e, a, ea(h, f.visualElement, c), h, d, t)] });
2398
+ return U(He.Provider, { value: f, children: [u && f.visualElement ? T(u, { visualElement: f.visualElement, ...l }) : null, zo(e, a, ea(h, f.visualElement, c), h, d, t)] });
2399
2399
  }
2400
2400
  i.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
2401
2401
  const o = gr(i);
@@ -2406,7 +2406,7 @@ function oa({ layoutId: e }) {
2406
2406
  return t && e !== void 0 ? t + "-" + e : e;
2407
2407
  }
2408
2408
  function aa(e, t) {
2409
- L(Nt).strict, process.env.NODE_ENV;
2409
+ L(Wt).strict, process.env.NODE_ENV;
2410
2410
  }
2411
2411
  function ca(e) {
2412
2412
  const { drag: t, layout: n } = ce;
@@ -2438,40 +2438,40 @@ function ua(e, t) {
2438
2438
  function fa(e, t) {
2439
2439
  return la(ua(e.getBoundingClientRect(), t));
2440
2440
  }
2441
- const Vn = () => ({ min: 0, max: 0 }), js = () => ({
2442
- x: Vn(),
2443
- y: Vn()
2444
- }), mt = { current: null }, Ws = { current: !1 };
2441
+ const Mn = () => ({ min: 0, max: 0 }), _s = () => ({
2442
+ x: Mn(),
2443
+ y: Mn()
2444
+ }), bt = { current: null }, Hs = { current: !1 };
2445
2445
  function da() {
2446
- if (Ws.current = !0, !!Vt)
2446
+ if (Hs.current = !0, !!Pt)
2447
2447
  if (window.matchMedia) {
2448
- const e = window.matchMedia("(prefers-reduced-motion)"), t = () => mt.current = e.matches;
2448
+ const e = window.matchMedia("(prefers-reduced-motion)"), t = () => bt.current = e.matches;
2449
2449
  e.addEventListener("change", t), t();
2450
2450
  } else
2451
- mt.current = !1;
2451
+ bt.current = !1;
2452
2452
  }
2453
2453
  const ha = /* @__PURE__ */ new WeakMap();
2454
2454
  function pa(e, t, n) {
2455
2455
  for (const s in t) {
2456
2456
  const r = t[s], i = n[s];
2457
- if (I(r))
2457
+ if (E(r))
2458
2458
  e.addValue(s, r);
2459
- else if (I(i))
2460
- e.addValue(s, Be(r, { owner: e }));
2459
+ else if (E(i))
2460
+ e.addValue(s, Ne(r, { owner: e }));
2461
2461
  else if (i !== r)
2462
2462
  if (e.hasValue(s)) {
2463
2463
  const o = e.getValue(s);
2464
2464
  o.liveStyle === !0 ? o.jump(r) : o.hasAnimated || o.set(r);
2465
2465
  } else {
2466
2466
  const o = e.getStaticValue(s);
2467
- e.addValue(s, Be(o !== void 0 ? o : r, { owner: e }));
2467
+ e.addValue(s, Ne(o !== void 0 ? o : r, { owner: e }));
2468
2468
  }
2469
2469
  }
2470
2470
  for (const s in n)
2471
2471
  t[s] === void 0 && e.removeValue(s);
2472
2472
  return t;
2473
2473
  }
2474
- const Cn = [
2474
+ const Pn = [
2475
2475
  "AnimationStart",
2476
2476
  "AnimationComplete",
2477
2477
  "Update",
@@ -2492,27 +2492,27 @@ class ma {
2492
2492
  return {};
2493
2493
  }
2494
2494
  constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: r, blockInitialAnimation: i, visualState: o }, a = {}) {
2495
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Bt, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2495
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = $t, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2496
2496
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2497
2497
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2498
2498
  const f = B.now();
2499
2499
  this.renderScheduledAt < f && (this.renderScheduledAt = f, N.render(this.render, !1, !0));
2500
2500
  };
2501
2501
  const { latestValues: c, renderState: u } = o;
2502
- this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = He(n), this.isVariantNode = Rs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2502
+ this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = Ue(n), this.isVariantNode = Os(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2503
2503
  const { willChange: l, ...d } = this.scrapeMotionValuesFromProps(n, {}, this);
2504
2504
  for (const f in d) {
2505
2505
  const h = d[f];
2506
- c[f] !== void 0 && I(h) && h.set(c[f]);
2506
+ c[f] !== void 0 && E(h) && h.set(c[f]);
2507
2507
  }
2508
2508
  }
2509
2509
  mount(t) {
2510
2510
  var n;
2511
- this.current = t, ha.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((s, r) => this.bindToMotionValue(r, s)), Ws.current || da(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : mt.current, process.env.NODE_ENV !== "production" && _n(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
2511
+ this.current = t, ha.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((s, r) => this.bindToMotionValue(r, s)), Hs.current || da(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : bt.current, process.env.NODE_ENV !== "production" && Gn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
2512
2512
  }
2513
2513
  unmount() {
2514
2514
  var t;
2515
- this.projection && this.projection.unmount(), tt(this.notifyUpdate), tt(this.render), this.valueSubscriptions.forEach((n) => n()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), (t = this.parent) == null || t.removeChild(this);
2515
+ this.projection && this.projection.unmount(), rt(this.notifyUpdate), rt(this.render), this.valueSubscriptions.forEach((n) => n()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), (t = this.parent) == null || t.removeChild(this);
2516
2516
  for (const n in this.events)
2517
2517
  this.events[n].clear();
2518
2518
  for (const n in this.features) {
@@ -2564,7 +2564,7 @@ class ma {
2564
2564
  * removed with a re-render to work.
2565
2565
  */
2566
2566
  measureViewportBox() {
2567
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : js();
2567
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : _s();
2568
2568
  }
2569
2569
  getStaticValue(t) {
2570
2570
  return this.latestValues[t];
@@ -2578,8 +2578,8 @@ class ma {
2578
2578
  */
2579
2579
  update(t, n) {
2580
2580
  (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2581
- for (let s = 0; s < Cn.length; s++) {
2582
- const r = Cn[s];
2581
+ for (let s = 0; s < Pn.length; s++) {
2582
+ const r = Pn[s];
2583
2583
  this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
2584
2584
  const i = "on" + r, o = t[i];
2585
2585
  o && (this.propEventSubscriptions[r] = this.on(r, o));
@@ -2640,7 +2640,7 @@ class ma {
2640
2640
  if (this.props.values && this.props.values[t])
2641
2641
  return this.props.values[t];
2642
2642
  let s = this.values.get(t);
2643
- return s === void 0 && n !== void 0 && (s = Be(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
2643
+ return s === void 0 && n !== void 0 && (s = Ne(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
2644
2644
  }
2645
2645
  /**
2646
2646
  * If we're trying to animate to a previously unencountered value,
@@ -2649,7 +2649,7 @@ class ma {
2649
2649
  */
2650
2650
  readValue(t, n) {
2651
2651
  let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
2652
- return s != null && (typeof s == "string" && (Nn(s) || Kn(s)) ? s = parseFloat(s) : !Po(s) && he.test(n) && (s = Vs(t, n)), this.setBaseTarget(t, I(s) ? s.get() : s)), I(s) ? s.get() : s;
2652
+ return s != null && (typeof s == "string" && ($n(s) || jn(s)) ? s = parseFloat(s) : !Po(s) && he.test(n) && (s = As(t, n)), this.setBaseTarget(t, E(s) ? s.get() : s)), E(s) ? s.get() : s;
2653
2653
  }
2654
2654
  /**
2655
2655
  * Set the base target to later animate back to. This is currently
@@ -2667,16 +2667,16 @@ class ma {
2667
2667
  const { initial: n } = this.props;
2668
2668
  let s;
2669
2669
  if (typeof n == "string" || typeof n == "object") {
2670
- const o = Ht(this.props, n, (i = this.presenceContext) == null ? void 0 : i.custom);
2670
+ const o = Yt(this.props, n, (i = this.presenceContext) == null ? void 0 : i.custom);
2671
2671
  o && (s = o[t]);
2672
2672
  }
2673
2673
  if (n && s !== void 0)
2674
2674
  return s;
2675
2675
  const r = this.getBaseTargetFromProps(this.props, t);
2676
- return r !== void 0 && !I(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
2676
+ return r !== void 0 && !E(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
2677
2677
  }
2678
2678
  on(t, n) {
2679
- return this.events[t] || (this.events[t] = new jn()), this.events[t].add(n);
2679
+ return this.events[t] || (this.events[t] = new _n()), this.events[t].add(n);
2680
2680
  }
2681
2681
  notify(t, ...n) {
2682
2682
  this.events[t] && this.events[t].notify(...n);
@@ -2685,7 +2685,7 @@ class ma {
2685
2685
  bo.render(this.render);
2686
2686
  }
2687
2687
  }
2688
- class _s extends ma {
2688
+ class Gs extends ma {
2689
2689
  constructor() {
2690
2690
  super(...arguments), this.KeyframeResolver = ho;
2691
2691
  }
@@ -2701,12 +2701,12 @@ class _s extends ma {
2701
2701
  handleChildMotionValue() {
2702
2702
  this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2703
2703
  const { children: t } = this.props;
2704
- I(t) && (this.childSubscription = t.on("change", (n) => {
2704
+ E(t) && (this.childSubscription = t.on("change", (n) => {
2705
2705
  this.current && (this.current.textContent = `${n}`);
2706
2706
  }));
2707
2707
  }
2708
2708
  }
2709
- function Hs(e, { style: t, vars: n }, s, r) {
2709
+ function Us(e, { style: t, vars: n }, s, r) {
2710
2710
  const i = e.style;
2711
2711
  let o;
2712
2712
  for (o in t)
@@ -2718,16 +2718,16 @@ function Hs(e, { style: t, vars: n }, s, r) {
2718
2718
  function ga(e) {
2719
2719
  return window.getComputedStyle(e);
2720
2720
  }
2721
- class ya extends _s {
2721
+ class ya extends Gs {
2722
2722
  constructor() {
2723
- super(...arguments), this.type = "html", this.renderInstance = Hs;
2723
+ super(...arguments), this.type = "html", this.renderInstance = Us;
2724
2724
  }
2725
2725
  readValueFromInstance(t, n) {
2726
2726
  var s;
2727
2727
  if (me.has(n))
2728
- return (s = this.projection) != null && s.isProjecting ? ct(n) : Ri(t, n);
2728
+ return (s = this.projection) != null && s.isProjecting ? ft(n) : Fi(t, n);
2729
2729
  {
2730
- const r = ga(t), i = (ts(n) ? r.getPropertyValue(n) : r[n]) || 0;
2730
+ const r = ga(t), i = (ss(n) ? r.getPropertyValue(n) : r[n]) || 0;
2731
2731
  return typeof i == "string" ? i.trim() : i;
2732
2732
  }
2733
2733
  }
@@ -2735,13 +2735,13 @@ class ya extends _s {
2735
2735
  return fa(t, n);
2736
2736
  }
2737
2737
  build(t, n, s) {
2738
- jt(t, n, s.transformTemplate);
2738
+ Gt(t, n, s.transformTemplate);
2739
2739
  }
2740
2740
  scrapeMotionValuesFromProps(t, n, s) {
2741
- return Gt(t, n, s);
2741
+ return Xt(t, n, s);
2742
2742
  }
2743
2743
  }
2744
- const Gs = /* @__PURE__ */ new Set([
2744
+ const zs = /* @__PURE__ */ new Set([
2745
2745
  "baseFrequency",
2746
2746
  "diffuseConstant",
2747
2747
  "kernelMatrix",
@@ -2767,50 +2767,50 @@ const Gs = /* @__PURE__ */ new Set([
2767
2767
  "lengthAdjust"
2768
2768
  ]);
2769
2769
  function ba(e, t, n, s) {
2770
- Hs(e, t, void 0, s);
2770
+ Us(e, t, void 0, s);
2771
2771
  for (const r in t.attrs)
2772
- e.setAttribute(Gs.has(r) ? r : Ut(r), t.attrs[r]);
2772
+ e.setAttribute(zs.has(r) ? r : qt(r), t.attrs[r]);
2773
2773
  }
2774
- class va extends _s {
2774
+ class va extends Gs {
2775
2775
  constructor() {
2776
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = js;
2776
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = _s;
2777
2777
  }
2778
2778
  getBaseTargetFromProps(t, n) {
2779
2779
  return t[n];
2780
2780
  }
2781
2781
  readValueFromInstance(t, n) {
2782
2782
  if (me.has(n)) {
2783
- const s = Ss(n);
2783
+ const s = Cs(n);
2784
2784
  return s && s.default || 0;
2785
2785
  }
2786
- return n = Gs.has(n) ? n : Ut(n), t.getAttribute(n);
2786
+ return n = zs.has(n) ? n : qt(n), t.getAttribute(n);
2787
2787
  }
2788
2788
  scrapeMotionValuesFromProps(t, n, s) {
2789
- return Ls(t, n, s);
2789
+ return Ks(t, n, s);
2790
2790
  }
2791
2791
  build(t, n, s) {
2792
- Is(t, n, this.isSVGTag, s.transformTemplate, s.style);
2792
+ ks(t, n, this.isSVGTag, s.transformTemplate, s.style);
2793
2793
  }
2794
2794
  renderInstance(t, n, s, r) {
2795
2795
  ba(t, n, s, r);
2796
2796
  }
2797
2797
  mount(t) {
2798
- this.isSVGTag = ks(t.tagName), super.mount(t);
2798
+ this.isSVGTag = Ls(t.tagName), super.mount(t);
2799
2799
  }
2800
2800
  }
2801
- const Ta = (e, t) => _t(e) ? new va(t) : new ya(t, {
2802
- allowProjection: e !== En
2801
+ const Ta = (e, t) => zt(e) ? new va(t) : new ya(t, {
2802
+ allowProjection: e !== Bn
2803
2803
  });
2804
2804
  function oe(e, t, n) {
2805
2805
  const s = e.getProps();
2806
- return Ht(s, t, n !== void 0 ? n : s.custom, e);
2806
+ return Yt(s, t, n !== void 0 ? n : s.custom, e);
2807
2807
  }
2808
- const gt = (e) => Array.isArray(e);
2808
+ const vt = (e) => Array.isArray(e);
2809
2809
  function wa(e, t, n) {
2810
- e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Be(n));
2810
+ e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Ne(n));
2811
2811
  }
2812
2812
  function xa(e) {
2813
- return gt(e) ? e[e.length - 1] || 0 : e;
2813
+ return vt(e) ? e[e.length - 1] || 0 : e;
2814
2814
  }
2815
2815
  function Sa(e, t) {
2816
2816
  const n = oe(e, t);
@@ -2822,31 +2822,31 @@ function Sa(e, t) {
2822
2822
  }
2823
2823
  }
2824
2824
  function Va(e) {
2825
- return !!(I(e) && e.add);
2825
+ return !!(E(e) && e.add);
2826
2826
  }
2827
2827
  function Ca(e, t) {
2828
2828
  const n = e.getValue("willChange");
2829
2829
  if (Va(n))
2830
2830
  return n.add(t);
2831
- if (!n && W.WillChange) {
2832
- const s = new W.WillChange("auto");
2831
+ if (!n && _.WillChange) {
2832
+ const s = new _.WillChange("auto");
2833
2833
  e.addValue("willChange", s), s.add(t);
2834
2834
  }
2835
2835
  }
2836
2836
  function Aa(e) {
2837
- return e.props[Ks];
2837
+ return e.props[js];
2838
2838
  }
2839
2839
  const Ma = (e) => e !== null;
2840
2840
  function Pa(e, { repeat: t, repeatType: n = "loop" }, s) {
2841
2841
  const r = e.filter(Ma), i = t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
2842
2842
  return r[i];
2843
2843
  }
2844
- const Fa = {
2844
+ const Ra = {
2845
2845
  type: "spring",
2846
2846
  stiffness: 500,
2847
2847
  damping: 25,
2848
2848
  restSpeed: 10
2849
- }, Ra = (e) => ({
2849
+ }, Fa = (e) => ({
2850
2850
  type: "spring",
2851
2851
  stiffness: 550,
2852
2852
  damping: e === 0 ? 2 * Math.sqrt(550) : 30,
@@ -2858,14 +2858,14 @@ const Fa = {
2858
2858
  type: "keyframes",
2859
2859
  ease: [0.25, 0.1, 0.35, 1],
2860
2860
  duration: 0.3
2861
- }, Ia = (e, { keyframes: t }) => t.length > 2 ? Da : me.has(e) ? e.startsWith("scale") ? Ra(t[1]) : Fa : Oa;
2861
+ }, Ia = (e, { keyframes: t }) => t.length > 2 ? Da : me.has(e) ? e.startsWith("scale") ? Fa(t[1]) : Ra : Oa;
2862
2862
  function Ea({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: i, repeatType: o, repeatDelay: a, from: c, elapsed: u, ...l }) {
2863
2863
  return !!Object.keys(l).length;
2864
2864
  }
2865
2865
  const ka = (e, t, n, s = {}, r, i) => (o) => {
2866
- const a = vs(s, e) || {}, c = a.delay || s.delay || 0;
2866
+ const a = ws(s, e) || {}, c = a.delay || s.delay || 0;
2867
2867
  let { elapsed: u = 0 } = s;
2868
- u = u - /* @__PURE__ */ K(c);
2868
+ u = u - /* @__PURE__ */ j(c);
2869
2869
  const l = {
2870
2870
  keyframes: Array.isArray(n) ? n : [null, n],
2871
2871
  ease: "easeOut",
@@ -2882,9 +2882,9 @@ const ka = (e, t, n, s = {}, r, i) => (o) => {
2882
2882
  motionValue: t,
2883
2883
  element: i ? void 0 : r
2884
2884
  };
2885
- Ea(a) || Object.assign(l, Ia(e, l)), l.duration && (l.duration = /* @__PURE__ */ K(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ K(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
2885
+ Ea(a) || Object.assign(l, Ia(e, l)), l.duration && (l.duration = /* @__PURE__ */ j(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ j(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
2886
2886
  let d = !1;
2887
- if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (ht(l), l.delay === 0 && (d = !0)), (W.instantAnimations || W.skipAnimations) && (d = !0, ht(l), l.delay = 0), l.allowFlatten = !a.type && !a.ease, d && !i && t.get() !== void 0) {
2887
+ if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (gt(l), l.delay === 0 && (d = !0)), (_.instantAnimations || _.skipAnimations) && (d = !0, gt(l), l.delay = 0), l.allowFlatten = !a.type && !a.ease, d && !i && t.get() !== void 0) {
2888
2888
  const f = Pa(l.keyframes, a);
2889
2889
  if (f !== void 0) {
2890
2890
  N.update(() => {
@@ -2893,13 +2893,13 @@ const ka = (e, t, n, s = {}, r, i) => (o) => {
2893
2893
  return;
2894
2894
  }
2895
2895
  }
2896
- return a.isSync ? new kt(l) : new Ji(l);
2896
+ return a.isSync ? new Kt(l) : new Ji(l);
2897
2897
  };
2898
2898
  function Ba({ protectedKeys: e, needsAnimating: t }, n) {
2899
2899
  const s = e.hasOwnProperty(n) && t[n] !== !0;
2900
2900
  return t[n] = !1, s;
2901
2901
  }
2902
- function Us(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2902
+ function Ys(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2903
2903
  let { transition: i = e.getDefaultTransition(), transitionEnd: o, ...a } = t;
2904
2904
  s && (i = s);
2905
2905
  const c = [], u = r && e.animationState && e.animationState.getState()[r];
@@ -2909,7 +2909,7 @@ function Us(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2909
2909
  continue;
2910
2910
  const h = {
2911
2911
  delay: n,
2912
- ...vs(i || {}, l)
2912
+ ...ws(i || {}, l)
2913
2913
  }, m = d.get();
2914
2914
  if (m !== void 0 && !d.isAnimating && !Array.isArray(f) && f === m && !h.velocity)
2915
2915
  continue;
@@ -2921,9 +2921,9 @@ function Us(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2921
2921
  x !== null && (h.startTime = x, g = !0);
2922
2922
  }
2923
2923
  }
2924
- Ca(e, l), d.start(ka(l, d, f, e.shouldReduceMotion && Ts.has(l) ? { type: !1 } : h, e, g));
2925
- const y = d.animation;
2926
- y && c.push(y);
2924
+ Ca(e, l), d.start(ka(l, d, f, e.shouldReduceMotion && xs.has(l) ? { type: !1 } : h, e, g));
2925
+ const b = d.animation;
2926
+ b && c.push(b);
2927
2927
  }
2928
2928
  return o && Promise.all(c).then(() => {
2929
2929
  N.update(() => {
@@ -2931,16 +2931,16 @@ function Us(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2931
2931
  });
2932
2932
  }), c;
2933
2933
  }
2934
- function zs(e, t, n, s = 0, r = 1) {
2934
+ function Xs(e, t, n, s = 0, r = 1) {
2935
2935
  const i = Array.from(e).sort((u, l) => u.sortNodePosition(l)).indexOf(t), o = e.size, a = (o - 1) * s;
2936
2936
  return typeof n == "function" ? n(i, o) : r === 1 ? i * s : a - i * s;
2937
2937
  }
2938
- function yt(e, t, n = {}) {
2938
+ function Tt(e, t, n = {}) {
2939
2939
  var c;
2940
2940
  const s = oe(e, t, n.type === "exit" ? (c = e.presenceContext) == null ? void 0 : c.custom : void 0);
2941
2941
  let { transition: r = e.getDefaultTransition() || {} } = s || {};
2942
2942
  n.transitionOverride && (r = n.transitionOverride);
2943
- const i = s ? () => Promise.all(Us(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (u = 0) => {
2943
+ const i = s ? () => Promise.all(Ys(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (u = 0) => {
2944
2944
  const { delayChildren: l = 0, staggerChildren: d, staggerDirection: f } = r;
2945
2945
  return La(e, t, u, l, d, f, n);
2946
2946
  } : () => Promise.resolve(), { when: a } = r;
@@ -2953,9 +2953,9 @@ function yt(e, t, n = {}) {
2953
2953
  function La(e, t, n = 0, s = 0, r = 0, i = 1, o) {
2954
2954
  const a = [];
2955
2955
  for (const c of e.variantChildren)
2956
- c.notify("AnimationStart", t), a.push(yt(c, t, {
2956
+ c.notify("AnimationStart", t), a.push(Tt(c, t, {
2957
2957
  ...o,
2958
- delay: n + (typeof s == "function" ? 0 : s) + zs(e.variantChildren, c, s, r, i)
2958
+ delay: n + (typeof s == "function" ? 0 : s) + Xs(e.variantChildren, c, s, r, i)
2959
2959
  }).then(() => c.notify("AnimationComplete", t)));
2960
2960
  return Promise.all(a);
2961
2961
  }
@@ -2963,19 +2963,19 @@ function Na(e, t, n = {}) {
2963
2963
  e.notify("AnimationStart", t);
2964
2964
  let s;
2965
2965
  if (Array.isArray(t)) {
2966
- const r = t.map((i) => yt(e, i, n));
2966
+ const r = t.map((i) => Tt(e, i, n));
2967
2967
  s = Promise.all(r);
2968
2968
  } else if (typeof t == "string")
2969
- s = yt(e, t, n);
2969
+ s = Tt(e, t, n);
2970
2970
  else {
2971
2971
  const r = typeof t == "function" ? oe(e, t, n.custom) : t;
2972
- s = Promise.all(Us(e, r, n));
2972
+ s = Promise.all(Ys(e, r, n));
2973
2973
  }
2974
2974
  return s.then(() => {
2975
2975
  e.notify("AnimationComplete", t);
2976
2976
  });
2977
2977
  }
2978
- function Ys(e, t) {
2978
+ function qs(e, t) {
2979
2979
  if (!Array.isArray(t))
2980
2980
  return !1;
2981
2981
  const n = t.length;
@@ -2986,27 +2986,27 @@ function Ys(e, t) {
2986
2986
  return !1;
2987
2987
  return !0;
2988
2988
  }
2989
- const Ka = $t.length;
2990
- function Xs(e) {
2989
+ const Ka = Ht.length;
2990
+ function Qs(e) {
2991
2991
  if (!e)
2992
2992
  return;
2993
2993
  if (!e.isControllingVariants) {
2994
- const n = e.parent ? Xs(e.parent) || {} : {};
2994
+ const n = e.parent ? Qs(e.parent) || {} : {};
2995
2995
  return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
2996
2996
  }
2997
2997
  const t = {};
2998
2998
  for (let n = 0; n < Ka; n++) {
2999
- const s = $t[n], r = e.props[s];
2999
+ const s = Ht[n], r = e.props[s];
3000
3000
  (Ve(r) || r === !1) && (t[s] = r);
3001
3001
  }
3002
3002
  return t;
3003
3003
  }
3004
- const $a = [...Kt].reverse(), ja = Kt.length;
3004
+ const $a = [..._t].reverse(), ja = _t.length;
3005
3005
  function Wa(e) {
3006
3006
  return (t) => Promise.all(t.map(({ animation: n, options: s }) => Na(e, n, s)));
3007
3007
  }
3008
3008
  function _a(e) {
3009
- let t = Wa(e), n = An(), s = !0;
3009
+ let t = Wa(e), n = Rn(), s = !0;
3010
3010
  const r = (c) => (u, l) => {
3011
3011
  var f;
3012
3012
  const d = oe(e, l, c === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
@@ -3020,66 +3020,66 @@ function _a(e) {
3020
3020
  t = c(e);
3021
3021
  }
3022
3022
  function o(c) {
3023
- const { props: u } = e, l = Xs(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
3023
+ const { props: u } = e, l = Qs(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
3024
3024
  let h = {}, m = 1 / 0;
3025
- for (let y = 0; y < ja; y++) {
3026
- const p = $a[y], x = n[p], v = u[p] !== void 0 ? u[p] : l[p], A = Ve(v), S = p === c ? x.isActive : null;
3027
- S === !1 && (m = y);
3028
- let C = v === l[p] && v !== u[p] && A;
3029
- if (C && s && e.manuallyAnimateOnMount && (C = !1), x.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
3025
+ for (let b = 0; b < ja; b++) {
3026
+ const p = $a[b], x = n[p], v = u[p] !== void 0 ? u[p] : l[p], C = Ve(v), S = p === c ? x.isActive : null;
3027
+ S === !1 && (m = b);
3028
+ let A = v === l[p] && v !== u[p] && C;
3029
+ if (A && s && e.manuallyAnimateOnMount && (A = !1), x.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
3030
3030
  !x.isActive && S === null || // If we didn't and don't have any defined prop for this animation type
3031
3031
  !v && !x.prevProp || // Or if the prop doesn't define an animation
3032
- _e(v) || typeof v == "boolean")
3032
+ Ge(v) || typeof v == "boolean")
3033
3033
  continue;
3034
- const M = Ha(x.prevProp, v);
3035
- let V = M || // If we're making this variant active, we want to always make it active
3036
- p === c && x.isActive && !C && A || // If we removed a higher-priority variant (i is in reverse order)
3037
- y > m && A, D = !1;
3038
- const E = Array.isArray(v) ? v : [v];
3039
- let te = E.reduce(r(p), {});
3040
- S === !1 && (te = {});
3041
- const { prevResolvedValues: Xt = {} } = x, nr = {
3042
- ...Xt,
3043
- ...te
3044
- }, qt = (R) => {
3045
- V = !0, f.has(R) && (D = !0, f.delete(R)), x.needsAnimating[R] = !0;
3046
- const k = e.getValue(R);
3034
+ const P = Ha(x.prevProp, v);
3035
+ let V = P || // If we're making this variant active, we want to always make it active
3036
+ p === c && x.isActive && !A && C || // If we removed a higher-priority variant (i is in reverse order)
3037
+ b > m && C, F = !1;
3038
+ const D = Array.isArray(v) ? v : [v];
3039
+ let H = D.reduce(r(p), {});
3040
+ S === !1 && (H = {});
3041
+ const { prevResolvedValues: Pe = {} } = x, ze = {
3042
+ ...Pe,
3043
+ ...H
3044
+ }, Re = (O) => {
3045
+ V = !0, f.has(O) && (F = !0, f.delete(O)), x.needsAnimating[O] = !0;
3046
+ const k = e.getValue(O);
3047
3047
  k && (k.liveStyle = !1);
3048
3048
  };
3049
- for (const R in nr) {
3050
- const k = te[R], U = Xt[R];
3051
- if (h.hasOwnProperty(R))
3049
+ for (const O in ze) {
3050
+ const k = H[O], Y = Pe[O];
3051
+ if (h.hasOwnProperty(O))
3052
3052
  continue;
3053
3053
  let ne = !1;
3054
- gt(k) && gt(U) ? ne = !Ys(k, U) : ne = k !== U, ne ? k != null ? qt(R) : f.add(R) : k !== void 0 && f.has(R) ? qt(R) : x.protectedKeys[R] = !0;
3054
+ vt(k) && vt(Y) ? ne = !qs(k, Y) : ne = k !== Y, ne ? k != null ? Re(O) : f.add(O) : k !== void 0 && f.has(O) ? Re(O) : x.protectedKeys[O] = !0;
3055
3055
  }
3056
- x.prevProp = v, x.prevResolvedValues = te, x.isActive && (h = { ...h, ...te }), s && e.blockInitialAnimation && (V = !1);
3057
- const Qt = C && M;
3058
- V && (!Qt || D) && d.push(...E.map((R) => {
3056
+ x.prevProp = v, x.prevResolvedValues = H, x.isActive && (h = { ...h, ...H }), s && e.blockInitialAnimation && (V = !1);
3057
+ const Jt = A && P;
3058
+ V && (!Jt || F) && d.push(...D.map((O) => {
3059
3059
  const k = { type: p };
3060
- if (typeof R == "string" && s && !Qt && e.manuallyAnimateOnMount && e.parent) {
3061
- const { parent: U } = e, ne = oe(U, R);
3062
- if (U.enteringChildren && ne) {
3063
- const { delayChildren: sr } = ne.transition || {};
3064
- k.delay = zs(U.enteringChildren, e, sr);
3060
+ if (typeof O == "string" && s && !Jt && e.manuallyAnimateOnMount && e.parent) {
3061
+ const { parent: Y } = e, ne = oe(Y, O);
3062
+ if (Y.enteringChildren && ne) {
3063
+ const { delayChildren: rr } = ne.transition || {};
3064
+ k.delay = Xs(Y.enteringChildren, e, rr);
3065
3065
  }
3066
3066
  }
3067
3067
  return {
3068
- animation: R,
3068
+ animation: O,
3069
3069
  options: k
3070
3070
  };
3071
3071
  }));
3072
3072
  }
3073
3073
  if (f.size) {
3074
- const y = {};
3074
+ const b = {};
3075
3075
  if (typeof u.initial != "boolean") {
3076
3076
  const p = oe(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
3077
- p && p.transition && (y.transition = p.transition);
3077
+ p && p.transition && (b.transition = p.transition);
3078
3078
  }
3079
3079
  f.forEach((p) => {
3080
3080
  const x = e.getBaseTarget(p), v = e.getValue(p);
3081
- v && (v.liveStyle = !0), y[p] = x ?? null;
3082
- }), d.push({ animation: y });
3081
+ v && (v.liveStyle = !0), b[p] = x ?? null;
3082
+ }), d.push({ animation: b });
3083
3083
  }
3084
3084
  let g = !!d.length;
3085
3085
  return s && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (g = !1), s = !1, g ? t(d) : Promise.resolve();
@@ -3103,14 +3103,14 @@ function _a(e) {
3103
3103
  setAnimateFunction: i,
3104
3104
  getState: () => n,
3105
3105
  reset: () => {
3106
- n = An(), s = !0;
3106
+ n = Rn(), s = !0;
3107
3107
  }
3108
3108
  };
3109
3109
  }
3110
3110
  function Ha(e, t) {
3111
- return typeof t == "string" ? t !== e : Array.isArray(t) ? !Ys(t, e) : !1;
3111
+ return typeof t == "string" ? t !== e : Array.isArray(t) ? !qs(t, e) : !1;
3112
3112
  }
3113
- function z(e = !1) {
3113
+ function X(e = !1) {
3114
3114
  return {
3115
3115
  isActive: e,
3116
3116
  protectedKeys: {},
@@ -3118,15 +3118,15 @@ function z(e = !1) {
3118
3118
  prevResolvedValues: {}
3119
3119
  };
3120
3120
  }
3121
- function An() {
3121
+ function Rn() {
3122
3122
  return {
3123
- animate: z(!0),
3124
- whileInView: z(),
3125
- whileHover: z(),
3126
- whileTap: z(),
3127
- whileDrag: z(),
3128
- whileFocus: z(),
3129
- exit: z()
3123
+ animate: X(!0),
3124
+ whileInView: X(),
3125
+ whileHover: X(),
3126
+ whileTap: X(),
3127
+ whileDrag: X(),
3128
+ whileFocus: X(),
3129
+ exit: X()
3130
3130
  };
3131
3131
  }
3132
3132
  class ge {
@@ -3147,7 +3147,7 @@ class Ga extends ge {
3147
3147
  }
3148
3148
  updateAnimationControlsSubscription() {
3149
3149
  const { animate: t } = this.node.getProps();
3150
- _e(t) && (this.unmountControls = t.subscribe(this.node));
3150
+ Ge(t) && (this.unmountControls = t.subscribe(this.node));
3151
3151
  }
3152
3152
  /**
3153
3153
  * Subscribe any provided AnimationControls to the component's VisualElement
@@ -3195,10 +3195,10 @@ const Ya = {
3195
3195
  Feature: za
3196
3196
  }
3197
3197
  };
3198
- function Mn(e, t, n, s = { passive: !0 }) {
3198
+ function Fn(e, t, n, s = { passive: !0 }) {
3199
3199
  return e.addEventListener(t, n, s), () => e.removeEventListener(t, n);
3200
3200
  }
3201
- function qs(e) {
3201
+ function Zs(e) {
3202
3202
  return {
3203
3203
  point: {
3204
3204
  x: e.pageX,
@@ -3206,16 +3206,16 @@ function qs(e) {
3206
3206
  }
3207
3207
  };
3208
3208
  }
3209
- function Pn(e, t, n) {
3209
+ function Dn(e, t, n) {
3210
3210
  const { props: s } = e;
3211
3211
  e.animationState && s.whileHover && e.animationState.setActive("whileHover", n === "Start");
3212
3212
  const r = "onHover" + n, i = s[r];
3213
- i && N.postRender(() => i(t, qs(t)));
3213
+ i && N.postRender(() => i(t, Zs(t)));
3214
3214
  }
3215
3215
  class Xa extends ge {
3216
3216
  mount() {
3217
3217
  const { current: t } = this.node;
3218
- t && (this.unmount = wo(t, (n, s) => (Pn(this.node, s, "Start"), (r) => Pn(this.node, r, "End"))));
3218
+ t && (this.unmount = wo(t, (n, s) => (Dn(this.node, s, "Start"), (r) => Dn(this.node, r, "End"))));
3219
3219
  }
3220
3220
  unmount() {
3221
3221
  }
@@ -3237,43 +3237,43 @@ class qa extends ge {
3237
3237
  !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
3238
3238
  }
3239
3239
  mount() {
3240
- this.unmount = $e(Mn(this.node.current, "focus", () => this.onFocus()), Mn(this.node.current, "blur", () => this.onBlur()));
3240
+ this.unmount = We(Fn(this.node.current, "focus", () => this.onFocus()), Fn(this.node.current, "blur", () => this.onBlur()));
3241
3241
  }
3242
3242
  unmount() {
3243
3243
  }
3244
3244
  }
3245
- function Fn(e, t, n) {
3245
+ function On(e, t, n) {
3246
3246
  const { props: s } = e;
3247
3247
  if (e.current instanceof HTMLButtonElement && e.current.disabled)
3248
3248
  return;
3249
3249
  e.animationState && s.whileTap && e.animationState.setActive("whileTap", n === "Start");
3250
3250
  const r = "onTap" + (n === "End" ? "" : n), i = s[r];
3251
- i && N.postRender(() => i(t, qs(t)));
3251
+ i && N.postRender(() => i(t, Zs(t)));
3252
3252
  }
3253
3253
  class Qa extends ge {
3254
3254
  mount() {
3255
3255
  const { current: t } = this.node;
3256
- t && (this.unmount = Ao(t, (n, s) => (Fn(this.node, s, "Start"), (r, { success: i }) => Fn(this.node, r, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
3256
+ t && (this.unmount = Ao(t, (n, s) => (On(this.node, s, "Start"), (r, { success: i }) => On(this.node, r, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
3257
3257
  }
3258
3258
  unmount() {
3259
3259
  }
3260
3260
  }
3261
- const bt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), Za = (e) => {
3262
- const t = bt.get(e.target);
3261
+ const wt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Za = (e) => {
3262
+ const t = wt.get(e.target);
3263
3263
  t && t(e);
3264
3264
  }, Ja = (e) => {
3265
3265
  e.forEach(Za);
3266
3266
  };
3267
3267
  function ec({ root: e, ...t }) {
3268
3268
  const n = e || document;
3269
- Qe.has(n) || Qe.set(n, {});
3270
- const s = Qe.get(n), r = JSON.stringify(t);
3269
+ et.has(n) || et.set(n, {});
3270
+ const s = et.get(n), r = JSON.stringify(t);
3271
3271
  return s[r] || (s[r] = new IntersectionObserver(Ja, { root: e, ...t })), s[r];
3272
3272
  }
3273
3273
  function tc(e, t, n) {
3274
3274
  const s = ec(t);
3275
- return bt.set(e, n), s.observe(e), () => {
3276
- bt.delete(e), s.unobserve(e);
3275
+ return wt.set(e, n), s.observe(e), () => {
3276
+ wt.delete(e), s.unobserve(e);
3277
3277
  };
3278
3278
  }
3279
3279
  const nc = {
@@ -3333,19 +3333,19 @@ const ic = {
3333
3333
  ...Ya,
3334
3334
  ...ic
3335
3335
  };
3336
- function Qs(e, t) {
3336
+ function Js(e, t) {
3337
3337
  return ia(e, t);
3338
3338
  }
3339
- const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3339
+ const ac = /* @__PURE__ */ Js("div"), Qt = /* @__PURE__ */ Js("span"), cc = ({
3340
3340
  icon: e = lr,
3341
3341
  "aria-hidden": t = !0,
3342
3342
  ...n
3343
3343
  }) => {
3344
- const s = b.useContext(O);
3344
+ const s = y.useContext(I);
3345
3345
  return /* @__PURE__ */ T(
3346
3346
  le.Icon,
3347
3347
  {
3348
- as: zt,
3348
+ as: Qt,
3349
3349
  animate: { rotate: s.open ? 180 : 0 },
3350
3350
  transition: { duration: 0.15, type: "spring", bounce: 0 },
3351
3351
  icon: e,
@@ -3357,29 +3357,29 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3357
3357
  tooltipProps: e,
3358
3358
  ...t
3359
3359
  }) => {
3360
- const n = b.useContext(O), s = () => {
3360
+ const n = y.useContext(I), s = () => {
3361
3361
  var i, o;
3362
- if ($(n.value)) {
3362
+ if (K(n.value)) {
3363
3363
  const a = n.onValueChange;
3364
3364
  a == null || a([]);
3365
3365
  }
3366
- if (Z(n.value)) {
3366
+ if (z(n.value)) {
3367
3367
  const a = n.onValueChange;
3368
3368
  a == null || a(void 0);
3369
3369
  }
3370
3370
  (o = (i = n.triggerRef) == null ? void 0 : i.current) == null || o.focus();
3371
3371
  };
3372
- return b.useMemo(() => {
3372
+ return y.useMemo(() => {
3373
3373
  var i;
3374
- if (Z(n.value))
3374
+ if (z(n.value))
3375
3375
  return n.clearable && n.value;
3376
- if ($(n.value))
3376
+ if (K(n.value))
3377
3377
  return n.clearable && ((i = n.value) == null ? void 0 : i.length) > 0;
3378
3378
  }, [n.clearable, n.value]) ? /* @__PURE__ */ T(br, { label: "Clear field", ...e, children: /* @__PURE__ */ T(
3379
3379
  le,
3380
3380
  {
3381
3381
  type: "button",
3382
- icon: { icon: wt, alt: "Clear field" },
3382
+ icon: { icon: Ct, alt: "Clear field" },
3383
3383
  size: "0",
3384
3384
  variant: "ghost",
3385
3385
  onClick: (i) => {
@@ -3398,14 +3398,14 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3398
3398
  ...t
3399
3399
  }
3400
3400
  ) }) : null;
3401
- }, Zs = ({
3401
+ }, er = ({
3402
3402
  children: e,
3403
3403
  ...t
3404
3404
  }) => {
3405
- const n = b.useContext(O), s = b.useMemo(() => {
3405
+ const n = y.useContext(I), s = y.useMemo(() => {
3406
3406
  var a;
3407
- if (!Z(n.value)) return;
3408
- const r = Je(
3407
+ if (!z(n.value)) return;
3408
+ const r = nt(
3409
3409
  n.value,
3410
3410
  n.options,
3411
3411
  n.legacyBehavior
@@ -3417,7 +3417,7 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3417
3417
  n.legacyBehavior,
3418
3418
  n.placeholder
3419
3419
  ]);
3420
- return /* @__PURE__ */ T(kn, { children: /* @__PURE__ */ T(
3420
+ return /* @__PURE__ */ T(Ln, { children: /* @__PURE__ */ T(
3421
3421
  le.Text,
3422
3422
  {
3423
3423
  color: n.value ? "default" : "gray",
@@ -3427,12 +3427,12 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3427
3427
  children: e || s
3428
3428
  }
3429
3429
  ) });
3430
- }, vt = ({
3430
+ }, xt = ({
3431
3431
  children: e,
3432
3432
  ...t
3433
3433
  }) => {
3434
- const n = b.useContext(O);
3435
- return /* @__PURE__ */ T(kn, { children: /* @__PURE__ */ T(
3434
+ const n = y.useContext(I);
3435
+ return /* @__PURE__ */ T(Ln, { children: /* @__PURE__ */ T(
3436
3436
  le.Text,
3437
3437
  {
3438
3438
  color: "gray",
@@ -3442,11 +3442,11 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3442
3442
  children: e || n.placeholder
3443
3443
  }
3444
3444
  ) });
3445
- }, Js = ({ children: e }) => {
3446
- const t = b.useContext(O);
3447
- if (!$(t.value)) return null;
3445
+ }, tr = ({ children: e }) => {
3446
+ const t = y.useContext(I);
3447
+ if (!K(t.value)) return null;
3448
3448
  const n = t.layout || "truncate", r = (t.value.length - 2).toString().split("");
3449
- return /* @__PURE__ */ G(
3449
+ return /* @__PURE__ */ U(
3450
3450
  ae,
3451
3451
  {
3452
3452
  gap: "0_5",
@@ -3477,12 +3477,12 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3477
3477
  style: {
3478
3478
  backgroundImage: "linear-gradient(to left, var(--tgph-surface-1) 0 60%, transparent 90% 100%)"
3479
3479
  },
3480
- children: /* @__PURE__ */ G(Tt, { as: "span", size: "1", style: { whiteSpace: "nowrap" }, children: [
3480
+ children: /* @__PURE__ */ U(Vt, { as: "span", size: "1", style: { whiteSpace: "nowrap" }, children: [
3481
3481
  "+",
3482
3482
  r.map((i) => /* @__PURE__ */ T(
3483
- On,
3483
+ En,
3484
3484
  {
3485
- as: zt,
3485
+ as: Qt,
3486
3486
  initial: { opacity: 0 },
3487
3487
  animate: { opacity: 1 },
3488
3488
  exit: { opacity: 0 },
@@ -3501,16 +3501,16 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3501
3501
  ]
3502
3502
  }
3503
3503
  );
3504
- }, Yt = b.createContext({
3504
+ }, Zt = y.createContext({
3505
3505
  value: ""
3506
3506
  }), uc = ({
3507
3507
  value: e,
3508
3508
  children: t,
3509
3509
  ...n
3510
- }) => /* @__PURE__ */ T(Yt.Provider, { value: { value: e }, children: /* @__PURE__ */ T(
3511
- St.Root,
3510
+ }) => /* @__PURE__ */ T(Zt.Provider, { value: { value: e }, children: /* @__PURE__ */ T(
3511
+ Mt.Root,
3512
3512
  {
3513
- as: zt,
3513
+ as: Qt,
3514
3514
  initial: { opacity: 0, scale: 0.5 },
3515
3515
  animate: { opacity: 1, scale: 1 },
3516
3516
  exit: { opacity: 0, scale: 0.5 },
@@ -3526,14 +3526,14 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3526
3526
  children: e,
3527
3527
  ...t
3528
3528
  }) => {
3529
- const n = b.useContext(O), s = b.useContext(Yt), r = b.useMemo(() => {
3529
+ const n = y.useContext(I), s = y.useContext(Zt), r = y.useMemo(() => {
3530
3530
  const i = n.options.find(
3531
3531
  (c) => c.value === s.value
3532
3532
  );
3533
3533
  if (i) return i.label || i.value;
3534
3534
  if (!n.value) return;
3535
3535
  const a = n.value.find(
3536
- (c) => H(c, n.legacyBehavior) === s.value
3536
+ (c) => $(c, n.legacyBehavior) === s.value
3537
3537
  );
3538
3538
  if (a)
3539
3539
  return a;
@@ -3543,20 +3543,20 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3543
3543
  s.value,
3544
3544
  n.legacyBehavior
3545
3545
  ]);
3546
- return /* @__PURE__ */ T(St.Text, { ...t, children: e || r });
3546
+ return /* @__PURE__ */ T(Mt.Text, { ...t, children: e || r });
3547
3547
  }, dc = ({
3548
3548
  children: e,
3549
3549
  ...t
3550
3550
  }) => {
3551
- const n = b.useContext(O), s = b.useContext(Yt);
3551
+ const n = y.useContext(I), s = y.useContext(Zt);
3552
3552
  return /* @__PURE__ */ T(
3553
- St.Button,
3553
+ Mt.Button,
3554
3554
  {
3555
- icon: { icon: wt, alt: `Remove ${s.value}` },
3555
+ icon: { icon: Ct, alt: `Remove ${s.value}` },
3556
3556
  height: "full",
3557
3557
  onClick: (r) => {
3558
3558
  if (!n.onValueChange) return;
3559
- const i = n.onValueChange, a = n.value.filter((c) => H(c, n.legacyBehavior) !== s.value);
3559
+ const i = n.onValueChange, a = n.value.filter((c) => $(c, n.legacyBehavior) !== s.value);
3560
3560
  i == null || i(a), r.stopPropagation(), r.preventDefault();
3561
3561
  },
3562
3562
  "data-tgph-combobox-tag-button": !0,
@@ -3568,21 +3568,21 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3568
3568
  value: e,
3569
3569
  children: t,
3570
3570
  ...n
3571
- }) => /* @__PURE__ */ G(we.Root, { value: e, ...n, children: [
3571
+ }) => /* @__PURE__ */ U(we.Root, { value: e, ...n, children: [
3572
3572
  /* @__PURE__ */ T(we.Text, { children: t }),
3573
3573
  /* @__PURE__ */ T(we.Button, {})
3574
3574
  ] }), pc = (e) => /* @__PURE__ */ T(ae, { align: "center", gap: "1", ...e }), mc = () => {
3575
- const e = b.useContext(O);
3576
- if (e.value && $(e.value)) {
3575
+ const e = y.useContext(I);
3576
+ if (e.value && K(e.value)) {
3577
3577
  const t = e.layout || "truncate";
3578
- return e.value.length === 0 ? /* @__PURE__ */ T(vt, {}) : /* @__PURE__ */ T(Fo, { features: oc, children: /* @__PURE__ */ T(Js, { children: e.value.map((n, s) => {
3579
- const r = H(n, e.legacyBehavior);
3578
+ return e.value.length === 0 ? /* @__PURE__ */ T(xt, {}) : /* @__PURE__ */ T(Ro, { features: oc, children: /* @__PURE__ */ T(tr, { children: e.value.map((n, s) => {
3579
+ const r = $(n, e.legacyBehavior);
3580
3580
  if (r && (t === "truncate" && s <= 1 || t === "wrap"))
3581
3581
  return /* @__PURE__ */ T(yr, { children: /* @__PURE__ */ T(we.Default, { value: r }) }, r);
3582
3582
  }) }) });
3583
3583
  }
3584
- if (e && Z(e.value))
3585
- return e.value ? /* @__PURE__ */ T(Zs, {}) : /* @__PURE__ */ T(vt, {});
3584
+ if (e && z(e.value))
3585
+ return e.value ? /* @__PURE__ */ T(er, {}) : /* @__PURE__ */ T(xt, {});
3586
3586
  }, we = {
3587
3587
  Root: uc,
3588
3588
  Text: fc,
@@ -3591,13 +3591,13 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3591
3591
  }, be = {
3592
3592
  TriggerIndicator: cc,
3593
3593
  TriggerClear: lc,
3594
- TriggerText: Zs,
3595
- TriggerPlaceholder: vt,
3596
- TriggerTagsContainer: Js,
3594
+ TriggerText: er,
3595
+ TriggerPlaceholder: xt,
3596
+ TriggerTagsContainer: tr,
3597
3597
  TriggerActionsContainer: pc,
3598
3598
  TriggerTag: we,
3599
3599
  TriggerValue: mc
3600
- }, gc = ["ArrowDown", "PageUp", "Home"], yc = ["ArrowUp", "PageDown", "End"], er = ["Enter", " "], O = b.createContext({
3600
+ }, gc = ["ArrowDown", "PageUp", "Home"], yc = ["ArrowUp", "PageDown", "End"], nr = ["Enter", " "], I = y.createContext({
3601
3601
  value: void 0,
3602
3602
  onValueChange: () => {
3603
3603
  },
@@ -3622,58 +3622,65 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3622
3622
  onOpenChange: o,
3623
3623
  defaultOpen: a,
3624
3624
  value: c,
3625
- onValueChange: u,
3626
- errored: l,
3627
- placeholder: d,
3628
- layout: f,
3629
- children: h,
3630
- ...m
3625
+ defaultValue: u,
3626
+ onValueChange: l,
3627
+ errored: d,
3628
+ placeholder: f,
3629
+ layout: h,
3630
+ defaultScrollToValue: m,
3631
+ children: g,
3632
+ ...b
3631
3633
  }) => {
3632
- const g = b.useId(), y = b.useId(), p = b.useRef(null), x = b.useRef(null), v = b.useRef(null), A = b.useMemo(() => Tr(h), [h]), [S, C] = b.useState(""), [M = !1, V] = or({
3634
+ const p = y.useId(), x = y.useId(), v = y.useRef(null), C = y.useRef(null), S = y.useRef(null), A = y.useMemo(() => Tr(g), [g]), [P, V] = y.useState(""), [F = !1, D] = en({
3633
3635
  prop: i,
3634
3636
  defaultProp: a ?? !1,
3635
3637
  onChange: o
3636
- }), D = b.useCallback(() => {
3637
- V((E) => !E);
3638
- }, [V]);
3639
- return b.useEffect(() => {
3640
- M || C("");
3641
- }, [M]), /* @__PURE__ */ T(
3642
- O.Provider,
3638
+ }), [H, Pe] = en({
3639
+ prop: c,
3640
+ defaultProp: u,
3641
+ onChange: l
3642
+ }), ze = y.useCallback(() => {
3643
+ D((Re) => !Re);
3644
+ }, [D]);
3645
+ return y.useEffect(() => {
3646
+ F || V("");
3647
+ }, [F]), /* @__PURE__ */ T(
3648
+ I.Provider,
3643
3649
  {
3644
3650
  value: {
3645
- contentId: g,
3646
- triggerId: y,
3647
- value: c,
3651
+ contentId: p,
3652
+ triggerId: x,
3653
+ value: H,
3648
3654
  // Need to cast this to avoid type errors
3649
3655
  // because the type of onValueChange is not
3650
3656
  // consistent with the value type
3651
- onValueChange: u,
3652
- placeholder: d,
3653
- open: M,
3654
- setOpen: V,
3655
- onOpenToggle: D,
3657
+ onValueChange: Pe,
3658
+ placeholder: f,
3659
+ open: F,
3660
+ setOpen: D,
3661
+ onOpenToggle: ze,
3656
3662
  closeOnSelect: t,
3657
3663
  clearable: n,
3658
3664
  disabled: s,
3659
- searchQuery: S,
3660
- setSearchQuery: C,
3661
- triggerRef: p,
3662
- searchRef: x,
3663
- contentRef: v,
3664
- errored: l,
3665
- layout: f,
3665
+ searchQuery: P,
3666
+ setSearchQuery: V,
3667
+ triggerRef: v,
3668
+ searchRef: C,
3669
+ contentRef: S,
3670
+ errored: d,
3671
+ layout: h,
3666
3672
  options: A,
3667
- legacyBehavior: r
3673
+ legacyBehavior: r,
3674
+ defaultScrollToValue: m
3668
3675
  },
3669
3676
  children: /* @__PURE__ */ T(
3670
- Ne.Root,
3677
+ $e.Root,
3671
3678
  {
3672
- open: M,
3673
- onOpenChange: V,
3679
+ open: F,
3680
+ onOpenChange: D,
3674
3681
  modal: e,
3675
- ...m,
3676
- children: h
3682
+ ...b,
3683
+ children: g
3677
3684
  }
3678
3685
  )
3679
3686
  }
@@ -3683,22 +3690,22 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3683
3690
  children: t,
3684
3691
  ...n
3685
3692
  }) => {
3686
- const s = b.useContext(O), r = $(s.value) && s.value.length > 0, i = b.useMemo(() => {
3693
+ const s = y.useContext(I), r = K(s.value) && s.value.length > 0, i = y.useMemo(() => {
3687
3694
  if (s.value) {
3688
- if (Z(s.value))
3689
- return Je(
3695
+ if (z(s.value))
3696
+ return nt(
3690
3697
  s.value,
3691
3698
  s.options,
3692
3699
  s.legacyBehavior
3693
3700
  );
3694
- if ($(s.value))
3701
+ if (K(s.value))
3695
3702
  return s.value.map(
3696
- (a) => Je(a, s.options, s.legacyBehavior)
3703
+ (a) => nt(a, s.options, s.legacyBehavior)
3697
3704
  );
3698
3705
  }
3699
- }, [s.value, s.options, s.legacyBehavior]), o = b.useCallback(() => i ? Z(i) ? (i == null ? void 0 : i.label) || (i == null ? void 0 : i.value) || s.placeholder : $(i) && i.map((a) => (a == null ? void 0 : a.label) || (a == null ? void 0 : a.value)).join(", ") || s.placeholder : s.placeholder, [i, s.placeholder]);
3706
+ }, [s.value, s.options, s.legacyBehavior]), o = y.useCallback(() => i ? z(i) ? (i == null ? void 0 : i.label) || (i == null ? void 0 : i.value) || s.placeholder : K(i) && i.map((a) => (a == null ? void 0 : a.label) || (a == null ? void 0 : a.value)).join(", ") || s.placeholder : s.placeholder, [i, s.placeholder]);
3700
3707
  return /* @__PURE__ */ T(
3701
- Ne.Trigger,
3708
+ $e.Trigger,
3702
3709
  {
3703
3710
  ...n,
3704
3711
  asChild: !0,
@@ -3713,7 +3720,7 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3713
3720
  a.stopPropagation();
3714
3721
  return;
3715
3722
  }
3716
- if (a.key === "ArrowDown" || er.includes(a.key)) {
3723
+ if (a.key === "ArrowDown" || nr.includes(a.key)) {
3717
3724
  a.stopPropagation(), a.preventDefault(), s.onOpenToggle();
3718
3725
  return;
3719
3726
  }
@@ -3746,9 +3753,9 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3746
3753
  "data-tgph-combobox-trigger-open": s.open,
3747
3754
  disabled: s.disabled,
3748
3755
  ...n,
3749
- children: t ? typeof t == "function" ? t({ value: i }) : t : /* @__PURE__ */ G(Ze, { children: [
3756
+ children: t ? typeof t == "function" ? t({ value: i }) : t : /* @__PURE__ */ U(tt, { children: [
3750
3757
  /* @__PURE__ */ T(be.TriggerValue, {}),
3751
- /* @__PURE__ */ G(be.TriggerActionsContainer, { children: [
3758
+ /* @__PURE__ */ U(be.TriggerActionsContainer, { children: [
3752
3759
  /* @__PURE__ */ T(be.TriggerClear, {}),
3753
3760
  /* @__PURE__ */ T(be.TriggerIndicator, {})
3754
3761
  ] })
@@ -3763,36 +3770,36 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3763
3770
  tgphRef: n,
3764
3771
  ...s
3765
3772
  }) => {
3766
- const r = b.useContext(O), i = b.useRef(!1), o = Rn(n, r.contentRef), a = b.useRef(null), [c, u] = b.useState(0), [l, d] = b.useState(!1), f = b.useCallback(
3773
+ const r = y.useContext(I), i = y.useRef(!1), o = St(n, r.contentRef), a = y.useRef(null), [c, u] = y.useState(0), [l, d] = y.useState(!1), f = y.useCallback(
3767
3774
  (h) => {
3768
3775
  const m = h == null ? void 0 : h.getBoundingClientRect();
3769
3776
  m && u(m.height), l || d(!0);
3770
3777
  },
3771
3778
  [l]
3772
3779
  );
3773
- return b.useEffect(() => {
3780
+ return y.useEffect(() => {
3774
3781
  const h = new ResizeObserver((m) => {
3775
3782
  for (const g of m) {
3776
- const y = g.target;
3777
- f(y);
3783
+ const b = g.target;
3784
+ f(b);
3778
3785
  }
3779
3786
  });
3780
3787
  return a.current && l && h.observe(a.current), () => h.disconnect();
3781
- }, [l, f]), b.useEffect(() => {
3788
+ }, [l, f]), y.useEffect(() => {
3782
3789
  l === !0 && r.open === !1 && d(!1);
3783
- }, [r.open, l]), b.useEffect(() => {
3790
+ }, [r.open, l]), y.useEffect(() => {
3784
3791
  let h;
3785
3792
  return r.open && (h = setTimeout(() => {
3786
3793
  f(a.current);
3787
3794
  }, 10)), () => h && clearTimeout(h);
3788
- }, [r.open, f]), /* @__PURE__ */ T(ir.Root, { asChild: !0, children: /* @__PURE__ */ T(
3789
- rr,
3795
+ }, [r.open, f]), /* @__PURE__ */ T(or.Root, { asChild: !0, children: /* @__PURE__ */ T(
3796
+ ir,
3790
3797
  {
3791
3798
  onEscapeKeyDown: (h) => {
3792
3799
  r.open && (h.stopPropagation(), h.preventDefault(), r.setOpen(!1));
3793
3800
  },
3794
3801
  children: /* @__PURE__ */ T(
3795
- Ne.Content,
3802
+ $e.Content,
3796
3803
  {
3797
3804
  className: "tgph",
3798
3805
  mt: "1",
@@ -3819,9 +3826,9 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3819
3826
  role: void 0,
3820
3827
  "aria-orientation": void 0,
3821
3828
  onKeyDown: (h) => {
3822
- var g, y, p, x;
3829
+ var g, b, p, x;
3823
3830
  h.stopPropagation();
3824
- const m = (y = (g = r.contentRef) == null ? void 0 : g.current) == null ? void 0 : y.querySelectorAll(
3831
+ const m = (b = (g = r.contentRef) == null ? void 0 : g.current) == null ? void 0 : b.querySelectorAll(
3825
3832
  "[data-tgph-combobox-option]"
3826
3833
  );
3827
3834
  document.activeElement === (m == null ? void 0 : m[0]) && yc.includes(h.key) && ((x = (p = r.searchRef) == null ? void 0 : p.current) == null || x.focus());
@@ -3831,24 +3838,46 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3831
3838
  )
3832
3839
  }
3833
3840
  ) });
3834
- }, wc = ({ ...e }) => {
3835
- const t = b.useContext(O);
3836
- return /* @__PURE__ */ T(
3841
+ }, wc = ({
3842
+ tgphRef: e,
3843
+ ...t
3844
+ }) => {
3845
+ const n = y.useContext(I), s = y.useRef(null), r = St(e, s);
3846
+ return y.useEffect(() => {
3847
+ n.open && s.current && requestAnimationFrame(() => {
3848
+ var a;
3849
+ const o = (z(n.value) ? $(n.value, n.legacyBehavior) : K(n.value) && n.value.length > 0 ? $(n.value[0], n.legacyBehavior) : null) ?? n.defaultScrollToValue;
3850
+ if (o) {
3851
+ const c = (a = s.current) == null ? void 0 : a.querySelectorAll(
3852
+ "[data-tgph-combobox-option]"
3853
+ ), u = Array.from(c || []).find(
3854
+ (l) => l.getAttribute("data-tgph-combobox-option-value") === o
3855
+ );
3856
+ u && typeof u.scrollIntoView == "function" && u.scrollIntoView({ block: "center" });
3857
+ }
3858
+ });
3859
+ }, [
3860
+ n.open,
3861
+ n.value,
3862
+ n.legacyBehavior,
3863
+ n.defaultScrollToValue
3864
+ ]), /* @__PURE__ */ T(
3837
3865
  ae,
3838
3866
  {
3839
- id: t.contentId,
3867
+ id: n.contentId,
3840
3868
  direction: "column",
3841
3869
  gap: "1",
3842
3870
  style: {
3843
3871
  overflowY: "auto",
3844
3872
  // maxHeight defaults to available height - padding from edge of screen
3845
- "--max-height": e.maxHeight ? void 0 : "calc(var(--tgph-combobox-content-available-height) - var(--tgph-spacing-12))"
3873
+ "--max-height": t.maxHeight ? void 0 : "calc(var(--tgph-combobox-content-available-height) - var(--tgph-spacing-12))"
3846
3874
  },
3847
3875
  role: "listbox",
3848
- ...e
3876
+ tgphRef: r,
3877
+ ...t
3849
3878
  }
3850
3879
  );
3851
- }, tr = ({
3880
+ }, sr = ({
3852
3881
  value: e,
3853
3882
  label: t,
3854
3883
  selected: n,
@@ -3856,25 +3885,25 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3856
3885
  children: r,
3857
3886
  ...i
3858
3887
  }) => {
3859
- const o = b.useContext(O), [a, c] = b.useState(!1), u = o.value, l = !o.searchQuery || wr({
3888
+ const o = y.useContext(I), [a, c] = y.useState(!1), u = o.value, l = !o.searchQuery || wr({
3860
3889
  children: t || r,
3861
3890
  value: e,
3862
3891
  searchQuery: o.searchQuery
3863
- }), d = $(u) ? u.some(
3864
- (h) => H(h, o.legacyBehavior) === e
3865
- ) : H(u, o.legacyBehavior) === e, f = (h) => {
3866
- var g, y;
3892
+ }), d = K(u) ? u.some(
3893
+ (h) => $(h, o.legacyBehavior) === e
3894
+ ) : $(u, o.legacyBehavior) === e, f = (h) => {
3895
+ var g, b;
3867
3896
  h.stopPropagation();
3868
3897
  const m = h;
3869
- if (!(m.key && !er.includes(m.key))) {
3898
+ if (!(m.key && !nr.includes(m.key))) {
3870
3899
  if (h.preventDefault(), o.closeOnSelect === !0 && o.setOpen(!1), s)
3871
3900
  return s(h);
3872
- if (Z(u)) {
3901
+ if (z(u)) {
3873
3902
  const p = o.onValueChange;
3874
3903
  o.legacyBehavior === !0 ? p == null || p({ value: e, label: t }) : p == null || p(e);
3875
- } else if ($(u)) {
3904
+ } else if (K(u)) {
3876
3905
  const p = o.onValueChange, x = o.value, v = d ? x.filter(
3877
- (A) => H(A, o.legacyBehavior) !== e
3906
+ (C) => $(C, o.legacyBehavior) !== e
3878
3907
  ) : [
3879
3908
  ...x,
3880
3909
  // TODO: Remove this once { value, label } option is deprecated
@@ -3882,12 +3911,12 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3882
3911
  ];
3883
3912
  p == null || p(v);
3884
3913
  }
3885
- (y = (g = o.triggerRef) == null ? void 0 : g.current) == null || y.focus();
3914
+ (b = (g = o.triggerRef) == null ? void 0 : g.current) == null || b.focus();
3886
3915
  }
3887
3916
  };
3888
3917
  if (l)
3889
3918
  return /* @__PURE__ */ T(
3890
- Ne.Button,
3919
+ $e.Button,
3891
3920
  {
3892
3921
  type: "button",
3893
3922
  onSelect: f,
@@ -3914,19 +3943,19 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3914
3943
  ...i
3915
3944
  }) => {
3916
3945
  var d;
3917
- const o = b.useId(), a = b.useContext(O), c = Rn(n, a.searchRef), u = s ?? a.searchQuery, l = r ?? a.setSearchQuery;
3918
- return b.useEffect(() => {
3946
+ const o = y.useId(), a = y.useContext(I), c = St(n, a.searchRef), u = s ?? a.searchQuery, l = r ?? a.setSearchQuery;
3947
+ return y.useEffect(() => {
3919
3948
  var m;
3920
3949
  const f = (g) => {
3921
- var y, p;
3922
- gc.includes(g.key) && ((p = (y = a.contentRef) == null ? void 0 : y.current) == null || p.focus({ preventScroll: !0 })), g.key === "Escape" && a.setOpen(!1), g.stopPropagation();
3950
+ var b, p;
3951
+ gc.includes(g.key) && ((p = (b = a.contentRef) == null ? void 0 : b.current) == null || p.focus({ preventScroll: !0 })), g.key === "Escape" && a.setOpen(!1), g.stopPropagation();
3923
3952
  }, h = (m = a.searchRef) == null ? void 0 : m.current;
3924
3953
  if (h)
3925
3954
  return h.addEventListener("keydown", f), () => {
3926
3955
  h.removeEventListener("keydown", f);
3927
3956
  };
3928
- }, [a]), /* @__PURE__ */ G(On, { borderBottom: "px", px: "1", pb: "1", children: [
3929
- /* @__PURE__ */ T(ar.Root, { children: /* @__PURE__ */ T(Tt, { as: "label", htmlFor: o, children: e }) }),
3957
+ }, [a]), /* @__PURE__ */ U(En, { borderBottom: "px", px: "1", pb: "1", children: [
3958
+ /* @__PURE__ */ T(ar.Root, { children: /* @__PURE__ */ T(Vt, { as: "label", htmlFor: o, children: e }) }),
3930
3959
  /* @__PURE__ */ T(
3931
3960
  cr,
3932
3961
  {
@@ -3937,13 +3966,13 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3937
3966
  onChange: (f) => {
3938
3967
  l(f.target.value);
3939
3968
  },
3940
- LeadingComponent: /* @__PURE__ */ T(Dn, { icon: In, alt: "Search Icon" }),
3969
+ LeadingComponent: /* @__PURE__ */ T(In, { icon: kn, alt: "Search Icon" }),
3941
3970
  TrailingComponent: a != null && a.searchQuery && ((d = a == null ? void 0 : a.searchQuery) == null ? void 0 : d.length) > 0 ? /* @__PURE__ */ T(
3942
3971
  le,
3943
3972
  {
3944
3973
  variant: "ghost",
3945
3974
  color: "gray",
3946
- icon: { icon: wt, alt: "Clear Search Query" },
3975
+ icon: { icon: Ct, alt: "Clear Search Query" },
3947
3976
  onClick: () => {
3948
3977
  var f;
3949
3978
  return (f = a.setSearchQuery) == null ? void 0 : f.call(a, "");
@@ -3959,20 +3988,20 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3959
3988
  )
3960
3989
  ] });
3961
3990
  }, Sc = ({
3962
- icon: e = { icon: In, alt: "Search Icon" },
3991
+ icon: e = { icon: kn, alt: "Search Icon" },
3963
3992
  message: t = "No results found",
3964
3993
  children: n,
3965
3994
  ...s
3966
3995
  }) => {
3967
- const r = b.useContext(O), [i, o] = b.useState(!1);
3968
- if (b.useEffect(() => {
3996
+ const r = y.useContext(I), [i, o] = y.useState(!1);
3997
+ if (y.useEffect(() => {
3969
3998
  var c, u;
3970
3999
  const a = (u = (c = r.contentRef) == null ? void 0 : c.current) == null ? void 0 : u.querySelectorAll(
3971
4000
  "[data-tgph-combobox-option]"
3972
4001
  );
3973
4002
  (a == null ? void 0 : a.length) === 0 ? o(!0) : o(!1);
3974
4003
  }, [r.searchQuery, r.contentRef, n]), i)
3975
- return /* @__PURE__ */ G(
4004
+ return /* @__PURE__ */ U(
3976
4005
  ae,
3977
4006
  {
3978
4007
  gap: "1",
@@ -3983,8 +4012,8 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3983
4012
  "data-tgph-combobox-empty": !0,
3984
4013
  ...s,
3985
4014
  children: [
3986
- e === null ? /* @__PURE__ */ T(Ze, {}) : /* @__PURE__ */ T(Dn, { ...e }),
3987
- t === null ? /* @__PURE__ */ T(Ze, {}) : /* @__PURE__ */ T(Tt, { as: "span", children: t })
4015
+ e === null ? /* @__PURE__ */ T(tt, {}) : /* @__PURE__ */ T(In, { ...e }),
4016
+ t === null ? /* @__PURE__ */ T(tt, {}) : /* @__PURE__ */ T(Vt, { as: "span", children: t })
3988
4017
  ]
3989
4018
  }
3990
4019
  );
@@ -3996,15 +4025,15 @@ const ac = /* @__PURE__ */ Qs("div"), zt = /* @__PURE__ */ Qs("span"), cc = ({
3996
4025
  legacyBehavior: r = !1,
3997
4026
  ...i
3998
4027
  }) => {
3999
- const o = b.useContext(O), a = b.useCallback(
4028
+ const o = y.useContext(I), a = y.useCallback(
4000
4029
  (c) => !t || (t == null ? void 0 : t.length) === 0 ? !1 : t.some(
4001
- (u) => H(u, r) === c
4030
+ (u) => $(u, r) === c
4002
4031
  ),
4003
4032
  [t, r]
4004
4033
  );
4005
4034
  if (o.searchQuery && !a(o.searchQuery))
4006
4035
  return /* @__PURE__ */ T(
4007
- tr,
4036
+ sr,
4008
4037
  {
4009
4038
  leadingIcon: { icon: ur, "aria-hidden": !0 },
4010
4039
  mx: "1",
@@ -4027,7 +4056,7 @@ Object.assign(Cc, {
4027
4056
  Trigger: vc,
4028
4057
  Content: Tc,
4029
4058
  Options: wc,
4030
- Option: tr,
4059
+ Option: sr,
4031
4060
  Search: xc,
4032
4061
  Empty: Sc,
4033
4062
  Create: Vc,