@acrool/react-picker 0.0.11 → 0.0.12-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acrool-react-picker.es.js +1038 -1031
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Ln from "react";
|
|
2
|
-
import Fn, { createContext as kt, useContext as G,
|
|
3
|
-
import
|
|
2
|
+
import Fn, { createContext as kt, useContext as G, useCallback as at, useEffect as ct, useLayoutEffect as tr, useRef as it, useInsertionEffect as er, useMemo as Mt, forwardRef as Me, Fragment as nr, createElement as oa, useId as On, Component as aa, Children as la, isValidElement as ca, useState as _t } from "react";
|
|
3
|
+
import ua from "react-dom";
|
|
4
4
|
var st = /* @__PURE__ */ ((t) => (t.bottom = "bottom", t.top = "top", t))(st || {}), gt = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t))(gt || {});
|
|
5
5
|
const fe = [
|
|
6
6
|
"color: #fff",
|
|
@@ -19,42 +19,42 @@ const fe = [
|
|
|
19
19
|
function de(t, e, ...n) {
|
|
20
20
|
console.log(`%c ${t}`, e, ...n);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function fa(t, ...e) {
|
|
23
23
|
const n = fe.concat([
|
|
24
24
|
`background-color: ${he.primary}`
|
|
25
25
|
]).join(";");
|
|
26
26
|
de(t, n, ...e);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function ha(t, ...e) {
|
|
29
29
|
const n = fe.concat([
|
|
30
30
|
`background-color: ${he.success}`
|
|
31
31
|
]).join(";");
|
|
32
32
|
de(t, n, ...e);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function da(t, ...e) {
|
|
35
35
|
const n = fe.concat([
|
|
36
36
|
`background-color: ${he.info}`
|
|
37
37
|
]).join(";");
|
|
38
38
|
de(t, n, ...e);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function pa(t, ...e) {
|
|
41
41
|
const n = fe.concat([
|
|
42
42
|
`background-color: ${he.warning}`
|
|
43
43
|
]).join(";");
|
|
44
44
|
de(t, n, ...e);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function ma(t, ...e) {
|
|
47
47
|
const n = fe.concat([
|
|
48
48
|
`background-color: ${he.danger}`
|
|
49
49
|
]).join(";");
|
|
50
50
|
de(t, n, ...e);
|
|
51
51
|
}
|
|
52
52
|
const yt = {
|
|
53
|
-
primary:
|
|
54
|
-
success:
|
|
55
|
-
info:
|
|
56
|
-
warning:
|
|
57
|
-
danger:
|
|
53
|
+
primary: fa,
|
|
54
|
+
success: ha,
|
|
55
|
+
info: da,
|
|
56
|
+
warning: pa,
|
|
57
|
+
danger: ma
|
|
58
58
|
}, jn = kt({
|
|
59
59
|
hide: () => yt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
60
60
|
show: () => yt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
@@ -66,7 +66,7 @@ const yt = {
|
|
|
66
66
|
onChange: () => yt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
67
67
|
vertical: st.bottom,
|
|
68
68
|
setVertical: () => yt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
|
|
69
|
-
}), mh = jn.Consumer,
|
|
69
|
+
}), mh = jn.Consumer, ga = () => G(jn);
|
|
70
70
|
var yn = { exports: {} }, qt = {};
|
|
71
71
|
/**
|
|
72
72
|
* @license React
|
|
@@ -77,11 +77,11 @@ var yn = { exports: {} }, qt = {};
|
|
|
77
77
|
* This source code is licensed under the MIT license found in the
|
|
78
78
|
* LICENSE file in the root directory of this source tree.
|
|
79
79
|
*/
|
|
80
|
-
var
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
80
|
+
var ki;
|
|
81
|
+
function ya() {
|
|
82
|
+
if (ki)
|
|
83
83
|
return qt;
|
|
84
|
-
|
|
84
|
+
ki = 1;
|
|
85
85
|
var t = Fn, 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 };
|
|
86
86
|
function r(a, l, c) {
|
|
87
87
|
var u, f = {}, d = null, p = null;
|
|
@@ -105,9 +105,9 @@ var Zt = {};
|
|
|
105
105
|
* This source code is licensed under the MIT license found in the
|
|
106
106
|
* LICENSE file in the root directory of this source tree.
|
|
107
107
|
*/
|
|
108
|
-
var
|
|
109
|
-
function
|
|
110
|
-
return
|
|
108
|
+
var Li;
|
|
109
|
+
function va() {
|
|
110
|
+
return Li || (Li = 1, process.env.NODE_ENV !== "production" && function() {
|
|
111
111
|
var t = Fn, 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"), m = Symbol.iterator, v = "@@iterator";
|
|
112
112
|
function x(h) {
|
|
113
113
|
if (h === null || typeof h != "object")
|
|
@@ -197,18 +197,18 @@ function ya() {
|
|
|
197
197
|
}
|
|
198
198
|
return null;
|
|
199
199
|
}
|
|
200
|
-
var rt = Object.assign, B = 0, Q, Lt, Ft,
|
|
201
|
-
function
|
|
200
|
+
var rt = Object.assign, B = 0, Q, Lt, Ft, di, pi, mi, gi;
|
|
201
|
+
function yi() {
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
function
|
|
203
|
+
yi.__reactDisabledLog = !0;
|
|
204
|
+
function Lo() {
|
|
205
205
|
{
|
|
206
206
|
if (B === 0) {
|
|
207
|
-
Q = console.log, Lt = console.info, Ft = console.warn,
|
|
207
|
+
Q = console.log, Lt = console.info, Ft = console.warn, di = console.error, pi = console.group, mi = console.groupCollapsed, gi = console.groupEnd;
|
|
208
208
|
var h = {
|
|
209
209
|
configurable: !0,
|
|
210
210
|
enumerable: !0,
|
|
211
|
-
value:
|
|
211
|
+
value: yi,
|
|
212
212
|
writable: !0
|
|
213
213
|
};
|
|
214
214
|
Object.defineProperties(console, {
|
|
@@ -224,7 +224,7 @@ function ya() {
|
|
|
224
224
|
B++;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Fo() {
|
|
228
228
|
{
|
|
229
229
|
if (B--, B === 0) {
|
|
230
230
|
var h = {
|
|
@@ -243,16 +243,16 @@ function ya() {
|
|
|
243
243
|
value: Ft
|
|
244
244
|
}),
|
|
245
245
|
error: rt({}, h, {
|
|
246
|
-
value:
|
|
246
|
+
value: di
|
|
247
247
|
}),
|
|
248
248
|
group: rt({}, h, {
|
|
249
|
-
value:
|
|
249
|
+
value: pi
|
|
250
250
|
}),
|
|
251
251
|
groupCollapsed: rt({}, h, {
|
|
252
|
-
value:
|
|
252
|
+
value: mi
|
|
253
253
|
}),
|
|
254
254
|
groupEnd: rt({}, h, {
|
|
255
|
-
value:
|
|
255
|
+
value: gi
|
|
256
256
|
})
|
|
257
257
|
});
|
|
258
258
|
}
|
|
@@ -275,10 +275,10 @@ function ya() {
|
|
|
275
275
|
}
|
|
276
276
|
var Xe = !1, Pe;
|
|
277
277
|
{
|
|
278
|
-
var
|
|
279
|
-
Pe = new
|
|
278
|
+
var Oo = typeof WeakMap == "function" ? WeakMap : Map;
|
|
279
|
+
Pe = new Oo();
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function vi(h, g) {
|
|
282
282
|
if (!h || Xe)
|
|
283
283
|
return "";
|
|
284
284
|
{
|
|
@@ -291,7 +291,7 @@ function ya() {
|
|
|
291
291
|
var D = Error.prepareStackTrace;
|
|
292
292
|
Error.prepareStackTrace = void 0;
|
|
293
293
|
var L;
|
|
294
|
-
L = ze.current, ze.current = null,
|
|
294
|
+
L = ze.current, ze.current = null, Lo();
|
|
295
295
|
try {
|
|
296
296
|
if (g) {
|
|
297
297
|
var V = function() {
|
|
@@ -344,15 +344,15 @@ function ya() {
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
} finally {
|
|
347
|
-
Xe = !1, ze.current = L,
|
|
347
|
+
Xe = !1, ze.current = L, Fo(), Error.prepareStackTrace = D;
|
|
348
348
|
}
|
|
349
|
-
var jt = h ? h.displayName || h.name : "",
|
|
350
|
-
return typeof h == "function" && Pe.set(h,
|
|
349
|
+
var jt = h ? h.displayName || h.name : "", St = jt ? ve(jt) : "";
|
|
350
|
+
return typeof h == "function" && Pe.set(h, St), St;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
return
|
|
352
|
+
function jo(h, g, b) {
|
|
353
|
+
return vi(h, !1);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function _o(h) {
|
|
356
356
|
var g = h.prototype;
|
|
357
357
|
return !!(g && g.isReactComponent);
|
|
358
358
|
}
|
|
@@ -360,7 +360,7 @@ function ya() {
|
|
|
360
360
|
if (h == null)
|
|
361
361
|
return "";
|
|
362
362
|
if (typeof h == "function")
|
|
363
|
-
return
|
|
363
|
+
return vi(h, _o(h));
|
|
364
364
|
if (typeof h == "string")
|
|
365
365
|
return ve(h);
|
|
366
366
|
switch (h) {
|
|
@@ -372,7 +372,7 @@ function ya() {
|
|
|
372
372
|
if (typeof h == "object")
|
|
373
373
|
switch (h.$$typeof) {
|
|
374
374
|
case l:
|
|
375
|
-
return
|
|
375
|
+
return jo(h.render);
|
|
376
376
|
case f:
|
|
377
377
|
return Te(h.type, g, b);
|
|
378
378
|
case d: {
|
|
@@ -385,15 +385,15 @@ function ya() {
|
|
|
385
385
|
}
|
|
386
386
|
return "";
|
|
387
387
|
}
|
|
388
|
-
var Yt = Object.prototype.hasOwnProperty,
|
|
388
|
+
var Yt = Object.prototype.hasOwnProperty, Pi = {}, Ti = P.ReactDebugCurrentFrame;
|
|
389
389
|
function be(h) {
|
|
390
390
|
if (h) {
|
|
391
391
|
var g = h._owner, b = Te(h.type, h._source, g ? g.type : null);
|
|
392
|
-
|
|
392
|
+
Ti.setExtraStackFrame(b);
|
|
393
393
|
} else
|
|
394
|
-
|
|
394
|
+
Ti.setExtraStackFrame(null);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function Bo(h, g, b, A, D) {
|
|
397
397
|
{
|
|
398
398
|
var L = Function.call.bind(Yt);
|
|
399
399
|
for (var V in h)
|
|
@@ -408,42 +408,42 @@ function ya() {
|
|
|
408
408
|
} catch (I) {
|
|
409
409
|
E = I;
|
|
410
410
|
}
|
|
411
|
-
E && !(E instanceof Error) && (be(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", b, V, typeof E), be(null)), E instanceof Error && !(E.message in
|
|
411
|
+
E && !(E instanceof Error) && (be(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", b, V, typeof E), be(null)), E instanceof Error && !(E.message in Pi) && (Pi[E.message] = !0, be(D), y("Failed %s type: %s", b, E.message), be(null));
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
415
|
+
var Io = Array.isArray;
|
|
416
416
|
function qe(h) {
|
|
417
|
-
return
|
|
417
|
+
return Io(h);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function No(h) {
|
|
420
420
|
{
|
|
421
421
|
var g = typeof Symbol == "function" && Symbol.toStringTag, b = g && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
422
422
|
return b;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function Uo(h) {
|
|
426
426
|
try {
|
|
427
|
-
return
|
|
427
|
+
return bi(h), !1;
|
|
428
428
|
} catch {
|
|
429
429
|
return !0;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function bi(h) {
|
|
433
433
|
return "" + h;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
if (
|
|
437
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
435
|
+
function xi(h) {
|
|
436
|
+
if (Uo(h))
|
|
437
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", No(h)), bi(h);
|
|
438
438
|
}
|
|
439
|
-
var Xt = P.ReactCurrentOwner,
|
|
439
|
+
var Xt = P.ReactCurrentOwner, Wo = {
|
|
440
440
|
key: !0,
|
|
441
441
|
ref: !0,
|
|
442
442
|
__self: !0,
|
|
443
443
|
__source: !0
|
|
444
|
-
},
|
|
444
|
+
}, wi, Si, Ze;
|
|
445
445
|
Ze = {};
|
|
446
|
-
function
|
|
446
|
+
function $o(h) {
|
|
447
447
|
if (Yt.call(h, "ref")) {
|
|
448
448
|
var g = Object.getOwnPropertyDescriptor(h, "ref").get;
|
|
449
449
|
if (g && g.isReactWarning)
|
|
@@ -451,7 +451,7 @@ function ya() {
|
|
|
451
451
|
}
|
|
452
452
|
return h.ref !== void 0;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Ko(h) {
|
|
455
455
|
if (Yt.call(h, "key")) {
|
|
456
456
|
var g = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
457
457
|
if (g && g.isReactWarning)
|
|
@@ -459,16 +459,16 @@ function ya() {
|
|
|
459
459
|
}
|
|
460
460
|
return h.key !== void 0;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Go(h, g) {
|
|
463
463
|
if (typeof h.ref == "string" && Xt.current && g && Xt.current.stateNode !== g) {
|
|
464
464
|
var b = J(Xt.current.type);
|
|
465
465
|
Ze[b] || (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', J(Xt.current.type), h.ref), Ze[b] = !0);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Ho(h, g) {
|
|
469
469
|
{
|
|
470
470
|
var b = function() {
|
|
471
|
-
|
|
471
|
+
wi || (wi = !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)", g));
|
|
472
472
|
};
|
|
473
473
|
b.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
474
474
|
get: b,
|
|
@@ -476,10 +476,10 @@ function ya() {
|
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function zo(h, g) {
|
|
480
480
|
{
|
|
481
481
|
var b = function() {
|
|
482
|
-
|
|
482
|
+
Si || (Si = !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)", g));
|
|
483
483
|
};
|
|
484
484
|
b.isReactWarning = !0, Object.defineProperty(h, "ref", {
|
|
485
485
|
get: b,
|
|
@@ -487,7 +487,7 @@ function ya() {
|
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
var
|
|
490
|
+
var Yo = function(h, g, b, A, D, L, V) {
|
|
491
491
|
var E = {
|
|
492
492
|
// This tag allows us to uniquely identify this as a React Element
|
|
493
493
|
$$typeof: e,
|
|
@@ -516,12 +516,12 @@ function ya() {
|
|
|
516
516
|
value: D
|
|
517
517
|
}), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
|
|
518
518
|
};
|
|
519
|
-
function
|
|
519
|
+
function Xo(h, g, b, A, D) {
|
|
520
520
|
{
|
|
521
521
|
var L, V = {}, E = null, X = null;
|
|
522
|
-
b !== void 0 && (
|
|
522
|
+
b !== void 0 && (xi(b), E = "" + b), Ko(g) && (xi(g.key), E = "" + g.key), $o(g) && (X = g.ref, Go(g, D));
|
|
523
523
|
for (L in g)
|
|
524
|
-
Yt.call(g, L) && !
|
|
524
|
+
Yt.call(g, L) && !Wo.hasOwnProperty(L) && (V[L] = g[L]);
|
|
525
525
|
if (h && h.defaultProps) {
|
|
526
526
|
var I = h.defaultProps;
|
|
527
527
|
for (L in I)
|
|
@@ -529,25 +529,25 @@ function ya() {
|
|
|
529
529
|
}
|
|
530
530
|
if (E || X) {
|
|
531
531
|
var W = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
|
|
532
|
-
E &&
|
|
532
|
+
E && Ho(V, W), X && zo(V, W);
|
|
533
533
|
}
|
|
534
|
-
return
|
|
534
|
+
return Yo(h, E, X, D, A, Xt.current, V);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
var Je = P.ReactCurrentOwner,
|
|
537
|
+
var Je = P.ReactCurrentOwner, Ai = P.ReactDebugCurrentFrame;
|
|
538
538
|
function Ot(h) {
|
|
539
539
|
if (h) {
|
|
540
540
|
var g = h._owner, b = Te(h.type, h._source, g ? g.type : null);
|
|
541
|
-
|
|
541
|
+
Ai.setExtraStackFrame(b);
|
|
542
542
|
} else
|
|
543
|
-
|
|
543
|
+
Ai.setExtraStackFrame(null);
|
|
544
544
|
}
|
|
545
545
|
var Qe;
|
|
546
546
|
Qe = !1;
|
|
547
547
|
function tn(h) {
|
|
548
548
|
return typeof h == "object" && h !== null && h.$$typeof === e;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Ci() {
|
|
551
551
|
{
|
|
552
552
|
if (Je.current) {
|
|
553
553
|
var h = J(Je.current.type);
|
|
@@ -559,7 +559,7 @@ Check the render method of \`` + h + "`.";
|
|
|
559
559
|
return "";
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function qo(h) {
|
|
563
563
|
{
|
|
564
564
|
if (h !== void 0) {
|
|
565
565
|
var g = h.fileName.replace(/^.*[\\\/]/, ""), b = h.lineNumber;
|
|
@@ -570,10 +570,10 @@ Check your code at ` + g + ":" + b + ".";
|
|
|
570
570
|
return "";
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
var
|
|
574
|
-
function
|
|
573
|
+
var Ri = {};
|
|
574
|
+
function Zo(h) {
|
|
575
575
|
{
|
|
576
|
-
var g =
|
|
576
|
+
var g = Ci();
|
|
577
577
|
if (!g) {
|
|
578
578
|
var b = typeof h == "string" ? h : h.displayName || h.name;
|
|
579
579
|
b && (g = `
|
|
@@ -583,27 +583,27 @@ Check the top-level render call using <` + b + ">.");
|
|
|
583
583
|
return g;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Ei(h, g) {
|
|
587
587
|
{
|
|
588
588
|
if (!h._store || h._store.validated || h.key != null)
|
|
589
589
|
return;
|
|
590
590
|
h._store.validated = !0;
|
|
591
|
-
var b =
|
|
592
|
-
if (
|
|
591
|
+
var b = Zo(g);
|
|
592
|
+
if (Ri[b])
|
|
593
593
|
return;
|
|
594
|
-
|
|
594
|
+
Ri[b] = !0;
|
|
595
595
|
var A = "";
|
|
596
596
|
h && h._owner && h._owner !== Je.current && (A = " It was passed a child from " + J(h._owner.type) + "."), Ot(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.', b, A), Ot(null);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function Vi(h, g) {
|
|
600
600
|
{
|
|
601
601
|
if (typeof h != "object")
|
|
602
602
|
return;
|
|
603
603
|
if (qe(h))
|
|
604
604
|
for (var b = 0; b < h.length; b++) {
|
|
605
605
|
var A = h[b];
|
|
606
|
-
tn(A) &&
|
|
606
|
+
tn(A) && Ei(A, g);
|
|
607
607
|
}
|
|
608
608
|
else if (tn(h))
|
|
609
609
|
h._store && (h._store.validated = !0);
|
|
@@ -611,11 +611,11 @@ Check the top-level render call using <` + b + ">.");
|
|
|
611
611
|
var D = x(h);
|
|
612
612
|
if (typeof D == "function" && D !== h.entries)
|
|
613
613
|
for (var L = D.call(h), V; !(V = L.next()).done; )
|
|
614
|
-
tn(V.value) &&
|
|
614
|
+
tn(V.value) && Ei(V.value, g);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Jo(h) {
|
|
619
619
|
{
|
|
620
620
|
var g = h.type;
|
|
621
621
|
if (g == null || typeof g == "string")
|
|
@@ -631,7 +631,7 @@ Check the top-level render call using <` + b + ">.");
|
|
|
631
631
|
return;
|
|
632
632
|
if (b) {
|
|
633
633
|
var A = J(g);
|
|
634
|
-
|
|
634
|
+
Bo(b, h.props, "prop", A, h);
|
|
635
635
|
} else if (g.PropTypes !== void 0 && !Qe) {
|
|
636
636
|
Qe = !0;
|
|
637
637
|
var D = J(g);
|
|
@@ -640,7 +640,7 @@ Check the top-level render call using <` + b + ">.");
|
|
|
640
640
|
typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Qo(h) {
|
|
644
644
|
{
|
|
645
645
|
for (var g = Object.keys(h.props), b = 0; b < g.length; b++) {
|
|
646
646
|
var A = g[b];
|
|
@@ -652,19 +652,19 @@ Check the top-level render call using <` + b + ">.");
|
|
|
652
652
|
h.ref !== null && (Ot(h), y("Invalid attribute `ref` supplied to `React.Fragment`."), Ot(null));
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
var
|
|
656
|
-
function
|
|
655
|
+
var Di = {};
|
|
656
|
+
function Mi(h, g, b, A, D, L) {
|
|
657
657
|
{
|
|
658
658
|
var V = U(h);
|
|
659
659
|
if (!V) {
|
|
660
660
|
var E = "";
|
|
661
661
|
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (E += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
662
|
-
var X =
|
|
663
|
-
X ? E += X : E +=
|
|
662
|
+
var X = qo(D);
|
|
663
|
+
X ? E += X : E += Ci();
|
|
664
664
|
var I;
|
|
665
665
|
h === null ? I = "null" : qe(h) ? I = "array" : h !== void 0 && h.$$typeof === e ? (I = "<" + (J(h.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : I = 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", I, E);
|
|
666
666
|
}
|
|
667
|
-
var W =
|
|
667
|
+
var W = Xo(h, g, b, D, L);
|
|
668
668
|
if (W == null)
|
|
669
669
|
return W;
|
|
670
670
|
if (V) {
|
|
@@ -673,45 +673,82 @@ Check the top-level render call using <` + b + ">.");
|
|
|
673
673
|
if (A)
|
|
674
674
|
if (qe(tt)) {
|
|
675
675
|
for (var jt = 0; jt < tt.length; jt++)
|
|
676
|
-
|
|
676
|
+
Vi(tt[jt], h);
|
|
677
677
|
Object.freeze && Object.freeze(tt);
|
|
678
678
|
} else
|
|
679
679
|
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.");
|
|
680
680
|
else
|
|
681
|
-
|
|
681
|
+
Vi(tt, h);
|
|
682
682
|
}
|
|
683
683
|
if (Yt.call(g, "key")) {
|
|
684
|
-
var
|
|
685
|
-
return
|
|
684
|
+
var St = J(h), q = Object.keys(g).filter(function(ra) {
|
|
685
|
+
return ra !== "key";
|
|
686
686
|
}), en = q.length > 0 ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
687
|
-
if (!
|
|
688
|
-
var
|
|
687
|
+
if (!Di[St + en]) {
|
|
688
|
+
var sa = q.length > 0 ? "{" + q.join(": ..., ") + ": ...}" : "{}";
|
|
689
689
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
690
690
|
let props = %s;
|
|
691
691
|
<%s {...props} />
|
|
692
692
|
React keys must be passed directly to JSX without using spread:
|
|
693
693
|
let props = %s;
|
|
694
|
-
<%s key={someKey} {...props} />`, en,
|
|
694
|
+
<%s key={someKey} {...props} />`, en, St, sa, St), Di[St + en] = !0;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
|
-
return h === i ?
|
|
697
|
+
return h === i ? Qo(W) : Jo(W), W;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
function Qo(h, g, b) {
|
|
701
|
-
return Di(h, g, b, !0);
|
|
702
|
-
}
|
|
703
700
|
function ta(h, g, b) {
|
|
704
|
-
return
|
|
701
|
+
return Mi(h, g, b, !0);
|
|
705
702
|
}
|
|
706
|
-
|
|
707
|
-
|
|
703
|
+
function ea(h, g, b) {
|
|
704
|
+
return Mi(h, g, b, !1);
|
|
705
|
+
}
|
|
706
|
+
var na = ea, ia = ta;
|
|
707
|
+
Zt.Fragment = i, Zt.jsx = na, Zt.jsxs = ia;
|
|
708
708
|
}()), Zt;
|
|
709
709
|
}
|
|
710
|
-
process.env.NODE_ENV === "production" ? yn.exports =
|
|
711
|
-
var O = yn.exports,
|
|
712
|
-
|
|
710
|
+
process.env.NODE_ENV === "production" ? yn.exports = ya() : yn.exports = va();
|
|
711
|
+
var O = yn.exports, Ct = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Space = "Space", t.Tab = "Tab", t.ShiftAndTab = "Shift+Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t))(Ct || {}), Ce = /* @__PURE__ */ ((t) => (t.Input = "INPUT", t.Textarea = "TEXTAREA", t.Select = "SELECT", t.Button = "BUTTON", t))(Ce || {});
|
|
712
|
+
const ir = [
|
|
713
|
+
Ce.Input,
|
|
714
|
+
Ce.Textarea,
|
|
715
|
+
Ce.Select
|
|
716
|
+
], Pa = (t) => (t == null ? void 0 : t.split("+").map((e) => e.trim().toLowerCase())) ?? [], Ta = (t) => ({
|
|
717
|
+
formFieldTags: (t == null ? void 0 : t.formFieldTags) ?? ir,
|
|
718
|
+
ignoreFormField: (t == null ? void 0 : t.ignoreFormField) ?? !0,
|
|
719
|
+
preventDefault: (t == null ? void 0 : t.preventDefault) ?? !0,
|
|
720
|
+
stopPropagation: (t == null ? void 0 : t.stopPropagation) ?? !0
|
|
721
|
+
}), ba = (t, e, n) => (i) => {
|
|
722
|
+
const s = Array.isArray(t) ? t : [t];
|
|
723
|
+
for (const o of s) {
|
|
724
|
+
const r = Ta(n), a = Pa(o), l = i.key.toLowerCase(), c = i.code.toLowerCase(), u = document.activeElement;
|
|
725
|
+
if (i.repeat)
|
|
726
|
+
continue;
|
|
727
|
+
const f = a.includes("ctrl"), d = a.includes("cmd"), p = a.includes("shift"), m = f === i.ctrlKey, v = d === i.metaKey, x = p === i.shiftKey;
|
|
728
|
+
if (!(!(a.includes(l) || a.includes(c)) || !m || !v || !x) && !(!r.ignoreFormField && u && ir.includes(u.tagName)) && (r.preventDefault && i.preventDefault(), r.stopPropagation && i.stopPropagation(), !!e)) {
|
|
729
|
+
e(i);
|
|
730
|
+
break;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}, Fi = ({
|
|
734
|
+
onKeyDown: t,
|
|
735
|
+
hotKey: e,
|
|
736
|
+
stopPropagation: n = !0,
|
|
737
|
+
preventDefault: i = !0,
|
|
738
|
+
ignoreFormField: s = !1,
|
|
739
|
+
formFieldTags: o
|
|
740
|
+
}) => {
|
|
741
|
+
const r = at((a) => {
|
|
742
|
+
t && ba(e, t, { stopPropagation: n, preventDefault: i, ignoreFormField: s, formFieldTags: o })(a);
|
|
743
|
+
}, [e, t]);
|
|
744
|
+
return ct(() => (document.addEventListener("keydown", r), () => {
|
|
745
|
+
document.removeEventListener("keydown", r);
|
|
746
|
+
}), [r]), null;
|
|
747
|
+
};
|
|
748
|
+
var xa = Object.defineProperty, wa = (t, e, n) => e in t ? xa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, vn = (t, e, n) => (wa(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
749
|
+
class sr extends Fn.Component {
|
|
713
750
|
constructor(e) {
|
|
714
|
-
super(e), vn(this, "_el"), vn(this, "renderPortal", () =>
|
|
751
|
+
super(e), vn(this, "_el"), vn(this, "renderPortal", () => ua.createPortal(
|
|
715
752
|
this.props.children,
|
|
716
753
|
this._el
|
|
717
754
|
));
|
|
@@ -733,18 +770,18 @@ class nr extends Fn.Component {
|
|
|
733
770
|
return this.renderPortal();
|
|
734
771
|
}
|
|
735
772
|
}
|
|
736
|
-
vn(
|
|
773
|
+
vn(sr, "defaultProps", {
|
|
737
774
|
containerSelector: () => document.body
|
|
738
775
|
});
|
|
739
776
|
const _n = kt({
|
|
740
777
|
transformPagePoint: (t) => t,
|
|
741
778
|
isStatic: !1,
|
|
742
779
|
reducedMotion: "never"
|
|
743
|
-
}), Be = kt({}), Ie = kt(null), Bn = typeof window < "u",
|
|
780
|
+
}), Be = kt({}), Ie = kt(null), Bn = typeof window < "u", rr = Bn ? tr : ct, or = kt({ strict: !1 }), Ne = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Sa = "framerAppearId", ar = "data-" + Ne(Sa), Aa = {
|
|
744
781
|
skipAnimations: !1,
|
|
745
782
|
useManualTiming: !1
|
|
746
783
|
};
|
|
747
|
-
function
|
|
784
|
+
function Ca(t) {
|
|
748
785
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = !1, s = !1;
|
|
749
786
|
const o = /* @__PURE__ */ new WeakSet();
|
|
750
787
|
let r = {
|
|
@@ -795,16 +832,16 @@ const xe = [
|
|
|
795
832
|
// Write
|
|
796
833
|
"postRender"
|
|
797
834
|
// Compute
|
|
798
|
-
],
|
|
799
|
-
function
|
|
835
|
+
], Ra = 40;
|
|
836
|
+
function lr(t, e) {
|
|
800
837
|
let n = !1, i = !0;
|
|
801
838
|
const s = {
|
|
802
839
|
delta: 0,
|
|
803
840
|
timestamp: 0,
|
|
804
841
|
isProcessing: !1
|
|
805
|
-
}, o = () => n = !0, r = xe.reduce((P, y) => (P[y] =
|
|
842
|
+
}, o = () => n = !0, r = xe.reduce((P, y) => (P[y] = Ca(o), P), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: f, postRender: d } = r, p = () => {
|
|
806
843
|
const P = performance.now();
|
|
807
|
-
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(P - s.timestamp,
|
|
844
|
+
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(P - s.timestamp, Ra), 1), s.timestamp = P, 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));
|
|
808
845
|
}, m = () => {
|
|
809
846
|
n = !0, i = !0, s.isProcessing || t(p);
|
|
810
847
|
};
|
|
@@ -816,14 +853,14 @@ function or(t, e) {
|
|
|
816
853
|
r[xe[y]].cancel(P);
|
|
817
854
|
}, state: s, steps: r };
|
|
818
855
|
}
|
|
819
|
-
const { schedule: In, cancel: gh } =
|
|
856
|
+
const { schedule: In, cancel: gh } = lr(queueMicrotask, !1);
|
|
820
857
|
function Bt(t) {
|
|
821
858
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
822
859
|
}
|
|
823
|
-
const
|
|
824
|
-
let
|
|
825
|
-
function
|
|
826
|
-
const { visualElement: o } = G(Be), r = G(
|
|
860
|
+
const cr = kt({});
|
|
861
|
+
let Oi = !1;
|
|
862
|
+
function Ea(t, e, n, i, s) {
|
|
863
|
+
const { visualElement: o } = G(Be), r = G(or), a = G(Ie), l = G(_n).reducedMotion, c = it();
|
|
827
864
|
i = i || r.renderer, !c.current && i && (c.current = i(t, {
|
|
828
865
|
visualState: e,
|
|
829
866
|
parent: o,
|
|
@@ -832,23 +869,23 @@ function Sa(t, e, n, i, s) {
|
|
|
832
869
|
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
833
870
|
reducedMotionConfig: l
|
|
834
871
|
}));
|
|
835
|
-
const u = c.current, f = G(
|
|
836
|
-
u && !u.projection && s && (u.type === "html" || u.type === "svg") &&
|
|
872
|
+
const u = c.current, f = G(cr);
|
|
873
|
+
u && !u.projection && s && (u.type === "html" || u.type === "svg") && Da(c.current, n, s, f), er(() => {
|
|
837
874
|
u && u.update(n, a);
|
|
838
875
|
});
|
|
839
|
-
const d = it(!!(n[
|
|
840
|
-
return
|
|
876
|
+
const d = it(!!(n[ar] && !window.HandoffComplete));
|
|
877
|
+
return rr(() => {
|
|
841
878
|
u && (u.updateFeatures(), In.render(u.render), d.current && u.animationState && u.animationState.animateChanges());
|
|
842
879
|
}), ct(() => {
|
|
843
|
-
u && (!d.current && u.animationState && u.animationState.animateChanges(), d.current && (d.current = !1,
|
|
880
|
+
u && (!d.current && u.animationState && u.animationState.animateChanges(), d.current && (d.current = !1, Oi || (Oi = !0, queueMicrotask(Va))));
|
|
844
881
|
}), u;
|
|
845
882
|
}
|
|
846
|
-
function
|
|
883
|
+
function Va() {
|
|
847
884
|
window.HandoffComplete = !0;
|
|
848
885
|
}
|
|
849
|
-
function
|
|
886
|
+
function Da(t, e, n, i) {
|
|
850
887
|
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c } = e;
|
|
851
|
-
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 :
|
|
888
|
+
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : ur(t.parent)), t.projection.setOptions({
|
|
852
889
|
layoutId: s,
|
|
853
890
|
layout: o,
|
|
854
891
|
alwaysMeasureLayout: !!r || a && Bt(a),
|
|
@@ -866,11 +903,11 @@ function Ca(t, e, n, i) {
|
|
|
866
903
|
layoutRoot: c
|
|
867
904
|
});
|
|
868
905
|
}
|
|
869
|
-
function
|
|
906
|
+
function ur(t) {
|
|
870
907
|
if (t)
|
|
871
|
-
return t.options.allowProjection !== !1 ? t.projection :
|
|
908
|
+
return t.options.allowProjection !== !1 ? t.projection : ur(t.parent);
|
|
872
909
|
}
|
|
873
|
-
function
|
|
910
|
+
function Ma(t, e, n) {
|
|
874
911
|
return at(
|
|
875
912
|
(i) => {
|
|
876
913
|
i && t.mount && t.mount(i), e && (i ? e.mount(i) : e.unmount()), n && (typeof n == "function" ? n(i) : Bt(n) && (n.current = i));
|
|
@@ -901,10 +938,10 @@ const Nn = [
|
|
|
901
938
|
function Ue(t) {
|
|
902
939
|
return ae(t.animate) || Un.some((e) => oe(t[e]));
|
|
903
940
|
}
|
|
904
|
-
function
|
|
941
|
+
function fr(t) {
|
|
905
942
|
return !!(Ue(t) || t.variants);
|
|
906
943
|
}
|
|
907
|
-
function
|
|
944
|
+
function ka(t, e) {
|
|
908
945
|
if (Ue(t)) {
|
|
909
946
|
const { initial: n, animate: i } = t;
|
|
910
947
|
return {
|
|
@@ -914,14 +951,14 @@ function Ea(t, e) {
|
|
|
914
951
|
}
|
|
915
952
|
return t.inherit !== !1 ? e : {};
|
|
916
953
|
}
|
|
917
|
-
function
|
|
918
|
-
const { initial: e, animate: n } =
|
|
919
|
-
return Mt(() => ({ initial: e, animate: n }), [
|
|
954
|
+
function La(t) {
|
|
955
|
+
const { initial: e, animate: n } = ka(t, G(Be));
|
|
956
|
+
return Mt(() => ({ initial: e, animate: n }), [ji(e), ji(n)]);
|
|
920
957
|
}
|
|
921
|
-
function
|
|
958
|
+
function ji(t) {
|
|
922
959
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
923
960
|
}
|
|
924
|
-
const
|
|
961
|
+
const _i = {
|
|
925
962
|
animation: [
|
|
926
963
|
"animate",
|
|
927
964
|
"variants",
|
|
@@ -941,18 +978,18 @@ const Oi = {
|
|
|
941
978
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
942
979
|
layout: ["layout", "layoutId"]
|
|
943
980
|
}, $t = {};
|
|
944
|
-
for (const t in
|
|
981
|
+
for (const t in _i)
|
|
945
982
|
$t[t] = {
|
|
946
|
-
isEnabled: (e) =>
|
|
983
|
+
isEnabled: (e) => _i[t].some((n) => !!e[n])
|
|
947
984
|
};
|
|
948
|
-
function
|
|
985
|
+
function Fa(t) {
|
|
949
986
|
for (const e in t)
|
|
950
987
|
$t[e] = {
|
|
951
988
|
...$t[e],
|
|
952
989
|
...t[e]
|
|
953
990
|
};
|
|
954
991
|
}
|
|
955
|
-
const Wn = kt({}),
|
|
992
|
+
const Wn = kt({}), Oa = Symbol.for("motionComponentSymbol"), H = (t) => t;
|
|
956
993
|
let Gt = H, pt = H;
|
|
957
994
|
process.env.NODE_ENV !== "production" && (Gt = (t, e) => {
|
|
958
995
|
!t && typeof console < "u" && console.warn(e);
|
|
@@ -960,37 +997,37 @@ process.env.NODE_ENV !== "production" && (Gt = (t, e) => {
|
|
|
960
997
|
if (!t)
|
|
961
998
|
throw new Error(e);
|
|
962
999
|
});
|
|
963
|
-
function
|
|
964
|
-
t &&
|
|
1000
|
+
function ja({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: i, Component: s }) {
|
|
1001
|
+
t && Fa(t);
|
|
965
1002
|
function o(a, l) {
|
|
966
1003
|
let c;
|
|
967
1004
|
const u = {
|
|
968
1005
|
...G(_n),
|
|
969
1006
|
...a,
|
|
970
|
-
layoutId:
|
|
971
|
-
}, { isStatic: f } = u, d =
|
|
1007
|
+
layoutId: _a(a)
|
|
1008
|
+
}, { isStatic: f } = u, d = La(a), p = i(a, f);
|
|
972
1009
|
if (!f && Bn) {
|
|
973
|
-
|
|
974
|
-
const m =
|
|
975
|
-
c = m.MeasureLayout, d.visualElement =
|
|
1010
|
+
Ba(u, t);
|
|
1011
|
+
const m = Ia(u);
|
|
1012
|
+
c = m.MeasureLayout, d.visualElement = Ea(s, p, u, e, m.ProjectionNode);
|
|
976
1013
|
}
|
|
977
|
-
return O.jsxs(Be.Provider, { value: d, children: [c && d.visualElement ? O.jsx(c, { visualElement: d.visualElement, ...u }) : null, n(s, a,
|
|
1014
|
+
return O.jsxs(Be.Provider, { value: d, children: [c && d.visualElement ? O.jsx(c, { visualElement: d.visualElement, ...u }) : null, n(s, a, Ma(p, d.visualElement, l), p, f, d.visualElement)] });
|
|
978
1015
|
}
|
|
979
1016
|
const r = Me(o);
|
|
980
|
-
return r[
|
|
1017
|
+
return r[Oa] = s, r;
|
|
981
1018
|
}
|
|
982
|
-
function
|
|
1019
|
+
function _a({ layoutId: t }) {
|
|
983
1020
|
const e = G(Wn).id;
|
|
984
1021
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
985
1022
|
}
|
|
986
|
-
function
|
|
987
|
-
const n = G(
|
|
1023
|
+
function Ba(t, e) {
|
|
1024
|
+
const n = G(or).strict;
|
|
988
1025
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
989
1026
|
const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
990
1027
|
t.ignoreStrict ? Gt(!1, i) : pt(!1, i);
|
|
991
1028
|
}
|
|
992
1029
|
}
|
|
993
|
-
function
|
|
1030
|
+
function Ia(t) {
|
|
994
1031
|
const { drag: e, layout: n } = $t;
|
|
995
1032
|
if (!e && !n)
|
|
996
1033
|
return {};
|
|
@@ -1000,9 +1037,9 @@ function Oa(t) {
|
|
|
1000
1037
|
ProjectionNode: i.ProjectionNode
|
|
1001
1038
|
};
|
|
1002
1039
|
}
|
|
1003
|
-
function
|
|
1040
|
+
function Na(t) {
|
|
1004
1041
|
function e(i, s = {}) {
|
|
1005
|
-
return
|
|
1042
|
+
return ja(t(i, s));
|
|
1006
1043
|
}
|
|
1007
1044
|
if (typeof Proxy > "u")
|
|
1008
1045
|
return e;
|
|
@@ -1016,7 +1053,7 @@ function ja(t) {
|
|
|
1016
1053
|
get: (i, s) => (n.has(s) || n.set(s, e(s)), n.get(s))
|
|
1017
1054
|
});
|
|
1018
1055
|
}
|
|
1019
|
-
const
|
|
1056
|
+
const Ua = [
|
|
1020
1057
|
"animate",
|
|
1021
1058
|
"circle",
|
|
1022
1059
|
"defs",
|
|
@@ -1056,7 +1093,7 @@ function $n(t) {
|
|
|
1056
1093
|
/**
|
|
1057
1094
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
1058
1095
|
*/
|
|
1059
|
-
!!(
|
|
1096
|
+
!!(Ua.indexOf(t) > -1 || /**
|
|
1060
1097
|
* If it contains a capital letter, it's an SVG component
|
|
1061
1098
|
*/
|
|
1062
1099
|
/[A-Z]/u.test(t))
|
|
@@ -1064,7 +1101,7 @@ function $n(t) {
|
|
|
1064
1101
|
);
|
|
1065
1102
|
}
|
|
1066
1103
|
const ke = {};
|
|
1067
|
-
function
|
|
1104
|
+
function Wa(t) {
|
|
1068
1105
|
Object.assign(ke, t);
|
|
1069
1106
|
}
|
|
1070
1107
|
const pe = [
|
|
@@ -1085,56 +1122,39 @@ const pe = [
|
|
|
1085
1122
|
"skew",
|
|
1086
1123
|
"skewX",
|
|
1087
1124
|
"skewY"
|
|
1088
|
-
],
|
|
1089
|
-
function
|
|
1090
|
-
return
|
|
1091
|
-
}
|
|
1092
|
-
const Y = (t) => !!(t && t.getVelocity), Ia = {
|
|
1093
|
-
x: "translateX",
|
|
1094
|
-
y: "translateY",
|
|
1095
|
-
z: "translateZ",
|
|
1096
|
-
transformPerspective: "perspective"
|
|
1097
|
-
}, Na = pe.length;
|
|
1098
|
-
function Ua(t, e, n) {
|
|
1099
|
-
let i = "";
|
|
1100
|
-
for (let s = 0; s < Na; s++) {
|
|
1101
|
-
const o = pe[s];
|
|
1102
|
-
if (t[o] !== void 0) {
|
|
1103
|
-
const r = Ia[o] || o;
|
|
1104
|
-
i += `${r}(${t[o]}) `;
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
return i = i.trim(), n ? i = n(t, e ? "" : i) : e && (i = "none"), i;
|
|
1125
|
+
], xt = new Set(pe);
|
|
1126
|
+
function hr(t, { layout: e, layoutId: n }) {
|
|
1127
|
+
return xt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ke[t] || t === "opacity");
|
|
1108
1128
|
}
|
|
1109
|
-
const
|
|
1129
|
+
const Y = (t) => !!(t && t.getVelocity), dr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, Tt = (t, e, n) => n > e ? e : n < t ? t : n, Ht = {
|
|
1110
1130
|
test: (t) => typeof t == "number",
|
|
1111
1131
|
parse: parseFloat,
|
|
1112
1132
|
transform: (t) => t
|
|
1113
1133
|
}, ee = {
|
|
1114
1134
|
...Ht,
|
|
1115
|
-
transform: (t) =>
|
|
1135
|
+
transform: (t) => Tt(0, 1, t)
|
|
1116
1136
|
}, we = {
|
|
1117
1137
|
...Ht,
|
|
1118
1138
|
default: 1
|
|
1119
|
-
}, ne = (t) => Math.round(t * 1e5) / 1e5,
|
|
1139
|
+
}, ne = (t) => Math.round(t * 1e5) / 1e5, Kn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, $a = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, Ka = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
|
|
1120
1140
|
function me(t) {
|
|
1121
1141
|
return typeof t == "string";
|
|
1122
1142
|
}
|
|
1123
|
-
function
|
|
1143
|
+
function Ga(t) {
|
|
1124
1144
|
return t == null;
|
|
1125
1145
|
}
|
|
1126
1146
|
const ge = (t) => ({
|
|
1127
1147
|
test: (e) => me(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
1128
1148
|
parse: parseFloat,
|
|
1129
1149
|
transform: (e) => `${e}${t}`
|
|
1130
|
-
}), vt = ge("deg"), ot = ge("%"), S = ge("px"),
|
|
1150
|
+
}), vt = ge("deg"), ot = ge("%"), S = ge("px"), Ha = ge("vh"), za = ge("vw"), Bi = {
|
|
1131
1151
|
...ot,
|
|
1132
1152
|
parse: (t) => ot.parse(t) / 100,
|
|
1133
1153
|
transform: (t) => ot.transform(t * 100)
|
|
1134
|
-
},
|
|
1154
|
+
}, Ii = {
|
|
1135
1155
|
...Ht,
|
|
1136
1156
|
transform: Math.round
|
|
1137
|
-
},
|
|
1157
|
+
}, Gn = {
|
|
1138
1158
|
// Border props
|
|
1139
1159
|
borderWidth: S,
|
|
1140
1160
|
borderTopWidth: S,
|
|
@@ -1190,65 +1210,89 @@ const ge = (t) => ({
|
|
|
1190
1210
|
perspective: S,
|
|
1191
1211
|
transformPerspective: S,
|
|
1192
1212
|
opacity: ee,
|
|
1193
|
-
originX:
|
|
1194
|
-
originY:
|
|
1213
|
+
originX: Bi,
|
|
1214
|
+
originY: Bi,
|
|
1195
1215
|
originZ: S,
|
|
1196
1216
|
// Misc
|
|
1197
|
-
zIndex:
|
|
1217
|
+
zIndex: Ii,
|
|
1198
1218
|
backgroundPositionX: S,
|
|
1199
1219
|
backgroundPositionY: S,
|
|
1200
1220
|
// SVG
|
|
1201
1221
|
fillOpacity: ee,
|
|
1202
1222
|
strokeOpacity: ee,
|
|
1203
|
-
numOctaves:
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1223
|
+
numOctaves: Ii
|
|
1224
|
+
}, Ya = {
|
|
1225
|
+
x: "translateX",
|
|
1226
|
+
y: "translateY",
|
|
1227
|
+
z: "translateZ",
|
|
1228
|
+
transformPerspective: "perspective"
|
|
1229
|
+
}, Xa = pe.length;
|
|
1230
|
+
function qa(t, e, n) {
|
|
1231
|
+
let i = "", s = !0;
|
|
1232
|
+
for (let o = 0; o < Xa; o++) {
|
|
1233
|
+
const r = pe[o], a = t[r];
|
|
1234
|
+
if (a === void 0)
|
|
1212
1235
|
continue;
|
|
1236
|
+
let l = !0;
|
|
1237
|
+
if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
1238
|
+
const c = dr(a, Gn[r]);
|
|
1239
|
+
if (!l) {
|
|
1240
|
+
s = !1;
|
|
1241
|
+
const u = Ya[r] || r;
|
|
1242
|
+
i += `${u}(${c}) `;
|
|
1243
|
+
}
|
|
1244
|
+
n && (e[r] = c);
|
|
1213
1245
|
}
|
|
1214
|
-
const d = dr[u], p = Ka(f, d);
|
|
1215
|
-
if (wt.has(u)) {
|
|
1216
|
-
if (a = !0, o[u] = p, !c)
|
|
1217
|
-
continue;
|
|
1218
|
-
f !== (d.default || 0) && (c = !1);
|
|
1219
|
-
} else
|
|
1220
|
-
u.startsWith("origin") ? (l = !0, r[u] = p) : i[u] = p;
|
|
1221
1246
|
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1247
|
+
return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
|
|
1248
|
+
}
|
|
1249
|
+
const pr = (t) => (e) => typeof e == "string" && e.startsWith(t), mr = pr("--"), Za = pr("var(--"), Hn = (t) => Za(t) ? Ja.test(t.split("/*")[0].trim()) : !1, Ja = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
1250
|
+
function zn(t, e, n) {
|
|
1251
|
+
const { style: i, vars: s, transformOrigin: o } = t;
|
|
1252
|
+
let r = !1, a = !1;
|
|
1253
|
+
for (const l in e) {
|
|
1254
|
+
const c = e[l];
|
|
1255
|
+
if (xt.has(l)) {
|
|
1256
|
+
r = !0;
|
|
1257
|
+
continue;
|
|
1258
|
+
} else if (mr(l)) {
|
|
1259
|
+
s[l] = c;
|
|
1260
|
+
continue;
|
|
1261
|
+
} else {
|
|
1262
|
+
const u = dr(c, Gn[l]);
|
|
1263
|
+
l.startsWith("origin") ? (a = !0, o[l] = u) : i[l] = u;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
if (e.transform || (r || n ? i.transform = qa(e, t.transform, n) : i.transform && (i.transform = "none")), a) {
|
|
1267
|
+
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = o;
|
|
1268
|
+
i.transformOrigin = `${l} ${c} ${u}`;
|
|
1225
1269
|
}
|
|
1226
1270
|
}
|
|
1227
|
-
const
|
|
1271
|
+
const Yn = () => ({
|
|
1228
1272
|
style: {},
|
|
1229
1273
|
transform: {},
|
|
1230
1274
|
transformOrigin: {},
|
|
1231
1275
|
vars: {}
|
|
1232
1276
|
});
|
|
1233
|
-
function
|
|
1277
|
+
function gr(t, e, n) {
|
|
1234
1278
|
for (const i in e)
|
|
1235
|
-
!Y(e[i]) && !
|
|
1279
|
+
!Y(e[i]) && !hr(i, n) && (t[i] = e[i]);
|
|
1236
1280
|
}
|
|
1237
|
-
function
|
|
1281
|
+
function Qa({ transformTemplate: t }, e) {
|
|
1238
1282
|
return Mt(() => {
|
|
1239
|
-
const n =
|
|
1240
|
-
return
|
|
1283
|
+
const n = Yn();
|
|
1284
|
+
return zn(n, e, t), Object.assign({}, n.vars, n.style);
|
|
1241
1285
|
}, [e]);
|
|
1242
1286
|
}
|
|
1243
|
-
function
|
|
1287
|
+
function tl(t, e) {
|
|
1244
1288
|
const n = t.style || {}, i = {};
|
|
1245
|
-
return
|
|
1289
|
+
return gr(i, n, t), Object.assign(i, Qa(t, e)), i;
|
|
1246
1290
|
}
|
|
1247
|
-
function
|
|
1248
|
-
const n = {}, i =
|
|
1291
|
+
function el(t, e) {
|
|
1292
|
+
const n = {}, i = tl(t, e);
|
|
1249
1293
|
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;
|
|
1250
1294
|
}
|
|
1251
|
-
const
|
|
1295
|
+
const nl = /* @__PURE__ */ new Set([
|
|
1252
1296
|
"animate",
|
|
1253
1297
|
"exit",
|
|
1254
1298
|
"variants",
|
|
@@ -1281,45 +1325,45 @@ const Qa = /* @__PURE__ */ new Set([
|
|
|
1281
1325
|
"viewport"
|
|
1282
1326
|
]);
|
|
1283
1327
|
function Le(t) {
|
|
1284
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
1328
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || nl.has(t);
|
|
1285
1329
|
}
|
|
1286
|
-
let
|
|
1287
|
-
function
|
|
1288
|
-
t && (
|
|
1330
|
+
let yr = (t) => !Le(t);
|
|
1331
|
+
function il(t) {
|
|
1332
|
+
t && (yr = (e) => e.startsWith("on") ? !Le(e) : t(e));
|
|
1289
1333
|
}
|
|
1290
1334
|
try {
|
|
1291
|
-
|
|
1335
|
+
il(require("@emotion/is-prop-valid").default);
|
|
1292
1336
|
} catch {
|
|
1293
1337
|
}
|
|
1294
|
-
function
|
|
1338
|
+
function sl(t, e, n) {
|
|
1295
1339
|
const i = {};
|
|
1296
1340
|
for (const s in t)
|
|
1297
|
-
s === "values" && typeof t.values == "object" || (
|
|
1341
|
+
s === "values" && typeof t.values == "object" || (yr(s) || n === !0 && Le(s) || !e && !Le(s) || // If trying to use native HTML drag events, forward drag listeners
|
|
1298
1342
|
t.draggable && s.startsWith("onDrag")) && (i[s] = t[s]);
|
|
1299
1343
|
return i;
|
|
1300
1344
|
}
|
|
1301
|
-
function
|
|
1345
|
+
function Ni(t, e, n) {
|
|
1302
1346
|
return typeof t == "string" ? t : S.transform(e + n * t);
|
|
1303
1347
|
}
|
|
1304
|
-
function
|
|
1305
|
-
const i =
|
|
1348
|
+
function rl(t, e, n) {
|
|
1349
|
+
const i = Ni(e, t.x, t.width), s = Ni(n, t.y, t.height);
|
|
1306
1350
|
return `${i} ${s}`;
|
|
1307
1351
|
}
|
|
1308
|
-
const
|
|
1352
|
+
const ol = {
|
|
1309
1353
|
offset: "stroke-dashoffset",
|
|
1310
1354
|
array: "stroke-dasharray"
|
|
1311
|
-
},
|
|
1355
|
+
}, al = {
|
|
1312
1356
|
offset: "strokeDashoffset",
|
|
1313
1357
|
array: "strokeDasharray"
|
|
1314
1358
|
};
|
|
1315
|
-
function
|
|
1359
|
+
function ll(t, e, n = 1, i = 0, s = !0) {
|
|
1316
1360
|
t.pathLength = 1;
|
|
1317
|
-
const o = s ?
|
|
1361
|
+
const o = s ? ol : al;
|
|
1318
1362
|
t[o.offset] = S.transform(-i);
|
|
1319
1363
|
const r = S.transform(e), a = S.transform(n);
|
|
1320
1364
|
t[o.array] = `${r} ${a}`;
|
|
1321
1365
|
}
|
|
1322
|
-
function
|
|
1366
|
+
function Xn(t, {
|
|
1323
1367
|
attrX: e,
|
|
1324
1368
|
attrY: n,
|
|
1325
1369
|
attrScale: i,
|
|
@@ -1331,47 +1375,47 @@ function Yn(t, {
|
|
|
1331
1375
|
// This is object creation, which we try to avoid per-frame.
|
|
1332
1376
|
...c
|
|
1333
1377
|
}, u, f) {
|
|
1334
|
-
if (
|
|
1378
|
+
if (zn(t, c, f), u) {
|
|
1335
1379
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1336
1380
|
return;
|
|
1337
1381
|
}
|
|
1338
1382
|
t.attrs = t.style, t.style = {};
|
|
1339
1383
|
const { attrs: d, style: p, dimensions: m } = t;
|
|
1340
|
-
d.transform && (m && (p.transform = d.transform), delete d.transform), m && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin =
|
|
1384
|
+
d.transform && (m && (p.transform = d.transform), delete d.transform), m && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin = rl(m, s !== void 0 ? s : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), i !== void 0 && (d.scale = i), r !== void 0 && ll(d, r, a, l, !1);
|
|
1341
1385
|
}
|
|
1342
|
-
const
|
|
1343
|
-
...
|
|
1386
|
+
const vr = () => ({
|
|
1387
|
+
...Yn(),
|
|
1344
1388
|
attrs: {}
|
|
1345
|
-
}),
|
|
1346
|
-
function
|
|
1389
|
+
}), qn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1390
|
+
function cl(t, e, n, i) {
|
|
1347
1391
|
const s = Mt(() => {
|
|
1348
|
-
const o =
|
|
1349
|
-
return
|
|
1392
|
+
const o = vr();
|
|
1393
|
+
return Xn(o, e, qn(i), t.transformTemplate), {
|
|
1350
1394
|
...o.attrs,
|
|
1351
1395
|
style: { ...o.style }
|
|
1352
1396
|
};
|
|
1353
1397
|
}, [e]);
|
|
1354
1398
|
if (t.style) {
|
|
1355
1399
|
const o = {};
|
|
1356
|
-
|
|
1400
|
+
gr(o, t.style, t), s.style = { ...o, ...s.style };
|
|
1357
1401
|
}
|
|
1358
1402
|
return s;
|
|
1359
1403
|
}
|
|
1360
|
-
function
|
|
1404
|
+
function ul(t = !1) {
|
|
1361
1405
|
return (n, i, s, { latestValues: o }, r) => {
|
|
1362
|
-
const l = ($n(n) ?
|
|
1363
|
-
return
|
|
1406
|
+
const l = ($n(n) ? cl : el)(i, o, r, n), c = sl(i, typeof n == "string", t), u = n !== nr ? { ...c, ...l, ref: s } : {}, { children: f } = i, d = Mt(() => Y(f) ? f.get() : f, [f]);
|
|
1407
|
+
return oa(n, {
|
|
1364
1408
|
...u,
|
|
1365
1409
|
children: d
|
|
1366
1410
|
});
|
|
1367
1411
|
};
|
|
1368
1412
|
}
|
|
1369
|
-
function
|
|
1413
|
+
function Pr(t, { style: e, vars: n }, i, s) {
|
|
1370
1414
|
Object.assign(t.style, e, s && s.getProjectionStyles(i));
|
|
1371
1415
|
for (const o in n)
|
|
1372
1416
|
t.style.setProperty(o, n[o]);
|
|
1373
1417
|
}
|
|
1374
|
-
const
|
|
1418
|
+
const Tr = /* @__PURE__ */ new Set([
|
|
1375
1419
|
"baseFrequency",
|
|
1376
1420
|
"diffuseConstant",
|
|
1377
1421
|
"kernelMatrix",
|
|
@@ -1396,20 +1440,20 @@ const vr = /* @__PURE__ */ new Set([
|
|
|
1396
1440
|
"textLength",
|
|
1397
1441
|
"lengthAdjust"
|
|
1398
1442
|
]);
|
|
1399
|
-
function
|
|
1400
|
-
|
|
1443
|
+
function br(t, e, n, i) {
|
|
1444
|
+
Pr(t, e, void 0, i);
|
|
1401
1445
|
for (const s in e.attrs)
|
|
1402
|
-
t.setAttribute(
|
|
1446
|
+
t.setAttribute(Tr.has(s) ? s : Ne(s), e.attrs[s]);
|
|
1403
1447
|
}
|
|
1404
|
-
function
|
|
1448
|
+
function Zn(t, e, n) {
|
|
1405
1449
|
var i;
|
|
1406
1450
|
const { style: s } = t, o = {};
|
|
1407
1451
|
for (const r in s)
|
|
1408
|
-
(Y(s[r]) || e.style && Y(e.style[r]) ||
|
|
1452
|
+
(Y(s[r]) || e.style && Y(e.style[r]) || hr(r, t) || ((i = n == null ? void 0 : n.getValue(r)) === null || i === void 0 ? void 0 : i.liveStyle) !== void 0) && (o[r] = s[r]);
|
|
1409
1453
|
return n && s && typeof s.willChange == "string" && (n.applyWillChange = !1), o;
|
|
1410
1454
|
}
|
|
1411
|
-
function
|
|
1412
|
-
const i =
|
|
1455
|
+
function xr(t, e, n) {
|
|
1456
|
+
const i = Zn(t, e, n);
|
|
1413
1457
|
for (const s in t)
|
|
1414
1458
|
if (Y(t[s]) || Y(e[s])) {
|
|
1415
1459
|
const o = pe.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
@@ -1417,33 +1461,33 @@ function Tr(t, e, n) {
|
|
|
1417
1461
|
}
|
|
1418
1462
|
return i;
|
|
1419
1463
|
}
|
|
1420
|
-
function
|
|
1464
|
+
function Ui(t) {
|
|
1421
1465
|
const e = [{}, {}];
|
|
1422
1466
|
return t == null || t.values.forEach((n, i) => {
|
|
1423
1467
|
e[0][i] = n.get(), e[1][i] = n.getVelocity();
|
|
1424
1468
|
}), e;
|
|
1425
1469
|
}
|
|
1426
|
-
function
|
|
1470
|
+
function Jn(t, e, n, i) {
|
|
1427
1471
|
if (typeof e == "function") {
|
|
1428
|
-
const [s, o] =
|
|
1472
|
+
const [s, o] = Ui(i);
|
|
1429
1473
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
1430
1474
|
}
|
|
1431
1475
|
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
1432
|
-
const [s, o] =
|
|
1476
|
+
const [s, o] = Ui(i);
|
|
1433
1477
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
1434
1478
|
}
|
|
1435
1479
|
return e;
|
|
1436
1480
|
}
|
|
1437
|
-
function
|
|
1481
|
+
function Qn(t) {
|
|
1438
1482
|
const e = it(null);
|
|
1439
1483
|
return e.current === null && (e.current = t()), e.current;
|
|
1440
1484
|
}
|
|
1441
|
-
const Pn = (t) => Array.isArray(t),
|
|
1442
|
-
function
|
|
1485
|
+
const Pn = (t) => Array.isArray(t), fl = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), hl = (t) => Pn(t) ? t[t.length - 1] || 0 : t;
|
|
1486
|
+
function Re(t) {
|
|
1443
1487
|
const e = Y(t) ? t.get() : t;
|
|
1444
|
-
return
|
|
1488
|
+
return fl(e) ? e.toValue() : e;
|
|
1445
1489
|
}
|
|
1446
|
-
const
|
|
1490
|
+
const wr = /* @__PURE__ */ new Set([
|
|
1447
1491
|
"opacity",
|
|
1448
1492
|
"clipPath",
|
|
1449
1493
|
"filter",
|
|
@@ -1452,10 +1496,10 @@ const br = /* @__PURE__ */ new Set([
|
|
|
1452
1496
|
// or until we implement support for linear() easing.
|
|
1453
1497
|
// "background-color"
|
|
1454
1498
|
]);
|
|
1455
|
-
function
|
|
1456
|
-
if (
|
|
1499
|
+
function Sr(t) {
|
|
1500
|
+
if (xt.has(t))
|
|
1457
1501
|
return "transform";
|
|
1458
|
-
if (
|
|
1502
|
+
if (wr.has(t))
|
|
1459
1503
|
return Ne(t);
|
|
1460
1504
|
}
|
|
1461
1505
|
function We(t, e) {
|
|
@@ -1465,43 +1509,43 @@ function $e(t, e) {
|
|
|
1465
1509
|
const n = t.indexOf(e);
|
|
1466
1510
|
n > -1 && t.splice(n, 1);
|
|
1467
1511
|
}
|
|
1468
|
-
function
|
|
1512
|
+
function dl({ applyWillChange: t = !1, scrapeMotionValuesFromProps: e, createRenderState: n, onMount: i }, s, o, r, a) {
|
|
1469
1513
|
const l = {
|
|
1470
|
-
latestValues:
|
|
1514
|
+
latestValues: ml(s, o, r, a ? !1 : t, e),
|
|
1471
1515
|
renderState: n()
|
|
1472
1516
|
};
|
|
1473
1517
|
return i && (l.mount = (c) => i(s, c, l)), l;
|
|
1474
1518
|
}
|
|
1475
|
-
const
|
|
1476
|
-
const i = G(Be), s = G(Ie), o = () =>
|
|
1477
|
-
return n ? o() :
|
|
1519
|
+
const Ar = (t) => (e, n) => {
|
|
1520
|
+
const i = G(Be), s = G(Ie), o = () => dl(t, e, i, s, n);
|
|
1521
|
+
return n ? o() : Qn(o);
|
|
1478
1522
|
};
|
|
1479
|
-
function
|
|
1480
|
-
const n =
|
|
1523
|
+
function pl(t, e) {
|
|
1524
|
+
const n = Sr(e);
|
|
1481
1525
|
n && We(t, n);
|
|
1482
1526
|
}
|
|
1483
|
-
function
|
|
1527
|
+
function Wi(t, e, n) {
|
|
1484
1528
|
const i = Array.isArray(e) ? e : [e];
|
|
1485
1529
|
for (let s = 0; s < i.length; s++) {
|
|
1486
|
-
const o =
|
|
1530
|
+
const o = Jn(t, i[s]);
|
|
1487
1531
|
if (o) {
|
|
1488
1532
|
const { transitionEnd: r, transition: a, ...l } = o;
|
|
1489
1533
|
n(l, r);
|
|
1490
1534
|
}
|
|
1491
1535
|
}
|
|
1492
1536
|
}
|
|
1493
|
-
function
|
|
1537
|
+
function ml(t, e, n, i, s) {
|
|
1494
1538
|
var o;
|
|
1495
1539
|
const r = {}, a = [], l = i && ((o = t.style) === null || o === void 0 ? void 0 : o.willChange) === void 0, c = s(t, {});
|
|
1496
1540
|
for (const x in c)
|
|
1497
|
-
r[x] =
|
|
1541
|
+
r[x] = Re(c[x]);
|
|
1498
1542
|
let { initial: u, animate: f } = t;
|
|
1499
|
-
const d = Ue(t), p =
|
|
1543
|
+
const d = Ue(t), p = fr(t);
|
|
1500
1544
|
e && p && !d && t.inherit !== !1 && (u === void 0 && (u = e.initial), f === void 0 && (f = e.animate));
|
|
1501
1545
|
let m = n ? n.initial === !1 : !1;
|
|
1502
1546
|
m = m || u === !1;
|
|
1503
1547
|
const v = m ? f : u;
|
|
1504
|
-
return v && typeof v != "boolean" && !ae(v) &&
|
|
1548
|
+
return v && typeof v != "boolean" && !ae(v) && Wi(t, v, (x, P) => {
|
|
1505
1549
|
for (const y in x) {
|
|
1506
1550
|
let T = x[y];
|
|
1507
1551
|
if (Array.isArray(T)) {
|
|
@@ -1512,15 +1556,15 @@ function hl(t, e, n, i, s) {
|
|
|
1512
1556
|
}
|
|
1513
1557
|
for (const y in P)
|
|
1514
1558
|
r[y] = P[y];
|
|
1515
|
-
}), l && (f && u !== !1 && !ae(f) &&
|
|
1559
|
+
}), l && (f && u !== !1 && !ae(f) && Wi(t, f, (x) => {
|
|
1516
1560
|
for (const P in x)
|
|
1517
|
-
|
|
1561
|
+
pl(a, P);
|
|
1518
1562
|
}), a.length && (r.willChange = a.join(","))), r;
|
|
1519
1563
|
}
|
|
1520
|
-
const { schedule: M, cancel: mt, state: K, steps: nn } =
|
|
1521
|
-
useVisualState:
|
|
1522
|
-
scrapeMotionValuesFromProps:
|
|
1523
|
-
createRenderState:
|
|
1564
|
+
const { schedule: M, cancel: mt, state: K, steps: nn } = lr(typeof requestAnimationFrame < "u" ? requestAnimationFrame : H, !0), gl = {
|
|
1565
|
+
useVisualState: Ar({
|
|
1566
|
+
scrapeMotionValuesFromProps: xr,
|
|
1567
|
+
createRenderState: vr,
|
|
1524
1568
|
onMount: (t, e, { renderState: n, latestValues: i }) => {
|
|
1525
1569
|
M.read(() => {
|
|
1526
1570
|
try {
|
|
@@ -1534,22 +1578,22 @@ const { schedule: M, cancel: mt, state: K, steps: nn } = or(typeof requestAnimat
|
|
|
1534
1578
|
};
|
|
1535
1579
|
}
|
|
1536
1580
|
}), M.render(() => {
|
|
1537
|
-
|
|
1581
|
+
Xn(n, i, qn(e.tagName), t.transformTemplate), br(e, n);
|
|
1538
1582
|
});
|
|
1539
1583
|
}
|
|
1540
1584
|
})
|
|
1541
|
-
},
|
|
1542
|
-
useVisualState:
|
|
1585
|
+
}, yl = {
|
|
1586
|
+
useVisualState: Ar({
|
|
1543
1587
|
applyWillChange: !0,
|
|
1544
|
-
scrapeMotionValuesFromProps:
|
|
1545
|
-
createRenderState:
|
|
1588
|
+
scrapeMotionValuesFromProps: Zn,
|
|
1589
|
+
createRenderState: Yn
|
|
1546
1590
|
})
|
|
1547
1591
|
};
|
|
1548
|
-
function
|
|
1592
|
+
function vl(t, { forwardMotionProps: e = !1 }, n, i) {
|
|
1549
1593
|
return {
|
|
1550
|
-
...$n(t) ?
|
|
1594
|
+
...$n(t) ? gl : yl,
|
|
1551
1595
|
preloadedFeatures: n,
|
|
1552
|
-
useRender:
|
|
1596
|
+
useRender: ul(e),
|
|
1553
1597
|
createVisualElement: i,
|
|
1554
1598
|
Component: t
|
|
1555
1599
|
};
|
|
@@ -1557,7 +1601,7 @@ function ml(t, { forwardMotionProps: e = !1 }, n, i) {
|
|
|
1557
1601
|
function lt(t, e, n, i = { passive: !0 }) {
|
|
1558
1602
|
return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
|
|
1559
1603
|
}
|
|
1560
|
-
const
|
|
1604
|
+
const Cr = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
1561
1605
|
function Ke(t, e = "page") {
|
|
1562
1606
|
return {
|
|
1563
1607
|
point: {
|
|
@@ -1566,12 +1610,12 @@ function Ke(t, e = "page") {
|
|
|
1566
1610
|
}
|
|
1567
1611
|
};
|
|
1568
1612
|
}
|
|
1569
|
-
const
|
|
1613
|
+
const Pl = (t) => (e) => Cr(e) && t(e, Ke(e));
|
|
1570
1614
|
function ut(t, e, n, i) {
|
|
1571
|
-
return lt(t, e,
|
|
1615
|
+
return lt(t, e, Pl(n), i);
|
|
1572
1616
|
}
|
|
1573
|
-
const
|
|
1574
|
-
function
|
|
1617
|
+
const Tl = (t, e) => (n) => e(t(n)), ft = (...t) => t.reduce(Tl);
|
|
1618
|
+
function Rr(t) {
|
|
1575
1619
|
let e = null;
|
|
1576
1620
|
return () => {
|
|
1577
1621
|
const n = () => {
|
|
@@ -1580,35 +1624,35 @@ function Ar(t) {
|
|
|
1580
1624
|
return e === null ? (e = t, n) : !1;
|
|
1581
1625
|
};
|
|
1582
1626
|
}
|
|
1583
|
-
const
|
|
1584
|
-
function
|
|
1627
|
+
const $i = Rr("dragHorizontal"), Ki = Rr("dragVertical");
|
|
1628
|
+
function Er(t) {
|
|
1585
1629
|
let e = !1;
|
|
1586
1630
|
if (t === "y")
|
|
1587
|
-
e =
|
|
1631
|
+
e = Ki();
|
|
1588
1632
|
else if (t === "x")
|
|
1589
|
-
e =
|
|
1633
|
+
e = $i();
|
|
1590
1634
|
else {
|
|
1591
|
-
const n =
|
|
1635
|
+
const n = $i(), i = Ki();
|
|
1592
1636
|
n && i ? e = () => {
|
|
1593
1637
|
n(), i();
|
|
1594
1638
|
} : (n && n(), i && i());
|
|
1595
1639
|
}
|
|
1596
1640
|
return e;
|
|
1597
1641
|
}
|
|
1598
|
-
function
|
|
1599
|
-
const t =
|
|
1642
|
+
function Vr() {
|
|
1643
|
+
const t = Er(!0);
|
|
1600
1644
|
return t ? (t(), !1) : !0;
|
|
1601
1645
|
}
|
|
1602
|
-
class
|
|
1646
|
+
class wt {
|
|
1603
1647
|
constructor(e) {
|
|
1604
1648
|
this.isMounted = !1, this.node = e;
|
|
1605
1649
|
}
|
|
1606
1650
|
update() {
|
|
1607
1651
|
}
|
|
1608
1652
|
}
|
|
1609
|
-
function
|
|
1653
|
+
function Gi(t, e) {
|
|
1610
1654
|
const n = e ? "pointerenter" : "pointerleave", i = e ? "onHoverStart" : "onHoverEnd", s = (o, r) => {
|
|
1611
|
-
if (o.pointerType === "touch" ||
|
|
1655
|
+
if (o.pointerType === "touch" || Vr())
|
|
1612
1656
|
return;
|
|
1613
1657
|
const a = t.getProps();
|
|
1614
1658
|
t.animationState && a.whileHover && t.animationState.setActive("whileHover", e);
|
|
@@ -1619,14 +1663,14 @@ function $i(t, e) {
|
|
|
1619
1663
|
passive: !t.getProps()[i]
|
|
1620
1664
|
});
|
|
1621
1665
|
}
|
|
1622
|
-
class
|
|
1666
|
+
class bl extends wt {
|
|
1623
1667
|
mount() {
|
|
1624
|
-
this.unmount = ft(
|
|
1668
|
+
this.unmount = ft(Gi(this.node, !0), Gi(this.node, !1));
|
|
1625
1669
|
}
|
|
1626
1670
|
unmount() {
|
|
1627
1671
|
}
|
|
1628
1672
|
}
|
|
1629
|
-
class
|
|
1673
|
+
class xl extends wt {
|
|
1630
1674
|
constructor() {
|
|
1631
1675
|
super(...arguments), this.isActive = !1;
|
|
1632
1676
|
}
|
|
@@ -1648,14 +1692,14 @@ class Pl extends St {
|
|
|
1648
1692
|
unmount() {
|
|
1649
1693
|
}
|
|
1650
1694
|
}
|
|
1651
|
-
const
|
|
1695
|
+
const Dr = (t, e) => e ? t === e ? !0 : Dr(t, e.parentElement) : !1;
|
|
1652
1696
|
function sn(t, e) {
|
|
1653
1697
|
if (!e)
|
|
1654
1698
|
return;
|
|
1655
1699
|
const n = new PointerEvent("pointer" + t);
|
|
1656
1700
|
e(n, Ke(n));
|
|
1657
1701
|
}
|
|
1658
|
-
class
|
|
1702
|
+
class wl extends wt {
|
|
1659
1703
|
constructor() {
|
|
1660
1704
|
super(...arguments), this.removeStartListeners = H, this.removeEndListeners = H, this.removeAccessibleListeners = H, this.startPointerPress = (e, n) => {
|
|
1661
1705
|
if (this.isPressing)
|
|
@@ -1664,7 +1708,7 @@ class Tl extends St {
|
|
|
1664
1708
|
const i = this.node.getProps(), o = ut(window, "pointerup", (a, l) => {
|
|
1665
1709
|
if (!this.checkPressEnd())
|
|
1666
1710
|
return;
|
|
1667
|
-
const { onTap: c, onTapCancel: u, globalTapTarget: f } = this.node.getProps(), d = !f && !
|
|
1711
|
+
const { onTap: c, onTapCancel: u, globalTapTarget: f } = this.node.getProps(), d = !f && !Dr(this.node.current, a.target) ? u : c;
|
|
1668
1712
|
d && M.update(() => d(a, l));
|
|
1669
1713
|
}, {
|
|
1670
1714
|
passive: !(i.onTap || i.onPointerUp)
|
|
@@ -1697,7 +1741,7 @@ class Tl extends St {
|
|
|
1697
1741
|
s && this.node.animationState && this.node.animationState.setActive("whileTap", !0), i && M.postRender(() => i(e, n));
|
|
1698
1742
|
}
|
|
1699
1743
|
checkPressEnd() {
|
|
1700
|
-
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !
|
|
1744
|
+
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !Vr();
|
|
1701
1745
|
}
|
|
1702
1746
|
cancelPress(e, n) {
|
|
1703
1747
|
if (!this.checkPressEnd())
|
|
@@ -1715,29 +1759,29 @@ class Tl extends St {
|
|
|
1715
1759
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
1716
1760
|
}
|
|
1717
1761
|
}
|
|
1718
|
-
const Tn = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(),
|
|
1762
|
+
const Tn = /* @__PURE__ */ new WeakMap(), rn = /* @__PURE__ */ new WeakMap(), Sl = (t) => {
|
|
1719
1763
|
const e = Tn.get(t.target);
|
|
1720
1764
|
e && e(t);
|
|
1721
|
-
},
|
|
1722
|
-
t.forEach(
|
|
1765
|
+
}, Al = (t) => {
|
|
1766
|
+
t.forEach(Sl);
|
|
1723
1767
|
};
|
|
1724
|
-
function
|
|
1768
|
+
function Cl({ root: t, ...e }) {
|
|
1725
1769
|
const n = t || document;
|
|
1726
1770
|
rn.has(n) || rn.set(n, {});
|
|
1727
1771
|
const i = rn.get(n), s = JSON.stringify(e);
|
|
1728
|
-
return i[s] || (i[s] = new IntersectionObserver(
|
|
1772
|
+
return i[s] || (i[s] = new IntersectionObserver(Al, { root: t, ...e })), i[s];
|
|
1729
1773
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const i =
|
|
1774
|
+
function Rl(t, e, n) {
|
|
1775
|
+
const i = Cl(e);
|
|
1732
1776
|
return Tn.set(t, n), i.observe(t), () => {
|
|
1733
1777
|
Tn.delete(t), i.unobserve(t);
|
|
1734
1778
|
};
|
|
1735
1779
|
}
|
|
1736
|
-
const
|
|
1780
|
+
const El = {
|
|
1737
1781
|
some: 0,
|
|
1738
1782
|
all: 1
|
|
1739
1783
|
};
|
|
1740
|
-
class
|
|
1784
|
+
class Vl extends wt {
|
|
1741
1785
|
constructor() {
|
|
1742
1786
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
1743
1787
|
}
|
|
@@ -1746,7 +1790,7 @@ class Cl extends St {
|
|
|
1746
1790
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: i, amount: s = "some", once: o } = e, r = {
|
|
1747
1791
|
root: n ? n.current : void 0,
|
|
1748
1792
|
rootMargin: i,
|
|
1749
|
-
threshold: typeof s == "number" ? s :
|
|
1793
|
+
threshold: typeof s == "number" ? s : El[s]
|
|
1750
1794
|
}, a = (l) => {
|
|
1751
1795
|
const { isIntersecting: c } = l;
|
|
1752
1796
|
if (this.isInView === c || (this.isInView = c, o && !c && this.hasEnteredView))
|
|
@@ -1755,7 +1799,7 @@ class Cl extends St {
|
|
|
1755
1799
|
const { onViewportEnter: u, onViewportLeave: f } = this.node.getProps(), d = c ? u : f;
|
|
1756
1800
|
d && d(l);
|
|
1757
1801
|
};
|
|
1758
|
-
return
|
|
1802
|
+
return Rl(this.node.current, r, a);
|
|
1759
1803
|
}
|
|
1760
1804
|
mount() {
|
|
1761
1805
|
this.startObserver();
|
|
@@ -1764,29 +1808,29 @@ class Cl extends St {
|
|
|
1764
1808
|
if (typeof IntersectionObserver > "u")
|
|
1765
1809
|
return;
|
|
1766
1810
|
const { props: e, prevProps: n } = this.node;
|
|
1767
|
-
["amount", "margin", "root"].some(
|
|
1811
|
+
["amount", "margin", "root"].some(Dl(e, n)) && this.startObserver();
|
|
1768
1812
|
}
|
|
1769
1813
|
unmount() {
|
|
1770
1814
|
}
|
|
1771
1815
|
}
|
|
1772
|
-
function
|
|
1816
|
+
function Dl({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
1773
1817
|
return (n) => t[n] !== e[n];
|
|
1774
1818
|
}
|
|
1775
|
-
const
|
|
1819
|
+
const Ml = {
|
|
1776
1820
|
inView: {
|
|
1777
|
-
Feature:
|
|
1821
|
+
Feature: Vl
|
|
1778
1822
|
},
|
|
1779
1823
|
tap: {
|
|
1780
|
-
Feature:
|
|
1824
|
+
Feature: wl
|
|
1781
1825
|
},
|
|
1782
1826
|
focus: {
|
|
1783
|
-
Feature:
|
|
1827
|
+
Feature: xl
|
|
1784
1828
|
},
|
|
1785
1829
|
hover: {
|
|
1786
|
-
Feature:
|
|
1830
|
+
Feature: bl
|
|
1787
1831
|
}
|
|
1788
1832
|
};
|
|
1789
|
-
function
|
|
1833
|
+
function Mr(t, e) {
|
|
1790
1834
|
if (!Array.isArray(e))
|
|
1791
1835
|
return !1;
|
|
1792
1836
|
const n = e.length;
|
|
@@ -1799,75 +1843,75 @@ function Vr(t, e) {
|
|
|
1799
1843
|
}
|
|
1800
1844
|
function Ge(t, e, n) {
|
|
1801
1845
|
const i = t.getProps();
|
|
1802
|
-
return
|
|
1846
|
+
return Jn(i, e, n !== void 0 ? n : i.custom, t);
|
|
1803
1847
|
}
|
|
1804
|
-
const ht = (t) => t * 1e3, dt = (t) => t / 1e3,
|
|
1848
|
+
const ht = (t) => t * 1e3, dt = (t) => t / 1e3, kl = {
|
|
1805
1849
|
type: "spring",
|
|
1806
1850
|
stiffness: 500,
|
|
1807
1851
|
damping: 25,
|
|
1808
1852
|
restSpeed: 10
|
|
1809
|
-
},
|
|
1853
|
+
}, Ll = (t) => ({
|
|
1810
1854
|
type: "spring",
|
|
1811
1855
|
stiffness: 550,
|
|
1812
1856
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1813
1857
|
restSpeed: 10
|
|
1814
|
-
}),
|
|
1858
|
+
}), Fl = {
|
|
1815
1859
|
type: "keyframes",
|
|
1816
1860
|
duration: 0.8
|
|
1817
|
-
},
|
|
1861
|
+
}, Ol = {
|
|
1818
1862
|
type: "keyframes",
|
|
1819
1863
|
ease: [0.25, 0.1, 0.35, 1],
|
|
1820
1864
|
duration: 0.3
|
|
1821
|
-
},
|
|
1822
|
-
function
|
|
1865
|
+
}, jl = (t, { keyframes: e }) => e.length > 2 ? Fl : xt.has(t) ? t.startsWith("scale") ? Ll(e[1]) : kl : Ol;
|
|
1866
|
+
function _l({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: c, ...u }) {
|
|
1823
1867
|
return !!Object.keys(u).length;
|
|
1824
1868
|
}
|
|
1825
|
-
function
|
|
1869
|
+
function ti(t, e) {
|
|
1826
1870
|
return t[e] || t.default || t;
|
|
1827
1871
|
}
|
|
1828
|
-
const
|
|
1872
|
+
const Bl = (t) => t !== null;
|
|
1829
1873
|
function He(t, { repeat: e, repeatType: n = "loop" }, i) {
|
|
1830
|
-
const s = t.filter(
|
|
1874
|
+
const s = t.filter(Bl), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
|
|
1831
1875
|
return !o || i === void 0 ? s[o] : i;
|
|
1832
1876
|
}
|
|
1833
|
-
let
|
|
1834
|
-
function
|
|
1835
|
-
|
|
1877
|
+
let Ee;
|
|
1878
|
+
function Il() {
|
|
1879
|
+
Ee = void 0;
|
|
1836
1880
|
}
|
|
1837
|
-
const
|
|
1838
|
-
now: () => (
|
|
1881
|
+
const Pt = {
|
|
1882
|
+
now: () => (Ee === void 0 && Pt.set(K.isProcessing || Aa.useManualTiming ? K.timestamp : performance.now()), Ee),
|
|
1839
1883
|
set: (t) => {
|
|
1840
|
-
|
|
1884
|
+
Ee = t, queueMicrotask(Il);
|
|
1841
1885
|
}
|
|
1842
|
-
},
|
|
1843
|
-
function
|
|
1844
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1886
|
+
}, kr = (t) => /^0[^.\s]+$/u.test(t);
|
|
1887
|
+
function Nl(t) {
|
|
1888
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || kr(t) : !0;
|
|
1845
1889
|
}
|
|
1846
|
-
const
|
|
1890
|
+
const Lr = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), Ul = (
|
|
1847
1891
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1848
1892
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1849
1893
|
);
|
|
1850
|
-
function
|
|
1851
|
-
const e =
|
|
1894
|
+
function Wl(t) {
|
|
1895
|
+
const e = Ul.exec(t);
|
|
1852
1896
|
if (!e)
|
|
1853
1897
|
return [,];
|
|
1854
1898
|
const [, n, i, s] = e;
|
|
1855
1899
|
return [`--${n ?? i}`, s];
|
|
1856
1900
|
}
|
|
1857
|
-
const
|
|
1858
|
-
function
|
|
1859
|
-
pt(n <=
|
|
1860
|
-
const [i, s] =
|
|
1901
|
+
const $l = 4;
|
|
1902
|
+
function Fr(t, e, n = 1) {
|
|
1903
|
+
pt(n <= $l, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
1904
|
+
const [i, s] = Wl(t);
|
|
1861
1905
|
if (!i)
|
|
1862
1906
|
return;
|
|
1863
1907
|
const o = window.getComputedStyle(e).getPropertyValue(i);
|
|
1864
1908
|
if (o) {
|
|
1865
1909
|
const r = o.trim();
|
|
1866
|
-
return
|
|
1910
|
+
return Lr(r) ? parseFloat(r) : r;
|
|
1867
1911
|
}
|
|
1868
|
-
return
|
|
1912
|
+
return Hn(s) ? Fr(s, e, n + 1) : s;
|
|
1869
1913
|
}
|
|
1870
|
-
const
|
|
1914
|
+
const Kl = /* @__PURE__ */ new Set([
|
|
1871
1915
|
"width",
|
|
1872
1916
|
"height",
|
|
1873
1917
|
"top",
|
|
@@ -1878,20 +1922,20 @@ const Ul = /* @__PURE__ */ new Set([
|
|
|
1878
1922
|
"y",
|
|
1879
1923
|
"translateX",
|
|
1880
1924
|
"translateY"
|
|
1881
|
-
]),
|
|
1925
|
+
]), Hi = (t) => t === Ht || t === S, zi = (t, e) => parseFloat(t.split(", ")[e]), Yi = (t, e) => (n, { transform: i }) => {
|
|
1882
1926
|
if (i === "none" || !i)
|
|
1883
1927
|
return 0;
|
|
1884
1928
|
const s = i.match(/^matrix3d\((.+)\)$/u);
|
|
1885
1929
|
if (s)
|
|
1886
|
-
return
|
|
1930
|
+
return zi(s[1], e);
|
|
1887
1931
|
{
|
|
1888
1932
|
const o = i.match(/^matrix\((.+)\)$/u);
|
|
1889
|
-
return o ?
|
|
1933
|
+
return o ? zi(o[1], t) : 0;
|
|
1890
1934
|
}
|
|
1891
|
-
},
|
|
1892
|
-
function
|
|
1935
|
+
}, Gl = /* @__PURE__ */ new Set(["x", "y", "z"]), Hl = pe.filter((t) => !Gl.has(t));
|
|
1936
|
+
function zl(t) {
|
|
1893
1937
|
const e = [];
|
|
1894
|
-
return
|
|
1938
|
+
return Hl.forEach((n) => {
|
|
1895
1939
|
const i = t.getValue(n);
|
|
1896
1940
|
i !== void 0 && (e.push([n, i.get()]), i.set(n.startsWith("scale") ? 1 : 0));
|
|
1897
1941
|
}), e;
|
|
@@ -1905,21 +1949,21 @@ const Kt = {
|
|
|
1905
1949
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
1906
1950
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
1907
1951
|
// Transform
|
|
1908
|
-
x:
|
|
1909
|
-
y:
|
|
1952
|
+
x: Yi(4, 13),
|
|
1953
|
+
y: Yi(5, 14)
|
|
1910
1954
|
};
|
|
1911
1955
|
Kt.translateX = Kt.x;
|
|
1912
1956
|
Kt.translateY = Kt.y;
|
|
1913
|
-
const
|
|
1957
|
+
const Or = (t) => (e) => e.test(t), Yl = {
|
|
1914
1958
|
test: (t) => t === "auto",
|
|
1915
1959
|
parse: (t) => t
|
|
1916
|
-
},
|
|
1960
|
+
}, jr = [Ht, S, ot, vt, za, Ha, Yl], Xi = (t) => jr.find(Or(t)), Dt = /* @__PURE__ */ new Set();
|
|
1917
1961
|
let bn = !1, xn = !1;
|
|
1918
|
-
function
|
|
1962
|
+
function _r() {
|
|
1919
1963
|
if (xn) {
|
|
1920
1964
|
const t = Array.from(Dt).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
|
|
1921
1965
|
e.forEach((i) => {
|
|
1922
|
-
const s =
|
|
1966
|
+
const s = zl(i);
|
|
1923
1967
|
s.length && (n.set(i, s), i.render());
|
|
1924
1968
|
}), t.forEach((i) => i.measureInitialState()), e.forEach((i) => {
|
|
1925
1969
|
i.render();
|
|
@@ -1934,20 +1978,20 @@ function Or() {
|
|
|
1934
1978
|
}
|
|
1935
1979
|
xn = !1, bn = !1, Dt.forEach((t) => t.complete()), Dt.clear();
|
|
1936
1980
|
}
|
|
1937
|
-
function
|
|
1981
|
+
function Br() {
|
|
1938
1982
|
Dt.forEach((t) => {
|
|
1939
1983
|
t.readKeyframes(), t.needsMeasurement && (xn = !0);
|
|
1940
1984
|
});
|
|
1941
1985
|
}
|
|
1942
|
-
function
|
|
1943
|
-
|
|
1986
|
+
function Xl() {
|
|
1987
|
+
Br(), _r();
|
|
1944
1988
|
}
|
|
1945
|
-
class
|
|
1989
|
+
class ei {
|
|
1946
1990
|
constructor(e, n, i, s, o, r = !1) {
|
|
1947
1991
|
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
|
|
1948
1992
|
}
|
|
1949
1993
|
scheduleResolve() {
|
|
1950
|
-
this.isScheduled = !0, this.isAsync ? (Dt.add(this), bn || (bn = !0, M.read(
|
|
1994
|
+
this.isScheduled = !0, this.isAsync ? (Dt.add(this), bn || (bn = !0, M.read(Br), M.resolveKeyframes(_r))) : (this.readKeyframes(), this.complete());
|
|
1951
1995
|
}
|
|
1952
1996
|
readKeyframes() {
|
|
1953
1997
|
const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
|
|
@@ -1983,25 +2027,25 @@ class ti {
|
|
|
1983
2027
|
this.isComplete || this.scheduleResolve();
|
|
1984
2028
|
}
|
|
1985
2029
|
}
|
|
1986
|
-
const
|
|
2030
|
+
const ni = (t, e) => (n) => !!(me(n) && Ka.test(n) && n.startsWith(t) || e && !Ga(n) && Object.prototype.hasOwnProperty.call(n, e)), Ir = (t, e, n) => (i) => {
|
|
1987
2031
|
if (!me(i))
|
|
1988
2032
|
return i;
|
|
1989
|
-
const [s, o, r, a] = i.match(
|
|
2033
|
+
const [s, o, r, a] = i.match(Kn);
|
|
1990
2034
|
return {
|
|
1991
2035
|
[t]: parseFloat(s),
|
|
1992
2036
|
[e]: parseFloat(o),
|
|
1993
2037
|
[n]: parseFloat(r),
|
|
1994
2038
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1995
2039
|
};
|
|
1996
|
-
},
|
|
2040
|
+
}, ql = (t) => Tt(0, 255, t), on = {
|
|
1997
2041
|
...Ht,
|
|
1998
|
-
transform: (t) => Math.round(
|
|
2042
|
+
transform: (t) => Math.round(ql(t))
|
|
1999
2043
|
}, Vt = {
|
|
2000
|
-
test:
|
|
2001
|
-
parse:
|
|
2044
|
+
test: ni("rgb", "red"),
|
|
2045
|
+
parse: Ir("red", "green", "blue"),
|
|
2002
2046
|
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + on.transform(t) + ", " + on.transform(e) + ", " + on.transform(n) + ", " + ne(ee.transform(i)) + ")"
|
|
2003
2047
|
};
|
|
2004
|
-
function
|
|
2048
|
+
function Zl(t) {
|
|
2005
2049
|
let e = "", n = "", i = "", s = "";
|
|
2006
2050
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), i = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), i = t.substring(3, 4), s = t.substring(4, 5), e += e, n += n, i += i, s += s), {
|
|
2007
2051
|
red: parseInt(e, 16),
|
|
@@ -2011,23 +2055,23 @@ function Yl(t) {
|
|
|
2011
2055
|
};
|
|
2012
2056
|
}
|
|
2013
2057
|
const wn = {
|
|
2014
|
-
test:
|
|
2015
|
-
parse:
|
|
2058
|
+
test: ni("#"),
|
|
2059
|
+
parse: Zl,
|
|
2016
2060
|
transform: Vt.transform
|
|
2017
2061
|
}, It = {
|
|
2018
|
-
test:
|
|
2019
|
-
parse:
|
|
2062
|
+
test: ni("hsl", "hue"),
|
|
2063
|
+
parse: Ir("hue", "saturation", "lightness"),
|
|
2020
2064
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + ot.transform(ne(e)) + ", " + ot.transform(ne(n)) + ", " + ne(ee.transform(i)) + ")"
|
|
2021
2065
|
}, z = {
|
|
2022
2066
|
test: (t) => Vt.test(t) || wn.test(t) || It.test(t),
|
|
2023
2067
|
parse: (t) => Vt.test(t) ? Vt.parse(t) : It.test(t) ? It.parse(t) : wn.parse(t),
|
|
2024
2068
|
transform: (t) => me(t) ? t : t.hasOwnProperty("red") ? Vt.transform(t) : It.transform(t)
|
|
2025
2069
|
};
|
|
2026
|
-
function
|
|
2070
|
+
function Jl(t) {
|
|
2027
2071
|
var e, n;
|
|
2028
|
-
return isNaN(t) && me(t) && (((e = t.match(
|
|
2072
|
+
return isNaN(t) && me(t) && (((e = t.match(Kn)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match($a)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
2029
2073
|
}
|
|
2030
|
-
const
|
|
2074
|
+
const Nr = "number", Ur = "color", Ql = "var", tc = "var(", qi = "${}", ec = /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;
|
|
2031
2075
|
function le(t) {
|
|
2032
2076
|
const e = t.toString(), n = [], i = {
|
|
2033
2077
|
color: [],
|
|
@@ -2035,54 +2079,54 @@ function le(t) {
|
|
|
2035
2079
|
var: []
|
|
2036
2080
|
}, s = [];
|
|
2037
2081
|
let o = 0;
|
|
2038
|
-
const a = e.replace(
|
|
2082
|
+
const a = e.replace(ec, (l) => (z.test(l) ? (i.color.push(o), s.push(Ur), n.push(z.parse(l))) : l.startsWith(tc) ? (i.var.push(o), s.push(Ql), n.push(l)) : (i.number.push(o), s.push(Nr), n.push(parseFloat(l))), ++o, qi)).split(qi);
|
|
2039
2083
|
return { values: n, split: a, indexes: i, types: s };
|
|
2040
2084
|
}
|
|
2041
|
-
function
|
|
2085
|
+
function Wr(t) {
|
|
2042
2086
|
return le(t).values;
|
|
2043
2087
|
}
|
|
2044
|
-
function
|
|
2088
|
+
function $r(t) {
|
|
2045
2089
|
const { split: e, types: n } = le(t), i = e.length;
|
|
2046
2090
|
return (s) => {
|
|
2047
2091
|
let o = "";
|
|
2048
2092
|
for (let r = 0; r < i; r++)
|
|
2049
2093
|
if (o += e[r], s[r] !== void 0) {
|
|
2050
2094
|
const a = n[r];
|
|
2051
|
-
a ===
|
|
2095
|
+
a === Nr ? o += ne(s[r]) : a === Ur ? o += z.transform(s[r]) : o += s[r];
|
|
2052
2096
|
}
|
|
2053
2097
|
return o;
|
|
2054
2098
|
};
|
|
2055
2099
|
}
|
|
2056
|
-
const
|
|
2057
|
-
function
|
|
2058
|
-
const e =
|
|
2059
|
-
return
|
|
2060
|
-
}
|
|
2061
|
-
const
|
|
2062
|
-
test:
|
|
2063
|
-
parse:
|
|
2064
|
-
createTransformer:
|
|
2065
|
-
getAnimatableNone:
|
|
2066
|
-
},
|
|
2067
|
-
function
|
|
2100
|
+
const nc = (t) => typeof t == "number" ? 0 : t;
|
|
2101
|
+
function ic(t) {
|
|
2102
|
+
const e = Wr(t);
|
|
2103
|
+
return $r(t)(e.map(nc));
|
|
2104
|
+
}
|
|
2105
|
+
const bt = {
|
|
2106
|
+
test: Jl,
|
|
2107
|
+
parse: Wr,
|
|
2108
|
+
createTransformer: $r,
|
|
2109
|
+
getAnimatableNone: ic
|
|
2110
|
+
}, sc = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2111
|
+
function rc(t) {
|
|
2068
2112
|
const [e, n] = t.slice(0, -1).split("(");
|
|
2069
2113
|
if (e === "drop-shadow")
|
|
2070
2114
|
return t;
|
|
2071
|
-
const [i] = n.match(
|
|
2115
|
+
const [i] = n.match(Kn) || [];
|
|
2072
2116
|
if (!i)
|
|
2073
2117
|
return t;
|
|
2074
2118
|
const s = n.replace(i, "");
|
|
2075
|
-
let o =
|
|
2119
|
+
let o = sc.has(e) ? 1 : 0;
|
|
2076
2120
|
return i !== n && (o *= 100), e + "(" + o + s + ")";
|
|
2077
2121
|
}
|
|
2078
|
-
const
|
|
2079
|
-
...
|
|
2122
|
+
const oc = /\b([a-z-]*)\(.*?\)/gu, Sn = {
|
|
2123
|
+
...bt,
|
|
2080
2124
|
getAnimatableNone: (t) => {
|
|
2081
|
-
const e = t.match(
|
|
2082
|
-
return e ? e.map(
|
|
2125
|
+
const e = t.match(oc);
|
|
2126
|
+
return e ? e.map(rc).join(" ") : t;
|
|
2083
2127
|
}
|
|
2084
|
-
},
|
|
2085
|
-
...
|
|
2128
|
+
}, ac = {
|
|
2129
|
+
...Gn,
|
|
2086
2130
|
// Color props
|
|
2087
2131
|
color: z,
|
|
2088
2132
|
backgroundColor: z,
|
|
@@ -2097,23 +2141,23 @@ const ic = /\b([a-z-]*)\(.*?\)/gu, Sn = {
|
|
|
2097
2141
|
borderLeftColor: z,
|
|
2098
2142
|
filter: Sn,
|
|
2099
2143
|
WebkitFilter: Sn
|
|
2100
|
-
},
|
|
2101
|
-
function
|
|
2102
|
-
let n =
|
|
2103
|
-
return n !== Sn && (n =
|
|
2144
|
+
}, ii = (t) => ac[t];
|
|
2145
|
+
function Kr(t, e) {
|
|
2146
|
+
let n = ii(t);
|
|
2147
|
+
return n !== Sn && (n = bt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2104
2148
|
}
|
|
2105
|
-
const
|
|
2106
|
-
function
|
|
2149
|
+
const lc = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2150
|
+
function cc(t, e, n) {
|
|
2107
2151
|
let i = 0, s;
|
|
2108
2152
|
for (; i < t.length && !s; ) {
|
|
2109
2153
|
const o = t[i];
|
|
2110
|
-
typeof o == "string" && !
|
|
2154
|
+
typeof o == "string" && !lc.has(o) && le(o).values.length && (s = t[i]), i++;
|
|
2111
2155
|
}
|
|
2112
2156
|
if (s && n)
|
|
2113
2157
|
for (const o of e)
|
|
2114
|
-
t[o] =
|
|
2158
|
+
t[o] = Kr(n, s);
|
|
2115
2159
|
}
|
|
2116
|
-
class
|
|
2160
|
+
class Gr extends ei {
|
|
2117
2161
|
constructor(e, n, i, s) {
|
|
2118
2162
|
super(e, n, i, s, s == null ? void 0 : s.owner, !0);
|
|
2119
2163
|
}
|
|
@@ -2124,16 +2168,16 @@ class $r extends ti {
|
|
|
2124
2168
|
super.readKeyframes();
|
|
2125
2169
|
for (let l = 0; l < e.length; l++) {
|
|
2126
2170
|
let c = e[l];
|
|
2127
|
-
if (typeof c == "string" && (c = c.trim(),
|
|
2128
|
-
const u =
|
|
2171
|
+
if (typeof c == "string" && (c = c.trim(), Hn(c))) {
|
|
2172
|
+
const u = Fr(c, n.current);
|
|
2129
2173
|
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
2130
2174
|
}
|
|
2131
2175
|
}
|
|
2132
|
-
if (this.resolveNoneKeyframes(), !
|
|
2176
|
+
if (this.resolveNoneKeyframes(), !Kl.has(i) || e.length !== 2)
|
|
2133
2177
|
return;
|
|
2134
|
-
const [s, o] = e, r =
|
|
2178
|
+
const [s, o] = e, r = Xi(s), a = Xi(o);
|
|
2135
2179
|
if (r !== a)
|
|
2136
|
-
if (
|
|
2180
|
+
if (Hi(r) && Hi(a))
|
|
2137
2181
|
for (let l = 0; l < e.length; l++) {
|
|
2138
2182
|
const c = e[l];
|
|
2139
2183
|
typeof c == "string" && (e[l] = parseFloat(c));
|
|
@@ -2144,8 +2188,8 @@ class $r extends ti {
|
|
|
2144
2188
|
resolveNoneKeyframes() {
|
|
2145
2189
|
const { unresolvedKeyframes: e, name: n } = this, i = [];
|
|
2146
2190
|
for (let s = 0; s < e.length; s++)
|
|
2147
|
-
|
|
2148
|
-
i.length &&
|
|
2191
|
+
Nl(e[s]) && i.push(s);
|
|
2192
|
+
i.length && cc(e, i, n);
|
|
2149
2193
|
}
|
|
2150
2194
|
measureInitialState() {
|
|
2151
2195
|
const { element: e, unresolvedKeyframes: n, name: i } = this;
|
|
@@ -2168,14 +2212,14 @@ class $r extends ti {
|
|
|
2168
2212
|
}), this.resolveNoneKeyframes();
|
|
2169
2213
|
}
|
|
2170
2214
|
}
|
|
2171
|
-
function
|
|
2215
|
+
function Hr(t) {
|
|
2172
2216
|
let e;
|
|
2173
2217
|
return () => (e === void 0 && (e = t()), e);
|
|
2174
2218
|
}
|
|
2175
|
-
const
|
|
2176
|
-
(
|
|
2219
|
+
const Zi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
2220
|
+
(bt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
2177
2221
|
!t.startsWith("url("));
|
|
2178
|
-
function
|
|
2222
|
+
function uc(t) {
|
|
2179
2223
|
const e = t[0];
|
|
2180
2224
|
if (t.length === 1)
|
|
2181
2225
|
return !0;
|
|
@@ -2183,16 +2227,16 @@ function ac(t) {
|
|
|
2183
2227
|
if (t[n] !== e)
|
|
2184
2228
|
return !0;
|
|
2185
2229
|
}
|
|
2186
|
-
function
|
|
2230
|
+
function fc(t, e, n, i) {
|
|
2187
2231
|
const s = t[0];
|
|
2188
2232
|
if (s === null)
|
|
2189
2233
|
return !1;
|
|
2190
2234
|
if (e === "display" || e === "visibility")
|
|
2191
2235
|
return !0;
|
|
2192
|
-
const o = t[t.length - 1], r =
|
|
2193
|
-
return Gt(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 :
|
|
2236
|
+
const o = t[t.length - 1], r = Zi(s, e), a = Zi(o, e);
|
|
2237
|
+
return Gt(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 : uc(t) || n === "spring" && i;
|
|
2194
2238
|
}
|
|
2195
|
-
class
|
|
2239
|
+
class zr {
|
|
2196
2240
|
constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", ...a }) {
|
|
2197
2241
|
this.isStopped = !1, this.hasAttemptedResolve = !1, this.options = {
|
|
2198
2242
|
autoplay: e,
|
|
@@ -2210,7 +2254,7 @@ class Gr {
|
|
|
2210
2254
|
* This is a deoptimisation, but at its worst still batches read/writes.
|
|
2211
2255
|
*/
|
|
2212
2256
|
get resolved() {
|
|
2213
|
-
return !this._resolved && !this.hasAttemptedResolve &&
|
|
2257
|
+
return !this._resolved && !this.hasAttemptedResolve && Xl(), this._resolved;
|
|
2214
2258
|
}
|
|
2215
2259
|
/**
|
|
2216
2260
|
* A method to be called when the keyframes resolver completes. This method
|
|
@@ -2220,7 +2264,7 @@ class Gr {
|
|
|
2220
2264
|
onKeyframesResolved(e, n) {
|
|
2221
2265
|
this.hasAttemptedResolve = !0;
|
|
2222
2266
|
const { name: i, type: s, velocity: o, delay: r, onComplete: a, onUpdate: l, isGenerator: c } = this.options;
|
|
2223
|
-
if (!c && !
|
|
2267
|
+
if (!c && !fc(e, i, s, o))
|
|
2224
2268
|
if (r)
|
|
2225
2269
|
this.options.duration = 0;
|
|
2226
2270
|
else {
|
|
@@ -2250,20 +2294,20 @@ class Gr {
|
|
|
2250
2294
|
});
|
|
2251
2295
|
}
|
|
2252
2296
|
}
|
|
2253
|
-
function
|
|
2297
|
+
function Yr(t, e) {
|
|
2254
2298
|
return e ? t * (1e3 / e) : 0;
|
|
2255
2299
|
}
|
|
2256
|
-
const
|
|
2257
|
-
function
|
|
2258
|
-
const i = Math.max(e -
|
|
2259
|
-
return
|
|
2300
|
+
const hc = 5;
|
|
2301
|
+
function Xr(t, e, n) {
|
|
2302
|
+
const i = Math.max(e - hc, 0);
|
|
2303
|
+
return Yr(n - t(i), e - i);
|
|
2260
2304
|
}
|
|
2261
|
-
const an = 1e-3,
|
|
2262
|
-
function
|
|
2305
|
+
const an = 1e-3, dc = 0.01, Ji = 10, pc = 0.05, mc = 1;
|
|
2306
|
+
function gc({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1 }) {
|
|
2263
2307
|
let s, o;
|
|
2264
|
-
Gt(t <= ht(
|
|
2308
|
+
Gt(t <= ht(Ji), "Spring duration must be 10 seconds or less");
|
|
2265
2309
|
let r = 1 - e;
|
|
2266
|
-
r =
|
|
2310
|
+
r = Tt(pc, mc, r), t = Tt(dc, Ji, dt(t)), r < 1 ? (s = (c) => {
|
|
2267
2311
|
const u = c * r, f = u * t, d = u - n, p = An(c, r), m = Math.exp(-f);
|
|
2268
2312
|
return an - d / p * m;
|
|
2269
2313
|
}, o = (c) => {
|
|
@@ -2276,7 +2320,7 @@ function dc({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
|
|
|
2276
2320
|
const u = Math.exp(-c * t), f = (n - c) * (t * t);
|
|
2277
2321
|
return u * f;
|
|
2278
2322
|
});
|
|
2279
|
-
const a = 5 / t, l =
|
|
2323
|
+
const a = 5 / t, l = vc(s, o, a);
|
|
2280
2324
|
if (t = ht(t), isNaN(l))
|
|
2281
2325
|
return {
|
|
2282
2326
|
stiffness: 100,
|
|
@@ -2292,21 +2336,21 @@ function dc({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
|
|
|
2292
2336
|
};
|
|
2293
2337
|
}
|
|
2294
2338
|
}
|
|
2295
|
-
const
|
|
2296
|
-
function
|
|
2339
|
+
const yc = 12;
|
|
2340
|
+
function vc(t, e, n) {
|
|
2297
2341
|
let i = n;
|
|
2298
|
-
for (let s = 1; s <
|
|
2342
|
+
for (let s = 1; s < yc; s++)
|
|
2299
2343
|
i = i - t(i) / e(i);
|
|
2300
2344
|
return i;
|
|
2301
2345
|
}
|
|
2302
2346
|
function An(t, e) {
|
|
2303
2347
|
return t * Math.sqrt(1 - e * e);
|
|
2304
2348
|
}
|
|
2305
|
-
const
|
|
2306
|
-
function
|
|
2349
|
+
const Pc = ["duration", "bounce"], Tc = ["stiffness", "damping", "mass"];
|
|
2350
|
+
function Qi(t, e) {
|
|
2307
2351
|
return e.some((n) => t[n] !== void 0);
|
|
2308
2352
|
}
|
|
2309
|
-
function
|
|
2353
|
+
function bc(t) {
|
|
2310
2354
|
let e = {
|
|
2311
2355
|
velocity: 0,
|
|
2312
2356
|
stiffness: 100,
|
|
@@ -2315,8 +2359,8 @@ function vc(t) {
|
|
|
2315
2359
|
isResolvedFromDuration: !1,
|
|
2316
2360
|
...t
|
|
2317
2361
|
};
|
|
2318
|
-
if (!
|
|
2319
|
-
const n =
|
|
2362
|
+
if (!Qi(t, Tc) && Qi(t, Pc)) {
|
|
2363
|
+
const n = gc(t);
|
|
2320
2364
|
e = {
|
|
2321
2365
|
...e,
|
|
2322
2366
|
...n,
|
|
@@ -2325,8 +2369,8 @@ function vc(t) {
|
|
|
2325
2369
|
}
|
|
2326
2370
|
return e;
|
|
2327
2371
|
}
|
|
2328
|
-
function
|
|
2329
|
-
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 } =
|
|
2372
|
+
function qr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
2373
|
+
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 } = bc({
|
|
2330
2374
|
...i,
|
|
2331
2375
|
velocity: -dt(i.velocity || 0)
|
|
2332
2376
|
}), p = f || 0, m = l / (2 * Math.sqrt(a * c)), v = o - s, x = dt(Math.sqrt(a / c)), P = Math.abs(v) < 5;
|
|
@@ -2355,7 +2399,7 @@ function Yr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
|
2355
2399
|
r.done = T >= u;
|
|
2356
2400
|
else {
|
|
2357
2401
|
let C = p;
|
|
2358
|
-
T !== 0 && (m < 1 ? C =
|
|
2402
|
+
T !== 0 && (m < 1 ? C = Xr(y, T, w) : C = 0);
|
|
2359
2403
|
const k = Math.abs(C) <= n, $ = Math.abs(o - w) <= e;
|
|
2360
2404
|
r.done = k && $;
|
|
2361
2405
|
}
|
|
@@ -2363,7 +2407,7 @@ function Yr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
|
2363
2407
|
}
|
|
2364
2408
|
};
|
|
2365
2409
|
}
|
|
2366
|
-
function
|
|
2410
|
+
function ts({ 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 }) {
|
|
2367
2411
|
const f = t[0], d = {
|
|
2368
2412
|
done: !1,
|
|
2369
2413
|
value: f
|
|
@@ -2377,9 +2421,9 @@ function Ji({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2377
2421
|
};
|
|
2378
2422
|
let C, k;
|
|
2379
2423
|
const $ = (R) => {
|
|
2380
|
-
p(d.value) && (C = R, k =
|
|
2424
|
+
p(d.value) && (C = R, k = qr({
|
|
2381
2425
|
keyframes: [d.value, m(d.value)],
|
|
2382
|
-
velocity:
|
|
2426
|
+
velocity: Xr(T, R, d.value),
|
|
2383
2427
|
// TODO: This should be passing * 1000
|
|
2384
2428
|
damping: s,
|
|
2385
2429
|
stiffness: o,
|
|
@@ -2395,39 +2439,39 @@ function Ji({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2395
2439
|
}
|
|
2396
2440
|
};
|
|
2397
2441
|
}
|
|
2398
|
-
const
|
|
2399
|
-
function
|
|
2442
|
+
const Zr = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, xc = 1e-7, wc = 12;
|
|
2443
|
+
function Sc(t, e, n, i, s) {
|
|
2400
2444
|
let o, r, a = 0;
|
|
2401
2445
|
do
|
|
2402
|
-
r = e + (n - e) / 2, o =
|
|
2403
|
-
while (Math.abs(o) >
|
|
2446
|
+
r = e + (n - e) / 2, o = Zr(r, i, s) - t, o > 0 ? n = r : e = r;
|
|
2447
|
+
while (Math.abs(o) > xc && ++a < wc);
|
|
2404
2448
|
return r;
|
|
2405
2449
|
}
|
|
2406
2450
|
function ye(t, e, n, i) {
|
|
2407
2451
|
if (t === e && n === i)
|
|
2408
2452
|
return H;
|
|
2409
|
-
const s = (o) =>
|
|
2410
|
-
return (o) => o === 0 || o === 1 ? o :
|
|
2453
|
+
const s = (o) => Sc(o, 0, 1, t, n);
|
|
2454
|
+
return (o) => o === 0 || o === 1 ? o : Zr(s(o), e, i);
|
|
2411
2455
|
}
|
|
2412
|
-
const
|
|
2456
|
+
const Ac = ye(0.42, 0, 1, 1), Cc = ye(0, 0, 0.58, 1), Jr = ye(0.42, 0, 0.58, 1), Rc = (t) => Array.isArray(t) && typeof t[0] != "number", Qr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, to = (t) => (e) => 1 - t(1 - e), si = (t) => 1 - Math.sin(Math.acos(t)), eo = to(si), Ec = Qr(si), no = ye(0.33, 1.53, 0.69, 0.99), ri = to(no), Vc = Qr(ri), Dc = (t) => (t *= 2) < 1 ? 0.5 * ri(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), es = {
|
|
2413
2457
|
linear: H,
|
|
2414
|
-
easeIn:
|
|
2415
|
-
easeInOut:
|
|
2416
|
-
easeOut:
|
|
2417
|
-
circIn:
|
|
2418
|
-
circInOut:
|
|
2419
|
-
circOut:
|
|
2420
|
-
backIn:
|
|
2421
|
-
backInOut:
|
|
2422
|
-
backOut:
|
|
2423
|
-
anticipate:
|
|
2424
|
-
},
|
|
2458
|
+
easeIn: Ac,
|
|
2459
|
+
easeInOut: Jr,
|
|
2460
|
+
easeOut: Cc,
|
|
2461
|
+
circIn: si,
|
|
2462
|
+
circInOut: Ec,
|
|
2463
|
+
circOut: eo,
|
|
2464
|
+
backIn: ri,
|
|
2465
|
+
backInOut: Vc,
|
|
2466
|
+
backOut: no,
|
|
2467
|
+
anticipate: Dc
|
|
2468
|
+
}, ns = (t) => {
|
|
2425
2469
|
if (Array.isArray(t)) {
|
|
2426
2470
|
pt(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2427
2471
|
const [e, n, i, s] = t;
|
|
2428
2472
|
return ye(e, n, i, s);
|
|
2429
2473
|
} else if (typeof t == "string")
|
|
2430
|
-
return pt(
|
|
2474
|
+
return pt(es[t] !== void 0, `Invalid easing type '${t}'`), es[t];
|
|
2431
2475
|
return t;
|
|
2432
2476
|
}, ce = (t, e, n) => {
|
|
2433
2477
|
const i = e - t;
|
|
@@ -2436,7 +2480,7 @@ const xc = ye(0.42, 0, 1, 1), wc = ye(0, 0, 0.58, 1), qr = ye(0.42, 0, 0.58, 1),
|
|
|
2436
2480
|
function ln(t, e, n) {
|
|
2437
2481
|
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;
|
|
2438
2482
|
}
|
|
2439
|
-
function
|
|
2483
|
+
function Mc({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
2440
2484
|
t /= 360, e /= 100, n /= 100;
|
|
2441
2485
|
let s = 0, o = 0, r = 0;
|
|
2442
2486
|
if (!e)
|
|
@@ -2458,49 +2502,49 @@ function Fe(t, e) {
|
|
|
2458
2502
|
const cn = (t, e, n) => {
|
|
2459
2503
|
const i = t * t, s = n * (e * e - i) + i;
|
|
2460
2504
|
return s < 0 ? 0 : Math.sqrt(s);
|
|
2461
|
-
},
|
|
2462
|
-
function
|
|
2463
|
-
const e =
|
|
2505
|
+
}, kc = [wn, Vt, It], Lc = (t) => kc.find((e) => e.test(t));
|
|
2506
|
+
function is(t) {
|
|
2507
|
+
const e = Lc(t);
|
|
2464
2508
|
if (Gt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
2465
2509
|
return !1;
|
|
2466
2510
|
let n = e.parse(t);
|
|
2467
|
-
return e === It && (n =
|
|
2511
|
+
return e === It && (n = Mc(n)), n;
|
|
2468
2512
|
}
|
|
2469
|
-
const
|
|
2470
|
-
const n =
|
|
2513
|
+
const ss = (t, e) => {
|
|
2514
|
+
const n = is(t), i = is(e);
|
|
2471
2515
|
if (!n || !i)
|
|
2472
2516
|
return Fe(t, e);
|
|
2473
2517
|
const s = { ...n };
|
|
2474
2518
|
return (o) => (s.red = cn(n.red, i.red, o), s.green = cn(n.green, i.green, o), s.blue = cn(n.blue, i.blue, o), s.alpha = j(n.alpha, i.alpha, o), Vt.transform(s));
|
|
2475
2519
|
}, Cn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2476
|
-
function
|
|
2520
|
+
function Fc(t, e) {
|
|
2477
2521
|
return Cn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
2478
2522
|
}
|
|
2479
|
-
function
|
|
2523
|
+
function Oc(t, e) {
|
|
2480
2524
|
return (n) => j(t, e, n);
|
|
2481
2525
|
}
|
|
2482
|
-
function
|
|
2483
|
-
return typeof t == "number" ?
|
|
2526
|
+
function oi(t) {
|
|
2527
|
+
return typeof t == "number" ? Oc : typeof t == "string" ? Hn(t) ? Fe : z.test(t) ? ss : Bc : Array.isArray(t) ? io : typeof t == "object" ? z.test(t) ? ss : jc : Fe;
|
|
2484
2528
|
}
|
|
2485
|
-
function
|
|
2486
|
-
const n = [...t], i = n.length, s = t.map((o, r) =>
|
|
2529
|
+
function io(t, e) {
|
|
2530
|
+
const n = [...t], i = n.length, s = t.map((o, r) => oi(o)(o, e[r]));
|
|
2487
2531
|
return (o) => {
|
|
2488
2532
|
for (let r = 0; r < i; r++)
|
|
2489
2533
|
n[r] = s[r](o);
|
|
2490
2534
|
return n;
|
|
2491
2535
|
};
|
|
2492
2536
|
}
|
|
2493
|
-
function
|
|
2537
|
+
function jc(t, e) {
|
|
2494
2538
|
const n = { ...t, ...e }, i = {};
|
|
2495
2539
|
for (const s in n)
|
|
2496
|
-
t[s] !== void 0 && e[s] !== void 0 && (i[s] =
|
|
2540
|
+
t[s] !== void 0 && e[s] !== void 0 && (i[s] = oi(t[s])(t[s], e[s]));
|
|
2497
2541
|
return (s) => {
|
|
2498
2542
|
for (const o in i)
|
|
2499
2543
|
n[o] = i[o](s);
|
|
2500
2544
|
return n;
|
|
2501
2545
|
};
|
|
2502
2546
|
}
|
|
2503
|
-
function
|
|
2547
|
+
function _c(t, e) {
|
|
2504
2548
|
var n;
|
|
2505
2549
|
const i = [], s = { color: 0, var: 0, number: 0 };
|
|
2506
2550
|
for (let o = 0; o < e.values.length; o++) {
|
|
@@ -2509,15 +2553,15 @@ function Fc(t, e) {
|
|
|
2509
2553
|
}
|
|
2510
2554
|
return i;
|
|
2511
2555
|
}
|
|
2512
|
-
const
|
|
2513
|
-
const n =
|
|
2514
|
-
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 ? Cn.has(t) && !s.values.length || Cn.has(e) && !i.values.length ?
|
|
2556
|
+
const Bc = (t, e) => {
|
|
2557
|
+
const n = bt.createTransformer(e), i = le(t), s = le(e);
|
|
2558
|
+
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 ? Cn.has(t) && !s.values.length || Cn.has(e) && !i.values.length ? Fc(t, e) : ft(io(_c(i, s), s.values), n) : (Gt(!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.`), Fe(t, e));
|
|
2515
2559
|
};
|
|
2516
|
-
function
|
|
2517
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) :
|
|
2560
|
+
function so(t, e, n) {
|
|
2561
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) : oi(t)(t, e);
|
|
2518
2562
|
}
|
|
2519
|
-
function
|
|
2520
|
-
const i = [], s = n ||
|
|
2563
|
+
function Ic(t, e, n) {
|
|
2564
|
+
const i = [], s = n || so, o = t.length - 1;
|
|
2521
2565
|
for (let r = 0; r < o; r++) {
|
|
2522
2566
|
let a = s(t[r], t[r + 1]);
|
|
2523
2567
|
if (e) {
|
|
@@ -2528,14 +2572,14 @@ function jc(t, e, n) {
|
|
|
2528
2572
|
}
|
|
2529
2573
|
return i;
|
|
2530
2574
|
}
|
|
2531
|
-
function
|
|
2575
|
+
function Nc(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
2532
2576
|
const o = t.length;
|
|
2533
2577
|
if (pt(o === e.length, "Both input and output ranges must be the same length"), o === 1)
|
|
2534
2578
|
return () => e[0];
|
|
2535
2579
|
if (o === 2 && t[0] === t[1])
|
|
2536
2580
|
return () => e[1];
|
|
2537
2581
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
2538
|
-
const r =
|
|
2582
|
+
const r = Ic(e, i, s), a = r.length, l = (c) => {
|
|
2539
2583
|
let u = 0;
|
|
2540
2584
|
if (a > 1)
|
|
2541
2585
|
for (; u < t.length - 2 && !(c < t[u + 1]); u++)
|
|
@@ -2543,52 +2587,52 @@ function _c(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
|
2543
2587
|
const f = ce(t[u], t[u + 1], c);
|
|
2544
2588
|
return r[u](f);
|
|
2545
2589
|
};
|
|
2546
|
-
return n ? (c) => l(
|
|
2590
|
+
return n ? (c) => l(Tt(t[0], t[o - 1], c)) : l;
|
|
2547
2591
|
}
|
|
2548
|
-
function
|
|
2592
|
+
function Uc(t, e) {
|
|
2549
2593
|
const n = t[t.length - 1];
|
|
2550
2594
|
for (let i = 1; i <= e; i++) {
|
|
2551
2595
|
const s = ce(0, e, i);
|
|
2552
2596
|
t.push(j(n, 1, s));
|
|
2553
2597
|
}
|
|
2554
2598
|
}
|
|
2555
|
-
function
|
|
2599
|
+
function Wc(t) {
|
|
2556
2600
|
const e = [0];
|
|
2557
|
-
return
|
|
2601
|
+
return Uc(e, t.length - 1), e;
|
|
2558
2602
|
}
|
|
2559
|
-
function
|
|
2603
|
+
function $c(t, e) {
|
|
2560
2604
|
return t.map((n) => n * e);
|
|
2561
2605
|
}
|
|
2562
|
-
function
|
|
2563
|
-
return t.map(() => e ||
|
|
2606
|
+
function Kc(t, e) {
|
|
2607
|
+
return t.map(() => e || Jr).splice(0, t.length - 1);
|
|
2564
2608
|
}
|
|
2565
2609
|
function Oe({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
|
|
2566
|
-
const s =
|
|
2610
|
+
const s = Rc(i) ? i.map(ns) : ns(i), o = {
|
|
2567
2611
|
done: !1,
|
|
2568
2612
|
value: e[0]
|
|
2569
|
-
}, r =
|
|
2613
|
+
}, r = $c(
|
|
2570
2614
|
// Only use the provided offsets if they're the correct length
|
|
2571
2615
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2572
|
-
n && n.length === e.length ? n :
|
|
2616
|
+
n && n.length === e.length ? n : Wc(e),
|
|
2573
2617
|
t
|
|
2574
|
-
), a =
|
|
2575
|
-
ease: Array.isArray(s) ? s :
|
|
2618
|
+
), a = Nc(r, e, {
|
|
2619
|
+
ease: Array.isArray(s) ? s : Kc(e, s)
|
|
2576
2620
|
});
|
|
2577
2621
|
return {
|
|
2578
2622
|
calculatedDuration: t,
|
|
2579
2623
|
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
2580
2624
|
};
|
|
2581
2625
|
}
|
|
2582
|
-
const
|
|
2583
|
-
function
|
|
2626
|
+
const rs = 2e4;
|
|
2627
|
+
function Gc(t) {
|
|
2584
2628
|
let e = 0;
|
|
2585
2629
|
const n = 50;
|
|
2586
2630
|
let i = t.next(e);
|
|
2587
|
-
for (; !i.done && e <
|
|
2631
|
+
for (; !i.done && e < rs; )
|
|
2588
2632
|
e += n, i = t.next(e);
|
|
2589
|
-
return e >=
|
|
2633
|
+
return e >= rs ? 1 / 0 : e;
|
|
2590
2634
|
}
|
|
2591
|
-
const
|
|
2635
|
+
const Hc = (t) => {
|
|
2592
2636
|
const e = ({ timestamp: n }) => t(n);
|
|
2593
2637
|
return {
|
|
2594
2638
|
start: () => M.update(e, !0),
|
|
@@ -2597,17 +2641,17 @@ const $c = (t) => {
|
|
|
2597
2641
|
* If we're processing this frame we can use the
|
|
2598
2642
|
* framelocked timestamp to keep things in sync.
|
|
2599
2643
|
*/
|
|
2600
|
-
now: () => K.isProcessing ? K.timestamp :
|
|
2644
|
+
now: () => K.isProcessing ? K.timestamp : Pt.now()
|
|
2601
2645
|
};
|
|
2602
|
-
},
|
|
2603
|
-
decay:
|
|
2604
|
-
inertia:
|
|
2646
|
+
}, zc = {
|
|
2647
|
+
decay: ts,
|
|
2648
|
+
inertia: ts,
|
|
2605
2649
|
tween: Oe,
|
|
2606
2650
|
keyframes: Oe,
|
|
2607
|
-
spring:
|
|
2608
|
-
},
|
|
2609
|
-
class
|
|
2610
|
-
constructor({ KeyframeResolver: e =
|
|
2651
|
+
spring: qr
|
|
2652
|
+
}, Yc = (t) => t / 100;
|
|
2653
|
+
class ai extends zr {
|
|
2654
|
+
constructor({ KeyframeResolver: e = ei, ...n }) {
|
|
2611
2655
|
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 = () => {
|
|
2612
2656
|
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
|
|
2613
2657
|
return;
|
|
@@ -2619,15 +2663,15 @@ class oi extends Gr {
|
|
|
2619
2663
|
i && s && s.owner ? this.resolver = s.owner.resolveKeyframes(o, r, i, s) : this.resolver = new e(o, r, i, s), this.resolver.scheduleResolve();
|
|
2620
2664
|
}
|
|
2621
2665
|
initPlayback(e) {
|
|
2622
|
-
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a =
|
|
2666
|
+
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a = zc[n] || Oe;
|
|
2623
2667
|
let l, c;
|
|
2624
|
-
a !== Oe && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && pt(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = ft(
|
|
2668
|
+
a !== Oe && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && pt(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = ft(Yc, so(e[0], e[1])), e = [0, 100]);
|
|
2625
2669
|
const u = a({ ...this.options, keyframes: e });
|
|
2626
2670
|
o === "mirror" && (c = a({
|
|
2627
2671
|
...this.options,
|
|
2628
2672
|
keyframes: [...e].reverse(),
|
|
2629
2673
|
velocity: -r
|
|
2630
|
-
})), u.calculatedDuration === null && (u.calculatedDuration =
|
|
2674
|
+
})), u.calculatedDuration === null && (u.calculatedDuration = Gc(u));
|
|
2631
2675
|
const { calculatedDuration: f } = u, d = f + s, p = d * (i + 1) - s;
|
|
2632
2676
|
return {
|
|
2633
2677
|
generator: u,
|
|
@@ -2659,7 +2703,7 @@ class oi extends Gr {
|
|
|
2659
2703
|
if (p) {
|
|
2660
2704
|
const R = Math.min(this.currentTime, u) / f;
|
|
2661
2705
|
let _ = Math.floor(R), U = R % 1;
|
|
2662
|
-
!U && R >= 1 && (U = 1), U === 1 && _--, _ = Math.min(_, p + 1), !!(_ % 2) && (m === "reverse" ? (U = 1 - U, v && (U -= v / f)) : m === "mirror" && (w = r)), T =
|
|
2706
|
+
!U && R >= 1 && (U = 1), U === 1 && _--, _ = Math.min(_, p + 1), !!(_ % 2) && (m === "reverse" ? (U = 1 - U, v && (U -= v / f)) : m === "mirror" && (w = r)), T = Tt(0, 1, U) * f;
|
|
2663
2707
|
}
|
|
2664
2708
|
const C = y ? { done: !1, value: l[0] } : w.next(T);
|
|
2665
2709
|
a && (C.value = a(C.value));
|
|
@@ -2692,7 +2736,7 @@ class oi extends Gr {
|
|
|
2692
2736
|
}
|
|
2693
2737
|
if (this.isStopped)
|
|
2694
2738
|
return;
|
|
2695
|
-
const { driver: e =
|
|
2739
|
+
const { driver: e = Hc, onPlay: n } = this.options;
|
|
2696
2740
|
this.driver || (this.driver = e((s) => this.tick(s))), n && n();
|
|
2697
2741
|
const i = this.driver.now();
|
|
2698
2742
|
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();
|
|
@@ -2726,11 +2770,11 @@ class oi extends Gr {
|
|
|
2726
2770
|
return this.startTime = 0, this.tick(e, !0);
|
|
2727
2771
|
}
|
|
2728
2772
|
}
|
|
2729
|
-
const
|
|
2730
|
-
function
|
|
2731
|
-
return !!(!t || typeof t == "string" && t in
|
|
2773
|
+
const ro = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
2774
|
+
function oo(t) {
|
|
2775
|
+
return !!(!t || typeof t == "string" && t in li || ro(t) || Array.isArray(t) && t.every(oo));
|
|
2732
2776
|
}
|
|
2733
|
-
const Qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`,
|
|
2777
|
+
const Qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, li = {
|
|
2734
2778
|
linear: "linear",
|
|
2735
2779
|
ease: "ease",
|
|
2736
2780
|
easeIn: "ease-in",
|
|
@@ -2741,17 +2785,17 @@ const Qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, ai = {
|
|
|
2741
2785
|
backIn: Qt([0.31, 0.01, 0.66, -0.59]),
|
|
2742
2786
|
backOut: Qt([0.33, 1.53, 0.69, 0.99])
|
|
2743
2787
|
};
|
|
2744
|
-
function
|
|
2745
|
-
return
|
|
2788
|
+
function Xc(t) {
|
|
2789
|
+
return ao(t) || li.easeOut;
|
|
2746
2790
|
}
|
|
2747
|
-
function
|
|
2791
|
+
function ao(t) {
|
|
2748
2792
|
if (t)
|
|
2749
|
-
return
|
|
2793
|
+
return ro(t) ? Qt(t) : Array.isArray(t) ? t.map(Xc) : li[t];
|
|
2750
2794
|
}
|
|
2751
|
-
function
|
|
2795
|
+
function qc(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a, times: l } = {}) {
|
|
2752
2796
|
const c = { [e]: n };
|
|
2753
2797
|
l && (c.offset = l);
|
|
2754
|
-
const u =
|
|
2798
|
+
const u = ao(a);
|
|
2755
2799
|
return Array.isArray(u) && (c.easing = u), t.animate(c, {
|
|
2756
2800
|
delay: i,
|
|
2757
2801
|
duration: s,
|
|
@@ -2761,12 +2805,12 @@ function zc(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatTyp
|
|
|
2761
2805
|
direction: r === "reverse" ? "alternate" : "normal"
|
|
2762
2806
|
});
|
|
2763
2807
|
}
|
|
2764
|
-
const
|
|
2765
|
-
function
|
|
2766
|
-
return t.type === "spring" || !
|
|
2808
|
+
const Zc = Hr(() => Object.hasOwnProperty.call(Element.prototype, "animate")), je = 10, Jc = 2e4;
|
|
2809
|
+
function Qc(t) {
|
|
2810
|
+
return t.type === "spring" || !oo(t.ease);
|
|
2767
2811
|
}
|
|
2768
|
-
function
|
|
2769
|
-
const n = new
|
|
2812
|
+
function tu(t, e) {
|
|
2813
|
+
const n = new ai({
|
|
2770
2814
|
...e,
|
|
2771
2815
|
keyframes: t,
|
|
2772
2816
|
repeat: 0,
|
|
@@ -2776,7 +2820,7 @@ function Zc(t, e) {
|
|
|
2776
2820
|
let i = { done: !1, value: t[0] };
|
|
2777
2821
|
const s = [];
|
|
2778
2822
|
let o = 0;
|
|
2779
|
-
for (; !i.done && o <
|
|
2823
|
+
for (; !i.done && o < Jc; )
|
|
2780
2824
|
i = n.sample(o), s.push(i.value), o += je;
|
|
2781
2825
|
return {
|
|
2782
2826
|
times: void 0,
|
|
@@ -2785,23 +2829,23 @@ function Zc(t, e) {
|
|
|
2785
2829
|
ease: "linear"
|
|
2786
2830
|
};
|
|
2787
2831
|
}
|
|
2788
|
-
class
|
|
2832
|
+
class os extends zr {
|
|
2789
2833
|
constructor(e) {
|
|
2790
2834
|
super(e);
|
|
2791
2835
|
const { name: n, motionValue: i, keyframes: s } = this.options;
|
|
2792
|
-
this.resolver = new
|
|
2836
|
+
this.resolver = new Gr(s, (o, r) => this.onKeyframesResolved(o, r), n, i), this.resolver.scheduleResolve();
|
|
2793
2837
|
}
|
|
2794
2838
|
initPlayback(e, n) {
|
|
2795
2839
|
var i;
|
|
2796
2840
|
let { duration: s = 300, times: o, ease: r, type: a, motionValue: l, name: c } = this.options;
|
|
2797
2841
|
if (!(!((i = l.owner) === null || i === void 0) && i.current))
|
|
2798
2842
|
return !1;
|
|
2799
|
-
if (
|
|
2800
|
-
const { onComplete: f, onUpdate: d, motionValue: p, ...m } = this.options, v =
|
|
2843
|
+
if (Qc(this.options)) {
|
|
2844
|
+
const { onComplete: f, onUpdate: d, motionValue: p, ...m } = this.options, v = tu(e, m);
|
|
2801
2845
|
e = v.keyframes, e.length === 1 && (e[1] = e[0]), s = v.duration, o = v.times, r = v.ease, a = "keyframes";
|
|
2802
2846
|
}
|
|
2803
|
-
const u =
|
|
2804
|
-
return u.startTime =
|
|
2847
|
+
const u = qc(l.owner.current, c, e, { ...this.options, duration: s, times: o, ease: r });
|
|
2848
|
+
return u.startTime = Pt.now(), this.pendingTimeline ? (u.timeline = this.pendingTimeline, this.pendingTimeline = void 0) : u.onfinish = () => {
|
|
2805
2849
|
const { onComplete: f } = this.options;
|
|
2806
2850
|
l.set(He(e, this.options, n)), f && f(), this.cancel(), this.resolveFinishedPromise();
|
|
2807
2851
|
}, {
|
|
@@ -2898,7 +2942,7 @@ class ss extends Gr {
|
|
|
2898
2942
|
if (n.playState === "idle" || n.playState === "finished")
|
|
2899
2943
|
return;
|
|
2900
2944
|
if (this.time) {
|
|
2901
|
-
const { motionValue: c, onUpdate: u, onComplete: f, ...d } = this.options, p = new
|
|
2945
|
+
const { motionValue: c, onUpdate: u, onComplete: f, ...d } = this.options, p = new ai({
|
|
2902
2946
|
...d,
|
|
2903
2947
|
keyframes: i,
|
|
2904
2948
|
duration: s,
|
|
@@ -2922,14 +2966,14 @@ class ss extends Gr {
|
|
|
2922
2966
|
}
|
|
2923
2967
|
static supports(e) {
|
|
2924
2968
|
const { motionValue: n, name: i, repeatDelay: s, repeatType: o, damping: r, type: a } = e;
|
|
2925
|
-
return
|
|
2969
|
+
return Zc() && i && wr.has(i) && n && n.owner && n.owner.current instanceof HTMLElement && /**
|
|
2926
2970
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
2927
2971
|
* no way to read the value from WAAPI every frame.
|
|
2928
2972
|
*/
|
|
2929
2973
|
!n.owner.getProps().onUpdate && !s && o !== "mirror" && r !== 0 && a !== "inertia";
|
|
2930
2974
|
}
|
|
2931
2975
|
}
|
|
2932
|
-
function
|
|
2976
|
+
function eu(t, e) {
|
|
2933
2977
|
let n;
|
|
2934
2978
|
const i = () => {
|
|
2935
2979
|
const { currentTime: s } = e, r = (s === null ? 0 : s.value) / 100;
|
|
@@ -2937,8 +2981,8 @@ function Jc(t, e) {
|
|
|
2937
2981
|
};
|
|
2938
2982
|
return M.update(i, !0), () => mt(i);
|
|
2939
2983
|
}
|
|
2940
|
-
const
|
|
2941
|
-
class
|
|
2984
|
+
const nu = Hr(() => window.ScrollTimeline !== void 0);
|
|
2985
|
+
class iu {
|
|
2942
2986
|
constructor(e) {
|
|
2943
2987
|
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
2944
2988
|
}
|
|
@@ -2957,10 +3001,10 @@ class tu {
|
|
|
2957
3001
|
}
|
|
2958
3002
|
attachTimeline(e) {
|
|
2959
3003
|
const n = this.animations.map((i) => {
|
|
2960
|
-
if (
|
|
3004
|
+
if (nu() && i.attachTimeline)
|
|
2961
3005
|
i.attachTimeline(e);
|
|
2962
3006
|
else
|
|
2963
|
-
return i.pause(),
|
|
3007
|
+
return i.pause(), eu((s) => {
|
|
2964
3008
|
i.time = i.duration * s;
|
|
2965
3009
|
}, e);
|
|
2966
3010
|
});
|
|
@@ -3004,8 +3048,8 @@ class tu {
|
|
|
3004
3048
|
this.runAll("complete");
|
|
3005
3049
|
}
|
|
3006
3050
|
}
|
|
3007
|
-
const
|
|
3008
|
-
const l =
|
|
3051
|
+
const ci = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
3052
|
+
const l = ti(i, t) || {}, c = l.delay || i.delay || 0;
|
|
3009
3053
|
let { elapsed: u = 0 } = i;
|
|
3010
3054
|
u = u - ht(c);
|
|
3011
3055
|
let f = {
|
|
@@ -3025,9 +3069,9 @@ const li = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
|
3025
3069
|
motionValue: e,
|
|
3026
3070
|
element: o ? void 0 : s
|
|
3027
3071
|
};
|
|
3028
|
-
|
|
3072
|
+
_l(l) || (f = {
|
|
3029
3073
|
...f,
|
|
3030
|
-
...
|
|
3074
|
+
...jl(t, f)
|
|
3031
3075
|
}), f.duration && (f.duration = ht(f.duration)), f.repeatDelay && (f.repeatDelay = ht(f.repeatDelay)), f.from !== void 0 && (f.keyframes[0] = f.from);
|
|
3032
3076
|
let d = !1;
|
|
3033
3077
|
if ((f.type === !1 || f.duration === 0 && !f.repeatDelay) && (f.duration = 0, f.delay === 0 && (d = !0)), d && !o && e.get() !== void 0) {
|
|
@@ -3035,11 +3079,11 @@ const li = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
|
3035
3079
|
if (p !== void 0)
|
|
3036
3080
|
return M.update(() => {
|
|
3037
3081
|
f.onUpdate(p), f.onComplete();
|
|
3038
|
-
}), new
|
|
3082
|
+
}), new iu([]);
|
|
3039
3083
|
}
|
|
3040
|
-
return !o &&
|
|
3084
|
+
return !o && os.supports(f) ? new os(f) : new ai(f);
|
|
3041
3085
|
};
|
|
3042
|
-
class
|
|
3086
|
+
class ui {
|
|
3043
3087
|
constructor() {
|
|
3044
3088
|
this.subscriptions = [];
|
|
3045
3089
|
}
|
|
@@ -3064,12 +3108,12 @@ class ci {
|
|
|
3064
3108
|
this.subscriptions.length = 0;
|
|
3065
3109
|
}
|
|
3066
3110
|
}
|
|
3067
|
-
const
|
|
3068
|
-
function
|
|
3069
|
-
t ||
|
|
3111
|
+
const as = /* @__PURE__ */ new Set();
|
|
3112
|
+
function fi(t, e, n) {
|
|
3113
|
+
t || as.has(e) || (console.warn(e), n && console.warn(n), as.add(e));
|
|
3070
3114
|
}
|
|
3071
|
-
const
|
|
3072
|
-
class
|
|
3115
|
+
const ls = 30, su = (t) => !isNaN(parseFloat(t));
|
|
3116
|
+
class lo {
|
|
3073
3117
|
/**
|
|
3074
3118
|
* @param init - The initiating value
|
|
3075
3119
|
* @param config - Optional configuration options
|
|
@@ -3079,13 +3123,13 @@ class oo {
|
|
|
3079
3123
|
* @internal
|
|
3080
3124
|
*/
|
|
3081
3125
|
constructor(e, n = {}) {
|
|
3082
|
-
this.version = "11.3.
|
|
3083
|
-
const o =
|
|
3126
|
+
this.version = "11.3.21", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i, s = !0) => {
|
|
3127
|
+
const o = Pt.now();
|
|
3084
3128
|
this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), s && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
3085
3129
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
3086
3130
|
}
|
|
3087
3131
|
setCurrent(e) {
|
|
3088
|
-
this.current = e, this.updatedAt =
|
|
3132
|
+
this.current = e, this.updatedAt = Pt.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = su(this.current));
|
|
3089
3133
|
}
|
|
3090
3134
|
setPrevFrameValue(e = this.current) {
|
|
3091
3135
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -3131,10 +3175,10 @@ class oo {
|
|
|
3131
3175
|
* @deprecated
|
|
3132
3176
|
*/
|
|
3133
3177
|
onChange(e) {
|
|
3134
|
-
return process.env.NODE_ENV !== "production" &&
|
|
3178
|
+
return process.env.NODE_ENV !== "production" && fi(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
3135
3179
|
}
|
|
3136
3180
|
on(e, n) {
|
|
3137
|
-
this.events[e] || (this.events[e] = new
|
|
3181
|
+
this.events[e] || (this.events[e] = new ui());
|
|
3138
3182
|
const i = this.events[e].add(n);
|
|
3139
3183
|
return e === "change" ? () => {
|
|
3140
3184
|
i(), M.read(() => {
|
|
@@ -3206,11 +3250,11 @@ class oo {
|
|
|
3206
3250
|
* @public
|
|
3207
3251
|
*/
|
|
3208
3252
|
getVelocity() {
|
|
3209
|
-
const e =
|
|
3210
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
3253
|
+
const e = Pt.now();
|
|
3254
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > ls)
|
|
3211
3255
|
return 0;
|
|
3212
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
3213
|
-
return
|
|
3256
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ls);
|
|
3257
|
+
return Yr(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
3214
3258
|
}
|
|
3215
3259
|
/**
|
|
3216
3260
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -3264,29 +3308,29 @@ class oo {
|
|
|
3264
3308
|
}
|
|
3265
3309
|
}
|
|
3266
3310
|
function ue(t, e) {
|
|
3267
|
-
return new
|
|
3311
|
+
return new lo(t, e);
|
|
3268
3312
|
}
|
|
3269
|
-
function
|
|
3313
|
+
function ru(t, e, n) {
|
|
3270
3314
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, ue(n));
|
|
3271
3315
|
}
|
|
3272
|
-
function
|
|
3316
|
+
function ou(t, e) {
|
|
3273
3317
|
const n = Ge(t, e);
|
|
3274
3318
|
let { transitionEnd: i = {}, transition: s = {}, ...o } = n || {};
|
|
3275
3319
|
o = { ...o, ...i };
|
|
3276
3320
|
for (const r in o) {
|
|
3277
|
-
const a =
|
|
3278
|
-
|
|
3321
|
+
const a = hl(o[r]);
|
|
3322
|
+
ru(t, r, a);
|
|
3279
3323
|
}
|
|
3280
3324
|
}
|
|
3281
|
-
function
|
|
3282
|
-
return t.getProps()[
|
|
3325
|
+
function co(t) {
|
|
3326
|
+
return t.getProps()[ar];
|
|
3283
3327
|
}
|
|
3284
|
-
class
|
|
3328
|
+
class au extends lo {
|
|
3285
3329
|
constructor() {
|
|
3286
3330
|
super(...arguments), this.output = [], this.counts = /* @__PURE__ */ new Map();
|
|
3287
3331
|
}
|
|
3288
3332
|
add(e) {
|
|
3289
|
-
const n =
|
|
3333
|
+
const n = Sr(e);
|
|
3290
3334
|
if (!n)
|
|
3291
3335
|
return;
|
|
3292
3336
|
const i = this.counts.get(n) || 0;
|
|
@@ -3304,7 +3348,7 @@ class su extends oo {
|
|
|
3304
3348
|
this.set(this.output.length ? this.output.join(", ") : "auto");
|
|
3305
3349
|
}
|
|
3306
3350
|
}
|
|
3307
|
-
function
|
|
3351
|
+
function lu(t) {
|
|
3308
3352
|
return !!(Y(t) && t.add);
|
|
3309
3353
|
}
|
|
3310
3354
|
function Rn(t, e) {
|
|
@@ -3312,42 +3356,42 @@ function Rn(t, e) {
|
|
|
3312
3356
|
if (!t.applyWillChange)
|
|
3313
3357
|
return;
|
|
3314
3358
|
let i = t.getValue("willChange");
|
|
3315
|
-
if (!i && !(!((n = t.props.style) === null || n === void 0) && n.willChange) && (i = new
|
|
3359
|
+
if (!i && !(!((n = t.props.style) === null || n === void 0) && n.willChange) && (i = new au("auto"), t.addValue("willChange", i)), lu(i))
|
|
3316
3360
|
return i.add(e);
|
|
3317
3361
|
}
|
|
3318
|
-
function
|
|
3362
|
+
function cu({ protectedKeys: t, needsAnimating: e }, n) {
|
|
3319
3363
|
const i = t.hasOwnProperty(n) && e[n] !== !0;
|
|
3320
3364
|
return e[n] = !1, i;
|
|
3321
3365
|
}
|
|
3322
|
-
function
|
|
3366
|
+
function uo(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
3323
3367
|
var o;
|
|
3324
3368
|
let { transition: r = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
|
|
3325
3369
|
i && (r = i);
|
|
3326
3370
|
const c = [], u = s && t.animationState && t.animationState.getState()[s];
|
|
3327
3371
|
for (const f in l) {
|
|
3328
3372
|
const d = t.getValue(f, (o = t.latestValues[f]) !== null && o !== void 0 ? o : null), p = l[f];
|
|
3329
|
-
if (p === void 0 || u &&
|
|
3373
|
+
if (p === void 0 || u && cu(u, f))
|
|
3330
3374
|
continue;
|
|
3331
3375
|
const m = {
|
|
3332
3376
|
delay: n,
|
|
3333
3377
|
elapsed: 0,
|
|
3334
|
-
...
|
|
3378
|
+
...ti(r || {}, f)
|
|
3335
3379
|
};
|
|
3336
3380
|
let v = !1;
|
|
3337
3381
|
if (window.HandoffAppearAnimations) {
|
|
3338
|
-
const P =
|
|
3382
|
+
const P = co(t);
|
|
3339
3383
|
if (P) {
|
|
3340
3384
|
const y = window.HandoffAppearAnimations(P, f, d, M);
|
|
3341
3385
|
y !== null && (m.elapsed = y, v = !0);
|
|
3342
3386
|
}
|
|
3343
3387
|
}
|
|
3344
|
-
d.start(
|
|
3388
|
+
d.start(ci(f, d, p, t.shouldReduceMotion && xt.has(f) ? { type: !1 } : m, t, v, Rn(t, f)));
|
|
3345
3389
|
const x = d.animation;
|
|
3346
3390
|
x && c.push(x);
|
|
3347
3391
|
}
|
|
3348
3392
|
return a && Promise.all(c).then(() => {
|
|
3349
3393
|
M.update(() => {
|
|
3350
|
-
a &&
|
|
3394
|
+
a && ou(t, a);
|
|
3351
3395
|
});
|
|
3352
3396
|
}), c;
|
|
3353
3397
|
}
|
|
@@ -3356,9 +3400,9 @@ function En(t, e, n = {}) {
|
|
|
3356
3400
|
const s = Ge(t, e, n.type === "exit" ? (i = t.presenceContext) === null || i === void 0 ? void 0 : i.custom : void 0);
|
|
3357
3401
|
let { transition: o = t.getDefaultTransition() || {} } = s || {};
|
|
3358
3402
|
n.transitionOverride && (o = n.transitionOverride);
|
|
3359
|
-
const r = s ? () => Promise.all(
|
|
3403
|
+
const r = s ? () => Promise.all(uo(t, s, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (c = 0) => {
|
|
3360
3404
|
const { delayChildren: u = 0, staggerChildren: f, staggerDirection: d } = o;
|
|
3361
|
-
return
|
|
3405
|
+
return uu(t, e, u + c, f, d, n);
|
|
3362
3406
|
} : () => Promise.resolve(), { when: l } = o;
|
|
3363
3407
|
if (l) {
|
|
3364
3408
|
const [c, u] = l === "beforeChildren" ? [r, a] : [a, r];
|
|
@@ -3366,19 +3410,19 @@ function En(t, e, n = {}) {
|
|
|
3366
3410
|
} else
|
|
3367
3411
|
return Promise.all([r(), a(n.delay)]);
|
|
3368
3412
|
}
|
|
3369
|
-
function
|
|
3413
|
+
function uu(t, e, n = 0, i = 0, s = 1, o) {
|
|
3370
3414
|
const r = [], a = (t.variantChildren.size - 1) * i, l = s === 1 ? (c = 0) => c * i : (c = 0) => a - c * i;
|
|
3371
|
-
return Array.from(t.variantChildren).sort(
|
|
3415
|
+
return Array.from(t.variantChildren).sort(fu).forEach((c, u) => {
|
|
3372
3416
|
c.notify("AnimationStart", e), r.push(En(c, e, {
|
|
3373
3417
|
...o,
|
|
3374
3418
|
delay: n + l(u)
|
|
3375
3419
|
}).then(() => c.notify("AnimationComplete", e)));
|
|
3376
3420
|
}), Promise.all(r);
|
|
3377
3421
|
}
|
|
3378
|
-
function
|
|
3422
|
+
function fu(t, e) {
|
|
3379
3423
|
return t.sortNodePosition(e);
|
|
3380
3424
|
}
|
|
3381
|
-
function
|
|
3425
|
+
function hu(t, e, n = {}) {
|
|
3382
3426
|
t.notify("AnimationStart", e);
|
|
3383
3427
|
let i;
|
|
3384
3428
|
if (Array.isArray(e)) {
|
|
@@ -3388,18 +3432,18 @@ function cu(t, e, n = {}) {
|
|
|
3388
3432
|
i = En(t, e, n);
|
|
3389
3433
|
else {
|
|
3390
3434
|
const s = typeof e == "function" ? Ge(t, e, n.custom) : e;
|
|
3391
|
-
i = Promise.all(
|
|
3435
|
+
i = Promise.all(uo(t, s, n));
|
|
3392
3436
|
}
|
|
3393
3437
|
return i.then(() => {
|
|
3394
3438
|
t.notify("AnimationComplete", e);
|
|
3395
3439
|
});
|
|
3396
3440
|
}
|
|
3397
|
-
const
|
|
3398
|
-
function
|
|
3399
|
-
return (e) => Promise.all(e.map(({ animation: n, options: i }) =>
|
|
3441
|
+
const du = [...Nn].reverse(), pu = Nn.length;
|
|
3442
|
+
function mu(t) {
|
|
3443
|
+
return (e) => Promise.all(e.map(({ animation: n, options: i }) => hu(t, n, i)));
|
|
3400
3444
|
}
|
|
3401
|
-
function
|
|
3402
|
-
let e =
|
|
3445
|
+
function gu(t) {
|
|
3446
|
+
let e = mu(t), n = cs(), i = !0;
|
|
3403
3447
|
const s = (l) => (c, u) => {
|
|
3404
3448
|
var f;
|
|
3405
3449
|
const d = Ge(t, u, l === "exit" ? (f = t.presenceContext) === null || f === void 0 ? void 0 : f.custom : void 0);
|
|
@@ -3415,8 +3459,8 @@ function du(t) {
|
|
|
3415
3459
|
function r(l) {
|
|
3416
3460
|
const c = t.getProps(), u = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
3417
3461
|
let p = {}, m = 1 / 0;
|
|
3418
|
-
for (let x = 0; x <
|
|
3419
|
-
const P =
|
|
3462
|
+
for (let x = 0; x < pu; x++) {
|
|
3463
|
+
const P = du[x], y = n[P], T = c[P] !== void 0 ? c[P] : u[P], w = oe(T), C = P === l ? y.isActive : null;
|
|
3420
3464
|
C === !1 && (m = x);
|
|
3421
3465
|
let k = T === u[P] && T !== c[P] && w;
|
|
3422
3466
|
if (k && i && t.manuallyAnimateOnMount && (k = !1), y.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
@@ -3424,7 +3468,7 @@ function du(t) {
|
|
|
3424
3468
|
!T && !y.prevProp || // Or if the prop doesn't define an animation
|
|
3425
3469
|
ae(T) || typeof T == "boolean")
|
|
3426
3470
|
continue;
|
|
3427
|
-
let R =
|
|
3471
|
+
let R = yu(y.prevProp, T) || // If we're making this variant active, we want to always make it active
|
|
3428
3472
|
P === l && y.isActive && !k && w || // If we removed a higher-priority variant (i is in reverse order)
|
|
3429
3473
|
x > m && w, _ = !1;
|
|
3430
3474
|
const U = Array.isArray(T) ? T : [T];
|
|
@@ -3443,7 +3487,7 @@ function du(t) {
|
|
|
3443
3487
|
if (p.hasOwnProperty(B))
|
|
3444
3488
|
continue;
|
|
3445
3489
|
let Ft = !1;
|
|
3446
|
-
Pn(Q) && Pn(Lt) ? Ft = !
|
|
3490
|
+
Pn(Q) && Pn(Lt) ? Ft = !Mr(Q, Lt) : Ft = Q !== Lt, Ft ? Q != null ? rt(B) : d.add(B) : Q !== void 0 && d.has(B) ? rt(B) : y.protectedKeys[B] = !0;
|
|
3447
3491
|
}
|
|
3448
3492
|
y.prevProp = T, y.prevResolvedValues = F, y.isActive && (p = { ...p, ...F }), i && t.blockInitialAnimation && (R = !1), R && (!k || _) && f.push(...U.map((B) => ({
|
|
3449
3493
|
animation: B,
|
|
@@ -3479,14 +3523,14 @@ function du(t) {
|
|
|
3479
3523
|
setAnimateFunction: o,
|
|
3480
3524
|
getState: () => n,
|
|
3481
3525
|
reset: () => {
|
|
3482
|
-
n =
|
|
3526
|
+
n = cs(), i = !0;
|
|
3483
3527
|
}
|
|
3484
3528
|
};
|
|
3485
3529
|
}
|
|
3486
|
-
function
|
|
3487
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
3530
|
+
function yu(t, e) {
|
|
3531
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Mr(e, t) : !1;
|
|
3488
3532
|
}
|
|
3489
|
-
function
|
|
3533
|
+
function At(t = !1) {
|
|
3490
3534
|
return {
|
|
3491
3535
|
isActive: t,
|
|
3492
3536
|
protectedKeys: {},
|
|
@@ -3494,25 +3538,25 @@ function Ct(t = !1) {
|
|
|
3494
3538
|
prevResolvedValues: {}
|
|
3495
3539
|
};
|
|
3496
3540
|
}
|
|
3497
|
-
function
|
|
3541
|
+
function cs() {
|
|
3498
3542
|
return {
|
|
3499
|
-
animate:
|
|
3500
|
-
whileInView:
|
|
3501
|
-
whileHover:
|
|
3502
|
-
whileTap:
|
|
3503
|
-
whileDrag:
|
|
3504
|
-
whileFocus:
|
|
3505
|
-
exit:
|
|
3543
|
+
animate: At(!0),
|
|
3544
|
+
whileInView: At(),
|
|
3545
|
+
whileHover: At(),
|
|
3546
|
+
whileTap: At(),
|
|
3547
|
+
whileDrag: At(),
|
|
3548
|
+
whileFocus: At(),
|
|
3549
|
+
exit: At()
|
|
3506
3550
|
};
|
|
3507
3551
|
}
|
|
3508
|
-
class
|
|
3552
|
+
class vu extends wt {
|
|
3509
3553
|
/**
|
|
3510
3554
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3511
3555
|
* to the underlying animation library. We only want to load that if we load this,
|
|
3512
3556
|
* so people can optionally code split it out using the `m` component.
|
|
3513
3557
|
*/
|
|
3514
3558
|
constructor(e) {
|
|
3515
|
-
super(e), e.animationState || (e.animationState =
|
|
3559
|
+
super(e), e.animationState || (e.animationState = gu(e));
|
|
3516
3560
|
}
|
|
3517
3561
|
updateAnimationControlsSubscription() {
|
|
3518
3562
|
const { animate: e } = this.node.getProps();
|
|
@@ -3533,10 +3577,10 @@ class mu extends St {
|
|
|
3533
3577
|
this.node.animationState.reset(), (e = this.unmountControls) === null || e === void 0 || e.call(this);
|
|
3534
3578
|
}
|
|
3535
3579
|
}
|
|
3536
|
-
let
|
|
3537
|
-
class
|
|
3580
|
+
let Pu = 0;
|
|
3581
|
+
class Tu extends wt {
|
|
3538
3582
|
constructor() {
|
|
3539
|
-
super(...arguments), this.id =
|
|
3583
|
+
super(...arguments), this.id = Pu++;
|
|
3540
3584
|
}
|
|
3541
3585
|
update() {
|
|
3542
3586
|
if (!this.node.presenceContext)
|
|
@@ -3554,24 +3598,24 @@ class yu extends St {
|
|
|
3554
3598
|
unmount() {
|
|
3555
3599
|
}
|
|
3556
3600
|
}
|
|
3557
|
-
const
|
|
3601
|
+
const bu = {
|
|
3558
3602
|
animation: {
|
|
3559
|
-
Feature:
|
|
3603
|
+
Feature: vu
|
|
3560
3604
|
},
|
|
3561
3605
|
exit: {
|
|
3562
|
-
Feature:
|
|
3606
|
+
Feature: Tu
|
|
3563
3607
|
}
|
|
3564
|
-
},
|
|
3565
|
-
function
|
|
3566
|
-
const n =
|
|
3608
|
+
}, us = (t, e) => Math.abs(t - e);
|
|
3609
|
+
function xu(t, e) {
|
|
3610
|
+
const n = us(t.x, e.x), i = us(t.y, e.y);
|
|
3567
3611
|
return Math.sqrt(n ** 2 + i ** 2);
|
|
3568
3612
|
}
|
|
3569
|
-
class
|
|
3613
|
+
class fo {
|
|
3570
3614
|
constructor(e, n, { transformPagePoint: i, contextWindow: s, dragSnapToOrigin: o = !1 } = {}) {
|
|
3571
3615
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3572
3616
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3573
3617
|
return;
|
|
3574
|
-
const f = fn(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, p =
|
|
3618
|
+
const f = fn(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, p = xu(f.offset, { x: 0, y: 0 }) >= 3;
|
|
3575
3619
|
if (!d && !p)
|
|
3576
3620
|
return;
|
|
3577
3621
|
const { point: m } = f, { timestamp: v } = K;
|
|
@@ -3587,7 +3631,7 @@ class co {
|
|
|
3587
3631
|
return;
|
|
3588
3632
|
const x = fn(f.type === "pointercancel" ? this.lastMoveEventInfo : un(d, this.transformPagePoint), this.history);
|
|
3589
3633
|
this.startEvent && p && p(f, x), m && m(f, x);
|
|
3590
|
-
}, !
|
|
3634
|
+
}, !Cr(e))
|
|
3591
3635
|
return;
|
|
3592
3636
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
|
|
3593
3637
|
const r = Ke(e), a = un(r, this.transformPagePoint), { point: l } = a, { timestamp: c } = K;
|
|
@@ -3605,28 +3649,28 @@ class co {
|
|
|
3605
3649
|
function un(t, e) {
|
|
3606
3650
|
return e ? { point: e(t.point) } : t;
|
|
3607
3651
|
}
|
|
3608
|
-
function
|
|
3652
|
+
function fs(t, e) {
|
|
3609
3653
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3610
3654
|
}
|
|
3611
3655
|
function fn({ point: t }, e) {
|
|
3612
3656
|
return {
|
|
3613
3657
|
point: t,
|
|
3614
|
-
delta:
|
|
3615
|
-
offset:
|
|
3616
|
-
velocity:
|
|
3658
|
+
delta: fs(t, ho(e)),
|
|
3659
|
+
offset: fs(t, wu(e)),
|
|
3660
|
+
velocity: Su(e, 0.1)
|
|
3617
3661
|
};
|
|
3618
3662
|
}
|
|
3619
|
-
function
|
|
3663
|
+
function wu(t) {
|
|
3620
3664
|
return t[0];
|
|
3621
3665
|
}
|
|
3622
|
-
function
|
|
3666
|
+
function ho(t) {
|
|
3623
3667
|
return t[t.length - 1];
|
|
3624
3668
|
}
|
|
3625
|
-
function
|
|
3669
|
+
function Su(t, e) {
|
|
3626
3670
|
if (t.length < 2)
|
|
3627
3671
|
return { x: 0, y: 0 };
|
|
3628
3672
|
let n = t.length - 1, i = null;
|
|
3629
|
-
const s =
|
|
3673
|
+
const s = ho(t);
|
|
3630
3674
|
for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp > ht(e))); )
|
|
3631
3675
|
n--;
|
|
3632
3676
|
if (!i)
|
|
@@ -3640,106 +3684,106 @@ function bu(t, e) {
|
|
|
3640
3684
|
};
|
|
3641
3685
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
3642
3686
|
}
|
|
3643
|
-
const
|
|
3687
|
+
const po = 1e-4, Au = 1 - po, Cu = 1 + po, mo = 0.01, Ru = 0 - mo, Eu = 0 + mo;
|
|
3644
3688
|
function Z(t) {
|
|
3645
3689
|
return t.max - t.min;
|
|
3646
3690
|
}
|
|
3647
|
-
function
|
|
3691
|
+
function Vu(t, e, n) {
|
|
3648
3692
|
return Math.abs(t - e) <= n;
|
|
3649
3693
|
}
|
|
3650
|
-
function
|
|
3651
|
-
t.origin = i, t.originPoint = j(e.min, e.max, t.origin), t.scale = Z(n) / Z(e), t.translate = j(n.min, n.max, t.origin) - t.originPoint, (t.scale >=
|
|
3694
|
+
function hs(t, e, n, i = 0.5) {
|
|
3695
|
+
t.origin = i, t.originPoint = j(e.min, e.max, t.origin), t.scale = Z(n) / Z(e), t.translate = j(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Au && t.scale <= Cu || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Ru && t.translate <= Eu || isNaN(t.translate)) && (t.translate = 0);
|
|
3652
3696
|
}
|
|
3653
3697
|
function ie(t, e, n, i) {
|
|
3654
|
-
|
|
3698
|
+
hs(t.x, e.x, n.x, i ? i.originX : void 0), hs(t.y, e.y, n.y, i ? i.originY : void 0);
|
|
3655
3699
|
}
|
|
3656
|
-
function
|
|
3700
|
+
function ds(t, e, n) {
|
|
3657
3701
|
t.min = n.min + e.min, t.max = t.min + Z(e);
|
|
3658
3702
|
}
|
|
3659
|
-
function
|
|
3660
|
-
|
|
3703
|
+
function Du(t, e, n) {
|
|
3704
|
+
ds(t.x, e.x, n.x), ds(t.y, e.y, n.y);
|
|
3661
3705
|
}
|
|
3662
|
-
function
|
|
3706
|
+
function ps(t, e, n) {
|
|
3663
3707
|
t.min = e.min - n.min, t.max = t.min + Z(e);
|
|
3664
3708
|
}
|
|
3665
3709
|
function se(t, e, n) {
|
|
3666
|
-
|
|
3710
|
+
ps(t.x, e.x, n.x), ps(t.y, e.y, n.y);
|
|
3667
3711
|
}
|
|
3668
|
-
function
|
|
3712
|
+
function Mu(t, { min: e, max: n }, i) {
|
|
3669
3713
|
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;
|
|
3670
3714
|
}
|
|
3671
|
-
function
|
|
3715
|
+
function ms(t, e, n) {
|
|
3672
3716
|
return {
|
|
3673
3717
|
min: e !== void 0 ? t.min + e : void 0,
|
|
3674
3718
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
3675
3719
|
};
|
|
3676
3720
|
}
|
|
3677
|
-
function
|
|
3721
|
+
function ku(t, { top: e, left: n, bottom: i, right: s }) {
|
|
3678
3722
|
return {
|
|
3679
|
-
x:
|
|
3680
|
-
y:
|
|
3723
|
+
x: ms(t.x, n, s),
|
|
3724
|
+
y: ms(t.y, e, i)
|
|
3681
3725
|
};
|
|
3682
3726
|
}
|
|
3683
|
-
function
|
|
3727
|
+
function gs(t, e) {
|
|
3684
3728
|
let n = e.min - t.min, i = e.max - t.max;
|
|
3685
3729
|
return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
|
|
3686
3730
|
}
|
|
3687
|
-
function
|
|
3731
|
+
function Lu(t, e) {
|
|
3688
3732
|
return {
|
|
3689
|
-
x:
|
|
3690
|
-
y:
|
|
3733
|
+
x: gs(t.x, e.x),
|
|
3734
|
+
y: gs(t.y, e.y)
|
|
3691
3735
|
};
|
|
3692
3736
|
}
|
|
3693
|
-
function
|
|
3737
|
+
function Fu(t, e) {
|
|
3694
3738
|
let n = 0.5;
|
|
3695
3739
|
const i = Z(t), s = Z(e);
|
|
3696
|
-
return s > i ? n = ce(e.min, e.max - i, t.min) : i > s && (n = ce(t.min, t.max - s, e.min)),
|
|
3740
|
+
return s > i ? n = ce(e.min, e.max - i, t.min) : i > s && (n = ce(t.min, t.max - s, e.min)), Tt(0, 1, n);
|
|
3697
3741
|
}
|
|
3698
|
-
function
|
|
3742
|
+
function Ou(t, e) {
|
|
3699
3743
|
const n = {};
|
|
3700
3744
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3701
3745
|
}
|
|
3702
3746
|
const Vn = 0.35;
|
|
3703
|
-
function
|
|
3747
|
+
function ju(t = Vn) {
|
|
3704
3748
|
return t === !1 ? t = 0 : t === !0 && (t = Vn), {
|
|
3705
|
-
x:
|
|
3706
|
-
y:
|
|
3749
|
+
x: ys(t, "left", "right"),
|
|
3750
|
+
y: ys(t, "top", "bottom")
|
|
3707
3751
|
};
|
|
3708
3752
|
}
|
|
3709
|
-
function
|
|
3753
|
+
function ys(t, e, n) {
|
|
3710
3754
|
return {
|
|
3711
|
-
min:
|
|
3712
|
-
max:
|
|
3755
|
+
min: vs(t, e),
|
|
3756
|
+
max: vs(t, n)
|
|
3713
3757
|
};
|
|
3714
3758
|
}
|
|
3715
|
-
function
|
|
3759
|
+
function vs(t, e) {
|
|
3716
3760
|
return typeof t == "number" ? t : t[e] || 0;
|
|
3717
3761
|
}
|
|
3718
|
-
const
|
|
3762
|
+
const Ps = () => ({
|
|
3719
3763
|
translate: 0,
|
|
3720
3764
|
scale: 1,
|
|
3721
3765
|
origin: 0,
|
|
3722
3766
|
originPoint: 0
|
|
3723
3767
|
}), Nt = () => ({
|
|
3724
|
-
x:
|
|
3725
|
-
y:
|
|
3726
|
-
}),
|
|
3727
|
-
x:
|
|
3728
|
-
y:
|
|
3768
|
+
x: Ps(),
|
|
3769
|
+
y: Ps()
|
|
3770
|
+
}), Ts = () => ({ min: 0, max: 0 }), N = () => ({
|
|
3771
|
+
x: Ts(),
|
|
3772
|
+
y: Ts()
|
|
3729
3773
|
});
|
|
3730
3774
|
function nt(t) {
|
|
3731
3775
|
return [t("x"), t("y")];
|
|
3732
3776
|
}
|
|
3733
|
-
function
|
|
3777
|
+
function go({ top: t, left: e, right: n, bottom: i }) {
|
|
3734
3778
|
return {
|
|
3735
3779
|
x: { min: e, max: n },
|
|
3736
3780
|
y: { min: t, max: i }
|
|
3737
3781
|
};
|
|
3738
3782
|
}
|
|
3739
|
-
function
|
|
3783
|
+
function _u({ x: t, y: e }) {
|
|
3740
3784
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
3741
3785
|
}
|
|
3742
|
-
function
|
|
3786
|
+
function Bu(t, e) {
|
|
3743
3787
|
if (!e)
|
|
3744
3788
|
return t;
|
|
3745
3789
|
const n = e({ x: t.left, y: t.top }), i = e({ x: t.right, y: t.bottom });
|
|
@@ -3757,29 +3801,29 @@ function Dn({ scale: t, scaleX: e, scaleY: n }) {
|
|
|
3757
3801
|
return !hn(t) || !hn(e) || !hn(n);
|
|
3758
3802
|
}
|
|
3759
3803
|
function Rt(t) {
|
|
3760
|
-
return Dn(t) ||
|
|
3804
|
+
return Dn(t) || yo(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3761
3805
|
}
|
|
3762
|
-
function
|
|
3763
|
-
return
|
|
3806
|
+
function yo(t) {
|
|
3807
|
+
return bs(t.x) || bs(t.y);
|
|
3764
3808
|
}
|
|
3765
|
-
function
|
|
3809
|
+
function bs(t) {
|
|
3766
3810
|
return t && t !== "0%";
|
|
3767
3811
|
}
|
|
3768
3812
|
function _e(t, e, n) {
|
|
3769
3813
|
const i = t - n, s = e * i;
|
|
3770
3814
|
return n + s;
|
|
3771
3815
|
}
|
|
3772
|
-
function
|
|
3816
|
+
function xs(t, e, n, i, s) {
|
|
3773
3817
|
return s !== void 0 && (t = _e(t, s, i)), _e(t, n, i) + e;
|
|
3774
3818
|
}
|
|
3775
3819
|
function Mn(t, e = 0, n = 1, i, s) {
|
|
3776
|
-
t.min =
|
|
3820
|
+
t.min = xs(t.min, e, n, i, s), t.max = xs(t.max, e, n, i, s);
|
|
3777
3821
|
}
|
|
3778
|
-
function
|
|
3822
|
+
function vo(t, { x: e, y: n }) {
|
|
3779
3823
|
Mn(t.x, e.translate, e.scale, e.originPoint), Mn(t.y, n.translate, n.scale, n.originPoint);
|
|
3780
3824
|
}
|
|
3781
|
-
const
|
|
3782
|
-
function
|
|
3825
|
+
const ws = 0.999999999999, Ss = 1.0000000000001;
|
|
3826
|
+
function Iu(t, e, n, i = !1) {
|
|
3783
3827
|
const s = n.length;
|
|
3784
3828
|
if (!s)
|
|
3785
3829
|
return;
|
|
@@ -3791,29 +3835,29 @@ function ju(t, e, n, i = !1) {
|
|
|
3791
3835
|
l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && Wt(t, {
|
|
3792
3836
|
x: -o.scroll.offset.x,
|
|
3793
3837
|
y: -o.scroll.offset.y
|
|
3794
|
-
}), r && (e.x *= r.x.scale, e.y *= r.y.scale,
|
|
3838
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, vo(t, r)), i && Rt(o.latestValues) && Wt(t, o.latestValues));
|
|
3795
3839
|
}
|
|
3796
|
-
e.x <
|
|
3840
|
+
e.x < Ss && e.x > ws && (e.x = 1), e.y < Ss && e.y > ws && (e.y = 1);
|
|
3797
3841
|
}
|
|
3798
3842
|
function Ut(t, e) {
|
|
3799
3843
|
t.min = t.min + e, t.max = t.max + e;
|
|
3800
3844
|
}
|
|
3801
|
-
function
|
|
3845
|
+
function As(t, e, n, i, s = 0.5) {
|
|
3802
3846
|
const o = j(t.min, t.max, s);
|
|
3803
3847
|
Mn(t, e, n, o, i);
|
|
3804
3848
|
}
|
|
3805
3849
|
function Wt(t, e) {
|
|
3806
|
-
|
|
3850
|
+
As(t.x, e.x, e.scaleX, e.scale, e.originX), As(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3807
3851
|
}
|
|
3808
|
-
function
|
|
3809
|
-
return
|
|
3852
|
+
function Po(t, e) {
|
|
3853
|
+
return go(Bu(t.getBoundingClientRect(), e));
|
|
3810
3854
|
}
|
|
3811
|
-
function
|
|
3812
|
-
const i =
|
|
3855
|
+
function Nu(t, e, n) {
|
|
3856
|
+
const i = Po(t, n), { scroll: s } = e;
|
|
3813
3857
|
return s && (Ut(i.x, s.offset.x), Ut(i.y, s.offset.y)), i;
|
|
3814
3858
|
}
|
|
3815
|
-
const
|
|
3816
|
-
class
|
|
3859
|
+
const To = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Uu = /* @__PURE__ */ new WeakMap();
|
|
3860
|
+
class Wu {
|
|
3817
3861
|
constructor(e) {
|
|
3818
3862
|
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = N(), this.visualElement = e;
|
|
3819
3863
|
}
|
|
@@ -3827,7 +3871,7 @@ class Iu {
|
|
|
3827
3871
|
}, o = (u, f) => {
|
|
3828
3872
|
var d;
|
|
3829
3873
|
const { drag: p, dragPropagation: m, onDragStart: v } = this.getProps();
|
|
3830
|
-
if (p && !m && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock =
|
|
3874
|
+
if (p && !m && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Er(p), !this.openGlobalLock))
|
|
3831
3875
|
return;
|
|
3832
3876
|
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((P) => {
|
|
3833
3877
|
let y = this.getAxisMotionValue(P).get() || 0;
|
|
@@ -3848,7 +3892,7 @@ class Iu {
|
|
|
3848
3892
|
return;
|
|
3849
3893
|
const { offset: x } = f;
|
|
3850
3894
|
if (p && this.currentDirection === null) {
|
|
3851
|
-
this.currentDirection =
|
|
3895
|
+
this.currentDirection = $u(x), this.currentDirection !== null && m && m(this.currentDirection);
|
|
3852
3896
|
return;
|
|
3853
3897
|
}
|
|
3854
3898
|
this.updateAxis("x", f.point, x), this.updateAxis("y", f.point, x), this.visualElement.render(), v && v(u, f);
|
|
@@ -3856,7 +3900,7 @@ class Iu {
|
|
|
3856
3900
|
var f;
|
|
3857
3901
|
return this.getAnimationState(u) === "paused" && ((f = this.getAxisMotionValue(u).animation) === null || f === void 0 ? void 0 : f.play());
|
|
3858
3902
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
3859
|
-
this.panSession = new
|
|
3903
|
+
this.panSession = new fo(e, {
|
|
3860
3904
|
onSessionStart: s,
|
|
3861
3905
|
onStart: o,
|
|
3862
3906
|
onMove: r,
|
|
@@ -3865,7 +3909,7 @@ class Iu {
|
|
|
3865
3909
|
}, {
|
|
3866
3910
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
3867
3911
|
dragSnapToOrigin: c,
|
|
3868
|
-
contextWindow:
|
|
3912
|
+
contextWindow: To(this.visualElement)
|
|
3869
3913
|
});
|
|
3870
3914
|
}
|
|
3871
3915
|
stop(e, n) {
|
|
@@ -3892,13 +3936,13 @@ class Iu {
|
|
|
3892
3936
|
return;
|
|
3893
3937
|
const o = this.getAxisMotionValue(e);
|
|
3894
3938
|
let r = this.originPoint[e] + i[e];
|
|
3895
|
-
this.constraints && this.constraints[e] && (r =
|
|
3939
|
+
this.constraints && this.constraints[e] && (r = Mu(r, this.constraints[e], this.elastic[e])), o.set(r);
|
|
3896
3940
|
}
|
|
3897
3941
|
resolveConstraints() {
|
|
3898
3942
|
var e;
|
|
3899
3943
|
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;
|
|
3900
|
-
n && Bt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints =
|
|
3901
|
-
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] =
|
|
3944
|
+
n && Bt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints = ku(s.layoutBox, n) : this.constraints = !1, this.elastic = ju(i), o !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && nt((r) => {
|
|
3945
|
+
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Ou(s.layoutBox[r], this.constraints[r]));
|
|
3902
3946
|
});
|
|
3903
3947
|
}
|
|
3904
3948
|
resolveRefConstraints() {
|
|
@@ -3910,11 +3954,11 @@ class Iu {
|
|
|
3910
3954
|
const { projection: s } = this.visualElement;
|
|
3911
3955
|
if (!s || !s.layout)
|
|
3912
3956
|
return !1;
|
|
3913
|
-
const o =
|
|
3914
|
-
let r =
|
|
3957
|
+
const o = Nu(i, s.root, this.visualElement.getTransformPagePoint());
|
|
3958
|
+
let r = Lu(s.layout.layoutBox, o);
|
|
3915
3959
|
if (n) {
|
|
3916
|
-
const a = n(
|
|
3917
|
-
this.hasMutatedConstraints = !!a, a && (r =
|
|
3960
|
+
const a = n(_u(r));
|
|
3961
|
+
this.hasMutatedConstraints = !!a, a && (r = go(a));
|
|
3918
3962
|
}
|
|
3919
3963
|
return r;
|
|
3920
3964
|
}
|
|
@@ -3941,7 +3985,7 @@ class Iu {
|
|
|
3941
3985
|
}
|
|
3942
3986
|
startAxisValueAnimation(e, n) {
|
|
3943
3987
|
const i = this.getAxisMotionValue(e);
|
|
3944
|
-
return i.start(
|
|
3988
|
+
return i.start(ci(e, i, 0, n, this.visualElement, !1, Rn(this.visualElement, e)));
|
|
3945
3989
|
}
|
|
3946
3990
|
stopAnimation() {
|
|
3947
3991
|
nt((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -3995,7 +4039,7 @@ class Iu {
|
|
|
3995
4039
|
const a = this.getAxisMotionValue(r);
|
|
3996
4040
|
if (a && this.constraints !== !1) {
|
|
3997
4041
|
const l = a.get();
|
|
3998
|
-
s[r] =
|
|
4042
|
+
s[r] = Fu({ min: l, max: l }, this.constraints[r]);
|
|
3999
4043
|
}
|
|
4000
4044
|
});
|
|
4001
4045
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
@@ -4009,7 +4053,7 @@ class Iu {
|
|
|
4009
4053
|
addListeners() {
|
|
4010
4054
|
if (!this.visualElement.current)
|
|
4011
4055
|
return;
|
|
4012
|
-
|
|
4056
|
+
Uu.set(this.visualElement, this);
|
|
4013
4057
|
const e = this.visualElement.current, n = ut(e, "pointerdown", (l) => {
|
|
4014
4058
|
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
4015
4059
|
c && u && this.start(l);
|
|
@@ -4044,13 +4088,13 @@ class Iu {
|
|
|
4044
4088
|
function Se(t, e, n) {
|
|
4045
4089
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
4046
4090
|
}
|
|
4047
|
-
function
|
|
4091
|
+
function $u(t, e = 10) {
|
|
4048
4092
|
let n = null;
|
|
4049
4093
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
4050
4094
|
}
|
|
4051
|
-
class
|
|
4095
|
+
class Ku extends wt {
|
|
4052
4096
|
constructor(e) {
|
|
4053
|
-
super(e), this.removeGroupControls = H, this.removeListeners = H, this.controls = new
|
|
4097
|
+
super(e), this.removeGroupControls = H, this.removeListeners = H, this.controls = new Wu(e);
|
|
4054
4098
|
}
|
|
4055
4099
|
mount() {
|
|
4056
4100
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -4060,24 +4104,24 @@ class Uu extends St {
|
|
|
4060
4104
|
this.removeGroupControls(), this.removeListeners();
|
|
4061
4105
|
}
|
|
4062
4106
|
}
|
|
4063
|
-
const
|
|
4107
|
+
const Cs = (t) => (e, n) => {
|
|
4064
4108
|
t && M.postRender(() => t(e, n));
|
|
4065
4109
|
};
|
|
4066
|
-
class
|
|
4110
|
+
class Gu extends wt {
|
|
4067
4111
|
constructor() {
|
|
4068
4112
|
super(...arguments), this.removePointerDownListener = H;
|
|
4069
4113
|
}
|
|
4070
4114
|
onPointerDown(e) {
|
|
4071
|
-
this.session = new
|
|
4115
|
+
this.session = new fo(e, this.createPanHandlers(), {
|
|
4072
4116
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
4073
|
-
contextWindow:
|
|
4117
|
+
contextWindow: To(this.node)
|
|
4074
4118
|
});
|
|
4075
4119
|
}
|
|
4076
4120
|
createPanHandlers() {
|
|
4077
4121
|
const { onPanSessionStart: e, onPanStart: n, onPan: i, onPanEnd: s } = this.node.getProps();
|
|
4078
4122
|
return {
|
|
4079
|
-
onSessionStart:
|
|
4080
|
-
onStart:
|
|
4123
|
+
onSessionStart: Cs(e),
|
|
4124
|
+
onStart: Cs(n),
|
|
4081
4125
|
onMove: i,
|
|
4082
4126
|
onEnd: (o, r) => {
|
|
4083
4127
|
delete this.session, s && M.postRender(() => s(o, r));
|
|
@@ -4094,7 +4138,7 @@ class Wu extends St {
|
|
|
4094
4138
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
4095
4139
|
}
|
|
4096
4140
|
}
|
|
4097
|
-
function
|
|
4141
|
+
function Hu() {
|
|
4098
4142
|
const t = G(Ie);
|
|
4099
4143
|
if (t === null)
|
|
4100
4144
|
return [!0, null];
|
|
@@ -4103,7 +4147,7 @@ function $u() {
|
|
|
4103
4147
|
const o = at(() => n && n(s), [s, n]);
|
|
4104
4148
|
return !e && n ? [!1, o] : [!0];
|
|
4105
4149
|
}
|
|
4106
|
-
const
|
|
4150
|
+
const Ve = {
|
|
4107
4151
|
/**
|
|
4108
4152
|
* Global flag as to whether the tree has animated since the last time
|
|
4109
4153
|
* we resized the window
|
|
@@ -4115,7 +4159,7 @@ const Ee = {
|
|
|
4115
4159
|
*/
|
|
4116
4160
|
hasEverUpdated: !1
|
|
4117
4161
|
};
|
|
4118
|
-
function
|
|
4162
|
+
function Rs(t, e) {
|
|
4119
4163
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
4120
4164
|
}
|
|
4121
4165
|
const Jt = {
|
|
@@ -4127,21 +4171,21 @@ const Jt = {
|
|
|
4127
4171
|
t = parseFloat(t);
|
|
4128
4172
|
else
|
|
4129
4173
|
return t;
|
|
4130
|
-
const n =
|
|
4174
|
+
const n = Rs(t, e.target.x), i = Rs(t, e.target.y);
|
|
4131
4175
|
return `${n}% ${i}%`;
|
|
4132
4176
|
}
|
|
4133
|
-
},
|
|
4177
|
+
}, zu = {
|
|
4134
4178
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
4135
|
-
const i = t, s =
|
|
4179
|
+
const i = t, s = bt.parse(t);
|
|
4136
4180
|
if (s.length > 5)
|
|
4137
4181
|
return i;
|
|
4138
|
-
const o =
|
|
4182
|
+
const o = bt.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
4139
4183
|
s[0 + r] /= a, s[1 + r] /= l;
|
|
4140
4184
|
const c = j(a, l, 0.5);
|
|
4141
4185
|
return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
|
|
4142
4186
|
}
|
|
4143
4187
|
};
|
|
4144
|
-
class
|
|
4188
|
+
class Yu extends aa {
|
|
4145
4189
|
/**
|
|
4146
4190
|
* This only mounts projection nodes for components that
|
|
4147
4191
|
* need measuring, we might want to do it for all components
|
|
@@ -4149,12 +4193,12 @@ class Gu extends oa {
|
|
|
4149
4193
|
*/
|
|
4150
4194
|
componentDidMount() {
|
|
4151
4195
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: i, layoutId: s } = this.props, { projection: o } = e;
|
|
4152
|
-
|
|
4196
|
+
Wa(Xu), o && (n.group && n.group.add(o), i && i.register && s && i.register(o), o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
4153
4197
|
this.safeToRemove();
|
|
4154
4198
|
}), o.setOptions({
|
|
4155
4199
|
...o.options,
|
|
4156
4200
|
onExitComplete: () => this.safeToRemove()
|
|
4157
|
-
})),
|
|
4201
|
+
})), Ve.hasEverUpdated = !0;
|
|
4158
4202
|
}
|
|
4159
4203
|
getSnapshotBeforeUpdate(e) {
|
|
4160
4204
|
const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, r = i.projection;
|
|
@@ -4181,11 +4225,11 @@ class Gu extends oa {
|
|
|
4181
4225
|
return null;
|
|
4182
4226
|
}
|
|
4183
4227
|
}
|
|
4184
|
-
function
|
|
4185
|
-
const [e, n] =
|
|
4186
|
-
return O.jsx(
|
|
4228
|
+
function bo(t) {
|
|
4229
|
+
const [e, n] = Hu(), i = G(Wn);
|
|
4230
|
+
return O.jsx(Yu, { ...t, layoutGroup: i, switchLayoutGroup: G(cr), isPresent: e, safeToRemove: n });
|
|
4187
4231
|
}
|
|
4188
|
-
const
|
|
4232
|
+
const Xu = {
|
|
4189
4233
|
borderRadius: {
|
|
4190
4234
|
...Jt,
|
|
4191
4235
|
applyTo: [
|
|
@@ -4199,81 +4243,81 @@ const Hu = {
|
|
|
4199
4243
|
borderTopRightRadius: Jt,
|
|
4200
4244
|
borderBottomLeftRadius: Jt,
|
|
4201
4245
|
borderBottomRightRadius: Jt,
|
|
4202
|
-
boxShadow:
|
|
4203
|
-
},
|
|
4204
|
-
function
|
|
4246
|
+
boxShadow: zu
|
|
4247
|
+
}, xo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], qu = xo.length, Es = (t) => typeof t == "string" ? parseFloat(t) : t, Vs = (t) => typeof t == "number" || S.test(t);
|
|
4248
|
+
function Zu(t, e, n, i, s, o) {
|
|
4205
4249
|
s ? (t.opacity = j(
|
|
4206
4250
|
0,
|
|
4207
4251
|
// TODO Reinstate this if only child
|
|
4208
4252
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
4209
|
-
|
|
4210
|
-
), t.opacityExit = j(e.opacity !== void 0 ? e.opacity : 1, 0,
|
|
4211
|
-
for (let r = 0; r <
|
|
4212
|
-
const a = `border${
|
|
4213
|
-
let l =
|
|
4253
|
+
Ju(i)
|
|
4254
|
+
), t.opacityExit = j(e.opacity !== void 0 ? e.opacity : 1, 0, Qu(i))) : o && (t.opacity = j(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, i));
|
|
4255
|
+
for (let r = 0; r < qu; r++) {
|
|
4256
|
+
const a = `border${xo[r]}Radius`;
|
|
4257
|
+
let l = Ds(e, a), c = Ds(n, a);
|
|
4214
4258
|
if (l === void 0 && c === void 0)
|
|
4215
4259
|
continue;
|
|
4216
|
-
l || (l = 0), c || (c = 0), l === 0 || c === 0 ||
|
|
4260
|
+
l || (l = 0), c || (c = 0), l === 0 || c === 0 || Vs(l) === Vs(c) ? (t[a] = Math.max(j(Es(l), Es(c), i), 0), (ot.test(c) || ot.test(l)) && (t[a] += "%")) : t[a] = c;
|
|
4217
4261
|
}
|
|
4218
4262
|
(e.rotate || n.rotate) && (t.rotate = j(e.rotate || 0, n.rotate || 0, i));
|
|
4219
4263
|
}
|
|
4220
|
-
function
|
|
4264
|
+
function Ds(t, e) {
|
|
4221
4265
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4222
4266
|
}
|
|
4223
|
-
const
|
|
4224
|
-
function
|
|
4267
|
+
const Ju = wo(0, 0.5, eo), Qu = wo(0.5, 0.95, H);
|
|
4268
|
+
function wo(t, e, n) {
|
|
4225
4269
|
return (i) => i < t ? 0 : i > e ? 1 : n(ce(t, e, i));
|
|
4226
4270
|
}
|
|
4227
|
-
function
|
|
4271
|
+
function Ms(t, e) {
|
|
4228
4272
|
t.min = e.min, t.max = e.max;
|
|
4229
4273
|
}
|
|
4230
4274
|
function et(t, e) {
|
|
4231
|
-
|
|
4275
|
+
Ms(t.x, e.x), Ms(t.y, e.y);
|
|
4232
4276
|
}
|
|
4233
|
-
function
|
|
4277
|
+
function ks(t, e) {
|
|
4234
4278
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4235
4279
|
}
|
|
4236
|
-
function
|
|
4280
|
+
function Ls(t, e, n, i, s) {
|
|
4237
4281
|
return t -= e, t = _e(t, 1 / n, i), s !== void 0 && (t = _e(t, 1 / s, i)), t;
|
|
4238
4282
|
}
|
|
4239
|
-
function
|
|
4283
|
+
function tf(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
|
|
4240
4284
|
if (ot.test(e) && (e = parseFloat(e), e = j(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4241
4285
|
return;
|
|
4242
4286
|
let a = j(o.min, o.max, i);
|
|
4243
|
-
t === o && (a -= e), t.min =
|
|
4287
|
+
t === o && (a -= e), t.min = Ls(t.min, e, n, a, s), t.max = Ls(t.max, e, n, a, s);
|
|
4244
4288
|
}
|
|
4245
|
-
function
|
|
4246
|
-
|
|
4289
|
+
function Fs(t, e, [n, i, s], o, r) {
|
|
4290
|
+
tf(t, e[n], e[i], e[s], e.scale, o, r);
|
|
4247
4291
|
}
|
|
4248
|
-
const
|
|
4249
|
-
function
|
|
4250
|
-
|
|
4292
|
+
const ef = ["x", "scaleX", "originX"], nf = ["y", "scaleY", "originY"];
|
|
4293
|
+
function Os(t, e, n, i) {
|
|
4294
|
+
Fs(t.x, e, ef, n ? n.x : void 0, i ? i.x : void 0), Fs(t.y, e, nf, n ? n.y : void 0, i ? i.y : void 0);
|
|
4251
4295
|
}
|
|
4252
|
-
function
|
|
4296
|
+
function js(t) {
|
|
4253
4297
|
return t.translate === 0 && t.scale === 1;
|
|
4254
4298
|
}
|
|
4255
|
-
function
|
|
4256
|
-
return
|
|
4299
|
+
function So(t) {
|
|
4300
|
+
return js(t.x) && js(t.y);
|
|
4257
4301
|
}
|
|
4258
|
-
function
|
|
4302
|
+
function _s(t, e) {
|
|
4259
4303
|
return t.min === e.min && t.max === e.max;
|
|
4260
4304
|
}
|
|
4261
|
-
function
|
|
4262
|
-
return
|
|
4305
|
+
function sf(t, e) {
|
|
4306
|
+
return _s(t.x, e.x) && _s(t.y, e.y);
|
|
4263
4307
|
}
|
|
4264
|
-
function
|
|
4308
|
+
function Bs(t, e) {
|
|
4265
4309
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
4266
4310
|
}
|
|
4267
|
-
function
|
|
4268
|
-
return
|
|
4311
|
+
function Ao(t, e) {
|
|
4312
|
+
return Bs(t.x, e.x) && Bs(t.y, e.y);
|
|
4269
4313
|
}
|
|
4270
|
-
function
|
|
4314
|
+
function Is(t) {
|
|
4271
4315
|
return Z(t.x) / Z(t.y);
|
|
4272
4316
|
}
|
|
4273
|
-
function
|
|
4317
|
+
function Ns(t, e) {
|
|
4274
4318
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
4275
4319
|
}
|
|
4276
|
-
class
|
|
4320
|
+
class rf {
|
|
4277
4321
|
constructor() {
|
|
4278
4322
|
this.members = [];
|
|
4279
4323
|
}
|
|
@@ -4327,7 +4371,7 @@ class ef {
|
|
|
4327
4371
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
4328
4372
|
}
|
|
4329
4373
|
}
|
|
4330
|
-
function
|
|
4374
|
+
function of(t, e, n) {
|
|
4331
4375
|
let i = "";
|
|
4332
4376
|
const s = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
|
|
4333
4377
|
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) {
|
|
@@ -4337,8 +4381,8 @@ function nf(t, e, n) {
|
|
|
4337
4381
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
4338
4382
|
return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
|
|
4339
4383
|
}
|
|
4340
|
-
const
|
|
4341
|
-
class
|
|
4384
|
+
const af = (t, e) => t.depth - e.depth;
|
|
4385
|
+
class lf {
|
|
4342
4386
|
constructor() {
|
|
4343
4387
|
this.children = [], this.isDirty = !1;
|
|
4344
4388
|
}
|
|
@@ -4349,54 +4393,54 @@ class rf {
|
|
|
4349
4393
|
$e(this.children, e), this.isDirty = !0;
|
|
4350
4394
|
}
|
|
4351
4395
|
forEach(e) {
|
|
4352
|
-
this.isDirty && this.children.sort(
|
|
4396
|
+
this.isDirty && this.children.sort(af), this.isDirty = !1, this.children.forEach(e);
|
|
4353
4397
|
}
|
|
4354
4398
|
}
|
|
4355
|
-
function
|
|
4356
|
-
const n =
|
|
4399
|
+
function cf(t, e) {
|
|
4400
|
+
const n = Pt.now(), i = ({ timestamp: s }) => {
|
|
4357
4401
|
const o = s - n;
|
|
4358
4402
|
o >= e && (mt(i), t(o - e));
|
|
4359
4403
|
};
|
|
4360
4404
|
return M.read(i, !0), () => mt(i);
|
|
4361
4405
|
}
|
|
4362
|
-
function
|
|
4406
|
+
function uf(t) {
|
|
4363
4407
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
4364
4408
|
}
|
|
4365
|
-
function
|
|
4409
|
+
function ff(t, e, n) {
|
|
4366
4410
|
const i = Y(t) ? t : ue(t);
|
|
4367
|
-
return i.start(
|
|
4411
|
+
return i.start(ci("", i, e, n)), i.animation;
|
|
4368
4412
|
}
|
|
4369
4413
|
const Et = {
|
|
4370
4414
|
type: "projectionFrame",
|
|
4371
4415
|
totalNodes: 0,
|
|
4372
4416
|
resolvedTargetDeltas: 0,
|
|
4373
4417
|
recalculatedProjection: 0
|
|
4374
|
-
}, te = typeof window < "u" && window.MotionDebug !== void 0, dn = ["", "X", "Y", "Z"],
|
|
4375
|
-
let
|
|
4418
|
+
}, te = typeof window < "u" && window.MotionDebug !== void 0, dn = ["", "X", "Y", "Z"], hf = { visibility: "hidden" }, Us = 1e3;
|
|
4419
|
+
let df = 0;
|
|
4376
4420
|
function pn(t, e, n, i) {
|
|
4377
4421
|
const { latestValues: s } = e;
|
|
4378
4422
|
s[t] && (n[t] = s[t], e.setStaticValue(t, 0), i && (i[t] = 0));
|
|
4379
4423
|
}
|
|
4380
|
-
function
|
|
4424
|
+
function Co(t) {
|
|
4381
4425
|
if (t.hasCheckedOptimisedAppear = !0, t.root === t)
|
|
4382
4426
|
return !1;
|
|
4383
4427
|
const { visualElement: e } = t.options;
|
|
4384
|
-
return e ?
|
|
4428
|
+
return e ? co(e) ? !0 : t.parent && !t.parent.hasCheckedOptimisedAppear ? Co(t.parent) : !1 : !1;
|
|
4385
4429
|
}
|
|
4386
|
-
function
|
|
4430
|
+
function Ro({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
|
|
4387
4431
|
return class {
|
|
4388
4432
|
constructor(r = {}, a = e == null ? void 0 : e()) {
|
|
4389
|
-
this.id =
|
|
4433
|
+
this.id = df++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
4390
4434
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4391
4435
|
}, this.updateProjection = () => {
|
|
4392
|
-
this.projectionUpdateScheduled = !1, te && (Et.totalNodes = Et.resolvedTargetDeltas = Et.recalculatedProjection = 0), this.nodes.forEach(
|
|
4436
|
+
this.projectionUpdateScheduled = !1, te && (Et.totalNodes = Et.resolvedTargetDeltas = Et.recalculatedProjection = 0), this.nodes.forEach(gf), this.nodes.forEach(bf), this.nodes.forEach(xf), this.nodes.forEach(yf), te && window.MotionDebug.record(Et);
|
|
4393
4437
|
}, 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;
|
|
4394
4438
|
for (let l = 0; l < this.path.length; l++)
|
|
4395
4439
|
this.path[l].shouldResetTransform = !0;
|
|
4396
|
-
this.root === this && (this.nodes = new
|
|
4440
|
+
this.root === this && (this.nodes = new lf());
|
|
4397
4441
|
}
|
|
4398
4442
|
addEventListener(r, a) {
|
|
4399
|
-
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new
|
|
4443
|
+
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new ui()), this.eventHandlers.get(r).add(a);
|
|
4400
4444
|
}
|
|
4401
4445
|
notifyListeners(r, ...a) {
|
|
4402
4446
|
const l = this.eventHandlers.get(r);
|
|
@@ -4411,13 +4455,13 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4411
4455
|
mount(r, a = this.root.hasTreeAnimated) {
|
|
4412
4456
|
if (this.instance)
|
|
4413
4457
|
return;
|
|
4414
|
-
this.isSVG =
|
|
4458
|
+
this.isSVG = uf(r), this.instance = r;
|
|
4415
4459
|
const { layoutId: l, layout: c, visualElement: u } = this.options;
|
|
4416
4460
|
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) {
|
|
4417
4461
|
let f;
|
|
4418
4462
|
const d = () => this.root.updateBlockedByResize = !1;
|
|
4419
4463
|
t(r, () => {
|
|
4420
|
-
this.root.updateBlockedByResize = !0, f && f(), f =
|
|
4464
|
+
this.root.updateBlockedByResize = !0, f && f(), f = cf(d, 250), Ve.hasAnimatedSinceResize && (Ve.hasAnimatedSinceResize = !1, this.nodes.forEach($s));
|
|
4421
4465
|
});
|
|
4422
4466
|
}
|
|
4423
4467
|
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout: m }) => {
|
|
@@ -4425,17 +4469,17 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4425
4469
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4426
4470
|
return;
|
|
4427
4471
|
}
|
|
4428
|
-
const v = this.options.transition || u.getDefaultTransition() ||
|
|
4472
|
+
const v = this.options.transition || u.getDefaultTransition() || Rf, { onLayoutAnimationStart: x, onLayoutAnimationComplete: P } = u.getProps(), y = !this.targetLayout || !Ao(this.targetLayout, m) || p, T = !d && p;
|
|
4429
4473
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || T || d && (y || !this.currentAnimation)) {
|
|
4430
4474
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f, T);
|
|
4431
4475
|
const w = {
|
|
4432
|
-
...
|
|
4476
|
+
...ti(v, "layout"),
|
|
4433
4477
|
onPlay: x,
|
|
4434
4478
|
onComplete: P
|
|
4435
4479
|
};
|
|
4436
4480
|
(u.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w);
|
|
4437
4481
|
} else
|
|
4438
|
-
d ||
|
|
4482
|
+
d || $s(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4439
4483
|
this.targetLayout = m;
|
|
4440
4484
|
});
|
|
4441
4485
|
}
|
|
@@ -4459,7 +4503,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4459
4503
|
}
|
|
4460
4504
|
// Note: currently only running on root node
|
|
4461
4505
|
startUpdate() {
|
|
4462
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
4506
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(wf), this.animationId++);
|
|
4463
4507
|
}
|
|
4464
4508
|
getTransformTemplate() {
|
|
4465
4509
|
const { visualElement: r } = this.options;
|
|
@@ -4470,7 +4514,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4470
4514
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
4471
4515
|
return;
|
|
4472
4516
|
}
|
|
4473
|
-
if (window.HandoffCancelAllAnimations &&
|
|
4517
|
+
if (window.HandoffCancelAllAnimations && Co(this) && window.HandoffCancelAllAnimations(), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
4474
4518
|
return;
|
|
4475
4519
|
this.isLayoutDirty = !0;
|
|
4476
4520
|
for (let u = 0; u < this.path.length; u++) {
|
|
@@ -4485,18 +4529,18 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4485
4529
|
}
|
|
4486
4530
|
update() {
|
|
4487
4531
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
4488
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
4532
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Ws);
|
|
4489
4533
|
return;
|
|
4490
4534
|
}
|
|
4491
|
-
this.isUpdating || this.nodes.forEach(
|
|
4492
|
-
const a =
|
|
4493
|
-
K.delta =
|
|
4535
|
+
this.isUpdating || this.nodes.forEach(Pf), this.isUpdating = !1, this.nodes.forEach(Tf), this.nodes.forEach(pf), this.nodes.forEach(mf), this.clearAllSnapshots();
|
|
4536
|
+
const a = Pt.now();
|
|
4537
|
+
K.delta = Tt(0, 1e3 / 60, a - K.timestamp), K.timestamp = a, K.isProcessing = !0, nn.update.process(K), nn.preRender.process(K), nn.render.process(K), K.isProcessing = !1;
|
|
4494
4538
|
}
|
|
4495
4539
|
didUpdate() {
|
|
4496
4540
|
this.updateScheduled || (this.updateScheduled = !0, In.read(this.scheduleUpdate));
|
|
4497
4541
|
}
|
|
4498
4542
|
clearAllSnapshots() {
|
|
4499
|
-
this.nodes.forEach(
|
|
4543
|
+
this.nodes.forEach(vf), this.sharedNodes.forEach(Sf);
|
|
4500
4544
|
}
|
|
4501
4545
|
scheduleUpdateProjection() {
|
|
4502
4546
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, M.preRender(this.updateProjection, !1, !0));
|
|
@@ -4539,13 +4583,13 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4539
4583
|
resetTransform() {
|
|
4540
4584
|
if (!s)
|
|
4541
4585
|
return;
|
|
4542
|
-
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !
|
|
4586
|
+
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !So(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
4543
4587
|
r && (a || Rt(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4544
4588
|
}
|
|
4545
4589
|
measure(r = !0) {
|
|
4546
4590
|
const a = this.measurePageBox();
|
|
4547
4591
|
let l = this.removeElementScroll(a);
|
|
4548
|
-
return r && (l = this.removeTransform(l)),
|
|
4592
|
+
return r && (l = this.removeTransform(l)), Ef(l), {
|
|
4549
4593
|
animationId: this.root.animationId,
|
|
4550
4594
|
measuredBox: a,
|
|
4551
4595
|
layoutBox: l,
|
|
@@ -4559,7 +4603,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4559
4603
|
if (!a)
|
|
4560
4604
|
return N();
|
|
4561
4605
|
const l = a.measureViewportBox();
|
|
4562
|
-
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(
|
|
4606
|
+
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(Vf))) {
|
|
4563
4607
|
const { scroll: u } = this.root;
|
|
4564
4608
|
u && (Ut(l.x, u.offset.x), Ut(l.y, u.offset.y));
|
|
4565
4609
|
}
|
|
@@ -4597,9 +4641,9 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4597
4641
|
continue;
|
|
4598
4642
|
Dn(c.latestValues) && c.updateSnapshot();
|
|
4599
4643
|
const u = N(), f = c.measurePageBox();
|
|
4600
|
-
et(u, f),
|
|
4644
|
+
et(u, f), Os(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4601
4645
|
}
|
|
4602
|
-
return Rt(this.latestValues) &&
|
|
4646
|
+
return Rt(this.latestValues) && Os(a, this.latestValues), a;
|
|
4603
4647
|
}
|
|
4604
4648
|
setTargetDelta(r) {
|
|
4605
4649
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4631,7 +4675,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4631
4675
|
p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = N(), this.relativeTargetOrigin = N(), se(this.relativeTargetOrigin, this.layout.layoutBox, p.layout.layoutBox), et(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4632
4676
|
}
|
|
4633
4677
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4634
|
-
if (this.target || (this.target = N(), this.targetWithTransforms = N()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
4678
|
+
if (this.target || (this.target = N(), this.targetWithTransforms = N()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Du(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : et(this.target, this.layout.layoutBox), vo(this.target, this.targetDelta)) : et(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4635
4679
|
this.attemptToResolveRelativeTarget = !1;
|
|
4636
4680
|
const p = this.getClosestProjectingParent();
|
|
4637
4681
|
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = N(), this.relativeTargetOrigin = N(), se(this.relativeTargetOrigin, this.target, p.target), et(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -4641,7 +4685,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4641
4685
|
}
|
|
4642
4686
|
}
|
|
4643
4687
|
getClosestProjectingParent() {
|
|
4644
|
-
if (!(!this.parent || Dn(this.parent.latestValues) ||
|
|
4688
|
+
if (!(!this.parent || Dn(this.parent.latestValues) || yo(this.parent.latestValues)))
|
|
4645
4689
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
4646
4690
|
}
|
|
4647
4691
|
isProjecting() {
|
|
@@ -4658,13 +4702,13 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4658
4702
|
return;
|
|
4659
4703
|
et(this.layoutCorrected, this.layout.layoutBox);
|
|
4660
4704
|
const d = this.treeScale.x, p = this.treeScale.y;
|
|
4661
|
-
|
|
4705
|
+
Iu(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 = N());
|
|
4662
4706
|
const { target: m } = a;
|
|
4663
4707
|
if (!m) {
|
|
4664
4708
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4665
4709
|
return;
|
|
4666
4710
|
}
|
|
4667
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4711
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (ks(this.prevProjectionDelta.x, this.projectionDelta.x), ks(this.prevProjectionDelta.y, this.projectionDelta.y)), ie(this.projectionDelta, this.layoutCorrected, m, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Ns(this.projectionDelta.x, this.prevProjectionDelta.x) || !Ns(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), te && Et.recalculatedProjection++;
|
|
4668
4712
|
}
|
|
4669
4713
|
hide() {
|
|
4670
4714
|
this.isVisible = !1;
|
|
@@ -4686,17 +4730,17 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4686
4730
|
setAnimationOrigin(r, a = !1) {
|
|
4687
4731
|
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, f = Nt();
|
|
4688
4732
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4689
|
-
const d = N(), p = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, v = p !== m, x = this.getStack(), P = !x || x.members.length <= 1, y = !!(v && !P && this.options.crossfade === !0 && !this.path.some(
|
|
4733
|
+
const d = N(), p = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, v = p !== m, x = this.getStack(), P = !x || x.members.length <= 1, y = !!(v && !P && this.options.crossfade === !0 && !this.path.some(Cf));
|
|
4690
4734
|
this.animationProgress = 0;
|
|
4691
4735
|
let T;
|
|
4692
4736
|
this.mixTargetDelta = (w) => {
|
|
4693
4737
|
const C = w / 1e3;
|
|
4694
|
-
|
|
4738
|
+
Ks(f.x, r.x, C), Ks(f.y, r.y, C), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (se(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Af(this.relativeTarget, this.relativeTargetOrigin, d, C), T && sf(this.relativeTarget, T) && (this.isProjectionDirty = !1), T || (T = N()), et(T, this.relativeTarget)), v && (this.animationValues = u, Zu(u, c, this.latestValues, C, y, P)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = C;
|
|
4695
4739
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4696
4740
|
}
|
|
4697
4741
|
startAnimation(r) {
|
|
4698
4742
|
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (mt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = M.update(() => {
|
|
4699
|
-
|
|
4743
|
+
Ve.hasAnimatedSinceResize = !0, this.currentAnimation = ff(0, Us, {
|
|
4700
4744
|
...r,
|
|
4701
4745
|
onUpdate: (a) => {
|
|
4702
4746
|
this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
|
|
@@ -4713,13 +4757,13 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4713
4757
|
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4714
4758
|
}
|
|
4715
4759
|
finishAnimation() {
|
|
4716
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4760
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Us), this.currentAnimation.stop()), this.completeAnimation();
|
|
4717
4761
|
}
|
|
4718
4762
|
applyTransformsToTarget() {
|
|
4719
4763
|
const r = this.getLead();
|
|
4720
4764
|
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
|
|
4721
4765
|
if (!(!a || !l || !c)) {
|
|
4722
|
-
if (this !== r && this.layout && c &&
|
|
4766
|
+
if (this !== r && this.layout && c && Eo(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4723
4767
|
l = this.target || N();
|
|
4724
4768
|
const f = Z(this.layout.layoutBox.x);
|
|
4725
4769
|
l.x.min = r.target.x.min, l.x.max = l.x.min + f;
|
|
@@ -4730,7 +4774,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4730
4774
|
}
|
|
4731
4775
|
}
|
|
4732
4776
|
registerSharedNode(r, a) {
|
|
4733
|
-
this.sharedNodes.has(r) || this.sharedNodes.set(r, new
|
|
4777
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new rf()), this.sharedNodes.get(r).add(a);
|
|
4734
4778
|
const c = a.options.initialPromotionConfig;
|
|
4735
4779
|
a.promote({
|
|
4736
4780
|
transition: c ? c.transition : void 0,
|
|
@@ -4786,19 +4830,19 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4786
4830
|
if (!this.instance || this.isSVG)
|
|
4787
4831
|
return;
|
|
4788
4832
|
if (!this.isVisible)
|
|
4789
|
-
return
|
|
4833
|
+
return hf;
|
|
4790
4834
|
const c = {
|
|
4791
4835
|
visibility: ""
|
|
4792
4836
|
}, u = this.getTransformTemplate();
|
|
4793
4837
|
if (this.needsReset)
|
|
4794
|
-
return this.needsReset = !1, c.opacity = "", c.pointerEvents =
|
|
4838
|
+
return this.needsReset = !1, c.opacity = "", c.pointerEvents = Re(r == null ? void 0 : r.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4795
4839
|
const f = this.getLead();
|
|
4796
4840
|
if (!this.projectionDelta || !this.layout || !f.target) {
|
|
4797
4841
|
const v = {};
|
|
4798
|
-
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents =
|
|
4842
|
+
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents = Re(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !Rt(this.latestValues) && (v.transform = u ? u({}, "") : "none", this.hasProjected = !1), v;
|
|
4799
4843
|
}
|
|
4800
4844
|
const d = f.animationValues || f.latestValues;
|
|
4801
|
-
this.applyTransformsToTarget(), c.transform =
|
|
4845
|
+
this.applyTransformsToTarget(), c.transform = of(this.projectionDeltaWithTransform, this.treeScale, d), u && (c.transform = u(d, c.transform));
|
|
4802
4846
|
const { x: p, y: m } = this.projectionDelta;
|
|
4803
4847
|
c.transformOrigin = `${p.origin * 100}% ${m.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;
|
|
4804
4848
|
for (const v in ke) {
|
|
@@ -4812,7 +4856,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4812
4856
|
} else
|
|
4813
4857
|
c[v] = y;
|
|
4814
4858
|
}
|
|
4815
|
-
return this.options.layoutId && (c.pointerEvents = f === this ?
|
|
4859
|
+
return this.options.layoutId && (c.pointerEvents = f === this ? Re(r == null ? void 0 : r.pointerEvents) || "" : "none"), c;
|
|
4816
4860
|
}
|
|
4817
4861
|
clearSnapshot() {
|
|
4818
4862
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4822,14 +4866,14 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4822
4866
|
this.root.nodes.forEach((r) => {
|
|
4823
4867
|
var a;
|
|
4824
4868
|
return (a = r.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
|
|
4825
|
-
}), this.root.nodes.forEach(
|
|
4869
|
+
}), this.root.nodes.forEach(Ws), this.root.sharedNodes.clear();
|
|
4826
4870
|
}
|
|
4827
4871
|
};
|
|
4828
4872
|
}
|
|
4829
|
-
function
|
|
4873
|
+
function pf(t) {
|
|
4830
4874
|
t.updateLayout();
|
|
4831
4875
|
}
|
|
4832
|
-
function
|
|
4876
|
+
function mf(t) {
|
|
4833
4877
|
var e;
|
|
4834
4878
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
4835
4879
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
@@ -4837,7 +4881,7 @@ function hf(t) {
|
|
|
4837
4881
|
o === "size" ? nt((f) => {
|
|
4838
4882
|
const d = r ? n.measuredBox[f] : n.layoutBox[f], p = Z(d);
|
|
4839
4883
|
d.min = i[f].min, d.max = d.min + p;
|
|
4840
|
-
}) :
|
|
4884
|
+
}) : Eo(o, n.layoutBox, i) && nt((f) => {
|
|
4841
4885
|
const d = r ? n.measuredBox[f] : n.layoutBox[f], p = Z(i[f]);
|
|
4842
4886
|
d.max = d.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[f].max = t.relativeTarget[f].min + p);
|
|
4843
4887
|
});
|
|
@@ -4845,7 +4889,7 @@ function hf(t) {
|
|
|
4845
4889
|
ie(a, i, n.layoutBox);
|
|
4846
4890
|
const l = Nt();
|
|
4847
4891
|
r ? ie(l, t.applyTransform(s, !0), n.measuredBox) : ie(l, i, n.layoutBox);
|
|
4848
|
-
const c = !
|
|
4892
|
+
const c = !So(a);
|
|
4849
4893
|
let u = !1;
|
|
4850
4894
|
if (!t.resumeFrom) {
|
|
4851
4895
|
const f = t.getClosestProjectingParent();
|
|
@@ -4855,7 +4899,7 @@ function hf(t) {
|
|
|
4855
4899
|
const m = N();
|
|
4856
4900
|
se(m, n.layoutBox, d.layoutBox);
|
|
4857
4901
|
const v = N();
|
|
4858
|
-
se(v, i, p.layoutBox),
|
|
4902
|
+
se(v, i, p.layoutBox), Ao(m, v) || (u = !0), f.options.layoutRoot && (t.relativeTarget = v, t.relativeTargetOrigin = m, t.relativeParent = f);
|
|
4859
4903
|
}
|
|
4860
4904
|
}
|
|
4861
4905
|
}
|
|
@@ -4873,70 +4917,70 @@ function hf(t) {
|
|
|
4873
4917
|
}
|
|
4874
4918
|
t.options.transition = void 0;
|
|
4875
4919
|
}
|
|
4876
|
-
function
|
|
4920
|
+
function gf(t) {
|
|
4877
4921
|
te && Et.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4878
4922
|
}
|
|
4879
|
-
function
|
|
4923
|
+
function yf(t) {
|
|
4880
4924
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4881
4925
|
}
|
|
4882
|
-
function
|
|
4926
|
+
function vf(t) {
|
|
4883
4927
|
t.clearSnapshot();
|
|
4884
4928
|
}
|
|
4885
|
-
function
|
|
4929
|
+
function Ws(t) {
|
|
4886
4930
|
t.clearMeasurements();
|
|
4887
4931
|
}
|
|
4888
|
-
function
|
|
4932
|
+
function Pf(t) {
|
|
4889
4933
|
t.isLayoutDirty = !1;
|
|
4890
4934
|
}
|
|
4891
|
-
function
|
|
4935
|
+
function Tf(t) {
|
|
4892
4936
|
const { visualElement: e } = t.options;
|
|
4893
4937
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4894
4938
|
}
|
|
4895
|
-
function
|
|
4939
|
+
function $s(t) {
|
|
4896
4940
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4897
4941
|
}
|
|
4898
|
-
function
|
|
4942
|
+
function bf(t) {
|
|
4899
4943
|
t.resolveTargetDelta();
|
|
4900
4944
|
}
|
|
4901
|
-
function
|
|
4945
|
+
function xf(t) {
|
|
4902
4946
|
t.calcProjection();
|
|
4903
4947
|
}
|
|
4904
|
-
function
|
|
4948
|
+
function wf(t) {
|
|
4905
4949
|
t.resetSkewAndRotation();
|
|
4906
4950
|
}
|
|
4907
|
-
function
|
|
4951
|
+
function Sf(t) {
|
|
4908
4952
|
t.removeLeadSnapshot();
|
|
4909
4953
|
}
|
|
4910
|
-
function
|
|
4954
|
+
function Ks(t, e, n) {
|
|
4911
4955
|
t.translate = j(e.translate, 0, n), t.scale = j(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4912
4956
|
}
|
|
4913
|
-
function
|
|
4957
|
+
function Gs(t, e, n, i) {
|
|
4914
4958
|
t.min = j(e.min, n.min, i), t.max = j(e.max, n.max, i);
|
|
4915
4959
|
}
|
|
4916
|
-
function
|
|
4917
|
-
|
|
4960
|
+
function Af(t, e, n, i) {
|
|
4961
|
+
Gs(t.x, e.x, n.x, i), Gs(t.y, e.y, n.y, i);
|
|
4918
4962
|
}
|
|
4919
|
-
function
|
|
4963
|
+
function Cf(t) {
|
|
4920
4964
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4921
4965
|
}
|
|
4922
|
-
const
|
|
4966
|
+
const Rf = {
|
|
4923
4967
|
duration: 0.45,
|
|
4924
4968
|
ease: [0.4, 0, 0.1, 1]
|
|
4925
|
-
},
|
|
4926
|
-
function
|
|
4927
|
-
t.min =
|
|
4969
|
+
}, Hs = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), zs = Hs("applewebkit/") && !Hs("chrome/") ? Math.round : H;
|
|
4970
|
+
function Ys(t) {
|
|
4971
|
+
t.min = zs(t.min), t.max = zs(t.max);
|
|
4928
4972
|
}
|
|
4929
|
-
function
|
|
4930
|
-
|
|
4973
|
+
function Ef(t) {
|
|
4974
|
+
Ys(t.x), Ys(t.y);
|
|
4931
4975
|
}
|
|
4932
|
-
function
|
|
4933
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
4976
|
+
function Eo(t, e, n) {
|
|
4977
|
+
return t === "position" || t === "preserve-aspect" && !Vu(Is(e), Is(n), 0.2);
|
|
4934
4978
|
}
|
|
4935
|
-
function
|
|
4979
|
+
function Vf(t) {
|
|
4936
4980
|
var e;
|
|
4937
4981
|
return t !== t.root && ((e = t.scroll) === null || e === void 0 ? void 0 : e.wasRoot);
|
|
4938
4982
|
}
|
|
4939
|
-
const
|
|
4983
|
+
const Df = Ro({
|
|
4940
4984
|
attachResizeListener: (t, e) => lt(t, "resize", e),
|
|
4941
4985
|
measureScroll: () => ({
|
|
4942
4986
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -4945,14 +4989,14 @@ const Rf = Ao({
|
|
|
4945
4989
|
checkIsScrollRoot: () => !0
|
|
4946
4990
|
}), mn = {
|
|
4947
4991
|
current: void 0
|
|
4948
|
-
},
|
|
4992
|
+
}, Vo = Ro({
|
|
4949
4993
|
measureScroll: (t) => ({
|
|
4950
4994
|
x: t.scrollLeft,
|
|
4951
4995
|
y: t.scrollTop
|
|
4952
4996
|
}),
|
|
4953
4997
|
defaultParent: () => {
|
|
4954
4998
|
if (!mn.current) {
|
|
4955
|
-
const t = new
|
|
4999
|
+
const t = new Df({});
|
|
4956
5000
|
t.mount(window), t.setOptions({ layoutScroll: !0 }), mn.current = t;
|
|
4957
5001
|
}
|
|
4958
5002
|
return mn.current;
|
|
@@ -4961,29 +5005,29 @@ const Rf = Ao({
|
|
|
4961
5005
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4962
5006
|
},
|
|
4963
5007
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4964
|
-
}),
|
|
5008
|
+
}), Mf = {
|
|
4965
5009
|
pan: {
|
|
4966
|
-
Feature:
|
|
5010
|
+
Feature: Gu
|
|
4967
5011
|
},
|
|
4968
5012
|
drag: {
|
|
4969
|
-
Feature:
|
|
4970
|
-
ProjectionNode:
|
|
4971
|
-
MeasureLayout:
|
|
5013
|
+
Feature: Ku,
|
|
5014
|
+
ProjectionNode: Vo,
|
|
5015
|
+
MeasureLayout: bo
|
|
4972
5016
|
}
|
|
4973
|
-
}, kn = { current: null },
|
|
4974
|
-
function
|
|
4975
|
-
if (
|
|
5017
|
+
}, kn = { current: null }, Do = { current: !1 };
|
|
5018
|
+
function kf() {
|
|
5019
|
+
if (Do.current = !0, !!Bn)
|
|
4976
5020
|
if (window.matchMedia) {
|
|
4977
5021
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => kn.current = t.matches;
|
|
4978
5022
|
t.addListener(e), e();
|
|
4979
5023
|
} else
|
|
4980
5024
|
kn.current = !1;
|
|
4981
5025
|
}
|
|
4982
|
-
function
|
|
5026
|
+
function Lf(t, e, n) {
|
|
4983
5027
|
for (const i in e) {
|
|
4984
5028
|
const s = e[i], o = n[i];
|
|
4985
5029
|
if (Y(s))
|
|
4986
|
-
t.addValue(i, s), process.env.NODE_ENV === "development" &&
|
|
5030
|
+
t.addValue(i, s), process.env.NODE_ENV === "development" && fi(s.version === "11.3.21", `Attempting to mix Framer Motion versions ${s.version} with 11.3.21 may not work as expected.`);
|
|
4987
5031
|
else if (Y(o))
|
|
4988
5032
|
t.addValue(i, ue(s, { owner: t }));
|
|
4989
5033
|
else if (o !== s)
|
|
@@ -4999,7 +5043,7 @@ function Df(t, e, n) {
|
|
|
4999
5043
|
e[i] === void 0 && t.removeValue(i);
|
|
5000
5044
|
return e;
|
|
5001
5045
|
}
|
|
5002
|
-
const
|
|
5046
|
+
const Xs = /* @__PURE__ */ new WeakMap(), Ff = [...jr, z, bt], Of = (t) => Ff.find(Or(t)), qs = [
|
|
5003
5047
|
"AnimationStart",
|
|
5004
5048
|
"AnimationComplete",
|
|
5005
5049
|
"Update",
|
|
@@ -5007,8 +5051,8 @@ const zs = /* @__PURE__ */ new WeakMap(), Mf = [...Fr, z, xt], kf = (t) => Mf.fi
|
|
|
5007
5051
|
"LayoutMeasure",
|
|
5008
5052
|
"LayoutAnimationStart",
|
|
5009
5053
|
"LayoutAnimationComplete"
|
|
5010
|
-
],
|
|
5011
|
-
class
|
|
5054
|
+
], jf = Un.length;
|
|
5055
|
+
class _f {
|
|
5012
5056
|
/**
|
|
5013
5057
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
5014
5058
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -5020,13 +5064,13 @@ class Ff {
|
|
|
5020
5064
|
return {};
|
|
5021
5065
|
}
|
|
5022
5066
|
constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
5023
|
-
this.applyWillChange = !1, this.resolveKeyframes = (d, p, m, v) => new this.KeyframeResolver(d, p, m, v, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
5067
|
+
this.applyWillChange = !1, this.resolveKeyframes = (d, p, m, v) => new this.KeyframeResolver(d, p, m, v, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ei, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
5024
5068
|
this.isRenderScheduled = !1, this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
5025
5069
|
}, this.isRenderScheduled = !1, this.scheduleRender = () => {
|
|
5026
5070
|
this.isRenderScheduled || (this.isRenderScheduled = !0, M.render(this.render, !1, !0));
|
|
5027
5071
|
};
|
|
5028
5072
|
const { latestValues: l, renderState: c } = r;
|
|
5029
|
-
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 = Ue(n), this.isVariantNode =
|
|
5073
|
+
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 = Ue(n), this.isVariantNode = fr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
5030
5074
|
const { willChange: u, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
5031
5075
|
for (const d in f) {
|
|
5032
5076
|
const p = f[d];
|
|
@@ -5034,10 +5078,10 @@ class Ff {
|
|
|
5034
5078
|
}
|
|
5035
5079
|
}
|
|
5036
5080
|
mount(e) {
|
|
5037
|
-
this.current = e,
|
|
5081
|
+
this.current = e, Xs.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)), Do.current || kf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : kn.current, process.env.NODE_ENV !== "production" && fi(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);
|
|
5038
5082
|
}
|
|
5039
5083
|
unmount() {
|
|
5040
|
-
|
|
5084
|
+
Xs.delete(this.current), this.projection && this.projection.unmount(), mt(this.notifyUpdate), mt(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
5041
5085
|
for (const e in this.events)
|
|
5042
5086
|
this.events[e].clear();
|
|
5043
5087
|
for (const e in this.features) {
|
|
@@ -5047,7 +5091,7 @@ class Ff {
|
|
|
5047
5091
|
this.current = null;
|
|
5048
5092
|
}
|
|
5049
5093
|
bindToMotionValue(e, n) {
|
|
5050
|
-
const i =
|
|
5094
|
+
const i = xt.has(e), s = n.on("change", (r) => {
|
|
5051
5095
|
this.latestValues[e] = r, this.props.onUpdate && M.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0);
|
|
5052
5096
|
}), o = n.on("renderRequest", this.scheduleRender);
|
|
5053
5097
|
this.valueSubscriptions.set(e, () => {
|
|
@@ -5093,13 +5137,13 @@ class Ff {
|
|
|
5093
5137
|
*/
|
|
5094
5138
|
update(e, n) {
|
|
5095
5139
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
5096
|
-
for (let i = 0; i <
|
|
5097
|
-
const s =
|
|
5140
|
+
for (let i = 0; i < qs.length; i++) {
|
|
5141
|
+
const s = qs[i];
|
|
5098
5142
|
this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
|
|
5099
5143
|
const o = "on" + s, r = e[o];
|
|
5100
5144
|
r && (this.propEventSubscriptions[s] = this.on(s, r));
|
|
5101
5145
|
}
|
|
5102
|
-
this.prevMotionValues =
|
|
5146
|
+
this.prevMotionValues = Lf(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
5103
5147
|
}
|
|
5104
5148
|
getProps() {
|
|
5105
5149
|
return this.props;
|
|
@@ -5130,7 +5174,7 @@ class Ff {
|
|
|
5130
5174
|
return this.props.initial !== void 0 && (i.initial = this.props.initial), i;
|
|
5131
5175
|
}
|
|
5132
5176
|
const n = {};
|
|
5133
|
-
for (let i = 0; i <
|
|
5177
|
+
for (let i = 0; i < jf; i++) {
|
|
5134
5178
|
const s = Un[i], o = this.props[s];
|
|
5135
5179
|
(oe(o) || o === !1) && (n[s] = o);
|
|
5136
5180
|
}
|
|
@@ -5179,7 +5223,7 @@ class Ff {
|
|
|
5179
5223
|
readValue(e, n) {
|
|
5180
5224
|
var i;
|
|
5181
5225
|
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);
|
|
5182
|
-
return s != null && (typeof s == "string" && (
|
|
5226
|
+
return s != null && (typeof s == "string" && (Lr(s) || kr(s)) ? s = parseFloat(s) : !Of(s) && bt.test(n) && (s = Kr(e, n)), this.setBaseTarget(e, Y(s) ? s.get() : s)), Y(s) ? s.get() : s;
|
|
5183
5227
|
}
|
|
5184
5228
|
/**
|
|
5185
5229
|
* Set the base target to later animate back to. This is currently
|
|
@@ -5197,7 +5241,7 @@ class Ff {
|
|
|
5197
5241
|
const { initial: i } = this.props;
|
|
5198
5242
|
let s;
|
|
5199
5243
|
if (typeof i == "string" || typeof i == "object") {
|
|
5200
|
-
const r =
|
|
5244
|
+
const r = Jn(this.props, i, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
5201
5245
|
r && (s = r[e]);
|
|
5202
5246
|
}
|
|
5203
5247
|
if (i && s !== void 0)
|
|
@@ -5206,15 +5250,15 @@ class Ff {
|
|
|
5206
5250
|
return o !== void 0 && !Y(o) ? o : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
5207
5251
|
}
|
|
5208
5252
|
on(e, n) {
|
|
5209
|
-
return this.events[e] || (this.events[e] = new
|
|
5253
|
+
return this.events[e] || (this.events[e] = new ui()), this.events[e].add(n);
|
|
5210
5254
|
}
|
|
5211
5255
|
notify(e, ...n) {
|
|
5212
5256
|
this.events[e] && this.events[e].notify(...n);
|
|
5213
5257
|
}
|
|
5214
5258
|
}
|
|
5215
|
-
class
|
|
5259
|
+
class Mo extends _f {
|
|
5216
5260
|
constructor() {
|
|
5217
|
-
super(...arguments), this.KeyframeResolver =
|
|
5261
|
+
super(...arguments), this.KeyframeResolver = Gr;
|
|
5218
5262
|
}
|
|
5219
5263
|
sortInstanceNodePosition(e, n) {
|
|
5220
5264
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -5226,30 +5270,30 @@ class Vo extends Ff {
|
|
|
5226
5270
|
delete n[e], delete i[e];
|
|
5227
5271
|
}
|
|
5228
5272
|
}
|
|
5229
|
-
function
|
|
5273
|
+
function Bf(t) {
|
|
5230
5274
|
return window.getComputedStyle(t);
|
|
5231
5275
|
}
|
|
5232
|
-
class
|
|
5276
|
+
class If extends Mo {
|
|
5233
5277
|
constructor() {
|
|
5234
|
-
super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance =
|
|
5278
|
+
super(...arguments), this.type = "html", this.applyWillChange = !0, this.renderInstance = Pr;
|
|
5235
5279
|
}
|
|
5236
5280
|
readValueFromInstance(e, n) {
|
|
5237
|
-
if (
|
|
5238
|
-
const i =
|
|
5281
|
+
if (xt.has(n)) {
|
|
5282
|
+
const i = ii(n);
|
|
5239
5283
|
return i && i.default || 0;
|
|
5240
5284
|
} else {
|
|
5241
|
-
const i =
|
|
5285
|
+
const i = Bf(e), s = (mr(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
5242
5286
|
return typeof s == "string" ? s.trim() : s;
|
|
5243
5287
|
}
|
|
5244
5288
|
}
|
|
5245
5289
|
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
5246
|
-
return
|
|
5290
|
+
return Po(e, n);
|
|
5247
5291
|
}
|
|
5248
5292
|
build(e, n, i) {
|
|
5249
|
-
|
|
5293
|
+
zn(e, n, i.transformTemplate);
|
|
5250
5294
|
}
|
|
5251
5295
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
5252
|
-
return
|
|
5296
|
+
return Zn(e, n, i);
|
|
5253
5297
|
}
|
|
5254
5298
|
handleChildMotionValue() {
|
|
5255
5299
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
@@ -5259,7 +5303,7 @@ class jf extends Vo {
|
|
|
5259
5303
|
}));
|
|
5260
5304
|
}
|
|
5261
5305
|
}
|
|
5262
|
-
class
|
|
5306
|
+
class Nf extends Mo {
|
|
5263
5307
|
constructor() {
|
|
5264
5308
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = N;
|
|
5265
5309
|
}
|
|
@@ -5267,39 +5311,39 @@ class _f extends Vo {
|
|
|
5267
5311
|
return e[n];
|
|
5268
5312
|
}
|
|
5269
5313
|
readValueFromInstance(e, n) {
|
|
5270
|
-
if (
|
|
5271
|
-
const i =
|
|
5314
|
+
if (xt.has(n)) {
|
|
5315
|
+
const i = ii(n);
|
|
5272
5316
|
return i && i.default || 0;
|
|
5273
5317
|
}
|
|
5274
|
-
return n =
|
|
5318
|
+
return n = Tr.has(n) ? n : Ne(n), e.getAttribute(n);
|
|
5275
5319
|
}
|
|
5276
5320
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
5277
|
-
return
|
|
5321
|
+
return xr(e, n, i);
|
|
5278
5322
|
}
|
|
5279
5323
|
build(e, n, i) {
|
|
5280
|
-
|
|
5324
|
+
Xn(e, n, this.isSVGTag, i.transformTemplate);
|
|
5281
5325
|
}
|
|
5282
5326
|
renderInstance(e, n, i, s) {
|
|
5283
|
-
|
|
5327
|
+
br(e, n, i, s);
|
|
5284
5328
|
}
|
|
5285
5329
|
mount(e) {
|
|
5286
|
-
this.isSVGTag =
|
|
5330
|
+
this.isSVGTag = qn(e.tagName), super.mount(e);
|
|
5287
5331
|
}
|
|
5288
5332
|
}
|
|
5289
|
-
const
|
|
5290
|
-
allowProjection: t !==
|
|
5291
|
-
}),
|
|
5333
|
+
const Uf = (t, e) => $n(t) ? new Nf(e) : new If(e, {
|
|
5334
|
+
allowProjection: t !== nr
|
|
5335
|
+
}), Wf = {
|
|
5292
5336
|
layout: {
|
|
5293
|
-
ProjectionNode:
|
|
5294
|
-
MeasureLayout:
|
|
5295
|
-
}
|
|
5296
|
-
},
|
|
5297
|
-
...
|
|
5298
|
-
...
|
|
5299
|
-
...
|
|
5300
|
-
...
|
|
5301
|
-
},
|
|
5302
|
-
class
|
|
5337
|
+
ProjectionNode: Vo,
|
|
5338
|
+
MeasureLayout: bo
|
|
5339
|
+
}
|
|
5340
|
+
}, $f = {
|
|
5341
|
+
...bu,
|
|
5342
|
+
...Ml,
|
|
5343
|
+
...Mf,
|
|
5344
|
+
...Wf
|
|
5345
|
+
}, Kf = /* @__PURE__ */ Na((t, e) => vl(t, e, $f, Uf));
|
|
5346
|
+
class Gf extends Ln.Component {
|
|
5303
5347
|
getSnapshotBeforeUpdate(e) {
|
|
5304
5348
|
const n = this.props.childRef.current;
|
|
5305
5349
|
if (n && e.isPresent && !this.props.isPresent) {
|
|
@@ -5317,14 +5361,14 @@ class Wf extends Ln.Component {
|
|
|
5317
5361
|
return this.props.children;
|
|
5318
5362
|
}
|
|
5319
5363
|
}
|
|
5320
|
-
function
|
|
5364
|
+
function Hf({ children: t, isPresent: e }) {
|
|
5321
5365
|
const n = On(), i = it(null), s = it({
|
|
5322
5366
|
width: 0,
|
|
5323
5367
|
height: 0,
|
|
5324
5368
|
top: 0,
|
|
5325
5369
|
left: 0
|
|
5326
5370
|
}), { nonce: o } = G(_n);
|
|
5327
|
-
return
|
|
5371
|
+
return er(() => {
|
|
5328
5372
|
const { width: r, height: a, top: l, left: c } = s.current;
|
|
5329
5373
|
if (e || !i.current || !r || !a)
|
|
5330
5374
|
return;
|
|
@@ -5341,10 +5385,10 @@ function $f({ children: t, isPresent: e }) {
|
|
|
5341
5385
|
`), () => {
|
|
5342
5386
|
document.head.removeChild(u);
|
|
5343
5387
|
};
|
|
5344
|
-
}, [e]), O.jsx(
|
|
5388
|
+
}, [e]), O.jsx(Gf, { isPresent: e, childRef: i, sizeRef: s, children: Ln.cloneElement(t, { ref: i }) });
|
|
5345
5389
|
}
|
|
5346
|
-
const
|
|
5347
|
-
const a =
|
|
5390
|
+
const zf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r }) => {
|
|
5391
|
+
const a = Qn(Yf), l = On(), c = Mt(
|
|
5348
5392
|
() => ({
|
|
5349
5393
|
id: l,
|
|
5350
5394
|
initial: e,
|
|
@@ -5370,22 +5414,22 @@ const Kf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
|
|
|
5370
5414
|
a.forEach((u, f) => a.set(f, !1));
|
|
5371
5415
|
}, [n]), Ln.useEffect(() => {
|
|
5372
5416
|
!n && !a.size && i && i();
|
|
5373
|
-
}, [n]), r === "popLayout" && (t = O.jsx(
|
|
5417
|
+
}, [n]), r === "popLayout" && (t = O.jsx(Hf, { isPresent: n, children: t })), O.jsx(Ie.Provider, { value: c, children: t });
|
|
5374
5418
|
};
|
|
5375
|
-
function
|
|
5419
|
+
function Yf() {
|
|
5376
5420
|
return /* @__PURE__ */ new Map();
|
|
5377
5421
|
}
|
|
5378
5422
|
const Ae = (t) => t.key || "";
|
|
5379
|
-
function
|
|
5423
|
+
function Zs(t) {
|
|
5380
5424
|
const e = [];
|
|
5381
|
-
return
|
|
5382
|
-
|
|
5425
|
+
return la.forEach(t, (n) => {
|
|
5426
|
+
ca(n) && e.push(n);
|
|
5383
5427
|
}), e;
|
|
5384
5428
|
}
|
|
5385
|
-
const
|
|
5429
|
+
const Xf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
|
|
5386
5430
|
pt(!e, "Replace exitBeforeEnter with mode='wait'");
|
|
5387
|
-
const a = Mt(() =>
|
|
5388
|
-
|
|
5431
|
+
const a = Mt(() => Zs(t), [t]), l = a.map(Ae), c = it(!0), u = it(a), f = Qn(() => /* @__PURE__ */ new Map()), [d, p] = _t(a), [m, v] = _t(a);
|
|
5432
|
+
rr(() => {
|
|
5389
5433
|
c.current = !1, u.current = a;
|
|
5390
5434
|
for (let y = 0; y < m.length; y++) {
|
|
5391
5435
|
const T = Ae(m[y]);
|
|
@@ -5399,7 +5443,7 @@ const Hf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5399
5443
|
const w = m[T], C = Ae(w);
|
|
5400
5444
|
l.includes(C) || (y.splice(T, 0, w), x.push(w));
|
|
5401
5445
|
}
|
|
5402
|
-
r === "wait" && x.length && (y = x), v(
|
|
5446
|
+
r === "wait" && x.length && (y = x), v(Zs(y)), p(a);
|
|
5403
5447
|
return;
|
|
5404
5448
|
}
|
|
5405
5449
|
process.env.NODE_ENV !== "production" && r === "wait" && m.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.`);
|
|
@@ -5415,37 +5459,37 @@ const Hf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5415
5459
|
$ || (k = !1);
|
|
5416
5460
|
}), k && (P == null || P(), v(u.current), s && s());
|
|
5417
5461
|
};
|
|
5418
|
-
return O.jsx(
|
|
5462
|
+
return O.jsx(zf, { isPresent: w, initial: !c.current || i ? void 0 : !1, custom: w ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: w ? void 0 : C, children: y }, T);
|
|
5419
5463
|
}) });
|
|
5420
5464
|
};
|
|
5421
|
-
function
|
|
5465
|
+
function De(t) {
|
|
5422
5466
|
var e = new Error(t);
|
|
5423
5467
|
return e.source = "ulid", e;
|
|
5424
5468
|
}
|
|
5425
|
-
var
|
|
5426
|
-
function
|
|
5469
|
+
var hi = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", re = hi.length, Js = Math.pow(2, 48) - 1, qf = 10, Zf = 16;
|
|
5470
|
+
function Jf(t) {
|
|
5427
5471
|
var e = Math.floor(t() * re);
|
|
5428
|
-
return e === re && (e = re - 1),
|
|
5472
|
+
return e === re && (e = re - 1), hi.charAt(e);
|
|
5429
5473
|
}
|
|
5430
|
-
function
|
|
5474
|
+
function Qf(t, e) {
|
|
5431
5475
|
if (isNaN(t))
|
|
5432
5476
|
throw new Error(t + " must be a number");
|
|
5433
|
-
if (t >
|
|
5434
|
-
throw
|
|
5477
|
+
if (t > Js)
|
|
5478
|
+
throw De("cannot encode time greater than " + Js);
|
|
5435
5479
|
if (t < 0)
|
|
5436
|
-
throw
|
|
5480
|
+
throw De("time must be positive");
|
|
5437
5481
|
if (Number.isInteger(t) === !1)
|
|
5438
|
-
throw
|
|
5482
|
+
throw De("time must be an integer");
|
|
5439
5483
|
for (var n = void 0, i = ""; e > 0; e--)
|
|
5440
|
-
n = t % re, i =
|
|
5484
|
+
n = t % re, i = hi.charAt(n) + i, t = (t - n) / re;
|
|
5441
5485
|
return i;
|
|
5442
5486
|
}
|
|
5443
|
-
function
|
|
5487
|
+
function th(t, e) {
|
|
5444
5488
|
for (var n = ""; t > 0; t--)
|
|
5445
|
-
n =
|
|
5489
|
+
n = Jf(e) + n;
|
|
5446
5490
|
return n;
|
|
5447
5491
|
}
|
|
5448
|
-
function
|
|
5492
|
+
function eh() {
|
|
5449
5493
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, e = arguments[1];
|
|
5450
5494
|
e || (e = typeof window < "u" ? window : null);
|
|
5451
5495
|
var n = e && (e.crypto || e.msCrypto);
|
|
@@ -5470,50 +5514,15 @@ function Jf() {
|
|
|
5470
5514
|
return Math.random();
|
|
5471
5515
|
};
|
|
5472
5516
|
}
|
|
5473
|
-
throw
|
|
5517
|
+
throw De("secure crypto unusable, insecure Math.random not allowed");
|
|
5474
5518
|
}
|
|
5475
|
-
function
|
|
5476
|
-
return t || (t =
|
|
5477
|
-
return isNaN(n) && (n = Date.now()),
|
|
5519
|
+
function nh(t) {
|
|
5520
|
+
return t || (t = eh()), function(n) {
|
|
5521
|
+
return isNaN(n) && (n = Date.now()), Qf(n, qf) + th(Zf, t);
|
|
5478
5522
|
};
|
|
5479
5523
|
}
|
|
5480
|
-
var
|
|
5481
|
-
const
|
|
5482
|
-
De.Input,
|
|
5483
|
-
De.Textarea,
|
|
5484
|
-
De.Select
|
|
5485
|
-
], eh = (t) => (t == null ? void 0 : t.split("+").map((e) => e.trim().toLowerCase())) ?? [], nh = (t) => ({
|
|
5486
|
-
formFieldTags: (t == null ? void 0 : t.formFieldTags) ?? Do,
|
|
5487
|
-
ignoreFormField: (t == null ? void 0 : t.ignoreFormField) ?? !0,
|
|
5488
|
-
preventDefault: (t == null ? void 0 : t.preventDefault) ?? !0,
|
|
5489
|
-
stopPropagation: (t == null ? void 0 : t.stopPropagation) ?? !0
|
|
5490
|
-
}), ih = (t, e, n) => (i) => {
|
|
5491
|
-
const s = Array.isArray(t) ? t : [t];
|
|
5492
|
-
for (const o of s) {
|
|
5493
|
-
const r = nh(n), a = eh(o), l = i.key.toLowerCase(), c = i.code.toLowerCase(), u = document.activeElement;
|
|
5494
|
-
if (i.repeat)
|
|
5495
|
-
continue;
|
|
5496
|
-
const f = a.includes("ctrl"), d = a.includes("cmd"), p = a.includes("shift"), m = f === i.ctrlKey, v = d === i.metaKey, x = p === i.shiftKey;
|
|
5497
|
-
if (!(!(a.includes(l) || a.includes(c)) || !m || !v || !x) && !(!r.ignoreFormField && u && Do.includes(u.tagName)) && (r.preventDefault && i.preventDefault(), r.stopPropagation && i.stopPropagation(), !!e)) {
|
|
5498
|
-
e(i);
|
|
5499
|
-
break;
|
|
5500
|
-
}
|
|
5501
|
-
}
|
|
5502
|
-
}, Zs = ({
|
|
5503
|
-
onKeyDown: t,
|
|
5504
|
-
hotKey: e,
|
|
5505
|
-
stopPropagation: n = !0,
|
|
5506
|
-
preventDefault: i = !0,
|
|
5507
|
-
ignoreFormField: s = !1,
|
|
5508
|
-
formFieldTags: o
|
|
5509
|
-
}) => {
|
|
5510
|
-
const r = at((a) => {
|
|
5511
|
-
t && ih(e, t, { stopPropagation: n, preventDefault: i, ignoreFormField: s, formFieldTags: o })(a);
|
|
5512
|
-
}, [e, t]);
|
|
5513
|
-
return ct(() => (document.addEventListener("keydown", r), () => {
|
|
5514
|
-
document.removeEventListener("keydown", r);
|
|
5515
|
-
}), [r]), null;
|
|
5516
|
-
}, Js = ({
|
|
5524
|
+
var ih = nh();
|
|
5525
|
+
const Qs = ({
|
|
5517
5526
|
onMousedown: t
|
|
5518
5527
|
}) => (ct(() => (document.addEventListener("mousedown", t), () => {
|
|
5519
5528
|
document.removeEventListener("mousedown", t);
|
|
@@ -5527,7 +5536,7 @@ const Do = [
|
|
|
5527
5536
|
mainEl: oh,
|
|
5528
5537
|
"picker-el": "acrool-react-picker__picker-el",
|
|
5529
5538
|
pickerEl: ah
|
|
5530
|
-
},
|
|
5539
|
+
}, ko = (t, e) => (n) => {
|
|
5531
5540
|
e.current = n, t && (typeof t == "function" ? t(n) : t && (t.current = n));
|
|
5532
5541
|
}, lh = "acrool-react-picker__motion-animation-wrapper", ch = {
|
|
5533
5542
|
"motion-animation-wrapper": "acrool-react-picker__motion-animation-wrapper",
|
|
@@ -5551,8 +5560,8 @@ const Do = [
|
|
|
5551
5560
|
children: t,
|
|
5552
5561
|
anchorRef: e
|
|
5553
5562
|
}, n) => {
|
|
5554
|
-
const i = it(null), s =
|
|
5555
|
-
return
|
|
5563
|
+
const i = it(null), s = ga();
|
|
5564
|
+
return tr(() => {
|
|
5556
5565
|
let o = st.bottom, r = gt.left;
|
|
5557
5566
|
const a = (l) => {
|
|
5558
5567
|
var c;
|
|
@@ -5574,9 +5583,9 @@ const Do = [
|
|
|
5574
5583
|
};
|
|
5575
5584
|
}
|
|
5576
5585
|
}, [s.isVisible]), /* @__PURE__ */ O.jsx(O.Fragment, { children: /* @__PURE__ */ O.jsx(
|
|
5577
|
-
|
|
5586
|
+
Kf.div,
|
|
5578
5587
|
{
|
|
5579
|
-
ref:
|
|
5588
|
+
ref: ko(n, i),
|
|
5580
5589
|
transition: { type: "spring", duration: 0.2 },
|
|
5581
5590
|
style: { display: "none" },
|
|
5582
5591
|
className: ch.motionAnimationWrapper,
|
|
@@ -5614,7 +5623,7 @@ function vh(t, e, n) {
|
|
|
5614
5623
|
}
|
|
5615
5624
|
typeof y.current < "u" && w && JSON.stringify(p) !== JSON.stringify(y.current) && o.onChange(y.current);
|
|
5616
5625
|
}, [p, o.onChange, w]), U = at((F) => {
|
|
5617
|
-
[
|
|
5626
|
+
[Ct.Escape].includes(F.key) && a && (F.stopPropagation(), l(!1));
|
|
5618
5627
|
}, [a]);
|
|
5619
5628
|
return /* @__PURE__ */ O.jsx(
|
|
5620
5629
|
jn.Provider,
|
|
@@ -5637,13 +5646,13 @@ function vh(t, e, n) {
|
|
|
5637
5646
|
i,
|
|
5638
5647
|
{
|
|
5639
5648
|
...o,
|
|
5640
|
-
ref:
|
|
5649
|
+
ref: ko(r, x)
|
|
5641
5650
|
}
|
|
5642
5651
|
) }),
|
|
5643
|
-
/* @__PURE__ */ O.jsx(
|
|
5644
|
-
|
|
5652
|
+
/* @__PURE__ */ O.jsx(Xf, { children: a && /* @__PURE__ */ O.jsx(
|
|
5653
|
+
sr,
|
|
5645
5654
|
{
|
|
5646
|
-
id: `acrool-react-picker-${
|
|
5655
|
+
id: `acrool-react-picker-${ih().toLowerCase()}`,
|
|
5647
5656
|
className: gn.pickerEl,
|
|
5648
5657
|
children: /* @__PURE__ */ O.jsx(
|
|
5649
5658
|
hh,
|
|
@@ -5656,30 +5665,28 @@ function vh(t, e, n) {
|
|
|
5656
5665
|
}
|
|
5657
5666
|
) }),
|
|
5658
5667
|
a && /* @__PURE__ */ O.jsx(sh, { onPickerHide: _ }),
|
|
5659
|
-
T && a && /* @__PURE__ */ O.jsx(
|
|
5660
|
-
c && /* @__PURE__ */ O.jsx(
|
|
5668
|
+
T && a && /* @__PURE__ */ O.jsx(Qs, { onMousedown: R }),
|
|
5669
|
+
c && /* @__PURE__ */ O.jsx(Qs, { onMousedown: $ }),
|
|
5661
5670
|
c && /* @__PURE__ */ O.jsx(
|
|
5662
|
-
|
|
5671
|
+
Fi,
|
|
5663
5672
|
{
|
|
5664
5673
|
hotKey: [
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
Pt.Space
|
|
5674
|
+
Ct.ArrowUp,
|
|
5675
|
+
Ct.ArrowDown,
|
|
5676
|
+
Ct.Space
|
|
5669
5677
|
],
|
|
5670
|
-
onKeyDown: k
|
|
5671
|
-
stopPropagation: !0,
|
|
5672
|
-
preventDefault: !0
|
|
5678
|
+
onKeyDown: k
|
|
5673
5679
|
}
|
|
5674
5680
|
),
|
|
5675
5681
|
c && /* @__PURE__ */ O.jsx(
|
|
5676
|
-
|
|
5682
|
+
Fi,
|
|
5677
5683
|
{
|
|
5678
5684
|
hotKey: [
|
|
5679
|
-
|
|
5680
|
-
|
|
5685
|
+
Ct.Tab,
|
|
5686
|
+
Ct.ShiftAndTab
|
|
5681
5687
|
],
|
|
5682
|
-
onKeyDown: C
|
|
5688
|
+
onKeyDown: C,
|
|
5689
|
+
preventDefault: !1
|
|
5683
5690
|
}
|
|
5684
5691
|
)
|
|
5685
5692
|
] })
|
|
@@ -5693,5 +5700,5 @@ export {
|
|
|
5693
5700
|
mh as PickerProviderConsumer,
|
|
5694
5701
|
jn as PickerProviderContext,
|
|
5695
5702
|
vh as createPicker,
|
|
5696
|
-
|
|
5703
|
+
ga as usePicker
|
|
5697
5704
|
};
|