@telegraph/tooltip 0.1.2 → 0.2.0
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/CHANGELOG.md +21 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +1248 -1249
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/Tooltip/Tooltip.constants.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/esm/index.mjs
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
1
|
import { jsx as k, jsxs as Tn } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as lt from "@radix-ui/react-tooltip";
|
|
3
3
|
import { useControllableState as _s } from "@radix-ui/react-use-controllable-state";
|
|
4
4
|
import { OverrideAppearance as Hs } from "@telegraph/appearance";
|
|
5
5
|
import { RefToTgphRef as Us } from "@telegraph/helpers";
|
|
6
6
|
import { Stack as zs } from "@telegraph/layout";
|
|
7
7
|
import { Text as Ys } from "@telegraph/typography";
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
return
|
|
8
|
+
import st, { createContext as it, useRef as _, useLayoutEffect as Xs, useEffect as me, useState as qs, useContext as E, useMemo as Nt, Fragment as vn, createElement as Zs, useInsertionEffect as wn, useCallback as Js, forwardRef as Qs } from "react";
|
|
9
|
+
const ti = it({});
|
|
10
|
+
function ei(t) {
|
|
11
|
+
const e = _(null);
|
|
12
|
+
return e.current === null && (e.current = t()), e.current;
|
|
13
13
|
}
|
|
14
|
-
const Sn = typeof window < "u", ni = Sn ? Xs :
|
|
15
|
-
function si(
|
|
16
|
-
|
|
14
|
+
const Sn = typeof window < "u", ni = Sn ? Xs : me, Vn = /* @__PURE__ */ it(null);
|
|
15
|
+
function si(t, e) {
|
|
16
|
+
t.indexOf(e) === -1 && t.push(e);
|
|
17
17
|
}
|
|
18
|
-
function ii(
|
|
19
|
-
const n =
|
|
20
|
-
n > -1 &&
|
|
18
|
+
function ii(t, e) {
|
|
19
|
+
const n = t.indexOf(e);
|
|
20
|
+
n > -1 && t.splice(n, 1);
|
|
21
21
|
}
|
|
22
|
-
const U = (
|
|
23
|
-
function
|
|
24
|
-
return
|
|
22
|
+
const U = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
23
|
+
function Xt(t, e) {
|
|
24
|
+
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
25
25
|
}
|
|
26
|
-
let
|
|
26
|
+
let yt = () => {
|
|
27
27
|
}, Z = () => {
|
|
28
28
|
};
|
|
29
29
|
var bn;
|
|
30
|
-
typeof process < "u" && ((bn = process.env) == null ? void 0 : bn.NODE_ENV) !== "production" && (
|
|
31
|
-
!
|
|
32
|
-
}, Z = (
|
|
33
|
-
if (!
|
|
34
|
-
throw new Error(
|
|
30
|
+
typeof process < "u" && ((bn = process.env) == null ? void 0 : bn.NODE_ENV) !== "production" && (yt = (t, e, n) => {
|
|
31
|
+
!t && typeof console < "u" && console.warn(Xt(e, n));
|
|
32
|
+
}, Z = (t, e, n) => {
|
|
33
|
+
if (!t)
|
|
34
|
+
throw new Error(Xt(e, n));
|
|
35
35
|
});
|
|
36
|
-
const j = {}, An = (
|
|
37
|
-
function ri(
|
|
38
|
-
return typeof
|
|
36
|
+
const j = {}, An = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
37
|
+
function ri(t) {
|
|
38
|
+
return typeof t == "object" && t !== null;
|
|
39
39
|
}
|
|
40
|
-
const xn = (
|
|
40
|
+
const xn = (t) => /^0[^.\s]+$/u.test(t);
|
|
41
41
|
// @__NO_SIDE_EFFECTS__
|
|
42
|
-
function Mn(
|
|
43
|
-
let
|
|
44
|
-
return () => (
|
|
42
|
+
function Mn(t) {
|
|
43
|
+
let e;
|
|
44
|
+
return () => (e === void 0 && (e = t()), e);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
const s =
|
|
48
|
-
return s === 0 ? 1 : (n -
|
|
46
|
+
const rt = /* @__NO_SIDE_EFFECTS__ */ (t) => t, oi = (t, e) => (n) => e(t(n)), Bt = (...t) => t.reduce(oi), Cn = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
47
|
+
const s = e - t;
|
|
48
|
+
return s === 0 ? 1 : (n - t) / s;
|
|
49
49
|
};
|
|
50
50
|
class Pn {
|
|
51
51
|
constructor() {
|
|
52
52
|
this.subscriptions = [];
|
|
53
53
|
}
|
|
54
|
-
add(
|
|
55
|
-
return si(this.subscriptions,
|
|
54
|
+
add(e) {
|
|
55
|
+
return si(this.subscriptions, e), () => ii(this.subscriptions, e);
|
|
56
56
|
}
|
|
57
|
-
notify(
|
|
57
|
+
notify(e, n, s) {
|
|
58
58
|
const i = this.subscriptions.length;
|
|
59
59
|
if (i)
|
|
60
60
|
if (i === 1)
|
|
61
|
-
this.subscriptions[0](
|
|
61
|
+
this.subscriptions[0](e, n, s);
|
|
62
62
|
else
|
|
63
63
|
for (let r = 0; r < i; r++) {
|
|
64
64
|
const o = this.subscriptions[r];
|
|
65
|
-
o && o(
|
|
65
|
+
o && o(e, n, s);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
getSize() {
|
|
@@ -72,49 +72,49 @@ class Pn {
|
|
|
72
72
|
this.subscriptions.length = 0;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
const K = /* @__NO_SIDE_EFFECTS__ */ (
|
|
76
|
-
function Fn(
|
|
77
|
-
return
|
|
75
|
+
const K = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, N = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
|
|
76
|
+
function Fn(t, e) {
|
|
77
|
+
return e ? t * (1e3 / e) : 0;
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
function On(
|
|
81
|
-
|
|
79
|
+
const Le = /* @__PURE__ */ new Set();
|
|
80
|
+
function On(t, e, n) {
|
|
81
|
+
t || Le.has(e) || (console.warn(Xt(e, n)), Le.add(e));
|
|
82
82
|
}
|
|
83
|
-
const Dn = (
|
|
84
|
-
function ci(
|
|
83
|
+
const Dn = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, ai = 1e-7, ui = 12;
|
|
84
|
+
function ci(t, e, n, s, i) {
|
|
85
85
|
let r, o, a = 0;
|
|
86
86
|
do
|
|
87
|
-
o =
|
|
87
|
+
o = e + (n - e) / 2, r = Dn(o, s, i) - t, r > 0 ? n = o : e = o;
|
|
88
88
|
while (Math.abs(r) > ai && ++a < ui);
|
|
89
89
|
return o;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
if (
|
|
93
|
-
return
|
|
94
|
-
const i = (r) => ci(r, 0, 1,
|
|
95
|
-
return (r) => r === 0 || r === 1 ? r : Dn(i(r),
|
|
91
|
+
function bt(t, e, n, s) {
|
|
92
|
+
if (t === e && n === s)
|
|
93
|
+
return rt;
|
|
94
|
+
const i = (r) => ci(r, 0, 1, t, n);
|
|
95
|
+
return (r) => r === 0 || r === 1 ? r : Dn(i(r), e, s);
|
|
96
96
|
}
|
|
97
|
-
const Rn = (
|
|
98
|
-
linear:
|
|
97
|
+
const Rn = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, In = (t) => (e) => 1 - t(1 - e), kn = /* @__PURE__ */ bt(0.33, 1.53, 0.69, 0.99), ge = /* @__PURE__ */ In(kn), En = /* @__PURE__ */ Rn(ge), Nn = (t) => (t *= 2) < 1 ? 0.5 * ge(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ye = (t) => 1 - Math.sin(Math.acos(t)), li = In(ye), Bn = Rn(ye), fi = /* @__PURE__ */ bt(0.42, 0, 1, 1), di = /* @__PURE__ */ bt(0, 0, 0.58, 1), Ln = /* @__PURE__ */ bt(0.42, 0, 0.58, 1), hi = (t) => Array.isArray(t) && typeof t[0] != "number", Kn = (t) => Array.isArray(t) && typeof t[0] == "number", Ke = {
|
|
98
|
+
linear: rt,
|
|
99
99
|
easeIn: fi,
|
|
100
100
|
easeInOut: Ln,
|
|
101
101
|
easeOut: di,
|
|
102
|
-
circIn:
|
|
102
|
+
circIn: ye,
|
|
103
103
|
circInOut: Bn,
|
|
104
104
|
circOut: li,
|
|
105
|
-
backIn:
|
|
105
|
+
backIn: ge,
|
|
106
106
|
backInOut: En,
|
|
107
107
|
backOut: kn,
|
|
108
108
|
anticipate: Nn
|
|
109
|
-
}, pi = (
|
|
110
|
-
if (Kn(
|
|
111
|
-
Z(
|
|
112
|
-
const [
|
|
113
|
-
return
|
|
114
|
-
} else if (pi(
|
|
115
|
-
return Z(
|
|
116
|
-
return
|
|
117
|
-
},
|
|
109
|
+
}, pi = (t) => typeof t == "string", We = (t) => {
|
|
110
|
+
if (Kn(t)) {
|
|
111
|
+
Z(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
112
|
+
const [e, n, s, i] = t;
|
|
113
|
+
return bt(e, n, s, i);
|
|
114
|
+
} else if (pi(t))
|
|
115
|
+
return Z(Ke[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Ke[t];
|
|
116
|
+
return t;
|
|
117
|
+
}, xt = [
|
|
118
118
|
"setup",
|
|
119
119
|
// Compute
|
|
120
120
|
"read",
|
|
@@ -132,7 +132,7 @@ const Rn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, In
|
|
|
132
132
|
"postRender"
|
|
133
133
|
// Compute
|
|
134
134
|
];
|
|
135
|
-
function mi(
|
|
135
|
+
function mi(t, e) {
|
|
136
136
|
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
|
|
137
137
|
const o = /* @__PURE__ */ new WeakSet();
|
|
138
138
|
let a = {
|
|
@@ -141,7 +141,7 @@ function mi(e, t) {
|
|
|
141
141
|
isProcessing: !1
|
|
142
142
|
};
|
|
143
143
|
function c(u) {
|
|
144
|
-
o.has(u) && (l.schedule(u),
|
|
144
|
+
o.has(u) && (l.schedule(u), t()), u(a);
|
|
145
145
|
}
|
|
146
146
|
const l = {
|
|
147
147
|
/**
|
|
@@ -171,140 +171,140 @@ function mi(e, t) {
|
|
|
171
171
|
return l;
|
|
172
172
|
}
|
|
173
173
|
const gi = 40;
|
|
174
|
-
function Wn(
|
|
174
|
+
function Wn(t, e) {
|
|
175
175
|
let n = !1, s = !0;
|
|
176
176
|
const i = {
|
|
177
177
|
delta: 0,
|
|
178
178
|
timestamp: 0,
|
|
179
179
|
isProcessing: !1
|
|
180
|
-
}, r = () => n = !0, o =
|
|
180
|
+
}, r = () => n = !0, o = xt.reduce((T, V) => (T[V] = mi(r), T), {}), { setup: a, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: h, postRender: p } = o, b = () => {
|
|
181
181
|
const T = j.useManualTiming ? i.timestamp : performance.now();
|
|
182
|
-
n = !1, j.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, gi), 1)), i.timestamp = T, i.isProcessing = !0, a.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), h.process(i), p.process(i), i.isProcessing = !1, n &&
|
|
182
|
+
n = !1, j.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, gi), 1)), i.timestamp = T, i.isProcessing = !0, a.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), h.process(i), p.process(i), i.isProcessing = !1, n && e && (s = !1, t(b));
|
|
183
183
|
}, y = () => {
|
|
184
|
-
n = !0, s = !0, i.isProcessing ||
|
|
184
|
+
n = !0, s = !0, i.isProcessing || t(b);
|
|
185
185
|
};
|
|
186
|
-
return { schedule:
|
|
186
|
+
return { schedule: xt.reduce((T, V) => {
|
|
187
187
|
const v = o[V];
|
|
188
188
|
return T[V] = (A, M = !1, S = !1) => (n || y(), v.schedule(A, M, S)), T;
|
|
189
189
|
}, {}), cancel: (T) => {
|
|
190
|
-
for (let V = 0; V <
|
|
191
|
-
o[
|
|
190
|
+
for (let V = 0; V < xt.length; V++)
|
|
191
|
+
o[xt[V]].cancel(T);
|
|
192
192
|
}, state: i, steps: o };
|
|
193
193
|
}
|
|
194
|
-
const { schedule: L, cancel:
|
|
195
|
-
let
|
|
194
|
+
const { schedule: L, cancel: qt, state: Ft } = /* @__PURE__ */ Wn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : rt, !0);
|
|
195
|
+
let Ct;
|
|
196
196
|
function yi() {
|
|
197
|
-
|
|
197
|
+
Ct = void 0;
|
|
198
198
|
}
|
|
199
199
|
const I = {
|
|
200
|
-
now: () => (
|
|
201
|
-
set: (
|
|
202
|
-
|
|
200
|
+
now: () => (Ct === void 0 && I.set(Ft.isProcessing || j.useManualTiming ? Ft.timestamp : performance.now()), Ct),
|
|
201
|
+
set: (t) => {
|
|
202
|
+
Ct = t, queueMicrotask(yi);
|
|
203
203
|
}
|
|
204
|
-
}, $n = (
|
|
205
|
-
function $t
|
|
206
|
-
return typeof
|
|
204
|
+
}, $n = (t) => (e) => typeof e == "string" && e.startsWith(t), jn = /* @__PURE__ */ $n("--"), bi = /* @__PURE__ */ $n("var(--"), be = (t) => bi(t) ? Ti.test(t.split("/*")[0].trim()) : !1, Ti = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
205
|
+
function $e(t) {
|
|
206
|
+
return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
test: (
|
|
208
|
+
const ot = {
|
|
209
|
+
test: (t) => typeof t == "number",
|
|
210
210
|
parse: parseFloat,
|
|
211
|
-
transform: (
|
|
212
|
-
},
|
|
213
|
-
...
|
|
214
|
-
transform: (
|
|
215
|
-
},
|
|
216
|
-
...
|
|
211
|
+
transform: (t) => t
|
|
212
|
+
}, pt = {
|
|
213
|
+
...ot,
|
|
214
|
+
transform: (t) => U(0, 1, t)
|
|
215
|
+
}, Mt = {
|
|
216
|
+
...ot,
|
|
217
217
|
default: 1
|
|
218
|
-
},
|
|
219
|
-
function vi(
|
|
220
|
-
return
|
|
218
|
+
}, ht = (t) => Math.round(t * 1e5) / 1e5, Te = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
219
|
+
function vi(t) {
|
|
220
|
+
return t == null;
|
|
221
221
|
}
|
|
222
|
-
const wi = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,
|
|
222
|
+
const wi = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, ve = (t, e) => (n) => !!(typeof n == "string" && wi.test(n) && n.startsWith(t) || e && !vi(n) && Object.prototype.hasOwnProperty.call(n, e)), Gn = (t, e, n) => (s) => {
|
|
223
223
|
if (typeof s != "string")
|
|
224
224
|
return s;
|
|
225
|
-
const [i, r, o, a] = s.match(
|
|
225
|
+
const [i, r, o, a] = s.match(Te);
|
|
226
226
|
return {
|
|
227
|
-
[
|
|
228
|
-
[
|
|
227
|
+
[t]: parseFloat(i),
|
|
228
|
+
[e]: parseFloat(r),
|
|
229
229
|
[n]: parseFloat(o),
|
|
230
230
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
231
231
|
};
|
|
232
|
-
}, Si = (
|
|
233
|
-
...
|
|
234
|
-
transform: (
|
|
232
|
+
}, Si = (t) => U(0, 255, t), $t = {
|
|
233
|
+
...ot,
|
|
234
|
+
transform: (t) => Math.round(Si(t))
|
|
235
235
|
}, Y = {
|
|
236
|
-
test: /* @__PURE__ */
|
|
236
|
+
test: /* @__PURE__ */ ve("rgb", "red"),
|
|
237
237
|
parse: /* @__PURE__ */ Gn("red", "green", "blue"),
|
|
238
|
-
transform: ({ red:
|
|
238
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + $t.transform(t) + ", " + $t.transform(e) + ", " + $t.transform(n) + ", " + ht(pt.transform(s)) + ")"
|
|
239
239
|
};
|
|
240
|
-
function Vi(
|
|
241
|
-
let
|
|
242
|
-
return
|
|
243
|
-
red: parseInt(
|
|
240
|
+
function Vi(t) {
|
|
241
|
+
let e = "", n = "", s = "", i = "";
|
|
242
|
+
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), {
|
|
243
|
+
red: parseInt(e, 16),
|
|
244
244
|
green: parseInt(n, 16),
|
|
245
245
|
blue: parseInt(s, 16),
|
|
246
246
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
const
|
|
250
|
-
test: /* @__PURE__ */
|
|
249
|
+
const Zt = {
|
|
250
|
+
test: /* @__PURE__ */ ve("#"),
|
|
251
251
|
parse: Vi,
|
|
252
252
|
transform: Y.transform
|
|
253
|
-
},
|
|
254
|
-
test: (
|
|
253
|
+
}, Tt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
254
|
+
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
255
255
|
parse: parseFloat,
|
|
256
|
-
transform: (
|
|
257
|
-
}), G = /* @__PURE__ */
|
|
258
|
-
...
|
|
259
|
-
parse: (
|
|
260
|
-
transform: (
|
|
256
|
+
transform: (e) => `${e}${t}`
|
|
257
|
+
}), G = /* @__PURE__ */ Tt("deg"), et = /* @__PURE__ */ Tt("%"), m = /* @__PURE__ */ Tt("px"), Ai = /* @__PURE__ */ Tt("vh"), xi = /* @__PURE__ */ Tt("vw"), je = {
|
|
258
|
+
...et,
|
|
259
|
+
parse: (t) => et.parse(t) / 100,
|
|
260
|
+
transform: (t) => et.transform(t * 100)
|
|
261
261
|
}, Q = {
|
|
262
|
-
test: /* @__PURE__ */
|
|
262
|
+
test: /* @__PURE__ */ ve("hsl", "hue"),
|
|
263
263
|
parse: /* @__PURE__ */ Gn("hue", "saturation", "lightness"),
|
|
264
|
-
transform: ({ hue:
|
|
264
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + et.transform(ht(e)) + ", " + et.transform(ht(n)) + ", " + ht(pt.transform(s)) + ")"
|
|
265
265
|
}, P = {
|
|
266
|
-
test: (
|
|
267
|
-
parse: (
|
|
268
|
-
transform: (
|
|
269
|
-
getAnimatableNone: (
|
|
270
|
-
const
|
|
271
|
-
return
|
|
266
|
+
test: (t) => Y.test(t) || Zt.test(t) || Q.test(t),
|
|
267
|
+
parse: (t) => Y.test(t) ? Y.parse(t) : Q.test(t) ? Q.parse(t) : Zt.parse(t),
|
|
268
|
+
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? Y.transform(t) : Q.transform(t),
|
|
269
|
+
getAnimatableNone: (t) => {
|
|
270
|
+
const e = P.parse(t);
|
|
271
|
+
return e.alpha = 0, P.transform(e);
|
|
272
272
|
}
|
|
273
273
|
}, Mi = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
274
|
-
function Ci(
|
|
275
|
-
var
|
|
276
|
-
return isNaN(
|
|
274
|
+
function Ci(t) {
|
|
275
|
+
var e, n;
|
|
276
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(Te)) == null ? void 0 : e.length) || 0) + (((n = t.match(Mi)) == null ? void 0 : n.length) || 0) > 0;
|
|
277
277
|
}
|
|
278
|
-
const _n = "number", Hn = "color", Pi = "var", Fi = "var(",
|
|
279
|
-
function
|
|
280
|
-
const
|
|
278
|
+
const _n = "number", Hn = "color", Pi = "var", Fi = "var(", Ge = "${}", Oi = /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;
|
|
279
|
+
function mt(t) {
|
|
280
|
+
const e = t.toString(), n = [], s = {
|
|
281
281
|
color: [],
|
|
282
282
|
number: [],
|
|
283
283
|
var: []
|
|
284
284
|
}, i = [];
|
|
285
285
|
let r = 0;
|
|
286
|
-
const a =
|
|
286
|
+
const a = e.replace(Oi, (c) => (P.test(c) ? (s.color.push(r), i.push(Hn), n.push(P.parse(c))) : c.startsWith(Fi) ? (s.var.push(r), i.push(Pi), n.push(c)) : (s.number.push(r), i.push(_n), n.push(parseFloat(c))), ++r, Ge)).split(Ge);
|
|
287
287
|
return { values: n, split: a, indexes: s, types: i };
|
|
288
288
|
}
|
|
289
|
-
function Un(
|
|
290
|
-
return
|
|
289
|
+
function Un(t) {
|
|
290
|
+
return mt(t).values;
|
|
291
291
|
}
|
|
292
|
-
function zn(
|
|
293
|
-
const { split:
|
|
292
|
+
function zn(t) {
|
|
293
|
+
const { split: e, types: n } = mt(t), s = e.length;
|
|
294
294
|
return (i) => {
|
|
295
295
|
let r = "";
|
|
296
296
|
for (let o = 0; o < s; o++)
|
|
297
|
-
if (r +=
|
|
297
|
+
if (r += e[o], i[o] !== void 0) {
|
|
298
298
|
const a = n[o];
|
|
299
|
-
a === _n ? r +=
|
|
299
|
+
a === _n ? r += ht(i[o]) : a === Hn ? r += P.transform(i[o]) : r += i[o];
|
|
300
300
|
}
|
|
301
301
|
return r;
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
const Di = (
|
|
305
|
-
function Ri(
|
|
306
|
-
const
|
|
307
|
-
return zn(
|
|
304
|
+
const Di = (t) => typeof t == "number" ? 0 : P.test(t) ? P.getAnimatableNone(t) : t;
|
|
305
|
+
function Ri(t) {
|
|
306
|
+
const e = Un(t);
|
|
307
|
+
return zn(t)(e.map(Di));
|
|
308
308
|
}
|
|
309
309
|
const B = {
|
|
310
310
|
test: Ci,
|
|
@@ -312,17 +312,17 @@ const B = {
|
|
|
312
312
|
createTransformer: zn,
|
|
313
313
|
getAnimatableNone: Ri
|
|
314
314
|
};
|
|
315
|
-
function
|
|
316
|
-
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ?
|
|
315
|
+
function jt(t, e, n) {
|
|
316
|
+
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;
|
|
317
317
|
}
|
|
318
|
-
function Ii({ hue:
|
|
319
|
-
|
|
318
|
+
function Ii({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
319
|
+
t /= 360, e /= 100, n /= 100;
|
|
320
320
|
let i = 0, r = 0, o = 0;
|
|
321
|
-
if (!
|
|
321
|
+
if (!e)
|
|
322
322
|
i = r = o = n;
|
|
323
323
|
else {
|
|
324
|
-
const a = n < 0.5 ? n * (1 +
|
|
325
|
-
i =
|
|
324
|
+
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, c = 2 * n - a;
|
|
325
|
+
i = jt(c, a, t + 1 / 3), r = jt(c, a, t), o = jt(c, a, t - 1 / 3);
|
|
326
326
|
}
|
|
327
327
|
return {
|
|
328
328
|
red: Math.round(i * 255),
|
|
@@ -331,107 +331,107 @@ function Ii({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
|
331
331
|
alpha: s
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
return (n) => n > 0 ?
|
|
334
|
+
function Ot(t, e) {
|
|
335
|
+
return (n) => n > 0 ? e : t;
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
const s =
|
|
337
|
+
const vt = (t, e, n) => t + (e - t) * n, Gt = (t, e, n) => {
|
|
338
|
+
const s = t * t, i = n * (e * e - s) + s;
|
|
339
339
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
340
|
-
}, ki = [
|
|
341
|
-
function
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
340
|
+
}, ki = [Zt, Y, Q], Ei = (t) => ki.find((e) => e.test(t));
|
|
341
|
+
function _e(t) {
|
|
342
|
+
const e = Ei(t);
|
|
343
|
+
if (yt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
344
344
|
return !1;
|
|
345
|
-
let n =
|
|
346
|
-
return
|
|
345
|
+
let n = e.parse(t);
|
|
346
|
+
return e === Q && (n = Ii(n)), n;
|
|
347
347
|
}
|
|
348
|
-
const
|
|
349
|
-
const n =
|
|
348
|
+
const He = (t, e) => {
|
|
349
|
+
const n = _e(t), s = _e(e);
|
|
350
350
|
if (!n || !s)
|
|
351
|
-
return
|
|
351
|
+
return Ot(t, e);
|
|
352
352
|
const i = { ...n };
|
|
353
|
-
return (r) => (i.red =
|
|
354
|
-
},
|
|
355
|
-
function Ni(
|
|
356
|
-
return
|
|
353
|
+
return (r) => (i.red = Gt(n.red, s.red, r), i.green = Gt(n.green, s.green, r), i.blue = Gt(n.blue, s.blue, r), i.alpha = vt(n.alpha, s.alpha, r), Y.transform(i));
|
|
354
|
+
}, Jt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
355
|
+
function Ni(t, e) {
|
|
356
|
+
return Jt.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
357
357
|
}
|
|
358
|
-
function Bi(
|
|
359
|
-
return (n) =>
|
|
358
|
+
function Bi(t, e) {
|
|
359
|
+
return (n) => vt(t, e, n);
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
return typeof
|
|
361
|
+
function we(t) {
|
|
362
|
+
return typeof t == "number" ? Bi : typeof t == "string" ? be(t) ? Ot : P.test(t) ? He : Wi : Array.isArray(t) ? Yn : typeof t == "object" ? P.test(t) ? He : Li : Ot;
|
|
363
363
|
}
|
|
364
|
-
function Yn(
|
|
365
|
-
const n = [...
|
|
364
|
+
function Yn(t, e) {
|
|
365
|
+
const n = [...t], s = n.length, i = t.map((r, o) => we(r)(r, e[o]));
|
|
366
366
|
return (r) => {
|
|
367
367
|
for (let o = 0; o < s; o++)
|
|
368
368
|
n[o] = i[o](r);
|
|
369
369
|
return n;
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
function Li(
|
|
373
|
-
const n = { ...
|
|
372
|
+
function Li(t, e) {
|
|
373
|
+
const n = { ...t, ...e }, s = {};
|
|
374
374
|
for (const i in n)
|
|
375
|
-
|
|
375
|
+
t[i] !== void 0 && e[i] !== void 0 && (s[i] = we(t[i])(t[i], e[i]));
|
|
376
376
|
return (i) => {
|
|
377
377
|
for (const r in s)
|
|
378
378
|
n[r] = s[r](i);
|
|
379
379
|
return n;
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
-
function Ki(
|
|
382
|
+
function Ki(t, e) {
|
|
383
383
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
384
|
-
for (let i = 0; i <
|
|
385
|
-
const r =
|
|
384
|
+
for (let i = 0; i < e.values.length; i++) {
|
|
385
|
+
const r = e.types[i], o = t.indexes[r][s[r]], a = t.values[o] ?? 0;
|
|
386
386
|
n[i] = a, s[r]++;
|
|
387
387
|
}
|
|
388
388
|
return n;
|
|
389
389
|
}
|
|
390
|
-
const Wi = (
|
|
391
|
-
const n = B.createTransformer(
|
|
392
|
-
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 ?
|
|
390
|
+
const Wi = (t, e) => {
|
|
391
|
+
const n = B.createTransformer(e), s = mt(t), i = mt(e);
|
|
392
|
+
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 ? Jt.has(t) && !i.values.length || Jt.has(e) && !s.values.length ? Ni(t, e) : Bt(Yn(Ki(s, i), i.values), n) : (yt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Ot(t, e));
|
|
393
393
|
};
|
|
394
|
-
function Xn(
|
|
395
|
-
return typeof
|
|
394
|
+
function Xn(t, e, n) {
|
|
395
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? vt(t, e, n) : we(t)(t, e);
|
|
396
396
|
}
|
|
397
|
-
const $i = (
|
|
398
|
-
const
|
|
397
|
+
const $i = (t) => {
|
|
398
|
+
const e = ({ timestamp: n }) => t(n);
|
|
399
399
|
return {
|
|
400
|
-
start: (n = !0) => L.update(
|
|
401
|
-
stop: () =>
|
|
400
|
+
start: (n = !0) => L.update(e, n),
|
|
401
|
+
stop: () => qt(e),
|
|
402
402
|
/**
|
|
403
403
|
* If we're processing this frame we can use the
|
|
404
404
|
* framelocked timestamp to keep things in sync.
|
|
405
405
|
*/
|
|
406
|
-
now: () =>
|
|
406
|
+
now: () => Ft.isProcessing ? Ft.timestamp : I.now()
|
|
407
407
|
};
|
|
408
|
-
}, qn = (
|
|
408
|
+
}, qn = (t, e, n = 10) => {
|
|
409
409
|
let s = "";
|
|
410
|
-
const i = Math.max(Math.round(
|
|
410
|
+
const i = Math.max(Math.round(e / n), 2);
|
|
411
411
|
for (let r = 0; r < i; r++)
|
|
412
|
-
s += Math.round(
|
|
412
|
+
s += Math.round(t(r / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
413
413
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
414
|
-
},
|
|
415
|
-
function
|
|
416
|
-
let
|
|
414
|
+
}, Dt = 2e4;
|
|
415
|
+
function Se(t) {
|
|
416
|
+
let e = 0;
|
|
417
417
|
const n = 50;
|
|
418
|
-
let s =
|
|
419
|
-
for (; !s.done &&
|
|
420
|
-
|
|
421
|
-
return
|
|
418
|
+
let s = t.next(e);
|
|
419
|
+
for (; !s.done && e < Dt; )
|
|
420
|
+
e += n, s = t.next(e);
|
|
421
|
+
return e >= Dt ? 1 / 0 : e;
|
|
422
422
|
}
|
|
423
|
-
function ji(
|
|
424
|
-
const s = n({ ...
|
|
423
|
+
function ji(t, e = 100, n) {
|
|
424
|
+
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Se(s), Dt);
|
|
425
425
|
return {
|
|
426
426
|
type: "keyframes",
|
|
427
|
-
ease: (r) => s.next(i * r).value /
|
|
427
|
+
ease: (r) => s.next(i * r).value / e,
|
|
428
428
|
duration: /* @__PURE__ */ N(i)
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
431
|
const Gi = 5;
|
|
432
|
-
function Zn(
|
|
433
|
-
const s = Math.max(
|
|
434
|
-
return Fn(n -
|
|
432
|
+
function Zn(t, e, n) {
|
|
433
|
+
const s = Math.max(e - Gi, 0);
|
|
434
|
+
return Fn(n - t(s), e - s);
|
|
435
435
|
}
|
|
436
436
|
const x = {
|
|
437
437
|
// Default spring physics
|
|
@@ -461,88 +461,88 @@ const x = {
|
|
|
461
461
|
// in seconds
|
|
462
462
|
minDamping: 0.05,
|
|
463
463
|
maxDamping: 1
|
|
464
|
-
},
|
|
465
|
-
function _i({ duration:
|
|
464
|
+
}, _t = 1e-3;
|
|
465
|
+
function _i({ duration: t = x.duration, bounce: e = x.bounce, velocity: n = x.velocity, mass: s = x.mass }) {
|
|
466
466
|
let i, r;
|
|
467
|
-
|
|
468
|
-
let o = 1 -
|
|
469
|
-
o = U(x.minDamping, x.maxDamping, o),
|
|
470
|
-
const u = l * o, d = u *
|
|
471
|
-
return
|
|
467
|
+
yt(t <= /* @__PURE__ */ K(x.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
468
|
+
let o = 1 - e;
|
|
469
|
+
o = U(x.minDamping, x.maxDamping, o), t = U(x.minDuration, x.maxDuration, /* @__PURE__ */ N(t)), o < 1 ? (i = (l) => {
|
|
470
|
+
const u = l * o, d = u * t, f = u - n, h = Qt(l, o), p = Math.exp(-d);
|
|
471
|
+
return _t - f / h * p;
|
|
472
472
|
}, r = (l) => {
|
|
473
|
-
const d = l * o *
|
|
474
|
-
return (-i(l) +
|
|
473
|
+
const d = l * o * t, f = d * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * t, p = Math.exp(-d), b = Qt(Math.pow(l, 2), o);
|
|
474
|
+
return (-i(l) + _t > 0 ? -1 : 1) * ((f - h) * p) / b;
|
|
475
475
|
}) : (i = (l) => {
|
|
476
|
-
const u = Math.exp(-l *
|
|
477
|
-
return -
|
|
476
|
+
const u = Math.exp(-l * t), d = (l - n) * t + 1;
|
|
477
|
+
return -_t + u * d;
|
|
478
478
|
}, r = (l) => {
|
|
479
|
-
const u = Math.exp(-l *
|
|
479
|
+
const u = Math.exp(-l * t), d = (n - l) * (t * t);
|
|
480
480
|
return u * d;
|
|
481
481
|
});
|
|
482
|
-
const a = 5 /
|
|
483
|
-
if (
|
|
482
|
+
const a = 5 / t, c = Ui(i, r, a);
|
|
483
|
+
if (t = /* @__PURE__ */ K(t), isNaN(c))
|
|
484
484
|
return {
|
|
485
485
|
stiffness: x.stiffness,
|
|
486
486
|
damping: x.damping,
|
|
487
|
-
duration:
|
|
487
|
+
duration: t
|
|
488
488
|
};
|
|
489
489
|
{
|
|
490
490
|
const l = Math.pow(c, 2) * s;
|
|
491
491
|
return {
|
|
492
492
|
stiffness: l,
|
|
493
493
|
damping: o * 2 * Math.sqrt(s * l),
|
|
494
|
-
duration:
|
|
494
|
+
duration: t
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
const Hi = 12;
|
|
499
|
-
function Ui(
|
|
499
|
+
function Ui(t, e, n) {
|
|
500
500
|
let s = n;
|
|
501
501
|
for (let i = 1; i < Hi; i++)
|
|
502
|
-
s = s -
|
|
502
|
+
s = s - t(s) / e(s);
|
|
503
503
|
return s;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
return
|
|
505
|
+
function Qt(t, e) {
|
|
506
|
+
return t * Math.sqrt(1 - e * e);
|
|
507
507
|
}
|
|
508
508
|
const zi = ["duration", "bounce"], Yi = ["stiffness", "damping", "mass"];
|
|
509
|
-
function
|
|
510
|
-
return
|
|
509
|
+
function Ue(t, e) {
|
|
510
|
+
return e.some((n) => t[n] !== void 0);
|
|
511
511
|
}
|
|
512
|
-
function Xi(
|
|
513
|
-
let
|
|
512
|
+
function Xi(t) {
|
|
513
|
+
let e = {
|
|
514
514
|
velocity: x.velocity,
|
|
515
515
|
stiffness: x.stiffness,
|
|
516
516
|
damping: x.damping,
|
|
517
517
|
mass: x.mass,
|
|
518
518
|
isResolvedFromDuration: !1,
|
|
519
|
-
...
|
|
519
|
+
...t
|
|
520
520
|
};
|
|
521
|
-
if (!
|
|
522
|
-
if (
|
|
523
|
-
const n =
|
|
524
|
-
|
|
525
|
-
...
|
|
521
|
+
if (!Ue(t, Yi) && Ue(t, zi))
|
|
522
|
+
if (e.velocity = 0, t.visualDuration) {
|
|
523
|
+
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * U(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
524
|
+
e = {
|
|
525
|
+
...e,
|
|
526
526
|
mass: x.mass,
|
|
527
527
|
stiffness: i,
|
|
528
528
|
damping: r
|
|
529
529
|
};
|
|
530
530
|
} else {
|
|
531
|
-
const n = _i({ ...
|
|
532
|
-
|
|
533
|
-
...
|
|
531
|
+
const n = _i({ ...t, velocity: 0 });
|
|
532
|
+
e = {
|
|
533
|
+
...e,
|
|
534
534
|
...n,
|
|
535
535
|
mass: x.mass
|
|
536
|
-
},
|
|
536
|
+
}, e.isResolvedFromDuration = !0;
|
|
537
537
|
}
|
|
538
|
-
return
|
|
538
|
+
return e;
|
|
539
539
|
}
|
|
540
|
-
function
|
|
541
|
-
const n = typeof
|
|
542
|
-
visualDuration:
|
|
540
|
+
function Rt(t = x.visualDuration, e = x.bounce) {
|
|
541
|
+
const n = typeof t != "object" ? {
|
|
542
|
+
visualDuration: t,
|
|
543
543
|
keyframes: [0, 1],
|
|
544
|
-
bounce:
|
|
545
|
-
} :
|
|
544
|
+
bounce: e
|
|
545
|
+
} : t;
|
|
546
546
|
let { restSpeed: s, restDelta: i } = n;
|
|
547
547
|
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: h } = Xi({
|
|
548
548
|
...n,
|
|
@@ -551,7 +551,7 @@ function Re(e = x.visualDuration, t = x.bounce) {
|
|
|
551
551
|
s || (s = w ? x.restSpeed.granular : x.restSpeed.default), i || (i = w ? x.restDelta.granular : x.restDelta.default);
|
|
552
552
|
let T;
|
|
553
553
|
if (b < 1) {
|
|
554
|
-
const v =
|
|
554
|
+
const v = Qt(g, b);
|
|
555
555
|
T = (A) => {
|
|
556
556
|
const M = Math.exp(-b * g * A);
|
|
557
557
|
return o - M * ((p + b * g * y) / v * Math.sin(v * A) + y * Math.cos(v * A));
|
|
@@ -580,7 +580,7 @@ function Re(e = x.visualDuration, t = x.bounce) {
|
|
|
580
580
|
return a.value = a.done ? o : A, a;
|
|
581
581
|
},
|
|
582
582
|
toString: () => {
|
|
583
|
-
const v = Math.min(
|
|
583
|
+
const v = Math.min(Se(V), Dt), A = qn((M) => V.next(v * M).value, v, 30);
|
|
584
584
|
return v + "ms " + A;
|
|
585
585
|
},
|
|
586
586
|
toTransition: () => {
|
|
@@ -588,16 +588,16 @@ function Re(e = x.visualDuration, t = x.bounce) {
|
|
|
588
588
|
};
|
|
589
589
|
return V;
|
|
590
590
|
}
|
|
591
|
-
|
|
592
|
-
const
|
|
593
|
-
return
|
|
591
|
+
Rt.applyToOptions = (t) => {
|
|
592
|
+
const e = ji(t, 100, Rt);
|
|
593
|
+
return t.ease = e.ease, t.duration = /* @__PURE__ */ K(e.duration), t.type = "keyframes", t;
|
|
594
594
|
};
|
|
595
|
-
function
|
|
596
|
-
const d =
|
|
595
|
+
function te({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: c, restDelta: l = 0.5, restSpeed: u }) {
|
|
596
|
+
const d = t[0], f = {
|
|
597
597
|
done: !1,
|
|
598
598
|
value: d
|
|
599
599
|
}, h = (S) => a !== void 0 && S < a || c !== void 0 && S > c, p = (S) => a === void 0 ? c : c === void 0 || Math.abs(a - S) < Math.abs(c - S) ? a : c;
|
|
600
|
-
let b = n *
|
|
600
|
+
let b = n * e;
|
|
601
601
|
const y = d + b, g = o === void 0 ? y : o(y);
|
|
602
602
|
g !== y && (b = g - d);
|
|
603
603
|
const w = (S) => -b * Math.exp(-S / s), T = (S) => g + w(S), V = (S) => {
|
|
@@ -606,7 +606,7 @@ function et({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
606
606
|
};
|
|
607
607
|
let v, A;
|
|
608
608
|
const M = (S) => {
|
|
609
|
-
h(f.value) && (v = S, A =
|
|
609
|
+
h(f.value) && (v = S, A = Rt({
|
|
610
610
|
keyframes: [f.value, p(f.value)],
|
|
611
611
|
velocity: Zn(T, S, f.value),
|
|
612
612
|
// TODO: This should be passing * 1000
|
|
@@ -624,88 +624,88 @@ function et({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
624
624
|
}
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
function qi(
|
|
628
|
-
const s = [], i = n || j.mix || Xn, r =
|
|
627
|
+
function qi(t, e, n) {
|
|
628
|
+
const s = [], i = n || j.mix || Xn, r = t.length - 1;
|
|
629
629
|
for (let o = 0; o < r; o++) {
|
|
630
|
-
let a = i(
|
|
631
|
-
if (
|
|
632
|
-
const c = Array.isArray(
|
|
633
|
-
a =
|
|
630
|
+
let a = i(t[o], t[o + 1]);
|
|
631
|
+
if (e) {
|
|
632
|
+
const c = Array.isArray(e) ? e[o] || rt : e;
|
|
633
|
+
a = Bt(c, a);
|
|
634
634
|
}
|
|
635
635
|
s.push(a);
|
|
636
636
|
}
|
|
637
637
|
return s;
|
|
638
638
|
}
|
|
639
|
-
function Zi(
|
|
640
|
-
const r =
|
|
641
|
-
if (Z(r ===
|
|
642
|
-
return () =>
|
|
643
|
-
if (r === 2 &&
|
|
644
|
-
return () =>
|
|
645
|
-
const o =
|
|
646
|
-
|
|
647
|
-
const a = qi(
|
|
648
|
-
if (o && u <
|
|
649
|
-
return
|
|
639
|
+
function Zi(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
640
|
+
const r = t.length;
|
|
641
|
+
if (Z(r === e.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
|
|
642
|
+
return () => e[0];
|
|
643
|
+
if (r === 2 && e[0] === e[1])
|
|
644
|
+
return () => e[1];
|
|
645
|
+
const o = t[0] === t[1];
|
|
646
|
+
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
647
|
+
const a = qi(e, s, i), c = a.length, l = (u) => {
|
|
648
|
+
if (o && u < t[0])
|
|
649
|
+
return e[0];
|
|
650
650
|
let d = 0;
|
|
651
651
|
if (c > 1)
|
|
652
|
-
for (; d <
|
|
652
|
+
for (; d < t.length - 2 && !(u < t[d + 1]); d++)
|
|
653
653
|
;
|
|
654
|
-
const f = /* @__PURE__ */ Cn(
|
|
654
|
+
const f = /* @__PURE__ */ Cn(t[d], t[d + 1], u);
|
|
655
655
|
return a[d](f);
|
|
656
656
|
};
|
|
657
|
-
return n ? (u) => l(U(
|
|
657
|
+
return n ? (u) => l(U(t[0], t[r - 1], u)) : l;
|
|
658
658
|
}
|
|
659
|
-
function Ji(
|
|
660
|
-
const n =
|
|
661
|
-
for (let s = 1; s <=
|
|
662
|
-
const i = /* @__PURE__ */ Cn(0,
|
|
663
|
-
|
|
659
|
+
function Ji(t, e) {
|
|
660
|
+
const n = t[t.length - 1];
|
|
661
|
+
for (let s = 1; s <= e; s++) {
|
|
662
|
+
const i = /* @__PURE__ */ Cn(0, e, s);
|
|
663
|
+
t.push(vt(n, 1, i));
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
function Qi(
|
|
667
|
-
const
|
|
668
|
-
return Ji(
|
|
666
|
+
function Qi(t) {
|
|
667
|
+
const e = [0];
|
|
668
|
+
return Ji(e, t.length - 1), e;
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
return
|
|
670
|
+
function tr(t, e) {
|
|
671
|
+
return t.map((n) => n * e);
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
return
|
|
673
|
+
function er(t, e) {
|
|
674
|
+
return t.map(() => e || Ln).splice(0, t.length - 1);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
const i = hi(s) ? s.map(
|
|
676
|
+
function tt({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
677
|
+
const i = hi(s) ? s.map(We) : We(s), r = {
|
|
678
678
|
done: !1,
|
|
679
|
-
value:
|
|
680
|
-
}, o =
|
|
679
|
+
value: e[0]
|
|
680
|
+
}, o = tr(
|
|
681
681
|
// Only use the provided offsets if they're the correct length
|
|
682
682
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
683
|
-
n && n.length ===
|
|
684
|
-
|
|
685
|
-
), a = Zi(o,
|
|
686
|
-
ease: Array.isArray(i) ? i :
|
|
683
|
+
n && n.length === e.length ? n : Qi(e),
|
|
684
|
+
t
|
|
685
|
+
), a = Zi(o, e, {
|
|
686
|
+
ease: Array.isArray(i) ? i : er(e, i)
|
|
687
687
|
});
|
|
688
688
|
return {
|
|
689
|
-
calculatedDuration:
|
|
690
|
-
next: (c) => (r.value = a(c), r.done = c >=
|
|
689
|
+
calculatedDuration: t,
|
|
690
|
+
next: (c) => (r.value = a(c), r.done = c >= t, r)
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
|
-
const nr = (
|
|
694
|
-
function
|
|
695
|
-
const r =
|
|
693
|
+
const nr = (t) => t !== null;
|
|
694
|
+
function Ve(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
|
|
695
|
+
const r = t.filter(nr), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : r.length - 1;
|
|
696
696
|
return !a || s === void 0 ? r[a] : s;
|
|
697
697
|
}
|
|
698
698
|
const sr = {
|
|
699
|
-
decay:
|
|
700
|
-
inertia:
|
|
701
|
-
tween:
|
|
702
|
-
keyframes:
|
|
703
|
-
spring:
|
|
699
|
+
decay: te,
|
|
700
|
+
inertia: te,
|
|
701
|
+
tween: tt,
|
|
702
|
+
keyframes: tt,
|
|
703
|
+
spring: Rt
|
|
704
704
|
};
|
|
705
|
-
function Jn(
|
|
706
|
-
typeof
|
|
705
|
+
function Jn(t) {
|
|
706
|
+
typeof t.type == "string" && (t.type = sr[t.type]);
|
|
707
707
|
}
|
|
708
|
-
class
|
|
708
|
+
class Ae {
|
|
709
709
|
constructor() {
|
|
710
710
|
this.updateFinished();
|
|
711
711
|
}
|
|
@@ -713,8 +713,8 @@ class At {
|
|
|
713
713
|
return this._finished;
|
|
714
714
|
}
|
|
715
715
|
updateFinished() {
|
|
716
|
-
this._finished = new Promise((
|
|
717
|
-
this.resolve =
|
|
716
|
+
this._finished = new Promise((e) => {
|
|
717
|
+
this.resolve = e;
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
720
|
notifyFinished() {
|
|
@@ -725,45 +725,45 @@ class At {
|
|
|
725
725
|
*
|
|
726
726
|
* @deprecated Use `finished` instead.
|
|
727
727
|
*/
|
|
728
|
-
then(
|
|
729
|
-
return this.finished.then(
|
|
728
|
+
then(e, n) {
|
|
729
|
+
return this.finished.then(e, n);
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
|
-
const ir = (
|
|
733
|
-
class
|
|
734
|
-
constructor(
|
|
732
|
+
const ir = (t) => t / 100;
|
|
733
|
+
class xe extends Ae {
|
|
734
|
+
constructor(e) {
|
|
735
735
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
736
736
|
var s, i;
|
|
737
737
|
const { motionValue: n } = this.options;
|
|
738
738
|
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));
|
|
739
|
-
}, this.options =
|
|
739
|
+
}, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
|
|
740
740
|
}
|
|
741
741
|
initAnimation() {
|
|
742
|
-
const { options:
|
|
743
|
-
Jn(
|
|
744
|
-
const { type: n =
|
|
745
|
-
let { keyframes: a } =
|
|
746
|
-
const c = n ||
|
|
747
|
-
process.env.NODE_ENV !== "production" && c !==
|
|
748
|
-
const l = c({ ...
|
|
742
|
+
const { options: e } = this;
|
|
743
|
+
Jn(e);
|
|
744
|
+
const { type: n = tt, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = e;
|
|
745
|
+
let { keyframes: a } = e;
|
|
746
|
+
const c = n || tt;
|
|
747
|
+
process.env.NODE_ENV !== "production" && c !== tt && Z(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), c !== tt && typeof a[0] != "number" && (this.mixKeyframes = Bt(ir, Xn(a[0], a[1])), a = [0, 100]);
|
|
748
|
+
const l = c({ ...e, keyframes: a });
|
|
749
749
|
r === "mirror" && (this.mirroredGenerator = c({
|
|
750
|
-
...
|
|
750
|
+
...e,
|
|
751
751
|
keyframes: [...a].reverse(),
|
|
752
752
|
velocity: -o
|
|
753
|
-
})), l.calculatedDuration === null && (l.calculatedDuration =
|
|
753
|
+
})), l.calculatedDuration === null && (l.calculatedDuration = Se(l));
|
|
754
754
|
const { calculatedDuration: u } = l;
|
|
755
755
|
this.calculatedDuration = u, this.resolvedDuration = u + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = l;
|
|
756
756
|
}
|
|
757
|
-
updateTime(
|
|
758
|
-
const n = Math.round(
|
|
757
|
+
updateTime(e) {
|
|
758
|
+
const n = Math.round(e - this.startTime) * this.playbackSpeed;
|
|
759
759
|
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
|
|
760
760
|
}
|
|
761
|
-
tick(
|
|
761
|
+
tick(e, n = !1) {
|
|
762
762
|
const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
|
|
763
763
|
if (this.startTime === null)
|
|
764
764
|
return s.next(0);
|
|
765
765
|
const { delay: l = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: h, type: p, onUpdate: b, finalKeyframe: y } = this.options;
|
|
766
|
-
this.speed > 0 ? this.startTime = Math.min(this.startTime,
|
|
766
|
+
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);
|
|
767
767
|
const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), w = this.playbackSpeed >= 0 ? g < 0 : g > i;
|
|
768
768
|
this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
769
769
|
let T = this.currentTime, V = s;
|
|
@@ -777,44 +777,44 @@ class xt extends At {
|
|
|
777
777
|
let { done: A } = v;
|
|
778
778
|
!w && c !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
779
779
|
const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
780
|
-
return M && p !==
|
|
780
|
+
return M && p !== te && (v.value = Ve(u, this.options, y, this.speed)), b && b(v.value), M && this.finish(), v;
|
|
781
781
|
}
|
|
782
782
|
/**
|
|
783
783
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
784
784
|
* resolves when the animation finishes at all but in a future update could/should
|
|
785
785
|
* reject if its cancels.
|
|
786
786
|
*/
|
|
787
|
-
then(
|
|
788
|
-
return this.finished.then(
|
|
787
|
+
then(e, n) {
|
|
788
|
+
return this.finished.then(e, n);
|
|
789
789
|
}
|
|
790
790
|
get duration() {
|
|
791
791
|
return /* @__PURE__ */ N(this.calculatedDuration);
|
|
792
792
|
}
|
|
793
793
|
get iterationDuration() {
|
|
794
|
-
const { delay:
|
|
795
|
-
return this.duration + /* @__PURE__ */ N(
|
|
794
|
+
const { delay: e = 0 } = this.options || {};
|
|
795
|
+
return this.duration + /* @__PURE__ */ N(e);
|
|
796
796
|
}
|
|
797
797
|
get time() {
|
|
798
798
|
return /* @__PURE__ */ N(this.currentTime);
|
|
799
799
|
}
|
|
800
|
-
set time(
|
|
800
|
+
set time(e) {
|
|
801
801
|
var n;
|
|
802
|
-
|
|
802
|
+
e = /* @__PURE__ */ K(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);
|
|
803
803
|
}
|
|
804
804
|
get speed() {
|
|
805
805
|
return this.playbackSpeed;
|
|
806
806
|
}
|
|
807
|
-
set speed(
|
|
807
|
+
set speed(e) {
|
|
808
808
|
this.updateTime(I.now());
|
|
809
|
-
const n = this.playbackSpeed !==
|
|
810
|
-
this.playbackSpeed =
|
|
809
|
+
const n = this.playbackSpeed !== e;
|
|
810
|
+
this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ N(this.currentTime));
|
|
811
811
|
}
|
|
812
812
|
play() {
|
|
813
813
|
var i, r;
|
|
814
814
|
if (this.isStopped)
|
|
815
815
|
return;
|
|
816
|
-
const { driver:
|
|
817
|
-
this.driver || (this.driver =
|
|
816
|
+
const { driver: e = $i, startTime: n } = this.options;
|
|
817
|
+
this.driver || (this.driver = e((o) => this.tick(o))), (r = (i = this.options).onPlay) == null || r.call(i);
|
|
818
818
|
const s = this.driver.now();
|
|
819
819
|
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();
|
|
820
820
|
}
|
|
@@ -825,12 +825,12 @@ class xt extends At {
|
|
|
825
825
|
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
826
826
|
}
|
|
827
827
|
finish() {
|
|
828
|
-
var
|
|
829
|
-
this.notifyFinished(), this.teardown(), this.state = "finished", (n = (
|
|
828
|
+
var e, n;
|
|
829
|
+
this.notifyFinished(), this.teardown(), this.state = "finished", (n = (e = this.options).onComplete) == null || n.call(e);
|
|
830
830
|
}
|
|
831
831
|
cancel() {
|
|
832
|
-
var
|
|
833
|
-
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), (n = (
|
|
832
|
+
var e, n;
|
|
833
|
+
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), (n = (e = this.options).onCancel) == null || n.call(e);
|
|
834
834
|
}
|
|
835
835
|
teardown() {
|
|
836
836
|
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
|
|
@@ -838,21 +838,21 @@ class xt extends At {
|
|
|
838
838
|
stopDriver() {
|
|
839
839
|
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
840
840
|
}
|
|
841
|
-
sample(
|
|
842
|
-
return this.startTime = 0, this.tick(
|
|
841
|
+
sample(e) {
|
|
842
|
+
return this.startTime = 0, this.tick(e, !0);
|
|
843
843
|
}
|
|
844
|
-
attachTimeline(
|
|
844
|
+
attachTimeline(e) {
|
|
845
845
|
var n;
|
|
846
|
-
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(),
|
|
846
|
+
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), e.observe(this);
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
-
function rr(
|
|
850
|
-
for (let
|
|
851
|
-
e
|
|
849
|
+
function rr(t) {
|
|
850
|
+
for (let e = 1; e < t.length; e++)
|
|
851
|
+
t[e] ?? (t[e] = t[e - 1]);
|
|
852
852
|
}
|
|
853
|
-
const X = (
|
|
854
|
-
const
|
|
855
|
-
return
|
|
853
|
+
const X = (t) => t * 180 / Math.PI, ee = (t) => {
|
|
854
|
+
const e = X(Math.atan2(t[1], t[0]));
|
|
855
|
+
return ne(e);
|
|
856
856
|
}, or = {
|
|
857
857
|
x: 4,
|
|
858
858
|
y: 5,
|
|
@@ -860,57 +860,57 @@ const X = (e) => e * 180 / Math.PI, tt = (e) => {
|
|
|
860
860
|
translateY: 5,
|
|
861
861
|
scaleX: 0,
|
|
862
862
|
scaleY: 3,
|
|
863
|
-
scale: (
|
|
864
|
-
rotate:
|
|
865
|
-
rotateZ:
|
|
866
|
-
skewX: (
|
|
867
|
-
skewY: (
|
|
868
|
-
skew: (
|
|
869
|
-
},
|
|
863
|
+
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
864
|
+
rotate: ee,
|
|
865
|
+
rotateZ: ee,
|
|
866
|
+
skewX: (t) => X(Math.atan(t[1])),
|
|
867
|
+
skewY: (t) => X(Math.atan(t[2])),
|
|
868
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
869
|
+
}, ne = (t) => (t = t % 360, t < 0 && (t += 360), t), ze = ee, Ye = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Xe = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), ar = {
|
|
870
870
|
x: 12,
|
|
871
871
|
y: 13,
|
|
872
872
|
z: 14,
|
|
873
873
|
translateX: 12,
|
|
874
874
|
translateY: 13,
|
|
875
875
|
translateZ: 14,
|
|
876
|
-
scaleX:
|
|
877
|
-
scaleY:
|
|
878
|
-
scale: (
|
|
879
|
-
rotateX: (
|
|
880
|
-
rotateY: (
|
|
881
|
-
rotateZ:
|
|
882
|
-
rotate:
|
|
883
|
-
skewX: (
|
|
884
|
-
skewY: (
|
|
885
|
-
skew: (
|
|
876
|
+
scaleX: Ye,
|
|
877
|
+
scaleY: Xe,
|
|
878
|
+
scale: (t) => (Ye(t) + Xe(t)) / 2,
|
|
879
|
+
rotateX: (t) => ne(X(Math.atan2(t[6], t[5]))),
|
|
880
|
+
rotateY: (t) => ne(X(Math.atan2(-t[2], t[0]))),
|
|
881
|
+
rotateZ: ze,
|
|
882
|
+
rotate: ze,
|
|
883
|
+
skewX: (t) => X(Math.atan(t[4])),
|
|
884
|
+
skewY: (t) => X(Math.atan(t[1])),
|
|
885
|
+
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
886
886
|
};
|
|
887
|
-
function
|
|
888
|
-
return
|
|
887
|
+
function se(t) {
|
|
888
|
+
return t.includes("scale") ? 1 : 0;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
891
|
-
if (!
|
|
892
|
-
return
|
|
893
|
-
const n =
|
|
890
|
+
function ie(t, e) {
|
|
891
|
+
if (!t || t === "none")
|
|
892
|
+
return se(e);
|
|
893
|
+
const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
894
894
|
let s, i;
|
|
895
895
|
if (n)
|
|
896
896
|
s = ar, i = n;
|
|
897
897
|
else {
|
|
898
|
-
const a =
|
|
898
|
+
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
899
899
|
s = or, i = a;
|
|
900
900
|
}
|
|
901
901
|
if (!i)
|
|
902
|
-
return
|
|
903
|
-
const r = s[
|
|
902
|
+
return se(e);
|
|
903
|
+
const r = s[e], o = i[1].split(",").map(cr);
|
|
904
904
|
return typeof r == "function" ? r(o) : o[r];
|
|
905
905
|
}
|
|
906
|
-
const ur = (
|
|
907
|
-
const { transform: n = "none" } = getComputedStyle(
|
|
908
|
-
return
|
|
906
|
+
const ur = (t, e) => {
|
|
907
|
+
const { transform: n = "none" } = getComputedStyle(t);
|
|
908
|
+
return ie(n, e);
|
|
909
909
|
};
|
|
910
|
-
function cr(
|
|
911
|
-
return parseFloat(
|
|
910
|
+
function cr(t) {
|
|
911
|
+
return parseFloat(t.trim());
|
|
912
912
|
}
|
|
913
|
-
const
|
|
913
|
+
const at = [
|
|
914
914
|
"transformPerspective",
|
|
915
915
|
"x",
|
|
916
916
|
"y",
|
|
@@ -928,77 +928,77 @@ const ae = [
|
|
|
928
928
|
"skew",
|
|
929
929
|
"skewX",
|
|
930
930
|
"skewY"
|
|
931
|
-
],
|
|
932
|
-
function dr(
|
|
933
|
-
const
|
|
931
|
+
], ut = new Set(at), qe = (t) => t === ot || t === m, lr = /* @__PURE__ */ new Set(["x", "y", "z"]), fr = at.filter((t) => !lr.has(t));
|
|
932
|
+
function dr(t) {
|
|
933
|
+
const e = [];
|
|
934
934
|
return fr.forEach((n) => {
|
|
935
|
-
const s =
|
|
936
|
-
s !== void 0 && (
|
|
937
|
-
}),
|
|
935
|
+
const s = t.getValue(n);
|
|
936
|
+
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
937
|
+
}), e;
|
|
938
938
|
}
|
|
939
939
|
const H = {
|
|
940
940
|
// Dimensions
|
|
941
|
-
width: ({ x:
|
|
942
|
-
height: ({ y:
|
|
943
|
-
top: (
|
|
944
|
-
left: (
|
|
945
|
-
bottom: ({ y:
|
|
946
|
-
right: ({ x:
|
|
941
|
+
width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
|
|
942
|
+
height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
|
|
943
|
+
top: (t, { top: e }) => parseFloat(e),
|
|
944
|
+
left: (t, { left: e }) => parseFloat(e),
|
|
945
|
+
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
946
|
+
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
947
947
|
// Transform
|
|
948
|
-
x: (
|
|
949
|
-
y: (
|
|
948
|
+
x: (t, { transform: e }) => ie(e, "x"),
|
|
949
|
+
y: (t, { transform: e }) => ie(e, "y")
|
|
950
950
|
};
|
|
951
951
|
H.translateX = H.x;
|
|
952
952
|
H.translateY = H.y;
|
|
953
953
|
const q = /* @__PURE__ */ new Set();
|
|
954
|
-
let
|
|
954
|
+
let re = !1, oe = !1, ae = !1;
|
|
955
955
|
function Qn() {
|
|
956
|
-
if (
|
|
957
|
-
const
|
|
958
|
-
|
|
956
|
+
if (oe) {
|
|
957
|
+
const t = Array.from(q).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
958
|
+
e.forEach((s) => {
|
|
959
959
|
const i = dr(s);
|
|
960
960
|
i.length && (n.set(s, i), s.render());
|
|
961
|
-
}),
|
|
961
|
+
}), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
|
|
962
962
|
s.render();
|
|
963
963
|
const i = n.get(s);
|
|
964
964
|
i && i.forEach(([r, o]) => {
|
|
965
965
|
var a;
|
|
966
966
|
(a = s.getValue(r)) == null || a.set(o);
|
|
967
967
|
});
|
|
968
|
-
}),
|
|
968
|
+
}), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
|
|
969
969
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
|
-
|
|
972
|
+
oe = !1, re = !1, q.forEach((t) => t.complete(ae)), q.clear();
|
|
973
973
|
}
|
|
974
|
-
function
|
|
975
|
-
q.forEach((
|
|
976
|
-
|
|
974
|
+
function ts() {
|
|
975
|
+
q.forEach((t) => {
|
|
976
|
+
t.readKeyframes(), t.needsMeasurement && (oe = !0);
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
979
|
function hr() {
|
|
980
|
-
|
|
980
|
+
ae = !0, ts(), Qn(), ae = !1;
|
|
981
981
|
}
|
|
982
|
-
class
|
|
983
|
-
constructor(
|
|
984
|
-
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...
|
|
982
|
+
class Me {
|
|
983
|
+
constructor(e, n, s, i, r, o = !1) {
|
|
984
|
+
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;
|
|
985
985
|
}
|
|
986
986
|
scheduleResolve() {
|
|
987
|
-
this.state = "scheduled", this.isAsync ? (q.add(this),
|
|
987
|
+
this.state = "scheduled", this.isAsync ? (q.add(this), re || (re = !0, L.read(ts), L.resolveKeyframes(Qn))) : (this.readKeyframes(), this.complete());
|
|
988
988
|
}
|
|
989
989
|
readKeyframes() {
|
|
990
|
-
const { unresolvedKeyframes:
|
|
991
|
-
if (
|
|
992
|
-
const r = i == null ? void 0 : i.get(), o =
|
|
990
|
+
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
991
|
+
if (e[0] === null) {
|
|
992
|
+
const r = i == null ? void 0 : i.get(), o = e[e.length - 1];
|
|
993
993
|
if (r !== void 0)
|
|
994
|
-
|
|
994
|
+
e[0] = r;
|
|
995
995
|
else if (s && n) {
|
|
996
996
|
const a = s.readValue(n, o);
|
|
997
|
-
a != null && (
|
|
997
|
+
a != null && (e[0] = a);
|
|
998
998
|
}
|
|
999
|
-
|
|
999
|
+
e[0] === void 0 && (e[0] = o), i && r === void 0 && i.set(e[0]);
|
|
1000
1000
|
}
|
|
1001
|
-
rr(
|
|
1001
|
+
rr(e);
|
|
1002
1002
|
}
|
|
1003
1003
|
setFinalKeyframe() {
|
|
1004
1004
|
}
|
|
@@ -1008,8 +1008,8 @@ class Mt {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
measureEndState() {
|
|
1010
1010
|
}
|
|
1011
|
-
complete(
|
|
1012
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe,
|
|
1011
|
+
complete(e = !1) {
|
|
1012
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), q.delete(this);
|
|
1013
1013
|
}
|
|
1014
1014
|
cancel() {
|
|
1015
1015
|
this.state === "scheduled" && (q.delete(this), this.state = "pending");
|
|
@@ -1018,40 +1018,40 @@ class Mt {
|
|
|
1018
1018
|
this.state === "pending" && this.scheduleResolve();
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
const pr = (
|
|
1022
|
-
function mr(
|
|
1023
|
-
pr(
|
|
1021
|
+
const pr = (t) => t.startsWith("--");
|
|
1022
|
+
function mr(t, e, n) {
|
|
1023
|
+
pr(e) ? t.style.setProperty(e, n) : t.style[e] = n;
|
|
1024
1024
|
}
|
|
1025
1025
|
const gr = {};
|
|
1026
|
-
function
|
|
1027
|
-
const n = /* @__PURE__ */ Mn(
|
|
1028
|
-
return () => gr[
|
|
1026
|
+
function es(t, e) {
|
|
1027
|
+
const n = /* @__PURE__ */ Mn(t);
|
|
1028
|
+
return () => gr[e] ?? n();
|
|
1029
1029
|
}
|
|
1030
|
-
const yr = /* @__PURE__ */
|
|
1030
|
+
const yr = /* @__PURE__ */ es(() => window.ScrollTimeline !== void 0, "scrollTimeline"), ns = /* @__PURE__ */ es(() => {
|
|
1031
1031
|
try {
|
|
1032
1032
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1033
1033
|
} catch {
|
|
1034
1034
|
return !1;
|
|
1035
1035
|
}
|
|
1036
1036
|
return !0;
|
|
1037
|
-
}, "linearEasing"),
|
|
1037
|
+
}, "linearEasing"), dt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Ze = {
|
|
1038
1038
|
linear: "linear",
|
|
1039
1039
|
ease: "ease",
|
|
1040
1040
|
easeIn: "ease-in",
|
|
1041
1041
|
easeOut: "ease-out",
|
|
1042
1042
|
easeInOut: "ease-in-out",
|
|
1043
|
-
circIn: /* @__PURE__ */
|
|
1044
|
-
circOut: /* @__PURE__ */
|
|
1045
|
-
backIn: /* @__PURE__ */
|
|
1046
|
-
backOut: /* @__PURE__ */
|
|
1043
|
+
circIn: /* @__PURE__ */ dt([0, 0.65, 0.55, 1]),
|
|
1044
|
+
circOut: /* @__PURE__ */ dt([0.55, 0, 1, 0.45]),
|
|
1045
|
+
backIn: /* @__PURE__ */ dt([0.31, 0.01, 0.66, -0.59]),
|
|
1046
|
+
backOut: /* @__PURE__ */ dt([0.33, 1.53, 0.69, 0.99])
|
|
1047
1047
|
};
|
|
1048
|
-
function ss(
|
|
1049
|
-
if (
|
|
1050
|
-
return typeof
|
|
1048
|
+
function ss(t, e) {
|
|
1049
|
+
if (t)
|
|
1050
|
+
return typeof t == "function" ? ns() ? qn(t, e) : "ease-out" : Kn(t) ? dt(t) : Array.isArray(t) ? t.map((n) => ss(n, e) || Ze.easeOut) : Ze[t];
|
|
1051
1051
|
}
|
|
1052
|
-
function br(
|
|
1052
|
+
function br(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, l = void 0) {
|
|
1053
1053
|
const u = {
|
|
1054
|
-
[
|
|
1054
|
+
[e]: n
|
|
1055
1055
|
};
|
|
1056
1056
|
c && (u.offset = c);
|
|
1057
1057
|
const d = ss(a, i);
|
|
@@ -1064,24 +1064,24 @@ function br(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatTyp
|
|
|
1064
1064
|
iterations: r + 1,
|
|
1065
1065
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
1066
1066
|
};
|
|
1067
|
-
return l && (f.pseudoElement = l),
|
|
1067
|
+
return l && (f.pseudoElement = l), t.animate(u, f);
|
|
1068
1068
|
}
|
|
1069
|
-
function is(
|
|
1070
|
-
return typeof
|
|
1069
|
+
function is(t) {
|
|
1070
|
+
return typeof t == "function" && "applyToOptions" in t;
|
|
1071
1071
|
}
|
|
1072
|
-
function Tr({ type:
|
|
1073
|
-
return is(
|
|
1072
|
+
function Tr({ type: t, ...e }) {
|
|
1073
|
+
return is(t) && ns() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1074
1074
|
}
|
|
1075
|
-
class rs extends
|
|
1076
|
-
constructor(
|
|
1077
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !
|
|
1075
|
+
class rs extends Ae {
|
|
1076
|
+
constructor(e) {
|
|
1077
|
+
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e)
|
|
1078
1078
|
return;
|
|
1079
|
-
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } =
|
|
1080
|
-
this.isPseudoElement = !!r, this.allowFlatten = o, this.options =
|
|
1081
|
-
const l = Tr(
|
|
1079
|
+
const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = e;
|
|
1080
|
+
this.isPseudoElement = !!r, this.allowFlatten = o, this.options = e, Z(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1081
|
+
const l = Tr(e);
|
|
1082
1082
|
this.animation = br(n, s, i, l, r), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1083
1083
|
if (this.finishedTime = this.time, !r) {
|
|
1084
|
-
const u =
|
|
1084
|
+
const u = Ve(i, this.options, a, this.speed);
|
|
1085
1085
|
this.updateMotionValue ? this.updateMotionValue(u) : mr(n, s, u), this.animation.cancel();
|
|
1086
1086
|
}
|
|
1087
1087
|
c == null || c(), this.notifyFinished();
|
|
@@ -1094,8 +1094,8 @@ class rs extends At {
|
|
|
1094
1094
|
this.animation.pause();
|
|
1095
1095
|
}
|
|
1096
1096
|
complete() {
|
|
1097
|
-
var
|
|
1098
|
-
(n = (
|
|
1097
|
+
var e, n;
|
|
1098
|
+
(n = (e = this.animation).finish) == null || n.call(e);
|
|
1099
1099
|
}
|
|
1100
1100
|
cancel() {
|
|
1101
1101
|
try {
|
|
@@ -1107,8 +1107,8 @@ class rs extends At {
|
|
|
1107
1107
|
if (this.isStopped)
|
|
1108
1108
|
return;
|
|
1109
1109
|
this.isStopped = !0;
|
|
1110
|
-
const { state:
|
|
1111
|
-
|
|
1110
|
+
const { state: e } = this;
|
|
1111
|
+
e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
1112
1112
|
}
|
|
1113
1113
|
/**
|
|
1114
1114
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1124,23 +1124,23 @@ class rs extends At {
|
|
|
1124
1124
|
*/
|
|
1125
1125
|
commitStyles() {
|
|
1126
1126
|
var n, s, i;
|
|
1127
|
-
const
|
|
1128
|
-
!this.isPseudoElement && (
|
|
1127
|
+
const e = (n = this.options) == null ? void 0 : n.element;
|
|
1128
|
+
!this.isPseudoElement && (e != null && e.isConnected) && ((i = (s = this.animation).commitStyles) == null || i.call(s));
|
|
1129
1129
|
}
|
|
1130
1130
|
get duration() {
|
|
1131
1131
|
var n, s;
|
|
1132
|
-
const
|
|
1133
|
-
return /* @__PURE__ */ N(Number(
|
|
1132
|
+
const e = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
|
|
1133
|
+
return /* @__PURE__ */ N(Number(e));
|
|
1134
1134
|
}
|
|
1135
1135
|
get iterationDuration() {
|
|
1136
|
-
const { delay:
|
|
1137
|
-
return this.duration + /* @__PURE__ */ N(
|
|
1136
|
+
const { delay: e = 0 } = this.options || {};
|
|
1137
|
+
return this.duration + /* @__PURE__ */ N(e);
|
|
1138
1138
|
}
|
|
1139
1139
|
get time() {
|
|
1140
1140
|
return /* @__PURE__ */ N(Number(this.animation.currentTime) || 0);
|
|
1141
1141
|
}
|
|
1142
|
-
set time(
|
|
1143
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ K(
|
|
1142
|
+
set time(e) {
|
|
1143
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ K(e);
|
|
1144
1144
|
}
|
|
1145
1145
|
/**
|
|
1146
1146
|
* The playback speed of the animation.
|
|
@@ -1149,8 +1149,8 @@ class rs extends At {
|
|
|
1149
1149
|
get speed() {
|
|
1150
1150
|
return this.animation.playbackRate;
|
|
1151
1151
|
}
|
|
1152
|
-
set speed(
|
|
1153
|
-
|
|
1152
|
+
set speed(e) {
|
|
1153
|
+
e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
|
|
1154
1154
|
}
|
|
1155
1155
|
get state() {
|
|
1156
1156
|
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
@@ -1158,15 +1158,15 @@ class rs extends At {
|
|
|
1158
1158
|
get startTime() {
|
|
1159
1159
|
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
1160
1160
|
}
|
|
1161
|
-
set startTime(
|
|
1162
|
-
this.manualStartTime = this.animation.startTime =
|
|
1161
|
+
set startTime(e) {
|
|
1162
|
+
this.manualStartTime = this.animation.startTime = e;
|
|
1163
1163
|
}
|
|
1164
1164
|
/**
|
|
1165
1165
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1166
1166
|
*/
|
|
1167
|
-
attachTimeline({ timeline:
|
|
1167
|
+
attachTimeline({ timeline: e, observe: n }) {
|
|
1168
1168
|
var s;
|
|
1169
|
-
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null,
|
|
1169
|
+
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, e && yr() ? (this.animation.timeline = e, rt) : n(this);
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
const os = {
|
|
@@ -1174,16 +1174,16 @@ const os = {
|
|
|
1174
1174
|
backInOut: En,
|
|
1175
1175
|
circInOut: Bn
|
|
1176
1176
|
};
|
|
1177
|
-
function vr(
|
|
1178
|
-
return
|
|
1177
|
+
function vr(t) {
|
|
1178
|
+
return t in os;
|
|
1179
1179
|
}
|
|
1180
|
-
function wr(
|
|
1181
|
-
typeof
|
|
1180
|
+
function wr(t) {
|
|
1181
|
+
typeof t.ease == "string" && vr(t.ease) && (t.ease = os[t.ease]);
|
|
1182
1182
|
}
|
|
1183
|
-
const
|
|
1183
|
+
const Ht = 10;
|
|
1184
1184
|
class Sr extends rs {
|
|
1185
|
-
constructor(
|
|
1186
|
-
wr(
|
|
1185
|
+
constructor(e) {
|
|
1186
|
+
wr(e), Jn(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
|
|
1187
1187
|
}
|
|
1188
1188
|
/**
|
|
1189
1189
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1193,43 +1193,43 @@ class Sr extends rs {
|
|
|
1193
1193
|
* its current value, "previous" value, and therefore allow
|
|
1194
1194
|
* Motion to calculate velocity for any subsequent animation.
|
|
1195
1195
|
*/
|
|
1196
|
-
updateMotionValue(
|
|
1196
|
+
updateMotionValue(e) {
|
|
1197
1197
|
const { motionValue: n, onUpdate: s, onComplete: i, element: r, ...o } = this.options;
|
|
1198
1198
|
if (!n)
|
|
1199
1199
|
return;
|
|
1200
|
-
if (
|
|
1201
|
-
n.set(
|
|
1200
|
+
if (e !== void 0) {
|
|
1201
|
+
n.set(e);
|
|
1202
1202
|
return;
|
|
1203
1203
|
}
|
|
1204
|
-
const a = new
|
|
1204
|
+
const a = new xe({
|
|
1205
1205
|
...o,
|
|
1206
1206
|
autoplay: !1
|
|
1207
|
-
}), c = Math.max(
|
|
1207
|
+
}), c = Math.max(Ht, I.now() - this.startTime), l = U(0, Ht, c - Ht);
|
|
1208
1208
|
n.setWithVelocity(a.sample(Math.max(0, c - l)).value, a.sample(c).value, l), a.stop();
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
|
-
const
|
|
1212
|
-
(B.test(
|
|
1213
|
-
!
|
|
1214
|
-
function Vr(
|
|
1215
|
-
const
|
|
1216
|
-
if (
|
|
1211
|
+
const Je = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1212
|
+
(B.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1213
|
+
!t.startsWith("url("));
|
|
1214
|
+
function Vr(t) {
|
|
1215
|
+
const e = t[0];
|
|
1216
|
+
if (t.length === 1)
|
|
1217
1217
|
return !0;
|
|
1218
|
-
for (let n = 0; n <
|
|
1219
|
-
if (
|
|
1218
|
+
for (let n = 0; n < t.length; n++)
|
|
1219
|
+
if (t[n] !== e)
|
|
1220
1220
|
return !0;
|
|
1221
1221
|
}
|
|
1222
|
-
function Ar(
|
|
1223
|
-
const i =
|
|
1222
|
+
function Ar(t, e, n, s) {
|
|
1223
|
+
const i = t[0];
|
|
1224
1224
|
if (i === null)
|
|
1225
1225
|
return !1;
|
|
1226
|
-
if (
|
|
1226
|
+
if (e === "display" || e === "visibility")
|
|
1227
1227
|
return !0;
|
|
1228
|
-
const r =
|
|
1229
|
-
return
|
|
1228
|
+
const r = t[t.length - 1], o = Je(i, e), a = Je(r, e);
|
|
1229
|
+
return yt(o === a, `You are trying to animate ${e} from "${i}" to "${r}". "${o ? r : i}" is not an animatable value.`, "value-not-animatable"), !o || !a ? !1 : Vr(t) || (n === "spring" || is(n)) && s;
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1232
|
-
|
|
1231
|
+
function ue(t) {
|
|
1232
|
+
t.duration = 0, t.type = "keyframes";
|
|
1233
1233
|
}
|
|
1234
1234
|
const xr = /* @__PURE__ */ new Set([
|
|
1235
1235
|
"opacity",
|
|
@@ -1239,12 +1239,12 @@ const xr = /* @__PURE__ */ new Set([
|
|
|
1239
1239
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1240
1240
|
// "background-color"
|
|
1241
1241
|
]), Mr = /* @__PURE__ */ Mn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1242
|
-
function Cr(
|
|
1242
|
+
function Cr(t) {
|
|
1243
1243
|
var u;
|
|
1244
|
-
const { motionValue:
|
|
1245
|
-
if (!(((u =
|
|
1244
|
+
const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: r, type: o } = t;
|
|
1245
|
+
if (!(((u = e == null ? void 0 : e.owner) == null ? void 0 : u.current) instanceof HTMLElement))
|
|
1246
1246
|
return !1;
|
|
1247
|
-
const { onUpdate: c, transformTemplate: l } =
|
|
1247
|
+
const { onUpdate: c, transformTemplate: l } = e.owner.getProps();
|
|
1248
1248
|
return Mr() && n && xr.has(n) && (n !== "transform" || !l) && /**
|
|
1249
1249
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1250
1250
|
* no way to read the value from WAAPI every frame.
|
|
@@ -1252,15 +1252,15 @@ function Cr(e) {
|
|
|
1252
1252
|
!c && !s && i !== "mirror" && r !== 0 && o !== "inertia";
|
|
1253
1253
|
}
|
|
1254
1254
|
const Pr = 40;
|
|
1255
|
-
class Fr extends
|
|
1256
|
-
constructor({ autoplay:
|
|
1255
|
+
class Fr extends Ae {
|
|
1256
|
+
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: l, element: u, ...d }) {
|
|
1257
1257
|
var p;
|
|
1258
1258
|
super(), this.stop = () => {
|
|
1259
1259
|
var b, y;
|
|
1260
1260
|
this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (y = this.keyframeResolver) == null || y.cancel();
|
|
1261
1261
|
}, this.createdAt = I.now();
|
|
1262
1262
|
const f = {
|
|
1263
|
-
autoplay:
|
|
1263
|
+
autoplay: e,
|
|
1264
1264
|
delay: n,
|
|
1265
1265
|
type: s,
|
|
1266
1266
|
repeat: i,
|
|
@@ -1270,37 +1270,37 @@ class Fr extends At {
|
|
|
1270
1270
|
motionValue: l,
|
|
1271
1271
|
element: u,
|
|
1272
1272
|
...d
|
|
1273
|
-
}, h = (u == null ? void 0 : u.KeyframeResolver) ||
|
|
1273
|
+
}, h = (u == null ? void 0 : u.KeyframeResolver) || Me;
|
|
1274
1274
|
this.keyframeResolver = new h(a, (b, y, g) => this.onKeyframesResolved(b, y, f, !g), c, l, u), (p = this.keyframeResolver) == null || p.scheduleResolve();
|
|
1275
1275
|
}
|
|
1276
|
-
onKeyframesResolved(
|
|
1276
|
+
onKeyframesResolved(e, n, s, i) {
|
|
1277
1277
|
var y, g;
|
|
1278
1278
|
this.keyframeResolver = void 0;
|
|
1279
1279
|
const { name: r, type: o, velocity: a, delay: c, isHandoff: l, onUpdate: u } = s;
|
|
1280
|
-
this.resolvedAt = I.now(), Ar(
|
|
1280
|
+
this.resolvedAt = I.now(), Ar(e, r, o, a) || ((j.instantAnimations || !c) && (u == null || u(Ve(e, s, n))), e[0] = e[e.length - 1], ue(s), s.repeat = 0);
|
|
1281
1281
|
const f = {
|
|
1282
1282
|
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Pr ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1283
1283
|
finalKeyframe: n,
|
|
1284
1284
|
...s,
|
|
1285
|
-
keyframes:
|
|
1285
|
+
keyframes: e
|
|
1286
1286
|
}, h = !l && Cr(f), p = (g = (y = f.motionValue) == null ? void 0 : y.owner) == null ? void 0 : g.current, b = h ? new Sr({
|
|
1287
1287
|
...f,
|
|
1288
1288
|
element: p
|
|
1289
|
-
}) : new
|
|
1289
|
+
}) : new xe(f);
|
|
1290
1290
|
b.finished.then(() => {
|
|
1291
1291
|
this.notifyFinished();
|
|
1292
|
-
}).catch(
|
|
1292
|
+
}).catch(rt), this.pendingTimeline && (this.stopTimeline = b.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = b;
|
|
1293
1293
|
}
|
|
1294
1294
|
get finished() {
|
|
1295
1295
|
return this._animation ? this.animation.finished : this._finished;
|
|
1296
1296
|
}
|
|
1297
|
-
then(
|
|
1298
|
-
return this.finished.finally(
|
|
1297
|
+
then(e, n) {
|
|
1298
|
+
return this.finished.finally(e).then(() => {
|
|
1299
1299
|
});
|
|
1300
1300
|
}
|
|
1301
1301
|
get animation() {
|
|
1302
|
-
var
|
|
1303
|
-
return this._animation || ((
|
|
1302
|
+
var e;
|
|
1303
|
+
return this._animation || ((e = this.keyframeResolver) == null || e.resume(), hr()), this._animation;
|
|
1304
1304
|
}
|
|
1305
1305
|
get duration() {
|
|
1306
1306
|
return this.animation.duration;
|
|
@@ -1311,8 +1311,8 @@ class Fr extends At {
|
|
|
1311
1311
|
get time() {
|
|
1312
1312
|
return this.animation.time;
|
|
1313
1313
|
}
|
|
1314
|
-
set time(
|
|
1315
|
-
this.animation.time =
|
|
1314
|
+
set time(e) {
|
|
1315
|
+
this.animation.time = e;
|
|
1316
1316
|
}
|
|
1317
1317
|
get speed() {
|
|
1318
1318
|
return this.animation.speed;
|
|
@@ -1320,14 +1320,14 @@ class Fr extends At {
|
|
|
1320
1320
|
get state() {
|
|
1321
1321
|
return this.animation.state;
|
|
1322
1322
|
}
|
|
1323
|
-
set speed(
|
|
1324
|
-
this.animation.speed =
|
|
1323
|
+
set speed(e) {
|
|
1324
|
+
this.animation.speed = e;
|
|
1325
1325
|
}
|
|
1326
1326
|
get startTime() {
|
|
1327
1327
|
return this.animation.startTime;
|
|
1328
1328
|
}
|
|
1329
|
-
attachTimeline(
|
|
1330
|
-
return this._animation ? this.stopTimeline = this.animation.attachTimeline(
|
|
1329
|
+
attachTimeline(e) {
|
|
1330
|
+
return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
|
|
1331
1331
|
}
|
|
1332
1332
|
play() {
|
|
1333
1333
|
this.animation.play();
|
|
@@ -1339,47 +1339,47 @@ class Fr extends At {
|
|
|
1339
1339
|
this.animation.complete();
|
|
1340
1340
|
}
|
|
1341
1341
|
cancel() {
|
|
1342
|
-
var
|
|
1343
|
-
this._animation && this.animation.cancel(), (
|
|
1342
|
+
var e;
|
|
1343
|
+
this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel();
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
|
-
function as(
|
|
1347
|
-
const r = Array.from(
|
|
1346
|
+
function as(t, e, n, s = 0, i = 1) {
|
|
1347
|
+
const r = Array.from(t).sort((l, u) => l.sortNodePosition(u)).indexOf(e), o = t.size, a = (o - 1) * s;
|
|
1348
1348
|
return typeof n == "function" ? n(r, o) : i === 1 ? r * s : a - r * s;
|
|
1349
1349
|
}
|
|
1350
1350
|
const Or = (
|
|
1351
1351
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1352
1352
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1353
1353
|
);
|
|
1354
|
-
function Dr(
|
|
1355
|
-
const
|
|
1356
|
-
if (!
|
|
1354
|
+
function Dr(t) {
|
|
1355
|
+
const e = Or.exec(t);
|
|
1356
|
+
if (!e)
|
|
1357
1357
|
return [,];
|
|
1358
|
-
const [, n, s, i] =
|
|
1358
|
+
const [, n, s, i] = e;
|
|
1359
1359
|
return [`--${n ?? s}`, i];
|
|
1360
1360
|
}
|
|
1361
1361
|
const Rr = 4;
|
|
1362
|
-
function us(
|
|
1363
|
-
Z(n <= Rr, `Max CSS variable fallback depth detected in property "${
|
|
1364
|
-
const [s, i] = Dr(
|
|
1362
|
+
function us(t, e, n = 1) {
|
|
1363
|
+
Z(n <= Rr, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1364
|
+
const [s, i] = Dr(t);
|
|
1365
1365
|
if (!s)
|
|
1366
1366
|
return;
|
|
1367
|
-
const r = window.getComputedStyle(
|
|
1367
|
+
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
1368
1368
|
if (r) {
|
|
1369
1369
|
const o = r.trim();
|
|
1370
1370
|
return An(o) ? parseFloat(o) : o;
|
|
1371
1371
|
}
|
|
1372
|
-
return
|
|
1372
|
+
return be(i) ? us(i, e, n + 1) : i;
|
|
1373
1373
|
}
|
|
1374
1374
|
const Ir = {
|
|
1375
1375
|
type: "spring",
|
|
1376
1376
|
stiffness: 500,
|
|
1377
1377
|
damping: 25,
|
|
1378
1378
|
restSpeed: 10
|
|
1379
|
-
}, kr = (
|
|
1379
|
+
}, kr = (t) => ({
|
|
1380
1380
|
type: "spring",
|
|
1381
1381
|
stiffness: 550,
|
|
1382
|
-
damping:
|
|
1382
|
+
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1383
1383
|
restSpeed: 10
|
|
1384
1384
|
}), Er = {
|
|
1385
1385
|
type: "keyframes",
|
|
@@ -1388,48 +1388,48 @@ const Ir = {
|
|
|
1388
1388
|
type: "keyframes",
|
|
1389
1389
|
ease: [0.25, 0.1, 0.35, 1],
|
|
1390
1390
|
duration: 0.3
|
|
1391
|
-
}, Br = (
|
|
1392
|
-
function Kr(
|
|
1393
|
-
const i =
|
|
1391
|
+
}, Br = (t, { keyframes: e }) => e.length > 2 ? Er : ut.has(t) ? t.startsWith("scale") ? kr(e[1]) : Ir : Nr, Lr = (t) => t !== null;
|
|
1392
|
+
function Kr(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
1393
|
+
const i = t.filter(Lr), r = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
|
|
1394
1394
|
return i[r];
|
|
1395
1395
|
}
|
|
1396
|
-
function cs(
|
|
1397
|
-
if (
|
|
1398
|
-
const { inherit: n, ...s } =
|
|
1399
|
-
return { ...
|
|
1396
|
+
function cs(t, e) {
|
|
1397
|
+
if (t != null && t.inherit && e) {
|
|
1398
|
+
const { inherit: n, ...s } = t;
|
|
1399
|
+
return { ...e, ...s };
|
|
1400
1400
|
}
|
|
1401
|
-
return
|
|
1401
|
+
return t;
|
|
1402
1402
|
}
|
|
1403
|
-
function ls(
|
|
1404
|
-
const n = (
|
|
1405
|
-
return n !==
|
|
1403
|
+
function ls(t, e) {
|
|
1404
|
+
const n = (t == null ? void 0 : t[e]) ?? (t == null ? void 0 : t.default) ?? t;
|
|
1405
|
+
return n !== t ? cs(n, t) : n;
|
|
1406
1406
|
}
|
|
1407
|
-
function Wr({ when:
|
|
1407
|
+
function Wr({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: c, elapsed: l, ...u }) {
|
|
1408
1408
|
return !!Object.keys(u).length;
|
|
1409
1409
|
}
|
|
1410
|
-
const $r = (
|
|
1411
|
-
const a = ls(s,
|
|
1410
|
+
const $r = (t, e, n, s = {}, i, r) => (o) => {
|
|
1411
|
+
const a = ls(s, t) || {}, c = a.delay || s.delay || 0;
|
|
1412
1412
|
let { elapsed: l = 0 } = s;
|
|
1413
1413
|
l = l - /* @__PURE__ */ K(c);
|
|
1414
1414
|
const u = {
|
|
1415
1415
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
1416
1416
|
ease: "easeOut",
|
|
1417
|
-
velocity:
|
|
1417
|
+
velocity: e.getVelocity(),
|
|
1418
1418
|
...a,
|
|
1419
1419
|
delay: -l,
|
|
1420
1420
|
onUpdate: (f) => {
|
|
1421
|
-
|
|
1421
|
+
e.set(f), a.onUpdate && a.onUpdate(f);
|
|
1422
1422
|
},
|
|
1423
1423
|
onComplete: () => {
|
|
1424
1424
|
o(), a.onComplete && a.onComplete();
|
|
1425
1425
|
},
|
|
1426
|
-
name:
|
|
1427
|
-
motionValue:
|
|
1426
|
+
name: t,
|
|
1427
|
+
motionValue: e,
|
|
1428
1428
|
element: r ? void 0 : i
|
|
1429
1429
|
};
|
|
1430
|
-
Wr(a) || Object.assign(u, Br(
|
|
1430
|
+
Wr(a) || Object.assign(u, Br(t, u)), u.duration && (u.duration = /* @__PURE__ */ K(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ K(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
1431
1431
|
let d = !1;
|
|
1432
|
-
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (
|
|
1432
|
+
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (ue(u), u.delay === 0 && (d = !0)), (j.instantAnimations || j.skipAnimations || i != null && i.shouldSkipAnimations) && (d = !0, ue(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, d && !r && e.get() !== void 0) {
|
|
1433
1433
|
const f = Kr(u.keyframes, a);
|
|
1434
1434
|
if (f !== void 0) {
|
|
1435
1435
|
L.update(() => {
|
|
@@ -1438,28 +1438,28 @@ const $r = (e, t, n, s = {}, i, r) => (o) => {
|
|
|
1438
1438
|
return;
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
|
-
return a.isSync ? new
|
|
1441
|
+
return a.isSync ? new xe(u) : new Fr(u);
|
|
1442
1442
|
};
|
|
1443
|
-
function
|
|
1444
|
-
const
|
|
1445
|
-
return
|
|
1446
|
-
|
|
1447
|
-
}),
|
|
1443
|
+
function Qe(t) {
|
|
1444
|
+
const e = [{}, {}];
|
|
1445
|
+
return t == null || t.values.forEach((n, s) => {
|
|
1446
|
+
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
1447
|
+
}), e;
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
if (typeof
|
|
1451
|
-
const [i, r] =
|
|
1452
|
-
|
|
1449
|
+
function Ce(t, e, n, s) {
|
|
1450
|
+
if (typeof e == "function") {
|
|
1451
|
+
const [i, r] = Qe(s);
|
|
1452
|
+
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
1453
1453
|
}
|
|
1454
|
-
if (typeof
|
|
1455
|
-
const [i, r] =
|
|
1456
|
-
|
|
1454
|
+
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
1455
|
+
const [i, r] = Qe(s);
|
|
1456
|
+
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
1457
1457
|
}
|
|
1458
|
-
return
|
|
1458
|
+
return e;
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1461
|
-
const s =
|
|
1462
|
-
return
|
|
1460
|
+
function nt(t, e, n) {
|
|
1461
|
+
const s = t.getProps();
|
|
1462
|
+
return Ce(s, e, n !== void 0 ? n : s.custom, t);
|
|
1463
1463
|
}
|
|
1464
1464
|
const fs = /* @__PURE__ */ new Set([
|
|
1465
1465
|
"width",
|
|
@@ -1468,8 +1468,8 @@ const fs = /* @__PURE__ */ new Set([
|
|
|
1468
1468
|
"left",
|
|
1469
1469
|
"right",
|
|
1470
1470
|
"bottom",
|
|
1471
|
-
...
|
|
1472
|
-
]),
|
|
1471
|
+
...at
|
|
1472
|
+
]), tn = 30, jr = (t) => !isNaN(parseFloat(t));
|
|
1473
1473
|
class Gr {
|
|
1474
1474
|
/**
|
|
1475
1475
|
* @param init - The initiating value
|
|
@@ -1477,20 +1477,20 @@ class Gr {
|
|
|
1477
1477
|
*
|
|
1478
1478
|
* - `transformer`: A function to transform incoming values with.
|
|
1479
1479
|
*/
|
|
1480
|
-
constructor(
|
|
1480
|
+
constructor(e, n = {}) {
|
|
1481
1481
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
|
|
1482
1482
|
var r;
|
|
1483
1483
|
const i = I.now();
|
|
1484
1484
|
if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((r = this.events.change) == null || r.notify(this.current), this.dependents))
|
|
1485
1485
|
for (const o of this.dependents)
|
|
1486
1486
|
o.dirty();
|
|
1487
|
-
}, this.hasAnimated = !1, this.setCurrent(
|
|
1487
|
+
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
1488
1488
|
}
|
|
1489
|
-
setCurrent(
|
|
1490
|
-
this.current =
|
|
1489
|
+
setCurrent(e) {
|
|
1490
|
+
this.current = e, this.updatedAt = I.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = jr(this.current));
|
|
1491
1491
|
}
|
|
1492
|
-
setPrevFrameValue(
|
|
1493
|
-
this.prevFrameValue =
|
|
1492
|
+
setPrevFrameValue(e = this.current) {
|
|
1493
|
+
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
1494
1494
|
}
|
|
1495
1495
|
/**
|
|
1496
1496
|
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
@@ -1532,27 +1532,27 @@ class Gr {
|
|
|
1532
1532
|
*
|
|
1533
1533
|
* @deprecated
|
|
1534
1534
|
*/
|
|
1535
|
-
onChange(
|
|
1536
|
-
return process.env.NODE_ENV !== "production" && On(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change",
|
|
1535
|
+
onChange(e) {
|
|
1536
|
+
return process.env.NODE_ENV !== "production" && On(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
1537
1537
|
}
|
|
1538
|
-
on(
|
|
1539
|
-
this.events[
|
|
1540
|
-
const s = this.events[
|
|
1541
|
-
return
|
|
1538
|
+
on(e, n) {
|
|
1539
|
+
this.events[e] || (this.events[e] = new Pn());
|
|
1540
|
+
const s = this.events[e].add(n);
|
|
1541
|
+
return e === "change" ? () => {
|
|
1542
1542
|
s(), L.read(() => {
|
|
1543
1543
|
this.events.change.getSize() || this.stop();
|
|
1544
1544
|
});
|
|
1545
1545
|
} : s;
|
|
1546
1546
|
}
|
|
1547
1547
|
clearListeners() {
|
|
1548
|
-
for (const
|
|
1549
|
-
this.events[
|
|
1548
|
+
for (const e in this.events)
|
|
1549
|
+
this.events[e].clear();
|
|
1550
1550
|
}
|
|
1551
1551
|
/**
|
|
1552
1552
|
* Attaches a passive effect to the `MotionValue`.
|
|
1553
1553
|
*/
|
|
1554
|
-
attach(
|
|
1555
|
-
this.passiveEffect =
|
|
1554
|
+
attach(e, n) {
|
|
1555
|
+
this.passiveEffect = e, this.stopPassiveEffect = n;
|
|
1556
1556
|
}
|
|
1557
1557
|
/**
|
|
1558
1558
|
* Sets the state of the `MotionValue`.
|
|
@@ -1569,28 +1569,28 @@ class Gr {
|
|
|
1569
1569
|
*
|
|
1570
1570
|
* @public
|
|
1571
1571
|
*/
|
|
1572
|
-
set(
|
|
1573
|
-
this.passiveEffect ? this.passiveEffect(
|
|
1572
|
+
set(e) {
|
|
1573
|
+
this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e);
|
|
1574
1574
|
}
|
|
1575
|
-
setWithVelocity(
|
|
1576
|
-
this.set(n), this.prev = void 0, this.prevFrameValue =
|
|
1575
|
+
setWithVelocity(e, n, s) {
|
|
1576
|
+
this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - s;
|
|
1577
1577
|
}
|
|
1578
1578
|
/**
|
|
1579
1579
|
* Set the state of the `MotionValue`, stopping any active animations,
|
|
1580
1580
|
* effects, and resets velocity to `0`.
|
|
1581
1581
|
*/
|
|
1582
|
-
jump(
|
|
1583
|
-
this.updateAndNotify(
|
|
1582
|
+
jump(e, n = !0) {
|
|
1583
|
+
this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1584
1584
|
}
|
|
1585
1585
|
dirty() {
|
|
1586
|
-
var
|
|
1587
|
-
(
|
|
1586
|
+
var e;
|
|
1587
|
+
(e = this.events.change) == null || e.notify(this.current);
|
|
1588
1588
|
}
|
|
1589
|
-
addDependent(
|
|
1590
|
-
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(
|
|
1589
|
+
addDependent(e) {
|
|
1590
|
+
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(e);
|
|
1591
1591
|
}
|
|
1592
|
-
removeDependent(
|
|
1593
|
-
this.dependents && this.dependents.delete(
|
|
1592
|
+
removeDependent(e) {
|
|
1593
|
+
this.dependents && this.dependents.delete(e);
|
|
1594
1594
|
}
|
|
1595
1595
|
/**
|
|
1596
1596
|
* Returns the latest state of `MotionValue`
|
|
@@ -1616,10 +1616,10 @@ class Gr {
|
|
|
1616
1616
|
* @public
|
|
1617
1617
|
*/
|
|
1618
1618
|
getVelocity() {
|
|
1619
|
-
const
|
|
1620
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 ||
|
|
1619
|
+
const e = I.now();
|
|
1620
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > tn)
|
|
1621
1621
|
return 0;
|
|
1622
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1622
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, tn);
|
|
1623
1623
|
return Fn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1624
1624
|
}
|
|
1625
1625
|
/**
|
|
@@ -1632,9 +1632,9 @@ class Gr {
|
|
|
1632
1632
|
*
|
|
1633
1633
|
* @param animation - A function that starts the provided animation
|
|
1634
1634
|
*/
|
|
1635
|
-
start(
|
|
1635
|
+
start(e) {
|
|
1636
1636
|
return this.stop(), new Promise((n) => {
|
|
1637
|
-
this.hasAnimated = !0, this.animation =
|
|
1637
|
+
this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
|
|
1638
1638
|
}).then(() => {
|
|
1639
1639
|
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
1640
1640
|
});
|
|
@@ -1668,62 +1668,62 @@ class Gr {
|
|
|
1668
1668
|
* @public
|
|
1669
1669
|
*/
|
|
1670
1670
|
destroy() {
|
|
1671
|
-
var
|
|
1672
|
-
(
|
|
1671
|
+
var e, n;
|
|
1672
|
+
(e = this.dependents) == null || e.clear(), (n = this.events.destroy) == null || n.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1676
|
-
return new Gr(
|
|
1675
|
+
function It(t, e) {
|
|
1676
|
+
return new Gr(t, e);
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1679
|
-
function _r(
|
|
1680
|
-
|
|
1678
|
+
const ce = (t) => Array.isArray(t);
|
|
1679
|
+
function _r(t, e, n) {
|
|
1680
|
+
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, It(n));
|
|
1681
1681
|
}
|
|
1682
|
-
function Hr(
|
|
1683
|
-
return
|
|
1682
|
+
function Hr(t) {
|
|
1683
|
+
return ce(t) ? t[t.length - 1] || 0 : t;
|
|
1684
1684
|
}
|
|
1685
|
-
function Ur(
|
|
1686
|
-
const n =
|
|
1685
|
+
function Ur(t, e) {
|
|
1686
|
+
const n = nt(t, e);
|
|
1687
1687
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
1688
1688
|
r = { ...r, ...s };
|
|
1689
1689
|
for (const o in r) {
|
|
1690
1690
|
const a = Hr(r[o]);
|
|
1691
|
-
_r(
|
|
1691
|
+
_r(t, o, a);
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
|
-
const R = (
|
|
1695
|
-
function zr(
|
|
1696
|
-
return !!(R(
|
|
1694
|
+
const R = (t) => !!(t && t.getVelocity);
|
|
1695
|
+
function zr(t) {
|
|
1696
|
+
return !!(R(t) && t.add);
|
|
1697
1697
|
}
|
|
1698
|
-
function Yr(
|
|
1699
|
-
const n =
|
|
1698
|
+
function Yr(t, e) {
|
|
1699
|
+
const n = t.getValue("willChange");
|
|
1700
1700
|
if (zr(n))
|
|
1701
|
-
return n.add(
|
|
1701
|
+
return n.add(e);
|
|
1702
1702
|
if (!n && j.WillChange) {
|
|
1703
1703
|
const s = new j.WillChange("auto");
|
|
1704
|
-
|
|
1704
|
+
t.addValue("willChange", s), s.add(e);
|
|
1705
1705
|
}
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1708
|
-
return
|
|
1707
|
+
function Pe(t) {
|
|
1708
|
+
return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
|
|
1709
1709
|
}
|
|
1710
|
-
const Xr = "framerAppearId", ds = "data-" +
|
|
1711
|
-
function qr(
|
|
1712
|
-
return
|
|
1710
|
+
const Xr = "framerAppearId", ds = "data-" + Pe(Xr);
|
|
1711
|
+
function qr(t) {
|
|
1712
|
+
return t.props[ds];
|
|
1713
1713
|
}
|
|
1714
|
-
function Zr({ protectedKeys:
|
|
1715
|
-
const s =
|
|
1716
|
-
return
|
|
1714
|
+
function Zr({ protectedKeys: t, needsAnimating: e }, n) {
|
|
1715
|
+
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
1716
|
+
return e[n] = !1, s;
|
|
1717
1717
|
}
|
|
1718
|
-
function hs(
|
|
1719
|
-
let { transition: r, transitionEnd: o, ...a } =
|
|
1720
|
-
const c =
|
|
1718
|
+
function hs(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
1719
|
+
let { transition: r, transitionEnd: o, ...a } = e;
|
|
1720
|
+
const c = t.getDefaultTransition();
|
|
1721
1721
|
r = r ? cs(r, c) : c;
|
|
1722
1722
|
const l = r == null ? void 0 : r.reduceMotion;
|
|
1723
1723
|
s && (r = s);
|
|
1724
|
-
const u = [], d = i &&
|
|
1724
|
+
const u = [], d = i && t.animationState && t.animationState.getState()[i];
|
|
1725
1725
|
for (const f in a) {
|
|
1726
|
-
const h =
|
|
1726
|
+
const h = t.getValue(f, t.latestValues[f] ?? null), p = a[f];
|
|
1727
1727
|
if (p === void 0 || d && Zr(d, f))
|
|
1728
1728
|
continue;
|
|
1729
1729
|
const b = {
|
|
@@ -1734,34 +1734,34 @@ function hs(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
1734
1734
|
continue;
|
|
1735
1735
|
let g = !1;
|
|
1736
1736
|
if (window.MotionHandoffAnimation) {
|
|
1737
|
-
const V = qr(
|
|
1737
|
+
const V = qr(t);
|
|
1738
1738
|
if (V) {
|
|
1739
1739
|
const v = window.MotionHandoffAnimation(V, f, L);
|
|
1740
1740
|
v !== null && (b.startTime = v, g = !0);
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
|
-
Yr(
|
|
1744
|
-
const w = l ??
|
|
1745
|
-
h.start($r(f, h, p, w && fs.has(f) ? { type: !1 } : b,
|
|
1743
|
+
Yr(t, f);
|
|
1744
|
+
const w = l ?? t.shouldReduceMotion;
|
|
1745
|
+
h.start($r(f, h, p, w && fs.has(f) ? { type: !1 } : b, t, g));
|
|
1746
1746
|
const T = h.animation;
|
|
1747
1747
|
T && u.push(T);
|
|
1748
1748
|
}
|
|
1749
1749
|
if (o) {
|
|
1750
1750
|
const f = () => L.update(() => {
|
|
1751
|
-
o && Ur(
|
|
1751
|
+
o && Ur(t, o);
|
|
1752
1752
|
});
|
|
1753
1753
|
u.length ? Promise.all(u).then(f) : f();
|
|
1754
1754
|
}
|
|
1755
1755
|
return u;
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function le(t, e, n = {}) {
|
|
1758
1758
|
var c;
|
|
1759
|
-
const s =
|
|
1760
|
-
let { transition: i =
|
|
1759
|
+
const s = nt(t, e, n.type === "exit" ? (c = t.presenceContext) == null ? void 0 : c.custom : void 0);
|
|
1760
|
+
let { transition: i = t.getDefaultTransition() || {} } = s || {};
|
|
1761
1761
|
n.transitionOverride && (i = n.transitionOverride);
|
|
1762
|
-
const r = s ? () => Promise.all(hs(
|
|
1762
|
+
const r = s ? () => Promise.all(hs(t, s, n)) : () => Promise.resolve(), o = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
1763
1763
|
const { delayChildren: u = 0, staggerChildren: d, staggerDirection: f } = i;
|
|
1764
|
-
return Jr(
|
|
1764
|
+
return Jr(t, e, l, u, d, f, n);
|
|
1765
1765
|
} : () => Promise.resolve(), { when: a } = i;
|
|
1766
1766
|
if (a) {
|
|
1767
1767
|
const [l, u] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
@@ -1769,74 +1769,74 @@ function lt(e, t, n = {}) {
|
|
|
1769
1769
|
} else
|
|
1770
1770
|
return Promise.all([r(), o(n.delay)]);
|
|
1771
1771
|
}
|
|
1772
|
-
function Jr(
|
|
1772
|
+
function Jr(t, e, n = 0, s = 0, i = 0, r = 1, o) {
|
|
1773
1773
|
const a = [];
|
|
1774
|
-
for (const c of
|
|
1775
|
-
c.notify("AnimationStart",
|
|
1774
|
+
for (const c of t.variantChildren)
|
|
1775
|
+
c.notify("AnimationStart", e), a.push(le(c, e, {
|
|
1776
1776
|
...o,
|
|
1777
|
-
delay: n + (typeof s == "function" ? 0 : s) + as(
|
|
1778
|
-
}).then(() => c.notify("AnimationComplete",
|
|
1777
|
+
delay: n + (typeof s == "function" ? 0 : s) + as(t.variantChildren, c, s, i, r)
|
|
1778
|
+
}).then(() => c.notify("AnimationComplete", e)));
|
|
1779
1779
|
return Promise.all(a);
|
|
1780
1780
|
}
|
|
1781
|
-
function Qr(
|
|
1782
|
-
|
|
1781
|
+
function Qr(t, e, n = {}) {
|
|
1782
|
+
t.notify("AnimationStart", e);
|
|
1783
1783
|
let s;
|
|
1784
|
-
if (Array.isArray(
|
|
1785
|
-
const i =
|
|
1784
|
+
if (Array.isArray(e)) {
|
|
1785
|
+
const i = e.map((r) => le(t, r, n));
|
|
1786
1786
|
s = Promise.all(i);
|
|
1787
|
-
} else if (typeof
|
|
1788
|
-
s =
|
|
1787
|
+
} else if (typeof e == "string")
|
|
1788
|
+
s = le(t, e, n);
|
|
1789
1789
|
else {
|
|
1790
|
-
const i = typeof
|
|
1791
|
-
s = Promise.all(hs(
|
|
1790
|
+
const i = typeof e == "function" ? nt(t, e, n.custom) : e;
|
|
1791
|
+
s = Promise.all(hs(t, i, n));
|
|
1792
1792
|
}
|
|
1793
1793
|
return s.then(() => {
|
|
1794
|
-
|
|
1794
|
+
t.notify("AnimationComplete", e);
|
|
1795
1795
|
});
|
|
1796
1796
|
}
|
|
1797
|
-
const
|
|
1798
|
-
test: (
|
|
1799
|
-
parse: (
|
|
1800
|
-
}, ps = (
|
|
1801
|
-
function
|
|
1802
|
-
return typeof
|
|
1797
|
+
const to = {
|
|
1798
|
+
test: (t) => t === "auto",
|
|
1799
|
+
parse: (t) => t
|
|
1800
|
+
}, ps = (t) => (e) => e.test(t), ms = [ot, m, et, G, xi, Ai, to], en = (t) => ms.find(ps(t));
|
|
1801
|
+
function eo(t) {
|
|
1802
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || xn(t) : !0;
|
|
1803
1803
|
}
|
|
1804
1804
|
const no = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1805
|
-
function so(
|
|
1806
|
-
const [
|
|
1807
|
-
if (
|
|
1808
|
-
return
|
|
1809
|
-
const [s] = n.match(
|
|
1805
|
+
function so(t) {
|
|
1806
|
+
const [e, n] = t.slice(0, -1).split("(");
|
|
1807
|
+
if (e === "drop-shadow")
|
|
1808
|
+
return t;
|
|
1809
|
+
const [s] = n.match(Te) || [];
|
|
1810
1810
|
if (!s)
|
|
1811
|
-
return
|
|
1811
|
+
return t;
|
|
1812
1812
|
const i = n.replace(s, "");
|
|
1813
|
-
let r = no.has(
|
|
1814
|
-
return s !== n && (r *= 100),
|
|
1813
|
+
let r = no.has(e) ? 1 : 0;
|
|
1814
|
+
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
1815
1815
|
}
|
|
1816
|
-
const io = /\b([a-z-]*)\(.*?\)/gu,
|
|
1816
|
+
const io = /\b([a-z-]*)\(.*?\)/gu, fe = {
|
|
1817
1817
|
...B,
|
|
1818
|
-
getAnimatableNone: (
|
|
1819
|
-
const
|
|
1820
|
-
return
|
|
1818
|
+
getAnimatableNone: (t) => {
|
|
1819
|
+
const e = t.match(io);
|
|
1820
|
+
return e ? e.map(so).join(" ") : t;
|
|
1821
1821
|
}
|
|
1822
|
-
},
|
|
1822
|
+
}, de = {
|
|
1823
1823
|
...B,
|
|
1824
|
-
getAnimatableNone: (
|
|
1825
|
-
const
|
|
1826
|
-
return B.createTransformer(
|
|
1824
|
+
getAnimatableNone: (t) => {
|
|
1825
|
+
const e = B.parse(t);
|
|
1826
|
+
return B.createTransformer(t)(e.map((s) => typeof s == "number" ? 0 : typeof s == "object" ? { ...s, alpha: 1 } : s));
|
|
1827
1827
|
}
|
|
1828
1828
|
}, nn = {
|
|
1829
|
-
...
|
|
1829
|
+
...ot,
|
|
1830
1830
|
transform: Math.round
|
|
1831
1831
|
}, ro = {
|
|
1832
1832
|
rotate: G,
|
|
1833
1833
|
rotateX: G,
|
|
1834
1834
|
rotateY: G,
|
|
1835
1835
|
rotateZ: G,
|
|
1836
|
-
scale:
|
|
1837
|
-
scaleX:
|
|
1838
|
-
scaleY:
|
|
1839
|
-
scaleZ:
|
|
1836
|
+
scale: Mt,
|
|
1837
|
+
scaleX: Mt,
|
|
1838
|
+
scaleY: Mt,
|
|
1839
|
+
scaleZ: Mt,
|
|
1840
1840
|
skew: G,
|
|
1841
1841
|
skewX: G,
|
|
1842
1842
|
skewY: G,
|
|
@@ -1849,11 +1849,11 @@ const io = /\b([a-z-]*)\(.*?\)/gu, ft = {
|
|
|
1849
1849
|
z: m,
|
|
1850
1850
|
perspective: m,
|
|
1851
1851
|
transformPerspective: m,
|
|
1852
|
-
opacity:
|
|
1853
|
-
originX:
|
|
1854
|
-
originY:
|
|
1852
|
+
opacity: pt,
|
|
1853
|
+
originX: je,
|
|
1854
|
+
originY: je,
|
|
1855
1855
|
originZ: m
|
|
1856
|
-
},
|
|
1856
|
+
}, Fe = {
|
|
1857
1857
|
// Border props
|
|
1858
1858
|
borderWidth: m,
|
|
1859
1859
|
borderTopWidth: m,
|
|
@@ -1912,11 +1912,11 @@ const io = /\b([a-z-]*)\(.*?\)/gu, ft = {
|
|
|
1912
1912
|
...ro,
|
|
1913
1913
|
zIndex: nn,
|
|
1914
1914
|
// SVG
|
|
1915
|
-
fillOpacity:
|
|
1916
|
-
strokeOpacity:
|
|
1915
|
+
fillOpacity: pt,
|
|
1916
|
+
strokeOpacity: pt,
|
|
1917
1917
|
numOctaves: nn
|
|
1918
1918
|
}, oo = {
|
|
1919
|
-
...
|
|
1919
|
+
...Fe,
|
|
1920
1920
|
// Color props
|
|
1921
1921
|
color: P,
|
|
1922
1922
|
backgroundColor: P,
|
|
@@ -1929,81 +1929,81 @@ const io = /\b([a-z-]*)\(.*?\)/gu, ft = {
|
|
|
1929
1929
|
borderRightColor: P,
|
|
1930
1930
|
borderBottomColor: P,
|
|
1931
1931
|
borderLeftColor: P,
|
|
1932
|
-
filter:
|
|
1933
|
-
WebkitFilter:
|
|
1934
|
-
mask:
|
|
1935
|
-
WebkitMask:
|
|
1936
|
-
}, gs = (
|
|
1937
|
-
function ys(
|
|
1938
|
-
let n = gs(
|
|
1939
|
-
return ao.has(n) || (n = B), n.getAnimatableNone ? n.getAnimatableNone(
|
|
1932
|
+
filter: fe,
|
|
1933
|
+
WebkitFilter: fe,
|
|
1934
|
+
mask: de,
|
|
1935
|
+
WebkitMask: de
|
|
1936
|
+
}, gs = (t) => oo[t], ao = /* @__PURE__ */ new Set([fe, de]);
|
|
1937
|
+
function ys(t, e) {
|
|
1938
|
+
let n = gs(t);
|
|
1939
|
+
return ao.has(n) || (n = B), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1940
1940
|
}
|
|
1941
1941
|
const uo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1942
|
-
function co(
|
|
1942
|
+
function co(t, e, n) {
|
|
1943
1943
|
let s = 0, i;
|
|
1944
|
-
for (; s <
|
|
1945
|
-
const r =
|
|
1946
|
-
typeof r == "string" && !uo.has(r) &&
|
|
1944
|
+
for (; s < t.length && !i; ) {
|
|
1945
|
+
const r = t[s];
|
|
1946
|
+
typeof r == "string" && !uo.has(r) && mt(r).values.length && (i = t[s]), s++;
|
|
1947
1947
|
}
|
|
1948
1948
|
if (i && n)
|
|
1949
|
-
for (const r of
|
|
1950
|
-
|
|
1949
|
+
for (const r of e)
|
|
1950
|
+
t[r] = ys(n, i);
|
|
1951
1951
|
}
|
|
1952
|
-
class lo extends
|
|
1953
|
-
constructor(
|
|
1954
|
-
super(
|
|
1952
|
+
class lo extends Me {
|
|
1953
|
+
constructor(e, n, s, i, r) {
|
|
1954
|
+
super(e, n, s, i, r, !0);
|
|
1955
1955
|
}
|
|
1956
1956
|
readKeyframes() {
|
|
1957
|
-
const { unresolvedKeyframes:
|
|
1957
|
+
const { unresolvedKeyframes: e, element: n, name: s } = this;
|
|
1958
1958
|
if (!n || !n.current)
|
|
1959
1959
|
return;
|
|
1960
1960
|
super.readKeyframes();
|
|
1961
|
-
for (let u = 0; u <
|
|
1962
|
-
let d =
|
|
1963
|
-
if (typeof d == "string" && (d = d.trim(),
|
|
1961
|
+
for (let u = 0; u < e.length; u++) {
|
|
1962
|
+
let d = e[u];
|
|
1963
|
+
if (typeof d == "string" && (d = d.trim(), be(d))) {
|
|
1964
1964
|
const f = us(d, n.current);
|
|
1965
|
-
f !== void 0 && (
|
|
1965
|
+
f !== void 0 && (e[u] = f), u === e.length - 1 && (this.finalKeyframe = d);
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
if (this.resolveNoneKeyframes(), !fs.has(s) ||
|
|
1968
|
+
if (this.resolveNoneKeyframes(), !fs.has(s) || e.length !== 2)
|
|
1969
1969
|
return;
|
|
1970
|
-
const [i, r] =
|
|
1970
|
+
const [i, r] = e, o = en(i), a = en(r), c = $e(i), l = $e(r);
|
|
1971
1971
|
if (c !== l && H[s]) {
|
|
1972
1972
|
this.needsMeasurement = !0;
|
|
1973
1973
|
return;
|
|
1974
1974
|
}
|
|
1975
1975
|
if (o !== a)
|
|
1976
|
-
if (
|
|
1977
|
-
for (let u = 0; u <
|
|
1978
|
-
const d =
|
|
1979
|
-
typeof d == "string" && (
|
|
1976
|
+
if (qe(o) && qe(a))
|
|
1977
|
+
for (let u = 0; u < e.length; u++) {
|
|
1978
|
+
const d = e[u];
|
|
1979
|
+
typeof d == "string" && (e[u] = parseFloat(d));
|
|
1980
1980
|
}
|
|
1981
1981
|
else H[s] && (this.needsMeasurement = !0);
|
|
1982
1982
|
}
|
|
1983
1983
|
resolveNoneKeyframes() {
|
|
1984
|
-
const { unresolvedKeyframes:
|
|
1985
|
-
for (let i = 0; i <
|
|
1986
|
-
(
|
|
1987
|
-
s.length && co(
|
|
1984
|
+
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
1985
|
+
for (let i = 0; i < e.length; i++)
|
|
1986
|
+
(e[i] === null || eo(e[i])) && s.push(i);
|
|
1987
|
+
s.length && co(e, s, n);
|
|
1988
1988
|
}
|
|
1989
1989
|
measureInitialState() {
|
|
1990
|
-
const { element:
|
|
1991
|
-
if (!
|
|
1990
|
+
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
1991
|
+
if (!e || !e.current)
|
|
1992
1992
|
return;
|
|
1993
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = H[s](
|
|
1993
|
+
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = H[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
|
|
1994
1994
|
const i = n[n.length - 1];
|
|
1995
|
-
i !== void 0 &&
|
|
1995
|
+
i !== void 0 && e.getValue(s, i).jump(i, !1);
|
|
1996
1996
|
}
|
|
1997
1997
|
measureEndState() {
|
|
1998
1998
|
var a;
|
|
1999
|
-
const { element:
|
|
2000
|
-
if (!
|
|
1999
|
+
const { element: e, name: n, unresolvedKeyframes: s } = this;
|
|
2000
|
+
if (!e || !e.current)
|
|
2001
2001
|
return;
|
|
2002
|
-
const i =
|
|
2002
|
+
const i = e.getValue(n);
|
|
2003
2003
|
i && i.jump(this.measuredOrigin, !1);
|
|
2004
2004
|
const r = s.length - 1, o = s[r];
|
|
2005
|
-
s[r] = H[n](
|
|
2006
|
-
|
|
2005
|
+
s[r] = H[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(([c, l]) => {
|
|
2006
|
+
e.getValue(c).set(l);
|
|
2007
2007
|
}), this.resolveNoneKeyframes();
|
|
2008
2008
|
}
|
|
2009
2009
|
}
|
|
@@ -2016,21 +2016,21 @@ const fo = /* @__PURE__ */ new Set([
|
|
|
2016
2016
|
// or until we implement support for linear() easing.
|
|
2017
2017
|
// "background-color"
|
|
2018
2018
|
]);
|
|
2019
|
-
function ho(
|
|
2020
|
-
if (
|
|
2019
|
+
function ho(t, e, n) {
|
|
2020
|
+
if (t == null)
|
|
2021
2021
|
return [];
|
|
2022
|
-
if (
|
|
2023
|
-
return [
|
|
2024
|
-
if (typeof
|
|
2022
|
+
if (t instanceof EventTarget)
|
|
2023
|
+
return [t];
|
|
2024
|
+
if (typeof t == "string") {
|
|
2025
2025
|
let s = document;
|
|
2026
|
-
const i = (n == null ? void 0 : n[
|
|
2026
|
+
const i = (n == null ? void 0 : n[t]) ?? s.querySelectorAll(t);
|
|
2027
2027
|
return i ? Array.from(i) : [];
|
|
2028
2028
|
}
|
|
2029
|
-
return Array.from(
|
|
2029
|
+
return Array.from(t).filter((s) => s != null);
|
|
2030
2030
|
}
|
|
2031
|
-
const bs = (
|
|
2032
|
-
function po(
|
|
2033
|
-
return ri(
|
|
2031
|
+
const bs = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
2032
|
+
function po(t) {
|
|
2033
|
+
return ri(t) && "offsetHeight" in t;
|
|
2034
2034
|
}
|
|
2035
2035
|
const { schedule: mo } = /* @__PURE__ */ Wn(queueMicrotask, !1), go = {
|
|
2036
2036
|
y: !1
|
|
@@ -2038,19 +2038,19 @@ const { schedule: mo } = /* @__PURE__ */ Wn(queueMicrotask, !1), go = {
|
|
|
2038
2038
|
function yo() {
|
|
2039
2039
|
return go.y;
|
|
2040
2040
|
}
|
|
2041
|
-
function Ts(
|
|
2042
|
-
const n = ho(
|
|
2041
|
+
function Ts(t, e) {
|
|
2042
|
+
const n = ho(t), s = new AbortController(), i = {
|
|
2043
2043
|
passive: !0,
|
|
2044
|
-
...
|
|
2044
|
+
...e,
|
|
2045
2045
|
signal: s.signal
|
|
2046
2046
|
};
|
|
2047
2047
|
return [n, i, () => s.abort()];
|
|
2048
2048
|
}
|
|
2049
|
-
function bo(
|
|
2050
|
-
return !(
|
|
2049
|
+
function bo(t) {
|
|
2050
|
+
return !(t.pointerType === "touch" || yo());
|
|
2051
2051
|
}
|
|
2052
|
-
function To(
|
|
2053
|
-
const [s, i, r] = Ts(
|
|
2052
|
+
function To(t, e, n = {}) {
|
|
2053
|
+
const [s, i, r] = Ts(t, n);
|
|
2054
2054
|
return s.forEach((o) => {
|
|
2055
2055
|
let a = !1, c = !1, l;
|
|
2056
2056
|
const u = () => {
|
|
@@ -2073,58 +2073,58 @@ function To(e, t, n = {}) {
|
|
|
2073
2073
|
if (!bo(y))
|
|
2074
2074
|
return;
|
|
2075
2075
|
c = !1;
|
|
2076
|
-
const g =
|
|
2076
|
+
const g = e(o, y);
|
|
2077
2077
|
typeof g == "function" && (l = g, o.addEventListener("pointerleave", p, i));
|
|
2078
2078
|
};
|
|
2079
2079
|
o.addEventListener("pointerenter", b, i), o.addEventListener("pointerdown", h, i);
|
|
2080
2080
|
}), r;
|
|
2081
2081
|
}
|
|
2082
|
-
const vs = (
|
|
2082
|
+
const vs = (t, e) => e ? t === e ? !0 : vs(t, e.parentElement) : !1, vo = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, wo = /* @__PURE__ */ new Set([
|
|
2083
2083
|
"BUTTON",
|
|
2084
2084
|
"INPUT",
|
|
2085
2085
|
"SELECT",
|
|
2086
2086
|
"TEXTAREA",
|
|
2087
2087
|
"A"
|
|
2088
2088
|
]);
|
|
2089
|
-
function So(
|
|
2090
|
-
return wo.has(
|
|
2089
|
+
function So(t) {
|
|
2090
|
+
return wo.has(t.tagName) || t.isContentEditable === !0;
|
|
2091
2091
|
}
|
|
2092
|
-
const
|
|
2093
|
-
function sn(
|
|
2094
|
-
return (
|
|
2095
|
-
|
|
2092
|
+
const Pt = /* @__PURE__ */ new WeakSet();
|
|
2093
|
+
function sn(t) {
|
|
2094
|
+
return (e) => {
|
|
2095
|
+
e.key === "Enter" && t(e);
|
|
2096
2096
|
};
|
|
2097
2097
|
}
|
|
2098
|
-
function
|
|
2099
|
-
|
|
2098
|
+
function Ut(t, e) {
|
|
2099
|
+
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
2100
2100
|
}
|
|
2101
|
-
const Vo = (
|
|
2102
|
-
const n =
|
|
2101
|
+
const Vo = (t, e) => {
|
|
2102
|
+
const n = t.currentTarget;
|
|
2103
2103
|
if (!n)
|
|
2104
2104
|
return;
|
|
2105
2105
|
const s = sn(() => {
|
|
2106
|
-
if (
|
|
2106
|
+
if (Pt.has(n))
|
|
2107
2107
|
return;
|
|
2108
|
-
|
|
2108
|
+
Ut(n, "down");
|
|
2109
2109
|
const i = sn(() => {
|
|
2110
|
-
|
|
2111
|
-
}), r = () =>
|
|
2112
|
-
n.addEventListener("keyup", i,
|
|
2110
|
+
Ut(n, "up");
|
|
2111
|
+
}), r = () => Ut(n, "cancel");
|
|
2112
|
+
n.addEventListener("keyup", i, e), n.addEventListener("blur", r, e);
|
|
2113
2113
|
});
|
|
2114
|
-
n.addEventListener("keydown", s,
|
|
2114
|
+
n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
|
|
2115
2115
|
};
|
|
2116
|
-
function rn(
|
|
2117
|
-
return vo(
|
|
2116
|
+
function rn(t) {
|
|
2117
|
+
return vo(t) && !0;
|
|
2118
2118
|
}
|
|
2119
2119
|
const on = /* @__PURE__ */ new WeakSet();
|
|
2120
|
-
function Ao(
|
|
2121
|
-
const [s, i, r] = Ts(
|
|
2120
|
+
function Ao(t, e, n = {}) {
|
|
2121
|
+
const [s, i, r] = Ts(t, n), o = (a) => {
|
|
2122
2122
|
const c = a.currentTarget;
|
|
2123
2123
|
if (!rn(a) || on.has(a))
|
|
2124
2124
|
return;
|
|
2125
|
-
|
|
2126
|
-
const l =
|
|
2127
|
-
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f),
|
|
2125
|
+
Pt.add(c), n.stopPropagation && on.add(a);
|
|
2126
|
+
const l = e(c, a), u = (h, p) => {
|
|
2127
|
+
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Pt.has(c) && Pt.delete(c), rn(h) && typeof l == "function" && l(h, { success: p });
|
|
2128
2128
|
}, d = (h) => {
|
|
2129
2129
|
u(h, c === window || c === document || n.useGlobalTarget || vs(c, h.target));
|
|
2130
2130
|
}, f = (h) => {
|
|
@@ -2136,17 +2136,17 @@ function Ao(e, t, n = {}) {
|
|
|
2136
2136
|
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), po(a) && (a.addEventListener("focus", (l) => Vo(l, i)), !So(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
2137
2137
|
}), r;
|
|
2138
2138
|
}
|
|
2139
|
-
const xo = [...ms, P, B], Mo = (
|
|
2139
|
+
const xo = [...ms, P, B], Mo = (t) => xo.find(ps(t)), an = () => ({ min: 0, max: 0 }), ws = () => ({
|
|
2140
2140
|
x: an(),
|
|
2141
2141
|
y: an()
|
|
2142
2142
|
}), Co = /* @__PURE__ */ new WeakMap();
|
|
2143
|
-
function
|
|
2144
|
-
return
|
|
2143
|
+
function Lt(t) {
|
|
2144
|
+
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2145
2145
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return typeof
|
|
2146
|
+
function gt(t) {
|
|
2147
|
+
return typeof t == "string" || Array.isArray(t);
|
|
2148
2148
|
}
|
|
2149
|
-
const
|
|
2149
|
+
const Oe = [
|
|
2150
2150
|
"animate",
|
|
2151
2151
|
"whileInView",
|
|
2152
2152
|
"whileFocus",
|
|
@@ -2154,41 +2154,41 @@ const Ot = [
|
|
|
2154
2154
|
"whileTap",
|
|
2155
2155
|
"whileDrag",
|
|
2156
2156
|
"exit"
|
|
2157
|
-
],
|
|
2158
|
-
function
|
|
2159
|
-
return
|
|
2157
|
+
], De = ["initial", ...Oe];
|
|
2158
|
+
function Kt(t) {
|
|
2159
|
+
return Lt(t.animate) || De.some((e) => gt(t[e]));
|
|
2160
2160
|
}
|
|
2161
|
-
function Ss(
|
|
2162
|
-
return !!(
|
|
2161
|
+
function Ss(t) {
|
|
2162
|
+
return !!(Kt(t) || t.variants);
|
|
2163
2163
|
}
|
|
2164
|
-
function Po(
|
|
2165
|
-
for (const s in
|
|
2166
|
-
const i =
|
|
2164
|
+
function Po(t, e, n) {
|
|
2165
|
+
for (const s in e) {
|
|
2166
|
+
const i = e[s], r = n[s];
|
|
2167
2167
|
if (R(i))
|
|
2168
|
-
|
|
2168
|
+
t.addValue(s, i);
|
|
2169
2169
|
else if (R(r))
|
|
2170
|
-
|
|
2170
|
+
t.addValue(s, It(i, { owner: t }));
|
|
2171
2171
|
else if (r !== i)
|
|
2172
|
-
if (
|
|
2173
|
-
const o =
|
|
2172
|
+
if (t.hasValue(s)) {
|
|
2173
|
+
const o = t.getValue(s);
|
|
2174
2174
|
o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
|
|
2175
2175
|
} else {
|
|
2176
|
-
const o =
|
|
2177
|
-
|
|
2176
|
+
const o = t.getStaticValue(s);
|
|
2177
|
+
t.addValue(s, It(o !== void 0 ? o : i, { owner: t }));
|
|
2178
2178
|
}
|
|
2179
2179
|
}
|
|
2180
2180
|
for (const s in n)
|
|
2181
|
-
|
|
2182
|
-
return
|
|
2181
|
+
e[s] === void 0 && t.removeValue(s);
|
|
2182
|
+
return e;
|
|
2183
2183
|
}
|
|
2184
|
-
const
|
|
2184
|
+
const he = { current: null }, Vs = { current: !1 }, Fo = typeof window < "u";
|
|
2185
2185
|
function Oo() {
|
|
2186
2186
|
if (Vs.current = !0, !!Fo)
|
|
2187
2187
|
if (window.matchMedia) {
|
|
2188
|
-
const
|
|
2189
|
-
|
|
2188
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => he.current = t.matches;
|
|
2189
|
+
t.addEventListener("change", e), e();
|
|
2190
2190
|
} else
|
|
2191
|
-
|
|
2191
|
+
he.current = !1;
|
|
2192
2192
|
}
|
|
2193
2193
|
const un = [
|
|
2194
2194
|
"AnimationStart",
|
|
@@ -2199,12 +2199,12 @@ const un = [
|
|
|
2199
2199
|
"LayoutAnimationStart",
|
|
2200
2200
|
"LayoutAnimationComplete"
|
|
2201
2201
|
];
|
|
2202
|
-
let
|
|
2203
|
-
function As(
|
|
2204
|
-
|
|
2202
|
+
let kt = {};
|
|
2203
|
+
function As(t) {
|
|
2204
|
+
kt = t;
|
|
2205
2205
|
}
|
|
2206
2206
|
function Do() {
|
|
2207
|
-
return
|
|
2207
|
+
return kt;
|
|
2208
2208
|
}
|
|
2209
2209
|
class Ro {
|
|
2210
2210
|
/**
|
|
@@ -2214,34 +2214,34 @@ class Ro {
|
|
|
2214
2214
|
* This isn't an abstract method as it needs calling in the constructor, but it is
|
|
2215
2215
|
* intended to be one.
|
|
2216
2216
|
*/
|
|
2217
|
-
scrapeMotionValuesFromProps(
|
|
2217
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
2218
2218
|
return {};
|
|
2219
2219
|
}
|
|
2220
|
-
constructor({ parent:
|
|
2221
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2220
|
+
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, skipAnimations: r, blockInitialAnimation: o, visualState: a }, c = {}) {
|
|
2221
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Me, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2222
2222
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2223
2223
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2224
2224
|
const h = I.now();
|
|
2225
2225
|
this.renderScheduledAt < h && (this.renderScheduledAt = h, L.render(this.render, !1, !0));
|
|
2226
2226
|
};
|
|
2227
2227
|
const { latestValues: l, renderState: u } = a;
|
|
2228
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent =
|
|
2228
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.skipAnimationsConfig = r, this.options = c, this.blockInitialAnimation = !!o, this.isControllingVariants = Kt(n), this.isVariantNode = Ss(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
2229
2229
|
const { willChange: d, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2230
2230
|
for (const h in f) {
|
|
2231
2231
|
const p = f[h];
|
|
2232
2232
|
l[h] !== void 0 && R(p) && p.set(l[h]);
|
|
2233
2233
|
}
|
|
2234
2234
|
}
|
|
2235
|
-
mount(
|
|
2235
|
+
mount(e) {
|
|
2236
2236
|
var n, s;
|
|
2237
2237
|
if (this.hasBeenMounted)
|
|
2238
2238
|
for (const i in this.initialValues)
|
|
2239
2239
|
(n = this.values.get(i)) == null || n.jump(this.initialValues[i]), this.latestValues[i] = this.initialValues[i];
|
|
2240
|
-
this.current =
|
|
2240
|
+
this.current = e, Co.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((i, r) => this.bindToMotionValue(r, i)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Vs.current || Oo(), this.shouldReduceMotion = he.current), process.env.NODE_ENV !== "production" && On(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, (s = this.parent) == null || s.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
2241
2241
|
}
|
|
2242
2242
|
unmount() {
|
|
2243
|
-
var
|
|
2244
|
-
this.projection && this.projection.unmount(),
|
|
2243
|
+
var e;
|
|
2244
|
+
this.projection && this.projection.unmount(), qt(this.notifyUpdate), qt(this.render), this.valueSubscriptions.forEach((n) => n()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), (e = this.parent) == null || e.removeChild(this);
|
|
2245
2245
|
for (const n in this.events)
|
|
2246
2246
|
this.events[n].clear();
|
|
2247
2247
|
for (const n in this.features) {
|
|
@@ -2250,49 +2250,49 @@ class Ro {
|
|
|
2250
2250
|
}
|
|
2251
2251
|
this.current = null;
|
|
2252
2252
|
}
|
|
2253
|
-
addChild(
|
|
2254
|
-
this.children.add(
|
|
2253
|
+
addChild(e) {
|
|
2254
|
+
this.children.add(e), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(e);
|
|
2255
2255
|
}
|
|
2256
|
-
removeChild(
|
|
2257
|
-
this.children.delete(
|
|
2256
|
+
removeChild(e) {
|
|
2257
|
+
this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
|
|
2258
2258
|
}
|
|
2259
|
-
bindToMotionValue(
|
|
2260
|
-
if (this.valueSubscriptions.has(
|
|
2259
|
+
bindToMotionValue(e, n) {
|
|
2260
|
+
if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), n.accelerate && fo.has(e) && this.current instanceof HTMLElement) {
|
|
2261
2261
|
const { factory: o, keyframes: a, times: c, ease: l, duration: u } = n.accelerate, d = new rs({
|
|
2262
2262
|
element: this.current,
|
|
2263
|
-
name:
|
|
2263
|
+
name: e,
|
|
2264
2264
|
keyframes: a,
|
|
2265
2265
|
times: c,
|
|
2266
2266
|
ease: l,
|
|
2267
2267
|
duration: /* @__PURE__ */ K(u)
|
|
2268
2268
|
}), f = o(d);
|
|
2269
|
-
this.valueSubscriptions.set(
|
|
2269
|
+
this.valueSubscriptions.set(e, () => {
|
|
2270
2270
|
f(), d.cancel();
|
|
2271
2271
|
});
|
|
2272
2272
|
return;
|
|
2273
2273
|
}
|
|
2274
|
-
const s =
|
|
2274
|
+
const s = ut.has(e);
|
|
2275
2275
|
s && this.onBindTransform && this.onBindTransform();
|
|
2276
2276
|
const i = n.on("change", (o) => {
|
|
2277
|
-
this.latestValues[
|
|
2277
|
+
this.latestValues[e] = o, this.props.onUpdate && L.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
2278
2278
|
});
|
|
2279
2279
|
let r;
|
|
2280
|
-
typeof window < "u" && window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this,
|
|
2280
|
+
typeof window < "u" && window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
2281
2281
|
i(), r && r(), n.owner && n.stop();
|
|
2282
2282
|
});
|
|
2283
2283
|
}
|
|
2284
|
-
sortNodePosition(
|
|
2285
|
-
return !this.current || !this.sortInstanceNodePosition || this.type !==
|
|
2284
|
+
sortNodePosition(e) {
|
|
2285
|
+
return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
|
|
2286
2286
|
}
|
|
2287
2287
|
updateFeatures() {
|
|
2288
|
-
let
|
|
2289
|
-
for (
|
|
2290
|
-
const n =
|
|
2288
|
+
let e = "animation";
|
|
2289
|
+
for (e in kt) {
|
|
2290
|
+
const n = kt[e];
|
|
2291
2291
|
if (!n)
|
|
2292
2292
|
continue;
|
|
2293
2293
|
const { isEnabled: s, Feature: i } = n;
|
|
2294
|
-
if (!this.features[
|
|
2295
|
-
const r = this.features[
|
|
2294
|
+
if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
|
|
2295
|
+
const r = this.features[e];
|
|
2296
2296
|
r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
|
|
2297
2297
|
}
|
|
2298
2298
|
}
|
|
@@ -2308,25 +2308,25 @@ class Ro {
|
|
|
2308
2308
|
measureViewportBox() {
|
|
2309
2309
|
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : ws();
|
|
2310
2310
|
}
|
|
2311
|
-
getStaticValue(
|
|
2312
|
-
return this.latestValues[
|
|
2311
|
+
getStaticValue(e) {
|
|
2312
|
+
return this.latestValues[e];
|
|
2313
2313
|
}
|
|
2314
|
-
setStaticValue(
|
|
2315
|
-
this.latestValues[
|
|
2314
|
+
setStaticValue(e, n) {
|
|
2315
|
+
this.latestValues[e] = n;
|
|
2316
2316
|
}
|
|
2317
2317
|
/**
|
|
2318
2318
|
* Update the provided props. Ensure any newly-added motion values are
|
|
2319
2319
|
* added to our map, old ones removed, and listeners updated.
|
|
2320
2320
|
*/
|
|
2321
|
-
update(
|
|
2322
|
-
(
|
|
2321
|
+
update(e, n) {
|
|
2322
|
+
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
2323
2323
|
for (let s = 0; s < un.length; s++) {
|
|
2324
2324
|
const i = un[s];
|
|
2325
2325
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2326
|
-
const r = "on" + i, o =
|
|
2326
|
+
const r = "on" + i, o = e[r];
|
|
2327
2327
|
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
2328
2328
|
}
|
|
2329
|
-
this.prevMotionValues = Po(this, this.scrapeMotionValuesFromProps(
|
|
2329
|
+
this.prevMotionValues = Po(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2330
2330
|
}
|
|
2331
2331
|
getProps() {
|
|
2332
2332
|
return this.props;
|
|
@@ -2334,8 +2334,8 @@ class Ro {
|
|
|
2334
2334
|
/**
|
|
2335
2335
|
* Returns the variant definition with a given name.
|
|
2336
2336
|
*/
|
|
2337
|
-
getVariant(
|
|
2338
|
-
return this.props.variants ? this.props.variants[
|
|
2337
|
+
getVariant(e) {
|
|
2338
|
+
return this.props.variants ? this.props.variants[e] : void 0;
|
|
2339
2339
|
}
|
|
2340
2340
|
/**
|
|
2341
2341
|
* Returns the defined default transition on this component.
|
|
@@ -2352,76 +2352,76 @@ class Ro {
|
|
|
2352
2352
|
/**
|
|
2353
2353
|
* Add a child visual element to our set of children.
|
|
2354
2354
|
*/
|
|
2355
|
-
addVariantChild(
|
|
2355
|
+
addVariantChild(e) {
|
|
2356
2356
|
const n = this.getClosestVariantNode();
|
|
2357
2357
|
if (n)
|
|
2358
|
-
return n.variantChildren && n.variantChildren.add(
|
|
2358
|
+
return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
|
|
2359
2359
|
}
|
|
2360
2360
|
/**
|
|
2361
2361
|
* Add a motion value and bind it to this visual element.
|
|
2362
2362
|
*/
|
|
2363
|
-
addValue(
|
|
2364
|
-
const s = this.values.get(
|
|
2365
|
-
n !== s && (s && this.removeValue(
|
|
2363
|
+
addValue(e, n) {
|
|
2364
|
+
const s = this.values.get(e);
|
|
2365
|
+
n !== s && (s && this.removeValue(e), this.bindToMotionValue(e, n), this.values.set(e, n), this.latestValues[e] = n.get());
|
|
2366
2366
|
}
|
|
2367
2367
|
/**
|
|
2368
2368
|
* Remove a motion value and unbind any active subscriptions.
|
|
2369
2369
|
*/
|
|
2370
|
-
removeValue(
|
|
2371
|
-
this.values.delete(
|
|
2372
|
-
const n = this.valueSubscriptions.get(
|
|
2373
|
-
n && (n(), this.valueSubscriptions.delete(
|
|
2370
|
+
removeValue(e) {
|
|
2371
|
+
this.values.delete(e);
|
|
2372
|
+
const n = this.valueSubscriptions.get(e);
|
|
2373
|
+
n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
|
|
2374
2374
|
}
|
|
2375
2375
|
/**
|
|
2376
2376
|
* Check whether we have a motion value for this key
|
|
2377
2377
|
*/
|
|
2378
|
-
hasValue(
|
|
2379
|
-
return this.values.has(
|
|
2378
|
+
hasValue(e) {
|
|
2379
|
+
return this.values.has(e);
|
|
2380
2380
|
}
|
|
2381
|
-
getValue(
|
|
2382
|
-
if (this.props.values && this.props.values[
|
|
2383
|
-
return this.props.values[
|
|
2384
|
-
let s = this.values.get(
|
|
2385
|
-
return s === void 0 && n !== void 0 && (s =
|
|
2381
|
+
getValue(e, n) {
|
|
2382
|
+
if (this.props.values && this.props.values[e])
|
|
2383
|
+
return this.props.values[e];
|
|
2384
|
+
let s = this.values.get(e);
|
|
2385
|
+
return s === void 0 && n !== void 0 && (s = It(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
|
|
2386
2386
|
}
|
|
2387
2387
|
/**
|
|
2388
2388
|
* If we're trying to animate to a previously unencountered value,
|
|
2389
2389
|
* we need to check for it in our state and as a last resort read it
|
|
2390
2390
|
* directly from the instance (which might have performance implications).
|
|
2391
2391
|
*/
|
|
2392
|
-
readValue(
|
|
2393
|
-
let s = this.latestValues[
|
|
2394
|
-
return s != null && (typeof s == "string" && (An(s) || xn(s)) ? s = parseFloat(s) : !Mo(s) && B.test(n) && (s = ys(
|
|
2392
|
+
readValue(e, n) {
|
|
2393
|
+
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
2394
|
+
return s != null && (typeof s == "string" && (An(s) || xn(s)) ? s = parseFloat(s) : !Mo(s) && B.test(n) && (s = ys(e, n)), this.setBaseTarget(e, R(s) ? s.get() : s)), R(s) ? s.get() : s;
|
|
2395
2395
|
}
|
|
2396
2396
|
/**
|
|
2397
2397
|
* Set the base target to later animate back to. This is currently
|
|
2398
2398
|
* only hydrated on creation and when we first read a value.
|
|
2399
2399
|
*/
|
|
2400
|
-
setBaseTarget(
|
|
2401
|
-
this.baseTarget[
|
|
2400
|
+
setBaseTarget(e, n) {
|
|
2401
|
+
this.baseTarget[e] = n;
|
|
2402
2402
|
}
|
|
2403
2403
|
/**
|
|
2404
2404
|
* Find the base target for a value thats been removed from all animation
|
|
2405
2405
|
* props.
|
|
2406
2406
|
*/
|
|
2407
|
-
getBaseTarget(
|
|
2407
|
+
getBaseTarget(e) {
|
|
2408
2408
|
var r;
|
|
2409
2409
|
const { initial: n } = this.props;
|
|
2410
2410
|
let s;
|
|
2411
2411
|
if (typeof n == "string" || typeof n == "object") {
|
|
2412
|
-
const o =
|
|
2413
|
-
o && (s = o[
|
|
2412
|
+
const o = Ce(this.props, n, (r = this.presenceContext) == null ? void 0 : r.custom);
|
|
2413
|
+
o && (s = o[e]);
|
|
2414
2414
|
}
|
|
2415
2415
|
if (n && s !== void 0)
|
|
2416
2416
|
return s;
|
|
2417
|
-
const i = this.getBaseTargetFromProps(this.props,
|
|
2418
|
-
return i !== void 0 && !R(i) ? i : this.initialValues[
|
|
2417
|
+
const i = this.getBaseTargetFromProps(this.props, e);
|
|
2418
|
+
return i !== void 0 && !R(i) ? i : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
2419
2419
|
}
|
|
2420
|
-
on(
|
|
2421
|
-
return this.events[
|
|
2420
|
+
on(e, n) {
|
|
2421
|
+
return this.events[e] || (this.events[e] = new Pn()), this.events[e].add(n);
|
|
2422
2422
|
}
|
|
2423
|
-
notify(
|
|
2424
|
-
this.events[
|
|
2423
|
+
notify(e, ...n) {
|
|
2424
|
+
this.events[e] && this.events[e].notify(...n);
|
|
2425
2425
|
}
|
|
2426
2426
|
scheduleRenderMicrotask() {
|
|
2427
2427
|
mo.render(this.render);
|
|
@@ -2431,41 +2431,41 @@ class xs extends Ro {
|
|
|
2431
2431
|
constructor() {
|
|
2432
2432
|
super(...arguments), this.KeyframeResolver = lo;
|
|
2433
2433
|
}
|
|
2434
|
-
sortInstanceNodePosition(
|
|
2435
|
-
return
|
|
2434
|
+
sortInstanceNodePosition(e, n) {
|
|
2435
|
+
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
2436
2436
|
}
|
|
2437
|
-
getBaseTargetFromProps(
|
|
2438
|
-
const s =
|
|
2437
|
+
getBaseTargetFromProps(e, n) {
|
|
2438
|
+
const s = e.style;
|
|
2439
2439
|
return s ? s[n] : void 0;
|
|
2440
2440
|
}
|
|
2441
|
-
removeValueFromRenderState(
|
|
2442
|
-
delete n[
|
|
2441
|
+
removeValueFromRenderState(e, { vars: n, style: s }) {
|
|
2442
|
+
delete n[e], delete s[e];
|
|
2443
2443
|
}
|
|
2444
2444
|
handleChildMotionValue() {
|
|
2445
2445
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2446
|
-
const { children:
|
|
2447
|
-
R(
|
|
2446
|
+
const { children: e } = this.props;
|
|
2447
|
+
R(e) && (this.childSubscription = e.on("change", (n) => {
|
|
2448
2448
|
this.current && (this.current.textContent = `${n}`);
|
|
2449
2449
|
}));
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
2452
|
-
class
|
|
2453
|
-
constructor(
|
|
2454
|
-
this.isMounted = !1, this.node =
|
|
2452
|
+
class ct {
|
|
2453
|
+
constructor(e) {
|
|
2454
|
+
this.isMounted = !1, this.node = e;
|
|
2455
2455
|
}
|
|
2456
2456
|
update() {
|
|
2457
2457
|
}
|
|
2458
2458
|
}
|
|
2459
|
-
function Io({ top:
|
|
2459
|
+
function Io({ top: t, left: e, right: n, bottom: s }) {
|
|
2460
2460
|
return {
|
|
2461
|
-
x: { min:
|
|
2462
|
-
y: { min:
|
|
2461
|
+
x: { min: e, max: n },
|
|
2462
|
+
y: { min: t, max: s }
|
|
2463
2463
|
};
|
|
2464
2464
|
}
|
|
2465
|
-
function ko(
|
|
2466
|
-
if (!
|
|
2467
|
-
return
|
|
2468
|
-
const n =
|
|
2465
|
+
function ko(t, e) {
|
|
2466
|
+
if (!e)
|
|
2467
|
+
return t;
|
|
2468
|
+
const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
|
|
2469
2469
|
return {
|
|
2470
2470
|
top: n.y,
|
|
2471
2471
|
left: n.x,
|
|
@@ -2473,19 +2473,19 @@ function ko(e, t) {
|
|
|
2473
2473
|
right: s.x
|
|
2474
2474
|
};
|
|
2475
2475
|
}
|
|
2476
|
-
function Eo(
|
|
2477
|
-
return Io(ko(
|
|
2476
|
+
function Eo(t, e) {
|
|
2477
|
+
return Io(ko(t.getBoundingClientRect(), e));
|
|
2478
2478
|
}
|
|
2479
2479
|
const No = {
|
|
2480
2480
|
x: "translateX",
|
|
2481
2481
|
y: "translateY",
|
|
2482
2482
|
z: "translateZ",
|
|
2483
2483
|
transformPerspective: "perspective"
|
|
2484
|
-
}, Bo =
|
|
2485
|
-
function Lo(
|
|
2484
|
+
}, Bo = at.length;
|
|
2485
|
+
function Lo(t, e, n) {
|
|
2486
2486
|
let s = "", i = !0;
|
|
2487
2487
|
for (let r = 0; r < Bo; r++) {
|
|
2488
|
-
const o =
|
|
2488
|
+
const o = at[r], a = t[o];
|
|
2489
2489
|
if (a === void 0)
|
|
2490
2490
|
continue;
|
|
2491
2491
|
let c = !0;
|
|
@@ -2496,75 +2496,75 @@ function Lo(e, t, n) {
|
|
|
2496
2496
|
c = o.startsWith("scale") ? l === 1 : l === 0;
|
|
2497
2497
|
}
|
|
2498
2498
|
if (!c || n) {
|
|
2499
|
-
const l = bs(a,
|
|
2499
|
+
const l = bs(a, Fe[o]);
|
|
2500
2500
|
if (!c) {
|
|
2501
2501
|
i = !1;
|
|
2502
2502
|
const u = No[o] || o;
|
|
2503
2503
|
s += `${u}(${l}) `;
|
|
2504
2504
|
}
|
|
2505
|
-
n && (
|
|
2505
|
+
n && (e[o] = l);
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
2508
|
-
return s = s.trim(), n ? s = n(
|
|
2508
|
+
return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
|
|
2509
2509
|
}
|
|
2510
|
-
function
|
|
2511
|
-
const { style: s, vars: i, transformOrigin: r } =
|
|
2510
|
+
function Re(t, e, n) {
|
|
2511
|
+
const { style: s, vars: i, transformOrigin: r } = t;
|
|
2512
2512
|
let o = !1, a = !1;
|
|
2513
|
-
for (const c in
|
|
2514
|
-
const l =
|
|
2515
|
-
if (
|
|
2513
|
+
for (const c in e) {
|
|
2514
|
+
const l = e[c];
|
|
2515
|
+
if (ut.has(c)) {
|
|
2516
2516
|
o = !0;
|
|
2517
2517
|
continue;
|
|
2518
2518
|
} else if (jn(c)) {
|
|
2519
2519
|
i[c] = l;
|
|
2520
2520
|
continue;
|
|
2521
2521
|
} else {
|
|
2522
|
-
const u = bs(l,
|
|
2522
|
+
const u = bs(l, Fe[c]);
|
|
2523
2523
|
c.startsWith("origin") ? (a = !0, r[c] = u) : s[c] = u;
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
2526
|
-
if (
|
|
2526
|
+
if (e.transform || (o || n ? s.transform = Lo(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2527
2527
|
const { originX: c = "50%", originY: l = "50%", originZ: u = 0 } = r;
|
|
2528
2528
|
s.transformOrigin = `${c} ${l} ${u}`;
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
|
-
function Ms(
|
|
2532
|
-
const r =
|
|
2531
|
+
function Ms(t, { style: e, vars: n }, s, i) {
|
|
2532
|
+
const r = t.style;
|
|
2533
2533
|
let o;
|
|
2534
|
-
for (o in
|
|
2535
|
-
r[o] =
|
|
2534
|
+
for (o in e)
|
|
2535
|
+
r[o] = e[o];
|
|
2536
2536
|
i == null || i.applyProjectionStyles(r, s);
|
|
2537
2537
|
for (o in n)
|
|
2538
2538
|
r.setProperty(o, n[o]);
|
|
2539
2539
|
}
|
|
2540
|
-
function cn(
|
|
2541
|
-
return
|
|
2540
|
+
function cn(t, e) {
|
|
2541
|
+
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
2542
2542
|
}
|
|
2543
|
-
const
|
|
2544
|
-
correct: (
|
|
2545
|
-
if (!
|
|
2546
|
-
return
|
|
2547
|
-
if (typeof
|
|
2548
|
-
if (m.test(
|
|
2549
|
-
|
|
2543
|
+
const ft = {
|
|
2544
|
+
correct: (t, e) => {
|
|
2545
|
+
if (!e.target)
|
|
2546
|
+
return t;
|
|
2547
|
+
if (typeof t == "string")
|
|
2548
|
+
if (m.test(t))
|
|
2549
|
+
t = parseFloat(t);
|
|
2550
2550
|
else
|
|
2551
|
-
return
|
|
2552
|
-
const n = cn(
|
|
2551
|
+
return t;
|
|
2552
|
+
const n = cn(t, e.target.x), s = cn(t, e.target.y);
|
|
2553
2553
|
return `${n}% ${s}%`;
|
|
2554
2554
|
}
|
|
2555
2555
|
}, Ko = {
|
|
2556
|
-
correct: (
|
|
2557
|
-
const s =
|
|
2556
|
+
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
2557
|
+
const s = t, i = B.parse(t);
|
|
2558
2558
|
if (i.length > 5)
|
|
2559
2559
|
return s;
|
|
2560
|
-
const r = B.createTransformer(
|
|
2560
|
+
const r = B.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, c = n.y.scale * e.y;
|
|
2561
2561
|
i[0 + o] /= a, i[1 + o] /= c;
|
|
2562
|
-
const l =
|
|
2562
|
+
const l = vt(a, c, 0.5);
|
|
2563
2563
|
return typeof i[2 + o] == "number" && (i[2 + o] /= l), typeof i[3 + o] == "number" && (i[3 + o] /= l), r(i);
|
|
2564
2564
|
}
|
|
2565
2565
|
}, Wo = {
|
|
2566
2566
|
borderRadius: {
|
|
2567
|
-
...
|
|
2567
|
+
...ft,
|
|
2568
2568
|
applyTo: [
|
|
2569
2569
|
"borderTopLeftRadius",
|
|
2570
2570
|
"borderTopRightRadius",
|
|
@@ -2572,48 +2572,48 @@ const fe = {
|
|
|
2572
2572
|
"borderBottomRightRadius"
|
|
2573
2573
|
]
|
|
2574
2574
|
},
|
|
2575
|
-
borderTopLeftRadius:
|
|
2576
|
-
borderTopRightRadius:
|
|
2577
|
-
borderBottomLeftRadius:
|
|
2578
|
-
borderBottomRightRadius:
|
|
2575
|
+
borderTopLeftRadius: ft,
|
|
2576
|
+
borderTopRightRadius: ft,
|
|
2577
|
+
borderBottomLeftRadius: ft,
|
|
2578
|
+
borderBottomRightRadius: ft,
|
|
2579
2579
|
boxShadow: Ko
|
|
2580
2580
|
};
|
|
2581
|
-
function Cs(
|
|
2582
|
-
return
|
|
2581
|
+
function Cs(t, { layout: e, layoutId: n }) {
|
|
2582
|
+
return ut.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Wo[t] || t === "opacity");
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2584
|
+
function Ie(t, e, n) {
|
|
2585
2585
|
var o;
|
|
2586
|
-
const s =
|
|
2586
|
+
const s = t.style, i = e == null ? void 0 : e.style, r = {};
|
|
2587
2587
|
if (!s)
|
|
2588
2588
|
return r;
|
|
2589
2589
|
for (const a in s)
|
|
2590
|
-
(R(s[a]) || i && R(i[a]) || Cs(a,
|
|
2590
|
+
(R(s[a]) || i && R(i[a]) || Cs(a, t) || ((o = n == null ? void 0 : n.getValue(a)) == null ? void 0 : o.liveStyle) !== void 0) && (r[a] = s[a]);
|
|
2591
2591
|
return r;
|
|
2592
2592
|
}
|
|
2593
|
-
function $o(
|
|
2594
|
-
return window.getComputedStyle(
|
|
2593
|
+
function $o(t) {
|
|
2594
|
+
return window.getComputedStyle(t);
|
|
2595
2595
|
}
|
|
2596
2596
|
class jo extends xs {
|
|
2597
2597
|
constructor() {
|
|
2598
2598
|
super(...arguments), this.type = "html", this.renderInstance = Ms;
|
|
2599
2599
|
}
|
|
2600
|
-
readValueFromInstance(
|
|
2600
|
+
readValueFromInstance(e, n) {
|
|
2601
2601
|
var s;
|
|
2602
|
-
if (
|
|
2603
|
-
return (s = this.projection) != null && s.isProjecting ?
|
|
2602
|
+
if (ut.has(n))
|
|
2603
|
+
return (s = this.projection) != null && s.isProjecting ? se(n) : ur(e, n);
|
|
2604
2604
|
{
|
|
2605
|
-
const i = $o(
|
|
2605
|
+
const i = $o(e), r = (jn(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
2606
2606
|
return typeof r == "string" ? r.trim() : r;
|
|
2607
2607
|
}
|
|
2608
2608
|
}
|
|
2609
|
-
measureInstanceViewportBox(
|
|
2610
|
-
return Eo(
|
|
2609
|
+
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
2610
|
+
return Eo(e, n);
|
|
2611
2611
|
}
|
|
2612
|
-
build(
|
|
2613
|
-
|
|
2612
|
+
build(e, n, s) {
|
|
2613
|
+
Re(e, n, s.transformTemplate);
|
|
2614
2614
|
}
|
|
2615
|
-
scrapeMotionValuesFromProps(
|
|
2616
|
-
return
|
|
2615
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
2616
|
+
return Ie(e, n, s);
|
|
2617
2617
|
}
|
|
2618
2618
|
}
|
|
2619
2619
|
const Go = {
|
|
@@ -2623,10 +2623,10 @@ const Go = {
|
|
|
2623
2623
|
offset: "strokeDashoffset",
|
|
2624
2624
|
array: "strokeDasharray"
|
|
2625
2625
|
};
|
|
2626
|
-
function Ho(
|
|
2627
|
-
|
|
2626
|
+
function Ho(t, e, n = 1, s = 0, i = !0) {
|
|
2627
|
+
t.pathLength = 1;
|
|
2628
2628
|
const r = i ? Go : _o;
|
|
2629
|
-
|
|
2629
|
+
t[r.offset] = `${-s}`, t[r.array] = `${e} ${n}`;
|
|
2630
2630
|
}
|
|
2631
2631
|
const Uo = [
|
|
2632
2632
|
"offsetDistance",
|
|
@@ -2634,8 +2634,8 @@ const Uo = [
|
|
|
2634
2634
|
"offsetRotate",
|
|
2635
2635
|
"offsetAnchor"
|
|
2636
2636
|
];
|
|
2637
|
-
function Ps(
|
|
2638
|
-
attrX:
|
|
2637
|
+
function Ps(t, {
|
|
2638
|
+
attrX: e,
|
|
2639
2639
|
attrY: n,
|
|
2640
2640
|
attrScale: s,
|
|
2641
2641
|
pathLength: i,
|
|
@@ -2644,16 +2644,16 @@ function Ps(e, {
|
|
|
2644
2644
|
// This is object creation, which we try to avoid per-frame.
|
|
2645
2645
|
...a
|
|
2646
2646
|
}, c, l, u) {
|
|
2647
|
-
if (
|
|
2648
|
-
|
|
2647
|
+
if (Re(t, a, l), c) {
|
|
2648
|
+
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2649
2649
|
return;
|
|
2650
2650
|
}
|
|
2651
|
-
|
|
2652
|
-
const { attrs: d, style: f } =
|
|
2651
|
+
t.attrs = t.style, t.style = {};
|
|
2652
|
+
const { attrs: d, style: f } = t;
|
|
2653
2653
|
d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = (u == null ? void 0 : u.transformBox) ?? "fill-box", delete d.transformBox);
|
|
2654
2654
|
for (const h of Uo)
|
|
2655
2655
|
d[h] !== void 0 && (f[h] = d[h], delete d[h]);
|
|
2656
|
-
|
|
2656
|
+
e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), i !== void 0 && Ho(d, i, r, o, !1);
|
|
2657
2657
|
}
|
|
2658
2658
|
const Fs = /* @__PURE__ */ new Set([
|
|
2659
2659
|
"baseFrequency",
|
|
@@ -2679,18 +2679,18 @@ const Fs = /* @__PURE__ */ new Set([
|
|
|
2679
2679
|
"startOffset",
|
|
2680
2680
|
"textLength",
|
|
2681
2681
|
"lengthAdjust"
|
|
2682
|
-
]), Os = (
|
|
2683
|
-
function zo(
|
|
2684
|
-
Ms(
|
|
2685
|
-
for (const i in
|
|
2686
|
-
|
|
2687
|
-
}
|
|
2688
|
-
function Ds(
|
|
2689
|
-
const s =
|
|
2690
|
-
for (const i in
|
|
2691
|
-
if (R(
|
|
2692
|
-
const r =
|
|
2693
|
-
s[r] =
|
|
2682
|
+
]), Os = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2683
|
+
function zo(t, e, n, s) {
|
|
2684
|
+
Ms(t, e, void 0, s);
|
|
2685
|
+
for (const i in e.attrs)
|
|
2686
|
+
t.setAttribute(Fs.has(i) ? i : Pe(i), e.attrs[i]);
|
|
2687
|
+
}
|
|
2688
|
+
function Ds(t, e, n) {
|
|
2689
|
+
const s = Ie(t, e, n);
|
|
2690
|
+
for (const i in t)
|
|
2691
|
+
if (R(t[i]) || R(e[i])) {
|
|
2692
|
+
const r = at.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
2693
|
+
s[r] = t[i];
|
|
2694
2694
|
}
|
|
2695
2695
|
return s;
|
|
2696
2696
|
}
|
|
@@ -2698,64 +2698,64 @@ class Yo extends xs {
|
|
|
2698
2698
|
constructor() {
|
|
2699
2699
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = ws;
|
|
2700
2700
|
}
|
|
2701
|
-
getBaseTargetFromProps(
|
|
2702
|
-
return
|
|
2701
|
+
getBaseTargetFromProps(e, n) {
|
|
2702
|
+
return e[n];
|
|
2703
2703
|
}
|
|
2704
|
-
readValueFromInstance(
|
|
2705
|
-
if (
|
|
2704
|
+
readValueFromInstance(e, n) {
|
|
2705
|
+
if (ut.has(n)) {
|
|
2706
2706
|
const s = gs(n);
|
|
2707
2707
|
return s && s.default || 0;
|
|
2708
2708
|
}
|
|
2709
|
-
return n = Fs.has(n) ? n :
|
|
2709
|
+
return n = Fs.has(n) ? n : Pe(n), e.getAttribute(n);
|
|
2710
2710
|
}
|
|
2711
|
-
scrapeMotionValuesFromProps(
|
|
2712
|
-
return Ds(
|
|
2711
|
+
scrapeMotionValuesFromProps(e, n, s) {
|
|
2712
|
+
return Ds(e, n, s);
|
|
2713
2713
|
}
|
|
2714
|
-
build(
|
|
2715
|
-
Ps(
|
|
2714
|
+
build(e, n, s) {
|
|
2715
|
+
Ps(e, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
2716
2716
|
}
|
|
2717
|
-
renderInstance(
|
|
2718
|
-
zo(
|
|
2717
|
+
renderInstance(e, n, s, i) {
|
|
2718
|
+
zo(e, n, s, i);
|
|
2719
2719
|
}
|
|
2720
|
-
mount(
|
|
2721
|
-
this.isSVGTag = Os(
|
|
2720
|
+
mount(e) {
|
|
2721
|
+
this.isSVGTag = Os(e.tagName), super.mount(e);
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
|
-
const Xo =
|
|
2725
|
-
function Rs(
|
|
2726
|
-
if (!
|
|
2724
|
+
const Xo = De.length;
|
|
2725
|
+
function Rs(t) {
|
|
2726
|
+
if (!t)
|
|
2727
2727
|
return;
|
|
2728
|
-
if (!
|
|
2729
|
-
const n =
|
|
2730
|
-
return
|
|
2728
|
+
if (!t.isControllingVariants) {
|
|
2729
|
+
const n = t.parent ? Rs(t.parent) || {} : {};
|
|
2730
|
+
return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
|
|
2731
2731
|
}
|
|
2732
|
-
const
|
|
2732
|
+
const e = {};
|
|
2733
2733
|
for (let n = 0; n < Xo; n++) {
|
|
2734
|
-
const s =
|
|
2735
|
-
(
|
|
2734
|
+
const s = De[n], i = t.props[s];
|
|
2735
|
+
(gt(i) || i === !1) && (e[s] = i);
|
|
2736
2736
|
}
|
|
2737
|
-
return
|
|
2737
|
+
return e;
|
|
2738
2738
|
}
|
|
2739
|
-
function Is(
|
|
2740
|
-
if (!Array.isArray(
|
|
2739
|
+
function Is(t, e) {
|
|
2740
|
+
if (!Array.isArray(e))
|
|
2741
2741
|
return !1;
|
|
2742
|
-
const n =
|
|
2743
|
-
if (n !==
|
|
2742
|
+
const n = e.length;
|
|
2743
|
+
if (n !== t.length)
|
|
2744
2744
|
return !1;
|
|
2745
2745
|
for (let s = 0; s < n; s++)
|
|
2746
|
-
if (
|
|
2746
|
+
if (e[s] !== t[s])
|
|
2747
2747
|
return !1;
|
|
2748
2748
|
return !0;
|
|
2749
2749
|
}
|
|
2750
|
-
const qo = [...
|
|
2751
|
-
function Jo(
|
|
2752
|
-
return (
|
|
2750
|
+
const qo = [...Oe].reverse(), Zo = Oe.length;
|
|
2751
|
+
function Jo(t) {
|
|
2752
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => Qr(t, n, s)));
|
|
2753
2753
|
}
|
|
2754
|
-
function Qo(
|
|
2755
|
-
let
|
|
2754
|
+
function Qo(t) {
|
|
2755
|
+
let e = Jo(t), n = ln(), s = !0;
|
|
2756
2756
|
const i = (c) => (l, u) => {
|
|
2757
2757
|
var f;
|
|
2758
|
-
const d =
|
|
2758
|
+
const d = nt(t, u, c === "exit" ? (f = t.presenceContext) == null ? void 0 : f.custom : void 0);
|
|
2759
2759
|
if (d) {
|
|
2760
2760
|
const { transition: h, transitionEnd: p, ...b } = d;
|
|
2761
2761
|
l = { ...l, ...b, ...p };
|
|
@@ -2763,19 +2763,19 @@ function Qo(e) {
|
|
|
2763
2763
|
return l;
|
|
2764
2764
|
};
|
|
2765
2765
|
function r(c) {
|
|
2766
|
-
|
|
2766
|
+
e = c(t);
|
|
2767
2767
|
}
|
|
2768
2768
|
function o(c) {
|
|
2769
|
-
const { props: l } =
|
|
2769
|
+
const { props: l } = t, u = Rs(t.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
|
|
2770
2770
|
let h = {}, p = 1 / 0;
|
|
2771
2771
|
for (let y = 0; y < Zo; y++) {
|
|
2772
|
-
const g = qo[y], w = n[g], T = l[g] !== void 0 ? l[g] : u[g], V =
|
|
2772
|
+
const g = qo[y], w = n[g], T = l[g] !== void 0 ? l[g] : u[g], V = gt(T), v = g === c ? w.isActive : null;
|
|
2773
2773
|
v === !1 && (p = y);
|
|
2774
2774
|
let A = T === u[g] && T !== l[g] && V;
|
|
2775
|
-
if (A && s &&
|
|
2775
|
+
if (A && s && t.manuallyAnimateOnMount && (A = !1), w.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
|
|
2776
2776
|
!w.isActive && v === null || // If we didn't and don't have any defined prop for this animation type
|
|
2777
2777
|
!T && !w.prevProp || // Or if the prop doesn't define an animation
|
|
2778
|
-
|
|
2778
|
+
Lt(T) || typeof T == "boolean")
|
|
2779
2779
|
continue;
|
|
2780
2780
|
if (g === "exit" && w.isActive && v !== !0) {
|
|
2781
2781
|
w.prevResolvedValues && (h = {
|
|
@@ -2784,37 +2784,37 @@ function Qo(e) {
|
|
|
2784
2784
|
});
|
|
2785
2785
|
continue;
|
|
2786
2786
|
}
|
|
2787
|
-
const M =
|
|
2787
|
+
const M = ta(w.prevProp, T);
|
|
2788
2788
|
let S = M || // If we're making this variant active, we want to always make it active
|
|
2789
2789
|
g === c && w.isActive && !A && V || // If we removed a higher-priority variant (i is in reverse order)
|
|
2790
2790
|
y > p && V, O = !1;
|
|
2791
2791
|
const D = Array.isArray(T) ? T : [T];
|
|
2792
2792
|
let W = D.reduce(i(g), {});
|
|
2793
2793
|
v === !1 && (W = {});
|
|
2794
|
-
const { prevResolvedValues:
|
|
2795
|
-
...
|
|
2794
|
+
const { prevResolvedValues: wt = {} } = w, St = {
|
|
2795
|
+
...wt,
|
|
2796
2796
|
...W
|
|
2797
|
-
},
|
|
2797
|
+
}, Vt = (F) => {
|
|
2798
2798
|
S = !0, f.has(F) && (O = !0, f.delete(F)), w.needsAnimating[F] = !0;
|
|
2799
|
-
const C =
|
|
2799
|
+
const C = t.getValue(F);
|
|
2800
2800
|
C && (C.liveStyle = !1);
|
|
2801
2801
|
};
|
|
2802
|
-
for (const F in
|
|
2803
|
-
const C = W[F], $ =
|
|
2802
|
+
for (const F in St) {
|
|
2803
|
+
const C = W[F], $ = wt[F];
|
|
2804
2804
|
if (h.hasOwnProperty(F))
|
|
2805
2805
|
continue;
|
|
2806
2806
|
let J = !1;
|
|
2807
|
-
|
|
2807
|
+
ce(C) && ce($) ? J = !Is(C, $) : J = C !== $, J ? C != null ? Vt(F) : f.add(F) : C !== void 0 && f.has(F) ? Vt(F) : w.protectedKeys[F] = !0;
|
|
2808
2808
|
}
|
|
2809
|
-
w.prevProp = T, w.prevResolvedValues = W, w.isActive && (h = { ...h, ...W }), s &&
|
|
2810
|
-
const
|
|
2811
|
-
S && (!
|
|
2809
|
+
w.prevProp = T, w.prevResolvedValues = W, w.isActive && (h = { ...h, ...W }), s && t.blockInitialAnimation && (S = !1);
|
|
2810
|
+
const At = A && M;
|
|
2811
|
+
S && (!At || O) && d.push(...D.map((F) => {
|
|
2812
2812
|
const C = { type: g };
|
|
2813
|
-
if (typeof F == "string" && s && !
|
|
2814
|
-
const { parent: $ } =
|
|
2813
|
+
if (typeof F == "string" && s && !At && t.manuallyAnimateOnMount && t.parent) {
|
|
2814
|
+
const { parent: $ } = t, J = nt($, F);
|
|
2815
2815
|
if ($.enteringChildren && J) {
|
|
2816
2816
|
const { delayChildren: Gs } = J.transition || {};
|
|
2817
|
-
C.delay = as($.enteringChildren,
|
|
2817
|
+
C.delay = as($.enteringChildren, t, Gs);
|
|
2818
2818
|
}
|
|
2819
2819
|
}
|
|
2820
2820
|
return {
|
|
@@ -2826,22 +2826,22 @@ function Qo(e) {
|
|
|
2826
2826
|
if (f.size) {
|
|
2827
2827
|
const y = {};
|
|
2828
2828
|
if (typeof l.initial != "boolean") {
|
|
2829
|
-
const g =
|
|
2829
|
+
const g = nt(t, Array.isArray(l.initial) ? l.initial[0] : l.initial);
|
|
2830
2830
|
g && g.transition && (y.transition = g.transition);
|
|
2831
2831
|
}
|
|
2832
2832
|
f.forEach((g) => {
|
|
2833
|
-
const w =
|
|
2833
|
+
const w = t.getBaseTarget(g), T = t.getValue(g);
|
|
2834
2834
|
T && (T.liveStyle = !0), y[g] = w ?? null;
|
|
2835
2835
|
}), d.push({ animation: y });
|
|
2836
2836
|
}
|
|
2837
2837
|
let b = !!d.length;
|
|
2838
|
-
return s && (l.initial === !1 || l.initial === l.animate) && !
|
|
2838
|
+
return s && (l.initial === !1 || l.initial === l.animate) && !t.manuallyAnimateOnMount && (b = !1), s = !1, b ? e(d) : Promise.resolve();
|
|
2839
2839
|
}
|
|
2840
2840
|
function a(c, l) {
|
|
2841
2841
|
var d;
|
|
2842
2842
|
if (n[c].isActive === l)
|
|
2843
2843
|
return Promise.resolve();
|
|
2844
|
-
(d =
|
|
2844
|
+
(d = t.variantChildren) == null || d.forEach((f) => {
|
|
2845
2845
|
var h;
|
|
2846
2846
|
return (h = f.animationState) == null ? void 0 : h.setActive(c, l);
|
|
2847
2847
|
}), n[c].isActive = l;
|
|
@@ -2860,12 +2860,12 @@ function Qo(e) {
|
|
|
2860
2860
|
}
|
|
2861
2861
|
};
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2864
|
-
return typeof
|
|
2863
|
+
function ta(t, e) {
|
|
2864
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Is(e, t) : !1;
|
|
2865
2865
|
}
|
|
2866
|
-
function z(
|
|
2866
|
+
function z(t = !1) {
|
|
2867
2867
|
return {
|
|
2868
|
-
isActive:
|
|
2868
|
+
isActive: t,
|
|
2869
2869
|
protectedKeys: {},
|
|
2870
2870
|
needsAnimating: {},
|
|
2871
2871
|
prevResolvedValues: {}
|
|
@@ -2882,17 +2882,17 @@ function ln() {
|
|
|
2882
2882
|
exit: z()
|
|
2883
2883
|
};
|
|
2884
2884
|
}
|
|
2885
|
-
function fn(
|
|
2886
|
-
return
|
|
2885
|
+
function fn(t, e, n, s = { passive: !0 }) {
|
|
2886
|
+
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2889
|
-
return R(
|
|
2888
|
+
function ea(t) {
|
|
2889
|
+
return R(t) ? t.get() : t;
|
|
2890
2890
|
}
|
|
2891
|
-
const ks =
|
|
2892
|
-
transformPagePoint: (
|
|
2891
|
+
const ks = it({
|
|
2892
|
+
transformPagePoint: (t) => t,
|
|
2893
2893
|
isStatic: !1,
|
|
2894
2894
|
reducedMotion: "never"
|
|
2895
|
-
}),
|
|
2895
|
+
}), ke = it({ strict: !1 }), dn = {
|
|
2896
2896
|
animation: [
|
|
2897
2897
|
"animate",
|
|
2898
2898
|
"variants",
|
|
@@ -2916,39 +2916,39 @@ let hn = !1;
|
|
|
2916
2916
|
function na() {
|
|
2917
2917
|
if (hn)
|
|
2918
2918
|
return;
|
|
2919
|
-
const
|
|
2920
|
-
for (const
|
|
2921
|
-
e
|
|
2922
|
-
isEnabled: (n) => dn[
|
|
2919
|
+
const t = {};
|
|
2920
|
+
for (const e in dn)
|
|
2921
|
+
t[e] = {
|
|
2922
|
+
isEnabled: (n) => dn[e].some((s) => !!n[s])
|
|
2923
2923
|
};
|
|
2924
|
-
As(
|
|
2924
|
+
As(t), hn = !0;
|
|
2925
2925
|
}
|
|
2926
2926
|
function Es() {
|
|
2927
2927
|
return na(), Do();
|
|
2928
2928
|
}
|
|
2929
|
-
function pn(
|
|
2930
|
-
const
|
|
2931
|
-
for (const n in
|
|
2932
|
-
|
|
2933
|
-
...
|
|
2934
|
-
...
|
|
2929
|
+
function pn(t) {
|
|
2930
|
+
const e = Es();
|
|
2931
|
+
for (const n in t)
|
|
2932
|
+
e[n] = {
|
|
2933
|
+
...e[n],
|
|
2934
|
+
...t[n]
|
|
2935
2935
|
};
|
|
2936
|
-
As(
|
|
2936
|
+
As(e);
|
|
2937
2937
|
}
|
|
2938
|
-
function sa({ children:
|
|
2939
|
-
const [, s] = qs(!
|
|
2940
|
-
if (!
|
|
2941
|
-
const { renderer: r, ...o } =
|
|
2938
|
+
function sa({ children: t, features: e, strict: n = !1 }) {
|
|
2939
|
+
const [, s] = qs(!zt(e)), i = _(void 0);
|
|
2940
|
+
if (!zt(e)) {
|
|
2941
|
+
const { renderer: r, ...o } = e;
|
|
2942
2942
|
i.current = r, pn(o);
|
|
2943
2943
|
}
|
|
2944
|
-
return
|
|
2945
|
-
|
|
2944
|
+
return me(() => {
|
|
2945
|
+
zt(e) && e().then(({ renderer: r, ...o }) => {
|
|
2946
2946
|
pn(o), i.current = r, s(!0);
|
|
2947
2947
|
});
|
|
2948
|
-
}, []), k(
|
|
2948
|
+
}, []), k(ke.Provider, { value: { renderer: i.current, strict: n }, children: t });
|
|
2949
2949
|
}
|
|
2950
|
-
function
|
|
2951
|
-
return typeof
|
|
2950
|
+
function zt(t) {
|
|
2951
|
+
return typeof t == "function";
|
|
2952
2952
|
}
|
|
2953
2953
|
const ia = /* @__PURE__ */ new Set([
|
|
2954
2954
|
"animate",
|
|
@@ -2983,81 +2983,81 @@ const ia = /* @__PURE__ */ new Set([
|
|
|
2983
2983
|
"ignoreStrict",
|
|
2984
2984
|
"viewport"
|
|
2985
2985
|
]);
|
|
2986
|
-
function
|
|
2987
|
-
return
|
|
2986
|
+
function Et(t) {
|
|
2987
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || ia.has(t);
|
|
2988
2988
|
}
|
|
2989
|
-
let Ns = (
|
|
2990
|
-
function ra(
|
|
2991
|
-
typeof
|
|
2989
|
+
let Ns = (t) => !Et(t);
|
|
2990
|
+
function ra(t) {
|
|
2991
|
+
typeof t == "function" && (Ns = (e) => e.startsWith("on") ? !Et(e) : t(e));
|
|
2992
2992
|
}
|
|
2993
2993
|
try {
|
|
2994
2994
|
ra(require("@emotion/is-prop-valid").default);
|
|
2995
2995
|
} catch {
|
|
2996
2996
|
}
|
|
2997
|
-
function oa(
|
|
2997
|
+
function oa(t, e, n) {
|
|
2998
2998
|
const s = {};
|
|
2999
|
-
for (const i in
|
|
3000
|
-
i === "values" && typeof
|
|
3001
|
-
|
|
2999
|
+
for (const i in t)
|
|
3000
|
+
i === "values" && typeof t.values == "object" || (Ns(i) || n === !0 && Et(i) || !e && !Et(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
3001
|
+
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
3002
3002
|
return s;
|
|
3003
3003
|
}
|
|
3004
|
-
const
|
|
3005
|
-
function aa(
|
|
3006
|
-
if (
|
|
3007
|
-
const { initial: n, animate: s } =
|
|
3004
|
+
const Wt = /* @__PURE__ */ it({});
|
|
3005
|
+
function aa(t, e) {
|
|
3006
|
+
if (Kt(t)) {
|
|
3007
|
+
const { initial: n, animate: s } = t;
|
|
3008
3008
|
return {
|
|
3009
|
-
initial: n === !1 ||
|
|
3010
|
-
animate:
|
|
3009
|
+
initial: n === !1 || gt(n) ? n : void 0,
|
|
3010
|
+
animate: gt(s) ? s : void 0
|
|
3011
3011
|
};
|
|
3012
3012
|
}
|
|
3013
|
-
return
|
|
3013
|
+
return t.inherit !== !1 ? e : {};
|
|
3014
3014
|
}
|
|
3015
|
-
function ua(
|
|
3016
|
-
const { initial:
|
|
3017
|
-
return
|
|
3015
|
+
function ua(t) {
|
|
3016
|
+
const { initial: e, animate: n } = aa(t, E(Wt));
|
|
3017
|
+
return Nt(() => ({ initial: e, animate: n }), [mn(e), mn(n)]);
|
|
3018
3018
|
}
|
|
3019
|
-
function mn(
|
|
3020
|
-
return Array.isArray(
|
|
3019
|
+
function mn(t) {
|
|
3020
|
+
return Array.isArray(t) ? t.join(" ") : t;
|
|
3021
3021
|
}
|
|
3022
|
-
const
|
|
3022
|
+
const Ee = () => ({
|
|
3023
3023
|
style: {},
|
|
3024
3024
|
transform: {},
|
|
3025
3025
|
transformOrigin: {},
|
|
3026
3026
|
vars: {}
|
|
3027
3027
|
});
|
|
3028
|
-
function Bs(
|
|
3029
|
-
for (const s in
|
|
3030
|
-
!R(
|
|
3028
|
+
function Bs(t, e, n) {
|
|
3029
|
+
for (const s in e)
|
|
3030
|
+
!R(e[s]) && !Cs(s, n) && (t[s] = e[s]);
|
|
3031
3031
|
}
|
|
3032
|
-
function ca({ transformTemplate:
|
|
3033
|
-
return
|
|
3034
|
-
const n =
|
|
3035
|
-
return
|
|
3036
|
-
}, [
|
|
3032
|
+
function ca({ transformTemplate: t }, e) {
|
|
3033
|
+
return Nt(() => {
|
|
3034
|
+
const n = Ee();
|
|
3035
|
+
return Re(n, e, t), Object.assign({}, n.vars, n.style);
|
|
3036
|
+
}, [e]);
|
|
3037
3037
|
}
|
|
3038
|
-
function la(
|
|
3039
|
-
const n =
|
|
3040
|
-
return Bs(s, n,
|
|
3038
|
+
function la(t, e) {
|
|
3039
|
+
const n = t.style || {}, s = {};
|
|
3040
|
+
return Bs(s, n, t), Object.assign(s, ca(t, e)), s;
|
|
3041
3041
|
}
|
|
3042
|
-
function fa(
|
|
3043
|
-
const n = {}, s = la(
|
|
3044
|
-
return
|
|
3042
|
+
function fa(t, e) {
|
|
3043
|
+
const n = {}, s = la(t, e);
|
|
3044
|
+
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;
|
|
3045
3045
|
}
|
|
3046
3046
|
const Ls = () => ({
|
|
3047
|
-
...
|
|
3047
|
+
...Ee(),
|
|
3048
3048
|
attrs: {}
|
|
3049
3049
|
});
|
|
3050
|
-
function da(
|
|
3051
|
-
const i =
|
|
3050
|
+
function da(t, e, n, s) {
|
|
3051
|
+
const i = Nt(() => {
|
|
3052
3052
|
const r = Ls();
|
|
3053
|
-
return Ps(r,
|
|
3053
|
+
return Ps(r, e, Os(s), t.transformTemplate, t.style), {
|
|
3054
3054
|
...r.attrs,
|
|
3055
3055
|
style: { ...r.style }
|
|
3056
3056
|
};
|
|
3057
|
-
}, [
|
|
3058
|
-
if (
|
|
3057
|
+
}, [e]);
|
|
3058
|
+
if (t.style) {
|
|
3059
3059
|
const r = {};
|
|
3060
|
-
Bs(r,
|
|
3060
|
+
Bs(r, t.style, t), i.style = { ...r, ...i.style };
|
|
3061
3061
|
}
|
|
3062
3062
|
return i;
|
|
3063
3063
|
}
|
|
@@ -3088,53 +3088,53 @@ const ha = [
|
|
|
3088
3088
|
"use",
|
|
3089
3089
|
"view"
|
|
3090
3090
|
];
|
|
3091
|
-
function
|
|
3091
|
+
function Ne(t) {
|
|
3092
3092
|
return (
|
|
3093
3093
|
/**
|
|
3094
3094
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
3095
3095
|
* HTML custom React components.
|
|
3096
3096
|
*/
|
|
3097
|
-
typeof
|
|
3097
|
+
typeof t != "string" || /**
|
|
3098
3098
|
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
3099
3099
|
*/
|
|
3100
|
-
|
|
3100
|
+
t.includes("-") ? !1 : (
|
|
3101
3101
|
/**
|
|
3102
3102
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
3103
3103
|
*/
|
|
3104
|
-
!!(ha.indexOf(
|
|
3104
|
+
!!(ha.indexOf(t) > -1 || /**
|
|
3105
3105
|
* If it contains a capital letter, it's an SVG component
|
|
3106
3106
|
*/
|
|
3107
|
-
/[A-Z]/u.test(
|
|
3107
|
+
/[A-Z]/u.test(t))
|
|
3108
3108
|
)
|
|
3109
3109
|
);
|
|
3110
3110
|
}
|
|
3111
|
-
function pa(
|
|
3112
|
-
const c = (o ??
|
|
3113
|
-
return Zs(
|
|
3111
|
+
function pa(t, e, n, { latestValues: s }, i, r = !1, o) {
|
|
3112
|
+
const c = (o ?? Ne(t) ? da : fa)(e, s, i, t), l = oa(e, typeof t == "string", r), u = t !== vn ? { ...l, ...c, ref: n } : {}, { children: d } = e, f = Nt(() => R(d) ? d.get() : d, [d]);
|
|
3113
|
+
return Zs(t, {
|
|
3114
3114
|
...u,
|
|
3115
3115
|
children: f
|
|
3116
3116
|
});
|
|
3117
3117
|
}
|
|
3118
|
-
function ma({ scrapeMotionValuesFromProps:
|
|
3118
|
+
function ma({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
3119
3119
|
return {
|
|
3120
|
-
latestValues: ga(n, s, i,
|
|
3121
|
-
renderState:
|
|
3120
|
+
latestValues: ga(n, s, i, t),
|
|
3121
|
+
renderState: e()
|
|
3122
3122
|
};
|
|
3123
3123
|
}
|
|
3124
|
-
function ga(
|
|
3125
|
-
const i = {}, r = s(
|
|
3124
|
+
function ga(t, e, n, s) {
|
|
3125
|
+
const i = {}, r = s(t, {});
|
|
3126
3126
|
for (const f in r)
|
|
3127
|
-
i[f] =
|
|
3128
|
-
let { initial: o, animate: a } =
|
|
3129
|
-
const c =
|
|
3130
|
-
|
|
3127
|
+
i[f] = ea(r[f]);
|
|
3128
|
+
let { initial: o, animate: a } = t;
|
|
3129
|
+
const c = Kt(t), l = Ss(t);
|
|
3130
|
+
e && l && !c && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
|
|
3131
3131
|
let u = n ? n.initial === !1 : !1;
|
|
3132
3132
|
u = u || o === !1;
|
|
3133
3133
|
const d = u ? a : o;
|
|
3134
|
-
if (d && typeof d != "boolean" && !
|
|
3134
|
+
if (d && typeof d != "boolean" && !Lt(d)) {
|
|
3135
3135
|
const f = Array.isArray(d) ? d : [d];
|
|
3136
3136
|
for (let h = 0; h < f.length; h++) {
|
|
3137
|
-
const p =
|
|
3137
|
+
const p = Ce(t, f[h]);
|
|
3138
3138
|
if (p) {
|
|
3139
3139
|
const { transitionEnd: b, transition: y, ...g } = p;
|
|
3140
3140
|
for (const w in g) {
|
|
@@ -3152,17 +3152,17 @@ function ga(e, t, n, s) {
|
|
|
3152
3152
|
}
|
|
3153
3153
|
return i;
|
|
3154
3154
|
}
|
|
3155
|
-
const Ks = (
|
|
3156
|
-
const s = E(
|
|
3157
|
-
return n ? r() :
|
|
3155
|
+
const Ks = (t) => (e, n) => {
|
|
3156
|
+
const s = E(Wt), i = E(Vn), r = () => ma(t, e, s, i);
|
|
3157
|
+
return n ? r() : ei(r);
|
|
3158
3158
|
}, ya = /* @__PURE__ */ Ks({
|
|
3159
|
-
scrapeMotionValuesFromProps:
|
|
3160
|
-
createRenderState:
|
|
3159
|
+
scrapeMotionValuesFromProps: Ie,
|
|
3160
|
+
createRenderState: Ee
|
|
3161
3161
|
}), ba = /* @__PURE__ */ Ks({
|
|
3162
3162
|
scrapeMotionValuesFromProps: Ds,
|
|
3163
3163
|
createRenderState: Ls
|
|
3164
3164
|
}), Ta = Symbol.for("motionComponentSymbol");
|
|
3165
|
-
function va(
|
|
3165
|
+
function va(t, e, n) {
|
|
3166
3166
|
const s = _(n);
|
|
3167
3167
|
wn(() => {
|
|
3168
3168
|
s.current = n;
|
|
@@ -3170,7 +3170,7 @@ function va(e, t, n) {
|
|
|
3170
3170
|
const i = _(null);
|
|
3171
3171
|
return Js((r) => {
|
|
3172
3172
|
var a;
|
|
3173
|
-
r && ((a =
|
|
3173
|
+
r && ((a = t.onMount) == null || a.call(t, r)), e && (r ? e.mount(r) : e.unmount());
|
|
3174
3174
|
const o = s.current;
|
|
3175
3175
|
if (typeof o == "function")
|
|
3176
3176
|
if (r) {
|
|
@@ -3178,17 +3178,17 @@ function va(e, t, n) {
|
|
|
3178
3178
|
typeof c == "function" && (i.current = c);
|
|
3179
3179
|
} else i.current ? (i.current(), i.current = null) : o(r);
|
|
3180
3180
|
else o && (o.current = r);
|
|
3181
|
-
}, [
|
|
3181
|
+
}, [e]);
|
|
3182
3182
|
}
|
|
3183
|
-
const wa =
|
|
3184
|
-
function Sa(
|
|
3185
|
-
return
|
|
3183
|
+
const wa = it({});
|
|
3184
|
+
function Sa(t) {
|
|
3185
|
+
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
3186
3186
|
}
|
|
3187
|
-
function Va(
|
|
3187
|
+
function Va(t, e, n, s, i, r) {
|
|
3188
3188
|
var T, V;
|
|
3189
|
-
const { visualElement: o } = E(
|
|
3190
|
-
s = s || a.renderer, !f.current && s && (f.current = s(
|
|
3191
|
-
visualState:
|
|
3189
|
+
const { visualElement: o } = E(Wt), a = E(ke), c = E(Vn), l = E(ks), u = l.reducedMotion, d = l.skipAnimations, f = _(null), h = _(!1);
|
|
3190
|
+
s = s || a.renderer, !f.current && s && (f.current = s(t, {
|
|
3191
|
+
visualState: e,
|
|
3192
3192
|
parent: o,
|
|
3193
3193
|
props: n,
|
|
3194
3194
|
presenceContext: c,
|
|
@@ -3206,20 +3206,20 @@ function Va(e, t, n, s, i, r) {
|
|
|
3206
3206
|
const g = n[ds], w = _(!!g && !((T = window.MotionHandoffIsComplete) != null && T.call(window, g)) && ((V = window.MotionHasOptimisedAnimation) == null ? void 0 : V.call(window, g)));
|
|
3207
3207
|
return ni(() => {
|
|
3208
3208
|
h.current = !0, p && (y.current = !0, window.MotionIsMounted = !0, p.updateFeatures(), p.scheduleRenderMicrotask(), w.current && p.animationState && p.animationState.animateChanges());
|
|
3209
|
-
}),
|
|
3209
|
+
}), me(() => {
|
|
3210
3210
|
p && (!w.current && p.animationState && p.animationState.animateChanges(), w.current && (queueMicrotask(() => {
|
|
3211
3211
|
var v;
|
|
3212
3212
|
(v = window.MotionHandoffMarkAsComplete) == null || v.call(window, g);
|
|
3213
3213
|
}), w.current = !1), p.enteringChildren = void 0);
|
|
3214
3214
|
}), p;
|
|
3215
3215
|
}
|
|
3216
|
-
function Aa(
|
|
3217
|
-
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: l, layoutCrossfade: u } =
|
|
3218
|
-
|
|
3216
|
+
function Aa(t, e, n, s) {
|
|
3217
|
+
const { layoutId: i, layout: r, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: l, layoutCrossfade: u } = e;
|
|
3218
|
+
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Ws(t.parent)), t.projection.setOptions({
|
|
3219
3219
|
layoutId: i,
|
|
3220
3220
|
layout: r,
|
|
3221
3221
|
alwaysMeasureLayout: !!o || a && Sa(a),
|
|
3222
|
-
visualElement:
|
|
3222
|
+
visualElement: t,
|
|
3223
3223
|
/**
|
|
3224
3224
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
3225
3225
|
* to update by the time layout animations run.
|
|
@@ -3234,12 +3234,12 @@ function Aa(e, t, n, s) {
|
|
|
3234
3234
|
layoutRoot: l
|
|
3235
3235
|
});
|
|
3236
3236
|
}
|
|
3237
|
-
function Ws(
|
|
3238
|
-
if (
|
|
3239
|
-
return
|
|
3237
|
+
function Ws(t) {
|
|
3238
|
+
if (t)
|
|
3239
|
+
return t.options.allowProjection !== !1 ? t.projection : Ws(t.parent);
|
|
3240
3240
|
}
|
|
3241
|
-
function xa(
|
|
3242
|
-
const r = n ? n === "svg" :
|
|
3241
|
+
function xa(t, { forwardMotionProps: e = !1, type: n } = {}, s, i) {
|
|
3242
|
+
const r = n ? n === "svg" : Ne(t), o = r ? ba : ya;
|
|
3243
3243
|
function a(l, u) {
|
|
3244
3244
|
let d;
|
|
3245
3245
|
const f = {
|
|
@@ -3250,46 +3250,46 @@ function xa(e, { forwardMotionProps: t = !1, type: n } = {}, s, i) {
|
|
|
3250
3250
|
if (!h && Sn) {
|
|
3251
3251
|
Ca(f, s);
|
|
3252
3252
|
const y = Pa(f);
|
|
3253
|
-
d = y.MeasureLayout, p.visualElement = Va(
|
|
3253
|
+
d = y.MeasureLayout, p.visualElement = Va(t, b, f, i, y.ProjectionNode, r);
|
|
3254
3254
|
}
|
|
3255
|
-
return Tn(
|
|
3255
|
+
return Tn(Wt.Provider, { value: p, children: [d && p.visualElement ? k(d, { visualElement: p.visualElement, ...f }) : null, pa(t, l, va(b, p.visualElement, u), b, h, e, r)] });
|
|
3256
3256
|
}
|
|
3257
|
-
a.displayName = `motion.${typeof
|
|
3257
|
+
a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
3258
3258
|
const c = Qs(a);
|
|
3259
|
-
return c[Ta] =
|
|
3259
|
+
return c[Ta] = t, c;
|
|
3260
3260
|
}
|
|
3261
|
-
function Ma({ layoutId:
|
|
3262
|
-
const
|
|
3263
|
-
return
|
|
3261
|
+
function Ma({ layoutId: t }) {
|
|
3262
|
+
const e = E(ti).id;
|
|
3263
|
+
return e && t !== void 0 ? e + "-" + t : t;
|
|
3264
3264
|
}
|
|
3265
|
-
function Ca(
|
|
3266
|
-
E(
|
|
3265
|
+
function Ca(t, e) {
|
|
3266
|
+
E(ke).strict, process.env.NODE_ENV;
|
|
3267
3267
|
}
|
|
3268
|
-
function Pa(
|
|
3269
|
-
const
|
|
3268
|
+
function Pa(t) {
|
|
3269
|
+
const e = Es(), { drag: n, layout: s } = e;
|
|
3270
3270
|
if (!n && !s)
|
|
3271
3271
|
return {};
|
|
3272
3272
|
const i = { ...n, ...s };
|
|
3273
3273
|
return {
|
|
3274
|
-
MeasureLayout: n != null && n.isEnabled(
|
|
3274
|
+
MeasureLayout: n != null && n.isEnabled(t) || s != null && s.isEnabled(t) ? i.MeasureLayout : void 0,
|
|
3275
3275
|
ProjectionNode: i.ProjectionNode
|
|
3276
3276
|
};
|
|
3277
3277
|
}
|
|
3278
|
-
const Fa = (
|
|
3279
|
-
allowProjection:
|
|
3278
|
+
const Fa = (t, e) => e.isSVG ?? Ne(t) ? new Yo(e) : new jo(e, {
|
|
3279
|
+
allowProjection: t !== vn
|
|
3280
3280
|
});
|
|
3281
|
-
class Oa extends
|
|
3281
|
+
class Oa extends ct {
|
|
3282
3282
|
/**
|
|
3283
3283
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3284
3284
|
* to the underlying animation library. We only want to load that if we load this,
|
|
3285
3285
|
* so people can optionally code split it out using the `m` component.
|
|
3286
3286
|
*/
|
|
3287
|
-
constructor(
|
|
3288
|
-
super(
|
|
3287
|
+
constructor(e) {
|
|
3288
|
+
super(e), e.animationState || (e.animationState = Qo(e));
|
|
3289
3289
|
}
|
|
3290
3290
|
updateAnimationControlsSubscription() {
|
|
3291
|
-
const { animate:
|
|
3292
|
-
|
|
3291
|
+
const { animate: e } = this.node.getProps();
|
|
3292
|
+
Lt(e) && (this.unmountControls = e.subscribe(this.node));
|
|
3293
3293
|
}
|
|
3294
3294
|
/**
|
|
3295
3295
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -3298,33 +3298,33 @@ class Oa extends ce {
|
|
|
3298
3298
|
this.updateAnimationControlsSubscription();
|
|
3299
3299
|
}
|
|
3300
3300
|
update() {
|
|
3301
|
-
const { animate:
|
|
3302
|
-
|
|
3301
|
+
const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
|
|
3302
|
+
e !== n && this.updateAnimationControlsSubscription();
|
|
3303
3303
|
}
|
|
3304
3304
|
unmount() {
|
|
3305
|
-
var
|
|
3306
|
-
this.node.animationState.reset(), (
|
|
3305
|
+
var e;
|
|
3306
|
+
this.node.animationState.reset(), (e = this.unmountControls) == null || e.call(this);
|
|
3307
3307
|
}
|
|
3308
3308
|
}
|
|
3309
3309
|
let Da = 0;
|
|
3310
|
-
class Ra extends
|
|
3310
|
+
class Ra extends ct {
|
|
3311
3311
|
constructor() {
|
|
3312
3312
|
super(...arguments), this.id = Da++;
|
|
3313
3313
|
}
|
|
3314
3314
|
update() {
|
|
3315
3315
|
if (!this.node.presenceContext)
|
|
3316
3316
|
return;
|
|
3317
|
-
const { isPresent:
|
|
3318
|
-
if (!this.node.animationState ||
|
|
3317
|
+
const { isPresent: e, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
|
|
3318
|
+
if (!this.node.animationState || e === s)
|
|
3319
3319
|
return;
|
|
3320
|
-
const i = this.node.animationState.setActive("exit", !
|
|
3321
|
-
n && !
|
|
3320
|
+
const i = this.node.animationState.setActive("exit", !e);
|
|
3321
|
+
n && !e && i.then(() => {
|
|
3322
3322
|
n(this.id);
|
|
3323
3323
|
});
|
|
3324
3324
|
}
|
|
3325
3325
|
mount() {
|
|
3326
|
-
const { register:
|
|
3327
|
-
n && n(this.id),
|
|
3326
|
+
const { register: e, onExitComplete: n } = this.node.presenceContext || {};
|
|
3327
|
+
n && n(this.id), e && (this.unmount = e(this.id));
|
|
3328
3328
|
}
|
|
3329
3329
|
unmount() {
|
|
3330
3330
|
}
|
|
@@ -3337,65 +3337,65 @@ const Ia = {
|
|
|
3337
3337
|
Feature: Ra
|
|
3338
3338
|
}
|
|
3339
3339
|
};
|
|
3340
|
-
function $s(
|
|
3340
|
+
function $s(t) {
|
|
3341
3341
|
return {
|
|
3342
3342
|
point: {
|
|
3343
|
-
x:
|
|
3344
|
-
y:
|
|
3343
|
+
x: t.pageX,
|
|
3344
|
+
y: t.pageY
|
|
3345
3345
|
}
|
|
3346
3346
|
};
|
|
3347
3347
|
}
|
|
3348
|
-
function gn(
|
|
3349
|
-
const { props: s } =
|
|
3350
|
-
|
|
3348
|
+
function gn(t, e, n) {
|
|
3349
|
+
const { props: s } = t;
|
|
3350
|
+
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
3351
3351
|
const i = "onHover" + n, r = s[i];
|
|
3352
|
-
r && L.postRender(() => r(
|
|
3352
|
+
r && L.postRender(() => r(e, $s(e)));
|
|
3353
3353
|
}
|
|
3354
|
-
class ka extends
|
|
3354
|
+
class ka extends ct {
|
|
3355
3355
|
mount() {
|
|
3356
|
-
const { current:
|
|
3357
|
-
|
|
3356
|
+
const { current: e } = this.node;
|
|
3357
|
+
e && (this.unmount = To(e, (n, s) => (gn(this.node, s, "Start"), (i) => gn(this.node, i, "End"))));
|
|
3358
3358
|
}
|
|
3359
3359
|
unmount() {
|
|
3360
3360
|
}
|
|
3361
3361
|
}
|
|
3362
|
-
class Ea extends
|
|
3362
|
+
class Ea extends ct {
|
|
3363
3363
|
constructor() {
|
|
3364
3364
|
super(...arguments), this.isActive = !1;
|
|
3365
3365
|
}
|
|
3366
3366
|
onFocus() {
|
|
3367
|
-
let
|
|
3367
|
+
let e = !1;
|
|
3368
3368
|
try {
|
|
3369
|
-
|
|
3369
|
+
e = this.node.current.matches(":focus-visible");
|
|
3370
3370
|
} catch {
|
|
3371
|
-
|
|
3371
|
+
e = !0;
|
|
3372
3372
|
}
|
|
3373
|
-
!
|
|
3373
|
+
!e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
3374
3374
|
}
|
|
3375
3375
|
onBlur() {
|
|
3376
3376
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
3377
3377
|
}
|
|
3378
3378
|
mount() {
|
|
3379
|
-
this.unmount =
|
|
3379
|
+
this.unmount = Bt(fn(this.node.current, "focus", () => this.onFocus()), fn(this.node.current, "blur", () => this.onBlur()));
|
|
3380
3380
|
}
|
|
3381
3381
|
unmount() {
|
|
3382
3382
|
}
|
|
3383
3383
|
}
|
|
3384
|
-
function yn(
|
|
3385
|
-
const { props: s } =
|
|
3386
|
-
if (
|
|
3384
|
+
function yn(t, e, n) {
|
|
3385
|
+
const { props: s } = t;
|
|
3386
|
+
if (t.current instanceof HTMLButtonElement && t.current.disabled)
|
|
3387
3387
|
return;
|
|
3388
|
-
|
|
3388
|
+
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
3389
3389
|
const i = "onTap" + (n === "End" ? "" : n), r = s[i];
|
|
3390
|
-
r && L.postRender(() => r(
|
|
3390
|
+
r && L.postRender(() => r(e, $s(e)));
|
|
3391
3391
|
}
|
|
3392
|
-
class Na extends
|
|
3392
|
+
class Na extends ct {
|
|
3393
3393
|
mount() {
|
|
3394
|
-
const { current:
|
|
3395
|
-
if (!
|
|
3394
|
+
const { current: e } = this.node;
|
|
3395
|
+
if (!e)
|
|
3396
3396
|
return;
|
|
3397
3397
|
const { globalTapTarget: n, propagate: s } = this.node.props;
|
|
3398
|
-
this.unmount = Ao(
|
|
3398
|
+
this.unmount = Ao(e, (i, r) => (yn(this.node, r, "Start"), (o, { success: a }) => yn(this.node, o, a ? "End" : "Cancel")), {
|
|
3399
3399
|
useGlobalTarget: n,
|
|
3400
3400
|
stopPropagation: (s == null ? void 0 : s.tap) === !1
|
|
3401
3401
|
});
|
|
@@ -3403,35 +3403,35 @@ class Na extends ce {
|
|
|
3403
3403
|
unmount() {
|
|
3404
3404
|
}
|
|
3405
3405
|
}
|
|
3406
|
-
const
|
|
3407
|
-
const
|
|
3408
|
-
|
|
3409
|
-
}, La = (
|
|
3410
|
-
|
|
3406
|
+
const pe = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Ba = (t) => {
|
|
3407
|
+
const e = pe.get(t.target);
|
|
3408
|
+
e && e(t);
|
|
3409
|
+
}, La = (t) => {
|
|
3410
|
+
t.forEach(Ba);
|
|
3411
3411
|
};
|
|
3412
|
-
function Ka({ root:
|
|
3413
|
-
const n =
|
|
3414
|
-
|
|
3415
|
-
const s =
|
|
3416
|
-
return s[i] || (s[i] = new IntersectionObserver(La, { root:
|
|
3417
|
-
}
|
|
3418
|
-
function Wa(
|
|
3419
|
-
const s = Ka(
|
|
3420
|
-
return
|
|
3421
|
-
|
|
3412
|
+
function Ka({ root: t, ...e }) {
|
|
3413
|
+
const n = t || document;
|
|
3414
|
+
Yt.has(n) || Yt.set(n, {});
|
|
3415
|
+
const s = Yt.get(n), i = JSON.stringify(e);
|
|
3416
|
+
return s[i] || (s[i] = new IntersectionObserver(La, { root: t, ...e })), s[i];
|
|
3417
|
+
}
|
|
3418
|
+
function Wa(t, e, n) {
|
|
3419
|
+
const s = Ka(e);
|
|
3420
|
+
return pe.set(t, n), s.observe(t), () => {
|
|
3421
|
+
pe.delete(t), s.unobserve(t);
|
|
3422
3422
|
};
|
|
3423
3423
|
}
|
|
3424
3424
|
const $a = {
|
|
3425
3425
|
some: 0,
|
|
3426
3426
|
all: 1
|
|
3427
3427
|
};
|
|
3428
|
-
class ja extends
|
|
3428
|
+
class ja extends ct {
|
|
3429
3429
|
constructor() {
|
|
3430
3430
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
3431
3431
|
}
|
|
3432
3432
|
startObserver() {
|
|
3433
3433
|
this.unmount();
|
|
3434
|
-
const { viewport:
|
|
3434
|
+
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
|
|
3435
3435
|
root: n ? n.current : void 0,
|
|
3436
3436
|
rootMargin: s,
|
|
3437
3437
|
threshold: typeof i == "number" ? i : $a[i]
|
|
@@ -3451,14 +3451,14 @@ class ja extends ce {
|
|
|
3451
3451
|
update() {
|
|
3452
3452
|
if (typeof IntersectionObserver > "u")
|
|
3453
3453
|
return;
|
|
3454
|
-
const { props:
|
|
3455
|
-
["amount", "margin", "root"].some(Ga(
|
|
3454
|
+
const { props: e, prevProps: n } = this.node;
|
|
3455
|
+
["amount", "margin", "root"].some(Ga(e, n)) && this.startObserver();
|
|
3456
3456
|
}
|
|
3457
3457
|
unmount() {
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
|
-
function Ga({ viewport:
|
|
3461
|
-
return (n) =>
|
|
3460
|
+
function Ga({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
3461
|
+
return (n) => t[n] !== e[n];
|
|
3462
3462
|
}
|
|
3463
3463
|
const _a = {
|
|
3464
3464
|
inView: {
|
|
@@ -3478,38 +3478,37 @@ const _a = {
|
|
|
3478
3478
|
...Ia,
|
|
3479
3479
|
..._a
|
|
3480
3480
|
};
|
|
3481
|
-
function Ua(
|
|
3482
|
-
return xa(
|
|
3481
|
+
function Ua(t, e) {
|
|
3482
|
+
return xa(t, e);
|
|
3483
3483
|
}
|
|
3484
3484
|
const za = /* @__PURE__ */ Ua("div"), Ya = {
|
|
3485
3485
|
light: {
|
|
3486
|
-
border: "px",
|
|
3487
3486
|
shadow: "2"
|
|
3488
3487
|
},
|
|
3489
3488
|
dark: {}
|
|
3490
|
-
}, js =
|
|
3489
|
+
}, js = st.createContext({
|
|
3491
3490
|
groupOpen: !1,
|
|
3492
3491
|
setGroupOpen: () => {
|
|
3493
3492
|
}
|
|
3494
|
-
}), Xa = ({ open:
|
|
3495
|
-
const n =
|
|
3496
|
-
return
|
|
3493
|
+
}), Xa = ({ open: t, delay: e = 600 }) => {
|
|
3494
|
+
const n = st.useContext(js);
|
|
3495
|
+
return st.useEffect(() => {
|
|
3497
3496
|
let s = null;
|
|
3498
|
-
return n.setGroupOpen && (
|
|
3497
|
+
return n.setGroupOpen && (t === !0 && n.setGroupOpen(!0), t === !1 && (s = setTimeout(() => {
|
|
3499
3498
|
n.setGroupOpen && n.setGroupOpen(!1);
|
|
3500
|
-
},
|
|
3499
|
+
}, e))), () => {
|
|
3501
3500
|
s && clearTimeout(s);
|
|
3502
3501
|
};
|
|
3503
|
-
}, [
|
|
3502
|
+
}, [t, n, e]), {
|
|
3504
3503
|
groupOpen: n.groupOpen
|
|
3505
3504
|
};
|
|
3506
|
-
}, su = ({ children:
|
|
3507
|
-
const [
|
|
3508
|
-
return /* @__PURE__ */ k(js.Provider, { value: { groupOpen:
|
|
3505
|
+
}, su = ({ children: t }) => {
|
|
3506
|
+
const [e, n] = st.useState(!1);
|
|
3507
|
+
return /* @__PURE__ */ k(js.Provider, { value: { groupOpen: e, setGroupOpen: n }, children: t });
|
|
3509
3508
|
}, iu = ({
|
|
3510
3509
|
// Radix Tooltip Provider Props
|
|
3511
|
-
delayDuration:
|
|
3512
|
-
skipDelayDuration:
|
|
3510
|
+
delayDuration: t = 400,
|
|
3511
|
+
skipDelayDuration: e,
|
|
3513
3512
|
disableHoverableContent: n,
|
|
3514
3513
|
// Radix Tooltip Root Props
|
|
3515
3514
|
defaultOpen: s,
|
|
@@ -3540,13 +3539,13 @@ const za = /* @__PURE__ */ Ua("div"), Ya = {
|
|
|
3540
3539
|
triggerRef: O,
|
|
3541
3540
|
children: D
|
|
3542
3541
|
}) => {
|
|
3543
|
-
const [W,
|
|
3542
|
+
const [W, wt] = _s({
|
|
3544
3543
|
prop: i,
|
|
3545
3544
|
onChange: r,
|
|
3546
3545
|
defaultProp: s ?? !1
|
|
3547
|
-
}), { groupOpen:
|
|
3548
|
-
(C) =>
|
|
3549
|
-
),
|
|
3546
|
+
}), { groupOpen: St } = Xa({ open: !!W, delay: t }), Vt = st.Children.toArray(D).some(
|
|
3547
|
+
(C) => st.isValidElement(C) ? C.props.disabled : !1
|
|
3548
|
+
), At = St || Vt ? 0 : t, Be = !St, F = (C) => {
|
|
3550
3549
|
if (C === "top")
|
|
3551
3550
|
return {
|
|
3552
3551
|
y: -5
|
|
@@ -3565,20 +3564,20 @@ const za = /* @__PURE__ */ Ua("div"), Ya = {
|
|
|
3565
3564
|
};
|
|
3566
3565
|
};
|
|
3567
3566
|
return /* @__PURE__ */ k(sa, { features: Ha, children: /* @__PURE__ */ k(
|
|
3568
|
-
|
|
3567
|
+
lt.Provider,
|
|
3569
3568
|
{
|
|
3570
|
-
delayDuration:
|
|
3571
|
-
skipDelayDuration:
|
|
3569
|
+
delayDuration: At,
|
|
3570
|
+
skipDelayDuration: e,
|
|
3572
3571
|
disableHoverableContent: n,
|
|
3573
3572
|
children: /* @__PURE__ */ Tn(
|
|
3574
|
-
|
|
3573
|
+
lt.Root,
|
|
3575
3574
|
{
|
|
3576
3575
|
open: M === !1 ? !1 : W,
|
|
3577
|
-
onOpenChange:
|
|
3576
|
+
onOpenChange: wt,
|
|
3578
3577
|
children: [
|
|
3579
|
-
/* @__PURE__ */ k(
|
|
3580
|
-
/* @__PURE__ */ k(
|
|
3581
|
-
|
|
3578
|
+
/* @__PURE__ */ k(lt.Trigger, { asChild: !0, ref: O, children: /* @__PURE__ */ k(Us, { children: D }) }),
|
|
3579
|
+
/* @__PURE__ */ k(lt.Portal, { children: /* @__PURE__ */ k(
|
|
3580
|
+
lt.Content,
|
|
3582
3581
|
{
|
|
3583
3582
|
"aria-label": o,
|
|
3584
3583
|
onEscapeKeyDown: a,
|
|
@@ -3602,7 +3601,7 @@ const za = /* @__PURE__ */ Ua("div"), Ya = {
|
|
|
3602
3601
|
{
|
|
3603
3602
|
as: za,
|
|
3604
3603
|
className: "tgph",
|
|
3605
|
-
initial:
|
|
3604
|
+
initial: Be && !V ? {
|
|
3606
3605
|
opacity: 0,
|
|
3607
3606
|
scale: 0.5,
|
|
3608
3607
|
...F(u)
|