@plyaz/ui 0.8.2 → 0.8.4

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,12 +1,12 @@
1
1
  import { jsxs as ri, jsx as tt } from "react/jsx-runtime";
2
- import { createContext as St, useRef as lt, useLayoutEffect as Gr, useEffect as Ut, useContext as B, useId as _r, useCallback as Je, useMemo as ae, Fragment as oi, createElement as Yr, useInsertionEffect as Xr, forwardRef as qr, Component as Zr, useState as Jr } from "react";
2
+ import { createContext as St, useRef as lt, useLayoutEffect as Gr, useEffect as Wt, useContext as B, useId as _r, useCallback as Je, useMemo as ae, Fragment as oi, createElement as Yr, useInsertionEffect as Xr, forwardRef as qr, Component as Zr, useState as Jr } from "react";
3
3
  import { c as Qr } from "../utils-B6yFEsav.js";
4
4
  const ai = St({});
5
5
  function le(t) {
6
6
  const e = lt(null);
7
7
  return e.current === null && (e.current = t()), e.current;
8
8
  }
9
- const Qe = typeof window < "u", tn = Qe ? Gr : Ut, en = /* @__PURE__ */ St(null);
9
+ const Qe = typeof window < "u", tn = Qe ? Gr : Wt, en = /* @__PURE__ */ St(null);
10
10
  function nn(t, e) {
11
11
  t.indexOf(e) === -1 && t.push(e);
12
12
  }
@@ -37,7 +37,7 @@ function rn(t) {
37
37
  let e;
38
38
  return () => (e === void 0 && (e = t()), e);
39
39
  }
40
- const j = /* @__NO_SIDE_EFFECTS__ */ (t) => t, to = (t, e) => (n) => e(t(n)), Kt = (...t) => t.reduce(to), wt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
40
+ const j = /* @__NO_SIDE_EFFECTS__ */ (t) => t, to = (t, e) => (n) => e(t(n)), Ut = (...t) => t.reduce(to), wt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
41
41
  const s = e - t;
42
42
  return s === 0 ? 1 : (n - t) / s;
43
43
  };
@@ -66,7 +66,7 @@ class on {
66
66
  this.subscriptions.length = 0;
67
67
  }
68
68
  }
69
- const G = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, $ = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
69
+ const G = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, K = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
70
70
  function an(t, e) {
71
71
  return e ? t * (1e3 / e) : 0;
72
72
  }
@@ -82,13 +82,13 @@ function so(t, e, n, s, i) {
82
82
  while (Math.abs(o) > eo && ++a < no);
83
83
  return r;
84
84
  }
85
- function $t(t, e, n, s) {
85
+ function Kt(t, e, n, s) {
86
86
  if (t === e && n === s)
87
87
  return j;
88
88
  const i = (o) => so(o, 0, 1, t, n);
89
89
  return (o) => o === 0 || o === 1 ? o : hi(i(o), e, s);
90
90
  }
91
- const fi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, di = (t) => (e) => 1 - t(1 - e), mi = /* @__PURE__ */ $t(0.33, 1.53, 0.69, 0.99), ln = /* @__PURE__ */ di(mi), pi = /* @__PURE__ */ fi(ln), gi = (t) => (t *= 2) < 1 ? 0.5 * ln(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), cn = (t) => 1 - Math.sin(Math.acos(t)), yi = di(cn), vi = fi(cn), io = /* @__PURE__ */ $t(0.42, 0, 1, 1), ro = /* @__PURE__ */ $t(0, 0, 0.58, 1), Ti = /* @__PURE__ */ $t(0.42, 0, 0.58, 1), oo = (t) => Array.isArray(t) && typeof t[0] != "number", xi = (t) => Array.isArray(t) && typeof t[0] == "number", Wn = {
91
+ const fi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, di = (t) => (e) => 1 - t(1 - e), mi = /* @__PURE__ */ Kt(0.33, 1.53, 0.69, 0.99), ln = /* @__PURE__ */ di(mi), pi = /* @__PURE__ */ fi(ln), gi = (t) => (t *= 2) < 1 ? 0.5 * ln(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), cn = (t) => 1 - Math.sin(Math.acos(t)), yi = di(cn), vi = fi(cn), io = /* @__PURE__ */ Kt(0.42, 0, 1, 1), ro = /* @__PURE__ */ Kt(0, 0, 0.58, 1), Ti = /* @__PURE__ */ Kt(0.42, 0, 0.58, 1), oo = (t) => Array.isArray(t) && typeof t[0] != "number", xi = (t) => Array.isArray(t) && typeof t[0] == "number", Wn = {
92
92
  linear: j,
93
93
  easeIn: io,
94
94
  easeInOut: Ti,
@@ -104,11 +104,11 @@ const fi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, di
104
104
  if (xi(t)) {
105
105
  _(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
106
106
  const [e, n, s, i] = t;
107
- return $t(e, n, s, i);
107
+ return Kt(e, n, s, i);
108
108
  } else if (ao(t))
109
109
  return _(Wn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Wn[t];
110
110
  return t;
111
- }, Gt = [
111
+ }, Ht = [
112
112
  "setup",
113
113
  // Compute
114
114
  "read",
@@ -171,38 +171,38 @@ function wi(t, e) {
171
171
  delta: 0,
172
172
  timestamp: 0,
173
173
  isProcessing: !1
174
- }, o = () => n = !0, r = Gt.reduce((y, S) => (y[S] = lo(o), y), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: m } = r, g = () => {
174
+ }, o = () => n = !0, r = Ht.reduce((y, S) => (y[S] = lo(o), y), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: m } = r, g = () => {
175
175
  const y = Z.useManualTiming ? i.timestamp : performance.now();
176
176
  n = !1, Z.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp, co), 1)), i.timestamp = y, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), h.process(i), f.process(i), d.process(i), m.process(i), i.isProcessing = !1, n && e && (s = !1, t(g));
177
177
  }, v = () => {
178
178
  n = !0, s = !0, i.isProcessing || t(g);
179
179
  };
180
- return { schedule: Gt.reduce((y, S) => {
180
+ return { schedule: Ht.reduce((y, S) => {
181
181
  const w = r[S];
182
- return y[S] = (A, E = !1, b = !1) => (n || v(), w.schedule(A, E, b)), y;
182
+ return y[S] = (A, C = !1, b = !1) => (n || v(), w.schedule(A, C, b)), y;
183
183
  }, {}), cancel: (y) => {
184
- for (let S = 0; S < Gt.length; S++)
185
- r[Gt[S]].cancel(y);
184
+ for (let S = 0; S < Ht.length; S++)
185
+ r[Ht[S]].cancel(y);
186
186
  }, state: i, steps: r };
187
187
  }
188
188
  const { schedule: P, cancel: Y, state: R, steps: de } = /* @__PURE__ */ wi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : j, !0);
189
- let qt;
189
+ let Xt;
190
190
  function uo() {
191
- qt = void 0;
191
+ Xt = void 0;
192
192
  }
193
- const I = {
194
- now: () => (qt === void 0 && I.set(R.isProcessing || Z.useManualTiming ? R.timestamp : performance.now()), qt),
193
+ const O = {
194
+ now: () => (Xt === void 0 && O.set(R.isProcessing || Z.useManualTiming ? R.timestamp : performance.now()), Xt),
195
195
  set: (t) => {
196
- qt = t, queueMicrotask(uo);
196
+ Xt = t, queueMicrotask(uo);
197
197
  }
198
198
  }, bi = (t) => (e) => typeof e == "string" && e.startsWith(t), un = /* @__PURE__ */ bi("--"), ho = /* @__PURE__ */ bi("var(--"), hn = (t) => ho(t) ? fo.test(t.split("/*")[0].trim()) : !1, fo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, At = {
199
199
  test: (t) => typeof t == "number",
200
200
  parse: parseFloat,
201
201
  transform: (t) => t
202
- }, Ot = {
202
+ }, Ft = {
203
203
  ...At,
204
204
  transform: (t) => q(0, 1, t)
205
- }, _t = {
205
+ }, Gt = {
206
206
  ...At,
207
207
  default: 1
208
208
  }, Rt = (t) => Math.round(t * 1e5) / 1e5, fn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
@@ -225,7 +225,7 @@ const po = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
225
225
  }, ot = {
226
226
  test: /* @__PURE__ */ dn("rgb", "red"),
227
227
  parse: /* @__PURE__ */ Si("red", "green", "blue"),
228
- transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + me.transform(t) + ", " + me.transform(e) + ", " + me.transform(n) + ", " + Rt(Ot.transform(s)) + ")"
228
+ transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + me.transform(t) + ", " + me.transform(e) + ", " + me.transform(n) + ", " + Rt(Ft.transform(s)) + ")"
229
229
  };
230
230
  function yo(t) {
231
231
  let e = "", n = "", s = "", i = "";
@@ -240,25 +240,25 @@ const Ee = {
240
240
  test: /* @__PURE__ */ dn("#"),
241
241
  parse: yo,
242
242
  transform: ot.transform
243
- }, zt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
243
+ }, $t = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
244
244
  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
245
245
  parse: parseFloat,
246
246
  transform: (e) => `${e}${t}`
247
- }), J = /* @__PURE__ */ zt("deg"), X = /* @__PURE__ */ zt("%"), x = /* @__PURE__ */ zt("px"), vo = /* @__PURE__ */ zt("vh"), To = /* @__PURE__ */ zt("vw"), Kn = {
247
+ }), J = /* @__PURE__ */ $t("deg"), X = /* @__PURE__ */ $t("%"), x = /* @__PURE__ */ $t("px"), vo = /* @__PURE__ */ $t("vh"), To = /* @__PURE__ */ $t("vw"), Kn = {
248
248
  ...X,
249
249
  parse: (t) => X.parse(t) / 100,
250
250
  transform: (t) => X.transform(t * 100)
251
251
  }, dt = {
252
252
  test: /* @__PURE__ */ dn("hsl", "hue"),
253
253
  parse: /* @__PURE__ */ Si("hue", "saturation", "lightness"),
254
- transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + X.transform(Rt(e)) + ", " + X.transform(Rt(n)) + ", " + Rt(Ot.transform(s)) + ")"
255
- }, C = {
254
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + X.transform(Rt(e)) + ", " + X.transform(Rt(n)) + ", " + Rt(Ft.transform(s)) + ")"
255
+ }, D = {
256
256
  test: (t) => ot.test(t) || Ee.test(t) || dt.test(t),
257
257
  parse: (t) => ot.test(t) ? ot.parse(t) : dt.test(t) ? dt.parse(t) : Ee.parse(t),
258
258
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? ot.transform(t) : dt.transform(t),
259
259
  getAnimatableNone: (t) => {
260
- const e = C.parse(t);
261
- return e.alpha = 0, C.transform(e);
260
+ const e = D.parse(t);
261
+ return e.alpha = 0, D.transform(e);
262
262
  }
263
263
  }, xo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
264
264
  function wo(t) {
@@ -273,7 +273,7 @@ function It(t) {
273
273
  var: []
274
274
  }, i = [];
275
275
  let o = 0;
276
- const a = e.replace(Po, (l) => (C.test(l) ? (s.color.push(o), i.push(Ai), n.push(C.parse(l))) : l.startsWith(So) ? (s.var.push(o), i.push(bo), n.push(l)) : (s.number.push(o), i.push(Pi), n.push(parseFloat(l))), ++o, $n)).split($n);
276
+ const a = e.replace(Po, (l) => (D.test(l) ? (s.color.push(o), i.push(Ai), n.push(D.parse(l))) : l.startsWith(So) ? (s.var.push(o), i.push(bo), n.push(l)) : (s.number.push(o), i.push(Pi), n.push(parseFloat(l))), ++o, $n)).split($n);
277
277
  return { values: n, split: a, indexes: s, types: i };
278
278
  }
279
279
  function Vi(t) {
@@ -286,12 +286,12 @@ function Mi(t) {
286
286
  for (let r = 0; r < s; r++)
287
287
  if (o += e[r], i[r] !== void 0) {
288
288
  const a = n[r];
289
- a === Pi ? o += Rt(i[r]) : a === Ai ? o += C.transform(i[r]) : o += i[r];
289
+ a === Pi ? o += Rt(i[r]) : a === Ai ? o += D.transform(i[r]) : o += i[r];
290
290
  }
291
291
  return o;
292
292
  };
293
293
  }
294
- const Ao = (t) => typeof t == "number" ? 0 : C.test(t) ? C.getAnimatableNone(t) : t;
294
+ const Ao = (t) => typeof t == "number" ? 0 : D.test(t) ? D.getAnimatableNone(t) : t;
295
295
  function Vo(t) {
296
296
  const e = Vi(t);
297
297
  return Mi(t)(e.map(Ao));
@@ -321,7 +321,7 @@ function Mo({ hue: t, saturation: e, lightness: n, alpha: s }) {
321
321
  alpha: s
322
322
  };
323
323
  }
324
- function ne(t, e) {
324
+ function ee(t, e) {
325
325
  return (n) => n > 0 ? e : t;
326
326
  }
327
327
  const M = (t, e, n) => t + (e - t) * n, ge = (t, e, n) => {
@@ -338,7 +338,7 @@ function zn(t) {
338
338
  const Hn = (t, e) => {
339
339
  const n = zn(t), s = zn(e);
340
340
  if (!n || !s)
341
- return ne(t, e);
341
+ return ee(t, e);
342
342
  const i = { ...n };
343
343
  return (o) => (i.red = ge(n.red, s.red, o), i.green = ge(n.green, s.green, o), i.blue = ge(n.blue, s.blue, o), i.alpha = M(n.alpha, s.alpha, o), ot.transform(i));
344
344
  }, Re = /* @__PURE__ */ new Set(["none", "hidden"]);
@@ -349,7 +349,7 @@ function Ro(t, e) {
349
349
  return (n) => M(t, e, n);
350
350
  }
351
351
  function mn(t) {
352
- return typeof t == "number" ? Ro : typeof t == "string" ? hn(t) ? ne : C.test(t) ? Hn : Bo : Array.isArray(t) ? Di : typeof t == "object" ? C.test(t) ? Hn : Lo : ne;
352
+ return typeof t == "number" ? Ro : typeof t == "string" ? hn(t) ? ee : D.test(t) ? Hn : Bo : Array.isArray(t) ? Di : typeof t == "object" ? D.test(t) ? Hn : Lo : ee;
353
353
  }
354
354
  function Di(t, e) {
355
355
  const n = [...t], s = n.length, i = t.map((o, r) => mn(o)(o, e[r]));
@@ -379,7 +379,7 @@ function ko(t, e) {
379
379
  }
380
380
  const Bo = (t, e) => {
381
381
  const n = et.createTransformer(e), s = It(t), i = It(e);
382
- return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Re.has(t) && !i.values.length || Re.has(e) && !s.values.length ? Eo(t, e) : Kt(Di(ko(s, i), i.values), n) : (Pt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), ne(t, e));
382
+ return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Re.has(t) && !i.values.length || Re.has(e) && !s.values.length ? Eo(t, e) : Ut(Di(ko(s, i), i.values), n) : (Pt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), ee(t, e));
383
383
  };
384
384
  function Ci(t, e, n) {
385
385
  return typeof t == "number" && typeof e == "number" && typeof n == "number" ? M(t, e, n) : mn(t)(t, e);
@@ -393,7 +393,7 @@ const Fo = (t) => {
393
393
  * If we're processing this frame we can use the
394
394
  * framelocked timestamp to keep things in sync.
395
395
  */
396
- now: () => R.isProcessing ? R.timestamp : I.now()
396
+ now: () => R.isProcessing ? R.timestamp : O.now()
397
397
  };
398
398
  }, Ei = (t, e, n = 10) => {
399
399
  let s = "";
@@ -401,26 +401,26 @@ const Fo = (t) => {
401
401
  for (let o = 0; o < i; o++)
402
402
  s += Math.round(t(o / (i - 1)) * 1e4) / 1e4 + ", ";
403
403
  return `linear(${s.substring(0, s.length - 2)})`;
404
- }, se = 2e4;
404
+ }, ne = 2e4;
405
405
  function pn(t) {
406
406
  let e = 0;
407
407
  const n = 50;
408
408
  let s = t.next(e);
409
- for (; !s.done && e < se; )
409
+ for (; !s.done && e < ne; )
410
410
  e += n, s = t.next(e);
411
- return e >= se ? 1 / 0 : e;
411
+ return e >= ne ? 1 / 0 : e;
412
412
  }
413
- function Oo(t, e = 100, n) {
414
- const s = n({ ...t, keyframes: [0, e] }), i = Math.min(pn(s), se);
413
+ function Io(t, e = 100, n) {
414
+ const s = n({ ...t, keyframes: [0, e] }), i = Math.min(pn(s), ne);
415
415
  return {
416
416
  type: "keyframes",
417
417
  ease: (o) => s.next(i * o).value / e,
418
- duration: /* @__PURE__ */ $(i)
418
+ duration: /* @__PURE__ */ K(i)
419
419
  };
420
420
  }
421
- const Io = 5;
421
+ const Oo = 5;
422
422
  function Ri(t, e, n) {
423
- const s = Math.max(e - Io, 0);
423
+ const s = Math.max(e - Oo, 0);
424
424
  return an(n - t(s), e - s);
425
425
  }
426
426
  const V = {
@@ -456,7 +456,7 @@ function jo({ duration: t = V.duration, bounce: e = V.bounce, velocity: n = V.ve
456
456
  let i, o;
457
457
  Pt(t <= /* @__PURE__ */ G(V.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
458
458
  let r = 1 - e;
459
- r = q(V.minDamping, V.maxDamping, r), t = q(V.minDuration, V.maxDuration, /* @__PURE__ */ $(t)), r < 1 ? (i = (u) => {
459
+ r = q(V.minDamping, V.maxDamping, r), t = q(V.minDuration, V.maxDuration, /* @__PURE__ */ K(t)), r < 1 ? (i = (u) => {
460
460
  const c = u * r, h = c * t, f = c - n, d = Le(u, r), m = Math.exp(-h);
461
461
  return ye - f / d * m;
462
462
  }, o = (u) => {
@@ -527,7 +527,7 @@ function $o(t) {
527
527
  }
528
528
  return e;
529
529
  }
530
- function ie(t = V.visualDuration, e = V.bounce) {
530
+ function se(t = V.visualDuration, e = V.bounce) {
531
531
  const n = typeof t != "object" ? {
532
532
  visualDuration: t,
533
533
  keyframes: [0, 1],
@@ -536,23 +536,23 @@ function ie(t = V.visualDuration, e = V.bounce) {
536
536
  let { restSpeed: s, restDelta: i } = n;
537
537
  const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: h, velocity: f, isResolvedFromDuration: d } = $o({
538
538
  ...n,
539
- velocity: -/* @__PURE__ */ $(n.velocity || 0)
540
- }), m = f || 0, g = u / (2 * Math.sqrt(l * c)), v = r - o, p = /* @__PURE__ */ $(Math.sqrt(l / c)), T = Math.abs(v) < 5;
539
+ velocity: -/* @__PURE__ */ K(n.velocity || 0)
540
+ }), m = f || 0, g = u / (2 * Math.sqrt(l * c)), v = r - o, p = /* @__PURE__ */ K(Math.sqrt(l / c)), T = Math.abs(v) < 5;
541
541
  s || (s = T ? V.restSpeed.granular : V.restSpeed.default), i || (i = T ? V.restDelta.granular : V.restDelta.default);
542
542
  let y;
543
543
  if (g < 1) {
544
544
  const w = Le(p, g);
545
545
  y = (A) => {
546
- const E = Math.exp(-g * p * A);
547
- return r - E * ((m + g * p * v) / w * Math.sin(w * A) + v * Math.cos(w * A));
546
+ const C = Math.exp(-g * p * A);
547
+ return r - C * ((m + g * p * v) / w * Math.sin(w * A) + v * Math.cos(w * A));
548
548
  };
549
549
  } else if (g === 1)
550
550
  y = (w) => r - Math.exp(-p * w) * (v + (m + p * v) * w);
551
551
  else {
552
552
  const w = p * Math.sqrt(g * g - 1);
553
553
  y = (A) => {
554
- const E = Math.exp(-g * p * A), b = Math.min(w * A, 300);
555
- return r - E * ((m + g * p * v) * Math.sinh(b) + w * v * Math.cosh(b)) / w;
554
+ const C = Math.exp(-g * p * A), b = Math.min(w * A, 300);
555
+ return r - C * ((m + g * p * v) * Math.sinh(b) + w * v * Math.cosh(b)) / w;
556
556
  };
557
557
  }
558
558
  const S = {
@@ -562,15 +562,15 @@ function ie(t = V.visualDuration, e = V.bounce) {
562
562
  if (d)
563
563
  a.done = w >= h;
564
564
  else {
565
- let E = w === 0 ? m : 0;
566
- g < 1 && (E = w === 0 ? /* @__PURE__ */ G(m) : Ri(y, w, A));
567
- const b = Math.abs(E) <= s, O = Math.abs(r - A) <= i;
568
- a.done = b && O;
565
+ let C = w === 0 ? m : 0;
566
+ g < 1 && (C = w === 0 ? /* @__PURE__ */ G(m) : Ri(y, w, A));
567
+ const b = Math.abs(C) <= s, I = Math.abs(r - A) <= i;
568
+ a.done = b && I;
569
569
  }
570
570
  return a.value = a.done ? r : A, a;
571
571
  },
572
572
  toString: () => {
573
- const w = Math.min(pn(S), se), A = Ei((E) => S.next(w * E).value, w, 30);
573
+ const w = Math.min(pn(S), ne), A = Ei((C) => S.next(w * C).value, w, 30);
574
574
  return w + "ms " + A;
575
575
  },
576
576
  toTransition: () => {
@@ -578,8 +578,8 @@ function ie(t = V.visualDuration, e = V.bounce) {
578
578
  };
579
579
  return S;
580
580
  }
581
- ie.applyToOptions = (t) => {
582
- const e = Oo(t, 100, ie);
581
+ se.applyToOptions = (t) => {
582
+ const e = Io(t, 100, se);
583
583
  return t.ease = e.ease, t.duration = /* @__PURE__ */ G(e.duration), t.type = "keyframes", t;
584
584
  };
585
585
  function ke({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
@@ -591,12 +591,12 @@ function ke({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
591
591
  const v = h + g, p = r === void 0 ? v : r(v);
592
592
  p !== v && (g = p - h);
593
593
  const T = (b) => -g * Math.exp(-b / s), y = (b) => p + T(b), S = (b) => {
594
- const O = T(b), N = y(b);
595
- f.done = Math.abs(O) <= u, f.value = f.done ? p : N;
594
+ const I = T(b), N = y(b);
595
+ f.done = Math.abs(I) <= u, f.value = f.done ? p : N;
596
596
  };
597
597
  let w, A;
598
- const E = (b) => {
599
- d(f.value) && (w = b, A = ie({
598
+ const C = (b) => {
599
+ d(f.value) && (w = b, A = se({
600
600
  keyframes: [f.value, m(f.value)],
601
601
  velocity: Ri(y, b, f.value),
602
602
  // TODO: This should be passing * 1000
@@ -606,11 +606,11 @@ function ke({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
606
606
  restSpeed: c
607
607
  }));
608
608
  };
609
- return E(0), {
609
+ return C(0), {
610
610
  calculatedDuration: null,
611
611
  next: (b) => {
612
- let O = !1;
613
- return !A && w === void 0 && (O = !0, S(b), E(b)), w !== void 0 && b >= w ? A.next(b - w) : (!O && S(b), f);
612
+ let I = !1;
613
+ return !A && w === void 0 && (I = !0, S(b), C(b)), w !== void 0 && b >= w ? A.next(b - w) : (!I && S(b), f);
614
614
  }
615
615
  };
616
616
  }
@@ -620,7 +620,7 @@ function zo(t, e, n) {
620
620
  let a = i(t[r], t[r + 1]);
621
621
  if (e) {
622
622
  const l = Array.isArray(e) ? e[r] || j : e;
623
- a = Kt(l, a);
623
+ a = Ut(l, a);
624
624
  }
625
625
  s.push(a);
626
626
  }
@@ -690,7 +690,7 @@ const Xo = {
690
690
  inertia: ke,
691
691
  tween: mt,
692
692
  keyframes: mt,
693
- spring: ie
693
+ spring: se
694
694
  };
695
695
  function ki(t) {
696
696
  typeof t.type == "string" && (t.type = Xo[t.type]);
@@ -725,7 +725,7 @@ class Tn extends vn {
725
725
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
726
726
  var s, i;
727
727
  const { motionValue: n } = this.options;
728
- n && n.updatedAt !== I.now() && this.tick(I.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (s = this.options).onStop) == null || i.call(s));
728
+ n && n.updatedAt !== O.now() && this.tick(O.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (s = this.options).onStop) == null || i.call(s));
729
729
  }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
730
730
  }
731
731
  initAnimation() {
@@ -734,7 +734,7 @@ class Tn extends vn {
734
734
  const { type: n = mt, repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = e;
735
735
  let { keyframes: a } = e;
736
736
  const l = n || mt;
737
- process.env.NODE_ENV !== "production" && l !== mt && _(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== mt && typeof a[0] != "number" && (this.mixKeyframes = Kt(qo, Ci(a[0], a[1])), a = [0, 100]);
737
+ process.env.NODE_ENV !== "production" && l !== mt && _(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== mt && typeof a[0] != "number" && (this.mixKeyframes = Ut(qo, Ci(a[0], a[1])), a = [0, 100]);
738
738
  const u = l({ ...e, keyframes: a });
739
739
  o === "mirror" && (this.mirroredGenerator = l({
740
740
  ...e,
@@ -759,15 +759,15 @@ class Tn extends vn {
759
759
  let y = this.currentTime, S = s;
760
760
  if (h) {
761
761
  const b = Math.min(this.currentTime, i) / a;
762
- let O = Math.floor(b), N = b % 1;
763
- !N && b >= 1 && (N = 1), N === 1 && O--, O = Math.min(O, h + 1), !!(O % 2) && (f === "reverse" ? (N = 1 - N, d && (N -= d / a)) : f === "mirror" && (S = r)), y = q(0, 1, N) * a;
762
+ let I = Math.floor(b), N = b % 1;
763
+ !N && b >= 1 && (N = 1), N === 1 && I--, I = Math.min(I, h + 1), !!(I % 2) && (f === "reverse" ? (N = 1 - N, d && (N -= d / a)) : f === "mirror" && (S = r)), y = q(0, 1, N) * a;
764
764
  }
765
765
  const w = T ? { done: !1, value: c[0] } : S.next(y);
766
766
  o && (w.value = o(w.value));
767
767
  let { done: A } = w;
768
768
  !T && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
769
- const E = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
770
- return E && m !== ke && (w.value = yn(c, this.options, v, this.speed)), g && g(w.value), E && this.finish(), w;
769
+ const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
770
+ return C && m !== ke && (w.value = yn(c, this.options, v, this.speed)), g && g(w.value), C && this.finish(), w;
771
771
  }
772
772
  /**
773
773
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -778,14 +778,14 @@ class Tn extends vn {
778
778
  return this.finished.then(e, n);
779
779
  }
780
780
  get duration() {
781
- return /* @__PURE__ */ $(this.calculatedDuration);
781
+ return /* @__PURE__ */ K(this.calculatedDuration);
782
782
  }
783
783
  get iterationDuration() {
784
784
  const { delay: e = 0 } = this.options || {};
785
- return this.duration + /* @__PURE__ */ $(e);
785
+ return this.duration + /* @__PURE__ */ K(e);
786
786
  }
787
787
  get time() {
788
- return /* @__PURE__ */ $(this.currentTime);
788
+ return /* @__PURE__ */ K(this.currentTime);
789
789
  }
790
790
  set time(e) {
791
791
  var n;
@@ -795,9 +795,9 @@ class Tn extends vn {
795
795
  return this.playbackSpeed;
796
796
  }
797
797
  set speed(e) {
798
- this.updateTime(I.now());
798
+ this.updateTime(O.now());
799
799
  const n = this.playbackSpeed !== e;
800
- this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ $(this.currentTime));
800
+ this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ K(this.currentTime));
801
801
  }
802
802
  play() {
803
803
  var i, o;
@@ -809,7 +809,7 @@ class Tn extends vn {
809
809
  this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
810
810
  }
811
811
  pause() {
812
- this.state = "paused", this.updateTime(I.now()), this.holdTime = this.currentTime;
812
+ this.state = "paused", this.updateTime(O.now()), this.holdTime = this.currentTime;
813
813
  }
814
814
  complete() {
815
815
  this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
@@ -874,12 +874,12 @@ const at = (t) => t * 180 / Math.PI, Be = (t) => {
874
874
  skewY: (t) => at(Math.atan(t[1])),
875
875
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
876
876
  };
877
- function Oe(t) {
877
+ function Ie(t) {
878
878
  return t.includes("scale") ? 1 : 0;
879
879
  }
880
- function Ie(t, e) {
880
+ function Oe(t, e) {
881
881
  if (!t || t === "none")
882
- return Oe(e);
882
+ return Ie(e);
883
883
  const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
884
884
  let s, i;
885
885
  if (n)
@@ -889,13 +889,13 @@ function Ie(t, e) {
889
889
  s = Jo, i = a;
890
890
  }
891
891
  if (!i)
892
- return Oe(e);
892
+ return Ie(e);
893
893
  const o = s[e], r = i[1].split(",").map(ea);
894
894
  return typeof o == "function" ? o(r) : r[o];
895
895
  }
896
896
  const ta = (t, e) => {
897
897
  const { transform: n = "none" } = getComputedStyle(t);
898
- return Ie(n, e);
898
+ return Oe(n, e);
899
899
  };
900
900
  function ea(t) {
901
901
  return parseFloat(t.trim());
@@ -935,8 +935,8 @@ const ct = {
935
935
  bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
936
936
  right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
937
937
  // Transform
938
- x: (t, { transform: e }) => Ie(e, "x"),
939
- y: (t, { transform: e }) => Ie(e, "y")
938
+ x: (t, { transform: e }) => Oe(e, "x"),
939
+ y: (t, { transform: e }) => Oe(e, "y")
940
940
  };
941
941
  ct.translateX = ct.x;
942
942
  ct.translateY = ct.y;
@@ -1012,12 +1012,12 @@ const oa = (t) => t.startsWith("--");
1012
1012
  function aa(t, e, n) {
1013
1013
  oa(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1014
1014
  }
1015
- const Oi = /* @__PURE__ */ rn(() => window.ScrollTimeline !== void 0), la = {};
1015
+ const Ii = /* @__PURE__ */ rn(() => window.ScrollTimeline !== void 0), la = {};
1016
1016
  function ca(t, e) {
1017
1017
  const n = /* @__PURE__ */ rn(t);
1018
1018
  return () => la[e] ?? n();
1019
1019
  }
1020
- const Ii = /* @__PURE__ */ ca(() => {
1020
+ const Oi = /* @__PURE__ */ ca(() => {
1021
1021
  try {
1022
1022
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1023
1023
  } catch {
@@ -1037,7 +1037,7 @@ const Ii = /* @__PURE__ */ ca(() => {
1037
1037
  };
1038
1038
  function ji(t, e) {
1039
1039
  if (t)
1040
- return typeof t == "function" ? Ii() ? Ei(t, e) : "ease-out" : xi(t) ? Et(t) : Array.isArray(t) ? t.map((n) => ji(n, e) || Zn.easeOut) : Zn[t];
1040
+ return typeof t == "function" ? Oi() ? Ei(t, e) : "ease-out" : xi(t) ? Et(t) : Array.isArray(t) ? t.map((n) => ji(n, e) || Zn.easeOut) : Zn[t];
1041
1041
  }
1042
1042
  function ua(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
1043
1043
  const c = {
@@ -1060,7 +1060,7 @@ function Ni(t) {
1060
1060
  return typeof t == "function" && "applyToOptions" in t;
1061
1061
  }
1062
1062
  function ha({ type: t, ...e }) {
1063
- return Ni(t) && Ii() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1063
+ return Ni(t) && Oi() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1064
1064
  }
1065
1065
  class fa extends vn {
1066
1066
  constructor(e) {
@@ -1119,14 +1119,14 @@ class fa extends vn {
1119
1119
  get duration() {
1120
1120
  var n, s;
1121
1121
  const e = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
1122
- return /* @__PURE__ */ $(Number(e));
1122
+ return /* @__PURE__ */ K(Number(e));
1123
1123
  }
1124
1124
  get iterationDuration() {
1125
1125
  const { delay: e = 0 } = this.options || {};
1126
- return this.duration + /* @__PURE__ */ $(e);
1126
+ return this.duration + /* @__PURE__ */ K(e);
1127
1127
  }
1128
1128
  get time() {
1129
- return /* @__PURE__ */ $(Number(this.animation.currentTime) || 0);
1129
+ return /* @__PURE__ */ K(Number(this.animation.currentTime) || 0);
1130
1130
  }
1131
1131
  set time(e) {
1132
1132
  this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ G(e);
@@ -1155,7 +1155,7 @@ class fa extends vn {
1155
1155
  */
1156
1156
  attachTimeline({ timeline: e, observe: n }) {
1157
1157
  var s;
1158
- return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && Oi() ? (this.animation.timeline = e, j) : n(this);
1158
+ return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && Ii() ? (this.animation.timeline = e, j) : n(this);
1159
1159
  }
1160
1160
  }
1161
1161
  const Wi = {
@@ -1247,7 +1247,7 @@ class ba extends vn {
1247
1247
  super(), this.stop = () => {
1248
1248
  var g, v;
1249
1249
  this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (v = this.keyframeResolver) == null || v.cancel();
1250
- }, this.createdAt = I.now();
1250
+ }, this.createdAt = O.now();
1251
1251
  const f = {
1252
1252
  autoplay: e,
1253
1253
  delay: n,
@@ -1265,7 +1265,7 @@ class ba extends vn {
1265
1265
  onKeyframesResolved(e, n, s, i) {
1266
1266
  this.keyframeResolver = void 0;
1267
1267
  const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = s;
1268
- this.resolvedAt = I.now(), ya(e, o, r, a) || ((Z.instantAnimations || !l) && (c == null || c(yn(e, s, n))), e[0] = e[e.length - 1], Ue(s), s.repeat = 0);
1268
+ this.resolvedAt = O.now(), ya(e, o, r, a) || ((Z.instantAnimations || !l) && (c == null || c(yn(e, s, n))), e[0] = e[e.length - 1], Ue(s), s.repeat = 0);
1269
1269
  const f = {
1270
1270
  startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > wa ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1271
1271
  finalKeyframe: n,
@@ -1397,10 +1397,10 @@ const Ea = /\b([a-z-]*)\(.*?\)/gu, Ke = {
1397
1397
  rotateX: J,
1398
1398
  rotateY: J,
1399
1399
  rotateZ: J,
1400
- scale: _t,
1401
- scaleX: _t,
1402
- scaleY: _t,
1403
- scaleZ: _t,
1400
+ scale: Gt,
1401
+ scaleX: Gt,
1402
+ scaleY: Gt,
1403
+ scaleZ: Gt,
1404
1404
  skew: J,
1405
1405
  skewX: J,
1406
1406
  skewY: J,
@@ -1413,7 +1413,7 @@ const Ea = /\b([a-z-]*)\(.*?\)/gu, Ke = {
1413
1413
  z: x,
1414
1414
  perspective: x,
1415
1415
  transformPerspective: x,
1416
- opacity: Ot,
1416
+ opacity: Ft,
1417
1417
  originX: Kn,
1418
1418
  originY: Kn,
1419
1419
  originZ: x
@@ -1456,23 +1456,23 @@ const Ea = /\b([a-z-]*)\(.*?\)/gu, Ke = {
1456
1456
  ...Ra,
1457
1457
  zIndex: es,
1458
1458
  // SVG
1459
- fillOpacity: Ot,
1460
- strokeOpacity: Ot,
1459
+ fillOpacity: Ft,
1460
+ strokeOpacity: Ft,
1461
1461
  numOctaves: es
1462
1462
  }, La = {
1463
1463
  ...bn,
1464
1464
  // Color props
1465
- color: C,
1466
- backgroundColor: C,
1467
- outlineColor: C,
1468
- fill: C,
1469
- stroke: C,
1465
+ color: D,
1466
+ backgroundColor: D,
1467
+ outlineColor: D,
1468
+ fill: D,
1469
+ stroke: D,
1470
1470
  // Border props
1471
- borderColor: C,
1472
- borderTopColor: C,
1473
- borderRightColor: C,
1474
- borderBottomColor: C,
1475
- borderLeftColor: C,
1471
+ borderColor: D,
1472
+ borderTopColor: D,
1473
+ borderRightColor: D,
1474
+ borderBottomColor: D,
1475
+ borderLeftColor: D,
1476
1476
  filter: Ke,
1477
1477
  WebkitFilter: Ke
1478
1478
  }, Hi = (t) => La[t];
@@ -1558,10 +1558,10 @@ const Yi = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
1558
1558
  function Xi(t) {
1559
1559
  return ci(t) && "offsetHeight" in t;
1560
1560
  }
1561
- const ns = 30, Oa = (t) => !isNaN(parseFloat(t)), Lt = {
1561
+ const ns = 30, Ia = (t) => !isNaN(parseFloat(t)), Lt = {
1562
1562
  current: void 0
1563
1563
  };
1564
- class Ia {
1564
+ class Oa {
1565
1565
  /**
1566
1566
  * @param init - The initiating value
1567
1567
  * @param config - Optional configuration options
@@ -1571,14 +1571,14 @@ class Ia {
1571
1571
  constructor(e, n = {}) {
1572
1572
  this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
1573
1573
  var o;
1574
- const i = I.now();
1574
+ const i = O.now();
1575
1575
  if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((o = this.events.change) == null || o.notify(this.current), this.dependents))
1576
1576
  for (const r of this.dependents)
1577
1577
  r.dirty();
1578
1578
  }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1579
1579
  }
1580
1580
  setCurrent(e) {
1581
- this.current = e, this.updatedAt = I.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Oa(this.current));
1581
+ this.current = e, this.updatedAt = O.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Ia(this.current));
1582
1582
  }
1583
1583
  setPrevFrameValue(e = this.current) {
1584
1584
  this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
@@ -1707,7 +1707,7 @@ class Ia {
1707
1707
  * @public
1708
1708
  */
1709
1709
  getVelocity() {
1710
- const e = I.now();
1710
+ const e = O.now();
1711
1711
  if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > ns)
1712
1712
  return 0;
1713
1713
  const n = Math.min(this.updatedAt - this.prevUpdatedAt, ns);
@@ -1764,7 +1764,7 @@ class Ia {
1764
1764
  }
1765
1765
  }
1766
1766
  function H(t, e) {
1767
- return new Ia(t, e);
1767
+ return new Oa(t, e);
1768
1768
  }
1769
1769
  const { schedule: Sn } = /* @__PURE__ */ wi(queueMicrotask, !1), z = {
1770
1770
  x: !1,
@@ -1817,7 +1817,7 @@ const Ji = (t, e) => e ? t === e ? !0 : Ji(t, e.parentElement) : !1, Pn = (t) =>
1817
1817
  function Ua(t) {
1818
1818
  return Wa.has(t.tagName) || t.tabIndex !== -1;
1819
1819
  }
1820
- const Zt = /* @__PURE__ */ new WeakSet();
1820
+ const qt = /* @__PURE__ */ new WeakSet();
1821
1821
  function is(t) {
1822
1822
  return (e) => {
1823
1823
  e.key === "Enter" && t(e);
@@ -1831,7 +1831,7 @@ const Ka = (t, e) => {
1831
1831
  if (!n)
1832
1832
  return;
1833
1833
  const s = is(() => {
1834
- if (Zt.has(n))
1834
+ if (qt.has(n))
1835
1835
  return;
1836
1836
  ve(n, "down");
1837
1837
  const i = is(() => {
@@ -1849,9 +1849,9 @@ function $a(t, e, n = {}) {
1849
1849
  const l = a.currentTarget;
1850
1850
  if (!rs(a))
1851
1851
  return;
1852
- Zt.add(l);
1852
+ qt.add(l);
1853
1853
  const u = e(l, a), c = (d, m) => {
1854
- window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Zt.has(l) && Zt.delete(l), rs(d) && typeof u == "function" && u(d, { success: m });
1854
+ window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), qt.has(l) && qt.delete(l), rs(d) && typeof u == "function" && u(d, { success: m });
1855
1855
  }, h = (d) => {
1856
1856
  c(d, l === window || l === document || n.useGlobalTarget || Ji(l, d.target));
1857
1857
  }, f = (d) => {
@@ -1866,12 +1866,12 @@ function $a(t, e, n = {}) {
1866
1866
  function An(t) {
1867
1867
  return ci(t) && "ownerSVGElement" in t;
1868
1868
  }
1869
- const Jt = /* @__PURE__ */ new WeakMap();
1869
+ const Zt = /* @__PURE__ */ new WeakMap();
1870
1870
  let Q;
1871
1871
  const Qi = (t, e, n) => (s, i) => i && i[0] ? i[0][t + "Size"] : An(s) && "getBBox" in s ? s.getBBox()[e] : s[n], za = /* @__PURE__ */ Qi("inline", "width", "offsetWidth"), Ha = /* @__PURE__ */ Qi("block", "height", "offsetHeight");
1872
1872
  function Ga({ target: t, borderBoxSize: e }) {
1873
1873
  var n;
1874
- (n = Jt.get(t)) == null || n.forEach((s) => {
1874
+ (n = Zt.get(t)) == null || n.forEach((s) => {
1875
1875
  s(t, {
1876
1876
  get width() {
1877
1877
  return za(t, e);
@@ -1892,16 +1892,16 @@ function Xa(t, e) {
1892
1892
  Q || Ya();
1893
1893
  const n = _i(t);
1894
1894
  return n.forEach((s) => {
1895
- let i = Jt.get(s);
1896
- i || (i = /* @__PURE__ */ new Set(), Jt.set(s, i)), i.add(e), Q == null || Q.observe(s);
1895
+ let i = Zt.get(s);
1896
+ i || (i = /* @__PURE__ */ new Set(), Zt.set(s, i)), i.add(e), Q == null || Q.observe(s);
1897
1897
  }), () => {
1898
1898
  n.forEach((s) => {
1899
- const i = Jt.get(s);
1899
+ const i = Zt.get(s);
1900
1900
  i == null || i.delete(e), i != null && i.size || Q == null || Q.unobserve(s);
1901
1901
  });
1902
1902
  };
1903
1903
  }
1904
- const Qt = /* @__PURE__ */ new Set();
1904
+ const Jt = /* @__PURE__ */ new Set();
1905
1905
  let pt;
1906
1906
  function qa() {
1907
1907
  pt = () => {
@@ -1913,12 +1913,12 @@ function qa() {
1913
1913
  return window.innerHeight;
1914
1914
  }
1915
1915
  };
1916
- Qt.forEach((e) => e(t));
1916
+ Jt.forEach((e) => e(t));
1917
1917
  }, window.addEventListener("resize", pt);
1918
1918
  }
1919
1919
  function Za(t) {
1920
- return Qt.add(t), pt || qa(), () => {
1921
- Qt.delete(t), !Qt.size && typeof pt == "function" && (window.removeEventListener("resize", pt), pt = void 0);
1920
+ return Jt.add(t), pt || qa(), () => {
1921
+ Jt.delete(t), !Jt.size && typeof pt == "function" && (window.removeEventListener("resize", pt), pt = void 0);
1922
1922
  };
1923
1923
  }
1924
1924
  function Ja(t, e) {
@@ -1939,7 +1939,7 @@ function tl(...t) {
1939
1939
  const e = !Array.isArray(t[0]), n = e ? 0 : -1, s = t[0 + n], i = t[1 + n], o = t[2 + n], r = t[3 + n], a = gn(i, o, r);
1940
1940
  return e ? a(s) : a;
1941
1941
  }
1942
- const k = (t) => !!(t && t.getVelocity), el = [...zi, C, et], nl = (t) => el.find($i(t)), Vn = St({
1942
+ const k = (t) => !!(t && t.getVelocity), el = [...zi, D, et], nl = (t) => el.find($i(t)), Vn = St({
1943
1943
  transformPagePoint: (t) => t,
1944
1944
  isStatic: !1,
1945
1945
  reducedMotion: "never"
@@ -1949,7 +1949,7 @@ function sl(t = !0) {
1949
1949
  if (e === null)
1950
1950
  return [!0, null];
1951
1951
  const { isPresent: n, onExitComplete: s, register: i } = e, o = _r();
1952
- Ut(() => {
1952
+ Wt(() => {
1953
1953
  if (t)
1954
1954
  return i(o);
1955
1955
  }, [t]);
@@ -2019,12 +2019,12 @@ const rl = /* @__PURE__ */ new Set([
2019
2019
  "ignoreStrict",
2020
2020
  "viewport"
2021
2021
  ]);
2022
- function re(t) {
2022
+ function ie(t) {
2023
2023
  return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || rl.has(t);
2024
2024
  }
2025
- let nr = (t) => !re(t);
2025
+ let nr = (t) => !ie(t);
2026
2026
  function ol(t) {
2027
- typeof t == "function" && (nr = (e) => e.startsWith("on") ? !re(e) : t(e));
2027
+ typeof t == "function" && (nr = (e) => e.startsWith("on") ? !ie(e) : t(e));
2028
2028
  }
2029
2029
  try {
2030
2030
  ol(require("@emotion/is-prop-valid").default);
@@ -2033,7 +2033,7 @@ try {
2033
2033
  function al(t, e, n) {
2034
2034
  const s = {};
2035
2035
  for (const i in t)
2036
- i === "values" && typeof t.values == "object" || (nr(i) || n === !0 && re(i) || !e && !re(i) || // If trying to use native HTML drag events, forward drag listeners
2036
+ i === "values" && typeof t.values == "object" || (nr(i) || n === !0 && ie(i) || !e && !ie(i) || // If trying to use native HTML drag events, forward drag listeners
2037
2037
  t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
2038
2038
  return s;
2039
2039
  }
@@ -2041,7 +2041,7 @@ const ue = /* @__PURE__ */ St({});
2041
2041
  function he(t) {
2042
2042
  return t !== null && typeof t == "object" && typeof t.start == "function";
2043
2043
  }
2044
- function jt(t) {
2044
+ function Ot(t) {
2045
2045
  return typeof t == "string" || Array.isArray(t);
2046
2046
  }
2047
2047
  const Mn = [
@@ -2054,7 +2054,7 @@ const Mn = [
2054
2054
  "exit"
2055
2055
  ], Dn = ["initial", ...Mn];
2056
2056
  function fe(t) {
2057
- return he(t.animate) || Dn.some((e) => jt(t[e]));
2057
+ return he(t.animate) || Dn.some((e) => Ot(t[e]));
2058
2058
  }
2059
2059
  function sr(t) {
2060
2060
  return !!(fe(t) || t.variants);
@@ -2063,8 +2063,8 @@ function ll(t, e) {
2063
2063
  if (fe(t)) {
2064
2064
  const { initial: n, animate: s } = t;
2065
2065
  return {
2066
- initial: n === !1 || jt(n) ? n : void 0,
2067
- animate: jt(s) ? s : void 0
2066
+ initial: n === !1 || Ot(n) ? n : void 0,
2067
+ animate: Ot(s) ? s : void 0
2068
2068
  };
2069
2069
  }
2070
2070
  return t.inherit !== !1 ? e : {};
@@ -2076,13 +2076,13 @@ function cl(t) {
2076
2076
  function as(t) {
2077
2077
  return Array.isArray(t) ? t.join(" ") : t;
2078
2078
  }
2079
- const Nt = {};
2079
+ const jt = {};
2080
2080
  function ul(t) {
2081
2081
  for (const e in t)
2082
- Nt[e] = t[e], un(e) && (Nt[e].isCSSVariable = !0);
2082
+ jt[e] = t[e], un(e) && (jt[e].isCSSVariable = !0);
2083
2083
  }
2084
2084
  function ir(t, { layout: e, layoutId: n }) {
2085
- return Mt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Nt[t] || t === "opacity");
2085
+ return Mt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!jt[t] || t === "opacity");
2086
2086
  }
2087
2087
  const hl = {
2088
2088
  x: "translateX",
@@ -2275,7 +2275,7 @@ function Ln(t, e, n, s) {
2275
2275
  }
2276
2276
  return e;
2277
2277
  }
2278
- function te(t) {
2278
+ function Qt(t) {
2279
2279
  return k(t) ? t.get() : t;
2280
2280
  }
2281
2281
  function Sl({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
@@ -2287,7 +2287,7 @@ function Sl({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
2287
2287
  function Pl(t, e, n, s) {
2288
2288
  const i = {}, o = s(t, {});
2289
2289
  for (const f in o)
2290
- i[f] = te(o[f]);
2290
+ i[f] = Qt(o[f]);
2291
2291
  let { initial: r, animate: a } = t;
2292
2292
  const l = fe(t), u = sr(t);
2293
2293
  e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
@@ -2379,7 +2379,7 @@ function El(t, e, n, s, i) {
2379
2379
  const d = n[hr], m = lt(!!d && !((g = window.MotionHandoffIsComplete) != null && g.call(window, d)) && ((v = window.MotionHasOptimisedAnimation) == null ? void 0 : v.call(window, d)));
2380
2380
  return tn(() => {
2381
2381
  c && (f.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), c.scheduleRenderMicrotask(), m.current && c.animationState && c.animationState.animateChanges());
2382
- }), Ut(() => {
2382
+ }), Wt(() => {
2383
2383
  c && (!m.current && c.animationState && c.animationState.animateChanges(), m.current && (queueMicrotask(() => {
2384
2384
  var p;
2385
2385
  (p = window.MotionHandoffMarkAsComplete) == null || p.call(window, d);
@@ -2472,10 +2472,10 @@ function mr({ top: t, left: e, right: n, bottom: s }) {
2472
2472
  y: { min: t, max: s }
2473
2473
  };
2474
2474
  }
2475
- function Ol({ x: t, y: e }) {
2475
+ function Il({ x: t, y: e }) {
2476
2476
  return { top: e.min, right: t.max, bottom: e.max, left: t.min };
2477
2477
  }
2478
- function Il(t, e) {
2478
+ function Ol(t, e) {
2479
2479
  if (!e)
2480
2480
  return t;
2481
2481
  const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
@@ -2501,12 +2501,12 @@ function pr(t) {
2501
2501
  function cs(t) {
2502
2502
  return t && t !== "0%";
2503
2503
  }
2504
- function oe(t, e, n) {
2504
+ function re(t, e, n) {
2505
2505
  const s = t - n, i = e * s;
2506
2506
  return n + i;
2507
2507
  }
2508
2508
  function us(t, e, n, s, i) {
2509
- return i !== void 0 && (t = oe(t, i, s)), oe(t, n, s) + e;
2509
+ return i !== void 0 && (t = re(t, i, s)), re(t, n, s) + e;
2510
2510
  }
2511
2511
  function ze(t, e = 0, n = 1, s, i) {
2512
2512
  t.min = us(t.min, e, n, s, i), t.max = us(t.max, e, n, s, i);
@@ -2542,7 +2542,7 @@ function vt(t, e) {
2542
2542
  ds(t.x, e.x, e.scaleX, e.scale, e.originX), ds(t.y, e.y, e.scaleY, e.scale, e.originY);
2543
2543
  }
2544
2544
  function yr(t, e) {
2545
- return mr(Il(t.getBoundingClientRect(), e));
2545
+ return mr(Ol(t.getBoundingClientRect(), e));
2546
2546
  }
2547
2547
  function Nl(t, e, n) {
2548
2548
  const s = yr(t, n), { scroll: i } = e;
@@ -2556,7 +2556,7 @@ const ms = () => ({
2556
2556
  }), Tt = () => ({
2557
2557
  x: ms(),
2558
2558
  y: ms()
2559
- }), ps = () => ({ min: 0, max: 0 }), D = () => ({
2559
+ }), ps = () => ({ min: 0, max: 0 }), E = () => ({
2560
2560
  x: ps(),
2561
2561
  y: ps()
2562
2562
  }), He = { current: null }, vr = { current: !1 };
@@ -2613,7 +2613,7 @@ class $l {
2613
2613
  this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = xn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2614
2614
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2615
2615
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2616
- const f = I.now();
2616
+ const f = O.now();
2617
2617
  this.renderScheduledAt < f && (this.renderScheduledAt = f, P.render(this.render, !1, !0));
2618
2618
  };
2619
2619
  const { latestValues: l, renderState: u } = r;
@@ -2682,7 +2682,7 @@ class $l {
2682
2682
  * removed with a re-render to work.
2683
2683
  */
2684
2684
  measureViewportBox() {
2685
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : D();
2685
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : E();
2686
2686
  }
2687
2687
  getStaticValue(e) {
2688
2688
  return this.latestValues[e];
@@ -2843,7 +2843,7 @@ class Hl extends Tr {
2843
2843
  readValueFromInstance(e, n) {
2844
2844
  var s;
2845
2845
  if (Mt.has(n))
2846
- return (s = this.projection) != null && s.isProjecting ? Oe(n) : ta(e, n);
2846
+ return (s = this.projection) != null && s.isProjecting ? Ie(n) : ta(e, n);
2847
2847
  {
2848
2848
  const i = zl(e), o = (un(n) ? i.getPropertyValue(n) : i[n]) || 0;
2849
2849
  return typeof o == "string" ? o.trim() : o;
@@ -2891,7 +2891,7 @@ function Gl(t, e, n, s) {
2891
2891
  }
2892
2892
  class _l extends Tr {
2893
2893
  constructor() {
2894
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = D;
2894
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = E;
2895
2895
  }
2896
2896
  getBaseTargetFromProps(e, n) {
2897
2897
  return e[n];
@@ -3115,7 +3115,7 @@ function Vr(t) {
3115
3115
  const e = {};
3116
3116
  for (let n = 0; n < uc; n++) {
3117
3117
  const s = Dn[n], i = t.props[s];
3118
- (jt(i) || i === !1) && (e[s] = i);
3118
+ (Ot(i) || i === !1) && (e[s] = i);
3119
3119
  }
3120
3120
  return e;
3121
3121
  }
@@ -3141,7 +3141,7 @@ function mc(t) {
3141
3141
  const { props: u } = t, c = Vr(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
3142
3142
  let d = {}, m = 1 / 0;
3143
3143
  for (let v = 0; v < fc; v++) {
3144
- const p = hc[v], T = n[p], y = u[p] !== void 0 ? u[p] : c[p], S = jt(y), w = p === l ? T.isActive : null;
3144
+ const p = hc[v], T = n[p], y = u[p] !== void 0 ? u[p] : c[p], S = Ot(y), w = p === l ? T.isActive : null;
3145
3145
  w === !1 && (m = v);
3146
3146
  let A = y === c[p] && y !== u[p] && S;
3147
3147
  if (A && s && t.manuallyAnimateOnMount && (A = !1), T.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
@@ -3149,31 +3149,31 @@ function mc(t) {
3149
3149
  !y && !T.prevProp || // Or if the prop doesn't define an animation
3150
3150
  he(y) || typeof y == "boolean")
3151
3151
  continue;
3152
- const E = pc(T.prevProp, y);
3153
- let b = E || // If we're making this variant active, we want to always make it active
3152
+ const C = pc(T.prevProp, y);
3153
+ let b = C || // If we're making this variant active, we want to always make it active
3154
3154
  p === l && T.isActive && !A && S || // If we removed a higher-priority variant (i is in reverse order)
3155
- v > m && S, O = !1;
3155
+ v > m && S, I = !1;
3156
3156
  const N = Array.isArray(y) ? y : [y];
3157
3157
  let ht = N.reduce(i(p), {});
3158
3158
  w === !1 && (ht = {});
3159
- const { prevResolvedValues: On = {} } = T, zr = {
3160
- ...On,
3159
+ const { prevResolvedValues: In = {} } = T, zr = {
3160
+ ...In,
3161
3161
  ...ht
3162
- }, In = (L) => {
3163
- b = !0, f.has(L) && (O = !0, f.delete(L)), T.needsAnimating[L] = !0;
3162
+ }, On = (L) => {
3163
+ b = !0, f.has(L) && (I = !0, f.delete(L)), T.needsAnimating[L] = !0;
3164
3164
  const W = t.getValue(L);
3165
3165
  W && (W.liveStyle = !1);
3166
3166
  };
3167
3167
  for (const L in zr) {
3168
- const W = ht[L], st = On[L];
3168
+ const W = ht[L], st = In[L];
3169
3169
  if (d.hasOwnProperty(L))
3170
3170
  continue;
3171
3171
  let ft = !1;
3172
- Ge(W) && Ge(st) ? ft = !Ar(W, st) : ft = W !== st, ft ? W != null ? In(L) : f.add(L) : W !== void 0 && f.has(L) ? In(L) : T.protectedKeys[L] = !0;
3172
+ Ge(W) && Ge(st) ? ft = !Ar(W, st) : ft = W !== st, ft ? W != null ? On(L) : f.add(L) : W !== void 0 && f.has(L) ? On(L) : T.protectedKeys[L] = !0;
3173
3173
  }
3174
3174
  T.prevProp = y, T.prevResolvedValues = ht, T.isActive && (d = { ...d, ...ht }), s && t.blockInitialAnimation && (b = !1);
3175
- const jn = A && E;
3176
- b && (!jn || O) && h.push(...N.map((L) => {
3175
+ const jn = A && C;
3176
+ b && (!jn || I) && h.push(...N.map((L) => {
3177
3177
  const W = { type: p };
3178
3178
  if (typeof L == "string" && s && !jn && t.manuallyAnimateOnMount && t.parent) {
3179
3179
  const { parent: st } = t, ft = xt(st, L);
@@ -3313,10 +3313,10 @@ const Tc = {
3313
3313
  Feature: vc
3314
3314
  }
3315
3315
  };
3316
- function Wt(t, e, n, s = { passive: !0 }) {
3316
+ function Nt(t, e, n, s = { passive: !0 }) {
3317
3317
  return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
3318
3318
  }
3319
- function Ht(t) {
3319
+ function zt(t) {
3320
3320
  return {
3321
3321
  point: {
3322
3322
  x: t.pageX,
@@ -3324,9 +3324,9 @@ function Ht(t) {
3324
3324
  }
3325
3325
  };
3326
3326
  }
3327
- const xc = (t) => (e) => Pn(e) && t(e, Ht(e));
3327
+ const xc = (t) => (e) => Pn(e) && t(e, zt(e));
3328
3328
  function kt(t, e, n, s) {
3329
- return Wt(t, e, xc(n), s);
3329
+ return Nt(t, e, xc(n), s);
3330
3330
  }
3331
3331
  const Mr = 1e-4, wc = 1 - Mr, bc = 1 + Mr, Dr = 0.01, Sc = 0 - Dr, Pc = 0 + Dr;
3332
3332
  function F(t) {
@@ -3350,10 +3350,10 @@ function Vc(t, e, n) {
3350
3350
  function xs(t, e, n) {
3351
3351
  t.min = e.min - n.min, t.max = t.min + F(e);
3352
3352
  }
3353
- function Ft(t, e, n) {
3353
+ function oe(t, e, n) {
3354
3354
  xs(t.x, e.x, n.x), xs(t.y, e.y, n.y);
3355
3355
  }
3356
- function K(t) {
3356
+ function U(t) {
3357
3357
  return [t("x"), t("y")];
3358
3358
  }
3359
3359
  const Cr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, ws = (t, e) => Math.abs(t - e);
@@ -3385,10 +3385,10 @@ class Er {
3385
3385
  }, !Pn(e))
3386
3386
  return;
3387
3387
  this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = r, this.contextWindow = i || window;
3388
- const a = Ht(e), l = we(a, this.transformPagePoint), { point: u } = l, { timestamp: c } = R;
3388
+ const a = zt(e), l = we(a, this.transformPagePoint), { point: u } = l, { timestamp: c } = R;
3389
3389
  this.history = [{ ...u, timestamp: c }];
3390
3390
  const { onSessionStart: h } = n;
3391
- h && h(e, be(l, this.history)), this.removeListeners = Kt(kt(this.contextWindow, "pointermove", this.handlePointerMove), kt(this.contextWindow, "pointerup", this.handlePointerUp), kt(this.contextWindow, "pointercancel", this.handlePointerUp));
3391
+ h && h(e, be(l, this.history)), this.removeListeners = Ut(kt(this.contextWindow, "pointermove", this.handlePointerMove), kt(this.contextWindow, "pointerup", this.handlePointerUp), kt(this.contextWindow, "pointercancel", this.handlePointerUp));
3392
3392
  }
3393
3393
  updateHandlers(e) {
3394
3394
  this.handlers = e;
@@ -3426,7 +3426,7 @@ function Cc(t, e) {
3426
3426
  n--;
3427
3427
  if (!s)
3428
3428
  return { x: 0, y: 0 };
3429
- const o = /* @__PURE__ */ $(i.timestamp - s.timestamp);
3429
+ const o = /* @__PURE__ */ K(i.timestamp - s.timestamp);
3430
3430
  if (o === 0)
3431
3431
  return { x: 0, y: 0 };
3432
3432
  const r = {
@@ -3485,10 +3485,10 @@ function As(t, e, n) {
3485
3485
  function Vs(t, e) {
3486
3486
  return typeof t == "number" ? t : t[e] || 0;
3487
3487
  }
3488
- const Oc = /* @__PURE__ */ new WeakMap();
3489
- class Ic {
3488
+ const Ic = /* @__PURE__ */ new WeakMap();
3489
+ class Oc {
3490
3490
  constructor(e) {
3491
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = D(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
3491
+ this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = E(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
3492
3492
  }
3493
3493
  start(e, { snapToCursor: n = !1, distanceThreshold: s } = {}) {
3494
3494
  const { presenceContext: i } = this.visualElement;
@@ -3496,12 +3496,12 @@ class Ic {
3496
3496
  return;
3497
3497
  const o = (h) => {
3498
3498
  const { dragSnapToOrigin: f } = this.getProps();
3499
- f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(Ht(h).point);
3499
+ f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(zt(h).point);
3500
3500
  }, r = (h, f) => {
3501
3501
  const { drag: d, dragPropagation: m, onDragStart: g } = this.getProps();
3502
3502
  if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = ja(d), !this.openDragLock))
3503
3503
  return;
3504
- this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), K((p) => {
3504
+ this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), U((p) => {
3505
3505
  let T = this.getAxisMotionValue(p).get() || 0;
3506
3506
  if (X.test(T)) {
3507
3507
  const { projection: y } = this.visualElement;
@@ -3527,7 +3527,7 @@ class Ic {
3527
3527
  this.updateAxis("x", f.point, p), this.updateAxis("y", f.point, p), this.visualElement.render(), v && v(h, f);
3528
3528
  }, l = (h, f) => {
3529
3529
  this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
3530
- }, u = () => K((h) => {
3530
+ }, u = () => U((h) => {
3531
3531
  var f;
3532
3532
  return this.getAnimationState(h) === "paused" && ((f = this.getAxisMotionValue(h).animation) == null ? void 0 : f.play());
3533
3533
  }), { dragSnapToOrigin: c } = this.getProps();
@@ -3568,7 +3568,7 @@ class Ic {
3568
3568
  }
3569
3569
  updateAxis(e, n, s) {
3570
3570
  const { drag: i } = this.getProps();
3571
- if (!s || !Yt(e, i, this.currentDirection))
3571
+ if (!s || !_t(e, i, this.currentDirection))
3572
3572
  return;
3573
3573
  const o = this.getAxisMotionValue(e);
3574
3574
  let r = this.originPoint[e] + s[e];
@@ -3577,7 +3577,7 @@ class Ic {
3577
3577
  resolveConstraints() {
3578
3578
  var o;
3579
3579
  const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (o = this.visualElement.projection) == null ? void 0 : o.layout, i = this.constraints;
3580
- e && gt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Rc(s.layoutBox, e) : this.constraints = !1, this.elastic = Fc(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && K((r) => {
3580
+ e && gt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Rc(s.layoutBox, e) : this.constraints = !1, this.elastic = Fc(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && U((r) => {
3581
3581
  this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Bc(s.layoutBox[r], this.constraints[r]));
3582
3582
  });
3583
3583
  }
@@ -3593,14 +3593,14 @@ class Ic {
3593
3593
  const o = Nl(s, i.root, this.visualElement.getTransformPagePoint());
3594
3594
  let r = Lc(i.layout.layoutBox, o);
3595
3595
  if (n) {
3596
- const a = n(Ol(r));
3596
+ const a = n(Il(r));
3597
3597
  this.hasMutatedConstraints = !!a, a && (r = mr(a));
3598
3598
  }
3599
3599
  return r;
3600
3600
  }
3601
3601
  startAnimation(e) {
3602
- const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = K((c) => {
3603
- if (!Yt(c, n, this.currentDirection))
3602
+ const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = U((c) => {
3603
+ if (!_t(c, n, this.currentDirection))
3604
3604
  return;
3605
3605
  let h = l && l[c] || {};
3606
3606
  r && (h = { min: 0, max: 0 });
@@ -3624,10 +3624,10 @@ class Ic {
3624
3624
  return _e(this.visualElement, e), s.start(Fn(e, s, 0, n, this.visualElement, !1));
3625
3625
  }
3626
3626
  stopAnimation() {
3627
- K((e) => this.getAxisMotionValue(e).stop());
3627
+ U((e) => this.getAxisMotionValue(e).stop());
3628
3628
  }
3629
3629
  pauseAnimation() {
3630
- K((e) => {
3630
+ U((e) => {
3631
3631
  var n;
3632
3632
  return (n = this.getAxisMotionValue(e).animation) == null ? void 0 : n.pause();
3633
3633
  });
@@ -3647,9 +3647,9 @@ class Ic {
3647
3647
  return i || this.visualElement.getValue(e, (s.initial ? s.initial[e] : void 0) || 0);
3648
3648
  }
3649
3649
  snapToCursor(e) {
3650
- K((n) => {
3650
+ U((n) => {
3651
3651
  const { drag: s } = this.getProps();
3652
- if (!Yt(n, s, this.currentDirection))
3652
+ if (!_t(n, s, this.currentDirection))
3653
3653
  return;
3654
3654
  const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
3655
3655
  if (i && i.layout) {
@@ -3671,7 +3671,7 @@ class Ic {
3671
3671
  return;
3672
3672
  this.stopAnimation();
3673
3673
  const i = { x: 0, y: 0 };
3674
- K((r) => {
3674
+ U((r) => {
3675
3675
  const a = this.getAxisMotionValue(r);
3676
3676
  if (a && this.constraints !== !1) {
3677
3677
  const l = a.get();
@@ -3679,8 +3679,8 @@ class Ic {
3679
3679
  }
3680
3680
  });
3681
3681
  const { transformTemplate: o } = this.visualElement.getProps();
3682
- this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), K((r) => {
3683
- if (!Yt(r, e, null))
3682
+ this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), U((r) => {
3683
+ if (!_t(r, e, null))
3684
3684
  return;
3685
3685
  const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
3686
3686
  a.set(M(l, u, i[r]));
@@ -3689,7 +3689,7 @@ class Ic {
3689
3689
  addListeners() {
3690
3690
  if (!this.visualElement.current)
3691
3691
  return;
3692
- Oc.set(this.visualElement, this);
3692
+ Ic.set(this.visualElement, this);
3693
3693
  const e = this.visualElement.current, n = kt(e, "pointerdown", (l) => {
3694
3694
  const { drag: u, dragListener: c = !0 } = this.getProps();
3695
3695
  u && c && this.start(l);
@@ -3698,8 +3698,8 @@ class Ic {
3698
3698
  gt(l) && l.current && (this.constraints = this.resolveRefConstraints());
3699
3699
  }, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
3700
3700
  i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), P.read(s);
3701
- const r = Wt(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
3702
- this.isDragging && u && (K((c) => {
3701
+ const r = Nt(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: u }) => {
3702
+ this.isDragging && u && (U((c) => {
3703
3703
  const h = this.getAxisMotionValue(c);
3704
3704
  h && (this.originPoint[c] += l[c].translate, h.set(h.get() + l[c].translate));
3705
3705
  }), this.visualElement.render());
@@ -3721,7 +3721,7 @@ class Ic {
3721
3721
  };
3722
3722
  }
3723
3723
  }
3724
- function Yt(t, e, n) {
3724
+ function _t(t, e, n) {
3725
3725
  return (e === !0 || e === t) && (n === null || n === t);
3726
3726
  }
3727
3727
  function jc(t, e = 10) {
@@ -3730,7 +3730,7 @@ function jc(t, e = 10) {
3730
3730
  }
3731
3731
  class Nc extends nt {
3732
3732
  constructor(e) {
3733
- super(e), this.removeGroupControls = j, this.removeListeners = j, this.controls = new Ic(e);
3733
+ super(e), this.removeGroupControls = j, this.removeListeners = j, this.controls = new Oc(e);
3734
3734
  }
3735
3735
  mount() {
3736
3736
  const { dragControls: e } = this.node.getProps();
@@ -3774,7 +3774,7 @@ class Wc extends nt {
3774
3774
  this.removePointerDownListener(), this.session && this.session.end();
3775
3775
  }
3776
3776
  }
3777
- const ee = {
3777
+ const te = {
3778
3778
  /**
3779
3779
  * Global flag as to whether the tree has animated since the last time
3780
3780
  * we resized the window
@@ -3826,7 +3826,7 @@ class Kc extends Zr {
3826
3826
  }), o.setOptions({
3827
3827
  ...o.options,
3828
3828
  onExitComplete: () => this.safeToRemove()
3829
- })), ee.hasEverUpdated = !0;
3829
+ })), te.hasEverUpdated = !0;
3830
3830
  }
3831
3831
  getSnapshotBeforeUpdate(e) {
3832
3832
  const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, { projection: r } = s;
@@ -3893,7 +3893,7 @@ class Gc {
3893
3893
  }
3894
3894
  }
3895
3895
  function _c(t, e) {
3896
- const n = I.now(), s = ({ timestamp: i }) => {
3896
+ const n = O.now(), s = ({ timestamp: i }) => {
3897
3897
  const o = i - n;
3898
3898
  o >= e && (Y(s), t(o - e));
3899
3899
  };
@@ -3921,14 +3921,14 @@ function Br(t, e, n) {
3921
3921
  function Ls(t, e) {
3922
3922
  t.min = e.min, t.max = e.max;
3923
3923
  }
3924
- function U(t, e) {
3924
+ function $(t, e) {
3925
3925
  Ls(t.x, e.x), Ls(t.y, e.y);
3926
3926
  }
3927
3927
  function ks(t, e) {
3928
3928
  t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
3929
3929
  }
3930
3930
  function Bs(t, e, n, s, i) {
3931
- return t -= e, t = oe(t, 1 / n, s), i !== void 0 && (t = oe(t, 1 / i, s)), t;
3931
+ return t -= e, t = re(t, 1 / n, s), i !== void 0 && (t = re(t, 1 / i, s)), t;
3932
3932
  }
3933
3933
  function Jc(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
3934
3934
  if (X.test(e) && (e = parseFloat(e), e = M(r.min, r.max, e / 100) - r.min), typeof e != "number")
@@ -3940,14 +3940,14 @@ function Fs(t, e, [n, s, i], o, r) {
3940
3940
  Jc(t, e[n], e[s], e[i], e.scale, o, r);
3941
3941
  }
3942
3942
  const Qc = ["x", "scaleX", "originX"], tu = ["y", "scaleY", "originY"];
3943
- function Os(t, e, n, s) {
3943
+ function Is(t, e, n, s) {
3944
3944
  Fs(t.x, e, Qc, n ? n.x : void 0, s ? s.x : void 0), Fs(t.y, e, tu, n ? n.y : void 0, s ? s.y : void 0);
3945
3945
  }
3946
- function Is(t) {
3946
+ function Os(t) {
3947
3947
  return t.translate === 0 && t.scale === 1;
3948
3948
  }
3949
3949
  function Fr(t) {
3950
- return Is(t.x) && Is(t.y);
3950
+ return Os(t.x) && Os(t.y);
3951
3951
  }
3952
3952
  function js(t, e) {
3953
3953
  return t.min === e.min && t.max === e.max;
@@ -3958,7 +3958,7 @@ function eu(t, e) {
3958
3958
  function Ns(t, e) {
3959
3959
  return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
3960
3960
  }
3961
- function Or(t, e) {
3961
+ function Ir(t, e) {
3962
3962
  return Ns(t.x, e.x) && Ns(t.y, e.y);
3963
3963
  }
3964
3964
  function Ws(t) {
@@ -4037,7 +4037,7 @@ function Ae(t, e, n, s) {
4037
4037
  const { latestValues: i } = e;
4038
4038
  i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
4039
4039
  }
4040
- function Ir(t) {
4040
+ function Or(t) {
4041
4041
  if (t.hasCheckedOptimisedAppear = !0, t.root === t)
4042
4042
  return;
4043
4043
  const { visualElement: e } = t.options;
@@ -4049,16 +4049,16 @@ function Ir(t) {
4049
4049
  window.MotionCancelOptimisedAnimation(n, "transform", P, !(i || o));
4050
4050
  }
4051
4051
  const { parent: s } = t;
4052
- s && !s.hasCheckedOptimisedAppear && Ir(s);
4052
+ s && !s.hasCheckedOptimisedAppear && Or(s);
4053
4053
  }
4054
4054
  function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
4055
4055
  return class {
4056
4056
  constructor(r = {}, a = e == null ? void 0 : e()) {
4057
- this.id = ru++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
4057
+ this.id = ru++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
4058
4058
  this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
4059
4059
  }, this.updateProjection = () => {
4060
4060
  this.projectionUpdateScheduled = !1, this.nodes.forEach(lu), this.nodes.forEach(fu), this.nodes.forEach(du), this.nodes.forEach(cu);
4061
- }, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
4061
+ }, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
4062
4062
  for (let l = 0; l < this.path.length; l++)
4063
4063
  this.path[l].shouldResetTransform = !0;
4064
4064
  this.root === this && (this.nodes = new Gc());
@@ -4088,7 +4088,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4088
4088
  h = window.innerWidth;
4089
4089
  }), t(r, () => {
4090
4090
  const d = window.innerWidth;
4091
- d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = _c(f, 250), ee.hasAnimatedSinceResize && (ee.hasAnimatedSinceResize = !1, this.nodes.forEach(zs)));
4091
+ d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = _c(f, 250), te.hasAnimatedSinceResize && (te.hasAnimatedSinceResize = !1, this.nodes.forEach(zs)));
4092
4092
  });
4093
4093
  }
4094
4094
  a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
@@ -4096,7 +4096,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4096
4096
  this.target = void 0, this.relativeTarget = void 0;
4097
4097
  return;
4098
4098
  }
4099
- const m = this.options.transition || u.getDefaultTransition() || vu, { onLayoutAnimationStart: g, onLayoutAnimationComplete: v } = u.getProps(), p = !this.targetLayout || !Or(this.targetLayout, d), T = !h && f;
4099
+ const m = this.options.transition || u.getDefaultTransition() || vu, { onLayoutAnimationStart: g, onLayoutAnimationComplete: v } = u.getProps(), p = !this.targetLayout || !Ir(this.targetLayout, d), T = !h && f;
4100
4100
  if (this.options.layoutRoot || this.resumeFrom || T || h && (p || !this.currentAnimation)) {
4101
4101
  this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
4102
4102
  const y = {
@@ -4141,7 +4141,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4141
4141
  this.options.onExitComplete && this.options.onExitComplete();
4142
4142
  return;
4143
4143
  }
4144
- if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Ir(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
4144
+ if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Or(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
4145
4145
  return;
4146
4146
  this.isLayoutDirty = !0;
4147
4147
  for (let c = 0; c < this.path.length; c++) {
@@ -4164,7 +4164,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4164
4164
  return;
4165
4165
  }
4166
4166
  this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(hu), this.nodes.forEach(ou), this.nodes.forEach(au)) : this.nodes.forEach($s), this.clearAllSnapshots();
4167
- const a = I.now();
4167
+ const a = O.now();
4168
4168
  R.delta = q(0, 1e3 / 60, a - R.timestamp), R.timestamp = a, R.isProcessing = !0, de.update.process(R), de.preRender.process(R), de.render.process(R), R.isProcessing = !1;
4169
4169
  }
4170
4170
  didUpdate() {
@@ -4194,7 +4194,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4194
4194
  for (let l = 0; l < this.path.length; l++)
4195
4195
  this.path[l].updateScroll();
4196
4196
  const r = this.layout;
4197
- this.layout = this.measure(!1), this.layoutCorrected = D(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4197
+ this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = E(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4198
4198
  const { visualElement: a } = this.options;
4199
4199
  a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
4200
4200
  }
@@ -4232,7 +4232,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4232
4232
  var u;
4233
4233
  const { visualElement: r } = this.options;
4234
4234
  if (!r)
4235
- return D();
4235
+ return E();
4236
4236
  const a = r.measureViewportBox();
4237
4237
  if (!(((u = this.scroll) == null ? void 0 : u.wasRoot) || this.path.some(xu))) {
4238
4238
  const { scroll: c } = this.root;
@@ -4242,18 +4242,18 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4242
4242
  }
4243
4243
  removeElementScroll(r) {
4244
4244
  var l;
4245
- const a = D();
4246
- if (U(a, r), (l = this.scroll) != null && l.wasRoot)
4245
+ const a = E();
4246
+ if ($(a, r), (l = this.scroll) != null && l.wasRoot)
4247
4247
  return a;
4248
4248
  for (let u = 0; u < this.path.length; u++) {
4249
4249
  const c = this.path[u], { scroll: h, options: f } = c;
4250
- c !== this.root && h && f.layoutScroll && (h.wasRoot && U(a, r), yt(a.x, h.offset.x), yt(a.y, h.offset.y));
4250
+ c !== this.root && h && f.layoutScroll && (h.wasRoot && $(a, r), yt(a.x, h.offset.x), yt(a.y, h.offset.y));
4251
4251
  }
4252
4252
  return a;
4253
4253
  }
4254
4254
  applyTransform(r, a = !1) {
4255
- const l = D();
4256
- U(l, r);
4255
+ const l = E();
4256
+ $(l, r);
4257
4257
  for (let u = 0; u < this.path.length; u++) {
4258
4258
  const c = this.path[u];
4259
4259
  !a && c.options.layoutScroll && c.scroll && c !== c.root && vt(l, {
@@ -4264,17 +4264,17 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4264
4264
  return rt(this.latestValues) && vt(l, this.latestValues), l;
4265
4265
  }
4266
4266
  removeTransform(r) {
4267
- const a = D();
4268
- U(a, r);
4267
+ const a = E();
4268
+ $(a, r);
4269
4269
  for (let l = 0; l < this.path.length; l++) {
4270
4270
  const u = this.path[l];
4271
4271
  if (!u.instance || !rt(u.latestValues))
4272
4272
  continue;
4273
4273
  $e(u.latestValues) && u.updateSnapshot();
4274
- const c = D(), h = u.measurePageBox();
4275
- U(c, h), Os(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
4274
+ const c = E(), h = u.measurePageBox();
4275
+ $(c, h), Is(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
4276
4276
  }
4277
- return rt(this.latestValues) && Os(a, this.latestValues), a;
4277
+ return rt(this.latestValues) && Is(a, this.latestValues), a;
4278
4278
  }
4279
4279
  setTargetDelta(r) {
4280
4280
  this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
@@ -4293,24 +4293,18 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4293
4293
  this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== R.timestamp && this.relativeParent.resolveTargetDelta(!0);
4294
4294
  }
4295
4295
  resolveTargetDelta(r = !1) {
4296
- var f;
4296
+ var d;
4297
4297
  const a = this.getLead();
4298
4298
  this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
4299
4299
  const l = !!this.resumingFrom || this !== a;
4300
- if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || (f = this.parent) != null && f.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
4300
+ if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || (d = this.parent) != null && d.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
4301
4301
  return;
4302
4302
  const { layout: c, layoutId: h } = this.options;
4303
- if (!(!this.layout || !(c || h))) {
4304
- if (this.resolvedRelativeTargetAt = R.timestamp, !this.targetDelta && !this.relativeTarget) {
4305
- const d = this.getClosestProjectingParent();
4306
- d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = D(), this.relativeTargetOrigin = D(), Ft(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), U(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
4307
- }
4308
- if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = D(), this.targetWithTransforms = D()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Vc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : U(this.target, this.layout.layoutBox), gr(this.target, this.targetDelta)) : U(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget)) {
4309
- this.attemptToResolveRelativeTarget = !1;
4310
- const d = this.getClosestProjectingParent();
4311
- d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = D(), this.relativeTargetOrigin = D(), Ft(this.relativeTargetOrigin, this.target, d.target), U(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
4312
- }
4313
- }
4303
+ if (!this.layout || !(c || h))
4304
+ return;
4305
+ this.resolvedRelativeTargetAt = R.timestamp;
4306
+ const f = this.getClosestProjectingParent();
4307
+ f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = E(), this.targetWithTransforms = E()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Vc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : $(this.target, this.layout.layoutBox), gr(this.target, this.targetDelta)) : $(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
4314
4308
  }
4315
4309
  getClosestProjectingParent() {
4316
4310
  if (!(!this.parent || $e(this.parent.latestValues) || pr(this.parent.latestValues)))
@@ -4319,6 +4313,12 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4319
4313
  isProjecting() {
4320
4314
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
4321
4315
  }
4316
+ createRelativeTarget(r, a, l) {
4317
+ this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = E(), this.relativeTargetOrigin = E(), oe(this.relativeTargetOrigin, a, l), $(this.relativeTarget, this.relativeTargetOrigin);
4318
+ }
4319
+ removeRelativeTarget() {
4320
+ this.relativeParent = this.relativeTarget = void 0;
4321
+ }
4322
4322
  calcProjection() {
4323
4323
  var m;
4324
4324
  const r = this.getLead(), a = !!this.resumingFrom || this !== r;
@@ -4328,9 +4328,9 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4328
4328
  const { layout: u, layoutId: c } = this.options;
4329
4329
  if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || c))
4330
4330
  return;
4331
- U(this.layoutCorrected, this.layout.layoutBox);
4331
+ $(this.layoutCorrected, this.layout.layoutBox);
4332
4332
  const h = this.treeScale.x, f = this.treeScale.y;
4333
- jl(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = D());
4333
+ jl(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = E());
4334
4334
  const { target: d } = r;
4335
4335
  if (!d) {
4336
4336
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
@@ -4358,18 +4358,18 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4358
4358
  setAnimationOrigin(r, a = !1) {
4359
4359
  const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = Tt();
4360
4360
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
4361
- const f = D(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = d !== m, v = this.getStack(), p = !v || v.members.length <= 1, T = !!(g && !p && this.options.crossfade === !0 && !this.path.some(yu));
4361
+ const f = E(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = d !== m, v = this.getStack(), p = !v || v.members.length <= 1, T = !!(g && !p && this.options.crossfade === !0 && !this.path.some(yu));
4362
4362
  this.animationProgress = 0;
4363
4363
  let y;
4364
4364
  this.mixTargetDelta = (S) => {
4365
4365
  const w = S / 1e3;
4366
- Hs(h.x, r.x, w), Hs(h.y, r.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ft(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), gu(this.relativeTarget, this.relativeTargetOrigin, f, w), y && eu(this.relativeTarget, y) && (this.isProjectionDirty = !1), y || (y = D()), U(y, this.relativeTarget)), g && (this.animationValues = c, Xc(c, u, this.latestValues, w, T, p)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
4366
+ Hs(h.x, r.x, w), Hs(h.y, r.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (oe(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), gu(this.relativeTarget, this.relativeTargetOrigin, f, w), y && eu(this.relativeTarget, y) && (this.isProjectionDirty = !1), y || (y = E()), $(y, this.relativeTarget)), g && (this.animationValues = c, Xc(c, u, this.latestValues, w, T, p)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
4367
4367
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
4368
4368
  }
4369
4369
  startAnimation(r) {
4370
4370
  var a, l, u;
4371
4371
  this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (u = (l = this.resumingFrom) == null ? void 0 : l.currentAnimation) == null || u.stop(), this.pendingAnimation && (Y(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = P.update(() => {
4372
- ee.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = H(0)), this.currentAnimation = zc(this.motionValue, [0, 1e3], {
4372
+ te.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = H(0)), this.currentAnimation = zc(this.motionValue, [0, 1e3], {
4373
4373
  ...r,
4374
4374
  velocity: 0,
4375
4375
  isSync: !0,
@@ -4397,13 +4397,13 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4397
4397
  let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
4398
4398
  if (!(!a || !l || !u)) {
4399
4399
  if (this !== r && this.layout && u && Nr(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
4400
- l = this.target || D();
4400
+ l = this.target || E();
4401
4401
  const h = F(this.layout.layoutBox.x);
4402
4402
  l.x.min = r.target.x.min, l.x.max = l.x.min + h;
4403
4403
  const f = F(this.layout.layoutBox.y);
4404
4404
  l.y.min = r.target.y.min, l.y.max = l.y.min + f;
4405
4405
  }
4406
- U(a, l), vt(a, c), Bt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
4406
+ $(a, l), vt(a, c), Bt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
4407
4407
  }
4408
4408
  }
4409
4409
  registerSharedNode(r, a) {
@@ -4467,12 +4467,12 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4467
4467
  }
4468
4468
  const l = this.getTransformTemplate();
4469
4469
  if (this.needsReset) {
4470
- this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = te(a == null ? void 0 : a.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
4470
+ this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = Qt(a == null ? void 0 : a.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
4471
4471
  return;
4472
4472
  }
4473
4473
  const u = this.getLead();
4474
4474
  if (!this.projectionDelta || !this.layout || !u.target) {
4475
- this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = te(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !rt(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
4475
+ this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = Qt(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !rt(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
4476
4476
  return;
4477
4477
  }
4478
4478
  r.visibility = "";
@@ -4482,10 +4482,10 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4482
4482
  l && (h = l(c, h)), r.transform = h;
4483
4483
  const { x: f, y: d } = this.projectionDelta;
4484
4484
  r.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, u.animationValues ? r.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : r.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
4485
- for (const m in Nt) {
4485
+ for (const m in jt) {
4486
4486
  if (c[m] === void 0)
4487
4487
  continue;
4488
- const { correct: g, applyTo: v, isCSSVariable: p } = Nt[m], T = h === "none" ? c[m] : g(c[m], u);
4488
+ const { correct: g, applyTo: v, isCSSVariable: p } = jt[m], T = h === "none" ? c[m] : g(c[m], u);
4489
4489
  if (v) {
4490
4490
  const y = v.length;
4491
4491
  for (let S = 0; S < y; S++)
@@ -4493,7 +4493,7 @@ function jr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4493
4493
  } else
4494
4494
  p ? this.options.visualElement.renderState.vars[m] = T : r[m] = T;
4495
4495
  }
4496
- this.options.layoutId && (r.pointerEvents = u === this ? te(a == null ? void 0 : a.pointerEvents) || "" : "none");
4496
+ this.options.layoutId && (r.pointerEvents = u === this ? Qt(a == null ? void 0 : a.pointerEvents) || "" : "none");
4497
4497
  }
4498
4498
  clearSnapshot() {
4499
4499
  this.resumeFrom = this.snapshot = void 0;
@@ -4515,10 +4515,10 @@ function au(t) {
4515
4515
  const e = ((n = t.resumeFrom) == null ? void 0 : n.snapshot) || t.snapshot;
4516
4516
  if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
4517
4517
  const { layoutBox: s, measuredBox: i } = t.layout, { animationType: o } = t.options, r = e.source !== t.layout.source;
4518
- o === "size" ? K((h) => {
4518
+ o === "size" ? U((h) => {
4519
4519
  const f = r ? e.measuredBox[h] : e.layoutBox[h], d = F(f);
4520
4520
  f.min = s[h].min, f.max = f.min + d;
4521
- }) : Nr(o, e.layoutBox, s) && K((h) => {
4521
+ }) : Nr(o, e.layoutBox, s) && U((h) => {
4522
4522
  const f = r ? e.measuredBox[h] : e.layoutBox[h], d = F(s[h]);
4523
4523
  f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
4524
4524
  });
@@ -4533,10 +4533,10 @@ function au(t) {
4533
4533
  if (h && !h.resumeFrom) {
4534
4534
  const { snapshot: f, layout: d } = h;
4535
4535
  if (f && d) {
4536
- const m = D();
4537
- Ft(m, e.layoutBox, f.layoutBox);
4538
- const g = D();
4539
- Ft(g, s, d.layoutBox), Or(m, g) || (c = !0), h.options.layoutRoot && (t.relativeTarget = g, t.relativeTargetOrigin = m, t.relativeParent = h);
4536
+ const m = E();
4537
+ oe(m, e.layoutBox, f.layoutBox);
4538
+ const g = E();
4539
+ oe(g, s, d.layoutBox), Ir(m, g) || (c = !0), h.options.layoutRoot && (t.relativeTarget = g, t.relativeTargetOrigin = m, t.relativeParent = h);
4540
4540
  }
4541
4541
  }
4542
4542
  }
@@ -4618,7 +4618,7 @@ function xu(t) {
4618
4618
  return t !== t.root && ((e = t.scroll) == null ? void 0 : e.wasRoot);
4619
4619
  }
4620
4620
  const wu = jr({
4621
- attachResizeListener: (t, e) => Wt(t, "resize", e),
4621
+ attachResizeListener: (t, e) => Nt(t, "resize", e),
4622
4622
  measureScroll: () => ({
4623
4623
  x: document.documentElement.scrollLeft || document.body.scrollLeft,
4624
4624
  y: document.documentElement.scrollTop || document.body.scrollTop
@@ -4656,7 +4656,7 @@ function qs(t, e, n) {
4656
4656
  const { props: s } = t;
4657
4657
  t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
4658
4658
  const i = "onHover" + n, o = s[i];
4659
- o && P.postRender(() => o(e, Ht(e)));
4659
+ o && P.postRender(() => o(e, zt(e)));
4660
4660
  }
4661
4661
  class Su extends nt {
4662
4662
  mount() {
@@ -4683,7 +4683,7 @@ class Pu extends nt {
4683
4683
  !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4684
4684
  }
4685
4685
  mount() {
4686
- this.unmount = Kt(Wt(this.node.current, "focus", () => this.onFocus()), Wt(this.node.current, "blur", () => this.onBlur()));
4686
+ this.unmount = Ut(Nt(this.node.current, "focus", () => this.onFocus()), Nt(this.node.current, "blur", () => this.onBlur()));
4687
4687
  }
4688
4688
  unmount() {
4689
4689
  }
@@ -4694,7 +4694,7 @@ function Zs(t, e, n) {
4694
4694
  return;
4695
4695
  t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
4696
4696
  const i = "onTap" + (n === "End" ? "" : n), o = s[i];
4697
- o && P.postRender(() => o(e, Ht(e)));
4697
+ o && P.postRender(() => o(e, zt(e)));
4698
4698
  }
4699
4699
  class Au extends nt {
4700
4700
  mount() {
@@ -4784,7 +4784,7 @@ const ku = {
4784
4784
  ...ku,
4785
4785
  ...bu,
4786
4786
  ...Bu
4787
- }, Ou = /* @__PURE__ */ Fl(Fu, Yl), Iu = 50, Js = () => ({
4787
+ }, Iu = /* @__PURE__ */ Fl(Fu, Yl), Ou = 50, Js = () => ({
4788
4788
  current: 0,
4789
4789
  offset: [],
4790
4790
  progress: 0,
@@ -4811,7 +4811,7 @@ function Qs(t, e, n, s) {
4811
4811
  const i = n[e], { length: o, position: r } = Nu[e], a = i.current, l = n.time;
4812
4812
  i.current = t[`scroll${r}`], i.scrollLength = t[`scroll${o}`] - t[`client${o}`], i.offset.length = 0, i.offset[0] = 0, i.offset[1] = i.scrollLength, i.progress = /* @__PURE__ */ wt(0, i.scrollLength, i.current);
4813
4813
  const u = s - l;
4814
- i.velocity = u > Iu ? 0 : an(i.current - a, u);
4814
+ i.velocity = u > Ou ? 0 : an(i.current - a, u);
4815
4815
  }
4816
4816
  function Wu(t, e, n) {
4817
4817
  Qs(t, "x", e, n), Qs(t, "y", e, n), e.time = n;
@@ -4939,7 +4939,7 @@ function Kr({ source: t, container: e, ...n }) {
4939
4939
  const i = si.get(e) ?? /* @__PURE__ */ new Map();
4940
4940
  si.set(e, i);
4941
4941
  const o = n.target ?? "self", r = i.get(o) ?? {}, a = s + (n.offset ?? []).join(",");
4942
- return r[a] || (r[a] = !n.target && Oi() ? new ScrollTimeline({ source: e, axis: s }) : qu({ container: e, ...n })), r[a];
4942
+ return r[a] || (r[a] = !n.target && Ii() ? new ScrollTimeline({ source: e, axis: s }) : qu({ container: e, ...n })), r[a];
4943
4943
  }
4944
4944
  function Zu(t, e) {
4945
4945
  const n = Kr(e);
@@ -4969,7 +4969,7 @@ const eh = () => ({
4969
4969
  scrollY: H(0),
4970
4970
  scrollXProgress: H(0),
4971
4971
  scrollYProgress: H(0)
4972
- }), Xt = (t) => t ? !t.current : !1;
4972
+ }), Yt = (t) => t ? !t.current : !1;
4973
4973
  function nh({ container: t, target: e, ...n } = {}) {
4974
4974
  const s = le(eh), i = lt(null), o = lt(!1), r = Je(() => (i.current = th((a, { x: l, y: u }) => {
4975
4975
  s.scrollX.set(l.current), s.scrollXProgress.set(l.progress), s.scrollY.set(u.current), s.scrollYProgress.set(u.progress);
@@ -4982,21 +4982,21 @@ function nh({ container: t, target: e, ...n } = {}) {
4982
4982
  (a = i.current) == null || a.call(i);
4983
4983
  }), [t, e, JSON.stringify(n.offset)]);
4984
4984
  return tn(() => {
4985
- if (o.current = !1, Xt(t) || Xt(e)) {
4985
+ if (o.current = !1, Yt(t) || Yt(e)) {
4986
4986
  o.current = !0;
4987
4987
  return;
4988
4988
  } else
4989
4989
  return r();
4990
- }, [r]), Ut(() => {
4990
+ }, [r]), Wt(() => {
4991
4991
  if (o.current)
4992
- return _(!Xt(t), "Container ref is defined but not hydrated", "use-scroll-ref"), _(!Xt(e), "Target ref is defined but not hydrated", "use-scroll-ref"), r();
4992
+ return _(!Yt(t), "Container ref is defined but not hydrated", "use-scroll-ref"), _(!Yt(e), "Target ref is defined but not hydrated", "use-scroll-ref"), r();
4993
4993
  }, [r]), s;
4994
4994
  }
4995
4995
  function sh(t) {
4996
4996
  const e = le(() => H(t)), { isStatic: n } = B(Vn);
4997
4997
  if (n) {
4998
4998
  const [, s] = Jr(t);
4999
- Ut(() => e.on("change", s), []);
4999
+ Wt(() => e.on("change", s), []);
5000
5000
  }
5001
5001
  return e;
5002
5002
  }
@@ -5058,7 +5058,7 @@ const fh = ({ children: t, className: e }) => {
5058
5058
  const s = rh(e, n, [0, 1]);
5059
5059
  return /* @__PURE__ */ ri("span", { className: "relative mx-1 lg:mx-1.5", children: [
5060
5060
  /* @__PURE__ */ tt("span", { className: "absolute opacity-30", children: t }),
5061
- /* @__PURE__ */ tt(Ou.span, { style: { opacity: s }, className: "text-black dark:text-white", children: t })
5061
+ /* @__PURE__ */ tt(Iu.span, { style: { opacity: s }, className: "text-black dark:text-white", children: t })
5062
5062
  ] });
5063
5063
  };
5064
5064
  export {