@acrool/react-picker 0.0.3-alpha.2 → 0.0.3-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acrool-react-picker.es.js +916 -919
- package/dist/style.css +1 -1
- package/dist/utils.d.ts +0 -5
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as Dn from "react";
|
|
2
|
-
import Mn, { createContext as
|
|
2
|
+
import Mn, { createContext as Vt, useContext as U, useLayoutEffect as ta, useEffect as ut, useRef as nt, useInsertionEffect as Zs, useCallback as mt, useMemo as Et, forwardRef as Ee, Fragment as Js, createElement as ea, useId as kn, Component as na, Children as ia, isValidElement as sa, useState as Nt } from "react";
|
|
3
3
|
import ra from "react-dom";
|
|
4
4
|
var Ot = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Tab = "Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t))(Ot || {});
|
|
5
|
-
const
|
|
5
|
+
const ce = [
|
|
6
6
|
"color: #fff",
|
|
7
7
|
"display: inline-block",
|
|
8
8
|
"font-size: 11px",
|
|
9
9
|
"line-height: 20px",
|
|
10
10
|
"padding-right: 8px",
|
|
11
11
|
"border-radius: 4px"
|
|
12
|
-
],
|
|
12
|
+
], ue = {
|
|
13
13
|
primary: "#0055a9",
|
|
14
14
|
success: "#009422",
|
|
15
15
|
info: "#17a2b8",
|
|
@@ -20,32 +20,32 @@ function fe(t, e, ...n) {
|
|
|
20
20
|
console.log(`%c ${t}`, e, ...n);
|
|
21
21
|
}
|
|
22
22
|
function oa(t, ...e) {
|
|
23
|
-
const n =
|
|
24
|
-
`background-color: ${
|
|
23
|
+
const n = ce.concat([
|
|
24
|
+
`background-color: ${ue.primary}`
|
|
25
25
|
]).join(";");
|
|
26
26
|
fe(t, n, ...e);
|
|
27
27
|
}
|
|
28
28
|
function aa(t, ...e) {
|
|
29
|
-
const n =
|
|
30
|
-
`background-color: ${
|
|
29
|
+
const n = ce.concat([
|
|
30
|
+
`background-color: ${ue.success}`
|
|
31
31
|
]).join(";");
|
|
32
32
|
fe(t, n, ...e);
|
|
33
33
|
}
|
|
34
34
|
function la(t, ...e) {
|
|
35
|
-
const n =
|
|
36
|
-
`background-color: ${
|
|
35
|
+
const n = ce.concat([
|
|
36
|
+
`background-color: ${ue.info}`
|
|
37
37
|
]).join(";");
|
|
38
38
|
fe(t, n, ...e);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const n =
|
|
42
|
-
`background-color: ${
|
|
40
|
+
function ca(t, ...e) {
|
|
41
|
+
const n = ce.concat([
|
|
42
|
+
`background-color: ${ue.warning}`
|
|
43
43
|
]).join(";");
|
|
44
44
|
fe(t, n, ...e);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const n =
|
|
48
|
-
`background-color: ${
|
|
46
|
+
function ua(t, ...e) {
|
|
47
|
+
const n = ce.concat([
|
|
48
|
+
`background-color: ${ue.danger}`
|
|
49
49
|
]).join(";");
|
|
50
50
|
fe(t, n, ...e);
|
|
51
51
|
}
|
|
@@ -53,9 +53,9 @@ const wt = {
|
|
|
53
53
|
primary: oa,
|
|
54
54
|
success: aa,
|
|
55
55
|
info: la,
|
|
56
|
-
warning:
|
|
57
|
-
danger:
|
|
58
|
-
}, Ln =
|
|
56
|
+
warning: ca,
|
|
57
|
+
danger: ua
|
|
58
|
+
}, Ln = Vt({
|
|
59
59
|
hide: () => wt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
60
60
|
show: () => wt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
61
61
|
toggle: () => wt.warning("No toggle method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
@@ -75,21 +75,21 @@ var pn = { exports: {} }, Yt = {};
|
|
|
75
75
|
* This source code is licensed under the MIT license found in the
|
|
76
76
|
* LICENSE file in the root directory of this source tree.
|
|
77
77
|
*/
|
|
78
|
-
var
|
|
78
|
+
var Vi;
|
|
79
79
|
function fa() {
|
|
80
|
-
if (
|
|
80
|
+
if (Vi)
|
|
81
81
|
return Yt;
|
|
82
|
-
|
|
82
|
+
Vi = 1;
|
|
83
83
|
var t = Mn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
84
|
-
function r(a, l,
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
for (
|
|
88
|
-
i.call(l,
|
|
84
|
+
function r(a, l, c) {
|
|
85
|
+
var u, f = {}, d = null, p = null;
|
|
86
|
+
c !== void 0 && (d = "" + c), l.key !== void 0 && (d = "" + l.key), l.ref !== void 0 && (p = l.ref);
|
|
87
|
+
for (u in l)
|
|
88
|
+
i.call(l, u) && !o.hasOwnProperty(u) && (f[u] = l[u]);
|
|
89
89
|
if (a && a.defaultProps)
|
|
90
|
-
for (
|
|
91
|
-
|
|
92
|
-
return { $$typeof: e, type: a, key: d, ref: p, props:
|
|
90
|
+
for (u in l = a.defaultProps, l)
|
|
91
|
+
f[u] === void 0 && (f[u] = l[u]);
|
|
92
|
+
return { $$typeof: e, type: a, key: d, ref: p, props: f, _owner: s.current };
|
|
93
93
|
}
|
|
94
94
|
return Yt.Fragment = n, Yt.jsx = r, Yt.jsxs = r, Yt;
|
|
95
95
|
}
|
|
@@ -106,58 +106,58 @@ var Xt = {};
|
|
|
106
106
|
var Di;
|
|
107
107
|
function ha() {
|
|
108
108
|
return Di || (Di = 1, process.env.NODE_ENV !== "production" && function() {
|
|
109
|
-
var t = Mn, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"),
|
|
110
|
-
function b(
|
|
111
|
-
if (
|
|
109
|
+
var t = Mn, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, P = "@@iterator";
|
|
110
|
+
function b(h) {
|
|
111
|
+
if (h === null || typeof h != "object")
|
|
112
112
|
return null;
|
|
113
|
-
var m = g &&
|
|
113
|
+
var m = g && h[g] || h[P];
|
|
114
114
|
return typeof m == "function" ? m : null;
|
|
115
115
|
}
|
|
116
116
|
var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
117
|
-
function y(
|
|
117
|
+
function y(h) {
|
|
118
118
|
{
|
|
119
119
|
for (var m = arguments.length, T = new Array(m > 1 ? m - 1 : 0), A = 1; A < m; A++)
|
|
120
120
|
T[A - 1] = arguments[A];
|
|
121
|
-
v("error",
|
|
121
|
+
v("error", h, T);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function v(
|
|
124
|
+
function v(h, m, T) {
|
|
125
125
|
{
|
|
126
126
|
var A = x.ReactDebugCurrentFrame, D = A.getStackAddendum();
|
|
127
127
|
D !== "" && (m += "%s", T = T.concat([D]));
|
|
128
|
-
var k = T.map(function(
|
|
129
|
-
return String(
|
|
128
|
+
var k = T.map(function(V) {
|
|
129
|
+
return String(V);
|
|
130
130
|
});
|
|
131
|
-
k.unshift("Warning: " + m), Function.prototype.apply.call(console[
|
|
131
|
+
k.unshift("Warning: " + m), Function.prototype.apply.call(console[h], console, k);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
var C = !1, w = !1, L = !1, q = !1,
|
|
134
|
+
var C = !1, w = !1, L = !1, q = !1, E = !1, G;
|
|
135
135
|
G = Symbol.for("react.module.reference");
|
|
136
|
-
function
|
|
137
|
-
return !!(typeof
|
|
136
|
+
function H(h) {
|
|
137
|
+
return !!(typeof h == "string" || typeof h == "function" || h === i || h === o || E || h === s || h === c || h === u || q || h === p || C || w || L || typeof h == "object" && h !== null && (h.$$typeof === d || h.$$typeof === f || h.$$typeof === r || h.$$typeof === a || h.$$typeof === l || // This needs to include all possible module reference object
|
|
138
138
|
// types supported by any Flight configuration anywhere since
|
|
139
139
|
// we don't know which Flight build this will end up being used
|
|
140
140
|
// with.
|
|
141
|
-
|
|
141
|
+
h.$$typeof === G || h.getModuleId !== void 0));
|
|
142
142
|
}
|
|
143
|
-
function dt(
|
|
144
|
-
var A =
|
|
143
|
+
function dt(h, m, T) {
|
|
144
|
+
var A = h.displayName;
|
|
145
145
|
if (A)
|
|
146
146
|
return A;
|
|
147
147
|
var D = m.displayName || m.name || "";
|
|
148
148
|
return D !== "" ? T + "(" + D + ")" : T;
|
|
149
149
|
}
|
|
150
|
-
function Gt(
|
|
151
|
-
return
|
|
150
|
+
function Gt(h) {
|
|
151
|
+
return h.displayName || "Context";
|
|
152
152
|
}
|
|
153
|
-
function Z(
|
|
154
|
-
if (
|
|
153
|
+
function Z(h) {
|
|
154
|
+
if (h == null)
|
|
155
155
|
return null;
|
|
156
|
-
if (typeof
|
|
157
|
-
return
|
|
158
|
-
if (typeof
|
|
159
|
-
return
|
|
160
|
-
switch (
|
|
156
|
+
if (typeof h.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof h == "function")
|
|
157
|
+
return h.displayName || h.name || null;
|
|
158
|
+
if (typeof h == "string")
|
|
159
|
+
return h;
|
|
160
|
+
switch (h) {
|
|
161
161
|
case i:
|
|
162
162
|
return "Fragment";
|
|
163
163
|
case n:
|
|
@@ -166,28 +166,28 @@ function ha() {
|
|
|
166
166
|
return "Profiler";
|
|
167
167
|
case s:
|
|
168
168
|
return "StrictMode";
|
|
169
|
-
case u:
|
|
170
|
-
return "Suspense";
|
|
171
169
|
case c:
|
|
170
|
+
return "Suspense";
|
|
171
|
+
case u:
|
|
172
172
|
return "SuspenseList";
|
|
173
173
|
}
|
|
174
|
-
if (typeof
|
|
175
|
-
switch (
|
|
174
|
+
if (typeof h == "object")
|
|
175
|
+
switch (h.$$typeof) {
|
|
176
176
|
case a:
|
|
177
|
-
var m =
|
|
177
|
+
var m = h;
|
|
178
178
|
return Gt(m) + ".Consumer";
|
|
179
179
|
case r:
|
|
180
|
-
var T =
|
|
180
|
+
var T = h;
|
|
181
181
|
return Gt(T._context) + ".Provider";
|
|
182
182
|
case l:
|
|
183
|
-
return dt(
|
|
184
|
-
case
|
|
185
|
-
var A =
|
|
186
|
-
return A !== null ? A : Z(
|
|
183
|
+
return dt(h, h.render, "ForwardRef");
|
|
184
|
+
case f:
|
|
185
|
+
var A = h.displayName || null;
|
|
186
|
+
return A !== null ? A : Z(h.type) || "Memo";
|
|
187
187
|
case d: {
|
|
188
|
-
var D =
|
|
188
|
+
var D = h, k = D._payload, V = D._init;
|
|
189
189
|
try {
|
|
190
|
-
return Z(
|
|
190
|
+
return Z(V(k));
|
|
191
191
|
} catch {
|
|
192
192
|
return null;
|
|
193
193
|
}
|
|
@@ -195,61 +195,61 @@ function ha() {
|
|
|
195
195
|
}
|
|
196
196
|
return null;
|
|
197
197
|
}
|
|
198
|
-
var it = Object.assign, F = 0, J, Dt, Mt,
|
|
198
|
+
var it = Object.assign, F = 0, J, Dt, Mt, ui, fi, hi, di;
|
|
199
199
|
function pi() {
|
|
200
200
|
}
|
|
201
201
|
pi.__reactDisabledLog = !0;
|
|
202
202
|
function Ro() {
|
|
203
203
|
{
|
|
204
204
|
if (F === 0) {
|
|
205
|
-
J = console.log, Dt = console.info, Mt = console.warn,
|
|
206
|
-
var
|
|
205
|
+
J = console.log, Dt = console.info, Mt = console.warn, ui = console.error, fi = console.group, hi = console.groupCollapsed, di = console.groupEnd;
|
|
206
|
+
var h = {
|
|
207
207
|
configurable: !0,
|
|
208
208
|
enumerable: !0,
|
|
209
209
|
value: pi,
|
|
210
210
|
writable: !0
|
|
211
211
|
};
|
|
212
212
|
Object.defineProperties(console, {
|
|
213
|
-
info:
|
|
214
|
-
log:
|
|
215
|
-
warn:
|
|
216
|
-
error:
|
|
217
|
-
group:
|
|
218
|
-
groupCollapsed:
|
|
219
|
-
groupEnd:
|
|
213
|
+
info: h,
|
|
214
|
+
log: h,
|
|
215
|
+
warn: h,
|
|
216
|
+
error: h,
|
|
217
|
+
group: h,
|
|
218
|
+
groupCollapsed: h,
|
|
219
|
+
groupEnd: h
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
F++;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Eo() {
|
|
226
226
|
{
|
|
227
227
|
if (F--, F === 0) {
|
|
228
|
-
var
|
|
228
|
+
var h = {
|
|
229
229
|
configurable: !0,
|
|
230
230
|
enumerable: !0,
|
|
231
231
|
writable: !0
|
|
232
232
|
};
|
|
233
233
|
Object.defineProperties(console, {
|
|
234
|
-
log: it({},
|
|
234
|
+
log: it({}, h, {
|
|
235
235
|
value: J
|
|
236
236
|
}),
|
|
237
|
-
info: it({},
|
|
237
|
+
info: it({}, h, {
|
|
238
238
|
value: Dt
|
|
239
239
|
}),
|
|
240
|
-
warn: it({},
|
|
240
|
+
warn: it({}, h, {
|
|
241
241
|
value: Mt
|
|
242
242
|
}),
|
|
243
|
-
error: it({},
|
|
244
|
-
value:
|
|
243
|
+
error: it({}, h, {
|
|
244
|
+
value: ui
|
|
245
245
|
}),
|
|
246
|
-
group: it({},
|
|
246
|
+
group: it({}, h, {
|
|
247
247
|
value: fi
|
|
248
248
|
}),
|
|
249
|
-
groupCollapsed: it({},
|
|
249
|
+
groupCollapsed: it({}, h, {
|
|
250
250
|
value: hi
|
|
251
251
|
}),
|
|
252
|
-
groupEnd: it({},
|
|
252
|
+
groupEnd: it({}, h, {
|
|
253
253
|
value: di
|
|
254
254
|
})
|
|
255
255
|
});
|
|
@@ -258,7 +258,7 @@ function ha() {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
var Ke = x.ReactCurrentDispatcher, Ge;
|
|
261
|
-
function ge(
|
|
261
|
+
function ge(h, m, T) {
|
|
262
262
|
{
|
|
263
263
|
if (Ge === void 0)
|
|
264
264
|
try {
|
|
@@ -268,51 +268,51 @@ function ha() {
|
|
|
268
268
|
Ge = A && A[1] || "";
|
|
269
269
|
}
|
|
270
270
|
return `
|
|
271
|
-
` + Ge +
|
|
271
|
+
` + Ge + h;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
var
|
|
274
|
+
var ze = !1, ye;
|
|
275
275
|
{
|
|
276
|
-
var
|
|
277
|
-
ye = new
|
|
276
|
+
var Vo = typeof WeakMap == "function" ? WeakMap : Map;
|
|
277
|
+
ye = new Vo();
|
|
278
278
|
}
|
|
279
|
-
function mi(
|
|
280
|
-
if (!
|
|
279
|
+
function mi(h, m) {
|
|
280
|
+
if (!h || ze)
|
|
281
281
|
return "";
|
|
282
282
|
{
|
|
283
|
-
var T = ye.get(
|
|
283
|
+
var T = ye.get(h);
|
|
284
284
|
if (T !== void 0)
|
|
285
285
|
return T;
|
|
286
286
|
}
|
|
287
287
|
var A;
|
|
288
|
-
|
|
288
|
+
ze = !0;
|
|
289
289
|
var D = Error.prepareStackTrace;
|
|
290
290
|
Error.prepareStackTrace = void 0;
|
|
291
291
|
var k;
|
|
292
292
|
k = Ke.current, Ke.current = null, Ro();
|
|
293
293
|
try {
|
|
294
294
|
if (m) {
|
|
295
|
-
var
|
|
295
|
+
var V = function() {
|
|
296
296
|
throw Error();
|
|
297
297
|
};
|
|
298
|
-
if (Object.defineProperty(
|
|
298
|
+
if (Object.defineProperty(V.prototype, "props", {
|
|
299
299
|
set: function() {
|
|
300
300
|
throw Error();
|
|
301
301
|
}
|
|
302
302
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
303
303
|
try {
|
|
304
|
-
Reflect.construct(
|
|
304
|
+
Reflect.construct(V, []);
|
|
305
305
|
} catch (Y) {
|
|
306
306
|
A = Y;
|
|
307
307
|
}
|
|
308
|
-
Reflect.construct(
|
|
308
|
+
Reflect.construct(h, [], V);
|
|
309
309
|
} else {
|
|
310
310
|
try {
|
|
311
|
-
|
|
311
|
+
V.call();
|
|
312
312
|
} catch (Y) {
|
|
313
313
|
A = Y;
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
h.call(V.prototype);
|
|
316
316
|
}
|
|
317
317
|
} else {
|
|
318
318
|
try {
|
|
@@ -320,61 +320,61 @@ function ha() {
|
|
|
320
320
|
} catch (Y) {
|
|
321
321
|
A = Y;
|
|
322
322
|
}
|
|
323
|
-
|
|
323
|
+
h();
|
|
324
324
|
}
|
|
325
325
|
} catch (Y) {
|
|
326
326
|
if (Y && A && typeof Y.stack == "string") {
|
|
327
327
|
for (var R = Y.stack.split(`
|
|
328
|
-
`),
|
|
329
|
-
`), _ = R.length - 1, I =
|
|
328
|
+
`), z = A.stack.split(`
|
|
329
|
+
`), _ = R.length - 1, I = z.length - 1; _ >= 1 && I >= 0 && R[_] !== z[I]; )
|
|
330
330
|
I--;
|
|
331
331
|
for (; _ >= 1 && I >= 0; _--, I--)
|
|
332
|
-
if (R[_] !==
|
|
332
|
+
if (R[_] !== z[I]) {
|
|
333
333
|
if (_ !== 1 || I !== 1)
|
|
334
334
|
do
|
|
335
|
-
if (_--, I--, I < 0 || R[_] !==
|
|
335
|
+
if (_--, I--, I < 0 || R[_] !== z[I]) {
|
|
336
336
|
var Q = `
|
|
337
337
|
` + R[_].replace(" at new ", " at ");
|
|
338
|
-
return
|
|
338
|
+
return h.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", h.displayName)), typeof h == "function" && ye.set(h, Q), Q;
|
|
339
339
|
}
|
|
340
340
|
while (_ >= 1 && I >= 0);
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
} finally {
|
|
345
|
-
|
|
345
|
+
ze = !1, Ke.current = k, Eo(), Error.prepareStackTrace = D;
|
|
346
346
|
}
|
|
347
|
-
var Lt =
|
|
348
|
-
return typeof
|
|
347
|
+
var Lt = h ? h.displayName || h.name : "", Tt = Lt ? ge(Lt) : "";
|
|
348
|
+
return typeof h == "function" && ye.set(h, Tt), Tt;
|
|
349
349
|
}
|
|
350
|
-
function Do(
|
|
351
|
-
return mi(
|
|
350
|
+
function Do(h, m, T) {
|
|
351
|
+
return mi(h, !1);
|
|
352
352
|
}
|
|
353
|
-
function Mo(
|
|
354
|
-
var m =
|
|
353
|
+
function Mo(h) {
|
|
354
|
+
var m = h.prototype;
|
|
355
355
|
return !!(m && m.isReactComponent);
|
|
356
356
|
}
|
|
357
|
-
function ve(
|
|
358
|
-
if (
|
|
357
|
+
function ve(h, m, T) {
|
|
358
|
+
if (h == null)
|
|
359
359
|
return "";
|
|
360
|
-
if (typeof
|
|
361
|
-
return mi(
|
|
362
|
-
if (typeof
|
|
363
|
-
return ge(
|
|
364
|
-
switch (
|
|
365
|
-
case u:
|
|
366
|
-
return ge("Suspense");
|
|
360
|
+
if (typeof h == "function")
|
|
361
|
+
return mi(h, Mo(h));
|
|
362
|
+
if (typeof h == "string")
|
|
363
|
+
return ge(h);
|
|
364
|
+
switch (h) {
|
|
367
365
|
case c:
|
|
366
|
+
return ge("Suspense");
|
|
367
|
+
case u:
|
|
368
368
|
return ge("SuspenseList");
|
|
369
369
|
}
|
|
370
|
-
if (typeof
|
|
371
|
-
switch (
|
|
370
|
+
if (typeof h == "object")
|
|
371
|
+
switch (h.$$typeof) {
|
|
372
372
|
case l:
|
|
373
|
-
return Do(
|
|
374
|
-
case
|
|
375
|
-
return ve(
|
|
373
|
+
return Do(h.render);
|
|
374
|
+
case f:
|
|
375
|
+
return ve(h.type, m, T);
|
|
376
376
|
case d: {
|
|
377
|
-
var A =
|
|
377
|
+
var A = h, D = A._payload, k = A._init;
|
|
378
378
|
try {
|
|
379
379
|
return ve(k(D), m, T);
|
|
380
380
|
} catch {
|
|
@@ -383,117 +383,117 @@ function ha() {
|
|
|
383
383
|
}
|
|
384
384
|
return "";
|
|
385
385
|
}
|
|
386
|
-
var
|
|
387
|
-
function Pe(
|
|
388
|
-
if (
|
|
389
|
-
var m =
|
|
386
|
+
var zt = Object.prototype.hasOwnProperty, gi = {}, yi = x.ReactDebugCurrentFrame;
|
|
387
|
+
function Pe(h) {
|
|
388
|
+
if (h) {
|
|
389
|
+
var m = h._owner, T = ve(h.type, h._source, m ? m.type : null);
|
|
390
390
|
yi.setExtraStackFrame(T);
|
|
391
391
|
} else
|
|
392
392
|
yi.setExtraStackFrame(null);
|
|
393
393
|
}
|
|
394
|
-
function ko(
|
|
394
|
+
function ko(h, m, T, A, D) {
|
|
395
395
|
{
|
|
396
|
-
var k = Function.call.bind(
|
|
397
|
-
for (var
|
|
398
|
-
if (k(
|
|
396
|
+
var k = Function.call.bind(zt);
|
|
397
|
+
for (var V in h)
|
|
398
|
+
if (k(h, V)) {
|
|
399
399
|
var R = void 0;
|
|
400
400
|
try {
|
|
401
|
-
if (typeof
|
|
402
|
-
var
|
|
403
|
-
throw
|
|
401
|
+
if (typeof h[V] != "function") {
|
|
402
|
+
var z = Error((A || "React class") + ": " + T + " type `" + V + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[V] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
403
|
+
throw z.name = "Invariant Violation", z;
|
|
404
404
|
}
|
|
405
|
-
R =
|
|
405
|
+
R = h[V](m, V, A, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
406
406
|
} catch (_) {
|
|
407
407
|
R = _;
|
|
408
408
|
}
|
|
409
|
-
R && !(R instanceof Error) && (Pe(D), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", A || "React class", T,
|
|
409
|
+
R && !(R instanceof Error) && (Pe(D), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", A || "React class", T, V, typeof R), Pe(null)), R instanceof Error && !(R.message in gi) && (gi[R.message] = !0, Pe(D), y("Failed %s type: %s", T, R.message), Pe(null));
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
var Lo = Array.isArray;
|
|
414
|
-
function
|
|
415
|
-
return Lo(
|
|
414
|
+
function He(h) {
|
|
415
|
+
return Lo(h);
|
|
416
416
|
}
|
|
417
|
-
function Oo(
|
|
417
|
+
function Oo(h) {
|
|
418
418
|
{
|
|
419
|
-
var m = typeof Symbol == "function" && Symbol.toStringTag, T = m &&
|
|
419
|
+
var m = typeof Symbol == "function" && Symbol.toStringTag, T = m && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
420
420
|
return T;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
function jo(
|
|
423
|
+
function jo(h) {
|
|
424
424
|
try {
|
|
425
|
-
return vi(
|
|
425
|
+
return vi(h), !1;
|
|
426
426
|
} catch {
|
|
427
427
|
return !0;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
function vi(
|
|
431
|
-
return "" +
|
|
430
|
+
function vi(h) {
|
|
431
|
+
return "" + h;
|
|
432
432
|
}
|
|
433
|
-
function Pi(
|
|
434
|
-
if (jo(
|
|
435
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Oo(
|
|
433
|
+
function Pi(h) {
|
|
434
|
+
if (jo(h))
|
|
435
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Oo(h)), vi(h);
|
|
436
436
|
}
|
|
437
|
-
var
|
|
437
|
+
var Ht = x.ReactCurrentOwner, Fo = {
|
|
438
438
|
key: !0,
|
|
439
439
|
ref: !0,
|
|
440
440
|
__self: !0,
|
|
441
441
|
__source: !0
|
|
442
442
|
}, xi, Ti, Ye;
|
|
443
443
|
Ye = {};
|
|
444
|
-
function _o(
|
|
445
|
-
if (
|
|
446
|
-
var m = Object.getOwnPropertyDescriptor(
|
|
444
|
+
function _o(h) {
|
|
445
|
+
if (zt.call(h, "ref")) {
|
|
446
|
+
var m = Object.getOwnPropertyDescriptor(h, "ref").get;
|
|
447
447
|
if (m && m.isReactWarning)
|
|
448
448
|
return !1;
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return h.ref !== void 0;
|
|
451
451
|
}
|
|
452
|
-
function Bo(
|
|
453
|
-
if (
|
|
454
|
-
var m = Object.getOwnPropertyDescriptor(
|
|
452
|
+
function Bo(h) {
|
|
453
|
+
if (zt.call(h, "key")) {
|
|
454
|
+
var m = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
455
455
|
if (m && m.isReactWarning)
|
|
456
456
|
return !1;
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return h.key !== void 0;
|
|
459
459
|
}
|
|
460
|
-
function Io(
|
|
461
|
-
if (typeof
|
|
462
|
-
var T = Z(
|
|
463
|
-
Ye[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(
|
|
460
|
+
function Io(h, m) {
|
|
461
|
+
if (typeof h.ref == "string" && Ht.current && m && Ht.current.stateNode !== m) {
|
|
462
|
+
var T = Z(Ht.current.type);
|
|
463
|
+
Ye[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(Ht.current.type), h.ref), Ye[T] = !0);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function No(
|
|
466
|
+
function No(h, m) {
|
|
467
467
|
{
|
|
468
468
|
var T = function() {
|
|
469
469
|
xi || (xi = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
|
470
470
|
};
|
|
471
|
-
T.isReactWarning = !0, Object.defineProperty(
|
|
471
|
+
T.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
472
472
|
get: T,
|
|
473
473
|
configurable: !0
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
function Uo(
|
|
477
|
+
function Uo(h, m) {
|
|
478
478
|
{
|
|
479
479
|
var T = function() {
|
|
480
480
|
Ti || (Ti = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
|
481
481
|
};
|
|
482
|
-
T.isReactWarning = !0, Object.defineProperty(
|
|
482
|
+
T.isReactWarning = !0, Object.defineProperty(h, "ref", {
|
|
483
483
|
get: T,
|
|
484
484
|
configurable: !0
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
var Wo = function(
|
|
488
|
+
var Wo = function(h, m, T, A, D, k, V) {
|
|
489
489
|
var R = {
|
|
490
490
|
// This tag allows us to uniquely identify this as a React Element
|
|
491
491
|
$$typeof: e,
|
|
492
492
|
// Built-in properties that belong on the element
|
|
493
|
-
type:
|
|
493
|
+
type: h,
|
|
494
494
|
key: m,
|
|
495
495
|
ref: T,
|
|
496
|
-
props:
|
|
496
|
+
props: V,
|
|
497
497
|
// Record the component responsible for creating this element.
|
|
498
498
|
_owner: k
|
|
499
499
|
};
|
|
@@ -514,53 +514,53 @@ function ha() {
|
|
|
514
514
|
value: D
|
|
515
515
|
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
|
516
516
|
};
|
|
517
|
-
function $o(
|
|
517
|
+
function $o(h, m, T, A, D) {
|
|
518
518
|
{
|
|
519
|
-
var k,
|
|
520
|
-
T !== void 0 && (Pi(T), R = "" + T), Bo(m) && (Pi(m.key), R = "" + m.key), _o(m) && (
|
|
519
|
+
var k, V = {}, R = null, z = null;
|
|
520
|
+
T !== void 0 && (Pi(T), R = "" + T), Bo(m) && (Pi(m.key), R = "" + m.key), _o(m) && (z = m.ref, Io(m, D));
|
|
521
521
|
for (k in m)
|
|
522
|
-
|
|
523
|
-
if (
|
|
524
|
-
var _ =
|
|
522
|
+
zt.call(m, k) && !Fo.hasOwnProperty(k) && (V[k] = m[k]);
|
|
523
|
+
if (h && h.defaultProps) {
|
|
524
|
+
var _ = h.defaultProps;
|
|
525
525
|
for (k in _)
|
|
526
|
-
|
|
526
|
+
V[k] === void 0 && (V[k] = _[k]);
|
|
527
527
|
}
|
|
528
|
-
if (R ||
|
|
529
|
-
var I = typeof
|
|
530
|
-
R && No(
|
|
528
|
+
if (R || z) {
|
|
529
|
+
var I = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
|
|
530
|
+
R && No(V, I), z && Uo(V, I);
|
|
531
531
|
}
|
|
532
|
-
return Wo(
|
|
532
|
+
return Wo(h, R, z, D, A, Ht.current, V);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
var Xe = x.ReactCurrentOwner, bi = x.ReactDebugCurrentFrame;
|
|
536
|
-
function kt(
|
|
537
|
-
if (
|
|
538
|
-
var m =
|
|
536
|
+
function kt(h) {
|
|
537
|
+
if (h) {
|
|
538
|
+
var m = h._owner, T = ve(h.type, h._source, m ? m.type : null);
|
|
539
539
|
bi.setExtraStackFrame(T);
|
|
540
540
|
} else
|
|
541
541
|
bi.setExtraStackFrame(null);
|
|
542
542
|
}
|
|
543
543
|
var qe;
|
|
544
544
|
qe = !1;
|
|
545
|
-
function Ze(
|
|
546
|
-
return typeof
|
|
545
|
+
function Ze(h) {
|
|
546
|
+
return typeof h == "object" && h !== null && h.$$typeof === e;
|
|
547
547
|
}
|
|
548
548
|
function wi() {
|
|
549
549
|
{
|
|
550
550
|
if (Xe.current) {
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
551
|
+
var h = Z(Xe.current.type);
|
|
552
|
+
if (h)
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check the render method of \`` +
|
|
555
|
+
Check the render method of \`` + h + "`.";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function Ko(
|
|
560
|
+
function Ko(h) {
|
|
561
561
|
{
|
|
562
|
-
if (
|
|
563
|
-
var m =
|
|
562
|
+
if (h !== void 0) {
|
|
563
|
+
var m = h.fileName.replace(/^.*[\\\/]/, ""), T = h.lineNumber;
|
|
564
564
|
return `
|
|
565
565
|
|
|
566
566
|
Check your code at ` + m + ":" + T + ".";
|
|
@@ -569,11 +569,11 @@ Check your code at ` + m + ":" + T + ".";
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
var Si = {};
|
|
572
|
-
function Go(
|
|
572
|
+
function Go(h) {
|
|
573
573
|
{
|
|
574
574
|
var m = wi();
|
|
575
575
|
if (!m) {
|
|
576
|
-
var T = typeof
|
|
576
|
+
var T = typeof h == "string" ? h : h.displayName || h.name;
|
|
577
577
|
T && (m = `
|
|
578
578
|
|
|
579
579
|
Check the top-level render call using <` + T + ">.");
|
|
@@ -581,41 +581,41 @@ Check the top-level render call using <` + T + ">.");
|
|
|
581
581
|
return m;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
function Ci(
|
|
584
|
+
function Ci(h, m) {
|
|
585
585
|
{
|
|
586
|
-
if (!
|
|
586
|
+
if (!h._store || h._store.validated || h.key != null)
|
|
587
587
|
return;
|
|
588
|
-
|
|
588
|
+
h._store.validated = !0;
|
|
589
589
|
var T = Go(m);
|
|
590
590
|
if (Si[T])
|
|
591
591
|
return;
|
|
592
592
|
Si[T] = !0;
|
|
593
593
|
var A = "";
|
|
594
|
-
|
|
594
|
+
h && h._owner && h._owner !== Xe.current && (A = " It was passed a child from " + Z(h._owner.type) + "."), kt(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, A), kt(null);
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
function Ai(
|
|
597
|
+
function Ai(h, m) {
|
|
598
598
|
{
|
|
599
|
-
if (typeof
|
|
599
|
+
if (typeof h != "object")
|
|
600
600
|
return;
|
|
601
|
-
if (
|
|
602
|
-
for (var T = 0; T <
|
|
603
|
-
var A =
|
|
601
|
+
if (He(h))
|
|
602
|
+
for (var T = 0; T < h.length; T++) {
|
|
603
|
+
var A = h[T];
|
|
604
604
|
Ze(A) && Ci(A, m);
|
|
605
605
|
}
|
|
606
|
-
else if (Ze(
|
|
607
|
-
|
|
608
|
-
else if (
|
|
609
|
-
var D = b(
|
|
610
|
-
if (typeof D == "function" && D !==
|
|
611
|
-
for (var k = D.call(
|
|
612
|
-
Ze(
|
|
606
|
+
else if (Ze(h))
|
|
607
|
+
h._store && (h._store.validated = !0);
|
|
608
|
+
else if (h) {
|
|
609
|
+
var D = b(h);
|
|
610
|
+
if (typeof D == "function" && D !== h.entries)
|
|
611
|
+
for (var k = D.call(h), V; !(V = k.next()).done; )
|
|
612
|
+
Ze(V.value) && Ci(V.value, m);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function zo(h) {
|
|
617
617
|
{
|
|
618
|
-
var m =
|
|
618
|
+
var m = h.type;
|
|
619
619
|
if (m == null || typeof m == "string")
|
|
620
620
|
return;
|
|
621
621
|
var T;
|
|
@@ -623,13 +623,13 @@ Check the top-level render call using <` + T + ">.");
|
|
|
623
623
|
T = m.propTypes;
|
|
624
624
|
else if (typeof m == "object" && (m.$$typeof === l || // Note: Memo only checks outer props here.
|
|
625
625
|
// Inner props are checked in the reconciler.
|
|
626
|
-
m.$$typeof ===
|
|
626
|
+
m.$$typeof === f))
|
|
627
627
|
T = m.propTypes;
|
|
628
628
|
else
|
|
629
629
|
return;
|
|
630
630
|
if (T) {
|
|
631
631
|
var A = Z(m);
|
|
632
|
-
ko(T,
|
|
632
|
+
ko(T, h.props, "prop", A, h);
|
|
633
633
|
} else if (m.PropTypes !== void 0 && !qe) {
|
|
634
634
|
qe = !0;
|
|
635
635
|
var D = Z(m);
|
|
@@ -638,48 +638,48 @@ Check the top-level render call using <` + T + ">.");
|
|
|
638
638
|
typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function Ho(h) {
|
|
642
642
|
{
|
|
643
|
-
for (var m = Object.keys(
|
|
643
|
+
for (var m = Object.keys(h.props), T = 0; T < m.length; T++) {
|
|
644
644
|
var A = m[T];
|
|
645
645
|
if (A !== "children" && A !== "key") {
|
|
646
|
-
kt(
|
|
646
|
+
kt(h), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", A), kt(null);
|
|
647
647
|
break;
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
|
-
|
|
650
|
+
h.ref !== null && (kt(h), y("Invalid attribute `ref` supplied to `React.Fragment`."), kt(null));
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
var Ri = {};
|
|
654
|
-
function
|
|
654
|
+
function Ei(h, m, T, A, D, k) {
|
|
655
655
|
{
|
|
656
|
-
var
|
|
657
|
-
if (!
|
|
656
|
+
var V = H(h);
|
|
657
|
+
if (!V) {
|
|
658
658
|
var R = "";
|
|
659
|
-
(
|
|
660
|
-
var
|
|
661
|
-
|
|
659
|
+
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
660
|
+
var z = Ko(D);
|
|
661
|
+
z ? R += z : R += wi();
|
|
662
662
|
var _;
|
|
663
|
-
|
|
663
|
+
h === null ? _ = "null" : He(h) ? _ = "array" : h !== void 0 && h.$$typeof === e ? (_ = "<" + (Z(h.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, R);
|
|
664
664
|
}
|
|
665
|
-
var I = $o(
|
|
665
|
+
var I = $o(h, m, T, D, k);
|
|
666
666
|
if (I == null)
|
|
667
667
|
return I;
|
|
668
|
-
if (
|
|
668
|
+
if (V) {
|
|
669
669
|
var Q = m.children;
|
|
670
670
|
if (Q !== void 0)
|
|
671
671
|
if (A)
|
|
672
|
-
if (
|
|
672
|
+
if (He(Q)) {
|
|
673
673
|
for (var Lt = 0; Lt < Q.length; Lt++)
|
|
674
|
-
Ai(Q[Lt],
|
|
674
|
+
Ai(Q[Lt], h);
|
|
675
675
|
Object.freeze && Object.freeze(Q);
|
|
676
676
|
} else
|
|
677
677
|
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
678
678
|
else
|
|
679
|
-
Ai(Q,
|
|
679
|
+
Ai(Q, h);
|
|
680
680
|
}
|
|
681
|
-
if (
|
|
682
|
-
var Tt = Z(
|
|
681
|
+
if (zt.call(m, "key")) {
|
|
682
|
+
var Tt = Z(h), Y = Object.keys(m).filter(function(Qo) {
|
|
683
683
|
return Qo !== "key";
|
|
684
684
|
}), Je = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
685
685
|
if (!Ri[Tt + Je]) {
|
|
@@ -692,14 +692,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
692
692
|
<%s key={someKey} {...props} />`, Je, Tt, Jo, Tt), Ri[Tt + Je] = !0;
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
return
|
|
695
|
+
return h === i ? Ho(I) : zo(I), I;
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
function Yo(
|
|
699
|
-
return
|
|
698
|
+
function Yo(h, m, T) {
|
|
699
|
+
return Ei(h, m, T, !0);
|
|
700
700
|
}
|
|
701
|
-
function Xo(
|
|
702
|
-
return
|
|
701
|
+
function Xo(h, m, T) {
|
|
702
|
+
return Ei(h, m, T, !1);
|
|
703
703
|
}
|
|
704
704
|
var qo = Xo, Zo = Yo;
|
|
705
705
|
Xt.Fragment = i, Xt.jsx = qo, Xt.jsxs = Zo;
|
|
@@ -734,11 +734,11 @@ class Qs extends Mn.Component {
|
|
|
734
734
|
mn(Qs, "defaultProps", {
|
|
735
735
|
containerId: "root"
|
|
736
736
|
});
|
|
737
|
-
const On =
|
|
737
|
+
const On = Vt({
|
|
738
738
|
transformPagePoint: (t) => t,
|
|
739
739
|
isStatic: !1,
|
|
740
740
|
reducedMotion: "never"
|
|
741
|
-
}), je =
|
|
741
|
+
}), je = Vt({}), Fe = Vt(null), jn = typeof window < "u", tr = jn ? ta : ut, er = Vt({ strict: !1 }), _e = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ma = "framerAppearId", nr = "data-" + _e(ma), ga = {
|
|
742
742
|
skipAnimations: !1,
|
|
743
743
|
useManualTiming: !1
|
|
744
744
|
};
|
|
@@ -750,32 +750,32 @@ function ya(t) {
|
|
|
750
750
|
timestamp: 0,
|
|
751
751
|
isProcessing: !1
|
|
752
752
|
};
|
|
753
|
-
function a(
|
|
754
|
-
o.has(
|
|
753
|
+
function a(c) {
|
|
754
|
+
o.has(c) && (l.schedule(c), t()), c(r);
|
|
755
755
|
}
|
|
756
756
|
const l = {
|
|
757
757
|
/**
|
|
758
758
|
* Schedule a process to run on the next frame.
|
|
759
759
|
*/
|
|
760
|
-
schedule: (
|
|
761
|
-
const p =
|
|
762
|
-
return
|
|
760
|
+
schedule: (c, u = !1, f = !1) => {
|
|
761
|
+
const p = f && i ? e : n;
|
|
762
|
+
return u && o.add(c), p.has(c) || p.add(c), c;
|
|
763
763
|
},
|
|
764
764
|
/**
|
|
765
765
|
* Cancel the provided callback from running on the next frame.
|
|
766
766
|
*/
|
|
767
|
-
cancel: (
|
|
768
|
-
n.delete(
|
|
767
|
+
cancel: (c) => {
|
|
768
|
+
n.delete(c), o.delete(c);
|
|
769
769
|
},
|
|
770
770
|
/**
|
|
771
771
|
* Execute all schedule callbacks.
|
|
772
772
|
*/
|
|
773
|
-
process: (
|
|
774
|
-
if (r =
|
|
773
|
+
process: (c) => {
|
|
774
|
+
if (r = c, i) {
|
|
775
775
|
s = !0;
|
|
776
776
|
return;
|
|
777
777
|
}
|
|
778
|
-
i = !0, [e, n] = [n, e], n.clear(), e.forEach(a), i = !1, s && (s = !1, l.process(
|
|
778
|
+
i = !0, [e, n] = [n, e], n.clear(), e.forEach(a), i = !1, s && (s = !1, l.process(c));
|
|
779
779
|
}
|
|
780
780
|
};
|
|
781
781
|
return l;
|
|
@@ -800,9 +800,9 @@ function ir(t, e) {
|
|
|
800
800
|
delta: 0,
|
|
801
801
|
timestamp: 0,
|
|
802
802
|
isProcessing: !1
|
|
803
|
-
}, o = () => n = !0, r = xe.reduce((x, y) => (x[y] = ya(o), x), {}), { read: a, resolveKeyframes: l, update:
|
|
803
|
+
}, o = () => n = !0, r = xe.reduce((x, y) => (x[y] = ya(o), x), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: f, postRender: d } = r, p = () => {
|
|
804
804
|
const x = performance.now();
|
|
805
|
-
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(x - s.timestamp, va), 1), s.timestamp = x, s.isProcessing = !0, a.process(s), l.process(s),
|
|
805
|
+
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(x - s.timestamp, va), 1), s.timestamp = x, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), f.process(s), d.process(s), s.isProcessing = !1, n && e && (i = !1, t(p));
|
|
806
806
|
}, g = () => {
|
|
807
807
|
n = !0, i = !0, s.isProcessing || t(p);
|
|
808
808
|
};
|
|
@@ -814,15 +814,15 @@ function ir(t, e) {
|
|
|
814
814
|
r[xe[y]].cancel(x);
|
|
815
815
|
}, state: s, steps: r };
|
|
816
816
|
}
|
|
817
|
-
const { schedule: Fn, cancel:
|
|
817
|
+
const { schedule: Fn, cancel: ch } = ir(queueMicrotask, !1);
|
|
818
818
|
function jt(t) {
|
|
819
819
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
820
820
|
}
|
|
821
|
-
const sr =
|
|
821
|
+
const sr = Vt({});
|
|
822
822
|
let Mi = !1;
|
|
823
823
|
function Pa(t, e, n, i, s) {
|
|
824
|
-
const { visualElement: o } = U(je), r = U(er), a = U(Fe), l = U(On).reducedMotion,
|
|
825
|
-
i = i || r.renderer, !
|
|
824
|
+
const { visualElement: o } = U(je), r = U(er), a = U(Fe), l = U(On).reducedMotion, c = nt();
|
|
825
|
+
i = i || r.renderer, !c.current && i && (c.current = i(t, {
|
|
826
826
|
visualState: e,
|
|
827
827
|
parent: o,
|
|
828
828
|
props: n,
|
|
@@ -830,22 +830,22 @@ function Pa(t, e, n, i, s) {
|
|
|
830
830
|
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
831
831
|
reducedMotionConfig: l
|
|
832
832
|
}));
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
|
|
833
|
+
const u = c.current, f = U(sr);
|
|
834
|
+
u && !u.projection && s && (u.type === "html" || u.type === "svg") && Ta(c.current, n, s, f), Zs(() => {
|
|
835
|
+
u && u.update(n, a);
|
|
836
836
|
});
|
|
837
837
|
const d = nt(!!(n[nr] && !window.HandoffComplete));
|
|
838
838
|
return tr(() => {
|
|
839
|
-
|
|
840
|
-
}),
|
|
841
|
-
|
|
842
|
-
}),
|
|
839
|
+
u && (u.updateFeatures(), Fn.render(u.render), d.current && u.animationState && u.animationState.animateChanges());
|
|
840
|
+
}), ut(() => {
|
|
841
|
+
u && (!d.current && u.animationState && u.animationState.animateChanges(), d.current && (d.current = !1, Mi || (Mi = !0, queueMicrotask(xa))));
|
|
842
|
+
}), u;
|
|
843
843
|
}
|
|
844
844
|
function xa() {
|
|
845
845
|
window.HandoffComplete = !0;
|
|
846
846
|
}
|
|
847
847
|
function Ta(t, e, n, i) {
|
|
848
|
-
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot:
|
|
848
|
+
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c } = e;
|
|
849
849
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : rr(t.parent)), t.projection.setOptions({
|
|
850
850
|
layoutId: s,
|
|
851
851
|
layout: o,
|
|
@@ -861,7 +861,7 @@ function Ta(t, e, n, i) {
|
|
|
861
861
|
animationType: typeof o == "string" ? o : "both",
|
|
862
862
|
initialPromotionConfig: i,
|
|
863
863
|
layoutScroll: l,
|
|
864
|
-
layoutRoot:
|
|
864
|
+
layoutRoot: c
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
867
|
function rr(t) {
|
|
@@ -914,7 +914,7 @@ function wa(t, e) {
|
|
|
914
914
|
}
|
|
915
915
|
function Sa(t) {
|
|
916
916
|
const { initial: e, animate: n } = wa(t, U(je));
|
|
917
|
-
return
|
|
917
|
+
return Et(() => ({ initial: e, animate: n }), [ki(e), ki(n)]);
|
|
918
918
|
}
|
|
919
919
|
function ki(t) {
|
|
920
920
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
@@ -950,7 +950,7 @@ function Ca(t) {
|
|
|
950
950
|
...t[e]
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
|
-
const In =
|
|
953
|
+
const In = Vt({}), Aa = Symbol.for("motionComponentSymbol"), W = (t) => t;
|
|
954
954
|
let $t = W, ft = W;
|
|
955
955
|
process.env.NODE_ENV !== "production" && ($t = (t, e) => {
|
|
956
956
|
!t && typeof console < "u" && console.warn(e);
|
|
@@ -961,27 +961,27 @@ process.env.NODE_ENV !== "production" && ($t = (t, e) => {
|
|
|
961
961
|
function Ra({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: i, Component: s }) {
|
|
962
962
|
t && Ca(t);
|
|
963
963
|
function o(a, l) {
|
|
964
|
-
let
|
|
965
|
-
const
|
|
964
|
+
let c;
|
|
965
|
+
const u = {
|
|
966
966
|
...U(On),
|
|
967
967
|
...a,
|
|
968
|
-
layoutId:
|
|
969
|
-
}, { isStatic:
|
|
970
|
-
if (!
|
|
971
|
-
|
|
972
|
-
const g = Da(
|
|
973
|
-
|
|
968
|
+
layoutId: Ea(a)
|
|
969
|
+
}, { isStatic: f } = u, d = Sa(a), p = i(a, f);
|
|
970
|
+
if (!f && jn) {
|
|
971
|
+
Va(u, t);
|
|
972
|
+
const g = Da(u);
|
|
973
|
+
c = g.MeasureLayout, d.visualElement = Pa(s, p, u, e, g.ProjectionNode);
|
|
974
974
|
}
|
|
975
|
-
return O.jsxs(je.Provider, { value: d, children: [
|
|
975
|
+
return O.jsxs(je.Provider, { value: d, children: [c && d.visualElement ? O.jsx(c, { visualElement: d.visualElement, ...u }) : null, n(s, a, ba(p, d.visualElement, l), p, f, d.visualElement)] });
|
|
976
976
|
}
|
|
977
|
-
const r =
|
|
977
|
+
const r = Ee(o);
|
|
978
978
|
return r[Aa] = s, r;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function Ea({ layoutId: t }) {
|
|
981
981
|
const e = U(In).id;
|
|
982
982
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Va(t, e) {
|
|
985
985
|
const n = U(er).strict;
|
|
986
986
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
987
987
|
const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
@@ -1061,9 +1061,9 @@ function Nn(t) {
|
|
|
1061
1061
|
)
|
|
1062
1062
|
);
|
|
1063
1063
|
}
|
|
1064
|
-
const
|
|
1064
|
+
const Ve = {};
|
|
1065
1065
|
function La(t) {
|
|
1066
|
-
Object.assign(
|
|
1066
|
+
Object.assign(Ve, t);
|
|
1067
1067
|
}
|
|
1068
1068
|
const he = [
|
|
1069
1069
|
"transformPerspective",
|
|
@@ -1085,7 +1085,7 @@ const he = [
|
|
|
1085
1085
|
"skewY"
|
|
1086
1086
|
], Pt = new Set(he);
|
|
1087
1087
|
function ar(t, { layout: e, layoutId: n }) {
|
|
1088
|
-
return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!
|
|
1088
|
+
return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ve[t] || t === "opacity");
|
|
1089
1089
|
}
|
|
1090
1090
|
const K = (t) => !!(t && t.getVelocity), lr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, Kt = {
|
|
1091
1091
|
test: (t) => typeof t == "number",
|
|
@@ -1196,37 +1196,37 @@ function Ua(t, e, n) {
|
|
|
1196
1196
|
continue;
|
|
1197
1197
|
let l = !0;
|
|
1198
1198
|
if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
1199
|
-
const
|
|
1199
|
+
const c = lr(a, Wn[r]);
|
|
1200
1200
|
if (!l) {
|
|
1201
1201
|
s = !1;
|
|
1202
|
-
const
|
|
1203
|
-
i += `${
|
|
1202
|
+
const u = Ia[r] || r;
|
|
1203
|
+
i += `${u}(${c}) `;
|
|
1204
1204
|
}
|
|
1205
|
-
n && (e[r] =
|
|
1205
|
+
n && (e[r] = c);
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
1208
|
return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
|
|
1209
1209
|
}
|
|
1210
|
-
const
|
|
1210
|
+
const cr = (t) => (e) => typeof e == "string" && e.startsWith(t), ur = cr("--"), Wa = cr("var(--"), $n = (t) => Wa(t) ? $a.test(t.split("/*")[0].trim()) : !1, $a = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
1211
1211
|
function Kn(t, e, n) {
|
|
1212
1212
|
const { style: i, vars: s, transformOrigin: o } = t;
|
|
1213
1213
|
let r = !1, a = !1;
|
|
1214
1214
|
for (const l in e) {
|
|
1215
|
-
const
|
|
1215
|
+
const c = e[l];
|
|
1216
1216
|
if (Pt.has(l)) {
|
|
1217
1217
|
r = !0;
|
|
1218
1218
|
continue;
|
|
1219
|
-
} else if (
|
|
1220
|
-
s[l] =
|
|
1219
|
+
} else if (ur(l)) {
|
|
1220
|
+
s[l] = c;
|
|
1221
1221
|
continue;
|
|
1222
1222
|
} else {
|
|
1223
|
-
const
|
|
1224
|
-
l.startsWith("origin") ? (a = !0, o[l] =
|
|
1223
|
+
const u = lr(c, Wn[l]);
|
|
1224
|
+
l.startsWith("origin") ? (a = !0, o[l] = u) : i[l] = u;
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
if (e.transform || (r || n ? i.transform = Ua(e, t.transform, n) : i.transform && (i.transform = "none")), a) {
|
|
1228
|
-
const { originX: l = "50%", originY:
|
|
1229
|
-
i.transformOrigin = `${l} ${
|
|
1228
|
+
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = o;
|
|
1229
|
+
i.transformOrigin = `${l} ${c} ${u}`;
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
1232
|
const Gn = () => ({
|
|
@@ -1240,7 +1240,7 @@ function fr(t, e, n) {
|
|
|
1240
1240
|
!K(e[i]) && !ar(i, n) && (t[i] = e[i]);
|
|
1241
1241
|
}
|
|
1242
1242
|
function Ka({ transformTemplate: t }, e) {
|
|
1243
|
-
return
|
|
1243
|
+
return Et(() => {
|
|
1244
1244
|
const n = Gn();
|
|
1245
1245
|
return Kn(n, e, t), Object.assign({}, n.vars, n.style);
|
|
1246
1246
|
}, [e]);
|
|
@@ -1249,11 +1249,11 @@ function Ga(t, e) {
|
|
|
1249
1249
|
const n = t.style || {}, i = {};
|
|
1250
1250
|
return fr(i, n, t), Object.assign(i, Ka(t, e)), i;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function za(t, e) {
|
|
1253
1253
|
const n = {}, i = Ga(t, e);
|
|
1254
1254
|
return t.drag && t.dragListener !== !1 && (n.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = i, n;
|
|
1255
1255
|
}
|
|
1256
|
-
const
|
|
1256
|
+
const Ha = /* @__PURE__ */ new Set([
|
|
1257
1257
|
"animate",
|
|
1258
1258
|
"exit",
|
|
1259
1259
|
"variants",
|
|
@@ -1286,7 +1286,7 @@ const za = /* @__PURE__ */ new Set([
|
|
|
1286
1286
|
"viewport"
|
|
1287
1287
|
]);
|
|
1288
1288
|
function De(t) {
|
|
1289
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
1289
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Ha.has(t);
|
|
1290
1290
|
}
|
|
1291
1291
|
let hr = (t) => !De(t);
|
|
1292
1292
|
function Ya(t) {
|
|
@@ -1324,7 +1324,7 @@ function Qa(t, e, n = 1, i = 0, s = !0) {
|
|
|
1324
1324
|
const r = S.transform(e), a = S.transform(n);
|
|
1325
1325
|
t[o.array] = `${r} ${a}`;
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function zn(t, {
|
|
1328
1328
|
attrX: e,
|
|
1329
1329
|
attrY: n,
|
|
1330
1330
|
attrScale: i,
|
|
@@ -1334,9 +1334,9 @@ function Hn(t, {
|
|
|
1334
1334
|
pathSpacing: a = 1,
|
|
1335
1335
|
pathOffset: l = 0,
|
|
1336
1336
|
// This is object creation, which we try to avoid per-frame.
|
|
1337
|
-
...
|
|
1338
|
-
},
|
|
1339
|
-
if (Kn(t,
|
|
1337
|
+
...c
|
|
1338
|
+
}, u, f) {
|
|
1339
|
+
if (Kn(t, c, f), u) {
|
|
1340
1340
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1341
1341
|
return;
|
|
1342
1342
|
}
|
|
@@ -1347,11 +1347,11 @@ function Hn(t, {
|
|
|
1347
1347
|
const dr = () => ({
|
|
1348
1348
|
...Gn(),
|
|
1349
1349
|
attrs: {}
|
|
1350
|
-
}),
|
|
1350
|
+
}), Hn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1351
1351
|
function tl(t, e, n, i) {
|
|
1352
|
-
const s =
|
|
1352
|
+
const s = Et(() => {
|
|
1353
1353
|
const o = dr();
|
|
1354
|
-
return
|
|
1354
|
+
return zn(o, e, Hn(i), t.transformTemplate), {
|
|
1355
1355
|
...o.attrs,
|
|
1356
1356
|
style: { ...o.style }
|
|
1357
1357
|
};
|
|
@@ -1364,9 +1364,9 @@ function tl(t, e, n, i) {
|
|
|
1364
1364
|
}
|
|
1365
1365
|
function el(t = !1) {
|
|
1366
1366
|
return (n, i, s, { latestValues: o }, r) => {
|
|
1367
|
-
const l = (Nn(n) ? tl :
|
|
1367
|
+
const l = (Nn(n) ? tl : za)(i, o, r, n), c = Xa(i, typeof n == "string", t), u = n !== Js ? { ...c, ...l, ref: s } : {}, { children: f } = i, d = Et(() => K(f) ? f.get() : f, [f]);
|
|
1368
1368
|
return ea(n, {
|
|
1369
|
-
...
|
|
1369
|
+
...u,
|
|
1370
1370
|
children: d
|
|
1371
1371
|
});
|
|
1372
1372
|
};
|
|
@@ -1475,7 +1475,7 @@ function sl({ applyWillChange: t = !1, scrapeMotionValuesFromProps: e, createRen
|
|
|
1475
1475
|
latestValues: ol(s, o, r, a ? !1 : t, e),
|
|
1476
1476
|
renderState: n()
|
|
1477
1477
|
};
|
|
1478
|
-
return i && (l.mount = (
|
|
1478
|
+
return i && (l.mount = (c) => i(s, c, l)), l;
|
|
1479
1479
|
}
|
|
1480
1480
|
const xr = (t) => (e, n) => {
|
|
1481
1481
|
const i = U(je), s = U(Fe), o = () => sl(t, e, i, s, n);
|
|
@@ -1497,15 +1497,15 @@ function Bi(t, e, n) {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
function ol(t, e, n, i, s) {
|
|
1499
1499
|
var o;
|
|
1500
|
-
const r = {}, a = [], l = i && ((o = t.style) === null || o === void 0 ? void 0 : o.willChange) === void 0,
|
|
1501
|
-
for (const b in
|
|
1502
|
-
r[b] = Se(
|
|
1503
|
-
let { initial:
|
|
1500
|
+
const r = {}, a = [], l = i && ((o = t.style) === null || o === void 0 ? void 0 : o.willChange) === void 0, c = s(t, {});
|
|
1501
|
+
for (const b in c)
|
|
1502
|
+
r[b] = Se(c[b]);
|
|
1503
|
+
let { initial: u, animate: f } = t;
|
|
1504
1504
|
const d = Be(t), p = or(t);
|
|
1505
|
-
e && p && !d && t.inherit !== !1 && (
|
|
1505
|
+
e && p && !d && t.inherit !== !1 && (u === void 0 && (u = e.initial), f === void 0 && (f = e.animate));
|
|
1506
1506
|
let g = n ? n.initial === !1 : !1;
|
|
1507
|
-
g = g ||
|
|
1508
|
-
const P = g ?
|
|
1507
|
+
g = g || u === !1;
|
|
1508
|
+
const P = g ? f : u;
|
|
1509
1509
|
return P && typeof P != "boolean" && !re(P) && Bi(t, P, (b, x) => {
|
|
1510
1510
|
for (const y in b) {
|
|
1511
1511
|
let v = b[y];
|
|
@@ -1517,7 +1517,7 @@ function ol(t, e, n, i, s) {
|
|
|
1517
1517
|
}
|
|
1518
1518
|
for (const y in x)
|
|
1519
1519
|
r[y] = x[y];
|
|
1520
|
-
}), l && (
|
|
1520
|
+
}), l && (f && u !== !1 && !re(f) && Bi(t, f, (b) => {
|
|
1521
1521
|
for (const x in b)
|
|
1522
1522
|
rl(a, x);
|
|
1523
1523
|
}), a.length && (r.willChange = a.join(","))), r;
|
|
@@ -1539,7 +1539,7 @@ const { schedule: M, cancel: ht, state: N, steps: Qe } = ir(typeof requestAnimat
|
|
|
1539
1539
|
};
|
|
1540
1540
|
}
|
|
1541
1541
|
}), M.render(() => {
|
|
1542
|
-
|
|
1542
|
+
zn(n, i, Hn(e.tagName), t.transformTemplate), gr(e, n);
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
})
|
|
@@ -1550,7 +1550,7 @@ const { schedule: M, cancel: ht, state: N, steps: Qe } = ir(typeof requestAnimat
|
|
|
1550
1550
|
createRenderState: Gn
|
|
1551
1551
|
})
|
|
1552
1552
|
};
|
|
1553
|
-
function
|
|
1553
|
+
function cl(t, { forwardMotionProps: e = !1 }, n, i) {
|
|
1554
1554
|
return {
|
|
1555
1555
|
...Nn(t) ? al : ll,
|
|
1556
1556
|
preloadedFeatures: n,
|
|
@@ -1571,9 +1571,9 @@ function Ue(t, e = "page") {
|
|
|
1571
1571
|
}
|
|
1572
1572
|
};
|
|
1573
1573
|
}
|
|
1574
|
-
const
|
|
1574
|
+
const ul = (t) => (e) => Tr(e) && t(e, Ue(e));
|
|
1575
1575
|
function ot(t, e, n, i) {
|
|
1576
|
-
return rt(t, e,
|
|
1576
|
+
return rt(t, e, ul(n), i);
|
|
1577
1577
|
}
|
|
1578
1578
|
const fl = (t, e) => (n) => e(t(n)), at = (...t) => t.reduce(fl);
|
|
1579
1579
|
function br(t) {
|
|
@@ -1669,7 +1669,7 @@ class pl extends xt {
|
|
|
1669
1669
|
const i = this.node.getProps(), o = ot(window, "pointerup", (a, l) => {
|
|
1670
1670
|
if (!this.checkPressEnd())
|
|
1671
1671
|
return;
|
|
1672
|
-
const { onTap:
|
|
1672
|
+
const { onTap: c, onTapCancel: u, globalTapTarget: f } = this.node.getProps(), d = !f && !Cr(this.node.current, a.target) ? u : c;
|
|
1673
1673
|
d && M.update(() => d(a, l));
|
|
1674
1674
|
}, {
|
|
1675
1675
|
passive: !(i.onTap || i.onPointerUp)
|
|
@@ -1682,9 +1682,9 @@ class pl extends xt {
|
|
|
1682
1682
|
if (o.key !== "Enter" || this.isPressing)
|
|
1683
1683
|
return;
|
|
1684
1684
|
const r = (a) => {
|
|
1685
|
-
a.key !== "Enter" || !this.checkPressEnd() || tn("up", (l,
|
|
1686
|
-
const { onTap:
|
|
1687
|
-
|
|
1685
|
+
a.key !== "Enter" || !this.checkPressEnd() || tn("up", (l, c) => {
|
|
1686
|
+
const { onTap: u } = this.node.getProps();
|
|
1687
|
+
u && M.postRender(() => u(l, c));
|
|
1688
1688
|
});
|
|
1689
1689
|
};
|
|
1690
1690
|
this.removeEndListeners(), this.removeEndListeners = rt(this.node.current, "keyup", r), tn("down", (a, l) => {
|
|
@@ -1753,11 +1753,11 @@ class xl extends xt {
|
|
|
1753
1753
|
rootMargin: i,
|
|
1754
1754
|
threshold: typeof s == "number" ? s : Pl[s]
|
|
1755
1755
|
}, a = (l) => {
|
|
1756
|
-
const { isIntersecting:
|
|
1757
|
-
if (this.isInView ===
|
|
1756
|
+
const { isIntersecting: c } = l;
|
|
1757
|
+
if (this.isInView === c || (this.isInView = c, o && !c && this.hasEnteredView))
|
|
1758
1758
|
return;
|
|
1759
|
-
|
|
1760
|
-
const { onViewportEnter:
|
|
1759
|
+
c && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", c);
|
|
1760
|
+
const { onViewportEnter: u, onViewportLeave: f } = this.node.getProps(), d = c ? u : f;
|
|
1761
1761
|
d && d(l);
|
|
1762
1762
|
};
|
|
1763
1763
|
return vl(this.node.current, r, a);
|
|
@@ -1806,7 +1806,7 @@ function We(t, e, n) {
|
|
|
1806
1806
|
const i = t.getProps();
|
|
1807
1807
|
return Xn(i, e, n !== void 0 ? n : i.custom, t);
|
|
1808
1808
|
}
|
|
1809
|
-
const lt = (t) => t * 1e3,
|
|
1809
|
+
const lt = (t) => t * 1e3, ct = (t) => t / 1e3, wl = {
|
|
1810
1810
|
type: "spring",
|
|
1811
1811
|
stiffness: 500,
|
|
1812
1812
|
damping: 25,
|
|
@@ -1824,15 +1824,15 @@ const lt = (t) => t * 1e3, ut = (t) => t / 1e3, wl = {
|
|
|
1824
1824
|
ease: [0.25, 0.1, 0.35, 1],
|
|
1825
1825
|
duration: 0.3
|
|
1826
1826
|
}, Rl = (t, { keyframes: e }) => e.length > 2 ? Cl : Pt.has(t) ? t.startsWith("scale") ? Sl(e[1]) : wl : Al;
|
|
1827
|
-
function
|
|
1828
|
-
return !!Object.keys(
|
|
1827
|
+
function El({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: c, ...u }) {
|
|
1828
|
+
return !!Object.keys(u).length;
|
|
1829
1829
|
}
|
|
1830
1830
|
function Zn(t, e) {
|
|
1831
1831
|
return t[e] || t.default || t;
|
|
1832
1832
|
}
|
|
1833
|
-
const
|
|
1833
|
+
const Vl = (t) => t !== null;
|
|
1834
1834
|
function $e(t, { repeat: e, repeatType: n = "loop" }, i) {
|
|
1835
|
-
const s = t.filter(
|
|
1835
|
+
const s = t.filter(Vl), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
|
|
1836
1836
|
return !o || i === void 0 ? s[o] : i;
|
|
1837
1837
|
}
|
|
1838
1838
|
let Ce;
|
|
@@ -1848,7 +1848,7 @@ const gt = {
|
|
|
1848
1848
|
function Ml(t) {
|
|
1849
1849
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Rr(t) : !0;
|
|
1850
1850
|
}
|
|
1851
|
-
const
|
|
1851
|
+
const Er = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), kl = (
|
|
1852
1852
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1853
1853
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1854
1854
|
);
|
|
@@ -1860,7 +1860,7 @@ function Ll(t) {
|
|
|
1860
1860
|
return [`--${n ?? i}`, s];
|
|
1861
1861
|
}
|
|
1862
1862
|
const Ol = 4;
|
|
1863
|
-
function
|
|
1863
|
+
function Vr(t, e, n = 1) {
|
|
1864
1864
|
ft(n <= Ol, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
1865
1865
|
const [i, s] = Ll(t);
|
|
1866
1866
|
if (!i)
|
|
@@ -1868,9 +1868,9 @@ function Er(t, e, n = 1) {
|
|
|
1868
1868
|
const o = window.getComputedStyle(e).getPropertyValue(i);
|
|
1869
1869
|
if (o) {
|
|
1870
1870
|
const r = o.trim();
|
|
1871
|
-
return
|
|
1871
|
+
return Er(r) ? parseFloat(r) : r;
|
|
1872
1872
|
}
|
|
1873
|
-
return $n(s) ?
|
|
1873
|
+
return $n(s) ? Vr(s, e, n + 1) : s;
|
|
1874
1874
|
}
|
|
1875
1875
|
const jl = /* @__PURE__ */ new Set([
|
|
1876
1876
|
"width",
|
|
@@ -2032,7 +2032,7 @@ function $l(t) {
|
|
|
2032
2032
|
var e, n;
|
|
2033
2033
|
return isNaN(t) && de(t) && (((e = t.match(Un)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Oa)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
2034
2034
|
}
|
|
2035
|
-
const jr = "number", Fr = "color", Kl = "var", Gl = "var(",
|
|
2035
|
+
const jr = "number", Fr = "color", Kl = "var", Gl = "var(", zi = "${}", zl = /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;
|
|
2036
2036
|
function oe(t) {
|
|
2037
2037
|
const e = t.toString(), n = [], i = {
|
|
2038
2038
|
color: [],
|
|
@@ -2040,7 +2040,7 @@ function oe(t) {
|
|
|
2040
2040
|
var: []
|
|
2041
2041
|
}, s = [];
|
|
2042
2042
|
let o = 0;
|
|
2043
|
-
const a = e.replace(
|
|
2043
|
+
const a = e.replace(zl, (l) => ($.test(l) ? (i.color.push(o), s.push(Fr), n.push($.parse(l))) : l.startsWith(Gl) ? (i.var.push(o), s.push(Kl), n.push(l)) : (i.number.push(o), s.push(jr), n.push(parseFloat(l))), ++o, zi)).split(zi);
|
|
2044
2044
|
return { values: n, split: a, indexes: i, types: s };
|
|
2045
2045
|
}
|
|
2046
2046
|
function _r(t) {
|
|
@@ -2058,10 +2058,10 @@ function Br(t) {
|
|
|
2058
2058
|
return o;
|
|
2059
2059
|
};
|
|
2060
2060
|
}
|
|
2061
|
-
const
|
|
2061
|
+
const Hl = (t) => typeof t == "number" ? 0 : t;
|
|
2062
2062
|
function Yl(t) {
|
|
2063
2063
|
const e = _r(t);
|
|
2064
|
-
return Br(t)(e.map(
|
|
2064
|
+
return Br(t)(e.map(Hl));
|
|
2065
2065
|
}
|
|
2066
2066
|
const vt = {
|
|
2067
2067
|
test: $l,
|
|
@@ -2108,7 +2108,7 @@ function Ir(t, e) {
|
|
|
2108
2108
|
return n !== Tn && (n = vt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2109
2109
|
}
|
|
2110
2110
|
const Ql = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2111
|
-
function
|
|
2111
|
+
function tc(t, e, n) {
|
|
2112
2112
|
let i = 0, s;
|
|
2113
2113
|
for (; i < t.length && !s; ) {
|
|
2114
2114
|
const o = t[i];
|
|
@@ -2128,10 +2128,10 @@ class Nr extends Jn {
|
|
|
2128
2128
|
return;
|
|
2129
2129
|
super.readKeyframes();
|
|
2130
2130
|
for (let l = 0; l < e.length; l++) {
|
|
2131
|
-
let
|
|
2132
|
-
if (typeof
|
|
2133
|
-
const
|
|
2134
|
-
|
|
2131
|
+
let c = e[l];
|
|
2132
|
+
if (typeof c == "string" && (c = c.trim(), $n(c))) {
|
|
2133
|
+
const u = Vr(c, n.current);
|
|
2134
|
+
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
2135
2135
|
}
|
|
2136
2136
|
}
|
|
2137
2137
|
if (this.resolveNoneKeyframes(), !jl.has(i) || e.length !== 2)
|
|
@@ -2140,8 +2140,8 @@ class Nr extends Jn {
|
|
|
2140
2140
|
if (r !== a)
|
|
2141
2141
|
if (Wi(r) && Wi(a))
|
|
2142
2142
|
for (let l = 0; l < e.length; l++) {
|
|
2143
|
-
const
|
|
2144
|
-
typeof
|
|
2143
|
+
const c = e[l];
|
|
2144
|
+
typeof c == "string" && (e[l] = parseFloat(c));
|
|
2145
2145
|
}
|
|
2146
2146
|
else
|
|
2147
2147
|
this.needsMeasurement = !0;
|
|
@@ -2150,7 +2150,7 @@ class Nr extends Jn {
|
|
|
2150
2150
|
const { unresolvedKeyframes: e, name: n } = this, i = [];
|
|
2151
2151
|
for (let s = 0; s < e.length; s++)
|
|
2152
2152
|
Ml(e[s]) && i.push(s);
|
|
2153
|
-
i.length &&
|
|
2153
|
+
i.length && tc(e, i, n);
|
|
2154
2154
|
}
|
|
2155
2155
|
measureInitialState() {
|
|
2156
2156
|
const { element: e, unresolvedKeyframes: n, name: i } = this;
|
|
@@ -2168,8 +2168,8 @@ class Nr extends Jn {
|
|
|
2168
2168
|
const o = n.getValue(i);
|
|
2169
2169
|
o && o.jump(this.measuredOrigin, !1);
|
|
2170
2170
|
const r = s.length - 1, a = s[r];
|
|
2171
|
-
s[r] = Wt[i](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l,
|
|
2172
|
-
n.getValue(l).set(
|
|
2171
|
+
s[r] = Wt[i](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, c]) => {
|
|
2172
|
+
n.getValue(l).set(c);
|
|
2173
2173
|
}), this.resolveNoneKeyframes();
|
|
2174
2174
|
}
|
|
2175
2175
|
}
|
|
@@ -2177,10 +2177,10 @@ function Ur(t) {
|
|
|
2177
2177
|
let e;
|
|
2178
2178
|
return () => (e === void 0 && (e = t()), e);
|
|
2179
2179
|
}
|
|
2180
|
-
const
|
|
2180
|
+
const Hi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
2181
2181
|
(vt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
2182
2182
|
!t.startsWith("url("));
|
|
2183
|
-
function
|
|
2183
|
+
function ec(t) {
|
|
2184
2184
|
const e = t[0];
|
|
2185
2185
|
if (t.length === 1)
|
|
2186
2186
|
return !0;
|
|
@@ -2188,14 +2188,14 @@ function eu(t) {
|
|
|
2188
2188
|
if (t[n] !== e)
|
|
2189
2189
|
return !0;
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function nc(t, e, n, i) {
|
|
2192
2192
|
const s = t[0];
|
|
2193
2193
|
if (s === null)
|
|
2194
2194
|
return !1;
|
|
2195
2195
|
if (e === "display" || e === "visibility")
|
|
2196
2196
|
return !0;
|
|
2197
|
-
const o = t[t.length - 1], r =
|
|
2198
|
-
return $t(r === a, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 :
|
|
2197
|
+
const o = t[t.length - 1], r = Hi(s, e), a = Hi(o, e);
|
|
2198
|
+
return $t(r === a, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 : ec(t) || n === "spring" && i;
|
|
2199
2199
|
}
|
|
2200
2200
|
class Wr {
|
|
2201
2201
|
constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", ...a }) {
|
|
@@ -2224,19 +2224,19 @@ class Wr {
|
|
|
2224
2224
|
*/
|
|
2225
2225
|
onKeyframesResolved(e, n) {
|
|
2226
2226
|
this.hasAttemptedResolve = !0;
|
|
2227
|
-
const { name: i, type: s, velocity: o, delay: r, onComplete: a, onUpdate: l, isGenerator:
|
|
2228
|
-
if (!
|
|
2227
|
+
const { name: i, type: s, velocity: o, delay: r, onComplete: a, onUpdate: l, isGenerator: c } = this.options;
|
|
2228
|
+
if (!c && !nc(e, i, s, o))
|
|
2229
2229
|
if (r)
|
|
2230
2230
|
this.options.duration = 0;
|
|
2231
2231
|
else {
|
|
2232
2232
|
l == null || l($e(e, this.options, n)), a == null || a(), this.resolveFinishedPromise();
|
|
2233
2233
|
return;
|
|
2234
2234
|
}
|
|
2235
|
-
const
|
|
2236
|
-
|
|
2235
|
+
const u = this.initPlayback(e, n);
|
|
2236
|
+
u !== !1 && (this._resolved = {
|
|
2237
2237
|
keyframes: e,
|
|
2238
2238
|
finalKeyframe: n,
|
|
2239
|
-
...
|
|
2239
|
+
...u
|
|
2240
2240
|
}, this.onPostResolved());
|
|
2241
2241
|
}
|
|
2242
2242
|
onPostResolved() {
|
|
@@ -2258,30 +2258,30 @@ class Wr {
|
|
|
2258
2258
|
function $r(t, e) {
|
|
2259
2259
|
return e ? t * (1e3 / e) : 0;
|
|
2260
2260
|
}
|
|
2261
|
-
const
|
|
2261
|
+
const ic = 5;
|
|
2262
2262
|
function Kr(t, e, n) {
|
|
2263
|
-
const i = Math.max(e -
|
|
2263
|
+
const i = Math.max(e - ic, 0);
|
|
2264
2264
|
return $r(n - t(i), e - i);
|
|
2265
2265
|
}
|
|
2266
|
-
const sn = 1e-3,
|
|
2267
|
-
function
|
|
2266
|
+
const sn = 1e-3, sc = 0.01, Yi = 10, rc = 0.05, oc = 1;
|
|
2267
|
+
function ac({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1 }) {
|
|
2268
2268
|
let s, o;
|
|
2269
2269
|
$t(t <= lt(Yi), "Spring duration must be 10 seconds or less");
|
|
2270
2270
|
let r = 1 - e;
|
|
2271
|
-
r = yt(
|
|
2272
|
-
const
|
|
2271
|
+
r = yt(rc, oc, r), t = yt(sc, Yi, ct(t)), r < 1 ? (s = (c) => {
|
|
2272
|
+
const u = c * r, f = u * t, d = u - n, p = bn(c, r), g = Math.exp(-f);
|
|
2273
2273
|
return sn - d / p * g;
|
|
2274
|
-
}, o = (
|
|
2275
|
-
const
|
|
2276
|
-
return (-s(
|
|
2277
|
-
}) : (s = (
|
|
2278
|
-
const
|
|
2279
|
-
return -sn +
|
|
2280
|
-
}, o = (
|
|
2281
|
-
const
|
|
2282
|
-
return
|
|
2274
|
+
}, o = (c) => {
|
|
2275
|
+
const f = c * r * t, d = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-f), P = bn(Math.pow(c, 2), r);
|
|
2276
|
+
return (-s(c) + sn > 0 ? -1 : 1) * ((d - p) * g) / P;
|
|
2277
|
+
}) : (s = (c) => {
|
|
2278
|
+
const u = Math.exp(-c * t), f = (c - n) * t + 1;
|
|
2279
|
+
return -sn + u * f;
|
|
2280
|
+
}, o = (c) => {
|
|
2281
|
+
const u = Math.exp(-c * t), f = (n - c) * (t * t);
|
|
2282
|
+
return u * f;
|
|
2283
2283
|
});
|
|
2284
|
-
const a = 5 / t, l =
|
|
2284
|
+
const a = 5 / t, l = cc(s, o, a);
|
|
2285
2285
|
if (t = lt(t), isNaN(l))
|
|
2286
2286
|
return {
|
|
2287
2287
|
stiffness: 100,
|
|
@@ -2289,29 +2289,29 @@ function au({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
|
|
|
2289
2289
|
duration: t
|
|
2290
2290
|
};
|
|
2291
2291
|
{
|
|
2292
|
-
const
|
|
2292
|
+
const c = Math.pow(l, 2) * i;
|
|
2293
2293
|
return {
|
|
2294
|
-
stiffness:
|
|
2295
|
-
damping: r * 2 * Math.sqrt(i *
|
|
2294
|
+
stiffness: c,
|
|
2295
|
+
damping: r * 2 * Math.sqrt(i * c),
|
|
2296
2296
|
duration: t
|
|
2297
2297
|
};
|
|
2298
2298
|
}
|
|
2299
2299
|
}
|
|
2300
|
-
const
|
|
2301
|
-
function
|
|
2300
|
+
const lc = 12;
|
|
2301
|
+
function cc(t, e, n) {
|
|
2302
2302
|
let i = n;
|
|
2303
|
-
for (let s = 1; s <
|
|
2303
|
+
for (let s = 1; s < lc; s++)
|
|
2304
2304
|
i = i - t(i) / e(i);
|
|
2305
2305
|
return i;
|
|
2306
2306
|
}
|
|
2307
2307
|
function bn(t, e) {
|
|
2308
2308
|
return t * Math.sqrt(1 - e * e);
|
|
2309
2309
|
}
|
|
2310
|
-
const
|
|
2310
|
+
const uc = ["duration", "bounce"], fc = ["stiffness", "damping", "mass"];
|
|
2311
2311
|
function Xi(t, e) {
|
|
2312
2312
|
return e.some((n) => t[n] !== void 0);
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function hc(t) {
|
|
2315
2315
|
let e = {
|
|
2316
2316
|
velocity: 0,
|
|
2317
2317
|
stiffness: 100,
|
|
@@ -2320,8 +2320,8 @@ function hu(t) {
|
|
|
2320
2320
|
isResolvedFromDuration: !1,
|
|
2321
2321
|
...t
|
|
2322
2322
|
};
|
|
2323
|
-
if (!Xi(t,
|
|
2324
|
-
const n =
|
|
2323
|
+
if (!Xi(t, fc) && Xi(t, uc)) {
|
|
2324
|
+
const n = ac(t);
|
|
2325
2325
|
e = {
|
|
2326
2326
|
...e,
|
|
2327
2327
|
...n,
|
|
@@ -2331,10 +2331,10 @@ function hu(t) {
|
|
|
2331
2331
|
return e;
|
|
2332
2332
|
}
|
|
2333
2333
|
function Gr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
2334
|
-
const s = t[0], o = t[t.length - 1], r = { done: !1, value: s }, { stiffness: a, damping: l, mass:
|
|
2334
|
+
const s = t[0], o = t[t.length - 1], r = { done: !1, value: s }, { stiffness: a, damping: l, mass: c, duration: u, velocity: f, isResolvedFromDuration: d } = hc({
|
|
2335
2335
|
...i,
|
|
2336
|
-
velocity: -
|
|
2337
|
-
}), p =
|
|
2336
|
+
velocity: -ct(i.velocity || 0)
|
|
2337
|
+
}), p = f || 0, g = l / (2 * Math.sqrt(a * c)), P = o - s, b = ct(Math.sqrt(a / c)), x = Math.abs(P) < 5;
|
|
2338
2338
|
n || (n = x ? 0.01 : 2), e || (e = x ? 5e-3 : 0.5);
|
|
2339
2339
|
let y;
|
|
2340
2340
|
if (g < 1) {
|
|
@@ -2353,11 +2353,11 @@ function Gr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
|
2353
2353
|
};
|
|
2354
2354
|
}
|
|
2355
2355
|
return {
|
|
2356
|
-
calculatedDuration: d &&
|
|
2356
|
+
calculatedDuration: d && u || null,
|
|
2357
2357
|
next: (v) => {
|
|
2358
2358
|
const C = y(v);
|
|
2359
2359
|
if (d)
|
|
2360
|
-
r.done = v >=
|
|
2360
|
+
r.done = v >= u;
|
|
2361
2361
|
else {
|
|
2362
2362
|
let w = p;
|
|
2363
2363
|
v !== 0 && (g < 1 ? w = Kr(y, v, C) : w = 0);
|
|
@@ -2368,64 +2368,64 @@ function Gr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
|
2368
2368
|
}
|
|
2369
2369
|
};
|
|
2370
2370
|
}
|
|
2371
|
-
function qi({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta:
|
|
2372
|
-
const
|
|
2371
|
+
function qi({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
2372
|
+
const f = t[0], d = {
|
|
2373
2373
|
done: !1,
|
|
2374
|
-
value:
|
|
2375
|
-
}, p = (
|
|
2374
|
+
value: f
|
|
2375
|
+
}, p = (E) => a !== void 0 && E < a || l !== void 0 && E > l, g = (E) => a === void 0 ? l : l === void 0 || Math.abs(a - E) < Math.abs(l - E) ? a : l;
|
|
2376
2376
|
let P = n * e;
|
|
2377
|
-
const b =
|
|
2378
|
-
x !== b && (P = x -
|
|
2379
|
-
const y = (
|
|
2380
|
-
const G = y(
|
|
2381
|
-
d.done = Math.abs(G) <=
|
|
2377
|
+
const b = f + P, x = r === void 0 ? b : r(b);
|
|
2378
|
+
x !== b && (P = x - f);
|
|
2379
|
+
const y = (E) => -P * Math.exp(-E / i), v = (E) => x + y(E), C = (E) => {
|
|
2380
|
+
const G = y(E), H = v(E);
|
|
2381
|
+
d.done = Math.abs(G) <= c, d.value = d.done ? x : H;
|
|
2382
2382
|
};
|
|
2383
2383
|
let w, L;
|
|
2384
|
-
const q = (
|
|
2385
|
-
p(d.value) && (w =
|
|
2384
|
+
const q = (E) => {
|
|
2385
|
+
p(d.value) && (w = E, L = Gr({
|
|
2386
2386
|
keyframes: [d.value, g(d.value)],
|
|
2387
|
-
velocity: Kr(v,
|
|
2387
|
+
velocity: Kr(v, E, d.value),
|
|
2388
2388
|
// TODO: This should be passing * 1000
|
|
2389
2389
|
damping: s,
|
|
2390
2390
|
stiffness: o,
|
|
2391
|
-
restDelta:
|
|
2392
|
-
restSpeed:
|
|
2391
|
+
restDelta: c,
|
|
2392
|
+
restSpeed: u
|
|
2393
2393
|
}));
|
|
2394
2394
|
};
|
|
2395
2395
|
return q(0), {
|
|
2396
2396
|
calculatedDuration: null,
|
|
2397
|
-
next: (
|
|
2397
|
+
next: (E) => {
|
|
2398
2398
|
let G = !1;
|
|
2399
|
-
return !L && w === void 0 && (G = !0, C(
|
|
2399
|
+
return !L && w === void 0 && (G = !0, C(E), q(E)), w !== void 0 && E >= w ? L.next(E - w) : (!G && C(E), d);
|
|
2400
2400
|
}
|
|
2401
2401
|
};
|
|
2402
2402
|
}
|
|
2403
|
-
const
|
|
2404
|
-
function
|
|
2403
|
+
const zr = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, dc = 1e-7, pc = 12;
|
|
2404
|
+
function mc(t, e, n, i, s) {
|
|
2405
2405
|
let o, r, a = 0;
|
|
2406
2406
|
do
|
|
2407
|
-
r = e + (n - e) / 2, o =
|
|
2408
|
-
while (Math.abs(o) >
|
|
2407
|
+
r = e + (n - e) / 2, o = zr(r, i, s) - t, o > 0 ? n = r : e = r;
|
|
2408
|
+
while (Math.abs(o) > dc && ++a < pc);
|
|
2409
2409
|
return r;
|
|
2410
2410
|
}
|
|
2411
2411
|
function me(t, e, n, i) {
|
|
2412
2412
|
if (t === e && n === i)
|
|
2413
2413
|
return W;
|
|
2414
|
-
const s = (o) =>
|
|
2415
|
-
return (o) => o === 0 || o === 1 ? o :
|
|
2414
|
+
const s = (o) => mc(o, 0, 1, t, n);
|
|
2415
|
+
return (o) => o === 0 || o === 1 ? o : zr(s(o), e, i);
|
|
2416
2416
|
}
|
|
2417
|
-
const
|
|
2417
|
+
const gc = me(0.42, 0, 1, 1), yc = me(0, 0, 0.58, 1), Hr = me(0.42, 0, 0.58, 1), vc = (t) => Array.isArray(t) && typeof t[0] != "number", Yr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Xr = (t) => (e) => 1 - t(1 - e), ei = (t) => 1 - Math.sin(Math.acos(t)), qr = Xr(ei), Pc = Yr(ei), Zr = me(0.33, 1.53, 0.69, 0.99), ni = Xr(Zr), xc = Yr(ni), Tc = (t) => (t *= 2) < 1 ? 0.5 * ni(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Zi = {
|
|
2418
2418
|
linear: W,
|
|
2419
|
-
easeIn:
|
|
2420
|
-
easeInOut:
|
|
2421
|
-
easeOut:
|
|
2419
|
+
easeIn: gc,
|
|
2420
|
+
easeInOut: Hr,
|
|
2421
|
+
easeOut: yc,
|
|
2422
2422
|
circIn: ei,
|
|
2423
|
-
circInOut:
|
|
2423
|
+
circInOut: Pc,
|
|
2424
2424
|
circOut: qr,
|
|
2425
2425
|
backIn: ni,
|
|
2426
|
-
backInOut:
|
|
2426
|
+
backInOut: xc,
|
|
2427
2427
|
backOut: Zr,
|
|
2428
|
-
anticipate:
|
|
2428
|
+
anticipate: Tc
|
|
2429
2429
|
}, Ji = (t) => {
|
|
2430
2430
|
if (Array.isArray(t)) {
|
|
2431
2431
|
ft(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
@@ -2441,7 +2441,7 @@ const gu = me(0.42, 0, 1, 1), yu = me(0, 0, 0.58, 1), zr = me(0.42, 0, 0.58, 1),
|
|
|
2441
2441
|
function rn(t, e, n) {
|
|
2442
2442
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
2443
2443
|
}
|
|
2444
|
-
function
|
|
2444
|
+
function bc({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
2445
2445
|
t /= 360, e /= 100, n /= 100;
|
|
2446
2446
|
let s = 0, o = 0, r = 0;
|
|
2447
2447
|
if (!e)
|
|
@@ -2463,13 +2463,13 @@ function Me(t, e) {
|
|
|
2463
2463
|
const on = (t, e, n) => {
|
|
2464
2464
|
const i = t * t, s = n * (e * e - i) + i;
|
|
2465
2465
|
return s < 0 ? 0 : Math.sqrt(s);
|
|
2466
|
-
},
|
|
2466
|
+
}, wc = [xn, At, Ft], Sc = (t) => wc.find((e) => e.test(t));
|
|
2467
2467
|
function Qi(t) {
|
|
2468
|
-
const e =
|
|
2468
|
+
const e = Sc(t);
|
|
2469
2469
|
if ($t(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
2470
2470
|
return !1;
|
|
2471
2471
|
let n = e.parse(t);
|
|
2472
|
-
return e === Ft && (n =
|
|
2472
|
+
return e === Ft && (n = bc(n)), n;
|
|
2473
2473
|
}
|
|
2474
2474
|
const ts = (t, e) => {
|
|
2475
2475
|
const n = Qi(t), i = Qi(e);
|
|
@@ -2478,14 +2478,14 @@ const ts = (t, e) => {
|
|
|
2478
2478
|
const s = { ...n };
|
|
2479
2479
|
return (o) => (s.red = on(n.red, i.red, o), s.green = on(n.green, i.green, o), s.blue = on(n.blue, i.blue, o), s.alpha = j(n.alpha, i.alpha, o), At.transform(s));
|
|
2480
2480
|
}, wn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2481
|
-
function
|
|
2481
|
+
function Cc(t, e) {
|
|
2482
2482
|
return wn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
2483
2483
|
}
|
|
2484
|
-
function
|
|
2484
|
+
function Ac(t, e) {
|
|
2485
2485
|
return (n) => j(t, e, n);
|
|
2486
2486
|
}
|
|
2487
2487
|
function ii(t) {
|
|
2488
|
-
return typeof t == "number" ?
|
|
2488
|
+
return typeof t == "number" ? Ac : typeof t == "string" ? $n(t) ? Me : $.test(t) ? ts : Vc : Array.isArray(t) ? Jr : typeof t == "object" ? $.test(t) ? ts : Rc : Me;
|
|
2489
2489
|
}
|
|
2490
2490
|
function Jr(t, e) {
|
|
2491
2491
|
const n = [...t], i = n.length, s = t.map((o, r) => ii(o)(o, e[r]));
|
|
@@ -2495,7 +2495,7 @@ function Jr(t, e) {
|
|
|
2495
2495
|
return n;
|
|
2496
2496
|
};
|
|
2497
2497
|
}
|
|
2498
|
-
function
|
|
2498
|
+
function Rc(t, e) {
|
|
2499
2499
|
const n = { ...t, ...e }, i = {};
|
|
2500
2500
|
for (const s in n)
|
|
2501
2501
|
t[s] !== void 0 && e[s] !== void 0 && (i[s] = ii(t[s])(t[s], e[s]));
|
|
@@ -2505,7 +2505,7 @@ function Ru(t, e) {
|
|
|
2505
2505
|
return n;
|
|
2506
2506
|
};
|
|
2507
2507
|
}
|
|
2508
|
-
function
|
|
2508
|
+
function Ec(t, e) {
|
|
2509
2509
|
var n;
|
|
2510
2510
|
const i = [], s = { color: 0, var: 0, number: 0 };
|
|
2511
2511
|
for (let o = 0; o < e.values.length; o++) {
|
|
@@ -2514,14 +2514,14 @@ function Vu(t, e) {
|
|
|
2514
2514
|
}
|
|
2515
2515
|
return i;
|
|
2516
2516
|
}
|
|
2517
|
-
const
|
|
2517
|
+
const Vc = (t, e) => {
|
|
2518
2518
|
const n = vt.createTransformer(e), i = oe(t), s = oe(e);
|
|
2519
|
-
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? wn.has(t) && !s.values.length || wn.has(e) && !i.values.length ?
|
|
2519
|
+
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? wn.has(t) && !s.values.length || wn.has(e) && !i.values.length ? Cc(t, e) : at(Jr(Ec(i, s), s.values), n) : ($t(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Me(t, e));
|
|
2520
2520
|
};
|
|
2521
2521
|
function Qr(t, e, n) {
|
|
2522
2522
|
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) : ii(t)(t, e);
|
|
2523
2523
|
}
|
|
2524
|
-
function
|
|
2524
|
+
function Dc(t, e, n) {
|
|
2525
2525
|
const i = [], s = n || Qr, o = t.length - 1;
|
|
2526
2526
|
for (let r = 0; r < o; r++) {
|
|
2527
2527
|
let a = s(t[r], t[r + 1]);
|
|
@@ -2533,51 +2533,51 @@ function Du(t, e, n) {
|
|
|
2533
2533
|
}
|
|
2534
2534
|
return i;
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2536
|
+
function Mc(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
2537
2537
|
const o = t.length;
|
|
2538
2538
|
if (ft(o === e.length, "Both input and output ranges must be the same length"), o === 1)
|
|
2539
2539
|
return () => e[0];
|
|
2540
2540
|
if (o === 2 && t[0] === t[1])
|
|
2541
2541
|
return () => e[1];
|
|
2542
2542
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
2543
|
-
const r =
|
|
2544
|
-
let
|
|
2543
|
+
const r = Dc(e, i, s), a = r.length, l = (c) => {
|
|
2544
|
+
let u = 0;
|
|
2545
2545
|
if (a > 1)
|
|
2546
|
-
for (;
|
|
2546
|
+
for (; u < t.length - 2 && !(c < t[u + 1]); u++)
|
|
2547
2547
|
;
|
|
2548
|
-
const
|
|
2549
|
-
return r[
|
|
2548
|
+
const f = ae(t[u], t[u + 1], c);
|
|
2549
|
+
return r[u](f);
|
|
2550
2550
|
};
|
|
2551
|
-
return n ? (
|
|
2551
|
+
return n ? (c) => l(yt(t[0], t[o - 1], c)) : l;
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2553
|
+
function kc(t, e) {
|
|
2554
2554
|
const n = t[t.length - 1];
|
|
2555
2555
|
for (let i = 1; i <= e; i++) {
|
|
2556
2556
|
const s = ae(0, e, i);
|
|
2557
2557
|
t.push(j(n, 1, s));
|
|
2558
2558
|
}
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function Lc(t) {
|
|
2561
2561
|
const e = [0];
|
|
2562
|
-
return
|
|
2562
|
+
return kc(e, t.length - 1), e;
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2564
|
+
function Oc(t, e) {
|
|
2565
2565
|
return t.map((n) => n * e);
|
|
2566
2566
|
}
|
|
2567
|
-
function
|
|
2568
|
-
return t.map(() => e ||
|
|
2567
|
+
function jc(t, e) {
|
|
2568
|
+
return t.map(() => e || Hr).splice(0, t.length - 1);
|
|
2569
2569
|
}
|
|
2570
2570
|
function ke({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
|
|
2571
|
-
const s =
|
|
2571
|
+
const s = vc(i) ? i.map(Ji) : Ji(i), o = {
|
|
2572
2572
|
done: !1,
|
|
2573
2573
|
value: e[0]
|
|
2574
|
-
}, r =
|
|
2574
|
+
}, r = Oc(
|
|
2575
2575
|
// Only use the provided offsets if they're the correct length
|
|
2576
2576
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2577
|
-
n && n.length === e.length ? n :
|
|
2577
|
+
n && n.length === e.length ? n : Lc(e),
|
|
2578
2578
|
t
|
|
2579
|
-
), a =
|
|
2580
|
-
ease: Array.isArray(s) ? s :
|
|
2579
|
+
), a = Mc(r, e, {
|
|
2580
|
+
ease: Array.isArray(s) ? s : jc(e, s)
|
|
2581
2581
|
});
|
|
2582
2582
|
return {
|
|
2583
2583
|
calculatedDuration: t,
|
|
@@ -2585,7 +2585,7 @@ function ke({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }
|
|
|
2585
2585
|
};
|
|
2586
2586
|
}
|
|
2587
2587
|
const es = 2e4;
|
|
2588
|
-
function
|
|
2588
|
+
function Fc(t) {
|
|
2589
2589
|
let e = 0;
|
|
2590
2590
|
const n = 50;
|
|
2591
2591
|
let i = t.next(e);
|
|
@@ -2593,7 +2593,7 @@ function Fu(t) {
|
|
|
2593
2593
|
e += n, i = t.next(e);
|
|
2594
2594
|
return e >= es ? 1 / 0 : e;
|
|
2595
2595
|
}
|
|
2596
|
-
const
|
|
2596
|
+
const _c = (t) => {
|
|
2597
2597
|
const e = ({ timestamp: n }) => t(n);
|
|
2598
2598
|
return {
|
|
2599
2599
|
start: () => M.update(e, !0),
|
|
@@ -2604,13 +2604,13 @@ const _u = (t) => {
|
|
|
2604
2604
|
*/
|
|
2605
2605
|
now: () => N.isProcessing ? N.timestamp : gt.now()
|
|
2606
2606
|
};
|
|
2607
|
-
},
|
|
2607
|
+
}, Bc = {
|
|
2608
2608
|
decay: qi,
|
|
2609
2609
|
inertia: qi,
|
|
2610
2610
|
tween: ke,
|
|
2611
2611
|
keyframes: ke,
|
|
2612
2612
|
spring: Gr
|
|
2613
|
-
},
|
|
2613
|
+
}, Ic = (t) => t / 100;
|
|
2614
2614
|
class si extends Wr {
|
|
2615
2615
|
constructor({ KeyframeResolver: e = Jn, ...n }) {
|
|
2616
2616
|
super(n), this.holdTime = null, this.startTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.state = "idle", this.stop = () => {
|
|
@@ -2624,21 +2624,21 @@ class si extends Wr {
|
|
|
2624
2624
|
i && s && s.owner ? this.resolver = s.owner.resolveKeyframes(o, r, i, s) : this.resolver = new e(o, r, i, s), this.resolver.scheduleResolve();
|
|
2625
2625
|
}
|
|
2626
2626
|
initPlayback(e) {
|
|
2627
|
-
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a =
|
|
2628
|
-
let l,
|
|
2629
|
-
a !== ke && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && ft(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = at(
|
|
2630
|
-
const
|
|
2631
|
-
o === "mirror" && (
|
|
2627
|
+
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a = Bc[n] || ke;
|
|
2628
|
+
let l, c;
|
|
2629
|
+
a !== ke && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && ft(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = at(Ic, Qr(e[0], e[1])), e = [0, 100]);
|
|
2630
|
+
const u = a({ ...this.options, keyframes: e });
|
|
2631
|
+
o === "mirror" && (c = a({
|
|
2632
2632
|
...this.options,
|
|
2633
2633
|
keyframes: [...e].reverse(),
|
|
2634
2634
|
velocity: -r
|
|
2635
|
-
})),
|
|
2636
|
-
const { calculatedDuration:
|
|
2635
|
+
})), u.calculatedDuration === null && (u.calculatedDuration = Fc(u));
|
|
2636
|
+
const { calculatedDuration: f } = u, d = f + s, p = d * (i + 1) - s;
|
|
2637
2637
|
return {
|
|
2638
|
-
generator:
|
|
2639
|
-
mirroredGenerator:
|
|
2638
|
+
generator: u,
|
|
2639
|
+
mirroredGenerator: c,
|
|
2640
2640
|
mapPercentToKeyframes: l,
|
|
2641
|
-
calculatedDuration:
|
|
2641
|
+
calculatedDuration: f,
|
|
2642
2642
|
resolvedDuration: d,
|
|
2643
2643
|
totalDuration: p
|
|
2644
2644
|
};
|
|
@@ -2650,35 +2650,35 @@ class si extends Wr {
|
|
|
2650
2650
|
tick(e, n = !1) {
|
|
2651
2651
|
const { resolved: i } = this;
|
|
2652
2652
|
if (!i) {
|
|
2653
|
-
const { keyframes:
|
|
2654
|
-
return { done: !0, value:
|
|
2653
|
+
const { keyframes: E } = this.options;
|
|
2654
|
+
return { done: !0, value: E[E.length - 1] };
|
|
2655
2655
|
}
|
|
2656
|
-
const { finalKeyframe: s, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration:
|
|
2656
|
+
const { finalKeyframe: s, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: f } = i;
|
|
2657
2657
|
if (this.startTime === null)
|
|
2658
2658
|
return o.next(0);
|
|
2659
2659
|
const { delay: d, repeat: p, repeatType: g, repeatDelay: P, onUpdate: b } = this.options;
|
|
2660
|
-
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e -
|
|
2661
|
-
const x = this.currentTime - d * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? x < 0 : x >
|
|
2662
|
-
this.currentTime = Math.max(x, 0), this.state === "finished" && this.holdTime === null && (this.currentTime =
|
|
2660
|
+
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - u / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
2661
|
+
const x = this.currentTime - d * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? x < 0 : x > u;
|
|
2662
|
+
this.currentTime = Math.max(x, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
|
|
2663
2663
|
let v = this.currentTime, C = o;
|
|
2664
2664
|
if (p) {
|
|
2665
|
-
const
|
|
2666
|
-
let G = Math.floor(
|
|
2667
|
-
!
|
|
2665
|
+
const E = Math.min(this.currentTime, u) / f;
|
|
2666
|
+
let G = Math.floor(E), H = E % 1;
|
|
2667
|
+
!H && E >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (g === "reverse" ? (H = 1 - H, P && (H -= P / f)) : g === "mirror" && (C = r)), v = yt(0, 1, H) * f;
|
|
2668
2668
|
}
|
|
2669
2669
|
const w = y ? { done: !1, value: l[0] } : C.next(v);
|
|
2670
2670
|
a && (w.value = a(w.value));
|
|
2671
2671
|
let { done: L } = w;
|
|
2672
|
-
!y &&
|
|
2672
|
+
!y && c !== null && (L = this.speed >= 0 ? this.currentTime >= u : this.currentTime <= 0);
|
|
2673
2673
|
const q = this.holdTime === null && (this.state === "finished" || this.state === "running" && L);
|
|
2674
2674
|
return q && s !== void 0 && (w.value = $e(l, this.options, s)), b && b(w.value), q && this.finish(), w;
|
|
2675
2675
|
}
|
|
2676
2676
|
get duration() {
|
|
2677
2677
|
const { resolved: e } = this;
|
|
2678
|
-
return e ?
|
|
2678
|
+
return e ? ct(e.calculatedDuration) : 0;
|
|
2679
2679
|
}
|
|
2680
2680
|
get time() {
|
|
2681
|
-
return
|
|
2681
|
+
return ct(this.currentTime);
|
|
2682
2682
|
}
|
|
2683
2683
|
set time(e) {
|
|
2684
2684
|
e = lt(e), this.currentTime = e, this.holdTime !== null || this.speed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.speed);
|
|
@@ -2688,7 +2688,7 @@ class si extends Wr {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
set speed(e) {
|
|
2690
2690
|
const n = this.playbackSpeed !== e;
|
|
2691
|
-
this.playbackSpeed = e, n && (this.time =
|
|
2691
|
+
this.playbackSpeed = e, n && (this.time = ct(this.currentTime));
|
|
2692
2692
|
}
|
|
2693
2693
|
play() {
|
|
2694
2694
|
if (this.resolver.isScheduled || this.resolver.resume(), !this._resolved) {
|
|
@@ -2697,7 +2697,7 @@ class si extends Wr {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
if (this.isStopped)
|
|
2699
2699
|
return;
|
|
2700
|
-
const { driver: e =
|
|
2700
|
+
const { driver: e = _c, onPlay: n } = this.options;
|
|
2701
2701
|
this.driver || (this.driver = e((s) => this.tick(s))), n && n();
|
|
2702
2702
|
const i = this.driver.now();
|
|
2703
2703
|
this.holdTime !== null ? this.startTime = i - this.holdTime : (!this.startTime || this.state === "finished") && (this.startTime = i), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -2746,31 +2746,31 @@ const Zt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, ri = {
|
|
|
2746
2746
|
backIn: Zt([0.31, 0.01, 0.66, -0.59]),
|
|
2747
2747
|
backOut: Zt([0.33, 1.53, 0.69, 0.99])
|
|
2748
2748
|
};
|
|
2749
|
-
function
|
|
2749
|
+
function Nc(t) {
|
|
2750
2750
|
return no(t) || ri.easeOut;
|
|
2751
2751
|
}
|
|
2752
2752
|
function no(t) {
|
|
2753
2753
|
if (t)
|
|
2754
|
-
return to(t) ? Zt(t) : Array.isArray(t) ? t.map(
|
|
2754
|
+
return to(t) ? Zt(t) : Array.isArray(t) ? t.map(Nc) : ri[t];
|
|
2755
2755
|
}
|
|
2756
|
-
function
|
|
2757
|
-
const
|
|
2758
|
-
l && (
|
|
2759
|
-
const
|
|
2760
|
-
return Array.isArray(
|
|
2756
|
+
function Uc(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a, times: l } = {}) {
|
|
2757
|
+
const c = { [e]: n };
|
|
2758
|
+
l && (c.offset = l);
|
|
2759
|
+
const u = no(a);
|
|
2760
|
+
return Array.isArray(u) && (c.easing = u), t.animate(c, {
|
|
2761
2761
|
delay: i,
|
|
2762
2762
|
duration: s,
|
|
2763
|
-
easing: Array.isArray(
|
|
2763
|
+
easing: Array.isArray(u) ? "linear" : u,
|
|
2764
2764
|
fill: "both",
|
|
2765
2765
|
iterations: o + 1,
|
|
2766
2766
|
direction: r === "reverse" ? "alternate" : "normal"
|
|
2767
2767
|
});
|
|
2768
2768
|
}
|
|
2769
|
-
const
|
|
2770
|
-
function
|
|
2769
|
+
const Wc = Ur(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Le = 10, $c = 2e4;
|
|
2770
|
+
function Kc(t) {
|
|
2771
2771
|
return t.type === "spring" || !eo(t.ease);
|
|
2772
2772
|
}
|
|
2773
|
-
function
|
|
2773
|
+
function Gc(t, e) {
|
|
2774
2774
|
const n = new si({
|
|
2775
2775
|
...e,
|
|
2776
2776
|
keyframes: t,
|
|
@@ -2781,7 +2781,7 @@ function Gu(t, e) {
|
|
|
2781
2781
|
let i = { done: !1, value: t[0] };
|
|
2782
2782
|
const s = [];
|
|
2783
2783
|
let o = 0;
|
|
2784
|
-
for (; !i.done && o < $
|
|
2784
|
+
for (; !i.done && o < $c; )
|
|
2785
2785
|
i = n.sample(o), s.push(i.value), o += Le;
|
|
2786
2786
|
return {
|
|
2787
2787
|
times: void 0,
|
|
@@ -2798,19 +2798,19 @@ class ns extends Wr {
|
|
|
2798
2798
|
}
|
|
2799
2799
|
initPlayback(e, n) {
|
|
2800
2800
|
var i;
|
|
2801
|
-
let { duration: s = 300, times: o, ease: r, type: a, motionValue: l, name:
|
|
2801
|
+
let { duration: s = 300, times: o, ease: r, type: a, motionValue: l, name: c } = this.options;
|
|
2802
2802
|
if (!(!((i = l.owner) === null || i === void 0) && i.current))
|
|
2803
2803
|
return !1;
|
|
2804
|
-
if (
|
|
2805
|
-
const { onComplete:
|
|
2804
|
+
if (Kc(this.options)) {
|
|
2805
|
+
const { onComplete: f, onUpdate: d, motionValue: p, ...g } = this.options, P = Gc(e, g);
|
|
2806
2806
|
e = P.keyframes, e.length === 1 && (e[1] = e[0]), s = P.duration, o = P.times, r = P.ease, a = "keyframes";
|
|
2807
2807
|
}
|
|
2808
|
-
const
|
|
2809
|
-
return
|
|
2810
|
-
const { onComplete:
|
|
2811
|
-
l.set($e(e, this.options, n)),
|
|
2808
|
+
const u = Uc(l.owner.current, c, e, { ...this.options, duration: s, times: o, ease: r });
|
|
2809
|
+
return u.startTime = gt.now(), this.pendingTimeline ? (u.timeline = this.pendingTimeline, this.pendingTimeline = void 0) : u.onfinish = () => {
|
|
2810
|
+
const { onComplete: f } = this.options;
|
|
2811
|
+
l.set($e(e, this.options, n)), f && f(), this.cancel(), this.resolveFinishedPromise();
|
|
2812
2812
|
}, {
|
|
2813
|
-
animation:
|
|
2813
|
+
animation: u,
|
|
2814
2814
|
duration: s,
|
|
2815
2815
|
times: o,
|
|
2816
2816
|
type: a,
|
|
@@ -2823,14 +2823,14 @@ class ns extends Wr {
|
|
|
2823
2823
|
if (!e)
|
|
2824
2824
|
return 0;
|
|
2825
2825
|
const { duration: n } = e;
|
|
2826
|
-
return
|
|
2826
|
+
return ct(n);
|
|
2827
2827
|
}
|
|
2828
2828
|
get time() {
|
|
2829
2829
|
const { resolved: e } = this;
|
|
2830
2830
|
if (!e)
|
|
2831
2831
|
return 0;
|
|
2832
2832
|
const { animation: n } = e;
|
|
2833
|
-
return
|
|
2833
|
+
return ct(n.currentTime || 0);
|
|
2834
2834
|
}
|
|
2835
2835
|
set time(e) {
|
|
2836
2836
|
const { resolved: n } = this;
|
|
@@ -2903,7 +2903,7 @@ class ns extends Wr {
|
|
|
2903
2903
|
if (n.playState === "idle" || n.playState === "finished")
|
|
2904
2904
|
return;
|
|
2905
2905
|
if (this.time) {
|
|
2906
|
-
const { motionValue:
|
|
2906
|
+
const { motionValue: c, onUpdate: u, onComplete: f, ...d } = this.options, p = new si({
|
|
2907
2907
|
...d,
|
|
2908
2908
|
keyframes: i,
|
|
2909
2909
|
duration: s,
|
|
@@ -2912,7 +2912,7 @@ class ns extends Wr {
|
|
|
2912
2912
|
times: a,
|
|
2913
2913
|
isGenerator: !0
|
|
2914
2914
|
}), g = lt(this.time);
|
|
2915
|
-
|
|
2915
|
+
c.setWithVelocity(p.sample(g - Le).value, p.sample(g).value, Le);
|
|
2916
2916
|
}
|
|
2917
2917
|
const { onStop: l } = this.options;
|
|
2918
2918
|
l && l(), this.cancel();
|
|
@@ -2927,14 +2927,14 @@ class ns extends Wr {
|
|
|
2927
2927
|
}
|
|
2928
2928
|
static supports(e) {
|
|
2929
2929
|
const { motionValue: n, name: i, repeatDelay: s, repeatType: o, damping: r, type: a } = e;
|
|
2930
|
-
return
|
|
2930
|
+
return Wc() && i && vr.has(i) && n && n.owner && n.owner.current instanceof HTMLElement && /**
|
|
2931
2931
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
2932
2932
|
* no way to read the value from WAAPI every frame.
|
|
2933
2933
|
*/
|
|
2934
2934
|
!n.owner.getProps().onUpdate && !s && o !== "mirror" && r !== 0 && a !== "inertia";
|
|
2935
2935
|
}
|
|
2936
2936
|
}
|
|
2937
|
-
function
|
|
2937
|
+
function zc(t, e) {
|
|
2938
2938
|
let n;
|
|
2939
2939
|
const i = () => {
|
|
2940
2940
|
const { currentTime: s } = e, r = (s === null ? 0 : s.value) / 100;
|
|
@@ -2942,8 +2942,8 @@ function Hu(t, e) {
|
|
|
2942
2942
|
};
|
|
2943
2943
|
return M.update(i, !0), () => ht(i);
|
|
2944
2944
|
}
|
|
2945
|
-
const
|
|
2946
|
-
class
|
|
2945
|
+
const Hc = Ur(() => window.ScrollTimeline !== void 0);
|
|
2946
|
+
class Yc {
|
|
2947
2947
|
constructor(e) {
|
|
2948
2948
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
2949
2949
|
}
|
|
@@ -2962,10 +2962,10 @@ class Yu {
|
|
|
2962
2962
|
}
|
|
2963
2963
|
attachTimeline(e) {
|
|
2964
2964
|
const n = this.animations.map((i) => {
|
|
2965
|
-
if (
|
|
2965
|
+
if (Hc() && i.attachTimeline)
|
|
2966
2966
|
i.attachTimeline(e);
|
|
2967
2967
|
else
|
|
2968
|
-
return i.pause(),
|
|
2968
|
+
return i.pause(), zc((s) => {
|
|
2969
2969
|
i.time = i.duration * s;
|
|
2970
2970
|
}, e);
|
|
2971
2971
|
});
|
|
@@ -3010,15 +3010,15 @@ class Yu {
|
|
|
3010
3010
|
}
|
|
3011
3011
|
}
|
|
3012
3012
|
const oi = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
3013
|
-
const l = Zn(i, t) || {},
|
|
3014
|
-
let { elapsed:
|
|
3015
|
-
|
|
3016
|
-
let
|
|
3013
|
+
const l = Zn(i, t) || {}, c = l.delay || i.delay || 0;
|
|
3014
|
+
let { elapsed: u = 0 } = i;
|
|
3015
|
+
u = u - lt(c);
|
|
3016
|
+
let f = {
|
|
3017
3017
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
3018
3018
|
ease: "easeOut",
|
|
3019
3019
|
velocity: e.getVelocity(),
|
|
3020
3020
|
...l,
|
|
3021
|
-
delay: -
|
|
3021
|
+
delay: -u,
|
|
3022
3022
|
onUpdate: (p) => {
|
|
3023
3023
|
e.set(p), l.onUpdate && l.onUpdate(p);
|
|
3024
3024
|
},
|
|
@@ -3030,19 +3030,19 @@ const oi = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
|
3030
3030
|
motionValue: e,
|
|
3031
3031
|
element: o ? void 0 : s
|
|
3032
3032
|
};
|
|
3033
|
-
|
|
3034
|
-
...
|
|
3035
|
-
...Rl(t,
|
|
3036
|
-
}),
|
|
3033
|
+
El(l) || (f = {
|
|
3034
|
+
...f,
|
|
3035
|
+
...Rl(t, f)
|
|
3036
|
+
}), f.duration && (f.duration = lt(f.duration)), f.repeatDelay && (f.repeatDelay = lt(f.repeatDelay)), f.from !== void 0 && (f.keyframes[0] = f.from);
|
|
3037
3037
|
let d = !1;
|
|
3038
|
-
if ((
|
|
3039
|
-
const p = $e(
|
|
3038
|
+
if ((f.type === !1 || f.duration === 0 && !f.repeatDelay) && (f.duration = 0, f.delay === 0 && (d = !0)), d && !o && e.get() !== void 0) {
|
|
3039
|
+
const p = $e(f.keyframes, l);
|
|
3040
3040
|
if (p !== void 0)
|
|
3041
3041
|
return M.update(() => {
|
|
3042
|
-
|
|
3043
|
-
}), new
|
|
3042
|
+
f.onUpdate(p), f.onComplete();
|
|
3043
|
+
}), new Yc([]);
|
|
3044
3044
|
}
|
|
3045
|
-
return !o && ns.supports(
|
|
3045
|
+
return !o && ns.supports(f) ? new ns(f) : new si(f);
|
|
3046
3046
|
};
|
|
3047
3047
|
class ai {
|
|
3048
3048
|
constructor() {
|
|
@@ -3073,7 +3073,7 @@ const is = /* @__PURE__ */ new Set();
|
|
|
3073
3073
|
function li(t, e, n) {
|
|
3074
3074
|
t || is.has(e) || (console.warn(e), n && console.warn(n), is.add(e));
|
|
3075
3075
|
}
|
|
3076
|
-
const ss = 30,
|
|
3076
|
+
const ss = 30, Xc = (t) => !isNaN(parseFloat(t));
|
|
3077
3077
|
class io {
|
|
3078
3078
|
/**
|
|
3079
3079
|
* @param init - The initiating value
|
|
@@ -3090,7 +3090,7 @@ class io {
|
|
|
3090
3090
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
3091
3091
|
}
|
|
3092
3092
|
setCurrent(e) {
|
|
3093
|
-
this.current = e, this.updatedAt = gt.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity =
|
|
3093
|
+
this.current = e, this.updatedAt = gt.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Xc(this.current));
|
|
3094
3094
|
}
|
|
3095
3095
|
setPrevFrameValue(e = this.current) {
|
|
3096
3096
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -3271,22 +3271,22 @@ class io {
|
|
|
3271
3271
|
function le(t, e) {
|
|
3272
3272
|
return new io(t, e);
|
|
3273
3273
|
}
|
|
3274
|
-
function
|
|
3274
|
+
function qc(t, e, n) {
|
|
3275
3275
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, le(n));
|
|
3276
3276
|
}
|
|
3277
|
-
function
|
|
3277
|
+
function Zc(t, e) {
|
|
3278
3278
|
const n = We(t, e);
|
|
3279
3279
|
let { transitionEnd: i = {}, transition: s = {}, ...o } = n || {};
|
|
3280
3280
|
o = { ...o, ...i };
|
|
3281
3281
|
for (const r in o) {
|
|
3282
3282
|
const a = il(o[r]);
|
|
3283
|
-
|
|
3283
|
+
qc(t, r, a);
|
|
3284
3284
|
}
|
|
3285
3285
|
}
|
|
3286
3286
|
function so(t) {
|
|
3287
3287
|
return t.getProps()[nr];
|
|
3288
3288
|
}
|
|
3289
|
-
class
|
|
3289
|
+
class Jc extends io {
|
|
3290
3290
|
constructor() {
|
|
3291
3291
|
super(...arguments), this.output = [], this.counts = /* @__PURE__ */ new Map();
|
|
3292
3292
|
}
|
|
@@ -3309,7 +3309,7 @@ class Ju extends io {
|
|
|
3309
3309
|
this.set(this.output.length ? this.output.join(", ") : "auto");
|
|
3310
3310
|
}
|
|
3311
3311
|
}
|
|
3312
|
-
function
|
|
3312
|
+
function Qc(t) {
|
|
3313
3313
|
return !!(K(t) && t.add);
|
|
3314
3314
|
}
|
|
3315
3315
|
function Sn(t, e) {
|
|
@@ -3317,10 +3317,10 @@ function Sn(t, e) {
|
|
|
3317
3317
|
if (!t.applyWillChange)
|
|
3318
3318
|
return;
|
|
3319
3319
|
let i = t.getValue("willChange");
|
|
3320
|
-
if (!i && !(!((n = t.props.style) === null || n === void 0) && n.willChange) && (i = new
|
|
3320
|
+
if (!i && !(!((n = t.props.style) === null || n === void 0) && n.willChange) && (i = new Jc("auto"), t.addValue("willChange", i)), Qc(i))
|
|
3321
3321
|
return i.add(e);
|
|
3322
3322
|
}
|
|
3323
|
-
function
|
|
3323
|
+
function tu({ protectedKeys: t, needsAnimating: e }, n) {
|
|
3324
3324
|
const i = t.hasOwnProperty(n) && e[n] !== !0;
|
|
3325
3325
|
return e[n] = !1, i;
|
|
3326
3326
|
}
|
|
@@ -3328,62 +3328,62 @@ function ro(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3328
3328
|
var o;
|
|
3329
3329
|
let { transition: r = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
|
|
3330
3330
|
i && (r = i);
|
|
3331
|
-
const
|
|
3332
|
-
for (const
|
|
3333
|
-
const d = t.getValue(
|
|
3334
|
-
if (p === void 0 ||
|
|
3331
|
+
const c = [], u = s && t.animationState && t.animationState.getState()[s];
|
|
3332
|
+
for (const f in l) {
|
|
3333
|
+
const d = t.getValue(f, (o = t.latestValues[f]) !== null && o !== void 0 ? o : null), p = l[f];
|
|
3334
|
+
if (p === void 0 || u && tu(u, f))
|
|
3335
3335
|
continue;
|
|
3336
3336
|
const g = {
|
|
3337
3337
|
delay: n,
|
|
3338
3338
|
elapsed: 0,
|
|
3339
|
-
...Zn(r || {},
|
|
3339
|
+
...Zn(r || {}, f)
|
|
3340
3340
|
};
|
|
3341
3341
|
let P = !1;
|
|
3342
3342
|
if (window.HandoffAppearAnimations) {
|
|
3343
3343
|
const x = so(t);
|
|
3344
3344
|
if (x) {
|
|
3345
|
-
const y = window.HandoffAppearAnimations(x,
|
|
3345
|
+
const y = window.HandoffAppearAnimations(x, f, d, M);
|
|
3346
3346
|
y !== null && (g.elapsed = y, P = !0);
|
|
3347
3347
|
}
|
|
3348
3348
|
}
|
|
3349
|
-
d.start(oi(
|
|
3349
|
+
d.start(oi(f, d, p, t.shouldReduceMotion && Pt.has(f) ? { type: !1 } : g, t, P, Sn(t, f)));
|
|
3350
3350
|
const b = d.animation;
|
|
3351
|
-
b &&
|
|
3351
|
+
b && c.push(b);
|
|
3352
3352
|
}
|
|
3353
|
-
return a && Promise.all(
|
|
3353
|
+
return a && Promise.all(c).then(() => {
|
|
3354
3354
|
M.update(() => {
|
|
3355
|
-
a &&
|
|
3355
|
+
a && Zc(t, a);
|
|
3356
3356
|
});
|
|
3357
|
-
}),
|
|
3357
|
+
}), c;
|
|
3358
3358
|
}
|
|
3359
3359
|
function Cn(t, e, n = {}) {
|
|
3360
3360
|
var i;
|
|
3361
3361
|
const s = We(t, e, n.type === "exit" ? (i = t.presenceContext) === null || i === void 0 ? void 0 : i.custom : void 0);
|
|
3362
3362
|
let { transition: o = t.getDefaultTransition() || {} } = s || {};
|
|
3363
3363
|
n.transitionOverride && (o = n.transitionOverride);
|
|
3364
|
-
const r = s ? () => Promise.all(ro(t, s, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (
|
|
3365
|
-
const { delayChildren:
|
|
3366
|
-
return
|
|
3364
|
+
const r = s ? () => Promise.all(ro(t, s, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (c = 0) => {
|
|
3365
|
+
const { delayChildren: u = 0, staggerChildren: f, staggerDirection: d } = o;
|
|
3366
|
+
return eu(t, e, u + c, f, d, n);
|
|
3367
3367
|
} : () => Promise.resolve(), { when: l } = o;
|
|
3368
3368
|
if (l) {
|
|
3369
|
-
const [
|
|
3370
|
-
return
|
|
3369
|
+
const [c, u] = l === "beforeChildren" ? [r, a] : [a, r];
|
|
3370
|
+
return c().then(() => u());
|
|
3371
3371
|
} else
|
|
3372
3372
|
return Promise.all([r(), a(n.delay)]);
|
|
3373
3373
|
}
|
|
3374
|
-
function
|
|
3375
|
-
const r = [], a = (t.variantChildren.size - 1) * i, l = s === 1 ? (
|
|
3376
|
-
return Array.from(t.variantChildren).sort(
|
|
3377
|
-
|
|
3374
|
+
function eu(t, e, n = 0, i = 0, s = 1, o) {
|
|
3375
|
+
const r = [], a = (t.variantChildren.size - 1) * i, l = s === 1 ? (c = 0) => c * i : (c = 0) => a - c * i;
|
|
3376
|
+
return Array.from(t.variantChildren).sort(nu).forEach((c, u) => {
|
|
3377
|
+
c.notify("AnimationStart", e), r.push(Cn(c, e, {
|
|
3378
3378
|
...o,
|
|
3379
|
-
delay: n + l(
|
|
3380
|
-
}).then(() =>
|
|
3379
|
+
delay: n + l(u)
|
|
3380
|
+
}).then(() => c.notify("AnimationComplete", e)));
|
|
3381
3381
|
}), Promise.all(r);
|
|
3382
3382
|
}
|
|
3383
|
-
function
|
|
3383
|
+
function nu(t, e) {
|
|
3384
3384
|
return t.sortNodePosition(e);
|
|
3385
3385
|
}
|
|
3386
|
-
function
|
|
3386
|
+
function iu(t, e, n = {}) {
|
|
3387
3387
|
t.notify("AnimationStart", e);
|
|
3388
3388
|
let i;
|
|
3389
3389
|
if (Array.isArray(e)) {
|
|
@@ -3399,47 +3399,47 @@ function ic(t, e, n = {}) {
|
|
|
3399
3399
|
t.notify("AnimationComplete", e);
|
|
3400
3400
|
});
|
|
3401
3401
|
}
|
|
3402
|
-
const
|
|
3403
|
-
function
|
|
3404
|
-
return (e) => Promise.all(e.map(({ animation: n, options: i }) =>
|
|
3402
|
+
const su = [..._n].reverse(), ru = _n.length;
|
|
3403
|
+
function ou(t) {
|
|
3404
|
+
return (e) => Promise.all(e.map(({ animation: n, options: i }) => iu(t, n, i)));
|
|
3405
3405
|
}
|
|
3406
|
-
function
|
|
3407
|
-
let e =
|
|
3408
|
-
const s = (l) => (
|
|
3409
|
-
var
|
|
3410
|
-
const d = We(t,
|
|
3406
|
+
function au(t) {
|
|
3407
|
+
let e = ou(t), n = rs(), i = !0;
|
|
3408
|
+
const s = (l) => (c, u) => {
|
|
3409
|
+
var f;
|
|
3410
|
+
const d = We(t, u, l === "exit" ? (f = t.presenceContext) === null || f === void 0 ? void 0 : f.custom : void 0);
|
|
3411
3411
|
if (d) {
|
|
3412
3412
|
const { transition: p, transitionEnd: g, ...P } = d;
|
|
3413
|
-
|
|
3413
|
+
c = { ...c, ...P, ...g };
|
|
3414
3414
|
}
|
|
3415
|
-
return
|
|
3415
|
+
return c;
|
|
3416
3416
|
};
|
|
3417
3417
|
function o(l) {
|
|
3418
3418
|
e = l(t);
|
|
3419
3419
|
}
|
|
3420
3420
|
function r(l) {
|
|
3421
|
-
const
|
|
3421
|
+
const c = t.getProps(), u = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
3422
3422
|
let p = {}, g = 1 / 0;
|
|
3423
|
-
for (let b = 0; b <
|
|
3424
|
-
const x =
|
|
3423
|
+
for (let b = 0; b < ru; b++) {
|
|
3424
|
+
const x = su[b], y = n[x], v = c[x] !== void 0 ? c[x] : u[x], C = se(v), w = x === l ? y.isActive : null;
|
|
3425
3425
|
w === !1 && (g = b);
|
|
3426
|
-
let L = v ===
|
|
3426
|
+
let L = v === u[x] && v !== c[x] && C;
|
|
3427
3427
|
if (L && i && t.manuallyAnimateOnMount && (L = !1), y.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3428
3428
|
!y.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
|
|
3429
3429
|
!v && !y.prevProp || // Or if the prop doesn't define an animation
|
|
3430
3430
|
re(v) || typeof v == "boolean")
|
|
3431
3431
|
continue;
|
|
3432
|
-
let
|
|
3432
|
+
let E = lu(y.prevProp, v) || // If we're making this variant active, we want to always make it active
|
|
3433
3433
|
x === l && y.isActive && !L && C || // If we removed a higher-priority variant (i is in reverse order)
|
|
3434
3434
|
b > g && C, G = !1;
|
|
3435
|
-
const
|
|
3436
|
-
let dt =
|
|
3435
|
+
const H = Array.isArray(v) ? v : [v];
|
|
3436
|
+
let dt = H.reduce(s(x), {});
|
|
3437
3437
|
w === !1 && (dt = {});
|
|
3438
3438
|
const { prevResolvedValues: Gt = {} } = y, Z = {
|
|
3439
3439
|
...Gt,
|
|
3440
3440
|
...dt
|
|
3441
3441
|
}, it = (F) => {
|
|
3442
|
-
|
|
3442
|
+
E = !0, d.has(F) && (G = !0, d.delete(F)), y.needsAnimating[F] = !0;
|
|
3443
3443
|
const J = t.getValue(F);
|
|
3444
3444
|
J && (J.liveStyle = !1);
|
|
3445
3445
|
};
|
|
@@ -3450,7 +3450,7 @@ function ac(t) {
|
|
|
3450
3450
|
let Mt = !1;
|
|
3451
3451
|
gn(J) && gn(Dt) ? Mt = !Ar(J, Dt) : Mt = J !== Dt, Mt ? J != null ? it(F) : d.add(F) : J !== void 0 && d.has(F) ? it(F) : y.protectedKeys[F] = !0;
|
|
3452
3452
|
}
|
|
3453
|
-
y.prevProp = v, y.prevResolvedValues = dt, y.isActive && (p = { ...p, ...dt }), i && t.blockInitialAnimation && (
|
|
3453
|
+
y.prevProp = v, y.prevResolvedValues = dt, y.isActive && (p = { ...p, ...dt }), i && t.blockInitialAnimation && (E = !1), E && (!L || G) && f.push(...H.map((F) => ({
|
|
3454
3454
|
animation: F,
|
|
3455
3455
|
options: { type: x }
|
|
3456
3456
|
})));
|
|
@@ -3460,23 +3460,23 @@ function ac(t) {
|
|
|
3460
3460
|
d.forEach((x) => {
|
|
3461
3461
|
const y = t.getBaseTarget(x), v = t.getValue(x);
|
|
3462
3462
|
v && (v.liveStyle = !0), b[x] = y ?? null;
|
|
3463
|
-
}),
|
|
3463
|
+
}), f.push({ animation: b });
|
|
3464
3464
|
}
|
|
3465
|
-
let P = !!
|
|
3466
|
-
return i && (
|
|
3465
|
+
let P = !!f.length;
|
|
3466
|
+
return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (P = !1), i = !1, P ? e(f) : Promise.resolve();
|
|
3467
3467
|
}
|
|
3468
|
-
function a(l,
|
|
3469
|
-
var
|
|
3470
|
-
if (n[l].isActive ===
|
|
3468
|
+
function a(l, c) {
|
|
3469
|
+
var u;
|
|
3470
|
+
if (n[l].isActive === c)
|
|
3471
3471
|
return Promise.resolve();
|
|
3472
|
-
(
|
|
3472
|
+
(u = t.variantChildren) === null || u === void 0 || u.forEach((d) => {
|
|
3473
3473
|
var p;
|
|
3474
|
-
return (p = d.animationState) === null || p === void 0 ? void 0 : p.setActive(l,
|
|
3475
|
-
}), n[l].isActive =
|
|
3476
|
-
const
|
|
3474
|
+
return (p = d.animationState) === null || p === void 0 ? void 0 : p.setActive(l, c);
|
|
3475
|
+
}), n[l].isActive = c;
|
|
3476
|
+
const f = r(l);
|
|
3477
3477
|
for (const d in n)
|
|
3478
3478
|
n[d].protectedKeys = {};
|
|
3479
|
-
return
|
|
3479
|
+
return f;
|
|
3480
3480
|
}
|
|
3481
3481
|
return {
|
|
3482
3482
|
animateChanges: r,
|
|
@@ -3488,7 +3488,7 @@ function ac(t) {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
};
|
|
3490
3490
|
}
|
|
3491
|
-
function
|
|
3491
|
+
function lu(t, e) {
|
|
3492
3492
|
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Ar(e, t) : !1;
|
|
3493
3493
|
}
|
|
3494
3494
|
function bt(t = !1) {
|
|
@@ -3510,14 +3510,14 @@ function rs() {
|
|
|
3510
3510
|
exit: bt()
|
|
3511
3511
|
};
|
|
3512
3512
|
}
|
|
3513
|
-
class
|
|
3513
|
+
class cu extends xt {
|
|
3514
3514
|
/**
|
|
3515
3515
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3516
3516
|
* to the underlying animation library. We only want to load that if we load this,
|
|
3517
3517
|
* so people can optionally code split it out using the `m` component.
|
|
3518
3518
|
*/
|
|
3519
3519
|
constructor(e) {
|
|
3520
|
-
super(e), e.animationState || (e.animationState =
|
|
3520
|
+
super(e), e.animationState || (e.animationState = au(e));
|
|
3521
3521
|
}
|
|
3522
3522
|
updateAnimationControlsSubscription() {
|
|
3523
3523
|
const { animate: e } = this.node.getProps();
|
|
@@ -3538,10 +3538,10 @@ class uc extends xt {
|
|
|
3538
3538
|
this.node.animationState.reset(), (e = this.unmountControls) === null || e === void 0 || e.call(this);
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
|
-
let
|
|
3542
|
-
class
|
|
3541
|
+
let uu = 0;
|
|
3542
|
+
class fu extends xt {
|
|
3543
3543
|
constructor() {
|
|
3544
|
-
super(...arguments), this.id =
|
|
3544
|
+
super(...arguments), this.id = uu++;
|
|
3545
3545
|
}
|
|
3546
3546
|
update() {
|
|
3547
3547
|
if (!this.node.presenceContext)
|
|
@@ -3559,15 +3559,15 @@ class fc extends xt {
|
|
|
3559
3559
|
unmount() {
|
|
3560
3560
|
}
|
|
3561
3561
|
}
|
|
3562
|
-
const
|
|
3562
|
+
const hu = {
|
|
3563
3563
|
animation: {
|
|
3564
|
-
Feature:
|
|
3564
|
+
Feature: cu
|
|
3565
3565
|
},
|
|
3566
3566
|
exit: {
|
|
3567
|
-
Feature:
|
|
3567
|
+
Feature: fu
|
|
3568
3568
|
}
|
|
3569
3569
|
}, os = (t, e) => Math.abs(t - e);
|
|
3570
|
-
function
|
|
3570
|
+
function du(t, e) {
|
|
3571
3571
|
const n = os(t.x, e.x), i = os(t.y, e.y);
|
|
3572
3572
|
return Math.sqrt(n ** 2 + i ** 2);
|
|
3573
3573
|
}
|
|
@@ -3576,29 +3576,29 @@ class oo {
|
|
|
3576
3576
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3577
3577
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3578
3578
|
return;
|
|
3579
|
-
const
|
|
3579
|
+
const f = ln(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, p = du(f.offset, { x: 0, y: 0 }) >= 3;
|
|
3580
3580
|
if (!d && !p)
|
|
3581
3581
|
return;
|
|
3582
|
-
const { point: g } =
|
|
3582
|
+
const { point: g } = f, { timestamp: P } = N;
|
|
3583
3583
|
this.history.push({ ...g, timestamp: P });
|
|
3584
3584
|
const { onStart: b, onMove: x } = this.handlers;
|
|
3585
|
-
d || (b && b(this.lastMoveEvent,
|
|
3586
|
-
}, this.handlePointerMove = (
|
|
3587
|
-
this.lastMoveEvent =
|
|
3588
|
-
}, this.handlePointerUp = (
|
|
3585
|
+
d || (b && b(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), x && x(this.lastMoveEvent, f);
|
|
3586
|
+
}, this.handlePointerMove = (f, d) => {
|
|
3587
|
+
this.lastMoveEvent = f, this.lastMoveEventInfo = an(d, this.transformPagePoint), M.update(this.updatePoint, !0);
|
|
3588
|
+
}, this.handlePointerUp = (f, d) => {
|
|
3589
3589
|
this.end();
|
|
3590
3590
|
const { onEnd: p, onSessionEnd: g, resumeAnimation: P } = this.handlers;
|
|
3591
3591
|
if (this.dragSnapToOrigin && P && P(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3592
3592
|
return;
|
|
3593
|
-
const b = ln(
|
|
3594
|
-
this.startEvent && p && p(
|
|
3593
|
+
const b = ln(f.type === "pointercancel" ? this.lastMoveEventInfo : an(d, this.transformPagePoint), this.history);
|
|
3594
|
+
this.startEvent && p && p(f, b), g && g(f, b);
|
|
3595
3595
|
}, !Tr(e))
|
|
3596
3596
|
return;
|
|
3597
3597
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
|
|
3598
|
-
const r = Ue(e), a = an(r, this.transformPagePoint), { point: l } = a, { timestamp:
|
|
3599
|
-
this.history = [{ ...l, timestamp:
|
|
3600
|
-
const { onSessionStart:
|
|
3601
|
-
|
|
3598
|
+
const r = Ue(e), a = an(r, this.transformPagePoint), { point: l } = a, { timestamp: c } = N;
|
|
3599
|
+
this.history = [{ ...l, timestamp: c }];
|
|
3600
|
+
const { onSessionStart: u } = n;
|
|
3601
|
+
u && u(e, ln(a, this.history)), this.removeListeners = at(ot(this.contextWindow, "pointermove", this.handlePointerMove), ot(this.contextWindow, "pointerup", this.handlePointerUp), ot(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3602
3602
|
}
|
|
3603
3603
|
updateHandlers(e) {
|
|
3604
3604
|
this.handlers = e;
|
|
@@ -3617,17 +3617,17 @@ function ln({ point: t }, e) {
|
|
|
3617
3617
|
return {
|
|
3618
3618
|
point: t,
|
|
3619
3619
|
delta: as(t, ao(e)),
|
|
3620
|
-
offset: as(t,
|
|
3621
|
-
velocity:
|
|
3620
|
+
offset: as(t, pu(e)),
|
|
3621
|
+
velocity: mu(e, 0.1)
|
|
3622
3622
|
};
|
|
3623
3623
|
}
|
|
3624
|
-
function
|
|
3624
|
+
function pu(t) {
|
|
3625
3625
|
return t[0];
|
|
3626
3626
|
}
|
|
3627
3627
|
function ao(t) {
|
|
3628
3628
|
return t[t.length - 1];
|
|
3629
3629
|
}
|
|
3630
|
-
function
|
|
3630
|
+
function mu(t, e) {
|
|
3631
3631
|
if (t.length < 2)
|
|
3632
3632
|
return { x: 0, y: 0 };
|
|
3633
3633
|
let n = t.length - 1, i = null;
|
|
@@ -3636,7 +3636,7 @@ function mc(t, e) {
|
|
|
3636
3636
|
n--;
|
|
3637
3637
|
if (!i)
|
|
3638
3638
|
return { x: 0, y: 0 };
|
|
3639
|
-
const o =
|
|
3639
|
+
const o = ct(s.timestamp - i.timestamp);
|
|
3640
3640
|
if (o === 0)
|
|
3641
3641
|
return { x: 0, y: 0 };
|
|
3642
3642
|
const r = {
|
|
@@ -3645,32 +3645,32 @@ function mc(t, e) {
|
|
|
3645
3645
|
};
|
|
3646
3646
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
3647
3647
|
}
|
|
3648
|
-
const lo = 1e-4,
|
|
3648
|
+
const lo = 1e-4, gu = 1 - lo, yu = 1 + lo, co = 0.01, vu = 0 - co, Pu = 0 + co;
|
|
3649
3649
|
function X(t) {
|
|
3650
3650
|
return t.max - t.min;
|
|
3651
3651
|
}
|
|
3652
|
-
function
|
|
3652
|
+
function xu(t, e, n) {
|
|
3653
3653
|
return Math.abs(t - e) <= n;
|
|
3654
3654
|
}
|
|
3655
3655
|
function ls(t, e, n, i = 0.5) {
|
|
3656
|
-
t.origin = i, t.originPoint = j(e.min, e.max, t.origin), t.scale = X(n) / X(e), t.translate = j(n.min, n.max, t.origin) - t.originPoint, (t.scale >=
|
|
3656
|
+
t.origin = i, t.originPoint = j(e.min, e.max, t.origin), t.scale = X(n) / X(e), t.translate = j(n.min, n.max, t.origin) - t.originPoint, (t.scale >= gu && t.scale <= yu || isNaN(t.scale)) && (t.scale = 1), (t.translate >= vu && t.translate <= Pu || isNaN(t.translate)) && (t.translate = 0);
|
|
3657
3657
|
}
|
|
3658
3658
|
function ee(t, e, n, i) {
|
|
3659
3659
|
ls(t.x, e.x, n.x, i ? i.originX : void 0), ls(t.y, e.y, n.y, i ? i.originY : void 0);
|
|
3660
3660
|
}
|
|
3661
|
-
function
|
|
3661
|
+
function cs(t, e, n) {
|
|
3662
3662
|
t.min = n.min + e.min, t.max = t.min + X(e);
|
|
3663
3663
|
}
|
|
3664
|
-
function
|
|
3665
|
-
|
|
3664
|
+
function Tu(t, e, n) {
|
|
3665
|
+
cs(t.x, e.x, n.x), cs(t.y, e.y, n.y);
|
|
3666
3666
|
}
|
|
3667
|
-
function
|
|
3667
|
+
function us(t, e, n) {
|
|
3668
3668
|
t.min = e.min - n.min, t.max = t.min + X(e);
|
|
3669
3669
|
}
|
|
3670
3670
|
function ne(t, e, n) {
|
|
3671
|
-
|
|
3671
|
+
us(t.x, e.x, n.x), us(t.y, e.y, n.y);
|
|
3672
3672
|
}
|
|
3673
|
-
function
|
|
3673
|
+
function bu(t, { min: e, max: n }, i) {
|
|
3674
3674
|
return e !== void 0 && t < e ? t = i ? j(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? j(n, t, i.max) : Math.min(t, n)), t;
|
|
3675
3675
|
}
|
|
3676
3676
|
function fs(t, e, n) {
|
|
@@ -3679,7 +3679,7 @@ function fs(t, e, n) {
|
|
|
3679
3679
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
3680
3680
|
};
|
|
3681
3681
|
}
|
|
3682
|
-
function
|
|
3682
|
+
function wu(t, { top: e, left: n, bottom: i, right: s }) {
|
|
3683
3683
|
return {
|
|
3684
3684
|
x: fs(t.x, n, s),
|
|
3685
3685
|
y: fs(t.y, e, i)
|
|
@@ -3689,23 +3689,23 @@ function hs(t, e) {
|
|
|
3689
3689
|
let n = e.min - t.min, i = e.max - t.max;
|
|
3690
3690
|
return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
|
|
3691
3691
|
}
|
|
3692
|
-
function
|
|
3692
|
+
function Su(t, e) {
|
|
3693
3693
|
return {
|
|
3694
3694
|
x: hs(t.x, e.x),
|
|
3695
3695
|
y: hs(t.y, e.y)
|
|
3696
3696
|
};
|
|
3697
3697
|
}
|
|
3698
|
-
function
|
|
3698
|
+
function Cu(t, e) {
|
|
3699
3699
|
let n = 0.5;
|
|
3700
3700
|
const i = X(t), s = X(e);
|
|
3701
3701
|
return s > i ? n = ae(e.min, e.max - i, t.min) : i > s && (n = ae(t.min, t.max - s, e.min)), yt(0, 1, n);
|
|
3702
3702
|
}
|
|
3703
|
-
function
|
|
3703
|
+
function Au(t, e) {
|
|
3704
3704
|
const n = {};
|
|
3705
3705
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3706
3706
|
}
|
|
3707
3707
|
const An = 0.35;
|
|
3708
|
-
function
|
|
3708
|
+
function Ru(t = An) {
|
|
3709
3709
|
return t === !1 ? t = 0 : t === !0 && (t = An), {
|
|
3710
3710
|
x: ds(t, "left", "right"),
|
|
3711
3711
|
y: ds(t, "top", "bottom")
|
|
@@ -3735,16 +3735,16 @@ const ms = () => ({
|
|
|
3735
3735
|
function et(t) {
|
|
3736
3736
|
return [t("x"), t("y")];
|
|
3737
3737
|
}
|
|
3738
|
-
function
|
|
3738
|
+
function uo({ top: t, left: e, right: n, bottom: i }) {
|
|
3739
3739
|
return {
|
|
3740
3740
|
x: { min: e, max: n },
|
|
3741
3741
|
y: { min: t, max: i }
|
|
3742
3742
|
};
|
|
3743
3743
|
}
|
|
3744
|
-
function
|
|
3744
|
+
function Eu({ x: t, y: e }) {
|
|
3745
3745
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
3746
3746
|
}
|
|
3747
|
-
function
|
|
3747
|
+
function Vu(t, e) {
|
|
3748
3748
|
if (!e)
|
|
3749
3749
|
return t;
|
|
3750
3750
|
const n = e({ x: t.left, y: t.top }), i = e({ x: t.right, y: t.bottom });
|
|
@@ -3755,11 +3755,11 @@ function Ec(t, e) {
|
|
|
3755
3755
|
right: i.x
|
|
3756
3756
|
};
|
|
3757
3757
|
}
|
|
3758
|
-
function
|
|
3758
|
+
function cn(t) {
|
|
3759
3759
|
return t === void 0 || t === 1;
|
|
3760
3760
|
}
|
|
3761
3761
|
function Rn({ scale: t, scaleX: e, scaleY: n }) {
|
|
3762
|
-
return !
|
|
3762
|
+
return !cn(t) || !cn(e) || !cn(n);
|
|
3763
3763
|
}
|
|
3764
3764
|
function St(t) {
|
|
3765
3765
|
return Rn(t) || fo(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
@@ -3777,14 +3777,14 @@ function Oe(t, e, n) {
|
|
|
3777
3777
|
function vs(t, e, n, i, s) {
|
|
3778
3778
|
return s !== void 0 && (t = Oe(t, s, i)), Oe(t, n, i) + e;
|
|
3779
3779
|
}
|
|
3780
|
-
function
|
|
3780
|
+
function En(t, e = 0, n = 1, i, s) {
|
|
3781
3781
|
t.min = vs(t.min, e, n, i, s), t.max = vs(t.max, e, n, i, s);
|
|
3782
3782
|
}
|
|
3783
3783
|
function ho(t, { x: e, y: n }) {
|
|
3784
|
-
|
|
3784
|
+
En(t.x, e.translate, e.scale, e.originPoint), En(t.y, n.translate, n.scale, n.originPoint);
|
|
3785
3785
|
}
|
|
3786
3786
|
const Ps = 0.999999999999, xs = 1.0000000000001;
|
|
3787
|
-
function
|
|
3787
|
+
function Du(t, e, n, i = !1) {
|
|
3788
3788
|
const s = n.length;
|
|
3789
3789
|
if (!s)
|
|
3790
3790
|
return;
|
|
@@ -3805,20 +3805,20 @@ function Bt(t, e) {
|
|
|
3805
3805
|
}
|
|
3806
3806
|
function Ts(t, e, n, i, s = 0.5) {
|
|
3807
3807
|
const o = j(t.min, t.max, s);
|
|
3808
|
-
|
|
3808
|
+
En(t, e, n, o, i);
|
|
3809
3809
|
}
|
|
3810
3810
|
function It(t, e) {
|
|
3811
3811
|
Ts(t.x, e.x, e.scaleX, e.scale, e.originX), Ts(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3812
3812
|
}
|
|
3813
3813
|
function po(t, e) {
|
|
3814
|
-
return
|
|
3814
|
+
return uo(Vu(t.getBoundingClientRect(), e));
|
|
3815
3815
|
}
|
|
3816
|
-
function
|
|
3816
|
+
function Mu(t, e, n) {
|
|
3817
3817
|
const i = po(t, n), { scroll: s } = e;
|
|
3818
3818
|
return s && (Bt(i.x, s.offset.x), Bt(i.y, s.offset.y)), i;
|
|
3819
3819
|
}
|
|
3820
|
-
const mo = ({ current: t }) => t ? t.ownerDocument.defaultView : null,
|
|
3821
|
-
class
|
|
3820
|
+
const mo = ({ current: t }) => t ? t.ownerDocument.defaultView : null, ku = /* @__PURE__ */ new WeakMap();
|
|
3821
|
+
class Lu {
|
|
3822
3822
|
constructor(e) {
|
|
3823
3823
|
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = B(), this.visualElement = e;
|
|
3824
3824
|
}
|
|
@@ -3826,10 +3826,10 @@ class Lc {
|
|
|
3826
3826
|
const { presenceContext: i } = this.visualElement;
|
|
3827
3827
|
if (i && i.isPresent === !1)
|
|
3828
3828
|
return;
|
|
3829
|
-
const s = (
|
|
3830
|
-
const { dragSnapToOrigin:
|
|
3831
|
-
|
|
3832
|
-
}, o = (
|
|
3829
|
+
const s = (u) => {
|
|
3830
|
+
const { dragSnapToOrigin: f } = this.getProps();
|
|
3831
|
+
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(Ue(u, "page").point);
|
|
3832
|
+
}, o = (u, f) => {
|
|
3833
3833
|
var d;
|
|
3834
3834
|
const { drag: p, dragPropagation: g, onDragStart: P } = this.getProps();
|
|
3835
3835
|
if (p && !g && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = wr(p), !this.openGlobalLock))
|
|
@@ -3844,23 +3844,23 @@ class Lc {
|
|
|
3844
3844
|
}
|
|
3845
3845
|
}
|
|
3846
3846
|
this.originPoint[x] = y;
|
|
3847
|
-
}), P && M.postRender(() => P(
|
|
3847
|
+
}), P && M.postRender(() => P(u, f)), (d = this.removeWillChange) === null || d === void 0 || d.call(this), this.removeWillChange = Sn(this.visualElement, "transform");
|
|
3848
3848
|
const { animationState: b } = this.visualElement;
|
|
3849
3849
|
b && b.setActive("whileDrag", !0);
|
|
3850
|
-
}, r = (
|
|
3850
|
+
}, r = (u, f) => {
|
|
3851
3851
|
const { dragPropagation: d, dragDirectionLock: p, onDirectionLock: g, onDrag: P } = this.getProps();
|
|
3852
3852
|
if (!d && !this.openGlobalLock)
|
|
3853
3853
|
return;
|
|
3854
|
-
const { offset: b } =
|
|
3854
|
+
const { offset: b } = f;
|
|
3855
3855
|
if (p && this.currentDirection === null) {
|
|
3856
|
-
this.currentDirection =
|
|
3856
|
+
this.currentDirection = Ou(b), this.currentDirection !== null && g && g(this.currentDirection);
|
|
3857
3857
|
return;
|
|
3858
3858
|
}
|
|
3859
|
-
this.updateAxis("x",
|
|
3860
|
-
}, a = (
|
|
3861
|
-
var
|
|
3862
|
-
return this.getAnimationState(
|
|
3863
|
-
}), { dragSnapToOrigin:
|
|
3859
|
+
this.updateAxis("x", f.point, b), this.updateAxis("y", f.point, b), this.visualElement.render(), P && P(u, f);
|
|
3860
|
+
}, a = (u, f) => this.stop(u, f), l = () => et((u) => {
|
|
3861
|
+
var f;
|
|
3862
|
+
return this.getAnimationState(u) === "paused" && ((f = this.getAxisMotionValue(u).animation) === null || f === void 0 ? void 0 : f.play());
|
|
3863
|
+
}), { dragSnapToOrigin: c } = this.getProps();
|
|
3864
3864
|
this.panSession = new oo(e, {
|
|
3865
3865
|
onSessionStart: s,
|
|
3866
3866
|
onStart: o,
|
|
@@ -3869,7 +3869,7 @@ class Lc {
|
|
|
3869
3869
|
resumeAnimation: l
|
|
3870
3870
|
}, {
|
|
3871
3871
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
3872
|
-
dragSnapToOrigin:
|
|
3872
|
+
dragSnapToOrigin: c,
|
|
3873
3873
|
contextWindow: mo(this.visualElement)
|
|
3874
3874
|
});
|
|
3875
3875
|
}
|
|
@@ -3897,13 +3897,13 @@ class Lc {
|
|
|
3897
3897
|
return;
|
|
3898
3898
|
const o = this.getAxisMotionValue(e);
|
|
3899
3899
|
let r = this.originPoint[e] + i[e];
|
|
3900
|
-
this.constraints && this.constraints[e] && (r =
|
|
3900
|
+
this.constraints && this.constraints[e] && (r = bu(r, this.constraints[e], this.elastic[e])), o.set(r);
|
|
3901
3901
|
}
|
|
3902
3902
|
resolveConstraints() {
|
|
3903
3903
|
var e;
|
|
3904
3904
|
const { dragConstraints: n, dragElastic: i } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, o = this.constraints;
|
|
3905
|
-
n && jt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints =
|
|
3906
|
-
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] =
|
|
3905
|
+
n && jt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints = wu(s.layoutBox, n) : this.constraints = !1, this.elastic = Ru(i), o !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && et((r) => {
|
|
3906
|
+
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Au(s.layoutBox[r], this.constraints[r]));
|
|
3907
3907
|
});
|
|
3908
3908
|
}
|
|
3909
3909
|
resolveRefConstraints() {
|
|
@@ -3915,34 +3915,34 @@ class Lc {
|
|
|
3915
3915
|
const { projection: s } = this.visualElement;
|
|
3916
3916
|
if (!s || !s.layout)
|
|
3917
3917
|
return !1;
|
|
3918
|
-
const o =
|
|
3919
|
-
let r =
|
|
3918
|
+
const o = Mu(i, s.root, this.visualElement.getTransformPagePoint());
|
|
3919
|
+
let r = Su(s.layout.layoutBox, o);
|
|
3920
3920
|
if (n) {
|
|
3921
|
-
const a = n(
|
|
3922
|
-
this.hasMutatedConstraints = !!a, a && (r =
|
|
3921
|
+
const a = n(Eu(r));
|
|
3922
|
+
this.hasMutatedConstraints = !!a, a && (r = uo(a));
|
|
3923
3923
|
}
|
|
3924
3924
|
return r;
|
|
3925
3925
|
}
|
|
3926
3926
|
startAnimation(e) {
|
|
3927
|
-
const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {},
|
|
3928
|
-
if (!be(
|
|
3927
|
+
const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = et((u) => {
|
|
3928
|
+
if (!be(u, n, this.currentDirection))
|
|
3929
3929
|
return;
|
|
3930
|
-
let
|
|
3931
|
-
r && (
|
|
3930
|
+
let f = l && l[u] || {};
|
|
3931
|
+
r && (f = { min: 0, max: 0 });
|
|
3932
3932
|
const d = s ? 200 : 1e6, p = s ? 40 : 1e7, g = {
|
|
3933
3933
|
type: "inertia",
|
|
3934
|
-
velocity: i ? e[
|
|
3934
|
+
velocity: i ? e[u] : 0,
|
|
3935
3935
|
bounceStiffness: d,
|
|
3936
3936
|
bounceDamping: p,
|
|
3937
3937
|
timeConstant: 750,
|
|
3938
3938
|
restDelta: 1,
|
|
3939
3939
|
restSpeed: 10,
|
|
3940
3940
|
...o,
|
|
3941
|
-
...
|
|
3941
|
+
...f
|
|
3942
3942
|
};
|
|
3943
|
-
return this.startAxisValueAnimation(
|
|
3943
|
+
return this.startAxisValueAnimation(u, g);
|
|
3944
3944
|
});
|
|
3945
|
-
return Promise.all(
|
|
3945
|
+
return Promise.all(c).then(a);
|
|
3946
3946
|
}
|
|
3947
3947
|
startAxisValueAnimation(e, n) {
|
|
3948
3948
|
const i = this.getAxisMotionValue(e);
|
|
@@ -4000,33 +4000,33 @@ class Lc {
|
|
|
4000
4000
|
const a = this.getAxisMotionValue(r);
|
|
4001
4001
|
if (a && this.constraints !== !1) {
|
|
4002
4002
|
const l = a.get();
|
|
4003
|
-
s[r] =
|
|
4003
|
+
s[r] = Cu({ min: l, max: l }, this.constraints[r]);
|
|
4004
4004
|
}
|
|
4005
4005
|
});
|
|
4006
4006
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
4007
4007
|
this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(), et((r) => {
|
|
4008
4008
|
if (!be(r, e, null))
|
|
4009
4009
|
return;
|
|
4010
|
-
const a = this.getAxisMotionValue(r), { min: l, max:
|
|
4011
|
-
a.set(j(l,
|
|
4010
|
+
const a = this.getAxisMotionValue(r), { min: l, max: c } = this.constraints[r];
|
|
4011
|
+
a.set(j(l, c, s[r]));
|
|
4012
4012
|
});
|
|
4013
4013
|
}
|
|
4014
4014
|
addListeners() {
|
|
4015
4015
|
if (!this.visualElement.current)
|
|
4016
4016
|
return;
|
|
4017
|
-
|
|
4017
|
+
ku.set(this.visualElement, this);
|
|
4018
4018
|
const e = this.visualElement.current, n = ot(e, "pointerdown", (l) => {
|
|
4019
|
-
const { drag:
|
|
4020
|
-
|
|
4019
|
+
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
4020
|
+
c && u && this.start(l);
|
|
4021
4021
|
}), i = () => {
|
|
4022
4022
|
const { dragConstraints: l } = this.getProps();
|
|
4023
4023
|
jt(l) && l.current && (this.constraints = this.resolveRefConstraints());
|
|
4024
4024
|
}, { projection: s } = this.visualElement, o = s.addEventListener("measure", i);
|
|
4025
4025
|
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), M.read(i);
|
|
4026
|
-
const r = rt(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged:
|
|
4027
|
-
this.isDragging &&
|
|
4028
|
-
const
|
|
4029
|
-
|
|
4026
|
+
const r = rt(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
4027
|
+
this.isDragging && c && (et((u) => {
|
|
4028
|
+
const f = this.getAxisMotionValue(u);
|
|
4029
|
+
f && (this.originPoint[u] += l[u].translate, f.set(f.get() + l[u].translate));
|
|
4030
4030
|
}), this.visualElement.render());
|
|
4031
4031
|
});
|
|
4032
4032
|
return () => {
|
|
@@ -4049,13 +4049,13 @@ class Lc {
|
|
|
4049
4049
|
function be(t, e, n) {
|
|
4050
4050
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
4051
4051
|
}
|
|
4052
|
-
function
|
|
4052
|
+
function Ou(t, e = 10) {
|
|
4053
4053
|
let n = null;
|
|
4054
4054
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
4055
4055
|
}
|
|
4056
|
-
class
|
|
4056
|
+
class ju extends xt {
|
|
4057
4057
|
constructor(e) {
|
|
4058
|
-
super(e), this.removeGroupControls = W, this.removeListeners = W, this.controls = new
|
|
4058
|
+
super(e), this.removeGroupControls = W, this.removeListeners = W, this.controls = new Lu(e);
|
|
4059
4059
|
}
|
|
4060
4060
|
mount() {
|
|
4061
4061
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -4068,7 +4068,7 @@ class jc extends xt {
|
|
|
4068
4068
|
const bs = (t) => (e, n) => {
|
|
4069
4069
|
t && M.postRender(() => t(e, n));
|
|
4070
4070
|
};
|
|
4071
|
-
class
|
|
4071
|
+
class Fu extends xt {
|
|
4072
4072
|
constructor() {
|
|
4073
4073
|
super(...arguments), this.removePointerDownListener = W;
|
|
4074
4074
|
}
|
|
@@ -4099,12 +4099,12 @@ class Fc extends xt {
|
|
|
4099
4099
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
|
-
function
|
|
4102
|
+
function _u() {
|
|
4103
4103
|
const t = U(Fe);
|
|
4104
4104
|
if (t === null)
|
|
4105
4105
|
return [!0, null];
|
|
4106
4106
|
const { isPresent: e, onExitComplete: n, register: i } = t, s = kn();
|
|
4107
|
-
|
|
4107
|
+
ut(() => i(s), []);
|
|
4108
4108
|
const o = mt(() => n && n(s), [s, n]);
|
|
4109
4109
|
return !e && n ? [!1, o] : [!0];
|
|
4110
4110
|
}
|
|
@@ -4135,18 +4135,18 @@ const qt = {
|
|
|
4135
4135
|
const n = ws(t, e.target.x), i = ws(t, e.target.y);
|
|
4136
4136
|
return `${n}% ${i}%`;
|
|
4137
4137
|
}
|
|
4138
|
-
},
|
|
4138
|
+
}, Bu = {
|
|
4139
4139
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
4140
4140
|
const i = t, s = vt.parse(t);
|
|
4141
4141
|
if (s.length > 5)
|
|
4142
4142
|
return i;
|
|
4143
4143
|
const o = vt.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
4144
4144
|
s[0 + r] /= a, s[1 + r] /= l;
|
|
4145
|
-
const
|
|
4146
|
-
return typeof s[2 + r] == "number" && (s[2 + r] /=
|
|
4145
|
+
const c = j(a, l, 0.5);
|
|
4146
|
+
return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
|
|
4147
4147
|
}
|
|
4148
4148
|
};
|
|
4149
|
-
class
|
|
4149
|
+
class Iu extends na {
|
|
4150
4150
|
/**
|
|
4151
4151
|
* This only mounts projection nodes for components that
|
|
4152
4152
|
* need measuring, we might want to do it for all components
|
|
@@ -4154,7 +4154,7 @@ class Ic extends na {
|
|
|
4154
4154
|
*/
|
|
4155
4155
|
componentDidMount() {
|
|
4156
4156
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: i, layoutId: s } = this.props, { projection: o } = e;
|
|
4157
|
-
La(
|
|
4157
|
+
La(Nu), o && (n.group && n.group.add(o), i && i.register && s && i.register(o), o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
4158
4158
|
this.safeToRemove();
|
|
4159
4159
|
}), o.setOptions({
|
|
4160
4160
|
...o.options,
|
|
@@ -4187,10 +4187,10 @@ class Ic extends na {
|
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
4189
|
function go(t) {
|
|
4190
|
-
const [e, n] =
|
|
4191
|
-
return O.jsx(
|
|
4190
|
+
const [e, n] = _u(), i = U(In);
|
|
4191
|
+
return O.jsx(Iu, { ...t, layoutGroup: i, switchLayoutGroup: U(sr), isPresent: e, safeToRemove: n });
|
|
4192
4192
|
}
|
|
4193
|
-
const
|
|
4193
|
+
const Nu = {
|
|
4194
4194
|
borderRadius: {
|
|
4195
4195
|
...qt,
|
|
4196
4196
|
applyTo: [
|
|
@@ -4204,28 +4204,28 @@ const Nc = {
|
|
|
4204
4204
|
borderTopRightRadius: qt,
|
|
4205
4205
|
borderBottomLeftRadius: qt,
|
|
4206
4206
|
borderBottomRightRadius: qt,
|
|
4207
|
-
boxShadow:
|
|
4208
|
-
}, yo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"],
|
|
4209
|
-
function
|
|
4207
|
+
boxShadow: Bu
|
|
4208
|
+
}, yo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Uu = yo.length, Ss = (t) => typeof t == "string" ? parseFloat(t) : t, Cs = (t) => typeof t == "number" || S.test(t);
|
|
4209
|
+
function Wu(t, e, n, i, s, o) {
|
|
4210
4210
|
s ? (t.opacity = j(
|
|
4211
4211
|
0,
|
|
4212
4212
|
// TODO Reinstate this if only child
|
|
4213
4213
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
4214
|
-
$
|
|
4215
|
-
), t.opacityExit = j(e.opacity !== void 0 ? e.opacity : 1, 0,
|
|
4216
|
-
for (let r = 0; r <
|
|
4214
|
+
$u(i)
|
|
4215
|
+
), t.opacityExit = j(e.opacity !== void 0 ? e.opacity : 1, 0, Ku(i))) : o && (t.opacity = j(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, i));
|
|
4216
|
+
for (let r = 0; r < Uu; r++) {
|
|
4217
4217
|
const a = `border${yo[r]}Radius`;
|
|
4218
|
-
let l = As(e, a),
|
|
4219
|
-
if (l === void 0 &&
|
|
4218
|
+
let l = As(e, a), c = As(n, a);
|
|
4219
|
+
if (l === void 0 && c === void 0)
|
|
4220
4220
|
continue;
|
|
4221
|
-
l || (l = 0),
|
|
4221
|
+
l || (l = 0), c || (c = 0), l === 0 || c === 0 || Cs(l) === Cs(c) ? (t[a] = Math.max(j(Ss(l), Ss(c), i), 0), (st.test(c) || st.test(l)) && (t[a] += "%")) : t[a] = c;
|
|
4222
4222
|
}
|
|
4223
4223
|
(e.rotate || n.rotate) && (t.rotate = j(e.rotate || 0, n.rotate || 0, i));
|
|
4224
4224
|
}
|
|
4225
4225
|
function As(t, e) {
|
|
4226
4226
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4227
4227
|
}
|
|
4228
|
-
const $
|
|
4228
|
+
const $u = vo(0, 0.5, qr), Ku = vo(0.5, 0.95, W);
|
|
4229
4229
|
function vo(t, e, n) {
|
|
4230
4230
|
return (i) => i < t ? 0 : i > e ? 1 : n(ae(t, e, i));
|
|
4231
4231
|
}
|
|
@@ -4235,24 +4235,24 @@ function Rs(t, e) {
|
|
|
4235
4235
|
function tt(t, e) {
|
|
4236
4236
|
Rs(t.x, e.x), Rs(t.y, e.y);
|
|
4237
4237
|
}
|
|
4238
|
-
function
|
|
4238
|
+
function Es(t, e) {
|
|
4239
4239
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4240
4240
|
}
|
|
4241
|
-
function
|
|
4241
|
+
function Vs(t, e, n, i, s) {
|
|
4242
4242
|
return t -= e, t = Oe(t, 1 / n, i), s !== void 0 && (t = Oe(t, 1 / s, i)), t;
|
|
4243
4243
|
}
|
|
4244
|
-
function
|
|
4244
|
+
function Gu(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
|
|
4245
4245
|
if (st.test(e) && (e = parseFloat(e), e = j(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4246
4246
|
return;
|
|
4247
4247
|
let a = j(o.min, o.max, i);
|
|
4248
|
-
t === o && (a -= e), t.min =
|
|
4248
|
+
t === o && (a -= e), t.min = Vs(t.min, e, n, a, s), t.max = Vs(t.max, e, n, a, s);
|
|
4249
4249
|
}
|
|
4250
4250
|
function Ds(t, e, [n, i, s], o, r) {
|
|
4251
|
-
|
|
4251
|
+
Gu(t, e[n], e[i], e[s], e.scale, o, r);
|
|
4252
4252
|
}
|
|
4253
|
-
const
|
|
4253
|
+
const zu = ["x", "scaleX", "originX"], Hu = ["y", "scaleY", "originY"];
|
|
4254
4254
|
function Ms(t, e, n, i) {
|
|
4255
|
-
Ds(t.x, e,
|
|
4255
|
+
Ds(t.x, e, zu, n ? n.x : void 0, i ? i.x : void 0), Ds(t.y, e, Hu, n ? n.y : void 0, i ? i.y : void 0);
|
|
4256
4256
|
}
|
|
4257
4257
|
function ks(t) {
|
|
4258
4258
|
return t.translate === 0 && t.scale === 1;
|
|
@@ -4263,7 +4263,7 @@ function Po(t) {
|
|
|
4263
4263
|
function Ls(t, e) {
|
|
4264
4264
|
return t.min === e.min && t.max === e.max;
|
|
4265
4265
|
}
|
|
4266
|
-
function
|
|
4266
|
+
function Yu(t, e) {
|
|
4267
4267
|
return Ls(t.x, e.x) && Ls(t.y, e.y);
|
|
4268
4268
|
}
|
|
4269
4269
|
function Os(t, e) {
|
|
@@ -4278,7 +4278,7 @@ function js(t) {
|
|
|
4278
4278
|
function Fs(t, e) {
|
|
4279
4279
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
4280
4280
|
}
|
|
4281
|
-
class
|
|
4281
|
+
class Xu {
|
|
4282
4282
|
constructor() {
|
|
4283
4283
|
this.members = [];
|
|
4284
4284
|
}
|
|
@@ -4332,18 +4332,18 @@ class Xc {
|
|
|
4332
4332
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
4333
4333
|
}
|
|
4334
4334
|
}
|
|
4335
|
-
function
|
|
4335
|
+
function qu(t, e, n) {
|
|
4336
4336
|
let i = "";
|
|
4337
4337
|
const s = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
|
|
4338
4338
|
if ((s || o || r) && (i = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (i += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
4339
|
-
const { transformPerspective:
|
|
4340
|
-
|
|
4339
|
+
const { transformPerspective: c, rotate: u, rotateX: f, rotateY: d, skewX: p, skewY: g } = n;
|
|
4340
|
+
c && (i = `perspective(${c}px) ${i}`), u && (i += `rotate(${u}deg) `), f && (i += `rotateX(${f}deg) `), d && (i += `rotateY(${d}deg) `), p && (i += `skewX(${p}deg) `), g && (i += `skewY(${g}deg) `);
|
|
4341
4341
|
}
|
|
4342
4342
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
4343
4343
|
return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
|
|
4344
4344
|
}
|
|
4345
|
-
const
|
|
4346
|
-
class
|
|
4345
|
+
const Zu = (t, e) => t.depth - e.depth;
|
|
4346
|
+
class Ju {
|
|
4347
4347
|
constructor() {
|
|
4348
4348
|
this.children = [], this.isDirty = !1;
|
|
4349
4349
|
}
|
|
@@ -4354,10 +4354,10 @@ class Jc {
|
|
|
4354
4354
|
Ne(this.children, e), this.isDirty = !0;
|
|
4355
4355
|
}
|
|
4356
4356
|
forEach(e) {
|
|
4357
|
-
this.isDirty && this.children.sort(
|
|
4357
|
+
this.isDirty && this.children.sort(Zu), this.isDirty = !1, this.children.forEach(e);
|
|
4358
4358
|
}
|
|
4359
4359
|
}
|
|
4360
|
-
function
|
|
4360
|
+
function Qu(t, e) {
|
|
4361
4361
|
const n = gt.now(), i = ({ timestamp: s }) => {
|
|
4362
4362
|
const o = s - n;
|
|
4363
4363
|
o >= e && (ht(i), t(o - e));
|
|
@@ -4376,7 +4376,7 @@ const Ct = {
|
|
|
4376
4376
|
totalNodes: 0,
|
|
4377
4377
|
resolvedTargetDeltas: 0,
|
|
4378
4378
|
recalculatedProjection: 0
|
|
4379
|
-
}, Jt = typeof window < "u" && window.MotionDebug !== void 0,
|
|
4379
|
+
}, Jt = typeof window < "u" && window.MotionDebug !== void 0, un = ["", "X", "Y", "Z"], nf = { visibility: "hidden" }, _s = 1e3;
|
|
4380
4380
|
let sf = 0;
|
|
4381
4381
|
function fn(t, e, n, i) {
|
|
4382
4382
|
const { latestValues: s } = e;
|
|
@@ -4398,7 +4398,7 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4398
4398
|
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
4399
4399
|
for (let l = 0; l < this.path.length; l++)
|
|
4400
4400
|
this.path[l].shouldResetTransform = !0;
|
|
4401
|
-
this.root === this && (this.nodes = new
|
|
4401
|
+
this.root === this && (this.nodes = new Ju());
|
|
4402
4402
|
}
|
|
4403
4403
|
addEventListener(r, a) {
|
|
4404
4404
|
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new ai()), this.eventHandlers.get(r).add(a);
|
|
@@ -4417,28 +4417,28 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4417
4417
|
if (this.instance)
|
|
4418
4418
|
return;
|
|
4419
4419
|
this.isSVG = tf(r), this.instance = r;
|
|
4420
|
-
const { layoutId: l, layout:
|
|
4421
|
-
if (
|
|
4422
|
-
let
|
|
4420
|
+
const { layoutId: l, layout: c, visualElement: u } = this.options;
|
|
4421
|
+
if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), a && (c || l) && (this.isLayoutDirty = !0), t) {
|
|
4422
|
+
let f;
|
|
4423
4423
|
const d = () => this.root.updateBlockedByResize = !1;
|
|
4424
4424
|
t(r, () => {
|
|
4425
|
-
this.root.updateBlockedByResize = !0,
|
|
4425
|
+
this.root.updateBlockedByResize = !0, f && f(), f = Qu(d, 250), Ae.hasAnimatedSinceResize && (Ae.hasAnimatedSinceResize = !1, this.nodes.forEach(Is));
|
|
4426
4426
|
});
|
|
4427
4427
|
}
|
|
4428
|
-
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 &&
|
|
4428
|
+
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout: g }) => {
|
|
4429
4429
|
if (this.isTreeAnimationBlocked()) {
|
|
4430
4430
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4431
4431
|
return;
|
|
4432
4432
|
}
|
|
4433
|
-
const P = this.options.transition ||
|
|
4433
|
+
const P = this.options.transition || u.getDefaultTransition() || vf, { onLayoutAnimationStart: b, onLayoutAnimationComplete: x } = u.getProps(), y = !this.targetLayout || !xo(this.targetLayout, g) || p, v = !d && p;
|
|
4434
4434
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || v || d && (y || !this.currentAnimation)) {
|
|
4435
|
-
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(
|
|
4435
|
+
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f, v);
|
|
4436
4436
|
const C = {
|
|
4437
4437
|
...Zn(P, "layout"),
|
|
4438
4438
|
onPlay: b,
|
|
4439
4439
|
onComplete: x
|
|
4440
4440
|
};
|
|
4441
|
-
(
|
|
4441
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (C.delay = 0, C.type = !1), this.startAnimation(C);
|
|
4442
4442
|
} else
|
|
4443
4443
|
d || Is(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4444
4444
|
this.targetLayout = g;
|
|
@@ -4478,22 +4478,22 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4478
4478
|
if (window.HandoffCancelAllAnimations && To(this) && window.HandoffCancelAllAnimations(), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
4479
4479
|
return;
|
|
4480
4480
|
this.isLayoutDirty = !0;
|
|
4481
|
-
for (let
|
|
4482
|
-
const
|
|
4483
|
-
|
|
4481
|
+
for (let u = 0; u < this.path.length; u++) {
|
|
4482
|
+
const f = this.path[u];
|
|
4483
|
+
f.shouldResetTransform = !0, f.updateScroll("snapshot"), f.options.layoutRoot && f.willUpdate(!1);
|
|
4484
4484
|
}
|
|
4485
4485
|
const { layoutId: a, layout: l } = this.options;
|
|
4486
4486
|
if (a === void 0 && !l)
|
|
4487
4487
|
return;
|
|
4488
|
-
const
|
|
4489
|
-
this.prevTransformTemplateValue =
|
|
4488
|
+
const c = this.getTransformTemplate();
|
|
4489
|
+
this.prevTransformTemplateValue = c ? c(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
|
|
4490
4490
|
}
|
|
4491
4491
|
update() {
|
|
4492
4492
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
4493
4493
|
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Bs);
|
|
4494
4494
|
return;
|
|
4495
4495
|
}
|
|
4496
|
-
this.isUpdating || this.nodes.forEach(
|
|
4496
|
+
this.isUpdating || this.nodes.forEach(uf), this.isUpdating = !1, this.nodes.forEach(ff), this.nodes.forEach(rf), this.nodes.forEach(of), this.clearAllSnapshots();
|
|
4497
4497
|
const a = gt.now();
|
|
4498
4498
|
N.delta = yt(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, Qe.update.process(N), Qe.preRender.process(N), Qe.render.process(N), N.isProcessing = !1;
|
|
4499
4499
|
}
|
|
@@ -4501,7 +4501,7 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4501
4501
|
this.updateScheduled || (this.updateScheduled = !0, Fn.read(this.scheduleUpdate));
|
|
4502
4502
|
}
|
|
4503
4503
|
clearAllSnapshots() {
|
|
4504
|
-
this.nodes.forEach(
|
|
4504
|
+
this.nodes.forEach(cf), this.sharedNodes.forEach(mf);
|
|
4505
4505
|
}
|
|
4506
4506
|
scheduleUpdateProjection() {
|
|
4507
4507
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, M.preRender(this.updateProjection, !1, !0));
|
|
@@ -4544,8 +4544,8 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4544
4544
|
resetTransform() {
|
|
4545
4545
|
if (!s)
|
|
4546
4546
|
return;
|
|
4547
|
-
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Po(this.projectionDelta), l = this.getTransformTemplate(),
|
|
4548
|
-
r && (a || St(this.latestValues) ||
|
|
4547
|
+
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Po(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
4548
|
+
r && (a || St(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4549
4549
|
}
|
|
4550
4550
|
measure(r = !0) {
|
|
4551
4551
|
const a = this.measurePageBox();
|
|
@@ -4565,8 +4565,8 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4565
4565
|
return B();
|
|
4566
4566
|
const l = a.measureViewportBox();
|
|
4567
4567
|
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(xf))) {
|
|
4568
|
-
const { scroll:
|
|
4569
|
-
|
|
4568
|
+
const { scroll: u } = this.root;
|
|
4569
|
+
u && (Bt(l.x, u.offset.x), Bt(l.y, u.offset.y));
|
|
4570
4570
|
}
|
|
4571
4571
|
return l;
|
|
4572
4572
|
}
|
|
@@ -4575,21 +4575,21 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4575
4575
|
const l = B();
|
|
4576
4576
|
if (tt(l, r), !((a = this.scroll) === null || a === void 0) && a.wasRoot)
|
|
4577
4577
|
return l;
|
|
4578
|
-
for (let
|
|
4579
|
-
const
|
|
4580
|
-
|
|
4578
|
+
for (let c = 0; c < this.path.length; c++) {
|
|
4579
|
+
const u = this.path[c], { scroll: f, options: d } = u;
|
|
4580
|
+
u !== this.root && f && d.layoutScroll && (f.wasRoot && tt(l, r), Bt(l.x, f.offset.x), Bt(l.y, f.offset.y));
|
|
4581
4581
|
}
|
|
4582
4582
|
return l;
|
|
4583
4583
|
}
|
|
4584
4584
|
applyTransform(r, a = !1) {
|
|
4585
4585
|
const l = B();
|
|
4586
4586
|
tt(l, r);
|
|
4587
|
-
for (let
|
|
4588
|
-
const
|
|
4589
|
-
!a &&
|
|
4590
|
-
x: -
|
|
4591
|
-
y: -
|
|
4592
|
-
}), St(
|
|
4587
|
+
for (let c = 0; c < this.path.length; c++) {
|
|
4588
|
+
const u = this.path[c];
|
|
4589
|
+
!a && u.options.layoutScroll && u.scroll && u !== u.root && It(l, {
|
|
4590
|
+
x: -u.scroll.offset.x,
|
|
4591
|
+
y: -u.scroll.offset.y
|
|
4592
|
+
}), St(u.latestValues) && It(l, u.latestValues);
|
|
4593
4593
|
}
|
|
4594
4594
|
return St(this.latestValues) && It(l, this.latestValues), l;
|
|
4595
4595
|
}
|
|
@@ -4597,12 +4597,12 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4597
4597
|
const a = B();
|
|
4598
4598
|
tt(a, r);
|
|
4599
4599
|
for (let l = 0; l < this.path.length; l++) {
|
|
4600
|
-
const
|
|
4601
|
-
if (!
|
|
4600
|
+
const c = this.path[l];
|
|
4601
|
+
if (!c.instance || !St(c.latestValues))
|
|
4602
4602
|
continue;
|
|
4603
|
-
Rn(
|
|
4604
|
-
const
|
|
4605
|
-
tt(
|
|
4603
|
+
Rn(c.latestValues) && c.updateSnapshot();
|
|
4604
|
+
const u = B(), f = c.measurePageBox();
|
|
4605
|
+
tt(u, f), Ms(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4606
4606
|
}
|
|
4607
4607
|
return St(this.latestValues) && Ms(a, this.latestValues), a;
|
|
4608
4608
|
}
|
|
@@ -4626,17 +4626,17 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4626
4626
|
var a;
|
|
4627
4627
|
const l = this.getLead();
|
|
4628
4628
|
this.isProjectionDirty || (this.isProjectionDirty = l.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = l.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = l.isSharedProjectionDirty);
|
|
4629
|
-
const
|
|
4630
|
-
if (!(r ||
|
|
4629
|
+
const c = !!this.resumingFrom || this !== l;
|
|
4630
|
+
if (!(r || c && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
4631
4631
|
return;
|
|
4632
|
-
const { layout:
|
|
4633
|
-
if (!(!this.layout || !(
|
|
4632
|
+
const { layout: f, layoutId: d } = this.options;
|
|
4633
|
+
if (!(!this.layout || !(f || d))) {
|
|
4634
4634
|
if (this.resolvedRelativeTargetAt = N.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4635
4635
|
const p = this.getClosestProjectingParent();
|
|
4636
4636
|
p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ne(this.relativeTargetOrigin, this.layout.layoutBox, p.layout.layoutBox), tt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4637
4637
|
}
|
|
4638
4638
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4639
|
-
if (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
4639
|
+
if (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Tu(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : tt(this.target, this.layout.layoutBox), ho(this.target, this.targetDelta)) : tt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4640
4640
|
this.attemptToResolveRelativeTarget = !1;
|
|
4641
4641
|
const p = this.getClosestProjectingParent();
|
|
4642
4642
|
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ne(this.relativeTargetOrigin, this.target, p.target), tt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -4655,21 +4655,21 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4655
4655
|
calcProjection() {
|
|
4656
4656
|
var r;
|
|
4657
4657
|
const a = this.getLead(), l = !!this.resumingFrom || this !== a;
|
|
4658
|
-
let
|
|
4659
|
-
if ((this.isProjectionDirty || !((r = this.parent) === null || r === void 0) && r.isProjectionDirty) && (
|
|
4658
|
+
let c = !0;
|
|
4659
|
+
if ((this.isProjectionDirty || !((r = this.parent) === null || r === void 0) && r.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === N.timestamp && (c = !1), c)
|
|
4660
4660
|
return;
|
|
4661
|
-
const { layout:
|
|
4662
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(
|
|
4661
|
+
const { layout: u, layoutId: f } = this.options;
|
|
4662
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || f))
|
|
4663
4663
|
return;
|
|
4664
4664
|
tt(this.layoutCorrected, this.layout.layoutBox);
|
|
4665
4665
|
const d = this.treeScale.x, p = this.treeScale.y;
|
|
4666
|
-
|
|
4666
|
+
Du(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = B());
|
|
4667
4667
|
const { target: g } = a;
|
|
4668
4668
|
if (!g) {
|
|
4669
4669
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4670
4670
|
return;
|
|
4671
4671
|
}
|
|
4672
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4672
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Es(this.prevProjectionDelta.x, this.projectionDelta.x), Es(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Fs(this.projectionDelta.x, this.prevProjectionDelta.x) || !Fs(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Jt && Ct.recalculatedProjection++;
|
|
4673
4673
|
}
|
|
4674
4674
|
hide() {
|
|
4675
4675
|
this.isVisible = !1;
|
|
@@ -4689,14 +4689,14 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4689
4689
|
this.prevProjectionDelta = _t(), this.projectionDelta = _t(), this.projectionDeltaWithTransform = _t();
|
|
4690
4690
|
}
|
|
4691
4691
|
setAnimationOrigin(r, a = !1) {
|
|
4692
|
-
const l = this.snapshot,
|
|
4692
|
+
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, f = _t();
|
|
4693
4693
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4694
4694
|
const d = B(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, P = p !== g, b = this.getStack(), x = !b || b.members.length <= 1, y = !!(P && !x && this.options.crossfade === !0 && !this.path.some(yf));
|
|
4695
4695
|
this.animationProgress = 0;
|
|
4696
4696
|
let v;
|
|
4697
4697
|
this.mixTargetDelta = (C) => {
|
|
4698
4698
|
const w = C / 1e3;
|
|
4699
|
-
Ns(
|
|
4699
|
+
Ns(f.x, r.x, w), Ns(f.y, r.y, w), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ne(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), gf(this.relativeTarget, this.relativeTargetOrigin, d, w), v && Yu(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = B()), tt(v, this.relativeTarget)), P && (this.animationValues = u, Wu(u, c, this.latestValues, w, y, x)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
|
|
4700
4700
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4701
4701
|
}
|
|
4702
4702
|
startAnimation(r) {
|
|
@@ -4722,24 +4722,24 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4722
4722
|
}
|
|
4723
4723
|
applyTransformsToTarget() {
|
|
4724
4724
|
const r = this.getLead();
|
|
4725
|
-
let { targetWithTransforms: a, target: l, layout:
|
|
4726
|
-
if (!(!a || !l || !
|
|
4727
|
-
if (this !== r && this.layout &&
|
|
4725
|
+
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
|
|
4726
|
+
if (!(!a || !l || !c)) {
|
|
4727
|
+
if (this !== r && this.layout && c && wo(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4728
4728
|
l = this.target || B();
|
|
4729
|
-
const
|
|
4730
|
-
l.x.min = r.target.x.min, l.x.max = l.x.min +
|
|
4729
|
+
const f = X(this.layout.layoutBox.x);
|
|
4730
|
+
l.x.min = r.target.x.min, l.x.max = l.x.min + f;
|
|
4731
4731
|
const d = X(this.layout.layoutBox.y);
|
|
4732
4732
|
l.y.min = r.target.y.min, l.y.max = l.y.min + d;
|
|
4733
4733
|
}
|
|
4734
|
-
tt(a, l), It(a,
|
|
4734
|
+
tt(a, l), It(a, u), ee(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
4735
4735
|
}
|
|
4736
4736
|
}
|
|
4737
4737
|
registerSharedNode(r, a) {
|
|
4738
|
-
this.sharedNodes.has(r) || this.sharedNodes.set(r, new
|
|
4739
|
-
const
|
|
4738
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new Xu()), this.sharedNodes.get(r).add(a);
|
|
4739
|
+
const c = a.options.initialPromotionConfig;
|
|
4740
4740
|
a.promote({
|
|
4741
|
-
transition:
|
|
4742
|
-
preserveFollowOpacity:
|
|
4741
|
+
transition: c ? c.transition : void 0,
|
|
4742
|
+
preserveFollowOpacity: c && c.shouldPreserveFollowOpacity ? c.shouldPreserveFollowOpacity(a) : void 0
|
|
4743
4743
|
});
|
|
4744
4744
|
}
|
|
4745
4745
|
isLead() {
|
|
@@ -4762,8 +4762,8 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4762
4762
|
return this.root.sharedNodes.get(r);
|
|
4763
4763
|
}
|
|
4764
4764
|
promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
|
|
4765
|
-
const
|
|
4766
|
-
|
|
4765
|
+
const c = this.getStack();
|
|
4766
|
+
c && c.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
|
|
4767
4767
|
}
|
|
4768
4768
|
relegate() {
|
|
4769
4769
|
const r = this.getStack();
|
|
@@ -4777,13 +4777,13 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4777
4777
|
const { latestValues: l } = r;
|
|
4778
4778
|
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
4779
4779
|
return;
|
|
4780
|
-
const
|
|
4781
|
-
l.z && fn("z", r,
|
|
4782
|
-
for (let
|
|
4783
|
-
fn(`rotate${
|
|
4780
|
+
const c = {};
|
|
4781
|
+
l.z && fn("z", r, c, this.animationValues);
|
|
4782
|
+
for (let u = 0; u < un.length; u++)
|
|
4783
|
+
fn(`rotate${un[u]}`, r, c, this.animationValues), fn(`skew${un[u]}`, r, c, this.animationValues);
|
|
4784
4784
|
r.render();
|
|
4785
|
-
for (const
|
|
4786
|
-
r.setStaticValue(
|
|
4785
|
+
for (const u in c)
|
|
4786
|
+
r.setStaticValue(u, c[u]), this.animationValues && (this.animationValues[u] = c[u]);
|
|
4787
4787
|
r.scheduleRender();
|
|
4788
4788
|
}
|
|
4789
4789
|
getProjectionStyles(r) {
|
|
@@ -4792,32 +4792,32 @@ function bo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4792
4792
|
return;
|
|
4793
4793
|
if (!this.isVisible)
|
|
4794
4794
|
return nf;
|
|
4795
|
-
const
|
|
4795
|
+
const c = {
|
|
4796
4796
|
visibility: ""
|
|
4797
|
-
},
|
|
4797
|
+
}, u = this.getTransformTemplate();
|
|
4798
4798
|
if (this.needsReset)
|
|
4799
|
-
return this.needsReset = !1,
|
|
4800
|
-
const
|
|
4801
|
-
if (!this.projectionDelta || !this.layout || !
|
|
4799
|
+
return this.needsReset = !1, c.opacity = "", c.pointerEvents = Se(r == null ? void 0 : r.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4800
|
+
const f = this.getLead();
|
|
4801
|
+
if (!this.projectionDelta || !this.layout || !f.target) {
|
|
4802
4802
|
const P = {};
|
|
4803
|
-
return this.options.layoutId && (P.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, P.pointerEvents = Se(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !St(this.latestValues) && (P.transform =
|
|
4803
|
+
return this.options.layoutId && (P.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, P.pointerEvents = Se(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !St(this.latestValues) && (P.transform = u ? u({}, "") : "none", this.hasProjected = !1), P;
|
|
4804
4804
|
}
|
|
4805
|
-
const d =
|
|
4806
|
-
this.applyTransformsToTarget(),
|
|
4805
|
+
const d = f.animationValues || f.latestValues;
|
|
4806
|
+
this.applyTransformsToTarget(), c.transform = qu(this.projectionDeltaWithTransform, this.treeScale, d), u && (c.transform = u(d, c.transform));
|
|
4807
4807
|
const { x: p, y: g } = this.projectionDelta;
|
|
4808
|
-
|
|
4809
|
-
for (const P in
|
|
4808
|
+
c.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`, f.animationValues ? c.opacity = f === this ? (l = (a = d.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : c.opacity = f === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
|
|
4809
|
+
for (const P in Ve) {
|
|
4810
4810
|
if (d[P] === void 0)
|
|
4811
4811
|
continue;
|
|
4812
|
-
const { correct: b, applyTo: x } =
|
|
4812
|
+
const { correct: b, applyTo: x } = Ve[P], y = c.transform === "none" ? d[P] : b(d[P], f);
|
|
4813
4813
|
if (x) {
|
|
4814
4814
|
const v = x.length;
|
|
4815
4815
|
for (let C = 0; C < v; C++)
|
|
4816
|
-
|
|
4816
|
+
c[x[C]] = y;
|
|
4817
4817
|
} else
|
|
4818
|
-
|
|
4818
|
+
c[P] = y;
|
|
4819
4819
|
}
|
|
4820
|
-
return this.options.layoutId && (
|
|
4820
|
+
return this.options.layoutId && (c.pointerEvents = f === this ? Se(r == null ? void 0 : r.pointerEvents) || "" : "none"), c;
|
|
4821
4821
|
}
|
|
4822
4822
|
clearSnapshot() {
|
|
4823
4823
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4839,28 +4839,28 @@ function of(t) {
|
|
|
4839
4839
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
4840
4840
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4841
4841
|
const { layoutBox: i, measuredBox: s } = t.layout, { animationType: o } = t.options, r = n.source !== t.layout.source;
|
|
4842
|
-
o === "size" ? et((
|
|
4843
|
-
const d = r ? n.measuredBox[
|
|
4844
|
-
d.min = i[
|
|
4845
|
-
}) : wo(o, n.layoutBox, i) && et((
|
|
4846
|
-
const d = r ? n.measuredBox[
|
|
4847
|
-
d.max = d.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[
|
|
4842
|
+
o === "size" ? et((f) => {
|
|
4843
|
+
const d = r ? n.measuredBox[f] : n.layoutBox[f], p = X(d);
|
|
4844
|
+
d.min = i[f].min, d.max = d.min + p;
|
|
4845
|
+
}) : wo(o, n.layoutBox, i) && et((f) => {
|
|
4846
|
+
const d = r ? n.measuredBox[f] : n.layoutBox[f], p = X(i[f]);
|
|
4847
|
+
d.max = d.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[f].max = t.relativeTarget[f].min + p);
|
|
4848
4848
|
});
|
|
4849
4849
|
const a = _t();
|
|
4850
4850
|
ee(a, i, n.layoutBox);
|
|
4851
4851
|
const l = _t();
|
|
4852
4852
|
r ? ee(l, t.applyTransform(s, !0), n.measuredBox) : ee(l, i, n.layoutBox);
|
|
4853
|
-
const
|
|
4854
|
-
let
|
|
4853
|
+
const c = !Po(a);
|
|
4854
|
+
let u = !1;
|
|
4855
4855
|
if (!t.resumeFrom) {
|
|
4856
|
-
const
|
|
4857
|
-
if (
|
|
4858
|
-
const { snapshot: d, layout: p } =
|
|
4856
|
+
const f = t.getClosestProjectingParent();
|
|
4857
|
+
if (f && !f.resumeFrom) {
|
|
4858
|
+
const { snapshot: d, layout: p } = f;
|
|
4859
4859
|
if (d && p) {
|
|
4860
4860
|
const g = B();
|
|
4861
4861
|
ne(g, n.layoutBox, d.layoutBox);
|
|
4862
4862
|
const P = B();
|
|
4863
|
-
ne(P, i, p.layoutBox), xo(g, P) || (
|
|
4863
|
+
ne(P, i, p.layoutBox), xo(g, P) || (u = !0), f.options.layoutRoot && (t.relativeTarget = P, t.relativeTargetOrigin = g, t.relativeParent = f);
|
|
4864
4864
|
}
|
|
4865
4865
|
}
|
|
4866
4866
|
}
|
|
@@ -4869,8 +4869,8 @@ function of(t) {
|
|
|
4869
4869
|
snapshot: n,
|
|
4870
4870
|
delta: l,
|
|
4871
4871
|
layoutDelta: a,
|
|
4872
|
-
hasLayoutChanged:
|
|
4873
|
-
hasRelativeTargetChanged:
|
|
4872
|
+
hasLayoutChanged: c,
|
|
4873
|
+
hasRelativeTargetChanged: u
|
|
4874
4874
|
});
|
|
4875
4875
|
} else if (t.isLead()) {
|
|
4876
4876
|
const { onExitComplete: i } = t.options;
|
|
@@ -4884,13 +4884,13 @@ function af(t) {
|
|
|
4884
4884
|
function lf(t) {
|
|
4885
4885
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4886
4886
|
}
|
|
4887
|
-
function
|
|
4887
|
+
function cf(t) {
|
|
4888
4888
|
t.clearSnapshot();
|
|
4889
4889
|
}
|
|
4890
4890
|
function Bs(t) {
|
|
4891
4891
|
t.clearMeasurements();
|
|
4892
4892
|
}
|
|
4893
|
-
function
|
|
4893
|
+
function uf(t) {
|
|
4894
4894
|
t.isLayoutDirty = !1;
|
|
4895
4895
|
}
|
|
4896
4896
|
function ff(t) {
|
|
@@ -4935,7 +4935,7 @@ function Pf(t) {
|
|
|
4935
4935
|
Ks(t.x), Ks(t.y);
|
|
4936
4936
|
}
|
|
4937
4937
|
function wo(t, e, n) {
|
|
4938
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
4938
|
+
return t === "position" || t === "preserve-aspect" && !xu(js(e), js(n), 0.2);
|
|
4939
4939
|
}
|
|
4940
4940
|
function xf(t) {
|
|
4941
4941
|
var e;
|
|
@@ -4968,21 +4968,21 @@ const Tf = bo({
|
|
|
4968
4968
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4969
4969
|
}), bf = {
|
|
4970
4970
|
pan: {
|
|
4971
|
-
Feature:
|
|
4971
|
+
Feature: Fu
|
|
4972
4972
|
},
|
|
4973
4973
|
drag: {
|
|
4974
|
-
Feature:
|
|
4974
|
+
Feature: ju,
|
|
4975
4975
|
ProjectionNode: So,
|
|
4976
4976
|
MeasureLayout: go
|
|
4977
4977
|
}
|
|
4978
|
-
},
|
|
4978
|
+
}, Vn = { current: null }, Co = { current: !1 };
|
|
4979
4979
|
function wf() {
|
|
4980
4980
|
if (Co.current = !0, !!jn)
|
|
4981
4981
|
if (window.matchMedia) {
|
|
4982
|
-
const t = window.matchMedia("(prefers-reduced-motion)"), e = () =>
|
|
4982
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Vn.current = t.matches;
|
|
4983
4983
|
t.addListener(e), e();
|
|
4984
4984
|
} else
|
|
4985
|
-
|
|
4985
|
+
Vn.current = !1;
|
|
4986
4986
|
}
|
|
4987
4987
|
function Sf(t, e, n) {
|
|
4988
4988
|
for (const i in e) {
|
|
@@ -5004,7 +5004,7 @@ function Sf(t, e, n) {
|
|
|
5004
5004
|
e[i] === void 0 && t.removeValue(i);
|
|
5005
5005
|
return e;
|
|
5006
5006
|
}
|
|
5007
|
-
const Gs = /* @__PURE__ */ new WeakMap(), Cf = [...Mr, $, vt], Af = (t) => Cf.find(Dr(t)),
|
|
5007
|
+
const Gs = /* @__PURE__ */ new WeakMap(), Cf = [...Mr, $, vt], Af = (t) => Cf.find(Dr(t)), zs = [
|
|
5008
5008
|
"AnimationStart",
|
|
5009
5009
|
"AnimationComplete",
|
|
5010
5010
|
"Update",
|
|
@@ -5013,7 +5013,7 @@ const Gs = /* @__PURE__ */ new WeakMap(), Cf = [...Mr, $, vt], Af = (t) => Cf.fi
|
|
|
5013
5013
|
"LayoutAnimationStart",
|
|
5014
5014
|
"LayoutAnimationComplete"
|
|
5015
5015
|
], Rf = Bn.length;
|
|
5016
|
-
class
|
|
5016
|
+
class Ef {
|
|
5017
5017
|
/**
|
|
5018
5018
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
5019
5019
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -5030,16 +5030,16 @@ class Vf {
|
|
|
5030
5030
|
}, this.isRenderScheduled = !1, this.scheduleRender = () => {
|
|
5031
5031
|
this.isRenderScheduled || (this.isRenderScheduled = !0, M.render(this.render, !1, !0));
|
|
5032
5032
|
};
|
|
5033
|
-
const { latestValues: l, renderState:
|
|
5034
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState =
|
|
5035
|
-
const { willChange:
|
|
5036
|
-
for (const d in
|
|
5037
|
-
const p =
|
|
5033
|
+
const { latestValues: l, renderState: c } = r;
|
|
5034
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Be(n), this.isVariantNode = or(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
5035
|
+
const { willChange: u, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
5036
|
+
for (const d in f) {
|
|
5037
|
+
const p = f[d];
|
|
5038
5038
|
l[d] !== void 0 && K(p) && p.set(l[d], !1);
|
|
5039
5039
|
}
|
|
5040
5040
|
}
|
|
5041
5041
|
mount(e) {
|
|
5042
|
-
this.current = e, Gs.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, i) => this.bindToMotionValue(i, n)), Co.current || wf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 :
|
|
5042
|
+
this.current = e, Gs.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, i) => this.bindToMotionValue(i, n)), Co.current || wf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Vn.current, process.env.NODE_ENV !== "production" && li(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
5043
5043
|
}
|
|
5044
5044
|
unmount() {
|
|
5045
5045
|
Gs.delete(this.current), this.projection && this.projection.unmount(), ht(this.notifyUpdate), ht(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -5098,8 +5098,8 @@ class Vf {
|
|
|
5098
5098
|
*/
|
|
5099
5099
|
update(e, n) {
|
|
5100
5100
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
5101
|
-
for (let i = 0; i <
|
|
5102
|
-
const s =
|
|
5101
|
+
for (let i = 0; i < zs.length; i++) {
|
|
5102
|
+
const s = zs[i];
|
|
5103
5103
|
this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
|
|
5104
5104
|
const o = "on" + s, r = e[o];
|
|
5105
5105
|
r && (this.propEventSubscriptions[s] = this.on(s, r));
|
|
@@ -5184,7 +5184,7 @@ class Vf {
|
|
|
5184
5184
|
readValue(e, n) {
|
|
5185
5185
|
var i;
|
|
5186
5186
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) !== null && i !== void 0 ? i : this.readValueFromInstance(this.current, e, this.options);
|
|
5187
|
-
return s != null && (typeof s == "string" && (
|
|
5187
|
+
return s != null && (typeof s == "string" && (Er(s) || Rr(s)) ? s = parseFloat(s) : !Af(s) && vt.test(n) && (s = Ir(e, n)), this.setBaseTarget(e, K(s) ? s.get() : s)), K(s) ? s.get() : s;
|
|
5188
5188
|
}
|
|
5189
5189
|
/**
|
|
5190
5190
|
* Set the base target to later animate back to. This is currently
|
|
@@ -5217,7 +5217,7 @@ class Vf {
|
|
|
5217
5217
|
this.events[e] && this.events[e].notify(...n);
|
|
5218
5218
|
}
|
|
5219
5219
|
}
|
|
5220
|
-
class Ao extends
|
|
5220
|
+
class Ao extends Ef {
|
|
5221
5221
|
constructor() {
|
|
5222
5222
|
super(...arguments), this.KeyframeResolver = Nr;
|
|
5223
5223
|
}
|
|
@@ -5231,7 +5231,7 @@ class Ao extends Vf {
|
|
|
5231
5231
|
delete n[e], delete i[e];
|
|
5232
5232
|
}
|
|
5233
5233
|
}
|
|
5234
|
-
function
|
|
5234
|
+
function Vf(t) {
|
|
5235
5235
|
return window.getComputedStyle(t);
|
|
5236
5236
|
}
|
|
5237
5237
|
class Df extends Ao {
|
|
@@ -5243,7 +5243,7 @@ class Df extends Ao {
|
|
|
5243
5243
|
const i = ti(n);
|
|
5244
5244
|
return i && i.default || 0;
|
|
5245
5245
|
} else {
|
|
5246
|
-
const i =
|
|
5246
|
+
const i = Vf(e), s = (ur(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
5247
5247
|
return typeof s == "string" ? s.trim() : s;
|
|
5248
5248
|
}
|
|
5249
5249
|
}
|
|
@@ -5282,13 +5282,13 @@ class Mf extends Ao {
|
|
|
5282
5282
|
return yr(e, n, i);
|
|
5283
5283
|
}
|
|
5284
5284
|
build(e, n, i) {
|
|
5285
|
-
|
|
5285
|
+
zn(e, n, this.isSVGTag, i.transformTemplate);
|
|
5286
5286
|
}
|
|
5287
5287
|
renderInstance(e, n, i, s) {
|
|
5288
5288
|
gr(e, n, i, s);
|
|
5289
5289
|
}
|
|
5290
5290
|
mount(e) {
|
|
5291
|
-
this.isSVGTag =
|
|
5291
|
+
this.isSVGTag = Hn(e.tagName), super.mount(e);
|
|
5292
5292
|
}
|
|
5293
5293
|
}
|
|
5294
5294
|
const kf = (t, e) => Nn(t) ? new Mf(e) : new Df(e, {
|
|
@@ -5299,11 +5299,11 @@ const kf = (t, e) => Nn(t) ? new Mf(e) : new Df(e, {
|
|
|
5299
5299
|
MeasureLayout: go
|
|
5300
5300
|
}
|
|
5301
5301
|
}, Of = {
|
|
5302
|
-
...
|
|
5302
|
+
...hu,
|
|
5303
5303
|
...bl,
|
|
5304
5304
|
...bf,
|
|
5305
5305
|
...Lf
|
|
5306
|
-
}, jf = /* @__PURE__ */ Ma((t, e) =>
|
|
5306
|
+
}, jf = /* @__PURE__ */ Ma((t, e) => cl(t, e, Of, kf));
|
|
5307
5307
|
class Ff extends Dn.Component {
|
|
5308
5308
|
getSnapshotBeforeUpdate(e) {
|
|
5309
5309
|
const n = this.props.childRef.current;
|
|
@@ -5330,39 +5330,39 @@ function _f({ children: t, isPresent: e }) {
|
|
|
5330
5330
|
left: 0
|
|
5331
5331
|
}), { nonce: o } = U(On);
|
|
5332
5332
|
return Zs(() => {
|
|
5333
|
-
const { width: r, height: a, top: l, left:
|
|
5333
|
+
const { width: r, height: a, top: l, left: c } = s.current;
|
|
5334
5334
|
if (e || !i.current || !r || !a)
|
|
5335
5335
|
return;
|
|
5336
5336
|
i.current.dataset.motionPopId = n;
|
|
5337
|
-
const
|
|
5338
|
-
return o && (
|
|
5337
|
+
const u = document.createElement("style");
|
|
5338
|
+
return o && (u.nonce = o), document.head.appendChild(u), u.sheet && u.sheet.insertRule(`
|
|
5339
5339
|
[data-motion-pop-id="${n}"] {
|
|
5340
5340
|
position: absolute !important;
|
|
5341
5341
|
width: ${r}px !important;
|
|
5342
5342
|
height: ${a}px !important;
|
|
5343
5343
|
top: ${l}px !important;
|
|
5344
|
-
left: ${
|
|
5344
|
+
left: ${c}px !important;
|
|
5345
5345
|
}
|
|
5346
5346
|
`), () => {
|
|
5347
|
-
document.head.removeChild(
|
|
5347
|
+
document.head.removeChild(u);
|
|
5348
5348
|
};
|
|
5349
5349
|
}, [e]), O.jsx(Ff, { isPresent: e, childRef: i, sizeRef: s, children: Dn.cloneElement(t, { ref: i }) });
|
|
5350
5350
|
}
|
|
5351
5351
|
const Bf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r }) => {
|
|
5352
|
-
const a = qn(If), l = kn(),
|
|
5352
|
+
const a = qn(If), l = kn(), c = Et(
|
|
5353
5353
|
() => ({
|
|
5354
5354
|
id: l,
|
|
5355
5355
|
initial: e,
|
|
5356
5356
|
isPresent: n,
|
|
5357
5357
|
custom: s,
|
|
5358
|
-
onExitComplete: (
|
|
5359
|
-
a.set(
|
|
5360
|
-
for (const
|
|
5361
|
-
if (!
|
|
5358
|
+
onExitComplete: (u) => {
|
|
5359
|
+
a.set(u, !0);
|
|
5360
|
+
for (const f of a.values())
|
|
5361
|
+
if (!f)
|
|
5362
5362
|
return;
|
|
5363
5363
|
i && i();
|
|
5364
5364
|
},
|
|
5365
|
-
register: (
|
|
5365
|
+
register: (u) => (a.set(u, !1), () => a.delete(u))
|
|
5366
5366
|
}),
|
|
5367
5367
|
/**
|
|
5368
5368
|
* If the presence of a child affects the layout of the components around it,
|
|
@@ -5371,17 +5371,17 @@ const Bf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
|
|
|
5371
5371
|
*/
|
|
5372
5372
|
o ? [Math.random()] : [n]
|
|
5373
5373
|
);
|
|
5374
|
-
return
|
|
5375
|
-
a.forEach((
|
|
5374
|
+
return Et(() => {
|
|
5375
|
+
a.forEach((u, f) => a.set(f, !1));
|
|
5376
5376
|
}, [n]), Dn.useEffect(() => {
|
|
5377
5377
|
!n && !a.size && i && i();
|
|
5378
|
-
}, [n]), r === "popLayout" && (t = O.jsx(_f, { isPresent: n, children: t })), O.jsx(Fe.Provider, { value:
|
|
5378
|
+
}, [n]), r === "popLayout" && (t = O.jsx(_f, { isPresent: n, children: t })), O.jsx(Fe.Provider, { value: c, children: t });
|
|
5379
5379
|
};
|
|
5380
5380
|
function If() {
|
|
5381
5381
|
return /* @__PURE__ */ new Map();
|
|
5382
5382
|
}
|
|
5383
5383
|
const we = (t) => t.key || "";
|
|
5384
|
-
function
|
|
5384
|
+
function Hs(t) {
|
|
5385
5385
|
const e = [];
|
|
5386
5386
|
return ia.forEach(t, (n) => {
|
|
5387
5387
|
sa(n) && e.push(n);
|
|
@@ -5389,12 +5389,12 @@ function zs(t) {
|
|
|
5389
5389
|
}
|
|
5390
5390
|
const Nf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
|
|
5391
5391
|
ft(!e, "Replace exitBeforeEnter with mode='wait'");
|
|
5392
|
-
const a =
|
|
5392
|
+
const a = Et(() => Hs(t), [t]), l = a.map(we), c = nt(!0), u = nt(a), f = qn(() => /* @__PURE__ */ new Map()), [d, p] = Nt(a), [g, P] = Nt(a);
|
|
5393
5393
|
tr(() => {
|
|
5394
|
-
|
|
5394
|
+
c.current = !1, u.current = a;
|
|
5395
5395
|
for (let y = 0; y < g.length; y++) {
|
|
5396
5396
|
const v = we(g[y]);
|
|
5397
|
-
l.includes(v) ?
|
|
5397
|
+
l.includes(v) ? f.delete(v) : f.get(v) !== !0 && f.set(v, !1);
|
|
5398
5398
|
}
|
|
5399
5399
|
}, [g, l.length, l.join("-")]);
|
|
5400
5400
|
const b = [];
|
|
@@ -5404,33 +5404,33 @@ const Nf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5404
5404
|
const C = g[v], w = we(C);
|
|
5405
5405
|
l.includes(w) || (y.splice(v, 0, C), b.push(C));
|
|
5406
5406
|
}
|
|
5407
|
-
r === "wait" && b.length && (y = b), P(
|
|
5407
|
+
r === "wait" && b.length && (y = b), P(Hs(y)), p(a);
|
|
5408
5408
|
return;
|
|
5409
5409
|
}
|
|
5410
5410
|
process.env.NODE_ENV !== "production" && r === "wait" && g.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
5411
5411
|
const { forceRender: x } = U(In);
|
|
5412
5412
|
return O.jsx(O.Fragment, { children: g.map((y) => {
|
|
5413
5413
|
const v = we(y), C = a === g || l.includes(v), w = () => {
|
|
5414
|
-
if (
|
|
5415
|
-
|
|
5414
|
+
if (f.has(v))
|
|
5415
|
+
f.set(v, !0);
|
|
5416
5416
|
else
|
|
5417
5417
|
return;
|
|
5418
5418
|
let L = !0;
|
|
5419
|
-
|
|
5419
|
+
f.forEach((q) => {
|
|
5420
5420
|
q || (L = !1);
|
|
5421
|
-
}), L && (x == null || x(), P(
|
|
5421
|
+
}), L && (x == null || x(), P(u.current), s && s());
|
|
5422
5422
|
};
|
|
5423
|
-
return O.jsx(Bf, { isPresent: C, initial: !
|
|
5423
|
+
return O.jsx(Bf, { isPresent: C, initial: !c.current || i ? void 0 : !1, custom: C ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: C ? void 0 : w, children: y }, v);
|
|
5424
5424
|
}) });
|
|
5425
5425
|
};
|
|
5426
5426
|
function Re(t) {
|
|
5427
5427
|
var e = new Error(t);
|
|
5428
5428
|
return e.source = "ulid", e;
|
|
5429
5429
|
}
|
|
5430
|
-
var
|
|
5430
|
+
var ci = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", ie = ci.length, Ys = Math.pow(2, 48) - 1, Uf = 10, Wf = 16;
|
|
5431
5431
|
function $f(t) {
|
|
5432
5432
|
var e = Math.floor(t() * ie);
|
|
5433
|
-
return e === ie && (e = ie - 1),
|
|
5433
|
+
return e === ie && (e = ie - 1), ci.charAt(e);
|
|
5434
5434
|
}
|
|
5435
5435
|
function Kf(t, e) {
|
|
5436
5436
|
if (isNaN(t))
|
|
@@ -5442,7 +5442,7 @@ function Kf(t, e) {
|
|
|
5442
5442
|
if (Number.isInteger(t) === !1)
|
|
5443
5443
|
throw Re("time must be an integer");
|
|
5444
5444
|
for (var n = void 0, i = ""; e > 0; e--)
|
|
5445
|
-
n = t % ie, i =
|
|
5445
|
+
n = t % ie, i = ci.charAt(n) + i, t = (t - n) / ie;
|
|
5446
5446
|
return i;
|
|
5447
5447
|
}
|
|
5448
5448
|
function Gf(t, e) {
|
|
@@ -5450,7 +5450,7 @@ function Gf(t, e) {
|
|
|
5450
5450
|
n = $f(e) + n;
|
|
5451
5451
|
return n;
|
|
5452
5452
|
}
|
|
5453
|
-
function
|
|
5453
|
+
function zf() {
|
|
5454
5454
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, e = arguments[1];
|
|
5455
5455
|
e || (e = typeof window < "u" ? window : null);
|
|
5456
5456
|
var n = e && (e.crypto || e.msCrypto);
|
|
@@ -5477,39 +5477,30 @@ function Hf() {
|
|
|
5477
5477
|
}
|
|
5478
5478
|
throw Re("secure crypto unusable, insecure Math.random not allowed");
|
|
5479
5479
|
}
|
|
5480
|
-
function
|
|
5481
|
-
return t || (t =
|
|
5480
|
+
function Hf(t) {
|
|
5481
|
+
return t || (t = zf()), function(n) {
|
|
5482
5482
|
return isNaN(n) && (n = Date.now()), Kf(n, Uf) + Gf(Wf, t);
|
|
5483
5483
|
};
|
|
5484
5484
|
}
|
|
5485
|
-
var Yf =
|
|
5485
|
+
var Yf = Hf();
|
|
5486
5486
|
const Xs = ({
|
|
5487
5487
|
onKeydown: t
|
|
5488
|
-
}) => (
|
|
5488
|
+
}) => (ut(() => (document.addEventListener("keydown", t), () => {
|
|
5489
5489
|
document.removeEventListener("keydown", t);
|
|
5490
5490
|
}), []), null), qs = ({
|
|
5491
5491
|
onMousedown: t
|
|
5492
|
-
}) => (
|
|
5492
|
+
}) => (ut(() => (document.addEventListener("mousedown", t), () => {
|
|
5493
5493
|
document.removeEventListener("mousedown", t);
|
|
5494
5494
|
}), []), null), Xf = ({
|
|
5495
5495
|
onPickerHide: t
|
|
5496
|
-
}) => (
|
|
5496
|
+
}) => (ut(() => () => {
|
|
5497
5497
|
t();
|
|
5498
|
-
}, []), null), qf = "acrool-react-picker__root", Zf = "acrool-react-picker__main-el", dn = {
|
|
5498
|
+
}, []), null), qf = "acrool-react-picker__root", Zf = "acrool-react-picker__main-el", Jf = "acrool-react-picker__picker-el", dn = {
|
|
5499
5499
|
root: qf,
|
|
5500
5500
|
"main-el": "acrool-react-picker__main-el",
|
|
5501
|
-
mainEl: Zf
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
return {
|
|
5505
|
-
display: "none"
|
|
5506
|
-
};
|
|
5507
|
-
const n = t.getBoundingClientRect(), i = n.height, s = n.bottom, o = n.left, r = window.pageYOffset || document.documentElement.scrollTop, a = window.pageXOffset || document.documentElement.scrollLeft, l = window.innerHeight || document.documentElement.clientHeight, u = s >= l / 2 ? "top" : "bottom";
|
|
5508
|
-
return {
|
|
5509
|
-
top: u === "bottom" ? `${s + r}px` : `${s + r - (e + i)}px`,
|
|
5510
|
-
left: `${o + a}px`,
|
|
5511
|
-
transformOrigin: u === "bottom" ? "top" : "bottom"
|
|
5512
|
-
};
|
|
5501
|
+
mainEl: Zf,
|
|
5502
|
+
"picker-el": "acrool-react-picker__picker-el",
|
|
5503
|
+
pickerEl: Jf
|
|
5513
5504
|
}, Qf = (t, e) => (n) => {
|
|
5514
5505
|
e.current = n, t && (typeof t == "function" ? t(n) : t && (t.current = n));
|
|
5515
5506
|
}, th = "acrool-react-picker__motion-animation-wrapper", eh = {
|
|
@@ -5534,25 +5525,31 @@ const Xs = ({
|
|
|
5534
5525
|
children: t,
|
|
5535
5526
|
anchorRef: e
|
|
5536
5527
|
}, n) => {
|
|
5537
|
-
const i = nt(null), [s, o] = Nt(
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5528
|
+
const i = nt(null), [s, o] = Nt({ display: "none" });
|
|
5529
|
+
return ut(() => {
|
|
5530
|
+
const r = (a) => {
|
|
5531
|
+
var l;
|
|
5532
|
+
if (e.current && i.current) {
|
|
5533
|
+
const u = (((l = a == null ? void 0 : a[0]) == null ? void 0 : l.contentRect) ?? i.current.getBoundingClientRect()).height, f = e.current.getBoundingClientRect(), d = f.height, p = f.bottom, g = f.left, P = window.pageYOffset || document.documentElement.scrollTop, b = window.pageXOffset || document.documentElement.scrollLeft, x = window.innerHeight || document.documentElement.clientHeight, y = 15, v = p + u + y >= x ? "top" : "bottom";
|
|
5534
|
+
o({
|
|
5535
|
+
top: v === "bottom" ? `${p + P}px` : `${p + P - (u + d)}px`,
|
|
5536
|
+
left: `${g + b}px`,
|
|
5537
|
+
transformOrigin: v === "bottom" ? "top" : "bottom"
|
|
5538
|
+
});
|
|
5539
|
+
}
|
|
5540
|
+
};
|
|
5541
|
+
if (e.current && i.current) {
|
|
5542
|
+
const a = new ResizeObserver(r);
|
|
5543
|
+
return a.observe(i.current), window.addEventListener("scroll", r), window.addEventListener("resize", r), () => {
|
|
5544
|
+
a.disconnect(), window.removeEventListener("scroll", r), window.removeEventListener("resize", r);
|
|
5546
5545
|
};
|
|
5547
5546
|
}
|
|
5548
|
-
}, [])
|
|
5549
|
-
const r = Jf(e.current, s);
|
|
5550
|
-
return /* @__PURE__ */ O.jsx(
|
|
5547
|
+
}, [e, i]), /* @__PURE__ */ O.jsx(
|
|
5551
5548
|
jf.div,
|
|
5552
5549
|
{
|
|
5553
5550
|
ref: Qf(n, i),
|
|
5554
5551
|
transition: { type: "spring", duration: 0.2 },
|
|
5555
|
-
style:
|
|
5552
|
+
style: s,
|
|
5556
5553
|
className: eh.motionAnimationWrapper,
|
|
5557
5554
|
variants: nh.variants,
|
|
5558
5555
|
initial: "initial",
|
|
@@ -5561,31 +5558,31 @@ const Xs = ({
|
|
|
5561
5558
|
children: t
|
|
5562
5559
|
}
|
|
5563
5560
|
);
|
|
5564
|
-
}, sh =
|
|
5561
|
+
}, sh = Ee(ih);
|
|
5565
5562
|
function fh(t, e) {
|
|
5566
|
-
const n =
|
|
5567
|
-
return
|
|
5568
|
-
const [r, a] = Nt(!1), [l,
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
}, [JSON.stringify(s.value)]),
|
|
5572
|
-
g.current =
|
|
5573
|
-
}, [
|
|
5563
|
+
const n = Ee(t);
|
|
5564
|
+
return Ee((s, o) => {
|
|
5565
|
+
const [r, a] = Nt(!1), [l, c] = Nt(!1), [u, f] = Nt(), d = nt(null), p = nt(null), g = nt(u);
|
|
5566
|
+
ut(() => {
|
|
5567
|
+
f(s.value);
|
|
5568
|
+
}, [JSON.stringify(s.value)]), ut(() => {
|
|
5569
|
+
g.current = u;
|
|
5570
|
+
}, [u]);
|
|
5574
5571
|
const P = mt((w) => {
|
|
5575
|
-
[Ot.Tab].includes(w.key) && (a(!1),
|
|
5572
|
+
[Ot.Tab].includes(w.key) && (a(!1), c(!1));
|
|
5576
5573
|
}, []), b = mt((w) => {
|
|
5577
5574
|
([Ot.ArrowUp, Ot.ArrowDown, Ot.Enter].includes(w.key) || w.code === "Space") && a(!0);
|
|
5578
5575
|
}, []), x = mt((w) => {
|
|
5579
|
-
!d.current && p.current && !p.current.contains(w.target) &&
|
|
5576
|
+
!d.current && p.current && !p.current.contains(w.target) && c(!1);
|
|
5580
5577
|
}, []), y = mt((w) => {
|
|
5581
|
-
d.current && !d.current.contains(w.target) && p.current && !p.current.contains(w.target) && (a(!1),
|
|
5578
|
+
d.current && !d.current.contains(w.target) && p.current && !p.current.contains(w.target) && (a(!1), c(!1));
|
|
5582
5579
|
}, []), v = mt(() => {
|
|
5583
5580
|
if (typeof (s == null ? void 0 : s.onChange) > "u") {
|
|
5584
5581
|
wt.warning("@acrool/react-picker", "createPicker component props onChange is undefined, is no call");
|
|
5585
5582
|
return;
|
|
5586
5583
|
}
|
|
5587
|
-
typeof g.current < "u" && JSON.stringify(
|
|
5588
|
-
}, [
|
|
5584
|
+
typeof g.current < "u" && JSON.stringify(u) !== JSON.stringify(g.current) && s.onChange(g.current);
|
|
5585
|
+
}, [u, s.onChange]), C = mt((w) => {
|
|
5589
5586
|
[Ot.Escape].includes(w.key) && r && (w.stopPropagation(), a(!1));
|
|
5590
5587
|
}, [r]);
|
|
5591
5588
|
return /* @__PURE__ */ O.jsx(
|
|
@@ -5596,11 +5593,11 @@ function fh(t, e) {
|
|
|
5596
5593
|
show: () => a(!0),
|
|
5597
5594
|
toggle: () => a((w) => !w),
|
|
5598
5595
|
isVisible: r,
|
|
5599
|
-
inputFocus: () =>
|
|
5600
|
-
inputBlur: () =>
|
|
5596
|
+
inputFocus: () => c(!0),
|
|
5597
|
+
inputBlur: () => c(!1),
|
|
5601
5598
|
isInputFocus: l,
|
|
5602
|
-
value:
|
|
5603
|
-
onChange:
|
|
5599
|
+
value: u,
|
|
5600
|
+
onChange: f
|
|
5604
5601
|
},
|
|
5605
5602
|
children: /* @__PURE__ */ O.jsxs("div", { className: dn.root, children: [
|
|
5606
5603
|
/* @__PURE__ */ O.jsx("div", { ref: p, className: dn.mainEl, onKeyDown: C, children: /* @__PURE__ */ O.jsx(
|