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