@algorisys/tinyfly 0.74.0 → 0.74.1
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/README.md +4 -4
- package/lib/addons/characters.js +100 -93
- package/lib/browser/tinyfly.iife.js +4 -4
- package/lib/browser/tinyfly.js +797 -790
- package/lib/browser/tinyfly.umd.js +4 -4
- package/lib/types/characters/stick-figure.d.ts +13 -1
- package/package.json +1 -1
package/lib/browser/tinyfly.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function
|
|
1
|
+
function cn(i) {
|
|
2
2
|
return typeof i == "object" && i !== null && i.type === "cubic-bezier";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function Rt(i) {
|
|
5
5
|
return typeof i == "object" && i !== null && i.type !== "cubic-bezier";
|
|
6
6
|
}
|
|
7
7
|
const Lt = 1;
|
|
8
|
-
function
|
|
8
|
+
function ve(i) {
|
|
9
9
|
return i.property === "text" && "textConfig" in i;
|
|
10
10
|
}
|
|
11
11
|
function tt(i) {
|
|
@@ -14,16 +14,16 @@ function tt(i) {
|
|
|
14
14
|
function et(i) {
|
|
15
15
|
return i.kind === "spring" && "spring" in i;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function mi(i) {
|
|
18
18
|
return i.property === "motionPath" && "motionPathConfig" in i;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Uo(i) {
|
|
21
21
|
return typeof i == "object" && i !== null && "x" in i && "y" in i && "angle" in i;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function ln(i) {
|
|
24
24
|
return "keyframes" in i;
|
|
25
25
|
}
|
|
26
|
-
class
|
|
26
|
+
class Ho {
|
|
27
27
|
_currentTime = 0;
|
|
28
28
|
_isRunning = !1;
|
|
29
29
|
onTick = null;
|
|
@@ -49,7 +49,7 @@ class jo {
|
|
|
49
49
|
this._currentTime = t;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
class
|
|
52
|
+
class zo {
|
|
53
53
|
_currentTime = 0;
|
|
54
54
|
_isRunning = !1;
|
|
55
55
|
_lastFrameTime = null;
|
|
@@ -96,7 +96,7 @@ class Uo {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function gi(i, t, e = "start") {
|
|
100
100
|
if (t <= 1) return 0;
|
|
101
101
|
if (typeof e == "number") {
|
|
102
102
|
const n = Math.max(0, Math.min(t - 1, e));
|
|
@@ -113,29 +113,29 @@ function mi(i, t, e = "start") {
|
|
|
113
113
|
return i;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function yi(i, t = "start") {
|
|
117
117
|
if (i <= 1) return 0;
|
|
118
118
|
let e = 0;
|
|
119
119
|
for (let n = 0; n < i; n++)
|
|
120
|
-
e = Math.max(e,
|
|
120
|
+
e = Math.max(e, gi(n, i, t));
|
|
121
121
|
return e;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function we(i, t, e) {
|
|
124
124
|
if (e.offsets) return e.offsets[i] ?? 0;
|
|
125
|
-
const n = e.from ?? "start", s =
|
|
125
|
+
const n = e.from ?? "start", s = gi(i, t, n);
|
|
126
126
|
if (e.amount !== void 0) {
|
|
127
|
-
const r =
|
|
127
|
+
const r = yi(t, n);
|
|
128
128
|
return r === 0 ? 0 : e.amount * s / r;
|
|
129
129
|
}
|
|
130
130
|
return e.each !== void 0 ? e.each * s : 0;
|
|
131
131
|
}
|
|
132
132
|
function ae(i, t) {
|
|
133
|
-
return Array.from({ length: i }, (e, n) =>
|
|
133
|
+
return Array.from({ length: i }, (e, n) => we(n, i, t));
|
|
134
134
|
}
|
|
135
135
|
function Yt(i, t) {
|
|
136
136
|
return i <= 1 ? 0 : Math.max(...ae(i, t));
|
|
137
137
|
}
|
|
138
|
-
const yt = 1,
|
|
138
|
+
const yt = 1, bi = 6e4, At = bi / yt, X = {
|
|
139
139
|
stiffness: 180,
|
|
140
140
|
damping: 12,
|
|
141
141
|
mass: 1,
|
|
@@ -204,7 +204,7 @@ class Xt {
|
|
|
204
204
|
* of a spring track. Runs the simulation to completion once.
|
|
205
205
|
*/
|
|
206
206
|
settleTime() {
|
|
207
|
-
return this.simulateTo(At + 1), this.settledStep !== null ? this.settledStep * yt :
|
|
207
|
+
return this.simulateTo(At + 1), this.settledStep !== null ? this.settledStep * yt : bi;
|
|
208
208
|
}
|
|
209
209
|
/** Advance the cached simulation until it holds at least `steps` samples. */
|
|
210
210
|
simulateTo(t) {
|
|
@@ -222,29 +222,29 @@ class Xt {
|
|
|
222
222
|
this.samples.length > At && (this.settledStep = At);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Go(i, t) {
|
|
226
226
|
return new Xt(i).valueAt(t);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function hn(i) {
|
|
229
229
|
return new Xt(i).settleTime();
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Ko(i) {
|
|
232
232
|
const t = i.stiffness ?? X.stiffness, e = i.damping ?? X.damping, n = i.mass ?? X.mass;
|
|
233
233
|
return e < 2 * Math.sqrt(t * n);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Zo(i) {
|
|
236
236
|
const t = i.stiffness ?? X.stiffness, e = i.mass ?? X.mass;
|
|
237
237
|
return 2 * Math.sqrt(t * e);
|
|
238
238
|
}
|
|
239
|
-
const
|
|
239
|
+
const Ee = 4, un = 2e-3, fn = 1e-4, dn = 6e4;
|
|
240
240
|
function Vt(i) {
|
|
241
|
-
const t = i.friction ??
|
|
242
|
-
return t > 0 ? t :
|
|
241
|
+
const t = i.friction ?? Ee;
|
|
242
|
+
return t > 0 ? t : Ee;
|
|
243
243
|
}
|
|
244
244
|
function $t(i) {
|
|
245
245
|
return i.from + i.velocity / Vt(i);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function pn(i, t) {
|
|
248
248
|
if (t === void 0) return i;
|
|
249
249
|
if (typeof t == "number")
|
|
250
250
|
return t > 0 ? Math.round(i / t) * t : i;
|
|
@@ -255,16 +255,16 @@ function un(i, t) {
|
|
|
255
255
|
return e;
|
|
256
256
|
}
|
|
257
257
|
function kt(i) {
|
|
258
|
-
let t =
|
|
258
|
+
let t = pn($t(i), i.end);
|
|
259
259
|
return i.min !== void 0 && (t = Math.max(i.min, t)), i.max !== void 0 && (t = Math.min(i.max, t)), t;
|
|
260
260
|
}
|
|
261
261
|
function xt(i) {
|
|
262
262
|
const t = Math.abs(kt(i) - i.from);
|
|
263
263
|
if (t === 0) return 0;
|
|
264
|
-
const e = i.restDelta ?? Math.max(
|
|
264
|
+
const e = i.restDelta ?? Math.max(fn, t * un);
|
|
265
265
|
if (e >= t) return 0;
|
|
266
266
|
const n = Math.log(t / e) / Vt(i);
|
|
267
|
-
return Math.min(
|
|
267
|
+
return Math.min(dn, n * 1e3);
|
|
268
268
|
}
|
|
269
269
|
function ce(i, t) {
|
|
270
270
|
if (t <= 0) return i.from;
|
|
@@ -273,23 +273,23 @@ function ce(i, t) {
|
|
|
273
273
|
const n = Vt(i);
|
|
274
274
|
return i.from + (e - i.from) * (1 - Math.exp(-n * t / 1e3));
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Qo(i, t) {
|
|
277
277
|
const e = Vt(i), n = kt(i);
|
|
278
278
|
return t >= xt(i) ? 0 : (n - i.from) * e * Math.exp(-e * Math.max(0, t) / 1e3);
|
|
279
279
|
}
|
|
280
|
-
const le = (i) => i,
|
|
280
|
+
const le = (i) => i, mn = (i) => i * i, gn = (i) => 1 - (1 - i) * (1 - i), yn = (i) => i < 0.5 ? 2 * i * i : 1 - Math.pow(-2 * i + 2, 2) / 2, vi = (i) => i * i * i, wi = (i) => 1 - Math.pow(1 - i, 3), Wt = (i) => i < 0.5 ? 4 * i * i * i : 1 - Math.pow(-2 * i + 2, 3) / 2, bn = vi, vn = wi, wn = Wt, Tn = {
|
|
281
281
|
linear: le,
|
|
282
|
-
"ease-in":
|
|
283
|
-
"ease-out":
|
|
284
|
-
"ease-in-out":
|
|
285
|
-
"ease-in-quad":
|
|
286
|
-
"ease-out-quad":
|
|
287
|
-
"ease-in-out-quad":
|
|
288
|
-
"ease-in-cubic":
|
|
289
|
-
"ease-out-cubic":
|
|
282
|
+
"ease-in": bn,
|
|
283
|
+
"ease-out": vn,
|
|
284
|
+
"ease-in-out": wn,
|
|
285
|
+
"ease-in-quad": mn,
|
|
286
|
+
"ease-out-quad": gn,
|
|
287
|
+
"ease-in-out-quad": yn,
|
|
288
|
+
"ease-in-cubic": vi,
|
|
289
|
+
"ease-out-cubic": wi,
|
|
290
290
|
"ease-in-out-cubic": Wt
|
|
291
291
|
};
|
|
292
|
-
function
|
|
292
|
+
function kn(i) {
|
|
293
293
|
const [t, e, n, s] = i, r = 3 * t, o = 3 * (n - t) - r, a = 1 - r - o, c = 3 * e, l = 3 * (s - e) - c, h = 1 - c - l, f = (p) => ((a * p + o) * p + r) * p, u = (p) => ((h * p + l) * p + c) * p, d = (p) => (3 * a * p + 2 * o) * p + r, m = (p) => {
|
|
294
294
|
let g = p;
|
|
295
295
|
for (let b = 0; b < 8; b++) {
|
|
@@ -322,11 +322,11 @@ function zt(i, t = "out") {
|
|
|
322
322
|
const e = (n) => 1 - i(1 - n);
|
|
323
323
|
return t === "in" ? e : (n) => n < 0.5 ? e(n * 2) / 2 : i(n * 2 - 1) / 2 + 0.5;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function xn(i = 1, t = 0.3) {
|
|
326
326
|
const e = Math.max(1, i), n = t / (2 * Math.PI) * Math.asin(1 / e);
|
|
327
327
|
return (s) => s <= 0 ? 0 : s >= 1 ? 1 : e * Math.pow(2, -10 * s) * Math.sin((s - n) * (2 * Math.PI) / t) + 1;
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const Sn = (i) => {
|
|
330
330
|
if (i <= 0) return 0;
|
|
331
331
|
if (i >= 1) return 1;
|
|
332
332
|
if (i < 1 / 2.75) return 7.5625 * i * i;
|
|
@@ -341,7 +341,7 @@ const Tn = (i) => {
|
|
|
341
341
|
const n = i - 2.625 / 2.75;
|
|
342
342
|
return 7.5625 * n * n + 0.984375;
|
|
343
343
|
};
|
|
344
|
-
function
|
|
344
|
+
function Mn(i = 1.70158) {
|
|
345
345
|
return (t) => {
|
|
346
346
|
if (t <= 0) return 0;
|
|
347
347
|
if (t >= 1) return 1;
|
|
@@ -349,7 +349,7 @@ function kn(i = 1.70158) {
|
|
|
349
349
|
return e * e * ((i + 1) * e + i) + 1;
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function An(i, t = "end") {
|
|
353
353
|
const e = Math.max(1, Math.floor(i));
|
|
354
354
|
return (n) => {
|
|
355
355
|
if (n >= 1) return 1;
|
|
@@ -367,22 +367,22 @@ function xn(i, t = "end") {
|
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function En(i) {
|
|
371
371
|
switch (i.type) {
|
|
372
372
|
case "steps":
|
|
373
|
-
return
|
|
373
|
+
return An(i.count, i.position);
|
|
374
374
|
case "elastic":
|
|
375
|
-
return zt(
|
|
375
|
+
return zt(xn(i.amplitude, i.period), i.mode);
|
|
376
376
|
case "bounce":
|
|
377
|
-
return zt(
|
|
377
|
+
return zt(Sn, i.mode);
|
|
378
378
|
case "back":
|
|
379
|
-
return zt(
|
|
379
|
+
return zt(Mn(i.overshoot), i.mode);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
function z(i) {
|
|
383
|
-
return i === void 0 ? le :
|
|
383
|
+
return i === void 0 ? le : cn(i) ? kn(i.points) : Rt(i) ? En(i) : Tn[i] ?? le;
|
|
384
384
|
}
|
|
385
|
-
const
|
|
385
|
+
const Pe = 32, Pn = 256, nt = /* @__PURE__ */ new Map(), Cn = /[MmLlHhVvCcSsQqTtAaZz]/, _n = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/, In = {
|
|
386
386
|
M: 2,
|
|
387
387
|
L: 2,
|
|
388
388
|
H: 1,
|
|
@@ -394,7 +394,7 @@ const Ee = 32, Mn = 256, nt = /* @__PURE__ */ new Map(), An = /[MmLlHhVvCcSsQqTt
|
|
|
394
394
|
A: 7,
|
|
395
395
|
Z: 0
|
|
396
396
|
};
|
|
397
|
-
function
|
|
397
|
+
function Rn(i) {
|
|
398
398
|
const t = [];
|
|
399
399
|
let e = 0, n = null;
|
|
400
400
|
const s = () => {
|
|
@@ -402,7 +402,7 @@ function Cn(i) {
|
|
|
402
402
|
};
|
|
403
403
|
for (; e < i.length && (s(), !(e >= i.length)); ) {
|
|
404
404
|
const r = i[e];
|
|
405
|
-
if (
|
|
405
|
+
if (Cn.test(r)) {
|
|
406
406
|
n = { type: r, args: [] }, t.push(n), e++;
|
|
407
407
|
continue;
|
|
408
408
|
}
|
|
@@ -413,37 +413,37 @@ function Cn(i) {
|
|
|
413
413
|
n.args.push(r === "1" ? 1 : 0), e++;
|
|
414
414
|
continue;
|
|
415
415
|
}
|
|
416
|
-
const c =
|
|
416
|
+
const c = _n.exec(i.slice(e));
|
|
417
417
|
if (!c) break;
|
|
418
418
|
n.args.push(parseFloat(c[0])), e += c[0].length;
|
|
419
419
|
}
|
|
420
420
|
return t;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Ln(i, t, e, n, s, r, o, a, c) {
|
|
423
423
|
if (i === a && t === c) return [];
|
|
424
424
|
let l = Math.abs(e), h = Math.abs(n);
|
|
425
425
|
if (l === 0 || h === 0) return [[i, t, a, c, a, c]];
|
|
426
426
|
const f = s * Math.PI / 180, u = Math.cos(f), d = Math.sin(f), m = (i - a) / 2, p = (t - c) / 2, g = u * m + d * p, y = -d * m + u * p, v = g * g / (l * l) + y * y / (h * h);
|
|
427
427
|
if (v > 1) {
|
|
428
|
-
const
|
|
429
|
-
l *=
|
|
428
|
+
const R = Math.sqrt(v);
|
|
429
|
+
l *= R, h *= R;
|
|
430
430
|
}
|
|
431
|
-
const b = r === o ? -1 : 1, T = l * l * h * h - l * l * y * y - h * h * g * g, w = l * l * y * y + h * h * g * g, k = b * Math.sqrt(Math.max(0, T / w)), S = k * l * y / h, _ = -k * h * g / l, B = u * S - d * _ + (i + a) / 2, A = d * S + u * _ + (t + c) / 2, x = (
|
|
432
|
-
const Ut =
|
|
433
|
-
return
|
|
431
|
+
const b = r === o ? -1 : 1, T = l * l * h * h - l * l * y * y - h * h * g * g, w = l * l * y * y + h * h * g * g, k = b * Math.sqrt(Math.max(0, T / w)), S = k * l * y / h, _ = -k * h * g / l, B = u * S - d * _ + (i + a) / 2, A = d * S + u * _ + (t + c) / 2, x = (R, $, q, it) => {
|
|
432
|
+
const Ut = R * q + $ * it, Mt = Math.sqrt((R * R + $ * $) * (q * q + it * it)), ut = Math.acos(Math.max(-1, Math.min(1, Ut / Mt)));
|
|
433
|
+
return R * it - $ * q < 0 ? -ut : ut;
|
|
434
434
|
}, P = x(1, 0, (g - S) / l, (y - _) / h);
|
|
435
435
|
let E = x((g - S) / l, (y - _) / h, (-g - S) / l, (-y - _) / h);
|
|
436
436
|
!o && E > 0 && (E -= 2 * Math.PI), o && E < 0 && (E += 2 * Math.PI);
|
|
437
|
-
const C = Math.max(1, Math.ceil(Math.abs(E) / (Math.PI / 2))), M = E / C,
|
|
438
|
-
const $ = l * Math.cos(
|
|
437
|
+
const C = Math.max(1, Math.ceil(Math.abs(E) / (Math.PI / 2))), M = E / C, I = 4 / 3 * Math.tan(M / 4), L = (R) => {
|
|
438
|
+
const $ = l * Math.cos(R), q = h * Math.sin(R);
|
|
439
439
|
return [u * $ - d * q + B, d * $ + u * q + A];
|
|
440
|
-
}, N = (
|
|
441
|
-
const $ = -l * Math.sin(
|
|
440
|
+
}, N = (R) => {
|
|
441
|
+
const $ = -l * Math.sin(R), q = h * Math.cos(R);
|
|
442
442
|
return [u * $ - d * q, d * $ + u * q];
|
|
443
443
|
}, O = [];
|
|
444
|
-
for (let
|
|
445
|
-
const $ = P +
|
|
446
|
-
O.push([it +
|
|
444
|
+
for (let R = 0; R < C; R++) {
|
|
445
|
+
const $ = P + R * M, q = $ + M, [it, Ut] = L($), [Mt, ut] = R === C - 1 ? [a, c] : L(q), [sn, rn] = N($), [on, an] = N(q);
|
|
446
|
+
O.push([it + I * sn, Ut + I * rn, Mt - I * on, ut - I * an, Mt, ut]);
|
|
447
447
|
}
|
|
448
448
|
return O;
|
|
449
449
|
}
|
|
@@ -451,7 +451,7 @@ function K(i, t, e, n, s) {
|
|
|
451
451
|
const r = 1 - s;
|
|
452
452
|
return r * r * r * i + 3 * r * r * s * t + 3 * r * s * s * e + s * s * s * n;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function Ce(i, t, e, n, s) {
|
|
455
455
|
const r = 1 - s;
|
|
456
456
|
return 3 * r * r * (t - i) + 6 * r * s * (e - t) + 3 * s * s * (n - e);
|
|
457
457
|
}
|
|
@@ -470,8 +470,8 @@ function ft(i, t, e, n) {
|
|
|
470
470
|
function Et(i, t, e) {
|
|
471
471
|
const [n, s, r, o, a, c] = e, l = [0];
|
|
472
472
|
let h = i, f = t, u = 0;
|
|
473
|
-
for (let d = 1; d <=
|
|
474
|
-
const m = d /
|
|
473
|
+
for (let d = 1; d <= Pe; d++) {
|
|
474
|
+
const m = d / Pe, p = K(i, n, r, a, m), g = K(t, s, o, c, m);
|
|
475
475
|
u += Math.hypot(p - h, g - f), l.push(u), h = p, f = g;
|
|
476
476
|
}
|
|
477
477
|
return {
|
|
@@ -494,8 +494,8 @@ function at(i) {
|
|
|
494
494
|
const h = /* @__PURE__ */ new Set(), f = (p) => {
|
|
495
495
|
l < 0 && (l = 0), p.subpath = l, e.push(p);
|
|
496
496
|
};
|
|
497
|
-
for (const { type: p, args: g } of
|
|
498
|
-
const y = p.toUpperCase(), v = p !== y, b =
|
|
497
|
+
for (const { type: p, args: g } of Rn(i)) {
|
|
498
|
+
const y = p.toUpperCase(), v = p !== y, b = In[y];
|
|
499
499
|
if (y === "Z") {
|
|
500
500
|
(n !== r || s !== o) && f(ft(n, s, r, o)), l >= 0 && h.add(l), n = r, s = o, a = c = null;
|
|
501
501
|
continue;
|
|
@@ -546,7 +546,7 @@ function at(i) {
|
|
|
546
546
|
case "A": {
|
|
547
547
|
const A = w[5] + k, x = w[6] + S;
|
|
548
548
|
let P = n, E = s;
|
|
549
|
-
for (const C of
|
|
549
|
+
for (const C of Ln(n, s, w[0], w[1], w[2], w[3], w[4], A, x))
|
|
550
550
|
f(Et(P, E, C)), P = C[4], E = C[5];
|
|
551
551
|
n = A, s = x;
|
|
552
552
|
break;
|
|
@@ -564,9 +564,9 @@ function at(i) {
|
|
|
564
564
|
d.push({ start: p, end: y, length: v, closed: w }), p = y;
|
|
565
565
|
}
|
|
566
566
|
const m = { segments: e, totalLength: u, subpaths: d };
|
|
567
|
-
return nt.size >=
|
|
567
|
+
return nt.size >= Pn && nt.delete(nt.keys().next().value), nt.set(i, m), m;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function $n(i, t) {
|
|
570
570
|
const e = i.lengths;
|
|
571
571
|
if (t <= 0) return 0;
|
|
572
572
|
if (t >= i.length) return 1;
|
|
@@ -578,7 +578,7 @@ function Rn(i, t) {
|
|
|
578
578
|
const r = e[s] - e[n], o = r > 0 ? (t - e[n]) / r : 0;
|
|
579
579
|
return (n + o) / (e.length - 1);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function Fn(i, t) {
|
|
582
582
|
if (i.type === "L") {
|
|
583
583
|
const f = i.length > 0 ? Math.max(0, Math.min(1, t / i.length)) : 0;
|
|
584
584
|
return {
|
|
@@ -587,8 +587,8 @@ function In(i, t) {
|
|
|
587
587
|
angle: Math.atan2(i.endY - i.startY, i.endX - i.startX) * 180 / Math.PI
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
|
-
const [e, n, s, r, o, a] = i.points, c =
|
|
591
|
-
let l =
|
|
590
|
+
const [e, n, s, r, o, a] = i.points, c = $n(i, t);
|
|
591
|
+
let l = Ce(i.startX, e, s, o, c), h = Ce(i.startY, n, r, a, c);
|
|
592
592
|
if (Math.hypot(l, h) < 1e-9) {
|
|
593
593
|
const f = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), u = K(i.startX, e, s, o, f), d = K(i.startY, n, r, a, f), m = K(i.startX, e, s, o, c), p = K(i.startY, n, r, a, c);
|
|
594
594
|
l = c < 0.5 ? u - m : m - u, h = c < 0.5 ? d - p : p - d;
|
|
@@ -599,31 +599,31 @@ function In(i, t) {
|
|
|
599
599
|
angle: Math.atan2(h, l) * 180 / Math.PI
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Ti(i, t, e = 0, n = i.length) {
|
|
603
603
|
if (n <= e) return { x: 0, y: 0, angle: 0 };
|
|
604
604
|
let s = 0;
|
|
605
605
|
for (let r = e; r < n; r++) {
|
|
606
606
|
const o = i[r];
|
|
607
607
|
if (s + o.length >= t || r === n - 1)
|
|
608
|
-
return
|
|
608
|
+
return Fn(o, t - s);
|
|
609
609
|
s += o.length;
|
|
610
610
|
}
|
|
611
611
|
return { x: 0, y: 0, angle: 0 };
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Dn(i, t) {
|
|
614
614
|
const { segments: e, totalLength: n } = at(i);
|
|
615
|
-
return
|
|
615
|
+
return Ti(e, Math.max(0, Math.min(1, t)) * n);
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Jo() {
|
|
618
618
|
nt.clear();
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function ta(i) {
|
|
621
621
|
return at(i).totalLength;
|
|
622
622
|
}
|
|
623
|
-
const
|
|
623
|
+
const Bn = 24, On = 320, Nn = 2.5, dt = 72, ea = 64, qn = 0.2, Yn = 128, bt = /* @__PURE__ */ new Map();
|
|
624
624
|
let _t = 0, G;
|
|
625
|
-
const
|
|
626
|
-
function
|
|
625
|
+
const _e = (i) => Math.round(i * 100) / 100;
|
|
626
|
+
function Ie(i, t) {
|
|
627
627
|
const { segments: e, subpaths: n, totalLength: s } = at(i);
|
|
628
628
|
if (e.length === 0) return [];
|
|
629
629
|
if (t) {
|
|
@@ -633,7 +633,7 @@ function _e(i, t) {
|
|
|
633
633
|
return n.filter((r) => r.length > 0).map((r) => ({ segments: e, start: r.start, end: r.end, length: r.length, closed: r.closed }));
|
|
634
634
|
}
|
|
635
635
|
function he(i, t) {
|
|
636
|
-
const e = i.closed ? (t % 1 + 1) % 1 : Math.max(0, Math.min(1, t)), n =
|
|
636
|
+
const e = i.closed ? (t % 1 + 1) % 1 : Math.max(0, Math.min(1, t)), n = Ti(i.segments, e * i.length, i.start, i.end);
|
|
637
637
|
return [n.x, n.y];
|
|
638
638
|
}
|
|
639
639
|
function Re(i) {
|
|
@@ -643,23 +643,23 @@ function Re(i) {
|
|
|
643
643
|
e += i.segments[n].length, i.length > 0 && t.push(e / i.length);
|
|
644
644
|
return t;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Le(i, t) {
|
|
647
647
|
const e = [];
|
|
648
648
|
for (let n = 0; n < t; n++)
|
|
649
649
|
e.push(he(i, i.closed ? n / t : n / (t - 1)));
|
|
650
650
|
return e;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function $e(i) {
|
|
653
653
|
let t = 0, e = 0;
|
|
654
654
|
for (const [n, s] of i)
|
|
655
655
|
t += n, e += s;
|
|
656
656
|
return t /= i.length, e /= i.length, i.map(([n, s]) => [n - t, s - e]);
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Xn(i, t, e) {
|
|
659
659
|
const n = i.closed && t.closed;
|
|
660
660
|
if (e !== void 0)
|
|
661
661
|
return { offset: n ? Math.abs(e) % dt / dt : 0, reversed: e < 0 };
|
|
662
|
-
const s = Le(
|
|
662
|
+
const s = $e(Le(i, dt)), r = $e(Le(t, dt)), o = dt;
|
|
663
663
|
let a = { offset: 0, reversed: !1 }, c = 1 / 0;
|
|
664
664
|
for (const l of [!1, !0]) {
|
|
665
665
|
const h = n ? o : 1;
|
|
@@ -674,28 +674,28 @@ function Nn(i, t, e) {
|
|
|
674
674
|
}
|
|
675
675
|
return a;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function Vn(i, t, e) {
|
|
678
678
|
return e ? ((t.reversed ? t.offset - i : i + t.offset) % 1 + 1) % 1 : t.reversed ? 1 - i : i;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Wn(i, t, e) {
|
|
681
681
|
return e ? ((t.reversed ? t.offset - i : i - t.offset) % 1 + 1) % 1 : t.reversed ? 1 - i : i;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
const n = i.closed && t.closed, s =
|
|
685
|
-
|
|
686
|
-
Math.min(
|
|
683
|
+
function jn(i, t, e) {
|
|
684
|
+
const n = i.closed && t.closed, s = Xn(i, t, e.shapeIndex), r = Math.max(
|
|
685
|
+
Bn,
|
|
686
|
+
Math.min(On, Math.ceil(Math.max(i.length, t.length) / Nn))
|
|
687
687
|
), o = /* @__PURE__ */ new Set(), a = (f) => o.add(Math.round(f * 1e7) / 1e7);
|
|
688
688
|
for (let f = 0; f <= r; f++) a(f / r);
|
|
689
689
|
for (const f of Re(i)) a(f);
|
|
690
|
-
for (const f of Re(t)) a(
|
|
690
|
+
for (const f of Re(t)) a(Wn(f, s, n));
|
|
691
691
|
let c = [...o].sort((f, u) => f - u);
|
|
692
692
|
n && (c = c.filter((f) => f < 1));
|
|
693
693
|
const l = [], h = [];
|
|
694
694
|
for (const f of c)
|
|
695
|
-
l.push(...he(i, f)), h.push(...he(t,
|
|
696
|
-
return
|
|
695
|
+
l.push(...he(i, f)), h.push(...he(t, Vn(f, s, n)));
|
|
696
|
+
return Un({ from: l, to: h, closed: n });
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Un(i) {
|
|
699
699
|
const t = i.from.length / 2;
|
|
700
700
|
if (t <= 3) return i;
|
|
701
701
|
const e = new Uint8Array(t);
|
|
@@ -703,9 +703,9 @@ function Vn(i) {
|
|
|
703
703
|
const n = [[0, t - 1]];
|
|
704
704
|
for (; n.length > 0; ) {
|
|
705
705
|
const [o, a] = n.pop();
|
|
706
|
-
let c = -1, l =
|
|
706
|
+
let c = -1, l = qn;
|
|
707
707
|
for (let h = o + 1; h < a; h++) {
|
|
708
|
-
const f = Math.max(
|
|
708
|
+
const f = Math.max(Fe(i.from, o, a, h), Fe(i.to, o, a, h));
|
|
709
709
|
f > l && (l = f, c = h);
|
|
710
710
|
}
|
|
711
711
|
c !== -1 && (e[c] = 1, n.push([o, c], [c, a]));
|
|
@@ -715,51 +715,51 @@ function Vn(i) {
|
|
|
715
715
|
e[o] && (s.push(i.from[o * 2], i.from[o * 2 + 1]), r.push(i.to[o * 2], i.to[o * 2 + 1]));
|
|
716
716
|
return { from: s, to: r, closed: i.closed };
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Fe(i, t, e, n) {
|
|
719
719
|
const s = i[t * 2], r = i[t * 2 + 1], o = i[e * 2] - s, a = i[e * 2 + 1] - r, c = i[n * 2] - s, l = i[n * 2 + 1] - r, h = o * o + a * a, f = h === 0 ? 0 : Math.max(0, Math.min(1, (c * o + l * a) / h));
|
|
720
720
|
return Math.hypot(c - f * o, l - f * a);
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Hn(i, t, e) {
|
|
723
723
|
const n = e.shapeIndex;
|
|
724
724
|
if (G && G.from === i && G.to === t && G.shapeIndex === n) return G.plan;
|
|
725
725
|
const r = bt.get(String(n ?? "auto"))?.get(i)?.get(t);
|
|
726
726
|
if (r)
|
|
727
727
|
return G = { from: i, to: t, shapeIndex: n, plan: r }, r;
|
|
728
|
-
const o = at(i).subpaths.filter((d) => d.length > 0).length === at(t).subpaths.filter((d) => d.length > 0).length, a =
|
|
729
|
-
pairs: a.map((d, m) =>
|
|
728
|
+
const o = at(i).subpaths.filter((d) => d.length > 0).length === at(t).subpaths.filter((d) => d.length > 0).length, a = Ie(i, !o), c = Ie(t, !o), l = {
|
|
729
|
+
pairs: a.map((d, m) => jn(d, c[m], e))
|
|
730
730
|
};
|
|
731
|
-
_t >=
|
|
731
|
+
_t >= Yn && (bt.clear(), _t = 0);
|
|
732
732
|
const h = String(n ?? "auto"), f = bt.get(h) ?? /* @__PURE__ */ new Map();
|
|
733
733
|
bt.set(h, f);
|
|
734
734
|
const u = f.get(i) ?? /* @__PURE__ */ new Map();
|
|
735
735
|
return f.set(i, u), u.set(t, l), _t++, G = { from: i, to: t, shapeIndex: n, plan: l }, l;
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function zn(i, t, e, n = {}) {
|
|
738
738
|
if (!i) return t;
|
|
739
739
|
if (!t) return i;
|
|
740
740
|
const s = Math.max(0, Math.min(1, e));
|
|
741
741
|
if (s === 0) return i;
|
|
742
742
|
if (s === 1) return t;
|
|
743
|
-
const r =
|
|
743
|
+
const r = Hn(i, t, n);
|
|
744
744
|
if (r.pairs.length === 0) return s < 0.5 ? i : t;
|
|
745
745
|
let o = "";
|
|
746
746
|
for (const a of r.pairs) {
|
|
747
747
|
for (let c = 0; c < a.from.length; c += 2) {
|
|
748
|
-
const l =
|
|
748
|
+
const l = _e(a.from[c] + (a.to[c] - a.from[c]) * s), h = _e(a.from[c + 1] + (a.to[c + 1] - a.from[c + 1]) * s);
|
|
749
749
|
o += `${c === 0 ? o ? " M" : "M" : " L"}${l} ${h}`;
|
|
750
750
|
}
|
|
751
751
|
a.closed && (o += " Z");
|
|
752
752
|
}
|
|
753
753
|
return o;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function ia() {
|
|
756
756
|
bt.clear(), _t = 0, G = void 0;
|
|
757
757
|
}
|
|
758
758
|
function St(i) {
|
|
759
759
|
return /^\s*[Mm]\s*[-+]?(?:\d|\.\d)/.test(i);
|
|
760
760
|
}
|
|
761
|
-
const U = (i, t, e) => i + (t - i) * e,
|
|
762
|
-
function
|
|
761
|
+
const U = (i, t, e) => i + (t - i) * e, ki = 512, Gt = /* @__PURE__ */ new Map(), Kt = /* @__PURE__ */ new Map();
|
|
762
|
+
function De(i) {
|
|
763
763
|
const t = Gt.get(i);
|
|
764
764
|
if (t) return t;
|
|
765
765
|
const e = i.replace("#", ""), n = [
|
|
@@ -767,28 +767,28 @@ function Fe(i) {
|
|
|
767
767
|
parseInt(e.slice(2, 4), 16),
|
|
768
768
|
parseInt(e.slice(4, 6), 16)
|
|
769
769
|
];
|
|
770
|
-
return Gt.size <
|
|
770
|
+
return Gt.size < ki && Gt.set(i, n), n;
|
|
771
771
|
}
|
|
772
|
-
const
|
|
773
|
-
function
|
|
772
|
+
const Be = (i) => i.charCodeAt(0) === 35, Oe = (i) => i.startsWith("rgb"), Ne = (i) => i.startsWith("rgba"), Gn = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/, Zt = (i) => Math.round(i).toString(16).padStart(2, "0");
|
|
773
|
+
function Kn(i, t, e) {
|
|
774
774
|
return `#${Zt(i)}${Zt(t)}${Zt(e)}`;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function qe(i) {
|
|
777
777
|
const t = Kt.get(i);
|
|
778
778
|
if (t) return t;
|
|
779
|
-
const e = i.match(
|
|
779
|
+
const e = i.match(Gn);
|
|
780
780
|
if (!e)
|
|
781
781
|
throw new Error(`Invalid rgb color: ${i}`);
|
|
782
782
|
const n = parseInt(e[1], 10), s = parseInt(e[2], 10), r = parseInt(e[3], 10), o = e[4] !== void 0 ? [n, s, r, parseFloat(e[4])] : [n, s, r];
|
|
783
|
-
return Kt.size <
|
|
783
|
+
return Kt.size < ki && Kt.set(i, o), o;
|
|
784
784
|
}
|
|
785
|
-
const
|
|
786
|
-
if (
|
|
787
|
-
const [n, s, r] =
|
|
788
|
-
return
|
|
785
|
+
const Zn = (i, t, e) => {
|
|
786
|
+
if (Be(i) && Be(t)) {
|
|
787
|
+
const [n, s, r] = De(i), [o, a, c] = De(t), l = U(n, o, e), h = U(s, a, e), f = U(r, c, e);
|
|
788
|
+
return Kn(l, h, f);
|
|
789
789
|
}
|
|
790
|
-
if ((
|
|
791
|
-
const n =
|
|
790
|
+
if ((Oe(i) || Ne(i)) && (Oe(t) || Ne(t))) {
|
|
791
|
+
const n = qe(i), s = qe(t), r = Math.round(U(n[0], s[0], e)), o = Math.round(U(n[1], s[1], e)), a = Math.round(U(n[2], s[2], e));
|
|
792
792
|
if (n.length === 4 || s.length === 4) {
|
|
793
793
|
const c = n[3] ?? 1, l = s[3] ?? 1, h = U(c, l, e);
|
|
794
794
|
return `rgba(${r}, ${o}, ${a}, ${h})`;
|
|
@@ -796,27 +796,27 @@ const zn = (i, t, e) => {
|
|
|
796
796
|
return `rgb(${r}, ${o}, ${a})`;
|
|
797
797
|
}
|
|
798
798
|
return e < 1 ? i : t;
|
|
799
|
-
},
|
|
799
|
+
}, Qn = (i, t, e) => {
|
|
800
800
|
const n = Math.min(i.length, t.length), s = [];
|
|
801
801
|
for (let r = 0; r < n; r++)
|
|
802
802
|
s.push(U(i[r], t[r], e));
|
|
803
803
|
return s;
|
|
804
|
-
},
|
|
804
|
+
}, Ye = (i, t, e) => e < 1 ? i : t, Jn = (i, t, e) => zn(i, t, e);
|
|
805
805
|
function Ft(i) {
|
|
806
|
-
return typeof i == "number" ? U : Array.isArray(i) ?
|
|
806
|
+
return typeof i == "number" ? U : Array.isArray(i) ? Qn : typeof i == "string" ? i.startsWith("#") || i.startsWith("rgb") ? Zn : St(i) ? Jn : Ye : Ye;
|
|
807
807
|
}
|
|
808
|
-
const
|
|
809
|
-
function
|
|
808
|
+
const xi = 1e3 / 60;
|
|
809
|
+
function Si(i, t = {}) {
|
|
810
810
|
if (!et(i))
|
|
811
811
|
throw new Error(`bakeSpringTrack: track "${i.id}" is not a spring track`);
|
|
812
812
|
const e = new Xt(i.spring);
|
|
813
|
-
return
|
|
813
|
+
return Ai(i, (n) => e.valueAt(n), e.settleTime(), i.spring.from, i.spring.to, t);
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function Mi(i, t = {}) {
|
|
816
816
|
if (!tt(i))
|
|
817
817
|
throw new Error(`bakeInertiaTrack: track "${i.id}" is not an inertia track`);
|
|
818
818
|
const e = i.inertia;
|
|
819
|
-
return
|
|
819
|
+
return Ai(
|
|
820
820
|
i,
|
|
821
821
|
(n) => ce(e, n),
|
|
822
822
|
xt(e),
|
|
@@ -825,8 +825,8 @@ function Si(i, t = {}) {
|
|
|
825
825
|
t
|
|
826
826
|
);
|
|
827
827
|
}
|
|
828
|
-
function
|
|
829
|
-
const o = r.intervalMs ??
|
|
828
|
+
function Ai(i, t, e, n, s, r) {
|
|
829
|
+
const o = r.intervalMs ?? xi, a = r.tolerance ?? 0.01, c = i.delay ?? 0, l = [];
|
|
830
830
|
for (let f = 0; f <= e; f += o)
|
|
831
831
|
l.push({ time: f + c, value: t(f), easing: "linear" });
|
|
832
832
|
const h = l[l.length - 1];
|
|
@@ -834,13 +834,13 @@ function Mi(i, t, e, n, s, r) {
|
|
|
834
834
|
id: i.id,
|
|
835
835
|
target: i.target,
|
|
836
836
|
property: i.property,
|
|
837
|
-
keyframes: a > 0 ?
|
|
837
|
+
keyframes: a > 0 ? es(l, a) : l,
|
|
838
838
|
...i.targets && { targets: [...i.targets] },
|
|
839
839
|
...i.stagger && { stagger: { ...i.stagger } }
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
function
|
|
843
|
-
const s = n.intervalMs ??
|
|
842
|
+
function Ei(i, t, e, n = {}) {
|
|
843
|
+
const s = n.intervalMs ?? xi, r = typeof e == "function" ? e : z(e), o = Ft(i.value), a = t.time - i.time;
|
|
844
844
|
if (a <= 0) return [t];
|
|
845
845
|
const c = [];
|
|
846
846
|
for (let h = s; h < a; h += s) {
|
|
@@ -854,26 +854,26 @@ function Ai(i, t, e, n = {}) {
|
|
|
854
854
|
const l = r(1);
|
|
855
855
|
return c.push({ ...t, ...l !== 1 && { value: o(i.value, t.value, l) }, easing: "linear" }), c;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
858
|
-
return et(i) ?
|
|
857
|
+
function na(i, t) {
|
|
858
|
+
return et(i) ? Si(i, t) : tt(i) ? Mi(i, t) : i;
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function ts(i, t = {}) {
|
|
861
861
|
const e = i.keyframes;
|
|
862
|
-
if (!e.some((s) =>
|
|
862
|
+
if (!e.some((s) => Rt(s.easing))) return i;
|
|
863
863
|
const n = e.length > 0 ? [e[0]] : [];
|
|
864
864
|
for (let s = 1; s < e.length; s++) {
|
|
865
865
|
const r = e[s];
|
|
866
|
-
|
|
866
|
+
Rt(r.easing) ? n.push(...Ei(e[s - 1], r, r.easing, t)) : n.push(r);
|
|
867
867
|
}
|
|
868
868
|
return { ...i, keyframes: n };
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
return i.filter(
|
|
872
|
-
i.filter(et).map((e) =>
|
|
873
|
-
i.filter(tt).map((e) =>
|
|
870
|
+
function sa(i, t) {
|
|
871
|
+
return i.filter(ln).map((e) => ts(e, t)).concat(
|
|
872
|
+
i.filter(et).map((e) => Si(e, t)),
|
|
873
|
+
i.filter(tt).map((e) => Mi(e, t))
|
|
874
874
|
);
|
|
875
875
|
}
|
|
876
|
-
function
|
|
876
|
+
function es(i, t) {
|
|
877
877
|
if (i.length <= 2) return i;
|
|
878
878
|
const e = [i[0]];
|
|
879
879
|
for (let n = 1; n < i.length - 1; n++) {
|
|
@@ -896,7 +896,7 @@ function Q(i) {
|
|
|
896
896
|
}
|
|
897
897
|
function ct(i, t, e, n) {
|
|
898
898
|
const s = e ?? 0;
|
|
899
|
-
return !n || t <= 1 ? s : s +
|
|
899
|
+
return !n || t <= 1 ? s : s + we(i, t, n);
|
|
900
900
|
}
|
|
901
901
|
class Qt {
|
|
902
902
|
track;
|
|
@@ -972,7 +972,7 @@ class Qt {
|
|
|
972
972
|
return { from: null, to: null };
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
|
-
class
|
|
975
|
+
class is {
|
|
976
976
|
track;
|
|
977
977
|
targets;
|
|
978
978
|
sampler;
|
|
@@ -999,7 +999,7 @@ class Jn {
|
|
|
999
999
|
return this.track;
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
|
-
class
|
|
1002
|
+
class ns {
|
|
1003
1003
|
track;
|
|
1004
1004
|
targets;
|
|
1005
1005
|
duration;
|
|
@@ -1026,8 +1026,8 @@ class ts {
|
|
|
1026
1026
|
return this.track;
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
const e = { ...
|
|
1029
|
+
function Pi(i, t) {
|
|
1030
|
+
const e = { ...Dn(i.pathData, t) };
|
|
1031
1031
|
if (i.matrix) {
|
|
1032
1032
|
const [n, s, r, o, a, c] = i.matrix, { x: l, y: h } = e;
|
|
1033
1033
|
e.x = n * l + r * h + a, e.y = s * l + o * h + c;
|
|
@@ -1036,25 +1036,25 @@ function Ei(i, t) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
return i.autoRotate && i.rotateOffset && (e.angle += i.rotateOffset), e;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function ra(i, t, e, n) {
|
|
1040
1040
|
const s = t + (e - t) * n;
|
|
1041
|
-
return
|
|
1041
|
+
return Pi(i, s);
|
|
1042
1042
|
}
|
|
1043
1043
|
const Jt = {
|
|
1044
1044
|
upperCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1045
1045
|
lowerCase: "abcdefghijklmnopqrstuvwxyz",
|
|
1046
1046
|
upperAndLowerCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
1047
1047
|
numbers: "0123456789"
|
|
1048
|
-
},
|
|
1049
|
-
function
|
|
1048
|
+
}, ss = 20;
|
|
1049
|
+
function rs(i) {
|
|
1050
1050
|
const t = Jt[i ?? "upperCase"] ?? i ?? Jt.upperCase, e = Array.from(t);
|
|
1051
1051
|
return e.length > 0 ? e : Array.from(Jt.upperCase);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function os(i, t, e) {
|
|
1054
1054
|
let n = (i | 0) ^ Math.imul(t + 1, 2654435761) ^ Math.imul(e + 1, 2246822507);
|
|
1055
1055
|
return n = Math.imul(n ^ n >>> 16, 2146121005), n = Math.imul(n ^ n >>> 15, 2221713035), (n ^ n >>> 16) >>> 0;
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function as(i, t, e = 0) {
|
|
1058
1058
|
const n = i.from ?? "", s = i.to, r = Math.max(0, Math.min(1, t));
|
|
1059
1059
|
if (r <= 0) return n;
|
|
1060
1060
|
if (r >= 1) return s;
|
|
@@ -1063,16 +1063,16 @@ function ss(i, t, e = 0) {
|
|
|
1063
1063
|
const v = Math.round(r * Math.max(o.length, a.length));
|
|
1064
1064
|
return c ? o.slice(0, Math.max(0, o.length - v)).join("") + a.slice(Math.max(0, a.length - v)).join("") : a.slice(0, v).join("") + o.slice(v).join("");
|
|
1065
1065
|
}
|
|
1066
|
-
const l = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), h = Math.max(0, (r - l) / (1 - l)), f = Math.floor(h * a.length), u = i.tweenLength === !1 ? a.length : Math.round(o.length + (a.length - o.length) * r), d =
|
|
1066
|
+
const l = Math.max(0, Math.min(0.999, i.revealDelay ?? 0)), h = Math.max(0, (r - l) / (1 - l)), f = Math.floor(h * a.length), u = i.tweenLength === !1 ? a.length : Math.round(o.length + (a.length - o.length) * r), d = rs(i.chars), m = i.refreshRate ?? ss, p = m > 0 ? Math.floor(e * m / 1e3) : 0, g = i.seed ?? 1;
|
|
1067
1067
|
let y = "";
|
|
1068
1068
|
for (let v = 0; v < u; v++) {
|
|
1069
1069
|
const b = c ? v >= u - f : v < f, T = c ? a[a.length - (u - v)] : a[v];
|
|
1070
1070
|
b && T !== void 0 || T === " " || T === `
|
|
1071
|
-
` ? y += T : y += d[
|
|
1071
|
+
` ? y += T : y += d[os(g, v, p) % d.length];
|
|
1072
1072
|
}
|
|
1073
1073
|
return y;
|
|
1074
1074
|
}
|
|
1075
|
-
class
|
|
1075
|
+
class Ci {
|
|
1076
1076
|
id;
|
|
1077
1077
|
name;
|
|
1078
1078
|
_captions;
|
|
@@ -1271,12 +1271,12 @@ class Pi {
|
|
|
1271
1271
|
a || (a = /* @__PURE__ */ new Map(), t.set(n, a));
|
|
1272
1272
|
const c = this._textTracks.get(e);
|
|
1273
1273
|
if (c && typeof r == "number") {
|
|
1274
|
-
a.set("text",
|
|
1274
|
+
a.set("text", as(c.textConfig, r, Math.max(0, o)));
|
|
1275
1275
|
return;
|
|
1276
1276
|
}
|
|
1277
1277
|
const l = this._motionPathTracks.get(e);
|
|
1278
1278
|
if (l && typeof r == "number") {
|
|
1279
|
-
const h =
|
|
1279
|
+
const h = Pi(l.motionPathConfig, r);
|
|
1280
1280
|
a.set("motionPathX", h.x), a.set("motionPathY", h.y), l.motionPathConfig.autoRotate && a.set("motionPathRotate", h.angle);
|
|
1281
1281
|
} else
|
|
1282
1282
|
a.set(s, r);
|
|
@@ -1304,16 +1304,16 @@ class Pi {
|
|
|
1304
1304
|
*/
|
|
1305
1305
|
addTrack(t) {
|
|
1306
1306
|
if (this._tracks.push(t), this._sharedWrites = null, tt(t)) {
|
|
1307
|
-
this._trackPlayers.set(t.id, new
|
|
1307
|
+
this._trackPlayers.set(t.id, new ns(t));
|
|
1308
1308
|
return;
|
|
1309
1309
|
}
|
|
1310
1310
|
if (et(t)) {
|
|
1311
|
-
this._trackPlayers.set(t.id, new
|
|
1311
|
+
this._trackPlayers.set(t.id, new is(t)), this._springTracks.set(t.id, t);
|
|
1312
1312
|
return;
|
|
1313
1313
|
}
|
|
1314
|
-
if (
|
|
1314
|
+
if (ve(t))
|
|
1315
1315
|
this._trackPlayers.set(t.id, new Qt(t)), this._textTracks.set(t.id, t);
|
|
1316
|
-
else if (
|
|
1316
|
+
else if (mi(t)) {
|
|
1317
1317
|
const e = {
|
|
1318
1318
|
id: t.id,
|
|
1319
1319
|
target: t.target,
|
|
@@ -1486,8 +1486,8 @@ class Pi {
|
|
|
1486
1486
|
return this._config.alternate && (t === -1 || this._loopIteration < t) ? (this._loopIteration++, this._armRepeatDelay(), this._direction = "forward", this._repeatDelayRemaining === 0) : (this._playbackState = "idle", this.onComplete?.(), !1);
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
-
const
|
|
1490
|
-
function
|
|
1489
|
+
const cs = 100;
|
|
1490
|
+
function _i(i, t, e, n) {
|
|
1491
1491
|
const s = [], r = [], { duration: o, alternate: a } = n, c = (d, m, p, g) => {
|
|
1492
1492
|
r.push([d, m]);
|
|
1493
1493
|
const y = [];
|
|
@@ -1497,20 +1497,20 @@ function Ci(i, t, e, n) {
|
|
|
1497
1497
|
for (const v of y) s.push({ kind: "event", index: v, direction: p });
|
|
1498
1498
|
};
|
|
1499
1499
|
let l = t.time, h = t.direction, f = t.fresh === !0;
|
|
1500
|
-
const u = Math.min(
|
|
1500
|
+
const u = Math.min(cs, Math.max(0, e.iteration - t.iteration));
|
|
1501
1501
|
for (let d = 0; d < u; d++) {
|
|
1502
1502
|
const m = h === "forward" ? o : 0;
|
|
1503
1503
|
c(l, m, h, f), s.push({ kind: "repeat" }), a ? (h = h === "forward" ? "reverse" : "forward", l = m, f = !1) : (l = h === "forward" ? 0 : o, f = !0);
|
|
1504
1504
|
}
|
|
1505
1505
|
return u > 0 && n.holding && !a ? { crossings: s, passes: r } : (c(l, e.time, h, f), { crossings: s, passes: r });
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1507
|
+
function ls(i) {
|
|
1508
1508
|
return tt(i) ? {
|
|
1509
1509
|
id: i.id,
|
|
1510
1510
|
target: i.target,
|
|
1511
1511
|
property: i.property,
|
|
1512
1512
|
kind: "inertia",
|
|
1513
|
-
inertia:
|
|
1513
|
+
inertia: Ii(i.inertia),
|
|
1514
1514
|
...W(i)
|
|
1515
1515
|
} : et(i) ? {
|
|
1516
1516
|
id: i.id,
|
|
@@ -1519,14 +1519,14 @@ function os(i) {
|
|
|
1519
1519
|
kind: "spring",
|
|
1520
1520
|
spring: { ...i.spring },
|
|
1521
1521
|
...W(i)
|
|
1522
|
-
} :
|
|
1522
|
+
} : ve(i) ? {
|
|
1523
1523
|
id: i.id,
|
|
1524
1524
|
target: i.target,
|
|
1525
1525
|
property: "text",
|
|
1526
1526
|
textConfig: { ...i.textConfig },
|
|
1527
1527
|
keyframes: i.keyframes.map(te),
|
|
1528
1528
|
...W(i)
|
|
1529
|
-
} :
|
|
1529
|
+
} : mi(i) ? {
|
|
1530
1530
|
id: i.id,
|
|
1531
1531
|
target: i.target,
|
|
1532
1532
|
property: "motionPath",
|
|
@@ -1541,7 +1541,7 @@ function os(i) {
|
|
|
1541
1541
|
...W(i)
|
|
1542
1542
|
};
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function Ii(i) {
|
|
1545
1545
|
return { ...i, ...Array.isArray(i.end) && { end: [...i.end] } };
|
|
1546
1546
|
}
|
|
1547
1547
|
function te(i) {
|
|
@@ -1560,7 +1560,7 @@ function W(i) {
|
|
|
1560
1560
|
...i.stagger !== void 0 && { stagger: { ...i.stagger } }
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function hs(i) {
|
|
1564
1564
|
if (tt(i)) {
|
|
1565
1565
|
const t = i;
|
|
1566
1566
|
return {
|
|
@@ -1568,7 +1568,7 @@ function as(i) {
|
|
|
1568
1568
|
target: t.target,
|
|
1569
1569
|
property: t.property,
|
|
1570
1570
|
kind: "inertia",
|
|
1571
|
-
inertia:
|
|
1571
|
+
inertia: Ii(t.inertia),
|
|
1572
1572
|
...W(t)
|
|
1573
1573
|
};
|
|
1574
1574
|
}
|
|
@@ -1583,7 +1583,7 @@ function as(i) {
|
|
|
1583
1583
|
...W(t)
|
|
1584
1584
|
};
|
|
1585
1585
|
}
|
|
1586
|
-
if (
|
|
1586
|
+
if (ve(i)) {
|
|
1587
1587
|
const t = i;
|
|
1588
1588
|
return {
|
|
1589
1589
|
id: t.id,
|
|
@@ -1613,7 +1613,7 @@ function as(i) {
|
|
|
1613
1613
|
...W(i)
|
|
1614
1614
|
});
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1616
|
+
function us(i) {
|
|
1617
1617
|
const t = i._config.markers;
|
|
1618
1618
|
return {
|
|
1619
1619
|
formatVersion: Lt,
|
|
@@ -1627,7 +1627,7 @@ function cs(i) {
|
|
|
1627
1627
|
repeatDelay: i._config.repeatDelay,
|
|
1628
1628
|
...t && { markers: t.map((e) => ({ ...e })) }
|
|
1629
1629
|
},
|
|
1630
|
-
tracks: i.tracks.map(
|
|
1630
|
+
tracks: i.tracks.map(ls),
|
|
1631
1631
|
...i.captions && { captions: JSON.parse(JSON.stringify(i.captions)) }
|
|
1632
1632
|
};
|
|
1633
1633
|
}
|
|
@@ -1637,28 +1637,28 @@ function wt(i) {
|
|
|
1637
1637
|
throw new Error(
|
|
1638
1638
|
`tinyfly: this animation uses format version ${t}, but this tinyfly reads up to version ${Lt}. Update tinyfly to play it.`
|
|
1639
1639
|
);
|
|
1640
|
-
return new
|
|
1640
|
+
return new Ci({
|
|
1641
1641
|
id: i.id,
|
|
1642
1642
|
name: i.name,
|
|
1643
1643
|
config: i.config,
|
|
1644
|
-
tracks: i.tracks.map(
|
|
1644
|
+
tracks: i.tracks.map(hs),
|
|
1645
1645
|
captions: i.captions
|
|
1646
1646
|
});
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1649
|
-
return JSON.stringify(
|
|
1648
|
+
function oa(i) {
|
|
1649
|
+
return JSON.stringify(us(i));
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1651
|
+
function aa(i) {
|
|
1652
1652
|
const t = JSON.parse(i);
|
|
1653
1653
|
return wt(t);
|
|
1654
1654
|
}
|
|
1655
|
-
function
|
|
1655
|
+
function ca(i) {
|
|
1656
1656
|
let t = 2166136261;
|
|
1657
1657
|
for (let e = 0; e < i.length; e++)
|
|
1658
1658
|
t ^= i.charCodeAt(e), t = Math.imul(t, 16777619);
|
|
1659
1659
|
return t >>> 0;
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1661
|
+
function fs(i) {
|
|
1662
1662
|
let t = i >>> 0 || 2654435769;
|
|
1663
1663
|
return {
|
|
1664
1664
|
seed: i >>> 0,
|
|
@@ -1670,22 +1670,22 @@ function ls(i) {
|
|
|
1670
1670
|
function Ri(i, t, e) {
|
|
1671
1671
|
return t + i.next() * (e - t);
|
|
1672
1672
|
}
|
|
1673
|
-
function
|
|
1673
|
+
function ds(i, t, e, n) {
|
|
1674
1674
|
if (n <= 0) return Ri(i, t, e);
|
|
1675
1675
|
const s = Math.floor((e - t) / n), r = Math.round(i.next() * s);
|
|
1676
1676
|
return t + r * n;
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function la(i, t) {
|
|
1679
1679
|
if (t.length !== 0)
|
|
1680
1680
|
return t[Math.floor(i.next() * t.length)];
|
|
1681
1681
|
}
|
|
1682
|
-
const
|
|
1683
|
-
function
|
|
1684
|
-
return typeof i != "string" ? !1 :
|
|
1682
|
+
const Li = /^([+\-*/])=\s*(-?[\d.]+)$/, $i = /^random\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*(?:,\s*(-?[\d.]+)\s*)?\)$/i;
|
|
1683
|
+
function ha(i) {
|
|
1684
|
+
return typeof i != "string" ? !1 : Li.test(i.trim()) || $i.test(i.trim());
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1686
|
+
function Fi(i, t = {}) {
|
|
1687
1687
|
if (typeof i != "string") return i;
|
|
1688
|
-
const e = i.trim(), n =
|
|
1688
|
+
const e = i.trim(), n = Li.exec(e);
|
|
1689
1689
|
if (n) {
|
|
1690
1690
|
const [, r, o] = n, a = t.base ?? 0, c = Number.parseFloat(o);
|
|
1691
1691
|
switch (r) {
|
|
@@ -1699,47 +1699,47 @@ function $i(i, t = {}) {
|
|
|
1699
1699
|
return c === 0 ? a : a / c;
|
|
1700
1700
|
}
|
|
1701
1701
|
}
|
|
1702
|
-
const s =
|
|
1702
|
+
const s = $i.exec(e);
|
|
1703
1703
|
if (s) {
|
|
1704
1704
|
if (!t.random)
|
|
1705
1705
|
throw new Error(
|
|
1706
1706
|
`resolveValue: "${e}" needs a random source — pass one via context.random`
|
|
1707
1707
|
);
|
|
1708
1708
|
const r = Number.parseFloat(s[1]), o = Number.parseFloat(s[2]), a = s[3] !== void 0 ? Number.parseFloat(s[3]) : void 0;
|
|
1709
|
-
return a !== void 0 ?
|
|
1709
|
+
return a !== void 0 ? ds(t.random, r, o, a) : Ri(t.random, r, o);
|
|
1710
1710
|
}
|
|
1711
1711
|
return i;
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function ps(i, t = 0, e) {
|
|
1714
1714
|
const n = [];
|
|
1715
1715
|
let s = t;
|
|
1716
1716
|
for (const r of i) {
|
|
1717
|
-
const o =
|
|
1717
|
+
const o = Fi(r, { base: s, random: e });
|
|
1718
1718
|
n.push(o), typeof o == "number" && (s = o);
|
|
1719
1719
|
}
|
|
1720
1720
|
return n;
|
|
1721
1721
|
}
|
|
1722
|
-
class
|
|
1722
|
+
class ua {
|
|
1723
1723
|
random;
|
|
1724
1724
|
constructor(t) {
|
|
1725
|
-
this.random =
|
|
1725
|
+
this.random = fs(t);
|
|
1726
1726
|
}
|
|
1727
1727
|
/** The seed, to be stored alongside the timeline so this can be reproduced. */
|
|
1728
1728
|
get seed() {
|
|
1729
1729
|
return this.random.seed;
|
|
1730
1730
|
}
|
|
1731
1731
|
resolve(t, e = 0) {
|
|
1732
|
-
return
|
|
1732
|
+
return Fi(t, { base: e, random: this.random });
|
|
1733
1733
|
}
|
|
1734
1734
|
resolveSequence(t, e = 0) {
|
|
1735
|
-
return
|
|
1735
|
+
return ps(t, e, this.random);
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1738
|
+
const ms = 600;
|
|
1739
|
+
function gs(i) {
|
|
1740
1740
|
if (Array.isArray(i)) {
|
|
1741
1741
|
const [u, d, m, p] = i;
|
|
1742
|
-
return { fn:
|
|
1742
|
+
return { fn: Xe(u, d, m, p), bezier: [u, d, m, p] };
|
|
1743
1743
|
}
|
|
1744
1744
|
const { segments: t } = at(i);
|
|
1745
1745
|
if (t.length === 0) throw new Error(`customEase: no curve in "${i}"`);
|
|
@@ -1748,17 +1748,17 @@ function ds(i) {
|
|
|
1748
1748
|
const a = (u) => (u - e) / r, c = (u) => (u - n) / o;
|
|
1749
1749
|
if (t.length === 1 && s.type === "C") {
|
|
1750
1750
|
const [u, d, m, p] = s.points, g = [a(u), c(d), a(m), c(p)];
|
|
1751
|
-
return { fn:
|
|
1751
|
+
return { fn: Xe(...g), bezier: g };
|
|
1752
1752
|
}
|
|
1753
|
-
const l = [], h = [], f = Math.max(8, Math.ceil(
|
|
1753
|
+
const l = [], h = [], f = Math.max(8, Math.ceil(ms / t.length));
|
|
1754
1754
|
for (const u of t)
|
|
1755
1755
|
for (let d = l.length === 0 ? 0 : 1; d <= f; d++) {
|
|
1756
|
-
const [m, p] =
|
|
1756
|
+
const [m, p] = vs(u, d / f);
|
|
1757
1757
|
l.push(a(m)), h.push(c(p));
|
|
1758
1758
|
}
|
|
1759
|
-
return { fn:
|
|
1759
|
+
return { fn: ws(l, h) };
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function ys(i = {}) {
|
|
1762
1762
|
const e = 0.1 + Math.max(0, Math.min(1, i.strength ?? 0.7)) * 0.7, n = [1];
|
|
1763
1763
|
for (let r = e; r > 2e-3; r *= e) n.push(2 * Math.sqrt(r));
|
|
1764
1764
|
const s = n.reduce((r, o) => r + o, 0);
|
|
@@ -1777,11 +1777,11 @@ function ps(i = {}) {
|
|
|
1777
1777
|
return 1;
|
|
1778
1778
|
};
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function bs(i = {}) {
|
|
1781
1781
|
const t = Math.max(1, i.wiggles ?? 10), e = i.type ?? "easeOut", n = (s) => e === "uniform" ? 1 : e === "easeInOut" ? Math.sin(Math.PI * s) : (1 - s) ** 2;
|
|
1782
1782
|
return (s) => s <= 0 || s >= 1 ? 0 : Math.sin(s * t * Math.PI * 2) * n(s);
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function vs(i, t) {
|
|
1785
1785
|
if (i.type === "L") {
|
|
1786
1786
|
const [l, h] = i.points;
|
|
1787
1787
|
return [i.startX + (l - i.startX) * t, i.startY + (h - i.startY) * t];
|
|
@@ -1792,7 +1792,7 @@ function gs(i, t) {
|
|
|
1792
1792
|
c * c * c * i.startY + 3 * c * c * t * n + 3 * c * t * t * r + t * t * t * a
|
|
1793
1793
|
];
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function ws(i, t) {
|
|
1796
1796
|
return (e) => {
|
|
1797
1797
|
if (e <= i[0]) return t[0];
|
|
1798
1798
|
if (e >= i[i.length - 1]) return t[t.length - 1];
|
|
@@ -1805,7 +1805,7 @@ function ys(i, t) {
|
|
|
1805
1805
|
return r === 0 ? t[s] : t[n] + (e - i[n]) / r * (t[s] - t[n]);
|
|
1806
1806
|
};
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function Xe(i, t, e, n) {
|
|
1809
1809
|
const s = (o, a, c) => 3 * (1 - o) * (1 - o) * o * a + 3 * (1 - o) * o * o * c + o * o * o, r = (o, a, c) => 3 * (1 - o) * (1 - o) * a + 6 * (1 - o) * o * (c - a) + 3 * o * o * (1 - c);
|
|
1810
1810
|
return (o) => {
|
|
1811
1811
|
if (o <= 0) return 0;
|
|
@@ -1824,9 +1824,9 @@ function Ye(i, t, e, n) {
|
|
|
1824
1824
|
return s(a, t, n);
|
|
1825
1825
|
};
|
|
1826
1826
|
}
|
|
1827
|
-
const
|
|
1828
|
-
function
|
|
1829
|
-
const e = t.lead ??
|
|
1827
|
+
const Ts = 350, ks = 300, xs = 550;
|
|
1828
|
+
function fa(i, t = {}) {
|
|
1829
|
+
const e = t.lead ?? Ts, n = t.gap ?? ks, s = t.tail ?? xs, r = [];
|
|
1830
1830
|
let o = 0;
|
|
1831
1831
|
return i.forEach((a, c) => {
|
|
1832
1832
|
const l = [];
|
|
@@ -1847,10 +1847,10 @@ function ha(i, t = {}) {
|
|
|
1847
1847
|
r.push({ id: a.id ?? `s${c}`, start: o, duration: f - o, cues: l }), o = f;
|
|
1848
1848
|
}), { duration: o, scenes: r, cues: r.flatMap((a) => a.cues) };
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function da(i) {
|
|
1851
1851
|
return i.cues.map((t) => ({ id: t.id, time: t.start, label: t.text }));
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function pa(i, t) {
|
|
1854
1854
|
let e = i.scenes[0];
|
|
1855
1855
|
for (const n of i.scenes)
|
|
1856
1856
|
if (t >= n.start) e = n;
|
|
@@ -1858,7 +1858,7 @@ function fa(i, t) {
|
|
|
1858
1858
|
return e;
|
|
1859
1859
|
}
|
|
1860
1860
|
const V = (i) => Math.round(i * 1e3) / 1e3;
|
|
1861
|
-
function
|
|
1861
|
+
function Ss(i, t = {}) {
|
|
1862
1862
|
if (i.length === 0) return "";
|
|
1863
1863
|
const e = t.curviness ?? 1, n = t.closed ?? !1, s = i.length;
|
|
1864
1864
|
let r = `M${V(i[0].x)} ${V(i[0].y)}`;
|
|
@@ -1879,12 +1879,12 @@ const F = (i, t = 0) => {
|
|
|
1879
1879
|
const e = parseFloat(i ?? "");
|
|
1880
1880
|
return Number.isFinite(e) ? e : t;
|
|
1881
1881
|
};
|
|
1882
|
-
function
|
|
1882
|
+
function Ms(i) {
|
|
1883
1883
|
const t = (i ?? "").trim().split(/[\s,]+/).filter(Boolean).map(Number), e = [];
|
|
1884
1884
|
for (let n = 0; n + 1 < t.length; n += 2) e.push({ x: t[n], y: t[n + 1] });
|
|
1885
1885
|
return e;
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function Te(i) {
|
|
1888
1888
|
const t = i.attributes;
|
|
1889
1889
|
switch (i.tag.toLowerCase()) {
|
|
1890
1890
|
case "path":
|
|
@@ -1903,7 +1903,7 @@ function we(i) {
|
|
|
1903
1903
|
return `M${F(t.x1)} ${F(t.y1)} L${F(t.x2)} ${F(t.y2)}`;
|
|
1904
1904
|
case "polyline":
|
|
1905
1905
|
case "polygon": {
|
|
1906
|
-
const e =
|
|
1906
|
+
const e = Ms(t.points);
|
|
1907
1907
|
if (e.length === 0) return null;
|
|
1908
1908
|
const n = e.map((s, r) => `${r === 0 ? "M" : "L"}${s.x} ${s.y}`).join(" ");
|
|
1909
1909
|
return i.tag.toLowerCase() === "polygon" ? `${n} Z` : n;
|
|
@@ -1937,7 +1937,7 @@ const Pt = {
|
|
|
1937
1937
|
"back.in": [0.6, -0.28, 0.735, 0.045],
|
|
1938
1938
|
"back.out": [0.175, 0.885, 0.32, 1.275],
|
|
1939
1939
|
"back.inout": [0.68, -0.55, 0.265, 1.55]
|
|
1940
|
-
},
|
|
1940
|
+
}, Ve = {
|
|
1941
1941
|
none: "linear",
|
|
1942
1942
|
linear: "linear",
|
|
1943
1943
|
"linear.none": "linear",
|
|
@@ -1949,7 +1949,7 @@ const Pt = {
|
|
|
1949
1949
|
"power2.out": "ease-out-cubic",
|
|
1950
1950
|
"power2.inout": "ease-in-out-cubic"
|
|
1951
1951
|
};
|
|
1952
|
-
function
|
|
1952
|
+
function As(i) {
|
|
1953
1953
|
let t = i.trim().toLowerCase();
|
|
1954
1954
|
t = t.replace(/\.ease(in|out|inout)$/, ".$1");
|
|
1955
1955
|
const e = /^([a-z]+\d?)(\(.*\))?$/.exec(t);
|
|
@@ -1958,9 +1958,9 @@ function xs(i) {
|
|
|
1958
1958
|
z({ type: "bounce", mode: "in" });
|
|
1959
1959
|
z({ type: "bounce", mode: "in-out" });
|
|
1960
1960
|
function Dt(i) {
|
|
1961
|
-
const t =
|
|
1961
|
+
const t = Di.get(i.trim().toLowerCase());
|
|
1962
1962
|
if (t) return t;
|
|
1963
|
-
const e =
|
|
1963
|
+
const e = As(i), n = /^steps\(\s*(\d+)\s*\)$/.exec(e);
|
|
1964
1964
|
if (n) {
|
|
1965
1965
|
const o = { type: "steps", count: Math.max(1, Number.parseInt(n[1], 10)) + 1, position: "none" };
|
|
1966
1966
|
return { easing: o, fn: z(o) };
|
|
@@ -1973,11 +1973,11 @@ function Dt(i) {
|
|
|
1973
1973
|
const h = r === "elastic" ? { type: "elastic", mode: l, ...c[0] !== void 0 && { amplitude: c[0] }, ...c[1] !== void 0 && { period: c[1] } } : r === "bounce" ? { type: "bounce", mode: l } : { type: "back", mode: l, ...c[0] !== void 0 && { overshoot: c[0] } };
|
|
1974
1974
|
return { easing: h, fn: z(h) };
|
|
1975
1975
|
}
|
|
1976
|
-
return e in
|
|
1976
|
+
return e in Ve ? { easing: Ve[e] } : e in Pt ? { easing: { type: "cubic-bezier", points: Pt[e] } } : { easing: "ease-out" };
|
|
1977
1977
|
}
|
|
1978
|
-
const
|
|
1979
|
-
function
|
|
1980
|
-
return
|
|
1978
|
+
const Di = /* @__PURE__ */ new Map();
|
|
1979
|
+
function ke(i, t) {
|
|
1980
|
+
return Di.set(
|
|
1981
1981
|
i.trim().toLowerCase(),
|
|
1982
1982
|
t.bezier ? { easing: { type: "cubic-bezier", points: t.bezier }, fn: t.fn } : { fn: t.fn, requiresBaking: "custom" }
|
|
1983
1983
|
), i;
|
|
@@ -1990,16 +1990,16 @@ function fe(i) {
|
|
|
1990
1990
|
return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
1991
1991
|
};
|
|
1992
1992
|
}
|
|
1993
|
-
const
|
|
1994
|
-
function
|
|
1995
|
-
return typeof i == "string" &&
|
|
1993
|
+
const Bi = /^\s*random\(\s*(\[.*\]|[^)]*)\s*\)\s*$/;
|
|
1994
|
+
function Oi(i) {
|
|
1995
|
+
return typeof i == "string" && Bi.test(i);
|
|
1996
1996
|
}
|
|
1997
|
-
function
|
|
1997
|
+
function Es(i = 1) {
|
|
1998
1998
|
let t = fe(i);
|
|
1999
1999
|
const e = (c, l) => ((...h) => h.length >= c ? l(...h) : (f) => l(...h, f)), n = (c, l, h) => Math.min(Math.max(h, Math.min(c, l)), Math.max(c, l)), s = (c, l, h, f, u) => l === c ? h : h + (u - c) / (l - c) * (f - h), r = (c, l) => {
|
|
2000
2000
|
if (typeof c == "number") return c === 0 ? l : Math.round(l / c) * c;
|
|
2001
|
-
if (Array.isArray(c)) return
|
|
2002
|
-
if ("values" in c) return
|
|
2001
|
+
if (Array.isArray(c)) return We(c, l, 1 / 0);
|
|
2002
|
+
if ("values" in c) return We(c.values, l, c.radius ?? 1 / 0);
|
|
2003
2003
|
const h = Math.round(l / c.increment) * c.increment;
|
|
2004
2004
|
return Math.abs(h - l) <= (c.radius ?? 1 / 0) ? h : l;
|
|
2005
2005
|
}, o = (c, l, h) => {
|
|
@@ -2050,17 +2050,17 @@ function Ss(i = 1) {
|
|
|
2050
2050
|
return c;
|
|
2051
2051
|
},
|
|
2052
2052
|
distribute: ({ base: c = 0, amount: l, each: h, from: f = "start", ease: u }) => (d, m, p) => {
|
|
2053
|
-
const g = p.length, v =
|
|
2053
|
+
const g = p.length, v = we(d, g, { ...l !== void 0 ? { amount: l } : { each: h ?? 1 }, from: f }), b = l !== void 0 ? l : (h ?? 1) * yi(g, f), T = u && b > 0 ? u(v / b) * b : v;
|
|
2054
2054
|
return c + T;
|
|
2055
2055
|
},
|
|
2056
2056
|
pipe: (...c) => (l) => c.reduce((h, f) => f(h), l),
|
|
2057
|
-
splitColor: (c) =>
|
|
2057
|
+
splitColor: (c) => Ps(c),
|
|
2058
2058
|
getUnit: (c) => typeof c == "number" ? "" : /^-?[\d.]+(?:e[-+]?\d+)?([a-z%]*)$/i.exec(c.trim())?.[1] ?? "",
|
|
2059
2059
|
seed: (c) => {
|
|
2060
2060
|
t = fe(c);
|
|
2061
2061
|
},
|
|
2062
2062
|
resolveRandomString: (c) => {
|
|
2063
|
-
const l =
|
|
2063
|
+
const l = Bi.exec(c)?.[1] ?? "";
|
|
2064
2064
|
if (l.startsWith("[")) {
|
|
2065
2065
|
const m = l.slice(1, -1).split(",").map((p) => p.trim()).filter(Boolean).map((p) => Number.isFinite(Number(p)) ? Number(p) : p.replace(/^['"]|['"]$/g, ""));
|
|
2066
2066
|
return m[Math.floor(t() * m.length)];
|
|
@@ -2070,7 +2070,7 @@ function Ss(i = 1) {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
};
|
|
2072
2072
|
}
|
|
2073
|
-
function
|
|
2073
|
+
function We(i, t, e) {
|
|
2074
2074
|
let n = t, s = 1 / 0;
|
|
2075
2075
|
for (const r of i) {
|
|
2076
2076
|
const o = Math.abs(r - t);
|
|
@@ -2078,7 +2078,7 @@ function Ve(i, t, e) {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
return s <= e ? n : t;
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function Ps(i) {
|
|
2082
2082
|
const t = i.trim(), e = /^#([0-9a-f]{3,8})$/i.exec(t)?.[1];
|
|
2083
2083
|
if (e) {
|
|
2084
2084
|
const r = (e.length <= 4 ? [...e].map((o) => o + o).join("") : e).match(/../g).map((o) => Number.parseInt(o, 16));
|
|
@@ -2087,19 +2087,19 @@ function Ms(i) {
|
|
|
2087
2087
|
const n = (/rgba?\(([^)]+)\)/i.exec(t)?.[1] ?? "0,0,0").split(/[\s,/]+/).filter(Boolean).map((s) => Number.parseFloat(s));
|
|
2088
2088
|
return n.length >= 4 ? [n[0], n[1], n[2], n[3]] : [n[0] ?? 0, n[1] ?? 0, n[2] ?? 0];
|
|
2089
2089
|
}
|
|
2090
|
-
const
|
|
2090
|
+
const Cs = /^([+-])=\s*(-?[\d.]+)$/, _s = /^([<>])\s*(?:([+-])?=?\s*(-?[\d.]+))?$/;
|
|
2091
2091
|
function pt(i, t) {
|
|
2092
2092
|
const e = t.scale ?? 1, n = (l) => Number.parseFloat(l) * e;
|
|
2093
2093
|
if (i === void 0) return t.cursor;
|
|
2094
2094
|
if (typeof i == "number") return i * e;
|
|
2095
2095
|
const s = i.trim();
|
|
2096
2096
|
if (s === "") return t.cursor;
|
|
2097
|
-
const r =
|
|
2097
|
+
const r = Cs.exec(s);
|
|
2098
2098
|
if (r) {
|
|
2099
2099
|
const l = n(r[2]);
|
|
2100
2100
|
return t.cursor + (r[1] === "-" ? -l : l);
|
|
2101
2101
|
}
|
|
2102
|
-
const o =
|
|
2102
|
+
const o = _s.exec(s);
|
|
2103
2103
|
if (o) {
|
|
2104
2104
|
const l = o[1] === "<" ? t.previousStart : t.previousEnd;
|
|
2105
2105
|
if (o[3] === void 0) return l;
|
|
@@ -2117,12 +2117,12 @@ function pt(i, t) {
|
|
|
2117
2117
|
const c = t.labels.get(s);
|
|
2118
2118
|
return c !== void 0 ? c : /^-?[\d.]+$/.test(s) ? n(s) : t.cursor;
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2120
|
+
function Is(i) {
|
|
2121
2121
|
if (typeof i != "object" || i === null) return !1;
|
|
2122
2122
|
const t = i;
|
|
2123
2123
|
return t.grid !== void 0 || t.from === "random" || Array.isArray(t.from) || t.ease !== void 0 || t.axis !== void 0;
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function Rs(i, t, e = {}) {
|
|
2126
2126
|
if (i === 0) return [];
|
|
2127
2127
|
const n = t.grid === "auto" ? Math.max(1, Math.min(i, e.columnsFromLayout?.() ?? i)) : Array.isArray(t.grid) ? Math.max(1, t.grid[1]) : i, s = Array.isArray(t.grid) ? Math.max(1, t.grid[0]) : Math.ceil(i / n), r = (m) => ({ x: m % n, y: Math.floor(m / n) }), o = t.from ?? "start", a = Array.isArray(o) ? { x: o[0] * (n - 1), y: o[1] * (s - 1) } : typeof o == "number" ? r(Math.max(0, Math.min(i - 1, o))) : o === "end" ? r(i - 1) : o === "center" || o === "edges" ? { x: (n - 1) / 2, y: (s - 1) / 2 } : { x: 0, y: 0 }, c = (m) => {
|
|
2128
2128
|
const { x: p, y: g } = r(m), y = Math.abs(p - a.x), v = Math.abs(g - a.y);
|
|
@@ -2140,7 +2140,7 @@ function Cs(i, t, e = {}) {
|
|
|
2140
2140
|
return (d ? d(p) : p) * f;
|
|
2141
2141
|
});
|
|
2142
2142
|
}
|
|
2143
|
-
const
|
|
2143
|
+
const xe = /* @__PURE__ */ new Set([
|
|
2144
2144
|
"duration",
|
|
2145
2145
|
"delay",
|
|
2146
2146
|
"ease",
|
|
@@ -2164,10 +2164,10 @@ const ke = /* @__PURE__ */ new Set([
|
|
|
2164
2164
|
"scrollTrigger",
|
|
2165
2165
|
"spring"
|
|
2166
2166
|
]);
|
|
2167
|
-
function
|
|
2167
|
+
function It(i) {
|
|
2168
2168
|
const t = {}, e = {};
|
|
2169
2169
|
for (const [n, s] of Object.entries(i))
|
|
2170
|
-
|
|
2170
|
+
xe.has(n) ? t[n] = s : e[n] = s;
|
|
2171
2171
|
return { config: t, properties: e };
|
|
2172
2172
|
}
|
|
2173
2173
|
function Bt(i, t) {
|
|
@@ -2175,13 +2175,13 @@ function Bt(i, t) {
|
|
|
2175
2175
|
}
|
|
2176
2176
|
function de(i, t) {
|
|
2177
2177
|
if (i !== void 0)
|
|
2178
|
-
return typeof i == "number" ? { each: i * 1e3 } :
|
|
2178
|
+
return typeof i == "number" ? { each: i * 1e3 } : Is(i) ? { offsets: Rs(t?.count ?? 0, i, t ?? {}).map((n) => n * 1e3) } : {
|
|
2179
2179
|
...i.each !== void 0 && { each: i.each * 1e3 },
|
|
2180
2180
|
...i.amount !== void 0 && { amount: i.amount * 1e3 },
|
|
2181
2181
|
...i.from !== void 0 && { from: i.from }
|
|
2182
2182
|
};
|
|
2183
2183
|
}
|
|
2184
|
-
const
|
|
2184
|
+
const Ls = {
|
|
2185
2185
|
opacity: 1,
|
|
2186
2186
|
x: 0,
|
|
2187
2187
|
y: 0,
|
|
@@ -2207,16 +2207,16 @@ const _s = {
|
|
|
2207
2207
|
clipBottom: 0,
|
|
2208
2208
|
clipLeft: 0
|
|
2209
2209
|
};
|
|
2210
|
-
function
|
|
2211
|
-
return
|
|
2210
|
+
function Ni(i) {
|
|
2211
|
+
return Ls[i];
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2213
|
+
function $s(i) {
|
|
2214
2214
|
const t = typeof i == "string" || Array.isArray(i) ? { path: i } : i;
|
|
2215
2215
|
if (!t || typeof t.path != "string" && !Array.isArray(t.path))
|
|
2216
2216
|
throw new Error("gsap-compat: motionPath needs a path — SVG path data or an array of { x, y } points.");
|
|
2217
2217
|
let e;
|
|
2218
2218
|
if (Array.isArray(t.path))
|
|
2219
|
-
e =
|
|
2219
|
+
e = Ss(t.path, { curviness: t.curviness });
|
|
2220
2220
|
else if (St(t.path))
|
|
2221
2221
|
e = t.path;
|
|
2222
2222
|
else
|
|
@@ -2226,61 +2226,61 @@ function Rs(i) {
|
|
|
2226
2226
|
const n = { pathData: e };
|
|
2227
2227
|
return t.autoRotate !== void 0 && t.autoRotate !== !1 && (n.autoRotate = !0, typeof t.autoRotate == "number" && (n.rotateOffset = t.autoRotate)), t.matrix && (n.matrix = t.matrix), { config: n, start: t.start ?? 0, end: t.end ?? 1 };
|
|
2228
2228
|
}
|
|
2229
|
-
function
|
|
2229
|
+
function Fs(i) {
|
|
2230
2230
|
const t = typeof i == "string" || Array.isArray(i) ? { path: i } : { ...i };
|
|
2231
2231
|
return { ...t, start: t.end ?? 1, end: t.start ?? 0 };
|
|
2232
2232
|
}
|
|
2233
|
-
function
|
|
2233
|
+
function qi(i) {
|
|
2234
2234
|
return typeof i == "object" && i !== null && "shape" in i ? i.shape : i;
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function Ds(i) {
|
|
2237
2237
|
if (i.morphSVG === void 0) return i;
|
|
2238
|
-
const { morphSVG: t, ...e } = i, n =
|
|
2238
|
+
const { morphSVG: t, ...e } = i, n = qi(t);
|
|
2239
2239
|
if (typeof n != "string" || !St(n))
|
|
2240
2240
|
throw new Error(
|
|
2241
2241
|
`gsap-compat: morphSVG "${String(n)}" is not path data. Selectors and elements are resolved by live.to(); timeline() and tf need the path data itself.`
|
|
2242
2242
|
);
|
|
2243
2243
|
return { ...e, d: n };
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2245
|
+
function Bs(i, t) {
|
|
2246
2246
|
if (i === !0) return [0, t];
|
|
2247
2247
|
if (i === !1) return [0, 0];
|
|
2248
|
-
if (typeof i == "number") return [0,
|
|
2248
|
+
if (typeof i == "number") return [0, je(i, t)];
|
|
2249
2249
|
const e = i.trim().split(/[\s,]+/).filter(Boolean), n = (o) => {
|
|
2250
2250
|
const a = Number.parseFloat(o);
|
|
2251
2251
|
if (Number.isNaN(a)) throw new Error(`gsap-compat: drawSVG "${i}" is not a length or percentage`);
|
|
2252
|
-
return
|
|
2252
|
+
return je(o.endsWith("%") ? t * a / 100 : a, t);
|
|
2253
2253
|
};
|
|
2254
2254
|
if (e.length === 0) return [0, t];
|
|
2255
2255
|
if (e.length === 1) return [0, n(e[0])];
|
|
2256
2256
|
const s = n(e[0]), r = n(e[1]);
|
|
2257
2257
|
return s <= r ? [s, r] : [r, s];
|
|
2258
2258
|
}
|
|
2259
|
-
function
|
|
2260
|
-
const [e, n] =
|
|
2259
|
+
function Os(i, t) {
|
|
2260
|
+
const [e, n] = Bs(i, t);
|
|
2261
2261
|
return { strokeDasharray: [n - e, t], strokeDashoffset: -e };
|
|
2262
2262
|
}
|
|
2263
|
-
function
|
|
2263
|
+
function Ns(i, t) {
|
|
2264
2264
|
if (i.drawSVG === void 0) return i;
|
|
2265
2265
|
const { drawSVG: e, ...n } = i;
|
|
2266
|
-
return { ...n, ...
|
|
2266
|
+
return { ...n, ...Os(e, t) };
|
|
2267
2267
|
}
|
|
2268
|
-
function
|
|
2268
|
+
function qs(i) {
|
|
2269
2269
|
if (i.drawSVG !== void 0)
|
|
2270
2270
|
throw new Error(
|
|
2271
2271
|
"gsap-compat: drawSVG needs the stroke length from the page. Use live.to(), or animate strokeDasharray / strokeDashoffset directly (see drawSvgProperties)."
|
|
2272
2272
|
);
|
|
2273
2273
|
return i;
|
|
2274
2274
|
}
|
|
2275
|
-
function
|
|
2275
|
+
function je(i, t) {
|
|
2276
2276
|
return Math.max(0, Math.min(t, i));
|
|
2277
2277
|
}
|
|
2278
|
-
function
|
|
2278
|
+
function Ys(i) {
|
|
2279
2279
|
let t = 2166136261;
|
|
2280
2280
|
for (let e = 0; e < i.length; e++) t = Math.imul(t ^ i.charCodeAt(e), 16777619);
|
|
2281
2281
|
return t >>> 0;
|
|
2282
2282
|
}
|
|
2283
|
-
function
|
|
2283
|
+
function Xs(i, t, e) {
|
|
2284
2284
|
if (i.scrambleText !== void 0) {
|
|
2285
2285
|
const n = i.scrambleText, s = typeof n == "string" ? { text: n } : n;
|
|
2286
2286
|
if (typeof s?.text != "string")
|
|
@@ -2294,7 +2294,7 @@ function Ns(i, t, e) {
|
|
|
2294
2294
|
...r !== void 0 && { revealDelay: Math.min(r, 0.999) },
|
|
2295
2295
|
...s.tweenLength !== void 0 && { tweenLength: s.tweenLength },
|
|
2296
2296
|
...s.rightToLeft !== void 0 && { rightToLeft: s.rightToLeft },
|
|
2297
|
-
seed: s.seed ??
|
|
2297
|
+
seed: s.seed ?? Ys(`${t}|${s.text}`)
|
|
2298
2298
|
};
|
|
2299
2299
|
}
|
|
2300
2300
|
if (i.text !== void 0) {
|
|
@@ -2308,14 +2308,14 @@ function Ns(i, t, e) {
|
|
|
2308
2308
|
};
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
|
-
function
|
|
2311
|
+
function Se(i) {
|
|
2312
2312
|
return Math.max(0.1, i / 25);
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function Vs(i, t) {
|
|
2315
2315
|
const e = typeof t == "number" ? { velocity: t } : t;
|
|
2316
2316
|
if (typeof e?.velocity != "number" || !Number.isFinite(e.velocity))
|
|
2317
2317
|
throw new Error("gsap-compat: inertia needs a velocity for each property — a number, or { velocity }.");
|
|
2318
|
-
const n = e.friction ?? (e.resistance !== void 0 ?
|
|
2318
|
+
const n = e.friction ?? (e.resistance !== void 0 ? Se(e.resistance) : void 0), s = {
|
|
2319
2319
|
from: i,
|
|
2320
2320
|
velocity: e.velocity,
|
|
2321
2321
|
...n !== void 0 && { friction: n },
|
|
@@ -2324,7 +2324,7 @@ function qs(i, t) {
|
|
|
2324
2324
|
};
|
|
2325
2325
|
return typeof e.end == "function" ? s.end = [e.end($t(s))] : e.end !== void 0 && (s.end = Array.isArray(e.end) ? [...e.end] : e.end), s;
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2327
|
+
function Ws(i) {
|
|
2328
2328
|
const t = i === !0 ? {} : typeof i == "string" ? { preset: i } : i;
|
|
2329
2329
|
if (t.preset !== void 0 && !(t.preset in Ht))
|
|
2330
2330
|
throw new Error(
|
|
@@ -2338,7 +2338,7 @@ function Ys(i) {
|
|
|
2338
2338
|
...t.restDelta !== void 0 && { restDelta: t.restDelta }
|
|
2339
2339
|
};
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function js(i, t) {
|
|
2342
2342
|
if (i === !0 || typeof i == "string") return;
|
|
2343
2343
|
const e = i.velocity;
|
|
2344
2344
|
return typeof e == "number" ? e : e?.[t];
|
|
@@ -2356,7 +2356,7 @@ class ot {
|
|
|
2356
2356
|
/** Last authored value per "target|property", for the resolution chain. */
|
|
2357
2357
|
lastValues = /* @__PURE__ */ new Map();
|
|
2358
2358
|
constructor(t = {}) {
|
|
2359
|
-
this.options = t, this.timeline = new
|
|
2359
|
+
this.options = t, this.timeline = new Ci({
|
|
2360
2360
|
// A timestamped default would make the same script compile to different
|
|
2361
2361
|
// JSON on every run, which breaks the determinism contract. Callers that
|
|
2362
2362
|
// need distinct ids pass one.
|
|
@@ -2377,16 +2377,16 @@ class ot {
|
|
|
2377
2377
|
}
|
|
2378
2378
|
/** Animate from the given values to where the property already is. */
|
|
2379
2379
|
from(t, e, n) {
|
|
2380
|
-
const { config: s, properties: r } =
|
|
2380
|
+
const { config: s, properties: r } = It(mt(e)), { motionPath: o, text: a, scrambleText: c, ...l } = r, h = this.targetsOf(t)[0], f = { ...s };
|
|
2381
2381
|
for (const m of Object.keys(l))
|
|
2382
2382
|
f[m] = this.resolveStart(h, m);
|
|
2383
|
-
o !== void 0 && (f.motionPath =
|
|
2383
|
+
o !== void 0 && (f.motionPath = Fs(o));
|
|
2384
2384
|
const u = {}, d = String(this.resolveStart(h, "text"));
|
|
2385
2385
|
return a !== void 0 && (u.text = ee(a), f.text = typeof a == "object" ? { ...a, value: d } : d), c !== void 0 && (u.text = ee(c), f.scrambleText = typeof c == "object" ? { ...c, text: d } : d), this.build(t, { ...l, ...u }, f, n);
|
|
2386
2386
|
}
|
|
2387
2387
|
/** Animate between two explicit sets of values. */
|
|
2388
2388
|
fromTo(t, e, n, s) {
|
|
2389
|
-
const { properties: r } =
|
|
2389
|
+
const { properties: r } = It(mt(e));
|
|
2390
2390
|
return this.build(t, r, mt(n), s);
|
|
2391
2391
|
}
|
|
2392
2392
|
/** Set values instantly — a single held keyframe. */
|
|
@@ -2507,7 +2507,7 @@ class ot {
|
|
|
2507
2507
|
* each property's start comes from the resolution chain.
|
|
2508
2508
|
*/
|
|
2509
2509
|
build(t, e, n, s) {
|
|
2510
|
-
const { config: r, properties: o } =
|
|
2510
|
+
const { config: r, properties: o } = It(n), { motionPath: a, text: c, scrambleText: l, inertia: h, ...f } = o, u = this.targetsOf(t), d = pt(s, this.context()), m = Bt(r.delay, 0), p = Bt(r.duration, 500), g = de(r.stagger, {
|
|
2511
2511
|
count: u.length,
|
|
2512
2512
|
columnsFromLayout: this.options.layoutColumns ? () => this.options.layoutColumns(u) : void 0,
|
|
2513
2513
|
random: this.options.random ?? this.fallbackRandom
|
|
@@ -2520,10 +2520,10 @@ class ot {
|
|
|
2520
2520
|
`no usable start value for "${x}" on "${u[0]}" — it will snap to ${String(E)}. Use fromTo() to animate it.`
|
|
2521
2521
|
), C = E), b !== void 0 && (typeof C != "number" || typeof E != "number") && this.warn(`spring works on numbers, so "${x}" on "${u[0]}" eases instead`), b !== void 0 && typeof C == "number" && typeof E == "number") {
|
|
2522
2522
|
const L = {
|
|
2523
|
-
...
|
|
2523
|
+
...Ws(b),
|
|
2524
2524
|
from: C,
|
|
2525
2525
|
to: E,
|
|
2526
|
-
velocity:
|
|
2526
|
+
velocity: js(b, x) ?? this.options.startVelocity?.(u[0], x) ?? 0
|
|
2527
2527
|
}, N = this.nextTrackId(`${u[0]}-${x}-spring`), O = {
|
|
2528
2528
|
id: N,
|
|
2529
2529
|
target: u[0],
|
|
@@ -2534,15 +2534,15 @@ class ot {
|
|
|
2534
2534
|
spring: L,
|
|
2535
2535
|
delay: d + m
|
|
2536
2536
|
};
|
|
2537
|
-
this.timeline.addTrack(O), v.push(N), T = Math.max(T,
|
|
2538
|
-
for (const
|
|
2537
|
+
this.timeline.addTrack(O), v.push(N), T = Math.max(T, hn(L));
|
|
2538
|
+
for (const R of u) this.lastValues.set(`${R}|${x}`, E);
|
|
2539
2539
|
continue;
|
|
2540
2540
|
}
|
|
2541
2541
|
w = !0;
|
|
2542
|
-
const M = this.keyframesFor(C, E, p, y, r.ease),
|
|
2542
|
+
const M = this.keyframesFor(C, E, p, y, r.ease), I = this.nextTrackId(`${u[0]}-${x}`);
|
|
2543
2543
|
this.timeline.addTrack(
|
|
2544
2544
|
ue({
|
|
2545
|
-
id:
|
|
2545
|
+
id: I,
|
|
2546
2546
|
target: u[0],
|
|
2547
2547
|
...u.length > 1 && { targets: u },
|
|
2548
2548
|
...g && u.length > 1 && { stagger: g },
|
|
@@ -2550,10 +2550,10 @@ class ot {
|
|
|
2550
2550
|
delay: d + m,
|
|
2551
2551
|
keyframes: M
|
|
2552
2552
|
})
|
|
2553
|
-
), v.push(
|
|
2553
|
+
), v.push(I);
|
|
2554
2554
|
for (const L of u) this.lastValues.set(`${L}|${x}`, E);
|
|
2555
2555
|
}
|
|
2556
|
-
const k =
|
|
2556
|
+
const k = Xs({ text: c, scrambleText: l }, u[0], p);
|
|
2557
2557
|
if (k) {
|
|
2558
2558
|
const x = e?.text ?? e?.scrambleText, P = x !== void 0 ? ee(x) : this.resolveStart(u[0], "text"), E = this.nextTrackId(`${u[0]}-text`), C = {
|
|
2559
2559
|
id: E,
|
|
@@ -2569,7 +2569,7 @@ class ot {
|
|
|
2569
2569
|
for (const M of u) this.lastValues.set(`${M}|text`, k.to);
|
|
2570
2570
|
}
|
|
2571
2571
|
if (a !== void 0) {
|
|
2572
|
-
const { config: x, start: P, end: E } =
|
|
2572
|
+
const { config: x, start: P, end: E } = $s(a), C = this.nextTrackId(`${u[0]}-motionPath`), M = {
|
|
2573
2573
|
id: C,
|
|
2574
2574
|
target: u[0],
|
|
2575
2575
|
...u.length > 1 && { targets: u },
|
|
@@ -2588,7 +2588,7 @@ class ot {
|
|
|
2588
2588
|
this.warn(`inertia on "${x}" needs a numeric start value; skipped`);
|
|
2589
2589
|
continue;
|
|
2590
2590
|
}
|
|
2591
|
-
const C =
|
|
2591
|
+
const C = Vs(E, P), M = this.nextTrackId(`${u[0]}-${x}-inertia`), I = {
|
|
2592
2592
|
id: M,
|
|
2593
2593
|
target: u[0],
|
|
2594
2594
|
...u.length > 1 && { targets: u },
|
|
@@ -2598,7 +2598,7 @@ class ot {
|
|
|
2598
2598
|
inertia: C,
|
|
2599
2599
|
delay: d + m
|
|
2600
2600
|
};
|
|
2601
|
-
this.timeline.addTrack(
|
|
2601
|
+
this.timeline.addTrack(I), v.push(M), T = Math.max(T, xt(C));
|
|
2602
2602
|
for (const L of u) this.lastValues.set(`${L}|${x}`, kt(C));
|
|
2603
2603
|
}
|
|
2604
2604
|
const B = ((h !== void 0 || b !== void 0) && !w && !k && a === void 0 ? T : Math.max(p, T)) + (g && u.length > 1 ? Yt(u.length, g) : 0), A = d + m + B;
|
|
@@ -2619,9 +2619,9 @@ class ot {
|
|
|
2619
2619
|
if (n <= 0)
|
|
2620
2620
|
return [{ time: 0, value: e }];
|
|
2621
2621
|
const a = typeof r == "string" ? Dt(r) : void 0;
|
|
2622
|
-
if (a?.requiresBaking === "custom" || this.options.bakeEases &&
|
|
2622
|
+
if (a?.requiresBaking === "custom" || this.options.bakeEases && Rt(s)) {
|
|
2623
2623
|
const l = a?.fn ?? z(s);
|
|
2624
|
-
return [o, ...
|
|
2624
|
+
return [o, ...Ei(o, { time: n, value: e }, l, { intervalMs: this.options.bakeIntervalMs })];
|
|
2625
2625
|
}
|
|
2626
2626
|
return [o, { time: n, value: e, ...s && { easing: s } }];
|
|
2627
2627
|
}
|
|
@@ -2638,7 +2638,7 @@ class ot {
|
|
|
2638
2638
|
throw new Error(
|
|
2639
2639
|
`gsap-compat: no starting shape for "${t}". Use fromTo({ d: … }, { morphSVG: … }), or live.to(), which reads the element's current shape.`
|
|
2640
2640
|
);
|
|
2641
|
-
const o =
|
|
2641
|
+
const o = Ni(e);
|
|
2642
2642
|
return o !== void 0 ? (this.warn(
|
|
2643
2643
|
`no start value for "${e}" on "${t}" — using the static default ${o}. GSAP would read the live DOM here; tinyfly cannot, so pass an explicit fromTo() or a defaults map.`
|
|
2644
2644
|
), o) : (this.warn(`no start value or default for "${e}" on "${t}" — using 0`), 0);
|
|
@@ -2681,13 +2681,13 @@ function ee(i) {
|
|
|
2681
2681
|
}
|
|
2682
2682
|
return String(i ?? "");
|
|
2683
2683
|
}
|
|
2684
|
-
function
|
|
2684
|
+
function Us(i) {
|
|
2685
2685
|
return new ot(i);
|
|
2686
2686
|
}
|
|
2687
2687
|
function mt(i) {
|
|
2688
|
-
return
|
|
2688
|
+
return qs(Ds(i));
|
|
2689
2689
|
}
|
|
2690
|
-
const
|
|
2690
|
+
const Hs = /* @__PURE__ */ new Set([
|
|
2691
2691
|
"blur",
|
|
2692
2692
|
"brightness",
|
|
2693
2693
|
"glow",
|
|
@@ -2696,16 +2696,16 @@ const Ws = /* @__PURE__ */ new Set([
|
|
|
2696
2696
|
"shadowY",
|
|
2697
2697
|
"shadowBlur",
|
|
2698
2698
|
"shadowColor"
|
|
2699
|
-
]),
|
|
2700
|
-
function
|
|
2699
|
+
]), zs = "#ffffff", Gs = "rgba(0, 0, 0, 0.5)";
|
|
2700
|
+
function Ks(i) {
|
|
2701
2701
|
const t = [];
|
|
2702
|
-
if (i.blur !== void 0 && t.push(`blur(${Math.max(0, i.blur)}px)`), i.brightness !== void 0 && t.push(`brightness(${Math.max(0, i.brightness)})`), i.glow !== void 0 && t.push(`drop-shadow(0 0 ${Math.max(0, i.glow)}px ${i.glowColor ??
|
|
2702
|
+
if (i.blur !== void 0 && t.push(`blur(${Math.max(0, i.blur)}px)`), i.brightness !== void 0 && t.push(`brightness(${Math.max(0, i.brightness)})`), i.glow !== void 0 && t.push(`drop-shadow(0 0 ${Math.max(0, i.glow)}px ${i.glowColor ?? zs})`), i.shadowX !== void 0 || i.shadowY !== void 0 || i.shadowBlur !== void 0) {
|
|
2703
2703
|
const e = i.shadowX ?? 0, n = i.shadowY ?? 0, s = Math.max(0, i.shadowBlur ?? 0);
|
|
2704
|
-
t.push(`drop-shadow(${e}px ${n}px ${s}px ${i.shadowColor ??
|
|
2704
|
+
t.push(`drop-shadow(${e}px ${n}px ${s}px ${i.shadowColor ?? Gs})`);
|
|
2705
2705
|
}
|
|
2706
2706
|
return t.length > 0 ? t.join(" ") : null;
|
|
2707
2707
|
}
|
|
2708
|
-
function
|
|
2708
|
+
function Zs(i, t) {
|
|
2709
2709
|
const e = i.childNodes.length === 1 ? i.firstChild : null;
|
|
2710
2710
|
if (e && e.nodeType === 3) {
|
|
2711
2711
|
const n = e;
|
|
@@ -2714,12 +2714,12 @@ function zs(i, t) {
|
|
|
2714
2714
|
}
|
|
2715
2715
|
i.textContent !== t && (i.textContent = t);
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2717
|
+
function Qs(i) {
|
|
2718
2718
|
if (!("ownerSVGElement" in i)) return;
|
|
2719
2719
|
const t = i.style;
|
|
2720
2720
|
!t || t.transformBox || (t.transformBox = "fill-box", t.transformOrigin || (t.transformOrigin = "50% 50%"));
|
|
2721
2721
|
}
|
|
2722
|
-
const
|
|
2722
|
+
const Ue = /* @__PURE__ */ new Set([
|
|
2723
2723
|
"width",
|
|
2724
2724
|
"height",
|
|
2725
2725
|
"top",
|
|
@@ -2745,7 +2745,7 @@ const je = /* @__PURE__ */ new Set([
|
|
|
2745
2745
|
"gap",
|
|
2746
2746
|
"rowGap",
|
|
2747
2747
|
"columnGap"
|
|
2748
|
-
]),
|
|
2748
|
+
]), Js = /* @__PURE__ */ new Set([
|
|
2749
2749
|
"x",
|
|
2750
2750
|
"y",
|
|
2751
2751
|
"z",
|
|
@@ -2763,14 +2763,14 @@ const je = /* @__PURE__ */ new Set([
|
|
|
2763
2763
|
"motionPathX",
|
|
2764
2764
|
"motionPathY",
|
|
2765
2765
|
"motionPathRotate"
|
|
2766
|
-
]),
|
|
2766
|
+
]), tr = /* @__PURE__ */ new Set(["originX", "originY"]), er = /* @__PURE__ */ new Set(["clipTop", "clipRight", "clipBottom", "clipLeft"]), ir = {
|
|
2767
2767
|
fill: "backgroundColor",
|
|
2768
2768
|
stroke: "borderColor",
|
|
2769
2769
|
strokeWidth: "borderWidth",
|
|
2770
2770
|
color: "color",
|
|
2771
2771
|
backgroundColor: "backgroundColor",
|
|
2772
2772
|
borderColor: "borderColor"
|
|
2773
|
-
},
|
|
2773
|
+
}, He = {
|
|
2774
2774
|
fill: "fill",
|
|
2775
2775
|
stroke: "stroke",
|
|
2776
2776
|
strokeWidth: "strokeWidth",
|
|
@@ -2778,7 +2778,7 @@ const je = /* @__PURE__ */ new Set([
|
|
|
2778
2778
|
strokeDashoffset: "strokeDashoffset",
|
|
2779
2779
|
fillOpacity: "fillOpacity",
|
|
2780
2780
|
strokeOpacity: "strokeOpacity"
|
|
2781
|
-
},
|
|
2781
|
+
}, nr = "http://www.w3.org/2000/svg";
|
|
2782
2782
|
class J {
|
|
2783
2783
|
targets = /* @__PURE__ */ new Map();
|
|
2784
2784
|
/**
|
|
@@ -2823,18 +2823,18 @@ class J {
|
|
|
2823
2823
|
const a = e.has("motionPathX"), c = e.has("motionPathY"), l = e.has("motionPathRotate");
|
|
2824
2824
|
for (const [u, d] of e)
|
|
2825
2825
|
if (!(u === "x" && a) && !(u === "y" && c) && !((u === "rotate" || u === "rotateZ") && l)) {
|
|
2826
|
-
if (
|
|
2826
|
+
if (Js.has(u)) {
|
|
2827
2827
|
const m = this.buildTransformPart(u, d);
|
|
2828
2828
|
m && n.push(m);
|
|
2829
|
-
} else if (
|
|
2829
|
+
} else if (tr.has(u))
|
|
2830
2830
|
typeof d == "number" && ((s ??= {})[u] = d);
|
|
2831
|
-
else if (
|
|
2831
|
+
else if (er.has(u))
|
|
2832
2832
|
typeof d == "number" && ((r ??= {})[u] = d);
|
|
2833
|
-
else if (
|
|
2833
|
+
else if (Hs.has(u))
|
|
2834
2834
|
(o ??= {})[u] = d;
|
|
2835
2835
|
else if (u !== "perspective") {
|
|
2836
2836
|
if (u !== "shine") if (u === "text" && typeof d == "string")
|
|
2837
|
-
|
|
2837
|
+
Zs(t, d);
|
|
2838
2838
|
else if (u === "d" && typeof d == "string") {
|
|
2839
2839
|
const m = t;
|
|
2840
2840
|
(m.tagName?.toLowerCase() === "path" ? m : m.querySelector?.("path"))?.setAttribute?.("d", d);
|
|
@@ -2845,7 +2845,7 @@ class J {
|
|
|
2845
2845
|
const h = e.get("shine");
|
|
2846
2846
|
typeof h == "number" && this.applyShine(t, h);
|
|
2847
2847
|
const f = e.get("perspective");
|
|
2848
|
-
if (typeof f == "number" && n.unshift(`perspective(${f}px)`), n.length > 0 && (t.style.transform = n.join(" "),
|
|
2848
|
+
if (typeof f == "number" && n.unshift(`perspective(${f}px)`), n.length > 0 && (t.style.transform = n.join(" "), Qs(t)), s) {
|
|
2849
2849
|
const u = s.originX ?? 50, d = s.originY ?? 50;
|
|
2850
2850
|
t.style.transformOrigin = `${u}% ${d}%`;
|
|
2851
2851
|
}
|
|
@@ -2854,7 +2854,7 @@ class J {
|
|
|
2854
2854
|
t.style.clipPath = `inset(${u}% ${d}% ${m}% ${p}%)`;
|
|
2855
2855
|
}
|
|
2856
2856
|
if (o) {
|
|
2857
|
-
const u =
|
|
2857
|
+
const u = Ks(o);
|
|
2858
2858
|
u && (t.style.filter = u);
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
@@ -2914,20 +2914,20 @@ class J {
|
|
|
2914
2914
|
*/
|
|
2915
2915
|
applyStyleProperty(t, e, n) {
|
|
2916
2916
|
let s;
|
|
2917
|
-
if (t.namespaceURI ===
|
|
2917
|
+
if (t.namespaceURI === nr && e in He) {
|
|
2918
2918
|
const a = Array.isArray(n) ? n.join(", ") : String(n);
|
|
2919
|
-
t.style[
|
|
2919
|
+
t.style[He[e]] = a;
|
|
2920
2920
|
return;
|
|
2921
|
-
} else e === "fill" && t.dataset?.elementType === "text" ? s = "color" : s =
|
|
2921
|
+
} else e === "fill" && t.dataset?.elementType === "text" ? s = "color" : s = ir[e] ?? e;
|
|
2922
2922
|
let o;
|
|
2923
|
-
typeof n == "number" ?
|
|
2923
|
+
typeof n == "number" ? Ue.has(e) || Ue.has(s) ? o = `${n}px` : o = String(n) : Array.isArray(n) ? o = n.join(", ") : o = n, t.style[s] = o;
|
|
2924
2924
|
}
|
|
2925
2925
|
}
|
|
2926
|
-
const
|
|
2926
|
+
const sr = {
|
|
2927
2927
|
request: (i) => requestAnimationFrame(i),
|
|
2928
2928
|
cancel: (i) => cancelAnimationFrame(i)
|
|
2929
2929
|
};
|
|
2930
|
-
class
|
|
2930
|
+
class rr {
|
|
2931
2931
|
adapter = new J();
|
|
2932
2932
|
scheduler;
|
|
2933
2933
|
rootOption;
|
|
@@ -2952,7 +2952,7 @@ class ir {
|
|
|
2952
2952
|
*/
|
|
2953
2953
|
liveTimelines = /* @__PURE__ */ new Set();
|
|
2954
2954
|
/** GSAP-style utilities, with this stage's seeded random sequence (`live.utils`). */
|
|
2955
|
-
utils =
|
|
2955
|
+
utils = Es();
|
|
2956
2956
|
/** Playing timelines, in activation order. */
|
|
2957
2957
|
active = /* @__PURE__ */ new Map();
|
|
2958
2958
|
/** Last applied value per target name and property. */
|
|
@@ -2963,7 +2963,7 @@ class ir {
|
|
|
2963
2963
|
lastTimestamp = null;
|
|
2964
2964
|
destroyed = !1;
|
|
2965
2965
|
constructor(t = {}) {
|
|
2966
|
-
this.scheduler = t.scheduler ??
|
|
2966
|
+
this.scheduler = t.scheduler ?? sr, this.rootOption = t.root, this.onWarning = t.onWarning;
|
|
2967
2967
|
}
|
|
2968
2968
|
// --- targets ------------------------------------------------------------
|
|
2969
2969
|
/**
|
|
@@ -3160,7 +3160,7 @@ class ir {
|
|
|
3160
3160
|
if (typeof t == "string")
|
|
3161
3161
|
return Array.from(this.selectorRoot.querySelectorAll(t));
|
|
3162
3162
|
if (ie(t)) return [t];
|
|
3163
|
-
if (!
|
|
3163
|
+
if (!or(t)) return [t];
|
|
3164
3164
|
const e = [];
|
|
3165
3165
|
for (const n of Array.from(t))
|
|
3166
3166
|
e.push(...this.targetsOf(n));
|
|
@@ -3192,7 +3192,7 @@ class ir {
|
|
|
3192
3192
|
function ie(i) {
|
|
3193
3193
|
return typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3195
|
+
function or(i) {
|
|
3196
3196
|
if (Array.isArray(i)) return !0;
|
|
3197
3197
|
const t = i;
|
|
3198
3198
|
return typeof t.length == "number" && typeof t.item == "function";
|
|
@@ -3205,21 +3205,21 @@ function Ot(i) {
|
|
|
3205
3205
|
const n = i.getBoundingClientRect();
|
|
3206
3206
|
return t.transform = e, n;
|
|
3207
3207
|
}
|
|
3208
|
-
const
|
|
3209
|
-
function
|
|
3208
|
+
const ze = (i) => typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3209
|
+
function ar(i) {
|
|
3210
3210
|
const t = {};
|
|
3211
3211
|
for (const e of Array.from(i.attributes)) t[e.name] = e.value;
|
|
3212
3212
|
return t;
|
|
3213
3213
|
}
|
|
3214
|
-
function
|
|
3214
|
+
function cr(i) {
|
|
3215
3215
|
const t = i.getScreenCTM?.();
|
|
3216
3216
|
if (t) return [t.a, t.b, t.c, t.d, t.e, t.f];
|
|
3217
3217
|
const e = i.getBoundingClientRect();
|
|
3218
3218
|
return [1, 0, 0, 1, e.left, e.top];
|
|
3219
3219
|
}
|
|
3220
|
-
function
|
|
3221
|
-
const e = typeof i == "string" || Array.isArray(i) ||
|
|
3222
|
-
const S =
|
|
3220
|
+
function lr(i, t) {
|
|
3221
|
+
const e = typeof i == "string" || Array.isArray(i) || ze(i) ? { path: i } : i, { align: n, alignOrigin: s, path: r, ...o } = e, a = (k) => {
|
|
3222
|
+
const S = ze(k) ? k : t.query(k);
|
|
3223
3223
|
return S || t.warn(`gsap-compat: motionPath could not find "${String(k)}"`), S;
|
|
3224
3224
|
};
|
|
3225
3225
|
let c = null, l = "";
|
|
@@ -3227,7 +3227,7 @@ function or(i, t) {
|
|
|
3227
3227
|
l = r;
|
|
3228
3228
|
else {
|
|
3229
3229
|
c = a(r);
|
|
3230
|
-
const k = c &&
|
|
3230
|
+
const k = c && Te({ tag: c.localName, attributes: ar(c) });
|
|
3231
3231
|
c && !k && t.warn(`gsap-compat: motionPath element <${c.localName}> has no path geometry`), l = k ?? "";
|
|
3232
3232
|
}
|
|
3233
3233
|
const h = { ...o, path: l };
|
|
@@ -3237,7 +3237,7 @@ function or(i, t) {
|
|
|
3237
3237
|
return n === !0 && t.warn("gsap-compat: motionPath align: true needs the path to be an element"), h;
|
|
3238
3238
|
const u = t.targets[0];
|
|
3239
3239
|
if (!u) return h;
|
|
3240
|
-
const [d, m, p, g, y, v] =
|
|
3240
|
+
const [d, m, p, g, y, v] = cr(f), b = Ot(u), [T, w] = s ?? [0.5, 0.5];
|
|
3241
3241
|
for (const k of t.targets.slice(1)) {
|
|
3242
3242
|
const S = Ot(k);
|
|
3243
3243
|
if (Math.abs(S.left - b.left) > 0.5 || Math.abs(S.top - b.top) > 0.5) {
|
|
@@ -3247,37 +3247,37 @@ function or(i, t) {
|
|
|
3247
3247
|
}
|
|
3248
3248
|
return h.matrix = [d, m, p, g, y - b.left - T * b.width, v - b.top - w * b.height], h;
|
|
3249
3249
|
}
|
|
3250
|
-
const
|
|
3251
|
-
function
|
|
3250
|
+
const Yi = (i) => typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3251
|
+
function Xi(i) {
|
|
3252
3252
|
const t = {};
|
|
3253
3253
|
for (const e of Array.from(i.attributes)) t[e.name] = e.value;
|
|
3254
3254
|
return t;
|
|
3255
3255
|
}
|
|
3256
|
-
function
|
|
3256
|
+
function Vi(i) {
|
|
3257
3257
|
if (!i) return null;
|
|
3258
|
-
const t =
|
|
3258
|
+
const t = Te({ tag: i.localName, attributes: Xi(i) });
|
|
3259
3259
|
return t || (i.querySelector("path")?.getAttribute("d") ?? null);
|
|
3260
3260
|
}
|
|
3261
|
-
function
|
|
3262
|
-
const n =
|
|
3261
|
+
function hr(i, t, e) {
|
|
3262
|
+
const n = qi(i);
|
|
3263
3263
|
if (typeof n == "string" && St(n)) return n;
|
|
3264
|
-
const s =
|
|
3264
|
+
const s = Yi(n) ? n : typeof n == "string" ? t(n) : null, r = Vi(s);
|
|
3265
3265
|
return r || (e(`gsap-compat: morphSVG could not find a shape for "${String(n)}"`), "");
|
|
3266
3266
|
}
|
|
3267
|
-
const
|
|
3268
|
-
function
|
|
3269
|
-
return (typeof i == "string" ? Array.from(t.querySelectorAll(i)) :
|
|
3267
|
+
const ur = /* @__PURE__ */ new Set(["cx", "cy", "r", "rx", "ry", "x", "y", "width", "height", "x1", "y1", "x2", "y2", "points"]);
|
|
3268
|
+
function fr(i, t = document) {
|
|
3269
|
+
return (typeof i == "string" ? Array.from(t.querySelectorAll(i)) : Yi(i) ? [i] : Array.from(i)).map((n) => {
|
|
3270
3270
|
if (n.localName === "path") return n;
|
|
3271
|
-
const s =
|
|
3271
|
+
const s = Te({ tag: n.localName, attributes: Xi(n) });
|
|
3272
3272
|
if (!s || !n.parentNode) return n;
|
|
3273
3273
|
const r = n.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3274
3274
|
for (const o of Array.from(n.attributes))
|
|
3275
|
-
|
|
3275
|
+
ur.has(o.name) || r.setAttribute(o.name, o.value);
|
|
3276
3276
|
return r.setAttribute("d", s), n.parentNode.replaceChild(r, n), r;
|
|
3277
3277
|
});
|
|
3278
3278
|
}
|
|
3279
|
-
const
|
|
3280
|
-
class
|
|
3279
|
+
const Ge = 0.3;
|
|
3280
|
+
class dr {
|
|
3281
3281
|
options;
|
|
3282
3282
|
target;
|
|
3283
3283
|
running = !1;
|
|
@@ -3311,7 +3311,7 @@ class hr {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
// --- gesture lifecycle --------------------------------------------------
|
|
3313
3313
|
begin(t, e, n) {
|
|
3314
|
-
this.dragging = !0, this.passedTolerance = !1, this.startX = t, this.startY = e, this.lastX = t, this.lastY = e, this.velocityX = 0, this.velocityY = 0, this.lastTime =
|
|
3314
|
+
this.dragging = !0, this.passedTolerance = !1, this.startX = t, this.startY = e, this.lastX = t, this.lastY = e, this.velocityX = 0, this.velocityY = 0, this.lastTime = Ke(), this.options.onPress?.(this.stateFrom(0, 0, n));
|
|
3315
3315
|
}
|
|
3316
3316
|
move(t, e, n) {
|
|
3317
3317
|
if (!this.dragging) return;
|
|
@@ -3328,10 +3328,10 @@ class hr {
|
|
|
3328
3328
|
this.dragging && (this.dragging = !1, this.options.onRelease?.(this.stateFrom(0, 0, t)));
|
|
3329
3329
|
}
|
|
3330
3330
|
updateVelocity(t, e) {
|
|
3331
|
-
const n =
|
|
3331
|
+
const n = Ke(), s = Math.max(1, n - this.lastTime);
|
|
3332
3332
|
this.lastTime = n;
|
|
3333
3333
|
const r = t / s * 1e3, o = e / s * 1e3;
|
|
3334
|
-
this.velocityX += (r - this.velocityX) *
|
|
3334
|
+
this.velocityX += (r - this.velocityX) * Ge, this.velocityY += (o - this.velocityY) * Ge;
|
|
3335
3335
|
}
|
|
3336
3336
|
stateFrom(t, e, n) {
|
|
3337
3337
|
return {
|
|
@@ -3383,10 +3383,10 @@ class hr {
|
|
|
3383
3383
|
});
|
|
3384
3384
|
};
|
|
3385
3385
|
}
|
|
3386
|
-
function
|
|
3386
|
+
function Ke() {
|
|
3387
3387
|
return typeof performance < "u" ? performance.now() : Date.now();
|
|
3388
3388
|
}
|
|
3389
|
-
function
|
|
3389
|
+
function pr(i, t, e) {
|
|
3390
3390
|
let n = { delta: 0, line: null }, s = e;
|
|
3391
3391
|
for (const r of i)
|
|
3392
3392
|
for (const o of t) {
|
|
@@ -3395,10 +3395,10 @@ function ur(i, t, e) {
|
|
|
3395
3395
|
}
|
|
3396
3396
|
return n;
|
|
3397
3397
|
}
|
|
3398
|
-
function
|
|
3398
|
+
function mr(i, t) {
|
|
3399
3399
|
return t <= 0 ? [] : i.map((e) => Math.round(e / t) * t);
|
|
3400
3400
|
}
|
|
3401
|
-
class
|
|
3401
|
+
class Wi {
|
|
3402
3402
|
options;
|
|
3403
3403
|
observer;
|
|
3404
3404
|
x;
|
|
@@ -3410,7 +3410,7 @@ class Vi {
|
|
|
3410
3410
|
snappedX = null;
|
|
3411
3411
|
snappedY = null;
|
|
3412
3412
|
constructor(t) {
|
|
3413
|
-
this.options = t, this.x = t.initialX ?? 0, this.y = t.initialY ?? 0, this.observer = new
|
|
3413
|
+
this.options = t, this.x = t.initialX ?? 0, this.y = t.initialY ?? 0, this.observer = new dr({
|
|
3414
3414
|
target: t.target,
|
|
3415
3415
|
onPress: (e) => {
|
|
3416
3416
|
const n = t.getPosition?.();
|
|
@@ -3463,7 +3463,7 @@ class Vi {
|
|
|
3463
3463
|
if (e <= 0) return;
|
|
3464
3464
|
const n = this.options.scrubDistance ?? 500;
|
|
3465
3465
|
if (n === 0) return;
|
|
3466
|
-
const s = (this.options.axis ?? "both") === "y" ? this.y : this.x, r =
|
|
3466
|
+
const s = (this.options.axis ?? "both") === "y" ? this.y : this.x, r = gr(s / n);
|
|
3467
3467
|
t.pause(), t.seek(r * e);
|
|
3468
3468
|
}
|
|
3469
3469
|
/**
|
|
@@ -3476,9 +3476,9 @@ class Vi {
|
|
|
3476
3476
|
applyConstraints(t, e) {
|
|
3477
3477
|
let n = t;
|
|
3478
3478
|
const s = [
|
|
3479
|
-
...
|
|
3479
|
+
...mr([n], this.options.snap ?? 0),
|
|
3480
3480
|
...(e === "x" ? this.options.snapLinesX : this.options.snapLinesY) ?? []
|
|
3481
|
-
], r =
|
|
3481
|
+
], r = pr([n], s, this.snapThreshold());
|
|
3482
3482
|
n += r.delta, e === "x" ? this.snappedX = r.line : this.snappedY = r.line;
|
|
3483
3483
|
const o = this.options.bounds;
|
|
3484
3484
|
if (o) {
|
|
@@ -3488,15 +3488,15 @@ class Vi {
|
|
|
3488
3488
|
return n;
|
|
3489
3489
|
}
|
|
3490
3490
|
}
|
|
3491
|
-
function
|
|
3491
|
+
function gr(i) {
|
|
3492
3492
|
return i < 0 ? 0 : i > 1 ? 1 : i;
|
|
3493
3493
|
}
|
|
3494
|
-
function
|
|
3495
|
-
const t = new
|
|
3494
|
+
function ma(i) {
|
|
3495
|
+
const t = new Wi(i);
|
|
3496
3496
|
return t.start(), t;
|
|
3497
3497
|
}
|
|
3498
|
-
const
|
|
3499
|
-
function
|
|
3498
|
+
const yr = { x: "x", y: "y", "x,y": "both" }, pe = (i) => typeof i == "object" && i !== null && i.nodeType === 1;
|
|
3499
|
+
function Ze(i, t) {
|
|
3500
3500
|
const e = Ot(i), n = t.getBoundingClientRect();
|
|
3501
3501
|
return {
|
|
3502
3502
|
minX: n.left - e.left,
|
|
@@ -3505,23 +3505,23 @@ function Ke(i, t) {
|
|
|
3505
3505
|
maxY: n.bottom - e.bottom
|
|
3506
3506
|
};
|
|
3507
3507
|
}
|
|
3508
|
-
function
|
|
3508
|
+
function Qe(i) {
|
|
3509
3509
|
return Array.isArray(i) ? [...i] : i;
|
|
3510
3510
|
}
|
|
3511
|
-
function
|
|
3511
|
+
function br(i, t, e, n = {}) {
|
|
3512
3512
|
const [s] = t.resolveTargets(e), r = s ? t.elementFor(s) : void 0;
|
|
3513
3513
|
if (!s || !r)
|
|
3514
3514
|
throw new Error(`gsap-compat: live.draggable could not find ${String(e)}`);
|
|
3515
|
-
if (n.type === "rotation") return
|
|
3516
|
-
const o =
|
|
3515
|
+
if (n.type === "rotation") return vr(i, t, s, r, n);
|
|
3516
|
+
const o = yr[n.type ?? "x,y"], a = () => {
|
|
3517
3517
|
const p = t.appliedValue(s, "x"), g = t.appliedValue(s, "y");
|
|
3518
3518
|
return { x: typeof p == "number" ? p : 0, y: typeof g == "number" ? g : 0 };
|
|
3519
|
-
}, c = typeof n.bounds == "string" ? t.query(n.bounds) : pe(n.bounds) ? n.bounds : null, h = { bounds: (!c && n.bounds && !pe(n.bounds) ? n.bounds : void 0) ?? (c ?
|
|
3519
|
+
}, c = typeof n.bounds == "string" ? t.query(n.bounds) : pe(n.bounds) ? n.bounds : null, h = { bounds: (!c && n.bounds && !pe(n.bounds) ? n.bounds : void 0) ?? (c ? Ze(r, c) : void 0) };
|
|
3520
3520
|
let f = null;
|
|
3521
3521
|
const u = () => {
|
|
3522
3522
|
f?.kill(), f = null;
|
|
3523
3523
|
}, d = (p) => {
|
|
3524
|
-
const g = n.inertia === !0 ? {} : n.inertia, y = g.friction ?? (g.resistance !== void 0 ?
|
|
3524
|
+
const g = n.inertia === !0 ? {} : n.inertia, y = g.friction ?? (g.resistance !== void 0 ? Se(g.resistance) : 4), v = a(), b = h.bounds ?? {};
|
|
3525
3525
|
let T, w;
|
|
3526
3526
|
const k = g.end;
|
|
3527
3527
|
if (Array.isArray(k)) {
|
|
@@ -3530,10 +3530,10 @@ function mr(i, t, e, n = {}) {
|
|
|
3530
3530
|
for (const x of k)
|
|
3531
3531
|
Math.hypot(x.x - _, x.y - B) < Math.hypot(A.x - _, A.y - B) && (A = x);
|
|
3532
3532
|
A && (T = [A.x], w = [A.y]);
|
|
3533
|
-
} else typeof k == "number" ? (T = k, w = k) : k && (T =
|
|
3533
|
+
} else typeof k == "number" ? (T = k, w = k) : k && (T = Qe(k.x), w = Qe(k.y));
|
|
3534
3534
|
const S = {};
|
|
3535
3535
|
o !== "y" && (S.x = { velocity: p.x, friction: y, min: b.minX, max: b.maxX, end: T }), o !== "x" && (S.y = { velocity: p.y, friction: y, min: b.minY, max: b.maxY, end: w }), f = i.to(r, { inertia: S, onComplete: () => n.onThrowComplete?.() });
|
|
3536
|
-
}, m = new
|
|
3536
|
+
}, m = new Wi({
|
|
3537
3537
|
target: r,
|
|
3538
3538
|
axis: o,
|
|
3539
3539
|
snap: n.snap,
|
|
@@ -3542,7 +3542,7 @@ function mr(i, t, e, n = {}) {
|
|
|
3542
3542
|
},
|
|
3543
3543
|
getPosition: a,
|
|
3544
3544
|
onPress: () => {
|
|
3545
|
-
u(), c && (h.bounds =
|
|
3545
|
+
u(), c && (h.bounds = Ze(r, c)), n.onPress?.();
|
|
3546
3546
|
},
|
|
3547
3547
|
onDrag: (p) => {
|
|
3548
3548
|
t.apply(s, o === "x" ? { x: p.x } : o === "y" ? { y: p.y } : { x: p.x, y: p.y }), n.onDrag?.(p);
|
|
@@ -3566,7 +3566,7 @@ function mr(i, t, e, n = {}) {
|
|
|
3566
3566
|
}
|
|
3567
3567
|
};
|
|
3568
3568
|
}
|
|
3569
|
-
function
|
|
3569
|
+
function vr(i, t, e, n, s) {
|
|
3570
3570
|
const r = typeof s.bounds == "object" && s.bounds !== null && !pe(s.bounds) ? s.bounds : {}, o = () => {
|
|
3571
3571
|
const b = t.appliedValue(e, "rotate");
|
|
3572
3572
|
return typeof b == "number" ? b : 0;
|
|
@@ -3593,7 +3593,7 @@ function gr(i, t, e, n, s) {
|
|
|
3593
3593
|
l = !1;
|
|
3594
3594
|
const T = m[0], w = m[m.length - 1], k = T && w ? (w.time - T.time) / 1e3 : 0, S = k > 0 ? (w.rotation - T.rotation) / k : 0;
|
|
3595
3595
|
if (s.onRelease?.({ x: S, y: 0 }), !s.inertia) return;
|
|
3596
|
-
const _ = s.inertia === !0 ? {} : s.inertia, B = _.friction ?? (_.resistance !== void 0 ?
|
|
3596
|
+
const _ = s.inertia === !0 ? {} : s.inertia, B = _.friction ?? (_.resistance !== void 0 ? Se(_.resistance) : 4), A = typeof _.end == "number" || Array.isArray(_.end) ? _.end : void 0;
|
|
3597
3597
|
c = i.to(n, {
|
|
3598
3598
|
inertia: {
|
|
3599
3599
|
rotate: {
|
|
@@ -3618,28 +3618,28 @@ function gr(i, t, e, n, s) {
|
|
|
3618
3618
|
}
|
|
3619
3619
|
};
|
|
3620
3620
|
}
|
|
3621
|
-
const
|
|
3622
|
-
function
|
|
3621
|
+
const wr = { opacity: 0, scale: 0.6 };
|
|
3622
|
+
function Tr(i) {
|
|
3623
3623
|
const t = i.getBoundingClientRect();
|
|
3624
3624
|
return t.width === 0 && t.height === 0 ? null : { cx: t.left + t.width / 2, cy: t.top + t.height / 2, width: t.width, height: t.height };
|
|
3625
3625
|
}
|
|
3626
|
-
function
|
|
3626
|
+
function Je(i) {
|
|
3627
3627
|
const t = Ot(i);
|
|
3628
3628
|
return t.width === 0 && t.height === 0 ? null : { cx: t.left + t.width / 2, cy: t.top + t.height / 2, width: t.width, height: t.height };
|
|
3629
3629
|
}
|
|
3630
3630
|
function me(i, t) {
|
|
3631
3631
|
const n = i.resolveTargets(t).map((o) => i.elementFor(o)).filter((o) => !!o), s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
3632
3632
|
for (const o of n) {
|
|
3633
|
-
const a =
|
|
3633
|
+
const a = Tr(o);
|
|
3634
3634
|
s.set(o, a);
|
|
3635
|
-
const c =
|
|
3635
|
+
const c = ji(o);
|
|
3636
3636
|
a && c !== void 0 && !r.has(c) && r.set(c, { element: o, box: a });
|
|
3637
3637
|
}
|
|
3638
3638
|
return { elements: n, boxes: s, ids: r };
|
|
3639
3639
|
}
|
|
3640
3640
|
const ne = /* @__PURE__ */ new WeakMap();
|
|
3641
3641
|
function ge(i, t, e, n = {}) {
|
|
3642
|
-
const s = n.duration ?? 0.6, r = n.ease ?? "power2.inOut", o = n.stagger ?? 0, a = n.scale !== !1, c = n.enter === void 0 ?
|
|
3642
|
+
const s = n.duration ?? 0.6, r = n.ease ?? "power2.inOut", o = n.stagger ?? 0, a = n.scale !== !1, c = n.enter === void 0 ? wr : n.enter, l = new Set(e.elements);
|
|
3643
3643
|
if (n.targets !== void 0)
|
|
3644
3644
|
for (const d of i.resolveTargets(n.targets)) {
|
|
3645
3645
|
const m = i.elementFor(d);
|
|
@@ -3650,17 +3650,17 @@ function ge(i, t, e, n = {}) {
|
|
|
3650
3650
|
), f = t({ onComplete: n.onComplete });
|
|
3651
3651
|
let u = 0;
|
|
3652
3652
|
for (const d of h) {
|
|
3653
|
-
const m =
|
|
3653
|
+
const m = Je(d);
|
|
3654
3654
|
if (!m) continue;
|
|
3655
3655
|
let p = e.boxes.get(d) ?? null, g;
|
|
3656
|
-
const y =
|
|
3656
|
+
const y = ji(d), v = !p && y !== void 0 ? e.ids.get(y) : void 0;
|
|
3657
3657
|
v && v.element !== d && (p = v.box, g = v.element);
|
|
3658
3658
|
const [b] = i.resolveTargets(d);
|
|
3659
3659
|
ne.get(d)?.timeline.removeTracks({ target: b });
|
|
3660
3660
|
const T = u * o;
|
|
3661
3661
|
if (!p) {
|
|
3662
3662
|
if (c === !1) continue;
|
|
3663
|
-
f.fromTo(d, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...c }, { ...
|
|
3663
|
+
f.fromTo(d, { x: 0, y: 0, scaleX: 1, scaleY: 1, ...c }, { ...Ui(c), x: 0, y: 0, scaleX: 1, scaleY: 1, duration: s, ease: r, delay: T }, 0), ne.set(d, f), u++;
|
|
3664
3664
|
continue;
|
|
3665
3665
|
}
|
|
3666
3666
|
const w = p.cx - m.cx, k = p.cy - m.cy, S = a ? p.width / m.width : 1, _ = a ? p.height / m.height : 1;
|
|
@@ -3678,20 +3678,20 @@ function ge(i, t, e, n = {}) {
|
|
|
3678
3678
|
{ x: w, y: k, scaleX: S, scaleY: _, ...A && { opacity: 0 } },
|
|
3679
3679
|
{ x: 0, y: 0, scaleX: 1, scaleY: 1, ...A && { opacity: 1 }, duration: s, ease: r, delay: T },
|
|
3680
3680
|
0
|
|
3681
|
-
), A && g &&
|
|
3681
|
+
), A && g && Je(g) && f.fromTo(g, { opacity: 1 }, { opacity: 0, duration: s, ease: r, delay: T }, 0), ne.set(d, f), u++;
|
|
3682
3682
|
}
|
|
3683
3683
|
return f;
|
|
3684
3684
|
}
|
|
3685
|
-
function
|
|
3685
|
+
function ji(i) {
|
|
3686
3686
|
return i.dataset?.flipId;
|
|
3687
3687
|
}
|
|
3688
|
-
function
|
|
3688
|
+
function Ui(i) {
|
|
3689
3689
|
const t = {};
|
|
3690
3690
|
for (const e of Object.keys(i))
|
|
3691
3691
|
t[e] = e === "opacity" || e.startsWith("scale") ? 1 : 0;
|
|
3692
3692
|
return t;
|
|
3693
3693
|
}
|
|
3694
|
-
function
|
|
3694
|
+
function kr(i, t = {}) {
|
|
3695
3695
|
const e = new Set((t.type ?? "chars,words,lines").split(",").map((p) => p.trim())), n = {
|
|
3696
3696
|
chars: t.charsClass ?? "char",
|
|
3697
3697
|
words: t.wordsClass ?? "word",
|
|
@@ -3710,7 +3710,7 @@ function vr(i, t = {}) {
|
|
|
3710
3710
|
}, u = () => {
|
|
3711
3711
|
const p = { chars: [], words: [], lines: [], masks: [] };
|
|
3712
3712
|
for (const { element: g } of r) {
|
|
3713
|
-
const y = (g.textContent ?? "").replace(/\s+/g, " ").trim(), v =
|
|
3713
|
+
const y = (g.textContent ?? "").replace(/\s+/g, " ").trim(), v = xr(g, n.words), b = e.has("chars") ? v.flatMap((k) => Sr(k, n.chars)) : [], T = e.has("lines") ? Ar(g, v, n.lines) : [];
|
|
3714
3714
|
if (s) {
|
|
3715
3715
|
!g.hasAttribute("aria-label") && y && g.setAttribute("aria-label", y);
|
|
3716
3716
|
for (const k of v) k.setAttribute("aria-hidden", "true");
|
|
@@ -3719,7 +3719,7 @@ function vr(i, t = {}) {
|
|
|
3719
3719
|
else for (const k of v) k.removeAttribute("class");
|
|
3720
3720
|
p.chars.push(...b), p.lines.push(...T);
|
|
3721
3721
|
const w = t.mask === "lines" ? T : t.mask === "words" ? v : t.mask === "chars" ? b : [];
|
|
3722
|
-
for (const k of w) p.masks.push(
|
|
3722
|
+
for (const k of w) p.masks.push(Er(k, `${n[t.mask]}-mask`));
|
|
3723
3723
|
}
|
|
3724
3724
|
o = p;
|
|
3725
3725
|
}, d = {
|
|
@@ -3771,7 +3771,7 @@ function vr(i, t = {}) {
|
|
|
3771
3771
|
}
|
|
3772
3772
|
return d;
|
|
3773
3773
|
}
|
|
3774
|
-
function
|
|
3774
|
+
function xr(i, t) {
|
|
3775
3775
|
const e = i.ownerDocument, n = [], s = e.createTreeWalker(
|
|
3776
3776
|
i,
|
|
3777
3777
|
4
|
|
@@ -3794,18 +3794,18 @@ function wr(i, t) {
|
|
|
3794
3794
|
}
|
|
3795
3795
|
return n;
|
|
3796
3796
|
}
|
|
3797
|
-
function
|
|
3798
|
-
const e = i.ownerDocument, n =
|
|
3797
|
+
function Sr(i, t) {
|
|
3798
|
+
const e = i.ownerDocument, n = Mr(i.textContent ?? "").map((s) => {
|
|
3799
3799
|
const r = e.createElement("span");
|
|
3800
3800
|
return r.className = t, r.style.display = "inline-block", r.textContent = s, r;
|
|
3801
3801
|
});
|
|
3802
3802
|
return i.replaceChildren(...n), n;
|
|
3803
3803
|
}
|
|
3804
|
-
function
|
|
3804
|
+
function Mr(i) {
|
|
3805
3805
|
const t = Intl.Segmenter;
|
|
3806
3806
|
return t ? Array.from(new t(void 0, { granularity: "grapheme" }).segment(i), (e) => e.segment) : Array.from(i);
|
|
3807
3807
|
}
|
|
3808
|
-
function
|
|
3808
|
+
function Ar(i, t, e) {
|
|
3809
3809
|
const n = i.ownerDocument, s = new Map(t.map((m) => [m, m.getBoundingClientRect()])), r = [], o = (m) => {
|
|
3810
3810
|
for (const p of Array.from(m.childNodes))
|
|
3811
3811
|
p.nodeType === 3 || s.has(p) || p.tagName === "BR" ? r.push(p) : o(p);
|
|
@@ -3837,11 +3837,11 @@ function xr(i, t, e) {
|
|
|
3837
3837
|
}
|
|
3838
3838
|
return i.replaceChildren(...a), a;
|
|
3839
3839
|
}
|
|
3840
|
-
function
|
|
3840
|
+
function Er(i, t) {
|
|
3841
3841
|
const e = i.ownerDocument.createElement("span");
|
|
3842
3842
|
return e.className = t, e.style.display = i.style.display === "block" ? "block" : "inline-block", e.style.overflow = "clip", e.style.paddingBottom = "0.12em", e.style.marginBottom = "-0.12em", i.replaceWith(e), e.appendChild(i), e;
|
|
3843
3843
|
}
|
|
3844
|
-
const
|
|
3844
|
+
const ti = {
|
|
3845
3845
|
top: 0,
|
|
3846
3846
|
left: 0,
|
|
3847
3847
|
start: 0,
|
|
@@ -3852,15 +3852,15 @@ const Je = {
|
|
|
3852
3852
|
right: 1,
|
|
3853
3853
|
end: 1
|
|
3854
3854
|
};
|
|
3855
|
-
function
|
|
3855
|
+
function ei(i) {
|
|
3856
3856
|
const t = i.trim().toLowerCase();
|
|
3857
|
-
if (t in
|
|
3857
|
+
if (t in ti) return ti[t];
|
|
3858
3858
|
if (t.endsWith("%")) {
|
|
3859
3859
|
const e = Number.parseFloat(t.slice(0, -1));
|
|
3860
3860
|
return Number.isNaN(e) ? void 0 : e / 100;
|
|
3861
3861
|
}
|
|
3862
3862
|
}
|
|
3863
|
-
function
|
|
3863
|
+
function Hi(i) {
|
|
3864
3864
|
if (typeof i == "number")
|
|
3865
3865
|
return { elementFraction: 0, viewportFraction: 0, offsetPx: 0, absolutePx: i };
|
|
3866
3866
|
let t = 0;
|
|
@@ -3872,7 +3872,7 @@ function Ui(i) {
|
|
|
3872
3872
|
offsetPx: 0,
|
|
3873
3873
|
absolutePx: Number.parseFloat(n[0]) + t
|
|
3874
3874
|
};
|
|
3875
|
-
const s = n[0] !== void 0 ?
|
|
3875
|
+
const s = n[0] !== void 0 ? ei(n[0]) : void 0, r = n[1] !== void 0 ? ei(n[1]) : void 0;
|
|
3876
3876
|
return {
|
|
3877
3877
|
elementFraction: s ?? 0,
|
|
3878
3878
|
viewportFraction: r ?? 0,
|
|
@@ -3880,22 +3880,22 @@ function Ui(i) {
|
|
|
3880
3880
|
};
|
|
3881
3881
|
}
|
|
3882
3882
|
function Tt(i, t, e) {
|
|
3883
|
-
const n =
|
|
3883
|
+
const n = Hi(e), s = n.absolutePx !== void 0 ? i.top + n.absolutePx : i.top + i.height * n.elementFraction, r = t * n.viewportFraction;
|
|
3884
3884
|
return s - r + n.offsetPx;
|
|
3885
3885
|
}
|
|
3886
|
-
function
|
|
3886
|
+
function ga(i, t, e, n) {
|
|
3887
3887
|
const s = Tt(i, t, e), o = Tt(i, t, n) - s;
|
|
3888
|
-
return o <= 0 ? s <= 0 ? 1 : 0 :
|
|
3888
|
+
return o <= 0 ? s <= 0 ? 1 : 0 : zi(-s / o);
|
|
3889
3889
|
}
|
|
3890
|
-
function
|
|
3890
|
+
function zi(i) {
|
|
3891
3891
|
return i < 0 ? 0 : i > 1 ? 1 : i === 0 ? 0 : i;
|
|
3892
3892
|
}
|
|
3893
|
-
function
|
|
3893
|
+
function Pr(i, t, e, n) {
|
|
3894
3894
|
if (e <= 0) return t;
|
|
3895
3895
|
const s = 1 - Math.exp(-(n / 1e3) / e);
|
|
3896
3896
|
return i + (t - i) * s;
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3898
|
+
function ii(i, t, e, n, s) {
|
|
3899
3899
|
const r = (h) => Tt({ top: i + s(h), bottom: i + s(h) + t, height: t }, e, n), o = r(0), a = r(1);
|
|
3900
3900
|
if (Math.sign(o) === Math.sign(a) || o === 0 || a === 0)
|
|
3901
3901
|
return o === 0 ? 0 : a === 0 ? 1 : Math.abs(o) < Math.abs(a) ? 0 : 1;
|
|
@@ -3906,7 +3906,7 @@ function ei(i, t, e, n, s) {
|
|
|
3906
3906
|
}
|
|
3907
3907
|
return (c + l) / 2;
|
|
3908
3908
|
}
|
|
3909
|
-
class
|
|
3909
|
+
class Cr {
|
|
3910
3910
|
timeline;
|
|
3911
3911
|
trigger;
|
|
3912
3912
|
behaviour;
|
|
@@ -3953,11 +3953,11 @@ class Ar {
|
|
|
3953
3953
|
this.options.onLeave?.(), this.behaviour === "reset" && this.timeline.stop();
|
|
3954
3954
|
}
|
|
3955
3955
|
}
|
|
3956
|
-
function
|
|
3957
|
-
const t = new
|
|
3956
|
+
function ya(i) {
|
|
3957
|
+
const t = new Cr(i);
|
|
3958
3958
|
return t.start(), t;
|
|
3959
3959
|
}
|
|
3960
|
-
class
|
|
3960
|
+
class _r {
|
|
3961
3961
|
element;
|
|
3962
3962
|
spacer;
|
|
3963
3963
|
saved;
|
|
@@ -3986,12 +3986,12 @@ class Er {
|
|
|
3986
3986
|
this.element.style.position = this.saved.position, this.element.style.top = this.saved.top, this.element.style.left = this.saved.left, this.spacer.parentNode && this.spacer.replaceWith(this.element);
|
|
3987
3987
|
}
|
|
3988
3988
|
}
|
|
3989
|
-
const
|
|
3990
|
-
function
|
|
3989
|
+
const Ir = 0.15;
|
|
3990
|
+
function Rr(i) {
|
|
3991
3991
|
return typeof i == "object" && !Array.isArray(i) ? i : { snapTo: i };
|
|
3992
3992
|
}
|
|
3993
|
-
function
|
|
3994
|
-
const n = Ct(i + t *
|
|
3993
|
+
function Lr(i, t, e) {
|
|
3994
|
+
const n = Ct(i + t * Ir);
|
|
3995
3995
|
if (typeof e == "function") return Ct(e(n));
|
|
3996
3996
|
if (typeof e == "number")
|
|
3997
3997
|
return e <= 0 ? i : Ct(Math.round(n / e) * e);
|
|
@@ -4001,13 +4001,13 @@ function _r(i, t, e) {
|
|
|
4001
4001
|
Math.abs(r - n) < Math.abs(s - n) && (s = r);
|
|
4002
4002
|
return Ct(s);
|
|
4003
4003
|
}
|
|
4004
|
-
function
|
|
4004
|
+
function $r(i, t, e) {
|
|
4005
4005
|
const n = i.duration ?? { min: 0.2, max: 0.8 };
|
|
4006
4006
|
if (typeof n == "number") return n;
|
|
4007
4007
|
const s = Math.min(1, Math.abs(t) / Math.max(1, e));
|
|
4008
4008
|
return n.min + (n.max - n.min) * s;
|
|
4009
4009
|
}
|
|
4010
|
-
class
|
|
4010
|
+
class Fr {
|
|
4011
4011
|
rafId = null;
|
|
4012
4012
|
cancelEvents = ["wheel", "touchstart", "pointerdown", "keydown"];
|
|
4013
4013
|
onInterrupt = () => this.cancel();
|
|
@@ -4043,7 +4043,7 @@ class Ir {
|
|
|
4043
4043
|
function Ct(i) {
|
|
4044
4044
|
return Math.max(0, Math.min(1, i));
|
|
4045
4045
|
}
|
|
4046
|
-
class
|
|
4046
|
+
class Dr {
|
|
4047
4047
|
options;
|
|
4048
4048
|
scroller;
|
|
4049
4049
|
nodes = [];
|
|
@@ -4084,22 +4084,22 @@ class Lr {
|
|
|
4084
4084
|
for (const t of this.nodes.splice(0)) t.remove();
|
|
4085
4085
|
}
|
|
4086
4086
|
}
|
|
4087
|
-
const
|
|
4087
|
+
const Br = 120, st = [], lt = /* @__PURE__ */ new Set();
|
|
4088
4088
|
let se = !1;
|
|
4089
|
-
const
|
|
4089
|
+
const Or = () => {
|
|
4090
4090
|
se || lt.size === 0 || (se = !0, queueMicrotask(() => {
|
|
4091
4091
|
se = !1;
|
|
4092
4092
|
for (const i of lt) i.afterRefresh();
|
|
4093
4093
|
}));
|
|
4094
|
-
},
|
|
4094
|
+
}, Gi = () => {
|
|
4095
4095
|
for (const i of lt) i.beforeRefresh();
|
|
4096
4096
|
for (const i of st) i.refresh();
|
|
4097
4097
|
for (const i of lt) i.afterRefresh();
|
|
4098
4098
|
};
|
|
4099
4099
|
let rt = { width: 0, height: 0 };
|
|
4100
|
-
const
|
|
4100
|
+
const ni = () => {
|
|
4101
4101
|
const i = window.innerWidth, t = window.innerHeight, e = i === rt.width && t !== rt.height, n = Math.abs(t - rt.height) < rt.height * 0.25, s = typeof navigator < "u" && (navigator.maxTouchPoints ?? 0) > 0;
|
|
4102
|
-
e && n && s || (rt = { width: i, height: t },
|
|
4102
|
+
e && n && s || (rt = { width: i, height: t }, Gi());
|
|
4103
4103
|
};
|
|
4104
4104
|
class jt {
|
|
4105
4105
|
timeline;
|
|
@@ -4131,16 +4131,16 @@ class jt {
|
|
|
4131
4131
|
markers = null;
|
|
4132
4132
|
markerGeometry = null;
|
|
4133
4133
|
constructor(t) {
|
|
4134
|
-
this.timeline = t.timeline, this.options = t, this.snapper = new
|
|
4134
|
+
this.timeline = t.timeline, this.options = t, this.snapper = new Fr((e) => this.scrollTo(e), typeof window < "u" ? window : null);
|
|
4135
4135
|
}
|
|
4136
4136
|
start() {
|
|
4137
4137
|
if (this.running) return;
|
|
4138
4138
|
this.running = !0, this.timeline?.pause();
|
|
4139
4139
|
const t = this.options.pin === !0 ? this.options.trigger : this.options.pin || null;
|
|
4140
|
-
t && !this.options.container && (this.pin = new
|
|
4140
|
+
t && !this.options.container && (this.pin = new _r(t, { axis: this.options.horizontal ? "x" : "y", spacing: this.options.pinSpacing !== !1 })), this.options.markers && !this.options.horizontal && typeof document < "u" && (this.markers = new Dr(document, this.options.scroller ?? null, this.options.markers)), this.scrollTarget()?.addEventListener("scroll", this.onScroll, { passive: !0 }), st.length === 0 && typeof window < "u" && (rt = { width: window.innerWidth, height: window.innerHeight }, window.addEventListener("resize", ni, { passive: !0 })), st.push(this), this.refresh();
|
|
4141
4141
|
}
|
|
4142
4142
|
stop() {
|
|
4143
|
-
this.running && (this.running = !1, this.scrollTarget()?.removeEventListener("scroll", this.onScroll), st.splice(st.indexOf(this), 1), st.length === 0 && typeof window < "u" && window.removeEventListener("resize",
|
|
4143
|
+
this.running && (this.running = !1, this.scrollTarget()?.removeEventListener("scroll", this.onScroll), st.splice(st.indexOf(this), 1), st.length === 0 && typeof window < "u" && window.removeEventListener("resize", ni), this.stopSmoothing(), this.idleTimer !== null && clearTimeout(this.idleTimer), this.idleTimer = null, this.snapTimer !== null && clearTimeout(this.snapTimer), this.snapTimer = null, this.snapper.cancel());
|
|
4144
4144
|
}
|
|
4145
4145
|
/** Stop, and remove any pin spacer. */
|
|
4146
4146
|
destroy() {
|
|
@@ -4158,7 +4158,7 @@ class jt {
|
|
|
4158
4158
|
* layout change a resize would not catch (images or fonts loading).
|
|
4159
4159
|
*/
|
|
4160
4160
|
static refreshAll() {
|
|
4161
|
-
|
|
4161
|
+
Gi();
|
|
4162
4162
|
}
|
|
4163
4163
|
/** Be told around every re-measure; returns a function that stops it. */
|
|
4164
4164
|
static onRefresh(t) {
|
|
@@ -4194,7 +4194,7 @@ class jt {
|
|
|
4194
4194
|
}
|
|
4195
4195
|
this.markerGeometry = this.markers ? this.markersFor(n) : null;
|
|
4196
4196
|
}
|
|
4197
|
-
this.markers && this.markerGeometry && this.markers.place(this.markerGeometry, t), this.lastScroll = null, this.updateFrom(t, !this.measured), this.measured = !0,
|
|
4197
|
+
this.markers && this.markerGeometry && this.markers.place(this.markerGeometry, t), this.lastScroll = null, this.updateFrom(t, !this.measured), this.measured = !0, Or();
|
|
4198
4198
|
}
|
|
4199
4199
|
/** Same as `refresh()`. */
|
|
4200
4200
|
sample() {
|
|
@@ -4212,7 +4212,7 @@ class jt {
|
|
|
4212
4212
|
updateFrom(t, e) {
|
|
4213
4213
|
this.trackVelocity(t), this.markers && this.markerGeometry && this.markers.follow(this.markerGeometry, t);
|
|
4214
4214
|
const n = this.endPx - this.startPx, s = this.zone;
|
|
4215
|
-
this.targetProgress = n > 0 ?
|
|
4215
|
+
this.targetProgress = n > 0 ? zi((t - this.startPx) / n) : t >= this.startPx ? 1 : 0, this.zone = n > 0 ? t <= this.startPx ? "before" : t >= this.endPx ? "after" : "active" : t >= this.startPx ? "after" : "before", this.fireBoundaryCallbacks(s, this.zone), e || this.smoothing() <= 0 ? (this.displayProgress = this.targetProgress, this.applyProgress()) : (this.emitUpdate(), this.startSmoothing());
|
|
4216
4216
|
}
|
|
4217
4217
|
/** Seconds of smoothing, or 0 for exact tracking. */
|
|
4218
4218
|
smoothing() {
|
|
@@ -4240,7 +4240,7 @@ class jt {
|
|
|
4240
4240
|
const e = typeof performance < "u" ? performance.now() : Date.now();
|
|
4241
4241
|
this.lastScroll !== null && e > this.lastScrollTime && t !== this.lastScroll && (this.velocityPxPerSecond = (t - this.lastScroll) / (e - this.lastScrollTime) * 1e3), (this.lastScroll === null || t !== this.lastScroll) && (this.lastScroll = t, this.lastScrollTime = e), !(this.velocityPxPerSecond === 0 || typeof setTimeout > "u") && (this.idleTimer !== null && clearTimeout(this.idleTimer), this.idleTimer = setTimeout(() => {
|
|
4242
4242
|
this.idleTimer = null, this.releaseVelocity = this.velocityPxPerSecond, this.velocityPxPerSecond = 0, this.emitUpdate(), this.scheduleSnap();
|
|
4243
|
-
},
|
|
4243
|
+
}, Br));
|
|
4244
4244
|
}
|
|
4245
4245
|
/**
|
|
4246
4246
|
* Emit enter/leave callbacks as the scroll position moves between zones. A jump
|
|
@@ -4256,12 +4256,12 @@ class jt {
|
|
|
4256
4256
|
scheduleSnap() {
|
|
4257
4257
|
const t = this.options.snap;
|
|
4258
4258
|
if (t === void 0 || this.snapper.active) return;
|
|
4259
|
-
const e =
|
|
4259
|
+
const e = Rr(t), n = () => {
|
|
4260
4260
|
this.snapTimer = null;
|
|
4261
4261
|
const s = this.endPx - this.startPx, r = this.scrollPosition();
|
|
4262
4262
|
if (!this.running || s <= 0 || r <= this.startPx || r >= this.endPx) return;
|
|
4263
|
-
const o = (r - this.startPx) / s, a = this.startPx +
|
|
4264
|
-
Math.abs(a - r) < 1 || this.snapper.animate(r, a,
|
|
4263
|
+
const o = (r - this.startPx) / s, a = this.startPx + Lr(o, this.releaseVelocity / s, e.snapTo) * s;
|
|
4264
|
+
Math.abs(a - r) < 1 || this.snapper.animate(r, a, $r(e, a - r, this.viewportHeight()), e.ease);
|
|
4265
4265
|
};
|
|
4266
4266
|
e.delay ? this.snapTimer = setTimeout(n, e.delay * 1e3) : n();
|
|
4267
4267
|
}
|
|
@@ -4277,10 +4277,10 @@ class jt {
|
|
|
4277
4277
|
measureInContainer(t) {
|
|
4278
4278
|
const e = this.options.trigger;
|
|
4279
4279
|
if (typeof e?.getBoundingClientRect != "function") return;
|
|
4280
|
-
const n = e.getBoundingClientRect(), s = this.options.scroller?.getBoundingClientRect?.().left ?? 0, r = this.options.scroller ? this.options.scroller.clientWidth : typeof window < "u" ? window.innerWidth : 0, o = n.left - s - t.shiftAt(t.progress()), { start: a, end: c } = t.range(), l = (d) => a + d * (c - a), h =
|
|
4280
|
+
const n = e.getBoundingClientRect(), s = this.options.scroller?.getBoundingClientRect?.().left ?? 0, r = this.options.scroller ? this.options.scroller.clientWidth : typeof window < "u" ? window.innerWidth : 0, o = n.left - s - t.shiftAt(t.progress()), { start: a, end: c } = t.range(), l = (d) => a + d * (c - a), h = ii(o, n.width, r, gt(this.options.start) ?? "left right", t.shiftAt);
|
|
4281
4281
|
this.startPx = l(h);
|
|
4282
4282
|
const f = gt(this.options.end) ?? "right left", u = typeof f == "string" ? f.trim().match(/^\+=\s*(-?[\d.]+)\s*(px)?$/) : null;
|
|
4283
|
-
this.endPx = u ? this.startPx + Number.parseFloat(u[1]) : l(
|
|
4283
|
+
this.endPx = u ? this.startPx + Number.parseFloat(u[1]) : l(ii(o, n.width, r, f, t.shiftAt)), this.markerGeometry = null;
|
|
4284
4284
|
}
|
|
4285
4285
|
/** Where the markers go: the element points on the page, and the viewport lines they meet. */
|
|
4286
4286
|
markersFor(t) {
|
|
@@ -4288,7 +4288,7 @@ class jt {
|
|
|
4288
4288
|
const a = gt(r) ?? o;
|
|
4289
4289
|
if (typeof a == "number") return 0;
|
|
4290
4290
|
if (/^\s*\+=/.test(a)) return;
|
|
4291
|
-
const c =
|
|
4291
|
+
const c = Hi(a);
|
|
4292
4292
|
return t * c.viewportFraction - c.offsetPx;
|
|
4293
4293
|
}, n = e(this.options.start, "top bottom") ?? 0, s = e(this.options.end, "bottom top") ?? n;
|
|
4294
4294
|
return {
|
|
@@ -4303,7 +4303,7 @@ class jt {
|
|
|
4303
4303
|
const t = (e) => {
|
|
4304
4304
|
if (this.rafId = null, !this.running) return;
|
|
4305
4305
|
const n = this.lastFrameTime === null ? 16.67 : e - this.lastFrameTime;
|
|
4306
|
-
this.lastFrameTime = e, this.displayProgress =
|
|
4306
|
+
this.lastFrameTime = e, this.displayProgress = Pr(this.displayProgress, this.targetProgress, this.smoothing(), n);
|
|
4307
4307
|
const s = Math.abs(this.targetProgress - this.displayProgress) < 1e-4;
|
|
4308
4308
|
s && (this.displayProgress = this.targetProgress), this.applyProgress(), s ? this.lastFrameTime = null : this.rafId = requestAnimationFrame(t);
|
|
4309
4309
|
};
|
|
@@ -4344,12 +4344,12 @@ class jt {
|
|
|
4344
4344
|
function gt(i) {
|
|
4345
4345
|
return typeof i == "function" ? i() : i;
|
|
4346
4346
|
}
|
|
4347
|
-
function
|
|
4347
|
+
function ba(i) {
|
|
4348
4348
|
const t = new jt(i);
|
|
4349
4349
|
return t.start(), t;
|
|
4350
4350
|
}
|
|
4351
|
-
const re = /* @__PURE__ */ new Set(),
|
|
4352
|
-
class
|
|
4351
|
+
const re = /* @__PURE__ */ new Set(), Nr = 16, si = 0.5, qr = 2;
|
|
4352
|
+
class ri {
|
|
4353
4353
|
options;
|
|
4354
4354
|
frames;
|
|
4355
4355
|
running = !1;
|
|
@@ -4451,13 +4451,13 @@ class si {
|
|
|
4451
4451
|
// --- input ----------------------------------------------------------------
|
|
4452
4452
|
wheel(t) {
|
|
4453
4453
|
if (this.pausedState || this.reduced || (this.options.smooth ?? 0.8) <= 0 || t.ctrlKey || Math.abs(t.deltaX) > Math.abs(t.deltaY) || this.nestedScrollerTakes(t)) return;
|
|
4454
|
-
const e = t.deltaMode === 1 ?
|
|
4454
|
+
const e = t.deltaMode === 1 ? Nr : t.deltaMode === 2 ? this.viewportHeight() : 1, n = t.deltaY * e * (this.options.wheelMultiplier ?? 1), s = this.clamp(this.target + n);
|
|
4455
4455
|
s === this.target && s === this.current || (t.preventDefault(), this.journey = null, this.target = s, this.requestFrame());
|
|
4456
4456
|
}
|
|
4457
4457
|
/** A scroll that this smoother did not write: follow it. */
|
|
4458
4458
|
nativeScroll() {
|
|
4459
4459
|
const t = this.position();
|
|
4460
|
-
this.written !== null && Math.abs(t - this.written) <=
|
|
4460
|
+
this.written !== null && Math.abs(t - this.written) <= qr || (this.written = null, this.journey = null, this.cancelFrame(), this.current = this.target = t, this.requestFrame());
|
|
4461
4461
|
}
|
|
4462
4462
|
nestedScrollerTakes(t) {
|
|
4463
4463
|
const e = this.options.scroller ?? document.documentElement;
|
|
@@ -4488,7 +4488,7 @@ class si {
|
|
|
4488
4488
|
this.current = r.from + (r.to - r.from) * r.ease(o), o >= 1 && (this.journey = null);
|
|
4489
4489
|
} else if (this.current !== this.target) {
|
|
4490
4490
|
const r = (this.options.smooth ?? 0.8) * 1e3 / 3;
|
|
4491
|
-
this.current += (this.target - this.current) * (1 - Math.exp(-e / r)), Math.abs(this.target - this.current) <
|
|
4491
|
+
this.current += (this.target - this.current) * (1 - Math.exp(-e / r)), Math.abs(this.target - this.current) < si && (this.current = this.target);
|
|
4492
4492
|
}
|
|
4493
4493
|
this.current !== n && this.write(this.current), this.velocityPxPerSecond = e > 0 ? (this.current - n) * 1e3 / e : 0;
|
|
4494
4494
|
const s = this.applyEffects(e);
|
|
@@ -4502,9 +4502,9 @@ class si {
|
|
|
4502
4502
|
let r = 0;
|
|
4503
4503
|
if (s.speed !== void 0 && (r += (n - s.centre) * (1 - s.speed)), s.lag !== void 0) {
|
|
4504
4504
|
const o = s.lag * 1e3 / 3;
|
|
4505
|
-
s.lagged = t === 0 ? n : s.lagged + (n - s.lagged) * (1 - Math.exp(-t / o)), Math.abs(n - s.lagged) <
|
|
4505
|
+
s.lagged = t === 0 ? n : s.lagged + (n - s.lagged) * (1 - Math.exp(-t / o)), Math.abs(n - s.lagged) < si ? s.lagged = n : e = !0, r += n - s.lagged;
|
|
4506
4506
|
}
|
|
4507
|
-
oe(s.element, r === 0 ? s.saved : `0 ${
|
|
4507
|
+
oe(s.element, r === 0 ? s.saved : `0 ${Yr(r)}px`), s.shift = r;
|
|
4508
4508
|
}
|
|
4509
4509
|
return e;
|
|
4510
4510
|
}
|
|
@@ -4541,10 +4541,10 @@ class si {
|
|
|
4541
4541
|
function oe(i, t) {
|
|
4542
4542
|
t ? i.style.setProperty("translate", t) : i.style.removeProperty("translate");
|
|
4543
4543
|
}
|
|
4544
|
-
function
|
|
4544
|
+
function Yr(i) {
|
|
4545
4545
|
return Math.round(i * 100) / 100;
|
|
4546
4546
|
}
|
|
4547
|
-
function
|
|
4547
|
+
function Xr(i, t) {
|
|
4548
4548
|
switch (t) {
|
|
4549
4549
|
// Play forward from wherever it is; reverse() flips a reversed timeline and plays.
|
|
4550
4550
|
// Neither restarts an animation that is already at that end.
|
|
@@ -4573,7 +4573,7 @@ function Nr(i, t) {
|
|
|
4573
4573
|
break;
|
|
4574
4574
|
}
|
|
4575
4575
|
}
|
|
4576
|
-
function
|
|
4576
|
+
function Me(i, t, e, n, s = () => {
|
|
4577
4577
|
}) {
|
|
4578
4578
|
const r = (d) => typeof d == "string" ? i.query(d) ?? void 0 : d, o = r(t.trigger) ?? n;
|
|
4579
4579
|
if (!o) {
|
|
@@ -4583,8 +4583,8 @@ function Se(i, t, e, n, s = () => {
|
|
|
4583
4583
|
const a = t.scrub === void 0 || t.scrub === !1 ? !1 : t.scrub, c = (t.toggleActions ?? "play none none none").trim().split(/\s+/);
|
|
4584
4584
|
let l = 0, h;
|
|
4585
4585
|
const f = (d, m) => () => {
|
|
4586
|
-
m?.(), e && !a &&
|
|
4587
|
-
}, u = t.containerAnimation ?
|
|
4586
|
+
m?.(), e && !a && Xr(e, c[d] ?? "none"), t.once && d === 0 && queueMicrotask(() => h.destroy());
|
|
4587
|
+
}, u = t.containerAnimation ? jr(i, t.containerAnimation, o, s) : void 0;
|
|
4588
4588
|
return h = new jt({
|
|
4589
4589
|
trigger: o,
|
|
4590
4590
|
start: t.start,
|
|
@@ -4595,7 +4595,7 @@ function Se(i, t, e, n, s = () => {
|
|
|
4595
4595
|
horizontal: t.horizontal,
|
|
4596
4596
|
pinSpacing: t.pinSpacing,
|
|
4597
4597
|
onRefresh: t.invalidateOnRefresh && e?.invalidate ? () => e.invalidate() : void 0,
|
|
4598
|
-
snap: t.snap === void 0 ? void 0 :
|
|
4598
|
+
snap: t.snap === void 0 ? void 0 : Vr(t.snap, e),
|
|
4599
4599
|
markers: t.markers,
|
|
4600
4600
|
container: u,
|
|
4601
4601
|
onUpdate: (d, m) => {
|
|
@@ -4611,8 +4611,8 @@ function Se(i, t, e, n, s = () => {
|
|
|
4611
4611
|
onLeaveBack: f(3, t.onLeaveBack)
|
|
4612
4612
|
}), e && a === !1 && e.progress(0), h.start(), i.own(h);
|
|
4613
4613
|
}
|
|
4614
|
-
function
|
|
4615
|
-
const e = (s) => s === "labels" ? (r) =>
|
|
4614
|
+
function Vr(i, t) {
|
|
4615
|
+
const e = (s) => s === "labels" ? (r) => Wr(r, t?.labelProgresses?.() ?? []) : s;
|
|
4616
4616
|
if (typeof i != "object" || Array.isArray(i)) return e(i);
|
|
4617
4617
|
const n = i.ease ? Dt(i.ease) : void 0;
|
|
4618
4618
|
return {
|
|
@@ -4622,10 +4622,10 @@ function qr(i, t) {
|
|
|
4622
4622
|
ease: n ? n.fn ?? z(n.easing) : void 0
|
|
4623
4623
|
};
|
|
4624
4624
|
}
|
|
4625
|
-
function
|
|
4625
|
+
function Wr(i, t) {
|
|
4626
4626
|
return t.reduce((e, n) => Math.abs(n - i) < Math.abs(e - i) ? n : e, t[0] ?? i);
|
|
4627
4627
|
}
|
|
4628
|
-
function
|
|
4628
|
+
function jr(i, t, e, n) {
|
|
4629
4629
|
const s = () => t.timeline.getTracks({ property: "x" }).map((r) => r.target).filter((r) => {
|
|
4630
4630
|
const o = i.elementFor(r);
|
|
4631
4631
|
return !!o && o !== e && o.contains(e);
|
|
@@ -4647,7 +4647,7 @@ function Xr(i, t, e, n) {
|
|
|
4647
4647
|
}
|
|
4648
4648
|
};
|
|
4649
4649
|
}
|
|
4650
|
-
class
|
|
4650
|
+
class Ki {
|
|
4651
4651
|
/** For contexts made by matchMedia: which named queries match */
|
|
4652
4652
|
conditions = {};
|
|
4653
4653
|
scope;
|
|
@@ -4690,7 +4690,7 @@ class Gi {
|
|
|
4690
4690
|
this.revert();
|
|
4691
4691
|
}
|
|
4692
4692
|
}
|
|
4693
|
-
class
|
|
4693
|
+
class Ur {
|
|
4694
4694
|
host;
|
|
4695
4695
|
scope;
|
|
4696
4696
|
entries = [];
|
|
@@ -4730,11 +4730,11 @@ class Vr {
|
|
|
4730
4730
|
for (const [o, a] of t.queries) e[o] = a.matches;
|
|
4731
4731
|
const n = Object.values(e).some(Boolean), s = n ? JSON.stringify(e) : void 0;
|
|
4732
4732
|
if (s === t.key || (t.context?.revert(), t.context = void 0, t.key = s, !n)) return;
|
|
4733
|
-
const r = new
|
|
4733
|
+
const r = new Ki(this.host, this.scope);
|
|
4734
4734
|
r.conditions = e, r.add(() => t.setup(r)), t.context = r;
|
|
4735
4735
|
}
|
|
4736
4736
|
}
|
|
4737
|
-
class
|
|
4737
|
+
class Hr {
|
|
4738
4738
|
frames;
|
|
4739
4739
|
canvas;
|
|
4740
4740
|
context;
|
|
@@ -4808,23 +4808,23 @@ class Wr {
|
|
|
4808
4808
|
e.onload = () => n(!0), e.onerror = () => n(!1), e.src = this.options.url(t);
|
|
4809
4809
|
}
|
|
4810
4810
|
}
|
|
4811
|
-
const
|
|
4812
|
-
async function
|
|
4811
|
+
const zr = { opacity: 0, y: -16 }, Gr = { opacity: 0, y: 16 };
|
|
4812
|
+
async function Kr(i, t, e, n) {
|
|
4813
4813
|
const s = t.collector?.scope ?? t.root, r = s.ownerDocument ?? s, o = () => n.shared ? [...s.querySelectorAll(n.shared)] : [];
|
|
4814
4814
|
if (n.native && typeof r.startViewTransition == "function")
|
|
4815
|
-
return
|
|
4815
|
+
return Zr(r, n, o);
|
|
4816
4816
|
const a = n.duration ?? 0.35, c = n.ease ?? "power2.inOut", l = (g) => new Promise((y) => {
|
|
4817
4817
|
g(y) || y();
|
|
4818
|
-
}), h = o(), f = h.length ? me(t, h) : void 0, u = n.from !== void 0 ?
|
|
4818
|
+
}), h = o(), f = h.length ? me(t, h) : void 0, u = n.from !== void 0 ? oi(t, n.from, n.shared) : [];
|
|
4819
4819
|
if (u.length && n.leave !== !1) {
|
|
4820
|
-
const g = n.leave ??
|
|
4820
|
+
const g = n.leave ?? zr;
|
|
4821
4821
|
await l((y) => i.to(u, { ...g, duration: a, ease: c, onComplete: y }));
|
|
4822
4822
|
}
|
|
4823
4823
|
await n.update();
|
|
4824
|
-
const d = [], m = typeof n.to == "function" ? n.to() : n.to, p = m !== void 0 ?
|
|
4824
|
+
const d = [], m = typeof n.to == "function" ? n.to() : n.to, p = m !== void 0 ? oi(t, m, n.shared) : [];
|
|
4825
4825
|
if (p.length && n.enter !== !1) {
|
|
4826
|
-
const g = n.enter ??
|
|
4827
|
-
d.push(l((y) => i.fromTo(p, g, { ...
|
|
4826
|
+
const g = n.enter ?? Gr;
|
|
4827
|
+
d.push(l((y) => i.fromTo(p, g, { ...Ui(g), duration: a, ease: c, onComplete: y })));
|
|
4828
4828
|
}
|
|
4829
4829
|
if (f) {
|
|
4830
4830
|
const g = o().filter((y) => !h.includes(y));
|
|
@@ -4842,11 +4842,11 @@ async function Hr(i, t, e, n) {
|
|
|
4842
4842
|
}
|
|
4843
4843
|
await Promise.all(d);
|
|
4844
4844
|
}
|
|
4845
|
-
function
|
|
4845
|
+
function oi(i, t, e) {
|
|
4846
4846
|
const n = i.resolveTargets(t).map((s) => i.elementFor(s)).filter((s) => !!s);
|
|
4847
4847
|
return e ? n.flatMap((s) => !s.querySelector(e) && !s.matches(e) ? [s] : [...s.children].filter((r) => !r.matches(e) && !r.querySelector(e))) : n;
|
|
4848
4848
|
}
|
|
4849
|
-
async function
|
|
4849
|
+
async function Zr(i, t, e) {
|
|
4850
4850
|
const n = (a, c) => {
|
|
4851
4851
|
const l = a.dataset?.flipId;
|
|
4852
4852
|
l && a.style.setProperty("view-transition-name", c ? `tf-${l.replace(/[^\w-]/g, "-")}` : "");
|
|
@@ -4857,16 +4857,16 @@ async function zr(i, t, e) {
|
|
|
4857
4857
|
s.forEach((a) => n(a, !1)), await t.update(), r = e(), r.forEach((a) => n(a, !0));
|
|
4858
4858
|
}).finished, r.forEach((a) => n(a, !1));
|
|
4859
4859
|
}
|
|
4860
|
-
const
|
|
4860
|
+
const Qr = {
|
|
4861
4861
|
/** Register a curve from SVG path data or bezier points. Returns the name. */
|
|
4862
|
-
create: (i, t) =>
|
|
4863
|
-
},
|
|
4862
|
+
create: (i, t) => ke(i, gs(t))
|
|
4863
|
+
}, Jr = {
|
|
4864
4864
|
/** Register a bouncing ease that lands and settles on the end value. Returns the name. */
|
|
4865
|
-
create: (i, t) =>
|
|
4866
|
-
},
|
|
4865
|
+
create: (i, t) => ke(i, { fn: ys(t) })
|
|
4866
|
+
}, to = {
|
|
4867
4867
|
/** Register a wiggle that swings around the start value and returns to it. Returns the name. */
|
|
4868
|
-
create: (i, t) =>
|
|
4869
|
-
},
|
|
4868
|
+
create: (i, t) => ke(i, { fn: bs(t) })
|
|
4869
|
+
}, eo = /* @__PURE__ */ new Set([
|
|
4870
4870
|
"keyframes",
|
|
4871
4871
|
"duration",
|
|
4872
4872
|
"delay",
|
|
@@ -4885,20 +4885,20 @@ const Gr = {
|
|
|
4885
4885
|
"onRepeat",
|
|
4886
4886
|
"onReverseComplete",
|
|
4887
4887
|
"scrollTrigger"
|
|
4888
|
-
]),
|
|
4889
|
-
function
|
|
4888
|
+
]), ai = 0.5, io = "power1.inOut";
|
|
4889
|
+
function no(i) {
|
|
4890
4890
|
return i.keyframes !== void 0 && i.keyframes !== null;
|
|
4891
4891
|
}
|
|
4892
|
-
function
|
|
4892
|
+
function so(i) {
|
|
4893
4893
|
const t = i.keyframes, e = {};
|
|
4894
|
-
for (const [l, h] of Object.entries(i))
|
|
4894
|
+
for (const [l, h] of Object.entries(i)) eo.has(l) || (e[l] = h);
|
|
4895
4895
|
if (Array.isArray(t))
|
|
4896
4896
|
return t.map((l) => ({
|
|
4897
4897
|
...e,
|
|
4898
4898
|
...l,
|
|
4899
|
-
duration: l.duration ?? i.duration ??
|
|
4899
|
+
duration: l.duration ?? i.duration ?? ai
|
|
4900
4900
|
}));
|
|
4901
|
-
const n = Object.entries(t), s = i.duration ??
|
|
4901
|
+
const n = Object.entries(t), s = i.duration ?? ai, r = t.easeEach ?? i.easeEach ?? io;
|
|
4902
4902
|
if (n.length > 0 && n.every(([l]) => /^\s*-?\d+(\.\d+)?\s*%\s*$/.test(l) || l === "easeEach")) {
|
|
4903
4903
|
const l = n.filter(([u]) => u !== "easeEach").map(([u, d]) => ({ at: Number.parseFloat(u) / 100, step: d })).sort((u, d) => u.at - d.at), h = [];
|
|
4904
4904
|
let f = 0;
|
|
@@ -4917,7 +4917,7 @@ function eo(i) {
|
|
|
4917
4917
|
}
|
|
4918
4918
|
return c;
|
|
4919
4919
|
}
|
|
4920
|
-
function
|
|
4920
|
+
function ci(i, t, e, n = {}) {
|
|
4921
4921
|
const s = t.collector?.scope ?? t.root, r = typeof n.scroller == "string" ? s.querySelector(n.scroller) : n.scroller ?? null, o = {
|
|
4922
4922
|
x: r ? r.scrollLeft : window.scrollX,
|
|
4923
4923
|
y: r ? r.scrollTop : window.scrollY
|
|
@@ -4954,7 +4954,7 @@ function ai(i, t, e, n = {}) {
|
|
|
4954
4954
|
if (n.autoKill !== !1) for (const v of d) m.addEventListener(v, p, { passive: !0 });
|
|
4955
4955
|
return y;
|
|
4956
4956
|
}
|
|
4957
|
-
function
|
|
4957
|
+
function ro(i, t, e) {
|
|
4958
4958
|
const n = i.collector?.scope ?? i.root, s = typeof t == "string" ? [...n.querySelectorAll(t)] : "nodeType" in t ? [t] : Array.from(t), { interval: r = 0.1, batchMax: o, onEnter: a, onLeave: c, onEnterBack: l, onLeaveBack: h, ...f } = e, u = { onEnter: a, onLeave: c, onEnterBack: l, onLeaveBack: h }, d = { onEnter: [], onLeave: [], onEnterBack: [], onLeaveBack: [] }, m = {}, p = (y) => {
|
|
4959
4959
|
m[y] !== void 0 && clearTimeout(m[y]), m[y] = void 0;
|
|
4960
4960
|
const v = d[y].splice(0);
|
|
@@ -4966,7 +4966,7 @@ function io(i, t, e) {
|
|
|
4966
4966
|
}
|
|
4967
4967
|
};
|
|
4968
4968
|
return s.map(
|
|
4969
|
-
(y) =>
|
|
4969
|
+
(y) => Me(i, {
|
|
4970
4970
|
...f,
|
|
4971
4971
|
trigger: y,
|
|
4972
4972
|
onEnter: () => g("onEnter", y),
|
|
@@ -5008,25 +5008,25 @@ class H {
|
|
|
5008
5008
|
...n,
|
|
5009
5009
|
startValue: (s, r) => {
|
|
5010
5010
|
const o = t.objectFor(s);
|
|
5011
|
-
if (o) return
|
|
5011
|
+
if (o) return lo(o[r]);
|
|
5012
5012
|
const a = t.appliedValue(s, r);
|
|
5013
5013
|
if (a !== void 0) return a;
|
|
5014
|
-
if (r === "d") return
|
|
5014
|
+
if (r === "d") return Vi(t.elementFor(s)) ?? void 0;
|
|
5015
5015
|
if (r === "text") return t.elementFor(s)?.textContent ?? void 0;
|
|
5016
5016
|
if (r === "strokeDasharray" || r === "strokeDashoffset") {
|
|
5017
|
-
const c =
|
|
5017
|
+
const c = ui(t.elementFor(s));
|
|
5018
5018
|
if (c !== void 0) return r === "strokeDasharray" ? [c, c] : 0;
|
|
5019
5019
|
}
|
|
5020
5020
|
},
|
|
5021
5021
|
startVelocity: (s, r) => t.velocityOf(s, r),
|
|
5022
|
-
layoutColumns: (s) =>
|
|
5022
|
+
layoutColumns: (s) => hi(s.map((r) => t.elementFor(r))),
|
|
5023
5023
|
random: () => t.utils.random(0, 1)
|
|
5024
5024
|
}), this.compat.timeline.onComplete = () => {
|
|
5025
5025
|
this.finishedThisFrame = !0;
|
|
5026
5026
|
}, t.collector?.track(this), t.liveTimelines.add(this), this.autoplayPending = !n.paused && !n.scrollTrigger, n.scrollTrigger) {
|
|
5027
5027
|
const s = n.scrollTrigger;
|
|
5028
5028
|
queueMicrotask(() => {
|
|
5029
|
-
this.killed || (this.scrollDriver =
|
|
5029
|
+
this.killed || (this.scrollDriver = Me(t, s, this, this.firstElement, (r) => n.onWarning?.(r)));
|
|
5030
5030
|
});
|
|
5031
5031
|
}
|
|
5032
5032
|
this.autoplayPending && queueMicrotask(() => {
|
|
@@ -5043,7 +5043,7 @@ class H {
|
|
|
5043
5043
|
}
|
|
5044
5044
|
// --- building -----------------------------------------------------------
|
|
5045
5045
|
to(t, e, n) {
|
|
5046
|
-
return
|
|
5046
|
+
return no(e) ? this.record(() => this.keyframed(t, e, n)) : this.record(() => this.tween(t, [e], n, ([s], r, o) => this.compat.to(r, s, o)));
|
|
5047
5047
|
}
|
|
5048
5048
|
from(t, e, n) {
|
|
5049
5049
|
return this.record(() => this.tween(t, [e], n, ([s], r, o) => this.compat.from(r, s, o)));
|
|
@@ -5247,7 +5247,7 @@ class H {
|
|
|
5247
5247
|
/** Fire events and repeats between two playheads. Returns true if a pause stopped it. */
|
|
5248
5248
|
runCrossings(t, e, n) {
|
|
5249
5249
|
if (this.events.length === 0 && this.ranges.length === 0 && !this.options.onRepeat && !this.options.repeatRefresh) return !1;
|
|
5250
|
-
const s = this.events, { crossings: r, passes: o } =
|
|
5250
|
+
const s = this.events, { crossings: r, passes: o } = _i(
|
|
5251
5251
|
s.map((a) => a.time),
|
|
5252
5252
|
t,
|
|
5253
5253
|
e,
|
|
@@ -5300,7 +5300,7 @@ class H {
|
|
|
5300
5300
|
keyframed(t, e, n) {
|
|
5301
5301
|
const s = this.resolve(t);
|
|
5302
5302
|
if (!s) return;
|
|
5303
|
-
const r =
|
|
5303
|
+
const r = so(e);
|
|
5304
5304
|
if (r.length === 0) return;
|
|
5305
5305
|
const o = s.length > 1 ? de(e.stagger, this.staggerContext(s)) : void 0, a = s.map((g) => this.targetFor(g)).filter((g) => g !== void 0), c = o ? a.map((g) => [g]) : [a], l = o ? ae(s.length, o).map((g) => g / 1e3) : [0], h = this.compat.timeOf(n) / 1e3 + Bt(e.delay, 0) / 1e3;
|
|
5306
5306
|
let f = 1 / 0, u = -1 / 0;
|
|
@@ -5316,20 +5316,20 @@ class H {
|
|
|
5316
5316
|
staggerContext(t) {
|
|
5317
5317
|
return {
|
|
5318
5318
|
count: t.length,
|
|
5319
|
-
columnsFromLayout: () =>
|
|
5319
|
+
columnsFromLayout: () => hi(t.map((e) => this.stage.elementFor(e))),
|
|
5320
5320
|
random: () => this.stage.utils.random(0, 1)
|
|
5321
5321
|
};
|
|
5322
5322
|
}
|
|
5323
5323
|
buildTween(t, e, n, s) {
|
|
5324
5324
|
const r = t.map((u) => this.targetFor(u));
|
|
5325
|
-
if (!(t.length > 1 && (e.some(
|
|
5325
|
+
if (!(t.length > 1 && (e.some(co) || t.some((u) => this.stage.objectFor(u) !== void 0)))) {
|
|
5326
5326
|
const u = this.targetFor(t[0]);
|
|
5327
|
-
s(e.map((d) => this.prepare(
|
|
5327
|
+
s(e.map((d) => this.prepare(li(d, 0, u, this.stage.utils, r), t)), t, n);
|
|
5328
5328
|
return;
|
|
5329
5329
|
}
|
|
5330
5330
|
const a = e.length - 1, { stagger: c, ...l } = e[a], h = de(c, this.staggerContext(t)), f = h ? ae(t.length, h).map((u) => u / 1e3) : t.map(() => 0);
|
|
5331
5331
|
t.forEach((u, d) => {
|
|
5332
|
-
const m = d === 0 ? Bt(l.delay, 0) / 1e3 + f[0] : 0, p = d === 0 ? 0 : f[d] - f[d - 1], g = d === 0 ? n : `<${p < 0 ? "-" : "+"}${Math.abs(p).toFixed(6)}`, v = e.map((b, T) => T === a ? { ...l, delay: m } : b).map((b) => this.prepare(
|
|
5332
|
+
const m = d === 0 ? Bt(l.delay, 0) / 1e3 + f[0] : 0, p = d === 0 ? 0 : f[d] - f[d - 1], g = d === 0 ? n : `<${p < 0 ? "-" : "+"}${Math.abs(p).toFixed(6)}`, v = e.map((b, T) => T === a ? { ...l, delay: m } : b).map((b) => this.prepare(li(b, d, this.targetFor(u), this.stage.utils, r), [u]));
|
|
5333
5333
|
s(v, [u], g);
|
|
5334
5334
|
});
|
|
5335
5335
|
}
|
|
@@ -5345,7 +5345,7 @@ class H {
|
|
|
5345
5345
|
const n = (o) => this.options.onWarning?.(o), s = (o) => this.stage.query(o);
|
|
5346
5346
|
let r = t;
|
|
5347
5347
|
if (t.motionPath !== void 0) {
|
|
5348
|
-
const o =
|
|
5348
|
+
const o = lr(t.motionPath, {
|
|
5349
5349
|
query: s,
|
|
5350
5350
|
targets: e.map((a) => this.stage.elementFor(a)).filter((a) => !!a),
|
|
5351
5351
|
warn: n
|
|
@@ -5353,32 +5353,32 @@ class H {
|
|
|
5353
5353
|
r = { ...r, motionPath: o };
|
|
5354
5354
|
}
|
|
5355
5355
|
if (t.morphSVG !== void 0) {
|
|
5356
|
-
const o =
|
|
5356
|
+
const o = hr(t.morphSVG, s, n), { morphSVG: a, ...c } = r;
|
|
5357
5357
|
r = o ? { ...r, morphSVG: o } : c;
|
|
5358
5358
|
}
|
|
5359
5359
|
if (t.drawSVG !== void 0) {
|
|
5360
|
-
const o =
|
|
5360
|
+
const o = ui(this.stage.elementFor(e[0]));
|
|
5361
5361
|
if (o === void 0) {
|
|
5362
5362
|
n("gsap-compat: drawSVG needs an SVG shape with a stroke (path, line, circle…)");
|
|
5363
5363
|
const { drawSVG: a, ...c } = r;
|
|
5364
5364
|
r = c;
|
|
5365
5365
|
} else
|
|
5366
|
-
r =
|
|
5366
|
+
r = Ns(r, o);
|
|
5367
5367
|
}
|
|
5368
5368
|
return r;
|
|
5369
5369
|
}
|
|
5370
5370
|
resolve(t) {
|
|
5371
5371
|
const e = this.stage.resolveTargets(t);
|
|
5372
5372
|
if (e.length === 0) {
|
|
5373
|
-
this.options.onWarning?.(`gsap-compat: no elements found for target ${
|
|
5373
|
+
this.options.onWarning?.(`gsap-compat: no elements found for target ${ho(t)}`);
|
|
5374
5374
|
return;
|
|
5375
5375
|
}
|
|
5376
5376
|
return this.firstElement ??= e.map((n) => this.stage.elementFor(n)).find((n) => n !== void 0), e;
|
|
5377
5377
|
}
|
|
5378
5378
|
}
|
|
5379
|
-
function
|
|
5379
|
+
function oo(i = new rr()) {
|
|
5380
5380
|
const t = (r) => {
|
|
5381
|
-
const { config: o } =
|
|
5381
|
+
const { config: o } = It(r);
|
|
5382
5382
|
return new H(i, {
|
|
5383
5383
|
repeat: o.repeat,
|
|
5384
5384
|
yoyo: o.yoyo,
|
|
@@ -5403,31 +5403,31 @@ function no(i = new ir()) {
|
|
|
5403
5403
|
const [a] = i.resolveTargets(r);
|
|
5404
5404
|
if (a === void 0) return;
|
|
5405
5405
|
const c = i.objectFor(a);
|
|
5406
|
-
return c ? c[o] : i.appliedValue(a, o) ??
|
|
5406
|
+
return c ? c[o] : i.appliedValue(a, o) ?? Ni(o);
|
|
5407
5407
|
},
|
|
5408
|
-
scrollTrigger: (r) => n(
|
|
5409
|
-
scrollBatch: (r, o) =>
|
|
5410
|
-
scrollTo: (r, o) =>
|
|
5408
|
+
scrollTrigger: (r) => n(Me(i, r)),
|
|
5409
|
+
scrollBatch: (r, o) => ro(i, r, o).map((a) => n(a)),
|
|
5410
|
+
scrollTo: (r, o) => ci(s, i, r, o),
|
|
5411
5411
|
refreshScroll: () => {
|
|
5412
|
-
jt.refreshAll(),
|
|
5412
|
+
jt.refreshAll(), ri.refreshAll();
|
|
5413
5413
|
},
|
|
5414
5414
|
smoothScroll: (r = {}) => {
|
|
5415
5415
|
const o = typeof r.scroller == "string" ? (i.collector?.scope ?? i.root).querySelector(r.scroller) : r.scroller;
|
|
5416
|
-
return n(new
|
|
5416
|
+
return n(new ri({ ...r, scroller: o }).start());
|
|
5417
5417
|
},
|
|
5418
5418
|
context: (r, o) => {
|
|
5419
|
-
const a = new
|
|
5419
|
+
const a = new Ki(i, o);
|
|
5420
5420
|
return r && a.add(() => r(a)), a;
|
|
5421
5421
|
},
|
|
5422
|
-
matchMedia: (r) => new
|
|
5423
|
-
customEase:
|
|
5424
|
-
customBounce:
|
|
5425
|
-
customWiggle:
|
|
5426
|
-
pageTransition: (r) =>
|
|
5422
|
+
matchMedia: (r) => new Ur(i, r),
|
|
5423
|
+
customEase: Qr.create,
|
|
5424
|
+
customBounce: Jr.create,
|
|
5425
|
+
customWiggle: to.create,
|
|
5426
|
+
pageTransition: (r) => Kr(s, i, (o) => new H(i, o), r),
|
|
5427
5427
|
imageSequence: (r, o) => {
|
|
5428
5428
|
const a = typeof r == "string" ? (i.collector?.scope ?? i.root).querySelector(r) : r;
|
|
5429
5429
|
if (!(a instanceof HTMLCanvasElement)) throw new Error(`gsap-compat: imageSequence needs a <canvas>, got ${String(r)}`);
|
|
5430
|
-
return n(new
|
|
5430
|
+
return n(new Hr(a, o));
|
|
5431
5431
|
},
|
|
5432
5432
|
quickTo: (r, o, a = {}) => {
|
|
5433
5433
|
const c = new H(i, { paused: !0 }), [l] = i.resolveTargets(r);
|
|
@@ -5438,7 +5438,7 @@ function no(i = new ir()) {
|
|
|
5438
5438
|
[o]: f,
|
|
5439
5439
|
duration: a.duration ?? 0.4,
|
|
5440
5440
|
ease: a.ease ?? "power3.out",
|
|
5441
|
-
...a.spring !== void 0 && { spring:
|
|
5441
|
+
...a.spring !== void 0 && { spring: ao(a.spring, o, u) }
|
|
5442
5442
|
}), c.timeline.stop(), c.timeline.play(), i.activate(c.timeline);
|
|
5443
5443
|
}, { tween: c, kill: () => c.kill() });
|
|
5444
5444
|
},
|
|
@@ -5447,7 +5447,7 @@ function no(i = new ir()) {
|
|
|
5447
5447
|
to: (r, o) => {
|
|
5448
5448
|
if (o.scrollTo !== void 0) {
|
|
5449
5449
|
const { scrollTo: a, ...c } = o, l = typeof a == "object" && a !== null && !("nodeType" in a) ? a : {}, h = typeof r != "string" && r !== window && r.nodeType === 1;
|
|
5450
|
-
return
|
|
5450
|
+
return ci(s, i, a, {
|
|
5451
5451
|
...c,
|
|
5452
5452
|
offsetX: l.offsetX,
|
|
5453
5453
|
offsetY: l.offsetY,
|
|
@@ -5464,12 +5464,12 @@ function no(i = new ir()) {
|
|
|
5464
5464
|
const a = i.resolveTargets(r), c = typeof o == "string" ? o.split(",").map((l) => l.trim()).filter(Boolean) : o;
|
|
5465
5465
|
for (const l of [...i.liveTimelines]) l.killTweensOf(a, c);
|
|
5466
5466
|
},
|
|
5467
|
-
convertToPath: (r) =>
|
|
5467
|
+
convertToPath: (r) => fr(r, i.root),
|
|
5468
5468
|
splitText: (r, o) => {
|
|
5469
5469
|
const a = i.collector?.scope ?? i.root, c = typeof r == "string" ? Array.from(a.querySelectorAll(r)) : "nodeType" in r ? [r] : Array.from(r);
|
|
5470
|
-
return n(
|
|
5470
|
+
return n(kr(c, o));
|
|
5471
5471
|
},
|
|
5472
|
-
draggable: (r, o) => n(
|
|
5472
|
+
draggable: (r, o) => n(br(s, i, r, o)),
|
|
5473
5473
|
getFlipState: (r) => me(i, r),
|
|
5474
5474
|
flipFrom: (r, o) => ge(i, (a) => new H(i, a), r, o),
|
|
5475
5475
|
flip: (r, o, a) => {
|
|
@@ -5479,24 +5479,24 @@ function no(i = new ir()) {
|
|
|
5479
5479
|
};
|
|
5480
5480
|
return s;
|
|
5481
5481
|
}
|
|
5482
|
-
const Y = /* @__PURE__ */
|
|
5483
|
-
function
|
|
5482
|
+
const Y = /* @__PURE__ */ oo();
|
|
5483
|
+
function ao(i, t, e) {
|
|
5484
5484
|
return i === !0 ? { velocity: { [t]: e } } : typeof i == "string" ? { preset: i, velocity: { [t]: e } } : { ...i, velocity: { [t]: e } };
|
|
5485
5485
|
}
|
|
5486
|
-
function
|
|
5487
|
-
return i.morphSVG !== void 0 || i.drawSVG !== void 0 || i.text !== void 0 || i.scrambleText !== void 0 ||
|
|
5486
|
+
function co(i) {
|
|
5487
|
+
return i.morphSVG !== void 0 || i.drawSVG !== void 0 || i.text !== void 0 || i.scrambleText !== void 0 || Zi(i);
|
|
5488
5488
|
}
|
|
5489
|
-
function
|
|
5490
|
-
return Object.entries(i).some(([t, e]) => (typeof e == "function" ||
|
|
5489
|
+
function Zi(i) {
|
|
5490
|
+
return Object.entries(i).some(([t, e]) => (typeof e == "function" || Oi(e)) && !xe.has(t));
|
|
5491
5491
|
}
|
|
5492
|
-
function
|
|
5493
|
-
if (!
|
|
5492
|
+
function li(i, t, e, n, s) {
|
|
5493
|
+
if (!Zi(i)) return i;
|
|
5494
5494
|
const r = {};
|
|
5495
5495
|
for (const [o, a] of Object.entries(i))
|
|
5496
|
-
|
|
5496
|
+
xe.has(o) ? r[o] = a : typeof a == "function" ? r[o] = a(t, e, s) : Oi(a) ? r[o] = n.resolveRandomString(a) : r[o] = a;
|
|
5497
5497
|
return r;
|
|
5498
5498
|
}
|
|
5499
|
-
function
|
|
5499
|
+
function hi(i) {
|
|
5500
5500
|
const t = i.map((n) => n?.getBoundingClientRect().top);
|
|
5501
5501
|
if (t[0] === void 0) return i.length;
|
|
5502
5502
|
let e = 0;
|
|
@@ -5506,18 +5506,18 @@ function li(i) {
|
|
|
5506
5506
|
}
|
|
5507
5507
|
return Math.max(1, e);
|
|
5508
5508
|
}
|
|
5509
|
-
function
|
|
5509
|
+
function ui(i) {
|
|
5510
5510
|
const t = i;
|
|
5511
5511
|
if (typeof t?.getTotalLength == "function")
|
|
5512
5512
|
return t.getTotalLength();
|
|
5513
5513
|
}
|
|
5514
|
-
function
|
|
5514
|
+
function lo(i) {
|
|
5515
5515
|
if (typeof i == "number" || typeof i == "string" || Array.isArray(i) && i.every((t) => typeof t == "number")) return i;
|
|
5516
5516
|
}
|
|
5517
|
-
function
|
|
5517
|
+
function ho(i) {
|
|
5518
5518
|
return typeof i == "string" ? `"${i}"` : String(i);
|
|
5519
5519
|
}
|
|
5520
|
-
class
|
|
5520
|
+
class fi {
|
|
5521
5521
|
media;
|
|
5522
5522
|
offset;
|
|
5523
5523
|
driftTolerance;
|
|
@@ -5556,7 +5556,7 @@ class ui {
|
|
|
5556
5556
|
});
|
|
5557
5557
|
}
|
|
5558
5558
|
}
|
|
5559
|
-
function
|
|
5559
|
+
function uo(i, t, e, n, s) {
|
|
5560
5560
|
const r = e - s;
|
|
5561
5561
|
if (r < 0) {
|
|
5562
5562
|
t.paused || t.pause(), t.currentTime = 0;
|
|
@@ -5564,7 +5564,7 @@ function co(i, t, e, n, s) {
|
|
|
5564
5564
|
}
|
|
5565
5565
|
i.update(r, n);
|
|
5566
5566
|
}
|
|
5567
|
-
class
|
|
5567
|
+
class Ae {
|
|
5568
5568
|
container;
|
|
5569
5569
|
timeline = null;
|
|
5570
5570
|
adapter;
|
|
@@ -5796,13 +5796,13 @@ class Me {
|
|
|
5796
5796
|
scanMedia() {
|
|
5797
5797
|
this.mediaTargets = [], this.container.querySelectorAll("[data-tinyfly-media]").forEach((e) => {
|
|
5798
5798
|
const n = e, s = Number(n.getAttribute("data-tinyfly-start") ?? "0") || 0, r = n.getAttribute("data-volume");
|
|
5799
|
-
r !== null && (n.volume = Math.max(0, Math.min(1, Number(r) || 0))), this.mediaTargets.push({ el: n, startTime: s, sync: new
|
|
5799
|
+
r !== null && (n.volume = Math.max(0, Math.min(1, Number(r) || 0))), this.mediaTargets.push({ el: n, startTime: s, sync: new fi(n) });
|
|
5800
5800
|
});
|
|
5801
5801
|
}
|
|
5802
5802
|
/** Sync all discovered media targets to a timeline time. */
|
|
5803
5803
|
syncAllMedia(t, e) {
|
|
5804
5804
|
for (const n of this.mediaTargets)
|
|
5805
|
-
|
|
5805
|
+
uo(n.sync, n.el, t, e, n.startTime);
|
|
5806
5806
|
}
|
|
5807
5807
|
/**
|
|
5808
5808
|
* Load animation from inline JSON string.
|
|
@@ -5866,7 +5866,7 @@ class Me {
|
|
|
5866
5866
|
* plays. Pass `{ offset }` to start the media at a timeline offset.
|
|
5867
5867
|
*/
|
|
5868
5868
|
attachMedia(t, e) {
|
|
5869
|
-
this.mediaSync = new
|
|
5869
|
+
this.mediaSync = new fi(t, e), this.timeline && (this.mediaSync.setRate(this.timeline.speed), this.mediaSync.update(this.timeline.currentTime, this.isPlaying));
|
|
5870
5870
|
}
|
|
5871
5871
|
/** Detach and pause the currently synced media, if any. */
|
|
5872
5872
|
detachMedia() {
|
|
@@ -5965,7 +5965,7 @@ class Me {
|
|
|
5965
5965
|
this.playhead = n;
|
|
5966
5966
|
const s = this.markers;
|
|
5967
5967
|
if (s.length === 0) return;
|
|
5968
|
-
const { crossings: r } =
|
|
5968
|
+
const { crossings: r } = _i(
|
|
5969
5969
|
s.map((o) => o.time),
|
|
5970
5970
|
t,
|
|
5971
5971
|
n,
|
|
@@ -5993,14 +5993,14 @@ class Me {
|
|
|
5993
5993
|
}
|
|
5994
5994
|
}
|
|
5995
5995
|
}
|
|
5996
|
-
async function
|
|
5997
|
-
const n = new
|
|
5996
|
+
async function va(i, t, e = {}) {
|
|
5997
|
+
const n = new Ae(i, { ...e, autoplay: !0 });
|
|
5998
5998
|
return await n.load(t), n;
|
|
5999
5999
|
}
|
|
6000
|
-
function
|
|
6001
|
-
return new
|
|
6000
|
+
function wa(i, t = {}) {
|
|
6001
|
+
return new Ae(i, t);
|
|
6002
6002
|
}
|
|
6003
|
-
const
|
|
6003
|
+
const fo = {
|
|
6004
6004
|
play: "Play",
|
|
6005
6005
|
pause: "Pause",
|
|
6006
6006
|
prev: "Previous step",
|
|
@@ -6015,7 +6015,7 @@ const lo = {
|
|
|
6015
6015
|
scenario: "Scenario",
|
|
6016
6016
|
fullscreen: "Full screen",
|
|
6017
6017
|
exitFullscreen: "Exit full screen"
|
|
6018
|
-
},
|
|
6018
|
+
}, di = "tinyfly-controls-style", po = `
|
|
6019
6019
|
.tf-ctl { --tf-ctl-fg: #1d1d1f; --tf-ctl-bg: #f4f2ee; --tf-ctl-accent: #c2410c; --tf-ctl-radius: 8px;
|
|
6020
6020
|
font: 14px/1.4 var(--tf-ctl-font, system-ui, sans-serif); color: var(--tf-ctl-fg); margin-top: 8px; }
|
|
6021
6021
|
.tf-ctl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: var(--tf-ctl-radius); background: var(--tf-ctl-bg); }
|
|
@@ -6064,22 +6064,22 @@ const lo = {
|
|
|
6064
6064
|
.tf-fullscreen > :not(svg):not(canvas) { grid-column: 2; }
|
|
6065
6065
|
}
|
|
6066
6066
|
`;
|
|
6067
|
-
let
|
|
6068
|
-
function
|
|
6069
|
-
if (i.getElementById(
|
|
6067
|
+
let mo = 0;
|
|
6068
|
+
function go(i) {
|
|
6069
|
+
if (i.getElementById(di)) return;
|
|
6070
6070
|
const t = i.createElement("style");
|
|
6071
|
-
t.id =
|
|
6071
|
+
t.id = di, t.textContent = po, i.head.appendChild(t);
|
|
6072
6072
|
}
|
|
6073
|
-
function
|
|
6073
|
+
function yo(i, t, e = {}) {
|
|
6074
6074
|
const n = t.ownerDocument;
|
|
6075
|
-
|
|
6076
|
-
const s = { ...
|
|
6075
|
+
go(n);
|
|
6076
|
+
const s = { ...fo, ...e.labels }, r = e.speeds ?? [0.5, 1, 2], o = () => i.markers.length > 0, a = () => i.markers.some((M) => M.label !== void 0 || i.caption(M.id) !== void 0), c = n.createElement("div");
|
|
6077
6077
|
c.className = "tf-ctl";
|
|
6078
6078
|
const l = n.createElement("div");
|
|
6079
6079
|
l.className = "tf-ctl-bar", l.setAttribute("role", "group");
|
|
6080
|
-
const h = (M,
|
|
6080
|
+
const h = (M, I, L, N = "") => {
|
|
6081
6081
|
const O = n.createElement("button");
|
|
6082
|
-
return O.type = "button", O.className = `tf-ctl-btn ${N}`.trim(), O.setAttribute("aria-label", M), O.title = M, O.textContent =
|
|
6082
|
+
return O.type = "button", O.className = `tf-ctl-btn ${N}`.trim(), O.setAttribute("aria-label", M), O.title = M, O.textContent = I, O.addEventListener("click", L), O;
|
|
6083
6083
|
}, f = h(s.restart, "⟲", () => {
|
|
6084
6084
|
i.pause(), i.seek(0);
|
|
6085
6085
|
}), u = h(s.prev, "|◀", () => i.prev()), d = h(s.play, "▶", () => i.isPlaying ? i.pause() : p(), "tf-ctl-primary"), m = h(s.next, "▶|", () => i.next()), p = () => {
|
|
@@ -6093,11 +6093,11 @@ function po(i, t, e = {}) {
|
|
|
6093
6093
|
const v = n.createElement("select");
|
|
6094
6094
|
v.className = "tf-ctl-speed", v.setAttribute("aria-label", s.speed);
|
|
6095
6095
|
for (const M of r) {
|
|
6096
|
-
const
|
|
6097
|
-
|
|
6096
|
+
const I = n.createElement("option");
|
|
6097
|
+
I.value = String(M), I.textContent = `${M}×`, M === 1 && (I.selected = !0), v.appendChild(I);
|
|
6098
6098
|
}
|
|
6099
6099
|
v.addEventListener("change", () => i.setSpeed(Number(v.value))), l.append(f, u, d, m, g, y), r.length > 0 && l.append(v), c.append(l);
|
|
6100
|
-
const b = e.fullscreen ?
|
|
6100
|
+
const b = e.fullscreen ? To(t, n, s) : void 0;
|
|
6101
6101
|
b && l.append(b.button);
|
|
6102
6102
|
const T = n.createElement("p");
|
|
6103
6103
|
T.className = "tf-ctl-caption", T.setAttribute("aria-live", "polite"), e.captions !== !1 && c.append(T);
|
|
@@ -6105,21 +6105,21 @@ function po(i, t, e = {}) {
|
|
|
6105
6105
|
w.className = "tf-ctl-question", w.hidden = !0;
|
|
6106
6106
|
const k = n.createElement("span"), S = h(s.reveal, s.reveal, () => i.play(), "tf-ctl-primary");
|
|
6107
6107
|
w.append(k, S), c.append(w);
|
|
6108
|
-
const _ =
|
|
6108
|
+
const _ = bo(i, n, s.scenario, e.scenarioControl ?? "buttons");
|
|
6109
6109
|
_ && c.append(_.element);
|
|
6110
6110
|
const B = e.mount;
|
|
6111
6111
|
B ? B.appendChild(c) : t.insertAdjacentElement("afterend", c);
|
|
6112
6112
|
const A = () => {
|
|
6113
6113
|
const M = i.isPlaying;
|
|
6114
6114
|
d.textContent = M ? "❚❚" : "▶", d.setAttribute("aria-label", M ? s.pause : s.play), d.title = M ? s.pause : s.play;
|
|
6115
|
-
const
|
|
6116
|
-
n.activeElement !== g && (g.value = String(
|
|
6115
|
+
const I = i.duration;
|
|
6116
|
+
n.activeElement !== g && (g.value = String(I > 0 ? Math.round(i.currentTime / I * 1e3) : 0));
|
|
6117
6117
|
const L = i.markers;
|
|
6118
6118
|
if (u.hidden = m.hidden = y.hidden = L.length === 0, L.length > 0) {
|
|
6119
6119
|
const N = i.currentMarker, O = N ? L.indexOf(N) + 1 : 0;
|
|
6120
|
-
y.textContent = s.stepFormat.replace("{index}", String(O)).replace("{total}", String(L.length)), y.setAttribute("aria-label", `${s.step} ${O} ${s.of} ${L.length}`), u.disabled = i.currentTime <= 0.5, m.disabled = i.currentTime >=
|
|
6121
|
-
const
|
|
6122
|
-
T.textContent !==
|
|
6120
|
+
y.textContent = s.stepFormat.replace("{index}", String(O)).replace("{total}", String(L.length)), y.setAttribute("aria-label", `${s.step} ${O} ${s.of} ${L.length}`), u.disabled = i.currentTime <= 0.5, m.disabled = i.currentTime >= I - 0.5;
|
|
6121
|
+
const R = i.caption() ?? "";
|
|
6122
|
+
T.textContent !== R && (T.textContent = R), T.hidden = !a();
|
|
6123
6123
|
const $ = !M && N?.question !== void 0 && Math.abs(i.currentTime - N.time) < 1;
|
|
6124
6124
|
w.hidden = !$, $ && k.textContent !== N.question && (k.textContent = N.question);
|
|
6125
6125
|
} else
|
|
@@ -6131,8 +6131,8 @@ function po(i, t, e = {}) {
|
|
|
6131
6131
|
!P.hasAttribute("tabindex") && P.tabIndex < 0 && (P.tabIndex = 0);
|
|
6132
6132
|
const E = /* @__PURE__ */ new WeakSet(), C = (M) => {
|
|
6133
6133
|
if (E.has(M) || (E.add(M), M.defaultPrevented || M.altKey || M.ctrlKey || M.metaKey)) return;
|
|
6134
|
-
const
|
|
6135
|
-
if (!(
|
|
6134
|
+
const I = M.target;
|
|
6135
|
+
if (!(I.tagName === "INPUT" || I.tagName === "SELECT") && !(M.key === " " && I.tagName === "BUTTON"))
|
|
6136
6136
|
switch (M.key) {
|
|
6137
6137
|
case " ":
|
|
6138
6138
|
M.preventDefault(), i.isPlaying ? i.pause() : p();
|
|
@@ -6169,7 +6169,7 @@ function po(i, t, e = {}) {
|
|
|
6169
6169
|
}
|
|
6170
6170
|
};
|
|
6171
6171
|
}
|
|
6172
|
-
function
|
|
6172
|
+
function bo(i, t, e, n) {
|
|
6173
6173
|
const s = i.scenarios;
|
|
6174
6174
|
if (s.length < 2) return;
|
|
6175
6175
|
if (n === "slider") {
|
|
@@ -6194,7 +6194,7 @@ function mo(i, t, e, n) {
|
|
|
6194
6194
|
r.className = "tf-ctl-choices";
|
|
6195
6195
|
const o = t.createElement("legend");
|
|
6196
6196
|
o.textContent = e, r.append(o);
|
|
6197
|
-
const a = `tf-ctl-scenario-${++
|
|
6197
|
+
const a = `tf-ctl-scenario-${++mo}`, c = s.map((h) => {
|
|
6198
6198
|
const f = t.createElement("label");
|
|
6199
6199
|
f.className = "tf-ctl-choice";
|
|
6200
6200
|
const u = t.createElement("input");
|
|
@@ -6211,14 +6211,14 @@ function mo(i, t, e, n) {
|
|
|
6211
6211
|
}
|
|
6212
6212
|
} };
|
|
6213
6213
|
}
|
|
6214
|
-
const
|
|
6215
|
-
function
|
|
6214
|
+
const vo = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>', wo = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"/></svg>';
|
|
6215
|
+
function To(i, t, e) {
|
|
6216
6216
|
const n = t, s = i, r = t.createElement("button");
|
|
6217
6217
|
r.type = "button", r.className = "tf-ctl-btn tf-ctl-fullscreen";
|
|
6218
6218
|
let o, a = "";
|
|
6219
6219
|
const c = () => {
|
|
6220
6220
|
const p = o !== void 0;
|
|
6221
|
-
r.innerHTML = p ?
|
|
6221
|
+
r.innerHTML = p ? wo : vo;
|
|
6222
6222
|
const g = p ? e.exitFullscreen : e.fullscreen;
|
|
6223
6223
|
r.setAttribute("aria-label", g), r.title = g, r.setAttribute("aria-pressed", String(p)), i.classList.toggle("tf-fullscreen", p), i.classList.toggle("tf-fullscreen-overlay", o === "overlay");
|
|
6224
6224
|
}, l = () => n.fullscreenElement ?? n.webkitFullscreenElement ?? null, h = () => {
|
|
@@ -6264,20 +6264,20 @@ function bo(i, t, e) {
|
|
|
6264
6264
|
}
|
|
6265
6265
|
};
|
|
6266
6266
|
}
|
|
6267
|
-
const
|
|
6267
|
+
const pi = "tinyfly-choices-style", ko = `
|
|
6268
6268
|
[data-tinyfly-choose] { cursor: pointer; }
|
|
6269
6269
|
[data-tinyfly-choose]:focus-visible { outline: 2px solid var(--tf-ctl-accent, #c2410c); outline-offset: 2px; }
|
|
6270
6270
|
`;
|
|
6271
|
-
function
|
|
6272
|
-
if (i.getElementById(
|
|
6271
|
+
function xo(i) {
|
|
6272
|
+
if (i.getElementById(pi)) return;
|
|
6273
6273
|
const t = i.createElement("style");
|
|
6274
|
-
t.id =
|
|
6274
|
+
t.id = pi, t.textContent = ko, i.head.appendChild(t);
|
|
6275
6275
|
}
|
|
6276
|
-
function
|
|
6276
|
+
function So(i, t) {
|
|
6277
6277
|
const e = Array.from(t.querySelectorAll("[data-tinyfly-choose]"));
|
|
6278
6278
|
if (e.length === 0) return () => {
|
|
6279
6279
|
};
|
|
6280
|
-
|
|
6280
|
+
xo(t.ownerDocument);
|
|
6281
6281
|
const n = [], s = [];
|
|
6282
6282
|
for (const a of e) {
|
|
6283
6283
|
const c = a.getAttribute("data-tinyfly-choose") ?? "", l = [], h = (m, p) => {
|
|
@@ -6305,7 +6305,7 @@ function To(i, t) {
|
|
|
6305
6305
|
};
|
|
6306
6306
|
}
|
|
6307
6307
|
const Nt = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap();
|
|
6308
|
-
let
|
|
6308
|
+
let Mo = 0;
|
|
6309
6309
|
function vt(i, t, e) {
|
|
6310
6310
|
if (i)
|
|
6311
6311
|
try {
|
|
@@ -6315,17 +6315,17 @@ function vt(i, t, e) {
|
|
|
6315
6315
|
return;
|
|
6316
6316
|
}
|
|
6317
6317
|
}
|
|
6318
|
-
async function
|
|
6318
|
+
async function Ao(i, t = {}) {
|
|
6319
6319
|
const e = Nt.get(i);
|
|
6320
6320
|
if (e) return e;
|
|
6321
|
-
const n = Array.from(i.querySelectorAll("script[data-tinyfly-timeline]")), s = n[0], r = i.getAttribute("data-src"), o =
|
|
6321
|
+
const n = Array.from(i.querySelectorAll("script[data-tinyfly-timeline]")), s = n[0], r = i.getAttribute("data-src"), o = Po(i.getAttribute("data-markers")), a = n.length > 1 || s?.hasAttribute("data-scenario") ? Eo(n, o, i) : void 0;
|
|
6322
6322
|
if (a && a.length === 0) return;
|
|
6323
6323
|
let c = s && !a ? vt(s.textContent, "timeline", i) : void 0;
|
|
6324
6324
|
if (!c && r && o) {
|
|
6325
6325
|
const d = await fetch(r);
|
|
6326
6326
|
d.ok && (c = await d.json());
|
|
6327
6327
|
}
|
|
6328
|
-
if (c && o && (c =
|
|
6328
|
+
if (c && o && (c = Qi(c, o)), !c && !r && !a) {
|
|
6329
6329
|
console.warn('tinyfly: embed has no timeline (a <script type="application/json" data-tinyfly-timeline> or data-src)', i);
|
|
6330
6330
|
return;
|
|
6331
6331
|
}
|
|
@@ -6335,16 +6335,16 @@ async function xo(i, t = {}) {
|
|
|
6335
6335
|
...l && { captions: l },
|
|
6336
6336
|
...vt(i.getAttribute("data-options"), "data-options", i)
|
|
6337
6337
|
};
|
|
6338
|
-
|
|
6339
|
-
const f = new
|
|
6338
|
+
_o(i);
|
|
6339
|
+
const f = new Ae(i, h), u = { element: i, player: f };
|
|
6340
6340
|
if (Nt.set(i, u), i.setAttribute("data-tinyfly-mounted", ""), a) {
|
|
6341
6341
|
const d = i.getAttribute("data-scenario") ?? void 0;
|
|
6342
|
-
await f.loadScenarios(a, { initial: a.some((m) => m.id === d) ? d : void 0 }), ye.set(i,
|
|
6342
|
+
await f.loadScenarios(a, { initial: a.some((m) => m.id === d) ? d : void 0 }), ye.set(i, So(f, i));
|
|
6343
6343
|
} else
|
|
6344
6344
|
await f.load(c ?? r);
|
|
6345
6345
|
if (i.getAttribute("data-controls") !== "false") {
|
|
6346
6346
|
const d = vt(i.getAttribute("data-labels"), "data-labels", i), m = i.querySelector("figcaption"), p = i.getAttribute("data-scenario-legend"), g = i.getAttribute("data-scenario-control");
|
|
6347
|
-
u.controls =
|
|
6347
|
+
u.controls = yo(f, i, {
|
|
6348
6348
|
...t.controls,
|
|
6349
6349
|
...i.getAttribute("data-fullscreen") === "true" ? { fullscreen: !0 } : {},
|
|
6350
6350
|
...g === "slider" || g === "buttons" ? { scenarioControl: g } : {},
|
|
@@ -6355,7 +6355,7 @@ async function xo(i, t = {}) {
|
|
|
6355
6355
|
}
|
|
6356
6356
|
return u;
|
|
6357
6357
|
}
|
|
6358
|
-
function
|
|
6358
|
+
function Eo(i, t, e) {
|
|
6359
6359
|
const n = [];
|
|
6360
6360
|
return i.forEach((s, r) => {
|
|
6361
6361
|
const o = vt(s.textContent, "timeline", e);
|
|
@@ -6366,39 +6366,39 @@ function So(i, t, e) {
|
|
|
6366
6366
|
return;
|
|
6367
6367
|
}
|
|
6368
6368
|
const c = s.getAttribute("data-scenario-label") ?? void 0;
|
|
6369
|
-
n.push({ id: a, label: c, timeline: t ?
|
|
6369
|
+
n.push({ id: a, label: c, timeline: t ? Qi(o, t) : o });
|
|
6370
6370
|
}), n;
|
|
6371
6371
|
}
|
|
6372
|
-
function
|
|
6372
|
+
function Qi(i, t) {
|
|
6373
6373
|
return i.config.markers?.length ? i : { ...i, config: { ...i.config, markers: t.map((e, n) => ({ id: `step-${n + 1}`, time: e })) } };
|
|
6374
6374
|
}
|
|
6375
|
-
function
|
|
6375
|
+
function Po(i) {
|
|
6376
6376
|
if (!i) return;
|
|
6377
6377
|
const t = i.split(/[\s,]+/).filter(Boolean).map(Number).filter((e) => Number.isFinite(e) && e >= 0).sort((e, n) => e - n);
|
|
6378
6378
|
return t.length > 0 ? t : void 0;
|
|
6379
6379
|
}
|
|
6380
|
-
async function
|
|
6380
|
+
async function Co(i = document, t = {}) {
|
|
6381
6381
|
const e = Array.from(i.querySelectorAll("[data-tinyfly-embed]"));
|
|
6382
|
-
return (await Promise.all(e.map((s) =>
|
|
6382
|
+
return (await Promise.all(e.map((s) => Ao(s, t)))).filter((s) => s !== void 0);
|
|
6383
6383
|
}
|
|
6384
|
-
function
|
|
6384
|
+
function Ta(i) {
|
|
6385
6385
|
const t = Nt.get(i);
|
|
6386
6386
|
t && (ye.get(i)?.(), ye.delete(i), t.controls?.destroy(), t.player.destroy(), Nt.delete(i), i.removeAttribute("data-tinyfly-mounted"));
|
|
6387
6387
|
}
|
|
6388
|
-
function
|
|
6388
|
+
function _o(i) {
|
|
6389
6389
|
const t = i.querySelector("svg");
|
|
6390
6390
|
if (!t || t.hasAttribute("role") || t.hasAttribute("aria-hidden")) return;
|
|
6391
6391
|
const e = i.getAttribute("data-alt"), n = i.querySelector("figcaption");
|
|
6392
|
-
t.setAttribute("role", "img"), e ? t.setAttribute("aria-label", e) : n && (n.id ||= `tinyfly-caption-${++
|
|
6392
|
+
t.setAttribute("role", "img"), e ? t.setAttribute("aria-label", e) : n && (n.id ||= `tinyfly-caption-${++Mo}`, t.setAttribute("aria-labelledby", n.id));
|
|
6393
6393
|
}
|
|
6394
|
-
function
|
|
6394
|
+
function Io() {
|
|
6395
6395
|
if (!(typeof document < "u" ? document.currentScript : null)?.hasAttribute("data-tinyfly-auto")) return;
|
|
6396
6396
|
const t = () => {
|
|
6397
|
-
|
|
6397
|
+
Co();
|
|
6398
6398
|
};
|
|
6399
6399
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", t, { once: !0 }) : t();
|
|
6400
6400
|
}
|
|
6401
|
-
class
|
|
6401
|
+
class Ro {
|
|
6402
6402
|
container;
|
|
6403
6403
|
containerA;
|
|
6404
6404
|
containerB;
|
|
@@ -6667,11 +6667,11 @@ class Co {
|
|
|
6667
6667
|
this.animationFrameId !== void 0 && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = void 0);
|
|
6668
6668
|
}
|
|
6669
6669
|
}
|
|
6670
|
-
async function
|
|
6671
|
-
const n = new
|
|
6670
|
+
async function ka(i, t, e = {}) {
|
|
6671
|
+
const n = new Ro(i, { ...e, autoplay: !0 });
|
|
6672
6672
|
return await n.load(t), n;
|
|
6673
6673
|
}
|
|
6674
|
-
const
|
|
6674
|
+
const xa = { type: "none", duration: 0 }, ht = {
|
|
6675
6675
|
lean: 0,
|
|
6676
6676
|
headTilt: 0,
|
|
6677
6677
|
leftShoulder: 18,
|
|
@@ -6697,7 +6697,7 @@ const Ta = { type: "none", duration: 0 }, ht = {
|
|
|
6697
6697
|
function j(i) {
|
|
6698
6698
|
return { ...ht, ...i };
|
|
6699
6699
|
}
|
|
6700
|
-
const
|
|
6700
|
+
const Ji = {
|
|
6701
6701
|
mouth: 0,
|
|
6702
6702
|
smile: 0,
|
|
6703
6703
|
mouthWidth: 1,
|
|
@@ -6708,8 +6708,8 @@ const Qi = {
|
|
|
6708
6708
|
browTilt: 0,
|
|
6709
6709
|
lookX: 0,
|
|
6710
6710
|
lookY: 0
|
|
6711
|
-
}, D = (i) => ({ ...
|
|
6712
|
-
neutral:
|
|
6711
|
+
}, D = (i) => ({ ...Ji, ...i }), Z = {
|
|
6712
|
+
neutral: Ji,
|
|
6713
6713
|
happy: D({ smile: 0.9, leftBrow: 0.2, rightBrow: 0.2 }),
|
|
6714
6714
|
joyful: D({ mouth: 0.6, smile: 1, mouthWidth: 1.2, leftEye: 0, rightEye: 0, leftBrow: 0.4, rightBrow: 0.4 }),
|
|
6715
6715
|
sad: D({ smile: -0.8, leftEye: 0.8, rightEye: 0.8, browTilt: 0.9, leftBrow: -0.1, rightBrow: -0.1, lookY: 0.6 }),
|
|
@@ -6728,10 +6728,10 @@ const Qi = {
|
|
|
6728
6728
|
smug: D({ smile: 0.6, mouthWidth: 0.9, leftEye: 0.6, rightEye: 0.6, leftBrow: 0.1, rightBrow: 0.5, lookX: 0.5 }),
|
|
6729
6729
|
wink: D({ smile: 0.9, leftEye: 0, rightEye: 1, leftBrow: -0.2, rightBrow: 0.3 })
|
|
6730
6730
|
};
|
|
6731
|
-
function
|
|
6731
|
+
function Lo(i, t) {
|
|
6732
6732
|
return { ...i, ...typeof t == "string" ? Z[t] : t };
|
|
6733
6733
|
}
|
|
6734
|
-
const
|
|
6734
|
+
const $o = {
|
|
6735
6735
|
rest: ht,
|
|
6736
6736
|
wave: j({ rightShoulder: 135, rightElbow: 30, headTilt: 6, ...Z.happy }),
|
|
6737
6737
|
cheer: j({ leftShoulder: 125, leftElbow: 20, rightShoulder: 125, rightElbow: 20, ...Z.joyful }),
|
|
@@ -6742,32 +6742,38 @@ const Ro = {
|
|
|
6742
6742
|
handsOnHips: j({ leftShoulder: 45, leftElbow: -100, rightShoulder: 45, rightElbow: -100, leftHip: 14, rightHip: 14, smile: 0.8 }),
|
|
6743
6743
|
sad: j({ leftShoulder: 14, rightShoulder: 14, leftElbow: -4, rightElbow: -4, headTilt: -14, lean: -3, ...Z.sad }),
|
|
6744
6744
|
surprised: j({ leftShoulder: 70, leftElbow: 60, rightShoulder: 70, rightElbow: 60, ...Z.surprised })
|
|
6745
|
-
},
|
|
6746
|
-
function
|
|
6745
|
+
}, tn = Object.keys(ht);
|
|
6746
|
+
function Fo(i, t, e) {
|
|
6747
6747
|
const n = { ...i };
|
|
6748
|
-
for (const s of
|
|
6748
|
+
for (const s of tn) n[s] = i[s] + (t[s] - i[s]) * e;
|
|
6749
6749
|
return n;
|
|
6750
6750
|
}
|
|
6751
|
-
|
|
6752
|
-
|
|
6751
|
+
const be = 24, Do = 40;
|
|
6752
|
+
function Bo(i, t = ht, e = 1) {
|
|
6753
|
+
const n = Math.sin(i * Math.PI * 2) * e, s = Math.cos(i * Math.PI * 2) * e, r = (o) => o <= Do ? 22 * n : o;
|
|
6753
6754
|
return {
|
|
6754
6755
|
...t,
|
|
6755
|
-
//
|
|
6756
|
-
leftHip:
|
|
6757
|
-
rightHip:
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6756
|
+
// Left foot forward while swing > 0, right foot back; then the other way.
|
|
6757
|
+
leftHip: -be * n,
|
|
6758
|
+
rightHip: -be * n,
|
|
6759
|
+
// The leg swinging forward lifts, its shin trailing backward (-x). A positive
|
|
6760
|
+
// knee folds toward the centre, which is backward only for the right leg.
|
|
6761
|
+
leftKnee: -30 * Math.max(0, s),
|
|
6762
|
+
rightKnee: 30 * Math.max(0, -s),
|
|
6763
|
+
// Arms swing against the legs: left arm back while the left foot is forward.
|
|
6764
|
+
leftShoulder: r(t.leftShoulder),
|
|
6765
|
+
rightShoulder: r(t.rightShoulder)
|
|
6763
6766
|
};
|
|
6764
6767
|
}
|
|
6765
|
-
function
|
|
6768
|
+
function Sa(i, t = 1) {
|
|
6769
|
+
return 4 * ((en + nn) * i) * Math.sin(be * t * Math.PI / 180);
|
|
6770
|
+
}
|
|
6771
|
+
function Oo(i) {
|
|
6766
6772
|
const t = Math.abs(Math.sin(i / 65)), e = 0.55 + 0.45 * Math.sin(i / 310);
|
|
6767
6773
|
return t * e;
|
|
6768
6774
|
}
|
|
6769
|
-
const
|
|
6770
|
-
function
|
|
6775
|
+
const No = 0.12, qo = 0.1, Yo = 0.21, Xo = 0.19, en = 0.24, nn = 0.22, qt = (i) => i * Math.PI / 180, Vo = (i, t) => ({ x: t * Math.sin(qt(i)), y: Math.cos(qt(i)) });
|
|
6776
|
+
function Wo(i, t, e, n, s, r) {
|
|
6771
6777
|
const o = Math.max(1, r * 0.6), a = 0.12 * e, c = n - 0.12 * e, l = a + t.lookX * 0.08 * e, h = t.lookY * 0.07 * e, f = [
|
|
6772
6778
|
{ x: -0.34 * e, open: t.leftEye, brow: t.leftBrow, side: -1 },
|
|
6773
6779
|
{ x: 0.34 * e, open: t.rightEye, brow: t.rightBrow, side: 1 }
|
|
@@ -6797,11 +6803,11 @@ function Xo(i, t, e, n, s, r) {
|
|
|
6797
6803
|
const p = 0.3 * e * m;
|
|
6798
6804
|
t.smile > 0.3 ? (i.moveTo(a - d, u - 0.05 * e), i.lineTo(a + d, u - 0.05 * e), i.quadraticCurveTo(a, u + p * 2, a - d, u - 0.05 * e)) : t.smile < -0.3 ? (i.moveTo(a - d, u + p * 0.6), i.lineTo(a + d, u + p * 0.6), i.quadraticCurveTo(a, u - p * 1.4, a - d, u + p * 0.6)) : i.ellipse(a, u, d * 0.8, p, 0, 0, Math.PI * 2), i.fill();
|
|
6799
6805
|
}
|
|
6800
|
-
function
|
|
6801
|
-
const n = e.height ?? 300, s = e.color ?? "#1e293b", r = (e.facing ?? 1) < 0 ? -1 : 1, o =
|
|
6806
|
+
function jo(i, t, e = {}) {
|
|
6807
|
+
const n = e.height ?? 300, s = e.color ?? "#1e293b", r = (e.facing ?? 1) < 0 ? -1 : 1, o = No * n, a = -0.46 * n, c = -0.76 * n;
|
|
6802
6808
|
i.save(), i.scale(r, 1), i.strokeStyle = s, i.lineWidth = e.lineWidth ?? n * 0.025, i.lineCap = "round", i.lineJoin = "round";
|
|
6803
6809
|
const l = (m, p, g, y, v) => {
|
|
6804
|
-
const b =
|
|
6810
|
+
const b = Vo(g, y);
|
|
6805
6811
|
return { x: m + b.x * v * n, y: p + b.y * v * n };
|
|
6806
6812
|
}, h = (...m) => {
|
|
6807
6813
|
i.beginPath(), i.moveTo(m[0].x, m[0].y);
|
|
@@ -6812,25 +6818,25 @@ function Vo(i, t, e = {}) {
|
|
|
6812
6818
|
[-1, t.leftHip, t.leftKnee],
|
|
6813
6819
|
[1, t.rightHip, t.rightKnee]
|
|
6814
6820
|
]) {
|
|
6815
|
-
const y = l(0, a, p, m,
|
|
6816
|
-
h({ x: 0, y: a }, y, l(y.x, y.y, p - g, m,
|
|
6821
|
+
const y = l(0, a, p, m, en);
|
|
6822
|
+
h({ x: 0, y: a }, y, l(y.x, y.y, p - g, m, nn));
|
|
6817
6823
|
}
|
|
6818
6824
|
i.translate(0, a), i.rotate(qt(t.lean)), i.translate(0, -a), h({ x: 0, y: a }, { x: 0, y: c });
|
|
6819
|
-
const f = c +
|
|
6825
|
+
const f = c + qo * n;
|
|
6820
6826
|
for (const [m, p, g] of [
|
|
6821
6827
|
[-1, t.leftShoulder, t.leftElbow],
|
|
6822
6828
|
[1, t.rightShoulder, t.rightElbow]
|
|
6823
6829
|
]) {
|
|
6824
|
-
const y = l(0, f, p, m,
|
|
6825
|
-
h({ x: 0, y: f }, y, l(y.x, y.y, p + g, m,
|
|
6830
|
+
const y = l(0, f, p, m, Yo);
|
|
6831
|
+
h({ x: 0, y: f }, y, l(y.x, y.y, p + g, m, Xo));
|
|
6826
6832
|
}
|
|
6827
6833
|
i.translate(0, c), i.rotate(qt(t.headTilt));
|
|
6828
6834
|
const u = -o;
|
|
6829
6835
|
i.beginPath(), i.arc(0, u, o, 0, Math.PI * 2);
|
|
6830
6836
|
const d = e.headFill ?? "#ffffff";
|
|
6831
|
-
d !== "none" && (i.fillStyle = d, i.fill()), i.stroke(),
|
|
6837
|
+
d !== "none" && (i.fillStyle = d, i.fill()), i.stroke(), Wo(i, t, o, u, s, e.lineWidth ?? n * 0.025), i.restore(), e.label && (i.save(), i.fillStyle = s, i.font = e.labelFont ?? `700 ${Math.round(n * 0.11)}px sans-serif`, i.textAlign = "center", i.textBaseline = "bottom", i.fillText(e.label, 0, -n - 0.04 * n), i.restore());
|
|
6832
6838
|
}
|
|
6833
|
-
function
|
|
6839
|
+
function Ma(i) {
|
|
6834
6840
|
const t = i.style ?? {}, e = t.height ?? 300, n = e * 0.8, s = { ...j(i.pose ?? {}), walk: 0, walking: 0, talk: 0 };
|
|
6835
6841
|
return {
|
|
6836
6842
|
type: "custom",
|
|
@@ -6841,17 +6847,17 @@ function ka(i) {
|
|
|
6841
6847
|
props: { ...s },
|
|
6842
6848
|
draw(r, o, a) {
|
|
6843
6849
|
const c = o.props, l = { ...c };
|
|
6844
|
-
let h = c.walking > 0 ?
|
|
6845
|
-
c.talk > 0 && (h = { ...h, mouth: Math.max(h.mouth, c.talk *
|
|
6850
|
+
let h = c.walking > 0 ? Fo(l, Bo(c.walk, l), c.walking) : l;
|
|
6851
|
+
c.talk > 0 && (h = { ...h, mouth: Math.max(h.mouth, c.talk * Oo(a)) }), r.translate(n / 2, e), jo(r, h, t);
|
|
6846
6852
|
}
|
|
6847
6853
|
};
|
|
6848
6854
|
}
|
|
6849
|
-
function
|
|
6855
|
+
function Aa(i, t) {
|
|
6850
6856
|
const e = [];
|
|
6851
6857
|
return t.forEach((n, s) => {
|
|
6852
|
-
const r = s === 0 ? ht : e[s - 1], o = typeof n.pose == "string" ?
|
|
6853
|
-
e.push(n.expression ?
|
|
6854
|
-
}),
|
|
6858
|
+
const r = s === 0 ? ht : e[s - 1], o = typeof n.pose == "string" ? $o[n.pose] : { ...r, ...n.pose };
|
|
6859
|
+
e.push(n.expression ? Lo(o, n.expression) : o);
|
|
6860
|
+
}), tn.filter((n) => e.some((s) => s[n] !== ht[n])).map((n) => ({
|
|
6855
6861
|
id: `${i}-${n}`,
|
|
6856
6862
|
target: i,
|
|
6857
6863
|
property: n,
|
|
@@ -6862,7 +6868,7 @@ function xa(i, t) {
|
|
|
6862
6868
|
}))
|
|
6863
6869
|
}));
|
|
6864
6870
|
}
|
|
6865
|
-
function
|
|
6871
|
+
function Ea(i) {
|
|
6866
6872
|
const { timeline: t } = i, e = new J();
|
|
6867
6873
|
for (const [l, h] of Object.entries(i.targets)) {
|
|
6868
6874
|
const f = typeof h == "string" ? document.querySelector(h) : h;
|
|
@@ -6903,8 +6909,8 @@ function Sa(i) {
|
|
|
6903
6909
|
}
|
|
6904
6910
|
};
|
|
6905
6911
|
}
|
|
6906
|
-
const
|
|
6907
|
-
timeline:
|
|
6912
|
+
const Pa = {
|
|
6913
|
+
timeline: Us,
|
|
6908
6914
|
to(i, t, e) {
|
|
6909
6915
|
const n = new ot(e);
|
|
6910
6916
|
return n.to(i, t), n;
|
|
@@ -6921,184 +6927,185 @@ const Ma = {
|
|
|
6921
6927
|
const n = new ot(e);
|
|
6922
6928
|
return n.set(i, t), n;
|
|
6923
6929
|
}
|
|
6924
|
-
},
|
|
6925
|
-
|
|
6930
|
+
}, Ca = Y.to, _a = Y.from, Ia = Y.fromTo, Ra = Y.set, La = Y.timeline, $a = Y.ticker, Fa = Y.splitText, Da = Y.context, Ba = Y.matchMedia, Oa = Y.quickTo, Na = Y.imageSequence, qa = Y.pageTransition;
|
|
6931
|
+
Io();
|
|
6926
6932
|
export {
|
|
6927
|
-
|
|
6933
|
+
zo as Clock,
|
|
6928
6934
|
ot as CompatTimeline,
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
+
Jr as CustomBounce,
|
|
6936
|
+
Qr as CustomEase,
|
|
6937
|
+
to as CustomWiggle,
|
|
6938
|
+
xi as DEFAULT_BAKE_INTERVAL_MS,
|
|
6939
|
+
Ee as DEFAULT_INERTIA_FRICTION,
|
|
6940
|
+
fo as DEFAULT_LABELS,
|
|
6935
6941
|
X as DEFAULT_SPRING,
|
|
6936
|
-
|
|
6937
|
-
|
|
6942
|
+
xa as DEFAULT_TRANSITION,
|
|
6943
|
+
Wi as Draggable,
|
|
6938
6944
|
Z as EXPRESSIONS,
|
|
6939
6945
|
Lt as FORMAT_VERSION,
|
|
6940
|
-
|
|
6941
|
-
|
|
6946
|
+
dn as INERTIA_MAX_DURATION_MS,
|
|
6947
|
+
ns as InertiaTrackPlayer,
|
|
6942
6948
|
H as LiveTimeline,
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6949
|
+
ea as MORPH_SAMPLES,
|
|
6950
|
+
Ho as ManualClock,
|
|
6951
|
+
fi as MediaSync,
|
|
6952
|
+
dr as Observer,
|
|
6953
|
+
$o as POSES,
|
|
6948
6954
|
ht as REST_POSE,
|
|
6949
|
-
|
|
6955
|
+
bi as SPRING_MAX_DURATION_MS,
|
|
6950
6956
|
Ht as SPRING_PRESETS,
|
|
6951
6957
|
yt as SPRING_STEP_MS,
|
|
6952
|
-
|
|
6958
|
+
Fr as ScrollAnimator,
|
|
6953
6959
|
jt as ScrollDriver,
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6960
|
+
Dr as ScrollMarkers,
|
|
6961
|
+
_r as ScrollPin,
|
|
6962
|
+
ri as SmoothScroll,
|
|
6957
6963
|
Xt as SpringSampler,
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6964
|
+
is as SpringTrackPlayer,
|
|
6965
|
+
rr as Stage,
|
|
6966
|
+
Ci as Timeline,
|
|
6967
|
+
Ae as TinyflyPlayer,
|
|
6968
|
+
Ro as TinyflySequencer,
|
|
6963
6969
|
Qt as TrackPlayer,
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6970
|
+
ua as ValueResolver,
|
|
6971
|
+
Cr as VisibilityDriver,
|
|
6972
|
+
Mn as backOut,
|
|
6973
|
+
Ei as bakeEasing,
|
|
6974
|
+
Mi as bakeInertiaTrack,
|
|
6975
|
+
Si as bakeSpringTrack,
|
|
6976
|
+
So as bindChoiceHotspots,
|
|
6977
|
+
Fo as blendPose,
|
|
6978
|
+
Sn as bounceOut,
|
|
6979
|
+
rs as charactersFor,
|
|
6980
|
+
zi as clamp01,
|
|
6981
|
+
ia as clearMorphCache,
|
|
6982
|
+
Jo as clearPathCache,
|
|
6983
|
+
ii as containerProgressAt,
|
|
6984
|
+
Da as context,
|
|
6985
|
+
wa as create,
|
|
6986
|
+
yo as createControls,
|
|
6987
|
+
kn as createCubicBezier,
|
|
6988
|
+
oo as createLive,
|
|
6989
|
+
fs as createRandom,
|
|
6984
6990
|
ue as createTrack,
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6991
|
+
Zo as criticalDamping,
|
|
6992
|
+
ys as customBounce,
|
|
6993
|
+
gs as customEase,
|
|
6994
|
+
bs as customWiggle,
|
|
6989
6995
|
wt as deserializeTimeline,
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
+
hs as deserializeTrack,
|
|
6997
|
+
ma as draggable,
|
|
6998
|
+
jo as drawStickFigure,
|
|
6999
|
+
bn as easeIn,
|
|
7000
|
+
vi as easeInCubic,
|
|
7001
|
+
wn as easeInOut,
|
|
6996
7002
|
Wt as easeInOutCubic,
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7003
|
+
yn as easeInOutQuad,
|
|
7004
|
+
mn as easeInQuad,
|
|
7005
|
+
vn as easeOut,
|
|
7006
|
+
wi as easeOutCubic,
|
|
7007
|
+
gn as easeOutQuad,
|
|
7008
|
+
xn as elasticOut,
|
|
7009
|
+
ts as expandParametricEasings,
|
|
7010
|
+
_a as from,
|
|
7011
|
+
aa as fromJSON,
|
|
7012
|
+
Ia as fromTo,
|
|
7007
7013
|
z as getEasingFunction,
|
|
7008
7014
|
Ft as getInterpolator,
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7015
|
+
Pi as getMotionPathPoint,
|
|
7016
|
+
ta as getPathLength,
|
|
7017
|
+
Dn as getPointAtProgress,
|
|
7018
|
+
mr as gridLinesFor,
|
|
7019
|
+
ln as hasKeyframes,
|
|
7020
|
+
ca as hashSeed,
|
|
7021
|
+
Na as imageSequence,
|
|
7016
7022
|
xt as inertiaDuration,
|
|
7017
7023
|
kt as inertiaRest,
|
|
7018
7024
|
ce as inertiaValueAt,
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7025
|
+
Qo as inertiaVelocityAt,
|
|
7026
|
+
Qn as interpolateArray,
|
|
7027
|
+
Zn as interpolateColor,
|
|
7028
|
+
ra as interpolateMotionPath,
|
|
7023
7029
|
U as interpolateNumber,
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7030
|
+
Jn as interpolatePathString,
|
|
7031
|
+
Ye as interpolateString,
|
|
7032
|
+
cn as isCubicBezierEasing,
|
|
7027
7033
|
tt as isInertiaTrack,
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7034
|
+
Uo as isMotionPathPoint,
|
|
7035
|
+
mi as isMotionPathTrack,
|
|
7036
|
+
Rt as isParametricEasing,
|
|
7031
7037
|
St as isPathData,
|
|
7032
7038
|
et as isSpringTrack,
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7039
|
+
ve as isTextTrack,
|
|
7040
|
+
Ko as isUnderdamped,
|
|
7041
|
+
ha as isUnresolved,
|
|
7036
7042
|
le as linear,
|
|
7037
7043
|
Y as live,
|
|
7038
7044
|
Dt as mapEase,
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7045
|
+
Ba as matchMedia,
|
|
7046
|
+
yi as maxStaggerDistance,
|
|
7047
|
+
zn as morphPath,
|
|
7048
|
+
Ao as mount,
|
|
7049
|
+
Co as mountAll,
|
|
7050
|
+
da as narrationMarkers,
|
|
7051
|
+
pa as narrationSceneAt,
|
|
7046
7052
|
$t as naturalRest,
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7053
|
+
qa as pageTransition,
|
|
7054
|
+
En as parametricEasing,
|
|
7055
|
+
ei as parseEdge,
|
|
7050
7056
|
at as parsePath,
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7057
|
+
Hi as parseTrigger,
|
|
7058
|
+
fa as planNarration,
|
|
7059
|
+
va as play,
|
|
7060
|
+
ka as playSequence,
|
|
7061
|
+
ya as playWhenVisible,
|
|
7062
|
+
_i as playheadCrossings,
|
|
7063
|
+
Ti as pointAtDistance,
|
|
7064
|
+
Ss as pointsToPath,
|
|
7059
7065
|
j as pose,
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7066
|
+
Aa as poseTracks,
|
|
7067
|
+
Ea as quickPlay,
|
|
7068
|
+
Oa as quickTo,
|
|
7063
7069
|
Ri as randomBetween,
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7070
|
+
la as randomChoice,
|
|
7071
|
+
ds as randomSnapped,
|
|
7072
|
+
ps as resolveSequence,
|
|
7073
|
+
Fi as resolveValue,
|
|
7074
|
+
ga as scrollProgress,
|
|
7075
|
+
ba as scrubOnScroll,
|
|
7076
|
+
us as serializeTimeline,
|
|
7077
|
+
ls as serializeTrack,
|
|
7078
|
+
Ra as set,
|
|
7079
|
+
Te as shapeToPathData,
|
|
7080
|
+
es as simplifyKeyframes,
|
|
7081
|
+
Pr as smoothToward,
|
|
7082
|
+
pr as snapAxis,
|
|
7083
|
+
Rr as snapConfig,
|
|
7084
|
+
$r as snapDuration,
|
|
7085
|
+
Lr as snapProgress,
|
|
7086
|
+
Fa as splitText,
|
|
7087
|
+
hn as springDuration,
|
|
7088
|
+
Go as springValueAt,
|
|
7089
|
+
gi as staggerDistance,
|
|
7090
|
+
we as staggerOffset,
|
|
7085
7091
|
ae as staggerOffsets,
|
|
7086
7092
|
Yt as staggerSpan,
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7093
|
+
An as stepsEasing,
|
|
7094
|
+
Ma as stickFigureTarget,
|
|
7095
|
+
Sa as strideLength,
|
|
7096
|
+
uo as syncMediaElement,
|
|
7097
|
+
Oo as talkingMouth,
|
|
7098
|
+
as as textAt,
|
|
7099
|
+
Pa as tf,
|
|
7100
|
+
$a as ticker,
|
|
7101
|
+
La as timeline,
|
|
7102
|
+
Ca as to,
|
|
7103
|
+
oa as toJSON,
|
|
7104
|
+
na as toKeyframedTrack,
|
|
7105
|
+
sa as toKeyframedTracks,
|
|
7099
7106
|
Q as trackTargets,
|
|
7100
7107
|
Tt as triggerDistance,
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7108
|
+
Ta as unmount,
|
|
7109
|
+
Bo as walkPose,
|
|
7110
|
+
Lo as withExpression
|
|
7104
7111
|
};
|