@pittorica/carousel-react 0.22.4 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1142 -1150
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -1,66 +1,66 @@
1
- import { jsx as R, Fragment as Hr, jsxs as Ji } from "react/jsx-runtime";
2
- import * as ne from "react";
3
- import { createContext as xt, useRef as K, useLayoutEffect as Yr, useEffect as Xe, useId as qe, useContext as O, useInsertionEffect as Ze, useMemo as Z, useCallback as Qi, Children as Xr, isValidElement as qr, useState as Pe, Fragment as ts, createElement as Zr, forwardRef as Jr, Component as Qr } from "react";
4
- function es(t) {
1
+ import { jsx as R, Fragment as Xr, jsxs as ts } from "react/jsx-runtime";
2
+ import * as ie from "react";
3
+ import { createContext as xt, useRef as K, useLayoutEffect as qr, useEffect as Ze, useId as Je, useContext as O, useInsertionEffect as Qe, useMemo as Z, useCallback as es, Children as Zr, isValidElement as Jr, useState as Ae, Fragment as ns, createElement as Qr, forwardRef as to, Component as eo } from "react";
4
+ function is(t) {
5
5
  var e, n, i = "";
6
6
  if (typeof t == "string" || typeof t == "number") i += t;
7
7
  else if (typeof t == "object") if (Array.isArray(t)) {
8
8
  var s = t.length;
9
- for (e = 0; e < s; e++) t[e] && (n = es(t[e])) && (i && (i += " "), i += n);
9
+ for (e = 0; e < s; e++) t[e] && (n = is(t[e])) && (i && (i += " "), i += n);
10
10
  } else for (n in t) t[n] && (i && (i += " "), i += n);
11
11
  return i;
12
12
  }
13
- function Je() {
14
- for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = es(t)) && (i && (i += " "), i += e);
13
+ function tn() {
14
+ for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = is(t)) && (i && (i += " "), i += e);
15
15
  return i;
16
16
  }
17
- const Qe = xt({});
18
- function tn(t) {
17
+ const en = xt({});
18
+ function nn(t) {
19
19
  const e = K(null);
20
20
  return e.current === null && (e.current = t()), e.current;
21
21
  }
22
- const ns = typeof window < "u", is = ns ? Yr : Xe, ie = /* @__PURE__ */ xt(null);
23
- function en(t, e) {
22
+ const ss = typeof window < "u", rs = ss ? qr : Ze, se = /* @__PURE__ */ xt(null);
23
+ function sn(t, e) {
24
24
  t.indexOf(e) === -1 && t.push(e);
25
25
  }
26
- function nn(t, e) {
26
+ function rn(t, e) {
27
27
  const n = t.indexOf(e);
28
28
  n > -1 && t.splice(n, 1);
29
29
  }
30
30
  const q = (t, e, n) => n > e ? e : n < t ? t : n;
31
- function Ae(t, e) {
31
+ function Ve(t, e) {
32
32
  return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
33
33
  }
34
34
  let Tt = () => {
35
35
  }, J = () => {
36
36
  };
37
- var Zi;
38
- typeof process < "u" && ((Zi = process.env) == null ? void 0 : Zi.NODE_ENV) !== "production" && (Tt = (t, e, n) => {
39
- !t && typeof console < "u" && console.warn(Ae(e, n));
37
+ var Qi;
38
+ typeof process < "u" && ((Qi = process.env) == null ? void 0 : Qi.NODE_ENV) !== "production" && (Tt = (t, e, n) => {
39
+ !t && typeof console < "u" && console.warn(Ve(e, n));
40
40
  }, J = (t, e, n) => {
41
41
  if (!t)
42
- throw new Error(Ae(e, n));
42
+ throw new Error(Ve(e, n));
43
43
  });
44
- const Q = {}, ss = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
45
- function rs(t) {
44
+ const Q = {}, os = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
45
+ function as(t) {
46
46
  return typeof t == "object" && t !== null;
47
47
  }
48
- const os = (t) => /^0[^.\s]+$/u.test(t);
48
+ const ls = (t) => /^0[^.\s]+$/u.test(t);
49
49
  // @__NO_SIDE_EFFECTS__
50
- function sn(t) {
50
+ function on(t) {
51
51
  let e;
52
52
  return () => (e === void 0 && (e = t()), e);
53
53
  }
54
- const _ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, to = (t, e) => (n) => e(t(n)), It = (...t) => t.reduce(to), Rt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
54
+ const _ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, no = (t, e) => (n) => e(t(n)), Ot = (...t) => t.reduce(no), Lt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
55
55
  const i = e - t;
56
56
  return i === 0 ? 1 : (n - t) / i;
57
57
  };
58
- class rn {
58
+ class an {
59
59
  constructor() {
60
60
  this.subscriptions = [];
61
61
  }
62
62
  add(e) {
63
- return en(this.subscriptions, e), () => nn(this.subscriptions, e);
63
+ return sn(this.subscriptions, e), () => rn(this.subscriptions, e);
64
64
  }
65
65
  notify(e, n, i) {
66
66
  const s = this.subscriptions.length;
@@ -81,48 +81,48 @@ class rn {
81
81
  }
82
82
  }
83
83
  const Y = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, G = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
84
- function as(t, e) {
84
+ function cs(t, e) {
85
85
  return e ? t * (1e3 / e) : 0;
86
86
  }
87
- const Fn = /* @__PURE__ */ new Set();
88
- function on(t, e, n) {
89
- t || Fn.has(e) || (console.warn(Ae(e, n)), Fn.add(e));
87
+ const In = /* @__PURE__ */ new Set();
88
+ function ln(t, e, n) {
89
+ t || In.has(e) || (console.warn(Ve(e, n)), In.add(e));
90
90
  }
91
- const ls = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, eo = 1e-7, no = 12;
92
- function io(t, e, n, i, s) {
91
+ const us = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, io = 1e-7, so = 12;
92
+ function ro(t, e, n, i, s) {
93
93
  let o, r, a = 0;
94
94
  do
95
- r = e + (n - e) / 2, o = ls(r, i, s) - t, o > 0 ? n = r : e = r;
96
- while (Math.abs(o) > eo && ++a < no);
95
+ r = e + (n - e) / 2, o = us(r, i, s) - t, o > 0 ? n = r : e = r;
96
+ while (Math.abs(o) > io && ++a < so);
97
97
  return r;
98
98
  }
99
- function Ot(t, e, n, i) {
99
+ function jt(t, e, n, i) {
100
100
  if (t === e && n === i)
101
101
  return _;
102
- const s = (o) => io(o, 0, 1, t, n);
103
- return (o) => o === 0 || o === 1 ? o : ls(s(o), e, i);
102
+ const s = (o) => ro(o, 0, 1, t, n);
103
+ return (o) => o === 0 || o === 1 ? o : us(s(o), e, i);
104
104
  }
105
- const cs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, us = (t) => (e) => 1 - t(1 - e), hs = /* @__PURE__ */ Ot(0.33, 1.53, 0.69, 0.99), an = /* @__PURE__ */ us(hs), fs = /* @__PURE__ */ cs(an), ds = (t) => (t *= 2) < 1 ? 0.5 * an(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ln = (t) => 1 - Math.sin(Math.acos(t)), ps = us(ln), ms = cs(ln), so = /* @__PURE__ */ Ot(0.42, 0, 1, 1), ro = /* @__PURE__ */ Ot(0, 0, 0.58, 1), gs = /* @__PURE__ */ Ot(0.42, 0, 0.58, 1), oo = (t) => Array.isArray(t) && typeof t[0] != "number", ys = (t) => Array.isArray(t) && typeof t[0] == "number", Bn = {
105
+ const hs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, fs = (t) => (e) => 1 - t(1 - e), ds = /* @__PURE__ */ jt(0.33, 1.53, 0.69, 0.99), cn = /* @__PURE__ */ fs(ds), ps = /* @__PURE__ */ hs(cn), ms = (t) => (t *= 2) < 1 ? 0.5 * cn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), un = (t) => 1 - Math.sin(Math.acos(t)), gs = fs(un), ys = hs(un), oo = /* @__PURE__ */ jt(0.42, 0, 1, 1), ao = /* @__PURE__ */ jt(0, 0, 0.58, 1), vs = /* @__PURE__ */ jt(0.42, 0, 0.58, 1), lo = (t) => Array.isArray(t) && typeof t[0] != "number", xs = (t) => Array.isArray(t) && typeof t[0] == "number", On = {
106
106
  linear: _,
107
- easeIn: so,
108
- easeInOut: gs,
109
- easeOut: ro,
110
- circIn: ln,
111
- circInOut: ms,
112
- circOut: ps,
113
- backIn: an,
114
- backInOut: fs,
115
- backOut: hs,
116
- anticipate: ds
117
- }, ao = (t) => typeof t == "string", In = (t) => {
118
- if (ys(t)) {
107
+ easeIn: oo,
108
+ easeInOut: vs,
109
+ easeOut: ao,
110
+ circIn: un,
111
+ circInOut: ys,
112
+ circOut: gs,
113
+ backIn: cn,
114
+ backInOut: ps,
115
+ backOut: ds,
116
+ anticipate: ms
117
+ }, co = (t) => typeof t == "string", jn = (t) => {
118
+ if (xs(t)) {
119
119
  J(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
120
120
  const [e, n, i, s] = t;
121
- return Ot(e, n, i, s);
122
- } else if (ao(t))
123
- return J(Bn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Bn[t];
121
+ return jt(e, n, i, s);
122
+ } else if (co(t))
123
+ return J(On[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), On[t];
124
124
  return t;
125
- }, $t = [
125
+ }, Ut = [
126
126
  "setup",
127
127
  // Compute
128
128
  "read",
@@ -140,7 +140,7 @@ const cs = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, us
140
140
  "postRender"
141
141
  // Compute
142
142
  ];
143
- function lo(t, e) {
143
+ function uo(t, e) {
144
144
  let n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = !1, o = !1;
145
145
  const r = /* @__PURE__ */ new WeakSet();
146
146
  let a = {
@@ -178,74 +178,74 @@ function lo(t, e) {
178
178
  };
179
179
  return c;
180
180
  }
181
- const co = 40;
182
- function vs(t, e) {
181
+ const ho = 40;
182
+ function Ts(t, e) {
183
183
  let n = !1, i = !0;
184
184
  const s = {
185
185
  delta: 0,
186
186
  timestamp: 0,
187
187
  isProcessing: !1
188
- }, o = () => n = !0, r = $t.reduce((v, S) => (v[S] = lo(o), v), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: d, postRender: p } = r, m = () => {
188
+ }, o = () => n = !0, r = Ut.reduce((v, S) => (v[S] = uo(o), v), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: d, postRender: p } = r, m = () => {
189
189
  const v = Q.useManualTiming ? s.timestamp : performance.now();
190
- n = !1, Q.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(v - s.timestamp, co), 1)), s.timestamp = v, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), h.process(s), f.process(s), d.process(s), p.process(s), s.isProcessing = !1, n && e && (i = !1, t(m));
190
+ n = !1, Q.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(v - s.timestamp, ho), 1)), s.timestamp = v, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), h.process(s), f.process(s), d.process(s), p.process(s), s.isProcessing = !1, n && e && (i = !1, t(m));
191
191
  }, g = () => {
192
192
  n = !0, i = !0, s.isProcessing || t(m);
193
193
  };
194
- return { schedule: $t.reduce((v, S) => {
194
+ return { schedule: Ut.reduce((v, S) => {
195
195
  const b = r[S];
196
196
  return v[S] = (V, D = !1, P = !1) => (n || g(), b.schedule(V, D, P)), v;
197
197
  }, {}), cancel: (v) => {
198
- for (let S = 0; S < $t.length; S++)
199
- r[$t[S]].cancel(v);
198
+ for (let S = 0; S < Ut.length; S++)
199
+ r[Ut[S]].cancel(v);
200
200
  }, state: s, steps: r };
201
201
  }
202
- const { schedule: C, cancel: nt, state: B, steps: le } = /* @__PURE__ */ vs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : _, !0);
203
- let Gt;
204
- function uo() {
205
- Gt = void 0;
202
+ const { schedule: C, cancel: nt, state: B, steps: ce } = /* @__PURE__ */ Ts(typeof requestAnimationFrame < "u" ? requestAnimationFrame : _, !0);
203
+ let _t;
204
+ function fo() {
205
+ _t = void 0;
206
206
  }
207
207
  const N = {
208
- now: () => (Gt === void 0 && N.set(B.isProcessing || Q.useManualTiming ? B.timestamp : performance.now()), Gt),
208
+ now: () => (_t === void 0 && N.set(B.isProcessing || Q.useManualTiming ? B.timestamp : performance.now()), _t),
209
209
  set: (t) => {
210
- Gt = t, queueMicrotask(uo);
210
+ _t = t, queueMicrotask(fo);
211
211
  }
212
- }, xs = (t) => (e) => typeof e == "string" && e.startsWith(t), Ts = /* @__PURE__ */ xs("--"), ho = /* @__PURE__ */ xs("var(--"), cn = (t) => ho(t) ? fo.test(t.split("/*")[0].trim()) : !1, fo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
213
- function On(t) {
212
+ }, ws = (t) => (e) => typeof e == "string" && e.startsWith(t), bs = /* @__PURE__ */ ws("--"), po = /* @__PURE__ */ ws("var(--"), hn = (t) => po(t) ? mo.test(t.split("/*")[0].trim()) : !1, mo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
213
+ function Nn(t) {
214
214
  return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
215
215
  }
216
216
  const wt = {
217
217
  test: (t) => typeof t == "number",
218
218
  parse: parseFloat,
219
219
  transform: (t) => t
220
- }, Lt = {
220
+ }, kt = {
221
221
  ...wt,
222
222
  transform: (t) => q(0, 1, t)
223
- }, Ut = {
223
+ }, Wt = {
224
224
  ...wt,
225
225
  default: 1
226
- }, Ct = (t) => Math.round(t * 1e5) / 1e5, un = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
227
- function po(t) {
226
+ }, Mt = (t) => Math.round(t * 1e5) / 1e5, fn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
227
+ function go(t) {
228
228
  return t == null;
229
229
  }
230
- const mo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, hn = (t, e) => (n) => !!(typeof n == "string" && mo.test(n) && n.startsWith(t) || e && !po(n) && Object.prototype.hasOwnProperty.call(n, e)), ws = (t, e, n) => (i) => {
230
+ const yo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, dn = (t, e) => (n) => !!(typeof n == "string" && yo.test(n) && n.startsWith(t) || e && !go(n) && Object.prototype.hasOwnProperty.call(n, e)), Ss = (t, e, n) => (i) => {
231
231
  if (typeof i != "string")
232
232
  return i;
233
- const [s, o, r, a] = i.match(un);
233
+ const [s, o, r, a] = i.match(fn);
234
234
  return {
235
235
  [t]: parseFloat(s),
236
236
  [e]: parseFloat(o),
237
237
  [n]: parseFloat(r),
238
238
  alpha: a !== void 0 ? parseFloat(a) : 1
239
239
  };
240
- }, go = (t) => q(0, 255, t), ce = {
240
+ }, vo = (t) => q(0, 255, t), ue = {
241
241
  ...wt,
242
- transform: (t) => Math.round(go(t))
242
+ transform: (t) => Math.round(vo(t))
243
243
  }, lt = {
244
- test: /* @__PURE__ */ hn("rgb", "red"),
245
- parse: /* @__PURE__ */ ws("red", "green", "blue"),
246
- transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + ce.transform(t) + ", " + ce.transform(e) + ", " + ce.transform(n) + ", " + Ct(Lt.transform(i)) + ")"
244
+ test: /* @__PURE__ */ dn("rgb", "red"),
245
+ parse: /* @__PURE__ */ Ss("red", "green", "blue"),
246
+ transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + ue.transform(t) + ", " + ue.transform(e) + ", " + ue.transform(n) + ", " + Mt(kt.transform(i)) + ")"
247
247
  };
248
- function yo(t) {
248
+ function xo(t) {
249
249
  let e = "", n = "", i = "", s = "";
250
250
  return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), i = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), i = t.substring(3, 4), s = t.substring(4, 5), e += e, n += n, i += i, s += s), {
251
251
  red: parseInt(e, 16),
@@ -254,83 +254,83 @@ function yo(t) {
254
254
  alpha: s ? parseInt(s, 16) / 255 : 1
255
255
  };
256
256
  }
257
- const Ve = {
258
- test: /* @__PURE__ */ hn("#"),
259
- parse: yo,
257
+ const De = {
258
+ test: /* @__PURE__ */ dn("#"),
259
+ parse: xo,
260
260
  transform: lt.transform
261
- }, jt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
261
+ }, Nt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
262
262
  test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
263
263
  parse: parseFloat,
264
264
  transform: (e) => `${e}${t}`
265
- }), tt = /* @__PURE__ */ jt("deg"), X = /* @__PURE__ */ jt("%"), w = /* @__PURE__ */ jt("px"), vo = /* @__PURE__ */ jt("vh"), xo = /* @__PURE__ */ jt("vw"), jn = {
265
+ }), tt = /* @__PURE__ */ Nt("deg"), X = /* @__PURE__ */ Nt("%"), w = /* @__PURE__ */ Nt("px"), To = /* @__PURE__ */ Nt("vh"), wo = /* @__PURE__ */ Nt("vw"), $n = {
266
266
  ...X,
267
267
  parse: (t) => X.parse(t) / 100,
268
268
  transform: (t) => X.transform(t * 100)
269
269
  }, ft = {
270
- test: /* @__PURE__ */ hn("hsl", "hue"),
271
- parse: /* @__PURE__ */ ws("hue", "saturation", "lightness"),
272
- transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + X.transform(Ct(e)) + ", " + X.transform(Ct(n)) + ", " + Ct(Lt.transform(i)) + ")"
270
+ test: /* @__PURE__ */ dn("hsl", "hue"),
271
+ parse: /* @__PURE__ */ Ss("hue", "saturation", "lightness"),
272
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + X.transform(Mt(e)) + ", " + X.transform(Mt(n)) + ", " + Mt(kt.transform(i)) + ")"
273
273
  }, L = {
274
- test: (t) => lt.test(t) || Ve.test(t) || ft.test(t),
275
- parse: (t) => lt.test(t) ? lt.parse(t) : ft.test(t) ? ft.parse(t) : Ve.parse(t),
274
+ test: (t) => lt.test(t) || De.test(t) || ft.test(t),
275
+ parse: (t) => lt.test(t) ? lt.parse(t) : ft.test(t) ? ft.parse(t) : De.parse(t),
276
276
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? lt.transform(t) : ft.transform(t),
277
277
  getAnimatableNone: (t) => {
278
278
  const e = L.parse(t);
279
279
  return e.alpha = 0, L.transform(e);
280
280
  }
281
- }, To = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
282
- function wo(t) {
281
+ }, bo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
282
+ function So(t) {
283
283
  var e, n;
284
- return isNaN(t) && typeof t == "string" && (((e = t.match(un)) == null ? void 0 : e.length) || 0) + (((n = t.match(To)) == null ? void 0 : n.length) || 0) > 0;
284
+ return isNaN(t) && typeof t == "string" && (((e = t.match(fn)) == null ? void 0 : e.length) || 0) + (((n = t.match(bo)) == null ? void 0 : n.length) || 0) > 0;
285
285
  }
286
- const bs = "number", Ss = "color", bo = "var", So = "var(", Nn = "${}", Po = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
287
- function kt(t) {
286
+ const Ps = "number", As = "color", Po = "var", Ao = "var(", Un = "${}", Vo = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
287
+ function Ft(t) {
288
288
  const e = t.toString(), n = [], i = {
289
289
  color: [],
290
290
  number: [],
291
291
  var: []
292
292
  }, s = [];
293
293
  let o = 0;
294
- const a = e.replace(Po, (l) => (L.test(l) ? (i.color.push(o), s.push(Ss), n.push(L.parse(l))) : l.startsWith(So) ? (i.var.push(o), s.push(bo), n.push(l)) : (i.number.push(o), s.push(bs), n.push(parseFloat(l))), ++o, Nn)).split(Nn);
294
+ const a = e.replace(Vo, (l) => (L.test(l) ? (i.color.push(o), s.push(As), n.push(L.parse(l))) : l.startsWith(Ao) ? (i.var.push(o), s.push(Po), n.push(l)) : (i.number.push(o), s.push(Ps), n.push(parseFloat(l))), ++o, Un)).split(Un);
295
295
  return { values: n, split: a, indexes: i, types: s };
296
296
  }
297
- function Ps(t) {
298
- return kt(t).values;
297
+ function Vs(t) {
298
+ return Ft(t).values;
299
299
  }
300
- function As(t) {
301
- const { split: e, types: n } = kt(t), i = e.length;
300
+ function Ds(t) {
301
+ const { split: e, types: n } = Ft(t), i = e.length;
302
302
  return (s) => {
303
303
  let o = "";
304
304
  for (let r = 0; r < i; r++)
305
305
  if (o += e[r], s[r] !== void 0) {
306
306
  const a = n[r];
307
- a === bs ? o += Ct(s[r]) : a === Ss ? o += L.transform(s[r]) : o += s[r];
307
+ a === Ps ? o += Mt(s[r]) : a === As ? o += L.transform(s[r]) : o += s[r];
308
308
  }
309
309
  return o;
310
310
  };
311
311
  }
312
- const Ao = (t) => typeof t == "number" ? 0 : L.test(t) ? L.getAnimatableNone(t) : t;
313
- function Vo(t) {
314
- const e = Ps(t);
315
- return As(t)(e.map(Ao));
312
+ const Do = (t) => typeof t == "number" ? 0 : L.test(t) ? L.getAnimatableNone(t) : t;
313
+ function Co(t) {
314
+ const e = Vs(t);
315
+ return Ds(t)(e.map(Do));
316
316
  }
317
317
  const it = {
318
- test: wo,
319
- parse: Ps,
320
- createTransformer: As,
321
- getAnimatableNone: Vo
318
+ test: So,
319
+ parse: Vs,
320
+ createTransformer: Ds,
321
+ getAnimatableNone: Co
322
322
  };
323
- function ue(t, e, n) {
323
+ function he(t, e, n) {
324
324
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
325
325
  }
326
- function Do({ hue: t, saturation: e, lightness: n, alpha: i }) {
326
+ function Mo({ hue: t, saturation: e, lightness: n, alpha: i }) {
327
327
  t /= 360, e /= 100, n /= 100;
328
328
  let s = 0, o = 0, r = 0;
329
329
  if (!e)
330
330
  s = o = r = n;
331
331
  else {
332
332
  const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
333
- s = ue(l, a, t + 1 / 3), o = ue(l, a, t), r = ue(l, a, t - 1 / 3);
333
+ s = he(l, a, t + 1 / 3), o = he(l, a, t), r = he(l, a, t - 1 / 3);
334
334
  }
335
335
  return {
336
336
  red: Math.round(s * 255),
@@ -339,55 +339,55 @@ function Do({ hue: t, saturation: e, lightness: n, alpha: i }) {
339
339
  alpha: i
340
340
  };
341
341
  }
342
- function Yt(t, e) {
342
+ function Xt(t, e) {
343
343
  return (n) => n > 0 ? e : t;
344
344
  }
345
- const E = (t, e, n) => t + (e - t) * n, he = (t, e, n) => {
345
+ const E = (t, e, n) => t + (e - t) * n, fe = (t, e, n) => {
346
346
  const i = t * t, s = n * (e * e - i) + i;
347
347
  return s < 0 ? 0 : Math.sqrt(s);
348
- }, Co = [Ve, lt, ft], Mo = (t) => Co.find((e) => e.test(t));
349
- function $n(t) {
350
- const e = Mo(t);
348
+ }, Eo = [De, lt, ft], Ro = (t) => Eo.find((e) => e.test(t));
349
+ function Wn(t) {
350
+ const e = Ro(t);
351
351
  if (Tt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
352
352
  return !1;
353
353
  let n = e.parse(t);
354
- return e === ft && (n = Do(n)), n;
354
+ return e === ft && (n = Mo(n)), n;
355
355
  }
356
- const Un = (t, e) => {
357
- const n = $n(t), i = $n(e);
356
+ const Kn = (t, e) => {
357
+ const n = Wn(t), i = Wn(e);
358
358
  if (!n || !i)
359
- return Yt(t, e);
359
+ return Xt(t, e);
360
360
  const s = { ...n };
361
- return (o) => (s.red = he(n.red, i.red, o), s.green = he(n.green, i.green, o), s.blue = he(n.blue, i.blue, o), s.alpha = E(n.alpha, i.alpha, o), lt.transform(s));
362
- }, De = /* @__PURE__ */ new Set(["none", "hidden"]);
363
- function Eo(t, e) {
364
- return De.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
361
+ return (o) => (s.red = fe(n.red, i.red, o), s.green = fe(n.green, i.green, o), s.blue = fe(n.blue, i.blue, o), s.alpha = E(n.alpha, i.alpha, o), lt.transform(s));
362
+ }, Ce = /* @__PURE__ */ new Set(["none", "hidden"]);
363
+ function Lo(t, e) {
364
+ return Ce.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
365
365
  }
366
- function Ro(t, e) {
366
+ function ko(t, e) {
367
367
  return (n) => E(t, e, n);
368
368
  }
369
- function fn(t) {
370
- return typeof t == "number" ? Ro : typeof t == "string" ? cn(t) ? Yt : L.test(t) ? Un : Fo : Array.isArray(t) ? Vs : typeof t == "object" ? L.test(t) ? Un : Lo : Yt;
369
+ function pn(t) {
370
+ return typeof t == "number" ? ko : typeof t == "string" ? hn(t) ? Xt : L.test(t) ? Kn : Io : Array.isArray(t) ? Cs : typeof t == "object" ? L.test(t) ? Kn : Fo : Xt;
371
371
  }
372
- function Vs(t, e) {
373
- const n = [...t], i = n.length, s = t.map((o, r) => fn(o)(o, e[r]));
372
+ function Cs(t, e) {
373
+ const n = [...t], i = n.length, s = t.map((o, r) => pn(o)(o, e[r]));
374
374
  return (o) => {
375
375
  for (let r = 0; r < i; r++)
376
376
  n[r] = s[r](o);
377
377
  return n;
378
378
  };
379
379
  }
380
- function Lo(t, e) {
380
+ function Fo(t, e) {
381
381
  const n = { ...t, ...e }, i = {};
382
382
  for (const s in n)
383
- t[s] !== void 0 && e[s] !== void 0 && (i[s] = fn(t[s])(t[s], e[s]));
383
+ t[s] !== void 0 && e[s] !== void 0 && (i[s] = pn(t[s])(t[s], e[s]));
384
384
  return (s) => {
385
385
  for (const o in i)
386
386
  n[o] = i[o](s);
387
387
  return n;
388
388
  };
389
389
  }
390
- function ko(t, e) {
390
+ function Bo(t, e) {
391
391
  const n = [], i = { color: 0, var: 0, number: 0 };
392
392
  for (let s = 0; s < e.values.length; s++) {
393
393
  const o = e.types[s], r = t.indexes[o][i[o]], a = t.values[r] ?? 0;
@@ -395,14 +395,14 @@ function ko(t, e) {
395
395
  }
396
396
  return n;
397
397
  }
398
- const Fo = (t, e) => {
399
- const n = it.createTransformer(e), i = kt(t), s = kt(e);
400
- return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? De.has(t) && !s.values.length || De.has(e) && !i.values.length ? Eo(t, e) : It(Vs(ko(i, s), s.values), n) : (Tt(!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"), Yt(t, e));
398
+ const Io = (t, e) => {
399
+ const n = it.createTransformer(e), i = Ft(t), s = Ft(e);
400
+ return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? Ce.has(t) && !s.values.length || Ce.has(e) && !i.values.length ? Lo(t, e) : Ot(Cs(Bo(i, s), s.values), n) : (Tt(!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"), Xt(t, e));
401
401
  };
402
- function Ds(t, e, n) {
403
- return typeof t == "number" && typeof e == "number" && typeof n == "number" ? E(t, e, n) : fn(t)(t, e);
402
+ function Ms(t, e, n) {
403
+ return typeof t == "number" && typeof e == "number" && typeof n == "number" ? E(t, e, n) : pn(t)(t, e);
404
404
  }
405
- const Bo = (t) => {
405
+ const Oo = (t) => {
406
406
  const e = ({ timestamp: n }) => t(n);
407
407
  return {
408
408
  start: (n = !0) => C.update(e, n),
@@ -413,33 +413,33 @@ const Bo = (t) => {
413
413
  */
414
414
  now: () => B.isProcessing ? B.timestamp : N.now()
415
415
  };
416
- }, Cs = (t, e, n = 10) => {
416
+ }, Es = (t, e, n = 10) => {
417
417
  let i = "";
418
418
  const s = Math.max(Math.round(e / n), 2);
419
419
  for (let o = 0; o < s; o++)
420
420
  i += Math.round(t(o / (s - 1)) * 1e4) / 1e4 + ", ";
421
421
  return `linear(${i.substring(0, i.length - 2)})`;
422
- }, Xt = 2e4;
423
- function dn(t) {
422
+ }, qt = 2e4;
423
+ function mn(t) {
424
424
  let e = 0;
425
425
  const n = 50;
426
426
  let i = t.next(e);
427
- for (; !i.done && e < Xt; )
427
+ for (; !i.done && e < qt; )
428
428
  e += n, i = t.next(e);
429
- return e >= Xt ? 1 / 0 : e;
429
+ return e >= qt ? 1 / 0 : e;
430
430
  }
431
- function Io(t, e = 100, n) {
432
- const i = n({ ...t, keyframes: [0, e] }), s = Math.min(dn(i), Xt);
431
+ function jo(t, e = 100, n) {
432
+ const i = n({ ...t, keyframes: [0, e] }), s = Math.min(mn(i), qt);
433
433
  return {
434
434
  type: "keyframes",
435
435
  ease: (o) => i.next(s * o).value / e,
436
436
  duration: /* @__PURE__ */ G(s)
437
437
  };
438
438
  }
439
- const Oo = 5;
440
- function Ms(t, e, n) {
441
- const i = Math.max(e - Oo, 0);
442
- return as(n - t(i), e - i);
439
+ const No = 5;
440
+ function Rs(t, e, n) {
441
+ const i = Math.max(e - No, 0);
442
+ return cs(n - t(i), e - i);
443
443
  }
444
444
  const M = {
445
445
  // Default spring physics
@@ -469,25 +469,25 @@ const M = {
469
469
  // in seconds
470
470
  minDamping: 0.05,
471
471
  maxDamping: 1
472
- }, fe = 1e-3;
473
- function jo({ duration: t = M.duration, bounce: e = M.bounce, velocity: n = M.velocity, mass: i = M.mass }) {
472
+ }, de = 1e-3;
473
+ function $o({ duration: t = M.duration, bounce: e = M.bounce, velocity: n = M.velocity, mass: i = M.mass }) {
474
474
  let s, o;
475
475
  Tt(t <= /* @__PURE__ */ Y(M.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
476
476
  let r = 1 - e;
477
477
  r = q(M.minDamping, M.maxDamping, r), t = q(M.minDuration, M.maxDuration, /* @__PURE__ */ G(t)), r < 1 ? (s = (c) => {
478
- const u = c * r, h = u * t, f = u - n, d = Ce(c, r), p = Math.exp(-h);
479
- return fe - f / d * p;
478
+ const u = c * r, h = u * t, f = u - n, d = Me(c, r), p = Math.exp(-h);
479
+ return de - f / d * p;
480
480
  }, o = (c) => {
481
- const h = c * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(c, 2) * t, p = Math.exp(-h), m = Ce(Math.pow(c, 2), r);
482
- return (-s(c) + fe > 0 ? -1 : 1) * ((f - d) * p) / m;
481
+ const h = c * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(c, 2) * t, p = Math.exp(-h), m = Me(Math.pow(c, 2), r);
482
+ return (-s(c) + de > 0 ? -1 : 1) * ((f - d) * p) / m;
483
483
  }) : (s = (c) => {
484
484
  const u = Math.exp(-c * t), h = (c - n) * t + 1;
485
- return -fe + u * h;
485
+ return -de + u * h;
486
486
  }, o = (c) => {
487
487
  const u = Math.exp(-c * t), h = (n - c) * (t * t);
488
488
  return u * h;
489
489
  });
490
- const a = 5 / t, l = $o(s, o, a);
490
+ const a = 5 / t, l = Wo(s, o, a);
491
491
  if (t = /* @__PURE__ */ Y(t), isNaN(l))
492
492
  return {
493
493
  stiffness: M.stiffness,
@@ -503,21 +503,21 @@ function jo({ duration: t = M.duration, bounce: e = M.bounce, velocity: n = M.ve
503
503
  };
504
504
  }
505
505
  }
506
- const No = 12;
507
- function $o(t, e, n) {
506
+ const Uo = 12;
507
+ function Wo(t, e, n) {
508
508
  let i = n;
509
- for (let s = 1; s < No; s++)
509
+ for (let s = 1; s < Uo; s++)
510
510
  i = i - t(i) / e(i);
511
511
  return i;
512
512
  }
513
- function Ce(t, e) {
513
+ function Me(t, e) {
514
514
  return t * Math.sqrt(1 - e * e);
515
515
  }
516
- const Uo = ["duration", "bounce"], Wo = ["stiffness", "damping", "mass"];
517
- function Wn(t, e) {
516
+ const Ko = ["duration", "bounce"], Go = ["stiffness", "damping", "mass"];
517
+ function Gn(t, e) {
518
518
  return e.some((n) => t[n] !== void 0);
519
519
  }
520
- function Ko(t) {
520
+ function _o(t) {
521
521
  let e = {
522
522
  velocity: M.velocity,
523
523
  stiffness: M.stiffness,
@@ -526,7 +526,7 @@ function Ko(t) {
526
526
  isResolvedFromDuration: !1,
527
527
  ...t
528
528
  };
529
- if (!Wn(t, Wo) && Wn(t, Uo))
529
+ if (!Gn(t, Go) && Gn(t, Ko))
530
530
  if (t.visualDuration) {
531
531
  const n = t.visualDuration, i = 2 * Math.PI / (n * 1.2), s = i * i, o = 2 * q(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
532
532
  e = {
@@ -536,7 +536,7 @@ function Ko(t) {
536
536
  damping: o
537
537
  };
538
538
  } else {
539
- const n = jo(t);
539
+ const n = $o(t);
540
540
  e = {
541
541
  ...e,
542
542
  ...n,
@@ -545,21 +545,21 @@ function Ko(t) {
545
545
  }
546
546
  return e;
547
547
  }
548
- function qt(t = M.visualDuration, e = M.bounce) {
548
+ function Zt(t = M.visualDuration, e = M.bounce) {
549
549
  const n = typeof t != "object" ? {
550
550
  visualDuration: t,
551
551
  keyframes: [0, 1],
552
552
  bounce: e
553
553
  } : t;
554
554
  let { restSpeed: i, restDelta: s } = n;
555
- const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: d } = Ko({
555
+ const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: d } = _o({
556
556
  ...n,
557
557
  velocity: -/* @__PURE__ */ G(n.velocity || 0)
558
558
  }), p = f || 0, m = c / (2 * Math.sqrt(l * u)), g = r - o, y = /* @__PURE__ */ G(Math.sqrt(l / u)), x = Math.abs(g) < 5;
559
559
  i || (i = x ? M.restSpeed.granular : M.restSpeed.default), s || (s = x ? M.restDelta.granular : M.restDelta.default);
560
560
  let v;
561
561
  if (m < 1) {
562
- const b = Ce(y, m);
562
+ const b = Me(y, m);
563
563
  v = (V) => {
564
564
  const D = Math.exp(-m * y * V);
565
565
  return r - D * ((p + m * y * g) / b * Math.sin(b * V) + g * Math.cos(b * V));
@@ -581,14 +581,14 @@ function qt(t = M.visualDuration, e = M.bounce) {
581
581
  a.done = b >= h;
582
582
  else {
583
583
  let D = b === 0 ? p : 0;
584
- m < 1 && (D = b === 0 ? /* @__PURE__ */ Y(p) : Ms(v, b, V));
584
+ m < 1 && (D = b === 0 ? /* @__PURE__ */ Y(p) : Rs(v, b, V));
585
585
  const P = Math.abs(D) <= i, A = Math.abs(r - V) <= s;
586
586
  a.done = P && A;
587
587
  }
588
588
  return a.value = a.done ? r : V, a;
589
589
  },
590
590
  toString: () => {
591
- const b = Math.min(dn(S), Xt), V = Cs((D) => S.next(b * D).value, b, 30);
591
+ const b = Math.min(mn(S), qt), V = Es((D) => S.next(b * D).value, b, 30);
592
592
  return b + "ms " + V;
593
593
  },
594
594
  toTransition: () => {
@@ -596,11 +596,11 @@ function qt(t = M.visualDuration, e = M.bounce) {
596
596
  };
597
597
  return S;
598
598
  }
599
- qt.applyToOptions = (t) => {
600
- const e = Io(t, 100, qt);
599
+ Zt.applyToOptions = (t) => {
600
+ const e = jo(t, 100, Zt);
601
601
  return t.ease = e.ease, t.duration = /* @__PURE__ */ Y(e.duration), t.type = "keyframes", t;
602
602
  };
603
- function Me({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
603
+ function Ee({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
604
604
  const h = t[0], f = {
605
605
  done: !1,
606
606
  value: h
@@ -614,9 +614,9 @@ function Me({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
614
614
  };
615
615
  let b, V;
616
616
  const D = (P) => {
617
- d(f.value) && (b = P, V = qt({
617
+ d(f.value) && (b = P, V = Zt({
618
618
  keyframes: [f.value, p(f.value)],
619
- velocity: Ms(v, P, f.value),
619
+ velocity: Rs(v, P, f.value),
620
620
  // TODO: This should be passing * 1000
621
621
  damping: s,
622
622
  stiffness: o,
@@ -632,19 +632,19 @@ function Me({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
632
632
  }
633
633
  };
634
634
  }
635
- function Go(t, e, n) {
636
- const i = [], s = n || Q.mix || Ds, o = t.length - 1;
635
+ function zo(t, e, n) {
636
+ const i = [], s = n || Q.mix || Ms, o = t.length - 1;
637
637
  for (let r = 0; r < o; r++) {
638
638
  let a = s(t[r], t[r + 1]);
639
639
  if (e) {
640
640
  const l = Array.isArray(e) ? e[r] || _ : e;
641
- a = It(l, a);
641
+ a = Ot(l, a);
642
642
  }
643
643
  i.push(a);
644
644
  }
645
645
  return i;
646
646
  }
647
- function _o(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
647
+ function Ho(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
648
648
  const o = t.length;
649
649
  if (J(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
650
650
  return () => e[0];
@@ -652,68 +652,68 @@ function _o(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
652
652
  return () => e[1];
653
653
  const r = t[0] === t[1];
654
654
  t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
655
- const a = Go(e, i, s), l = a.length, c = (u) => {
655
+ const a = zo(e, i, s), l = a.length, c = (u) => {
656
656
  if (r && u < t[0])
657
657
  return e[0];
658
658
  let h = 0;
659
659
  if (l > 1)
660
660
  for (; h < t.length - 2 && !(u < t[h + 1]); h++)
661
661
  ;
662
- const f = /* @__PURE__ */ Rt(t[h], t[h + 1], u);
662
+ const f = /* @__PURE__ */ Lt(t[h], t[h + 1], u);
663
663
  return a[h](f);
664
664
  };
665
665
  return n ? (u) => c(q(t[0], t[o - 1], u)) : c;
666
666
  }
667
- function zo(t, e) {
667
+ function Yo(t, e) {
668
668
  const n = t[t.length - 1];
669
669
  for (let i = 1; i <= e; i++) {
670
- const s = /* @__PURE__ */ Rt(0, e, i);
670
+ const s = /* @__PURE__ */ Lt(0, e, i);
671
671
  t.push(E(n, 1, s));
672
672
  }
673
673
  }
674
- function Ho(t) {
674
+ function Xo(t) {
675
675
  const e = [0];
676
- return zo(e, t.length - 1), e;
676
+ return Yo(e, t.length - 1), e;
677
677
  }
678
- function Yo(t, e) {
678
+ function qo(t, e) {
679
679
  return t.map((n) => n * e);
680
680
  }
681
- function Xo(t, e) {
682
- return t.map(() => e || gs).splice(0, t.length - 1);
681
+ function Zo(t, e) {
682
+ return t.map(() => e || vs).splice(0, t.length - 1);
683
683
  }
684
684
  function dt({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
685
- const s = oo(i) ? i.map(In) : In(i), o = {
685
+ const s = lo(i) ? i.map(jn) : jn(i), o = {
686
686
  done: !1,
687
687
  value: e[0]
688
- }, r = Yo(
688
+ }, r = qo(
689
689
  // Only use the provided offsets if they're the correct length
690
690
  // TODO Maybe we should warn here if there's a length mismatch
691
- n && n.length === e.length ? n : Ho(e),
691
+ n && n.length === e.length ? n : Xo(e),
692
692
  t
693
- ), a = _o(r, e, {
694
- ease: Array.isArray(s) ? s : Xo(e, s)
693
+ ), a = Ho(r, e, {
694
+ ease: Array.isArray(s) ? s : Zo(e, s)
695
695
  });
696
696
  return {
697
697
  calculatedDuration: t,
698
698
  next: (l) => (o.value = a(l), o.done = l >= t, o)
699
699
  };
700
700
  }
701
- const qo = (t) => t !== null;
702
- function pn(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
703
- const o = t.filter(qo), a = s < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
701
+ const Jo = (t) => t !== null;
702
+ function gn(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
703
+ const o = t.filter(Jo), a = s < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
704
704
  return !a || i === void 0 ? o[a] : i;
705
705
  }
706
- const Zo = {
707
- decay: Me,
708
- inertia: Me,
706
+ const Qo = {
707
+ decay: Ee,
708
+ inertia: Ee,
709
709
  tween: dt,
710
710
  keyframes: dt,
711
- spring: qt
711
+ spring: Zt
712
712
  };
713
- function Es(t) {
714
- typeof t.type == "string" && (t.type = Zo[t.type]);
713
+ function Ls(t) {
714
+ typeof t.type == "string" && (t.type = Qo[t.type]);
715
715
  }
716
- class mn {
716
+ class yn {
717
717
  constructor() {
718
718
  this.updateFinished();
719
719
  }
@@ -737,8 +737,8 @@ class mn {
737
737
  return this.finished.then(e, n);
738
738
  }
739
739
  }
740
- const Jo = (t) => t / 100;
741
- class gn extends mn {
740
+ const ta = (t) => t / 100;
741
+ class vn extends yn {
742
742
  constructor(e) {
743
743
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
744
744
  var i, s;
@@ -748,17 +748,17 @@ class gn extends mn {
748
748
  }
749
749
  initAnimation() {
750
750
  const { options: e } = this;
751
- Es(e);
751
+ Ls(e);
752
752
  const { type: n = dt, repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = e;
753
753
  let { keyframes: a } = e;
754
754
  const l = n || dt;
755
- process.env.NODE_ENV !== "production" && l !== dt && J(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== dt && typeof a[0] != "number" && (this.mixKeyframes = It(Jo, Ds(a[0], a[1])), a = [0, 100]);
755
+ process.env.NODE_ENV !== "production" && l !== dt && J(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== dt && typeof a[0] != "number" && (this.mixKeyframes = Ot(ta, Ms(a[0], a[1])), a = [0, 100]);
756
756
  const c = l({ ...e, keyframes: a });
757
757
  o === "mirror" && (this.mirroredGenerator = l({
758
758
  ...e,
759
759
  keyframes: [...a].reverse(),
760
760
  velocity: -r
761
- })), c.calculatedDuration === null && (c.calculatedDuration = dn(c));
761
+ })), c.calculatedDuration === null && (c.calculatedDuration = mn(c));
762
762
  const { calculatedDuration: u } = c;
763
763
  this.calculatedDuration = u, this.resolvedDuration = u + s, this.totalDuration = this.resolvedDuration * (i + 1) - s, this.generator = c;
764
764
  }
@@ -785,7 +785,7 @@ class gn extends mn {
785
785
  let { done: V } = b;
786
786
  !x && l !== null && (V = this.playbackSpeed >= 0 ? this.currentTime >= s : this.currentTime <= 0);
787
787
  const D = this.holdTime === null && (this.state === "finished" || this.state === "running" && V);
788
- return D && p !== Me && (b.value = pn(u, this.options, g, this.speed)), m && m(b.value), D && this.finish(), b;
788
+ return D && p !== Ee && (b.value = gn(u, this.options, g, this.speed)), m && m(b.value), D && this.finish(), b;
789
789
  }
790
790
  /**
791
791
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -821,7 +821,7 @@ class gn extends mn {
821
821
  var s, o;
822
822
  if (this.isStopped)
823
823
  return;
824
- const { driver: e = Bo, startTime: n } = this.options;
824
+ const { driver: e = Oo, startTime: n } = this.options;
825
825
  this.driver || (this.driver = e((r) => this.tick(r))), (o = (s = this.options).onPlay) == null || o.call(s);
826
826
  const i = this.driver.now();
827
827
  this.state === "finished" ? (this.updateFinished(), this.startTime = i) : this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime || (this.startTime = n ?? i), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
@@ -854,14 +854,14 @@ class gn extends mn {
854
854
  return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), e.observe(this);
855
855
  }
856
856
  }
857
- function Qo(t) {
857
+ function ea(t) {
858
858
  for (let e = 1; e < t.length; e++)
859
859
  t[e] ?? (t[e] = t[e - 1]);
860
860
  }
861
- const ct = (t) => t * 180 / Math.PI, Ee = (t) => {
861
+ const ct = (t) => t * 180 / Math.PI, Re = (t) => {
862
862
  const e = ct(Math.atan2(t[1], t[0]));
863
- return Re(e);
864
- }, ta = {
863
+ return Le(e);
864
+ }, na = {
865
865
  x: 4,
866
866
  y: 5,
867
867
  translateX: 4,
@@ -869,53 +869,53 @@ const ct = (t) => t * 180 / Math.PI, Ee = (t) => {
869
869
  scaleX: 0,
870
870
  scaleY: 3,
871
871
  scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
872
- rotate: Ee,
873
- rotateZ: Ee,
872
+ rotate: Re,
873
+ rotateZ: Re,
874
874
  skewX: (t) => ct(Math.atan(t[1])),
875
875
  skewY: (t) => ct(Math.atan(t[2])),
876
876
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
877
- }, Re = (t) => (t = t % 360, t < 0 && (t += 360), t), Kn = Ee, Gn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), _n = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ea = {
877
+ }, Le = (t) => (t = t % 360, t < 0 && (t += 360), t), _n = Re, zn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Hn = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ia = {
878
878
  x: 12,
879
879
  y: 13,
880
880
  z: 14,
881
881
  translateX: 12,
882
882
  translateY: 13,
883
883
  translateZ: 14,
884
- scaleX: Gn,
885
- scaleY: _n,
886
- scale: (t) => (Gn(t) + _n(t)) / 2,
887
- rotateX: (t) => Re(ct(Math.atan2(t[6], t[5]))),
888
- rotateY: (t) => Re(ct(Math.atan2(-t[2], t[0]))),
889
- rotateZ: Kn,
890
- rotate: Kn,
884
+ scaleX: zn,
885
+ scaleY: Hn,
886
+ scale: (t) => (zn(t) + Hn(t)) / 2,
887
+ rotateX: (t) => Le(ct(Math.atan2(t[6], t[5]))),
888
+ rotateY: (t) => Le(ct(Math.atan2(-t[2], t[0]))),
889
+ rotateZ: _n,
890
+ rotate: _n,
891
891
  skewX: (t) => ct(Math.atan(t[4])),
892
892
  skewY: (t) => ct(Math.atan(t[1])),
893
893
  skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
894
894
  };
895
- function Le(t) {
895
+ function ke(t) {
896
896
  return t.includes("scale") ? 1 : 0;
897
897
  }
898
- function ke(t, e) {
898
+ function Fe(t, e) {
899
899
  if (!t || t === "none")
900
- return Le(e);
900
+ return ke(e);
901
901
  const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
902
902
  let i, s;
903
903
  if (n)
904
- i = ea, s = n;
904
+ i = ia, s = n;
905
905
  else {
906
906
  const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
907
- i = ta, s = a;
907
+ i = na, s = a;
908
908
  }
909
909
  if (!s)
910
- return Le(e);
911
- const o = i[e], r = s[1].split(",").map(ia);
910
+ return ke(e);
911
+ const o = i[e], r = s[1].split(",").map(ra);
912
912
  return typeof o == "function" ? o(r) : r[o];
913
913
  }
914
- const na = (t, e) => {
914
+ const sa = (t, e) => {
915
915
  const { transform: n = "none" } = getComputedStyle(t);
916
- return ke(n, e);
916
+ return Fe(n, e);
917
917
  };
918
- function ia(t) {
918
+ function ra(t) {
919
919
  return parseFloat(t.trim());
920
920
  }
921
921
  const bt = [
@@ -936,10 +936,10 @@ const bt = [
936
936
  "skew",
937
937
  "skewX",
938
938
  "skewY"
939
- ], St = new Set(bt), zn = (t) => t === wt || t === w, sa = /* @__PURE__ */ new Set(["x", "y", "z"]), ra = bt.filter((t) => !sa.has(t));
940
- function oa(t) {
939
+ ], St = new Set(bt), Yn = (t) => t === wt || t === w, oa = /* @__PURE__ */ new Set(["x", "y", "z"]), aa = bt.filter((t) => !oa.has(t));
940
+ function la(t) {
941
941
  const e = [];
942
- return ra.forEach((n) => {
942
+ return aa.forEach((n) => {
943
943
  const i = t.getValue(n);
944
944
  i !== void 0 && (e.push([n, i.get()]), i.set(n.startsWith("scale") ? 1 : 0));
945
945
  }), e;
@@ -953,18 +953,18 @@ const et = {
953
953
  bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
954
954
  right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
955
955
  // Transform
956
- x: (t, { transform: e }) => ke(e, "x"),
957
- y: (t, { transform: e }) => ke(e, "y")
956
+ x: (t, { transform: e }) => Fe(e, "x"),
957
+ y: (t, { transform: e }) => Fe(e, "y")
958
958
  };
959
959
  et.translateX = et.x;
960
960
  et.translateY = et.y;
961
961
  const ut = /* @__PURE__ */ new Set();
962
- let Fe = !1, Be = !1, Ie = !1;
963
- function Rs() {
964
- if (Be) {
962
+ let Be = !1, Ie = !1, Oe = !1;
963
+ function ks() {
964
+ if (Ie) {
965
965
  const t = Array.from(ut).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
966
966
  e.forEach((i) => {
967
- const s = oa(i);
967
+ const s = la(i);
968
968
  s.length && (n.set(i, s), i.render());
969
969
  }), t.forEach((i) => i.measureInitialState()), e.forEach((i) => {
970
970
  i.render();
@@ -977,22 +977,22 @@ function Rs() {
977
977
  i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
978
978
  });
979
979
  }
980
- Be = !1, Fe = !1, ut.forEach((t) => t.complete(Ie)), ut.clear();
980
+ Ie = !1, Be = !1, ut.forEach((t) => t.complete(Oe)), ut.clear();
981
981
  }
982
- function Ls() {
982
+ function Fs() {
983
983
  ut.forEach((t) => {
984
- t.readKeyframes(), t.needsMeasurement && (Be = !0);
984
+ t.readKeyframes(), t.needsMeasurement && (Ie = !0);
985
985
  });
986
986
  }
987
- function aa() {
988
- Ie = !0, Ls(), Rs(), Ie = !1;
987
+ function ca() {
988
+ Oe = !0, Fs(), ks(), Oe = !1;
989
989
  }
990
- class yn {
990
+ class xn {
991
991
  constructor(e, n, i, s, o, r = !1) {
992
992
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
993
993
  }
994
994
  scheduleResolve() {
995
- this.state = "scheduled", this.isAsync ? (ut.add(this), Fe || (Fe = !0, C.read(Ls), C.resolveKeyframes(Rs))) : (this.readKeyframes(), this.complete());
995
+ this.state = "scheduled", this.isAsync ? (ut.add(this), Be || (Be = !0, C.read(Fs), C.resolveKeyframes(ks))) : (this.readKeyframes(), this.complete());
996
996
  }
997
997
  readKeyframes() {
998
998
  const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
@@ -1006,7 +1006,7 @@ class yn {
1006
1006
  }
1007
1007
  e[0] === void 0 && (e[0] = r), s && o === void 0 && s.set(e[0]);
1008
1008
  }
1009
- Qo(e);
1009
+ ea(e);
1010
1010
  }
1011
1011
  setFinalKeyframe() {
1012
1012
  }
@@ -1026,43 +1026,43 @@ class yn {
1026
1026
  this.state === "pending" && this.scheduleResolve();
1027
1027
  }
1028
1028
  }
1029
- const la = (t) => t.startsWith("--");
1030
- function ca(t, e, n) {
1031
- la(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1029
+ const ua = (t) => t.startsWith("--");
1030
+ function ha(t, e, n) {
1031
+ ua(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1032
1032
  }
1033
- const ua = /* @__PURE__ */ sn(() => window.ScrollTimeline !== void 0), ha = {};
1034
- function fa(t, e) {
1035
- const n = /* @__PURE__ */ sn(t);
1036
- return () => ha[e] ?? n();
1033
+ const fa = /* @__PURE__ */ on(() => window.ScrollTimeline !== void 0), da = {};
1034
+ function pa(t, e) {
1035
+ const n = /* @__PURE__ */ on(t);
1036
+ return () => da[e] ?? n();
1037
1037
  }
1038
- const ks = /* @__PURE__ */ fa(() => {
1038
+ const Bs = /* @__PURE__ */ pa(() => {
1039
1039
  try {
1040
1040
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1041
1041
  } catch {
1042
1042
  return !1;
1043
1043
  }
1044
1044
  return !0;
1045
- }, "linearEasing"), Vt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Hn = {
1045
+ }, "linearEasing"), Dt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Xn = {
1046
1046
  linear: "linear",
1047
1047
  ease: "ease",
1048
1048
  easeIn: "ease-in",
1049
1049
  easeOut: "ease-out",
1050
1050
  easeInOut: "ease-in-out",
1051
- circIn: /* @__PURE__ */ Vt([0, 0.65, 0.55, 1]),
1052
- circOut: /* @__PURE__ */ Vt([0.55, 0, 1, 0.45]),
1053
- backIn: /* @__PURE__ */ Vt([0.31, 0.01, 0.66, -0.59]),
1054
- backOut: /* @__PURE__ */ Vt([0.33, 1.53, 0.69, 0.99])
1051
+ circIn: /* @__PURE__ */ Dt([0, 0.65, 0.55, 1]),
1052
+ circOut: /* @__PURE__ */ Dt([0.55, 0, 1, 0.45]),
1053
+ backIn: /* @__PURE__ */ Dt([0.31, 0.01, 0.66, -0.59]),
1054
+ backOut: /* @__PURE__ */ Dt([0.33, 1.53, 0.69, 0.99])
1055
1055
  };
1056
- function Fs(t, e) {
1056
+ function Is(t, e) {
1057
1057
  if (t)
1058
- return typeof t == "function" ? ks() ? Cs(t, e) : "ease-out" : ys(t) ? Vt(t) : Array.isArray(t) ? t.map((n) => Fs(n, e) || Hn.easeOut) : Hn[t];
1058
+ return typeof t == "function" ? Bs() ? Es(t, e) : "ease-out" : xs(t) ? Dt(t) : Array.isArray(t) ? t.map((n) => Is(n, e) || Xn.easeOut) : Xn[t];
1059
1059
  }
1060
- function da(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
1060
+ function ma(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
1061
1061
  const u = {
1062
1062
  [e]: n
1063
1063
  };
1064
1064
  l && (u.offset = l);
1065
- const h = Fs(a, s);
1065
+ const h = Is(a, s);
1066
1066
  Array.isArray(h) && (u.easing = h);
1067
1067
  const f = {
1068
1068
  delay: i,
@@ -1074,23 +1074,23 @@ function da(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatTyp
1074
1074
  };
1075
1075
  return c && (f.pseudoElement = c), t.animate(u, f);
1076
1076
  }
1077
- function Bs(t) {
1077
+ function Os(t) {
1078
1078
  return typeof t == "function" && "applyToOptions" in t;
1079
1079
  }
1080
- function pa({ type: t, ...e }) {
1081
- return Bs(t) && ks() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1080
+ function ga({ type: t, ...e }) {
1081
+ return Os(t) && Bs() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1082
1082
  }
1083
- class ma extends mn {
1083
+ class ya extends yn {
1084
1084
  constructor(e) {
1085
1085
  if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e)
1086
1086
  return;
1087
1087
  const { element: n, name: i, keyframes: s, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: a, onComplete: l } = e;
1088
1088
  this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, J(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1089
- const c = pa(e);
1090
- this.animation = da(n, i, s, c, o), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1089
+ const c = ga(e);
1090
+ this.animation = ma(n, i, s, c, o), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1091
1091
  if (this.finishedTime = this.time, !o) {
1092
- const u = pn(s, this.options, a, this.speed);
1093
- this.updateMotionValue ? this.updateMotionValue(u) : ca(n, i, u), this.animation.cancel();
1092
+ const u = gn(s, this.options, a, this.speed);
1093
+ this.updateMotionValue ? this.updateMotionValue(u) : ha(n, i, u), this.animation.cancel();
1094
1094
  }
1095
1095
  l == null || l(), this.notifyFinished();
1096
1096
  };
@@ -1174,24 +1174,24 @@ class ma extends mn {
1174
1174
  */
1175
1175
  attachTimeline({ timeline: e, observe: n }) {
1176
1176
  var i;
1177
- return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && ua() ? (this.animation.timeline = e, _) : n(this);
1177
+ return this.allowFlatten && ((i = this.animation.effect) == null || i.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && fa() ? (this.animation.timeline = e, _) : n(this);
1178
1178
  }
1179
1179
  }
1180
- const Is = {
1181
- anticipate: ds,
1182
- backInOut: fs,
1183
- circInOut: ms
1180
+ const js = {
1181
+ anticipate: ms,
1182
+ backInOut: ps,
1183
+ circInOut: ys
1184
1184
  };
1185
- function ga(t) {
1186
- return t in Is;
1185
+ function va(t) {
1186
+ return t in js;
1187
1187
  }
1188
- function ya(t) {
1189
- typeof t.ease == "string" && ga(t.ease) && (t.ease = Is[t.ease]);
1188
+ function xa(t) {
1189
+ typeof t.ease == "string" && va(t.ease) && (t.ease = js[t.ease]);
1190
1190
  }
1191
- const de = 10;
1192
- class va extends ma {
1191
+ const pe = 10;
1192
+ class Ta extends ya {
1193
1193
  constructor(e) {
1194
- ya(e), Es(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
1194
+ xa(e), Ls(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
1195
1195
  }
1196
1196
  /**
1197
1197
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1209,17 +1209,17 @@ class va extends ma {
1209
1209
  n.set(e);
1210
1210
  return;
1211
1211
  }
1212
- const a = new gn({
1212
+ const a = new vn({
1213
1213
  ...r,
1214
1214
  autoplay: !1
1215
- }), l = Math.max(de, N.now() - this.startTime), c = q(0, de, l - de);
1215
+ }), l = Math.max(pe, N.now() - this.startTime), c = q(0, pe, l - pe);
1216
1216
  n.setWithVelocity(a.sample(Math.max(0, l - c)).value, a.sample(l).value, c), a.stop();
1217
1217
  }
1218
1218
  }
1219
- const Yn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1219
+ const qn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1220
1220
  (it.test(t) || t === "0") && // And it contains numbers and/or colors
1221
1221
  !t.startsWith("url("));
1222
- function xa(t) {
1222
+ function wa(t) {
1223
1223
  const e = t[0];
1224
1224
  if (t.length === 1)
1225
1225
  return !0;
@@ -1227,40 +1227,40 @@ function xa(t) {
1227
1227
  if (t[n] !== e)
1228
1228
  return !0;
1229
1229
  }
1230
- function Ta(t, e, n, i) {
1230
+ function ba(t, e, n, i) {
1231
1231
  const s = t[0];
1232
1232
  if (s === null)
1233
1233
  return !1;
1234
1234
  if (e === "display" || e === "visibility")
1235
1235
  return !0;
1236
- const o = t[t.length - 1], r = Yn(s, e), a = Yn(o, e);
1237
- return Tt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : xa(t) || (n === "spring" || Bs(n)) && i;
1236
+ const o = t[t.length - 1], r = qn(s, e), a = qn(o, e);
1237
+ return Tt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : wa(t) || (n === "spring" || Os(n)) && i;
1238
1238
  }
1239
- function Oe(t) {
1239
+ function je(t) {
1240
1240
  t.duration = 0, t.type = "keyframes";
1241
1241
  }
1242
- const wa = /* @__PURE__ */ new Set([
1242
+ const Sa = /* @__PURE__ */ new Set([
1243
1243
  "opacity",
1244
1244
  "clipPath",
1245
1245
  "filter",
1246
1246
  "transform"
1247
1247
  // TODO: Could be re-enabled now we have support for linear() easing
1248
1248
  // "background-color"
1249
- ]), ba = /* @__PURE__ */ sn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1250
- function Sa(t) {
1249
+ ]), Pa = /* @__PURE__ */ on(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1250
+ function Aa(t) {
1251
1251
  var u;
1252
1252
  const { motionValue: e, name: n, repeatDelay: i, repeatType: s, damping: o, type: r } = t;
1253
1253
  if (!(((u = e == null ? void 0 : e.owner) == null ? void 0 : u.current) instanceof HTMLElement))
1254
1254
  return !1;
1255
1255
  const { onUpdate: l, transformTemplate: c } = e.owner.getProps();
1256
- return ba() && n && wa.has(n) && (n !== "transform" || !c) && /**
1256
+ return Pa() && n && Sa.has(n) && (n !== "transform" || !c) && /**
1257
1257
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1258
1258
  * no way to read the value from WAAPI every frame.
1259
1259
  */
1260
1260
  !l && !i && s !== "mirror" && o !== 0 && r !== "inertia";
1261
1261
  }
1262
- const Pa = 40;
1263
- class Aa extends mn {
1262
+ const Va = 40;
1263
+ class Da extends yn {
1264
1264
  constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: c, element: u, ...h }) {
1265
1265
  var p;
1266
1266
  super(), this.stop = () => {
@@ -1278,23 +1278,23 @@ class Aa extends mn {
1278
1278
  motionValue: c,
1279
1279
  element: u,
1280
1280
  ...h
1281
- }, d = (u == null ? void 0 : u.KeyframeResolver) || yn;
1281
+ }, d = (u == null ? void 0 : u.KeyframeResolver) || xn;
1282
1282
  this.keyframeResolver = new d(a, (m, g, y) => this.onKeyframesResolved(m, g, f, !y), l, c, u), (p = this.keyframeResolver) == null || p.scheduleResolve();
1283
1283
  }
1284
1284
  onKeyframesResolved(e, n, i, s) {
1285
1285
  var g, y;
1286
1286
  this.keyframeResolver = void 0;
1287
1287
  const { name: o, type: r, velocity: a, delay: l, isHandoff: c, onUpdate: u } = i;
1288
- this.resolvedAt = N.now(), Ta(e, o, r, a) || ((Q.instantAnimations || !l) && (u == null || u(pn(e, i, n))), e[0] = e[e.length - 1], Oe(i), i.repeat = 0);
1288
+ this.resolvedAt = N.now(), ba(e, o, r, a) || ((Q.instantAnimations || !l) && (u == null || u(gn(e, i, n))), e[0] = e[e.length - 1], je(i), i.repeat = 0);
1289
1289
  const f = {
1290
- startTime: s ? this.resolvedAt ? this.resolvedAt - this.createdAt > Pa ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1290
+ startTime: s ? this.resolvedAt ? this.resolvedAt - this.createdAt > Va ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1291
1291
  finalKeyframe: n,
1292
1292
  ...i,
1293
1293
  keyframes: e
1294
- }, d = !c && Sa(f), p = (y = (g = f.motionValue) == null ? void 0 : g.owner) == null ? void 0 : y.current, m = d ? new va({
1294
+ }, d = !c && Aa(f), p = (y = (g = f.motionValue) == null ? void 0 : g.owner) == null ? void 0 : y.current, m = d ? new Ta({
1295
1295
  ...f,
1296
1296
  element: p
1297
- }) : new gn(f);
1297
+ }) : new vn(f);
1298
1298
  m.finished.then(() => {
1299
1299
  this.notifyFinished();
1300
1300
  }).catch(_), this.pendingTimeline && (this.stopTimeline = m.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = m;
@@ -1308,7 +1308,7 @@ class Aa extends mn {
1308
1308
  }
1309
1309
  get animation() {
1310
1310
  var e;
1311
- return this._animation || ((e = this.keyframeResolver) == null || e.resume(), aa()), this._animation;
1311
+ return this._animation || ((e = this.keyframeResolver) == null || e.resume(), ca()), this._animation;
1312
1312
  }
1313
1313
  get duration() {
1314
1314
  return this.animation.duration;
@@ -1351,64 +1351,64 @@ class Aa extends mn {
1351
1351
  this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
1352
1352
  }
1353
1353
  }
1354
- function Os(t, e, n, i = 0, s = 1) {
1354
+ function Ns(t, e, n, i = 0, s = 1) {
1355
1355
  const o = Array.from(t).sort((c, u) => c.sortNodePosition(u)).indexOf(e), r = t.size, a = (r - 1) * i;
1356
1356
  return typeof n == "function" ? n(o, r) : s === 1 ? o * i : a - o * i;
1357
1357
  }
1358
- const Va = (
1358
+ const Ca = (
1359
1359
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1360
1360
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1361
1361
  );
1362
- function Da(t) {
1363
- const e = Va.exec(t);
1362
+ function Ma(t) {
1363
+ const e = Ca.exec(t);
1364
1364
  if (!e)
1365
1365
  return [,];
1366
1366
  const [, n, i, s] = e;
1367
1367
  return [`--${n ?? i}`, s];
1368
1368
  }
1369
- const Ca = 4;
1370
- function js(t, e, n = 1) {
1371
- J(n <= Ca, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1372
- const [i, s] = Da(t);
1369
+ const Ea = 4;
1370
+ function $s(t, e, n = 1) {
1371
+ J(n <= Ea, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1372
+ const [i, s] = Ma(t);
1373
1373
  if (!i)
1374
1374
  return;
1375
1375
  const o = window.getComputedStyle(e).getPropertyValue(i);
1376
1376
  if (o) {
1377
1377
  const r = o.trim();
1378
- return ss(r) ? parseFloat(r) : r;
1378
+ return os(r) ? parseFloat(r) : r;
1379
1379
  }
1380
- return cn(s) ? js(s, e, n + 1) : s;
1380
+ return hn(s) ? $s(s, e, n + 1) : s;
1381
1381
  }
1382
- const Ma = {
1382
+ const Ra = {
1383
1383
  type: "spring",
1384
1384
  stiffness: 500,
1385
1385
  damping: 25,
1386
1386
  restSpeed: 10
1387
- }, Ea = (t) => ({
1387
+ }, La = (t) => ({
1388
1388
  type: "spring",
1389
1389
  stiffness: 550,
1390
1390
  damping: t === 0 ? 2 * Math.sqrt(550) : 30,
1391
1391
  restSpeed: 10
1392
- }), Ra = {
1392
+ }), ka = {
1393
1393
  type: "keyframes",
1394
1394
  duration: 0.8
1395
- }, La = {
1395
+ }, Fa = {
1396
1396
  type: "keyframes",
1397
1397
  ease: [0.25, 0.1, 0.35, 1],
1398
1398
  duration: 0.3
1399
- }, ka = (t, { keyframes: e }) => e.length > 2 ? Ra : St.has(t) ? t.startsWith("scale") ? Ea(e[1]) : Ma : La, Fa = (t) => t !== null;
1400
- function Ba(t, { repeat: e, repeatType: n = "loop" }, i) {
1401
- const s = t.filter(Fa), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1399
+ }, Ba = (t, { keyframes: e }) => e.length > 2 ? ka : St.has(t) ? t.startsWith("scale") ? La(e[1]) : Ra : Fa, Ia = (t) => t !== null;
1400
+ function Oa(t, { repeat: e, repeatType: n = "loop" }, i) {
1401
+ const s = t.filter(Ia), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1402
1402
  return s[o];
1403
1403
  }
1404
- function vn(t, e) {
1404
+ function Tn(t, e) {
1405
1405
  return (t == null ? void 0 : t[e]) ?? (t == null ? void 0 : t.default) ?? t;
1406
1406
  }
1407
- function Ia({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: c, ...u }) {
1407
+ function ja({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: c, ...u }) {
1408
1408
  return !!Object.keys(u).length;
1409
1409
  }
1410
- const xn = (t, e, n, i = {}, s, o) => (r) => {
1411
- const a = vn(i, t) || {}, l = a.delay || i.delay || 0;
1410
+ const wn = (t, e, n, i = {}, s, o) => (r) => {
1411
+ const a = Tn(i, t) || {}, l = a.delay || i.delay || 0;
1412
1412
  let { elapsed: c = 0 } = i;
1413
1413
  c = c - /* @__PURE__ */ Y(l);
1414
1414
  const u = {
@@ -1427,10 +1427,10 @@ const xn = (t, e, n, i = {}, s, o) => (r) => {
1427
1427
  motionValue: e,
1428
1428
  element: o ? void 0 : s
1429
1429
  };
1430
- Ia(a) || Object.assign(u, ka(t, u)), u.duration && (u.duration = /* @__PURE__ */ Y(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ Y(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
1430
+ ja(a) || Object.assign(u, Ba(t, u)), u.duration && (u.duration = /* @__PURE__ */ Y(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ Y(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
1431
1431
  let h = !1;
1432
- if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Oe(u), u.delay === 0 && (h = !0)), (Q.instantAnimations || Q.skipAnimations || s != null && s.shouldSkipAnimations) && (h = !0, Oe(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
1433
- const f = Ba(u.keyframes, a);
1432
+ if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (je(u), u.delay === 0 && (h = !0)), (Q.instantAnimations || Q.skipAnimations || s != null && s.shouldSkipAnimations) && (h = !0, je(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
1433
+ const f = Oa(u.keyframes, a);
1434
1434
  if (f !== void 0) {
1435
1435
  C.update(() => {
1436
1436
  u.onUpdate(f), u.onComplete();
@@ -1438,30 +1438,30 @@ const xn = (t, e, n, i = {}, s, o) => (r) => {
1438
1438
  return;
1439
1439
  }
1440
1440
  }
1441
- return a.isSync ? new gn(u) : new Aa(u);
1441
+ return a.isSync ? new vn(u) : new Da(u);
1442
1442
  };
1443
- function Xn(t) {
1443
+ function Zn(t) {
1444
1444
  const e = [{}, {}];
1445
1445
  return t == null || t.values.forEach((n, i) => {
1446
1446
  e[0][i] = n.get(), e[1][i] = n.getVelocity();
1447
1447
  }), e;
1448
1448
  }
1449
- function Tn(t, e, n, i) {
1449
+ function bn(t, e, n, i) {
1450
1450
  if (typeof e == "function") {
1451
- const [s, o] = Xn(i);
1451
+ const [s, o] = Zn(i);
1452
1452
  e = e(n !== void 0 ? n : t.custom, s, o);
1453
1453
  }
1454
1454
  if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
1455
- const [s, o] = Xn(i);
1455
+ const [s, o] = Zn(i);
1456
1456
  e = e(n !== void 0 ? n : t.custom, s, o);
1457
1457
  }
1458
1458
  return e;
1459
1459
  }
1460
1460
  function yt(t, e, n) {
1461
1461
  const i = t.getProps();
1462
- return Tn(i, e, n !== void 0 ? n : i.custom, t);
1462
+ return bn(i, e, n !== void 0 ? n : i.custom, t);
1463
1463
  }
1464
- const Ns = /* @__PURE__ */ new Set([
1464
+ const Us = /* @__PURE__ */ new Set([
1465
1465
  "width",
1466
1466
  "height",
1467
1467
  "top",
@@ -1469,8 +1469,8 @@ const Ns = /* @__PURE__ */ new Set([
1469
1469
  "right",
1470
1470
  "bottom",
1471
1471
  ...bt
1472
- ]), qn = 30, Oa = (t) => !isNaN(parseFloat(t));
1473
- class ja {
1472
+ ]), Jn = 30, Na = (t) => !isNaN(parseFloat(t));
1473
+ class $a {
1474
1474
  /**
1475
1475
  * @param init - The initiating value
1476
1476
  * @param config - Optional configuration options
@@ -1487,7 +1487,7 @@ class ja {
1487
1487
  }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1488
1488
  }
1489
1489
  setCurrent(e) {
1490
- this.current = e, this.updatedAt = N.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Oa(this.current));
1490
+ this.current = e, this.updatedAt = N.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Na(this.current));
1491
1491
  }
1492
1492
  setPrevFrameValue(e = this.current) {
1493
1493
  this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
@@ -1533,10 +1533,10 @@ class ja {
1533
1533
  * @deprecated
1534
1534
  */
1535
1535
  onChange(e) {
1536
- return process.env.NODE_ENV !== "production" && on(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
1536
+ return process.env.NODE_ENV !== "production" && ln(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
1537
1537
  }
1538
1538
  on(e, n) {
1539
- this.events[e] || (this.events[e] = new rn());
1539
+ this.events[e] || (this.events[e] = new an());
1540
1540
  const i = this.events[e].add(n);
1541
1541
  return e === "change" ? () => {
1542
1542
  i(), C.read(() => {
@@ -1617,10 +1617,10 @@ class ja {
1617
1617
  */
1618
1618
  getVelocity() {
1619
1619
  const e = N.now();
1620
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > qn)
1620
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Jn)
1621
1621
  return 0;
1622
- const n = Math.min(this.updatedAt - this.prevUpdatedAt, qn);
1623
- return as(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1622
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, Jn);
1623
+ return cs(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1624
1624
  }
1625
1625
  /**
1626
1626
  * Registers a new animation to control this `MotionValue`. Only one
@@ -1673,91 +1673,91 @@ class ja {
1673
1673
  }
1674
1674
  }
1675
1675
  function vt(t, e) {
1676
- return new ja(t, e);
1676
+ return new $a(t, e);
1677
1677
  }
1678
- const je = (t) => Array.isArray(t);
1679
- function Na(t, e, n) {
1678
+ const Ne = (t) => Array.isArray(t);
1679
+ function Ua(t, e, n) {
1680
1680
  t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, vt(n));
1681
1681
  }
1682
- function $a(t) {
1683
- return je(t) ? t[t.length - 1] || 0 : t;
1682
+ function Wa(t) {
1683
+ return Ne(t) ? t[t.length - 1] || 0 : t;
1684
1684
  }
1685
- function Ua(t, e) {
1685
+ function Ka(t, e) {
1686
1686
  const n = yt(t, e);
1687
1687
  let { transitionEnd: i = {}, transition: s = {}, ...o } = n || {};
1688
1688
  o = { ...o, ...i };
1689
1689
  for (const r in o) {
1690
- const a = $a(o[r]);
1691
- Na(t, r, a);
1690
+ const a = Wa(o[r]);
1691
+ Ua(t, r, a);
1692
1692
  }
1693
1693
  }
1694
1694
  const j = (t) => !!(t && t.getVelocity);
1695
- function Wa(t) {
1695
+ function Ga(t) {
1696
1696
  return !!(j(t) && t.add);
1697
1697
  }
1698
- function Ne(t, e) {
1698
+ function $e(t, e) {
1699
1699
  const n = t.getValue("willChange");
1700
- if (Wa(n))
1700
+ if (Ga(n))
1701
1701
  return n.add(e);
1702
1702
  if (!n && Q.WillChange) {
1703
1703
  const i = new Q.WillChange("auto");
1704
1704
  t.addValue("willChange", i), i.add(e);
1705
1705
  }
1706
1706
  }
1707
- function wn(t) {
1707
+ function Sn(t) {
1708
1708
  return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
1709
1709
  }
1710
- const Ka = "framerAppearId", $s = "data-" + wn(Ka);
1711
- function Us(t) {
1712
- return t.props[$s];
1710
+ const _a = "framerAppearId", Ws = "data-" + Sn(_a);
1711
+ function Ks(t) {
1712
+ return t.props[Ws];
1713
1713
  }
1714
- function Ga({ protectedKeys: t, needsAnimating: e }, n) {
1714
+ function za({ protectedKeys: t, needsAnimating: e }, n) {
1715
1715
  const i = t.hasOwnProperty(n) && e[n] !== !0;
1716
1716
  return e[n] = !1, i;
1717
1717
  }
1718
- function Ws(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
1718
+ function Gs(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
1719
1719
  let { transition: o = t.getDefaultTransition(), transitionEnd: r, ...a } = e;
1720
1720
  const l = o == null ? void 0 : o.reduceMotion;
1721
1721
  i && (o = i);
1722
1722
  const c = [], u = s && t.animationState && t.animationState.getState()[s];
1723
1723
  for (const h in a) {
1724
1724
  const f = t.getValue(h, t.latestValues[h] ?? null), d = a[h];
1725
- if (d === void 0 || u && Ga(u, h))
1725
+ if (d === void 0 || u && za(u, h))
1726
1726
  continue;
1727
1727
  const p = {
1728
1728
  delay: n,
1729
- ...vn(o || {}, h)
1729
+ ...Tn(o || {}, h)
1730
1730
  }, m = f.get();
1731
1731
  if (m !== void 0 && !f.isAnimating && !Array.isArray(d) && d === m && !p.velocity)
1732
1732
  continue;
1733
1733
  let g = !1;
1734
1734
  if (window.MotionHandoffAnimation) {
1735
- const v = Us(t);
1735
+ const v = Ks(t);
1736
1736
  if (v) {
1737
1737
  const S = window.MotionHandoffAnimation(v, h, C);
1738
1738
  S !== null && (p.startTime = S, g = !0);
1739
1739
  }
1740
1740
  }
1741
- Ne(t, h);
1741
+ $e(t, h);
1742
1742
  const y = l ?? t.shouldReduceMotion;
1743
- f.start(xn(h, f, d, y && Ns.has(h) ? { type: !1 } : p, t, g));
1743
+ f.start(wn(h, f, d, y && Us.has(h) ? { type: !1 } : p, t, g));
1744
1744
  const x = f.animation;
1745
1745
  x && c.push(x);
1746
1746
  }
1747
1747
  return r && Promise.all(c).then(() => {
1748
1748
  C.update(() => {
1749
- r && Ua(t, r);
1749
+ r && Ka(t, r);
1750
1750
  });
1751
1751
  }), c;
1752
1752
  }
1753
- function $e(t, e, n = {}) {
1753
+ function Ue(t, e, n = {}) {
1754
1754
  var l;
1755
1755
  const i = yt(t, e, n.type === "exit" ? (l = t.presenceContext) == null ? void 0 : l.custom : void 0);
1756
1756
  let { transition: s = t.getDefaultTransition() || {} } = i || {};
1757
1757
  n.transitionOverride && (s = n.transitionOverride);
1758
- const o = i ? () => Promise.all(Ws(t, i, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (c = 0) => {
1758
+ const o = i ? () => Promise.all(Gs(t, i, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (c = 0) => {
1759
1759
  const { delayChildren: u = 0, staggerChildren: h, staggerDirection: f } = s;
1760
- return _a(t, e, c, u, h, f, n);
1760
+ return Ha(t, e, c, u, h, f, n);
1761
1761
  } : () => Promise.resolve(), { when: a } = s;
1762
1762
  if (a) {
1763
1763
  const [c, u] = a === "beforeChildren" ? [o, r] : [r, o];
@@ -1765,68 +1765,68 @@ function $e(t, e, n = {}) {
1765
1765
  } else
1766
1766
  return Promise.all([o(), r(n.delay)]);
1767
1767
  }
1768
- function _a(t, e, n = 0, i = 0, s = 0, o = 1, r) {
1768
+ function Ha(t, e, n = 0, i = 0, s = 0, o = 1, r) {
1769
1769
  const a = [];
1770
1770
  for (const l of t.variantChildren)
1771
- l.notify("AnimationStart", e), a.push($e(l, e, {
1771
+ l.notify("AnimationStart", e), a.push(Ue(l, e, {
1772
1772
  ...r,
1773
- delay: n + (typeof i == "function" ? 0 : i) + Os(t.variantChildren, l, i, s, o)
1773
+ delay: n + (typeof i == "function" ? 0 : i) + Ns(t.variantChildren, l, i, s, o)
1774
1774
  }).then(() => l.notify("AnimationComplete", e)));
1775
1775
  return Promise.all(a);
1776
1776
  }
1777
- function za(t, e, n = {}) {
1777
+ function Ya(t, e, n = {}) {
1778
1778
  t.notify("AnimationStart", e);
1779
1779
  let i;
1780
1780
  if (Array.isArray(e)) {
1781
- const s = e.map((o) => $e(t, o, n));
1781
+ const s = e.map((o) => Ue(t, o, n));
1782
1782
  i = Promise.all(s);
1783
1783
  } else if (typeof e == "string")
1784
- i = $e(t, e, n);
1784
+ i = Ue(t, e, n);
1785
1785
  else {
1786
1786
  const s = typeof e == "function" ? yt(t, e, n.custom) : e;
1787
- i = Promise.all(Ws(t, s, n));
1787
+ i = Promise.all(Gs(t, s, n));
1788
1788
  }
1789
1789
  return i.then(() => {
1790
1790
  t.notify("AnimationComplete", e);
1791
1791
  });
1792
1792
  }
1793
- const Ha = {
1793
+ const Xa = {
1794
1794
  test: (t) => t === "auto",
1795
1795
  parse: (t) => t
1796
- }, Ks = (t) => (e) => e.test(t), Gs = [wt, w, X, tt, xo, vo, Ha], Zn = (t) => Gs.find(Ks(t));
1797
- function Ya(t) {
1798
- return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || os(t) : !0;
1799
- }
1800
- const Xa = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1796
+ }, _s = (t) => (e) => e.test(t), zs = [wt, w, X, tt, wo, To, Xa], Qn = (t) => zs.find(_s(t));
1801
1797
  function qa(t) {
1798
+ return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || ls(t) : !0;
1799
+ }
1800
+ const Za = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1801
+ function Ja(t) {
1802
1802
  const [e, n] = t.slice(0, -1).split("(");
1803
1803
  if (e === "drop-shadow")
1804
1804
  return t;
1805
- const [i] = n.match(un) || [];
1805
+ const [i] = n.match(fn) || [];
1806
1806
  if (!i)
1807
1807
  return t;
1808
1808
  const s = n.replace(i, "");
1809
- let o = Xa.has(e) ? 1 : 0;
1809
+ let o = Za.has(e) ? 1 : 0;
1810
1810
  return i !== n && (o *= 100), e + "(" + o + s + ")";
1811
1811
  }
1812
- const Za = /\b([a-z-]*)\(.*?\)/gu, Ue = {
1812
+ const Qa = /\b([a-z-]*)\(.*?\)/gu, We = {
1813
1813
  ...it,
1814
1814
  getAnimatableNone: (t) => {
1815
- const e = t.match(Za);
1816
- return e ? e.map(qa).join(" ") : t;
1815
+ const e = t.match(Qa);
1816
+ return e ? e.map(Ja).join(" ") : t;
1817
1817
  }
1818
- }, Jn = {
1818
+ }, ti = {
1819
1819
  ...wt,
1820
1820
  transform: Math.round
1821
- }, Ja = {
1821
+ }, tl = {
1822
1822
  rotate: tt,
1823
1823
  rotateX: tt,
1824
1824
  rotateY: tt,
1825
1825
  rotateZ: tt,
1826
- scale: Ut,
1827
- scaleX: Ut,
1828
- scaleY: Ut,
1829
- scaleZ: Ut,
1826
+ scale: Wt,
1827
+ scaleX: Wt,
1828
+ scaleY: Wt,
1829
+ scaleZ: Wt,
1830
1830
  skew: tt,
1831
1831
  skewX: tt,
1832
1832
  skewY: tt,
@@ -1839,11 +1839,11 @@ const Za = /\b([a-z-]*)\(.*?\)/gu, Ue = {
1839
1839
  z: w,
1840
1840
  perspective: w,
1841
1841
  transformPerspective: w,
1842
- opacity: Lt,
1843
- originX: jn,
1844
- originY: jn,
1842
+ opacity: kt,
1843
+ originX: $n,
1844
+ originY: $n,
1845
1845
  originZ: w
1846
- }, bn = {
1846
+ }, Pn = {
1847
1847
  // Border props
1848
1848
  borderWidth: w,
1849
1849
  borderTopWidth: w,
@@ -1899,14 +1899,14 @@ const Za = /\b([a-z-]*)\(.*?\)/gu, Ue = {
1899
1899
  // Misc
1900
1900
  backgroundPositionX: w,
1901
1901
  backgroundPositionY: w,
1902
- ...Ja,
1903
- zIndex: Jn,
1902
+ ...tl,
1903
+ zIndex: ti,
1904
1904
  // SVG
1905
- fillOpacity: Lt,
1906
- strokeOpacity: Lt,
1907
- numOctaves: Jn
1908
- }, Qa = {
1909
- ...bn,
1905
+ fillOpacity: kt,
1906
+ strokeOpacity: kt,
1907
+ numOctaves: ti
1908
+ }, el = {
1909
+ ...Pn,
1910
1910
  // Color props
1911
1911
  color: L,
1912
1912
  backgroundColor: L,
@@ -1919,25 +1919,25 @@ const Za = /\b([a-z-]*)\(.*?\)/gu, Ue = {
1919
1919
  borderRightColor: L,
1920
1920
  borderBottomColor: L,
1921
1921
  borderLeftColor: L,
1922
- filter: Ue,
1923
- WebkitFilter: Ue
1924
- }, _s = (t) => Qa[t];
1925
- function zs(t, e) {
1926
- let n = _s(t);
1927
- return n !== Ue && (n = it), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1928
- }
1929
- const tl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1930
- function el(t, e, n) {
1922
+ filter: We,
1923
+ WebkitFilter: We
1924
+ }, Hs = (t) => el[t];
1925
+ function Ys(t, e) {
1926
+ let n = Hs(t);
1927
+ return n !== We && (n = it), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1928
+ }
1929
+ const nl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1930
+ function il(t, e, n) {
1931
1931
  let i = 0, s;
1932
1932
  for (; i < t.length && !s; ) {
1933
1933
  const o = t[i];
1934
- typeof o == "string" && !tl.has(o) && kt(o).values.length && (s = t[i]), i++;
1934
+ typeof o == "string" && !nl.has(o) && Ft(o).values.length && (s = t[i]), i++;
1935
1935
  }
1936
1936
  if (s && n)
1937
1937
  for (const o of e)
1938
- t[o] = zs(n, s);
1938
+ t[o] = Ys(n, s);
1939
1939
  }
1940
- class nl extends yn {
1940
+ class sl extends xn {
1941
1941
  constructor(e, n, i, s, o) {
1942
1942
  super(e, n, i, s, o, !0);
1943
1943
  }
@@ -1948,20 +1948,20 @@ class nl extends yn {
1948
1948
  super.readKeyframes();
1949
1949
  for (let u = 0; u < e.length; u++) {
1950
1950
  let h = e[u];
1951
- if (typeof h == "string" && (h = h.trim(), cn(h))) {
1952
- const f = js(h, n.current);
1951
+ if (typeof h == "string" && (h = h.trim(), hn(h))) {
1952
+ const f = $s(h, n.current);
1953
1953
  f !== void 0 && (e[u] = f), u === e.length - 1 && (this.finalKeyframe = h);
1954
1954
  }
1955
1955
  }
1956
- if (this.resolveNoneKeyframes(), !Ns.has(i) || e.length !== 2)
1956
+ if (this.resolveNoneKeyframes(), !Us.has(i) || e.length !== 2)
1957
1957
  return;
1958
- const [s, o] = e, r = Zn(s), a = Zn(o), l = On(s), c = On(o);
1958
+ const [s, o] = e, r = Qn(s), a = Qn(o), l = Nn(s), c = Nn(o);
1959
1959
  if (l !== c && et[i]) {
1960
1960
  this.needsMeasurement = !0;
1961
1961
  return;
1962
1962
  }
1963
1963
  if (r !== a)
1964
- if (zn(r) && zn(a))
1964
+ if (Yn(r) && Yn(a))
1965
1965
  for (let u = 0; u < e.length; u++) {
1966
1966
  const h = e[u];
1967
1967
  typeof h == "string" && (e[u] = parseFloat(h));
@@ -1971,8 +1971,8 @@ class nl extends yn {
1971
1971
  resolveNoneKeyframes() {
1972
1972
  const { unresolvedKeyframes: e, name: n } = this, i = [];
1973
1973
  for (let s = 0; s < e.length; s++)
1974
- (e[s] === null || Ya(e[s])) && i.push(s);
1975
- i.length && el(e, i, n);
1974
+ (e[s] === null || qa(e[s])) && i.push(s);
1975
+ i.length && il(e, i, n);
1976
1976
  }
1977
1977
  measureInitialState() {
1978
1978
  const { element: e, unresolvedKeyframes: n, name: i } = this;
@@ -1995,7 +1995,7 @@ class nl extends yn {
1995
1995
  }), this.resolveNoneKeyframes();
1996
1996
  }
1997
1997
  }
1998
- function il(t, e, n) {
1998
+ function rl(t, e, n) {
1999
1999
  if (t == null)
2000
2000
  return [];
2001
2001
  if (t instanceof EventTarget)
@@ -2007,44 +2007,44 @@ function il(t, e, n) {
2007
2007
  }
2008
2008
  return Array.from(t).filter((i) => i != null);
2009
2009
  }
2010
- const Hs = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
2011
- function We(t) {
2012
- return rs(t) && "offsetHeight" in t;
2010
+ const Xs = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
2011
+ function Ke(t) {
2012
+ return as(t) && "offsetHeight" in t;
2013
2013
  }
2014
- const { schedule: Sn } = /* @__PURE__ */ vs(queueMicrotask, !1), H = {
2014
+ const { schedule: An } = /* @__PURE__ */ Ts(queueMicrotask, !1), H = {
2015
2015
  x: !1,
2016
2016
  y: !1
2017
2017
  };
2018
- function Ys() {
2018
+ function qs() {
2019
2019
  return H.x || H.y;
2020
2020
  }
2021
- function sl(t) {
2021
+ function ol(t) {
2022
2022
  return t === "x" || t === "y" ? H[t] ? null : (H[t] = !0, () => {
2023
2023
  H[t] = !1;
2024
2024
  }) : H.x || H.y ? null : (H.x = H.y = !0, () => {
2025
2025
  H.x = H.y = !1;
2026
2026
  });
2027
2027
  }
2028
- function Xs(t, e) {
2029
- const n = il(t), i = new AbortController(), s = {
2028
+ function Zs(t, e) {
2029
+ const n = rl(t), i = new AbortController(), s = {
2030
2030
  passive: !0,
2031
2031
  ...e,
2032
2032
  signal: i.signal
2033
2033
  };
2034
2034
  return [n, s, () => i.abort()];
2035
2035
  }
2036
- function Qn(t) {
2037
- return !(t.pointerType === "touch" || Ys());
2036
+ function ei(t) {
2037
+ return !(t.pointerType === "touch" || qs());
2038
2038
  }
2039
- function rl(t, e, n = {}) {
2040
- const [i, s, o] = Xs(t, n), r = (a) => {
2041
- if (!Qn(a))
2039
+ function al(t, e, n = {}) {
2040
+ const [i, s, o] = Zs(t, n), r = (a) => {
2041
+ if (!ei(a))
2042
2042
  return;
2043
2043
  const { target: l } = a, c = e(l, a);
2044
2044
  if (typeof c != "function" || !l)
2045
2045
  return;
2046
2046
  const u = (h) => {
2047
- Qn(h) && (c(h), l.removeEventListener("pointerleave", u));
2047
+ ei(h) && (c(h), l.removeEventListener("pointerleave", u));
2048
2048
  };
2049
2049
  l.addEventListener("pointerleave", u, s);
2050
2050
  };
@@ -2052,96 +2052,96 @@ function rl(t, e, n = {}) {
2052
2052
  a.addEventListener("pointerenter", r, s);
2053
2053
  }), o;
2054
2054
  }
2055
- const qs = (t, e) => e ? t === e ? !0 : qs(t, e.parentElement) : !1, Pn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, ol = /* @__PURE__ */ new Set([
2055
+ const Js = (t, e) => e ? t === e ? !0 : Js(t, e.parentElement) : !1, Vn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, ll = /* @__PURE__ */ new Set([
2056
2056
  "BUTTON",
2057
2057
  "INPUT",
2058
2058
  "SELECT",
2059
2059
  "TEXTAREA",
2060
2060
  "A"
2061
2061
  ]);
2062
- function Zs(t) {
2063
- return ol.has(t.tagName) || t.isContentEditable === !0;
2062
+ function Qs(t) {
2063
+ return ll.has(t.tagName) || t.isContentEditable === !0;
2064
2064
  }
2065
- const _t = /* @__PURE__ */ new WeakSet();
2066
- function ti(t) {
2065
+ const zt = /* @__PURE__ */ new WeakSet();
2066
+ function ni(t) {
2067
2067
  return (e) => {
2068
2068
  e.key === "Enter" && t(e);
2069
2069
  };
2070
2070
  }
2071
- function pe(t, e) {
2071
+ function me(t, e) {
2072
2072
  t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
2073
2073
  }
2074
- const al = (t, e) => {
2074
+ const cl = (t, e) => {
2075
2075
  const n = t.currentTarget;
2076
2076
  if (!n)
2077
2077
  return;
2078
- const i = ti(() => {
2079
- if (_t.has(n))
2078
+ const i = ni(() => {
2079
+ if (zt.has(n))
2080
2080
  return;
2081
- pe(n, "down");
2082
- const s = ti(() => {
2083
- pe(n, "up");
2084
- }), o = () => pe(n, "cancel");
2081
+ me(n, "down");
2082
+ const s = ni(() => {
2083
+ me(n, "up");
2084
+ }), o = () => me(n, "cancel");
2085
2085
  n.addEventListener("keyup", s, e), n.addEventListener("blur", o, e);
2086
2086
  });
2087
2087
  n.addEventListener("keydown", i, e), n.addEventListener("blur", () => n.removeEventListener("keydown", i), e);
2088
2088
  };
2089
- function ei(t) {
2090
- return Pn(t) && !Ys();
2089
+ function ii(t) {
2090
+ return Vn(t) && !qs();
2091
2091
  }
2092
- function ll(t, e, n = {}) {
2093
- const [i, s, o] = Xs(t, n), r = (a) => {
2092
+ function ul(t, e, n = {}) {
2093
+ const [i, s, o] = Zs(t, n), r = (a) => {
2094
2094
  const l = a.currentTarget;
2095
- if (!ei(a))
2095
+ if (!ii(a))
2096
2096
  return;
2097
- _t.add(l);
2097
+ zt.add(l);
2098
2098
  const c = e(l, a), u = (d, p) => {
2099
- window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), _t.has(l) && _t.delete(l), ei(d) && typeof c == "function" && c(d, { success: p });
2099
+ window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), zt.has(l) && zt.delete(l), ii(d) && typeof c == "function" && c(d, { success: p });
2100
2100
  }, h = (d) => {
2101
- u(d, l === window || l === document || n.useGlobalTarget || qs(l, d.target));
2101
+ u(d, l === window || l === document || n.useGlobalTarget || Js(l, d.target));
2102
2102
  }, f = (d) => {
2103
2103
  u(d, !1);
2104
2104
  };
2105
2105
  window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel", f, s);
2106
2106
  };
2107
2107
  return i.forEach((a) => {
2108
- (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), We(a) && (a.addEventListener("focus", (c) => al(c, s)), !Zs(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2108
+ (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), Ke(a) && (a.addEventListener("focus", (c) => cl(c, s)), !Qs(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2109
2109
  }), o;
2110
2110
  }
2111
- function Js(t) {
2112
- return rs(t) && "ownerSVGElement" in t;
2111
+ function tr(t) {
2112
+ return as(t) && "ownerSVGElement" in t;
2113
2113
  }
2114
- function cl(t) {
2115
- return Js(t) && t.tagName === "svg";
2114
+ function hl(t) {
2115
+ return tr(t) && t.tagName === "svg";
2116
2116
  }
2117
- const ul = [...Gs, L, it], hl = (t) => ul.find(Ks(t)), ni = () => ({
2117
+ const fl = [...zs, L, it], dl = (t) => fl.find(_s(t)), si = () => ({
2118
2118
  translate: 0,
2119
2119
  scale: 1,
2120
2120
  origin: 0,
2121
2121
  originPoint: 0
2122
2122
  }), pt = () => ({
2123
- x: ni(),
2124
- y: ni()
2125
- }), ii = () => ({ min: 0, max: 0 }), k = () => ({
2126
- x: ii(),
2127
- y: ii()
2128
- }), Ke = { current: null }, Qs = { current: !1 }, fl = typeof window < "u";
2129
- function dl() {
2130
- if (Qs.current = !0, !!fl)
2123
+ x: si(),
2124
+ y: si()
2125
+ }), ri = () => ({ min: 0, max: 0 }), k = () => ({
2126
+ x: ri(),
2127
+ y: ri()
2128
+ }), Ge = { current: null }, er = { current: !1 }, pl = typeof window < "u";
2129
+ function ml() {
2130
+ if (er.current = !0, !!pl)
2131
2131
  if (window.matchMedia) {
2132
- const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ke.current = t.matches;
2132
+ const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ge.current = t.matches;
2133
2133
  t.addEventListener("change", e), e();
2134
2134
  } else
2135
- Ke.current = !1;
2135
+ Ge.current = !1;
2136
2136
  }
2137
- const pl = /* @__PURE__ */ new WeakMap();
2138
- function se(t) {
2137
+ const gl = /* @__PURE__ */ new WeakMap();
2138
+ function re(t) {
2139
2139
  return t !== null && typeof t == "object" && typeof t.start == "function";
2140
2140
  }
2141
- function Ft(t) {
2141
+ function Bt(t) {
2142
2142
  return typeof t == "string" || Array.isArray(t);
2143
2143
  }
2144
- const An = [
2144
+ const Dn = [
2145
2145
  "animate",
2146
2146
  "whileInView",
2147
2147
  "whileFocus",
@@ -2149,14 +2149,14 @@ const An = [
2149
2149
  "whileTap",
2150
2150
  "whileDrag",
2151
2151
  "exit"
2152
- ], Vn = ["initial", ...An];
2153
- function re(t) {
2154
- return se(t.animate) || Vn.some((e) => Ft(t[e]));
2152
+ ], Cn = ["initial", ...Dn];
2153
+ function oe(t) {
2154
+ return re(t.animate) || Cn.some((e) => Bt(t[e]));
2155
2155
  }
2156
- function tr(t) {
2157
- return !!(re(t) || t.variants);
2156
+ function nr(t) {
2157
+ return !!(oe(t) || t.variants);
2158
2158
  }
2159
- function ml(t, e, n) {
2159
+ function yl(t, e, n) {
2160
2160
  for (const i in e) {
2161
2161
  const s = e[i], o = n[i];
2162
2162
  if (j(s))
@@ -2176,7 +2176,7 @@ function ml(t, e, n) {
2176
2176
  e[i] === void 0 && t.removeValue(i);
2177
2177
  return e;
2178
2178
  }
2179
- const si = [
2179
+ const oi = [
2180
2180
  "AnimationStart",
2181
2181
  "AnimationComplete",
2182
2182
  "Update",
@@ -2185,14 +2185,14 @@ const si = [
2185
2185
  "LayoutAnimationStart",
2186
2186
  "LayoutAnimationComplete"
2187
2187
  ];
2188
- let Zt = {};
2189
- function er(t) {
2190
- Zt = t;
2188
+ let Jt = {};
2189
+ function ir(t) {
2190
+ Jt = t;
2191
2191
  }
2192
- function gl() {
2193
- return Zt;
2192
+ function vl() {
2193
+ return Jt;
2194
2194
  }
2195
- class yl {
2195
+ class xl {
2196
2196
  /**
2197
2197
  * This method takes React props and returns found MotionValues. For example, HTML
2198
2198
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -2204,14 +2204,14 @@ class yl {
2204
2204
  return {};
2205
2205
  }
2206
2206
  constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, skipAnimations: o, blockInitialAnimation: r, visualState: a }, l = {}) {
2207
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = yn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2207
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, 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 = () => {
2208
2208
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2209
2209
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2210
2210
  const d = N.now();
2211
2211
  this.renderScheduledAt < d && (this.renderScheduledAt = d, C.render(this.render, !1, !0));
2212
2212
  };
2213
2213
  const { latestValues: c, renderState: u } = a;
2214
- this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.skipAnimationsConfig = o, this.options = l, this.blockInitialAnimation = !!r, this.isControllingVariants = re(n), this.isVariantNode = tr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2214
+ this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.skipAnimationsConfig = o, this.options = l, this.blockInitialAnimation = !!r, this.isControllingVariants = oe(n), this.isVariantNode = nr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2215
2215
  const { willChange: h, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
2216
2216
  for (const d in f) {
2217
2217
  const p = f[d];
@@ -2220,7 +2220,7 @@ class yl {
2220
2220
  }
2221
2221
  mount(e) {
2222
2222
  var n;
2223
- this.current = e, pl.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, s) => this.bindToMotionValue(s, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Qs.current || dl(), this.shouldReduceMotion = Ke.current), process.env.NODE_ENV !== "production" && on(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
2223
+ this.current = e, gl.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, s) => this.bindToMotionValue(s, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (er.current || ml(), this.shouldReduceMotion = Ge.current), process.env.NODE_ENV !== "production" && ln(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, (n = this.parent) == null || n.addChild(this), this.update(this.props, this.presenceContext);
2224
2224
  }
2225
2225
  unmount() {
2226
2226
  var e;
@@ -2256,8 +2256,8 @@ class yl {
2256
2256
  }
2257
2257
  updateFeatures() {
2258
2258
  let e = "animation";
2259
- for (e in Zt) {
2260
- const n = Zt[e];
2259
+ for (e in Jt) {
2260
+ const n = Jt[e];
2261
2261
  if (!n)
2262
2262
  continue;
2263
2263
  const { isEnabled: i, Feature: s } = n;
@@ -2290,13 +2290,13 @@ class yl {
2290
2290
  */
2291
2291
  update(e, n) {
2292
2292
  (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2293
- for (let i = 0; i < si.length; i++) {
2294
- const s = si[i];
2293
+ for (let i = 0; i < oi.length; i++) {
2294
+ const s = oi[i];
2295
2295
  this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
2296
2296
  const o = "on" + s, r = e[o];
2297
2297
  r && (this.propEventSubscriptions[s] = this.on(s, r));
2298
2298
  }
2299
- this.prevMotionValues = ml(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2299
+ this.prevMotionValues = yl(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2300
2300
  }
2301
2301
  getProps() {
2302
2302
  return this.props;
@@ -2361,7 +2361,7 @@ class yl {
2361
2361
  */
2362
2362
  readValue(e, n) {
2363
2363
  let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
2364
- return i != null && (typeof i == "string" && (ss(i) || os(i)) ? i = parseFloat(i) : !hl(i) && it.test(n) && (i = zs(e, n)), this.setBaseTarget(e, j(i) ? i.get() : i)), j(i) ? i.get() : i;
2364
+ return i != null && (typeof i == "string" && (os(i) || ls(i)) ? i = parseFloat(i) : !dl(i) && it.test(n) && (i = Ys(e, n)), this.setBaseTarget(e, j(i) ? i.get() : i)), j(i) ? i.get() : i;
2365
2365
  }
2366
2366
  /**
2367
2367
  * Set the base target to later animate back to. This is currently
@@ -2379,7 +2379,7 @@ class yl {
2379
2379
  const { initial: n } = this.props;
2380
2380
  let i;
2381
2381
  if (typeof n == "string" || typeof n == "object") {
2382
- const r = Tn(this.props, n, (o = this.presenceContext) == null ? void 0 : o.custom);
2382
+ const r = bn(this.props, n, (o = this.presenceContext) == null ? void 0 : o.custom);
2383
2383
  r && (i = r[e]);
2384
2384
  }
2385
2385
  if (n && i !== void 0)
@@ -2388,18 +2388,18 @@ class yl {
2388
2388
  return s !== void 0 && !j(s) ? s : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
2389
2389
  }
2390
2390
  on(e, n) {
2391
- return this.events[e] || (this.events[e] = new rn()), this.events[e].add(n);
2391
+ return this.events[e] || (this.events[e] = new an()), this.events[e].add(n);
2392
2392
  }
2393
2393
  notify(e, ...n) {
2394
2394
  this.events[e] && this.events[e].notify(...n);
2395
2395
  }
2396
2396
  scheduleRenderMicrotask() {
2397
- Sn.render(this.render);
2397
+ An.render(this.render);
2398
2398
  }
2399
2399
  }
2400
- class nr extends yl {
2400
+ class sr extends xl {
2401
2401
  constructor() {
2402
- super(...arguments), this.KeyframeResolver = nl;
2402
+ super(...arguments), this.KeyframeResolver = sl;
2403
2403
  }
2404
2404
  sortInstanceNodePosition(e, n) {
2405
2405
  return e.compareDocumentPosition(n) & 2 ? 1 : -1;
@@ -2426,16 +2426,16 @@ class st {
2426
2426
  update() {
2427
2427
  }
2428
2428
  }
2429
- function ir({ top: t, left: e, right: n, bottom: i }) {
2429
+ function rr({ top: t, left: e, right: n, bottom: i }) {
2430
2430
  return {
2431
2431
  x: { min: e, max: n },
2432
2432
  y: { min: t, max: i }
2433
2433
  };
2434
2434
  }
2435
- function vl({ x: t, y: e }) {
2435
+ function Tl({ x: t, y: e }) {
2436
2436
  return { top: e.min, right: t.max, bottom: e.max, left: t.min };
2437
2437
  }
2438
- function xl(t, e) {
2438
+ function wl(t, e) {
2439
2439
  if (!e)
2440
2440
  return t;
2441
2441
  const n = e({ x: t.left, y: t.top }), i = e({ x: t.right, y: t.bottom });
@@ -2446,36 +2446,36 @@ function xl(t, e) {
2446
2446
  right: i.x
2447
2447
  };
2448
2448
  }
2449
- function me(t) {
2449
+ function ge(t) {
2450
2450
  return t === void 0 || t === 1;
2451
2451
  }
2452
- function Ge({ scale: t, scaleX: e, scaleY: n }) {
2453
- return !me(t) || !me(e) || !me(n);
2452
+ function _e({ scale: t, scaleX: e, scaleY: n }) {
2453
+ return !ge(t) || !ge(e) || !ge(n);
2454
2454
  }
2455
2455
  function at(t) {
2456
- return Ge(t) || sr(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
2456
+ return _e(t) || or(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
2457
2457
  }
2458
- function sr(t) {
2459
- return ri(t.x) || ri(t.y);
2458
+ function or(t) {
2459
+ return ai(t.x) || ai(t.y);
2460
2460
  }
2461
- function ri(t) {
2461
+ function ai(t) {
2462
2462
  return t && t !== "0%";
2463
2463
  }
2464
- function Jt(t, e, n) {
2464
+ function Qt(t, e, n) {
2465
2465
  const i = t - n, s = e * i;
2466
2466
  return n + s;
2467
2467
  }
2468
- function oi(t, e, n, i, s) {
2469
- return s !== void 0 && (t = Jt(t, s, i)), Jt(t, n, i) + e;
2468
+ function li(t, e, n, i, s) {
2469
+ return s !== void 0 && (t = Qt(t, s, i)), Qt(t, n, i) + e;
2470
2470
  }
2471
- function _e(t, e = 0, n = 1, i, s) {
2472
- t.min = oi(t.min, e, n, i, s), t.max = oi(t.max, e, n, i, s);
2471
+ function ze(t, e = 0, n = 1, i, s) {
2472
+ t.min = li(t.min, e, n, i, s), t.max = li(t.max, e, n, i, s);
2473
2473
  }
2474
- function rr(t, { x: e, y: n }) {
2475
- _e(t.x, e.translate, e.scale, e.originPoint), _e(t.y, n.translate, n.scale, n.originPoint);
2474
+ function ar(t, { x: e, y: n }) {
2475
+ ze(t.x, e.translate, e.scale, e.originPoint), ze(t.y, n.translate, n.scale, n.originPoint);
2476
2476
  }
2477
- const ai = 0.999999999999, li = 1.0000000000001;
2478
- function Tl(t, e, n, i = !1) {
2477
+ const ci = 0.999999999999, ui = 1.0000000000001;
2478
+ function bl(t, e, n, i = !1) {
2479
2479
  const s = n.length;
2480
2480
  if (!s)
2481
2481
  return;
@@ -2487,36 +2487,36 @@ function Tl(t, e, n, i = !1) {
2487
2487
  l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && gt(t, {
2488
2488
  x: -o.scroll.offset.x,
2489
2489
  y: -o.scroll.offset.y
2490
- }), r && (e.x *= r.x.scale, e.y *= r.y.scale, rr(t, r)), i && at(o.latestValues) && gt(t, o.latestValues));
2490
+ }), r && (e.x *= r.x.scale, e.y *= r.y.scale, ar(t, r)), i && at(o.latestValues) && gt(t, o.latestValues));
2491
2491
  }
2492
- e.x < li && e.x > ai && (e.x = 1), e.y < li && e.y > ai && (e.y = 1);
2492
+ e.x < ui && e.x > ci && (e.x = 1), e.y < ui && e.y > ci && (e.y = 1);
2493
2493
  }
2494
2494
  function mt(t, e) {
2495
2495
  t.min = t.min + e, t.max = t.max + e;
2496
2496
  }
2497
- function ci(t, e, n, i, s = 0.5) {
2497
+ function hi(t, e, n, i, s = 0.5) {
2498
2498
  const o = E(t.min, t.max, s);
2499
- _e(t, e, n, o, i);
2499
+ ze(t, e, n, o, i);
2500
2500
  }
2501
2501
  function gt(t, e) {
2502
- ci(t.x, e.x, e.scaleX, e.scale, e.originX), ci(t.y, e.y, e.scaleY, e.scale, e.originY);
2502
+ hi(t.x, e.x, e.scaleX, e.scale, e.originX), hi(t.y, e.y, e.scaleY, e.scale, e.originY);
2503
2503
  }
2504
- function or(t, e) {
2505
- return ir(xl(t.getBoundingClientRect(), e));
2504
+ function lr(t, e) {
2505
+ return rr(wl(t.getBoundingClientRect(), e));
2506
2506
  }
2507
- function wl(t, e, n) {
2508
- const i = or(t, n), { scroll: s } = e;
2507
+ function Sl(t, e, n) {
2508
+ const i = lr(t, n), { scroll: s } = e;
2509
2509
  return s && (mt(i.x, s.offset.x), mt(i.y, s.offset.y)), i;
2510
2510
  }
2511
- const bl = {
2511
+ const Pl = {
2512
2512
  x: "translateX",
2513
2513
  y: "translateY",
2514
2514
  z: "translateZ",
2515
2515
  transformPerspective: "perspective"
2516
- }, Sl = bt.length;
2517
- function Pl(t, e, n) {
2516
+ }, Al = bt.length;
2517
+ function Vl(t, e, n) {
2518
2518
  let i = "", s = !0;
2519
- for (let o = 0; o < Sl; o++) {
2519
+ for (let o = 0; o < Al; o++) {
2520
2520
  const r = bt[o], a = t[r];
2521
2521
  if (a === void 0)
2522
2522
  continue;
@@ -2528,10 +2528,10 @@ function Pl(t, e, n) {
2528
2528
  l = r.startsWith("scale") ? c === 1 : c === 0;
2529
2529
  }
2530
2530
  if (!l || n) {
2531
- const c = Hs(a, bn[r]);
2531
+ const c = Xs(a, Pn[r]);
2532
2532
  if (!l) {
2533
2533
  s = !1;
2534
- const u = bl[r] || r;
2534
+ const u = Pl[r] || r;
2535
2535
  i += `${u}(${c}) `;
2536
2536
  }
2537
2537
  n && (e[r] = c);
@@ -2539,7 +2539,7 @@ function Pl(t, e, n) {
2539
2539
  }
2540
2540
  return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
2541
2541
  }
2542
- function Dn(t, e, n) {
2542
+ function Mn(t, e, n) {
2543
2543
  const { style: i, vars: s, transformOrigin: o } = t;
2544
2544
  let r = !1, a = !1;
2545
2545
  for (const l in e) {
@@ -2547,20 +2547,20 @@ function Dn(t, e, n) {
2547
2547
  if (St.has(l)) {
2548
2548
  r = !0;
2549
2549
  continue;
2550
- } else if (Ts(l)) {
2550
+ } else if (bs(l)) {
2551
2551
  s[l] = c;
2552
2552
  continue;
2553
2553
  } else {
2554
- const u = Hs(c, bn[l]);
2554
+ const u = Xs(c, Pn[l]);
2555
2555
  l.startsWith("origin") ? (a = !0, o[l] = u) : i[l] = u;
2556
2556
  }
2557
2557
  }
2558
- if (e.transform || (r || n ? i.transform = Pl(e, t.transform, n) : i.transform && (i.transform = "none")), a) {
2558
+ if (e.transform || (r || n ? i.transform = Vl(e, t.transform, n) : i.transform && (i.transform = "none")), a) {
2559
2559
  const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = o;
2560
2560
  i.transformOrigin = `${l} ${c} ${u}`;
2561
2561
  }
2562
2562
  }
2563
- function ar(t, { style: e, vars: n }, i, s) {
2563
+ function cr(t, { style: e, vars: n }, i, s) {
2564
2564
  const o = t.style;
2565
2565
  let r;
2566
2566
  for (r in e)
@@ -2569,7 +2569,7 @@ function ar(t, { style: e, vars: n }, i, s) {
2569
2569
  for (r in n)
2570
2570
  o.setProperty(r, n[r]);
2571
2571
  }
2572
- function ui(t, e) {
2572
+ function fi(t, e) {
2573
2573
  return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
2574
2574
  }
2575
2575
  const At = {
@@ -2581,10 +2581,10 @@ const At = {
2581
2581
  t = parseFloat(t);
2582
2582
  else
2583
2583
  return t;
2584
- const n = ui(t, e.target.x), i = ui(t, e.target.y);
2584
+ const n = fi(t, e.target.x), i = fi(t, e.target.y);
2585
2585
  return `${n}% ${i}%`;
2586
2586
  }
2587
- }, Al = {
2587
+ }, Dl = {
2588
2588
  correct: (t, { treeScale: e, projectionDelta: n }) => {
2589
2589
  const i = t, s = it.parse(t);
2590
2590
  if (s.length > 5)
@@ -2594,7 +2594,7 @@ const At = {
2594
2594
  const c = E(a, l, 0.5);
2595
2595
  return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
2596
2596
  }
2597
- }, ze = {
2597
+ }, He = {
2598
2598
  borderRadius: {
2599
2599
  ...At,
2600
2600
  applyTo: [
@@ -2608,65 +2608,65 @@ const At = {
2608
2608
  borderTopRightRadius: At,
2609
2609
  borderBottomLeftRadius: At,
2610
2610
  borderBottomRightRadius: At,
2611
- boxShadow: Al
2611
+ boxShadow: Dl
2612
2612
  };
2613
- function lr(t, { layout: e, layoutId: n }) {
2614
- return St.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ze[t] || t === "opacity");
2613
+ function ur(t, { layout: e, layoutId: n }) {
2614
+ return St.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!He[t] || t === "opacity");
2615
2615
  }
2616
- function Cn(t, e, n) {
2616
+ function En(t, e, n) {
2617
2617
  var r;
2618
2618
  const i = t.style, s = e == null ? void 0 : e.style, o = {};
2619
2619
  if (!i)
2620
2620
  return o;
2621
2621
  for (const a in i)
2622
- (j(i[a]) || s && j(s[a]) || lr(a, t) || ((r = n == null ? void 0 : n.getValue(a)) == null ? void 0 : r.liveStyle) !== void 0) && (o[a] = i[a]);
2622
+ (j(i[a]) || s && j(s[a]) || ur(a, t) || ((r = n == null ? void 0 : n.getValue(a)) == null ? void 0 : r.liveStyle) !== void 0) && (o[a] = i[a]);
2623
2623
  return o;
2624
2624
  }
2625
- function Vl(t) {
2625
+ function Cl(t) {
2626
2626
  return window.getComputedStyle(t);
2627
2627
  }
2628
- class Dl extends nr {
2628
+ class Ml extends sr {
2629
2629
  constructor() {
2630
- super(...arguments), this.type = "html", this.renderInstance = ar;
2630
+ super(...arguments), this.type = "html", this.renderInstance = cr;
2631
2631
  }
2632
2632
  readValueFromInstance(e, n) {
2633
2633
  var i;
2634
2634
  if (St.has(n))
2635
- return (i = this.projection) != null && i.isProjecting ? Le(n) : na(e, n);
2635
+ return (i = this.projection) != null && i.isProjecting ? ke(n) : sa(e, n);
2636
2636
  {
2637
- const s = Vl(e), o = (Ts(n) ? s.getPropertyValue(n) : s[n]) || 0;
2637
+ const s = Cl(e), o = (bs(n) ? s.getPropertyValue(n) : s[n]) || 0;
2638
2638
  return typeof o == "string" ? o.trim() : o;
2639
2639
  }
2640
2640
  }
2641
2641
  measureInstanceViewportBox(e, { transformPagePoint: n }) {
2642
- return or(e, n);
2642
+ return lr(e, n);
2643
2643
  }
2644
2644
  build(e, n, i) {
2645
- Dn(e, n, i.transformTemplate);
2645
+ Mn(e, n, i.transformTemplate);
2646
2646
  }
2647
2647
  scrapeMotionValuesFromProps(e, n, i) {
2648
- return Cn(e, n, i);
2648
+ return En(e, n, i);
2649
2649
  }
2650
2650
  }
2651
- const Cl = {
2651
+ const El = {
2652
2652
  offset: "stroke-dashoffset",
2653
2653
  array: "stroke-dasharray"
2654
- }, Ml = {
2654
+ }, Rl = {
2655
2655
  offset: "strokeDashoffset",
2656
2656
  array: "strokeDasharray"
2657
2657
  };
2658
- function El(t, e, n = 1, i = 0, s = !0) {
2658
+ function Ll(t, e, n = 1, i = 0, s = !0) {
2659
2659
  t.pathLength = 1;
2660
- const o = s ? Cl : Ml;
2660
+ const o = s ? El : Rl;
2661
2661
  t[o.offset] = `${-i}`, t[o.array] = `${e} ${n}`;
2662
2662
  }
2663
- const Rl = [
2663
+ const kl = [
2664
2664
  "offsetDistance",
2665
2665
  "offsetPath",
2666
2666
  "offsetRotate",
2667
2667
  "offsetAnchor"
2668
2668
  ];
2669
- function cr(t, {
2669
+ function hr(t, {
2670
2670
  attrX: e,
2671
2671
  attrY: n,
2672
2672
  attrScale: i,
@@ -2676,18 +2676,18 @@ function cr(t, {
2676
2676
  // This is object creation, which we try to avoid per-frame.
2677
2677
  ...a
2678
2678
  }, l, c, u) {
2679
- if (Dn(t, a, c), l) {
2679
+ if (Mn(t, a, c), l) {
2680
2680
  t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2681
2681
  return;
2682
2682
  }
2683
2683
  t.attrs = t.style, t.style = {};
2684
2684
  const { attrs: h, style: f } = t;
2685
2685
  h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = (u == null ? void 0 : u.transformBox) ?? "fill-box", delete h.transformBox);
2686
- for (const d of Rl)
2686
+ for (const d of kl)
2687
2687
  h[d] !== void 0 && (f[d] = h[d], delete h[d]);
2688
- e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), i !== void 0 && (h.scale = i), s !== void 0 && El(h, s, o, r, !1);
2688
+ e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), i !== void 0 && (h.scale = i), s !== void 0 && Ll(h, s, o, r, !1);
2689
2689
  }
2690
- const ur = /* @__PURE__ */ new Set([
2690
+ const fr = /* @__PURE__ */ new Set([
2691
2691
  "baseFrequency",
2692
2692
  "diffuseConstant",
2693
2693
  "kernelMatrix",
@@ -2711,14 +2711,14 @@ const ur = /* @__PURE__ */ new Set([
2711
2711
  "startOffset",
2712
2712
  "textLength",
2713
2713
  "lengthAdjust"
2714
- ]), hr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
2715
- function Ll(t, e, n, i) {
2716
- ar(t, e, void 0, i);
2714
+ ]), dr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
2715
+ function Fl(t, e, n, i) {
2716
+ cr(t, e, void 0, i);
2717
2717
  for (const s in e.attrs)
2718
- t.setAttribute(ur.has(s) ? s : wn(s), e.attrs[s]);
2718
+ t.setAttribute(fr.has(s) ? s : Sn(s), e.attrs[s]);
2719
2719
  }
2720
- function fr(t, e, n) {
2721
- const i = Cn(t, e, n);
2720
+ function pr(t, e, n) {
2721
+ const i = En(t, e, n);
2722
2722
  for (const s in t)
2723
2723
  if (j(t[s]) || j(e[s])) {
2724
2724
  const o = bt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
@@ -2726,7 +2726,7 @@ function fr(t, e, n) {
2726
2726
  }
2727
2727
  return i;
2728
2728
  }
2729
- class kl extends nr {
2729
+ class Bl extends sr {
2730
2730
  constructor() {
2731
2731
  super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = k;
2732
2732
  }
@@ -2735,40 +2735,40 @@ class kl extends nr {
2735
2735
  }
2736
2736
  readValueFromInstance(e, n) {
2737
2737
  if (St.has(n)) {
2738
- const i = _s(n);
2738
+ const i = Hs(n);
2739
2739
  return i && i.default || 0;
2740
2740
  }
2741
- return n = ur.has(n) ? n : wn(n), e.getAttribute(n);
2741
+ return n = fr.has(n) ? n : Sn(n), e.getAttribute(n);
2742
2742
  }
2743
2743
  scrapeMotionValuesFromProps(e, n, i) {
2744
- return fr(e, n, i);
2744
+ return pr(e, n, i);
2745
2745
  }
2746
2746
  build(e, n, i) {
2747
- cr(e, n, this.isSVGTag, i.transformTemplate, i.style);
2747
+ hr(e, n, this.isSVGTag, i.transformTemplate, i.style);
2748
2748
  }
2749
2749
  renderInstance(e, n, i, s) {
2750
- Ll(e, n, i, s);
2750
+ Fl(e, n, i, s);
2751
2751
  }
2752
2752
  mount(e) {
2753
- this.isSVGTag = hr(e.tagName), super.mount(e);
2753
+ this.isSVGTag = dr(e.tagName), super.mount(e);
2754
2754
  }
2755
2755
  }
2756
- const Fl = Vn.length;
2757
- function dr(t) {
2756
+ const Il = Cn.length;
2757
+ function mr(t) {
2758
2758
  if (!t)
2759
2759
  return;
2760
2760
  if (!t.isControllingVariants) {
2761
- const n = t.parent ? dr(t.parent) || {} : {};
2761
+ const n = t.parent ? mr(t.parent) || {} : {};
2762
2762
  return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
2763
2763
  }
2764
2764
  const e = {};
2765
- for (let n = 0; n < Fl; n++) {
2766
- const i = Vn[n], s = t.props[i];
2767
- (Ft(s) || s === !1) && (e[i] = s);
2765
+ for (let n = 0; n < Il; n++) {
2766
+ const i = Cn[n], s = t.props[i];
2767
+ (Bt(s) || s === !1) && (e[i] = s);
2768
2768
  }
2769
2769
  return e;
2770
2770
  }
2771
- function pr(t, e) {
2771
+ function gr(t, e) {
2772
2772
  if (!Array.isArray(e))
2773
2773
  return !1;
2774
2774
  const n = e.length;
@@ -2779,12 +2779,12 @@ function pr(t, e) {
2779
2779
  return !1;
2780
2780
  return !0;
2781
2781
  }
2782
- const Bl = [...An].reverse(), Il = An.length;
2783
- function Ol(t) {
2784
- return (e) => Promise.all(e.map(({ animation: n, options: i }) => za(t, n, i)));
2782
+ const Ol = [...Dn].reverse(), jl = Dn.length;
2783
+ function Nl(t) {
2784
+ return (e) => Promise.all(e.map(({ animation: n, options: i }) => Ya(t, n, i)));
2785
2785
  }
2786
- function jl(t) {
2787
- let e = Ol(t), n = hi(), i = !0;
2786
+ function $l(t) {
2787
+ let e = Nl(t), n = di(), i = !0;
2788
2788
  const s = (l) => (c, u) => {
2789
2789
  var f;
2790
2790
  const h = yt(t, u, l === "exit" ? (f = t.presenceContext) == null ? void 0 : f.custom : void 0);
@@ -2798,48 +2798,48 @@ function jl(t) {
2798
2798
  e = l(t);
2799
2799
  }
2800
2800
  function r(l) {
2801
- const { props: c } = t, u = dr(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
2801
+ const { props: c } = t, u = mr(t.parent) || {}, h = [], f = /* @__PURE__ */ new Set();
2802
2802
  let d = {}, p = 1 / 0;
2803
- for (let g = 0; g < Il; g++) {
2804
- const y = Bl[g], x = n[y], v = c[y] !== void 0 ? c[y] : u[y], S = Ft(v), b = y === l ? x.isActive : null;
2803
+ for (let g = 0; g < jl; g++) {
2804
+ const y = Ol[g], x = n[y], v = c[y] !== void 0 ? c[y] : u[y], S = Bt(v), b = y === l ? x.isActive : null;
2805
2805
  b === !1 && (p = g);
2806
2806
  let V = v === u[y] && v !== c[y] && S;
2807
2807
  if (V && i && t.manuallyAnimateOnMount && (V = !1), x.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
2808
2808
  !x.isActive && b === null || // If we didn't and don't have any defined prop for this animation type
2809
2809
  !v && !x.prevProp || // Or if the prop doesn't define an animation
2810
- se(v) || typeof v == "boolean")
2810
+ re(v) || typeof v == "boolean")
2811
2811
  continue;
2812
- const D = Nl(x.prevProp, v);
2812
+ const D = Ul(x.prevProp, v);
2813
2813
  let P = D || // If we're making this variant active, we want to always make it active
2814
2814
  y === l && x.isActive && !V && S || // If we removed a higher-priority variant (i is in reverse order)
2815
2815
  g > p && S, A = !1;
2816
2816
  const T = Array.isArray(v) ? v : [v];
2817
2817
  let I = T.reduce(s(y), {});
2818
2818
  b === !1 && (I = {});
2819
- const { prevResolvedValues: Pt = {} } = x, ae = {
2819
+ const { prevResolvedValues: Pt = {} } = x, le = {
2820
2820
  ...Pt,
2821
2821
  ...I
2822
- }, Ln = (F) => {
2822
+ }, Fn = (F) => {
2823
2823
  P = !0, f.has(F) && (A = !0, f.delete(F)), x.needsAnimating[F] = !0;
2824
2824
  const U = t.getValue(F);
2825
2825
  U && (U.liveStyle = !1);
2826
2826
  };
2827
- for (const F in ae) {
2827
+ for (const F in le) {
2828
2828
  const U = I[F], rt = Pt[F];
2829
2829
  if (d.hasOwnProperty(F))
2830
2830
  continue;
2831
2831
  let ht = !1;
2832
- je(U) && je(rt) ? ht = !pr(U, rt) : ht = U !== rt, ht ? U != null ? Ln(F) : f.add(F) : U !== void 0 && f.has(F) ? Ln(F) : x.protectedKeys[F] = !0;
2832
+ Ne(U) && Ne(rt) ? ht = !gr(U, rt) : ht = U !== rt, ht ? U != null ? Fn(F) : f.add(F) : U !== void 0 && f.has(F) ? Fn(F) : x.protectedKeys[F] = !0;
2833
2833
  }
2834
2834
  x.prevProp = v, x.prevResolvedValues = I, x.isActive && (d = { ...d, ...I }), i && t.blockInitialAnimation && (P = !1);
2835
- const kn = V && D;
2836
- P && (!kn || A) && h.push(...T.map((F) => {
2835
+ const Bn = V && D;
2836
+ P && (!Bn || A) && h.push(...T.map((F) => {
2837
2837
  const U = { type: y };
2838
- if (typeof F == "string" && i && !kn && t.manuallyAnimateOnMount && t.parent) {
2838
+ if (typeof F == "string" && i && !Bn && t.manuallyAnimateOnMount && t.parent) {
2839
2839
  const { parent: rt } = t, ht = yt(rt, F);
2840
2840
  if (rt.enteringChildren && ht) {
2841
- const { delayChildren: zr } = ht.transition || {};
2842
- U.delay = Os(rt.enteringChildren, t, zr);
2841
+ const { delayChildren: Yr } = ht.transition || {};
2842
+ U.delay = Ns(rt.enteringChildren, t, Yr);
2843
2843
  }
2844
2844
  }
2845
2845
  return {
@@ -2881,12 +2881,12 @@ function jl(t) {
2881
2881
  setAnimateFunction: o,
2882
2882
  getState: () => n,
2883
2883
  reset: () => {
2884
- n = hi();
2884
+ n = di();
2885
2885
  }
2886
2886
  };
2887
2887
  }
2888
- function Nl(t, e) {
2889
- return typeof e == "string" ? e !== t : Array.isArray(e) ? !pr(e, t) : !1;
2888
+ function Ul(t, e) {
2889
+ return typeof e == "string" ? e !== t : Array.isArray(e) ? !gr(e, t) : !1;
2890
2890
  }
2891
2891
  function ot(t = !1) {
2892
2892
  return {
@@ -2896,7 +2896,7 @@ function ot(t = !1) {
2896
2896
  prevResolvedValues: {}
2897
2897
  };
2898
2898
  }
2899
- function hi() {
2899
+ function di() {
2900
2900
  return {
2901
2901
  animate: ot(!0),
2902
2902
  whileInView: ot(),
@@ -2907,84 +2907,84 @@ function hi() {
2907
2907
  exit: ot()
2908
2908
  };
2909
2909
  }
2910
- function fi(t, e) {
2910
+ function pi(t, e) {
2911
2911
  t.min = e.min, t.max = e.max;
2912
2912
  }
2913
2913
  function z(t, e) {
2914
- fi(t.x, e.x), fi(t.y, e.y);
2914
+ pi(t.x, e.x), pi(t.y, e.y);
2915
2915
  }
2916
- function di(t, e) {
2916
+ function mi(t, e) {
2917
2917
  t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
2918
2918
  }
2919
- const mr = 1e-4, $l = 1 - mr, Ul = 1 + mr, gr = 0.01, Wl = 0 - gr, Kl = 0 + gr;
2919
+ const yr = 1e-4, Wl = 1 - yr, Kl = 1 + yr, vr = 0.01, Gl = 0 - vr, _l = 0 + vr;
2920
2920
  function $(t) {
2921
2921
  return t.max - t.min;
2922
2922
  }
2923
- function Gl(t, e, n) {
2923
+ function zl(t, e, n) {
2924
2924
  return Math.abs(t - e) <= n;
2925
2925
  }
2926
- function pi(t, e, n, i = 0.5) {
2927
- t.origin = i, t.originPoint = E(e.min, e.max, t.origin), t.scale = $(n) / $(e), t.translate = E(n.min, n.max, t.origin) - t.originPoint, (t.scale >= $l && t.scale <= Ul || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Wl && t.translate <= Kl || isNaN(t.translate)) && (t.translate = 0);
2926
+ function gi(t, e, n, i = 0.5) {
2927
+ t.origin = i, t.originPoint = E(e.min, e.max, t.origin), t.scale = $(n) / $(e), t.translate = E(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Wl && t.scale <= Kl || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Gl && t.translate <= _l || isNaN(t.translate)) && (t.translate = 0);
2928
2928
  }
2929
- function Mt(t, e, n, i) {
2930
- pi(t.x, e.x, n.x, i ? i.originX : void 0), pi(t.y, e.y, n.y, i ? i.originY : void 0);
2929
+ function Et(t, e, n, i) {
2930
+ gi(t.x, e.x, n.x, i ? i.originX : void 0), gi(t.y, e.y, n.y, i ? i.originY : void 0);
2931
2931
  }
2932
- function mi(t, e, n) {
2932
+ function yi(t, e, n) {
2933
2933
  t.min = n.min + e.min, t.max = t.min + $(e);
2934
2934
  }
2935
- function _l(t, e, n) {
2936
- mi(t.x, e.x, n.x), mi(t.y, e.y, n.y);
2935
+ function Hl(t, e, n) {
2936
+ yi(t.x, e.x, n.x), yi(t.y, e.y, n.y);
2937
2937
  }
2938
- function gi(t, e, n) {
2938
+ function vi(t, e, n) {
2939
2939
  t.min = e.min - n.min, t.max = t.min + $(e);
2940
2940
  }
2941
- function Qt(t, e, n) {
2942
- gi(t.x, e.x, n.x), gi(t.y, e.y, n.y);
2941
+ function te(t, e, n) {
2942
+ vi(t.x, e.x, n.x), vi(t.y, e.y, n.y);
2943
2943
  }
2944
- function yi(t, e, n, i, s) {
2945
- return t -= e, t = Jt(t, 1 / n, i), s !== void 0 && (t = Jt(t, 1 / s, i)), t;
2944
+ function xi(t, e, n, i, s) {
2945
+ return t -= e, t = Qt(t, 1 / n, i), s !== void 0 && (t = Qt(t, 1 / s, i)), t;
2946
2946
  }
2947
- function zl(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
2947
+ function Yl(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
2948
2948
  if (X.test(e) && (e = parseFloat(e), e = E(r.min, r.max, e / 100) - r.min), typeof e != "number")
2949
2949
  return;
2950
2950
  let a = E(o.min, o.max, i);
2951
- t === o && (a -= e), t.min = yi(t.min, e, n, a, s), t.max = yi(t.max, e, n, a, s);
2951
+ t === o && (a -= e), t.min = xi(t.min, e, n, a, s), t.max = xi(t.max, e, n, a, s);
2952
2952
  }
2953
- function vi(t, e, [n, i, s], o, r) {
2954
- zl(t, e[n], e[i], e[s], e.scale, o, r);
2953
+ function Ti(t, e, [n, i, s], o, r) {
2954
+ Yl(t, e[n], e[i], e[s], e.scale, o, r);
2955
2955
  }
2956
- const Hl = ["x", "scaleX", "originX"], Yl = ["y", "scaleY", "originY"];
2957
- function xi(t, e, n, i) {
2958
- vi(t.x, e, Hl, n ? n.x : void 0, i ? i.x : void 0), vi(t.y, e, Yl, n ? n.y : void 0, i ? i.y : void 0);
2956
+ const Xl = ["x", "scaleX", "originX"], ql = ["y", "scaleY", "originY"];
2957
+ function wi(t, e, n, i) {
2958
+ Ti(t.x, e, Xl, n ? n.x : void 0, i ? i.x : void 0), Ti(t.y, e, ql, n ? n.y : void 0, i ? i.y : void 0);
2959
2959
  }
2960
- function Ti(t) {
2960
+ function bi(t) {
2961
2961
  return t.translate === 0 && t.scale === 1;
2962
2962
  }
2963
- function yr(t) {
2964
- return Ti(t.x) && Ti(t.y);
2963
+ function xr(t) {
2964
+ return bi(t.x) && bi(t.y);
2965
2965
  }
2966
- function wi(t, e) {
2966
+ function Si(t, e) {
2967
2967
  return t.min === e.min && t.max === e.max;
2968
2968
  }
2969
- function Xl(t, e) {
2970
- return wi(t.x, e.x) && wi(t.y, e.y);
2969
+ function Zl(t, e) {
2970
+ return Si(t.x, e.x) && Si(t.y, e.y);
2971
2971
  }
2972
- function bi(t, e) {
2972
+ function Pi(t, e) {
2973
2973
  return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
2974
2974
  }
2975
- function vr(t, e) {
2976
- return bi(t.x, e.x) && bi(t.y, e.y);
2975
+ function Tr(t, e) {
2976
+ return Pi(t.x, e.x) && Pi(t.y, e.y);
2977
2977
  }
2978
- function Si(t) {
2978
+ function Ai(t) {
2979
2979
  return $(t.x) / $(t.y);
2980
2980
  }
2981
- function Pi(t, e) {
2981
+ function Vi(t, e) {
2982
2982
  return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
2983
2983
  }
2984
2984
  function W(t) {
2985
2985
  return [t("x"), t("y")];
2986
2986
  }
2987
- function ql(t, e, n) {
2987
+ function Jl(t, e, n) {
2988
2988
  let i = "";
2989
2989
  const s = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
2990
2990
  if ((s || o || r) && (i = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (i += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
@@ -2994,66 +2994,66 @@ function ql(t, e, n) {
2994
2994
  const a = t.x.scale * e.x, l = t.y.scale * e.y;
2995
2995
  return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
2996
2996
  }
2997
- const xr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Zl = xr.length, Ai = (t) => typeof t == "string" ? parseFloat(t) : t, Vi = (t) => typeof t == "number" || w.test(t);
2998
- function Jl(t, e, n, i, s, o) {
2999
- s ? (t.opacity = E(0, n.opacity ?? 1, Ql(i)), t.opacityExit = E(e.opacity ?? 1, 0, tc(i))) : o && (t.opacity = E(e.opacity ?? 1, n.opacity ?? 1, i));
3000
- for (let r = 0; r < Zl; r++) {
3001
- const a = `border${xr[r]}Radius`;
3002
- let l = Di(e, a), c = Di(n, a);
2997
+ const wr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Ql = wr.length, Di = (t) => typeof t == "string" ? parseFloat(t) : t, Ci = (t) => typeof t == "number" || w.test(t);
2998
+ function tc(t, e, n, i, s, o) {
2999
+ s ? (t.opacity = E(0, n.opacity ?? 1, ec(i)), t.opacityExit = E(e.opacity ?? 1, 0, nc(i))) : o && (t.opacity = E(e.opacity ?? 1, n.opacity ?? 1, i));
3000
+ for (let r = 0; r < Ql; r++) {
3001
+ const a = `border${wr[r]}Radius`;
3002
+ let l = Mi(e, a), c = Mi(n, a);
3003
3003
  if (l === void 0 && c === void 0)
3004
3004
  continue;
3005
- l || (l = 0), c || (c = 0), l === 0 || c === 0 || Vi(l) === Vi(c) ? (t[a] = Math.max(E(Ai(l), Ai(c), i), 0), (X.test(c) || X.test(l)) && (t[a] += "%")) : t[a] = c;
3005
+ l || (l = 0), c || (c = 0), l === 0 || c === 0 || Ci(l) === Ci(c) ? (t[a] = Math.max(E(Di(l), Di(c), i), 0), (X.test(c) || X.test(l)) && (t[a] += "%")) : t[a] = c;
3006
3006
  }
3007
3007
  (e.rotate || n.rotate) && (t.rotate = E(e.rotate || 0, n.rotate || 0, i));
3008
3008
  }
3009
- function Di(t, e) {
3009
+ function Mi(t, e) {
3010
3010
  return t[e] !== void 0 ? t[e] : t.borderRadius;
3011
3011
  }
3012
- const Ql = /* @__PURE__ */ Tr(0, 0.5, ps), tc = /* @__PURE__ */ Tr(0.5, 0.95, _);
3013
- function Tr(t, e, n) {
3014
- return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */ Rt(t, e, i));
3012
+ const ec = /* @__PURE__ */ br(0, 0.5, gs), nc = /* @__PURE__ */ br(0.5, 0.95, _);
3013
+ function br(t, e, n) {
3014
+ return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */ Lt(t, e, i));
3015
3015
  }
3016
- function ec(t, e, n) {
3016
+ function ic(t, e, n) {
3017
3017
  const i = j(t) ? t : vt(t);
3018
- return i.start(xn("", i, e, n)), i.animation;
3018
+ return i.start(wn("", i, e, n)), i.animation;
3019
3019
  }
3020
- function Bt(t, e, n, i = { passive: !0 }) {
3020
+ function It(t, e, n, i = { passive: !0 }) {
3021
3021
  return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
3022
3022
  }
3023
- const nc = (t, e) => t.depth - e.depth;
3024
- class ic {
3023
+ const sc = (t, e) => t.depth - e.depth;
3024
+ class rc {
3025
3025
  constructor() {
3026
3026
  this.children = [], this.isDirty = !1;
3027
3027
  }
3028
3028
  add(e) {
3029
- en(this.children, e), this.isDirty = !0;
3029
+ sn(this.children, e), this.isDirty = !0;
3030
3030
  }
3031
3031
  remove(e) {
3032
- nn(this.children, e), this.isDirty = !0;
3032
+ rn(this.children, e), this.isDirty = !0;
3033
3033
  }
3034
3034
  forEach(e) {
3035
- this.isDirty && this.children.sort(nc), this.isDirty = !1, this.children.forEach(e);
3035
+ this.isDirty && this.children.sort(sc), this.isDirty = !1, this.children.forEach(e);
3036
3036
  }
3037
3037
  }
3038
- function sc(t, e) {
3038
+ function oc(t, e) {
3039
3039
  const n = N.now(), i = ({ timestamp: s }) => {
3040
3040
  const o = s - n;
3041
3041
  o >= e && (nt(i), t(o - e));
3042
3042
  };
3043
3043
  return C.setup(i, !0), () => nt(i);
3044
3044
  }
3045
- function zt(t) {
3045
+ function Ht(t) {
3046
3046
  return j(t) ? t.get() : t;
3047
3047
  }
3048
- class rc {
3048
+ class ac {
3049
3049
  constructor() {
3050
3050
  this.members = [];
3051
3051
  }
3052
3052
  add(e) {
3053
- en(this.members, e), e.scheduleRender();
3053
+ sn(this.members, e), e.scheduleRender();
3054
3054
  }
3055
3055
  remove(e) {
3056
- if (nn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3056
+ if (rn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3057
3057
  const n = this.members[this.members.length - 1];
3058
3058
  n && this.promote(n);
3059
3059
  }
@@ -3101,7 +3101,7 @@ class rc {
3101
3101
  this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
3102
3102
  }
3103
3103
  }
3104
- const Ht = {
3104
+ const Yt = {
3105
3105
  /**
3106
3106
  * Global flag as to whether the tree has animated since the last time
3107
3107
  * we resized the window
@@ -3112,40 +3112,40 @@ const Ht = {
3112
3112
  * update will be given a `data-projection-id` attribute.
3113
3113
  */
3114
3114
  hasEverUpdated: !1
3115
- }, ge = ["", "X", "Y", "Z"], oc = 1e3;
3116
- let ac = 0;
3117
- function ye(t, e, n, i) {
3115
+ }, ye = ["", "X", "Y", "Z"], lc = 1e3;
3116
+ let cc = 0;
3117
+ function ve(t, e, n, i) {
3118
3118
  const { latestValues: s } = e;
3119
3119
  s[t] && (n[t] = s[t], e.setStaticValue(t, 0), i && (i[t] = 0));
3120
3120
  }
3121
- function wr(t) {
3121
+ function Sr(t) {
3122
3122
  if (t.hasCheckedOptimisedAppear = !0, t.root === t)
3123
3123
  return;
3124
3124
  const { visualElement: e } = t.options;
3125
3125
  if (!e)
3126
3126
  return;
3127
- const n = Us(e);
3127
+ const n = Ks(e);
3128
3128
  if (window.MotionHasOptimisedAnimation(n, "transform")) {
3129
3129
  const { layout: s, layoutId: o } = t.options;
3130
3130
  window.MotionCancelOptimisedAnimation(n, "transform", C, !(s || o));
3131
3131
  }
3132
3132
  const { parent: i } = t;
3133
- i && !i.hasCheckedOptimisedAppear && wr(i);
3133
+ i && !i.hasCheckedOptimisedAppear && Sr(i);
3134
3134
  }
3135
- function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
3135
+ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
3136
3136
  return class {
3137
3137
  constructor(r = {}, a = e == null ? void 0 : e()) {
3138
- this.id = ac++, 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 = () => {
3138
+ this.id = cc++, 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 = () => {
3139
3139
  this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
3140
3140
  }, this.updateProjection = () => {
3141
- this.projectionUpdateScheduled = !1, this.nodes.forEach(uc), this.nodes.forEach(pc), this.nodes.forEach(mc), this.nodes.forEach(hc);
3141
+ this.projectionUpdateScheduled = !1, this.nodes.forEach(fc), this.nodes.forEach(gc), this.nodes.forEach(yc), this.nodes.forEach(dc);
3142
3142
  }, 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;
3143
3143
  for (let l = 0; l < this.path.length; l++)
3144
3144
  this.path[l].shouldResetTransform = !0;
3145
- this.root === this && (this.nodes = new ic());
3145
+ this.root === this && (this.nodes = new rc());
3146
3146
  }
3147
3147
  addEventListener(r, a) {
3148
- return this.eventHandlers.has(r) || this.eventHandlers.set(r, new rn()), this.eventHandlers.get(r).add(a);
3148
+ return this.eventHandlers.has(r) || this.eventHandlers.set(r, new an()), this.eventHandlers.get(r).add(a);
3149
3149
  }
3150
3150
  notifyListeners(r, ...a) {
3151
3151
  const l = this.eventHandlers.get(r);
@@ -3160,7 +3160,7 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3160
3160
  mount(r) {
3161
3161
  if (this.instance)
3162
3162
  return;
3163
- this.isSVG = Js(r) && !cl(r), this.instance = r;
3163
+ this.isSVG = tr(r) && !hl(r), this.instance = r;
3164
3164
  const { layoutId: a, layout: l, visualElement: c } = this.options;
3165
3165
  if (c && !c.current && c.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
3166
3166
  let u, h = 0;
@@ -3169,7 +3169,7 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3169
3169
  h = window.innerWidth;
3170
3170
  }), t(r, () => {
3171
3171
  const d = window.innerWidth;
3172
- d !== h && (h = d, this.root.updateBlockedByResize = !0, u && u(), u = sc(f, 250), Ht.hasAnimatedSinceResize && (Ht.hasAnimatedSinceResize = !1, this.nodes.forEach(Ei)));
3172
+ d !== h && (h = d, this.root.updateBlockedByResize = !0, u && u(), u = oc(f, 250), Yt.hasAnimatedSinceResize && (Yt.hasAnimatedSinceResize = !1, this.nodes.forEach(Li)));
3173
3173
  });
3174
3174
  }
3175
3175
  a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
@@ -3177,17 +3177,17 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3177
3177
  this.target = void 0, this.relativeTarget = void 0;
3178
3178
  return;
3179
3179
  }
3180
- const p = this.options.transition || c.getDefaultTransition() || Tc, { onLayoutAnimationStart: m, onLayoutAnimationComplete: g } = c.getProps(), y = !this.targetLayout || !vr(this.targetLayout, d), x = !h && f;
3180
+ const p = this.options.transition || c.getDefaultTransition() || bc, { onLayoutAnimationStart: m, onLayoutAnimationComplete: g } = c.getProps(), y = !this.targetLayout || !Tr(this.targetLayout, d), x = !h && f;
3181
3181
  if (this.options.layoutRoot || this.resumeFrom || x || h && (y || !this.currentAnimation)) {
3182
3182
  this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
3183
3183
  const v = {
3184
- ...vn(p, "layout"),
3184
+ ...Tn(p, "layout"),
3185
3185
  onPlay: m,
3186
3186
  onComplete: g
3187
3187
  };
3188
3188
  (c.shouldReduceMotion || this.options.layoutRoot) && (v.delay = 0, v.type = !1), this.startAnimation(v), this.setAnimationOrigin(u, x);
3189
3189
  } else
3190
- h || Ei(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3190
+ h || Li(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3191
3191
  this.targetLayout = d;
3192
3192
  });
3193
3193
  }
@@ -3211,7 +3211,7 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3211
3211
  }
3212
3212
  // Note: currently only running on root node
3213
3213
  startUpdate() {
3214
- this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(gc), this.animationId++);
3214
+ this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(vc), this.animationId++);
3215
3215
  }
3216
3216
  getTransformTemplate() {
3217
3217
  const { visualElement: r } = this.options;
@@ -3222,7 +3222,7 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3222
3222
  this.options.onExitComplete && this.options.onExitComplete();
3223
3223
  return;
3224
3224
  }
3225
- if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && wr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
3225
+ if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Sr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
3226
3226
  return;
3227
3227
  this.isLayoutDirty = !0;
3228
3228
  for (let u = 0; u < this.path.length; u++) {
@@ -3237,22 +3237,22 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3237
3237
  }
3238
3238
  update() {
3239
3239
  if (this.updateScheduled = !1, this.isUpdateBlocked()) {
3240
- this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Ci);
3240
+ this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Ei);
3241
3241
  return;
3242
3242
  }
3243
3243
  if (this.animationId <= this.animationCommitId) {
3244
- this.nodes.forEach(Mi);
3244
+ this.nodes.forEach(Ri);
3245
3245
  return;
3246
3246
  }
3247
- this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(dc), this.nodes.forEach(lc), this.nodes.forEach(cc)) : this.nodes.forEach(Mi), this.clearAllSnapshots();
3247
+ this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(mc), this.nodes.forEach(uc), this.nodes.forEach(hc)) : this.nodes.forEach(Ri), this.clearAllSnapshots();
3248
3248
  const a = N.now();
3249
- B.delta = q(0, 1e3 / 60, a - B.timestamp), B.timestamp = a, B.isProcessing = !0, le.update.process(B), le.preRender.process(B), le.render.process(B), B.isProcessing = !1;
3249
+ B.delta = q(0, 1e3 / 60, a - B.timestamp), B.timestamp = a, B.isProcessing = !0, ce.update.process(B), ce.preRender.process(B), ce.render.process(B), B.isProcessing = !1;
3250
3250
  }
3251
3251
  didUpdate() {
3252
- this.updateScheduled || (this.updateScheduled = !0, Sn.read(this.scheduleUpdate));
3252
+ this.updateScheduled || (this.updateScheduled = !0, An.read(this.scheduleUpdate));
3253
3253
  }
3254
3254
  clearAllSnapshots() {
3255
- this.nodes.forEach(fc), this.sharedNodes.forEach(yc);
3255
+ this.nodes.forEach(pc), this.sharedNodes.forEach(xc);
3256
3256
  }
3257
3257
  scheduleUpdateProjection() {
3258
3258
  this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, C.preRender(this.updateProjection, !1, !0));
@@ -3295,13 +3295,13 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3295
3295
  resetTransform() {
3296
3296
  if (!s)
3297
3297
  return;
3298
- const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !yr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
3298
+ const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !xr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
3299
3299
  r && this.instance && (a || at(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
3300
3300
  }
3301
3301
  measure(r = !0) {
3302
3302
  const a = this.measurePageBox();
3303
3303
  let l = this.removeElementScroll(a);
3304
- return r && (l = this.removeTransform(l)), wc(l), {
3304
+ return r && (l = this.removeTransform(l)), Sc(l), {
3305
3305
  animationId: this.root.animationId,
3306
3306
  measuredBox: a,
3307
3307
  layoutBox: l,
@@ -3315,7 +3315,7 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3315
3315
  if (!r)
3316
3316
  return k();
3317
3317
  const a = r.measureViewportBox();
3318
- if (!(((c = this.scroll) == null ? void 0 : c.wasRoot) || this.path.some(bc))) {
3318
+ if (!(((c = this.scroll) == null ? void 0 : c.wasRoot) || this.path.some(Pc))) {
3319
3319
  const { scroll: u } = this.root;
3320
3320
  u && (mt(a.x, u.offset.x), mt(a.y, u.offset.y));
3321
3321
  }
@@ -3351,11 +3351,11 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3351
3351
  const c = this.path[l];
3352
3352
  if (!c.instance || !at(c.latestValues))
3353
3353
  continue;
3354
- Ge(c.latestValues) && c.updateSnapshot();
3354
+ _e(c.latestValues) && c.updateSnapshot();
3355
3355
  const u = k(), h = c.measurePageBox();
3356
- z(u, h), xi(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
3356
+ z(u, h), wi(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
3357
3357
  }
3358
- return at(this.latestValues) && xi(a, this.latestValues), a;
3358
+ return at(this.latestValues) && wi(a, this.latestValues), a;
3359
3359
  }
3360
3360
  setTargetDelta(r) {
3361
3361
  this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
@@ -3385,17 +3385,17 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3385
3385
  return;
3386
3386
  this.resolvedRelativeTargetAt = B.timestamp;
3387
3387
  const f = this.getClosestProjectingParent();
3388
- 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 = k(), this.targetWithTransforms = k()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), _l(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : z(this.target, this.layout.layoutBox), rr(this.target, this.targetDelta)) : z(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));
3388
+ 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 = k(), this.targetWithTransforms = k()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Hl(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : z(this.target, this.layout.layoutBox), ar(this.target, this.targetDelta)) : z(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));
3389
3389
  }
3390
3390
  getClosestProjectingParent() {
3391
- if (!(!this.parent || Ge(this.parent.latestValues) || sr(this.parent.latestValues)))
3391
+ if (!(!this.parent || _e(this.parent.latestValues) || or(this.parent.latestValues)))
3392
3392
  return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
3393
3393
  }
3394
3394
  isProjecting() {
3395
3395
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3396
3396
  }
3397
3397
  createRelativeTarget(r, a, l) {
3398
- this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = k(), this.relativeTargetOrigin = k(), Qt(this.relativeTargetOrigin, a, l), z(this.relativeTarget, this.relativeTargetOrigin);
3398
+ this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = k(), this.relativeTargetOrigin = k(), te(this.relativeTargetOrigin, a, l), z(this.relativeTarget, this.relativeTargetOrigin);
3399
3399
  }
3400
3400
  removeRelativeTarget() {
3401
3401
  this.relativeParent = this.relativeTarget = void 0;
@@ -3411,13 +3411,13 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3411
3411
  return;
3412
3412
  z(this.layoutCorrected, this.layout.layoutBox);
3413
3413
  const h = this.treeScale.x, f = this.treeScale.y;
3414
- Tl(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 = k());
3414
+ bl(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 = k());
3415
3415
  const { target: d } = r;
3416
3416
  if (!d) {
3417
3417
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
3418
3418
  return;
3419
3419
  }
3420
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (di(this.prevProjectionDelta.x, this.projectionDelta.x), di(this.prevProjectionDelta.y, this.projectionDelta.y)), Mt(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !Pi(this.projectionDelta.x, this.prevProjectionDelta.x) || !Pi(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
3420
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (mi(this.prevProjectionDelta.x, this.projectionDelta.x), mi(this.prevProjectionDelta.y, this.projectionDelta.y)), Et(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !Vi(this.projectionDelta.x, this.prevProjectionDelta.x) || !Vi(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
3421
3421
  }
3422
3422
  hide() {
3423
3423
  this.isVisible = !1;
@@ -3439,18 +3439,18 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3439
3439
  setAnimationOrigin(r, a = !1) {
3440
3440
  const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h = pt();
3441
3441
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
3442
- const f = k(), d = l ? l.source : void 0, p = this.layout ? this.layout.source : void 0, m = d !== p, g = this.getStack(), y = !g || g.members.length <= 1, x = !!(m && !y && this.options.crossfade === !0 && !this.path.some(xc));
3442
+ const f = k(), d = l ? l.source : void 0, p = this.layout ? this.layout.source : void 0, m = d !== p, g = this.getStack(), y = !g || g.members.length <= 1, x = !!(m && !y && this.options.crossfade === !0 && !this.path.some(wc));
3443
3443
  this.animationProgress = 0;
3444
3444
  let v;
3445
3445
  this.mixTargetDelta = (S) => {
3446
3446
  const b = S / 1e3;
3447
- Ri(h.x, r.x, b), Ri(h.y, r.y, b), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Qt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), vc(this.relativeTarget, this.relativeTargetOrigin, f, b), v && Xl(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = k()), z(v, this.relativeTarget)), m && (this.animationValues = u, Jl(u, c, this.latestValues, b, x, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = b;
3447
+ ki(h.x, r.x, b), ki(h.y, r.y, b), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (te(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Tc(this.relativeTarget, this.relativeTargetOrigin, f, b), v && Zl(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = k()), z(v, this.relativeTarget)), m && (this.animationValues = u, tc(u, c, this.latestValues, b, x, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = b;
3448
3448
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3449
3449
  }
3450
3450
  startAnimation(r) {
3451
3451
  var a, l, c;
3452
3452
  this.notifyListeners("animationStart"), (a = this.currentAnimation) == null || a.stop(), (c = (l = this.resumingFrom) == null ? void 0 : l.currentAnimation) == null || c.stop(), this.pendingAnimation && (nt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = C.update(() => {
3453
- Ht.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = vt(0)), this.currentAnimation = ec(this.motionValue, [0, 1e3], {
3453
+ Yt.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = vt(0)), this.currentAnimation = ic(this.motionValue, [0, 1e3], {
3454
3454
  ...r,
3455
3455
  velocity: 0,
3456
3456
  isSync: !0,
@@ -3471,24 +3471,24 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3471
3471
  r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3472
3472
  }
3473
3473
  finishAnimation() {
3474
- this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(oc), this.currentAnimation.stop()), this.completeAnimation();
3474
+ this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(lc), this.currentAnimation.stop()), this.completeAnimation();
3475
3475
  }
3476
3476
  applyTransformsToTarget() {
3477
3477
  const r = this.getLead();
3478
3478
  let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
3479
3479
  if (!(!a || !l || !c)) {
3480
- if (this !== r && this.layout && c && Sr(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
3480
+ if (this !== r && this.layout && c && Ar(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
3481
3481
  l = this.target || k();
3482
3482
  const h = $(this.layout.layoutBox.x);
3483
3483
  l.x.min = r.target.x.min, l.x.max = l.x.min + h;
3484
3484
  const f = $(this.layout.layoutBox.y);
3485
3485
  l.y.min = r.target.y.min, l.y.max = l.y.min + f;
3486
3486
  }
3487
- z(a, l), gt(a, u), Mt(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
3487
+ z(a, l), gt(a, u), Et(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
3488
3488
  }
3489
3489
  }
3490
3490
  registerSharedNode(r, a) {
3491
- this.sharedNodes.has(r) || this.sharedNodes.set(r, new rc()), this.sharedNodes.get(r).add(a);
3491
+ this.sharedNodes.has(r) || this.sharedNodes.set(r, new ac()), this.sharedNodes.get(r).add(a);
3492
3492
  const c = a.options.initialPromotionConfig;
3493
3493
  a.promote({
3494
3494
  transition: c ? c.transition : void 0,
@@ -3531,9 +3531,9 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3531
3531
  if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
3532
3532
  return;
3533
3533
  const c = {};
3534
- l.z && ye("z", r, c, this.animationValues);
3535
- for (let u = 0; u < ge.length; u++)
3536
- ye(`rotate${ge[u]}`, r, c, this.animationValues), ye(`skew${ge[u]}`, r, c, this.animationValues);
3534
+ l.z && ve("z", r, c, this.animationValues);
3535
+ for (let u = 0; u < ye.length; u++)
3536
+ ve(`rotate${ye[u]}`, r, c, this.animationValues), ve(`skew${ye[u]}`, r, c, this.animationValues);
3537
3537
  r.render();
3538
3538
  for (const u in c)
3539
3539
  r.setStaticValue(u, c[u]), this.animationValues && (this.animationValues[u] = c[u]);
@@ -3548,25 +3548,25 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3548
3548
  }
3549
3549
  const l = this.getTransformTemplate();
3550
3550
  if (this.needsReset) {
3551
- this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = zt(a == null ? void 0 : a.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
3551
+ this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = Ht(a == null ? void 0 : a.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
3552
3552
  return;
3553
3553
  }
3554
3554
  const c = this.getLead();
3555
3555
  if (!this.projectionDelta || !this.layout || !c.target) {
3556
- this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = zt(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !at(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3556
+ this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = Ht(a == null ? void 0 : a.pointerEvents) || ""), this.hasProjected && !at(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3557
3557
  return;
3558
3558
  }
3559
3559
  r.visibility = "";
3560
3560
  const u = c.animationValues || c.latestValues;
3561
3561
  this.applyTransformsToTarget();
3562
- let h = ql(this.projectionDeltaWithTransform, this.treeScale, u);
3562
+ let h = Jl(this.projectionDeltaWithTransform, this.treeScale, u);
3563
3563
  l && (h = l(u, h)), r.transform = h;
3564
3564
  const { x: f, y: d } = this.projectionDelta;
3565
3565
  r.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, c.animationValues ? r.opacity = c === this ? u.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : u.opacityExit : r.opacity = c === this ? u.opacity !== void 0 ? u.opacity : "" : u.opacityExit !== void 0 ? u.opacityExit : 0;
3566
- for (const p in ze) {
3566
+ for (const p in He) {
3567
3567
  if (u[p] === void 0)
3568
3568
  continue;
3569
- const { correct: m, applyTo: g, isCSSVariable: y } = ze[p], x = h === "none" ? u[p] : m(u[p], c);
3569
+ const { correct: m, applyTo: g, isCSSVariable: y } = He[p], x = h === "none" ? u[p] : m(u[p], c);
3570
3570
  if (g) {
3571
3571
  const v = g.length;
3572
3572
  for (let S = 0; S < v; S++)
@@ -3574,7 +3574,7 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3574
3574
  } else
3575
3575
  y ? this.options.visualElement.renderState.vars[p] = x : r[p] = x;
3576
3576
  }
3577
- this.options.layoutId && (r.pointerEvents = c === this ? zt(a == null ? void 0 : a.pointerEvents) || "" : "none");
3577
+ this.options.layoutId && (r.pointerEvents = c === this ? Ht(a == null ? void 0 : a.pointerEvents) || "" : "none");
3578
3578
  }
3579
3579
  clearSnapshot() {
3580
3580
  this.resumeFrom = this.snapshot = void 0;
@@ -3584,14 +3584,14 @@ function br({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
3584
3584
  this.root.nodes.forEach((r) => {
3585
3585
  var a;
3586
3586
  return (a = r.currentAnimation) == null ? void 0 : a.stop();
3587
- }), this.root.nodes.forEach(Ci), this.root.sharedNodes.clear();
3587
+ }), this.root.nodes.forEach(Ei), this.root.sharedNodes.clear();
3588
3588
  }
3589
3589
  };
3590
3590
  }
3591
- function lc(t) {
3591
+ function uc(t) {
3592
3592
  t.updateLayout();
3593
3593
  }
3594
- function cc(t) {
3594
+ function hc(t) {
3595
3595
  var n;
3596
3596
  const e = ((n = t.resumeFrom) == null ? void 0 : n.snapshot) || t.snapshot;
3597
3597
  if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
@@ -3599,15 +3599,15 @@ function cc(t) {
3599
3599
  o === "size" ? W((h) => {
3600
3600
  const f = r ? e.measuredBox[h] : e.layoutBox[h], d = $(f);
3601
3601
  f.min = i[h].min, f.max = f.min + d;
3602
- }) : Sr(o, e.layoutBox, i) && W((h) => {
3602
+ }) : Ar(o, e.layoutBox, i) && W((h) => {
3603
3603
  const f = r ? e.measuredBox[h] : e.layoutBox[h], d = $(i[h]);
3604
3604
  f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
3605
3605
  });
3606
3606
  const a = pt();
3607
- Mt(a, i, e.layoutBox);
3607
+ Et(a, i, e.layoutBox);
3608
3608
  const l = pt();
3609
- r ? Mt(l, t.applyTransform(s, !0), e.measuredBox) : Mt(l, i, e.layoutBox);
3610
- const c = !yr(a);
3609
+ r ? Et(l, t.applyTransform(s, !0), e.measuredBox) : Et(l, i, e.layoutBox);
3610
+ const c = !xr(a);
3611
3611
  let u = !1;
3612
3612
  if (!t.resumeFrom) {
3613
3613
  const h = t.getClosestProjectingParent();
@@ -3615,9 +3615,9 @@ function cc(t) {
3615
3615
  const { snapshot: f, layout: d } = h;
3616
3616
  if (f && d) {
3617
3617
  const p = k();
3618
- Qt(p, e.layoutBox, f.layoutBox);
3618
+ te(p, e.layoutBox, f.layoutBox);
3619
3619
  const m = k();
3620
- Qt(m, i, d.layoutBox), vr(p, m) || (u = !0), h.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = p, t.relativeParent = h);
3620
+ te(m, i, d.layoutBox), Tr(p, m) || (u = !0), h.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = p, t.relativeParent = h);
3621
3621
  }
3622
3622
  }
3623
3623
  }
@@ -3635,71 +3635,71 @@ function cc(t) {
3635
3635
  }
3636
3636
  t.options.transition = void 0;
3637
3637
  }
3638
- function uc(t) {
3638
+ function fc(t) {
3639
3639
  t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
3640
3640
  }
3641
- function hc(t) {
3641
+ function dc(t) {
3642
3642
  t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
3643
3643
  }
3644
- function fc(t) {
3644
+ function pc(t) {
3645
3645
  t.clearSnapshot();
3646
3646
  }
3647
- function Ci(t) {
3647
+ function Ei(t) {
3648
3648
  t.clearMeasurements();
3649
3649
  }
3650
- function Mi(t) {
3650
+ function Ri(t) {
3651
3651
  t.isLayoutDirty = !1;
3652
3652
  }
3653
- function dc(t) {
3653
+ function mc(t) {
3654
3654
  const { visualElement: e } = t.options;
3655
3655
  e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
3656
3656
  }
3657
- function Ei(t) {
3657
+ function Li(t) {
3658
3658
  t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
3659
3659
  }
3660
- function pc(t) {
3660
+ function gc(t) {
3661
3661
  t.resolveTargetDelta();
3662
3662
  }
3663
- function mc(t) {
3663
+ function yc(t) {
3664
3664
  t.calcProjection();
3665
3665
  }
3666
- function gc(t) {
3666
+ function vc(t) {
3667
3667
  t.resetSkewAndRotation();
3668
3668
  }
3669
- function yc(t) {
3669
+ function xc(t) {
3670
3670
  t.removeLeadSnapshot();
3671
3671
  }
3672
- function Ri(t, e, n) {
3672
+ function ki(t, e, n) {
3673
3673
  t.translate = E(e.translate, 0, n), t.scale = E(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
3674
3674
  }
3675
- function Li(t, e, n, i) {
3675
+ function Fi(t, e, n, i) {
3676
3676
  t.min = E(e.min, n.min, i), t.max = E(e.max, n.max, i);
3677
3677
  }
3678
- function vc(t, e, n, i) {
3679
- Li(t.x, e.x, n.x, i), Li(t.y, e.y, n.y, i);
3678
+ function Tc(t, e, n, i) {
3679
+ Fi(t.x, e.x, n.x, i), Fi(t.y, e.y, n.y, i);
3680
3680
  }
3681
- function xc(t) {
3681
+ function wc(t) {
3682
3682
  return t.animationValues && t.animationValues.opacityExit !== void 0;
3683
3683
  }
3684
- const Tc = {
3684
+ const bc = {
3685
3685
  duration: 0.45,
3686
3686
  ease: [0.4, 0, 0.1, 1]
3687
- }, ki = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Fi = ki("applewebkit/") && !ki("chrome/") ? Math.round : _;
3688
- function Bi(t) {
3689
- t.min = Fi(t.min), t.max = Fi(t.max);
3687
+ }, Bi = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ii = Bi("applewebkit/") && !Bi("chrome/") ? Math.round : _;
3688
+ function Oi(t) {
3689
+ t.min = Ii(t.min), t.max = Ii(t.max);
3690
3690
  }
3691
- function wc(t) {
3692
- Bi(t.x), Bi(t.y);
3691
+ function Sc(t) {
3692
+ Oi(t.x), Oi(t.y);
3693
3693
  }
3694
- function Sr(t, e, n) {
3695
- return t === "position" || t === "preserve-aspect" && !Gl(Si(e), Si(n), 0.2);
3694
+ function Ar(t, e, n) {
3695
+ return t === "position" || t === "preserve-aspect" && !zl(Ai(e), Ai(n), 0.2);
3696
3696
  }
3697
- function bc(t) {
3697
+ function Pc(t) {
3698
3698
  var e;
3699
3699
  return t !== t.root && ((e = t.scroll) == null ? void 0 : e.wasRoot);
3700
3700
  }
3701
- const Sc = br({
3702
- attachResizeListener: (t, e) => Bt(t, "resize", e),
3701
+ const Ac = Pr({
3702
+ attachResizeListener: (t, e) => It(t, "resize", e),
3703
3703
  measureScroll: () => {
3704
3704
  var t, e;
3705
3705
  return {
@@ -3708,58 +3708,58 @@ const Sc = br({
3708
3708
  };
3709
3709
  },
3710
3710
  checkIsScrollRoot: () => !0
3711
- }), ve = {
3711
+ }), xe = {
3712
3712
  current: void 0
3713
- }, Pr = br({
3713
+ }, Vr = Pr({
3714
3714
  measureScroll: (t) => ({
3715
3715
  x: t.scrollLeft,
3716
3716
  y: t.scrollTop
3717
3717
  }),
3718
3718
  defaultParent: () => {
3719
- if (!ve.current) {
3720
- const t = new Sc({});
3721
- t.mount(window), t.setOptions({ layoutScroll: !0 }), ve.current = t;
3719
+ if (!xe.current) {
3720
+ const t = new Ac({});
3721
+ t.mount(window), t.setOptions({ layoutScroll: !0 }), xe.current = t;
3722
3722
  }
3723
- return ve.current;
3723
+ return xe.current;
3724
3724
  },
3725
3725
  resetTransform: (t, e) => {
3726
3726
  t.style.transform = e !== void 0 ? e : "none";
3727
3727
  },
3728
3728
  checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
3729
- }), Mn = xt({
3729
+ }), Rn = xt({
3730
3730
  transformPagePoint: (t) => t,
3731
3731
  isStatic: !1,
3732
3732
  reducedMotion: "never"
3733
3733
  });
3734
- function Ii(t, e) {
3734
+ function ji(t, e) {
3735
3735
  if (typeof t == "function")
3736
3736
  return t(e);
3737
3737
  t != null && (t.current = e);
3738
3738
  }
3739
- function Pc(...t) {
3739
+ function Vc(...t) {
3740
3740
  return (e) => {
3741
3741
  let n = !1;
3742
3742
  const i = t.map((s) => {
3743
- const o = Ii(s, e);
3743
+ const o = ji(s, e);
3744
3744
  return !n && typeof o == "function" && (n = !0), o;
3745
3745
  });
3746
3746
  if (n)
3747
3747
  return () => {
3748
3748
  for (let s = 0; s < i.length; s++) {
3749
3749
  const o = i[s];
3750
- typeof o == "function" ? o() : Ii(t[s], null);
3750
+ typeof o == "function" ? o() : ji(t[s], null);
3751
3751
  }
3752
3752
  };
3753
3753
  };
3754
3754
  }
3755
- function Ac(...t) {
3756
- return ne.useCallback(Pc(...t), t);
3755
+ function Dc(...t) {
3756
+ return ie.useCallback(Vc(...t), t);
3757
3757
  }
3758
- class Vc extends ne.Component {
3758
+ class Cc extends ie.Component {
3759
3759
  getSnapshotBeforeUpdate(e) {
3760
3760
  const n = this.props.childRef.current;
3761
3761
  if (n && e.isPresent && !this.props.isPresent) {
3762
- const i = n.offsetParent, s = We(i) && i.offsetWidth || 0, o = We(i) && i.offsetHeight || 0, r = this.props.sizeRef.current;
3762
+ const i = n.offsetParent, s = Ke(i) && i.offsetWidth || 0, o = Ke(i) && i.offsetHeight || 0, r = this.props.sizeRef.current;
3763
3763
  r.height = n.offsetHeight || 0, r.width = n.offsetWidth || 0, r.top = n.offsetTop, r.left = n.offsetLeft, r.right = s - r.width - r.left, r.bottom = o - r.height - r.top;
3764
3764
  }
3765
3765
  return null;
@@ -3773,17 +3773,17 @@ class Vc extends ne.Component {
3773
3773
  return this.props.children;
3774
3774
  }
3775
3775
  }
3776
- function Dc({ children: t, isPresent: e, anchorX: n, anchorY: i, root: s }) {
3776
+ function Mc({ children: t, isPresent: e, anchorX: n, anchorY: i, root: s }) {
3777
3777
  var h;
3778
- const o = qe(), r = K(null), a = K({
3778
+ const o = Je(), r = K(null), a = K({
3779
3779
  width: 0,
3780
3780
  height: 0,
3781
3781
  top: 0,
3782
3782
  left: 0,
3783
3783
  right: 0,
3784
3784
  bottom: 0
3785
- }), { nonce: l } = O(Mn), c = ((h = t.props) == null ? void 0 : h.ref) ?? (t == null ? void 0 : t.ref), u = Ac(r, c);
3786
- return Ze(() => {
3785
+ }), { nonce: l } = O(Rn), c = ((h = t.props) == null ? void 0 : h.ref) ?? (t == null ? void 0 : t.ref), u = Dc(r, c);
3786
+ return Qe(() => {
3787
3787
  const { width: f, height: d, top: p, left: m, right: g, bottom: y } = a.current;
3788
3788
  if (e || !r.current || !f || !d)
3789
3789
  return;
@@ -3803,10 +3803,10 @@ function Dc({ children: t, isPresent: e, anchorX: n, anchorY: i, root: s }) {
3803
3803
  `), () => {
3804
3804
  b.contains(S) && b.removeChild(S);
3805
3805
  };
3806
- }, [e]), R(Vc, { isPresent: e, childRef: r, sizeRef: a, children: ne.cloneElement(t, { ref: u }) });
3806
+ }, [e]), R(Cc, { isPresent: e, childRef: r, sizeRef: a, children: ie.cloneElement(t, { ref: u }) });
3807
3807
  }
3808
- const Cc = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r, anchorX: a, anchorY: l, root: c }) => {
3809
- const u = tn(Mc), h = qe();
3808
+ const Ec = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r, anchorX: a, anchorY: l, root: c }) => {
3809
+ const u = nn(Rc), h = Je();
3810
3810
  let f = !0, d = Z(() => (f = !1, {
3811
3811
  id: h,
3812
3812
  initial: e,
@@ -3823,38 +3823,38 @@ const Cc = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
3823
3823
  }), [n, u, i]);
3824
3824
  return o && f && (d = { ...d }), Z(() => {
3825
3825
  u.forEach((p, m) => u.set(m, !1));
3826
- }, [n]), ne.useEffect(() => {
3826
+ }, [n]), ie.useEffect(() => {
3827
3827
  !n && !u.size && i && i();
3828
- }, [n]), r === "popLayout" && (t = R(Dc, { isPresent: n, anchorX: a, anchorY: l, root: c, children: t })), R(ie.Provider, { value: d, children: t });
3828
+ }, [n]), r === "popLayout" && (t = R(Mc, { isPresent: n, anchorX: a, anchorY: l, root: c, children: t })), R(se.Provider, { value: d, children: t });
3829
3829
  };
3830
- function Mc() {
3830
+ function Rc() {
3831
3831
  return /* @__PURE__ */ new Map();
3832
3832
  }
3833
- function Ar(t = !0) {
3834
- const e = O(ie);
3833
+ function Dr(t = !0) {
3834
+ const e = O(se);
3835
3835
  if (e === null)
3836
3836
  return [!0, null];
3837
- const { isPresent: n, onExitComplete: i, register: s } = e, o = qe();
3838
- Xe(() => {
3837
+ const { isPresent: n, onExitComplete: i, register: s } = e, o = Je();
3838
+ Ze(() => {
3839
3839
  if (t)
3840
3840
  return s(o);
3841
3841
  }, [t]);
3842
- const r = Qi(() => t && i && i(o), [o, i, t]);
3842
+ const r = es(() => t && i && i(o), [o, i, t]);
3843
3843
  return !n && i ? [!1, r] : [!0];
3844
3844
  }
3845
- const Wt = (t) => t.key || "";
3846
- function Oi(t) {
3845
+ const Kt = (t) => t.key || "";
3846
+ function Ni(t) {
3847
3847
  const e = [];
3848
- return Xr.forEach(t, (n) => {
3849
- qr(n) && e.push(n);
3848
+ return Zr.forEach(t, (n) => {
3849
+ Jr(n) && e.push(n);
3850
3850
  }), e;
3851
3851
  }
3852
- const Ec = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", anchorY: l = "top", root: c }) => {
3853
- const [u, h] = Ar(r), f = Z(() => Oi(t), [t]), d = r && !u ? [] : f.map(Wt), p = K(!0), m = K(f), g = tn(() => /* @__PURE__ */ new Map()), y = K(/* @__PURE__ */ new Set()), [x, v] = Pe(f), [S, b] = Pe(f);
3854
- is(() => {
3852
+ const Lc = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presenceAffectsLayout: s = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", anchorY: l = "top", root: c }) => {
3853
+ const [u, h] = Dr(r), f = Z(() => Ni(t), [t]), d = r && !u ? [] : f.map(Kt), p = K(!0), m = K(f), g = nn(() => /* @__PURE__ */ new Map()), y = K(/* @__PURE__ */ new Set()), [x, v] = Ae(f), [S, b] = Ae(f);
3854
+ rs(() => {
3855
3855
  p.current = !1, m.current = f;
3856
3856
  for (let P = 0; P < S.length; P++) {
3857
- const A = Wt(S[P]);
3857
+ const A = Kt(S[P]);
3858
3858
  d.includes(A) ? (g.delete(A), y.current.delete(A)) : g.get(A) !== !0 && g.set(A, !1);
3859
3859
  }
3860
3860
  }, [S, d.length, d.join("-")]);
@@ -3862,15 +3862,15 @@ const Ec = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presen
3862
3862
  if (f !== x) {
3863
3863
  let P = [...f];
3864
3864
  for (let A = 0; A < S.length; A++) {
3865
- const T = S[A], I = Wt(T);
3865
+ const T = S[A], I = Kt(T);
3866
3866
  d.includes(I) || (P.splice(A, 0, T), V.push(T));
3867
3867
  }
3868
- return o === "wait" && V.length && (P = V), b(Oi(P)), v(f), null;
3868
+ return o === "wait" && V.length && (P = V), b(Ni(P)), v(f), null;
3869
3869
  }
3870
3870
  process.env.NODE_ENV !== "production" && o === "wait" && S.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
3871
- const { forceRender: D } = O(Qe);
3872
- return R(Hr, { children: S.map((P) => {
3873
- const A = Wt(P), T = r && !u ? !1 : f === S || d.includes(A), I = () => {
3871
+ const { forceRender: D } = O(en);
3872
+ return R(Xr, { children: S.map((P) => {
3873
+ const A = Kt(P), T = r && !u ? !1 : f === S || d.includes(A), I = () => {
3874
3874
  if (y.current.has(A))
3875
3875
  return;
3876
3876
  if (y.current.add(A), g.has(A))
@@ -3878,13 +3878,13 @@ const Ec = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presen
3878
3878
  else
3879
3879
  return;
3880
3880
  let Pt = !0;
3881
- g.forEach((ae) => {
3882
- ae || (Pt = !1);
3881
+ g.forEach((le) => {
3882
+ le || (Pt = !1);
3883
3883
  }), Pt && (D == null || D(), b(m.current), r && (h == null || h()), i && i());
3884
3884
  };
3885
- return R(Cc, { isPresent: T, initial: !p.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: s, mode: o, root: c, onExitComplete: T ? void 0 : I, anchorX: a, anchorY: l, children: P }, A);
3885
+ return R(Ec, { isPresent: T, initial: !p.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: s, mode: o, root: c, onExitComplete: T ? void 0 : I, anchorX: a, anchorY: l, children: P }, A);
3886
3886
  }) });
3887
- }, Vr = xt({ strict: !1 }), ji = {
3887
+ }, Cr = xt({ strict: !1 }), $i = {
3888
3888
  animation: [
3889
3889
  "animate",
3890
3890
  "variants",
@@ -3904,30 +3904,30 @@ const Ec = ({ children: t, custom: e, initial: n = !0, onExitComplete: i, presen
3904
3904
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
3905
3905
  layout: ["layout", "layoutId"]
3906
3906
  };
3907
- let Ni = !1;
3908
- function Rc() {
3909
- if (Ni)
3907
+ let Ui = !1;
3908
+ function kc() {
3909
+ if (Ui)
3910
3910
  return;
3911
3911
  const t = {};
3912
- for (const e in ji)
3912
+ for (const e in $i)
3913
3913
  t[e] = {
3914
- isEnabled: (n) => ji[e].some((i) => !!n[i])
3914
+ isEnabled: (n) => $i[e].some((i) => !!n[i])
3915
3915
  };
3916
- er(t), Ni = !0;
3916
+ ir(t), Ui = !0;
3917
3917
  }
3918
- function Dr() {
3919
- return Rc(), gl();
3918
+ function Mr() {
3919
+ return kc(), vl();
3920
3920
  }
3921
- function Lc(t) {
3922
- const e = Dr();
3921
+ function Fc(t) {
3922
+ const e = Mr();
3923
3923
  for (const n in t)
3924
3924
  e[n] = {
3925
3925
  ...e[n],
3926
3926
  ...t[n]
3927
3927
  };
3928
- er(e);
3928
+ ir(e);
3929
3929
  }
3930
- const kc = /* @__PURE__ */ new Set([
3930
+ const Bc = /* @__PURE__ */ new Set([
3931
3931
  "animate",
3932
3932
  "exit",
3933
3933
  "variants",
@@ -3959,85 +3959,85 @@ const kc = /* @__PURE__ */ new Set([
3959
3959
  "ignoreStrict",
3960
3960
  "viewport"
3961
3961
  ]);
3962
- function te(t) {
3963
- return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || kc.has(t);
3962
+ function ee(t) {
3963
+ return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Bc.has(t);
3964
3964
  }
3965
- let Cr = (t) => !te(t);
3966
- function Fc(t) {
3967
- typeof t == "function" && (Cr = (e) => e.startsWith("on") ? !te(e) : t(e));
3965
+ let Er = (t) => !ee(t);
3966
+ function Ic(t) {
3967
+ typeof t == "function" && (Er = (e) => e.startsWith("on") ? !ee(e) : t(e));
3968
3968
  }
3969
3969
  try {
3970
- Fc(require("@emotion/is-prop-valid").default);
3970
+ Ic(require("@emotion/is-prop-valid").default);
3971
3971
  } catch {
3972
3972
  }
3973
- function Bc(t, e, n) {
3973
+ function Oc(t, e, n) {
3974
3974
  const i = {};
3975
3975
  for (const s in t)
3976
- s === "values" && typeof t.values == "object" || (Cr(s) || n === !0 && te(s) || !e && !te(s) || // If trying to use native HTML drag events, forward drag listeners
3976
+ s === "values" && typeof t.values == "object" || (Er(s) || n === !0 && ee(s) || !e && !ee(s) || // If trying to use native HTML drag events, forward drag listeners
3977
3977
  t.draggable && s.startsWith("onDrag")) && (i[s] = t[s]);
3978
3978
  return i;
3979
3979
  }
3980
- const oe = /* @__PURE__ */ xt({});
3981
- function Ic(t, e) {
3982
- if (re(t)) {
3980
+ const ae = /* @__PURE__ */ xt({});
3981
+ function jc(t, e) {
3982
+ if (oe(t)) {
3983
3983
  const { initial: n, animate: i } = t;
3984
3984
  return {
3985
- initial: n === !1 || Ft(n) ? n : void 0,
3986
- animate: Ft(i) ? i : void 0
3985
+ initial: n === !1 || Bt(n) ? n : void 0,
3986
+ animate: Bt(i) ? i : void 0
3987
3987
  };
3988
3988
  }
3989
3989
  return t.inherit !== !1 ? e : {};
3990
3990
  }
3991
- function Oc(t) {
3992
- const { initial: e, animate: n } = Ic(t, O(oe));
3993
- return Z(() => ({ initial: e, animate: n }), [$i(e), $i(n)]);
3991
+ function Nc(t) {
3992
+ const { initial: e, animate: n } = jc(t, O(ae));
3993
+ return Z(() => ({ initial: e, animate: n }), [Wi(e), Wi(n)]);
3994
3994
  }
3995
- function $i(t) {
3995
+ function Wi(t) {
3996
3996
  return Array.isArray(t) ? t.join(" ") : t;
3997
3997
  }
3998
- const En = () => ({
3998
+ const Ln = () => ({
3999
3999
  style: {},
4000
4000
  transform: {},
4001
4001
  transformOrigin: {},
4002
4002
  vars: {}
4003
4003
  });
4004
- function Mr(t, e, n) {
4004
+ function Rr(t, e, n) {
4005
4005
  for (const i in e)
4006
- !j(e[i]) && !lr(i, n) && (t[i] = e[i]);
4006
+ !j(e[i]) && !ur(i, n) && (t[i] = e[i]);
4007
4007
  }
4008
- function jc({ transformTemplate: t }, e) {
4008
+ function $c({ transformTemplate: t }, e) {
4009
4009
  return Z(() => {
4010
- const n = En();
4011
- return Dn(n, e, t), Object.assign({}, n.vars, n.style);
4010
+ const n = Ln();
4011
+ return Mn(n, e, t), Object.assign({}, n.vars, n.style);
4012
4012
  }, [e]);
4013
4013
  }
4014
- function Nc(t, e) {
4014
+ function Uc(t, e) {
4015
4015
  const n = t.style || {}, i = {};
4016
- return Mr(i, n, t), Object.assign(i, jc(t, e)), i;
4016
+ return Rr(i, n, t), Object.assign(i, $c(t, e)), i;
4017
4017
  }
4018
- function $c(t, e) {
4019
- const n = {}, i = Nc(t, e);
4018
+ function Wc(t, e) {
4019
+ const n = {}, i = Uc(t, e);
4020
4020
  return t.drag && t.dragListener !== !1 && (n.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = i, n;
4021
4021
  }
4022
- const Er = () => ({
4023
- ...En(),
4022
+ const Lr = () => ({
4023
+ ...Ln(),
4024
4024
  attrs: {}
4025
4025
  });
4026
- function Uc(t, e, n, i) {
4026
+ function Kc(t, e, n, i) {
4027
4027
  const s = Z(() => {
4028
- const o = Er();
4029
- return cr(o, e, hr(i), t.transformTemplate, t.style), {
4028
+ const o = Lr();
4029
+ return hr(o, e, dr(i), t.transformTemplate, t.style), {
4030
4030
  ...o.attrs,
4031
4031
  style: { ...o.style }
4032
4032
  };
4033
4033
  }, [e]);
4034
4034
  if (t.style) {
4035
4035
  const o = {};
4036
- Mr(o, t.style, t), s.style = { ...o, ...s.style };
4036
+ Rr(o, t.style, t), s.style = { ...o, ...s.style };
4037
4037
  }
4038
4038
  return s;
4039
4039
  }
4040
- const Wc = [
4040
+ const Gc = [
4041
4041
  "animate",
4042
4042
  "circle",
4043
4043
  "defs",
@@ -4064,7 +4064,7 @@ const Wc = [
4064
4064
  "use",
4065
4065
  "view"
4066
4066
  ];
4067
- function Rn(t) {
4067
+ function kn(t) {
4068
4068
  return (
4069
4069
  /**
4070
4070
  * If it's not a string, it's a custom React component. Currently we only support
@@ -4077,40 +4077,40 @@ function Rn(t) {
4077
4077
  /**
4078
4078
  * If it's in our list of lowercase SVG tags, it's an SVG component
4079
4079
  */
4080
- !!(Wc.indexOf(t) > -1 || /**
4080
+ !!(Gc.indexOf(t) > -1 || /**
4081
4081
  * If it contains a capital letter, it's an SVG component
4082
4082
  */
4083
4083
  /[A-Z]/u.test(t))
4084
4084
  )
4085
4085
  );
4086
4086
  }
4087
- function Kc(t, e, n, { latestValues: i }, s, o = !1, r) {
4088
- const l = (r ?? Rn(t) ? Uc : $c)(e, i, s, t), c = Bc(e, typeof t == "string", o), u = t !== ts ? { ...c, ...l, ref: n } : {}, { children: h } = e, f = Z(() => j(h) ? h.get() : h, [h]);
4089
- return Zr(t, {
4087
+ function _c(t, e, n, { latestValues: i }, s, o = !1, r) {
4088
+ const l = (r ?? kn(t) ? Kc : Wc)(e, i, s, t), c = Oc(e, typeof t == "string", o), u = t !== ns ? { ...c, ...l, ref: n } : {}, { children: h } = e, f = Z(() => j(h) ? h.get() : h, [h]);
4089
+ return Qr(t, {
4090
4090
  ...u,
4091
4091
  children: f
4092
4092
  });
4093
4093
  }
4094
- function Gc({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, i, s) {
4094
+ function zc({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, i, s) {
4095
4095
  return {
4096
- latestValues: _c(n, i, s, t),
4096
+ latestValues: Hc(n, i, s, t),
4097
4097
  renderState: e()
4098
4098
  };
4099
4099
  }
4100
- function _c(t, e, n, i) {
4100
+ function Hc(t, e, n, i) {
4101
4101
  const s = {}, o = i(t, {});
4102
4102
  for (const f in o)
4103
- s[f] = zt(o[f]);
4103
+ s[f] = Ht(o[f]);
4104
4104
  let { initial: r, animate: a } = t;
4105
- const l = re(t), c = tr(t);
4105
+ const l = oe(t), c = nr(t);
4106
4106
  e && c && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
4107
4107
  let u = n ? n.initial === !1 : !1;
4108
4108
  u = u || r === !1;
4109
4109
  const h = u ? a : r;
4110
- if (h && typeof h != "boolean" && !se(h)) {
4110
+ if (h && typeof h != "boolean" && !re(h)) {
4111
4111
  const f = Array.isArray(h) ? h : [h];
4112
4112
  for (let d = 0; d < f.length; d++) {
4113
- const p = Tn(t, f[d]);
4113
+ const p = bn(t, f[d]);
4114
4114
  if (p) {
4115
4115
  const { transitionEnd: m, transition: g, ...y } = p;
4116
4116
  for (const x in y) {
@@ -4128,23 +4128,23 @@ function _c(t, e, n, i) {
4128
4128
  }
4129
4129
  return s;
4130
4130
  }
4131
- const Rr = (t) => (e, n) => {
4132
- const i = O(oe), s = O(ie), o = () => Gc(t, e, i, s);
4133
- return n ? o() : tn(o);
4134
- }, zc = /* @__PURE__ */ Rr({
4135
- scrapeMotionValuesFromProps: Cn,
4136
- createRenderState: En
4137
- }), Hc = /* @__PURE__ */ Rr({
4138
- scrapeMotionValuesFromProps: fr,
4139
- createRenderState: Er
4140
- }), Yc = Symbol.for("motionComponentSymbol");
4141
- function Xc(t, e, n) {
4131
+ const kr = (t) => (e, n) => {
4132
+ const i = O(ae), s = O(se), o = () => zc(t, e, i, s);
4133
+ return n ? o() : nn(o);
4134
+ }, Yc = /* @__PURE__ */ kr({
4135
+ scrapeMotionValuesFromProps: En,
4136
+ createRenderState: Ln
4137
+ }), Xc = /* @__PURE__ */ kr({
4138
+ scrapeMotionValuesFromProps: pr,
4139
+ createRenderState: Lr
4140
+ }), qc = Symbol.for("motionComponentSymbol");
4141
+ function Zc(t, e, n) {
4142
4142
  const i = K(n);
4143
- Ze(() => {
4143
+ Qe(() => {
4144
4144
  i.current = n;
4145
4145
  });
4146
4146
  const s = K(null);
4147
- return Qi((o) => {
4147
+ return es((o) => {
4148
4148
  var a;
4149
4149
  o && ((a = t.onMount) == null || a.call(t, o)), e && (o ? e.mount(o) : e.unmount());
4150
4150
  const r = i.current;
@@ -4156,13 +4156,13 @@ function Xc(t, e, n) {
4156
4156
  else r && (r.current = o);
4157
4157
  }, [e]);
4158
4158
  }
4159
- const Lr = xt({});
4160
- function Dt(t) {
4159
+ const Fr = xt({});
4160
+ function Ct(t) {
4161
4161
  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
4162
4162
  }
4163
- function qc(t, e, n, i, s, o) {
4163
+ function Jc(t, e, n, i, s, o) {
4164
4164
  var v, S;
4165
- const { visualElement: r } = O(oe), a = O(Vr), l = O(ie), c = O(Mn), u = c.reducedMotion, h = c.skipAnimations, f = K(null), d = K(!1);
4165
+ const { visualElement: r } = O(ae), a = O(Cr), l = O(se), c = O(Rn), u = c.reducedMotion, h = c.skipAnimations, f = K(null), d = K(!1);
4166
4166
  i = i || a.renderer, !f.current && i && (f.current = i(t, {
4167
4167
  visualState: e,
4168
4168
  parent: r,
@@ -4173,28 +4173,28 @@ function qc(t, e, n, i, s, o) {
4173
4173
  skipAnimations: h,
4174
4174
  isSVG: o
4175
4175
  }), d.current && f.current && (f.current.manuallyAnimateOnMount = !0));
4176
- const p = f.current, m = O(Lr);
4177
- p && !p.projection && s && (p.type === "html" || p.type === "svg") && Zc(f.current, n, s, m);
4176
+ const p = f.current, m = O(Fr);
4177
+ p && !p.projection && s && (p.type === "html" || p.type === "svg") && Qc(f.current, n, s, m);
4178
4178
  const g = K(!1);
4179
- Ze(() => {
4179
+ Qe(() => {
4180
4180
  p && g.current && p.update(n, l);
4181
4181
  });
4182
- const y = n[$s], x = K(!!y && !((v = window.MotionHandoffIsComplete) != null && v.call(window, y)) && ((S = window.MotionHasOptimisedAnimation) == null ? void 0 : S.call(window, y)));
4183
- return is(() => {
4182
+ const y = n[Ws], x = K(!!y && !((v = window.MotionHandoffIsComplete) != null && v.call(window, y)) && ((S = window.MotionHasOptimisedAnimation) == null ? void 0 : S.call(window, y)));
4183
+ return rs(() => {
4184
4184
  d.current = !0, p && (g.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), x.current && p.animationState && p.animationState.animateChanges());
4185
- }), Xe(() => {
4185
+ }), Ze(() => {
4186
4186
  p && (!x.current && p.animationState && p.animationState.animateChanges(), x.current && (queueMicrotask(() => {
4187
4187
  var b;
4188
4188
  (b = window.MotionHandoffMarkAsComplete) == null || b.call(window, y);
4189
4189
  }), x.current = !1), p.enteringChildren = void 0);
4190
4190
  }), p;
4191
4191
  }
4192
- function Zc(t, e, n, i) {
4192
+ function Qc(t, e, n, i) {
4193
4193
  const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c, layoutCrossfade: u } = e;
4194
- t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : kr(t.parent)), t.projection.setOptions({
4194
+ t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Br(t.parent)), t.projection.setOptions({
4195
4195
  layoutId: s,
4196
4196
  layout: o,
4197
- alwaysMeasureLayout: !!r || a && Dt(a),
4197
+ alwaysMeasureLayout: !!r || a && Ct(a),
4198
4198
  visualElement: t,
4199
4199
  /**
4200
4200
  * TODO: Update options in an effect. This could be tricky as it'll be too late
@@ -4210,44 +4210,44 @@ function Zc(t, e, n, i) {
4210
4210
  layoutRoot: c
4211
4211
  });
4212
4212
  }
4213
- function kr(t) {
4213
+ function Br(t) {
4214
4214
  if (t)
4215
- return t.options.allowProjection !== !1 ? t.projection : kr(t.parent);
4215
+ return t.options.allowProjection !== !1 ? t.projection : Br(t.parent);
4216
4216
  }
4217
- function xe(t, { forwardMotionProps: e = !1, type: n } = {}, i, s) {
4218
- i && Lc(i);
4219
- const o = n ? n === "svg" : Rn(t), r = o ? Hc : zc;
4217
+ function Te(t, { forwardMotionProps: e = !1, type: n } = {}, i, s) {
4218
+ i && Fc(i);
4219
+ const o = n ? n === "svg" : kn(t), r = o ? Xc : Yc;
4220
4220
  function a(c, u) {
4221
4221
  let h;
4222
4222
  const f = {
4223
- ...O(Mn),
4223
+ ...O(Rn),
4224
4224
  ...c,
4225
- layoutId: Jc(c)
4226
- }, { isStatic: d } = f, p = Oc(c), m = r(c, d);
4227
- if (!d && ns) {
4228
- Qc(f, i);
4229
- const g = tu(f);
4230
- h = g.MeasureLayout, p.visualElement = qc(t, m, f, s, g.ProjectionNode, o);
4225
+ layoutId: tu(c)
4226
+ }, { isStatic: d } = f, p = Nc(c), m = r(c, d);
4227
+ if (!d && ss) {
4228
+ eu(f, i);
4229
+ const g = nu(f);
4230
+ h = g.MeasureLayout, p.visualElement = Jc(t, m, f, s, g.ProjectionNode, o);
4231
4231
  }
4232
- return Ji(oe.Provider, { value: p, children: [h && p.visualElement ? R(h, { visualElement: p.visualElement, ...f }) : null, Kc(t, c, Xc(m, p.visualElement, u), m, d, e, o)] });
4232
+ return ts(ae.Provider, { value: p, children: [h && p.visualElement ? R(h, { visualElement: p.visualElement, ...f }) : null, _c(t, c, Zc(m, p.visualElement, u), m, d, e, o)] });
4233
4233
  }
4234
4234
  a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
4235
- const l = Jr(a);
4236
- return l[Yc] = t, l;
4235
+ const l = to(a);
4236
+ return l[qc] = t, l;
4237
4237
  }
4238
- function Jc({ layoutId: t }) {
4239
- const e = O(Qe).id;
4238
+ function tu({ layoutId: t }) {
4239
+ const e = O(en).id;
4240
4240
  return e && t !== void 0 ? e + "-" + t : t;
4241
4241
  }
4242
- function Qc(t, e) {
4243
- const n = O(Vr).strict;
4242
+ function eu(t, e) {
4243
+ const n = O(Cr).strict;
4244
4244
  if (process.env.NODE_ENV !== "production" && e && n) {
4245
4245
  const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
4246
4246
  t.ignoreStrict ? Tt(!1, i, "lazy-strict-mode") : J(!1, i, "lazy-strict-mode");
4247
4247
  }
4248
4248
  }
4249
- function tu(t) {
4250
- const e = Dr(), { drag: n, layout: i } = e;
4249
+ function nu(t) {
4250
+ const e = Mr(), { drag: n, layout: i } = e;
4251
4251
  if (!n && !i)
4252
4252
  return {};
4253
4253
  const s = { ...n, ...i };
@@ -4256,34 +4256,34 @@ function tu(t) {
4256
4256
  ProjectionNode: s.ProjectionNode
4257
4257
  };
4258
4258
  }
4259
- function eu(t, e) {
4259
+ function iu(t, e) {
4260
4260
  if (typeof Proxy > "u")
4261
- return xe;
4262
- const n = /* @__PURE__ */ new Map(), i = (o, r) => xe(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && on(!1, "motion() is deprecated. Use motion.create() instead."), i(o, r));
4261
+ return Te;
4262
+ const n = /* @__PURE__ */ new Map(), i = (o, r) => Te(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && ln(!1, "motion() is deprecated. Use motion.create() instead."), i(o, r));
4263
4263
  return new Proxy(s, {
4264
4264
  /**
4265
4265
  * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
4266
4266
  * The prop name is passed through as `key` and we can use that to generate a `motion`
4267
4267
  * DOM component with that name.
4268
4268
  */
4269
- get: (o, r) => r === "create" ? i : (n.has(r) || n.set(r, xe(r, void 0, t, e)), n.get(r))
4269
+ get: (o, r) => r === "create" ? i : (n.has(r) || n.set(r, Te(r, void 0, t, e)), n.get(r))
4270
4270
  });
4271
4271
  }
4272
- const nu = (t, e) => e.isSVG ?? Rn(t) ? new kl(e) : new Dl(e, {
4273
- allowProjection: t !== ts
4272
+ const su = (t, e) => e.isSVG ?? kn(t) ? new Bl(e) : new Ml(e, {
4273
+ allowProjection: t !== ns
4274
4274
  });
4275
- class iu extends st {
4275
+ class ru extends st {
4276
4276
  /**
4277
4277
  * We dynamically generate the AnimationState manager as it contains a reference
4278
4278
  * to the underlying animation library. We only want to load that if we load this,
4279
4279
  * so people can optionally code split it out using the `m` component.
4280
4280
  */
4281
4281
  constructor(e) {
4282
- super(e), e.animationState || (e.animationState = jl(e));
4282
+ super(e), e.animationState || (e.animationState = $l(e));
4283
4283
  }
4284
4284
  updateAnimationControlsSubscription() {
4285
4285
  const { animate: e } = this.node.getProps();
4286
- se(e) && (this.unmountControls = e.subscribe(this.node));
4286
+ re(e) && (this.unmountControls = e.subscribe(this.node));
4287
4287
  }
4288
4288
  /**
4289
4289
  * Subscribe any provided AnimationControls to the component's VisualElement
@@ -4300,10 +4300,10 @@ class iu extends st {
4300
4300
  this.node.animationState.reset(), (e = this.unmountControls) == null || e.call(this);
4301
4301
  }
4302
4302
  }
4303
- let su = 0;
4304
- class ru extends st {
4303
+ let ou = 0;
4304
+ class au extends st {
4305
4305
  constructor() {
4306
- super(...arguments), this.id = su++;
4306
+ super(...arguments), this.id = ou++;
4307
4307
  }
4308
4308
  update() {
4309
4309
  if (!this.node.presenceContext)
@@ -4323,15 +4323,15 @@ class ru extends st {
4323
4323
  unmount() {
4324
4324
  }
4325
4325
  }
4326
- const ou = {
4326
+ const lu = {
4327
4327
  animation: {
4328
- Feature: iu
4328
+ Feature: ru
4329
4329
  },
4330
4330
  exit: {
4331
- Feature: ru
4331
+ Feature: au
4332
4332
  }
4333
4333
  };
4334
- function Nt(t) {
4334
+ function $t(t) {
4335
4335
  return {
4336
4336
  point: {
4337
4337
  x: t.pageX,
@@ -4339,17 +4339,17 @@ function Nt(t) {
4339
4339
  }
4340
4340
  };
4341
4341
  }
4342
- const au = (t) => (e) => Pn(e) && t(e, Nt(e));
4343
- function Et(t, e, n, i) {
4344
- return Bt(t, e, au(n), i);
4342
+ const cu = (t) => (e) => Vn(e) && t(e, $t(e));
4343
+ function Rt(t, e, n, i) {
4344
+ return It(t, e, cu(n), i);
4345
4345
  }
4346
- const Fr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Ui = (t, e) => Math.abs(t - e);
4347
- function lu(t, e) {
4348
- const n = Ui(t.x, e.x), i = Ui(t.y, e.y);
4346
+ const Ir = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Ki = (t, e) => Math.abs(t - e);
4347
+ function uu(t, e) {
4348
+ const n = Ki(t.x, e.x), i = Ki(t.y, e.y);
4349
4349
  return Math.sqrt(n ** 2 + i ** 2);
4350
4350
  }
4351
- const Wi = /* @__PURE__ */ new Set(["auto", "scroll"]);
4352
- class Br {
4351
+ const Gi = /* @__PURE__ */ new Set(["auto", "scroll"]);
4352
+ class Or {
4353
4353
  constructor(e, n, { transformPagePoint: i, contextWindow: s = window, dragSnapToOrigin: o = !1, distanceThreshold: r = 3, element: a } = {}) {
4354
4354
  if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (d) => {
4355
4355
  this.handleScroll(d.target);
@@ -4358,7 +4358,7 @@ class Br {
4358
4358
  }, this.updatePoint = () => {
4359
4359
  if (!(this.lastMoveEvent && this.lastMoveEventInfo))
4360
4360
  return;
4361
- const d = we(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, m = lu(d.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
4361
+ const d = be(this.lastMoveEventInfo, this.history), p = this.startEvent !== null, m = uu(d.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
4362
4362
  if (!p && !m)
4363
4363
  return;
4364
4364
  const { point: g } = d, { timestamp: y } = B;
@@ -4366,21 +4366,21 @@ class Br {
4366
4366
  const { onStart: x, onMove: v } = this.handlers;
4367
4367
  p || (x && x(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), v && v(this.lastMoveEvent, d);
4368
4368
  }, this.handlePointerMove = (d, p) => {
4369
- this.lastMoveEvent = d, this.lastMoveEventInfo = Te(p, this.transformPagePoint), C.update(this.updatePoint, !0);
4369
+ this.lastMoveEvent = d, this.lastMoveEventInfo = we(p, this.transformPagePoint), C.update(this.updatePoint, !0);
4370
4370
  }, this.handlePointerUp = (d, p) => {
4371
4371
  this.end();
4372
4372
  const { onEnd: m, onSessionEnd: g, resumeAnimation: y } = this.handlers;
4373
4373
  if ((this.dragSnapToOrigin || !this.startEvent) && y && y(), !(this.lastMoveEvent && this.lastMoveEventInfo))
4374
4374
  return;
4375
- const x = we(d.type === "pointercancel" ? this.lastMoveEventInfo : Te(p, this.transformPagePoint), this.history);
4375
+ const x = be(d.type === "pointercancel" ? this.lastMoveEventInfo : we(p, this.transformPagePoint), this.history);
4376
4376
  this.startEvent && m && m(d, x), g && g(d, x);
4377
- }, !Pn(e))
4377
+ }, !Vn(e))
4378
4378
  return;
4379
4379
  this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.distanceThreshold = r, this.contextWindow = s || window;
4380
- const l = Nt(e), c = Te(l, this.transformPagePoint), { point: u } = c, { timestamp: h } = B;
4380
+ const l = $t(e), c = we(l, this.transformPagePoint), { point: u } = c, { timestamp: h } = B;
4381
4381
  this.history = [{ ...u, timestamp: h }];
4382
4382
  const { onSessionStart: f } = n;
4383
- f && f(e, we(c, this.history)), this.removeListeners = It(Et(this.contextWindow, "pointermove", this.handlePointerMove), Et(this.contextWindow, "pointerup", this.handlePointerUp), Et(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
4383
+ f && f(e, be(c, this.history)), this.removeListeners = Ot(Rt(this.contextWindow, "pointermove", this.handlePointerMove), Rt(this.contextWindow, "pointerup", this.handlePointerUp), Rt(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
4384
4384
  }
4385
4385
  /**
4386
4386
  * Start tracking scroll on ancestors and window.
@@ -4389,7 +4389,7 @@ class Br {
4389
4389
  let n = e.parentElement;
4390
4390
  for (; n; ) {
4391
4391
  const i = getComputedStyle(n);
4392
- (Wi.has(i.overflowX) || Wi.has(i.overflowY)) && this.scrollPositions.set(n, {
4392
+ (Gi.has(i.overflowX) || Gi.has(i.overflowY)) && this.scrollPositions.set(n, {
4393
4393
  x: n.scrollLeft,
4394
4394
  y: n.scrollTop
4395
4395
  }), n = n.parentElement;
@@ -4431,31 +4431,31 @@ class Br {
4431
4431
  this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), nt(this.updatePoint);
4432
4432
  }
4433
4433
  }
4434
- function Te(t, e) {
4434
+ function we(t, e) {
4435
4435
  return e ? { point: e(t.point) } : t;
4436
4436
  }
4437
- function Ki(t, e) {
4437
+ function _i(t, e) {
4438
4438
  return { x: t.x - e.x, y: t.y - e.y };
4439
4439
  }
4440
- function we({ point: t }, e) {
4440
+ function be({ point: t }, e) {
4441
4441
  return {
4442
4442
  point: t,
4443
- delta: Ki(t, Ir(e)),
4444
- offset: Ki(t, cu(e)),
4445
- velocity: uu(e, 0.1)
4443
+ delta: _i(t, jr(e)),
4444
+ offset: _i(t, hu(e)),
4445
+ velocity: fu(e, 0.1)
4446
4446
  };
4447
4447
  }
4448
- function cu(t) {
4448
+ function hu(t) {
4449
4449
  return t[0];
4450
4450
  }
4451
- function Ir(t) {
4451
+ function jr(t) {
4452
4452
  return t[t.length - 1];
4453
4453
  }
4454
- function uu(t, e) {
4454
+ function fu(t, e) {
4455
4455
  if (t.length < 2)
4456
4456
  return { x: 0, y: 0 };
4457
4457
  let n = t.length - 1, i = null;
4458
- const s = Ir(t);
4458
+ const s = jr(t);
4459
4459
  for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp > /* @__PURE__ */ Y(e))); )
4460
4460
  n--;
4461
4461
  if (!i)
@@ -4469,58 +4469,58 @@ function uu(t, e) {
4469
4469
  };
4470
4470
  return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
4471
4471
  }
4472
- function hu(t, { min: e, max: n }, i) {
4472
+ function du(t, { min: e, max: n }, i) {
4473
4473
  return e !== void 0 && t < e ? t = i ? E(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? E(n, t, i.max) : Math.min(t, n)), t;
4474
4474
  }
4475
- function Gi(t, e, n) {
4475
+ function zi(t, e, n) {
4476
4476
  return {
4477
4477
  min: e !== void 0 ? t.min + e : void 0,
4478
4478
  max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
4479
4479
  };
4480
4480
  }
4481
- function fu(t, { top: e, left: n, bottom: i, right: s }) {
4481
+ function pu(t, { top: e, left: n, bottom: i, right: s }) {
4482
4482
  return {
4483
- x: Gi(t.x, n, s),
4484
- y: Gi(t.y, e, i)
4483
+ x: zi(t.x, n, s),
4484
+ y: zi(t.y, e, i)
4485
4485
  };
4486
4486
  }
4487
- function _i(t, e) {
4487
+ function Hi(t, e) {
4488
4488
  let n = e.min - t.min, i = e.max - t.max;
4489
4489
  return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
4490
4490
  }
4491
- function du(t, e) {
4491
+ function mu(t, e) {
4492
4492
  return {
4493
- x: _i(t.x, e.x),
4494
- y: _i(t.y, e.y)
4493
+ x: Hi(t.x, e.x),
4494
+ y: Hi(t.y, e.y)
4495
4495
  };
4496
4496
  }
4497
- function pu(t, e) {
4497
+ function gu(t, e) {
4498
4498
  let n = 0.5;
4499
4499
  const i = $(t), s = $(e);
4500
- return s > i ? n = /* @__PURE__ */ Rt(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ Rt(t.min, t.max - s, e.min)), q(0, 1, n);
4500
+ return s > i ? n = /* @__PURE__ */ Lt(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ Lt(t.min, t.max - s, e.min)), q(0, 1, n);
4501
4501
  }
4502
- function mu(t, e) {
4502
+ function yu(t, e) {
4503
4503
  const n = {};
4504
4504
  return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
4505
4505
  }
4506
- const He = 0.35;
4507
- function gu(t = He) {
4508
- return t === !1 ? t = 0 : t === !0 && (t = He), {
4509
- x: zi(t, "left", "right"),
4510
- y: zi(t, "top", "bottom")
4506
+ const Ye = 0.35;
4507
+ function vu(t = Ye) {
4508
+ return t === !1 ? t = 0 : t === !0 && (t = Ye), {
4509
+ x: Yi(t, "left", "right"),
4510
+ y: Yi(t, "top", "bottom")
4511
4511
  };
4512
4512
  }
4513
- function zi(t, e, n) {
4513
+ function Yi(t, e, n) {
4514
4514
  return {
4515
- min: Hi(t, e),
4516
- max: Hi(t, n)
4515
+ min: Xi(t, e),
4516
+ max: Xi(t, n)
4517
4517
  };
4518
4518
  }
4519
- function Hi(t, e) {
4519
+ function Xi(t, e) {
4520
4520
  return typeof t == "number" ? t : t[e] || 0;
4521
4521
  }
4522
- const yu = /* @__PURE__ */ new WeakMap();
4523
- class vu {
4522
+ const xu = /* @__PURE__ */ new WeakMap();
4523
+ class Tu {
4524
4524
  constructor(e) {
4525
4525
  this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = k(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
4526
4526
  }
@@ -4529,11 +4529,11 @@ class vu {
4529
4529
  if (s && s.isPresent === !1)
4530
4530
  return;
4531
4531
  const o = (h) => {
4532
- n ? (this.stopAnimation(), this.snapToCursor(Nt(h).point)) : this.pauseAnimation();
4532
+ n ? (this.stopAnimation(), this.snapToCursor($t(h).point)) : this.pauseAnimation();
4533
4533
  }, r = (h, f) => {
4534
4534
  this.stopAnimation();
4535
4535
  const { drag: d, dragPropagation: p, onDragStart: m } = this.getProps();
4536
- if (d && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = sl(d), !this.openDragLock))
4536
+ if (d && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = ol(d), !this.openDragLock))
4537
4537
  return;
4538
4538
  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), W((y) => {
4539
4539
  let x = this.getAxisMotionValue(y).get() || 0;
@@ -4545,7 +4545,7 @@ class vu {
4545
4545
  }
4546
4546
  }
4547
4547
  this.originPoint[y] = x;
4548
- }), m && C.postRender(() => m(h, f)), Ne(this.visualElement, "transform");
4548
+ }), m && C.postRender(() => m(h, f)), $e(this.visualElement, "transform");
4549
4549
  const { animationState: g } = this.visualElement;
4550
4550
  g && g.setActive("whileDrag", !0);
4551
4551
  }, a = (h, f) => {
@@ -4555,7 +4555,7 @@ class vu {
4555
4555
  return;
4556
4556
  const { offset: y } = f;
4557
4557
  if (p && this.currentDirection === null) {
4558
- this.currentDirection = xu(y), this.currentDirection !== null && m && m(this.currentDirection);
4558
+ this.currentDirection = wu(y), this.currentDirection !== null && m && m(this.currentDirection);
4559
4559
  return;
4560
4560
  }
4561
4561
  this.updateAxis("x", f.point, y), this.updateAxis("y", f.point, y), this.visualElement.render(), g && g(h, f);
@@ -4565,7 +4565,7 @@ class vu {
4565
4565
  var f;
4566
4566
  return this.getAnimationState(h) === "paused" && ((f = this.getAxisMotionValue(h).animation) == null ? void 0 : f.play());
4567
4567
  }), { dragSnapToOrigin: u } = this.getProps();
4568
- this.panSession = new Br(e, {
4568
+ this.panSession = new Or(e, {
4569
4569
  onSessionStart: o,
4570
4570
  onStart: r,
4571
4571
  onMove: a,
@@ -4575,7 +4575,7 @@ class vu {
4575
4575
  transformPagePoint: this.visualElement.getTransformPagePoint(),
4576
4576
  dragSnapToOrigin: u,
4577
4577
  distanceThreshold: i,
4578
- contextWindow: Fr(this.visualElement),
4578
+ contextWindow: Ir(this.visualElement),
4579
4579
  element: this.visualElement.current
4580
4580
  });
4581
4581
  }
@@ -4612,39 +4612,39 @@ class vu {
4612
4612
  }
4613
4613
  updateAxis(e, n, i) {
4614
4614
  const { drag: s } = this.getProps();
4615
- if (!i || !Kt(e, s, this.currentDirection))
4615
+ if (!i || !Gt(e, s, this.currentDirection))
4616
4616
  return;
4617
4617
  const o = this.getAxisMotionValue(e);
4618
4618
  let r = this.originPoint[e] + i[e];
4619
- this.constraints && this.constraints[e] && (r = hu(r, this.constraints[e], this.elastic[e])), o.set(r);
4619
+ this.constraints && this.constraints[e] && (r = du(r, this.constraints[e], this.elastic[e])), o.set(r);
4620
4620
  }
4621
4621
  resolveConstraints() {
4622
4622
  var o;
4623
4623
  const { dragConstraints: e, dragElastic: n } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (o = this.visualElement.projection) == null ? void 0 : o.layout, s = this.constraints;
4624
- e && Dt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && i ? this.constraints = fu(i.layoutBox, e) : this.constraints = !1, this.elastic = gu(n), s !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && W((r) => {
4625
- this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = mu(i.layoutBox[r], this.constraints[r]));
4624
+ e && Ct(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && i ? this.constraints = pu(i.layoutBox, e) : this.constraints = !1, this.elastic = vu(n), s !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && W((r) => {
4625
+ this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = yu(i.layoutBox[r], this.constraints[r]));
4626
4626
  });
4627
4627
  }
4628
4628
  resolveRefConstraints() {
4629
4629
  const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
4630
- if (!e || !Dt(e))
4630
+ if (!e || !Ct(e))
4631
4631
  return !1;
4632
4632
  const i = e.current;
4633
4633
  J(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
4634
4634
  const { projection: s } = this.visualElement;
4635
4635
  if (!s || !s.layout)
4636
4636
  return !1;
4637
- const o = wl(i, s.root, this.visualElement.getTransformPagePoint());
4638
- let r = du(s.layout.layoutBox, o);
4637
+ const o = Sl(i, s.root, this.visualElement.getTransformPagePoint());
4638
+ let r = mu(s.layout.layoutBox, o);
4639
4639
  if (n) {
4640
- const a = n(vl(r));
4641
- this.hasMutatedConstraints = !!a, a && (r = ir(a));
4640
+ const a = n(Tl(r));
4641
+ this.hasMutatedConstraints = !!a, a && (r = rr(a));
4642
4642
  }
4643
4643
  return r;
4644
4644
  }
4645
4645
  startAnimation(e) {
4646
4646
  const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = W((u) => {
4647
- if (!Kt(u, n, this.currentDirection))
4647
+ if (!Gt(u, n, this.currentDirection))
4648
4648
  return;
4649
4649
  let h = l && l[u] || {};
4650
4650
  r && (h = { min: 0, max: 0 });
@@ -4665,7 +4665,7 @@ class vu {
4665
4665
  }
4666
4666
  startAxisValueAnimation(e, n) {
4667
4667
  const i = this.getAxisMotionValue(e);
4668
- return Ne(this.visualElement, e), i.start(xn(e, i, 0, n, this.visualElement, !1));
4668
+ return $e(this.visualElement, e), i.start(wn(e, i, 0, n, this.visualElement, !1));
4669
4669
  }
4670
4670
  stopAnimation() {
4671
4671
  W((e) => this.getAxisMotionValue(e).stop());
@@ -4693,7 +4693,7 @@ class vu {
4693
4693
  snapToCursor(e) {
4694
4694
  W((n) => {
4695
4695
  const { drag: i } = this.getProps();
4696
- if (!Kt(n, i, this.currentDirection))
4696
+ if (!Gt(n, i, this.currentDirection))
4697
4697
  return;
4698
4698
  const { projection: s } = this.visualElement, o = this.getAxisMotionValue(n);
4699
4699
  if (s && s.layout) {
@@ -4711,7 +4711,7 @@ class vu {
4711
4711
  if (!this.visualElement.current)
4712
4712
  return;
4713
4713
  const { drag: e, dragConstraints: n } = this.getProps(), { projection: i } = this.visualElement;
4714
- if (!Dt(n) || !i || !this.constraints)
4714
+ if (!Ct(n) || !i || !this.constraints)
4715
4715
  return;
4716
4716
  this.stopAnimation();
4717
4717
  const s = { x: 0, y: 0 };
@@ -4719,12 +4719,12 @@ class vu {
4719
4719
  const a = this.getAxisMotionValue(r);
4720
4720
  if (a && this.constraints !== !1) {
4721
4721
  const l = a.get();
4722
- s[r] = pu({ min: l, max: l }, this.constraints[r]);
4722
+ s[r] = gu({ min: l, max: l }, this.constraints[r]);
4723
4723
  }
4724
4724
  });
4725
4725
  const { transformTemplate: o } = this.visualElement.getProps();
4726
4726
  this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(), W((r) => {
4727
- if (!Kt(r, e, null))
4727
+ if (!Gt(r, e, null))
4728
4728
  return;
4729
4729
  const a = this.getAxisMotionValue(r), { min: l, max: c } = this.constraints[r];
4730
4730
  a.set(E(l, c, s[r]));
@@ -4733,16 +4733,16 @@ class vu {
4733
4733
  addListeners() {
4734
4734
  if (!this.visualElement.current)
4735
4735
  return;
4736
- yu.set(this.visualElement, this);
4737
- const e = this.visualElement.current, n = Et(e, "pointerdown", (l) => {
4738
- const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== e && Zs(h);
4736
+ xu.set(this.visualElement, this);
4737
+ const e = this.visualElement.current, n = Rt(e, "pointerdown", (l) => {
4738
+ const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== e && Qs(h);
4739
4739
  c && u && !f && this.start(l);
4740
4740
  }), i = () => {
4741
4741
  const { dragConstraints: l } = this.getProps();
4742
- Dt(l) && l.current && (this.constraints = this.resolveRefConstraints());
4742
+ Ct(l) && l.current && (this.constraints = this.resolveRefConstraints());
4743
4743
  }, { projection: s } = this.visualElement, o = s.addEventListener("measure", i);
4744
4744
  s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), C.read(i);
4745
- const r = Bt(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
4745
+ const r = It(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
4746
4746
  this.isDragging && c && (W((u) => {
4747
4747
  const h = this.getAxisMotionValue(u);
4748
4748
  h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
@@ -4753,7 +4753,7 @@ class vu {
4753
4753
  };
4754
4754
  }
4755
4755
  getProps() {
4756
- const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = He, dragMomentum: a = !0 } = e;
4756
+ const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = Ye, dragMomentum: a = !0 } = e;
4757
4757
  return {
4758
4758
  ...e,
4759
4759
  drag: n,
@@ -4765,16 +4765,16 @@ class vu {
4765
4765
  };
4766
4766
  }
4767
4767
  }
4768
- function Kt(t, e, n) {
4768
+ function Gt(t, e, n) {
4769
4769
  return (e === !0 || e === t) && (n === null || n === t);
4770
4770
  }
4771
- function xu(t, e = 10) {
4771
+ function wu(t, e = 10) {
4772
4772
  let n = null;
4773
4773
  return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
4774
4774
  }
4775
- class Tu extends st {
4775
+ class bu extends st {
4776
4776
  constructor(e) {
4777
- super(e), this.removeGroupControls = _, this.removeListeners = _, this.controls = new vu(e);
4777
+ super(e), this.removeGroupControls = _, this.removeListeners = _, this.controls = new Tu(e);
4778
4778
  }
4779
4779
  mount() {
4780
4780
  const { dragControls: e } = this.node.getProps();
@@ -4788,24 +4788,24 @@ class Tu extends st {
4788
4788
  this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
4789
4789
  }
4790
4790
  }
4791
- const Yi = (t) => (e, n) => {
4791
+ const qi = (t) => (e, n) => {
4792
4792
  t && C.postRender(() => t(e, n));
4793
4793
  };
4794
- class wu extends st {
4794
+ class Su extends st {
4795
4795
  constructor() {
4796
4796
  super(...arguments), this.removePointerDownListener = _;
4797
4797
  }
4798
4798
  onPointerDown(e) {
4799
- this.session = new Br(e, this.createPanHandlers(), {
4799
+ this.session = new Or(e, this.createPanHandlers(), {
4800
4800
  transformPagePoint: this.node.getTransformPagePoint(),
4801
- contextWindow: Fr(this.node)
4801
+ contextWindow: Ir(this.node)
4802
4802
  });
4803
4803
  }
4804
4804
  createPanHandlers() {
4805
4805
  const { onPanSessionStart: e, onPanStart: n, onPan: i, onPanEnd: s } = this.node.getProps();
4806
4806
  return {
4807
- onSessionStart: Yi(e),
4808
- onStart: Yi(n),
4807
+ onSessionStart: qi(e),
4808
+ onStart: qi(n),
4809
4809
  onMove: i,
4810
4810
  onEnd: (o, r) => {
4811
4811
  delete this.session, s && C.postRender(() => s(o, r));
@@ -4813,7 +4813,7 @@ class wu extends st {
4813
4813
  };
4814
4814
  }
4815
4815
  mount() {
4816
- this.removePointerDownListener = Et(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
4816
+ this.removePointerDownListener = Rt(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
4817
4817
  }
4818
4818
  update() {
4819
4819
  this.session && this.session.updateHandlers(this.createPanHandlers());
@@ -4822,8 +4822,8 @@ class wu extends st {
4822
4822
  this.removePointerDownListener(), this.session && this.session.end();
4823
4823
  }
4824
4824
  }
4825
- let be = !1;
4826
- class bu extends Qr {
4825
+ let Se = !1;
4826
+ class Pu extends eo {
4827
4827
  /**
4828
4828
  * This only mounts projection nodes for components that
4829
4829
  * need measuring, we might want to do it for all components
@@ -4831,33 +4831,33 @@ class bu extends Qr {
4831
4831
  */
4832
4832
  componentDidMount() {
4833
4833
  const { visualElement: e, layoutGroup: n, switchLayoutGroup: i, layoutId: s } = this.props, { projection: o } = e;
4834
- o && (n.group && n.group.add(o), i && i.register && s && i.register(o), be && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
4834
+ o && (n.group && n.group.add(o), i && i.register && s && i.register(o), Se && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
4835
4835
  this.safeToRemove();
4836
4836
  }), o.setOptions({
4837
4837
  ...o.options,
4838
4838
  layoutDependency: this.props.layoutDependency,
4839
4839
  onExitComplete: () => this.safeToRemove()
4840
- })), Ht.hasEverUpdated = !0;
4840
+ })), Yt.hasEverUpdated = !0;
4841
4841
  }
4842
4842
  getSnapshotBeforeUpdate(e) {
4843
4843
  const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, { projection: r } = i;
4844
4844
  return r && (r.isPresent = o, e.layoutDependency !== n && r.setOptions({
4845
4845
  ...r.options,
4846
4846
  layoutDependency: n
4847
- }), be = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || C.postRender(() => {
4847
+ }), Se = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || C.postRender(() => {
4848
4848
  const a = r.getStack();
4849
4849
  (!a || !a.members.length) && this.safeToRemove();
4850
4850
  }))), null;
4851
4851
  }
4852
4852
  componentDidUpdate() {
4853
4853
  const { projection: e } = this.props.visualElement;
4854
- e && (e.root.didUpdate(), Sn.postRender(() => {
4854
+ e && (e.root.didUpdate(), An.postRender(() => {
4855
4855
  !e.currentAnimation && e.isLead() && this.safeToRemove();
4856
4856
  }));
4857
4857
  }
4858
4858
  componentWillUnmount() {
4859
4859
  const { visualElement: e, layoutGroup: n, switchLayoutGroup: i } = this.props, { projection: s } = e;
4860
- be = !0, s && (s.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(s), i && i.deregister && i.deregister(s));
4860
+ Se = !0, s && (s.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(s), i && i.deregister && i.deregister(s));
4861
4861
  }
4862
4862
  safeToRemove() {
4863
4863
  const { safeToRemove: e } = this.props;
@@ -4867,35 +4867,35 @@ class bu extends Qr {
4867
4867
  return null;
4868
4868
  }
4869
4869
  }
4870
- function Or(t) {
4871
- const [e, n] = Ar(), i = O(Qe);
4872
- return R(bu, { ...t, layoutGroup: i, switchLayoutGroup: O(Lr), isPresent: e, safeToRemove: n });
4870
+ function Nr(t) {
4871
+ const [e, n] = Dr(), i = O(en);
4872
+ return R(Pu, { ...t, layoutGroup: i, switchLayoutGroup: O(Fr), isPresent: e, safeToRemove: n });
4873
4873
  }
4874
- const Su = {
4874
+ const Au = {
4875
4875
  pan: {
4876
- Feature: wu
4876
+ Feature: Su
4877
4877
  },
4878
4878
  drag: {
4879
- Feature: Tu,
4880
- ProjectionNode: Pr,
4881
- MeasureLayout: Or
4879
+ Feature: bu,
4880
+ ProjectionNode: Vr,
4881
+ MeasureLayout: Nr
4882
4882
  }
4883
4883
  };
4884
- function Xi(t, e, n) {
4884
+ function Zi(t, e, n) {
4885
4885
  const { props: i } = t;
4886
4886
  t.animationState && i.whileHover && t.animationState.setActive("whileHover", n === "Start");
4887
4887
  const s = "onHover" + n, o = i[s];
4888
- o && C.postRender(() => o(e, Nt(e)));
4888
+ o && C.postRender(() => o(e, $t(e)));
4889
4889
  }
4890
- class Pu extends st {
4890
+ class Vu extends st {
4891
4891
  mount() {
4892
4892
  const { current: e } = this.node;
4893
- e && (this.unmount = rl(e, (n, i) => (Xi(this.node, i, "Start"), (s) => Xi(this.node, s, "End"))));
4893
+ e && (this.unmount = al(e, (n, i) => (Zi(this.node, i, "Start"), (s) => Zi(this.node, s, "End"))));
4894
4894
  }
4895
4895
  unmount() {
4896
4896
  }
4897
4897
  }
4898
- class Au extends st {
4898
+ class Du extends st {
4899
4899
  constructor() {
4900
4900
  super(...arguments), this.isActive = !1;
4901
4901
  }
@@ -4912,50 +4912,50 @@ class Au extends st {
4912
4912
  !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4913
4913
  }
4914
4914
  mount() {
4915
- this.unmount = It(Bt(this.node.current, "focus", () => this.onFocus()), Bt(this.node.current, "blur", () => this.onBlur()));
4915
+ this.unmount = Ot(It(this.node.current, "focus", () => this.onFocus()), It(this.node.current, "blur", () => this.onBlur()));
4916
4916
  }
4917
4917
  unmount() {
4918
4918
  }
4919
4919
  }
4920
- function qi(t, e, n) {
4920
+ function Ji(t, e, n) {
4921
4921
  const { props: i } = t;
4922
4922
  if (t.current instanceof HTMLButtonElement && t.current.disabled)
4923
4923
  return;
4924
4924
  t.animationState && i.whileTap && t.animationState.setActive("whileTap", n === "Start");
4925
4925
  const s = "onTap" + (n === "End" ? "" : n), o = i[s];
4926
- o && C.postRender(() => o(e, Nt(e)));
4926
+ o && C.postRender(() => o(e, $t(e)));
4927
4927
  }
4928
- class Vu extends st {
4928
+ class Cu extends st {
4929
4929
  mount() {
4930
4930
  const { current: e } = this.node;
4931
- e && (this.unmount = ll(e, (n, i) => (qi(this.node, i, "Start"), (s, { success: o }) => qi(this.node, s, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4931
+ e && (this.unmount = ul(e, (n, i) => (Ji(this.node, i, "Start"), (s, { success: o }) => Ji(this.node, s, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
4932
4932
  }
4933
4933
  unmount() {
4934
4934
  }
4935
4935
  }
4936
- const Ye = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Du = (t) => {
4937
- const e = Ye.get(t.target);
4936
+ const Xe = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Mu = (t) => {
4937
+ const e = Xe.get(t.target);
4938
4938
  e && e(t);
4939
- }, Cu = (t) => {
4940
- t.forEach(Du);
4939
+ }, Eu = (t) => {
4940
+ t.forEach(Mu);
4941
4941
  };
4942
- function Mu({ root: t, ...e }) {
4942
+ function Ru({ root: t, ...e }) {
4943
4943
  const n = t || document;
4944
- Se.has(n) || Se.set(n, {});
4945
- const i = Se.get(n), s = JSON.stringify(e);
4946
- return i[s] || (i[s] = new IntersectionObserver(Cu, { root: t, ...e })), i[s];
4947
- }
4948
- function Eu(t, e, n) {
4949
- const i = Mu(e);
4950
- return Ye.set(t, n), i.observe(t), () => {
4951
- Ye.delete(t), i.unobserve(t);
4944
+ Pe.has(n) || Pe.set(n, {});
4945
+ const i = Pe.get(n), s = JSON.stringify(e);
4946
+ return i[s] || (i[s] = new IntersectionObserver(Eu, { root: t, ...e })), i[s];
4947
+ }
4948
+ function Lu(t, e, n) {
4949
+ const i = Ru(e);
4950
+ return Xe.set(t, n), i.observe(t), () => {
4951
+ Xe.delete(t), i.unobserve(t);
4952
4952
  };
4953
4953
  }
4954
- const Ru = {
4954
+ const ku = {
4955
4955
  some: 0,
4956
4956
  all: 1
4957
4957
  };
4958
- class Lu extends st {
4958
+ class Fu extends st {
4959
4959
  constructor() {
4960
4960
  super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
4961
4961
  }
@@ -4964,7 +4964,7 @@ class Lu extends st {
4964
4964
  const { viewport: e = {} } = this.node.getProps(), { root: n, margin: i, amount: s = "some", once: o } = e, r = {
4965
4965
  root: n ? n.current : void 0,
4966
4966
  rootMargin: i,
4967
- threshold: typeof s == "number" ? s : Ru[s]
4967
+ threshold: typeof s == "number" ? s : ku[s]
4968
4968
  }, a = (l) => {
4969
4969
  const { isIntersecting: c } = l;
4970
4970
  if (this.isInView === c || (this.isInView = c, o && !c && this.hasEnteredView))
@@ -4973,7 +4973,7 @@ class Lu extends st {
4973
4973
  const { onViewportEnter: u, onViewportLeave: h } = this.node.getProps(), f = c ? u : h;
4974
4974
  f && f(l);
4975
4975
  };
4976
- return Eu(this.node.current, r, a);
4976
+ return Lu(this.node.current, r, a);
4977
4977
  }
4978
4978
  mount() {
4979
4979
  this.startObserver();
@@ -4982,52 +4982,52 @@ class Lu extends st {
4982
4982
  if (typeof IntersectionObserver > "u")
4983
4983
  return;
4984
4984
  const { props: e, prevProps: n } = this.node;
4985
- ["amount", "margin", "root"].some(ku(e, n)) && this.startObserver();
4985
+ ["amount", "margin", "root"].some(Bu(e, n)) && this.startObserver();
4986
4986
  }
4987
4987
  unmount() {
4988
4988
  }
4989
4989
  }
4990
- function ku({ viewport: t = {} }, { viewport: e = {} } = {}) {
4990
+ function Bu({ viewport: t = {} }, { viewport: e = {} } = {}) {
4991
4991
  return (n) => t[n] !== e[n];
4992
4992
  }
4993
- const Fu = {
4993
+ const Iu = {
4994
4994
  inView: {
4995
- Feature: Lu
4995
+ Feature: Fu
4996
4996
  },
4997
4997
  tap: {
4998
- Feature: Vu
4998
+ Feature: Cu
4999
4999
  },
5000
5000
  focus: {
5001
- Feature: Au
5001
+ Feature: Du
5002
5002
  },
5003
5003
  hover: {
5004
- Feature: Pu
5004
+ Feature: Vu
5005
5005
  }
5006
- }, Bu = {
5006
+ }, Ou = {
5007
5007
  layout: {
5008
- ProjectionNode: Pr,
5009
- MeasureLayout: Or
5010
- }
5011
- }, Iu = {
5012
- ...ou,
5013
- ...Fu,
5014
- ...Su,
5015
- ...Bu
5016
- }, jr = /* @__PURE__ */ eu(Iu, nu);
5017
- function Nr(t) {
5008
+ ProjectionNode: Vr,
5009
+ MeasureLayout: Nr
5010
+ }
5011
+ }, ju = {
5012
+ ...lu,
5013
+ ...Iu,
5014
+ ...Au,
5015
+ ...Ou
5016
+ }, $r = /* @__PURE__ */ iu(ju, su);
5017
+ function Ur(t) {
5018
5018
  var e, n, i = "";
5019
5019
  if (typeof t == "string" || typeof t == "number") i += t;
5020
5020
  else if (typeof t == "object") if (Array.isArray(t)) {
5021
5021
  var s = t.length;
5022
- for (e = 0; e < s; e++) t[e] && (n = Nr(t[e])) && (i && (i += " "), i += n);
5022
+ for (e = 0; e < s; e++) t[e] && (n = Ur(t[e])) && (i && (i += " "), i += n);
5023
5023
  } else for (n in t) t[n] && (i && (i += " "), i += n);
5024
5024
  return i;
5025
5025
  }
5026
- function Ou() {
5027
- for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Nr(t)) && (i && (i += " "), i += e);
5026
+ function Nu() {
5027
+ for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Ur(t)) && (i && (i += " "), i += e);
5028
5028
  return i;
5029
5029
  }
5030
- const ee = ({
5030
+ const ne = ({
5031
5031
  ref: t,
5032
5032
  as: e = "div",
5033
5033
  children: n,
@@ -5065,7 +5065,7 @@ const ee = ({
5065
5065
  e,
5066
5066
  {
5067
5067
  ref: t,
5068
- className: Ou("pittorica-box", x),
5068
+ className: Nu("pittorica-box", x),
5069
5069
  style: I,
5070
5070
  href: v,
5071
5071
  target: S,
@@ -5078,34 +5078,34 @@ const ee = ({
5078
5078
  }
5079
5079
  );
5080
5080
  };
5081
- ee.displayName = "Box";
5082
- function $r(t) {
5081
+ ne.displayName = "Box";
5082
+ function Wr(t) {
5083
5083
  var e, n, i = "";
5084
5084
  if (typeof t == "string" || typeof t == "number") i += t;
5085
5085
  else if (typeof t == "object") if (Array.isArray(t)) {
5086
5086
  var s = t.length;
5087
- for (e = 0; e < s; e++) t[e] && (n = $r(t[e])) && (i && (i += " "), i += n);
5087
+ for (e = 0; e < s; e++) t[e] && (n = Wr(t[e])) && (i && (i += " "), i += n);
5088
5088
  } else for (n in t) t[n] && (i && (i += " "), i += n);
5089
5089
  return i;
5090
5090
  }
5091
- function ju() {
5092
- for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = $r(t)) && (i && (i += " "), i += e);
5091
+ function $u() {
5092
+ for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Wr(t)) && (i && (i += " "), i += e);
5093
5093
  return i;
5094
5094
  }
5095
- function Ur(t) {
5095
+ function Kr(t) {
5096
5096
  var e, n, i = "";
5097
5097
  if (typeof t == "string" || typeof t == "number") i += t;
5098
5098
  else if (typeof t == "object") if (Array.isArray(t)) {
5099
5099
  var s = t.length;
5100
- for (e = 0; e < s; e++) t[e] && (n = Ur(t[e])) && (i && (i += " "), i += n);
5100
+ for (e = 0; e < s; e++) t[e] && (n = Kr(t[e])) && (i && (i += " "), i += n);
5101
5101
  } else for (n in t) t[n] && (i && (i += " "), i += n);
5102
5102
  return i;
5103
5103
  }
5104
- function Nu() {
5105
- for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Ur(t)) && (i && (i += " "), i += e);
5104
+ function Uu() {
5105
+ for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Kr(t)) && (i && (i += " "), i += e);
5106
5106
  return i;
5107
5107
  }
5108
- const Wr = ({
5108
+ const Gr = ({
5109
5109
  ref: t,
5110
5110
  as: e = "div",
5111
5111
  children: n,
@@ -5143,7 +5143,7 @@ const Wr = ({
5143
5143
  e,
5144
5144
  {
5145
5145
  ref: t,
5146
- className: Nu("pittorica-box", x),
5146
+ className: Uu("pittorica-box", x),
5147
5147
  style: I,
5148
5148
  href: v,
5149
5149
  target: S,
@@ -5156,77 +5156,69 @@ const Wr = ({
5156
5156
  }
5157
5157
  );
5158
5158
  };
5159
- Wr.displayName = "Box";
5160
- const $u = {
5161
- start: "flex-start",
5162
- center: "center",
5163
- end: "flex-end",
5164
- between: "space-between",
5165
- around: "space-around",
5166
- evenly: "space-evenly"
5167
- }, Uu = {
5168
- start: "flex-start",
5169
- center: "center",
5170
- end: "flex-end",
5171
- baseline: "baseline",
5172
- stretch: "stretch"
5173
- }, Wu = ({
5159
+ Gr.displayName = "Box";
5160
+ const qe = (t) => typeof t == "string" && t.startsWith("auto-");
5161
+ function Vt(t, e) {
5162
+ return !e || qe(e) ? [] : typeof e == "string" ? [`pittorica-flex--${t}-${e}`] : Object.entries(e).filter(([, n]) => n !== void 0 && !qe(n)).map(
5163
+ ([n, i]) => n === "initial" ? `pittorica-flex--${t}-${i}` : `pittorica-flex--${n}-${t}-${i}`
5164
+ );
5165
+ }
5166
+ const Wu = ({
5174
5167
  children: t,
5175
- direction: e = "row",
5168
+ direction: e,
5176
5169
  align: n,
5177
5170
  justify: i,
5178
- wrap: s = "nowrap",
5171
+ wrap: s,
5179
5172
  gap: o,
5180
- style: r,
5173
+ basis: r,
5181
5174
  className: a,
5182
- ...l
5175
+ style: l,
5176
+ ...c
5183
5177
  }) => {
5184
- const c = {
5185
- ...r,
5186
- display: l.display || "flex",
5187
- flexDirection: e,
5188
- alignItems: n ? Uu[n] : void 0,
5189
- justifyContent: i ? $u[i] : void 0,
5190
- flexWrap: s,
5191
- gap: o ? `var(--pittorica-space-${o})` : void 0
5192
- };
5193
- return /* @__PURE__ */ R(
5194
- Wr,
5178
+ const u = [
5179
+ ...Vt("direction", e),
5180
+ ...Vt("align", n),
5181
+ ...Vt("justify", i),
5182
+ ...Vt("wrap", s),
5183
+ ...Vt("gap", o)
5184
+ ], h = { ...l };
5185
+ return qe(r) && (h["--pittorica-flex-basis"] = r.split("-")[1]), /* @__PURE__ */ R(
5186
+ Gr,
5195
5187
  {
5196
- className: ju("pittorica-flex", a),
5197
- style: c,
5198
- ...l,
5188
+ className: $u("pittorica-flex", u, a),
5189
+ style: { ...l, ...h },
5190
+ ...c,
5199
5191
  children: t
5200
5192
  }
5201
5193
  );
5202
5194
  };
5203
- function Kr(t) {
5195
+ function _r(t) {
5204
5196
  var e, n, i = "";
5205
5197
  if (typeof t == "string" || typeof t == "number") i += t;
5206
5198
  else if (typeof t == "object") if (Array.isArray(t)) {
5207
5199
  var s = t.length;
5208
- for (e = 0; e < s; e++) t[e] && (n = Kr(t[e])) && (i && (i += " "), i += n);
5200
+ for (e = 0; e < s; e++) t[e] && (n = _r(t[e])) && (i && (i += " "), i += n);
5209
5201
  } else for (n in t) t[n] && (i && (i += " "), i += n);
5210
5202
  return i;
5211
5203
  }
5212
5204
  function Ku() {
5213
- for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Kr(t)) && (i && (i += " "), i += e);
5205
+ for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = _r(t)) && (i && (i += " "), i += e);
5214
5206
  return i;
5215
5207
  }
5216
- function Gr(t) {
5208
+ function zr(t) {
5217
5209
  var e, n, i = "";
5218
5210
  if (typeof t == "string" || typeof t == "number") i += t;
5219
5211
  else if (typeof t == "object") if (Array.isArray(t)) {
5220
5212
  var s = t.length;
5221
- for (e = 0; e < s; e++) t[e] && (n = Gr(t[e])) && (i && (i += " "), i += n);
5213
+ for (e = 0; e < s; e++) t[e] && (n = zr(t[e])) && (i && (i += " "), i += n);
5222
5214
  } else for (n in t) t[n] && (i && (i += " "), i += n);
5223
5215
  return i;
5224
5216
  }
5225
5217
  function Gu() {
5226
- for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Gr(t)) && (i && (i += " "), i += e);
5218
+ for (var t, e, n = 0, i = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = zr(t)) && (i && (i += " "), i += e);
5227
5219
  return i;
5228
5220
  }
5229
- const _r = ({
5221
+ const Hr = ({
5230
5222
  ref: t,
5231
5223
  as: e = "div",
5232
5224
  children: n,
@@ -5277,7 +5269,7 @@ const _r = ({
5277
5269
  }
5278
5270
  );
5279
5271
  };
5280
- _r.displayName = "Box";
5272
+ Hr.displayName = "Box";
5281
5273
  const _u = ({
5282
5274
  children: t,
5283
5275
  as: e = "span",
@@ -5314,7 +5306,7 @@ const _u = ({
5314
5306
  color: m
5315
5307
  };
5316
5308
  return /* @__PURE__ */ R(
5317
- _r,
5309
+ Hr,
5318
5310
  {
5319
5311
  as: e,
5320
5312
  className: Ku(
@@ -5336,7 +5328,7 @@ const _u = ({
5336
5328
  total: t,
5337
5329
  active: e
5338
5330
  }) => /* @__PURE__ */ R(Wu, { gap: "2", justify: "center", className: "pittorica-carousel-pagination", children: Array.from({ length: t }).map((n, i) => /* @__PURE__ */ R(
5339
- jr.div,
5331
+ $r.div,
5340
5332
  {
5341
5333
  layout: !0,
5342
5334
  style: {
@@ -5357,14 +5349,14 @@ const _u = ({
5357
5349
  defaultIndex: n = 0,
5358
5350
  ...i
5359
5351
  }) => {
5360
- const [s, o] = Pe(n), r = Z(
5352
+ const [s, o] = Ae(n), r = Z(
5361
5353
  () => Array.isArray(t) ? t : [t],
5362
5354
  [t]
5363
5355
  ), a = Z(() => [
5364
5356
  ...r.slice(s),
5365
5357
  ...r.slice(0, s)
5366
5358
  ], [r, s]);
5367
- return /* @__PURE__ */ Ji(ee, { ...i, className: Je("pittorica-carousel-root", e), children: [
5359
+ return /* @__PURE__ */ ts(ne, { ...i, className: tn("pittorica-carousel-root", e), children: [
5368
5360
  /* @__PURE__ */ R(
5369
5361
  "div",
5370
5362
  {
@@ -5375,10 +5367,10 @@ const _u = ({
5375
5367
  width: "100%",
5376
5368
  overflow: "hidden"
5377
5369
  },
5378
- children: /* @__PURE__ */ R(Ec, { mode: "popLayout", initial: !0, children: a.map((l, c) => {
5370
+ children: /* @__PURE__ */ R(Lc, { mode: "popLayout", initial: !0, children: a.map((l, c) => {
5379
5371
  const u = (s + c) % r.length, h = zu(c);
5380
5372
  return c > 2 ? null : /* @__PURE__ */ R(
5381
- jr.div,
5373
+ $r.div,
5382
5374
  {
5383
5375
  layout: !0,
5384
5376
  initial: { opacity: 0, x: 500 },
@@ -5402,17 +5394,17 @@ const _u = ({
5402
5394
  }) })
5403
5395
  }
5404
5396
  ),
5405
- /* @__PURE__ */ R(ee, { mt: "4", children: /* @__PURE__ */ R(Hu, { total: r.length, active: s }) })
5397
+ /* @__PURE__ */ R(ne, { mt: "4", children: /* @__PURE__ */ R(Hu, { total: r.length, active: s }) })
5406
5398
  ] });
5407
5399
  }, Xu = ({ children: t, className: e, ...n }) => /* @__PURE__ */ R(
5408
- ee,
5400
+ ne,
5409
5401
  {
5410
5402
  ...n,
5411
- className: Je("pittorica-carousel-item-inner", e),
5403
+ className: tn("pittorica-carousel-item-inner", e),
5412
5404
  style: { height: "100%", display: "flex" },
5413
5405
  children: t
5414
5406
  }
5415
- ), qu = ({ children: t, className: e }) => /* @__PURE__ */ R("div", { className: Je("pittorica-carousel-description", e), children: /* @__PURE__ */ R(_u, { weight: "medium", children: t }) }), eh = {
5407
+ ), qu = ({ children: t, className: e }) => /* @__PURE__ */ R("div", { className: tn("pittorica-carousel-description", e), children: /* @__PURE__ */ R(_u, { weight: "medium", children: t }) }), eh = {
5416
5408
  Root: Yu,
5417
5409
  Item: Xu,
5418
5410
  Description: qu