lizaui 3.0.35 → 3.0.37
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.
- package/dist/button/index.cjs.js +1 -1
- package/dist/button/index.es.js +1 -1
- package/dist/calendar/index.cjs.js +1 -1
- package/dist/calendar/index.es.js +1 -1
- package/dist/checkbox/index.cjs.js +1 -1
- package/dist/checkbox/index.es.js +1 -1
- package/dist/chunks/assertion-C7nbUE-q.js +2 -0
- package/dist/chunks/assertion-C7nbUE-q.js.map +1 -0
- package/dist/chunks/assertion-CrT8p68K.js +11 -0
- package/dist/chunks/assertion-CrT8p68K.js.map +1 -0
- package/dist/chunks/button-ByG7rkKr.js +528 -0
- package/dist/chunks/button-ByG7rkKr.js.map +1 -0
- package/dist/chunks/button-W_O8D9E6.js +2 -0
- package/dist/chunks/button-W_O8D9E6.js.map +1 -0
- package/dist/chunks/checkbox-D7Bt7i2P.js +2 -0
- package/dist/chunks/{checkbox-C23sBMh5.js.map → checkbox-D7Bt7i2P.js.map} +1 -1
- package/dist/chunks/{checkbox-ChChDxFl.js → checkbox-lvTY3PXC.js} +3 -2
- package/dist/chunks/{checkbox-ChChDxFl.js.map → checkbox-lvTY3PXC.js.map} +1 -1
- package/dist/chunks/index-BnlGNtJe.js +65 -0
- package/dist/chunks/index-BnlGNtJe.js.map +1 -0
- package/dist/chunks/{index-BpSN4GSo.js → index-DSpBzH_i.js} +796 -793
- package/dist/chunks/index-DSpBzH_i.js.map +1 -0
- package/dist/chunks/refs-DAOksVs3.js +29 -0
- package/dist/chunks/refs-DAOksVs3.js.map +1 -0
- package/dist/chunks/refs-pI64b4UC.js +2 -0
- package/dist/chunks/refs-pI64b4UC.js.map +1 -0
- package/dist/chunks/ripple-BQsLJHrx.js +3594 -0
- package/dist/chunks/ripple-BQsLJHrx.js.map +1 -0
- package/dist/chunks/ripple-CUdIIH3t.js +10 -0
- package/dist/chunks/ripple-CUdIIH3t.js.map +1 -0
- package/dist/components/ripple/index.d.ts +3 -0
- package/dist/components/ripple/index.d.ts.map +1 -0
- package/dist/components/ui/modal.d.ts +1 -0
- package/dist/components/ui/modal.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +9 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +2 -2
- package/dist/ripple/index.cjs.js +2 -0
- package/dist/ripple/index.cjs.js.map +1 -0
- package/dist/ripple/index.es.js +5 -0
- package/dist/ripple/index.es.js.map +1 -0
- package/dist/ripple.d.ts +2 -0
- package/dist/select-input/index.cjs.js +1 -1
- package/dist/select-input/index.cjs.js.map +1 -1
- package/dist/select-input/index.es.js +2 -2
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.es.js +1 -1
- package/dist/ui/index.cjs.js +2 -2
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +785 -755
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +6 -1
- package/dist/chunks/button-C6LoJycL.js +0 -4112
- package/dist/chunks/button-C6LoJycL.js.map +0 -1
- package/dist/chunks/button-CPPU0FsH.js +0 -10
- package/dist/chunks/button-CPPU0FsH.js.map +0 -1
- package/dist/chunks/checkbox-C23sBMh5.js +0 -2
- package/dist/chunks/index-BTn-tZ5q.js +0 -65
- package/dist/chunks/index-BTn-tZ5q.js.map +0 -1
- package/dist/chunks/index-BpSN4GSo.js.map +0 -1
- package/dist/chunks/refs-DLih6QCP.js +0 -2
- package/dist/chunks/refs-DLih6QCP.js.map +0 -1
- package/dist/chunks/refs-DcCOPvdv.js +0 -35
- package/dist/chunks/refs-DcCOPvdv.js.map +0 -1
|
@@ -0,0 +1,3594 @@
|
|
|
1
|
+
import "./assertion-CrT8p68K.js";
|
|
2
|
+
import * as he from "react";
|
|
3
|
+
import { useState as Vt, useCallback as St, createContext as et, useRef as B, useLayoutEffect as qs, useEffect as Rt, useId as pe, useContext as E, useInsertionEffect as In, useMemo as Y, Children as Zs, isValidElement as Js, forwardRef as Qs, Fragment as kn, createElement as ti } from "react";
|
|
4
|
+
import { j as O } from "./jsx-runtime-BYq8_R6m.js";
|
|
5
|
+
function ei(t, e, n) {
|
|
6
|
+
return Math.min(Math.max(t, e), n);
|
|
7
|
+
}
|
|
8
|
+
function ni(t) {
|
|
9
|
+
return `${t}-${Math.floor(Math.random() * 1e6)}`;
|
|
10
|
+
}
|
|
11
|
+
function tc(t = {}) {
|
|
12
|
+
const [e, n] = Vt([]), s = St((r) => {
|
|
13
|
+
const o = r.target, a = Math.max(o.clientWidth, o.clientHeight);
|
|
14
|
+
n((u) => [
|
|
15
|
+
...u,
|
|
16
|
+
{
|
|
17
|
+
key: ni(u.length.toString()),
|
|
18
|
+
size: a,
|
|
19
|
+
x: r.x - a / 2,
|
|
20
|
+
y: r.y - a / 2
|
|
21
|
+
}
|
|
22
|
+
]);
|
|
23
|
+
}, []), i = St((r) => {
|
|
24
|
+
n((o) => o.filter((a) => a.key !== r));
|
|
25
|
+
}, []);
|
|
26
|
+
return { ripples: e, onClear: i, onPress: s, ...t };
|
|
27
|
+
}
|
|
28
|
+
const Nn = et({});
|
|
29
|
+
function me(t) {
|
|
30
|
+
const e = B(null);
|
|
31
|
+
return e.current === null && (e.current = t()), e.current;
|
|
32
|
+
}
|
|
33
|
+
const ge = typeof window < "u", Ln = ge ? qs : Rt, Et = /* @__PURE__ */ et(null);
|
|
34
|
+
function si(t, e) {
|
|
35
|
+
t.indexOf(e) === -1 && t.push(e);
|
|
36
|
+
}
|
|
37
|
+
function ii(t, e) {
|
|
38
|
+
const n = t.indexOf(e);
|
|
39
|
+
n > -1 && t.splice(n, 1);
|
|
40
|
+
}
|
|
41
|
+
const X = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
42
|
+
let nt = () => {
|
|
43
|
+
}, W = () => {
|
|
44
|
+
};
|
|
45
|
+
process.env.NODE_ENV !== "production" && (nt = (t, e) => {
|
|
46
|
+
}, W = (t, e) => {
|
|
47
|
+
if (!t)
|
|
48
|
+
throw new Error(e);
|
|
49
|
+
});
|
|
50
|
+
const j = {}, Bn = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
51
|
+
function ri(t) {
|
|
52
|
+
return typeof t == "object" && t !== null;
|
|
53
|
+
}
|
|
54
|
+
const Kn = (t) => /^0[^.\s]+$/u.test(t);
|
|
55
|
+
// @__NO_SIDE_EFFECTS__
|
|
56
|
+
function ye(t) {
|
|
57
|
+
let e;
|
|
58
|
+
return () => (e === void 0 && (e = t()), e);
|
|
59
|
+
}
|
|
60
|
+
const st = /* @__NO_SIDE_EFFECTS__ */ (t) => t, oi = (t, e) => (n) => e(t(n)), Ot = (...t) => t.reduce(oi), jn = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
61
|
+
const s = e - t;
|
|
62
|
+
return s === 0 ? 1 : (n - t) / s;
|
|
63
|
+
};
|
|
64
|
+
class $n {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.subscriptions = [];
|
|
67
|
+
}
|
|
68
|
+
add(e) {
|
|
69
|
+
return si(this.subscriptions, e), () => ii(this.subscriptions, e);
|
|
70
|
+
}
|
|
71
|
+
notify(e, n, s) {
|
|
72
|
+
const i = this.subscriptions.length;
|
|
73
|
+
if (i)
|
|
74
|
+
if (i === 1)
|
|
75
|
+
this.subscriptions[0](e, n, s);
|
|
76
|
+
else
|
|
77
|
+
for (let r = 0; r < i; r++) {
|
|
78
|
+
const o = this.subscriptions[r];
|
|
79
|
+
o && o(e, n, s);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
getSize() {
|
|
83
|
+
return this.subscriptions.length;
|
|
84
|
+
}
|
|
85
|
+
clear() {
|
|
86
|
+
this.subscriptions.length = 0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const N = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, K = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
|
|
90
|
+
function Wn(t, e) {
|
|
91
|
+
return e ? t * (1e3 / e) : 0;
|
|
92
|
+
}
|
|
93
|
+
const Ge = /* @__PURE__ */ new Set();
|
|
94
|
+
function be(t, e, n) {
|
|
95
|
+
t || Ge.has(e) || Ge.add(e);
|
|
96
|
+
}
|
|
97
|
+
const _n = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, ai = 1e-7, ci = 12;
|
|
98
|
+
function ui(t, e, n, s, i) {
|
|
99
|
+
let r, o, a = 0;
|
|
100
|
+
do
|
|
101
|
+
o = e + (n - e) / 2, r = _n(o, s, i) - t, r > 0 ? n = o : e = o;
|
|
102
|
+
while (Math.abs(r) > ai && ++a < ci);
|
|
103
|
+
return o;
|
|
104
|
+
}
|
|
105
|
+
function mt(t, e, n, s) {
|
|
106
|
+
if (t === e && n === s)
|
|
107
|
+
return st;
|
|
108
|
+
const i = (r) => ui(r, 0, 1, t, n);
|
|
109
|
+
return (r) => r === 0 || r === 1 ? r : _n(i(r), e, s);
|
|
110
|
+
}
|
|
111
|
+
const zn = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Un = (t) => (e) => 1 - t(1 - e), Gn = /* @__PURE__ */ mt(0.33, 1.53, 0.69, 0.99), Te = /* @__PURE__ */ Un(Gn), Hn = /* @__PURE__ */ zn(Te), Yn = (t) => (t *= 2) < 1 ? 0.5 * Te(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ve = (t) => 1 - Math.sin(Math.acos(t)), li = Un(ve), Xn = zn(ve), fi = /* @__PURE__ */ mt(0.42, 0, 1, 1), di = /* @__PURE__ */ mt(0, 0, 0.58, 1), qn = /* @__PURE__ */ mt(0.42, 0, 0.58, 1), hi = (t) => Array.isArray(t) && typeof t[0] != "number", Zn = (t) => Array.isArray(t) && typeof t[0] == "number", He = {
|
|
112
|
+
linear: st,
|
|
113
|
+
easeIn: fi,
|
|
114
|
+
easeInOut: qn,
|
|
115
|
+
easeOut: di,
|
|
116
|
+
circIn: ve,
|
|
117
|
+
circInOut: Xn,
|
|
118
|
+
circOut: li,
|
|
119
|
+
backIn: Te,
|
|
120
|
+
backInOut: Hn,
|
|
121
|
+
backOut: Gn,
|
|
122
|
+
anticipate: Yn
|
|
123
|
+
}, pi = (t) => typeof t == "string", Ye = (t) => {
|
|
124
|
+
if (Zn(t)) {
|
|
125
|
+
W(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
126
|
+
const [e, n, s, i] = t;
|
|
127
|
+
return mt(e, n, s, i);
|
|
128
|
+
} else if (pi(t))
|
|
129
|
+
return W(He[t] !== void 0, `Invalid easing type '${t}'`), He[t];
|
|
130
|
+
return t;
|
|
131
|
+
}, bt = [
|
|
132
|
+
"setup",
|
|
133
|
+
// Compute
|
|
134
|
+
"read",
|
|
135
|
+
// Read
|
|
136
|
+
"resolveKeyframes",
|
|
137
|
+
// Write/Read/Write/Read
|
|
138
|
+
"preUpdate",
|
|
139
|
+
// Compute
|
|
140
|
+
"update",
|
|
141
|
+
// Compute
|
|
142
|
+
"preRender",
|
|
143
|
+
// Compute
|
|
144
|
+
"render",
|
|
145
|
+
// Write
|
|
146
|
+
"postRender"
|
|
147
|
+
// Compute
|
|
148
|
+
];
|
|
149
|
+
function mi(t, e) {
|
|
150
|
+
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
|
|
151
|
+
const o = /* @__PURE__ */ new WeakSet();
|
|
152
|
+
let a = {
|
|
153
|
+
delta: 0,
|
|
154
|
+
timestamp: 0,
|
|
155
|
+
isProcessing: !1
|
|
156
|
+
};
|
|
157
|
+
function u(c) {
|
|
158
|
+
o.has(c) && (l.schedule(c), t()), c(a);
|
|
159
|
+
}
|
|
160
|
+
const l = {
|
|
161
|
+
/**
|
|
162
|
+
* Schedule a process to run on the next frame.
|
|
163
|
+
*/
|
|
164
|
+
schedule: (c, f = !1, d = !1) => {
|
|
165
|
+
const g = d && i ? n : s;
|
|
166
|
+
return f && o.add(c), g.has(c) || g.add(c), c;
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
* Cancel the provided callback from running on the next frame.
|
|
170
|
+
*/
|
|
171
|
+
cancel: (c) => {
|
|
172
|
+
s.delete(c), o.delete(c);
|
|
173
|
+
},
|
|
174
|
+
/**
|
|
175
|
+
* Execute all schedule callbacks.
|
|
176
|
+
*/
|
|
177
|
+
process: (c) => {
|
|
178
|
+
if (a = c, i) {
|
|
179
|
+
r = !0;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
i = !0, [n, s] = [s, n], n.forEach(u), n.clear(), i = !1, r && (r = !1, l.process(c));
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
return l;
|
|
186
|
+
}
|
|
187
|
+
const gi = 40;
|
|
188
|
+
function Jn(t, e) {
|
|
189
|
+
let n = !1, s = !0;
|
|
190
|
+
const i = {
|
|
191
|
+
delta: 0,
|
|
192
|
+
timestamp: 0,
|
|
193
|
+
isProcessing: !1
|
|
194
|
+
}, r = () => n = !0, o = bt.reduce((y, S) => (y[S] = mi(r), y), {}), { setup: a, read: u, resolveKeyframes: l, preUpdate: c, update: f, preRender: d, render: h, postRender: g } = o, T = () => {
|
|
195
|
+
const y = j.useManualTiming ? i.timestamp : performance.now();
|
|
196
|
+
n = !1, j.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp, gi), 1)), i.timestamp = y, i.isProcessing = !0, a.process(i), u.process(i), l.process(i), c.process(i), f.process(i), d.process(i), h.process(i), g.process(i), i.isProcessing = !1, n && e && (s = !1, t(T));
|
|
197
|
+
}, w = () => {
|
|
198
|
+
n = !0, s = !0, i.isProcessing || t(T);
|
|
199
|
+
};
|
|
200
|
+
return { schedule: bt.reduce((y, S) => {
|
|
201
|
+
const m = o[S];
|
|
202
|
+
return y[S] = (v, A = !1, x = !1) => (n || w(), m.schedule(v, A, x)), y;
|
|
203
|
+
}, {}), cancel: (y) => {
|
|
204
|
+
for (let S = 0; S < bt.length; S++)
|
|
205
|
+
o[bt[S]].cancel(y);
|
|
206
|
+
}, state: i, steps: o };
|
|
207
|
+
}
|
|
208
|
+
const { schedule: k, cancel: Ht, state: At, steps: ec } = /* @__PURE__ */ Jn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : st, !0);
|
|
209
|
+
let wt;
|
|
210
|
+
function yi() {
|
|
211
|
+
wt = void 0;
|
|
212
|
+
}
|
|
213
|
+
const I = {
|
|
214
|
+
now: () => (wt === void 0 && I.set(At.isProcessing || j.useManualTiming ? At.timestamp : performance.now()), wt),
|
|
215
|
+
set: (t) => {
|
|
216
|
+
wt = t, queueMicrotask(yi);
|
|
217
|
+
}
|
|
218
|
+
}, Qn = (t) => (e) => typeof e == "string" && e.startsWith(t), we = /* @__PURE__ */ Qn("--"), bi = /* @__PURE__ */ Qn("var(--"), xe = (t) => bi(t) ? Ti.test(t.split("/*")[0].trim()) : !1, Ti = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, it = {
|
|
219
|
+
test: (t) => typeof t == "number",
|
|
220
|
+
parse: parseFloat,
|
|
221
|
+
transform: (t) => t
|
|
222
|
+
}, ft = {
|
|
223
|
+
...it,
|
|
224
|
+
transform: (t) => X(0, 1, t)
|
|
225
|
+
}, Tt = {
|
|
226
|
+
...it,
|
|
227
|
+
default: 1
|
|
228
|
+
}, lt = (t) => Math.round(t * 1e5) / 1e5, Ve = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
229
|
+
function vi(t) {
|
|
230
|
+
return t == null;
|
|
231
|
+
}
|
|
232
|
+
const wi = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Se = (t, e) => (n) => !!(typeof n == "string" && wi.test(n) && n.startsWith(t) || e && !vi(n) && Object.prototype.hasOwnProperty.call(n, e)), ts = (t, e, n) => (s) => {
|
|
233
|
+
if (typeof s != "string")
|
|
234
|
+
return s;
|
|
235
|
+
const [i, r, o, a] = s.match(Ve);
|
|
236
|
+
return {
|
|
237
|
+
[t]: parseFloat(i),
|
|
238
|
+
[e]: parseFloat(r),
|
|
239
|
+
[n]: parseFloat(o),
|
|
240
|
+
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
241
|
+
};
|
|
242
|
+
}, xi = (t) => X(0, 255, t), Kt = {
|
|
243
|
+
...it,
|
|
244
|
+
transform: (t) => Math.round(xi(t))
|
|
245
|
+
}, z = {
|
|
246
|
+
test: /* @__PURE__ */ Se("rgb", "red"),
|
|
247
|
+
parse: /* @__PURE__ */ ts("red", "green", "blue"),
|
|
248
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Kt.transform(t) + ", " + Kt.transform(e) + ", " + Kt.transform(n) + ", " + lt(ft.transform(s)) + ")"
|
|
249
|
+
};
|
|
250
|
+
function Vi(t) {
|
|
251
|
+
let e = "", n = "", s = "", i = "";
|
|
252
|
+
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
|
|
253
|
+
red: parseInt(e, 16),
|
|
254
|
+
green: parseInt(n, 16),
|
|
255
|
+
blue: parseInt(s, 16),
|
|
256
|
+
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
const Yt = {
|
|
260
|
+
test: /* @__PURE__ */ Se("#"),
|
|
261
|
+
parse: Vi,
|
|
262
|
+
transform: z.transform
|
|
263
|
+
}, gt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
264
|
+
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
265
|
+
parse: parseFloat,
|
|
266
|
+
transform: (e) => `${e}${t}`
|
|
267
|
+
}), $ = /* @__PURE__ */ gt("deg"), Q = /* @__PURE__ */ gt("%"), b = /* @__PURE__ */ gt("px"), Si = /* @__PURE__ */ gt("vh"), Ai = /* @__PURE__ */ gt("vw"), Xe = {
|
|
268
|
+
...Q,
|
|
269
|
+
parse: (t) => Q.parse(t) / 100,
|
|
270
|
+
transform: (t) => Q.transform(t * 100)
|
|
271
|
+
}, Z = {
|
|
272
|
+
test: /* @__PURE__ */ Se("hsl", "hue"),
|
|
273
|
+
parse: /* @__PURE__ */ ts("hue", "saturation", "lightness"),
|
|
274
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + Q.transform(lt(e)) + ", " + Q.transform(lt(n)) + ", " + lt(ft.transform(s)) + ")"
|
|
275
|
+
}, C = {
|
|
276
|
+
test: (t) => z.test(t) || Yt.test(t) || Z.test(t),
|
|
277
|
+
parse: (t) => z.test(t) ? z.parse(t) : Z.test(t) ? Z.parse(t) : Yt.parse(t),
|
|
278
|
+
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? z.transform(t) : Z.transform(t),
|
|
279
|
+
getAnimatableNone: (t) => {
|
|
280
|
+
const e = C.parse(t);
|
|
281
|
+
return e.alpha = 0, C.transform(e);
|
|
282
|
+
}
|
|
283
|
+
}, Mi = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
284
|
+
function Ci(t) {
|
|
285
|
+
var e, n;
|
|
286
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(Ve)) == null ? void 0 : e.length) || 0) + (((n = t.match(Mi)) == null ? void 0 : n.length) || 0) > 0;
|
|
287
|
+
}
|
|
288
|
+
const es = "number", ns = "color", Pi = "var", Di = "var(", qe = "${}", Fi = /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;
|
|
289
|
+
function dt(t) {
|
|
290
|
+
const e = t.toString(), n = [], s = {
|
|
291
|
+
color: [],
|
|
292
|
+
number: [],
|
|
293
|
+
var: []
|
|
294
|
+
}, i = [];
|
|
295
|
+
let r = 0;
|
|
296
|
+
const a = e.replace(Fi, (u) => (C.test(u) ? (s.color.push(r), i.push(ns), n.push(C.parse(u))) : u.startsWith(Di) ? (s.var.push(r), i.push(Pi), n.push(u)) : (s.number.push(r), i.push(es), n.push(parseFloat(u))), ++r, qe)).split(qe);
|
|
297
|
+
return { values: n, split: a, indexes: s, types: i };
|
|
298
|
+
}
|
|
299
|
+
function ss(t) {
|
|
300
|
+
return dt(t).values;
|
|
301
|
+
}
|
|
302
|
+
function is(t) {
|
|
303
|
+
const { split: e, types: n } = dt(t), s = e.length;
|
|
304
|
+
return (i) => {
|
|
305
|
+
let r = "";
|
|
306
|
+
for (let o = 0; o < s; o++)
|
|
307
|
+
if (r += e[o], i[o] !== void 0) {
|
|
308
|
+
const a = n[o];
|
|
309
|
+
a === es ? r += lt(i[o]) : a === ns ? r += C.transform(i[o]) : r += i[o];
|
|
310
|
+
}
|
|
311
|
+
return r;
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
const Ri = (t) => typeof t == "number" ? 0 : C.test(t) ? C.getAnimatableNone(t) : t;
|
|
315
|
+
function Ei(t) {
|
|
316
|
+
const e = ss(t);
|
|
317
|
+
return is(t)(e.map(Ri));
|
|
318
|
+
}
|
|
319
|
+
const rt = {
|
|
320
|
+
test: Ci,
|
|
321
|
+
parse: ss,
|
|
322
|
+
createTransformer: is,
|
|
323
|
+
getAnimatableNone: Ei
|
|
324
|
+
};
|
|
325
|
+
function jt(t, e, n) {
|
|
326
|
+
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;
|
|
327
|
+
}
|
|
328
|
+
function Oi({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
329
|
+
t /= 360, e /= 100, n /= 100;
|
|
330
|
+
let i = 0, r = 0, o = 0;
|
|
331
|
+
if (!e)
|
|
332
|
+
i = r = o = n;
|
|
333
|
+
else {
|
|
334
|
+
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, u = 2 * n - a;
|
|
335
|
+
i = jt(u, a, t + 1 / 3), r = jt(u, a, t), o = jt(u, a, t - 1 / 3);
|
|
336
|
+
}
|
|
337
|
+
return {
|
|
338
|
+
red: Math.round(i * 255),
|
|
339
|
+
green: Math.round(r * 255),
|
|
340
|
+
blue: Math.round(o * 255),
|
|
341
|
+
alpha: s
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function Mt(t, e) {
|
|
345
|
+
return (n) => n > 0 ? e : t;
|
|
346
|
+
}
|
|
347
|
+
const yt = (t, e, n) => t + (e - t) * n, $t = (t, e, n) => {
|
|
348
|
+
const s = t * t, i = n * (e * e - s) + s;
|
|
349
|
+
return i < 0 ? 0 : Math.sqrt(i);
|
|
350
|
+
}, Ii = [Yt, z, Z], ki = (t) => Ii.find((e) => e.test(t));
|
|
351
|
+
function Ze(t) {
|
|
352
|
+
const e = ki(t);
|
|
353
|
+
if (nt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
354
|
+
return !1;
|
|
355
|
+
let n = e.parse(t);
|
|
356
|
+
return e === Z && (n = Oi(n)), n;
|
|
357
|
+
}
|
|
358
|
+
const Je = (t, e) => {
|
|
359
|
+
const n = Ze(t), s = Ze(e);
|
|
360
|
+
if (!n || !s)
|
|
361
|
+
return Mt(t, e);
|
|
362
|
+
const i = { ...n };
|
|
363
|
+
return (r) => (i.red = $t(n.red, s.red, r), i.green = $t(n.green, s.green, r), i.blue = $t(n.blue, s.blue, r), i.alpha = yt(n.alpha, s.alpha, r), z.transform(i));
|
|
364
|
+
}, Xt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
365
|
+
function Ni(t, e) {
|
|
366
|
+
return Xt.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
367
|
+
}
|
|
368
|
+
function Li(t, e) {
|
|
369
|
+
return (n) => yt(t, e, n);
|
|
370
|
+
}
|
|
371
|
+
function Ae(t) {
|
|
372
|
+
return typeof t == "number" ? Li : typeof t == "string" ? xe(t) ? Mt : C.test(t) ? Je : ji : Array.isArray(t) ? rs : typeof t == "object" ? C.test(t) ? Je : Bi : Mt;
|
|
373
|
+
}
|
|
374
|
+
function rs(t, e) {
|
|
375
|
+
const n = [...t], s = n.length, i = t.map((r, o) => Ae(r)(r, e[o]));
|
|
376
|
+
return (r) => {
|
|
377
|
+
for (let o = 0; o < s; o++)
|
|
378
|
+
n[o] = i[o](r);
|
|
379
|
+
return n;
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
function Bi(t, e) {
|
|
383
|
+
const n = { ...t, ...e }, s = {};
|
|
384
|
+
for (const i in n)
|
|
385
|
+
t[i] !== void 0 && e[i] !== void 0 && (s[i] = Ae(t[i])(t[i], e[i]));
|
|
386
|
+
return (i) => {
|
|
387
|
+
for (const r in s)
|
|
388
|
+
n[r] = s[r](i);
|
|
389
|
+
return n;
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
function Ki(t, e) {
|
|
393
|
+
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
394
|
+
for (let i = 0; i < e.values.length; i++) {
|
|
395
|
+
const r = e.types[i], o = t.indexes[r][s[r]], a = t.values[o] ?? 0;
|
|
396
|
+
n[i] = a, s[r]++;
|
|
397
|
+
}
|
|
398
|
+
return n;
|
|
399
|
+
}
|
|
400
|
+
const ji = (t, e) => {
|
|
401
|
+
const n = rt.createTransformer(e), s = dt(t), i = dt(e);
|
|
402
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Xt.has(t) && !i.values.length || Xt.has(e) && !s.values.length ? Ni(t, e) : Ot(rs(Ki(s, i), i.values), n) : (nt(!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.`), Mt(t, e));
|
|
403
|
+
};
|
|
404
|
+
function os(t, e, n) {
|
|
405
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? yt(t, e, n) : Ae(t)(t, e);
|
|
406
|
+
}
|
|
407
|
+
const $i = (t) => {
|
|
408
|
+
const e = ({ timestamp: n }) => t(n);
|
|
409
|
+
return {
|
|
410
|
+
start: (n = !0) => k.update(e, n),
|
|
411
|
+
stop: () => Ht(e),
|
|
412
|
+
/**
|
|
413
|
+
* If we're processing this frame we can use the
|
|
414
|
+
* framelocked timestamp to keep things in sync.
|
|
415
|
+
*/
|
|
416
|
+
now: () => At.isProcessing ? At.timestamp : I.now()
|
|
417
|
+
};
|
|
418
|
+
}, as = (t, e, n = 10) => {
|
|
419
|
+
let s = "";
|
|
420
|
+
const i = Math.max(Math.round(e / n), 2);
|
|
421
|
+
for (let r = 0; r < i; r++)
|
|
422
|
+
s += Math.round(t(r / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
423
|
+
return `linear(${s.substring(0, s.length - 2)})`;
|
|
424
|
+
}, Ct = 2e4;
|
|
425
|
+
function Me(t) {
|
|
426
|
+
let e = 0;
|
|
427
|
+
const n = 50;
|
|
428
|
+
let s = t.next(e);
|
|
429
|
+
for (; !s.done && e < Ct; )
|
|
430
|
+
e += n, s = t.next(e);
|
|
431
|
+
return e >= Ct ? 1 / 0 : e;
|
|
432
|
+
}
|
|
433
|
+
function Wi(t, e = 100, n) {
|
|
434
|
+
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Me(s), Ct);
|
|
435
|
+
return {
|
|
436
|
+
type: "keyframes",
|
|
437
|
+
ease: (r) => s.next(i * r).value / e,
|
|
438
|
+
duration: /* @__PURE__ */ K(i)
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
const _i = 5;
|
|
442
|
+
function cs(t, e, n) {
|
|
443
|
+
const s = Math.max(e - _i, 0);
|
|
444
|
+
return Wn(n - t(s), e - s);
|
|
445
|
+
}
|
|
446
|
+
const M = {
|
|
447
|
+
// Default spring physics
|
|
448
|
+
stiffness: 100,
|
|
449
|
+
damping: 10,
|
|
450
|
+
mass: 1,
|
|
451
|
+
velocity: 0,
|
|
452
|
+
// Default duration/bounce-based options
|
|
453
|
+
duration: 800,
|
|
454
|
+
// in ms
|
|
455
|
+
bounce: 0.3,
|
|
456
|
+
visualDuration: 0.3,
|
|
457
|
+
// in seconds
|
|
458
|
+
// Rest thresholds
|
|
459
|
+
restSpeed: {
|
|
460
|
+
granular: 0.01,
|
|
461
|
+
default: 2
|
|
462
|
+
},
|
|
463
|
+
restDelta: {
|
|
464
|
+
granular: 5e-3,
|
|
465
|
+
default: 0.5
|
|
466
|
+
},
|
|
467
|
+
// Limits
|
|
468
|
+
minDuration: 0.01,
|
|
469
|
+
// in seconds
|
|
470
|
+
maxDuration: 10,
|
|
471
|
+
// in seconds
|
|
472
|
+
minDamping: 0.05,
|
|
473
|
+
maxDamping: 1
|
|
474
|
+
}, Wt = 1e-3;
|
|
475
|
+
function zi({ duration: t = M.duration, bounce: e = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
|
|
476
|
+
let i, r;
|
|
477
|
+
nt(t <= /* @__PURE__ */ N(M.maxDuration), "Spring duration must be 10 seconds or less");
|
|
478
|
+
let o = 1 - e;
|
|
479
|
+
o = X(M.minDamping, M.maxDamping, o), t = X(M.minDuration, M.maxDuration, /* @__PURE__ */ K(t)), o < 1 ? (i = (l) => {
|
|
480
|
+
const c = l * o, f = c * t, d = c - n, h = qt(l, o), g = Math.exp(-f);
|
|
481
|
+
return Wt - d / h * g;
|
|
482
|
+
}, r = (l) => {
|
|
483
|
+
const f = l * o * t, d = f * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * t, g = Math.exp(-f), T = qt(Math.pow(l, 2), o);
|
|
484
|
+
return (-i(l) + Wt > 0 ? -1 : 1) * ((d - h) * g) / T;
|
|
485
|
+
}) : (i = (l) => {
|
|
486
|
+
const c = Math.exp(-l * t), f = (l - n) * t + 1;
|
|
487
|
+
return -Wt + c * f;
|
|
488
|
+
}, r = (l) => {
|
|
489
|
+
const c = Math.exp(-l * t), f = (n - l) * (t * t);
|
|
490
|
+
return c * f;
|
|
491
|
+
});
|
|
492
|
+
const a = 5 / t, u = Gi(i, r, a);
|
|
493
|
+
if (t = /* @__PURE__ */ N(t), isNaN(u))
|
|
494
|
+
return {
|
|
495
|
+
stiffness: M.stiffness,
|
|
496
|
+
damping: M.damping,
|
|
497
|
+
duration: t
|
|
498
|
+
};
|
|
499
|
+
{
|
|
500
|
+
const l = Math.pow(u, 2) * s;
|
|
501
|
+
return {
|
|
502
|
+
stiffness: l,
|
|
503
|
+
damping: o * 2 * Math.sqrt(s * l),
|
|
504
|
+
duration: t
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
const Ui = 12;
|
|
509
|
+
function Gi(t, e, n) {
|
|
510
|
+
let s = n;
|
|
511
|
+
for (let i = 1; i < Ui; i++)
|
|
512
|
+
s = s - t(s) / e(s);
|
|
513
|
+
return s;
|
|
514
|
+
}
|
|
515
|
+
function qt(t, e) {
|
|
516
|
+
return t * Math.sqrt(1 - e * e);
|
|
517
|
+
}
|
|
518
|
+
const Hi = ["duration", "bounce"], Yi = ["stiffness", "damping", "mass"];
|
|
519
|
+
function Qe(t, e) {
|
|
520
|
+
return e.some((n) => t[n] !== void 0);
|
|
521
|
+
}
|
|
522
|
+
function Xi(t) {
|
|
523
|
+
let e = {
|
|
524
|
+
velocity: M.velocity,
|
|
525
|
+
stiffness: M.stiffness,
|
|
526
|
+
damping: M.damping,
|
|
527
|
+
mass: M.mass,
|
|
528
|
+
isResolvedFromDuration: !1,
|
|
529
|
+
...t
|
|
530
|
+
};
|
|
531
|
+
if (!Qe(t, Yi) && Qe(t, Hi))
|
|
532
|
+
if (t.visualDuration) {
|
|
533
|
+
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * X(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
534
|
+
e = {
|
|
535
|
+
...e,
|
|
536
|
+
mass: M.mass,
|
|
537
|
+
stiffness: i,
|
|
538
|
+
damping: r
|
|
539
|
+
};
|
|
540
|
+
} else {
|
|
541
|
+
const n = zi(t);
|
|
542
|
+
e = {
|
|
543
|
+
...e,
|
|
544
|
+
...n,
|
|
545
|
+
mass: M.mass
|
|
546
|
+
}, e.isResolvedFromDuration = !0;
|
|
547
|
+
}
|
|
548
|
+
return e;
|
|
549
|
+
}
|
|
550
|
+
function Pt(t = M.visualDuration, e = M.bounce) {
|
|
551
|
+
const n = typeof t != "object" ? {
|
|
552
|
+
visualDuration: t,
|
|
553
|
+
keyframes: [0, 1],
|
|
554
|
+
bounce: e
|
|
555
|
+
} : t;
|
|
556
|
+
let { restSpeed: s, restDelta: i } = n;
|
|
557
|
+
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: u, damping: l, mass: c, duration: f, velocity: d, isResolvedFromDuration: h } = Xi({
|
|
558
|
+
...n,
|
|
559
|
+
velocity: -/* @__PURE__ */ K(n.velocity || 0)
|
|
560
|
+
}), g = d || 0, T = l / (2 * Math.sqrt(u * c)), w = o - r, p = /* @__PURE__ */ K(Math.sqrt(u / c)), V = Math.abs(w) < 5;
|
|
561
|
+
s || (s = V ? M.restSpeed.granular : M.restSpeed.default), i || (i = V ? M.restDelta.granular : M.restDelta.default);
|
|
562
|
+
let y;
|
|
563
|
+
if (T < 1) {
|
|
564
|
+
const m = qt(p, T);
|
|
565
|
+
y = (v) => {
|
|
566
|
+
const A = Math.exp(-T * p * v);
|
|
567
|
+
return o - A * ((g + T * p * w) / m * Math.sin(m * v) + w * Math.cos(m * v));
|
|
568
|
+
};
|
|
569
|
+
} else if (T === 1)
|
|
570
|
+
y = (m) => o - Math.exp(-p * m) * (w + (g + p * w) * m);
|
|
571
|
+
else {
|
|
572
|
+
const m = p * Math.sqrt(T * T - 1);
|
|
573
|
+
y = (v) => {
|
|
574
|
+
const A = Math.exp(-T * p * v), x = Math.min(m * v, 300);
|
|
575
|
+
return o - A * ((g + T * p * w) * Math.sinh(x) + m * w * Math.cosh(x)) / m;
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
const S = {
|
|
579
|
+
calculatedDuration: h && f || null,
|
|
580
|
+
next: (m) => {
|
|
581
|
+
const v = y(m);
|
|
582
|
+
if (h)
|
|
583
|
+
a.done = m >= f;
|
|
584
|
+
else {
|
|
585
|
+
let A = m === 0 ? g : 0;
|
|
586
|
+
T < 1 && (A = m === 0 ? /* @__PURE__ */ N(g) : cs(y, m, v));
|
|
587
|
+
const x = Math.abs(A) <= s, P = Math.abs(o - v) <= i;
|
|
588
|
+
a.done = x && P;
|
|
589
|
+
}
|
|
590
|
+
return a.value = a.done ? o : v, a;
|
|
591
|
+
},
|
|
592
|
+
toString: () => {
|
|
593
|
+
const m = Math.min(Me(S), Ct), v = as((A) => S.next(m * A).value, m, 30);
|
|
594
|
+
return m + "ms " + v;
|
|
595
|
+
},
|
|
596
|
+
toTransition: () => {
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
return S;
|
|
600
|
+
}
|
|
601
|
+
Pt.applyToOptions = (t) => {
|
|
602
|
+
const e = Wi(t, 100, Pt);
|
|
603
|
+
return t.ease = e.ease, t.duration = /* @__PURE__ */ N(e.duration), t.type = "keyframes", t;
|
|
604
|
+
};
|
|
605
|
+
function Zt({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: u, restDelta: l = 0.5, restSpeed: c }) {
|
|
606
|
+
const f = t[0], d = {
|
|
607
|
+
done: !1,
|
|
608
|
+
value: f
|
|
609
|
+
}, h = (x) => a !== void 0 && x < a || u !== void 0 && x > u, g = (x) => a === void 0 ? u : u === void 0 || Math.abs(a - x) < Math.abs(u - x) ? a : u;
|
|
610
|
+
let T = n * e;
|
|
611
|
+
const w = f + T, p = o === void 0 ? w : o(w);
|
|
612
|
+
p !== w && (T = p - f);
|
|
613
|
+
const V = (x) => -T * Math.exp(-x / s), y = (x) => p + V(x), S = (x) => {
|
|
614
|
+
const P = V(x), R = y(x);
|
|
615
|
+
d.done = Math.abs(P) <= l, d.value = d.done ? p : R;
|
|
616
|
+
};
|
|
617
|
+
let m, v;
|
|
618
|
+
const A = (x) => {
|
|
619
|
+
h(d.value) && (m = x, v = Pt({
|
|
620
|
+
keyframes: [d.value, g(d.value)],
|
|
621
|
+
velocity: cs(y, x, d.value),
|
|
622
|
+
// TODO: This should be passing * 1000
|
|
623
|
+
damping: i,
|
|
624
|
+
stiffness: r,
|
|
625
|
+
restDelta: l,
|
|
626
|
+
restSpeed: c
|
|
627
|
+
}));
|
|
628
|
+
};
|
|
629
|
+
return A(0), {
|
|
630
|
+
calculatedDuration: null,
|
|
631
|
+
next: (x) => {
|
|
632
|
+
let P = !1;
|
|
633
|
+
return !v && m === void 0 && (P = !0, S(x), A(x)), m !== void 0 && x >= m ? v.next(x - m) : (!P && S(x), d);
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
function qi(t, e, n) {
|
|
638
|
+
const s = [], i = n || j.mix || os, r = t.length - 1;
|
|
639
|
+
for (let o = 0; o < r; o++) {
|
|
640
|
+
let a = i(t[o], t[o + 1]);
|
|
641
|
+
if (e) {
|
|
642
|
+
const u = Array.isArray(e) ? e[o] || st : e;
|
|
643
|
+
a = Ot(u, a);
|
|
644
|
+
}
|
|
645
|
+
s.push(a);
|
|
646
|
+
}
|
|
647
|
+
return s;
|
|
648
|
+
}
|
|
649
|
+
function Zi(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
650
|
+
const r = t.length;
|
|
651
|
+
if (W(r === e.length, "Both input and output ranges must be the same length"), r === 1)
|
|
652
|
+
return () => e[0];
|
|
653
|
+
if (r === 2 && e[0] === e[1])
|
|
654
|
+
return () => e[1];
|
|
655
|
+
const o = t[0] === t[1];
|
|
656
|
+
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
657
|
+
const a = qi(e, s, i), u = a.length, l = (c) => {
|
|
658
|
+
if (o && c < t[0])
|
|
659
|
+
return e[0];
|
|
660
|
+
let f = 0;
|
|
661
|
+
if (u > 1)
|
|
662
|
+
for (; f < t.length - 2 && !(c < t[f + 1]); f++)
|
|
663
|
+
;
|
|
664
|
+
const d = /* @__PURE__ */ jn(t[f], t[f + 1], c);
|
|
665
|
+
return a[f](d);
|
|
666
|
+
};
|
|
667
|
+
return n ? (c) => l(X(t[0], t[r - 1], c)) : l;
|
|
668
|
+
}
|
|
669
|
+
function Ji(t, e) {
|
|
670
|
+
const n = t[t.length - 1];
|
|
671
|
+
for (let s = 1; s <= e; s++) {
|
|
672
|
+
const i = /* @__PURE__ */ jn(0, e, s);
|
|
673
|
+
t.push(yt(n, 1, i));
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
function Qi(t) {
|
|
677
|
+
const e = [0];
|
|
678
|
+
return Ji(e, t.length - 1), e;
|
|
679
|
+
}
|
|
680
|
+
function tr(t, e) {
|
|
681
|
+
return t.map((n) => n * e);
|
|
682
|
+
}
|
|
683
|
+
function er(t, e) {
|
|
684
|
+
return t.map(() => e || qn).splice(0, t.length - 1);
|
|
685
|
+
}
|
|
686
|
+
function J({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
687
|
+
const i = hi(s) ? s.map(Ye) : Ye(s), r = {
|
|
688
|
+
done: !1,
|
|
689
|
+
value: e[0]
|
|
690
|
+
}, o = tr(
|
|
691
|
+
// Only use the provided offsets if they're the correct length
|
|
692
|
+
// TODO Maybe we should warn here if there's a length mismatch
|
|
693
|
+
n && n.length === e.length ? n : Qi(e),
|
|
694
|
+
t
|
|
695
|
+
), a = Zi(o, e, {
|
|
696
|
+
ease: Array.isArray(i) ? i : er(e, i)
|
|
697
|
+
});
|
|
698
|
+
return {
|
|
699
|
+
calculatedDuration: t,
|
|
700
|
+
next: (u) => (r.value = a(u), r.done = u >= t, r)
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
const nr = (t) => t !== null;
|
|
704
|
+
function Ce(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
|
|
705
|
+
const r = t.filter(nr), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : r.length - 1;
|
|
706
|
+
return !a || s === void 0 ? r[a] : s;
|
|
707
|
+
}
|
|
708
|
+
const sr = {
|
|
709
|
+
decay: Zt,
|
|
710
|
+
inertia: Zt,
|
|
711
|
+
tween: J,
|
|
712
|
+
keyframes: J,
|
|
713
|
+
spring: Pt
|
|
714
|
+
};
|
|
715
|
+
function us(t) {
|
|
716
|
+
typeof t.type == "string" && (t.type = sr[t.type]);
|
|
717
|
+
}
|
|
718
|
+
class Pe {
|
|
719
|
+
constructor() {
|
|
720
|
+
this.updateFinished();
|
|
721
|
+
}
|
|
722
|
+
get finished() {
|
|
723
|
+
return this._finished;
|
|
724
|
+
}
|
|
725
|
+
updateFinished() {
|
|
726
|
+
this._finished = new Promise((e) => {
|
|
727
|
+
this.resolve = e;
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
notifyFinished() {
|
|
731
|
+
this.resolve();
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Allows the animation to be awaited.
|
|
735
|
+
*
|
|
736
|
+
* @deprecated Use `finished` instead.
|
|
737
|
+
*/
|
|
738
|
+
then(e, n) {
|
|
739
|
+
return this.finished.then(e, n);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
const ir = (t) => t / 100;
|
|
743
|
+
class De extends Pe {
|
|
744
|
+
constructor(e) {
|
|
745
|
+
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
746
|
+
var s, i;
|
|
747
|
+
const { motionValue: n } = this.options;
|
|
748
|
+
n && n.updatedAt !== I.now() && this.tick(I.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (i = (s = this.options).onStop) == null || i.call(s));
|
|
749
|
+
}, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
|
|
750
|
+
}
|
|
751
|
+
initAnimation() {
|
|
752
|
+
const { options: e } = this;
|
|
753
|
+
us(e);
|
|
754
|
+
const { type: n = J, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = e;
|
|
755
|
+
let { keyframes: a } = e;
|
|
756
|
+
const u = n || J;
|
|
757
|
+
process.env.NODE_ENV !== "production" && u !== J && W(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`), u !== J && typeof a[0] != "number" && (this.mixKeyframes = Ot(ir, os(a[0], a[1])), a = [0, 100]);
|
|
758
|
+
const l = u({ ...e, keyframes: a });
|
|
759
|
+
r === "mirror" && (this.mirroredGenerator = u({
|
|
760
|
+
...e,
|
|
761
|
+
keyframes: [...a].reverse(),
|
|
762
|
+
velocity: -o
|
|
763
|
+
})), l.calculatedDuration === null && (l.calculatedDuration = Me(l));
|
|
764
|
+
const { calculatedDuration: c } = l;
|
|
765
|
+
this.calculatedDuration = c, this.resolvedDuration = c + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = l;
|
|
766
|
+
}
|
|
767
|
+
updateTime(e) {
|
|
768
|
+
const n = Math.round(e - this.startTime) * this.playbackSpeed;
|
|
769
|
+
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
|
|
770
|
+
}
|
|
771
|
+
tick(e, n = !1) {
|
|
772
|
+
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: u } = this;
|
|
773
|
+
if (this.startTime === null)
|
|
774
|
+
return s.next(0);
|
|
775
|
+
const { delay: l = 0, keyframes: c, repeat: f, repeatType: d, repeatDelay: h, type: g, onUpdate: T, finalKeyframe: w } = this.options;
|
|
776
|
+
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
777
|
+
const p = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), V = this.playbackSpeed >= 0 ? p < 0 : p > i;
|
|
778
|
+
this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
779
|
+
let y = this.currentTime, S = s;
|
|
780
|
+
if (f) {
|
|
781
|
+
const x = Math.min(this.currentTime, i) / a;
|
|
782
|
+
let P = Math.floor(x), R = x % 1;
|
|
783
|
+
!R && x >= 1 && (R = 1), R === 1 && P--, P = Math.min(P, f + 1), !!(P % 2) && (d === "reverse" ? (R = 1 - R, h && (R -= h / a)) : d === "mirror" && (S = o)), y = X(0, 1, R) * a;
|
|
784
|
+
}
|
|
785
|
+
const m = V ? { done: !1, value: c[0] } : S.next(y);
|
|
786
|
+
r && (m.value = r(m.value));
|
|
787
|
+
let { done: v } = m;
|
|
788
|
+
!V && u !== null && (v = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
789
|
+
const A = this.holdTime === null && (this.state === "finished" || this.state === "running" && v);
|
|
790
|
+
return A && g !== Zt && (m.value = Ce(c, this.options, w, this.speed)), T && T(m.value), A && this.finish(), m;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
794
|
+
* resolves when the animation finishes at all but in a future update could/should
|
|
795
|
+
* reject if its cancels.
|
|
796
|
+
*/
|
|
797
|
+
then(e, n) {
|
|
798
|
+
return this.finished.then(e, n);
|
|
799
|
+
}
|
|
800
|
+
get duration() {
|
|
801
|
+
return /* @__PURE__ */ K(this.calculatedDuration);
|
|
802
|
+
}
|
|
803
|
+
get time() {
|
|
804
|
+
return /* @__PURE__ */ K(this.currentTime);
|
|
805
|
+
}
|
|
806
|
+
set time(e) {
|
|
807
|
+
var n;
|
|
808
|
+
e = /* @__PURE__ */ N(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
|
|
809
|
+
}
|
|
810
|
+
get speed() {
|
|
811
|
+
return this.playbackSpeed;
|
|
812
|
+
}
|
|
813
|
+
set speed(e) {
|
|
814
|
+
this.updateTime(I.now());
|
|
815
|
+
const n = this.playbackSpeed !== e;
|
|
816
|
+
this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ K(this.currentTime));
|
|
817
|
+
}
|
|
818
|
+
play() {
|
|
819
|
+
var i, r;
|
|
820
|
+
if (this.isStopped)
|
|
821
|
+
return;
|
|
822
|
+
const { driver: e = $i, startTime: n } = this.options;
|
|
823
|
+
this.driver || (this.driver = e((o) => this.tick(o))), (r = (i = this.options).onPlay) == null || r.call(i);
|
|
824
|
+
const s = this.driver.now();
|
|
825
|
+
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
826
|
+
}
|
|
827
|
+
pause() {
|
|
828
|
+
this.state = "paused", this.updateTime(I.now()), this.holdTime = this.currentTime;
|
|
829
|
+
}
|
|
830
|
+
complete() {
|
|
831
|
+
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
832
|
+
}
|
|
833
|
+
finish() {
|
|
834
|
+
var e, n;
|
|
835
|
+
this.notifyFinished(), this.teardown(), this.state = "finished", (n = (e = this.options).onComplete) == null || n.call(e);
|
|
836
|
+
}
|
|
837
|
+
cancel() {
|
|
838
|
+
var e, n;
|
|
839
|
+
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), (n = (e = this.options).onCancel) == null || n.call(e);
|
|
840
|
+
}
|
|
841
|
+
teardown() {
|
|
842
|
+
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
|
|
843
|
+
}
|
|
844
|
+
stopDriver() {
|
|
845
|
+
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
846
|
+
}
|
|
847
|
+
sample(e) {
|
|
848
|
+
return this.startTime = 0, this.tick(e, !0);
|
|
849
|
+
}
|
|
850
|
+
attachTimeline(e) {
|
|
851
|
+
var n;
|
|
852
|
+
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), e.observe(this);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
function rr(t) {
|
|
856
|
+
for (let e = 1; e < t.length; e++)
|
|
857
|
+
t[e] ?? (t[e] = t[e - 1]);
|
|
858
|
+
}
|
|
859
|
+
const U = (t) => t * 180 / Math.PI, Jt = (t) => {
|
|
860
|
+
const e = U(Math.atan2(t[1], t[0]));
|
|
861
|
+
return Qt(e);
|
|
862
|
+
}, or = {
|
|
863
|
+
x: 4,
|
|
864
|
+
y: 5,
|
|
865
|
+
translateX: 4,
|
|
866
|
+
translateY: 5,
|
|
867
|
+
scaleX: 0,
|
|
868
|
+
scaleY: 3,
|
|
869
|
+
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
870
|
+
rotate: Jt,
|
|
871
|
+
rotateZ: Jt,
|
|
872
|
+
skewX: (t) => U(Math.atan(t[1])),
|
|
873
|
+
skewY: (t) => U(Math.atan(t[2])),
|
|
874
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
875
|
+
}, Qt = (t) => (t = t % 360, t < 0 && (t += 360), t), tn = Jt, en = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), nn = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ar = {
|
|
876
|
+
x: 12,
|
|
877
|
+
y: 13,
|
|
878
|
+
z: 14,
|
|
879
|
+
translateX: 12,
|
|
880
|
+
translateY: 13,
|
|
881
|
+
translateZ: 14,
|
|
882
|
+
scaleX: en,
|
|
883
|
+
scaleY: nn,
|
|
884
|
+
scale: (t) => (en(t) + nn(t)) / 2,
|
|
885
|
+
rotateX: (t) => Qt(U(Math.atan2(t[6], t[5]))),
|
|
886
|
+
rotateY: (t) => Qt(U(Math.atan2(-t[2], t[0]))),
|
|
887
|
+
rotateZ: tn,
|
|
888
|
+
rotate: tn,
|
|
889
|
+
skewX: (t) => U(Math.atan(t[4])),
|
|
890
|
+
skewY: (t) => U(Math.atan(t[1])),
|
|
891
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
892
|
+
};
|
|
893
|
+
function te(t) {
|
|
894
|
+
return t.includes("scale") ? 1 : 0;
|
|
895
|
+
}
|
|
896
|
+
function ee(t, e) {
|
|
897
|
+
if (!t || t === "none")
|
|
898
|
+
return te(e);
|
|
899
|
+
const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
900
|
+
let s, i;
|
|
901
|
+
if (n)
|
|
902
|
+
s = ar, i = n;
|
|
903
|
+
else {
|
|
904
|
+
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
905
|
+
s = or, i = a;
|
|
906
|
+
}
|
|
907
|
+
if (!i)
|
|
908
|
+
return te(e);
|
|
909
|
+
const r = s[e], o = i[1].split(",").map(ur);
|
|
910
|
+
return typeof r == "function" ? r(o) : o[r];
|
|
911
|
+
}
|
|
912
|
+
const cr = (t, e) => {
|
|
913
|
+
const { transform: n = "none" } = getComputedStyle(t);
|
|
914
|
+
return ee(n, e);
|
|
915
|
+
};
|
|
916
|
+
function ur(t) {
|
|
917
|
+
return parseFloat(t.trim());
|
|
918
|
+
}
|
|
919
|
+
const ot = [
|
|
920
|
+
"transformPerspective",
|
|
921
|
+
"x",
|
|
922
|
+
"y",
|
|
923
|
+
"z",
|
|
924
|
+
"translateX",
|
|
925
|
+
"translateY",
|
|
926
|
+
"translateZ",
|
|
927
|
+
"scale",
|
|
928
|
+
"scaleX",
|
|
929
|
+
"scaleY",
|
|
930
|
+
"rotate",
|
|
931
|
+
"rotateX",
|
|
932
|
+
"rotateY",
|
|
933
|
+
"rotateZ",
|
|
934
|
+
"skew",
|
|
935
|
+
"skewX",
|
|
936
|
+
"skewY"
|
|
937
|
+
], at = new Set(ot), sn = (t) => t === it || t === b, lr = /* @__PURE__ */ new Set(["x", "y", "z"]), fr = ot.filter((t) => !lr.has(t));
|
|
938
|
+
function dr(t) {
|
|
939
|
+
const e = [];
|
|
940
|
+
return fr.forEach((n) => {
|
|
941
|
+
const s = t.getValue(n);
|
|
942
|
+
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
943
|
+
}), e;
|
|
944
|
+
}
|
|
945
|
+
const G = {
|
|
946
|
+
// Dimensions
|
|
947
|
+
width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
|
|
948
|
+
height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
|
|
949
|
+
top: (t, { top: e }) => parseFloat(e),
|
|
950
|
+
left: (t, { left: e }) => parseFloat(e),
|
|
951
|
+
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
952
|
+
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
953
|
+
// Transform
|
|
954
|
+
x: (t, { transform: e }) => ee(e, "x"),
|
|
955
|
+
y: (t, { transform: e }) => ee(e, "y")
|
|
956
|
+
};
|
|
957
|
+
G.translateX = G.x;
|
|
958
|
+
G.translateY = G.y;
|
|
959
|
+
const H = /* @__PURE__ */ new Set();
|
|
960
|
+
let ne = !1, se = !1, ie = !1;
|
|
961
|
+
function ls() {
|
|
962
|
+
if (se) {
|
|
963
|
+
const t = Array.from(H).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
964
|
+
e.forEach((s) => {
|
|
965
|
+
const i = dr(s);
|
|
966
|
+
i.length && (n.set(s, i), s.render());
|
|
967
|
+
}), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
|
|
968
|
+
s.render();
|
|
969
|
+
const i = n.get(s);
|
|
970
|
+
i && i.forEach(([r, o]) => {
|
|
971
|
+
var a;
|
|
972
|
+
(a = s.getValue(r)) == null || a.set(o);
|
|
973
|
+
});
|
|
974
|
+
}), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
|
|
975
|
+
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
se = !1, ne = !1, H.forEach((t) => t.complete(ie)), H.clear();
|
|
979
|
+
}
|
|
980
|
+
function fs() {
|
|
981
|
+
H.forEach((t) => {
|
|
982
|
+
t.readKeyframes(), t.needsMeasurement && (se = !0);
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
function hr() {
|
|
986
|
+
ie = !0, fs(), ls(), ie = !1;
|
|
987
|
+
}
|
|
988
|
+
class Fe {
|
|
989
|
+
constructor(e, n, s, i, r, o = !1) {
|
|
990
|
+
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
991
|
+
}
|
|
992
|
+
scheduleResolve() {
|
|
993
|
+
this.state = "scheduled", this.isAsync ? (H.add(this), ne || (ne = !0, k.read(fs), k.resolveKeyframes(ls))) : (this.readKeyframes(), this.complete());
|
|
994
|
+
}
|
|
995
|
+
readKeyframes() {
|
|
996
|
+
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
997
|
+
if (e[0] === null) {
|
|
998
|
+
const r = i == null ? void 0 : i.get(), o = e[e.length - 1];
|
|
999
|
+
if (r !== void 0)
|
|
1000
|
+
e[0] = r;
|
|
1001
|
+
else if (s && n) {
|
|
1002
|
+
const a = s.readValue(n, o);
|
|
1003
|
+
a != null && (e[0] = a);
|
|
1004
|
+
}
|
|
1005
|
+
e[0] === void 0 && (e[0] = o), i && r === void 0 && i.set(e[0]);
|
|
1006
|
+
}
|
|
1007
|
+
rr(e);
|
|
1008
|
+
}
|
|
1009
|
+
setFinalKeyframe() {
|
|
1010
|
+
}
|
|
1011
|
+
measureInitialState() {
|
|
1012
|
+
}
|
|
1013
|
+
renderEndStyles() {
|
|
1014
|
+
}
|
|
1015
|
+
measureEndState() {
|
|
1016
|
+
}
|
|
1017
|
+
complete(e = !1) {
|
|
1018
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), H.delete(this);
|
|
1019
|
+
}
|
|
1020
|
+
cancel() {
|
|
1021
|
+
this.state === "scheduled" && (H.delete(this), this.state = "pending");
|
|
1022
|
+
}
|
|
1023
|
+
resume() {
|
|
1024
|
+
this.state === "pending" && this.scheduleResolve();
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
const pr = (t) => t.startsWith("--");
|
|
1028
|
+
function mr(t, e, n) {
|
|
1029
|
+
pr(e) ? t.style.setProperty(e, n) : t.style[e] = n;
|
|
1030
|
+
}
|
|
1031
|
+
const gr = /* @__PURE__ */ ye(() => window.ScrollTimeline !== void 0), yr = {};
|
|
1032
|
+
function br(t, e) {
|
|
1033
|
+
const n = /* @__PURE__ */ ye(t);
|
|
1034
|
+
return () => yr[e] ?? n();
|
|
1035
|
+
}
|
|
1036
|
+
const ds = /* @__PURE__ */ br(() => {
|
|
1037
|
+
try {
|
|
1038
|
+
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1039
|
+
} catch {
|
|
1040
|
+
return !1;
|
|
1041
|
+
}
|
|
1042
|
+
return !0;
|
|
1043
|
+
}, "linearEasing"), ut = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, rn = {
|
|
1044
|
+
linear: "linear",
|
|
1045
|
+
ease: "ease",
|
|
1046
|
+
easeIn: "ease-in",
|
|
1047
|
+
easeOut: "ease-out",
|
|
1048
|
+
easeInOut: "ease-in-out",
|
|
1049
|
+
circIn: /* @__PURE__ */ ut([0, 0.65, 0.55, 1]),
|
|
1050
|
+
circOut: /* @__PURE__ */ ut([0.55, 0, 1, 0.45]),
|
|
1051
|
+
backIn: /* @__PURE__ */ ut([0.31, 0.01, 0.66, -0.59]),
|
|
1052
|
+
backOut: /* @__PURE__ */ ut([0.33, 1.53, 0.69, 0.99])
|
|
1053
|
+
};
|
|
1054
|
+
function hs(t, e) {
|
|
1055
|
+
if (t)
|
|
1056
|
+
return typeof t == "function" ? ds() ? as(t, e) : "ease-out" : Zn(t) ? ut(t) : Array.isArray(t) ? t.map((n) => hs(n, e) || rn.easeOut) : rn[t];
|
|
1057
|
+
}
|
|
1058
|
+
function Tr(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: u } = {}, l = void 0) {
|
|
1059
|
+
const c = {
|
|
1060
|
+
[e]: n
|
|
1061
|
+
};
|
|
1062
|
+
u && (c.offset = u);
|
|
1063
|
+
const f = hs(a, i);
|
|
1064
|
+
Array.isArray(f) && (c.easing = f);
|
|
1065
|
+
const d = {
|
|
1066
|
+
delay: s,
|
|
1067
|
+
duration: i,
|
|
1068
|
+
easing: Array.isArray(f) ? "linear" : f,
|
|
1069
|
+
fill: "both",
|
|
1070
|
+
iterations: r + 1,
|
|
1071
|
+
direction: o === "reverse" ? "alternate" : "normal"
|
|
1072
|
+
};
|
|
1073
|
+
return l && (d.pseudoElement = l), t.animate(c, d);
|
|
1074
|
+
}
|
|
1075
|
+
function ps(t) {
|
|
1076
|
+
return typeof t == "function" && "applyToOptions" in t;
|
|
1077
|
+
}
|
|
1078
|
+
function vr({ type: t, ...e }) {
|
|
1079
|
+
return ps(t) && ds() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1080
|
+
}
|
|
1081
|
+
class wr extends Pe {
|
|
1082
|
+
constructor(e) {
|
|
1083
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, !e)
|
|
1084
|
+
return;
|
|
1085
|
+
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: u } = e;
|
|
1086
|
+
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = e, W(typeof e.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
|
|
1087
|
+
const l = vr(e);
|
|
1088
|
+
this.animation = Tr(n, s, i, l, r), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1089
|
+
if (this.finishedTime = this.time, !r) {
|
|
1090
|
+
const c = Ce(i, this.options, a, this.speed);
|
|
1091
|
+
this.updateMotionValue ? this.updateMotionValue(c) : mr(n, s, c), this.animation.cancel();
|
|
1092
|
+
}
|
|
1093
|
+
u == null || u(), this.notifyFinished();
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
play() {
|
|
1097
|
+
this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
1098
|
+
}
|
|
1099
|
+
pause() {
|
|
1100
|
+
this.animation.pause();
|
|
1101
|
+
}
|
|
1102
|
+
complete() {
|
|
1103
|
+
var e, n;
|
|
1104
|
+
(n = (e = this.animation).finish) == null || n.call(e);
|
|
1105
|
+
}
|
|
1106
|
+
cancel() {
|
|
1107
|
+
try {
|
|
1108
|
+
this.animation.cancel();
|
|
1109
|
+
} catch {
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
stop() {
|
|
1113
|
+
if (this.isStopped)
|
|
1114
|
+
return;
|
|
1115
|
+
this.isStopped = !0;
|
|
1116
|
+
const { state: e } = this;
|
|
1117
|
+
e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* WAAPI doesn't natively have any interruption capabilities.
|
|
1121
|
+
*
|
|
1122
|
+
* In this method, we commit styles back to the DOM before cancelling
|
|
1123
|
+
* the animation.
|
|
1124
|
+
*
|
|
1125
|
+
* This is designed to be overridden by NativeAnimationExtended, which
|
|
1126
|
+
* will create a renderless JS animation and sample it twice to calculate
|
|
1127
|
+
* its current value, "previous" value, and therefore allow
|
|
1128
|
+
* Motion to also correctly calculate velocity for any subsequent animation
|
|
1129
|
+
* while deferring the commit until the next animation frame.
|
|
1130
|
+
*/
|
|
1131
|
+
commitStyles() {
|
|
1132
|
+
var e, n;
|
|
1133
|
+
this.isPseudoElement || (n = (e = this.animation).commitStyles) == null || n.call(e);
|
|
1134
|
+
}
|
|
1135
|
+
get duration() {
|
|
1136
|
+
var n, s;
|
|
1137
|
+
const e = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
|
|
1138
|
+
return /* @__PURE__ */ K(Number(e));
|
|
1139
|
+
}
|
|
1140
|
+
get time() {
|
|
1141
|
+
return /* @__PURE__ */ K(Number(this.animation.currentTime) || 0);
|
|
1142
|
+
}
|
|
1143
|
+
set time(e) {
|
|
1144
|
+
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ N(e);
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* The playback speed of the animation.
|
|
1148
|
+
* 1 = normal speed, 2 = double speed, 0.5 = half speed.
|
|
1149
|
+
*/
|
|
1150
|
+
get speed() {
|
|
1151
|
+
return this.animation.playbackRate;
|
|
1152
|
+
}
|
|
1153
|
+
set speed(e) {
|
|
1154
|
+
e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
|
|
1155
|
+
}
|
|
1156
|
+
get state() {
|
|
1157
|
+
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
1158
|
+
}
|
|
1159
|
+
get startTime() {
|
|
1160
|
+
return Number(this.animation.startTime);
|
|
1161
|
+
}
|
|
1162
|
+
set startTime(e) {
|
|
1163
|
+
this.animation.startTime = e;
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1167
|
+
*/
|
|
1168
|
+
attachTimeline({ timeline: e, observe: n }) {
|
|
1169
|
+
var s;
|
|
1170
|
+
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && gr() ? (this.animation.timeline = e, st) : n(this);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
const ms = {
|
|
1174
|
+
anticipate: Yn,
|
|
1175
|
+
backInOut: Hn,
|
|
1176
|
+
circInOut: Xn
|
|
1177
|
+
};
|
|
1178
|
+
function xr(t) {
|
|
1179
|
+
return t in ms;
|
|
1180
|
+
}
|
|
1181
|
+
function Vr(t) {
|
|
1182
|
+
typeof t.ease == "string" && xr(t.ease) && (t.ease = ms[t.ease]);
|
|
1183
|
+
}
|
|
1184
|
+
const on = 10;
|
|
1185
|
+
class Sr extends wr {
|
|
1186
|
+
constructor(e) {
|
|
1187
|
+
Vr(e), us(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* WAAPI doesn't natively have any interruption capabilities.
|
|
1191
|
+
*
|
|
1192
|
+
* Rather than read commited styles back out of the DOM, we can
|
|
1193
|
+
* create a renderless JS animation and sample it twice to calculate
|
|
1194
|
+
* its current value, "previous" value, and therefore allow
|
|
1195
|
+
* Motion to calculate velocity for any subsequent animation.
|
|
1196
|
+
*/
|
|
1197
|
+
updateMotionValue(e) {
|
|
1198
|
+
const { motionValue: n, onUpdate: s, onComplete: i, element: r, ...o } = this.options;
|
|
1199
|
+
if (!n)
|
|
1200
|
+
return;
|
|
1201
|
+
if (e !== void 0) {
|
|
1202
|
+
n.set(e);
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
const a = new De({
|
|
1206
|
+
...o,
|
|
1207
|
+
autoplay: !1
|
|
1208
|
+
}), u = /* @__PURE__ */ N(this.finishedTime ?? this.time);
|
|
1209
|
+
n.setWithVelocity(a.sample(u - on).value, a.sample(u).value, on), a.stop();
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
const an = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1213
|
+
(rt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1214
|
+
!t.startsWith("url("));
|
|
1215
|
+
function Ar(t) {
|
|
1216
|
+
const e = t[0];
|
|
1217
|
+
if (t.length === 1)
|
|
1218
|
+
return !0;
|
|
1219
|
+
for (let n = 0; n < t.length; n++)
|
|
1220
|
+
if (t[n] !== e)
|
|
1221
|
+
return !0;
|
|
1222
|
+
}
|
|
1223
|
+
function Mr(t, e, n, s) {
|
|
1224
|
+
const i = t[0];
|
|
1225
|
+
if (i === null)
|
|
1226
|
+
return !1;
|
|
1227
|
+
if (e === "display" || e === "visibility")
|
|
1228
|
+
return !0;
|
|
1229
|
+
const r = t[t.length - 1], o = an(i, e), a = an(r, e);
|
|
1230
|
+
return nt(o === a, `You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : Ar(t) || (n === "spring" || ps(n)) && s;
|
|
1231
|
+
}
|
|
1232
|
+
function Re(t) {
|
|
1233
|
+
return ri(t) && "offsetHeight" in t;
|
|
1234
|
+
}
|
|
1235
|
+
const Cr = /* @__PURE__ */ new Set([
|
|
1236
|
+
"opacity",
|
|
1237
|
+
"clipPath",
|
|
1238
|
+
"filter",
|
|
1239
|
+
"transform"
|
|
1240
|
+
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1241
|
+
// "background-color"
|
|
1242
|
+
]), Pr = /* @__PURE__ */ ye(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1243
|
+
function Dr(t) {
|
|
1244
|
+
var l;
|
|
1245
|
+
const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: r, type: o } = t;
|
|
1246
|
+
if (!Re((l = e == null ? void 0 : e.owner) == null ? void 0 : l.current))
|
|
1247
|
+
return !1;
|
|
1248
|
+
const { onUpdate: a, transformTemplate: u } = e.owner.getProps();
|
|
1249
|
+
return Pr() && n && Cr.has(n) && (n !== "transform" || !u) && /**
|
|
1250
|
+
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1251
|
+
* no way to read the value from WAAPI every frame.
|
|
1252
|
+
*/
|
|
1253
|
+
!a && !s && i !== "mirror" && r !== 0 && o !== "inertia";
|
|
1254
|
+
}
|
|
1255
|
+
const Fr = 40;
|
|
1256
|
+
class Rr extends Pe {
|
|
1257
|
+
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: u, motionValue: l, element: c, ...f }) {
|
|
1258
|
+
var g;
|
|
1259
|
+
super(), this.stop = () => {
|
|
1260
|
+
var T, w;
|
|
1261
|
+
this._animation && (this._animation.stop(), (T = this.stopTimeline) == null || T.call(this)), (w = this.keyframeResolver) == null || w.cancel();
|
|
1262
|
+
}, this.createdAt = I.now();
|
|
1263
|
+
const d = {
|
|
1264
|
+
autoplay: e,
|
|
1265
|
+
delay: n,
|
|
1266
|
+
type: s,
|
|
1267
|
+
repeat: i,
|
|
1268
|
+
repeatDelay: r,
|
|
1269
|
+
repeatType: o,
|
|
1270
|
+
name: u,
|
|
1271
|
+
motionValue: l,
|
|
1272
|
+
element: c,
|
|
1273
|
+
...f
|
|
1274
|
+
}, h = (c == null ? void 0 : c.KeyframeResolver) || Fe;
|
|
1275
|
+
this.keyframeResolver = new h(a, (T, w, p) => this.onKeyframesResolved(T, w, d, !p), u, l, c), (g = this.keyframeResolver) == null || g.scheduleResolve();
|
|
1276
|
+
}
|
|
1277
|
+
onKeyframesResolved(e, n, s, i) {
|
|
1278
|
+
this.keyframeResolver = void 0;
|
|
1279
|
+
const { name: r, type: o, velocity: a, delay: u, isHandoff: l, onUpdate: c } = s;
|
|
1280
|
+
this.resolvedAt = I.now(), Mr(e, r, o, a) || ((j.instantAnimations || !u) && (c == null || c(Ce(e, s, n))), e[0] = e[e.length - 1], s.duration = 0, s.repeat = 0);
|
|
1281
|
+
const d = {
|
|
1282
|
+
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Fr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1283
|
+
finalKeyframe: n,
|
|
1284
|
+
...s,
|
|
1285
|
+
keyframes: e
|
|
1286
|
+
}, h = !l && Dr(d) ? new Sr({
|
|
1287
|
+
...d,
|
|
1288
|
+
element: d.motionValue.owner.current
|
|
1289
|
+
}) : new De(d);
|
|
1290
|
+
h.finished.then(() => this.notifyFinished()).catch(st), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
|
|
1291
|
+
}
|
|
1292
|
+
get finished() {
|
|
1293
|
+
return this._animation ? this.animation.finished : this._finished;
|
|
1294
|
+
}
|
|
1295
|
+
then(e, n) {
|
|
1296
|
+
return this.finished.finally(e).then(() => {
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
get animation() {
|
|
1300
|
+
var e;
|
|
1301
|
+
return this._animation || ((e = this.keyframeResolver) == null || e.resume(), hr()), this._animation;
|
|
1302
|
+
}
|
|
1303
|
+
get duration() {
|
|
1304
|
+
return this.animation.duration;
|
|
1305
|
+
}
|
|
1306
|
+
get time() {
|
|
1307
|
+
return this.animation.time;
|
|
1308
|
+
}
|
|
1309
|
+
set time(e) {
|
|
1310
|
+
this.animation.time = e;
|
|
1311
|
+
}
|
|
1312
|
+
get speed() {
|
|
1313
|
+
return this.animation.speed;
|
|
1314
|
+
}
|
|
1315
|
+
get state() {
|
|
1316
|
+
return this.animation.state;
|
|
1317
|
+
}
|
|
1318
|
+
set speed(e) {
|
|
1319
|
+
this.animation.speed = e;
|
|
1320
|
+
}
|
|
1321
|
+
get startTime() {
|
|
1322
|
+
return this.animation.startTime;
|
|
1323
|
+
}
|
|
1324
|
+
attachTimeline(e) {
|
|
1325
|
+
return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
|
|
1326
|
+
}
|
|
1327
|
+
play() {
|
|
1328
|
+
this.animation.play();
|
|
1329
|
+
}
|
|
1330
|
+
pause() {
|
|
1331
|
+
this.animation.pause();
|
|
1332
|
+
}
|
|
1333
|
+
complete() {
|
|
1334
|
+
this.animation.complete();
|
|
1335
|
+
}
|
|
1336
|
+
cancel() {
|
|
1337
|
+
var e;
|
|
1338
|
+
this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
const Er = (
|
|
1342
|
+
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1343
|
+
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1344
|
+
);
|
|
1345
|
+
function Or(t) {
|
|
1346
|
+
const e = Er.exec(t);
|
|
1347
|
+
if (!e)
|
|
1348
|
+
return [,];
|
|
1349
|
+
const [, n, s, i] = e;
|
|
1350
|
+
return [`--${n ?? s}`, i];
|
|
1351
|
+
}
|
|
1352
|
+
const Ir = 4;
|
|
1353
|
+
function gs(t, e, n = 1) {
|
|
1354
|
+
W(n <= Ir, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
1355
|
+
const [s, i] = Or(t);
|
|
1356
|
+
if (!s)
|
|
1357
|
+
return;
|
|
1358
|
+
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
1359
|
+
if (r) {
|
|
1360
|
+
const o = r.trim();
|
|
1361
|
+
return Bn(o) ? parseFloat(o) : o;
|
|
1362
|
+
}
|
|
1363
|
+
return xe(i) ? gs(i, e, n + 1) : i;
|
|
1364
|
+
}
|
|
1365
|
+
function ys(t, e) {
|
|
1366
|
+
return (t == null ? void 0 : t[e]) ?? (t == null ? void 0 : t.default) ?? t;
|
|
1367
|
+
}
|
|
1368
|
+
const bs = /* @__PURE__ */ new Set([
|
|
1369
|
+
"width",
|
|
1370
|
+
"height",
|
|
1371
|
+
"top",
|
|
1372
|
+
"left",
|
|
1373
|
+
"right",
|
|
1374
|
+
"bottom",
|
|
1375
|
+
...ot
|
|
1376
|
+
]), kr = {
|
|
1377
|
+
test: (t) => t === "auto",
|
|
1378
|
+
parse: (t) => t
|
|
1379
|
+
}, Ts = (t) => (e) => e.test(t), vs = [it, b, Q, $, Ai, Si, kr], cn = (t) => vs.find(Ts(t));
|
|
1380
|
+
function Nr(t) {
|
|
1381
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Kn(t) : !0;
|
|
1382
|
+
}
|
|
1383
|
+
const Lr = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1384
|
+
function Br(t) {
|
|
1385
|
+
const [e, n] = t.slice(0, -1).split("(");
|
|
1386
|
+
if (e === "drop-shadow")
|
|
1387
|
+
return t;
|
|
1388
|
+
const [s] = n.match(Ve) || [];
|
|
1389
|
+
if (!s)
|
|
1390
|
+
return t;
|
|
1391
|
+
const i = n.replace(s, "");
|
|
1392
|
+
let r = Lr.has(e) ? 1 : 0;
|
|
1393
|
+
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
1394
|
+
}
|
|
1395
|
+
const Kr = /\b([a-z-]*)\(.*?\)/gu, re = {
|
|
1396
|
+
...rt,
|
|
1397
|
+
getAnimatableNone: (t) => {
|
|
1398
|
+
const e = t.match(Kr);
|
|
1399
|
+
return e ? e.map(Br).join(" ") : t;
|
|
1400
|
+
}
|
|
1401
|
+
}, un = {
|
|
1402
|
+
...it,
|
|
1403
|
+
transform: Math.round
|
|
1404
|
+
}, jr = {
|
|
1405
|
+
rotate: $,
|
|
1406
|
+
rotateX: $,
|
|
1407
|
+
rotateY: $,
|
|
1408
|
+
rotateZ: $,
|
|
1409
|
+
scale: Tt,
|
|
1410
|
+
scaleX: Tt,
|
|
1411
|
+
scaleY: Tt,
|
|
1412
|
+
scaleZ: Tt,
|
|
1413
|
+
skew: $,
|
|
1414
|
+
skewX: $,
|
|
1415
|
+
skewY: $,
|
|
1416
|
+
distance: b,
|
|
1417
|
+
translateX: b,
|
|
1418
|
+
translateY: b,
|
|
1419
|
+
translateZ: b,
|
|
1420
|
+
x: b,
|
|
1421
|
+
y: b,
|
|
1422
|
+
z: b,
|
|
1423
|
+
perspective: b,
|
|
1424
|
+
transformPerspective: b,
|
|
1425
|
+
opacity: ft,
|
|
1426
|
+
originX: Xe,
|
|
1427
|
+
originY: Xe,
|
|
1428
|
+
originZ: b
|
|
1429
|
+
}, Ee = {
|
|
1430
|
+
// Border props
|
|
1431
|
+
borderWidth: b,
|
|
1432
|
+
borderTopWidth: b,
|
|
1433
|
+
borderRightWidth: b,
|
|
1434
|
+
borderBottomWidth: b,
|
|
1435
|
+
borderLeftWidth: b,
|
|
1436
|
+
borderRadius: b,
|
|
1437
|
+
radius: b,
|
|
1438
|
+
borderTopLeftRadius: b,
|
|
1439
|
+
borderTopRightRadius: b,
|
|
1440
|
+
borderBottomRightRadius: b,
|
|
1441
|
+
borderBottomLeftRadius: b,
|
|
1442
|
+
// Positioning props
|
|
1443
|
+
width: b,
|
|
1444
|
+
maxWidth: b,
|
|
1445
|
+
height: b,
|
|
1446
|
+
maxHeight: b,
|
|
1447
|
+
top: b,
|
|
1448
|
+
right: b,
|
|
1449
|
+
bottom: b,
|
|
1450
|
+
left: b,
|
|
1451
|
+
// Spacing props
|
|
1452
|
+
padding: b,
|
|
1453
|
+
paddingTop: b,
|
|
1454
|
+
paddingRight: b,
|
|
1455
|
+
paddingBottom: b,
|
|
1456
|
+
paddingLeft: b,
|
|
1457
|
+
margin: b,
|
|
1458
|
+
marginTop: b,
|
|
1459
|
+
marginRight: b,
|
|
1460
|
+
marginBottom: b,
|
|
1461
|
+
marginLeft: b,
|
|
1462
|
+
// Misc
|
|
1463
|
+
backgroundPositionX: b,
|
|
1464
|
+
backgroundPositionY: b,
|
|
1465
|
+
...jr,
|
|
1466
|
+
zIndex: un,
|
|
1467
|
+
// SVG
|
|
1468
|
+
fillOpacity: ft,
|
|
1469
|
+
strokeOpacity: ft,
|
|
1470
|
+
numOctaves: un
|
|
1471
|
+
}, $r = {
|
|
1472
|
+
...Ee,
|
|
1473
|
+
// Color props
|
|
1474
|
+
color: C,
|
|
1475
|
+
backgroundColor: C,
|
|
1476
|
+
outlineColor: C,
|
|
1477
|
+
fill: C,
|
|
1478
|
+
stroke: C,
|
|
1479
|
+
// Border props
|
|
1480
|
+
borderColor: C,
|
|
1481
|
+
borderTopColor: C,
|
|
1482
|
+
borderRightColor: C,
|
|
1483
|
+
borderBottomColor: C,
|
|
1484
|
+
borderLeftColor: C,
|
|
1485
|
+
filter: re,
|
|
1486
|
+
WebkitFilter: re
|
|
1487
|
+
}, ws = (t) => $r[t];
|
|
1488
|
+
function xs(t, e) {
|
|
1489
|
+
let n = ws(t);
|
|
1490
|
+
return n !== re && (n = rt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1491
|
+
}
|
|
1492
|
+
const Wr = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1493
|
+
function _r(t, e, n) {
|
|
1494
|
+
let s = 0, i;
|
|
1495
|
+
for (; s < t.length && !i; ) {
|
|
1496
|
+
const r = t[s];
|
|
1497
|
+
typeof r == "string" && !Wr.has(r) && dt(r).values.length && (i = t[s]), s++;
|
|
1498
|
+
}
|
|
1499
|
+
if (i && n)
|
|
1500
|
+
for (const r of e)
|
|
1501
|
+
t[r] = xs(n, i);
|
|
1502
|
+
}
|
|
1503
|
+
class zr extends Fe {
|
|
1504
|
+
constructor(e, n, s, i, r) {
|
|
1505
|
+
super(e, n, s, i, r, !0);
|
|
1506
|
+
}
|
|
1507
|
+
readKeyframes() {
|
|
1508
|
+
const { unresolvedKeyframes: e, element: n, name: s } = this;
|
|
1509
|
+
if (!n || !n.current)
|
|
1510
|
+
return;
|
|
1511
|
+
super.readKeyframes();
|
|
1512
|
+
for (let u = 0; u < e.length; u++) {
|
|
1513
|
+
let l = e[u];
|
|
1514
|
+
if (typeof l == "string" && (l = l.trim(), xe(l))) {
|
|
1515
|
+
const c = gs(l, n.current);
|
|
1516
|
+
c !== void 0 && (e[u] = c), u === e.length - 1 && (this.finalKeyframe = l);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
if (this.resolveNoneKeyframes(), !bs.has(s) || e.length !== 2)
|
|
1520
|
+
return;
|
|
1521
|
+
const [i, r] = e, o = cn(i), a = cn(r);
|
|
1522
|
+
if (o !== a)
|
|
1523
|
+
if (sn(o) && sn(a))
|
|
1524
|
+
for (let u = 0; u < e.length; u++) {
|
|
1525
|
+
const l = e[u];
|
|
1526
|
+
typeof l == "string" && (e[u] = parseFloat(l));
|
|
1527
|
+
}
|
|
1528
|
+
else G[s] && (this.needsMeasurement = !0);
|
|
1529
|
+
}
|
|
1530
|
+
resolveNoneKeyframes() {
|
|
1531
|
+
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
1532
|
+
for (let i = 0; i < e.length; i++)
|
|
1533
|
+
(e[i] === null || Nr(e[i])) && s.push(i);
|
|
1534
|
+
s.length && _r(e, s, n);
|
|
1535
|
+
}
|
|
1536
|
+
measureInitialState() {
|
|
1537
|
+
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
1538
|
+
if (!e || !e.current)
|
|
1539
|
+
return;
|
|
1540
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = G[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
|
|
1541
|
+
const i = n[n.length - 1];
|
|
1542
|
+
i !== void 0 && e.getValue(s, i).jump(i, !1);
|
|
1543
|
+
}
|
|
1544
|
+
measureEndState() {
|
|
1545
|
+
var a;
|
|
1546
|
+
const { element: e, name: n, unresolvedKeyframes: s } = this;
|
|
1547
|
+
if (!e || !e.current)
|
|
1548
|
+
return;
|
|
1549
|
+
const i = e.getValue(n);
|
|
1550
|
+
i && i.jump(this.measuredOrigin, !1);
|
|
1551
|
+
const r = s.length - 1, o = s[r];
|
|
1552
|
+
s[r] = G[n](e.measureViewportBox(), window.getComputedStyle(e.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([u, l]) => {
|
|
1553
|
+
e.getValue(u).set(l);
|
|
1554
|
+
}), this.resolveNoneKeyframes();
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
function Ur(t, e, n) {
|
|
1558
|
+
if (t instanceof EventTarget)
|
|
1559
|
+
return [t];
|
|
1560
|
+
if (typeof t == "string") {
|
|
1561
|
+
let s = document;
|
|
1562
|
+
const i = (n == null ? void 0 : n[t]) ?? s.querySelectorAll(t);
|
|
1563
|
+
return i ? Array.from(i) : [];
|
|
1564
|
+
}
|
|
1565
|
+
return Array.from(t);
|
|
1566
|
+
}
|
|
1567
|
+
const Vs = (t, e) => e && typeof t == "number" ? e.transform(t) : t, ln = 30, Gr = (t) => !isNaN(parseFloat(t));
|
|
1568
|
+
class Hr {
|
|
1569
|
+
/**
|
|
1570
|
+
* @param init - The initiating value
|
|
1571
|
+
* @param config - Optional configuration options
|
|
1572
|
+
*
|
|
1573
|
+
* - `transformer`: A function to transform incoming values with.
|
|
1574
|
+
*/
|
|
1575
|
+
constructor(e, n = {}) {
|
|
1576
|
+
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
1577
|
+
var o, a;
|
|
1578
|
+
const r = I.now();
|
|
1579
|
+
if (this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((o = this.events.change) == null || o.notify(this.current), this.dependents))
|
|
1580
|
+
for (const u of this.dependents)
|
|
1581
|
+
u.dirty();
|
|
1582
|
+
i && ((a = this.events.renderRequest) == null || a.notify(this.current));
|
|
1583
|
+
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
1584
|
+
}
|
|
1585
|
+
setCurrent(e) {
|
|
1586
|
+
this.current = e, this.updatedAt = I.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Gr(this.current));
|
|
1587
|
+
}
|
|
1588
|
+
setPrevFrameValue(e = this.current) {
|
|
1589
|
+
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
1590
|
+
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
1593
|
+
*
|
|
1594
|
+
* It returns a function that, when called, will cancel the subscription.
|
|
1595
|
+
*
|
|
1596
|
+
* When calling `onChange` inside a React component, it should be wrapped with the
|
|
1597
|
+
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
|
|
1598
|
+
* from the `useEffect` function to ensure you don't add duplicate subscribers..
|
|
1599
|
+
*
|
|
1600
|
+
* ```jsx
|
|
1601
|
+
* export const MyComponent = () => {
|
|
1602
|
+
* const x = useMotionValue(0)
|
|
1603
|
+
* const y = useMotionValue(0)
|
|
1604
|
+
* const opacity = useMotionValue(1)
|
|
1605
|
+
*
|
|
1606
|
+
* useEffect(() => {
|
|
1607
|
+
* function updateOpacity() {
|
|
1608
|
+
* const maxXY = Math.max(x.get(), y.get())
|
|
1609
|
+
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
|
|
1610
|
+
* opacity.set(newOpacity)
|
|
1611
|
+
* }
|
|
1612
|
+
*
|
|
1613
|
+
* const unsubscribeX = x.on("change", updateOpacity)
|
|
1614
|
+
* const unsubscribeY = y.on("change", updateOpacity)
|
|
1615
|
+
*
|
|
1616
|
+
* return () => {
|
|
1617
|
+
* unsubscribeX()
|
|
1618
|
+
* unsubscribeY()
|
|
1619
|
+
* }
|
|
1620
|
+
* }, [])
|
|
1621
|
+
*
|
|
1622
|
+
* return <motion.div style={{ x }} />
|
|
1623
|
+
* }
|
|
1624
|
+
* ```
|
|
1625
|
+
*
|
|
1626
|
+
* @param subscriber - A function that receives the latest value.
|
|
1627
|
+
* @returns A function that, when called, will cancel this subscription.
|
|
1628
|
+
*
|
|
1629
|
+
* @deprecated
|
|
1630
|
+
*/
|
|
1631
|
+
onChange(e) {
|
|
1632
|
+
return process.env.NODE_ENV !== "production" && be(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
1633
|
+
}
|
|
1634
|
+
on(e, n) {
|
|
1635
|
+
this.events[e] || (this.events[e] = new $n());
|
|
1636
|
+
const s = this.events[e].add(n);
|
|
1637
|
+
return e === "change" ? () => {
|
|
1638
|
+
s(), k.read(() => {
|
|
1639
|
+
this.events.change.getSize() || this.stop();
|
|
1640
|
+
});
|
|
1641
|
+
} : s;
|
|
1642
|
+
}
|
|
1643
|
+
clearListeners() {
|
|
1644
|
+
for (const e in this.events)
|
|
1645
|
+
this.events[e].clear();
|
|
1646
|
+
}
|
|
1647
|
+
/**
|
|
1648
|
+
* Attaches a passive effect to the `MotionValue`.
|
|
1649
|
+
*/
|
|
1650
|
+
attach(e, n) {
|
|
1651
|
+
this.passiveEffect = e, this.stopPassiveEffect = n;
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
* Sets the state of the `MotionValue`.
|
|
1655
|
+
*
|
|
1656
|
+
* @remarks
|
|
1657
|
+
*
|
|
1658
|
+
* ```jsx
|
|
1659
|
+
* const x = useMotionValue(0)
|
|
1660
|
+
* x.set(10)
|
|
1661
|
+
* ```
|
|
1662
|
+
*
|
|
1663
|
+
* @param latest - Latest value to set.
|
|
1664
|
+
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
1665
|
+
*
|
|
1666
|
+
* @public
|
|
1667
|
+
*/
|
|
1668
|
+
set(e, n = !0) {
|
|
1669
|
+
!n || !this.passiveEffect ? this.updateAndNotify(e, n) : this.passiveEffect(e, this.updateAndNotify);
|
|
1670
|
+
}
|
|
1671
|
+
setWithVelocity(e, n, s) {
|
|
1672
|
+
this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - s;
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* Set the state of the `MotionValue`, stopping any active animations,
|
|
1676
|
+
* effects, and resets velocity to `0`.
|
|
1677
|
+
*/
|
|
1678
|
+
jump(e, n = !0) {
|
|
1679
|
+
this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1680
|
+
}
|
|
1681
|
+
dirty() {
|
|
1682
|
+
var e;
|
|
1683
|
+
(e = this.events.change) == null || e.notify(this.current);
|
|
1684
|
+
}
|
|
1685
|
+
addDependent(e) {
|
|
1686
|
+
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(e);
|
|
1687
|
+
}
|
|
1688
|
+
removeDependent(e) {
|
|
1689
|
+
this.dependents && this.dependents.delete(e);
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Returns the latest state of `MotionValue`
|
|
1693
|
+
*
|
|
1694
|
+
* @returns - The latest state of `MotionValue`
|
|
1695
|
+
*
|
|
1696
|
+
* @public
|
|
1697
|
+
*/
|
|
1698
|
+
get() {
|
|
1699
|
+
return this.current;
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* @public
|
|
1703
|
+
*/
|
|
1704
|
+
getPrevious() {
|
|
1705
|
+
return this.prev;
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Returns the latest velocity of `MotionValue`
|
|
1709
|
+
*
|
|
1710
|
+
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
1711
|
+
*
|
|
1712
|
+
* @public
|
|
1713
|
+
*/
|
|
1714
|
+
getVelocity() {
|
|
1715
|
+
const e = I.now();
|
|
1716
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > ln)
|
|
1717
|
+
return 0;
|
|
1718
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ln);
|
|
1719
|
+
return Wn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1720
|
+
}
|
|
1721
|
+
/**
|
|
1722
|
+
* Registers a new animation to control this `MotionValue`. Only one
|
|
1723
|
+
* animation can drive a `MotionValue` at one time.
|
|
1724
|
+
*
|
|
1725
|
+
* ```jsx
|
|
1726
|
+
* value.start()
|
|
1727
|
+
* ```
|
|
1728
|
+
*
|
|
1729
|
+
* @param animation - A function that starts the provided animation
|
|
1730
|
+
*/
|
|
1731
|
+
start(e) {
|
|
1732
|
+
return this.stop(), new Promise((n) => {
|
|
1733
|
+
this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
|
|
1734
|
+
}).then(() => {
|
|
1735
|
+
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
* Stop the currently active animation.
|
|
1740
|
+
*
|
|
1741
|
+
* @public
|
|
1742
|
+
*/
|
|
1743
|
+
stop() {
|
|
1744
|
+
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Returns `true` if this value is currently animating.
|
|
1748
|
+
*
|
|
1749
|
+
* @public
|
|
1750
|
+
*/
|
|
1751
|
+
isAnimating() {
|
|
1752
|
+
return !!this.animation;
|
|
1753
|
+
}
|
|
1754
|
+
clearAnimation() {
|
|
1755
|
+
delete this.animation;
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Destroy and clean up subscribers to this `MotionValue`.
|
|
1759
|
+
*
|
|
1760
|
+
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
1761
|
+
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
1762
|
+
* created a `MotionValue` via the `motionValue` function.
|
|
1763
|
+
*
|
|
1764
|
+
* @public
|
|
1765
|
+
*/
|
|
1766
|
+
destroy() {
|
|
1767
|
+
var e, n;
|
|
1768
|
+
(e = this.dependents) == null || e.clear(), (n = this.events.destroy) == null || n.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
function Dt(t, e) {
|
|
1772
|
+
return new Hr(t, e);
|
|
1773
|
+
}
|
|
1774
|
+
const { schedule: Yr } = /* @__PURE__ */ Jn(queueMicrotask, !1), fn = {
|
|
1775
|
+
x: !1,
|
|
1776
|
+
y: !1
|
|
1777
|
+
};
|
|
1778
|
+
function Ss() {
|
|
1779
|
+
return fn.x || fn.y;
|
|
1780
|
+
}
|
|
1781
|
+
function As(t, e) {
|
|
1782
|
+
const n = Ur(t), s = new AbortController(), i = {
|
|
1783
|
+
passive: !0,
|
|
1784
|
+
...e,
|
|
1785
|
+
signal: s.signal
|
|
1786
|
+
};
|
|
1787
|
+
return [n, i, () => s.abort()];
|
|
1788
|
+
}
|
|
1789
|
+
function dn(t) {
|
|
1790
|
+
return !(t.pointerType === "touch" || Ss());
|
|
1791
|
+
}
|
|
1792
|
+
function Xr(t, e, n = {}) {
|
|
1793
|
+
const [s, i, r] = As(t, n), o = (a) => {
|
|
1794
|
+
if (!dn(a))
|
|
1795
|
+
return;
|
|
1796
|
+
const { target: u } = a, l = e(u, a);
|
|
1797
|
+
if (typeof l != "function" || !u)
|
|
1798
|
+
return;
|
|
1799
|
+
const c = (f) => {
|
|
1800
|
+
dn(f) && (l(f), u.removeEventListener("pointerleave", c));
|
|
1801
|
+
};
|
|
1802
|
+
u.addEventListener("pointerleave", c, i);
|
|
1803
|
+
};
|
|
1804
|
+
return s.forEach((a) => {
|
|
1805
|
+
a.addEventListener("pointerenter", o, i);
|
|
1806
|
+
}), r;
|
|
1807
|
+
}
|
|
1808
|
+
const Ms = (t, e) => e ? t === e ? !0 : Ms(t, e.parentElement) : !1, Cs = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, qr = /* @__PURE__ */ new Set([
|
|
1809
|
+
"BUTTON",
|
|
1810
|
+
"INPUT",
|
|
1811
|
+
"SELECT",
|
|
1812
|
+
"TEXTAREA",
|
|
1813
|
+
"A"
|
|
1814
|
+
]);
|
|
1815
|
+
function Zr(t) {
|
|
1816
|
+
return qr.has(t.tagName) || t.tabIndex !== -1;
|
|
1817
|
+
}
|
|
1818
|
+
const xt = /* @__PURE__ */ new WeakSet();
|
|
1819
|
+
function hn(t) {
|
|
1820
|
+
return (e) => {
|
|
1821
|
+
e.key === "Enter" && t(e);
|
|
1822
|
+
};
|
|
1823
|
+
}
|
|
1824
|
+
function _t(t, e) {
|
|
1825
|
+
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
1826
|
+
}
|
|
1827
|
+
const Jr = (t, e) => {
|
|
1828
|
+
const n = t.currentTarget;
|
|
1829
|
+
if (!n)
|
|
1830
|
+
return;
|
|
1831
|
+
const s = hn(() => {
|
|
1832
|
+
if (xt.has(n))
|
|
1833
|
+
return;
|
|
1834
|
+
_t(n, "down");
|
|
1835
|
+
const i = hn(() => {
|
|
1836
|
+
_t(n, "up");
|
|
1837
|
+
}), r = () => _t(n, "cancel");
|
|
1838
|
+
n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
|
|
1839
|
+
});
|
|
1840
|
+
n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
|
|
1841
|
+
};
|
|
1842
|
+
function pn(t) {
|
|
1843
|
+
return Cs(t) && !Ss();
|
|
1844
|
+
}
|
|
1845
|
+
function Qr(t, e, n = {}) {
|
|
1846
|
+
const [s, i, r] = As(t, n), o = (a) => {
|
|
1847
|
+
const u = a.currentTarget;
|
|
1848
|
+
if (!pn(a))
|
|
1849
|
+
return;
|
|
1850
|
+
xt.add(u);
|
|
1851
|
+
const l = e(u, a), c = (h, g) => {
|
|
1852
|
+
window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", d), xt.has(u) && xt.delete(u), pn(h) && typeof l == "function" && l(h, { success: g });
|
|
1853
|
+
}, f = (h) => {
|
|
1854
|
+
c(h, u === window || u === document || n.useGlobalTarget || Ms(u, h.target));
|
|
1855
|
+
}, d = (h) => {
|
|
1856
|
+
c(h, !1);
|
|
1857
|
+
};
|
|
1858
|
+
window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", d, i);
|
|
1859
|
+
};
|
|
1860
|
+
return s.forEach((a) => {
|
|
1861
|
+
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), Re(a) && (a.addEventListener("focus", (l) => Jr(l, i)), !Zr(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
1862
|
+
}), r;
|
|
1863
|
+
}
|
|
1864
|
+
const F = (t) => !!(t && t.getVelocity), to = [...vs, C, rt], eo = (t) => to.find(Ts(t)), Oe = et({
|
|
1865
|
+
transformPagePoint: (t) => t,
|
|
1866
|
+
isStatic: !1,
|
|
1867
|
+
reducedMotion: "never"
|
|
1868
|
+
});
|
|
1869
|
+
class no extends he.Component {
|
|
1870
|
+
getSnapshotBeforeUpdate(e) {
|
|
1871
|
+
const n = this.props.childRef.current;
|
|
1872
|
+
if (n && e.isPresent && !this.props.isPresent) {
|
|
1873
|
+
const s = n.offsetParent, i = Re(s) && s.offsetWidth || 0, r = this.props.sizeRef.current;
|
|
1874
|
+
r.height = n.offsetHeight || 0, r.width = n.offsetWidth || 0, r.top = n.offsetTop, r.left = n.offsetLeft, r.right = i - r.width - r.left;
|
|
1875
|
+
}
|
|
1876
|
+
return null;
|
|
1877
|
+
}
|
|
1878
|
+
/**
|
|
1879
|
+
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
1880
|
+
*/
|
|
1881
|
+
componentDidUpdate() {
|
|
1882
|
+
}
|
|
1883
|
+
render() {
|
|
1884
|
+
return this.props.children;
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
function so({ children: t, isPresent: e, anchorX: n }) {
|
|
1888
|
+
const s = pe(), i = B(null), r = B({
|
|
1889
|
+
width: 0,
|
|
1890
|
+
height: 0,
|
|
1891
|
+
top: 0,
|
|
1892
|
+
left: 0,
|
|
1893
|
+
right: 0
|
|
1894
|
+
}), { nonce: o } = E(Oe);
|
|
1895
|
+
return In(() => {
|
|
1896
|
+
const { width: a, height: u, top: l, left: c, right: f } = r.current;
|
|
1897
|
+
if (e || !i.current || !a || !u)
|
|
1898
|
+
return;
|
|
1899
|
+
const d = n === "left" ? `left: ${c}` : `right: ${f}`;
|
|
1900
|
+
i.current.dataset.motionPopId = s;
|
|
1901
|
+
const h = document.createElement("style");
|
|
1902
|
+
return o && (h.nonce = o), document.head.appendChild(h), h.sheet && h.sheet.insertRule(`
|
|
1903
|
+
[data-motion-pop-id="${s}"] {
|
|
1904
|
+
position: absolute !important;
|
|
1905
|
+
width: ${a}px !important;
|
|
1906
|
+
height: ${u}px !important;
|
|
1907
|
+
${d}px !important;
|
|
1908
|
+
top: ${l}px !important;
|
|
1909
|
+
}
|
|
1910
|
+
`), () => {
|
|
1911
|
+
document.head.contains(h) && document.head.removeChild(h);
|
|
1912
|
+
};
|
|
1913
|
+
}, [e]), O.jsx(no, { isPresent: e, childRef: i, sizeRef: r, children: he.cloneElement(t, { ref: i }) });
|
|
1914
|
+
}
|
|
1915
|
+
const io = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: r, mode: o, anchorX: a }) => {
|
|
1916
|
+
const u = me(ro), l = pe();
|
|
1917
|
+
let c = !0, f = Y(() => (c = !1, {
|
|
1918
|
+
id: l,
|
|
1919
|
+
initial: e,
|
|
1920
|
+
isPresent: n,
|
|
1921
|
+
custom: i,
|
|
1922
|
+
onExitComplete: (d) => {
|
|
1923
|
+
u.set(d, !0);
|
|
1924
|
+
for (const h of u.values())
|
|
1925
|
+
if (!h)
|
|
1926
|
+
return;
|
|
1927
|
+
s && s();
|
|
1928
|
+
},
|
|
1929
|
+
register: (d) => (u.set(d, !1), () => u.delete(d))
|
|
1930
|
+
}), [n, u, s]);
|
|
1931
|
+
return r && c && (f = { ...f }), Y(() => {
|
|
1932
|
+
u.forEach((d, h) => u.set(h, !1));
|
|
1933
|
+
}, [n]), he.useEffect(() => {
|
|
1934
|
+
!n && !u.size && s && s();
|
|
1935
|
+
}, [n]), o === "popLayout" && (t = O.jsx(so, { isPresent: n, anchorX: a, children: t })), O.jsx(Et.Provider, { value: f, children: t });
|
|
1936
|
+
};
|
|
1937
|
+
function ro() {
|
|
1938
|
+
return /* @__PURE__ */ new Map();
|
|
1939
|
+
}
|
|
1940
|
+
function oo(t = !0) {
|
|
1941
|
+
const e = E(Et);
|
|
1942
|
+
if (e === null)
|
|
1943
|
+
return [!0, null];
|
|
1944
|
+
const { isPresent: n, onExitComplete: s, register: i } = e, r = pe();
|
|
1945
|
+
Rt(() => {
|
|
1946
|
+
if (t)
|
|
1947
|
+
return i(r);
|
|
1948
|
+
}, [t]);
|
|
1949
|
+
const o = St(() => t && s && s(r), [r, s, t]);
|
|
1950
|
+
return !n && s ? [!1, o] : [!0];
|
|
1951
|
+
}
|
|
1952
|
+
const vt = (t) => t.key || "";
|
|
1953
|
+
function mn(t) {
|
|
1954
|
+
const e = [];
|
|
1955
|
+
return Zs.forEach(t, (n) => {
|
|
1956
|
+
Js(n) && e.push(n);
|
|
1957
|
+
}), e;
|
|
1958
|
+
}
|
|
1959
|
+
const ao = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: r = "sync", propagate: o = !1, anchorX: a = "left" }) => {
|
|
1960
|
+
const [u, l] = oo(o), c = Y(() => mn(t), [t]), f = o && !u ? [] : c.map(vt), d = B(!0), h = B(c), g = me(() => /* @__PURE__ */ new Map()), [T, w] = Vt(c), [p, V] = Vt(c);
|
|
1961
|
+
Ln(() => {
|
|
1962
|
+
d.current = !1, h.current = c;
|
|
1963
|
+
for (let m = 0; m < p.length; m++) {
|
|
1964
|
+
const v = vt(p[m]);
|
|
1965
|
+
f.includes(v) ? g.delete(v) : g.get(v) !== !0 && g.set(v, !1);
|
|
1966
|
+
}
|
|
1967
|
+
}, [p, f.length, f.join("-")]);
|
|
1968
|
+
const y = [];
|
|
1969
|
+
if (c !== T) {
|
|
1970
|
+
let m = [...c];
|
|
1971
|
+
for (let v = 0; v < p.length; v++) {
|
|
1972
|
+
const A = p[v], x = vt(A);
|
|
1973
|
+
f.includes(x) || (m.splice(v, 0, A), y.push(A));
|
|
1974
|
+
}
|
|
1975
|
+
return r === "wait" && y.length && (m = y), V(mn(m)), w(c), null;
|
|
1976
|
+
}
|
|
1977
|
+
process.env.NODE_ENV !== "production" && r === "wait" && p.length > 1;
|
|
1978
|
+
const { forceRender: S } = E(Nn);
|
|
1979
|
+
return O.jsx(O.Fragment, { children: p.map((m) => {
|
|
1980
|
+
const v = vt(m), A = o && !u ? !1 : c === p || f.includes(v), x = () => {
|
|
1981
|
+
if (g.has(v))
|
|
1982
|
+
g.set(v, !0);
|
|
1983
|
+
else
|
|
1984
|
+
return;
|
|
1985
|
+
let P = !0;
|
|
1986
|
+
g.forEach((R) => {
|
|
1987
|
+
R || (P = !1);
|
|
1988
|
+
}), P && (S == null || S(), V(h.current), o && (l == null || l()), s && s());
|
|
1989
|
+
};
|
|
1990
|
+
return O.jsx(io, { isPresent: A, initial: !d.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: r, onExitComplete: A ? void 0 : x, anchorX: a, children: m }, v);
|
|
1991
|
+
}) });
|
|
1992
|
+
}, Ie = et({ strict: !1 }), gn = {
|
|
1993
|
+
animation: [
|
|
1994
|
+
"animate",
|
|
1995
|
+
"variants",
|
|
1996
|
+
"whileHover",
|
|
1997
|
+
"whileTap",
|
|
1998
|
+
"exit",
|
|
1999
|
+
"whileInView",
|
|
2000
|
+
"whileFocus",
|
|
2001
|
+
"whileDrag"
|
|
2002
|
+
],
|
|
2003
|
+
exit: ["exit"],
|
|
2004
|
+
drag: ["drag", "dragControls"],
|
|
2005
|
+
focus: ["whileFocus"],
|
|
2006
|
+
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
2007
|
+
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
2008
|
+
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2009
|
+
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2010
|
+
layout: ["layout", "layoutId"]
|
|
2011
|
+
}, tt = {};
|
|
2012
|
+
for (const t in gn)
|
|
2013
|
+
tt[t] = {
|
|
2014
|
+
isEnabled: (e) => gn[t].some((n) => !!e[n])
|
|
2015
|
+
};
|
|
2016
|
+
function oe(t) {
|
|
2017
|
+
for (const e in t)
|
|
2018
|
+
tt[e] = {
|
|
2019
|
+
...tt[e],
|
|
2020
|
+
...t[e]
|
|
2021
|
+
};
|
|
2022
|
+
}
|
|
2023
|
+
function co({ children: t, features: e, strict: n = !1 }) {
|
|
2024
|
+
const [, s] = Vt(!zt(e)), i = B(void 0);
|
|
2025
|
+
if (!zt(e)) {
|
|
2026
|
+
const { renderer: r, ...o } = e;
|
|
2027
|
+
i.current = r, oe(o);
|
|
2028
|
+
}
|
|
2029
|
+
return Rt(() => {
|
|
2030
|
+
zt(e) && e().then(({ renderer: r, ...o }) => {
|
|
2031
|
+
oe(o), i.current = r, s(!0);
|
|
2032
|
+
});
|
|
2033
|
+
}, []), O.jsx(Ie.Provider, { value: { renderer: i.current, strict: n }, children: t });
|
|
2034
|
+
}
|
|
2035
|
+
function zt(t) {
|
|
2036
|
+
return typeof t == "function";
|
|
2037
|
+
}
|
|
2038
|
+
const uo = /* @__PURE__ */ new Set([
|
|
2039
|
+
"animate",
|
|
2040
|
+
"exit",
|
|
2041
|
+
"variants",
|
|
2042
|
+
"initial",
|
|
2043
|
+
"style",
|
|
2044
|
+
"values",
|
|
2045
|
+
"variants",
|
|
2046
|
+
"transition",
|
|
2047
|
+
"transformTemplate",
|
|
2048
|
+
"custom",
|
|
2049
|
+
"inherit",
|
|
2050
|
+
"onBeforeLayoutMeasure",
|
|
2051
|
+
"onAnimationStart",
|
|
2052
|
+
"onAnimationComplete",
|
|
2053
|
+
"onUpdate",
|
|
2054
|
+
"onDragStart",
|
|
2055
|
+
"onDrag",
|
|
2056
|
+
"onDragEnd",
|
|
2057
|
+
"onMeasureDragConstraints",
|
|
2058
|
+
"onDirectionLock",
|
|
2059
|
+
"onDragTransitionEnd",
|
|
2060
|
+
"_dragX",
|
|
2061
|
+
"_dragY",
|
|
2062
|
+
"onHoverStart",
|
|
2063
|
+
"onHoverEnd",
|
|
2064
|
+
"onViewportEnter",
|
|
2065
|
+
"onViewportLeave",
|
|
2066
|
+
"globalTapTarget",
|
|
2067
|
+
"ignoreStrict",
|
|
2068
|
+
"viewport"
|
|
2069
|
+
]);
|
|
2070
|
+
function Ft(t) {
|
|
2071
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || uo.has(t);
|
|
2072
|
+
}
|
|
2073
|
+
let Ps = (t) => !Ft(t);
|
|
2074
|
+
function lo(t) {
|
|
2075
|
+
typeof t == "function" && (Ps = (e) => e.startsWith("on") ? !Ft(e) : t(e));
|
|
2076
|
+
}
|
|
2077
|
+
try {
|
|
2078
|
+
lo(require("@emotion/is-prop-valid").default);
|
|
2079
|
+
} catch {
|
|
2080
|
+
}
|
|
2081
|
+
function fo(t, e, n) {
|
|
2082
|
+
const s = {};
|
|
2083
|
+
for (const i in t)
|
|
2084
|
+
i === "values" && typeof t.values == "object" || (Ps(i) || n === !0 && Ft(i) || !e && !Ft(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
2085
|
+
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
2086
|
+
return s;
|
|
2087
|
+
}
|
|
2088
|
+
function ho(t) {
|
|
2089
|
+
if (typeof Proxy > "u")
|
|
2090
|
+
return t;
|
|
2091
|
+
const e = /* @__PURE__ */ new Map(), n = (...s) => (process.env.NODE_ENV !== "production" && be(!1, "motion() is deprecated. Use motion.create() instead."), t(...s));
|
|
2092
|
+
return new Proxy(n, {
|
|
2093
|
+
/**
|
|
2094
|
+
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
2095
|
+
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
2096
|
+
* DOM component with that name.
|
|
2097
|
+
*/
|
|
2098
|
+
get: (s, i) => i === "create" ? t : (e.has(i) || e.set(i, t(i)), e.get(i))
|
|
2099
|
+
});
|
|
2100
|
+
}
|
|
2101
|
+
const It = /* @__PURE__ */ et({});
|
|
2102
|
+
function kt(t) {
|
|
2103
|
+
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2104
|
+
}
|
|
2105
|
+
function ht(t) {
|
|
2106
|
+
return typeof t == "string" || Array.isArray(t);
|
|
2107
|
+
}
|
|
2108
|
+
const ke = [
|
|
2109
|
+
"animate",
|
|
2110
|
+
"whileInView",
|
|
2111
|
+
"whileFocus",
|
|
2112
|
+
"whileHover",
|
|
2113
|
+
"whileTap",
|
|
2114
|
+
"whileDrag",
|
|
2115
|
+
"exit"
|
|
2116
|
+
], Ne = ["initial", ...ke];
|
|
2117
|
+
function Nt(t) {
|
|
2118
|
+
return kt(t.animate) || Ne.some((e) => ht(t[e]));
|
|
2119
|
+
}
|
|
2120
|
+
function Ds(t) {
|
|
2121
|
+
return !!(Nt(t) || t.variants);
|
|
2122
|
+
}
|
|
2123
|
+
function po(t, e) {
|
|
2124
|
+
if (Nt(t)) {
|
|
2125
|
+
const { initial: n, animate: s } = t;
|
|
2126
|
+
return {
|
|
2127
|
+
initial: n === !1 || ht(n) ? n : void 0,
|
|
2128
|
+
animate: ht(s) ? s : void 0
|
|
2129
|
+
};
|
|
2130
|
+
}
|
|
2131
|
+
return t.inherit !== !1 ? e : {};
|
|
2132
|
+
}
|
|
2133
|
+
function mo(t) {
|
|
2134
|
+
const { initial: e, animate: n } = po(t, E(It));
|
|
2135
|
+
return Y(() => ({ initial: e, animate: n }), [yn(e), yn(n)]);
|
|
2136
|
+
}
|
|
2137
|
+
function yn(t) {
|
|
2138
|
+
return Array.isArray(t) ? t.join(" ") : t;
|
|
2139
|
+
}
|
|
2140
|
+
const go = Symbol.for("motionComponentSymbol");
|
|
2141
|
+
function Fs(t) {
|
|
2142
|
+
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
2143
|
+
}
|
|
2144
|
+
function yo(t, e, n) {
|
|
2145
|
+
return St(
|
|
2146
|
+
(s) => {
|
|
2147
|
+
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Fs(n) && (n.current = s));
|
|
2148
|
+
},
|
|
2149
|
+
/**
|
|
2150
|
+
* Only pass a new ref callback to React if we've received a visual element
|
|
2151
|
+
* factory. Otherwise we'll be mounting/remounting every time externalRef
|
|
2152
|
+
* or other dependencies change.
|
|
2153
|
+
*/
|
|
2154
|
+
[e]
|
|
2155
|
+
);
|
|
2156
|
+
}
|
|
2157
|
+
const Le = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), bo = "framerAppearId", Rs = "data-" + Le(bo), To = et({});
|
|
2158
|
+
function vo(t, e, n, s, i) {
|
|
2159
|
+
var T, w;
|
|
2160
|
+
const { visualElement: r } = E(It), o = E(Ie), a = E(Et), u = E(Oe).reducedMotion, l = B(null);
|
|
2161
|
+
s = s || o.renderer, !l.current && s && (l.current = s(t, {
|
|
2162
|
+
visualState: e,
|
|
2163
|
+
parent: r,
|
|
2164
|
+
props: n,
|
|
2165
|
+
presenceContext: a,
|
|
2166
|
+
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
2167
|
+
reducedMotionConfig: u
|
|
2168
|
+
}));
|
|
2169
|
+
const c = l.current, f = E(To);
|
|
2170
|
+
c && !c.projection && i && (c.type === "html" || c.type === "svg") && wo(l.current, n, i, f);
|
|
2171
|
+
const d = B(!1);
|
|
2172
|
+
In(() => {
|
|
2173
|
+
c && d.current && c.update(n, a);
|
|
2174
|
+
});
|
|
2175
|
+
const h = n[Rs], g = B(!!h && !((T = window.MotionHandoffIsComplete) != null && T.call(window, h)) && ((w = window.MotionHasOptimisedAnimation) == null ? void 0 : w.call(window, h)));
|
|
2176
|
+
return Ln(() => {
|
|
2177
|
+
c && (d.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), Yr.render(c.render), g.current && c.animationState && c.animationState.animateChanges());
|
|
2178
|
+
}), Rt(() => {
|
|
2179
|
+
c && (!g.current && c.animationState && c.animationState.animateChanges(), g.current && (queueMicrotask(() => {
|
|
2180
|
+
var p;
|
|
2181
|
+
(p = window.MotionHandoffMarkAsComplete) == null || p.call(window, h);
|
|
2182
|
+
}), g.current = !1));
|
|
2183
|
+
}), c;
|
|
2184
|
+
}
|
|
2185
|
+
function wo(t, e, n, s) {
|
|
2186
|
+
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: u, layoutRoot: l, layoutCrossfade: c } = e;
|
|
2187
|
+
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Es(t.parent)), t.projection.setOptions({
|
|
2188
|
+
layoutId: i,
|
|
2189
|
+
layout: r,
|
|
2190
|
+
alwaysMeasureLayout: !!o || a && Fs(a),
|
|
2191
|
+
visualElement: t,
|
|
2192
|
+
/**
|
|
2193
|
+
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
2194
|
+
* to update by the time layout animations run.
|
|
2195
|
+
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
2196
|
+
* ensuring it gets called if there's no potential layout animations.
|
|
2197
|
+
*
|
|
2198
|
+
*/
|
|
2199
|
+
animationType: typeof r == "string" ? r : "both",
|
|
2200
|
+
initialPromotionConfig: s,
|
|
2201
|
+
crossfade: c,
|
|
2202
|
+
layoutScroll: u,
|
|
2203
|
+
layoutRoot: l
|
|
2204
|
+
});
|
|
2205
|
+
}
|
|
2206
|
+
function Es(t) {
|
|
2207
|
+
if (t)
|
|
2208
|
+
return t.options.allowProjection !== !1 ? t.projection : Es(t.parent);
|
|
2209
|
+
}
|
|
2210
|
+
function xo({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
2211
|
+
t && oe(t);
|
|
2212
|
+
function r(a, u) {
|
|
2213
|
+
let l;
|
|
2214
|
+
const c = {
|
|
2215
|
+
...E(Oe),
|
|
2216
|
+
...a,
|
|
2217
|
+
layoutId: Vo(a)
|
|
2218
|
+
}, { isStatic: f } = c, d = mo(a), h = s(a, f);
|
|
2219
|
+
if (!f && ge) {
|
|
2220
|
+
So(c, t);
|
|
2221
|
+
const g = Ao(c);
|
|
2222
|
+
l = g.MeasureLayout, d.visualElement = vo(i, h, c, e, g.ProjectionNode);
|
|
2223
|
+
}
|
|
2224
|
+
return O.jsxs(It.Provider, { value: d, children: [l && d.visualElement ? O.jsx(l, { visualElement: d.visualElement, ...c }) : null, n(i, a, yo(h, d.visualElement, u), h, f, d.visualElement)] });
|
|
2225
|
+
}
|
|
2226
|
+
r.displayName = `motion.${typeof i == "string" ? i : `create(${i.displayName ?? i.name ?? ""})`}`;
|
|
2227
|
+
const o = Qs(r);
|
|
2228
|
+
return o[go] = i, o;
|
|
2229
|
+
}
|
|
2230
|
+
function Vo({ layoutId: t }) {
|
|
2231
|
+
const e = E(Nn).id;
|
|
2232
|
+
return e && t !== void 0 ? e + "-" + t : t;
|
|
2233
|
+
}
|
|
2234
|
+
function So(t, e) {
|
|
2235
|
+
const n = E(Ie).strict;
|
|
2236
|
+
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
2237
|
+
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
2238
|
+
t.ignoreStrict ? nt(!1, s) : W(!1, s);
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
function Ao(t) {
|
|
2242
|
+
const { drag: e, layout: n } = tt;
|
|
2243
|
+
if (!e && !n)
|
|
2244
|
+
return {};
|
|
2245
|
+
const s = { ...e, ...n };
|
|
2246
|
+
return {
|
|
2247
|
+
MeasureLayout: e != null && e.isEnabled(t) || n != null && n.isEnabled(t) ? s.MeasureLayout : void 0,
|
|
2248
|
+
ProjectionNode: s.ProjectionNode
|
|
2249
|
+
};
|
|
2250
|
+
}
|
|
2251
|
+
const ae = {};
|
|
2252
|
+
function nc(t) {
|
|
2253
|
+
for (const e in t)
|
|
2254
|
+
ae[e] = t[e], we(e) && (ae[e].isCSSVariable = !0);
|
|
2255
|
+
}
|
|
2256
|
+
function Os(t, { layout: e, layoutId: n }) {
|
|
2257
|
+
return at.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ae[t] || t === "opacity");
|
|
2258
|
+
}
|
|
2259
|
+
const Mo = {
|
|
2260
|
+
x: "translateX",
|
|
2261
|
+
y: "translateY",
|
|
2262
|
+
z: "translateZ",
|
|
2263
|
+
transformPerspective: "perspective"
|
|
2264
|
+
}, Co = ot.length;
|
|
2265
|
+
function Po(t, e, n) {
|
|
2266
|
+
let s = "", i = !0;
|
|
2267
|
+
for (let r = 0; r < Co; r++) {
|
|
2268
|
+
const o = ot[r], a = t[o];
|
|
2269
|
+
if (a === void 0)
|
|
2270
|
+
continue;
|
|
2271
|
+
let u = !0;
|
|
2272
|
+
if (typeof a == "number" ? u = a === (o.startsWith("scale") ? 1 : 0) : u = parseFloat(a) === 0, !u || n) {
|
|
2273
|
+
const l = Vs(a, Ee[o]);
|
|
2274
|
+
if (!u) {
|
|
2275
|
+
i = !1;
|
|
2276
|
+
const c = Mo[o] || o;
|
|
2277
|
+
s += `${c}(${l}) `;
|
|
2278
|
+
}
|
|
2279
|
+
n && (e[o] = l);
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
|
|
2283
|
+
}
|
|
2284
|
+
function Be(t, e, n) {
|
|
2285
|
+
const { style: s, vars: i, transformOrigin: r } = t;
|
|
2286
|
+
let o = !1, a = !1;
|
|
2287
|
+
for (const u in e) {
|
|
2288
|
+
const l = e[u];
|
|
2289
|
+
if (at.has(u)) {
|
|
2290
|
+
o = !0;
|
|
2291
|
+
continue;
|
|
2292
|
+
} else if (we(u)) {
|
|
2293
|
+
i[u] = l;
|
|
2294
|
+
continue;
|
|
2295
|
+
} else {
|
|
2296
|
+
const c = Vs(l, Ee[u]);
|
|
2297
|
+
u.startsWith("origin") ? (a = !0, r[u] = c) : s[u] = c;
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
if (e.transform || (o || n ? s.transform = Po(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2301
|
+
const { originX: u = "50%", originY: l = "50%", originZ: c = 0 } = r;
|
|
2302
|
+
s.transformOrigin = `${u} ${l} ${c}`;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
const Ke = () => ({
|
|
2306
|
+
style: {},
|
|
2307
|
+
transform: {},
|
|
2308
|
+
transformOrigin: {},
|
|
2309
|
+
vars: {}
|
|
2310
|
+
});
|
|
2311
|
+
function Is(t, e, n) {
|
|
2312
|
+
for (const s in e)
|
|
2313
|
+
!F(e[s]) && !Os(s, n) && (t[s] = e[s]);
|
|
2314
|
+
}
|
|
2315
|
+
function Do({ transformTemplate: t }, e) {
|
|
2316
|
+
return Y(() => {
|
|
2317
|
+
const n = Ke();
|
|
2318
|
+
return Be(n, e, t), Object.assign({}, n.vars, n.style);
|
|
2319
|
+
}, [e]);
|
|
2320
|
+
}
|
|
2321
|
+
function Fo(t, e) {
|
|
2322
|
+
const n = t.style || {}, s = {};
|
|
2323
|
+
return Is(s, n, t), Object.assign(s, Do(t, e)), s;
|
|
2324
|
+
}
|
|
2325
|
+
function Ro(t, e) {
|
|
2326
|
+
const n = {}, s = Fo(t, e);
|
|
2327
|
+
return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.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 = s, n;
|
|
2328
|
+
}
|
|
2329
|
+
const Eo = {
|
|
2330
|
+
offset: "stroke-dashoffset",
|
|
2331
|
+
array: "stroke-dasharray"
|
|
2332
|
+
}, Oo = {
|
|
2333
|
+
offset: "strokeDashoffset",
|
|
2334
|
+
array: "strokeDasharray"
|
|
2335
|
+
};
|
|
2336
|
+
function Io(t, e, n = 1, s = 0, i = !0) {
|
|
2337
|
+
t.pathLength = 1;
|
|
2338
|
+
const r = i ? Eo : Oo;
|
|
2339
|
+
t[r.offset] = b.transform(-s);
|
|
2340
|
+
const o = b.transform(e), a = b.transform(n);
|
|
2341
|
+
t[r.array] = `${o} ${a}`;
|
|
2342
|
+
}
|
|
2343
|
+
function ks(t, {
|
|
2344
|
+
attrX: e,
|
|
2345
|
+
attrY: n,
|
|
2346
|
+
attrScale: s,
|
|
2347
|
+
pathLength: i,
|
|
2348
|
+
pathSpacing: r = 1,
|
|
2349
|
+
pathOffset: o = 0,
|
|
2350
|
+
// This is object creation, which we try to avoid per-frame.
|
|
2351
|
+
...a
|
|
2352
|
+
}, u, l, c) {
|
|
2353
|
+
if (Be(t, a, l), u) {
|
|
2354
|
+
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2355
|
+
return;
|
|
2356
|
+
}
|
|
2357
|
+
t.attrs = t.style, t.style = {};
|
|
2358
|
+
const { attrs: f, style: d } = t;
|
|
2359
|
+
f.transform && (d.transform = f.transform, delete f.transform), (d.transform || f.transformOrigin) && (d.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), d.transform && (d.transformBox = (c == null ? void 0 : c.transformBox) ?? "fill-box", delete f.transformBox), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), i !== void 0 && Io(f, i, r, o, !1);
|
|
2360
|
+
}
|
|
2361
|
+
const Ns = () => ({
|
|
2362
|
+
...Ke(),
|
|
2363
|
+
attrs: {}
|
|
2364
|
+
}), Ls = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2365
|
+
function ko(t, e, n, s) {
|
|
2366
|
+
const i = Y(() => {
|
|
2367
|
+
const r = Ns();
|
|
2368
|
+
return ks(r, e, Ls(s), t.transformTemplate, t.style), {
|
|
2369
|
+
...r.attrs,
|
|
2370
|
+
style: { ...r.style }
|
|
2371
|
+
};
|
|
2372
|
+
}, [e]);
|
|
2373
|
+
if (t.style) {
|
|
2374
|
+
const r = {};
|
|
2375
|
+
Is(r, t.style, t), i.style = { ...r, ...i.style };
|
|
2376
|
+
}
|
|
2377
|
+
return i;
|
|
2378
|
+
}
|
|
2379
|
+
const No = [
|
|
2380
|
+
"animate",
|
|
2381
|
+
"circle",
|
|
2382
|
+
"defs",
|
|
2383
|
+
"desc",
|
|
2384
|
+
"ellipse",
|
|
2385
|
+
"g",
|
|
2386
|
+
"image",
|
|
2387
|
+
"line",
|
|
2388
|
+
"filter",
|
|
2389
|
+
"marker",
|
|
2390
|
+
"mask",
|
|
2391
|
+
"metadata",
|
|
2392
|
+
"path",
|
|
2393
|
+
"pattern",
|
|
2394
|
+
"polygon",
|
|
2395
|
+
"polyline",
|
|
2396
|
+
"rect",
|
|
2397
|
+
"stop",
|
|
2398
|
+
"switch",
|
|
2399
|
+
"symbol",
|
|
2400
|
+
"svg",
|
|
2401
|
+
"text",
|
|
2402
|
+
"tspan",
|
|
2403
|
+
"use",
|
|
2404
|
+
"view"
|
|
2405
|
+
];
|
|
2406
|
+
function je(t) {
|
|
2407
|
+
return (
|
|
2408
|
+
/**
|
|
2409
|
+
* If it's not a string, it's a custom React component. Currently we only support
|
|
2410
|
+
* HTML custom React components.
|
|
2411
|
+
*/
|
|
2412
|
+
typeof t != "string" || /**
|
|
2413
|
+
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
2414
|
+
*/
|
|
2415
|
+
t.includes("-") ? !1 : (
|
|
2416
|
+
/**
|
|
2417
|
+
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
2418
|
+
*/
|
|
2419
|
+
!!(No.indexOf(t) > -1 || /**
|
|
2420
|
+
* If it contains a capital letter, it's an SVG component
|
|
2421
|
+
*/
|
|
2422
|
+
/[A-Z]/u.test(t))
|
|
2423
|
+
)
|
|
2424
|
+
);
|
|
2425
|
+
}
|
|
2426
|
+
function Lo(t = !1) {
|
|
2427
|
+
return (n, s, i, { latestValues: r }, o) => {
|
|
2428
|
+
const u = (je(n) ? ko : Ro)(s, r, o, n), l = fo(s, typeof n == "string", t), c = n !== kn ? { ...l, ...u, ref: i } : {}, { children: f } = s, d = Y(() => F(f) ? f.get() : f, [f]);
|
|
2429
|
+
return ti(n, {
|
|
2430
|
+
...c,
|
|
2431
|
+
children: d
|
|
2432
|
+
});
|
|
2433
|
+
};
|
|
2434
|
+
}
|
|
2435
|
+
function bn(t) {
|
|
2436
|
+
const e = [{}, {}];
|
|
2437
|
+
return t == null || t.values.forEach((n, s) => {
|
|
2438
|
+
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
2439
|
+
}), e;
|
|
2440
|
+
}
|
|
2441
|
+
function $e(t, e, n, s) {
|
|
2442
|
+
if (typeof e == "function") {
|
|
2443
|
+
const [i, r] = bn(s);
|
|
2444
|
+
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
2445
|
+
}
|
|
2446
|
+
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
2447
|
+
const [i, r] = bn(s);
|
|
2448
|
+
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
2449
|
+
}
|
|
2450
|
+
return e;
|
|
2451
|
+
}
|
|
2452
|
+
function Bo(t) {
|
|
2453
|
+
return F(t) ? t.get() : t;
|
|
2454
|
+
}
|
|
2455
|
+
function Ko({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
2456
|
+
return {
|
|
2457
|
+
latestValues: jo(n, s, i, t),
|
|
2458
|
+
renderState: e()
|
|
2459
|
+
};
|
|
2460
|
+
}
|
|
2461
|
+
const Bs = (t) => (e, n) => {
|
|
2462
|
+
const s = E(It), i = E(Et), r = () => Ko(t, e, s, i);
|
|
2463
|
+
return n ? r() : me(r);
|
|
2464
|
+
};
|
|
2465
|
+
function jo(t, e, n, s) {
|
|
2466
|
+
const i = {}, r = s(t, {});
|
|
2467
|
+
for (const d in r)
|
|
2468
|
+
i[d] = Bo(r[d]);
|
|
2469
|
+
let { initial: o, animate: a } = t;
|
|
2470
|
+
const u = Nt(t), l = Ds(t);
|
|
2471
|
+
e && l && !u && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
|
|
2472
|
+
let c = n ? n.initial === !1 : !1;
|
|
2473
|
+
c = c || o === !1;
|
|
2474
|
+
const f = c ? a : o;
|
|
2475
|
+
if (f && typeof f != "boolean" && !kt(f)) {
|
|
2476
|
+
const d = Array.isArray(f) ? f : [f];
|
|
2477
|
+
for (let h = 0; h < d.length; h++) {
|
|
2478
|
+
const g = $e(t, d[h]);
|
|
2479
|
+
if (g) {
|
|
2480
|
+
const { transitionEnd: T, transition: w, ...p } = g;
|
|
2481
|
+
for (const V in p) {
|
|
2482
|
+
let y = p[V];
|
|
2483
|
+
if (Array.isArray(y)) {
|
|
2484
|
+
const S = c ? y.length - 1 : 0;
|
|
2485
|
+
y = y[S];
|
|
2486
|
+
}
|
|
2487
|
+
y !== null && (i[V] = y);
|
|
2488
|
+
}
|
|
2489
|
+
for (const V in T)
|
|
2490
|
+
i[V] = T[V];
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
return i;
|
|
2495
|
+
}
|
|
2496
|
+
function We(t, e, n) {
|
|
2497
|
+
var r;
|
|
2498
|
+
const { style: s } = t, i = {};
|
|
2499
|
+
for (const o in s)
|
|
2500
|
+
(F(s[o]) || e.style && F(e.style[o]) || Os(o, t) || ((r = n == null ? void 0 : n.getValue(o)) == null ? void 0 : r.liveStyle) !== void 0) && (i[o] = s[o]);
|
|
2501
|
+
return i;
|
|
2502
|
+
}
|
|
2503
|
+
const $o = {
|
|
2504
|
+
useVisualState: Bs({
|
|
2505
|
+
scrapeMotionValuesFromProps: We,
|
|
2506
|
+
createRenderState: Ke
|
|
2507
|
+
})
|
|
2508
|
+
};
|
|
2509
|
+
function Ks(t, e, n) {
|
|
2510
|
+
const s = We(t, e, n);
|
|
2511
|
+
for (const i in t)
|
|
2512
|
+
if (F(t[i]) || F(e[i])) {
|
|
2513
|
+
const r = ot.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2514
|
+
s[r] = t[i];
|
|
2515
|
+
}
|
|
2516
|
+
return s;
|
|
2517
|
+
}
|
|
2518
|
+
const Wo = {
|
|
2519
|
+
useVisualState: Bs({
|
|
2520
|
+
scrapeMotionValuesFromProps: Ks,
|
|
2521
|
+
createRenderState: Ns
|
|
2522
|
+
})
|
|
2523
|
+
};
|
|
2524
|
+
function _o(t, e) {
|
|
2525
|
+
return function(s, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
|
|
2526
|
+
const o = {
|
|
2527
|
+
...je(s) ? Wo : $o,
|
|
2528
|
+
preloadedFeatures: t,
|
|
2529
|
+
useRender: Lo(i),
|
|
2530
|
+
createVisualElement: e,
|
|
2531
|
+
Component: s
|
|
2532
|
+
};
|
|
2533
|
+
return xo(o);
|
|
2534
|
+
};
|
|
2535
|
+
}
|
|
2536
|
+
const zo = /* @__PURE__ */ _o(), Uo = /* @__PURE__ */ ho(zo);
|
|
2537
|
+
function pt(t, e, n) {
|
|
2538
|
+
const s = t.getProps();
|
|
2539
|
+
return $e(s, e, n !== void 0 ? n : s.custom, t);
|
|
2540
|
+
}
|
|
2541
|
+
const ce = (t) => Array.isArray(t);
|
|
2542
|
+
function Go(t, e, n) {
|
|
2543
|
+
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Dt(n));
|
|
2544
|
+
}
|
|
2545
|
+
function Ho(t) {
|
|
2546
|
+
return ce(t) ? t[t.length - 1] || 0 : t;
|
|
2547
|
+
}
|
|
2548
|
+
function Yo(t, e) {
|
|
2549
|
+
const n = pt(t, e);
|
|
2550
|
+
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
2551
|
+
r = { ...r, ...s };
|
|
2552
|
+
for (const o in r) {
|
|
2553
|
+
const a = Ho(r[o]);
|
|
2554
|
+
Go(t, o, a);
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
function Xo(t) {
|
|
2558
|
+
return !!(F(t) && t.add);
|
|
2559
|
+
}
|
|
2560
|
+
function qo(t, e) {
|
|
2561
|
+
const n = t.getValue("willChange");
|
|
2562
|
+
if (Xo(n))
|
|
2563
|
+
return n.add(e);
|
|
2564
|
+
if (!n && j.WillChange) {
|
|
2565
|
+
const s = new j.WillChange("auto");
|
|
2566
|
+
t.addValue("willChange", s), s.add(e);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
function Zo(t) {
|
|
2570
|
+
return t.props[Rs];
|
|
2571
|
+
}
|
|
2572
|
+
const Jo = (t) => t !== null;
|
|
2573
|
+
function Qo(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
2574
|
+
const i = t.filter(Jo), r = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
|
|
2575
|
+
return i[r];
|
|
2576
|
+
}
|
|
2577
|
+
const ta = {
|
|
2578
|
+
type: "spring",
|
|
2579
|
+
stiffness: 500,
|
|
2580
|
+
damping: 25,
|
|
2581
|
+
restSpeed: 10
|
|
2582
|
+
}, ea = (t) => ({
|
|
2583
|
+
type: "spring",
|
|
2584
|
+
stiffness: 550,
|
|
2585
|
+
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2586
|
+
restSpeed: 10
|
|
2587
|
+
}), na = {
|
|
2588
|
+
type: "keyframes",
|
|
2589
|
+
duration: 0.8
|
|
2590
|
+
}, sa = {
|
|
2591
|
+
type: "keyframes",
|
|
2592
|
+
ease: [0.25, 0.1, 0.35, 1],
|
|
2593
|
+
duration: 0.3
|
|
2594
|
+
}, ia = (t, { keyframes: e }) => e.length > 2 ? na : at.has(t) ? t.startsWith("scale") ? ea(e[1]) : ta : sa;
|
|
2595
|
+
function ra({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: u, elapsed: l, ...c }) {
|
|
2596
|
+
return !!Object.keys(c).length;
|
|
2597
|
+
}
|
|
2598
|
+
const oa = (t, e, n, s = {}, i, r) => (o) => {
|
|
2599
|
+
const a = ys(s, t) || {}, u = a.delay || s.delay || 0;
|
|
2600
|
+
let { elapsed: l = 0 } = s;
|
|
2601
|
+
l = l - /* @__PURE__ */ N(u);
|
|
2602
|
+
const c = {
|
|
2603
|
+
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2604
|
+
ease: "easeOut",
|
|
2605
|
+
velocity: e.getVelocity(),
|
|
2606
|
+
...a,
|
|
2607
|
+
delay: -l,
|
|
2608
|
+
onUpdate: (d) => {
|
|
2609
|
+
e.set(d), a.onUpdate && a.onUpdate(d);
|
|
2610
|
+
},
|
|
2611
|
+
onComplete: () => {
|
|
2612
|
+
o(), a.onComplete && a.onComplete();
|
|
2613
|
+
},
|
|
2614
|
+
name: t,
|
|
2615
|
+
motionValue: e,
|
|
2616
|
+
element: r ? void 0 : i
|
|
2617
|
+
};
|
|
2618
|
+
ra(a) || Object.assign(c, ia(t, c)), c.duration && (c.duration = /* @__PURE__ */ N(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ N(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
2619
|
+
let f = !1;
|
|
2620
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (f = !0)), (j.instantAnimations || j.skipAnimations) && (f = !0, c.duration = 0, c.delay = 0), c.allowFlatten = !a.type && !a.ease, f && !r && e.get() !== void 0) {
|
|
2621
|
+
const d = Qo(c.keyframes, a);
|
|
2622
|
+
if (d !== void 0) {
|
|
2623
|
+
k.update(() => {
|
|
2624
|
+
c.onUpdate(d), c.onComplete();
|
|
2625
|
+
});
|
|
2626
|
+
return;
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
return a.isSync ? new De(c) : new Rr(c);
|
|
2630
|
+
};
|
|
2631
|
+
function aa({ protectedKeys: t, needsAnimating: e }, n) {
|
|
2632
|
+
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
2633
|
+
return e[n] = !1, s;
|
|
2634
|
+
}
|
|
2635
|
+
function js(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
2636
|
+
let { transition: r = t.getDefaultTransition(), transitionEnd: o, ...a } = e;
|
|
2637
|
+
s && (r = s);
|
|
2638
|
+
const u = [], l = i && t.animationState && t.animationState.getState()[i];
|
|
2639
|
+
for (const c in a) {
|
|
2640
|
+
const f = t.getValue(c, t.latestValues[c] ?? null), d = a[c];
|
|
2641
|
+
if (d === void 0 || l && aa(l, c))
|
|
2642
|
+
continue;
|
|
2643
|
+
const h = {
|
|
2644
|
+
delay: n,
|
|
2645
|
+
...ys(r || {}, c)
|
|
2646
|
+
}, g = f.get();
|
|
2647
|
+
if (g !== void 0 && !f.isAnimating && !Array.isArray(d) && d === g && !h.velocity)
|
|
2648
|
+
continue;
|
|
2649
|
+
let T = !1;
|
|
2650
|
+
if (window.MotionHandoffAnimation) {
|
|
2651
|
+
const p = Zo(t);
|
|
2652
|
+
if (p) {
|
|
2653
|
+
const V = window.MotionHandoffAnimation(p, c, k);
|
|
2654
|
+
V !== null && (h.startTime = V, T = !0);
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
qo(t, c), f.start(oa(c, f, d, t.shouldReduceMotion && bs.has(c) ? { type: !1 } : h, t, T));
|
|
2658
|
+
const w = f.animation;
|
|
2659
|
+
w && u.push(w);
|
|
2660
|
+
}
|
|
2661
|
+
return o && Promise.all(u).then(() => {
|
|
2662
|
+
k.update(() => {
|
|
2663
|
+
o && Yo(t, o);
|
|
2664
|
+
});
|
|
2665
|
+
}), u;
|
|
2666
|
+
}
|
|
2667
|
+
function ue(t, e, n = {}) {
|
|
2668
|
+
var u;
|
|
2669
|
+
const s = pt(t, e, n.type === "exit" ? (u = t.presenceContext) == null ? void 0 : u.custom : void 0);
|
|
2670
|
+
let { transition: i = t.getDefaultTransition() || {} } = s || {};
|
|
2671
|
+
n.transitionOverride && (i = n.transitionOverride);
|
|
2672
|
+
const r = s ? () => Promise.all(js(t, s, n)) : () => Promise.resolve(), o = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
2673
|
+
const { delayChildren: c = 0, staggerChildren: f, staggerDirection: d } = i;
|
|
2674
|
+
return ca(t, e, c + l, f, d, n);
|
|
2675
|
+
} : () => Promise.resolve(), { when: a } = i;
|
|
2676
|
+
if (a) {
|
|
2677
|
+
const [l, c] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
2678
|
+
return l().then(() => c());
|
|
2679
|
+
} else
|
|
2680
|
+
return Promise.all([r(), o(n.delay)]);
|
|
2681
|
+
}
|
|
2682
|
+
function ca(t, e, n = 0, s = 0, i = 1, r) {
|
|
2683
|
+
const o = [], a = (t.variantChildren.size - 1) * s, u = i === 1 ? (l = 0) => l * s : (l = 0) => a - l * s;
|
|
2684
|
+
return Array.from(t.variantChildren).sort(ua).forEach((l, c) => {
|
|
2685
|
+
l.notify("AnimationStart", e), o.push(ue(l, e, {
|
|
2686
|
+
...r,
|
|
2687
|
+
delay: n + u(c)
|
|
2688
|
+
}).then(() => l.notify("AnimationComplete", e)));
|
|
2689
|
+
}), Promise.all(o);
|
|
2690
|
+
}
|
|
2691
|
+
function ua(t, e) {
|
|
2692
|
+
return t.sortNodePosition(e);
|
|
2693
|
+
}
|
|
2694
|
+
function la(t, e, n = {}) {
|
|
2695
|
+
t.notify("AnimationStart", e);
|
|
2696
|
+
let s;
|
|
2697
|
+
if (Array.isArray(e)) {
|
|
2698
|
+
const i = e.map((r) => ue(t, r, n));
|
|
2699
|
+
s = Promise.all(i);
|
|
2700
|
+
} else if (typeof e == "string")
|
|
2701
|
+
s = ue(t, e, n);
|
|
2702
|
+
else {
|
|
2703
|
+
const i = typeof e == "function" ? pt(t, e, n.custom) : e;
|
|
2704
|
+
s = Promise.all(js(t, i, n));
|
|
2705
|
+
}
|
|
2706
|
+
return s.then(() => {
|
|
2707
|
+
t.notify("AnimationComplete", e);
|
|
2708
|
+
});
|
|
2709
|
+
}
|
|
2710
|
+
function $s(t, e) {
|
|
2711
|
+
if (!Array.isArray(e))
|
|
2712
|
+
return !1;
|
|
2713
|
+
const n = e.length;
|
|
2714
|
+
if (n !== t.length)
|
|
2715
|
+
return !1;
|
|
2716
|
+
for (let s = 0; s < n; s++)
|
|
2717
|
+
if (e[s] !== t[s])
|
|
2718
|
+
return !1;
|
|
2719
|
+
return !0;
|
|
2720
|
+
}
|
|
2721
|
+
const fa = Ne.length;
|
|
2722
|
+
function Ws(t) {
|
|
2723
|
+
if (!t)
|
|
2724
|
+
return;
|
|
2725
|
+
if (!t.isControllingVariants) {
|
|
2726
|
+
const n = t.parent ? Ws(t.parent) || {} : {};
|
|
2727
|
+
return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
|
|
2728
|
+
}
|
|
2729
|
+
const e = {};
|
|
2730
|
+
for (let n = 0; n < fa; n++) {
|
|
2731
|
+
const s = Ne[n], i = t.props[s];
|
|
2732
|
+
(ht(i) || i === !1) && (e[s] = i);
|
|
2733
|
+
}
|
|
2734
|
+
return e;
|
|
2735
|
+
}
|
|
2736
|
+
const da = [...ke].reverse(), ha = ke.length;
|
|
2737
|
+
function pa(t) {
|
|
2738
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => la(t, n, s)));
|
|
2739
|
+
}
|
|
2740
|
+
function ma(t) {
|
|
2741
|
+
let e = pa(t), n = Tn(), s = !0;
|
|
2742
|
+
const i = (u) => (l, c) => {
|
|
2743
|
+
var d;
|
|
2744
|
+
const f = pt(t, c, u === "exit" ? (d = t.presenceContext) == null ? void 0 : d.custom : void 0);
|
|
2745
|
+
if (f) {
|
|
2746
|
+
const { transition: h, transitionEnd: g, ...T } = f;
|
|
2747
|
+
l = { ...l, ...T, ...g };
|
|
2748
|
+
}
|
|
2749
|
+
return l;
|
|
2750
|
+
};
|
|
2751
|
+
function r(u) {
|
|
2752
|
+
e = u(t);
|
|
2753
|
+
}
|
|
2754
|
+
function o(u) {
|
|
2755
|
+
const { props: l } = t, c = Ws(t.parent) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
2756
|
+
let h = {}, g = 1 / 0;
|
|
2757
|
+
for (let w = 0; w < ha; w++) {
|
|
2758
|
+
const p = da[w], V = n[p], y = l[p] !== void 0 ? l[p] : c[p], S = ht(y), m = p === u ? V.isActive : null;
|
|
2759
|
+
m === !1 && (g = w);
|
|
2760
|
+
let v = y === c[p] && y !== l[p] && S;
|
|
2761
|
+
if (v && s && t.manuallyAnimateOnMount && (v = !1), V.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
|
|
2762
|
+
!V.isActive && m === null || // If we didn't and don't have any defined prop for this animation type
|
|
2763
|
+
!y && !V.prevProp || // Or if the prop doesn't define an animation
|
|
2764
|
+
kt(y) || typeof y == "boolean")
|
|
2765
|
+
continue;
|
|
2766
|
+
const A = ga(V.prevProp, y);
|
|
2767
|
+
let x = A || // If we're making this variant active, we want to always make it active
|
|
2768
|
+
p === u && V.isActive && !v && S || // If we removed a higher-priority variant (i is in reverse order)
|
|
2769
|
+
w > g && S, P = !1;
|
|
2770
|
+
const R = Array.isArray(y) ? y : [y];
|
|
2771
|
+
let q = R.reduce(i(p), {});
|
|
2772
|
+
m === !1 && (q = {});
|
|
2773
|
+
const { prevResolvedValues: ze = {} } = V, Xs = {
|
|
2774
|
+
...ze,
|
|
2775
|
+
...q
|
|
2776
|
+
}, Ue = (D) => {
|
|
2777
|
+
x = !0, d.has(D) && (P = !0, d.delete(D)), V.needsAnimating[D] = !0;
|
|
2778
|
+
const L = t.getValue(D);
|
|
2779
|
+
L && (L.liveStyle = !1);
|
|
2780
|
+
};
|
|
2781
|
+
for (const D in Xs) {
|
|
2782
|
+
const L = q[D], Lt = ze[D];
|
|
2783
|
+
if (h.hasOwnProperty(D))
|
|
2784
|
+
continue;
|
|
2785
|
+
let Bt = !1;
|
|
2786
|
+
ce(L) && ce(Lt) ? Bt = !$s(L, Lt) : Bt = L !== Lt, Bt ? L != null ? Ue(D) : d.add(D) : L !== void 0 && d.has(D) ? Ue(D) : V.protectedKeys[D] = !0;
|
|
2787
|
+
}
|
|
2788
|
+
V.prevProp = y, V.prevResolvedValues = q, V.isActive && (h = { ...h, ...q }), s && t.blockInitialAnimation && (x = !1), x && (!(v && A) || P) && f.push(...R.map((D) => ({
|
|
2789
|
+
animation: D,
|
|
2790
|
+
options: { type: p }
|
|
2791
|
+
})));
|
|
2792
|
+
}
|
|
2793
|
+
if (d.size) {
|
|
2794
|
+
const w = {};
|
|
2795
|
+
if (typeof l.initial != "boolean") {
|
|
2796
|
+
const p = pt(t, Array.isArray(l.initial) ? l.initial[0] : l.initial);
|
|
2797
|
+
p && p.transition && (w.transition = p.transition);
|
|
2798
|
+
}
|
|
2799
|
+
d.forEach((p) => {
|
|
2800
|
+
const V = t.getBaseTarget(p), y = t.getValue(p);
|
|
2801
|
+
y && (y.liveStyle = !0), w[p] = V ?? null;
|
|
2802
|
+
}), f.push({ animation: w });
|
|
2803
|
+
}
|
|
2804
|
+
let T = !!f.length;
|
|
2805
|
+
return s && (l.initial === !1 || l.initial === l.animate) && !t.manuallyAnimateOnMount && (T = !1), s = !1, T ? e(f) : Promise.resolve();
|
|
2806
|
+
}
|
|
2807
|
+
function a(u, l) {
|
|
2808
|
+
var f;
|
|
2809
|
+
if (n[u].isActive === l)
|
|
2810
|
+
return Promise.resolve();
|
|
2811
|
+
(f = t.variantChildren) == null || f.forEach((d) => {
|
|
2812
|
+
var h;
|
|
2813
|
+
return (h = d.animationState) == null ? void 0 : h.setActive(u, l);
|
|
2814
|
+
}), n[u].isActive = l;
|
|
2815
|
+
const c = o(u);
|
|
2816
|
+
for (const d in n)
|
|
2817
|
+
n[d].protectedKeys = {};
|
|
2818
|
+
return c;
|
|
2819
|
+
}
|
|
2820
|
+
return {
|
|
2821
|
+
animateChanges: o,
|
|
2822
|
+
setActive: a,
|
|
2823
|
+
setAnimateFunction: r,
|
|
2824
|
+
getState: () => n,
|
|
2825
|
+
reset: () => {
|
|
2826
|
+
n = Tn(), s = !0;
|
|
2827
|
+
}
|
|
2828
|
+
};
|
|
2829
|
+
}
|
|
2830
|
+
function ga(t, e) {
|
|
2831
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !$s(e, t) : !1;
|
|
2832
|
+
}
|
|
2833
|
+
function _(t = !1) {
|
|
2834
|
+
return {
|
|
2835
|
+
isActive: t,
|
|
2836
|
+
protectedKeys: {},
|
|
2837
|
+
needsAnimating: {},
|
|
2838
|
+
prevResolvedValues: {}
|
|
2839
|
+
};
|
|
2840
|
+
}
|
|
2841
|
+
function Tn() {
|
|
2842
|
+
return {
|
|
2843
|
+
animate: _(!0),
|
|
2844
|
+
whileInView: _(),
|
|
2845
|
+
whileHover: _(),
|
|
2846
|
+
whileTap: _(),
|
|
2847
|
+
whileDrag: _(),
|
|
2848
|
+
whileFocus: _(),
|
|
2849
|
+
exit: _()
|
|
2850
|
+
};
|
|
2851
|
+
}
|
|
2852
|
+
class ct {
|
|
2853
|
+
constructor(e) {
|
|
2854
|
+
this.isMounted = !1, this.node = e;
|
|
2855
|
+
}
|
|
2856
|
+
update() {
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
class ya extends ct {
|
|
2860
|
+
/**
|
|
2861
|
+
* We dynamically generate the AnimationState manager as it contains a reference
|
|
2862
|
+
* to the underlying animation library. We only want to load that if we load this,
|
|
2863
|
+
* so people can optionally code split it out using the `m` component.
|
|
2864
|
+
*/
|
|
2865
|
+
constructor(e) {
|
|
2866
|
+
super(e), e.animationState || (e.animationState = ma(e));
|
|
2867
|
+
}
|
|
2868
|
+
updateAnimationControlsSubscription() {
|
|
2869
|
+
const { animate: e } = this.node.getProps();
|
|
2870
|
+
kt(e) && (this.unmountControls = e.subscribe(this.node));
|
|
2871
|
+
}
|
|
2872
|
+
/**
|
|
2873
|
+
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
2874
|
+
*/
|
|
2875
|
+
mount() {
|
|
2876
|
+
this.updateAnimationControlsSubscription();
|
|
2877
|
+
}
|
|
2878
|
+
update() {
|
|
2879
|
+
const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
|
|
2880
|
+
e !== n && this.updateAnimationControlsSubscription();
|
|
2881
|
+
}
|
|
2882
|
+
unmount() {
|
|
2883
|
+
var e;
|
|
2884
|
+
this.node.animationState.reset(), (e = this.unmountControls) == null || e.call(this);
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
let ba = 0;
|
|
2888
|
+
class Ta extends ct {
|
|
2889
|
+
constructor() {
|
|
2890
|
+
super(...arguments), this.id = ba++;
|
|
2891
|
+
}
|
|
2892
|
+
update() {
|
|
2893
|
+
if (!this.node.presenceContext)
|
|
2894
|
+
return;
|
|
2895
|
+
const { isPresent: e, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
|
|
2896
|
+
if (!this.node.animationState || e === s)
|
|
2897
|
+
return;
|
|
2898
|
+
const i = this.node.animationState.setActive("exit", !e);
|
|
2899
|
+
n && !e && i.then(() => {
|
|
2900
|
+
n(this.id);
|
|
2901
|
+
});
|
|
2902
|
+
}
|
|
2903
|
+
mount() {
|
|
2904
|
+
const { register: e, onExitComplete: n } = this.node.presenceContext || {};
|
|
2905
|
+
n && n(this.id), e && (this.unmount = e(this.id));
|
|
2906
|
+
}
|
|
2907
|
+
unmount() {
|
|
2908
|
+
}
|
|
2909
|
+
}
|
|
2910
|
+
const va = {
|
|
2911
|
+
animation: {
|
|
2912
|
+
Feature: ya
|
|
2913
|
+
},
|
|
2914
|
+
exit: {
|
|
2915
|
+
Feature: Ta
|
|
2916
|
+
}
|
|
2917
|
+
};
|
|
2918
|
+
function vn(t, e, n, s = { passive: !0 }) {
|
|
2919
|
+
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
2920
|
+
}
|
|
2921
|
+
function _e(t) {
|
|
2922
|
+
return {
|
|
2923
|
+
point: {
|
|
2924
|
+
x: t.pageX,
|
|
2925
|
+
y: t.pageY
|
|
2926
|
+
}
|
|
2927
|
+
};
|
|
2928
|
+
}
|
|
2929
|
+
const sc = (t) => (e) => Cs(e) && t(e, _e(e));
|
|
2930
|
+
function wa({ top: t, left: e, right: n, bottom: s }) {
|
|
2931
|
+
return {
|
|
2932
|
+
x: { min: e, max: n },
|
|
2933
|
+
y: { min: t, max: s }
|
|
2934
|
+
};
|
|
2935
|
+
}
|
|
2936
|
+
function ic({ x: t, y: e }) {
|
|
2937
|
+
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
2938
|
+
}
|
|
2939
|
+
function xa(t, e) {
|
|
2940
|
+
if (!e)
|
|
2941
|
+
return t;
|
|
2942
|
+
const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
|
|
2943
|
+
return {
|
|
2944
|
+
top: n.y,
|
|
2945
|
+
left: n.x,
|
|
2946
|
+
bottom: s.y,
|
|
2947
|
+
right: s.x
|
|
2948
|
+
};
|
|
2949
|
+
}
|
|
2950
|
+
const wn = () => ({
|
|
2951
|
+
translate: 0,
|
|
2952
|
+
scale: 1,
|
|
2953
|
+
origin: 0,
|
|
2954
|
+
originPoint: 0
|
|
2955
|
+
}), rc = () => ({
|
|
2956
|
+
x: wn(),
|
|
2957
|
+
y: wn()
|
|
2958
|
+
}), xn = () => ({ min: 0, max: 0 }), _s = () => ({
|
|
2959
|
+
x: xn(),
|
|
2960
|
+
y: xn()
|
|
2961
|
+
});
|
|
2962
|
+
function Ut(t) {
|
|
2963
|
+
return t === void 0 || t === 1;
|
|
2964
|
+
}
|
|
2965
|
+
function Va({ scale: t, scaleX: e, scaleY: n }) {
|
|
2966
|
+
return !Ut(t) || !Ut(e) || !Ut(n);
|
|
2967
|
+
}
|
|
2968
|
+
function Sa(t) {
|
|
2969
|
+
return Va(t) || Aa(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2970
|
+
}
|
|
2971
|
+
function Aa(t) {
|
|
2972
|
+
return Vn(t.x) || Vn(t.y);
|
|
2973
|
+
}
|
|
2974
|
+
function Vn(t) {
|
|
2975
|
+
return t && t !== "0%";
|
|
2976
|
+
}
|
|
2977
|
+
function Sn(t, e, n) {
|
|
2978
|
+
const s = t - n, i = e * s;
|
|
2979
|
+
return n + i;
|
|
2980
|
+
}
|
|
2981
|
+
function An(t, e, n, s, i) {
|
|
2982
|
+
return i !== void 0 && (t = Sn(t, i, s)), Sn(t, n, s) + e;
|
|
2983
|
+
}
|
|
2984
|
+
function le(t, e = 0, n = 1, s, i) {
|
|
2985
|
+
t.min = An(t.min, e, n, s, i), t.max = An(t.max, e, n, s, i);
|
|
2986
|
+
}
|
|
2987
|
+
function Ma(t, { x: e, y: n }) {
|
|
2988
|
+
le(t.x, e.translate, e.scale, e.originPoint), le(t.y, n.translate, n.scale, n.originPoint);
|
|
2989
|
+
}
|
|
2990
|
+
const Mn = 0.999999999999, Cn = 1.0000000000001;
|
|
2991
|
+
function oc(t, e, n, s = !1) {
|
|
2992
|
+
const i = n.length;
|
|
2993
|
+
if (!i)
|
|
2994
|
+
return;
|
|
2995
|
+
e.x = e.y = 1;
|
|
2996
|
+
let r, o;
|
|
2997
|
+
for (let a = 0; a < i; a++) {
|
|
2998
|
+
r = n[a], o = r.projectionDelta;
|
|
2999
|
+
const { visualElement: u } = r.options;
|
|
3000
|
+
u && u.props.style && u.props.style.display === "contents" || (s && r.options.layoutScroll && r.scroll && r !== r.root && Fn(t, {
|
|
3001
|
+
x: -r.scroll.offset.x,
|
|
3002
|
+
y: -r.scroll.offset.y
|
|
3003
|
+
}), o && (e.x *= o.x.scale, e.y *= o.y.scale, Ma(t, o)), s && Sa(r.latestValues) && Fn(t, r.latestValues));
|
|
3004
|
+
}
|
|
3005
|
+
e.x < Cn && e.x > Mn && (e.x = 1), e.y < Cn && e.y > Mn && (e.y = 1);
|
|
3006
|
+
}
|
|
3007
|
+
function Pn(t, e) {
|
|
3008
|
+
t.min = t.min + e, t.max = t.max + e;
|
|
3009
|
+
}
|
|
3010
|
+
function Dn(t, e, n, s, i = 0.5) {
|
|
3011
|
+
const r = yt(t.min, t.max, i);
|
|
3012
|
+
le(t, e, n, r, s);
|
|
3013
|
+
}
|
|
3014
|
+
function Fn(t, e) {
|
|
3015
|
+
Dn(t.x, e.x, e.scaleX, e.scale, e.originX), Dn(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3016
|
+
}
|
|
3017
|
+
function zs(t, e) {
|
|
3018
|
+
return wa(xa(t.getBoundingClientRect(), e));
|
|
3019
|
+
}
|
|
3020
|
+
function ac(t, e, n) {
|
|
3021
|
+
const s = zs(t, n), { scroll: i } = e;
|
|
3022
|
+
return i && (Pn(s.x, i.offset.x), Pn(s.y, i.offset.y)), s;
|
|
3023
|
+
}
|
|
3024
|
+
function Rn(t, e, n) {
|
|
3025
|
+
const { props: s } = t;
|
|
3026
|
+
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
3027
|
+
const i = "onHover" + n, r = s[i];
|
|
3028
|
+
r && k.postRender(() => r(e, _e(e)));
|
|
3029
|
+
}
|
|
3030
|
+
class Ca extends ct {
|
|
3031
|
+
mount() {
|
|
3032
|
+
const { current: e } = this.node;
|
|
3033
|
+
e && (this.unmount = Xr(e, (n, s) => (Rn(this.node, s, "Start"), (i) => Rn(this.node, i, "End"))));
|
|
3034
|
+
}
|
|
3035
|
+
unmount() {
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
class Pa extends ct {
|
|
3039
|
+
constructor() {
|
|
3040
|
+
super(...arguments), this.isActive = !1;
|
|
3041
|
+
}
|
|
3042
|
+
onFocus() {
|
|
3043
|
+
let e = !1;
|
|
3044
|
+
try {
|
|
3045
|
+
e = this.node.current.matches(":focus-visible");
|
|
3046
|
+
} catch {
|
|
3047
|
+
e = !0;
|
|
3048
|
+
}
|
|
3049
|
+
!e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
3050
|
+
}
|
|
3051
|
+
onBlur() {
|
|
3052
|
+
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
3053
|
+
}
|
|
3054
|
+
mount() {
|
|
3055
|
+
this.unmount = Ot(vn(this.node.current, "focus", () => this.onFocus()), vn(this.node.current, "blur", () => this.onBlur()));
|
|
3056
|
+
}
|
|
3057
|
+
unmount() {
|
|
3058
|
+
}
|
|
3059
|
+
}
|
|
3060
|
+
function En(t, e, n) {
|
|
3061
|
+
const { props: s } = t;
|
|
3062
|
+
if (t.current instanceof HTMLButtonElement && t.current.disabled)
|
|
3063
|
+
return;
|
|
3064
|
+
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
3065
|
+
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
3066
|
+
r && k.postRender(() => r(e, _e(e)));
|
|
3067
|
+
}
|
|
3068
|
+
class Da extends ct {
|
|
3069
|
+
mount() {
|
|
3070
|
+
const { current: e } = this.node;
|
|
3071
|
+
e && (this.unmount = Qr(e, (n, s) => (En(this.node, s, "Start"), (i, { success: r }) => En(this.node, i, r ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
3072
|
+
}
|
|
3073
|
+
unmount() {
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
const fe = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Fa = (t) => {
|
|
3077
|
+
const e = fe.get(t.target);
|
|
3078
|
+
e && e(t);
|
|
3079
|
+
}, Ra = (t) => {
|
|
3080
|
+
t.forEach(Fa);
|
|
3081
|
+
};
|
|
3082
|
+
function Ea({ root: t, ...e }) {
|
|
3083
|
+
const n = t || document;
|
|
3084
|
+
Gt.has(n) || Gt.set(n, {});
|
|
3085
|
+
const s = Gt.get(n), i = JSON.stringify(e);
|
|
3086
|
+
return s[i] || (s[i] = new IntersectionObserver(Ra, { root: t, ...e })), s[i];
|
|
3087
|
+
}
|
|
3088
|
+
function Oa(t, e, n) {
|
|
3089
|
+
const s = Ea(e);
|
|
3090
|
+
return fe.set(t, n), s.observe(t), () => {
|
|
3091
|
+
fe.delete(t), s.unobserve(t);
|
|
3092
|
+
};
|
|
3093
|
+
}
|
|
3094
|
+
const Ia = {
|
|
3095
|
+
some: 0,
|
|
3096
|
+
all: 1
|
|
3097
|
+
};
|
|
3098
|
+
class ka extends ct {
|
|
3099
|
+
constructor() {
|
|
3100
|
+
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
3101
|
+
}
|
|
3102
|
+
startObserver() {
|
|
3103
|
+
this.unmount();
|
|
3104
|
+
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
|
|
3105
|
+
root: n ? n.current : void 0,
|
|
3106
|
+
rootMargin: s,
|
|
3107
|
+
threshold: typeof i == "number" ? i : Ia[i]
|
|
3108
|
+
}, a = (u) => {
|
|
3109
|
+
const { isIntersecting: l } = u;
|
|
3110
|
+
if (this.isInView === l || (this.isInView = l, r && !l && this.hasEnteredView))
|
|
3111
|
+
return;
|
|
3112
|
+
l && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", l);
|
|
3113
|
+
const { onViewportEnter: c, onViewportLeave: f } = this.node.getProps(), d = l ? c : f;
|
|
3114
|
+
d && d(u);
|
|
3115
|
+
};
|
|
3116
|
+
return Oa(this.node.current, o, a);
|
|
3117
|
+
}
|
|
3118
|
+
mount() {
|
|
3119
|
+
this.startObserver();
|
|
3120
|
+
}
|
|
3121
|
+
update() {
|
|
3122
|
+
if (typeof IntersectionObserver > "u")
|
|
3123
|
+
return;
|
|
3124
|
+
const { props: e, prevProps: n } = this.node;
|
|
3125
|
+
["amount", "margin", "root"].some(Na(e, n)) && this.startObserver();
|
|
3126
|
+
}
|
|
3127
|
+
unmount() {
|
|
3128
|
+
}
|
|
3129
|
+
}
|
|
3130
|
+
function Na({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
3131
|
+
return (n) => t[n] !== e[n];
|
|
3132
|
+
}
|
|
3133
|
+
const La = {
|
|
3134
|
+
inView: {
|
|
3135
|
+
Feature: ka
|
|
3136
|
+
},
|
|
3137
|
+
tap: {
|
|
3138
|
+
Feature: Da
|
|
3139
|
+
},
|
|
3140
|
+
focus: {
|
|
3141
|
+
Feature: Pa
|
|
3142
|
+
},
|
|
3143
|
+
hover: {
|
|
3144
|
+
Feature: Ca
|
|
3145
|
+
}
|
|
3146
|
+
}, de = { current: null }, Us = { current: !1 };
|
|
3147
|
+
function Ba() {
|
|
3148
|
+
if (Us.current = !0, !!ge)
|
|
3149
|
+
if (window.matchMedia) {
|
|
3150
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => de.current = t.matches;
|
|
3151
|
+
t.addListener(e), e();
|
|
3152
|
+
} else
|
|
3153
|
+
de.current = !1;
|
|
3154
|
+
}
|
|
3155
|
+
const Ka = /* @__PURE__ */ new WeakMap();
|
|
3156
|
+
function ja(t, e, n) {
|
|
3157
|
+
for (const s in e) {
|
|
3158
|
+
const i = e[s], r = n[s];
|
|
3159
|
+
if (F(i))
|
|
3160
|
+
t.addValue(s, i);
|
|
3161
|
+
else if (F(r))
|
|
3162
|
+
t.addValue(s, Dt(i, { owner: t }));
|
|
3163
|
+
else if (r !== i)
|
|
3164
|
+
if (t.hasValue(s)) {
|
|
3165
|
+
const o = t.getValue(s);
|
|
3166
|
+
o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
|
|
3167
|
+
} else {
|
|
3168
|
+
const o = t.getStaticValue(s);
|
|
3169
|
+
t.addValue(s, Dt(o !== void 0 ? o : i, { owner: t }));
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
for (const s in n)
|
|
3173
|
+
e[s] === void 0 && t.removeValue(s);
|
|
3174
|
+
return e;
|
|
3175
|
+
}
|
|
3176
|
+
const On = [
|
|
3177
|
+
"AnimationStart",
|
|
3178
|
+
"AnimationComplete",
|
|
3179
|
+
"Update",
|
|
3180
|
+
"BeforeLayoutMeasure",
|
|
3181
|
+
"LayoutMeasure",
|
|
3182
|
+
"LayoutAnimationStart",
|
|
3183
|
+
"LayoutAnimationComplete"
|
|
3184
|
+
];
|
|
3185
|
+
class $a {
|
|
3186
|
+
/**
|
|
3187
|
+
* This method takes React props and returns found MotionValues. For example, HTML
|
|
3188
|
+
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
3189
|
+
*
|
|
3190
|
+
* This isn't an abstract method as it needs calling in the constructor, but it is
|
|
3191
|
+
* intended to be one.
|
|
3192
|
+
*/
|
|
3193
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
3194
|
+
return {};
|
|
3195
|
+
}
|
|
3196
|
+
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
|
|
3197
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Fe, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
3198
|
+
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
3199
|
+
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
3200
|
+
const d = I.now();
|
|
3201
|
+
this.renderScheduledAt < d && (this.renderScheduledAt = d, k.render(this.render, !1, !0));
|
|
3202
|
+
};
|
|
3203
|
+
const { latestValues: u, renderState: l } = o;
|
|
3204
|
+
this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = l, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Nt(n), this.isVariantNode = Ds(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
3205
|
+
const { willChange: c, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
3206
|
+
for (const d in f) {
|
|
3207
|
+
const h = f[d];
|
|
3208
|
+
u[d] !== void 0 && F(h) && h.set(u[d], !1);
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
mount(e) {
|
|
3212
|
+
this.current = e, Ka.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Us.current || Ba(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : de.current, process.env.NODE_ENV !== "production" && be(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
3213
|
+
}
|
|
3214
|
+
unmount() {
|
|
3215
|
+
this.projection && this.projection.unmount(), Ht(this.notifyUpdate), Ht(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
3216
|
+
for (const e in this.events)
|
|
3217
|
+
this.events[e].clear();
|
|
3218
|
+
for (const e in this.features) {
|
|
3219
|
+
const n = this.features[e];
|
|
3220
|
+
n && (n.unmount(), n.isMounted = !1);
|
|
3221
|
+
}
|
|
3222
|
+
this.current = null;
|
|
3223
|
+
}
|
|
3224
|
+
bindToMotionValue(e, n) {
|
|
3225
|
+
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
3226
|
+
const s = at.has(e);
|
|
3227
|
+
s && this.onBindTransform && this.onBindTransform();
|
|
3228
|
+
const i = n.on("change", (a) => {
|
|
3229
|
+
this.latestValues[e] = a, this.props.onUpdate && k.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
3230
|
+
}), r = n.on("renderRequest", this.scheduleRender);
|
|
3231
|
+
let o;
|
|
3232
|
+
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
3233
|
+
i(), r(), o && o(), n.owner && n.stop();
|
|
3234
|
+
});
|
|
3235
|
+
}
|
|
3236
|
+
sortNodePosition(e) {
|
|
3237
|
+
return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
|
|
3238
|
+
}
|
|
3239
|
+
updateFeatures() {
|
|
3240
|
+
let e = "animation";
|
|
3241
|
+
for (e in tt) {
|
|
3242
|
+
const n = tt[e];
|
|
3243
|
+
if (!n)
|
|
3244
|
+
continue;
|
|
3245
|
+
const { isEnabled: s, Feature: i } = n;
|
|
3246
|
+
if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
|
|
3247
|
+
const r = this.features[e];
|
|
3248
|
+
r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3251
|
+
}
|
|
3252
|
+
triggerBuild() {
|
|
3253
|
+
this.build(this.renderState, this.latestValues, this.props);
|
|
3254
|
+
}
|
|
3255
|
+
/**
|
|
3256
|
+
* Measure the current viewport box with or without transforms.
|
|
3257
|
+
* Only measures axis-aligned boxes, rotate and skew must be manually
|
|
3258
|
+
* removed with a re-render to work.
|
|
3259
|
+
*/
|
|
3260
|
+
measureViewportBox() {
|
|
3261
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : _s();
|
|
3262
|
+
}
|
|
3263
|
+
getStaticValue(e) {
|
|
3264
|
+
return this.latestValues[e];
|
|
3265
|
+
}
|
|
3266
|
+
setStaticValue(e, n) {
|
|
3267
|
+
this.latestValues[e] = n;
|
|
3268
|
+
}
|
|
3269
|
+
/**
|
|
3270
|
+
* Update the provided props. Ensure any newly-added motion values are
|
|
3271
|
+
* added to our map, old ones removed, and listeners updated.
|
|
3272
|
+
*/
|
|
3273
|
+
update(e, n) {
|
|
3274
|
+
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
3275
|
+
for (let s = 0; s < On.length; s++) {
|
|
3276
|
+
const i = On[s];
|
|
3277
|
+
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
3278
|
+
const r = "on" + i, o = e[r];
|
|
3279
|
+
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
3280
|
+
}
|
|
3281
|
+
this.prevMotionValues = ja(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
3282
|
+
}
|
|
3283
|
+
getProps() {
|
|
3284
|
+
return this.props;
|
|
3285
|
+
}
|
|
3286
|
+
/**
|
|
3287
|
+
* Returns the variant definition with a given name.
|
|
3288
|
+
*/
|
|
3289
|
+
getVariant(e) {
|
|
3290
|
+
return this.props.variants ? this.props.variants[e] : void 0;
|
|
3291
|
+
}
|
|
3292
|
+
/**
|
|
3293
|
+
* Returns the defined default transition on this component.
|
|
3294
|
+
*/
|
|
3295
|
+
getDefaultTransition() {
|
|
3296
|
+
return this.props.transition;
|
|
3297
|
+
}
|
|
3298
|
+
getTransformPagePoint() {
|
|
3299
|
+
return this.props.transformPagePoint;
|
|
3300
|
+
}
|
|
3301
|
+
getClosestVariantNode() {
|
|
3302
|
+
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
3303
|
+
}
|
|
3304
|
+
/**
|
|
3305
|
+
* Add a child visual element to our set of children.
|
|
3306
|
+
*/
|
|
3307
|
+
addVariantChild(e) {
|
|
3308
|
+
const n = this.getClosestVariantNode();
|
|
3309
|
+
if (n)
|
|
3310
|
+
return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
|
|
3311
|
+
}
|
|
3312
|
+
/**
|
|
3313
|
+
* Add a motion value and bind it to this visual element.
|
|
3314
|
+
*/
|
|
3315
|
+
addValue(e, n) {
|
|
3316
|
+
const s = this.values.get(e);
|
|
3317
|
+
n !== s && (s && this.removeValue(e), this.bindToMotionValue(e, n), this.values.set(e, n), this.latestValues[e] = n.get());
|
|
3318
|
+
}
|
|
3319
|
+
/**
|
|
3320
|
+
* Remove a motion value and unbind any active subscriptions.
|
|
3321
|
+
*/
|
|
3322
|
+
removeValue(e) {
|
|
3323
|
+
this.values.delete(e);
|
|
3324
|
+
const n = this.valueSubscriptions.get(e);
|
|
3325
|
+
n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
|
|
3326
|
+
}
|
|
3327
|
+
/**
|
|
3328
|
+
* Check whether we have a motion value for this key
|
|
3329
|
+
*/
|
|
3330
|
+
hasValue(e) {
|
|
3331
|
+
return this.values.has(e);
|
|
3332
|
+
}
|
|
3333
|
+
getValue(e, n) {
|
|
3334
|
+
if (this.props.values && this.props.values[e])
|
|
3335
|
+
return this.props.values[e];
|
|
3336
|
+
let s = this.values.get(e);
|
|
3337
|
+
return s === void 0 && n !== void 0 && (s = Dt(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
|
|
3338
|
+
}
|
|
3339
|
+
/**
|
|
3340
|
+
* If we're trying to animate to a previously unencountered value,
|
|
3341
|
+
* we need to check for it in our state and as a last resort read it
|
|
3342
|
+
* directly from the instance (which might have performance implications).
|
|
3343
|
+
*/
|
|
3344
|
+
readValue(e, n) {
|
|
3345
|
+
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
3346
|
+
return s != null && (typeof s == "string" && (Bn(s) || Kn(s)) ? s = parseFloat(s) : !eo(s) && rt.test(n) && (s = xs(e, n)), this.setBaseTarget(e, F(s) ? s.get() : s)), F(s) ? s.get() : s;
|
|
3347
|
+
}
|
|
3348
|
+
/**
|
|
3349
|
+
* Set the base target to later animate back to. This is currently
|
|
3350
|
+
* only hydrated on creation and when we first read a value.
|
|
3351
|
+
*/
|
|
3352
|
+
setBaseTarget(e, n) {
|
|
3353
|
+
this.baseTarget[e] = n;
|
|
3354
|
+
}
|
|
3355
|
+
/**
|
|
3356
|
+
* Find the base target for a value thats been removed from all animation
|
|
3357
|
+
* props.
|
|
3358
|
+
*/
|
|
3359
|
+
getBaseTarget(e) {
|
|
3360
|
+
var r;
|
|
3361
|
+
const { initial: n } = this.props;
|
|
3362
|
+
let s;
|
|
3363
|
+
if (typeof n == "string" || typeof n == "object") {
|
|
3364
|
+
const o = $e(this.props, n, (r = this.presenceContext) == null ? void 0 : r.custom);
|
|
3365
|
+
o && (s = o[e]);
|
|
3366
|
+
}
|
|
3367
|
+
if (n && s !== void 0)
|
|
3368
|
+
return s;
|
|
3369
|
+
const i = this.getBaseTargetFromProps(this.props, e);
|
|
3370
|
+
return i !== void 0 && !F(i) ? i : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
3371
|
+
}
|
|
3372
|
+
on(e, n) {
|
|
3373
|
+
return this.events[e] || (this.events[e] = new $n()), this.events[e].add(n);
|
|
3374
|
+
}
|
|
3375
|
+
notify(e, ...n) {
|
|
3376
|
+
this.events[e] && this.events[e].notify(...n);
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
class Gs extends $a {
|
|
3380
|
+
constructor() {
|
|
3381
|
+
super(...arguments), this.KeyframeResolver = zr;
|
|
3382
|
+
}
|
|
3383
|
+
sortInstanceNodePosition(e, n) {
|
|
3384
|
+
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
3385
|
+
}
|
|
3386
|
+
getBaseTargetFromProps(e, n) {
|
|
3387
|
+
return e.style ? e.style[n] : void 0;
|
|
3388
|
+
}
|
|
3389
|
+
removeValueFromRenderState(e, { vars: n, style: s }) {
|
|
3390
|
+
delete n[e], delete s[e];
|
|
3391
|
+
}
|
|
3392
|
+
handleChildMotionValue() {
|
|
3393
|
+
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
3394
|
+
const { children: e } = this.props;
|
|
3395
|
+
F(e) && (this.childSubscription = e.on("change", (n) => {
|
|
3396
|
+
this.current && (this.current.textContent = `${n}`);
|
|
3397
|
+
}));
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
function Hs(t, { style: e, vars: n }, s, i) {
|
|
3401
|
+
Object.assign(t.style, e, i && i.getProjectionStyles(s));
|
|
3402
|
+
for (const r in n)
|
|
3403
|
+
t.style.setProperty(r, n[r]);
|
|
3404
|
+
}
|
|
3405
|
+
function Wa(t) {
|
|
3406
|
+
return window.getComputedStyle(t);
|
|
3407
|
+
}
|
|
3408
|
+
class _a extends Gs {
|
|
3409
|
+
constructor() {
|
|
3410
|
+
super(...arguments), this.type = "html", this.renderInstance = Hs;
|
|
3411
|
+
}
|
|
3412
|
+
readValueFromInstance(e, n) {
|
|
3413
|
+
var s;
|
|
3414
|
+
if (at.has(n))
|
|
3415
|
+
return (s = this.projection) != null && s.isProjecting ? te(n) : cr(e, n);
|
|
3416
|
+
{
|
|
3417
|
+
const i = Wa(e), r = (we(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
3418
|
+
return typeof r == "string" ? r.trim() : r;
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
3422
|
+
return zs(e, n);
|
|
3423
|
+
}
|
|
3424
|
+
build(e, n, s) {
|
|
3425
|
+
Be(e, n, s.transformTemplate);
|
|
3426
|
+
}
|
|
3427
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
3428
|
+
return We(e, n, s);
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
const Ys = /* @__PURE__ */ new Set([
|
|
3432
|
+
"baseFrequency",
|
|
3433
|
+
"diffuseConstant",
|
|
3434
|
+
"kernelMatrix",
|
|
3435
|
+
"kernelUnitLength",
|
|
3436
|
+
"keySplines",
|
|
3437
|
+
"keyTimes",
|
|
3438
|
+
"limitingConeAngle",
|
|
3439
|
+
"markerHeight",
|
|
3440
|
+
"markerWidth",
|
|
3441
|
+
"numOctaves",
|
|
3442
|
+
"targetX",
|
|
3443
|
+
"targetY",
|
|
3444
|
+
"surfaceScale",
|
|
3445
|
+
"specularConstant",
|
|
3446
|
+
"specularExponent",
|
|
3447
|
+
"stdDeviation",
|
|
3448
|
+
"tableValues",
|
|
3449
|
+
"viewBox",
|
|
3450
|
+
"gradientTransform",
|
|
3451
|
+
"pathLength",
|
|
3452
|
+
"startOffset",
|
|
3453
|
+
"textLength",
|
|
3454
|
+
"lengthAdjust"
|
|
3455
|
+
]);
|
|
3456
|
+
function za(t, e, n, s) {
|
|
3457
|
+
Hs(t, e, void 0, s);
|
|
3458
|
+
for (const i in e.attrs)
|
|
3459
|
+
t.setAttribute(Ys.has(i) ? i : Le(i), e.attrs[i]);
|
|
3460
|
+
}
|
|
3461
|
+
class Ua extends Gs {
|
|
3462
|
+
constructor() {
|
|
3463
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = _s;
|
|
3464
|
+
}
|
|
3465
|
+
getBaseTargetFromProps(e, n) {
|
|
3466
|
+
return e[n];
|
|
3467
|
+
}
|
|
3468
|
+
readValueFromInstance(e, n) {
|
|
3469
|
+
if (at.has(n)) {
|
|
3470
|
+
const s = ws(n);
|
|
3471
|
+
return s && s.default || 0;
|
|
3472
|
+
}
|
|
3473
|
+
return n = Ys.has(n) ? n : Le(n), e.getAttribute(n);
|
|
3474
|
+
}
|
|
3475
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
3476
|
+
return Ks(e, n, s);
|
|
3477
|
+
}
|
|
3478
|
+
build(e, n, s) {
|
|
3479
|
+
ks(e, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
3480
|
+
}
|
|
3481
|
+
renderInstance(e, n, s, i) {
|
|
3482
|
+
za(e, n, s, i);
|
|
3483
|
+
}
|
|
3484
|
+
mount(e) {
|
|
3485
|
+
this.isSVGTag = Ls(e.tagName), super.mount(e);
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
const Ga = (t, e) => je(t) ? new Ua(e) : new _a(e, {
|
|
3489
|
+
allowProjection: t !== kn
|
|
3490
|
+
}), Ha = {
|
|
3491
|
+
renderer: Ga,
|
|
3492
|
+
...va,
|
|
3493
|
+
...La
|
|
3494
|
+
}, Ya = (t) => {
|
|
3495
|
+
const { ripples: e = [], motionProps: n, color: s = "currentColor", style: i, onClear: r } = t;
|
|
3496
|
+
return /* @__PURE__ */ O.jsx(O.Fragment, { children: e.map((o) => {
|
|
3497
|
+
const a = ei(0.01 * o.size, 0.2, o.size > 100 ? 0.75 : 0.5);
|
|
3498
|
+
return /* @__PURE__ */ O.jsx(co, { features: Ha, children: /* @__PURE__ */ O.jsx(ao, { mode: "popLayout", children: /* @__PURE__ */ O.jsx(
|
|
3499
|
+
Uo.span,
|
|
3500
|
+
{
|
|
3501
|
+
animate: { transform: "scale(2)", opacity: 0 },
|
|
3502
|
+
className: "ripple-item-span",
|
|
3503
|
+
exit: { opacity: 0 },
|
|
3504
|
+
initial: { transform: "scale(0)", opacity: 0.35 },
|
|
3505
|
+
style: {
|
|
3506
|
+
position: "absolute",
|
|
3507
|
+
backgroundColor: s,
|
|
3508
|
+
borderRadius: "100%",
|
|
3509
|
+
transformOrigin: "center",
|
|
3510
|
+
pointerEvents: "none",
|
|
3511
|
+
overflow: "hidden",
|
|
3512
|
+
inset: 0,
|
|
3513
|
+
zIndex: 0,
|
|
3514
|
+
top: o.y,
|
|
3515
|
+
left: o.x,
|
|
3516
|
+
width: `${o.size}px`,
|
|
3517
|
+
height: `${o.size}px`,
|
|
3518
|
+
...i
|
|
3519
|
+
},
|
|
3520
|
+
transition: { duration: a },
|
|
3521
|
+
onAnimationComplete: () => {
|
|
3522
|
+
r(o.key);
|
|
3523
|
+
},
|
|
3524
|
+
...n
|
|
3525
|
+
}
|
|
3526
|
+
) }) }, o.key);
|
|
3527
|
+
}) });
|
|
3528
|
+
};
|
|
3529
|
+
Ya.displayName = "LizaUI.Ripple";
|
|
3530
|
+
export {
|
|
3531
|
+
Bo as $,
|
|
3532
|
+
b as A,
|
|
3533
|
+
rt as B,
|
|
3534
|
+
oo as C,
|
|
3535
|
+
nc as D,
|
|
3536
|
+
Yr as E,
|
|
3537
|
+
ct as F,
|
|
3538
|
+
F as G,
|
|
3539
|
+
Dt as H,
|
|
3540
|
+
si as I,
|
|
3541
|
+
ii as J,
|
|
3542
|
+
I as K,
|
|
3543
|
+
Nn as L,
|
|
3544
|
+
li as M,
|
|
3545
|
+
Sn as N,
|
|
3546
|
+
$n as O,
|
|
3547
|
+
ys as P,
|
|
3548
|
+
ec as Q,
|
|
3549
|
+
Ya as R,
|
|
3550
|
+
To as S,
|
|
3551
|
+
Sa as T,
|
|
3552
|
+
Pn as U,
|
|
3553
|
+
Fn as V,
|
|
3554
|
+
Va as W,
|
|
3555
|
+
Ma as X,
|
|
3556
|
+
Aa as Y,
|
|
3557
|
+
oc as Z,
|
|
3558
|
+
rc as _,
|
|
3559
|
+
ri as a,
|
|
3560
|
+
ae as a0,
|
|
3561
|
+
Zo as a1,
|
|
3562
|
+
_o as a2,
|
|
3563
|
+
Ga as a3,
|
|
3564
|
+
La as a4,
|
|
3565
|
+
va as a5,
|
|
3566
|
+
ho as a6,
|
|
3567
|
+
ao as a7,
|
|
3568
|
+
vn as b,
|
|
3569
|
+
sc as c,
|
|
3570
|
+
k as d,
|
|
3571
|
+
Cs as e,
|
|
3572
|
+
At as f,
|
|
3573
|
+
_e as g,
|
|
3574
|
+
Ht as h,
|
|
3575
|
+
fn as i,
|
|
3576
|
+
K as j,
|
|
3577
|
+
jn as k,
|
|
3578
|
+
X as l,
|
|
3579
|
+
yt as m,
|
|
3580
|
+
_s as n,
|
|
3581
|
+
Fs as o,
|
|
3582
|
+
Ot as p,
|
|
3583
|
+
W as q,
|
|
3584
|
+
ac as r,
|
|
3585
|
+
N as s,
|
|
3586
|
+
ic as t,
|
|
3587
|
+
tc as u,
|
|
3588
|
+
wa as v,
|
|
3589
|
+
qo as w,
|
|
3590
|
+
oa as x,
|
|
3591
|
+
Q as y,
|
|
3592
|
+
st as z
|
|
3593
|
+
};
|
|
3594
|
+
//# sourceMappingURL=ripple-BQsLJHrx.js.map
|