tactile-material 1.0.3 → 1.0.6
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/tactile.es.js +849 -855
- package/dist/tactile.umd.js +11 -11
- package/package.json +1 -1
package/dist/tactile.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import ar, { createContext as zt, useRef as B, useId as Bn, useContext as Q, useInsertionEffect as Ie, useCallback as In, useMemo as I, useEffect as
|
|
1
|
+
import * as Fn from "react";
|
|
2
|
+
import ar, { createContext as zt, useRef as B, useId as Bn, useContext as Q, useInsertionEffect as Ie, useCallback as In, useMemo as I, useEffect as ft, Children as ga, isValidElement as ya, useLayoutEffect as va, useState as bt, forwardRef as _n, Fragment as lr, createElement as vn, Component as xa } from "react";
|
|
3
3
|
const ue = (t, e = 360, n = 88) => {
|
|
4
4
|
const s = (i) => {
|
|
5
5
|
const o = Math.sin(t + i) * 1e4;
|
|
@@ -40,11 +40,11 @@ function ba() {
|
|
|
40
40
|
Bs = 1;
|
|
41
41
|
var t = ar, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
42
42
|
function r(a, l, c) {
|
|
43
|
-
var u,
|
|
43
|
+
var u, d = {}, h = null, p = null;
|
|
44
44
|
c !== void 0 && (h = "" + c), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (p = l.ref);
|
|
45
|
-
for (u in l) s.call(l, u) && !o.hasOwnProperty(u) && (
|
|
46
|
-
if (a && a.defaultProps) for (u in l = a.defaultProps, l)
|
|
47
|
-
return { $$typeof: e, type: a, key: h, ref: p, props:
|
|
45
|
+
for (u in l) s.call(l, u) && !o.hasOwnProperty(u) && (d[u] = l[u]);
|
|
46
|
+
if (a && a.defaultProps) for (u in l = a.defaultProps, l) d[u] === void 0 && (d[u] = l[u]);
|
|
47
|
+
return { $$typeof: e, type: a, key: h, ref: p, props: d, _owner: i.current };
|
|
48
48
|
}
|
|
49
49
|
return Jt.Fragment = n, Jt.jsx = r, Jt.jsxs = r, Jt;
|
|
50
50
|
}
|
|
@@ -61,58 +61,58 @@ var te = {};
|
|
|
61
61
|
var Is;
|
|
62
62
|
function Ta() {
|
|
63
63
|
return Is || (Is = 1, process.env.NODE_ENV !== "production" && function() {
|
|
64
|
-
var t = ar, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = 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"),
|
|
65
|
-
function x(
|
|
66
|
-
if (
|
|
64
|
+
var t = ar, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = 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"), d = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
|
|
65
|
+
function x(f) {
|
|
66
|
+
if (f === null || typeof f != "object")
|
|
67
67
|
return null;
|
|
68
|
-
var T = g &&
|
|
68
|
+
var T = g && f[g] || f[v];
|
|
69
69
|
return typeof T == "function" ? T : null;
|
|
70
70
|
}
|
|
71
71
|
var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
72
|
-
function P(
|
|
72
|
+
function P(f) {
|
|
73
73
|
{
|
|
74
74
|
for (var T = arguments.length, M = new Array(T > 1 ? T - 1 : 0), E = 1; E < T; E++)
|
|
75
75
|
M[E - 1] = arguments[E];
|
|
76
|
-
S("error",
|
|
76
|
+
S("error", f, M);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function S(
|
|
79
|
+
function S(f, T, M) {
|
|
80
80
|
{
|
|
81
|
-
var E = y.ReactDebugCurrentFrame,
|
|
82
|
-
|
|
81
|
+
var E = y.ReactDebugCurrentFrame, N = E.getStackAddendum();
|
|
82
|
+
N !== "" && (T += "%s", M = M.concat([N]));
|
|
83
83
|
var _ = M.map(function($) {
|
|
84
84
|
return String($);
|
|
85
85
|
});
|
|
86
|
-
_.unshift("Warning: " + T), Function.prototype.apply.call(console[
|
|
86
|
+
_.unshift("Warning: " + T), Function.prototype.apply.call(console[f], console, _);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
var
|
|
89
|
+
var k = !1, w = !1, A = !1, b = !1, R = !1, D;
|
|
90
90
|
D = Symbol.for("react.module.reference");
|
|
91
|
-
function
|
|
92
|
-
return !!(typeof
|
|
91
|
+
function C(f) {
|
|
92
|
+
return !!(typeof f == "string" || typeof f == "function" || f === s || f === o || R || f === i || f === c || f === u || b || f === p || k || w || A || typeof f == "object" && f !== null && (f.$$typeof === h || f.$$typeof === d || f.$$typeof === r || f.$$typeof === a || f.$$typeof === l || // This needs to include all possible module reference object
|
|
93
93
|
// types supported by any Flight configuration anywhere since
|
|
94
94
|
// we don't know which Flight build this will end up being used
|
|
95
95
|
// with.
|
|
96
|
-
|
|
96
|
+
f.$$typeof === D || f.getModuleId !== void 0));
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
var E =
|
|
98
|
+
function O(f, T, M) {
|
|
99
|
+
var E = f.displayName;
|
|
100
100
|
if (E)
|
|
101
101
|
return E;
|
|
102
|
-
var
|
|
103
|
-
return
|
|
102
|
+
var N = T.displayName || T.name || "";
|
|
103
|
+
return N !== "" ? M + "(" + N + ")" : M;
|
|
104
104
|
}
|
|
105
|
-
function Z(
|
|
106
|
-
return
|
|
105
|
+
function Z(f) {
|
|
106
|
+
return f.displayName || "Context";
|
|
107
107
|
}
|
|
108
|
-
function L(
|
|
109
|
-
if (
|
|
108
|
+
function L(f) {
|
|
109
|
+
if (f == null)
|
|
110
110
|
return null;
|
|
111
|
-
if (typeof
|
|
112
|
-
return
|
|
113
|
-
if (typeof
|
|
114
|
-
return
|
|
115
|
-
switch (
|
|
111
|
+
if (typeof f.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof f == "function")
|
|
112
|
+
return f.displayName || f.name || null;
|
|
113
|
+
if (typeof f == "string")
|
|
114
|
+
return f;
|
|
115
|
+
switch (f) {
|
|
116
116
|
case s:
|
|
117
117
|
return "Fragment";
|
|
118
118
|
case n:
|
|
@@ -126,21 +126,21 @@ function Ta() {
|
|
|
126
126
|
case u:
|
|
127
127
|
return "SuspenseList";
|
|
128
128
|
}
|
|
129
|
-
if (typeof
|
|
130
|
-
switch (
|
|
129
|
+
if (typeof f == "object")
|
|
130
|
+
switch (f.$$typeof) {
|
|
131
131
|
case a:
|
|
132
|
-
var T =
|
|
132
|
+
var T = f;
|
|
133
133
|
return Z(T) + ".Consumer";
|
|
134
134
|
case r:
|
|
135
|
-
var M =
|
|
135
|
+
var M = f;
|
|
136
136
|
return Z(M._context) + ".Provider";
|
|
137
137
|
case l:
|
|
138
|
-
return
|
|
139
|
-
case
|
|
140
|
-
var E =
|
|
141
|
-
return E !== null ? E : L(
|
|
138
|
+
return O(f, f.render, "ForwardRef");
|
|
139
|
+
case d:
|
|
140
|
+
var E = f.displayName || null;
|
|
141
|
+
return E !== null ? E : L(f.type) || "Memo";
|
|
142
142
|
case h: {
|
|
143
|
-
var
|
|
143
|
+
var N = f, _ = N._payload, $ = N._init;
|
|
144
144
|
try {
|
|
145
145
|
return L($(_));
|
|
146
146
|
} catch {
|
|
@@ -158,20 +158,20 @@ function Ta() {
|
|
|
158
158
|
{
|
|
159
159
|
if (Y === 0) {
|
|
160
160
|
Pt = console.log, H = console.info, ot = console.warn, Lt = console.error, $t = console.group, Ts = console.groupCollapsed, ws = console.groupEnd;
|
|
161
|
-
var
|
|
161
|
+
var f = {
|
|
162
162
|
configurable: !0,
|
|
163
163
|
enumerable: !0,
|
|
164
164
|
value: Ps,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
info:
|
|
169
|
-
log:
|
|
170
|
-
warn:
|
|
171
|
-
error:
|
|
172
|
-
group:
|
|
173
|
-
groupCollapsed:
|
|
174
|
-
groupEnd:
|
|
168
|
+
info: f,
|
|
169
|
+
log: f,
|
|
170
|
+
warn: f,
|
|
171
|
+
error: f,
|
|
172
|
+
group: f,
|
|
173
|
+
groupCollapsed: f,
|
|
174
|
+
groupEnd: f
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
Y++;
|
|
@@ -180,31 +180,31 @@ function Ta() {
|
|
|
180
180
|
function Xo() {
|
|
181
181
|
{
|
|
182
182
|
if (Y--, Y === 0) {
|
|
183
|
-
var
|
|
183
|
+
var f = {
|
|
184
184
|
configurable: !0,
|
|
185
185
|
enumerable: !0,
|
|
186
186
|
writable: !0
|
|
187
187
|
};
|
|
188
188
|
Object.defineProperties(console, {
|
|
189
|
-
log: U({},
|
|
189
|
+
log: U({}, f, {
|
|
190
190
|
value: Pt
|
|
191
191
|
}),
|
|
192
|
-
info: U({},
|
|
192
|
+
info: U({}, f, {
|
|
193
193
|
value: H
|
|
194
194
|
}),
|
|
195
|
-
warn: U({},
|
|
195
|
+
warn: U({}, f, {
|
|
196
196
|
value: ot
|
|
197
197
|
}),
|
|
198
|
-
error: U({},
|
|
198
|
+
error: U({}, f, {
|
|
199
199
|
value: Lt
|
|
200
200
|
}),
|
|
201
|
-
group: U({},
|
|
201
|
+
group: U({}, f, {
|
|
202
202
|
value: $t
|
|
203
203
|
}),
|
|
204
|
-
groupCollapsed: U({},
|
|
204
|
+
groupCollapsed: U({}, f, {
|
|
205
205
|
value: Ts
|
|
206
206
|
}),
|
|
207
|
-
groupEnd: U({},
|
|
207
|
+
groupEnd: U({}, f, {
|
|
208
208
|
value: ws
|
|
209
209
|
})
|
|
210
210
|
});
|
|
@@ -213,17 +213,17 @@ function Ta() {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
var He = y.ReactCurrentDispatcher, qe;
|
|
216
|
-
function we(
|
|
216
|
+
function we(f, T, M) {
|
|
217
217
|
{
|
|
218
218
|
if (qe === void 0)
|
|
219
219
|
try {
|
|
220
220
|
throw Error();
|
|
221
|
-
} catch (
|
|
222
|
-
var E =
|
|
221
|
+
} catch (N) {
|
|
222
|
+
var E = N.stack.trim().match(/\n( *(at )?)/);
|
|
223
223
|
qe = E && E[1] || "";
|
|
224
224
|
}
|
|
225
225
|
return `
|
|
226
|
-
` + qe +
|
|
226
|
+
` + qe + f;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
var Qe = !1, Pe;
|
|
@@ -231,17 +231,17 @@ function Ta() {
|
|
|
231
231
|
var Yo = typeof WeakMap == "function" ? WeakMap : Map;
|
|
232
232
|
Pe = new Yo();
|
|
233
233
|
}
|
|
234
|
-
function Ss(
|
|
235
|
-
if (!
|
|
234
|
+
function Ss(f, T) {
|
|
235
|
+
if (!f || Qe)
|
|
236
236
|
return "";
|
|
237
237
|
{
|
|
238
|
-
var M = Pe.get(
|
|
238
|
+
var M = Pe.get(f);
|
|
239
239
|
if (M !== void 0)
|
|
240
240
|
return M;
|
|
241
241
|
}
|
|
242
242
|
var E;
|
|
243
243
|
Qe = !0;
|
|
244
|
-
var
|
|
244
|
+
var N = Error.prepareStackTrace;
|
|
245
245
|
Error.prepareStackTrace = void 0;
|
|
246
246
|
var _;
|
|
247
247
|
_ = He.current, He.current = null, Wo();
|
|
@@ -260,14 +260,14 @@ function Ta() {
|
|
|
260
260
|
} catch (st) {
|
|
261
261
|
E = st;
|
|
262
262
|
}
|
|
263
|
-
Reflect.construct(
|
|
263
|
+
Reflect.construct(f, [], $);
|
|
264
264
|
} else {
|
|
265
265
|
try {
|
|
266
266
|
$.call();
|
|
267
267
|
} catch (st) {
|
|
268
268
|
E = st;
|
|
269
269
|
}
|
|
270
|
-
|
|
270
|
+
f.call($.prototype);
|
|
271
271
|
}
|
|
272
272
|
} else {
|
|
273
273
|
try {
|
|
@@ -275,7 +275,7 @@ function Ta() {
|
|
|
275
275
|
} catch (st) {
|
|
276
276
|
E = st;
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
f();
|
|
279
279
|
}
|
|
280
280
|
} catch (st) {
|
|
281
281
|
if (st && E && typeof st.stack == "string") {
|
|
@@ -290,48 +290,48 @@ function Ta() {
|
|
|
290
290
|
if (K--, G--, G < 0 || j[K] !== nt[G]) {
|
|
291
291
|
var at = `
|
|
292
292
|
` + j[K].replace(" at new ", " at ");
|
|
293
|
-
return
|
|
293
|
+
return f.displayName && at.includes("<anonymous>") && (at = at.replace("<anonymous>", f.displayName)), typeof f == "function" && Pe.set(f, at), at;
|
|
294
294
|
}
|
|
295
295
|
while (K >= 1 && G >= 0);
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
} finally {
|
|
300
|
-
Qe = !1, He.current = _, Xo(), Error.prepareStackTrace =
|
|
300
|
+
Qe = !1, He.current = _, Xo(), Error.prepareStackTrace = N;
|
|
301
301
|
}
|
|
302
|
-
var
|
|
303
|
-
return typeof
|
|
302
|
+
var Ot = f ? f.displayName || f.name : "", At = Ot ? we(Ot) : "";
|
|
303
|
+
return typeof f == "function" && Pe.set(f, At), At;
|
|
304
304
|
}
|
|
305
|
-
function Ko(
|
|
306
|
-
return Ss(
|
|
305
|
+
function Ko(f, T, M) {
|
|
306
|
+
return Ss(f, !1);
|
|
307
307
|
}
|
|
308
|
-
function zo(
|
|
309
|
-
var T =
|
|
308
|
+
function zo(f) {
|
|
309
|
+
var T = f.prototype;
|
|
310
310
|
return !!(T && T.isReactComponent);
|
|
311
311
|
}
|
|
312
|
-
function Se(
|
|
313
|
-
if (
|
|
312
|
+
function Se(f, T, M) {
|
|
313
|
+
if (f == null)
|
|
314
314
|
return "";
|
|
315
|
-
if (typeof
|
|
316
|
-
return Ss(
|
|
317
|
-
if (typeof
|
|
318
|
-
return we(
|
|
319
|
-
switch (
|
|
315
|
+
if (typeof f == "function")
|
|
316
|
+
return Ss(f, zo(f));
|
|
317
|
+
if (typeof f == "string")
|
|
318
|
+
return we(f);
|
|
319
|
+
switch (f) {
|
|
320
320
|
case c:
|
|
321
321
|
return we("Suspense");
|
|
322
322
|
case u:
|
|
323
323
|
return we("SuspenseList");
|
|
324
324
|
}
|
|
325
|
-
if (typeof
|
|
326
|
-
switch (
|
|
325
|
+
if (typeof f == "object")
|
|
326
|
+
switch (f.$$typeof) {
|
|
327
327
|
case l:
|
|
328
|
-
return Ko(
|
|
329
|
-
case
|
|
330
|
-
return Se(
|
|
328
|
+
return Ko(f.render);
|
|
329
|
+
case d:
|
|
330
|
+
return Se(f.type, T, M);
|
|
331
331
|
case h: {
|
|
332
|
-
var E =
|
|
332
|
+
var E = f, N = E._payload, _ = E._init;
|
|
333
333
|
try {
|
|
334
|
-
return Se(_(
|
|
334
|
+
return Se(_(N), T, M);
|
|
335
335
|
} catch {
|
|
336
336
|
}
|
|
337
337
|
}
|
|
@@ -339,109 +339,109 @@ function Ta() {
|
|
|
339
339
|
return "";
|
|
340
340
|
}
|
|
341
341
|
var Qt = Object.prototype.hasOwnProperty, Rs = {}, Ms = y.ReactDebugCurrentFrame;
|
|
342
|
-
function Re(
|
|
343
|
-
if (
|
|
344
|
-
var T =
|
|
342
|
+
function Re(f) {
|
|
343
|
+
if (f) {
|
|
344
|
+
var T = f._owner, M = Se(f.type, f._source, T ? T.type : null);
|
|
345
345
|
Ms.setExtraStackFrame(M);
|
|
346
346
|
} else
|
|
347
347
|
Ms.setExtraStackFrame(null);
|
|
348
348
|
}
|
|
349
|
-
function Go(
|
|
349
|
+
function Go(f, T, M, E, N) {
|
|
350
350
|
{
|
|
351
351
|
var _ = Function.call.bind(Qt);
|
|
352
|
-
for (var $ in
|
|
353
|
-
if (_(
|
|
352
|
+
for (var $ in f)
|
|
353
|
+
if (_(f, $)) {
|
|
354
354
|
var j = void 0;
|
|
355
355
|
try {
|
|
356
|
-
if (typeof
|
|
357
|
-
var nt = Error((E || "React class") + ": " + M + " type `" + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
356
|
+
if (typeof f[$] != "function") {
|
|
357
|
+
var nt = Error((E || "React class") + ": " + M + " type `" + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[$] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
358
358
|
throw nt.name = "Invariant Violation", nt;
|
|
359
359
|
}
|
|
360
|
-
j =
|
|
360
|
+
j = f[$](T, $, E, M, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
361
361
|
} catch (K) {
|
|
362
362
|
j = K;
|
|
363
363
|
}
|
|
364
|
-
j && !(j instanceof Error) && (Re(
|
|
364
|
+
j && !(j instanceof Error) && (Re(N), P("%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).", E || "React class", M, $, typeof j), Re(null)), j instanceof Error && !(j.message in Rs) && (Rs[j.message] = !0, Re(N), P("Failed %s type: %s", M, j.message), Re(null));
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
var Zo = Array.isArray;
|
|
369
|
-
function Je(
|
|
370
|
-
return Zo(
|
|
369
|
+
function Je(f) {
|
|
370
|
+
return Zo(f);
|
|
371
371
|
}
|
|
372
|
-
function Ho(
|
|
372
|
+
function Ho(f) {
|
|
373
373
|
{
|
|
374
|
-
var T = typeof Symbol == "function" && Symbol.toStringTag, M = T &&
|
|
374
|
+
var T = typeof Symbol == "function" && Symbol.toStringTag, M = T && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
375
375
|
return M;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
function qo(
|
|
378
|
+
function qo(f) {
|
|
379
379
|
try {
|
|
380
|
-
return As(
|
|
380
|
+
return As(f), !1;
|
|
381
381
|
} catch {
|
|
382
382
|
return !0;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
function As(
|
|
386
|
-
return "" +
|
|
385
|
+
function As(f) {
|
|
386
|
+
return "" + f;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
if (qo(
|
|
390
|
-
return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ho(
|
|
388
|
+
function ks(f) {
|
|
389
|
+
if (qo(f))
|
|
390
|
+
return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ho(f)), As(f);
|
|
391
391
|
}
|
|
392
|
-
var
|
|
392
|
+
var Cs = y.ReactCurrentOwner, Qo = {
|
|
393
393
|
key: !0,
|
|
394
394
|
ref: !0,
|
|
395
395
|
__self: !0,
|
|
396
396
|
__source: !0
|
|
397
|
-
},
|
|
398
|
-
function Jo(
|
|
399
|
-
if (Qt.call(
|
|
400
|
-
var T = Object.getOwnPropertyDescriptor(
|
|
397
|
+
}, Vs, Es;
|
|
398
|
+
function Jo(f) {
|
|
399
|
+
if (Qt.call(f, "ref")) {
|
|
400
|
+
var T = Object.getOwnPropertyDescriptor(f, "ref").get;
|
|
401
401
|
if (T && T.isReactWarning)
|
|
402
402
|
return !1;
|
|
403
403
|
}
|
|
404
|
-
return
|
|
404
|
+
return f.ref !== void 0;
|
|
405
405
|
}
|
|
406
|
-
function ta(
|
|
407
|
-
if (Qt.call(
|
|
408
|
-
var T = Object.getOwnPropertyDescriptor(
|
|
406
|
+
function ta(f) {
|
|
407
|
+
if (Qt.call(f, "key")) {
|
|
408
|
+
var T = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
409
409
|
if (T && T.isReactWarning)
|
|
410
410
|
return !1;
|
|
411
411
|
}
|
|
412
|
-
return
|
|
412
|
+
return f.key !== void 0;
|
|
413
413
|
}
|
|
414
|
-
function ea(
|
|
415
|
-
typeof
|
|
414
|
+
function ea(f, T) {
|
|
415
|
+
typeof f.ref == "string" && Cs.current;
|
|
416
416
|
}
|
|
417
|
-
function na(
|
|
417
|
+
function na(f, T) {
|
|
418
418
|
{
|
|
419
419
|
var M = function() {
|
|
420
|
-
|
|
420
|
+
Vs || (Vs = !0, P("%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)", T));
|
|
421
421
|
};
|
|
422
|
-
M.isReactWarning = !0, Object.defineProperty(
|
|
422
|
+
M.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
423
423
|
get: M,
|
|
424
424
|
configurable: !0
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
function sa(
|
|
428
|
+
function sa(f, T) {
|
|
429
429
|
{
|
|
430
430
|
var M = function() {
|
|
431
431
|
Es || (Es = !0, P("%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)", T));
|
|
432
432
|
};
|
|
433
|
-
M.isReactWarning = !0, Object.defineProperty(
|
|
433
|
+
M.isReactWarning = !0, Object.defineProperty(f, "ref", {
|
|
434
434
|
get: M,
|
|
435
435
|
configurable: !0
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
var ia = function(
|
|
439
|
+
var ia = function(f, T, M, E, N, _, $) {
|
|
440
440
|
var j = {
|
|
441
441
|
// This tag allows us to uniquely identify this as a React Element
|
|
442
442
|
$$typeof: e,
|
|
443
443
|
// Built-in properties that belong on the element
|
|
444
|
-
type:
|
|
444
|
+
type: f,
|
|
445
445
|
key: T,
|
|
446
446
|
ref: M,
|
|
447
447
|
props: $,
|
|
@@ -462,61 +462,61 @@ function Ta() {
|
|
|
462
462
|
configurable: !1,
|
|
463
463
|
enumerable: !1,
|
|
464
464
|
writable: !1,
|
|
465
|
-
value:
|
|
465
|
+
value: N
|
|
466
466
|
}), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
|
|
467
467
|
};
|
|
468
|
-
function ra(
|
|
468
|
+
function ra(f, T, M, E, N) {
|
|
469
469
|
{
|
|
470
470
|
var _, $ = {}, j = null, nt = null;
|
|
471
|
-
M !== void 0 && (
|
|
471
|
+
M !== void 0 && (ks(M), j = "" + M), ta(T) && (ks(T.key), j = "" + T.key), Jo(T) && (nt = T.ref, ea(T, N));
|
|
472
472
|
for (_ in T)
|
|
473
473
|
Qt.call(T, _) && !Qo.hasOwnProperty(_) && ($[_] = T[_]);
|
|
474
|
-
if (
|
|
475
|
-
var K =
|
|
474
|
+
if (f && f.defaultProps) {
|
|
475
|
+
var K = f.defaultProps;
|
|
476
476
|
for (_ in K)
|
|
477
477
|
$[_] === void 0 && ($[_] = K[_]);
|
|
478
478
|
}
|
|
479
479
|
if (j || nt) {
|
|
480
|
-
var G = typeof
|
|
480
|
+
var G = typeof f == "function" ? f.displayName || f.name || "Unknown" : f;
|
|
481
481
|
j && na($, G), nt && sa($, G);
|
|
482
482
|
}
|
|
483
|
-
return ia(
|
|
483
|
+
return ia(f, j, nt, N, E, Cs.current, $);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
var tn = y.ReactCurrentOwner, Ds = y.ReactDebugCurrentFrame;
|
|
487
|
-
function
|
|
488
|
-
if (
|
|
489
|
-
var T =
|
|
487
|
+
function Nt(f) {
|
|
488
|
+
if (f) {
|
|
489
|
+
var T = f._owner, M = Se(f.type, f._source, T ? T.type : null);
|
|
490
490
|
Ds.setExtraStackFrame(M);
|
|
491
491
|
} else
|
|
492
492
|
Ds.setExtraStackFrame(null);
|
|
493
493
|
}
|
|
494
494
|
var en;
|
|
495
495
|
en = !1;
|
|
496
|
-
function nn(
|
|
497
|
-
return typeof
|
|
496
|
+
function nn(f) {
|
|
497
|
+
return typeof f == "object" && f !== null && f.$$typeof === e;
|
|
498
498
|
}
|
|
499
499
|
function js() {
|
|
500
500
|
{
|
|
501
501
|
if (tn.current) {
|
|
502
|
-
var
|
|
503
|
-
if (
|
|
502
|
+
var f = L(tn.current.type);
|
|
503
|
+
if (f)
|
|
504
504
|
return `
|
|
505
505
|
|
|
506
|
-
Check the render method of \`` +
|
|
506
|
+
Check the render method of \`` + f + "`.";
|
|
507
507
|
}
|
|
508
508
|
return "";
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
function oa(
|
|
511
|
+
function oa(f) {
|
|
512
512
|
return "";
|
|
513
513
|
}
|
|
514
514
|
var Ls = {};
|
|
515
|
-
function aa(
|
|
515
|
+
function aa(f) {
|
|
516
516
|
{
|
|
517
517
|
var T = js();
|
|
518
518
|
if (!T) {
|
|
519
|
-
var M = typeof
|
|
519
|
+
var M = typeof f == "string" ? f : f.displayName || f.name;
|
|
520
520
|
M && (T = `
|
|
521
521
|
|
|
522
522
|
Check the top-level render call using <` + M + ">.");
|
|
@@ -524,41 +524,41 @@ Check the top-level render call using <` + M + ">.");
|
|
|
524
524
|
return T;
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
function $s(
|
|
527
|
+
function $s(f, T) {
|
|
528
528
|
{
|
|
529
|
-
if (!
|
|
529
|
+
if (!f._store || f._store.validated || f.key != null)
|
|
530
530
|
return;
|
|
531
|
-
|
|
531
|
+
f._store.validated = !0;
|
|
532
532
|
var M = aa(T);
|
|
533
533
|
if (Ls[M])
|
|
534
534
|
return;
|
|
535
535
|
Ls[M] = !0;
|
|
536
536
|
var E = "";
|
|
537
|
-
|
|
537
|
+
f && f._owner && f._owner !== tn.current && (E = " It was passed a child from " + L(f._owner.type) + "."), Nt(f), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', M, E), Nt(null);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Ns(f, T) {
|
|
541
541
|
{
|
|
542
|
-
if (typeof
|
|
542
|
+
if (typeof f != "object")
|
|
543
543
|
return;
|
|
544
|
-
if (Je(
|
|
545
|
-
for (var M = 0; M <
|
|
546
|
-
var E =
|
|
544
|
+
if (Je(f))
|
|
545
|
+
for (var M = 0; M < f.length; M++) {
|
|
546
|
+
var E = f[M];
|
|
547
547
|
nn(E) && $s(E, T);
|
|
548
548
|
}
|
|
549
|
-
else if (nn(
|
|
550
|
-
|
|
551
|
-
else if (
|
|
552
|
-
var
|
|
553
|
-
if (typeof
|
|
554
|
-
for (var _ =
|
|
549
|
+
else if (nn(f))
|
|
550
|
+
f._store && (f._store.validated = !0);
|
|
551
|
+
else if (f) {
|
|
552
|
+
var N = x(f);
|
|
553
|
+
if (typeof N == "function" && N !== f.entries)
|
|
554
|
+
for (var _ = N.call(f), $; !($ = _.next()).done; )
|
|
555
555
|
nn($.value) && $s($.value, T);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function la(
|
|
559
|
+
function la(f) {
|
|
560
560
|
{
|
|
561
|
-
var T =
|
|
561
|
+
var T = f.type;
|
|
562
562
|
if (T == null || typeof T == "string")
|
|
563
563
|
return;
|
|
564
564
|
var M;
|
|
@@ -566,46 +566,46 @@ Check the top-level render call using <` + M + ">.");
|
|
|
566
566
|
M = T.propTypes;
|
|
567
567
|
else if (typeof T == "object" && (T.$$typeof === l || // Note: Memo only checks outer props here.
|
|
568
568
|
// Inner props are checked in the reconciler.
|
|
569
|
-
T.$$typeof ===
|
|
569
|
+
T.$$typeof === d))
|
|
570
570
|
M = T.propTypes;
|
|
571
571
|
else
|
|
572
572
|
return;
|
|
573
573
|
if (M) {
|
|
574
574
|
var E = L(T);
|
|
575
|
-
Go(M,
|
|
575
|
+
Go(M, f.props, "prop", E, f);
|
|
576
576
|
} else if (T.PropTypes !== void 0 && !en) {
|
|
577
577
|
en = !0;
|
|
578
|
-
var
|
|
579
|
-
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
578
|
+
var N = L(T);
|
|
579
|
+
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
580
580
|
}
|
|
581
581
|
typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
function ca(
|
|
584
|
+
function ca(f) {
|
|
585
585
|
{
|
|
586
|
-
for (var T = Object.keys(
|
|
586
|
+
for (var T = Object.keys(f.props), M = 0; M < T.length; M++) {
|
|
587
587
|
var E = T[M];
|
|
588
588
|
if (E !== "children" && E !== "key") {
|
|
589
|
-
|
|
589
|
+
Nt(f), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), Nt(null);
|
|
590
590
|
break;
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
|
|
593
|
+
f.ref !== null && (Nt(f), P("Invalid attribute `ref` supplied to `React.Fragment`."), Nt(null));
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
var
|
|
597
|
-
function
|
|
596
|
+
var Os = {};
|
|
597
|
+
function Fs(f, T, M, E, N, _) {
|
|
598
598
|
{
|
|
599
|
-
var $ =
|
|
599
|
+
var $ = C(f);
|
|
600
600
|
if (!$) {
|
|
601
601
|
var j = "";
|
|
602
|
-
(
|
|
602
|
+
(f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (j += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
603
603
|
var nt = oa();
|
|
604
604
|
nt ? j += nt : j += js();
|
|
605
605
|
var K;
|
|
606
|
-
|
|
606
|
+
f === null ? K = "null" : Je(f) ? K = "array" : f !== void 0 && f.$$typeof === e ? (K = "<" + (L(f.type) || "Unknown") + " />", j = " Did you accidentally export a JSX literal instead of a component?") : K = typeof f, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", K, j);
|
|
607
607
|
}
|
|
608
|
-
var G = ra(
|
|
608
|
+
var G = ra(f, T, M, N, _);
|
|
609
609
|
if (G == null)
|
|
610
610
|
return G;
|
|
611
611
|
if ($) {
|
|
@@ -613,39 +613,39 @@ Check the top-level render call using <` + M + ">.");
|
|
|
613
613
|
if (at !== void 0)
|
|
614
614
|
if (E)
|
|
615
615
|
if (Je(at)) {
|
|
616
|
-
for (var
|
|
617
|
-
|
|
616
|
+
for (var Ot = 0; Ot < at.length; Ot++)
|
|
617
|
+
Ns(at[Ot], f);
|
|
618
618
|
Object.freeze && Object.freeze(at);
|
|
619
619
|
} else
|
|
620
620
|
P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
621
621
|
else
|
|
622
|
-
|
|
622
|
+
Ns(at, f);
|
|
623
623
|
}
|
|
624
624
|
if (Qt.call(T, "key")) {
|
|
625
|
-
var At = L(
|
|
625
|
+
var At = L(f), st = Object.keys(T).filter(function(ma) {
|
|
626
626
|
return ma !== "key";
|
|
627
627
|
}), sn = st.length > 0 ? "{key: someKey, " + st.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
628
|
-
if (!
|
|
628
|
+
if (!Os[At + sn]) {
|
|
629
629
|
var pa = st.length > 0 ? "{" + st.join(": ..., ") + ": ...}" : "{}";
|
|
630
630
|
P(`A props object containing a "key" prop is being spread into JSX:
|
|
631
631
|
let props = %s;
|
|
632
632
|
<%s {...props} />
|
|
633
633
|
React keys must be passed directly to JSX without using spread:
|
|
634
634
|
let props = %s;
|
|
635
|
-
<%s key={someKey} {...props} />`, sn, At, pa, At),
|
|
635
|
+
<%s key={someKey} {...props} />`, sn, At, pa, At), Os[At + sn] = !0;
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
return
|
|
638
|
+
return f === s ? ca(G) : la(G), G;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
function ua(
|
|
642
|
-
return
|
|
641
|
+
function ua(f, T, M) {
|
|
642
|
+
return Fs(f, T, M, !0);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
644
|
+
function da(f, T, M) {
|
|
645
|
+
return Fs(f, T, M, !1);
|
|
646
646
|
}
|
|
647
|
-
var
|
|
648
|
-
te.Fragment = s, te.jsx =
|
|
647
|
+
var fa = da, ha = ua;
|
|
648
|
+
te.Fragment = s, te.jsx = fa, te.jsxs = ha;
|
|
649
649
|
}()), te;
|
|
650
650
|
}
|
|
651
651
|
process.env.NODE_ENV === "production" ? xn.exports = ba() : xn.exports = Ta();
|
|
@@ -660,7 +660,7 @@ const _e = zt(null), me = zt({
|
|
|
660
660
|
isStatic: !1,
|
|
661
661
|
reducedMotion: "never"
|
|
662
662
|
});
|
|
663
|
-
class wa extends
|
|
663
|
+
class wa extends Fn.Component {
|
|
664
664
|
getSnapshotBeforeUpdate(e) {
|
|
665
665
|
const n = this.props.childRef.current;
|
|
666
666
|
if (n && e.isPresent && !this.props.isPresent) {
|
|
@@ -702,11 +702,11 @@ function Pa({ children: t, isPresent: e }) {
|
|
|
702
702
|
`), () => {
|
|
703
703
|
document.head.removeChild(u);
|
|
704
704
|
};
|
|
705
|
-
}, [e]), m.jsx(wa, { isPresent: e, childRef: s, sizeRef: i, children:
|
|
705
|
+
}, [e]), m.jsx(wa, { isPresent: e, childRef: s, sizeRef: i, children: Fn.cloneElement(t, { ref: s }) });
|
|
706
706
|
}
|
|
707
707
|
const Sa = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: o, mode: r }) => {
|
|
708
|
-
const a = Gt(Ra), l = Bn(), c = In((
|
|
709
|
-
a.set(
|
|
708
|
+
const a = Gt(Ra), l = Bn(), c = In((d) => {
|
|
709
|
+
a.set(d, !0);
|
|
710
710
|
for (const h of a.values())
|
|
711
711
|
if (!h)
|
|
712
712
|
return;
|
|
@@ -718,7 +718,7 @@ const Sa = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom:
|
|
|
718
718
|
isPresent: n,
|
|
719
719
|
custom: i,
|
|
720
720
|
onExitComplete: c,
|
|
721
|
-
register: (
|
|
721
|
+
register: (d) => (a.set(d, !1), () => a.delete(d))
|
|
722
722
|
}),
|
|
723
723
|
/**
|
|
724
724
|
* If the presence of a child affects the layout of the components around it,
|
|
@@ -728,8 +728,8 @@ const Sa = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom:
|
|
|
728
728
|
o ? [Math.random(), c] : [n, c]
|
|
729
729
|
);
|
|
730
730
|
return I(() => {
|
|
731
|
-
a.forEach((
|
|
732
|
-
}, [n]),
|
|
731
|
+
a.forEach((d, h) => a.set(h, !1));
|
|
732
|
+
}, [n]), Fn.useEffect(() => {
|
|
733
733
|
!n && !a.size && s && s();
|
|
734
734
|
}, [n]), r === "popLayout" && (t = m.jsx(Pa, { isPresent: n, children: t })), m.jsx(_e.Provider, { value: u, children: t });
|
|
735
735
|
};
|
|
@@ -741,7 +741,7 @@ function cr(t = !0) {
|
|
|
741
741
|
if (e === null)
|
|
742
742
|
return [!0, null];
|
|
743
743
|
const { isPresent: n, onExitComplete: s, register: i } = e, o = Bn();
|
|
744
|
-
|
|
744
|
+
ft(() => {
|
|
745
745
|
t && i(o);
|
|
746
746
|
}, [t]);
|
|
747
747
|
const r = In(() => t && s && s(o), [o, s, t]);
|
|
@@ -754,29 +754,29 @@ function _s(t) {
|
|
|
754
754
|
ya(n) && e.push(n);
|
|
755
755
|
}), e;
|
|
756
756
|
}
|
|
757
|
-
const Wn = typeof window < "u", ge = Wn ? va :
|
|
758
|
-
const [a, l] = cr(r), c = I(() => _s(t), [t]), u = r && !a ? [] : c.map(Me),
|
|
757
|
+
const Wn = typeof window < "u", ge = Wn ? va : ft, Ma = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: o = "sync", propagate: r = !1 }) => {
|
|
758
|
+
const [a, l] = cr(r), c = I(() => _s(t), [t]), u = r && !a ? [] : c.map(Me), d = B(!0), h = B(c), p = Gt(() => /* @__PURE__ */ new Map()), [g, v] = bt(c), [x, y] = bt(c);
|
|
759
759
|
ge(() => {
|
|
760
|
-
|
|
761
|
-
for (let
|
|
762
|
-
const w = Me(x[
|
|
760
|
+
d.current = !1, h.current = c;
|
|
761
|
+
for (let k = 0; k < x.length; k++) {
|
|
762
|
+
const w = Me(x[k]);
|
|
763
763
|
u.includes(w) ? p.delete(w) : p.get(w) !== !0 && p.set(w, !1);
|
|
764
764
|
}
|
|
765
765
|
}, [x, u.length, u.join("-")]);
|
|
766
766
|
const P = [];
|
|
767
767
|
if (c !== g) {
|
|
768
|
-
let
|
|
768
|
+
let k = [...c];
|
|
769
769
|
for (let w = 0; w < x.length; w++) {
|
|
770
770
|
const A = x[w], b = Me(A);
|
|
771
|
-
u.includes(b) || (
|
|
771
|
+
u.includes(b) || (k.splice(w, 0, A), P.push(A));
|
|
772
772
|
}
|
|
773
|
-
o === "wait" && P.length && (
|
|
773
|
+
o === "wait" && P.length && (k = P), y(_s(k)), v(c);
|
|
774
774
|
return;
|
|
775
775
|
}
|
|
776
776
|
process.env.NODE_ENV !== "production" && o === "wait" && x.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.`);
|
|
777
777
|
const { forceRender: S } = Q(Un);
|
|
778
|
-
return m.jsx(m.Fragment, { children: x.map((
|
|
779
|
-
const w = Me(
|
|
778
|
+
return m.jsx(m.Fragment, { children: x.map((k) => {
|
|
779
|
+
const w = Me(k), A = r && !a ? !1 : c === x || u.includes(w), b = () => {
|
|
780
780
|
if (p.has(w))
|
|
781
781
|
p.set(w, !0);
|
|
782
782
|
else
|
|
@@ -786,7 +786,7 @@ const Wn = typeof window < "u", ge = Wn ? va : dt, Ma = ({ children: t, custom:
|
|
|
786
786
|
D || (R = !1);
|
|
787
787
|
}), R && (S == null || S(), y(h.current), r && (l == null || l()), s && s());
|
|
788
788
|
};
|
|
789
|
-
return m.jsx(Sa, { isPresent: A, initial: !
|
|
789
|
+
return m.jsx(Sa, { isPresent: A, initial: !d.current || n ? void 0 : !1, custom: A ? void 0 : e, presenceAffectsLayout: i, mode: o, onExitComplete: A ? void 0 : b, children: k }, w);
|
|
790
790
|
}) });
|
|
791
791
|
}, it = /* @__NO_SIDE_EFFECTS__ */ (t) => t;
|
|
792
792
|
let Zt = it, gt = it;
|
|
@@ -807,7 +807,7 @@ const Wt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
|
807
807
|
}, ht = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, vt = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3, Aa = {
|
|
808
808
|
useManualTiming: !1
|
|
809
809
|
};
|
|
810
|
-
function
|
|
810
|
+
function ka(t) {
|
|
811
811
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, i = !1;
|
|
812
812
|
const o = /* @__PURE__ */ new WeakSet();
|
|
813
813
|
let r = {
|
|
@@ -822,8 +822,8 @@ function Ca(t) {
|
|
|
822
822
|
/**
|
|
823
823
|
* Schedule a process to run on the next frame.
|
|
824
824
|
*/
|
|
825
|
-
schedule: (c, u = !1,
|
|
826
|
-
const p =
|
|
825
|
+
schedule: (c, u = !1, d = !1) => {
|
|
826
|
+
const p = d && s ? e : n;
|
|
827
827
|
return u && o.add(c), p.has(c) || p.add(c), c;
|
|
828
828
|
},
|
|
829
829
|
/**
|
|
@@ -858,28 +858,28 @@ const Ae = [
|
|
|
858
858
|
// Write
|
|
859
859
|
"postRender"
|
|
860
860
|
// Compute
|
|
861
|
-
],
|
|
861
|
+
], Ca = 40;
|
|
862
862
|
function ur(t, e) {
|
|
863
863
|
let n = !1, s = !0;
|
|
864
864
|
const i = {
|
|
865
865
|
delta: 0,
|
|
866
866
|
timestamp: 0,
|
|
867
867
|
isProcessing: !1
|
|
868
|
-
}, o = () => n = !0, r = Ae.reduce((y, P) => (y[P] =
|
|
868
|
+
}, o = () => n = !0, r = Ae.reduce((y, P) => (y[P] = ka(o), y), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: d, postRender: h } = r, p = () => {
|
|
869
869
|
const y = performance.now();
|
|
870
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp,
|
|
870
|
+
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp, Ca), 1), i.timestamp = y, i.isProcessing = !0, a.process(i), l.process(i), c.process(i), u.process(i), d.process(i), h.process(i), i.isProcessing = !1, n && e && (s = !1, t(p));
|
|
871
871
|
}, g = () => {
|
|
872
872
|
n = !0, s = !0, i.isProcessing || t(p);
|
|
873
873
|
};
|
|
874
874
|
return { schedule: Ae.reduce((y, P) => {
|
|
875
875
|
const S = r[P];
|
|
876
|
-
return y[P] = (
|
|
876
|
+
return y[P] = (k, w = !1, A = !1) => (n || g(), S.schedule(k, w, A)), y;
|
|
877
877
|
}, {}), cancel: (y) => {
|
|
878
878
|
for (let P = 0; P < Ae.length; P++)
|
|
879
879
|
r[Ae[P]].cancel(y);
|
|
880
880
|
}, state: i, steps: r };
|
|
881
881
|
}
|
|
882
|
-
const { schedule:
|
|
882
|
+
const { schedule: F, cancel: Tt, state: q, steps: rn } = ur(typeof requestAnimationFrame < "u" ? requestAnimationFrame : it, !0), dr = zt({ strict: !1 }), Us = {
|
|
883
883
|
animation: [
|
|
884
884
|
"animate",
|
|
885
885
|
"variants",
|
|
@@ -903,7 +903,7 @@ for (const t in Us)
|
|
|
903
903
|
Xt[t] = {
|
|
904
904
|
isEnabled: (e) => Us[t].some((n) => !!e[n])
|
|
905
905
|
};
|
|
906
|
-
function
|
|
906
|
+
function Va(t) {
|
|
907
907
|
for (const e in t)
|
|
908
908
|
Xt[e] = {
|
|
909
909
|
...Xt[e],
|
|
@@ -945,9 +945,9 @@ const Ea = /* @__PURE__ */ new Set([
|
|
|
945
945
|
function je(t) {
|
|
946
946
|
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Ea.has(t);
|
|
947
947
|
}
|
|
948
|
-
let
|
|
948
|
+
let fr = (t) => !je(t);
|
|
949
949
|
function Da(t) {
|
|
950
|
-
t && (
|
|
950
|
+
t && (fr = (e) => e.startsWith("on") ? !je(e) : t(e));
|
|
951
951
|
}
|
|
952
952
|
try {
|
|
953
953
|
Da(require("@emotion/is-prop-valid").default);
|
|
@@ -956,7 +956,7 @@ try {
|
|
|
956
956
|
function ja(t, e, n) {
|
|
957
957
|
const s = {};
|
|
958
958
|
for (const i in t)
|
|
959
|
-
i === "values" && typeof t.values == "object" || (
|
|
959
|
+
i === "values" && typeof t.values == "object" || (fr(i) || n === !0 && je(i) || !e && !je(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
960
960
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
961
961
|
return s;
|
|
962
962
|
}
|
|
@@ -978,7 +978,7 @@ function La(t) {
|
|
|
978
978
|
});
|
|
979
979
|
}
|
|
980
980
|
const We = zt({});
|
|
981
|
-
function
|
|
981
|
+
function de(t) {
|
|
982
982
|
return typeof t == "string" || Array.isArray(t);
|
|
983
983
|
}
|
|
984
984
|
function Xe(t) {
|
|
@@ -994,7 +994,7 @@ const Yn = [
|
|
|
994
994
|
"exit"
|
|
995
995
|
], Kn = ["initial", ...Yn];
|
|
996
996
|
function Ye(t) {
|
|
997
|
-
return Xe(t.animate) || Kn.some((e) =>
|
|
997
|
+
return Xe(t.animate) || Kn.some((e) => de(t[e]));
|
|
998
998
|
}
|
|
999
999
|
function hr(t) {
|
|
1000
1000
|
return !!(Ye(t) || t.variants);
|
|
@@ -1003,27 +1003,27 @@ function $a(t, e) {
|
|
|
1003
1003
|
if (Ye(t)) {
|
|
1004
1004
|
const { initial: n, animate: s } = t;
|
|
1005
1005
|
return {
|
|
1006
|
-
initial: n === !1 ||
|
|
1007
|
-
animate:
|
|
1006
|
+
initial: n === !1 || de(n) ? n : void 0,
|
|
1007
|
+
animate: de(s) ? s : void 0
|
|
1008
1008
|
};
|
|
1009
1009
|
}
|
|
1010
1010
|
return t.inherit !== !1 ? e : {};
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Na(t) {
|
|
1013
1013
|
const { initial: e, animate: n } = $a(t, Q(We));
|
|
1014
1014
|
return I(() => ({ initial: e, animate: n }), [Xs(e), Xs(n)]);
|
|
1015
1015
|
}
|
|
1016
1016
|
function Xs(t) {
|
|
1017
1017
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
1018
1018
|
}
|
|
1019
|
-
const
|
|
1020
|
-
function
|
|
1019
|
+
const Oa = Symbol.for("motionComponentSymbol");
|
|
1020
|
+
function Ft(t) {
|
|
1021
1021
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Fa(t, e, n) {
|
|
1024
1024
|
return In(
|
|
1025
1025
|
(s) => {
|
|
1026
|
-
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) :
|
|
1026
|
+
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Ft(n) && (n.current = s));
|
|
1027
1027
|
},
|
|
1028
1028
|
/**
|
|
1029
1029
|
* Only pass a new ref callback to React if we've received a visual element
|
|
@@ -1036,8 +1036,8 @@ function Na(t, e, n) {
|
|
|
1036
1036
|
const zn = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Ba = "framerAppearId", pr = "data-" + zn(Ba), { schedule: Gn } = ur(queueMicrotask, !1), mr = zt({});
|
|
1037
1037
|
function Ia(t, e, n, s, i) {
|
|
1038
1038
|
var o, r;
|
|
1039
|
-
const { visualElement: a } = Q(We), l = Q(
|
|
1040
|
-
s = s || l.renderer, !
|
|
1039
|
+
const { visualElement: a } = Q(We), l = Q(dr), c = Q(_e), u = Q(me).reducedMotion, d = B(null);
|
|
1040
|
+
s = s || l.renderer, !d.current && s && (d.current = s(t, {
|
|
1041
1041
|
visualState: e,
|
|
1042
1042
|
parent: a,
|
|
1043
1043
|
props: n,
|
|
@@ -1045,8 +1045,8 @@ function Ia(t, e, n, s, i) {
|
|
|
1045
1045
|
blockInitialAnimation: c ? c.initial === !1 : !1,
|
|
1046
1046
|
reducedMotionConfig: u
|
|
1047
1047
|
}));
|
|
1048
|
-
const h =
|
|
1049
|
-
h && !h.projection && i && (h.type === "html" || h.type === "svg") && _a(
|
|
1048
|
+
const h = d.current, p = Q(mr);
|
|
1049
|
+
h && !h.projection && i && (h.type === "html" || h.type === "svg") && _a(d.current, n, i, p);
|
|
1050
1050
|
const g = B(!1);
|
|
1051
1051
|
Ie(() => {
|
|
1052
1052
|
h && g.current && h.update(n, c);
|
|
@@ -1054,7 +1054,7 @@ function Ia(t, e, n, s, i) {
|
|
|
1054
1054
|
const v = n[pr], x = B(!!v && !(!((o = window.MotionHandoffIsComplete) === null || o === void 0) && o.call(window, v)) && ((r = window.MotionHasOptimisedAnimation) === null || r === void 0 ? void 0 : r.call(window, v)));
|
|
1055
1055
|
return ge(() => {
|
|
1056
1056
|
h && (g.current = !0, window.MotionIsMounted = !0, h.updateFeatures(), Gn.render(h.render), x.current && h.animationState && h.animationState.animateChanges());
|
|
1057
|
-
}),
|
|
1057
|
+
}), ft(() => {
|
|
1058
1058
|
h && (!x.current && h.animationState && h.animationState.animateChanges(), x.current && (queueMicrotask(() => {
|
|
1059
1059
|
var y;
|
|
1060
1060
|
(y = window.MotionHandoffMarkAsComplete) === null || y === void 0 || y.call(window, v);
|
|
@@ -1066,7 +1066,7 @@ function _a(t, e, n, s) {
|
|
|
1066
1066
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : gr(t.parent)), t.projection.setOptions({
|
|
1067
1067
|
layoutId: i,
|
|
1068
1068
|
layout: o,
|
|
1069
|
-
alwaysMeasureLayout: !!r || a &&
|
|
1069
|
+
alwaysMeasureLayout: !!r || a && Ft(a),
|
|
1070
1070
|
visualElement: t,
|
|
1071
1071
|
/**
|
|
1072
1072
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
@@ -1087,31 +1087,31 @@ function gr(t) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
function Ua({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
1089
1089
|
var o, r;
|
|
1090
|
-
t &&
|
|
1090
|
+
t && Va(t);
|
|
1091
1091
|
function a(c, u) {
|
|
1092
|
-
let
|
|
1092
|
+
let d;
|
|
1093
1093
|
const h = {
|
|
1094
1094
|
...Q(me),
|
|
1095
1095
|
...c,
|
|
1096
1096
|
layoutId: Wa(c)
|
|
1097
|
-
}, { isStatic: p } = h, g =
|
|
1097
|
+
}, { isStatic: p } = h, g = Na(c), v = s(c, p);
|
|
1098
1098
|
if (!p && Wn) {
|
|
1099
1099
|
Xa(h, t);
|
|
1100
1100
|
const x = Ya(h);
|
|
1101
|
-
|
|
1101
|
+
d = x.MeasureLayout, g.visualElement = Ia(i, v, h, e, x.ProjectionNode);
|
|
1102
1102
|
}
|
|
1103
|
-
return m.jsxs(We.Provider, { value: g, children: [
|
|
1103
|
+
return m.jsxs(We.Provider, { value: g, children: [d && g.visualElement ? m.jsx(d, { visualElement: g.visualElement, ...h }) : null, n(i, c, Fa(v, g.visualElement, u), v, p, g.visualElement)] });
|
|
1104
1104
|
}
|
|
1105
1105
|
a.displayName = `motion.${typeof i == "string" ? i : `create(${(r = (o = i.displayName) !== null && o !== void 0 ? o : i.name) !== null && r !== void 0 ? r : ""})`}`;
|
|
1106
1106
|
const l = _n(a);
|
|
1107
|
-
return l[
|
|
1107
|
+
return l[Oa] = i, l;
|
|
1108
1108
|
}
|
|
1109
1109
|
function Wa({ layoutId: t }) {
|
|
1110
1110
|
const e = Q(Un).id;
|
|
1111
1111
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
1112
1112
|
}
|
|
1113
1113
|
function Xa(t, e) {
|
|
1114
|
-
const n = Q(
|
|
1114
|
+
const n = Q(dr).strict;
|
|
1115
1115
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
1116
1116
|
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
1117
1117
|
t.ignoreStrict ? Zt(!1, s) : gt(!1, s);
|
|
@@ -1192,7 +1192,7 @@ function Hn(t, e, n, s) {
|
|
|
1192
1192
|
return e;
|
|
1193
1193
|
}
|
|
1194
1194
|
const bn = (t) => Array.isArray(t), za = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Ga = (t) => bn(t) ? t[t.length - 1] || 0 : t, J = (t) => !!(t && t.getVelocity);
|
|
1195
|
-
function
|
|
1195
|
+
function Ve(t) {
|
|
1196
1196
|
const e = J(t) ? t.get() : t;
|
|
1197
1197
|
return za(e) ? e.toValue() : e;
|
|
1198
1198
|
}
|
|
@@ -1210,15 +1210,15 @@ const yr = (t) => (e, n) => {
|
|
|
1210
1210
|
function Ha(t, e, n, s) {
|
|
1211
1211
|
const i = {}, o = s(t, {});
|
|
1212
1212
|
for (const h in o)
|
|
1213
|
-
i[h] =
|
|
1213
|
+
i[h] = Ve(o[h]);
|
|
1214
1214
|
let { initial: r, animate: a } = t;
|
|
1215
1215
|
const l = Ye(t), c = hr(t);
|
|
1216
1216
|
e && c && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
|
|
1217
1217
|
let u = n ? n.initial === !1 : !1;
|
|
1218
1218
|
u = u || r === !1;
|
|
1219
|
-
const
|
|
1220
|
-
if (
|
|
1221
|
-
const h = Array.isArray(
|
|
1219
|
+
const d = u ? a : r;
|
|
1220
|
+
if (d && typeof d != "boolean" && !Xe(d)) {
|
|
1221
|
+
const h = Array.isArray(d) ? d : [d];
|
|
1222
1222
|
for (let p = 0; p < h.length; p++) {
|
|
1223
1223
|
const g = Hn(t, h[p]);
|
|
1224
1224
|
if (g) {
|
|
@@ -1226,8 +1226,8 @@ function Ha(t, e, n, s) {
|
|
|
1226
1226
|
for (const P in y) {
|
|
1227
1227
|
let S = y[P];
|
|
1228
1228
|
if (Array.isArray(S)) {
|
|
1229
|
-
const
|
|
1230
|
-
S = S[
|
|
1229
|
+
const k = u ? S.length - 1 : 0;
|
|
1230
|
+
S = S[k];
|
|
1231
1231
|
}
|
|
1232
1232
|
S !== null && (i[P] = S);
|
|
1233
1233
|
}
|
|
@@ -1260,81 +1260,81 @@ const Ht = [
|
|
|
1260
1260
|
test: (t) => typeof t == "number",
|
|
1261
1261
|
parse: parseFloat,
|
|
1262
1262
|
transform: (t) => t
|
|
1263
|
-
},
|
|
1263
|
+
}, fe = {
|
|
1264
1264
|
...qt,
|
|
1265
1265
|
transform: (t) => wt(0, 1, t)
|
|
1266
|
-
},
|
|
1266
|
+
}, ke = {
|
|
1267
1267
|
...qt,
|
|
1268
1268
|
default: 1
|
|
1269
1269
|
}, ye = (t) => ({
|
|
1270
1270
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
1271
1271
|
parse: parseFloat,
|
|
1272
1272
|
transform: (e) => `${e}${t}`
|
|
1273
|
-
}), St = /* @__PURE__ */ ye("deg"), pt = /* @__PURE__ */ ye("%"),
|
|
1273
|
+
}), St = /* @__PURE__ */ ye("deg"), pt = /* @__PURE__ */ ye("%"), V = /* @__PURE__ */ ye("px"), Ja = /* @__PURE__ */ ye("vh"), tl = /* @__PURE__ */ ye("vw"), Ks = {
|
|
1274
1274
|
...pt,
|
|
1275
1275
|
parse: (t) => pt.parse(t) / 100,
|
|
1276
1276
|
transform: (t) => pt.transform(t * 100)
|
|
1277
1277
|
}, el = {
|
|
1278
1278
|
// Border props
|
|
1279
|
-
borderWidth:
|
|
1280
|
-
borderTopWidth:
|
|
1281
|
-
borderRightWidth:
|
|
1282
|
-
borderBottomWidth:
|
|
1283
|
-
borderLeftWidth:
|
|
1284
|
-
borderRadius:
|
|
1285
|
-
radius:
|
|
1286
|
-
borderTopLeftRadius:
|
|
1287
|
-
borderTopRightRadius:
|
|
1288
|
-
borderBottomRightRadius:
|
|
1289
|
-
borderBottomLeftRadius:
|
|
1279
|
+
borderWidth: V,
|
|
1280
|
+
borderTopWidth: V,
|
|
1281
|
+
borderRightWidth: V,
|
|
1282
|
+
borderBottomWidth: V,
|
|
1283
|
+
borderLeftWidth: V,
|
|
1284
|
+
borderRadius: V,
|
|
1285
|
+
radius: V,
|
|
1286
|
+
borderTopLeftRadius: V,
|
|
1287
|
+
borderTopRightRadius: V,
|
|
1288
|
+
borderBottomRightRadius: V,
|
|
1289
|
+
borderBottomLeftRadius: V,
|
|
1290
1290
|
// Positioning props
|
|
1291
|
-
width:
|
|
1292
|
-
maxWidth:
|
|
1293
|
-
height:
|
|
1294
|
-
maxHeight:
|
|
1295
|
-
top:
|
|
1296
|
-
right:
|
|
1297
|
-
bottom:
|
|
1298
|
-
left:
|
|
1291
|
+
width: V,
|
|
1292
|
+
maxWidth: V,
|
|
1293
|
+
height: V,
|
|
1294
|
+
maxHeight: V,
|
|
1295
|
+
top: V,
|
|
1296
|
+
right: V,
|
|
1297
|
+
bottom: V,
|
|
1298
|
+
left: V,
|
|
1299
1299
|
// Spacing props
|
|
1300
|
-
padding:
|
|
1301
|
-
paddingTop:
|
|
1302
|
-
paddingRight:
|
|
1303
|
-
paddingBottom:
|
|
1304
|
-
paddingLeft:
|
|
1305
|
-
margin:
|
|
1306
|
-
marginTop:
|
|
1307
|
-
marginRight:
|
|
1308
|
-
marginBottom:
|
|
1309
|
-
marginLeft:
|
|
1300
|
+
padding: V,
|
|
1301
|
+
paddingTop: V,
|
|
1302
|
+
paddingRight: V,
|
|
1303
|
+
paddingBottom: V,
|
|
1304
|
+
paddingLeft: V,
|
|
1305
|
+
margin: V,
|
|
1306
|
+
marginTop: V,
|
|
1307
|
+
marginRight: V,
|
|
1308
|
+
marginBottom: V,
|
|
1309
|
+
marginLeft: V,
|
|
1310
1310
|
// Misc
|
|
1311
|
-
backgroundPositionX:
|
|
1312
|
-
backgroundPositionY:
|
|
1311
|
+
backgroundPositionX: V,
|
|
1312
|
+
backgroundPositionY: V
|
|
1313
1313
|
}, nl = {
|
|
1314
1314
|
rotate: St,
|
|
1315
1315
|
rotateX: St,
|
|
1316
1316
|
rotateY: St,
|
|
1317
1317
|
rotateZ: St,
|
|
1318
|
-
scale:
|
|
1319
|
-
scaleX:
|
|
1320
|
-
scaleY:
|
|
1321
|
-
scaleZ:
|
|
1318
|
+
scale: ke,
|
|
1319
|
+
scaleX: ke,
|
|
1320
|
+
scaleY: ke,
|
|
1321
|
+
scaleZ: ke,
|
|
1322
1322
|
skew: St,
|
|
1323
1323
|
skewX: St,
|
|
1324
1324
|
skewY: St,
|
|
1325
|
-
distance:
|
|
1326
|
-
translateX:
|
|
1327
|
-
translateY:
|
|
1328
|
-
translateZ:
|
|
1329
|
-
x:
|
|
1330
|
-
y:
|
|
1331
|
-
z:
|
|
1332
|
-
perspective:
|
|
1333
|
-
transformPerspective:
|
|
1334
|
-
opacity:
|
|
1325
|
+
distance: V,
|
|
1326
|
+
translateX: V,
|
|
1327
|
+
translateY: V,
|
|
1328
|
+
translateZ: V,
|
|
1329
|
+
x: V,
|
|
1330
|
+
y: V,
|
|
1331
|
+
z: V,
|
|
1332
|
+
perspective: V,
|
|
1333
|
+
transformPerspective: V,
|
|
1334
|
+
opacity: fe,
|
|
1335
1335
|
originX: Ks,
|
|
1336
1336
|
originY: Ks,
|
|
1337
|
-
originZ:
|
|
1337
|
+
originZ: V
|
|
1338
1338
|
}, zs = {
|
|
1339
1339
|
...qt,
|
|
1340
1340
|
transform: Math.round
|
|
@@ -1342,10 +1342,10 @@ const Ht = [
|
|
|
1342
1342
|
...el,
|
|
1343
1343
|
...nl,
|
|
1344
1344
|
zIndex: zs,
|
|
1345
|
-
size:
|
|
1345
|
+
size: V,
|
|
1346
1346
|
// SVG
|
|
1347
|
-
fillOpacity:
|
|
1348
|
-
strokeOpacity:
|
|
1347
|
+
fillOpacity: fe,
|
|
1348
|
+
strokeOpacity: fe,
|
|
1349
1349
|
numOctaves: zs
|
|
1350
1350
|
}, sl = {
|
|
1351
1351
|
x: "translateX",
|
|
@@ -1403,12 +1403,12 @@ const ol = {
|
|
|
1403
1403
|
function ll(t, e, n = 1, s = 0, i = !0) {
|
|
1404
1404
|
t.pathLength = 1;
|
|
1405
1405
|
const o = i ? ol : al;
|
|
1406
|
-
t[o.offset] =
|
|
1407
|
-
const r =
|
|
1406
|
+
t[o.offset] = V.transform(-s);
|
|
1407
|
+
const r = V.transform(e), a = V.transform(n);
|
|
1408
1408
|
t[o.array] = `${r} ${a}`;
|
|
1409
1409
|
}
|
|
1410
1410
|
function Gs(t, e, n) {
|
|
1411
|
-
return typeof t == "string" ? t :
|
|
1411
|
+
return typeof t == "string" ? t : V.transform(e + n * t);
|
|
1412
1412
|
}
|
|
1413
1413
|
function cl(t, e, n) {
|
|
1414
1414
|
const s = Gs(e, t.x, t.width), i = Gs(n, t.y, t.height);
|
|
@@ -1425,8 +1425,8 @@ function ts(t, {
|
|
|
1425
1425
|
pathOffset: l = 0,
|
|
1426
1426
|
// This is object creation, which we try to avoid per-frame.
|
|
1427
1427
|
...c
|
|
1428
|
-
}, u,
|
|
1429
|
-
if (Jn(t, c,
|
|
1428
|
+
}, u, d) {
|
|
1429
|
+
if (Jn(t, c, d), u) {
|
|
1430
1430
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1431
1431
|
return;
|
|
1432
1432
|
}
|
|
@@ -1501,7 +1501,7 @@ function Mr(t, e, n) {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
return s;
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1504
|
+
function dl(t, e) {
|
|
1505
1505
|
try {
|
|
1506
1506
|
e.dimensions = typeof t.getBBox == "function" ? t.getBBox() : t.getBoundingClientRect();
|
|
1507
1507
|
} catch {
|
|
@@ -1513,7 +1513,7 @@ function fl(t, e) {
|
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
const Zs = ["x", "y", "width", "height", "cx", "cy", "r"],
|
|
1516
|
+
const Zs = ["x", "y", "width", "height", "cx", "cy", "r"], fl = {
|
|
1517
1517
|
useVisualState: yr({
|
|
1518
1518
|
scrapeMotionValuesFromProps: Mr,
|
|
1519
1519
|
createRenderState: Tr,
|
|
@@ -1536,8 +1536,8 @@ const Zs = ["x", "y", "width", "height", "cx", "cy", "r"], dl = {
|
|
|
1536
1536
|
const l = Zs[a];
|
|
1537
1537
|
t[l] !== e[l] && (r = !0);
|
|
1538
1538
|
}
|
|
1539
|
-
r &&
|
|
1540
|
-
|
|
1539
|
+
r && F.read(() => {
|
|
1540
|
+
dl(n, s), F.render(() => {
|
|
1541
1541
|
ts(s, i, ns(n.tagName), t.transformTemplate), Sr(n, s);
|
|
1542
1542
|
});
|
|
1543
1543
|
});
|
|
@@ -1583,7 +1583,7 @@ function yl(t, e, n, s) {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
function vl(t = !1) {
|
|
1585
1585
|
return (n, s, i, { latestValues: o }, r) => {
|
|
1586
|
-
const l = (Zn(n) ? yl : gl)(s, o, r, n), c = ja(s, typeof n == "string", t), u = n !== lr ? { ...c, ...l, ref: i } : {}, { children:
|
|
1586
|
+
const l = (Zn(n) ? yl : gl)(s, o, r, n), c = ja(s, typeof n == "string", t), u = n !== lr ? { ...c, ...l, ref: i } : {}, { children: d } = s, h = I(() => J(d) ? d.get() : d, [d]);
|
|
1587
1587
|
return vn(n, {
|
|
1588
1588
|
...u,
|
|
1589
1589
|
children: h
|
|
@@ -1593,7 +1593,7 @@ function vl(t = !1) {
|
|
|
1593
1593
|
function xl(t, e) {
|
|
1594
1594
|
return function(s, { forwardMotionProps: i } = { forwardMotionProps: !1 }) {
|
|
1595
1595
|
const r = {
|
|
1596
|
-
...Zn(s) ?
|
|
1596
|
+
...Zn(s) ? fl : hl,
|
|
1597
1597
|
preloadedFeatures: t,
|
|
1598
1598
|
useRender: vl(i),
|
|
1599
1599
|
createVisualElement: e,
|
|
@@ -1602,7 +1602,7 @@ function xl(t, e) {
|
|
|
1602
1602
|
return Ua(r);
|
|
1603
1603
|
};
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function kr(t, e) {
|
|
1606
1606
|
if (!Array.isArray(e))
|
|
1607
1607
|
return !1;
|
|
1608
1608
|
const n = e.length;
|
|
@@ -1697,7 +1697,7 @@ function is(t, e) {
|
|
|
1697
1697
|
return t ? t[e] || t.default || t : void 0;
|
|
1698
1698
|
}
|
|
1699
1699
|
const Tn = 2e4;
|
|
1700
|
-
function
|
|
1700
|
+
function Cr(t) {
|
|
1701
1701
|
let e = 0;
|
|
1702
1702
|
const n = 50;
|
|
1703
1703
|
let s = t.next(e);
|
|
@@ -1728,7 +1728,7 @@ const $e = /* @__PURE__ */ Sl(() => {
|
|
|
1728
1728
|
return !1;
|
|
1729
1729
|
}
|
|
1730
1730
|
return !0;
|
|
1731
|
-
}, "linearEasing"),
|
|
1731
|
+
}, "linearEasing"), Vr = (t, e, n = 10) => {
|
|
1732
1732
|
let s = "";
|
|
1733
1733
|
const i = Math.max(Math.round(e / n), 2);
|
|
1734
1734
|
for (let o = 0; o < i; o++)
|
|
@@ -1751,14 +1751,14 @@ const ne = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, wn = {
|
|
|
1751
1751
|
};
|
|
1752
1752
|
function Dr(t, e) {
|
|
1753
1753
|
if (t)
|
|
1754
|
-
return typeof t == "function" && $e() ?
|
|
1754
|
+
return typeof t == "function" && $e() ? Vr(t, e) : os(t) ? ne(t) : Array.isArray(t) ? t.map((n) => Dr(n, e) || wn.easeOut) : wn[t];
|
|
1755
1755
|
}
|
|
1756
|
-
const
|
|
1756
|
+
const dt = {
|
|
1757
1757
|
x: !1,
|
|
1758
1758
|
y: !1
|
|
1759
1759
|
};
|
|
1760
1760
|
function jr() {
|
|
1761
|
-
return
|
|
1761
|
+
return dt.x || dt.y;
|
|
1762
1762
|
}
|
|
1763
1763
|
function Rl(t, e, n) {
|
|
1764
1764
|
var s;
|
|
@@ -1789,8 +1789,8 @@ function Ml(t, e, n = {}) {
|
|
|
1789
1789
|
const { target: l } = a, c = e(a);
|
|
1790
1790
|
if (typeof c != "function" || !l)
|
|
1791
1791
|
return;
|
|
1792
|
-
const u = qs((
|
|
1793
|
-
c(
|
|
1792
|
+
const u = qs((d) => {
|
|
1793
|
+
c(d), l.removeEventListener("pointerleave", u);
|
|
1794
1794
|
});
|
|
1795
1795
|
l.addEventListener("pointerleave", u, i);
|
|
1796
1796
|
});
|
|
@@ -1805,7 +1805,7 @@ const $r = (t, e) => e ? t === e ? !0 : $r(t, e.parentElement) : !1, as = (t) =>
|
|
|
1805
1805
|
"TEXTAREA",
|
|
1806
1806
|
"A"
|
|
1807
1807
|
]);
|
|
1808
|
-
function
|
|
1808
|
+
function kl(t) {
|
|
1809
1809
|
return Al.has(t.tagName) || t.tabIndex !== -1;
|
|
1810
1810
|
}
|
|
1811
1811
|
const se = /* @__PURE__ */ new WeakSet();
|
|
@@ -1817,7 +1817,7 @@ function Qs(t) {
|
|
|
1817
1817
|
function on(t, e) {
|
|
1818
1818
|
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
1819
1819
|
}
|
|
1820
|
-
const
|
|
1820
|
+
const Cl = (t, e) => {
|
|
1821
1821
|
const n = t.currentTarget;
|
|
1822
1822
|
if (!n)
|
|
1823
1823
|
return;
|
|
@@ -1835,33 +1835,33 @@ const Vl = (t, e) => {
|
|
|
1835
1835
|
function Js(t) {
|
|
1836
1836
|
return as(t) && !jr();
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function Vl(t, e, n = {}) {
|
|
1839
1839
|
const [s, i, o] = Lr(t, n), r = (a) => {
|
|
1840
1840
|
const l = a.currentTarget;
|
|
1841
1841
|
if (!Js(a) || se.has(l))
|
|
1842
1842
|
return;
|
|
1843
1843
|
se.add(l);
|
|
1844
1844
|
const c = e(a), u = (p, g) => {
|
|
1845
|
-
window.removeEventListener("pointerup",
|
|
1846
|
-
},
|
|
1845
|
+
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", h), !(!Js(p) || !se.has(l)) && (se.delete(l), typeof c == "function" && c(p, { success: g }));
|
|
1846
|
+
}, d = (p) => {
|
|
1847
1847
|
u(p, n.useGlobalTarget || $r(l, p.target));
|
|
1848
1848
|
}, h = (p) => {
|
|
1849
1849
|
u(p, !1);
|
|
1850
1850
|
};
|
|
1851
|
-
window.addEventListener("pointerup",
|
|
1851
|
+
window.addEventListener("pointerup", d, i), window.addEventListener("pointercancel", h, i);
|
|
1852
1852
|
};
|
|
1853
1853
|
return s.forEach((a) => {
|
|
1854
|
-
!
|
|
1854
|
+
!kl(a) && a.getAttribute("tabindex") === null && (a.tabIndex = 0), (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), a.addEventListener("focus", (c) => Cl(c, i), i);
|
|
1855
1855
|
}), o;
|
|
1856
1856
|
}
|
|
1857
1857
|
function El(t) {
|
|
1858
|
-
return t === "x" || t === "y" ?
|
|
1859
|
-
|
|
1860
|
-
}) :
|
|
1861
|
-
|
|
1858
|
+
return t === "x" || t === "y" ? dt[t] ? null : (dt[t] = !0, () => {
|
|
1859
|
+
dt[t] = !1;
|
|
1860
|
+
}) : dt.x || dt.y ? null : (dt.x = dt.y = !0, () => {
|
|
1861
|
+
dt.x = dt.y = !1;
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
|
-
const
|
|
1864
|
+
const Nr = /* @__PURE__ */ new Set([
|
|
1865
1865
|
"width",
|
|
1866
1866
|
"height",
|
|
1867
1867
|
"top",
|
|
@@ -1912,7 +1912,7 @@ class us {
|
|
|
1912
1912
|
this.subscriptions.length = 0;
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function Or(t, e) {
|
|
1916
1916
|
return e ? t * (1e3 / e) : 0;
|
|
1917
1917
|
}
|
|
1918
1918
|
const ti = 30, jl = (t) => !isNaN(parseFloat(t)), re = {
|
|
@@ -1986,7 +1986,7 @@ class Ll {
|
|
|
1986
1986
|
this.events[e] || (this.events[e] = new us());
|
|
1987
1987
|
const s = this.events[e].add(n);
|
|
1988
1988
|
return e === "change" ? () => {
|
|
1989
|
-
s(),
|
|
1989
|
+
s(), F.read(() => {
|
|
1990
1990
|
this.events.change.getSize() || this.stop();
|
|
1991
1991
|
});
|
|
1992
1992
|
} : s;
|
|
@@ -2059,7 +2059,7 @@ class Ll {
|
|
|
2059
2059
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > ti)
|
|
2060
2060
|
return 0;
|
|
2061
2061
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ti);
|
|
2062
|
-
return
|
|
2062
|
+
return Or(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
2063
2063
|
}
|
|
2064
2064
|
/**
|
|
2065
2065
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -2118,7 +2118,7 @@ function Yt(t, e) {
|
|
|
2118
2118
|
function $l(t, e, n) {
|
|
2119
2119
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Yt(n));
|
|
2120
2120
|
}
|
|
2121
|
-
function
|
|
2121
|
+
function ds(t, e) {
|
|
2122
2122
|
const n = Ke(t, e);
|
|
2123
2123
|
let { transitionEnd: s = {}, transition: i = {}, ...o } = n || {};
|
|
2124
2124
|
o = { ...o, ...s };
|
|
@@ -2127,23 +2127,23 @@ function fs(t, e) {
|
|
|
2127
2127
|
$l(t, r, a);
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2130
|
+
function Nl(t) {
|
|
2131
2131
|
return !!(J(t) && t.add);
|
|
2132
2132
|
}
|
|
2133
2133
|
function Pn(t, e) {
|
|
2134
2134
|
const n = t.getValue("willChange");
|
|
2135
|
-
if (
|
|
2135
|
+
if (Nl(n))
|
|
2136
2136
|
return n.add(e);
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function Fr(t) {
|
|
2139
2139
|
return t.props[pr];
|
|
2140
2140
|
}
|
|
2141
|
-
const Br = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t,
|
|
2141
|
+
const Br = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Ol = 1e-7, Fl = 12;
|
|
2142
2142
|
function Bl(t, e, n, s, i) {
|
|
2143
2143
|
let o, r, a = 0;
|
|
2144
2144
|
do
|
|
2145
2145
|
r = e + (n - e) / 2, o = Br(r, s, i) - t, o > 0 ? n = r : e = r;
|
|
2146
|
-
while (Math.abs(o) >
|
|
2146
|
+
while (Math.abs(o) > Ol && ++a < Fl);
|
|
2147
2147
|
return r;
|
|
2148
2148
|
}
|
|
2149
2149
|
function ve(t, e, n, s) {
|
|
@@ -2152,7 +2152,7 @@ function ve(t, e, n, s) {
|
|
|
2152
2152
|
const i = (o) => Bl(o, 0, 1, t, n);
|
|
2153
2153
|
return (o) => o === 0 || o === 1 ? o : Br(i(o), e, s);
|
|
2154
2154
|
}
|
|
2155
|
-
const Ir = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, _r = (t) => (e) => 1 - t(1 - e), Ur = /* @__PURE__ */ ve(0.33, 1.53, 0.69, 0.99),
|
|
2155
|
+
const Ir = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, _r = (t) => (e) => 1 - t(1 - e), Ur = /* @__PURE__ */ ve(0.33, 1.53, 0.69, 0.99), fs = /* @__PURE__ */ _r(Ur), Wr = /* @__PURE__ */ Ir(fs), Xr = (t) => (t *= 2) < 1 ? 0.5 * fs(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), hs = (t) => 1 - Math.sin(Math.acos(t)), Yr = _r(hs), Kr = Ir(hs), zr = (t) => /^0[^.\s]+$/u.test(t);
|
|
2156
2156
|
function Il(t) {
|
|
2157
2157
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || zr(t) : !0;
|
|
2158
2158
|
}
|
|
@@ -2176,7 +2176,7 @@ const Ul = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
2176
2176
|
}, Et = {
|
|
2177
2177
|
test: /* @__PURE__ */ ms("rgb", "red"),
|
|
2178
2178
|
parse: /* @__PURE__ */ Gr("red", "green", "blue"),
|
|
2179
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + an.transform(t) + ", " + an.transform(e) + ", " + an.transform(n) + ", " + oe(
|
|
2179
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + an.transform(t) + ", " + an.transform(e) + ", " + an.transform(n) + ", " + oe(fe.transform(s)) + ")"
|
|
2180
2180
|
};
|
|
2181
2181
|
function Xl(t) {
|
|
2182
2182
|
let e = "", n = "", s = "", i = "";
|
|
@@ -2194,7 +2194,7 @@ const Sn = {
|
|
|
2194
2194
|
}, Bt = {
|
|
2195
2195
|
test: /* @__PURE__ */ ms("hsl", "hue"),
|
|
2196
2196
|
parse: /* @__PURE__ */ Gr("hue", "saturation", "lightness"),
|
|
2197
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + pt.transform(oe(e)) + ", " + pt.transform(oe(n)) + ", " + oe(
|
|
2197
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + pt.transform(oe(e)) + ", " + pt.transform(oe(n)) + ", " + oe(fe.transform(s)) + ")"
|
|
2198
2198
|
}, tt = {
|
|
2199
2199
|
test: (t) => Et.test(t) || Sn.test(t) || Bt.test(t),
|
|
2200
2200
|
parse: (t) => Et.test(t) ? Et.parse(t) : Bt.test(t) ? Bt.parse(t) : Sn.parse(t),
|
|
@@ -2290,7 +2290,7 @@ function sc(t, e, n) {
|
|
|
2290
2290
|
for (const o of e)
|
|
2291
2291
|
t[o] = Jr(n, i);
|
|
2292
2292
|
}
|
|
2293
|
-
const ni = (t) => t === qt || t ===
|
|
2293
|
+
const ni = (t) => t === qt || t === V, si = (t, e) => parseFloat(t.split(", ")[e]), ii = (t, e) => (n, { transform: s }) => {
|
|
2294
2294
|
if (s === "none" || !s)
|
|
2295
2295
|
return 0;
|
|
2296
2296
|
const i = s.match(/^matrix3d\((.+)\)$/u);
|
|
@@ -2356,7 +2356,7 @@ class ys {
|
|
|
2356
2356
|
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = o, this.isAsync = r;
|
|
2357
2357
|
}
|
|
2358
2358
|
scheduleResolve() {
|
|
2359
|
-
this.isScheduled = !0, this.isAsync ? (Dt.add(this), Mn || (Mn = !0,
|
|
2359
|
+
this.isScheduled = !0, this.isAsync ? (Dt.add(this), Mn || (Mn = !0, F.read(eo), F.resolveKeyframes(to))) : (this.readKeyframes(), this.complete());
|
|
2360
2360
|
}
|
|
2361
2361
|
readKeyframes() {
|
|
2362
2362
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -2416,10 +2416,10 @@ function so(t, e, n = 1) {
|
|
|
2416
2416
|
}
|
|
2417
2417
|
return qn(i) ? so(i, e, n + 1) : i;
|
|
2418
2418
|
}
|
|
2419
|
-
const io = (t) => (e) => e.test(t),
|
|
2419
|
+
const io = (t) => (e) => e.test(t), dc = {
|
|
2420
2420
|
test: (t) => t === "auto",
|
|
2421
2421
|
parse: (t) => t
|
|
2422
|
-
}, ro = [qt,
|
|
2422
|
+
}, ro = [qt, V, pt, St, tl, Ja, dc], ri = (t) => ro.find(io(t));
|
|
2423
2423
|
class oo extends ys {
|
|
2424
2424
|
constructor(e, n, s, i, o) {
|
|
2425
2425
|
super(e, n, s, i, o, !0);
|
|
@@ -2436,7 +2436,7 @@ class oo extends ys {
|
|
|
2436
2436
|
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
|
-
if (this.resolveNoneKeyframes(), !
|
|
2439
|
+
if (this.resolveNoneKeyframes(), !Nr.has(s) || e.length !== 2)
|
|
2440
2440
|
return;
|
|
2441
2441
|
const [i, o] = e, r = ri(i), a = ri(o);
|
|
2442
2442
|
if (r !== a)
|
|
@@ -2478,7 +2478,7 @@ class oo extends ys {
|
|
|
2478
2478
|
const oi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
2479
2479
|
(Rt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
2480
2480
|
!t.startsWith("url("));
|
|
2481
|
-
function
|
|
2481
|
+
function fc(t) {
|
|
2482
2482
|
const e = t[0];
|
|
2483
2483
|
if (t.length === 1)
|
|
2484
2484
|
return !0;
|
|
@@ -2493,7 +2493,7 @@ function hc(t, e, n, s) {
|
|
|
2493
2493
|
if (e === "display" || e === "visibility")
|
|
2494
2494
|
return !0;
|
|
2495
2495
|
const o = t[t.length - 1], r = oi(i, e), a = oi(o, e);
|
|
2496
|
-
return Zt(r === a, `You are trying to animate ${e} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 :
|
|
2496
|
+
return Zt(r === a, `You are trying to animate ${e} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 : fc(t) || (n === "spring" || rs(n)) && s;
|
|
2497
2497
|
}
|
|
2498
2498
|
const pc = (t) => t !== null;
|
|
2499
2499
|
function ze(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
@@ -2595,7 +2595,7 @@ function gc({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
2595
2595
|
alpha: s
|
|
2596
2596
|
};
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function Ne(t, e) {
|
|
2599
2599
|
return (n) => n > 0 ? e : t;
|
|
2600
2600
|
}
|
|
2601
2601
|
const cn = (t, e, n) => {
|
|
@@ -2612,18 +2612,18 @@ function ai(t) {
|
|
|
2612
2612
|
const li = (t, e) => {
|
|
2613
2613
|
const n = ai(t), s = ai(e);
|
|
2614
2614
|
if (!n || !s)
|
|
2615
|
-
return
|
|
2615
|
+
return Ne(t, e);
|
|
2616
2616
|
const i = { ...n };
|
|
2617
2617
|
return (o) => (i.red = cn(n.red, s.red, o), i.green = cn(n.green, s.green, o), i.blue = cn(n.blue, s.blue, o), i.alpha = X(n.alpha, s.alpha, o), Et.transform(i));
|
|
2618
|
-
}, xc = (t, e) => (n) => e(t(n)), xe = (...t) => t.reduce(xc),
|
|
2618
|
+
}, xc = (t, e) => (n) => e(t(n)), xe = (...t) => t.reduce(xc), kn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2619
2619
|
function bc(t, e) {
|
|
2620
|
-
return
|
|
2620
|
+
return kn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
2621
2621
|
}
|
|
2622
2622
|
function Tc(t, e) {
|
|
2623
2623
|
return (n) => X(t, e, n);
|
|
2624
2624
|
}
|
|
2625
2625
|
function vs(t) {
|
|
2626
|
-
return typeof t == "number" ? Tc : typeof t == "string" ? qn(t) ?
|
|
2626
|
+
return typeof t == "number" ? Tc : typeof t == "string" ? qn(t) ? Ne : tt.test(t) ? li : Sc : Array.isArray(t) ? lo : typeof t == "object" ? tt.test(t) ? li : wc : Ne;
|
|
2627
2627
|
}
|
|
2628
2628
|
function lo(t, e) {
|
|
2629
2629
|
const n = [...t], s = n.length, i = t.map((o, r) => vs(o)(o, e[r]));
|
|
@@ -2654,7 +2654,7 @@ function Pc(t, e) {
|
|
|
2654
2654
|
}
|
|
2655
2655
|
const Sc = (t, e) => {
|
|
2656
2656
|
const n = Rt.createTransformer(e), s = he(t), i = he(e);
|
|
2657
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ?
|
|
2657
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? kn.has(t) && !i.values.length || kn.has(e) && !s.values.length ? bc(t, e) : xe(lo(Pc(s, i), i.values), n) : (Zt(!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.`), Ne(t, e));
|
|
2658
2658
|
};
|
|
2659
2659
|
function co(t, e, n) {
|
|
2660
2660
|
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? X(t, e, n) : vs(t)(t, e);
|
|
@@ -2662,7 +2662,7 @@ function co(t, e, n) {
|
|
|
2662
2662
|
const Rc = 5;
|
|
2663
2663
|
function uo(t, e, n) {
|
|
2664
2664
|
const s = Math.max(e - Rc, 0);
|
|
2665
|
-
return
|
|
2665
|
+
return Or(n - t(s), e - s);
|
|
2666
2666
|
}
|
|
2667
2667
|
const W = {
|
|
2668
2668
|
// Default spring physics
|
|
@@ -2698,19 +2698,19 @@ function Mc({ duration: t = W.duration, bounce: e = W.bounce, velocity: n = W.ve
|
|
|
2698
2698
|
Zt(t <= /* @__PURE__ */ ht(W.maxDuration), "Spring duration must be 10 seconds or less");
|
|
2699
2699
|
let r = 1 - e;
|
|
2700
2700
|
r = wt(W.minDamping, W.maxDamping, r), t = wt(W.minDuration, W.maxDuration, /* @__PURE__ */ vt(t)), r < 1 ? (i = (c) => {
|
|
2701
|
-
const u = c * r,
|
|
2701
|
+
const u = c * r, d = u * t, h = u - n, p = Cn(c, r), g = Math.exp(-d);
|
|
2702
2702
|
return un - h / p * g;
|
|
2703
2703
|
}, o = (c) => {
|
|
2704
|
-
const
|
|
2704
|
+
const d = c * r * t, h = d * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-d), v = Cn(Math.pow(c, 2), r);
|
|
2705
2705
|
return (-i(c) + un > 0 ? -1 : 1) * ((h - p) * g) / v;
|
|
2706
2706
|
}) : (i = (c) => {
|
|
2707
|
-
const u = Math.exp(-c * t),
|
|
2708
|
-
return -un + u *
|
|
2707
|
+
const u = Math.exp(-c * t), d = (c - n) * t + 1;
|
|
2708
|
+
return -un + u * d;
|
|
2709
2709
|
}, o = (c) => {
|
|
2710
|
-
const u = Math.exp(-c * t),
|
|
2711
|
-
return u *
|
|
2710
|
+
const u = Math.exp(-c * t), d = (n - c) * (t * t);
|
|
2711
|
+
return u * d;
|
|
2712
2712
|
});
|
|
2713
|
-
const a = 5 / t, l =
|
|
2713
|
+
const a = 5 / t, l = kc(i, o, a);
|
|
2714
2714
|
if (t = /* @__PURE__ */ ht(t), isNaN(l))
|
|
2715
2715
|
return {
|
|
2716
2716
|
stiffness: W.stiffness,
|
|
@@ -2727,16 +2727,16 @@ function Mc({ duration: t = W.duration, bounce: e = W.bounce, velocity: n = W.ve
|
|
|
2727
2727
|
}
|
|
2728
2728
|
}
|
|
2729
2729
|
const Ac = 12;
|
|
2730
|
-
function
|
|
2730
|
+
function kc(t, e, n) {
|
|
2731
2731
|
let s = n;
|
|
2732
2732
|
for (let i = 1; i < Ac; i++)
|
|
2733
2733
|
s = s - t(s) / e(s);
|
|
2734
2734
|
return s;
|
|
2735
2735
|
}
|
|
2736
|
-
function
|
|
2736
|
+
function Cn(t, e) {
|
|
2737
2737
|
return t * Math.sqrt(1 - e * e);
|
|
2738
2738
|
}
|
|
2739
|
-
const
|
|
2739
|
+
const Cc = ["duration", "bounce"], Vc = ["stiffness", "damping", "mass"];
|
|
2740
2740
|
function ci(t, e) {
|
|
2741
2741
|
return e.some((n) => t[n] !== void 0);
|
|
2742
2742
|
}
|
|
@@ -2749,7 +2749,7 @@ function Ec(t) {
|
|
|
2749
2749
|
isResolvedFromDuration: !1,
|
|
2750
2750
|
...t
|
|
2751
2751
|
};
|
|
2752
|
-
if (!ci(t,
|
|
2752
|
+
if (!ci(t, Vc) && ci(t, Cc))
|
|
2753
2753
|
if (t.visualDuration) {
|
|
2754
2754
|
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * wt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
2755
2755
|
e = {
|
|
@@ -2775,14 +2775,14 @@ function fo(t = W.visualDuration, e = W.bounce) {
|
|
|
2775
2775
|
bounce: e
|
|
2776
2776
|
} : t;
|
|
2777
2777
|
let { restSpeed: s, restDelta: i } = n;
|
|
2778
|
-
const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: c, mass: u, duration:
|
|
2778
|
+
const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: c, mass: u, duration: d, velocity: h, isResolvedFromDuration: p } = Ec({
|
|
2779
2779
|
...n,
|
|
2780
2780
|
velocity: -/* @__PURE__ */ vt(n.velocity || 0)
|
|
2781
2781
|
}), g = h || 0, v = c / (2 * Math.sqrt(l * u)), x = r - o, y = /* @__PURE__ */ vt(Math.sqrt(l / u)), P = Math.abs(x) < 5;
|
|
2782
2782
|
s || (s = P ? W.restSpeed.granular : W.restSpeed.default), i || (i = P ? W.restDelta.granular : W.restDelta.default);
|
|
2783
2783
|
let S;
|
|
2784
2784
|
if (v < 1) {
|
|
2785
|
-
const w =
|
|
2785
|
+
const w = Cn(y, v);
|
|
2786
2786
|
S = (A) => {
|
|
2787
2787
|
const b = Math.exp(-v * y * A);
|
|
2788
2788
|
return r - b * ((g + v * y * x) / w * Math.sin(w * A) + x * Math.cos(w * A));
|
|
@@ -2796,12 +2796,12 @@ function fo(t = W.visualDuration, e = W.bounce) {
|
|
|
2796
2796
|
return r - b * ((g + v * y * x) * Math.sinh(R) + w * x * Math.cosh(R)) / w;
|
|
2797
2797
|
};
|
|
2798
2798
|
}
|
|
2799
|
-
const
|
|
2800
|
-
calculatedDuration: p &&
|
|
2799
|
+
const k = {
|
|
2800
|
+
calculatedDuration: p && d || null,
|
|
2801
2801
|
next: (w) => {
|
|
2802
2802
|
const A = S(w);
|
|
2803
2803
|
if (p)
|
|
2804
|
-
a.done = w >=
|
|
2804
|
+
a.done = w >= d;
|
|
2805
2805
|
else {
|
|
2806
2806
|
let b = 0;
|
|
2807
2807
|
v < 1 && (b = w === 0 ? /* @__PURE__ */ ht(g) : uo(S, w, A));
|
|
@@ -2811,23 +2811,23 @@ function fo(t = W.visualDuration, e = W.bounce) {
|
|
|
2811
2811
|
return a.value = a.done ? r : A, a;
|
|
2812
2812
|
},
|
|
2813
2813
|
toString: () => {
|
|
2814
|
-
const w = Math.min(
|
|
2814
|
+
const w = Math.min(Cr(k), Tn), A = Vr((b) => k.next(w * b).value, w, 30);
|
|
2815
2815
|
return w + "ms " + A;
|
|
2816
2816
|
}
|
|
2817
2817
|
};
|
|
2818
|
-
return
|
|
2818
|
+
return k;
|
|
2819
2819
|
}
|
|
2820
2820
|
function ui({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
2821
|
-
const
|
|
2821
|
+
const d = t[0], h = {
|
|
2822
2822
|
done: !1,
|
|
2823
|
-
value:
|
|
2823
|
+
value: d
|
|
2824
2824
|
}, p = (R) => a !== void 0 && R < a || l !== void 0 && R > l, g = (R) => a === void 0 ? l : l === void 0 || Math.abs(a - R) < Math.abs(l - R) ? a : l;
|
|
2825
2825
|
let v = n * e;
|
|
2826
|
-
const x =
|
|
2827
|
-
y !== x && (v = y -
|
|
2828
|
-
const P = (R) => -v * Math.exp(-R / s), S = (R) => y + P(R),
|
|
2829
|
-
const D = P(R),
|
|
2830
|
-
h.done = Math.abs(D) <= c, h.value = h.done ? y :
|
|
2826
|
+
const x = d + v, y = r === void 0 ? x : r(x);
|
|
2827
|
+
y !== x && (v = y - d);
|
|
2828
|
+
const P = (R) => -v * Math.exp(-R / s), S = (R) => y + P(R), k = (R) => {
|
|
2829
|
+
const D = P(R), C = S(R);
|
|
2830
|
+
h.done = Math.abs(D) <= c, h.value = h.done ? y : C;
|
|
2831
2831
|
};
|
|
2832
2832
|
let w, A;
|
|
2833
2833
|
const b = (R) => {
|
|
@@ -2845,11 +2845,11 @@ function ui({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2845
2845
|
calculatedDuration: null,
|
|
2846
2846
|
next: (R) => {
|
|
2847
2847
|
let D = !1;
|
|
2848
|
-
return !A && w === void 0 && (D = !0,
|
|
2848
|
+
return !A && w === void 0 && (D = !0, k(R), b(R)), w !== void 0 && R >= w ? A.next(R - w) : (!D && k(R), h);
|
|
2849
2849
|
}
|
|
2850
2850
|
};
|
|
2851
2851
|
}
|
|
2852
|
-
const Dc = /* @__PURE__ */ ve(0.42, 0, 1, 1), jc = /* @__PURE__ */ ve(0, 0, 0.58, 1), ho = /* @__PURE__ */ ve(0.42, 0, 0.58, 1), Lc = (t) => Array.isArray(t) && typeof t[0] != "number",
|
|
2852
|
+
const Dc = /* @__PURE__ */ ve(0.42, 0, 1, 1), jc = /* @__PURE__ */ ve(0, 0, 0.58, 1), ho = /* @__PURE__ */ ve(0.42, 0, 0.58, 1), Lc = (t) => Array.isArray(t) && typeof t[0] != "number", di = {
|
|
2853
2853
|
linear: it,
|
|
2854
2854
|
easeIn: Dc,
|
|
2855
2855
|
easeInOut: ho,
|
|
@@ -2857,17 +2857,17 @@ const Dc = /* @__PURE__ */ ve(0.42, 0, 1, 1), jc = /* @__PURE__ */ ve(0, 0, 0.58
|
|
|
2857
2857
|
circIn: hs,
|
|
2858
2858
|
circInOut: Kr,
|
|
2859
2859
|
circOut: Yr,
|
|
2860
|
-
backIn:
|
|
2860
|
+
backIn: fs,
|
|
2861
2861
|
backInOut: Wr,
|
|
2862
2862
|
backOut: Ur,
|
|
2863
2863
|
anticipate: Xr
|
|
2864
|
-
},
|
|
2864
|
+
}, fi = (t) => {
|
|
2865
2865
|
if (os(t)) {
|
|
2866
2866
|
gt(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2867
2867
|
const [e, n, s, i] = t;
|
|
2868
2868
|
return ve(e, n, s, i);
|
|
2869
2869
|
} else if (typeof t == "string")
|
|
2870
|
-
return gt(
|
|
2870
|
+
return gt(di[t] !== void 0, `Invalid easing type '${t}'`), di[t];
|
|
2871
2871
|
return t;
|
|
2872
2872
|
};
|
|
2873
2873
|
function $c(t, e, n) {
|
|
@@ -2893,40 +2893,40 @@ function po(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
2893
2893
|
const a = $c(e, s, i), l = a.length, c = (u) => {
|
|
2894
2894
|
if (r && u < t[0])
|
|
2895
2895
|
return e[0];
|
|
2896
|
-
let
|
|
2896
|
+
let d = 0;
|
|
2897
2897
|
if (l > 1)
|
|
2898
|
-
for (;
|
|
2898
|
+
for (; d < t.length - 2 && !(u < t[d + 1]); d++)
|
|
2899
2899
|
;
|
|
2900
|
-
const h = /* @__PURE__ */ Wt(t[
|
|
2901
|
-
return a[
|
|
2900
|
+
const h = /* @__PURE__ */ Wt(t[d], t[d + 1], u);
|
|
2901
|
+
return a[d](h);
|
|
2902
2902
|
};
|
|
2903
2903
|
return n ? (u) => c(wt(t[0], t[o - 1], u)) : c;
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function Nc(t, e) {
|
|
2906
2906
|
const n = t[t.length - 1];
|
|
2907
2907
|
for (let s = 1; s <= e; s++) {
|
|
2908
2908
|
const i = /* @__PURE__ */ Wt(0, e, s);
|
|
2909
2909
|
t.push(X(n, 1, i));
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2912
|
+
function Oc(t) {
|
|
2913
2913
|
const e = [0];
|
|
2914
|
-
return
|
|
2914
|
+
return Nc(e, t.length - 1), e;
|
|
2915
2915
|
}
|
|
2916
|
-
function
|
|
2916
|
+
function Fc(t, e) {
|
|
2917
2917
|
return t.map((n) => n * e);
|
|
2918
2918
|
}
|
|
2919
2919
|
function Bc(t, e) {
|
|
2920
2920
|
return t.map(() => e || ho).splice(0, t.length - 1);
|
|
2921
2921
|
}
|
|
2922
|
-
function
|
|
2923
|
-
const i = Lc(s) ? s.map(
|
|
2922
|
+
function Oe({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
2923
|
+
const i = Lc(s) ? s.map(fi) : fi(s), o = {
|
|
2924
2924
|
done: !1,
|
|
2925
2925
|
value: e[0]
|
|
2926
|
-
}, r =
|
|
2926
|
+
}, r = Fc(
|
|
2927
2927
|
// Only use the provided offsets if they're the correct length
|
|
2928
2928
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2929
|
-
n && n.length === e.length ? n :
|
|
2929
|
+
n && n.length === e.length ? n : Oc(e),
|
|
2930
2930
|
t
|
|
2931
2931
|
), a = po(r, e, {
|
|
2932
2932
|
ease: Array.isArray(i) ? i : Bc(e, i)
|
|
@@ -2939,7 +2939,7 @@ function Fe({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }
|
|
|
2939
2939
|
const Ic = (t) => {
|
|
2940
2940
|
const e = ({ timestamp: n }) => t(n);
|
|
2941
2941
|
return {
|
|
2942
|
-
start: () =>
|
|
2942
|
+
start: () => F.update(e, !0),
|
|
2943
2943
|
stop: () => Tt(e),
|
|
2944
2944
|
/**
|
|
2945
2945
|
* If we're processing this frame we can use the
|
|
@@ -2950,8 +2950,8 @@ const Ic = (t) => {
|
|
|
2950
2950
|
}, _c = {
|
|
2951
2951
|
decay: ui,
|
|
2952
2952
|
inertia: ui,
|
|
2953
|
-
tween:
|
|
2954
|
-
keyframes:
|
|
2953
|
+
tween: Oe,
|
|
2954
|
+
keyframes: Oe,
|
|
2955
2955
|
spring: fo
|
|
2956
2956
|
}, Uc = (t) => t / 100;
|
|
2957
2957
|
class Ge extends ao {
|
|
@@ -2970,21 +2970,21 @@ class Ge extends ao {
|
|
|
2970
2970
|
super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
2971
2971
|
}
|
|
2972
2972
|
initPlayback(e) {
|
|
2973
|
-
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = this.options, a = rs(n) ? n : _c[n] ||
|
|
2973
|
+
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = this.options, a = rs(n) ? n : _c[n] || Oe;
|
|
2974
2974
|
let l, c;
|
|
2975
|
-
a !==
|
|
2975
|
+
a !== Oe && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && gt(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = xe(Uc, co(e[0], e[1])), e = [0, 100]);
|
|
2976
2976
|
const u = a({ ...this.options, keyframes: e });
|
|
2977
2977
|
o === "mirror" && (c = a({
|
|
2978
2978
|
...this.options,
|
|
2979
2979
|
keyframes: [...e].reverse(),
|
|
2980
2980
|
velocity: -r
|
|
2981
|
-
})), u.calculatedDuration === null && (u.calculatedDuration =
|
|
2982
|
-
const { calculatedDuration:
|
|
2981
|
+
})), u.calculatedDuration === null && (u.calculatedDuration = Cr(u));
|
|
2982
|
+
const { calculatedDuration: d } = u, h = d + i, p = h * (s + 1) - i;
|
|
2983
2983
|
return {
|
|
2984
2984
|
generator: u,
|
|
2985
2985
|
mirroredGenerator: c,
|
|
2986
2986
|
mapPercentToKeyframes: l,
|
|
2987
|
-
calculatedDuration:
|
|
2987
|
+
calculatedDuration: d,
|
|
2988
2988
|
resolvedDuration: h,
|
|
2989
2989
|
totalDuration: p
|
|
2990
2990
|
};
|
|
@@ -2999,20 +2999,20 @@ class Ge extends ao {
|
|
|
2999
2999
|
const { keyframes: R } = this.options;
|
|
3000
3000
|
return { done: !0, value: R[R.length - 1] };
|
|
3001
3001
|
}
|
|
3002
|
-
const { finalKeyframe: i, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration:
|
|
3002
|
+
const { finalKeyframe: i, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: d } = s;
|
|
3003
3003
|
if (this.startTime === null)
|
|
3004
3004
|
return o.next(0);
|
|
3005
3005
|
const { delay: h, repeat: p, repeatType: g, repeatDelay: v, onUpdate: x } = this.options;
|
|
3006
3006
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - u / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
3007
3007
|
const y = this.currentTime - h * (this.speed >= 0 ? 1 : -1), P = this.speed >= 0 ? y < 0 : y > u;
|
|
3008
3008
|
this.currentTime = Math.max(y, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
|
|
3009
|
-
let S = this.currentTime,
|
|
3009
|
+
let S = this.currentTime, k = o;
|
|
3010
3010
|
if (p) {
|
|
3011
|
-
const R = Math.min(this.currentTime, u) /
|
|
3012
|
-
let D = Math.floor(R),
|
|
3013
|
-
!
|
|
3011
|
+
const R = Math.min(this.currentTime, u) / d;
|
|
3012
|
+
let D = Math.floor(R), C = R % 1;
|
|
3013
|
+
!C && R >= 1 && (C = 1), C === 1 && D--, D = Math.min(D, p + 1), !!(D % 2) && (g === "reverse" ? (C = 1 - C, v && (C -= v / d)) : g === "mirror" && (k = r)), S = wt(0, 1, C) * d;
|
|
3014
3014
|
}
|
|
3015
|
-
const w = P ? { done: !1, value: l[0] } :
|
|
3015
|
+
const w = P ? { done: !1, value: l[0] } : k.next(S);
|
|
3016
3016
|
a && (w.value = a(w.value));
|
|
3017
3017
|
let { done: A } = w;
|
|
3018
3018
|
!P && c !== null && (A = this.speed >= 0 ? this.currentTime >= u : this.currentTime <= 0);
|
|
@@ -3102,7 +3102,7 @@ function Yc(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatTyp
|
|
|
3102
3102
|
direction: r === "reverse" ? "alternate" : "normal"
|
|
3103
3103
|
});
|
|
3104
3104
|
}
|
|
3105
|
-
const Kc = /* @__PURE__ */ Xn(() => Object.hasOwnProperty.call(Element.prototype, "animate")),
|
|
3105
|
+
const Kc = /* @__PURE__ */ Xn(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Fe = 10, zc = 2e4;
|
|
3106
3106
|
function Gc(t) {
|
|
3107
3107
|
return rs(t.type) || t.type === "spring" || !Er(t.ease);
|
|
3108
3108
|
}
|
|
@@ -3118,11 +3118,11 @@ function Zc(t, e) {
|
|
|
3118
3118
|
const i = [];
|
|
3119
3119
|
let o = 0;
|
|
3120
3120
|
for (; !s.done && o < zc; )
|
|
3121
|
-
s = n.sample(o), i.push(s.value), o +=
|
|
3121
|
+
s = n.sample(o), i.push(s.value), o += Fe;
|
|
3122
3122
|
return {
|
|
3123
3123
|
times: void 0,
|
|
3124
3124
|
keyframes: i,
|
|
3125
|
-
duration: o -
|
|
3125
|
+
duration: o - Fe,
|
|
3126
3126
|
ease: "linear"
|
|
3127
3127
|
};
|
|
3128
3128
|
}
|
|
@@ -3145,13 +3145,13 @@ class hi extends ao {
|
|
|
3145
3145
|
if (!a.owner || !a.owner.current)
|
|
3146
3146
|
return !1;
|
|
3147
3147
|
if (typeof o == "string" && $e() && Hc(o) && (o = mo[o]), Gc(this.options)) {
|
|
3148
|
-
const { onComplete:
|
|
3148
|
+
const { onComplete: d, onUpdate: h, motionValue: p, element: g, ...v } = this.options, x = Zc(e, v);
|
|
3149
3149
|
e = x.keyframes, e.length === 1 && (e[1] = e[0]), s = x.duration, i = x.times, o = x.ease, r = "keyframes";
|
|
3150
3150
|
}
|
|
3151
3151
|
const u = Yc(a.owner.current, l, e, { ...this.options, duration: s, times: i, ease: o });
|
|
3152
3152
|
return u.startTime = c ?? this.calcStartTime(), this.pendingTimeline ? (Hs(u, this.pendingTimeline), this.pendingTimeline = void 0) : u.onfinish = () => {
|
|
3153
|
-
const { onComplete:
|
|
3154
|
-
a.set(ze(e, this.options, n)),
|
|
3153
|
+
const { onComplete: d } = this.options;
|
|
3154
|
+
a.set(ze(e, this.options, n)), d && d(), this.cancel(), this.resolveFinishedPromise();
|
|
3155
3155
|
}, {
|
|
3156
3156
|
animation: u,
|
|
3157
3157
|
duration: s,
|
|
@@ -3253,7 +3253,7 @@ class hi extends ao {
|
|
|
3253
3253
|
if (n.playState === "idle" || n.playState === "finished")
|
|
3254
3254
|
return;
|
|
3255
3255
|
if (this.time) {
|
|
3256
|
-
const { motionValue: c, onUpdate: u, onComplete:
|
|
3256
|
+
const { motionValue: c, onUpdate: u, onComplete: d, element: h, ...p } = this.options, g = new Ge({
|
|
3257
3257
|
...p,
|
|
3258
3258
|
keyframes: s,
|
|
3259
3259
|
duration: i,
|
|
@@ -3262,7 +3262,7 @@ class hi extends ao {
|
|
|
3262
3262
|
times: a,
|
|
3263
3263
|
isGenerator: !0
|
|
3264
3264
|
}), v = /* @__PURE__ */ ht(this.time);
|
|
3265
|
-
c.setWithVelocity(g.sample(v -
|
|
3265
|
+
c.setWithVelocity(g.sample(v - Fe).value, g.sample(v).value, Fe);
|
|
3266
3266
|
}
|
|
3267
3267
|
const { onStop: l } = this.options;
|
|
3268
3268
|
l && l(), this.cancel();
|
|
@@ -3332,11 +3332,11 @@ const xs = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
3332
3332
|
...u,
|
|
3333
3333
|
...eu(t, u)
|
|
3334
3334
|
}), u.duration && (u.duration = /* @__PURE__ */ ht(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ ht(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
3335
|
-
let
|
|
3336
|
-
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (
|
|
3335
|
+
let d = !1;
|
|
3336
|
+
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (d = !0)), d && !o && e.get() !== void 0) {
|
|
3337
3337
|
const h = ze(u.keyframes, a);
|
|
3338
3338
|
if (h !== void 0)
|
|
3339
|
-
return
|
|
3339
|
+
return F.update(() => {
|
|
3340
3340
|
u.onUpdate(h), u.onComplete();
|
|
3341
3341
|
}), new wl([]);
|
|
3342
3342
|
}
|
|
@@ -3351,40 +3351,40 @@ function go(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3351
3351
|
let { transition: r = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
|
|
3352
3352
|
s && (r = s);
|
|
3353
3353
|
const c = [], u = i && t.animationState && t.animationState.getState()[i];
|
|
3354
|
-
for (const
|
|
3355
|
-
const h = t.getValue(
|
|
3356
|
-
if (p === void 0 || u && su(u,
|
|
3354
|
+
for (const d in l) {
|
|
3355
|
+
const h = t.getValue(d, (o = t.latestValues[d]) !== null && o !== void 0 ? o : null), p = l[d];
|
|
3356
|
+
if (p === void 0 || u && su(u, d))
|
|
3357
3357
|
continue;
|
|
3358
3358
|
const g = {
|
|
3359
3359
|
delay: n,
|
|
3360
|
-
...is(r || {},
|
|
3360
|
+
...is(r || {}, d)
|
|
3361
3361
|
};
|
|
3362
3362
|
let v = !1;
|
|
3363
3363
|
if (window.MotionHandoffAnimation) {
|
|
3364
|
-
const y =
|
|
3364
|
+
const y = Fr(t);
|
|
3365
3365
|
if (y) {
|
|
3366
|
-
const P = window.MotionHandoffAnimation(y,
|
|
3366
|
+
const P = window.MotionHandoffAnimation(y, d, F);
|
|
3367
3367
|
P !== null && (g.startTime = P, v = !0);
|
|
3368
3368
|
}
|
|
3369
3369
|
}
|
|
3370
|
-
Pn(t,
|
|
3370
|
+
Pn(t, d), h.start(xs(d, h, p, t.shouldReduceMotion && Nr.has(d) ? { type: !1 } : g, t, v));
|
|
3371
3371
|
const x = h.animation;
|
|
3372
3372
|
x && c.push(x);
|
|
3373
3373
|
}
|
|
3374
3374
|
return a && Promise.all(c).then(() => {
|
|
3375
|
-
|
|
3376
|
-
a &&
|
|
3375
|
+
F.update(() => {
|
|
3376
|
+
a && ds(t, a);
|
|
3377
3377
|
});
|
|
3378
3378
|
}), c;
|
|
3379
3379
|
}
|
|
3380
|
-
function
|
|
3380
|
+
function Vn(t, e, n = {}) {
|
|
3381
3381
|
var s;
|
|
3382
3382
|
const i = Ke(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
|
|
3383
3383
|
let { transition: o = t.getDefaultTransition() || {} } = i || {};
|
|
3384
3384
|
n.transitionOverride && (o = n.transitionOverride);
|
|
3385
3385
|
const r = i ? () => Promise.all(go(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (c = 0) => {
|
|
3386
|
-
const { delayChildren: u = 0, staggerChildren:
|
|
3387
|
-
return iu(t, e, u + c,
|
|
3386
|
+
const { delayChildren: u = 0, staggerChildren: d, staggerDirection: h } = o;
|
|
3387
|
+
return iu(t, e, u + c, d, h, n);
|
|
3388
3388
|
} : () => Promise.resolve(), { when: l } = o;
|
|
3389
3389
|
if (l) {
|
|
3390
3390
|
const [c, u] = l === "beforeChildren" ? [r, a] : [a, r];
|
|
@@ -3395,7 +3395,7 @@ function kn(t, e, n = {}) {
|
|
|
3395
3395
|
function iu(t, e, n = 0, s = 0, i = 1, o) {
|
|
3396
3396
|
const r = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (c = 0) => c * s : (c = 0) => a - c * s;
|
|
3397
3397
|
return Array.from(t.variantChildren).sort(ru).forEach((c, u) => {
|
|
3398
|
-
c.notify("AnimationStart", e), r.push(
|
|
3398
|
+
c.notify("AnimationStart", e), r.push(Vn(c, e, {
|
|
3399
3399
|
...o,
|
|
3400
3400
|
delay: n + l(u)
|
|
3401
3401
|
}).then(() => c.notify("AnimationComplete", e)));
|
|
@@ -3408,10 +3408,10 @@ function yo(t, e, n = {}) {
|
|
|
3408
3408
|
t.notify("AnimationStart", e);
|
|
3409
3409
|
let s;
|
|
3410
3410
|
if (Array.isArray(e)) {
|
|
3411
|
-
const i = e.map((o) =>
|
|
3411
|
+
const i = e.map((o) => Vn(t, o, n));
|
|
3412
3412
|
s = Promise.all(i);
|
|
3413
3413
|
} else if (typeof e == "string")
|
|
3414
|
-
s =
|
|
3414
|
+
s = Vn(t, e, n);
|
|
3415
3415
|
else {
|
|
3416
3416
|
const i = typeof e == "function" ? Ke(t, e, n.custom) : e;
|
|
3417
3417
|
s = Promise.all(go(t, i, n));
|
|
@@ -3431,7 +3431,7 @@ function vo(t) {
|
|
|
3431
3431
|
const e = {};
|
|
3432
3432
|
for (let n = 0; n < ou; n++) {
|
|
3433
3433
|
const s = Kn[n], i = t.props[s];
|
|
3434
|
-
(
|
|
3434
|
+
(de(i) || i === !1) && (e[s] = i);
|
|
3435
3435
|
}
|
|
3436
3436
|
return e;
|
|
3437
3437
|
}
|
|
@@ -3442,8 +3442,8 @@ function cu(t) {
|
|
|
3442
3442
|
function uu(t) {
|
|
3443
3443
|
let e = cu(t), n = pi(), s = !0;
|
|
3444
3444
|
const i = (l) => (c, u) => {
|
|
3445
|
-
var
|
|
3446
|
-
const h = Ke(t, u, l === "exit" ? (
|
|
3445
|
+
var d;
|
|
3446
|
+
const h = Ke(t, u, l === "exit" ? (d = t.presenceContext) === null || d === void 0 ? void 0 : d.custom : void 0);
|
|
3447
3447
|
if (h) {
|
|
3448
3448
|
const { transition: p, transitionEnd: g, ...v } = h;
|
|
3449
3449
|
c = { ...c, ...v, ...g };
|
|
@@ -3454,40 +3454,40 @@ function uu(t) {
|
|
|
3454
3454
|
e = l(t);
|
|
3455
3455
|
}
|
|
3456
3456
|
function r(l) {
|
|
3457
|
-
const { props: c } = t, u = vo(t.parent) || {},
|
|
3457
|
+
const { props: c } = t, u = vo(t.parent) || {}, d = [], h = /* @__PURE__ */ new Set();
|
|
3458
3458
|
let p = {}, g = 1 / 0;
|
|
3459
3459
|
for (let x = 0; x < lu; x++) {
|
|
3460
|
-
const y = au[x], P = n[y], S = c[y] !== void 0 ? c[y] : u[y],
|
|
3460
|
+
const y = au[x], P = n[y], S = c[y] !== void 0 ? c[y] : u[y], k = de(S), w = y === l ? P.isActive : null;
|
|
3461
3461
|
w === !1 && (g = x);
|
|
3462
|
-
let A = S === u[y] && S !== c[y] &&
|
|
3462
|
+
let A = S === u[y] && S !== c[y] && k;
|
|
3463
3463
|
if (A && s && t.manuallyAnimateOnMount && (A = !1), P.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3464
3464
|
!P.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
|
|
3465
3465
|
!S && !P.prevProp || // Or if the prop doesn't define an animation
|
|
3466
3466
|
Xe(S) || typeof S == "boolean")
|
|
3467
3467
|
continue;
|
|
3468
|
-
const b =
|
|
3468
|
+
const b = du(P.prevProp, S);
|
|
3469
3469
|
let R = b || // If we're making this variant active, we want to always make it active
|
|
3470
|
-
y === l && P.isActive && !A &&
|
|
3471
|
-
x > g &&
|
|
3472
|
-
const
|
|
3473
|
-
let
|
|
3474
|
-
w === !1 && (
|
|
3470
|
+
y === l && P.isActive && !A && k || // If we removed a higher-priority variant (i is in reverse order)
|
|
3471
|
+
x > g && k, D = !1;
|
|
3472
|
+
const C = Array.isArray(S) ? S : [S];
|
|
3473
|
+
let O = C.reduce(i(y), {});
|
|
3474
|
+
w === !1 && (O = {});
|
|
3475
3475
|
const { prevResolvedValues: Z = {} } = P, L = {
|
|
3476
3476
|
...Z,
|
|
3477
|
-
...
|
|
3477
|
+
...O
|
|
3478
3478
|
}, U = (H) => {
|
|
3479
3479
|
R = !0, h.has(H) && (D = !0, h.delete(H)), P.needsAnimating[H] = !0;
|
|
3480
3480
|
const ot = t.getValue(H);
|
|
3481
3481
|
ot && (ot.liveStyle = !1);
|
|
3482
3482
|
};
|
|
3483
3483
|
for (const H in L) {
|
|
3484
|
-
const ot =
|
|
3484
|
+
const ot = O[H], Lt = Z[H];
|
|
3485
3485
|
if (p.hasOwnProperty(H))
|
|
3486
3486
|
continue;
|
|
3487
3487
|
let $t = !1;
|
|
3488
|
-
bn(ot) && bn(Lt) ? $t = !
|
|
3488
|
+
bn(ot) && bn(Lt) ? $t = !kr(ot, Lt) : $t = ot !== Lt, $t ? ot != null ? U(H) : h.add(H) : ot !== void 0 && h.has(H) ? U(H) : P.protectedKeys[H] = !0;
|
|
3489
3489
|
}
|
|
3490
|
-
P.prevProp = S, P.prevResolvedValues =
|
|
3490
|
+
P.prevProp = S, P.prevResolvedValues = O, P.isActive && (p = { ...p, ...O }), s && t.blockInitialAnimation && (R = !1), R && (!(A && b) || D) && d.push(...C.map((H) => ({
|
|
3491
3491
|
animation: H,
|
|
3492
3492
|
options: { type: y }
|
|
3493
3493
|
})));
|
|
@@ -3497,10 +3497,10 @@ function uu(t) {
|
|
|
3497
3497
|
h.forEach((y) => {
|
|
3498
3498
|
const P = t.getBaseTarget(y), S = t.getValue(y);
|
|
3499
3499
|
S && (S.liveStyle = !0), x[y] = P ?? null;
|
|
3500
|
-
}),
|
|
3500
|
+
}), d.push({ animation: x });
|
|
3501
3501
|
}
|
|
3502
|
-
let v = !!
|
|
3503
|
-
return s && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (v = !1), s = !1, v ? e(
|
|
3502
|
+
let v = !!d.length;
|
|
3503
|
+
return s && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (v = !1), s = !1, v ? e(d) : Promise.resolve();
|
|
3504
3504
|
}
|
|
3505
3505
|
function a(l, c) {
|
|
3506
3506
|
var u;
|
|
@@ -3510,10 +3510,10 @@ function uu(t) {
|
|
|
3510
3510
|
var p;
|
|
3511
3511
|
return (p = h.animationState) === null || p === void 0 ? void 0 : p.setActive(l, c);
|
|
3512
3512
|
}), n[l].isActive = c;
|
|
3513
|
-
const
|
|
3513
|
+
const d = r(l);
|
|
3514
3514
|
for (const h in n)
|
|
3515
3515
|
n[h].protectedKeys = {};
|
|
3516
|
-
return
|
|
3516
|
+
return d;
|
|
3517
3517
|
}
|
|
3518
3518
|
return {
|
|
3519
3519
|
animateChanges: r,
|
|
@@ -3525,10 +3525,10 @@ function uu(t) {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
};
|
|
3527
3527
|
}
|
|
3528
|
-
function
|
|
3529
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
3528
|
+
function du(t, e) {
|
|
3529
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !kr(e, t) : !1;
|
|
3530
3530
|
}
|
|
3531
|
-
function
|
|
3531
|
+
function kt(t = !1) {
|
|
3532
3532
|
return {
|
|
3533
3533
|
isActive: t,
|
|
3534
3534
|
protectedKeys: {},
|
|
@@ -3538,13 +3538,13 @@ function Ct(t = !1) {
|
|
|
3538
3538
|
}
|
|
3539
3539
|
function pi() {
|
|
3540
3540
|
return {
|
|
3541
|
-
animate:
|
|
3542
|
-
whileInView:
|
|
3543
|
-
whileHover:
|
|
3544
|
-
whileTap:
|
|
3545
|
-
whileDrag:
|
|
3546
|
-
whileFocus:
|
|
3547
|
-
exit:
|
|
3541
|
+
animate: kt(!0),
|
|
3542
|
+
whileInView: kt(),
|
|
3543
|
+
whileHover: kt(),
|
|
3544
|
+
whileTap: kt(),
|
|
3545
|
+
whileDrag: kt(),
|
|
3546
|
+
whileFocus: kt(),
|
|
3547
|
+
exit: kt()
|
|
3548
3548
|
};
|
|
3549
3549
|
}
|
|
3550
3550
|
class Mt {
|
|
@@ -3554,7 +3554,7 @@ class Mt {
|
|
|
3554
3554
|
update() {
|
|
3555
3555
|
}
|
|
3556
3556
|
}
|
|
3557
|
-
class
|
|
3557
|
+
class fu extends Mt {
|
|
3558
3558
|
/**
|
|
3559
3559
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3560
3560
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -3605,7 +3605,7 @@ class pu extends Mt {
|
|
|
3605
3605
|
}
|
|
3606
3606
|
const mu = {
|
|
3607
3607
|
animation: {
|
|
3608
|
-
Feature:
|
|
3608
|
+
Feature: fu
|
|
3609
3609
|
},
|
|
3610
3610
|
exit: {
|
|
3611
3611
|
Feature: pu
|
|
@@ -3636,29 +3636,29 @@ class xo {
|
|
|
3636
3636
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3637
3637
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3638
3638
|
return;
|
|
3639
|
-
const
|
|
3639
|
+
const d = fn(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, p = yu(d.offset, { x: 0, y: 0 }) >= 3;
|
|
3640
3640
|
if (!h && !p)
|
|
3641
3641
|
return;
|
|
3642
|
-
const { point: g } =
|
|
3642
|
+
const { point: g } = d, { timestamp: v } = q;
|
|
3643
3643
|
this.history.push({ ...g, timestamp: v });
|
|
3644
3644
|
const { onStart: x, onMove: y } = this.handlers;
|
|
3645
|
-
h || (x && x(this.lastMoveEvent,
|
|
3646
|
-
}, this.handlePointerMove = (
|
|
3647
|
-
this.lastMoveEvent =
|
|
3648
|
-
}, this.handlePointerUp = (
|
|
3645
|
+
h || (x && x(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), y && y(this.lastMoveEvent, d);
|
|
3646
|
+
}, this.handlePointerMove = (d, h) => {
|
|
3647
|
+
this.lastMoveEvent = d, this.lastMoveEventInfo = dn(h, this.transformPagePoint), F.update(this.updatePoint, !0);
|
|
3648
|
+
}, this.handlePointerUp = (d, h) => {
|
|
3649
3649
|
this.end();
|
|
3650
3650
|
const { onEnd: p, onSessionEnd: g, resumeAnimation: v } = this.handlers;
|
|
3651
3651
|
if (this.dragSnapToOrigin && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3652
3652
|
return;
|
|
3653
|
-
const x =
|
|
3654
|
-
this.startEvent && p && p(
|
|
3653
|
+
const x = fn(d.type === "pointercancel" ? this.lastMoveEventInfo : dn(h, this.transformPagePoint), this.history);
|
|
3654
|
+
this.startEvent && p && p(d, x), g && g(d, x);
|
|
3655
3655
|
}, !as(e))
|
|
3656
3656
|
return;
|
|
3657
3657
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
|
|
3658
|
-
const r = be(e), a =
|
|
3658
|
+
const r = be(e), a = dn(r, this.transformPagePoint), { point: l } = a, { timestamp: c } = q;
|
|
3659
3659
|
this.history = [{ ...l, timestamp: c }];
|
|
3660
3660
|
const { onSessionStart: u } = n;
|
|
3661
|
-
u && u(e,
|
|
3661
|
+
u && u(e, fn(a, this.history)), this.removeListeners = xe(ae(this.contextWindow, "pointermove", this.handlePointerMove), ae(this.contextWindow, "pointerup", this.handlePointerUp), ae(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3662
3662
|
}
|
|
3663
3663
|
updateHandlers(e) {
|
|
3664
3664
|
this.handlers = e;
|
|
@@ -3667,13 +3667,13 @@ class xo {
|
|
|
3667
3667
|
this.removeListeners && this.removeListeners(), Tt(this.updatePoint);
|
|
3668
3668
|
}
|
|
3669
3669
|
}
|
|
3670
|
-
function
|
|
3670
|
+
function dn(t, e) {
|
|
3671
3671
|
return e ? { point: e(t.point) } : t;
|
|
3672
3672
|
}
|
|
3673
3673
|
function gi(t, e) {
|
|
3674
3674
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3675
3675
|
}
|
|
3676
|
-
function
|
|
3676
|
+
function fn({ point: t }, e) {
|
|
3677
3677
|
return {
|
|
3678
3678
|
point: t,
|
|
3679
3679
|
delta: gi(t, bo(e)),
|
|
@@ -3749,18 +3749,18 @@ function Ti(t, e) {
|
|
|
3749
3749
|
let n = e.min - t.min, s = e.max - t.max;
|
|
3750
3750
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
3751
3751
|
}
|
|
3752
|
-
function
|
|
3752
|
+
function ku(t, e) {
|
|
3753
3753
|
return {
|
|
3754
3754
|
x: Ti(t.x, e.x),
|
|
3755
3755
|
y: Ti(t.y, e.y)
|
|
3756
3756
|
};
|
|
3757
3757
|
}
|
|
3758
|
-
function
|
|
3758
|
+
function Cu(t, e) {
|
|
3759
3759
|
let n = 0.5;
|
|
3760
3760
|
const s = rt(t), i = rt(e);
|
|
3761
3761
|
return i > s ? n = /* @__PURE__ */ Wt(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ Wt(t.min, t.max - i, e.min)), wt(0, 1, n);
|
|
3762
3762
|
}
|
|
3763
|
-
function
|
|
3763
|
+
function Vu(t, e) {
|
|
3764
3764
|
const n = {};
|
|
3765
3765
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3766
3766
|
}
|
|
@@ -3821,7 +3821,7 @@ function hn(t) {
|
|
|
3821
3821
|
function Dn({ scale: t, scaleX: e, scaleY: n }) {
|
|
3822
3822
|
return !hn(t) || !hn(e) || !hn(n);
|
|
3823
3823
|
}
|
|
3824
|
-
function
|
|
3824
|
+
function Ct(t) {
|
|
3825
3825
|
return Dn(t) || So(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3826
3826
|
}
|
|
3827
3827
|
function So(t) {
|
|
@@ -3843,7 +3843,7 @@ function jn(t, e = 0, n = 1, s, i) {
|
|
|
3843
3843
|
function Ro(t, { x: e, y: n }) {
|
|
3844
3844
|
jn(t.x, e.translate, e.scale, e.originPoint), jn(t.y, n.translate, n.scale, n.originPoint);
|
|
3845
3845
|
}
|
|
3846
|
-
const
|
|
3846
|
+
const ki = 0.999999999999, Ci = 1.0000000000001;
|
|
3847
3847
|
function Lu(t, e, n, s = !1) {
|
|
3848
3848
|
const i = n.length;
|
|
3849
3849
|
if (!i)
|
|
@@ -3856,19 +3856,19 @@ function Lu(t, e, n, s = !1) {
|
|
|
3856
3856
|
l && l.props.style && l.props.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && Ut(t, {
|
|
3857
3857
|
x: -o.scroll.offset.x,
|
|
3858
3858
|
y: -o.scroll.offset.y
|
|
3859
|
-
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, Ro(t, r)), s &&
|
|
3859
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, Ro(t, r)), s && Ct(o.latestValues) && Ut(t, o.latestValues));
|
|
3860
3860
|
}
|
|
3861
|
-
e.x <
|
|
3861
|
+
e.x < Ci && e.x > ki && (e.x = 1), e.y < Ci && e.y > ki && (e.y = 1);
|
|
3862
3862
|
}
|
|
3863
3863
|
function _t(t, e) {
|
|
3864
3864
|
t.min = t.min + e, t.max = t.max + e;
|
|
3865
3865
|
}
|
|
3866
|
-
function
|
|
3866
|
+
function Vi(t, e, n, s, i = 0.5) {
|
|
3867
3867
|
const o = X(t.min, t.max, i);
|
|
3868
3868
|
jn(t, e, n, o, s);
|
|
3869
3869
|
}
|
|
3870
3870
|
function Ut(t, e) {
|
|
3871
|
-
|
|
3871
|
+
Vi(t.x, e.x, e.scaleX, e.scale, e.originX), Vi(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3872
3872
|
}
|
|
3873
3873
|
function Mo(t, e) {
|
|
3874
3874
|
return Po(ju(t.getBoundingClientRect(), e));
|
|
@@ -3877,8 +3877,8 @@ function $u(t, e, n) {
|
|
|
3877
3877
|
const s = Mo(t, n), { scroll: i } = e;
|
|
3878
3878
|
return i && (_t(s.x, i.offset.x), _t(s.y, i.offset.y)), s;
|
|
3879
3879
|
}
|
|
3880
|
-
const Ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null,
|
|
3881
|
-
class
|
|
3880
|
+
const Ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Nu = /* @__PURE__ */ new WeakMap();
|
|
3881
|
+
class Ou {
|
|
3882
3882
|
constructor(e) {
|
|
3883
3883
|
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = z(), this.visualElement = e;
|
|
3884
3884
|
}
|
|
@@ -3887,9 +3887,9 @@ class Fu {
|
|
|
3887
3887
|
if (s && s.isPresent === !1)
|
|
3888
3888
|
return;
|
|
3889
3889
|
const i = (u) => {
|
|
3890
|
-
const { dragSnapToOrigin:
|
|
3891
|
-
|
|
3892
|
-
}, o = (u,
|
|
3890
|
+
const { dragSnapToOrigin: d } = this.getProps();
|
|
3891
|
+
d ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(be(u).point);
|
|
3892
|
+
}, o = (u, d) => {
|
|
3893
3893
|
const { drag: h, dragPropagation: p, onDragStart: g } = this.getProps();
|
|
3894
3894
|
if (h && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = El(h), !this.openDragLock))
|
|
3895
3895
|
return;
|
|
@@ -3903,22 +3903,22 @@ class Fu {
|
|
|
3903
3903
|
}
|
|
3904
3904
|
}
|
|
3905
3905
|
this.originPoint[x] = y;
|
|
3906
|
-
}), g &&
|
|
3906
|
+
}), g && F.postRender(() => g(u, d)), Pn(this.visualElement, "transform");
|
|
3907
3907
|
const { animationState: v } = this.visualElement;
|
|
3908
3908
|
v && v.setActive("whileDrag", !0);
|
|
3909
|
-
}, r = (u,
|
|
3909
|
+
}, r = (u, d) => {
|
|
3910
3910
|
const { dragPropagation: h, dragDirectionLock: p, onDirectionLock: g, onDrag: v } = this.getProps();
|
|
3911
3911
|
if (!h && !this.openDragLock)
|
|
3912
3912
|
return;
|
|
3913
|
-
const { offset: x } =
|
|
3913
|
+
const { offset: x } = d;
|
|
3914
3914
|
if (p && this.currentDirection === null) {
|
|
3915
|
-
this.currentDirection =
|
|
3915
|
+
this.currentDirection = Fu(x), this.currentDirection !== null && g && g(this.currentDirection);
|
|
3916
3916
|
return;
|
|
3917
3917
|
}
|
|
3918
|
-
this.updateAxis("x",
|
|
3919
|
-
}, a = (u,
|
|
3920
|
-
var
|
|
3921
|
-
return this.getAnimationState(u) === "paused" && ((
|
|
3918
|
+
this.updateAxis("x", d.point, x), this.updateAxis("y", d.point, x), this.visualElement.render(), v && v(u, d);
|
|
3919
|
+
}, a = (u, d) => this.stop(u, d), l = () => ct((u) => {
|
|
3920
|
+
var d;
|
|
3921
|
+
return this.getAnimationState(u) === "paused" && ((d = this.getAxisMotionValue(u).animation) === null || d === void 0 ? void 0 : d.play());
|
|
3922
3922
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
3923
3923
|
this.panSession = new xo(e, {
|
|
3924
3924
|
onSessionStart: i,
|
|
@@ -3939,7 +3939,7 @@ class Fu {
|
|
|
3939
3939
|
const { velocity: i } = n;
|
|
3940
3940
|
this.startAnimation(i);
|
|
3941
3941
|
const { onDragEnd: o } = this.getProps();
|
|
3942
|
-
o &&
|
|
3942
|
+
o && F.postRender(() => o(e, n));
|
|
3943
3943
|
}
|
|
3944
3944
|
cancel() {
|
|
3945
3945
|
this.isDragging = !1;
|
|
@@ -3950,7 +3950,7 @@ class Fu {
|
|
|
3950
3950
|
}
|
|
3951
3951
|
updateAxis(e, n, s) {
|
|
3952
3952
|
const { drag: i } = this.getProps();
|
|
3953
|
-
if (!s || !
|
|
3953
|
+
if (!s || !Ce(e, i, this.currentDirection))
|
|
3954
3954
|
return;
|
|
3955
3955
|
const o = this.getAxisMotionValue(e);
|
|
3956
3956
|
let r = this.originPoint[e] + s[e];
|
|
@@ -3959,13 +3959,13 @@ class Fu {
|
|
|
3959
3959
|
resolveConstraints() {
|
|
3960
3960
|
var e;
|
|
3961
3961
|
const { dragConstraints: n, dragElastic: s } = this.getProps(), i = 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;
|
|
3962
|
-
n &&
|
|
3963
|
-
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] =
|
|
3962
|
+
n && Ft(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = Au(i.layoutBox, n) : this.constraints = !1, this.elastic = Eu(s), o !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && ct((r) => {
|
|
3963
|
+
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Vu(i.layoutBox[r], this.constraints[r]));
|
|
3964
3964
|
});
|
|
3965
3965
|
}
|
|
3966
3966
|
resolveRefConstraints() {
|
|
3967
3967
|
const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
|
|
3968
|
-
if (!e || !
|
|
3968
|
+
if (!e || !Ft(e))
|
|
3969
3969
|
return !1;
|
|
3970
3970
|
const s = e.current;
|
|
3971
3971
|
gt(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
@@ -3973,7 +3973,7 @@ class Fu {
|
|
|
3973
3973
|
if (!i || !i.layout)
|
|
3974
3974
|
return !1;
|
|
3975
3975
|
const o = $u(s, i.root, this.visualElement.getTransformPagePoint());
|
|
3976
|
-
let r =
|
|
3976
|
+
let r = ku(i.layout.layoutBox, o);
|
|
3977
3977
|
if (n) {
|
|
3978
3978
|
const a = n(Du(r));
|
|
3979
3979
|
this.hasMutatedConstraints = !!a, a && (r = Po(a));
|
|
@@ -3982,10 +3982,10 @@ class Fu {
|
|
|
3982
3982
|
}
|
|
3983
3983
|
startAnimation(e) {
|
|
3984
3984
|
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = ct((u) => {
|
|
3985
|
-
if (!
|
|
3985
|
+
if (!Ce(u, n, this.currentDirection))
|
|
3986
3986
|
return;
|
|
3987
|
-
let
|
|
3988
|
-
r && (
|
|
3987
|
+
let d = l && l[u] || {};
|
|
3988
|
+
r && (d = { min: 0, max: 0 });
|
|
3989
3989
|
const h = i ? 200 : 1e6, p = i ? 40 : 1e7, g = {
|
|
3990
3990
|
type: "inertia",
|
|
3991
3991
|
velocity: s ? e[u] : 0,
|
|
@@ -3995,7 +3995,7 @@ class Fu {
|
|
|
3995
3995
|
restDelta: 1,
|
|
3996
3996
|
restSpeed: 10,
|
|
3997
3997
|
...o,
|
|
3998
|
-
...
|
|
3998
|
+
...d
|
|
3999
3999
|
};
|
|
4000
4000
|
return this.startAxisValueAnimation(u, g);
|
|
4001
4001
|
});
|
|
@@ -4031,7 +4031,7 @@ class Fu {
|
|
|
4031
4031
|
snapToCursor(e) {
|
|
4032
4032
|
ct((n) => {
|
|
4033
4033
|
const { drag: s } = this.getProps();
|
|
4034
|
-
if (!
|
|
4034
|
+
if (!Ce(n, s, this.currentDirection))
|
|
4035
4035
|
return;
|
|
4036
4036
|
const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
|
|
4037
4037
|
if (i && i.layout) {
|
|
@@ -4049,7 +4049,7 @@ class Fu {
|
|
|
4049
4049
|
if (!this.visualElement.current)
|
|
4050
4050
|
return;
|
|
4051
4051
|
const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
|
|
4052
|
-
if (!
|
|
4052
|
+
if (!Ft(n) || !s || !this.constraints)
|
|
4053
4053
|
return;
|
|
4054
4054
|
this.stopAnimation();
|
|
4055
4055
|
const i = { x: 0, y: 0 };
|
|
@@ -4057,12 +4057,12 @@ class Fu {
|
|
|
4057
4057
|
const a = this.getAxisMotionValue(r);
|
|
4058
4058
|
if (a && this.constraints !== !1) {
|
|
4059
4059
|
const l = a.get();
|
|
4060
|
-
i[r] =
|
|
4060
|
+
i[r] = Cu({ min: l, max: l }, this.constraints[r]);
|
|
4061
4061
|
}
|
|
4062
4062
|
});
|
|
4063
4063
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
4064
4064
|
this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), ct((r) => {
|
|
4065
|
-
if (!
|
|
4065
|
+
if (!Ce(r, e, null))
|
|
4066
4066
|
return;
|
|
4067
4067
|
const a = this.getAxisMotionValue(r), { min: l, max: c } = this.constraints[r];
|
|
4068
4068
|
a.set(X(l, c, i[r]));
|
|
@@ -4071,19 +4071,19 @@ class Fu {
|
|
|
4071
4071
|
addListeners() {
|
|
4072
4072
|
if (!this.visualElement.current)
|
|
4073
4073
|
return;
|
|
4074
|
-
|
|
4074
|
+
Nu.set(this.visualElement, this);
|
|
4075
4075
|
const e = this.visualElement.current, n = ae(e, "pointerdown", (l) => {
|
|
4076
4076
|
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
4077
4077
|
c && u && this.start(l);
|
|
4078
4078
|
}), s = () => {
|
|
4079
4079
|
const { dragConstraints: l } = this.getProps();
|
|
4080
|
-
|
|
4080
|
+
Ft(l) && l.current && (this.constraints = this.resolveRefConstraints());
|
|
4081
4081
|
}, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
|
|
4082
|
-
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()),
|
|
4082
|
+
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), F.read(s);
|
|
4083
4083
|
const r = pe(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
4084
4084
|
this.isDragging && c && (ct((u) => {
|
|
4085
|
-
const
|
|
4086
|
-
|
|
4085
|
+
const d = this.getAxisMotionValue(u);
|
|
4086
|
+
d && (this.originPoint[u] += l[u].translate, d.set(d.get() + l[u].translate));
|
|
4087
4087
|
}), this.visualElement.render());
|
|
4088
4088
|
});
|
|
4089
4089
|
return () => {
|
|
@@ -4103,16 +4103,16 @@ class Fu {
|
|
|
4103
4103
|
};
|
|
4104
4104
|
}
|
|
4105
4105
|
}
|
|
4106
|
-
function
|
|
4106
|
+
function Ce(t, e, n) {
|
|
4107
4107
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
4108
4108
|
}
|
|
4109
|
-
function
|
|
4109
|
+
function Fu(t, e = 10) {
|
|
4110
4110
|
let n = null;
|
|
4111
4111
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
4112
4112
|
}
|
|
4113
4113
|
class Bu extends Mt {
|
|
4114
4114
|
constructor(e) {
|
|
4115
|
-
super(e), this.removeGroupControls = it, this.removeListeners = it, this.controls = new
|
|
4115
|
+
super(e), this.removeGroupControls = it, this.removeListeners = it, this.controls = new Ou(e);
|
|
4116
4116
|
}
|
|
4117
4117
|
mount() {
|
|
4118
4118
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -4123,7 +4123,7 @@ class Bu extends Mt {
|
|
|
4123
4123
|
}
|
|
4124
4124
|
}
|
|
4125
4125
|
const Ei = (t) => (e, n) => {
|
|
4126
|
-
t &&
|
|
4126
|
+
t && F.postRender(() => t(e, n));
|
|
4127
4127
|
};
|
|
4128
4128
|
class Iu extends Mt {
|
|
4129
4129
|
constructor() {
|
|
@@ -4142,7 +4142,7 @@ class Iu extends Mt {
|
|
|
4142
4142
|
onStart: Ei(n),
|
|
4143
4143
|
onMove: s,
|
|
4144
4144
|
onEnd: (o, r) => {
|
|
4145
|
-
delete this.session, i &&
|
|
4145
|
+
delete this.session, i && F.postRender(() => i(o, r));
|
|
4146
4146
|
}
|
|
4147
4147
|
};
|
|
4148
4148
|
}
|
|
@@ -4176,7 +4176,7 @@ const ee = {
|
|
|
4176
4176
|
if (!e.target)
|
|
4177
4177
|
return t;
|
|
4178
4178
|
if (typeof t == "string")
|
|
4179
|
-
if (
|
|
4179
|
+
if (V.test(t))
|
|
4180
4180
|
t = parseFloat(t);
|
|
4181
4181
|
else
|
|
4182
4182
|
return t;
|
|
@@ -4211,7 +4211,7 @@ class Uu extends xa {
|
|
|
4211
4211
|
}
|
|
4212
4212
|
getSnapshotBeforeUpdate(e) {
|
|
4213
4213
|
const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, r = s.projection;
|
|
4214
|
-
return r && (r.isPresent = o, i || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() ||
|
|
4214
|
+
return r && (r.isPresent = o, i || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || F.postRender(() => {
|
|
4215
4215
|
const a = r.getStack();
|
|
4216
4216
|
(!a || !a.members.length) && this.safeToRemove();
|
|
4217
4217
|
}))), null;
|
|
@@ -4234,7 +4234,7 @@ class Uu extends xa {
|
|
|
4234
4234
|
return null;
|
|
4235
4235
|
}
|
|
4236
4236
|
}
|
|
4237
|
-
function
|
|
4237
|
+
function ko(t) {
|
|
4238
4238
|
const [e, n] = cr(), s = Q(Un);
|
|
4239
4239
|
return m.jsx(Uu, { ...t, layoutGroup: s, switchLayoutGroup: Q(mr), isPresent: e, safeToRemove: n });
|
|
4240
4240
|
}
|
|
@@ -4281,9 +4281,9 @@ function Gu(t, e) {
|
|
|
4281
4281
|
const o = i - n;
|
|
4282
4282
|
o >= e && (Tt(s), t(o - e));
|
|
4283
4283
|
};
|
|
4284
|
-
return
|
|
4284
|
+
return F.read(s, !0), () => Tt(s);
|
|
4285
4285
|
}
|
|
4286
|
-
const
|
|
4286
|
+
const Co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Zu = Co.length, ji = (t) => typeof t == "string" ? parseFloat(t) : t, Li = (t) => typeof t == "number" || V.test(t);
|
|
4287
4287
|
function Hu(t, e, n, s, i, o) {
|
|
4288
4288
|
i ? (t.opacity = X(
|
|
4289
4289
|
0,
|
|
@@ -4292,7 +4292,7 @@ function Hu(t, e, n, s, i, o) {
|
|
|
4292
4292
|
qu(s)
|
|
4293
4293
|
), t.opacityExit = X(e.opacity !== void 0 ? e.opacity : 1, 0, Qu(s))) : o && (t.opacity = X(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
|
|
4294
4294
|
for (let r = 0; r < Zu; r++) {
|
|
4295
|
-
const a = `border${
|
|
4295
|
+
const a = `border${Co[r]}Radius`;
|
|
4296
4296
|
let l = $i(e, a), c = $i(n, a);
|
|
4297
4297
|
if (l === void 0 && c === void 0)
|
|
4298
4298
|
continue;
|
|
@@ -4303,34 +4303,34 @@ function Hu(t, e, n, s, i, o) {
|
|
|
4303
4303
|
function $i(t, e) {
|
|
4304
4304
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4305
4305
|
}
|
|
4306
|
-
const qu = /* @__PURE__ */
|
|
4307
|
-
function
|
|
4306
|
+
const qu = /* @__PURE__ */ Vo(0, 0.5, Yr), Qu = /* @__PURE__ */ Vo(0.5, 0.95, it);
|
|
4307
|
+
function Vo(t, e, n) {
|
|
4308
4308
|
return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ Wt(t, e, s));
|
|
4309
4309
|
}
|
|
4310
|
-
function
|
|
4310
|
+
function Ni(t, e) {
|
|
4311
4311
|
t.min = e.min, t.max = e.max;
|
|
4312
4312
|
}
|
|
4313
4313
|
function lt(t, e) {
|
|
4314
|
-
|
|
4314
|
+
Ni(t.x, e.x), Ni(t.y, e.y);
|
|
4315
4315
|
}
|
|
4316
|
-
function
|
|
4316
|
+
function Oi(t, e) {
|
|
4317
4317
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4318
4318
|
}
|
|
4319
|
-
function
|
|
4319
|
+
function Fi(t, e, n, s, i) {
|
|
4320
4320
|
return t -= e, t = Be(t, 1 / n, s), i !== void 0 && (t = Be(t, 1 / i, s)), t;
|
|
4321
4321
|
}
|
|
4322
4322
|
function Ju(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
|
|
4323
4323
|
if (pt.test(e) && (e = parseFloat(e), e = X(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4324
4324
|
return;
|
|
4325
4325
|
let a = X(o.min, o.max, s);
|
|
4326
|
-
t === o && (a -= e), t.min =
|
|
4326
|
+
t === o && (a -= e), t.min = Fi(t.min, e, n, a, i), t.max = Fi(t.max, e, n, a, i);
|
|
4327
4327
|
}
|
|
4328
4328
|
function Bi(t, e, [n, s, i], o, r) {
|
|
4329
4329
|
Ju(t, e[n], e[s], e[i], e.scale, o, r);
|
|
4330
4330
|
}
|
|
4331
|
-
const
|
|
4331
|
+
const td = ["x", "scaleX", "originX"], ed = ["y", "scaleY", "originY"];
|
|
4332
4332
|
function Ii(t, e, n, s) {
|
|
4333
|
-
Bi(t.x, e,
|
|
4333
|
+
Bi(t.x, e, td, n ? n.x : void 0, s ? s.x : void 0), Bi(t.y, e, ed, n ? n.y : void 0, s ? s.y : void 0);
|
|
4334
4334
|
}
|
|
4335
4335
|
function _i(t) {
|
|
4336
4336
|
return t.translate === 0 && t.scale === 1;
|
|
@@ -4341,7 +4341,7 @@ function Eo(t) {
|
|
|
4341
4341
|
function Ui(t, e) {
|
|
4342
4342
|
return t.min === e.min && t.max === e.max;
|
|
4343
4343
|
}
|
|
4344
|
-
function
|
|
4344
|
+
function nd(t, e) {
|
|
4345
4345
|
return Ui(t.x, e.x) && Ui(t.y, e.y);
|
|
4346
4346
|
}
|
|
4347
4347
|
function Wi(t, e) {
|
|
@@ -4356,7 +4356,7 @@ function Xi(t) {
|
|
|
4356
4356
|
function Yi(t, e) {
|
|
4357
4357
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
4358
4358
|
}
|
|
4359
|
-
class
|
|
4359
|
+
class sd {
|
|
4360
4360
|
constructor() {
|
|
4361
4361
|
this.members = [];
|
|
4362
4362
|
}
|
|
@@ -4410,23 +4410,23 @@ class sf {
|
|
|
4410
4410
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
4411
4411
|
}
|
|
4412
4412
|
}
|
|
4413
|
-
function
|
|
4413
|
+
function id(t, e, n) {
|
|
4414
4414
|
let s = "";
|
|
4415
4415
|
const i = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
|
|
4416
4416
|
if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
4417
|
-
const { transformPerspective: c, rotate: u, rotateX:
|
|
4418
|
-
c && (s = `perspective(${c}px) ${s}`), u && (s += `rotate(${u}deg) `),
|
|
4417
|
+
const { transformPerspective: c, rotate: u, rotateX: d, rotateY: h, skewX: p, skewY: g } = n;
|
|
4418
|
+
c && (s = `perspective(${c}px) ${s}`), u && (s += `rotate(${u}deg) `), d && (s += `rotateX(${d}deg) `), h && (s += `rotateY(${h}deg) `), p && (s += `skewX(${p}deg) `), g && (s += `skewY(${g}deg) `);
|
|
4419
4419
|
}
|
|
4420
4420
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
4421
4421
|
return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
|
|
4422
4422
|
}
|
|
4423
|
-
const
|
|
4423
|
+
const Vt = {
|
|
4424
4424
|
type: "projectionFrame",
|
|
4425
4425
|
totalNodes: 0,
|
|
4426
4426
|
resolvedTargetDeltas: 0,
|
|
4427
4427
|
recalculatedProjection: 0
|
|
4428
|
-
}, ie = typeof window < "u" && window.MotionDebug !== void 0, pn = ["", "X", "Y", "Z"],
|
|
4429
|
-
let
|
|
4428
|
+
}, ie = typeof window < "u" && window.MotionDebug !== void 0, pn = ["", "X", "Y", "Z"], rd = { visibility: "hidden" }, Ki = 1e3;
|
|
4429
|
+
let od = 0;
|
|
4430
4430
|
function mn(t, e, n, s) {
|
|
4431
4431
|
const { latestValues: i } = e;
|
|
4432
4432
|
i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
|
|
@@ -4437,10 +4437,10 @@ function jo(t) {
|
|
|
4437
4437
|
const { visualElement: e } = t.options;
|
|
4438
4438
|
if (!e)
|
|
4439
4439
|
return;
|
|
4440
|
-
const n =
|
|
4440
|
+
const n = Fr(e);
|
|
4441
4441
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
4442
4442
|
const { layout: i, layoutId: o } = t.options;
|
|
4443
|
-
window.MotionCancelOptimisedAnimation(n, "transform",
|
|
4443
|
+
window.MotionCancelOptimisedAnimation(n, "transform", F, !(i || o));
|
|
4444
4444
|
}
|
|
4445
4445
|
const { parent: s } = t;
|
|
4446
4446
|
s && !s.hasCheckedOptimisedAppear && jo(s);
|
|
@@ -4448,10 +4448,10 @@ function jo(t) {
|
|
|
4448
4448
|
function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
|
|
4449
4449
|
return class {
|
|
4450
4450
|
constructor(r = {}, a = e == null ? void 0 : e()) {
|
|
4451
|
-
this.id =
|
|
4451
|
+
this.id = od++, 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 = () => {
|
|
4452
4452
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4453
4453
|
}, this.updateProjection = () => {
|
|
4454
|
-
this.projectionUpdateScheduled = !1, ie && (
|
|
4454
|
+
this.projectionUpdateScheduled = !1, ie && (Vt.totalNodes = Vt.resolvedTargetDeltas = Vt.recalculatedProjection = 0), this.nodes.forEach(cd), this.nodes.forEach(pd), this.nodes.forEach(md), this.nodes.forEach(ud), ie && window.MotionDebug.record(Vt);
|
|
4455
4455
|
}, 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;
|
|
4456
4456
|
for (let l = 0; l < this.path.length; l++)
|
|
4457
4457
|
this.path[l].shouldResetTransform = !0;
|
|
@@ -4476,26 +4476,26 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4476
4476
|
this.isSVG = Yu(r), this.instance = r;
|
|
4477
4477
|
const { layoutId: l, layout: c, visualElement: u } = this.options;
|
|
4478
4478
|
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) {
|
|
4479
|
-
let
|
|
4479
|
+
let d;
|
|
4480
4480
|
const h = () => this.root.updateBlockedByResize = !1;
|
|
4481
4481
|
t(r, () => {
|
|
4482
|
-
this.root.updateBlockedByResize = !0,
|
|
4482
|
+
this.root.updateBlockedByResize = !0, d && d(), d = Gu(h, 250), De.hasAnimatedSinceResize && (De.hasAnimatedSinceResize = !1, this.nodes.forEach(Gi));
|
|
4483
4483
|
});
|
|
4484
4484
|
}
|
|
4485
|
-
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta:
|
|
4485
|
+
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: d, hasLayoutChanged: h, hasRelativeTargetChanged: p, layout: g }) => {
|
|
4486
4486
|
if (this.isTreeAnimationBlocked()) {
|
|
4487
4487
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4488
4488
|
return;
|
|
4489
4489
|
}
|
|
4490
|
-
const v = this.options.transition || u.getDefaultTransition() ||
|
|
4490
|
+
const v = this.options.transition || u.getDefaultTransition() || bd, { onLayoutAnimationStart: x, onLayoutAnimationComplete: y } = u.getProps(), P = !this.targetLayout || !Do(this.targetLayout, g) || p, S = !h && p;
|
|
4491
4491
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || S || h && (P || !this.currentAnimation)) {
|
|
4492
|
-
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(
|
|
4493
|
-
const
|
|
4492
|
+
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(d, S);
|
|
4493
|
+
const k = {
|
|
4494
4494
|
...is(v, "layout"),
|
|
4495
4495
|
onPlay: x,
|
|
4496
4496
|
onComplete: y
|
|
4497
4497
|
};
|
|
4498
|
-
(u.shouldReduceMotion || this.options.layoutRoot) && (
|
|
4498
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (k.delay = 0, k.type = !1), this.startAnimation(k);
|
|
4499
4499
|
} else
|
|
4500
4500
|
h || Gi(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4501
4501
|
this.targetLayout = g;
|
|
@@ -4521,7 +4521,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4521
4521
|
}
|
|
4522
4522
|
// Note: currently only running on root node
|
|
4523
4523
|
startUpdate() {
|
|
4524
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
4524
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(gd), this.animationId++);
|
|
4525
4525
|
}
|
|
4526
4526
|
getTransformTemplate() {
|
|
4527
4527
|
const { visualElement: r } = this.options;
|
|
@@ -4536,8 +4536,8 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4536
4536
|
return;
|
|
4537
4537
|
this.isLayoutDirty = !0;
|
|
4538
4538
|
for (let u = 0; u < this.path.length; u++) {
|
|
4539
|
-
const
|
|
4540
|
-
|
|
4539
|
+
const d = this.path[u];
|
|
4540
|
+
d.shouldResetTransform = !0, d.updateScroll("snapshot"), d.options.layoutRoot && d.willUpdate(!1);
|
|
4541
4541
|
}
|
|
4542
4542
|
const { layoutId: a, layout: l } = this.options;
|
|
4543
4543
|
if (a === void 0 && !l)
|
|
@@ -4550,7 +4550,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4550
4550
|
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(zi);
|
|
4551
4551
|
return;
|
|
4552
4552
|
}
|
|
4553
|
-
this.isUpdating || this.nodes.forEach(
|
|
4553
|
+
this.isUpdating || this.nodes.forEach(fd), this.isUpdating = !1, this.nodes.forEach(hd), this.nodes.forEach(ad), this.nodes.forEach(ld), this.clearAllSnapshots();
|
|
4554
4554
|
const a = mt.now();
|
|
4555
4555
|
q.delta = wt(0, 1e3 / 60, a - q.timestamp), q.timestamp = a, q.isProcessing = !0, rn.update.process(q), rn.preRender.process(q), rn.render.process(q), q.isProcessing = !1;
|
|
4556
4556
|
}
|
|
@@ -4558,13 +4558,13 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4558
4558
|
this.updateScheduled || (this.updateScheduled = !0, Gn.read(this.scheduleUpdate));
|
|
4559
4559
|
}
|
|
4560
4560
|
clearAllSnapshots() {
|
|
4561
|
-
this.nodes.forEach(
|
|
4561
|
+
this.nodes.forEach(dd), this.sharedNodes.forEach(yd);
|
|
4562
4562
|
}
|
|
4563
4563
|
scheduleUpdateProjection() {
|
|
4564
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
4564
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, F.preRender(this.updateProjection, !1, !0));
|
|
4565
4565
|
}
|
|
4566
4566
|
scheduleCheckAfterUnmount() {
|
|
4567
|
-
|
|
4567
|
+
F.postRender(() => {
|
|
4568
4568
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
4569
4569
|
});
|
|
4570
4570
|
}
|
|
@@ -4602,12 +4602,12 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4602
4602
|
if (!i)
|
|
4603
4603
|
return;
|
|
4604
4604
|
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Eo(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
4605
|
-
r && (a ||
|
|
4605
|
+
r && (a || Ct(this.latestValues) || u) && (i(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4606
4606
|
}
|
|
4607
4607
|
measure(r = !0) {
|
|
4608
4608
|
const a = this.measurePageBox();
|
|
4609
4609
|
let l = this.removeElementScroll(a);
|
|
4610
|
-
return r && (l = this.removeTransform(l)),
|
|
4610
|
+
return r && (l = this.removeTransform(l)), Td(l), {
|
|
4611
4611
|
animationId: this.root.animationId,
|
|
4612
4612
|
measuredBox: a,
|
|
4613
4613
|
layoutBox: l,
|
|
@@ -4621,7 +4621,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4621
4621
|
if (!a)
|
|
4622
4622
|
return z();
|
|
4623
4623
|
const l = a.measureViewportBox();
|
|
4624
|
-
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(
|
|
4624
|
+
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(wd))) {
|
|
4625
4625
|
const { scroll: u } = this.root;
|
|
4626
4626
|
u && (_t(l.x, u.offset.x), _t(l.y, u.offset.y));
|
|
4627
4627
|
}
|
|
@@ -4633,8 +4633,8 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4633
4633
|
if (lt(l, r), !((a = this.scroll) === null || a === void 0) && a.wasRoot)
|
|
4634
4634
|
return l;
|
|
4635
4635
|
for (let c = 0; c < this.path.length; c++) {
|
|
4636
|
-
const u = this.path[c], { scroll:
|
|
4637
|
-
u !== this.root &&
|
|
4636
|
+
const u = this.path[c], { scroll: d, options: h } = u;
|
|
4637
|
+
u !== this.root && d && h.layoutScroll && (d.wasRoot && lt(l, r), _t(l.x, d.offset.x), _t(l.y, d.offset.y));
|
|
4638
4638
|
}
|
|
4639
4639
|
return l;
|
|
4640
4640
|
}
|
|
@@ -4646,22 +4646,22 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4646
4646
|
!a && u.options.layoutScroll && u.scroll && u !== u.root && Ut(l, {
|
|
4647
4647
|
x: -u.scroll.offset.x,
|
|
4648
4648
|
y: -u.scroll.offset.y
|
|
4649
|
-
}),
|
|
4649
|
+
}), Ct(u.latestValues) && Ut(l, u.latestValues);
|
|
4650
4650
|
}
|
|
4651
|
-
return
|
|
4651
|
+
return Ct(this.latestValues) && Ut(l, this.latestValues), l;
|
|
4652
4652
|
}
|
|
4653
4653
|
removeTransform(r) {
|
|
4654
4654
|
const a = z();
|
|
4655
4655
|
lt(a, r);
|
|
4656
4656
|
for (let l = 0; l < this.path.length; l++) {
|
|
4657
4657
|
const c = this.path[l];
|
|
4658
|
-
if (!c.instance || !
|
|
4658
|
+
if (!c.instance || !Ct(c.latestValues))
|
|
4659
4659
|
continue;
|
|
4660
4660
|
Dn(c.latestValues) && c.updateSnapshot();
|
|
4661
|
-
const u = z(),
|
|
4662
|
-
lt(u,
|
|
4661
|
+
const u = z(), d = c.measurePageBox();
|
|
4662
|
+
lt(u, d), Ii(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4663
4663
|
}
|
|
4664
|
-
return
|
|
4664
|
+
return Ct(this.latestValues) && Ii(a, this.latestValues), a;
|
|
4665
4665
|
}
|
|
4666
4666
|
setTargetDelta(r) {
|
|
4667
4667
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4686,8 +4686,8 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4686
4686
|
const c = !!this.resumingFrom || this !== l;
|
|
4687
4687
|
if (!(r || c && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
4688
4688
|
return;
|
|
4689
|
-
const { layout:
|
|
4690
|
-
if (!(!this.layout || !(
|
|
4689
|
+
const { layout: d, layoutId: h } = this.options;
|
|
4690
|
+
if (!(!this.layout || !(d || h))) {
|
|
4691
4691
|
if (this.resolvedRelativeTargetAt = q.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4692
4692
|
const p = this.getClosestProjectingParent();
|
|
4693
4693
|
p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = z(), this.relativeTargetOrigin = z(), ce(this.relativeTargetOrigin, this.layout.layoutBox, p.layout.layoutBox), lt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -4698,7 +4698,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4698
4698
|
const p = this.getClosestProjectingParent();
|
|
4699
4699
|
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = z(), this.relativeTargetOrigin = z(), ce(this.relativeTargetOrigin, this.target, p.target), lt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4700
4700
|
}
|
|
4701
|
-
ie &&
|
|
4701
|
+
ie && Vt.resolvedTargetDeltas++;
|
|
4702
4702
|
}
|
|
4703
4703
|
}
|
|
4704
4704
|
}
|
|
@@ -4715,8 +4715,8 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4715
4715
|
let c = !0;
|
|
4716
4716
|
if ((this.isProjectionDirty || !((r = this.parent) === null || r === void 0) && r.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === q.timestamp && (c = !1), c)
|
|
4717
4717
|
return;
|
|
4718
|
-
const { layout: u, layoutId:
|
|
4719
|
-
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u ||
|
|
4718
|
+
const { layout: u, layoutId: d } = this.options;
|
|
4719
|
+
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || d))
|
|
4720
4720
|
return;
|
|
4721
4721
|
lt(this.layoutCorrected, this.layout.layoutBox);
|
|
4722
4722
|
const h = this.treeScale.x, p = this.treeScale.y;
|
|
@@ -4726,7 +4726,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4726
4726
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4727
4727
|
return;
|
|
4728
4728
|
}
|
|
4729
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4729
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Oi(this.prevProjectionDelta.x, this.projectionDelta.x), Oi(this.prevProjectionDelta.y, this.projectionDelta.y)), le(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== p || !Yi(this.projectionDelta.x, this.prevProjectionDelta.x) || !Yi(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), ie && Vt.recalculatedProjection++;
|
|
4730
4730
|
}
|
|
4731
4731
|
hide() {
|
|
4732
4732
|
this.isVisible = !1;
|
|
@@ -4746,18 +4746,18 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4746
4746
|
this.prevProjectionDelta = It(), this.projectionDelta = It(), this.projectionDeltaWithTransform = It();
|
|
4747
4747
|
}
|
|
4748
4748
|
setAnimationOrigin(r, a = !1) {
|
|
4749
|
-
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues },
|
|
4749
|
+
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, d = It();
|
|
4750
4750
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4751
|
-
const h = z(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, v = p !== g, x = this.getStack(), y = !x || x.members.length <= 1, P = !!(v && !y && this.options.crossfade === !0 && !this.path.some(
|
|
4751
|
+
const h = z(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, v = p !== g, x = this.getStack(), y = !x || x.members.length <= 1, P = !!(v && !y && this.options.crossfade === !0 && !this.path.some(xd));
|
|
4752
4752
|
this.animationProgress = 0;
|
|
4753
4753
|
let S;
|
|
4754
|
-
this.mixTargetDelta = (
|
|
4755
|
-
const w =
|
|
4756
|
-
Zi(
|
|
4754
|
+
this.mixTargetDelta = (k) => {
|
|
4755
|
+
const w = k / 1e3;
|
|
4756
|
+
Zi(d.x, r.x, w), Zi(d.y, r.y, w), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ce(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), vd(this.relativeTarget, this.relativeTargetOrigin, h, w), S && nd(this.relativeTarget, S) && (this.isProjectionDirty = !1), S || (S = z()), lt(S, this.relativeTarget)), v && (this.animationValues = u, Hu(u, c, this.latestValues, w, P, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
|
|
4757
4757
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4758
4758
|
}
|
|
4759
4759
|
startAnimation(r) {
|
|
4760
|
-
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (Tt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation =
|
|
4760
|
+
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (Tt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = F.update(() => {
|
|
4761
4761
|
De.hasAnimatedSinceResize = !0, this.currentAnimation = Xu(0, Ki, {
|
|
4762
4762
|
...r,
|
|
4763
4763
|
onUpdate: (a) => {
|
|
@@ -4783,8 +4783,8 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4783
4783
|
if (!(!a || !l || !c)) {
|
|
4784
4784
|
if (this !== r && this.layout && c && $o(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4785
4785
|
l = this.target || z();
|
|
4786
|
-
const
|
|
4787
|
-
l.x.min = r.target.x.min, l.x.max = l.x.min +
|
|
4786
|
+
const d = rt(this.layout.layoutBox.x);
|
|
4787
|
+
l.x.min = r.target.x.min, l.x.max = l.x.min + d;
|
|
4788
4788
|
const h = rt(this.layout.layoutBox.y);
|
|
4789
4789
|
l.y.min = r.target.y.min, l.y.max = l.y.min + h;
|
|
4790
4790
|
}
|
|
@@ -4792,7 +4792,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4792
4792
|
}
|
|
4793
4793
|
}
|
|
4794
4794
|
registerSharedNode(r, a) {
|
|
4795
|
-
this.sharedNodes.has(r) || this.sharedNodes.set(r, new
|
|
4795
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new sd()), this.sharedNodes.get(r).add(a);
|
|
4796
4796
|
const c = a.options.initialPromotionConfig;
|
|
4797
4797
|
a.promote({
|
|
4798
4798
|
transition: c ? c.transition : void 0,
|
|
@@ -4848,33 +4848,33 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4848
4848
|
if (!this.instance || this.isSVG)
|
|
4849
4849
|
return;
|
|
4850
4850
|
if (!this.isVisible)
|
|
4851
|
-
return
|
|
4851
|
+
return rd;
|
|
4852
4852
|
const c = {
|
|
4853
4853
|
visibility: ""
|
|
4854
4854
|
}, u = this.getTransformTemplate();
|
|
4855
4855
|
if (this.needsReset)
|
|
4856
|
-
return this.needsReset = !1, c.opacity = "", c.pointerEvents =
|
|
4857
|
-
const
|
|
4858
|
-
if (!this.projectionDelta || !this.layout || !
|
|
4856
|
+
return this.needsReset = !1, c.opacity = "", c.pointerEvents = Ve(r == null ? void 0 : r.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4857
|
+
const d = this.getLead();
|
|
4858
|
+
if (!this.projectionDelta || !this.layout || !d.target) {
|
|
4859
4859
|
const v = {};
|
|
4860
|
-
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents =
|
|
4860
|
+
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents = Ve(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !Ct(this.latestValues) && (v.transform = u ? u({}, "") : "none", this.hasProjected = !1), v;
|
|
4861
4861
|
}
|
|
4862
|
-
const h =
|
|
4863
|
-
this.applyTransformsToTarget(), c.transform =
|
|
4862
|
+
const h = d.animationValues || d.latestValues;
|
|
4863
|
+
this.applyTransformsToTarget(), c.transform = id(this.projectionDeltaWithTransform, this.treeScale, h), u && (c.transform = u(h, c.transform));
|
|
4864
4864
|
const { x: p, y: g } = this.projectionDelta;
|
|
4865
|
-
c.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`,
|
|
4865
|
+
c.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`, d.animationValues ? c.opacity = d === this ? (l = (a = h.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : h.opacityExit : c.opacity = d === this ? h.opacity !== void 0 ? h.opacity : "" : h.opacityExit !== void 0 ? h.opacityExit : 0;
|
|
4866
4866
|
for (const v in Le) {
|
|
4867
4867
|
if (h[v] === void 0)
|
|
4868
4868
|
continue;
|
|
4869
|
-
const { correct: x, applyTo: y } = Le[v], P = c.transform === "none" ? h[v] : x(h[v],
|
|
4869
|
+
const { correct: x, applyTo: y } = Le[v], P = c.transform === "none" ? h[v] : x(h[v], d);
|
|
4870
4870
|
if (y) {
|
|
4871
4871
|
const S = y.length;
|
|
4872
|
-
for (let
|
|
4873
|
-
c[y[
|
|
4872
|
+
for (let k = 0; k < S; k++)
|
|
4873
|
+
c[y[k]] = P;
|
|
4874
4874
|
} else
|
|
4875
4875
|
c[v] = P;
|
|
4876
4876
|
}
|
|
4877
|
-
return this.options.layoutId && (c.pointerEvents =
|
|
4877
|
+
return this.options.layoutId && (c.pointerEvents = d === this ? Ve(r == null ? void 0 : r.pointerEvents) || "" : "none"), c;
|
|
4878
4878
|
}
|
|
4879
4879
|
clearSnapshot() {
|
|
4880
4880
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4888,20 +4888,20 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4888
4888
|
}
|
|
4889
4889
|
};
|
|
4890
4890
|
}
|
|
4891
|
-
function
|
|
4891
|
+
function ad(t) {
|
|
4892
4892
|
t.updateLayout();
|
|
4893
4893
|
}
|
|
4894
|
-
function
|
|
4894
|
+
function ld(t) {
|
|
4895
4895
|
var e;
|
|
4896
4896
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
4897
4897
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4898
4898
|
const { layoutBox: s, measuredBox: i } = t.layout, { animationType: o } = t.options, r = n.source !== t.layout.source;
|
|
4899
|
-
o === "size" ? ct((
|
|
4900
|
-
const h = r ? n.measuredBox[
|
|
4901
|
-
h.min = s[
|
|
4902
|
-
}) : $o(o, n.layoutBox, s) && ct((
|
|
4903
|
-
const h = r ? n.measuredBox[
|
|
4904
|
-
h.max = h.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[
|
|
4899
|
+
o === "size" ? ct((d) => {
|
|
4900
|
+
const h = r ? n.measuredBox[d] : n.layoutBox[d], p = rt(h);
|
|
4901
|
+
h.min = s[d].min, h.max = h.min + p;
|
|
4902
|
+
}) : $o(o, n.layoutBox, s) && ct((d) => {
|
|
4903
|
+
const h = r ? n.measuredBox[d] : n.layoutBox[d], p = rt(s[d]);
|
|
4904
|
+
h.max = h.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[d].max = t.relativeTarget[d].min + p);
|
|
4905
4905
|
});
|
|
4906
4906
|
const a = It();
|
|
4907
4907
|
le(a, s, n.layoutBox);
|
|
@@ -4910,14 +4910,14 @@ function cf(t) {
|
|
|
4910
4910
|
const c = !Eo(a);
|
|
4911
4911
|
let u = !1;
|
|
4912
4912
|
if (!t.resumeFrom) {
|
|
4913
|
-
const
|
|
4914
|
-
if (
|
|
4915
|
-
const { snapshot: h, layout: p } =
|
|
4913
|
+
const d = t.getClosestProjectingParent();
|
|
4914
|
+
if (d && !d.resumeFrom) {
|
|
4915
|
+
const { snapshot: h, layout: p } = d;
|
|
4916
4916
|
if (h && p) {
|
|
4917
4917
|
const g = z();
|
|
4918
4918
|
ce(g, n.layoutBox, h.layoutBox);
|
|
4919
4919
|
const v = z();
|
|
4920
|
-
ce(v, s, p.layoutBox), Do(g, v) || (u = !0),
|
|
4920
|
+
ce(v, s, p.layoutBox), Do(g, v) || (u = !0), d.options.layoutRoot && (t.relativeTarget = v, t.relativeTargetOrigin = g, t.relativeParent = d);
|
|
4921
4921
|
}
|
|
4922
4922
|
}
|
|
4923
4923
|
}
|
|
@@ -4935,38 +4935,38 @@ function cf(t) {
|
|
|
4935
4935
|
}
|
|
4936
4936
|
t.options.transition = void 0;
|
|
4937
4937
|
}
|
|
4938
|
-
function
|
|
4939
|
-
ie &&
|
|
4938
|
+
function cd(t) {
|
|
4939
|
+
ie && Vt.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));
|
|
4940
4940
|
}
|
|
4941
|
-
function
|
|
4941
|
+
function ud(t) {
|
|
4942
4942
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4943
4943
|
}
|
|
4944
|
-
function
|
|
4944
|
+
function dd(t) {
|
|
4945
4945
|
t.clearSnapshot();
|
|
4946
4946
|
}
|
|
4947
4947
|
function zi(t) {
|
|
4948
4948
|
t.clearMeasurements();
|
|
4949
4949
|
}
|
|
4950
|
-
function
|
|
4950
|
+
function fd(t) {
|
|
4951
4951
|
t.isLayoutDirty = !1;
|
|
4952
4952
|
}
|
|
4953
|
-
function
|
|
4953
|
+
function hd(t) {
|
|
4954
4954
|
const { visualElement: e } = t.options;
|
|
4955
4955
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4956
4956
|
}
|
|
4957
4957
|
function Gi(t) {
|
|
4958
4958
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4959
4959
|
}
|
|
4960
|
-
function
|
|
4960
|
+
function pd(t) {
|
|
4961
4961
|
t.resolveTargetDelta();
|
|
4962
4962
|
}
|
|
4963
|
-
function
|
|
4963
|
+
function md(t) {
|
|
4964
4964
|
t.calcProjection();
|
|
4965
4965
|
}
|
|
4966
|
-
function
|
|
4966
|
+
function gd(t) {
|
|
4967
4967
|
t.resetSkewAndRotation();
|
|
4968
4968
|
}
|
|
4969
|
-
function
|
|
4969
|
+
function yd(t) {
|
|
4970
4970
|
t.removeLeadSnapshot();
|
|
4971
4971
|
}
|
|
4972
4972
|
function Zi(t, e, n) {
|
|
@@ -4975,30 +4975,30 @@ function Zi(t, e, n) {
|
|
|
4975
4975
|
function Hi(t, e, n, s) {
|
|
4976
4976
|
t.min = X(e.min, n.min, s), t.max = X(e.max, n.max, s);
|
|
4977
4977
|
}
|
|
4978
|
-
function
|
|
4978
|
+
function vd(t, e, n, s) {
|
|
4979
4979
|
Hi(t.x, e.x, n.x, s), Hi(t.y, e.y, n.y, s);
|
|
4980
4980
|
}
|
|
4981
|
-
function
|
|
4981
|
+
function xd(t) {
|
|
4982
4982
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4983
4983
|
}
|
|
4984
|
-
const
|
|
4984
|
+
const bd = {
|
|
4985
4985
|
duration: 0.45,
|
|
4986
4986
|
ease: [0.4, 0, 0.1, 1]
|
|
4987
4987
|
}, qi = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Qi = qi("applewebkit/") && !qi("chrome/") ? Math.round : it;
|
|
4988
4988
|
function Ji(t) {
|
|
4989
4989
|
t.min = Qi(t.min), t.max = Qi(t.max);
|
|
4990
4990
|
}
|
|
4991
|
-
function
|
|
4991
|
+
function Td(t) {
|
|
4992
4992
|
Ji(t.x), Ji(t.y);
|
|
4993
4993
|
}
|
|
4994
4994
|
function $o(t, e, n) {
|
|
4995
4995
|
return t === "position" || t === "preserve-aspect" && !Su(Xi(e), Xi(n), 0.2);
|
|
4996
4996
|
}
|
|
4997
|
-
function
|
|
4997
|
+
function wd(t) {
|
|
4998
4998
|
var e;
|
|
4999
4999
|
return t !== t.root && ((e = t.scroll) === null || e === void 0 ? void 0 : e.wasRoot);
|
|
5000
5000
|
}
|
|
5001
|
-
const
|
|
5001
|
+
const Pd = Lo({
|
|
5002
5002
|
attachResizeListener: (t, e) => pe(t, "resize", e),
|
|
5003
5003
|
measureScroll: () => ({
|
|
5004
5004
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -5007,14 +5007,14 @@ const Sf = Lo({
|
|
|
5007
5007
|
checkIsScrollRoot: () => !0
|
|
5008
5008
|
}), gn = {
|
|
5009
5009
|
current: void 0
|
|
5010
|
-
},
|
|
5010
|
+
}, No = Lo({
|
|
5011
5011
|
measureScroll: (t) => ({
|
|
5012
5012
|
x: t.scrollLeft,
|
|
5013
5013
|
y: t.scrollTop
|
|
5014
5014
|
}),
|
|
5015
5015
|
defaultParent: () => {
|
|
5016
5016
|
if (!gn.current) {
|
|
5017
|
-
const t = new
|
|
5017
|
+
const t = new Pd({});
|
|
5018
5018
|
t.mount(window), t.setOptions({ layoutScroll: !0 }), gn.current = t;
|
|
5019
5019
|
}
|
|
5020
5020
|
return gn.current;
|
|
@@ -5023,23 +5023,23 @@ const Sf = Lo({
|
|
|
5023
5023
|
t.style.transform = e !== void 0 ? e : "none";
|
|
5024
5024
|
},
|
|
5025
5025
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
5026
|
-
}),
|
|
5026
|
+
}), Sd = {
|
|
5027
5027
|
pan: {
|
|
5028
5028
|
Feature: Iu
|
|
5029
5029
|
},
|
|
5030
5030
|
drag: {
|
|
5031
5031
|
Feature: Bu,
|
|
5032
|
-
ProjectionNode:
|
|
5033
|
-
MeasureLayout:
|
|
5032
|
+
ProjectionNode: No,
|
|
5033
|
+
MeasureLayout: ko
|
|
5034
5034
|
}
|
|
5035
5035
|
};
|
|
5036
5036
|
function tr(t, e, n) {
|
|
5037
5037
|
const { props: s } = t;
|
|
5038
5038
|
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
5039
5039
|
const i = "onHover" + n, o = s[i];
|
|
5040
|
-
o &&
|
|
5040
|
+
o && F.postRender(() => o(e, be(e)));
|
|
5041
5041
|
}
|
|
5042
|
-
class
|
|
5042
|
+
class Rd extends Mt {
|
|
5043
5043
|
mount() {
|
|
5044
5044
|
const { current: e } = this.node;
|
|
5045
5045
|
e && (this.unmount = Ml(e, (n) => (tr(this.node, n, "Start"), (s) => tr(this.node, s, "End"))));
|
|
@@ -5047,7 +5047,7 @@ class Mf extends Mt {
|
|
|
5047
5047
|
unmount() {
|
|
5048
5048
|
}
|
|
5049
5049
|
}
|
|
5050
|
-
class
|
|
5050
|
+
class Md extends Mt {
|
|
5051
5051
|
constructor() {
|
|
5052
5052
|
super(...arguments), this.isActive = !1;
|
|
5053
5053
|
}
|
|
@@ -5073,39 +5073,39 @@ function er(t, e, n) {
|
|
|
5073
5073
|
const { props: s } = t;
|
|
5074
5074
|
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
5075
5075
|
const i = "onTap" + (n === "End" ? "" : n), o = s[i];
|
|
5076
|
-
o &&
|
|
5076
|
+
o && F.postRender(() => o(e, be(e)));
|
|
5077
5077
|
}
|
|
5078
|
-
class
|
|
5078
|
+
class Ad extends Mt {
|
|
5079
5079
|
mount() {
|
|
5080
5080
|
const { current: e } = this.node;
|
|
5081
|
-
e && (this.unmount =
|
|
5081
|
+
e && (this.unmount = Vl(e, (n) => (er(this.node, n, "Start"), (s, { success: i }) => er(this.node, s, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
5082
5082
|
}
|
|
5083
5083
|
unmount() {
|
|
5084
5084
|
}
|
|
5085
5085
|
}
|
|
5086
|
-
const Ln = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(),
|
|
5086
|
+
const Ln = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), kd = (t) => {
|
|
5087
5087
|
const e = Ln.get(t.target);
|
|
5088
5088
|
e && e(t);
|
|
5089
|
-
},
|
|
5090
|
-
t.forEach(
|
|
5089
|
+
}, Cd = (t) => {
|
|
5090
|
+
t.forEach(kd);
|
|
5091
5091
|
};
|
|
5092
|
-
function
|
|
5092
|
+
function Vd({ root: t, ...e }) {
|
|
5093
5093
|
const n = t || document;
|
|
5094
5094
|
yn.has(n) || yn.set(n, {});
|
|
5095
5095
|
const s = yn.get(n), i = JSON.stringify(e);
|
|
5096
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
5096
|
+
return s[i] || (s[i] = new IntersectionObserver(Cd, { root: t, ...e })), s[i];
|
|
5097
5097
|
}
|
|
5098
|
-
function
|
|
5099
|
-
const s =
|
|
5098
|
+
function Ed(t, e, n) {
|
|
5099
|
+
const s = Vd(e);
|
|
5100
5100
|
return Ln.set(t, n), s.observe(t), () => {
|
|
5101
5101
|
Ln.delete(t), s.unobserve(t);
|
|
5102
5102
|
};
|
|
5103
5103
|
}
|
|
5104
|
-
const
|
|
5104
|
+
const Dd = {
|
|
5105
5105
|
some: 0,
|
|
5106
5106
|
all: 1
|
|
5107
5107
|
};
|
|
5108
|
-
class
|
|
5108
|
+
class jd extends Mt {
|
|
5109
5109
|
constructor() {
|
|
5110
5110
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
5111
5111
|
}
|
|
@@ -5114,16 +5114,16 @@ class Lf extends Mt {
|
|
|
5114
5114
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
|
|
5115
5115
|
root: n ? n.current : void 0,
|
|
5116
5116
|
rootMargin: s,
|
|
5117
|
-
threshold: typeof i == "number" ? i :
|
|
5117
|
+
threshold: typeof i == "number" ? i : Dd[i]
|
|
5118
5118
|
}, a = (l) => {
|
|
5119
5119
|
const { isIntersecting: c } = l;
|
|
5120
5120
|
if (this.isInView === c || (this.isInView = c, o && !c && this.hasEnteredView))
|
|
5121
5121
|
return;
|
|
5122
5122
|
c && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", c);
|
|
5123
|
-
const { onViewportEnter: u, onViewportLeave:
|
|
5123
|
+
const { onViewportEnter: u, onViewportLeave: d } = this.node.getProps(), h = c ? u : d;
|
|
5124
5124
|
h && h(l);
|
|
5125
5125
|
};
|
|
5126
|
-
return
|
|
5126
|
+
return Ed(this.node.current, r, a);
|
|
5127
5127
|
}
|
|
5128
5128
|
mount() {
|
|
5129
5129
|
this.startObserver();
|
|
@@ -5132,43 +5132,43 @@ class Lf extends Mt {
|
|
|
5132
5132
|
if (typeof IntersectionObserver > "u")
|
|
5133
5133
|
return;
|
|
5134
5134
|
const { props: e, prevProps: n } = this.node;
|
|
5135
|
-
["amount", "margin", "root"].some(
|
|
5135
|
+
["amount", "margin", "root"].some(Ld(e, n)) && this.startObserver();
|
|
5136
5136
|
}
|
|
5137
5137
|
unmount() {
|
|
5138
5138
|
}
|
|
5139
5139
|
}
|
|
5140
|
-
function
|
|
5140
|
+
function Ld({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
5141
5141
|
return (n) => t[n] !== e[n];
|
|
5142
5142
|
}
|
|
5143
|
-
const
|
|
5143
|
+
const $d = {
|
|
5144
5144
|
inView: {
|
|
5145
|
-
Feature:
|
|
5145
|
+
Feature: jd
|
|
5146
5146
|
},
|
|
5147
5147
|
tap: {
|
|
5148
|
-
Feature:
|
|
5148
|
+
Feature: Ad
|
|
5149
5149
|
},
|
|
5150
5150
|
focus: {
|
|
5151
|
-
Feature:
|
|
5151
|
+
Feature: Md
|
|
5152
5152
|
},
|
|
5153
5153
|
hover: {
|
|
5154
|
-
Feature:
|
|
5154
|
+
Feature: Rd
|
|
5155
5155
|
}
|
|
5156
|
-
},
|
|
5156
|
+
}, Nd = {
|
|
5157
5157
|
layout: {
|
|
5158
|
-
ProjectionNode:
|
|
5159
|
-
MeasureLayout:
|
|
5158
|
+
ProjectionNode: No,
|
|
5159
|
+
MeasureLayout: ko
|
|
5160
5160
|
}
|
|
5161
|
-
}, $n = { current: null },
|
|
5162
|
-
function
|
|
5163
|
-
if (
|
|
5161
|
+
}, $n = { current: null }, Oo = { current: !1 };
|
|
5162
|
+
function Od() {
|
|
5163
|
+
if (Oo.current = !0, !!Wn)
|
|
5164
5164
|
if (window.matchMedia) {
|
|
5165
5165
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => $n.current = t.matches;
|
|
5166
5166
|
t.addListener(e), e();
|
|
5167
5167
|
} else
|
|
5168
5168
|
$n.current = !1;
|
|
5169
5169
|
}
|
|
5170
|
-
const
|
|
5171
|
-
function
|
|
5170
|
+
const Fd = [...ro, tt, Rt], Bd = (t) => Fd.find(io(t)), nr = /* @__PURE__ */ new WeakMap();
|
|
5171
|
+
function Id(t, e, n) {
|
|
5172
5172
|
for (const s in e) {
|
|
5173
5173
|
const i = e[s], o = n[s];
|
|
5174
5174
|
if (J(i))
|
|
@@ -5197,7 +5197,7 @@ const sr = [
|
|
|
5197
5197
|
"LayoutAnimationStart",
|
|
5198
5198
|
"LayoutAnimationComplete"
|
|
5199
5199
|
];
|
|
5200
|
-
class
|
|
5200
|
+
class _d {
|
|
5201
5201
|
/**
|
|
5202
5202
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
5203
5203
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -5213,18 +5213,18 @@ class Uf {
|
|
|
5213
5213
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
5214
5214
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
5215
5215
|
const p = mt.now();
|
|
5216
|
-
this.renderScheduledAt < p && (this.renderScheduledAt = p,
|
|
5216
|
+
this.renderScheduledAt < p && (this.renderScheduledAt = p, F.render(this.render, !1, !0));
|
|
5217
5217
|
};
|
|
5218
5218
|
const { latestValues: l, renderState: c, onUpdate: u } = r;
|
|
5219
5219
|
this.onUpdate = u, this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Ye(n), this.isVariantNode = hr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
5220
|
-
const { willChange:
|
|
5220
|
+
const { willChange: d, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
5221
5221
|
for (const p in h) {
|
|
5222
5222
|
const g = h[p];
|
|
5223
5223
|
l[p] !== void 0 && J(g) && g.set(l[p], !1);
|
|
5224
5224
|
}
|
|
5225
5225
|
}
|
|
5226
5226
|
mount(e) {
|
|
5227
|
-
this.current = e, nr.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, s) => this.bindToMotionValue(s, n)),
|
|
5227
|
+
this.current = e, nr.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, s) => this.bindToMotionValue(s, n)), Oo.current || Od(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : $n.current, process.env.NODE_ENV !== "production" && Ue(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);
|
|
5228
5228
|
}
|
|
5229
5229
|
unmount() {
|
|
5230
5230
|
nr.delete(this.current), this.projection && this.projection.unmount(), Tt(this.notifyUpdate), Tt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -5239,7 +5239,7 @@ class Uf {
|
|
|
5239
5239
|
bindToMotionValue(e, n) {
|
|
5240
5240
|
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
5241
5241
|
const s = jt.has(e), i = n.on("change", (a) => {
|
|
5242
|
-
this.latestValues[e] = a, this.props.onUpdate &&
|
|
5242
|
+
this.latestValues[e] = a, this.props.onUpdate && F.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
5243
5243
|
}), o = n.on("renderRequest", this.scheduleRender);
|
|
5244
5244
|
let r;
|
|
5245
5245
|
window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
@@ -5291,7 +5291,7 @@ class Uf {
|
|
|
5291
5291
|
const o = "on" + i, r = e[o];
|
|
5292
5292
|
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
5293
5293
|
}
|
|
5294
|
-
this.prevMotionValues =
|
|
5294
|
+
this.prevMotionValues = Id(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue(), this.onUpdate && this.onUpdate(this);
|
|
5295
5295
|
}
|
|
5296
5296
|
getProps() {
|
|
5297
5297
|
return this.props;
|
|
@@ -5357,7 +5357,7 @@ class Uf {
|
|
|
5357
5357
|
readValue(e, n) {
|
|
5358
5358
|
var s;
|
|
5359
5359
|
let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (s = this.getBaseTargetFromProps(this.props, e)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, e, this.options);
|
|
5360
|
-
return i != null && (typeof i == "string" && (no(i) || zr(i)) ? i = parseFloat(i) : !
|
|
5360
|
+
return i != null && (typeof i == "string" && (no(i) || zr(i)) ? i = parseFloat(i) : !Bd(i) && Rt.test(n) && (i = Jr(e, n)), this.setBaseTarget(e, J(i) ? i.get() : i)), J(i) ? i.get() : i;
|
|
5361
5361
|
}
|
|
5362
5362
|
/**
|
|
5363
5363
|
* Set the base target to later animate back to. This is currently
|
|
@@ -5390,7 +5390,7 @@ class Uf {
|
|
|
5390
5390
|
this.events[e] && this.events[e].notify(...n);
|
|
5391
5391
|
}
|
|
5392
5392
|
}
|
|
5393
|
-
class
|
|
5393
|
+
class Fo extends _d {
|
|
5394
5394
|
constructor() {
|
|
5395
5395
|
super(...arguments), this.KeyframeResolver = oo;
|
|
5396
5396
|
}
|
|
@@ -5411,10 +5411,10 @@ class No extends Uf {
|
|
|
5411
5411
|
}));
|
|
5412
5412
|
}
|
|
5413
5413
|
}
|
|
5414
|
-
function
|
|
5414
|
+
function Ud(t) {
|
|
5415
5415
|
return window.getComputedStyle(t);
|
|
5416
5416
|
}
|
|
5417
|
-
class
|
|
5417
|
+
class Wd extends Fo {
|
|
5418
5418
|
constructor() {
|
|
5419
5419
|
super(...arguments), this.type = "html", this.renderInstance = wr;
|
|
5420
5420
|
}
|
|
@@ -5423,7 +5423,7 @@ class Xf extends No {
|
|
|
5423
5423
|
const s = gs(n);
|
|
5424
5424
|
return s && s.default || 0;
|
|
5425
5425
|
} else {
|
|
5426
|
-
const s =
|
|
5426
|
+
const s = Ud(e), i = (xr(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
5427
5427
|
return typeof i == "string" ? i.trim() : i;
|
|
5428
5428
|
}
|
|
5429
5429
|
}
|
|
@@ -5437,7 +5437,7 @@ class Xf extends No {
|
|
|
5437
5437
|
return ss(e, n, s);
|
|
5438
5438
|
}
|
|
5439
5439
|
}
|
|
5440
|
-
class
|
|
5440
|
+
class Xd extends Fo {
|
|
5441
5441
|
constructor() {
|
|
5442
5442
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = z;
|
|
5443
5443
|
}
|
|
@@ -5464,29 +5464,29 @@ class Yf extends No {
|
|
|
5464
5464
|
this.isSVGTag = ns(e.tagName), super.mount(e);
|
|
5465
5465
|
}
|
|
5466
5466
|
}
|
|
5467
|
-
const
|
|
5467
|
+
const Yd = (t, e) => Zn(t) ? new Xd(e) : new Wd(e, {
|
|
5468
5468
|
allowProjection: t !== lr
|
|
5469
|
-
}),
|
|
5469
|
+
}), Kd = /* @__PURE__ */ xl({
|
|
5470
5470
|
...mu,
|
|
5471
|
-
|
|
5472
|
-
...
|
|
5473
|
-
...
|
|
5474
|
-
},
|
|
5475
|
-
function
|
|
5471
|
+
...$d,
|
|
5472
|
+
...Sd,
|
|
5473
|
+
...Nd
|
|
5474
|
+
}, Yd), et = /* @__PURE__ */ La(Kd);
|
|
5475
|
+
function zd(t, e, n) {
|
|
5476
5476
|
Ie(() => t.on(e, n), [t, e, n]);
|
|
5477
5477
|
}
|
|
5478
5478
|
function ut(t) {
|
|
5479
5479
|
const e = Gt(() => Yt(t)), { isStatic: n } = Q(me);
|
|
5480
5480
|
if (n) {
|
|
5481
5481
|
const [, s] = bt(t);
|
|
5482
|
-
|
|
5482
|
+
ft(() => e.on("change", s), []);
|
|
5483
5483
|
}
|
|
5484
5484
|
return e;
|
|
5485
5485
|
}
|
|
5486
5486
|
function Bo(t, e) {
|
|
5487
5487
|
const n = ut(e()), s = () => n.set(e());
|
|
5488
5488
|
return s(), ge(() => {
|
|
5489
|
-
const i = () =>
|
|
5489
|
+
const i = () => F.preRender(s, !1, !0), o = t.map((r) => r.on("change", i));
|
|
5490
5490
|
return () => {
|
|
5491
5491
|
o.forEach((r) => r()), Tt(s);
|
|
5492
5492
|
};
|
|
@@ -5511,28 +5511,28 @@ function xt(t, e = {}) {
|
|
|
5511
5511
|
}, l = () => {
|
|
5512
5512
|
s.current && s.current.stop();
|
|
5513
5513
|
};
|
|
5514
|
-
return Ie(() => i.attach((c, u) => n ? u(c) : (o.current = c, r.current = u,
|
|
5514
|
+
return Ie(() => i.attach((c, u) => n ? u(c) : (o.current = c, r.current = u, F.update(a), i.get()), l), [JSON.stringify(e)]), ge(() => {
|
|
5515
5515
|
if (J(t))
|
|
5516
5516
|
return t.on("change", (c) => i.set(ir(c)));
|
|
5517
5517
|
}, [i]), i;
|
|
5518
5518
|
}
|
|
5519
|
-
const
|
|
5520
|
-
function
|
|
5519
|
+
const Gd = (t) => t && typeof t == "object" && t.mix, Zd = (t) => Gd(t) ? t.mix : void 0;
|
|
5520
|
+
function Hd(...t) {
|
|
5521
5521
|
const e = !Array.isArray(t[0]), n = e ? 0 : -1, s = t[0 + n], i = t[1 + n], o = t[2 + n], r = t[3 + n], a = po(i, o, {
|
|
5522
|
-
mixer:
|
|
5522
|
+
mixer: Zd(o[0]),
|
|
5523
5523
|
...r
|
|
5524
5524
|
});
|
|
5525
5525
|
return e ? a(s) : a;
|
|
5526
5526
|
}
|
|
5527
|
-
function
|
|
5527
|
+
function qd(t) {
|
|
5528
5528
|
re.current = [], t();
|
|
5529
5529
|
const e = Bo(re.current, t);
|
|
5530
5530
|
return re.current = void 0, e;
|
|
5531
5531
|
}
|
|
5532
5532
|
function yt(t, e, n, s) {
|
|
5533
5533
|
if (typeof t == "function")
|
|
5534
|
-
return
|
|
5535
|
-
const i = typeof e == "function" ? e :
|
|
5534
|
+
return qd(t);
|
|
5535
|
+
const i = typeof e == "function" ? e : Hd(e, n, s);
|
|
5536
5536
|
return Array.isArray(t) ? rr(t, i) : rr([t], ([o]) => i(o));
|
|
5537
5537
|
}
|
|
5538
5538
|
function rr(t, e) {
|
|
@@ -5545,34 +5545,34 @@ function rr(t, e) {
|
|
|
5545
5545
|
return e(n);
|
|
5546
5546
|
});
|
|
5547
5547
|
}
|
|
5548
|
-
function
|
|
5548
|
+
function Qd(t) {
|
|
5549
5549
|
const e = ut(t.getVelocity()), n = () => {
|
|
5550
5550
|
const s = t.getVelocity();
|
|
5551
|
-
e.set(s), s &&
|
|
5551
|
+
e.set(s), s && F.update(n);
|
|
5552
5552
|
};
|
|
5553
|
-
return
|
|
5554
|
-
|
|
5553
|
+
return zd(t, "change", () => {
|
|
5554
|
+
F.update(n, !1, !0);
|
|
5555
5555
|
}), e;
|
|
5556
5556
|
}
|
|
5557
|
-
function
|
|
5557
|
+
function Jd(t) {
|
|
5558
5558
|
t.values.forEach((e) => e.stop());
|
|
5559
5559
|
}
|
|
5560
|
-
function
|
|
5560
|
+
function Nn(t, e) {
|
|
5561
5561
|
[...e].reverse().forEach((s) => {
|
|
5562
5562
|
const i = t.getVariant(s);
|
|
5563
|
-
i &&
|
|
5564
|
-
|
|
5563
|
+
i && ds(t, i), t.variantChildren && t.variantChildren.forEach((o) => {
|
|
5564
|
+
Nn(o, e);
|
|
5565
5565
|
});
|
|
5566
5566
|
});
|
|
5567
5567
|
}
|
|
5568
|
-
function
|
|
5568
|
+
function tf(t, e) {
|
|
5569
5569
|
if (Array.isArray(e))
|
|
5570
|
-
return
|
|
5570
|
+
return Nn(t, e);
|
|
5571
5571
|
if (typeof e == "string")
|
|
5572
|
-
return
|
|
5573
|
-
|
|
5572
|
+
return Nn(t, [e]);
|
|
5573
|
+
ds(t, e);
|
|
5574
5574
|
}
|
|
5575
|
-
function
|
|
5575
|
+
function ef() {
|
|
5576
5576
|
let t = !1;
|
|
5577
5577
|
const e = /* @__PURE__ */ new Set(), n = {
|
|
5578
5578
|
subscribe(s) {
|
|
@@ -5589,12 +5589,12 @@ function nd() {
|
|
|
5589
5589
|
},
|
|
5590
5590
|
set(s) {
|
|
5591
5591
|
return gt(t, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."), e.forEach((i) => {
|
|
5592
|
-
|
|
5592
|
+
tf(i, s);
|
|
5593
5593
|
});
|
|
5594
5594
|
},
|
|
5595
5595
|
stop() {
|
|
5596
5596
|
e.forEach((s) => {
|
|
5597
|
-
|
|
5597
|
+
Jd(s);
|
|
5598
5598
|
});
|
|
5599
5599
|
},
|
|
5600
5600
|
mount() {
|
|
@@ -5605,24 +5605,24 @@ function nd() {
|
|
|
5605
5605
|
};
|
|
5606
5606
|
return n;
|
|
5607
5607
|
}
|
|
5608
|
-
function
|
|
5609
|
-
const t = Gt(
|
|
5608
|
+
function nf() {
|
|
5609
|
+
const t = Gt(ef);
|
|
5610
5610
|
return ge(t.mount, []), t;
|
|
5611
5611
|
}
|
|
5612
|
-
const
|
|
5612
|
+
const sf = nf, Ze = (t) => {
|
|
5613
5613
|
const e = ut(0), n = ut(0), s = {
|
|
5614
5614
|
stiffness: t.stiffness * 0.5,
|
|
5615
5615
|
damping: t.damping * 1.2,
|
|
5616
5616
|
mass: t.mass
|
|
5617
5617
|
}, i = xt(e, s), o = xt(n, s);
|
|
5618
5618
|
return { x: i, y: o, handleMouseMove: (l) => {
|
|
5619
|
-
const c = l.currentTarget.getBoundingClientRect(), u = c.left + c.width / 2,
|
|
5620
|
-
e.set((l.clientX - u) * 0.1), n.set((l.clientY -
|
|
5619
|
+
const c = l.currentTarget.getBoundingClientRect(), u = c.left + c.width / 2, d = c.top + c.height / 2;
|
|
5620
|
+
e.set((l.clientX - u) * 0.1), n.set((l.clientY - d) * 0.1);
|
|
5621
5621
|
}, handleMouseLeave: () => {
|
|
5622
5622
|
e.set(0), n.set(0);
|
|
5623
5623
|
} };
|
|
5624
5624
|
}, bs = ({ profile: t, color: e, children: n, className: s, style: i }) => {
|
|
5625
|
-
const { tl: o, tr: r, bl: a, br: l } = t.borderRadius, { width: c, height: u } = t,
|
|
5625
|
+
const { tl: o, tr: r, bl: a, br: l } = t.borderRadius, { width: c, height: u } = t, d = `
|
|
5626
5626
|
M ${o},0
|
|
5627
5627
|
L ${c - r},0
|
|
5628
5628
|
Q ${c},0 ${c},${r}
|
|
@@ -5644,23 +5644,22 @@ const id = sd, Ze = (t) => {
|
|
|
5644
5644
|
opacity: 0.1,
|
|
5645
5645
|
transform: `translate(${t.shadowOffset.x}px, ${t.shadowOffset.y}px)`
|
|
5646
5646
|
},
|
|
5647
|
-
children: /* @__PURE__ */ m.jsx("path", { d
|
|
5647
|
+
children: /* @__PURE__ */ m.jsx("path", { d, fill: "black" })
|
|
5648
5648
|
}
|
|
5649
5649
|
),
|
|
5650
5650
|
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${c} ${u}`, className: "absolute inset-0 drop-shadow-sm pointer-events-none", children: /* @__PURE__ */ m.jsx(
|
|
5651
5651
|
"path",
|
|
5652
5652
|
{
|
|
5653
|
-
d
|
|
5654
|
-
|
|
5653
|
+
d,
|
|
5654
|
+
className: "fill-white dark:fill-slate-800 transition-colors duration-300",
|
|
5655
5655
|
stroke: e,
|
|
5656
|
-
strokeWidth: t.strokeWidth
|
|
5657
|
-
className: "transition-colors duration-300"
|
|
5656
|
+
strokeWidth: t.strokeWidth
|
|
5658
5657
|
}
|
|
5659
5658
|
) }),
|
|
5660
5659
|
/* @__PURE__ */ m.jsx("div", { className: "relative z-10 flex items-center h-full px-5 gap-4", children: n })
|
|
5661
5660
|
] });
|
|
5662
|
-
},
|
|
5663
|
-
const [e, n] = bt(!1), s = I(() => Math.random() * 8888, []), i = I(() => ue(s, 52, 28), [s]), o = I(() => ue(s + 1, 20, 20), [s]), { x: r, y: a, handleMouseMove: l, handleMouseLeave: c } = Ze(i), { tl: u, tr:
|
|
5661
|
+
}, ff = ({ label: t }) => {
|
|
5662
|
+
const [e, n] = bt(!1), s = I(() => Math.random() * 8888, []), i = I(() => ue(s, 52, 28), [s]), o = I(() => ue(s + 1, 20, 20), [s]), { x: r, y: a, handleMouseMove: l, handleMouseLeave: c } = Ze(i), { tl: u, tr: d, bl: h, br: p } = i.borderRadius, g = `M ${u},0 L ${52 - d},0 Q 52,0 52,${d} L 52,${28 - p} Q 52,28 ${52 - p},28 L ${h},28 Q 0,28 0,${28 - h} L 0,${u} Q 0,0 ${u},0 Z`, { tl: v, tr: x, bl: y, br: P } = o.borderRadius, S = `M ${v},0 L ${20 - x},0 Q 20,0 20,${x} L 20,${20 - P} Q 20,20 ${20 - P},20 L ${y},20 Q 0,20 0,${20 - y} L 0,${v} Q 0,0 ${v},0 Z`;
|
|
5664
5663
|
return /* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-4 mb-4 group", children: [
|
|
5665
5664
|
/* @__PURE__ */ m.jsx(
|
|
5666
5665
|
et.div,
|
|
@@ -5675,10 +5674,9 @@ const id = sd, Ze = (t) => {
|
|
|
5675
5674
|
"path",
|
|
5676
5675
|
{
|
|
5677
5676
|
d: g,
|
|
5678
|
-
|
|
5677
|
+
className: `transition-all duration-300 ${e ? "fill-indigo-500 dark:fill-indigo-600" : "fill-slate-100 dark:fill-slate-700"}`,
|
|
5679
5678
|
stroke: e ? "#4f46e5" : "#e2e8f0",
|
|
5680
|
-
strokeWidth: 1.5
|
|
5681
|
-
className: "transition-all duration-300"
|
|
5679
|
+
strokeWidth: 1.5
|
|
5682
5680
|
}
|
|
5683
5681
|
) }),
|
|
5684
5682
|
/* @__PURE__ */ m.jsx(
|
|
@@ -5695,7 +5693,7 @@ const id = sd, Ze = (t) => {
|
|
|
5695
5693
|
damping: i.damping,
|
|
5696
5694
|
mass: i.mass
|
|
5697
5695
|
},
|
|
5698
|
-
children: /* @__PURE__ */ m.jsx("svg", { viewBox: "0 0 20 20", className: "overflow-visible drop-shadow-sm", children: /* @__PURE__ */ m.jsx("path", { d: S,
|
|
5696
|
+
children: /* @__PURE__ */ m.jsx("svg", { viewBox: "0 0 20 20", className: "overflow-visible drop-shadow-sm", children: /* @__PURE__ */ m.jsx("path", { d: S, className: "fill-white dark:fill-slate-200", stroke: e ? "#4f46e5" : "#94a3b8", strokeWidth: 1 }) })
|
|
5699
5697
|
}
|
|
5700
5698
|
)
|
|
5701
5699
|
] })
|
|
@@ -5710,7 +5708,7 @@ const id = sd, Ze = (t) => {
|
|
|
5710
5708
|
* This source code is licensed under the ISC license.
|
|
5711
5709
|
* See the LICENSE file in the root directory of this source tree.
|
|
5712
5710
|
*/
|
|
5713
|
-
var
|
|
5711
|
+
var rf = {
|
|
5714
5712
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5715
5713
|
width: 24,
|
|
5716
5714
|
height: 24,
|
|
@@ -5727,22 +5725,22 @@ var rd = {
|
|
|
5727
5725
|
* This source code is licensed under the ISC license.
|
|
5728
5726
|
* See the LICENSE file in the root directory of this source tree.
|
|
5729
5727
|
*/
|
|
5730
|
-
const
|
|
5728
|
+
const of = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim(), Te = (t, e) => {
|
|
5731
5729
|
const n = _n(
|
|
5732
5730
|
({ color: s = "currentColor", size: i = 24, strokeWidth: o = 2, absoluteStrokeWidth: r, className: a = "", children: l, ...c }, u) => vn(
|
|
5733
5731
|
"svg",
|
|
5734
5732
|
{
|
|
5735
5733
|
ref: u,
|
|
5736
|
-
...
|
|
5734
|
+
...rf,
|
|
5737
5735
|
width: i,
|
|
5738
5736
|
height: i,
|
|
5739
5737
|
stroke: s,
|
|
5740
5738
|
strokeWidth: r ? Number(o) * 24 / Number(i) : o,
|
|
5741
|
-
className: ["lucide", `lucide-${
|
|
5739
|
+
className: ["lucide", `lucide-${of(t)}`, a].join(" "),
|
|
5742
5740
|
...c
|
|
5743
5741
|
},
|
|
5744
5742
|
[
|
|
5745
|
-
...e.map(([
|
|
5743
|
+
...e.map(([d, h]) => vn(d, h)),
|
|
5746
5744
|
...Array.isArray(l) ? l : [l]
|
|
5747
5745
|
]
|
|
5748
5746
|
)
|
|
@@ -5782,7 +5780,7 @@ const _o = Te("CheckCircle2", [
|
|
|
5782
5780
|
* This source code is licensed under the ISC license.
|
|
5783
5781
|
* See the LICENSE file in the root directory of this source tree.
|
|
5784
5782
|
*/
|
|
5785
|
-
const
|
|
5783
|
+
const af = Te("HelpCircle", [
|
|
5786
5784
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
5787
5785
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
5788
5786
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
@@ -5804,10 +5802,10 @@ const Uo = Te("Info", [
|
|
|
5804
5802
|
* This source code is licensed under the ISC license.
|
|
5805
5803
|
* See the LICENSE file in the root directory of this source tree.
|
|
5806
5804
|
*/
|
|
5807
|
-
const
|
|
5805
|
+
const On = Te("X", [
|
|
5808
5806
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
5809
5807
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
5810
|
-
]),
|
|
5808
|
+
]), hf = ({ isOpen: t, title: e, message: n, onConfirm: s, onCancel: i }) => {
|
|
5811
5809
|
const o = I(() => Math.random() * 9999, [t]), r = I(() => ue(o, 420, 220), [o]), { x: a, y: l, handleMouseMove: c, handleMouseLeave: u } = Ze(r);
|
|
5812
5810
|
return /* @__PURE__ */ m.jsx(Ma, { children: t && /* @__PURE__ */ m.jsxs("div", { className: "fixed inset-0 z-[100] flex items-center justify-center p-4", children: [
|
|
5813
5811
|
/* @__PURE__ */ m.jsx(
|
|
@@ -5837,26 +5835,26 @@ const Fn = Te("X", [
|
|
|
5837
5835
|
className: "relative pointer-events-auto",
|
|
5838
5836
|
children: /* @__PURE__ */ m.jsx(bs, { profile: r, color: "#64748b", children: /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col w-full h-full py-6", children: [
|
|
5839
5837
|
/* @__PURE__ */ m.jsxs("div", { className: "flex items-start gap-4 mb-4", children: [
|
|
5840
|
-
/* @__PURE__ */ m.jsx("div", { className: "w-12 h-12 rounded-2xl bg-slate-100 flex items-center justify-center text-slate-500 flex-shrink-0", children: /* @__PURE__ */ m.jsx(
|
|
5838
|
+
/* @__PURE__ */ m.jsx("div", { className: "w-12 h-12 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center text-slate-500 dark:text-slate-400 flex-shrink-0", children: /* @__PURE__ */ m.jsx(af, { size: 24 }) }),
|
|
5841
5839
|
/* @__PURE__ */ m.jsxs("div", { children: [
|
|
5842
|
-
/* @__PURE__ */ m.jsx("h3", { className: "text-lg font-bold text-slate-800 leading-tight mb-1", children: e }),
|
|
5843
|
-
/* @__PURE__ */ m.jsx("p", { className: "text-sm text-slate-500 leading-relaxed", children: n })
|
|
5840
|
+
/* @__PURE__ */ m.jsx("h3", { className: "text-lg font-bold text-slate-800 dark:text-slate-100 leading-tight mb-1", children: e }),
|
|
5841
|
+
/* @__PURE__ */ m.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400 leading-relaxed", children: n })
|
|
5844
5842
|
] })
|
|
5845
5843
|
] }),
|
|
5846
5844
|
/* @__PURE__ */ m.jsxs("div", { className: "mt-auto flex gap-3 justify-end", children: [
|
|
5847
|
-
/* @__PURE__ */ m.jsx("button", { onClick: i, className: "px-6 py-2.5 rounded-xl text-xs font-bold uppercase tracking-widest text-slate-500 hover:bg-slate-100 transition-colors", children: "Batal" }),
|
|
5845
|
+
/* @__PURE__ */ m.jsx("button", { onClick: i, className: "px-6 py-2.5 rounded-xl text-xs font-bold uppercase tracking-widest text-slate-500 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors", children: "Batal" }),
|
|
5848
5846
|
/* @__PURE__ */ m.jsx("button", { onClick: s, className: "px-6 py-2.5 rounded-xl text-xs font-bold uppercase tracking-widest bg-slate-800 text-white shadow-lg shadow-slate-200 hover:bg-slate-700 active:scale-95 transition-all", children: "Ya, Lanjutkan" })
|
|
5849
5847
|
] })
|
|
5850
5848
|
] }) })
|
|
5851
5849
|
}
|
|
5852
5850
|
)
|
|
5853
5851
|
] }) });
|
|
5854
|
-
},
|
|
5852
|
+
}, pf = ({ type: t = "info", message: e }) => {
|
|
5855
5853
|
const n = I(() => Math.random() * 5e3, []), s = I(() => ue(n, 500, 72), [n]), { x: i, y: o, handleMouseMove: r, handleMouseLeave: a } = Ze(s), l = {
|
|
5856
5854
|
info: { color: "#3b82f6", icon: Uo, label: "Info Sistem" },
|
|
5857
5855
|
warning: { color: "#f59e0b", icon: Io, label: "Peringatan" },
|
|
5858
5856
|
success: { color: "#10b981", icon: _o, label: "Berhasil" },
|
|
5859
|
-
error: { color: "#ef4444", icon:
|
|
5857
|
+
error: { color: "#ef4444", icon: On, label: "Kesalahan" }
|
|
5860
5858
|
}, c = l[t] || l.info;
|
|
5861
5859
|
return /* @__PURE__ */ m.jsx(
|
|
5862
5860
|
et.div,
|
|
@@ -5870,18 +5868,18 @@ const Fn = Te("X", [
|
|
|
5870
5868
|
children: /* @__PURE__ */ m.jsxs(bs, { profile: s, color: c.color, children: [
|
|
5871
5869
|
/* @__PURE__ */ m.jsx("div", { className: "flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg", style: { backgroundColor: `${c.color}15`, color: c.color }, children: /* @__PURE__ */ m.jsx(c.icon, { size: 18, strokeWidth: 2.5 }) }),
|
|
5872
5870
|
/* @__PURE__ */ m.jsxs("div", { className: "flex-grow", children: [
|
|
5873
|
-
/* @__PURE__ */ m.jsx("h4", { className: "text-[9px] uppercase tracking-[0.2em] font-black opacity-30 leading-none mb-1", children: c.label }),
|
|
5874
|
-
/* @__PURE__ */ m.jsx("p", { className: "text-sm font-semibold text-slate-700 leading-tight", children: e })
|
|
5871
|
+
/* @__PURE__ */ m.jsx("h4", { className: "text-[9px] uppercase tracking-[0.2em] font-black opacity-30 dark:opacity-60 leading-none mb-1", children: c.label }),
|
|
5872
|
+
/* @__PURE__ */ m.jsx("p", { className: "text-sm font-semibold text-slate-700 dark:text-slate-200 leading-tight", children: e })
|
|
5875
5873
|
] })
|
|
5876
5874
|
] })
|
|
5877
5875
|
}
|
|
5878
5876
|
);
|
|
5879
|
-
},
|
|
5880
|
-
const { id: s, type: i, message: o, seed: r } = t, a = I(() => ue(r, 360, 88), [r]), { x: l, y: c, handleMouseMove: u, handleMouseLeave:
|
|
5877
|
+
}, lf = _n(({ notification: t, onRemove: e }, n) => {
|
|
5878
|
+
const { id: s, type: i, message: o, seed: r } = t, a = I(() => ue(r, 360, 88), [r]), { x: l, y: c, handleMouseMove: u, handleMouseLeave: d } = Ze(a), h = {
|
|
5881
5879
|
info: { color: "#3b82f6", icon: Uo, label: "Info" },
|
|
5882
5880
|
warning: { color: "#f59e0b", icon: Io, label: "Warning" },
|
|
5883
5881
|
success: { color: "#10b981", icon: _o, label: "Success" },
|
|
5884
|
-
error: { color: "#ef4444", icon:
|
|
5882
|
+
error: { color: "#ef4444", icon: On, label: "Error" }
|
|
5885
5883
|
}, p = h[i] || h.info;
|
|
5886
5884
|
return /* @__PURE__ */ m.jsx(
|
|
5887
5885
|
et.div,
|
|
@@ -5900,24 +5898,24 @@ const Fn = Te("X", [
|
|
|
5900
5898
|
exit: { opacity: 0, scale: 0.9, x: 20, filter: "blur(4px)", transition: { duration: 0.2 } },
|
|
5901
5899
|
style: { x: l, y: c },
|
|
5902
5900
|
onMouseMove: u,
|
|
5903
|
-
onMouseLeave:
|
|
5901
|
+
onMouseLeave: d,
|
|
5904
5902
|
className: "relative mb-4 cursor-default select-none pointer-events-auto group",
|
|
5905
5903
|
children: /* @__PURE__ */ m.jsxs(bs, { profile: a, color: p.color, children: [
|
|
5906
5904
|
/* @__PURE__ */ m.jsx("div", { className: "flex-shrink-0 w-10 h-10 flex items-center justify-center rounded-full", style: { backgroundColor: `${p.color}15`, color: p.color }, children: /* @__PURE__ */ m.jsx(p.icon, { size: 20, strokeWidth: 2.5 }) }),
|
|
5907
5905
|
/* @__PURE__ */ m.jsxs("div", { className: "flex-grow min-w-0", children: [
|
|
5908
|
-
/* @__PURE__ */ m.jsx("h4", { className: "text-[10px] uppercase tracking-wider font-bold opacity-40 mb-0.5", children: p.label }),
|
|
5909
|
-
/* @__PURE__ */ m.jsx("p", { className: "text-sm font-medium text-slate-800 truncate leading-snug", children: o })
|
|
5906
|
+
/* @__PURE__ */ m.jsx("h4", { className: "text-[10px] uppercase tracking-wider font-bold opacity-40 dark:opacity-60 mb-0.5", children: p.label }),
|
|
5907
|
+
/* @__PURE__ */ m.jsx("p", { className: "text-sm font-medium text-slate-800 dark:text-slate-100 truncate leading-snug", children: o })
|
|
5910
5908
|
] }),
|
|
5911
|
-
/* @__PURE__ */ m.jsx("button", { onClick: () => e(s), className: "flex-shrink-0 p-1.5 rounded-md hover:bg-slate-100 opacity-0 group-hover:opacity-100 transition-opacity duration-200", children: /* @__PURE__ */ m.jsx(
|
|
5909
|
+
/* @__PURE__ */ m.jsx("button", { onClick: () => e(s), className: "flex-shrink-0 p-1.5 rounded-md hover:bg-slate-100 dark:hover:bg-slate-800 opacity-0 group-hover:opacity-100 transition-opacity duration-200", children: /* @__PURE__ */ m.jsx(On, { size: 16, className: "text-slate-400 dark:text-slate-500" }) })
|
|
5912
5910
|
] })
|
|
5913
5911
|
}
|
|
5914
5912
|
);
|
|
5915
5913
|
});
|
|
5916
|
-
|
|
5917
|
-
const
|
|
5918
|
-
const s = I(() => n || Math.random() * 1e3, [n]), i = 340, o = 220, r = (
|
|
5919
|
-
const
|
|
5920
|
-
return
|
|
5914
|
+
lf.displayName = "TactileToast";
|
|
5915
|
+
const mf = ({ title: t, description: e, seed: n }) => {
|
|
5916
|
+
const s = I(() => n || Math.random() * 1e3, [n]), i = 340, o = 220, r = (C) => {
|
|
5917
|
+
const O = Math.sin(s + C) * 1e4;
|
|
5918
|
+
return O - Math.floor(O);
|
|
5921
5919
|
}, a = I(() => ({
|
|
5922
5920
|
r: {
|
|
5923
5921
|
tl: 12 + r(1) * 16,
|
|
@@ -5931,13 +5929,13 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
5931
5929
|
// Adjust stiffness/damping values to fit framer-motion spring behavior
|
|
5932
5930
|
stiffness: 120 + r(8) * 60,
|
|
5933
5931
|
damping: 15 + r(9) * 10
|
|
5934
|
-
}), [s]), l = `M ${a.r.tl},0 L ${i - a.r.tr},0 Q ${i},0 ${i},${a.r.tr} L ${i},${o - a.r.br} Q ${i},${o} ${i - a.r.br},${o} L ${a.r.bl},${o} Q 0,${o} 0,${o - a.r.bl} L 0,${a.r.tl} Q 0,0 ${a.r.tl},0 Z`, c = ut(0), u = ut(0),
|
|
5932
|
+
}), [s]), l = `M ${a.r.tl},0 L ${i - a.r.tr},0 Q ${i},0 ${i},${a.r.tr} L ${i},${o - a.r.br} Q ${i},${o} ${i - a.r.br},${o} L ${a.r.bl},${o} Q 0,${o} 0,${o - a.r.bl} L 0,${a.r.tl} Q 0,0 ${a.r.tl},0 Z`, c = ut(0), u = ut(0), d = ut(0), h = { stiffness: a.stiffness, damping: a.damping, mass: a.mass }, p = xt(c, h), g = xt(u, h), v = xt(d, h), x = B(null), y = (C) => {
|
|
5935
5933
|
if (!x.current) return;
|
|
5936
|
-
const
|
|
5937
|
-
u.set(U), c.set(Y),
|
|
5934
|
+
const O = x.current.getBoundingClientRect(), Z = C.clientX - O.left, L = C.clientY - O.top, U = (Z / i - 0.5) * 16, Y = (L / o - 0.5) * -16;
|
|
5935
|
+
u.set(U), c.set(Y), d.set(15);
|
|
5938
5936
|
}, P = () => {
|
|
5939
|
-
c.set(0), u.set(0),
|
|
5940
|
-
}, S = () =>
|
|
5937
|
+
c.set(0), u.set(0), d.set(0);
|
|
5938
|
+
}, S = () => d.set(-5), k = () => d.set(15), w = yt(g, (C) => a.shadowX + C * 0.5), A = yt(p, (C) => 6 + C * -0.5), b = yt(v, (C) => 1 + C * 2e-3), R = yt(v, (C) => 0.06 + C * 4e-3), D = Math.floor(s).toString(16).toUpperCase();
|
|
5941
5939
|
return /* @__PURE__ */ m.jsxs(
|
|
5942
5940
|
"div",
|
|
5943
5941
|
{
|
|
@@ -5947,7 +5945,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
5947
5945
|
onMouseMove: y,
|
|
5948
5946
|
onMouseLeave: P,
|
|
5949
5947
|
onMouseDown: S,
|
|
5950
|
-
onMouseUp:
|
|
5948
|
+
onMouseUp: k,
|
|
5951
5949
|
children: [
|
|
5952
5950
|
/* @__PURE__ */ m.jsx(
|
|
5953
5951
|
et.div,
|
|
@@ -5974,7 +5972,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
5974
5972
|
transformStyle: "preserve-3d"
|
|
5975
5973
|
},
|
|
5976
5974
|
children: [
|
|
5977
|
-
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${i} ${o}`, className: "w-full h-full block", children: /* @__PURE__ */ m.jsx("path", { d: l,
|
|
5975
|
+
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${i} ${o}`, className: "w-full h-full block", children: /* @__PURE__ */ m.jsx("path", { d: l, className: "fill-white dark:fill-slate-800 transition-colors group-hover:fill-slate-50/80 dark:group-hover:fill-slate-700/80", stroke: "#e2e8f0", strokeWidth: a.stroke }) }),
|
|
5978
5976
|
/* @__PURE__ */ m.jsxs("div", { className: "absolute inset-0 p-8 flex flex-col pointer-events-none", children: [
|
|
5979
5977
|
/* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
5980
5978
|
/* @__PURE__ */ m.jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-slate-200 group-hover:bg-indigo-400 transition-colors" }),
|
|
@@ -5983,14 +5981,14 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
5983
5981
|
Math.floor(s)
|
|
5984
5982
|
] })
|
|
5985
5983
|
] }),
|
|
5986
|
-
/* @__PURE__ */ m.jsx("h3", { className: "text-[13px] font-bold text-slate-800 leading-tight mb-2", children: t }),
|
|
5987
|
-
/* @__PURE__ */ m.jsx("p", { className: "text-[11px] text-slate-500 leading-relaxed font-medium", children: e }),
|
|
5988
|
-
/* @__PURE__ */ m.jsxs("div", { className: "mt-auto pt-4 border-t border-slate-100 flex justify-between items-center opacity-30 group-hover:opacity-60 transition-opacity", children: [
|
|
5989
|
-
/* @__PURE__ */ m.jsxs("span", { className: "text-[9px] font-mono", children: [
|
|
5984
|
+
/* @__PURE__ */ m.jsx("h3", { className: "text-[13px] font-bold text-slate-800 dark:text-slate-100 leading-tight mb-2", children: t }),
|
|
5985
|
+
/* @__PURE__ */ m.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400 leading-relaxed font-medium", children: e }),
|
|
5986
|
+
/* @__PURE__ */ m.jsxs("div", { className: "mt-auto pt-4 border-t border-slate-100 dark:border-slate-700/50 flex justify-between items-center opacity-30 group-hover:opacity-60 transition-opacity", children: [
|
|
5987
|
+
/* @__PURE__ */ m.jsxs("span", { className: "text-[9px] font-mono text-slate-800 dark:text-slate-300", children: [
|
|
5990
5988
|
"ID: 0x",
|
|
5991
5989
|
D
|
|
5992
5990
|
] }),
|
|
5993
|
-
/* @__PURE__ */ m.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5991
|
+
/* @__PURE__ */ m.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", className: "text-slate-800 dark:text-slate-300", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5994
5992
|
/* @__PURE__ */ m.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
5995
5993
|
/* @__PURE__ */ m.jsx("polyline", { points: "12 5 19 12 12 19" })
|
|
5996
5994
|
] })
|
|
@@ -6002,10 +6000,10 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6002
6000
|
]
|
|
6003
6001
|
}
|
|
6004
6002
|
);
|
|
6005
|
-
},
|
|
6006
|
-
const i = I(() => Math.random() * 1e3, []), o = 140, r = 54, a = (
|
|
6007
|
-
const
|
|
6008
|
-
return
|
|
6003
|
+
}, gf = ({ label: t, color: e = "#64748b", onClick: n, className: s = "" }) => {
|
|
6004
|
+
const i = I(() => Math.random() * 1e3, []), o = 140, r = 54, a = (C) => {
|
|
6005
|
+
const O = Math.sin(i + C) * 1e4;
|
|
6006
|
+
return O - Math.floor(O);
|
|
6009
6007
|
}, l = I(() => ({
|
|
6010
6008
|
r: {
|
|
6011
6009
|
tl: 6 + a(1) * 14,
|
|
@@ -6020,13 +6018,13 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6020
6018
|
// Adjusted for Framer Motion
|
|
6021
6019
|
damping: 20 + a(9) * 10
|
|
6022
6020
|
// Adjusted for Framer Motion
|
|
6023
|
-
}), [i]), c = `M ${l.r.tl},0 L ${o - l.r.tr},0 Q ${o},0 ${o},${l.r.tr} L ${o},${r - l.r.br} Q ${o},${r} ${o - l.r.br},${r} L ${l.r.bl},${r} Q 0,${r} 0,${r - l.r.bl} L 0,${l.r.tl} Q 0,0 ${l.r.tl},0 Z`, u = ut(0),
|
|
6021
|
+
}), [i]), c = `M ${l.r.tl},0 L ${o - l.r.tr},0 Q ${o},0 ${o},${l.r.tr} L ${o},${r - l.r.br} Q ${o},${r} ${o - l.r.br},${r} L ${l.r.bl},${r} Q 0,${r} 0,${r - l.r.bl} L 0,${l.r.tl} Q 0,0 ${l.r.tl},0 Z`, u = ut(0), d = ut(0), h = ut(1), p = { stiffness: l.stiffness, damping: l.damping, mass: l.mass }, g = { stiffness: l.stiffness * 2, damping: l.damping, mass: l.mass }, v = xt(u, p), x = xt(d, p), y = xt(h, g), P = B(null), S = (C) => {
|
|
6024
6022
|
if (!P.current) return;
|
|
6025
|
-
const
|
|
6026
|
-
|
|
6027
|
-
},
|
|
6028
|
-
u.set(0),
|
|
6029
|
-
}, w = () => h.set(0.94), A = () => h.set(1), b = yt(x, (
|
|
6023
|
+
const O = P.current.getBoundingClientRect(), Z = C.clientX - O.left, L = C.clientY - O.top, U = (Z / o - 0.5) * 25, Y = (L / r - 0.5) * -25;
|
|
6024
|
+
d.set(U), u.set(Y);
|
|
6025
|
+
}, k = () => {
|
|
6026
|
+
u.set(0), d.set(0), h.set(1);
|
|
6027
|
+
}, w = () => h.set(0.94), A = () => h.set(1), b = yt(x, (C) => C * 0.2), R = yt(v, (C) => l.shadowY + C * -0.2), D = yt(y, (C) => 0.1 - (1 - C));
|
|
6030
6028
|
return /* @__PURE__ */ m.jsxs(
|
|
6031
6029
|
"div",
|
|
6032
6030
|
{
|
|
@@ -6034,7 +6032,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6034
6032
|
className: `relative group cursor-pointer outline-none ${s}`,
|
|
6035
6033
|
style: { width: o, height: r, perspective: 800, WebkitTapHighlightColor: "transparent" },
|
|
6036
6034
|
onMouseMove: S,
|
|
6037
|
-
onMouseLeave:
|
|
6035
|
+
onMouseLeave: k,
|
|
6038
6036
|
onMouseDown: w,
|
|
6039
6037
|
onMouseUp: A,
|
|
6040
6038
|
onClick: n,
|
|
@@ -6067,10 +6065,9 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6067
6065
|
"path",
|
|
6068
6066
|
{
|
|
6069
6067
|
d: c,
|
|
6070
|
-
|
|
6068
|
+
className: "fill-white dark:fill-slate-800 transition-colors duration-300 group-hover:fill-slate-50 dark:group-hover:fill-slate-700",
|
|
6071
6069
|
stroke: e,
|
|
6072
|
-
strokeWidth: l.stroke
|
|
6073
|
-
className: "transition-colors duration-300 group-hover:fill-slate-50"
|
|
6070
|
+
strokeWidth: l.stroke
|
|
6074
6071
|
}
|
|
6075
6072
|
) }),
|
|
6076
6073
|
/* @__PURE__ */ m.jsx("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ m.jsx("span", { className: "text-[10px] font-black uppercase tracking-[0.2em]", style: { color: e }, children: t }) })
|
|
@@ -6080,8 +6077,8 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6080
6077
|
]
|
|
6081
6078
|
}
|
|
6082
6079
|
);
|
|
6083
|
-
},
|
|
6084
|
-
const r = I(() => Math.random() * 1e4, []), a = 300, l = 12, c = 24, [u,
|
|
6080
|
+
}, yf = ({ label: t, min: e = 0, max: n = 100, defaultValue: s = 50, onChange: i, className: o = "" }) => {
|
|
6081
|
+
const r = I(() => Math.random() * 1e4, []), a = 300, l = 12, c = 24, [u, d] = bt(s), h = B(null), p = (L) => {
|
|
6085
6082
|
const U = Math.sin(r + L) * 1e4;
|
|
6086
6083
|
return U - Math.floor(U);
|
|
6087
6084
|
}, g = I(() => ({
|
|
@@ -6103,7 +6100,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6103
6100
|
// Adjusted for framer-motion
|
|
6104
6101
|
damping: 15 + p(12) * 10
|
|
6105
6102
|
// Adjusted for framer-motion
|
|
6106
|
-
}), [r]), v = `M ${g.r.tl},0 L ${a - g.r.tr},0 Q ${a},0 ${a},${g.r.tr} L ${a},${l - g.r.br} Q ${a},${l} ${a - g.r.br},${l} L ${g.r.bl},${l} Q 0,${l} 0,${l - g.r.bl} L 0,${g.r.tl} Q 0,0 ${g.r.tl},0 Z`, x = `M ${g.knobR.tl},0 L ${c - g.knobR.tr},0 Q ${c},0 ${c},${g.knobR.tr} L ${c},${c - g.knobR.br} Q ${c},${c} ${c - g.knobR.br},${c} L ${g.knobR.bl},${c} Q 0,${c} 0,${c - g.knobR.bl} L 0,${g.knobR.tl} Q 0,0 ${g.knobR.tl},0 Z`, y = (s - e) / (n - e), P = Math.max(0, Math.min(a, y * a)), S = ut(P),
|
|
6103
|
+
}), [r]), v = `M ${g.r.tl},0 L ${a - g.r.tr},0 Q ${a},0 ${a},${g.r.tr} L ${a},${l - g.r.br} Q ${a},${l} ${a - g.r.br},${l} L ${g.r.bl},${l} Q 0,${l} 0,${l - g.r.bl} L 0,${g.r.tl} Q 0,0 ${g.r.tl},0 Z`, x = `M ${g.knobR.tl},0 L ${c - g.knobR.tr},0 Q ${c},0 ${c},${g.knobR.tr} L ${c},${c - g.knobR.br} Q ${c},${c} ${c - g.knobR.br},${c} L ${g.knobR.bl},${c} Q 0,${c} 0,${c - g.knobR.bl} L 0,${g.knobR.tl} Q 0,0 ${g.knobR.tl},0 Z`, y = (s - e) / (n - e), P = Math.max(0, Math.min(a, y * a)), S = ut(P), k = { stiffness: g.stiffness, damping: g.damping, mass: g.mass }, w = xt(S, k), A = (L) => {
|
|
6107
6104
|
let U = L / a, Y = e + U * (n - e);
|
|
6108
6105
|
return Y = Math.max(e, Math.min(n, Y)), Math.round(Y);
|
|
6109
6106
|
}, b = (L) => {
|
|
@@ -6112,12 +6109,12 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6112
6109
|
let Y = L - U.left;
|
|
6113
6110
|
Y = Math.max(0, Math.min(a, Y)), S.set(Y);
|
|
6114
6111
|
const Pt = A(Y);
|
|
6115
|
-
|
|
6112
|
+
d(Pt), i && i(Pt);
|
|
6116
6113
|
}, R = (L) => {
|
|
6117
6114
|
L.target.setPointerCapture(L.pointerId), b(L.clientX);
|
|
6118
6115
|
}, D = (L) => {
|
|
6119
6116
|
L.target.hasPointerCapture(L.pointerId) && b(L.clientX);
|
|
6120
|
-
},
|
|
6117
|
+
}, C = yt(w, (L) => `inset(0 ${a - L}px 0 0)`), O = Qd(w), Z = yt(O, (L) => 1 + Math.abs(L) * 5e-4);
|
|
6121
6118
|
return /* @__PURE__ */ m.jsxs("div", { className: `w-full max-w-[400px] mb-12 relative px-4 ${o}`, children: [
|
|
6122
6119
|
/* @__PURE__ */ m.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
|
|
6123
6120
|
/* @__PURE__ */ m.jsx("span", { className: "text-[10px] font-black uppercase tracking-widest text-slate-400", children: t }),
|
|
@@ -6135,7 +6132,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6135
6132
|
onPointerDown: R,
|
|
6136
6133
|
onPointerMove: D,
|
|
6137
6134
|
children: [
|
|
6138
|
-
/* @__PURE__ */ m.jsx("svg", { width: a, height: l, viewBox: `0 0 ${a} ${l}`, className: "overflow-visible absolute inset-0 pointer-events-none", children: /* @__PURE__ */ m.jsx("path", { d: v,
|
|
6135
|
+
/* @__PURE__ */ m.jsx("svg", { width: a, height: l, viewBox: `0 0 ${a} ${l}`, className: "overflow-visible absolute inset-0 pointer-events-none", children: /* @__PURE__ */ m.jsx("path", { d: v, className: "fill-slate-100 dark:fill-slate-700", stroke: "#e2e8f0", strokeWidth: g.strokeWidth }) }),
|
|
6139
6136
|
/* @__PURE__ */ m.jsx(
|
|
6140
6137
|
et.svg,
|
|
6141
6138
|
{
|
|
@@ -6143,8 +6140,8 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6143
6140
|
height: l,
|
|
6144
6141
|
viewBox: `0 0 ${a} ${l}`,
|
|
6145
6142
|
className: "overflow-visible absolute inset-0 pointer-events-none",
|
|
6146
|
-
style: { clipPath:
|
|
6147
|
-
children: /* @__PURE__ */ m.jsx("path", { d: v,
|
|
6143
|
+
style: { clipPath: C },
|
|
6144
|
+
children: /* @__PURE__ */ m.jsx("path", { d: v, className: "fill-indigo-500 dark:fill-indigo-600" })
|
|
6148
6145
|
}
|
|
6149
6146
|
),
|
|
6150
6147
|
/* @__PURE__ */ m.jsx(
|
|
@@ -6159,14 +6156,14 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6159
6156
|
scaleX: Z,
|
|
6160
6157
|
originX: 0.5
|
|
6161
6158
|
},
|
|
6162
|
-
children: /* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${c} ${c}`, className: "overflow-visible drop-shadow-md", children: /* @__PURE__ */ m.jsx("path", { d: x,
|
|
6159
|
+
children: /* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${c} ${c}`, className: "overflow-visible drop-shadow-md", children: /* @__PURE__ */ m.jsx("path", { d: x, className: "fill-white dark:fill-slate-200", stroke: "#4f46e5", strokeWidth: "1.5" }) })
|
|
6163
6160
|
}
|
|
6164
6161
|
)
|
|
6165
6162
|
]
|
|
6166
6163
|
}
|
|
6167
6164
|
)
|
|
6168
6165
|
] });
|
|
6169
|
-
},
|
|
6166
|
+
}, vf = ({ label: t = "Loading", color: e = "#6366f1", size: n = 120, targetVelocity: s = 0.05, className: i = "" }) => {
|
|
6170
6167
|
const o = B(null), r = B(null), a = B(null), l = B({
|
|
6171
6168
|
// Rotation Physics
|
|
6172
6169
|
angle: 0,
|
|
@@ -6184,10 +6181,10 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6184
6181
|
velocityRotateY: 0,
|
|
6185
6182
|
velocityTranslateZ: 0
|
|
6186
6183
|
});
|
|
6187
|
-
|
|
6184
|
+
ft(() => {
|
|
6188
6185
|
l.current.targetVelocity = s;
|
|
6189
6186
|
}, [s]);
|
|
6190
|
-
const c = n / 2, u = n * 0.4, [
|
|
6187
|
+
const c = n / 2, u = n * 0.4, [d, h] = bt(() => Math.floor(Math.random() * 1e6)), p = (w, A = d) => {
|
|
6191
6188
|
const b = Math.sin(A + w) * 1e4;
|
|
6192
6189
|
return b - Math.floor(b);
|
|
6193
6190
|
}, g = I(() => ({
|
|
@@ -6198,13 +6195,13 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6198
6195
|
elasticity: 0.05 + p(5) * 0.1,
|
|
6199
6196
|
stiffness: 0.12 + p(6) * 0.08,
|
|
6200
6197
|
damping: 0.82 + p(7) * 0.08
|
|
6201
|
-
}), [
|
|
6202
|
-
|
|
6198
|
+
}), [d]), v = 2 * Math.PI * u, x = v / g.segments - g.gapSize;
|
|
6199
|
+
ft(() => {
|
|
6203
6200
|
let w;
|
|
6204
6201
|
const A = () => {
|
|
6205
6202
|
if (!a.current || !r.current) return;
|
|
6206
|
-
const b = l.current, { mass: R, stiffness: D, damping:
|
|
6207
|
-
b.angularVelocity += L / R, b.angularVelocity *= b.friction, b.angle += b.angularVelocity, b.velocityRotateX += (b.targetRotateX - b.currentRotateX) * D / R, b.velocityRotateX *=
|
|
6203
|
+
const b = l.current, { mass: R, stiffness: D, damping: C, elasticity: O } = g, Z = Math.sin(Date.now() * 2e-3) * 0.02, L = (b.targetVelocity + Z - b.angularVelocity) * O;
|
|
6204
|
+
b.angularVelocity += L / R, b.angularVelocity *= b.friction, b.angle += b.angularVelocity, b.velocityRotateX += (b.targetRotateX - b.currentRotateX) * D / R, b.velocityRotateX *= C, b.currentRotateX += b.velocityRotateX, b.velocityRotateY += (b.targetRotateY - b.currentRotateY) * D / R, b.velocityRotateY *= C, b.currentRotateY += b.velocityRotateY, b.velocityTranslateZ += (b.targetTranslateZ - b.currentTranslateZ) * D / R, b.velocityTranslateZ *= C, b.currentTranslateZ += b.velocityTranslateZ;
|
|
6208
6205
|
const U = b.angularVelocity * 150, Y = x + U;
|
|
6209
6206
|
a.current.style.strokeDasharray = `${Y} ${v - Y}`;
|
|
6210
6207
|
const Pt = b.angle * 180 / Math.PI;
|
|
@@ -6226,7 +6223,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6226
6223
|
l.current.targetRotateX = 0, l.current.targetRotateY = 0, l.current.targetTranslateZ = 0;
|
|
6227
6224
|
}, S = () => {
|
|
6228
6225
|
l.current.targetTranslateZ = -5;
|
|
6229
|
-
},
|
|
6226
|
+
}, k = () => {
|
|
6230
6227
|
l.current.targetTranslateZ = 10;
|
|
6231
6228
|
};
|
|
6232
6229
|
return /* @__PURE__ */ m.jsxs("div", { className: `flex flex-col items-center gap-4 ${i}`, children: [
|
|
@@ -6239,12 +6236,12 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6239
6236
|
onMouseMove: y,
|
|
6240
6237
|
onMouseLeave: P,
|
|
6241
6238
|
onMouseDown: S,
|
|
6242
|
-
onMouseUp:
|
|
6239
|
+
onMouseUp: k,
|
|
6243
6240
|
onTouchStart: S,
|
|
6244
|
-
onTouchEnd:
|
|
6241
|
+
onTouchEnd: k,
|
|
6245
6242
|
children: /* @__PURE__ */ m.jsxs("div", { ref: r, className: "absolute inset-0", style: { transformStyle: "preserve-3d" }, children: [
|
|
6246
|
-
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${n} ${n}`, className: "absolute inset-0 opacity-[0.03] blur-[2px] translate-y-1", children: /* @__PURE__ */ m.jsx("circle", { cx: c, cy: c, r: u, fill: "none",
|
|
6247
|
-
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${n} ${n}`, className: "absolute inset-0", children: /* @__PURE__ */ m.jsx("circle", { cx: c, cy: c, r: u, fill: "none",
|
|
6243
|
+
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${n} ${n}`, className: "absolute inset-0 opacity-[0.03] dark:opacity-20 blur-[2px] translate-y-1", children: /* @__PURE__ */ m.jsx("circle", { cx: c, cy: c, r: u, fill: "none", className: "stroke-black dark:stroke-slate-900", strokeWidth: g.strokeWidth }) }),
|
|
6244
|
+
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${n} ${n}`, className: "absolute inset-0", children: /* @__PURE__ */ m.jsx("circle", { cx: c, cy: c, r: u, fill: "none", className: "stroke-slate-200 dark:stroke-slate-700/50", strokeWidth: g.strokeWidth }) }),
|
|
6248
6245
|
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${n} ${n}`, className: "absolute inset-0 overflow-visible", children: /* @__PURE__ */ m.jsx(
|
|
6249
6246
|
"circle",
|
|
6250
6247
|
{
|
|
@@ -6266,9 +6263,9 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6266
6263
|
] })
|
|
6267
6264
|
}
|
|
6268
6265
|
),
|
|
6269
|
-
/* @__PURE__ */ m.jsx("div", { className: "flex flex-col items-center gap-2", children: t && /* @__PURE__ */ m.jsx("span", { className: "text-[10px] font-black uppercase tracking-[0.2em] text-slate-400", children: t }) })
|
|
6266
|
+
/* @__PURE__ */ m.jsx("div", { className: "flex flex-col items-center gap-2", children: t && /* @__PURE__ */ m.jsx("span", { className: "text-[10px] font-black uppercase tracking-[0.2em] text-slate-400 dark:text-slate-500", children: t }) })
|
|
6270
6267
|
] });
|
|
6271
|
-
},
|
|
6268
|
+
}, xf = ({
|
|
6272
6269
|
label: t,
|
|
6273
6270
|
placeholder: e,
|
|
6274
6271
|
isError: n = !1,
|
|
@@ -6278,7 +6275,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6278
6275
|
width: r = 384,
|
|
6279
6276
|
height: a = 52
|
|
6280
6277
|
}) => {
|
|
6281
|
-
const l = I(() => Math.floor(Math.random() * 1e6), []), [c, u] = bt(!1), [
|
|
6278
|
+
const l = I(() => Math.floor(Math.random() * 1e6), []), [c, u] = bt(!1), [d, h] = bt(s), p = sf(), g = B(null), v = B(n), x = (R) => {
|
|
6282
6279
|
const D = Math.sin(l + R) * 1e4;
|
|
6283
6280
|
return D - Math.floor(D);
|
|
6284
6281
|
}, y = I(() => ({
|
|
@@ -6295,9 +6292,9 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6295
6292
|
damping: 10
|
|
6296
6293
|
// Adjusted for Framer Motion
|
|
6297
6294
|
}), [l]), P = `M ${y.r.tl},0 L ${r - y.r.tr},0 Q ${r},0 ${r},${y.r.tr} L ${r},${a - y.r.br} Q ${r},${a} ${r - y.r.br},${a} L ${y.r.bl},${a} Q 0,${a} 0,${a - y.r.bl} L 0,${y.r.tl} Q 0,0 ${y.r.tl},0 Z`;
|
|
6298
|
-
|
|
6295
|
+
ft(() => {
|
|
6299
6296
|
g.current || h(s);
|
|
6300
|
-
}, [s]),
|
|
6297
|
+
}, [s]), ft(() => {
|
|
6301
6298
|
if (n && !v.current && (p.start({
|
|
6302
6299
|
x: [0, 15, -12, 8, -5, 0],
|
|
6303
6300
|
transition: {
|
|
@@ -6309,26 +6306,25 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6309
6306
|
}), s)) {
|
|
6310
6307
|
const R = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?";
|
|
6311
6308
|
let D = 0;
|
|
6312
|
-
const
|
|
6309
|
+
const C = 8;
|
|
6313
6310
|
g.current && clearInterval(g.current), g.current = setInterval(() => {
|
|
6314
|
-
let
|
|
6311
|
+
let O = "";
|
|
6315
6312
|
for (let Z = 0; Z < s.length; Z++)
|
|
6316
|
-
|
|
6317
|
-
h(
|
|
6313
|
+
O += R.charAt(Math.floor(Math.random() * R.length));
|
|
6314
|
+
h(O), D++, D >= C && (clearInterval(g.current), g.current = null, h(s));
|
|
6318
6315
|
}, 50);
|
|
6319
6316
|
}
|
|
6320
6317
|
v.current = n;
|
|
6321
|
-
}, [n, s, p, y.mass]),
|
|
6318
|
+
}, [n, s, p, y.mass]), ft(() => () => {
|
|
6322
6319
|
g.current && clearInterval(g.current);
|
|
6323
6320
|
}, []);
|
|
6324
|
-
const S = () => u(!0),
|
|
6321
|
+
const S = () => u(!0), k = () => u(!1), w = n ? "text-red-500" : c ? "text-indigo-500" : "text-slate-400 dark:text-slate-500", A = n ? "fill-red-50 dark:fill-red-950/30 stroke-red-500" : c ? "fill-white dark:fill-slate-800 stroke-indigo-500" : "fill-white dark:fill-slate-800 stroke-slate-200 dark:stroke-slate-700/50", b = n ? "text-red-500 placeholder:text-red-300" : "text-slate-700 dark:text-slate-200 placeholder:text-slate-400 dark:placeholder:text-slate-500";
|
|
6325
6322
|
return /* @__PURE__ */ m.jsxs("div", { className: `flex flex-col w-full ${o}`, children: [
|
|
6326
6323
|
t && /* @__PURE__ */ m.jsx(
|
|
6327
6324
|
et.label,
|
|
6328
6325
|
{
|
|
6329
|
-
className:
|
|
6326
|
+
className: `text-[10px] font-black uppercase tracking-[0.2em] mb-3 ml-2 transition-colors duration-200 ${w}`,
|
|
6330
6327
|
animate: {
|
|
6331
|
-
color: w,
|
|
6332
6328
|
y: c || n ? -2 : 0
|
|
6333
6329
|
},
|
|
6334
6330
|
transition: { duration: 0.2 },
|
|
@@ -6354,8 +6350,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6354
6350
|
et.path,
|
|
6355
6351
|
{
|
|
6356
6352
|
d: P,
|
|
6357
|
-
|
|
6358
|
-
transition: { duration: 0.3 },
|
|
6353
|
+
className: `transition-colors duration-300 ${A}`,
|
|
6359
6354
|
strokeWidth: y.stroke
|
|
6360
6355
|
}
|
|
6361
6356
|
) }),
|
|
@@ -6363,15 +6358,14 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6363
6358
|
"input",
|
|
6364
6359
|
{
|
|
6365
6360
|
type: "text",
|
|
6366
|
-
className:
|
|
6367
|
-
style: { color: n ? "#ef4444" : "#334155" },
|
|
6361
|
+
className: `bg-transparent border-none w-full h-full px-4 text-sm font-medium focus:outline-none transition-colors duration-300 ${b}`,
|
|
6368
6362
|
placeholder: e,
|
|
6369
|
-
value:
|
|
6363
|
+
value: d,
|
|
6370
6364
|
onChange: (R) => {
|
|
6371
6365
|
h(R.target.value), i && i(R);
|
|
6372
6366
|
},
|
|
6373
6367
|
onFocus: S,
|
|
6374
|
-
onBlur:
|
|
6368
|
+
onBlur: k
|
|
6375
6369
|
}
|
|
6376
6370
|
) })
|
|
6377
6371
|
]
|
|
@@ -6380,7 +6374,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6380
6374
|
}
|
|
6381
6375
|
)
|
|
6382
6376
|
] });
|
|
6383
|
-
}, or = (t, e, n) => `M ${n.tl},0 L ${t - n.tr},0 Q ${t},0 ${t},${n.tr} L ${t},${e - n.br} Q ${t},${e} ${t - n.br},${e} L ${n.bl},${e} Q 0,${e} 0,${e - n.bl} L 0,${n.tl} Q 0,0 ${n.tl},0 Z`,
|
|
6377
|
+
}, or = (t, e, n) => `M ${n.tl},0 L ${t - n.tr},0 Q ${t},0 ${t},${n.tr} L ${t},${e - n.br} Q ${t},${e} ${t - n.br},${e} L ${n.bl},${e} Q 0,${e} 0,${e - n.bl} L 0,${n.tl} Q 0,0 ${n.tl},0 Z`, cf = ({
|
|
6384
6378
|
initialDark: t = !1,
|
|
6385
6379
|
onChange: e,
|
|
6386
6380
|
className: n = "",
|
|
@@ -6407,8 +6401,8 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6407
6401
|
knobPath: B(null),
|
|
6408
6402
|
sunIcon: B(null),
|
|
6409
6403
|
moonIcon: B(null)
|
|
6410
|
-
},
|
|
6411
|
-
const A = Math.sin(
|
|
6404
|
+
}, d = I(() => Math.floor(Math.random() * 1e6), []), h = (w) => {
|
|
6405
|
+
const A = Math.sin(d + w) * 1e4;
|
|
6412
6406
|
return A - Math.floor(A);
|
|
6413
6407
|
}, p = I(() => ({
|
|
6414
6408
|
trackR: {
|
|
@@ -6427,12 +6421,12 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6427
6421
|
mass: 1.2 + h(10) * 0.5,
|
|
6428
6422
|
stiffness: 0.12 + h(11) * 0.05,
|
|
6429
6423
|
damping: 0.82 + h(12) * 0.05
|
|
6430
|
-
}), [
|
|
6431
|
-
|
|
6424
|
+
}), [d]), g = I(() => or(r, a, p.trackR), [p]), v = I(() => or(l, l, p.knobR), [p]);
|
|
6425
|
+
ft(() => {
|
|
6432
6426
|
let w;
|
|
6433
6427
|
const A = () => {
|
|
6434
|
-
const b = c.current, { mass: R, stiffness: D, damping:
|
|
6435
|
-
b.velocity +=
|
|
6428
|
+
const b = c.current, { mass: R, stiffness: D, damping: C } = p, O = (b.targetX - b.currentX) * D;
|
|
6429
|
+
b.velocity += O / R, b.velocity *= C, b.currentX += b.velocity, b.velocityRX += (b.targetRotateX - b.currentRotateX) * D / R, b.velocityRX *= C, b.currentRotateX += b.velocityRX, b.velocityRY += (b.targetRotateY - b.currentRotateY) * D / R, b.velocityRY *= C, b.currentRotateY += b.velocityRY, b.velocityZ += (b.targetZ - b.currentZ) * D / R, b.velocityZ *= C, b.currentZ += b.velocityZ;
|
|
6436
6430
|
const Z = 1 + Math.abs(b.velocity) * 0.04;
|
|
6437
6431
|
u.knob.current && (u.knob.current.style.left = `${Math.floor(b.currentX)}px`, u.knob.current.style.transform = `scaleX(${Z})`), u.kineticBody.current && (u.kineticBody.current.style.transform = `
|
|
6438
6432
|
rotateX(${b.currentRotateX}deg)
|
|
@@ -6453,7 +6447,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6453
6447
|
c.current.targetRotateX = 0, c.current.targetRotateY = 0, c.current.targetZ = 0;
|
|
6454
6448
|
}, S = () => {
|
|
6455
6449
|
c.current.targetZ = -4;
|
|
6456
|
-
},
|
|
6450
|
+
}, k = () => {
|
|
6457
6451
|
c.current.targetZ = 8;
|
|
6458
6452
|
};
|
|
6459
6453
|
return /* @__PURE__ */ m.jsx(
|
|
@@ -6466,9 +6460,9 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6466
6460
|
onMouseMove: y,
|
|
6467
6461
|
onMouseLeave: P,
|
|
6468
6462
|
onMouseDown: S,
|
|
6469
|
-
onMouseUp:
|
|
6463
|
+
onMouseUp: k,
|
|
6470
6464
|
onTouchStart: S,
|
|
6471
|
-
onTouchEnd:
|
|
6465
|
+
onTouchEnd: k,
|
|
6472
6466
|
children: /* @__PURE__ */ m.jsxs(
|
|
6473
6467
|
"div",
|
|
6474
6468
|
{
|
|
@@ -6553,19 +6547,19 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6553
6547
|
}
|
|
6554
6548
|
);
|
|
6555
6549
|
};
|
|
6556
|
-
|
|
6550
|
+
cf.displayName = "TactileThemeToggle";
|
|
6557
6551
|
export {
|
|
6558
6552
|
bs as MaterialContainer,
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6553
|
+
pf as TactileAlert,
|
|
6554
|
+
gf as TactileButton,
|
|
6555
|
+
mf as TactileCard,
|
|
6556
|
+
hf as TactileConfirm,
|
|
6557
|
+
xf as TactileInput,
|
|
6558
|
+
vf as TactileLoader,
|
|
6559
|
+
yf as TactileSlider,
|
|
6560
|
+
cf as TactileThemeToggle,
|
|
6561
|
+
lf as TactileToast,
|
|
6562
|
+
ff as TactileToggle,
|
|
6569
6563
|
ue as generateProceduralProfile,
|
|
6570
6564
|
Ze as useMaterialInertia
|
|
6571
6565
|
};
|