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