@algorisys/tinyfly 0.93.0 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/docs/acting.md +68 -0
- package/docs/api-reference.md +3 -1
- package/docs/editor-guide.md +1 -1
- package/docs/examples.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/gsap-compat.md +1 -1
- package/docs/llm-guide.md +25 -0
- package/docs/maps.md +2 -2
- package/docs/props.md +202 -0
- package/docs/scene-3d.md +141 -0
- package/docs/teaching.md +1 -1
- package/lib/addons/characters.js +5647 -2519
- package/lib/addons/scene-3d.js +140 -138
- package/lib/browser/tinyfly-scene-3d.iife.js +1 -1
- package/lib/browser/tinyfly.iife.js +15 -9
- package/lib/browser/tinyfly.js +7059 -3876
- package/lib/browser/tinyfly.umd.js +15 -9
- package/lib/engine/tinyfly-engine.js +612 -600
- package/lib/engine/tinyfly-engine.umd.cjs +2 -2
- package/lib/types/characters/acting/beat-check.d.ts +12 -5
- package/lib/types/characters/acting/custom.d.ts +66 -0
- package/lib/types/characters/acting/gags.d.ts +10 -0
- package/lib/types/characters/acting/hand-path.d.ts +3 -0
- package/lib/types/characters/acting/index.d.ts +2 -0
- package/lib/types/characters/acting/persona.d.ts +93 -0
- package/lib/types/characters/acting/script.d.ts +10 -5
- package/lib/types/characters/capabilities.d.ts +30 -2
- package/lib/types/characters/character-script-3d.d.ts +80 -0
- package/lib/types/characters/character.d.ts +19 -0
- package/lib/types/characters/figure-actions.d.ts +4 -3
- package/lib/types/characters/ground-path.d.ts +32 -0
- package/lib/types/characters/index.d.ts +3 -0
- package/lib/types/characters/props/clip.d.ts +5 -0
- package/lib/types/characters/props/draw.d.ts +60 -0
- package/lib/types/characters/props/effects.d.ts +12 -0
- package/lib/types/characters/props/families/aircraft.d.ts +37 -0
- package/lib/types/characters/props/families/animals.d.ts +156 -0
- package/lib/types/characters/props/families/birds.d.ts +86 -0
- package/lib/types/characters/props/families/environment.d.ts +71 -0
- package/lib/types/characters/props/families/vehicle.d.ts +129 -0
- package/lib/types/characters/props/hidden.d.ts +49 -0
- package/lib/types/characters/props/index.d.ts +23 -0
- package/lib/types/characters/props/mesh-3d.d.ts +24 -0
- package/lib/types/characters/props/presets.d.ts +34 -0
- package/lib/types/characters/props/ride-3d.d.ts +71 -0
- package/lib/types/characters/props/ride.d.ts +79 -0
- package/lib/types/characters/props/rig.d.ts +224 -0
- package/lib/types/characters/props/scene-objects.d.ts +2 -0
- package/lib/types/characters/props/script-3d.d.ts +85 -0
- package/lib/types/characters/props/script.d.ts +145 -0
- package/lib/types/characters/props/shapes.d.ts +96 -0
- package/lib/types/characters/props/slice.d.ts +66 -0
- package/lib/types/characters/props/target.d.ts +129 -0
- package/lib/types/characters/stick-figure.d.ts +7 -2
- package/lib/types/engine/authoring/index.d.ts +1 -0
- package/lib/types/engine/authoring/spring-follow.d.ts +25 -0
- package/lib/types/scene-3d/object-kind.d.ts +4 -1
- package/lib/types/scene-3d/scene-types.d.ts +41 -1
- package/llms-full.txt +512 -10
- package/llms.txt +28 -27
- package/package.json +1 -1
- package/skills/tinyfly/SKILL.md +11 -0
|
@@ -5,7 +5,7 @@ function xt(t) {
|
|
|
5
5
|
return typeof t == "object" && t !== null && t.type !== "cubic-bezier";
|
|
6
6
|
}
|
|
7
7
|
const Xt = 2;
|
|
8
|
-
function
|
|
8
|
+
function se(t) {
|
|
9
9
|
return t.some((e) => e.interpolation !== void 0) ? 2 : 1;
|
|
10
10
|
}
|
|
11
11
|
function $t(t) {
|
|
@@ -17,16 +17,16 @@ function j(t) {
|
|
|
17
17
|
function V(t) {
|
|
18
18
|
return t.kind === "spring" && "spring" in t;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function re(t) {
|
|
21
21
|
return t.property === "motionPath" && "motionPathConfig" in t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Rs(t) {
|
|
24
24
|
return typeof t == "object" && t !== null && "x" in t && "y" in t && "angle" in t;
|
|
25
25
|
}
|
|
26
26
|
function Ne(t) {
|
|
27
27
|
return "keyframes" in t;
|
|
28
28
|
}
|
|
29
|
-
class
|
|
29
|
+
class Cs {
|
|
30
30
|
_currentTime = 0;
|
|
31
31
|
_isRunning = !1;
|
|
32
32
|
onTick = null;
|
|
@@ -52,7 +52,7 @@ class Cr {
|
|
|
52
52
|
this._currentTime = e;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
class
|
|
55
|
+
class Ds {
|
|
56
56
|
_currentTime = 0;
|
|
57
57
|
_isRunning = !1;
|
|
58
58
|
_lastFrameTime = null;
|
|
@@ -92,8 +92,8 @@ class Dr {
|
|
|
92
92
|
_onFrame(e) {
|
|
93
93
|
if (this._isRunning) {
|
|
94
94
|
if (this._lastFrameTime !== null) {
|
|
95
|
-
const
|
|
96
|
-
this._currentTime +=
|
|
95
|
+
const s = (e - this._lastFrameTime) * this._speed;
|
|
96
|
+
this._currentTime += s, this.onTick?.(s, this._currentTime);
|
|
97
97
|
}
|
|
98
98
|
this._lastFrameTime = e, this._scheduleFrame();
|
|
99
99
|
}
|
|
@@ -107,8 +107,8 @@ function Xe(t, e) {
|
|
|
107
107
|
function oe(t, e, n = "start") {
|
|
108
108
|
if (e <= 1) return 0;
|
|
109
109
|
if (typeof n == "number") {
|
|
110
|
-
const
|
|
111
|
-
return Math.abs(t -
|
|
110
|
+
const s = Math.max(0, Math.min(e - 1, n));
|
|
111
|
+
return Math.abs(t - s);
|
|
112
112
|
}
|
|
113
113
|
switch (n) {
|
|
114
114
|
case "end":
|
|
@@ -124,33 +124,33 @@ function oe(t, e, n = "start") {
|
|
|
124
124
|
function Ye(t, e = "start") {
|
|
125
125
|
if (t <= 1) return 0;
|
|
126
126
|
let n = 0;
|
|
127
|
-
for (let
|
|
128
|
-
n = Math.max(n, oe(
|
|
127
|
+
for (let s = 0; s < t; s++)
|
|
128
|
+
n = Math.max(n, oe(s, t, e));
|
|
129
129
|
return n;
|
|
130
130
|
}
|
|
131
131
|
function ae(t, e, n) {
|
|
132
132
|
if (n.offsets) return n.offsets[t] ?? 0;
|
|
133
|
-
const
|
|
133
|
+
const s = n.from ?? "start", r = oe(t, e, s);
|
|
134
134
|
if (n.amount !== void 0) {
|
|
135
|
-
const o = Ye(e,
|
|
136
|
-
return o === 0 ? 0 : n.amount *
|
|
135
|
+
const o = Ye(e, s);
|
|
136
|
+
return o === 0 ? 0 : n.amount * r / o;
|
|
137
137
|
}
|
|
138
|
-
return n.each !== void 0 ? n.each *
|
|
138
|
+
return n.each !== void 0 ? n.each * r : 0;
|
|
139
139
|
}
|
|
140
140
|
function ze(t, e) {
|
|
141
|
-
return Array.from({ length: t }, (n,
|
|
141
|
+
return Array.from({ length: t }, (n, s) => ae(s, t, e));
|
|
142
142
|
}
|
|
143
143
|
function Rt(t, e) {
|
|
144
144
|
return t <= 1 ? 0 : Math.max(...ze(t, e));
|
|
145
145
|
}
|
|
146
|
-
const tt = 1, ie = 6e4,
|
|
146
|
+
const tt = 1, ie = 6e4, rt = ie / tt, L = {
|
|
147
147
|
stiffness: 180,
|
|
148
148
|
damping: 12,
|
|
149
149
|
mass: 1,
|
|
150
150
|
velocity: 0,
|
|
151
151
|
restDelta: 0.01,
|
|
152
152
|
restSpeed: 0.1
|
|
153
|
-
},
|
|
153
|
+
}, Is = {
|
|
154
154
|
gentle: { stiffness: 120, damping: 18, mass: 1 },
|
|
155
155
|
default: { stiffness: 180, damping: 12, mass: 1 },
|
|
156
156
|
snappy: { stiffness: 280, damping: 20, mass: 1 },
|
|
@@ -204,43 +204,43 @@ class ut {
|
|
|
204
204
|
const n = Math.floor(e / tt);
|
|
205
205
|
if (this.simulateTo(n + 1), this.settledStep !== null && n >= this.settledStep)
|
|
206
206
|
return this.to;
|
|
207
|
-
const
|
|
208
|
-
return
|
|
207
|
+
const s = this.samples[Math.min(n, this.samples.length - 1)], r = this.samples[Math.min(n + 1, this.samples.length - 1)], o = e / tt - n;
|
|
208
|
+
return s + (r - s) * o;
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
211
|
* How long the spring takes to settle, in milliseconds — the natural duration
|
|
212
212
|
* of a spring track. Runs the simulation to completion once.
|
|
213
213
|
*/
|
|
214
214
|
settleTime() {
|
|
215
|
-
return this.simulateTo(
|
|
215
|
+
return this.simulateTo(rt + 1), this.settledStep !== null ? this.settledStep * tt : ie;
|
|
216
216
|
}
|
|
217
217
|
/** Advance the cached simulation until it holds at least `steps` samples. */
|
|
218
218
|
simulateTo(e) {
|
|
219
219
|
if (this.settledStep !== null) return;
|
|
220
|
-
const n = Math.min(e,
|
|
220
|
+
const n = Math.min(e, rt + 1), s = tt / 1e3;
|
|
221
221
|
for (; this.samples.length < n; ) {
|
|
222
|
-
const
|
|
223
|
-
this.velocity += c *
|
|
224
|
-
const l =
|
|
222
|
+
const r = this.samples[this.samples.length - 1], o = r - this.to, a = -this.stiffness * o, i = -this.damping * this.velocity, c = (a + i) / this.mass;
|
|
223
|
+
this.velocity += c * s;
|
|
224
|
+
const l = r + this.velocity * s;
|
|
225
225
|
if (this.samples.push(l), this.isAtRest(l)) {
|
|
226
226
|
this.settledStep = this.samples.length - 1;
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
this.samples.length >
|
|
230
|
+
this.samples.length > rt && (this.settledStep = rt);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Es(t, e) {
|
|
234
234
|
return new ut(t).valueAt(e);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function Ls(t) {
|
|
237
237
|
return new ut(t).settleTime();
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
const e = t.stiffness ?? L.stiffness, n = t.damping ?? L.damping,
|
|
241
|
-
return n < 2 * Math.sqrt(e *
|
|
239
|
+
function Os(t) {
|
|
240
|
+
const e = t.stiffness ?? L.stiffness, n = t.damping ?? L.damping, s = t.mass ?? L.mass;
|
|
241
|
+
return n < 2 * Math.sqrt(e * s);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Fs(t) {
|
|
244
244
|
const e = t.stiffness ?? L.stiffness, n = t.mass ?? L.mass;
|
|
245
245
|
return 2 * Math.sqrt(e * n);
|
|
246
246
|
}
|
|
@@ -258,8 +258,8 @@ function Be(t, e) {
|
|
|
258
258
|
return e > 0 ? Math.round(t / e) * e : t;
|
|
259
259
|
if (e.length === 0) return t;
|
|
260
260
|
let n = e[0];
|
|
261
|
-
for (const
|
|
262
|
-
Math.abs(
|
|
261
|
+
for (const s of e)
|
|
262
|
+
Math.abs(s - t) < Math.abs(n - t) && (n = s);
|
|
263
263
|
return n;
|
|
264
264
|
}
|
|
265
265
|
function ht(t) {
|
|
@@ -271,19 +271,19 @@ function ft(t) {
|
|
|
271
271
|
if (e === 0) return 0;
|
|
272
272
|
const n = t.restDelta ?? Math.max(je, e * Ue);
|
|
273
273
|
if (n >= e) return 0;
|
|
274
|
-
const
|
|
275
|
-
return Math.min(Ve,
|
|
274
|
+
const s = Math.log(e / n) / lt(t);
|
|
275
|
+
return Math.min(Ve, s * 1e3);
|
|
276
276
|
}
|
|
277
277
|
function kt(t, e) {
|
|
278
278
|
if (e <= 0) return t.from;
|
|
279
279
|
const n = ht(t);
|
|
280
280
|
if (e >= ft(t)) return n;
|
|
281
|
-
const
|
|
282
|
-
return t.from + (n - t.from) * (1 - Math.exp(-
|
|
281
|
+
const s = lt(t);
|
|
282
|
+
return t.from + (n - t.from) * (1 - Math.exp(-s * e / 1e3));
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
const n = lt(t),
|
|
286
|
-
return e >= ft(t) ? 0 : (
|
|
284
|
+
function Ns(t, e) {
|
|
285
|
+
const n = lt(t), s = ht(t);
|
|
286
|
+
return e >= ft(t) ? 0 : (s - t.from) * n * Math.exp(-n * Math.max(0, e) / 1e3);
|
|
287
287
|
}
|
|
288
288
|
const wt = (t) => t, We = (t) => t * t, Qe = (t) => 1 - (1 - t) * (1 - t), Ge = (t) => t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2, ce = (t) => t * t * t, ue = (t) => 1 - Math.pow(1 - t, 3), le = (t) => t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2, Ke = ce, Ze = ue, qe = le, Je = {
|
|
289
289
|
linear: wt,
|
|
@@ -298,7 +298,7 @@ const wt = (t) => t, We = (t) => t * t, Qe = (t) => 1 - (1 - t) * (1 - t), Ge =
|
|
|
298
298
|
"ease-in-out-cubic": le
|
|
299
299
|
};
|
|
300
300
|
function tn(t) {
|
|
301
|
-
const [e, n,
|
|
301
|
+
const [e, n, s, r] = t, o = 3 * e, a = 3 * (s - e) - o, i = 1 - o - a, c = 3 * n, l = 3 * (r - n) - c, h = 1 - c - l, u = (p) => ((i * p + a) * p + o) * p, f = (p) => ((h * p + l) * p + c) * p, d = (p) => (3 * i * p + 2 * a) * p + o, m = (p) => {
|
|
302
302
|
let g = p;
|
|
303
303
|
for (let k = 0; k < 8; k++) {
|
|
304
304
|
const w = u(g) - p;
|
|
@@ -327,29 +327,29 @@ function tn(t) {
|
|
|
327
327
|
}
|
|
328
328
|
function gt(t, e = "out") {
|
|
329
329
|
if (e === "out") return t;
|
|
330
|
-
const n = (
|
|
331
|
-
return e === "in" ? n : (
|
|
330
|
+
const n = (s) => 1 - t(1 - s);
|
|
331
|
+
return e === "in" ? n : (s) => s < 0.5 ? n(s * 2) / 2 : t(s * 2 - 1) / 2 + 0.5;
|
|
332
332
|
}
|
|
333
333
|
function en(t = 1, e = 0.3) {
|
|
334
|
-
const n = Math.max(1, t),
|
|
335
|
-
return (
|
|
334
|
+
const n = Math.max(1, t), s = e / (2 * Math.PI) * Math.asin(1 / n);
|
|
335
|
+
return (r) => r <= 0 ? 0 : r >= 1 ? 1 : n * Math.pow(2, -10 * r) * Math.sin((r - s) * (2 * Math.PI) / e) + 1;
|
|
336
336
|
}
|
|
337
337
|
const nn = (t) => {
|
|
338
338
|
if (t <= 0) return 0;
|
|
339
339
|
if (t >= 1) return 1;
|
|
340
340
|
if (t < 1 / 2.75) return 7.5625 * t * t;
|
|
341
341
|
if (t < 2 / 2.75) {
|
|
342
|
-
const
|
|
343
|
-
return 7.5625 *
|
|
342
|
+
const r = t - 0.5454545454545454;
|
|
343
|
+
return 7.5625 * r * r + 0.75;
|
|
344
344
|
}
|
|
345
345
|
if (t < 2.5 / 2.75) {
|
|
346
|
-
const
|
|
347
|
-
return 7.5625 *
|
|
346
|
+
const r = t - 0.8181818181818182;
|
|
347
|
+
return 7.5625 * r * r + 0.9375;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
return 7.5625 *
|
|
349
|
+
const s = t - 2.625 / 2.75;
|
|
350
|
+
return 7.5625 * s * s + 0.984375;
|
|
351
351
|
};
|
|
352
|
-
function
|
|
352
|
+
function sn(t = 1.70158) {
|
|
353
353
|
return (e) => {
|
|
354
354
|
if (e <= 0) return 0;
|
|
355
355
|
if (e >= 1) return 1;
|
|
@@ -357,34 +357,34 @@ function rn(t = 1.70158) {
|
|
|
357
357
|
return n * n * ((t + 1) * n + t) + 1;
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function rn(t, e = "end") {
|
|
361
361
|
const n = Math.max(1, Math.floor(t));
|
|
362
|
-
return (
|
|
363
|
-
if (
|
|
364
|
-
if (
|
|
365
|
-
const
|
|
362
|
+
return (s) => {
|
|
363
|
+
if (s >= 1) return 1;
|
|
364
|
+
if (s <= 0) return e === "start" || e === "both" ? e === "start" ? 1 / n : 1 / (n + 1) : 0;
|
|
365
|
+
const r = Math.floor(s * n);
|
|
366
366
|
switch (e) {
|
|
367
367
|
case "start":
|
|
368
|
-
return Math.min(1, (
|
|
368
|
+
return Math.min(1, (r + 1) / n);
|
|
369
369
|
case "both":
|
|
370
|
-
return (
|
|
370
|
+
return (r + 1) / (n + 1);
|
|
371
371
|
case "none":
|
|
372
|
-
return n === 1 ? 0 : Math.min(1,
|
|
372
|
+
return n === 1 ? 0 : Math.min(1, r / (n - 1));
|
|
373
373
|
default:
|
|
374
|
-
return
|
|
374
|
+
return r / n;
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
function on(t) {
|
|
379
379
|
switch (t.type) {
|
|
380
380
|
case "steps":
|
|
381
|
-
return
|
|
381
|
+
return rn(t.count, t.position);
|
|
382
382
|
case "elastic":
|
|
383
383
|
return gt(en(t.amplitude, t.period), t.mode);
|
|
384
384
|
case "bounce":
|
|
385
385
|
return gt(nn, t.mode);
|
|
386
386
|
case "back":
|
|
387
|
-
return gt(
|
|
387
|
+
return gt(sn(t.overshoot), t.mode);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
function he(t) {
|
|
@@ -404,40 +404,40 @@ const zt = 32, an = 256, W = /* @__PURE__ */ new Map(), cn = /[MmLlHhVvCcSsQqTtA
|
|
|
404
404
|
};
|
|
405
405
|
function hn(t) {
|
|
406
406
|
const e = [];
|
|
407
|
-
let n = 0,
|
|
408
|
-
const
|
|
407
|
+
let n = 0, s = null;
|
|
408
|
+
const r = () => {
|
|
409
409
|
for (; n < t.length && /[\s,]/.test(t[n]); ) n++;
|
|
410
410
|
};
|
|
411
|
-
for (; n < t.length && (
|
|
411
|
+
for (; n < t.length && (r(), !(n >= t.length)); ) {
|
|
412
412
|
const o = t[n];
|
|
413
413
|
if (cn.test(o)) {
|
|
414
|
-
|
|
414
|
+
s = { type: o, args: [] }, e.push(s), n++;
|
|
415
415
|
continue;
|
|
416
416
|
}
|
|
417
|
-
if (!
|
|
418
|
-
const a =
|
|
417
|
+
if (!s) break;
|
|
418
|
+
const a = s.type === "A" || s.type === "a", i = s.args.length % 7;
|
|
419
419
|
if (a && (i === 3 || i === 4)) {
|
|
420
420
|
if (o !== "0" && o !== "1") break;
|
|
421
|
-
|
|
421
|
+
s.args.push(o === "1" ? 1 : 0), n++;
|
|
422
422
|
continue;
|
|
423
423
|
}
|
|
424
424
|
const c = un.exec(t.slice(n));
|
|
425
425
|
if (!c) break;
|
|
426
|
-
|
|
426
|
+
s.args.push(parseFloat(c[0])), n += c[0].length;
|
|
427
427
|
}
|
|
428
428
|
return e;
|
|
429
429
|
}
|
|
430
|
-
function fn(t, e, n,
|
|
430
|
+
function fn(t, e, n, s, r, o, a, i, c) {
|
|
431
431
|
if (t === i && e === c) return [];
|
|
432
|
-
let l = Math.abs(n), h = Math.abs(
|
|
432
|
+
let l = Math.abs(n), h = Math.abs(s);
|
|
433
433
|
if (l === 0 || h === 0) return [[t, e, i, c, i, c]];
|
|
434
|
-
const u =
|
|
434
|
+
const u = r * Math.PI / 180, f = Math.cos(u), d = Math.sin(u), m = (t - i) / 2, p = (e - c) / 2, g = f * m + d * p, M = -d * m + f * p, y = g * g / (l * l) + M * M / (h * h);
|
|
435
435
|
if (y > 1) {
|
|
436
436
|
const R = Math.sqrt(y);
|
|
437
437
|
l *= R, h *= R;
|
|
438
438
|
}
|
|
439
439
|
const k = o === a ? -1 : 1, w = l * l * h * h - l * l * M * M - h * h * g * g, b = l * l * M * M + h * h * g * g, v = k * Math.sqrt(Math.max(0, w / b)), A = v * l * M / h, C = -v * h * g / l, _ = f * A - d * C + (t + i) / 2, T = d * A + f * C + (e + c) / 2, x = (R, I, E, H) => {
|
|
440
|
-
const pt = R * E + I * H,
|
|
440
|
+
const pt = R * E + I * H, st = Math.sqrt((R * R + I * I) * (E * E + H * H)), Z = Math.acos(Math.max(-1, Math.min(1, pt / st)));
|
|
441
441
|
return R * H - I * E < 0 ? -Z : Z;
|
|
442
442
|
}, S = x(1, 0, (g - A) / l, (M - C) / h);
|
|
443
443
|
let $ = x((g - A) / l, (M - C) / h, (-g - A) / l, (-M - C) / h);
|
|
@@ -450,42 +450,42 @@ function fn(t, e, n, r, s, o, a, i, c) {
|
|
|
450
450
|
return [f * I - d * E, d * I + f * E];
|
|
451
451
|
}, Nt = [];
|
|
452
452
|
for (let R = 0; R < P; R++) {
|
|
453
|
-
const I = S + R * dt, E = I + dt, [H, pt] = Ot(I), [
|
|
454
|
-
Nt.push([H + nt * Ie, pt + nt * Ee,
|
|
453
|
+
const I = S + R * dt, E = I + dt, [H, pt] = Ot(I), [st, Z] = R === P - 1 ? [i, c] : Ot(E), [Ie, Ee] = Ft(I), [Le, Oe] = Ft(E);
|
|
454
|
+
Nt.push([H + nt * Ie, pt + nt * Ee, st - nt * Le, Z - nt * Oe, st, Z]);
|
|
455
455
|
}
|
|
456
456
|
return Nt;
|
|
457
457
|
}
|
|
458
|
-
function Y(t, e, n,
|
|
459
|
-
const o = 1 -
|
|
460
|
-
return o * o * o * t + 3 * o * o *
|
|
458
|
+
function Y(t, e, n, s, r) {
|
|
459
|
+
const o = 1 - r;
|
|
460
|
+
return o * o * o * t + 3 * o * o * r * e + 3 * o * r * r * n + r * r * r * s;
|
|
461
461
|
}
|
|
462
|
-
function Ut(t, e, n,
|
|
463
|
-
const o = 1 -
|
|
464
|
-
return 3 * o * o * (e - t) + 6 * o *
|
|
462
|
+
function Ut(t, e, n, s, r) {
|
|
463
|
+
const o = 1 - r;
|
|
464
|
+
return 3 * o * o * (e - t) + 6 * o * r * (n - e) + 3 * r * r * (s - n);
|
|
465
465
|
}
|
|
466
|
-
function q(t, e, n,
|
|
466
|
+
function q(t, e, n, s) {
|
|
467
467
|
return {
|
|
468
468
|
subpath: 0,
|
|
469
469
|
type: "L",
|
|
470
|
-
points: [n,
|
|
470
|
+
points: [n, s],
|
|
471
471
|
startX: t,
|
|
472
472
|
startY: e,
|
|
473
473
|
endX: n,
|
|
474
|
-
endY:
|
|
475
|
-
length: Math.hypot(n - t,
|
|
474
|
+
endY: s,
|
|
475
|
+
length: Math.hypot(n - t, s - e)
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
478
|
function ot(t, e, n) {
|
|
479
|
-
const [
|
|
479
|
+
const [s, r, o, a, i, c] = n, l = [0];
|
|
480
480
|
let h = t, u = e, f = 0;
|
|
481
481
|
for (let d = 1; d <= zt; d++) {
|
|
482
|
-
const m = d / zt, p = Y(t,
|
|
482
|
+
const m = d / zt, p = Y(t, s, o, i, m), g = Y(e, r, a, c, m);
|
|
483
483
|
f += Math.hypot(p - h, g - u), l.push(f), h = p, u = g;
|
|
484
484
|
}
|
|
485
485
|
return {
|
|
486
486
|
subpath: 0,
|
|
487
487
|
type: "C",
|
|
488
|
-
points: [
|
|
488
|
+
points: [s, r, o, a, i, c],
|
|
489
489
|
startX: t,
|
|
490
490
|
startY: e,
|
|
491
491
|
endX: i,
|
|
@@ -498,65 +498,65 @@ function G(t) {
|
|
|
498
498
|
const e = W.get(t);
|
|
499
499
|
if (e) return e;
|
|
500
500
|
const n = [];
|
|
501
|
-
let
|
|
501
|
+
let s = 0, r = 0, o = 0, a = 0, i = null, c = null, l = -1;
|
|
502
502
|
const h = /* @__PURE__ */ new Set(), u = (p) => {
|
|
503
503
|
l < 0 && (l = 0), p.subpath = l, n.push(p);
|
|
504
504
|
};
|
|
505
505
|
for (const { type: p, args: g } of hn(t)) {
|
|
506
506
|
const M = p.toUpperCase(), y = p !== M, k = ln[M];
|
|
507
507
|
if (M === "Z") {
|
|
508
|
-
(
|
|
508
|
+
(s !== o || r !== a) && u(q(s, r, o, a)), l >= 0 && h.add(l), s = o, r = a, i = c = null;
|
|
509
509
|
continue;
|
|
510
510
|
}
|
|
511
511
|
for (let w = 0; w + k <= g.length; w += k) {
|
|
512
|
-
const b = g.slice(w, w + k), v = y ?
|
|
512
|
+
const b = g.slice(w, w + k), v = y ? s : 0, A = y ? r : 0;
|
|
513
513
|
let C = null, _ = null;
|
|
514
514
|
switch (M) {
|
|
515
515
|
case "M":
|
|
516
|
-
w === 0 ? (
|
|
516
|
+
w === 0 ? (s = b[0] + v, r = b[1] + A, o = s, a = r, (l < 0 || n[n.length - 1]?.subpath === l) && l++) : (u(q(s, r, b[0] + v, b[1] + A)), s = b[0] + v, r = b[1] + A);
|
|
517
517
|
break;
|
|
518
518
|
case "L":
|
|
519
|
-
u(q(
|
|
519
|
+
u(q(s, r, b[0] + v, b[1] + A)), s = b[0] + v, r = b[1] + A;
|
|
520
520
|
break;
|
|
521
521
|
case "H":
|
|
522
|
-
u(q(
|
|
522
|
+
u(q(s, r, b[0] + v, r)), s = b[0] + v;
|
|
523
523
|
break;
|
|
524
524
|
case "V":
|
|
525
|
-
u(q(r, s,
|
|
525
|
+
u(q(s, r, s, b[0] + A)), r = b[0] + A;
|
|
526
526
|
break;
|
|
527
527
|
case "C": {
|
|
528
528
|
const T = [b[0] + v, b[1] + A, b[2] + v, b[3] + A, b[4] + v, b[5] + A];
|
|
529
|
-
u(ot(
|
|
529
|
+
u(ot(s, r, T)), C = [T[2], T[3]], s = T[4], r = T[5];
|
|
530
530
|
break;
|
|
531
531
|
}
|
|
532
532
|
case "S": {
|
|
533
|
-
const [T, x] = i ? [2 *
|
|
534
|
-
u(ot(
|
|
533
|
+
const [T, x] = i ? [2 * s - i[0], 2 * r - i[1]] : [s, r], S = [T, x, b[0] + v, b[1] + A, b[2] + v, b[3] + A];
|
|
534
|
+
u(ot(s, r, S)), C = [S[2], S[3]], s = S[4], r = S[5];
|
|
535
535
|
break;
|
|
536
536
|
}
|
|
537
537
|
case "Q":
|
|
538
538
|
case "T": {
|
|
539
|
-
let T =
|
|
540
|
-
M === "Q" ? (T = b[0] + v, x = b[1] + A) : c && (T = 2 *
|
|
539
|
+
let T = s, x = r;
|
|
540
|
+
M === "Q" ? (T = b[0] + v, x = b[1] + A) : c && (T = 2 * s - c[0], x = 2 * r - c[1]);
|
|
541
541
|
const S = M === "Q" ? b[2] + v : b[0] + v, $ = M === "Q" ? b[3] + A : b[1] + A;
|
|
542
542
|
u(
|
|
543
|
-
ot(
|
|
544
|
-
|
|
545
|
-
|
|
543
|
+
ot(s, r, [
|
|
544
|
+
s + 2 / 3 * (T - s),
|
|
545
|
+
r + 2 / 3 * (x - r),
|
|
546
546
|
S + 2 / 3 * (T - S),
|
|
547
547
|
$ + 2 / 3 * (x - $),
|
|
548
548
|
S,
|
|
549
549
|
$
|
|
550
550
|
])
|
|
551
|
-
), _ = [T, x],
|
|
551
|
+
), _ = [T, x], s = S, r = $;
|
|
552
552
|
break;
|
|
553
553
|
}
|
|
554
554
|
case "A": {
|
|
555
555
|
const T = b[5] + v, x = b[6] + A;
|
|
556
|
-
let S =
|
|
557
|
-
for (const P of fn(
|
|
556
|
+
let S = s, $ = r;
|
|
557
|
+
for (const P of fn(s, r, b[0], b[1], b[2], b[3], b[4], T, x))
|
|
558
558
|
u(ot(S, $, P)), S = P[4], $ = P[5];
|
|
559
|
-
|
|
559
|
+
s = T, r = x;
|
|
560
560
|
break;
|
|
561
561
|
}
|
|
562
562
|
}
|
|
@@ -578,13 +578,13 @@ function dn(t, e) {
|
|
|
578
578
|
const n = t.lengths;
|
|
579
579
|
if (e <= 0) return 0;
|
|
580
580
|
if (e >= t.length) return 1;
|
|
581
|
-
let
|
|
582
|
-
for (;
|
|
583
|
-
const i =
|
|
584
|
-
n[i] < e ?
|
|
581
|
+
let s = 0, r = n.length - 1;
|
|
582
|
+
for (; s < r - 1; ) {
|
|
583
|
+
const i = s + r >> 1;
|
|
584
|
+
n[i] < e ? s = i : r = i;
|
|
585
585
|
}
|
|
586
|
-
const o = n[
|
|
587
|
-
return (
|
|
586
|
+
const o = n[r] - n[s], a = o > 0 ? (e - n[s]) / o : 0;
|
|
587
|
+
return (s + a) / (n.length - 1);
|
|
588
588
|
}
|
|
589
589
|
function pn(t, e) {
|
|
590
590
|
if (t.type === "L") {
|
|
@@ -595,89 +595,89 @@ function pn(t, e) {
|
|
|
595
595
|
angle: Math.atan2(t.endY - t.startY, t.endX - t.startX) * 180 / Math.PI
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
const [n,
|
|
599
|
-
let l = Ut(t.startX, n,
|
|
598
|
+
const [n, s, r, o, a, i] = t.points, c = dn(t, e);
|
|
599
|
+
let l = Ut(t.startX, n, r, a, c), h = Ut(t.startY, s, o, i, c);
|
|
600
600
|
if (Math.hypot(l, h) < 1e-9) {
|
|
601
|
-
const u = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), f = Y(t.startX, n,
|
|
601
|
+
const u = c < 0.5 ? Math.min(1, c + 1e-3) : Math.max(0, c - 1e-3), f = Y(t.startX, n, r, a, u), d = Y(t.startY, s, o, i, u), m = Y(t.startX, n, r, a, c), p = Y(t.startY, s, o, i, c);
|
|
602
602
|
l = c < 0.5 ? f - m : m - f, h = c < 0.5 ? d - p : p - d;
|
|
603
603
|
}
|
|
604
604
|
return {
|
|
605
|
-
x: Y(t.startX, n,
|
|
606
|
-
y: Y(t.startY,
|
|
605
|
+
x: Y(t.startX, n, r, a, c),
|
|
606
|
+
y: Y(t.startY, s, o, i, c),
|
|
607
607
|
angle: Math.atan2(h, l) * 180 / Math.PI
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
|
-
function fe(t, e, n = 0,
|
|
611
|
-
if (
|
|
612
|
-
let
|
|
613
|
-
for (let o = n; o <
|
|
610
|
+
function fe(t, e, n = 0, s = t.length) {
|
|
611
|
+
if (s <= n) return { x: 0, y: 0, angle: 0 };
|
|
612
|
+
let r = 0;
|
|
613
|
+
for (let o = n; o < s; o++) {
|
|
614
614
|
const a = t[o];
|
|
615
|
-
if (
|
|
616
|
-
return pn(a, e -
|
|
617
|
-
|
|
615
|
+
if (r + a.length >= e || o === s - 1)
|
|
616
|
+
return pn(a, e - r);
|
|
617
|
+
r += a.length;
|
|
618
618
|
}
|
|
619
619
|
return { x: 0, y: 0, angle: 0 };
|
|
620
620
|
}
|
|
621
621
|
function gn(t, e) {
|
|
622
|
-
const { segments: n, totalLength:
|
|
623
|
-
return fe(n, Math.max(0, Math.min(1, e)) *
|
|
622
|
+
const { segments: n, totalLength: s } = G(t);
|
|
623
|
+
return fe(n, Math.max(0, Math.min(1, e)) * s);
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function Xs() {
|
|
626
626
|
W.clear();
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Ys(t) {
|
|
629
629
|
return G(t).totalLength;
|
|
630
630
|
}
|
|
631
|
-
const mn = 24, yn = 320, Mn = 2.5, J = 72,
|
|
631
|
+
const mn = 24, yn = 320, Mn = 2.5, J = 72, zs = 64, _n = 0.2, bn = 128, et = /* @__PURE__ */ new Map();
|
|
632
632
|
let at = 0, X;
|
|
633
633
|
const jt = (t) => Math.round(t * 100) / 100;
|
|
634
634
|
function Vt(t, e) {
|
|
635
|
-
const { segments: n, subpaths:
|
|
635
|
+
const { segments: n, subpaths: s, totalLength: r } = G(t);
|
|
636
636
|
if (n.length === 0) return [];
|
|
637
637
|
if (e) {
|
|
638
|
-
const o =
|
|
639
|
-
return [{ segments: n, start: 0, end: n.length, length:
|
|
638
|
+
const o = s.every((a) => a.closed);
|
|
639
|
+
return [{ segments: n, start: 0, end: n.length, length: r, closed: o }];
|
|
640
640
|
}
|
|
641
|
-
return
|
|
641
|
+
return s.filter((o) => o.length > 0).map((o) => ({ segments: n, start: o.start, end: o.end, length: o.length, closed: o.closed }));
|
|
642
642
|
}
|
|
643
643
|
function St(t, e) {
|
|
644
|
-
const n = t.closed ? (e % 1 + 1) % 1 : Math.max(0, Math.min(1, e)),
|
|
645
|
-
return [
|
|
644
|
+
const n = t.closed ? (e % 1 + 1) % 1 : Math.max(0, Math.min(1, e)), s = fe(t.segments, n * t.length, t.start, t.end);
|
|
645
|
+
return [s.x, s.y];
|
|
646
646
|
}
|
|
647
647
|
function Ht(t) {
|
|
648
648
|
const e = [];
|
|
649
649
|
let n = 0;
|
|
650
|
-
for (let
|
|
651
|
-
n += t.segments[
|
|
650
|
+
for (let s = t.start; s < t.end; s++)
|
|
651
|
+
n += t.segments[s].length, t.length > 0 && e.push(n / t.length);
|
|
652
652
|
return e;
|
|
653
653
|
}
|
|
654
654
|
function Bt(t, e) {
|
|
655
655
|
const n = [];
|
|
656
|
-
for (let
|
|
657
|
-
n.push(St(t, t.closed ?
|
|
656
|
+
for (let s = 0; s < e; s++)
|
|
657
|
+
n.push(St(t, t.closed ? s / e : s / (e - 1)));
|
|
658
658
|
return n;
|
|
659
659
|
}
|
|
660
660
|
function Wt(t) {
|
|
661
661
|
let e = 0, n = 0;
|
|
662
|
-
for (const [
|
|
663
|
-
e +=
|
|
664
|
-
return e /= t.length, n /= t.length, t.map(([
|
|
662
|
+
for (const [s, r] of t)
|
|
663
|
+
e += s, n += r;
|
|
664
|
+
return e /= t.length, n /= t.length, t.map(([s, r]) => [s - e, r - n]);
|
|
665
665
|
}
|
|
666
666
|
function Tn(t, e, n) {
|
|
667
|
-
const
|
|
667
|
+
const s = t.closed && e.closed;
|
|
668
668
|
if (n !== void 0)
|
|
669
|
-
return { offset:
|
|
670
|
-
const
|
|
669
|
+
return { offset: s ? Math.abs(n) % J / J : 0, reversed: n < 0 };
|
|
670
|
+
const r = Wt(Bt(t, J)), o = Wt(Bt(e, J)), a = J;
|
|
671
671
|
let i = { offset: 0, reversed: !1 }, c = 1 / 0;
|
|
672
672
|
for (const l of [!1, !0]) {
|
|
673
|
-
const h =
|
|
673
|
+
const h = s ? a : 1;
|
|
674
674
|
for (let u = 0; u < h; u++) {
|
|
675
675
|
let f = 0;
|
|
676
676
|
for (let d = 0; d < a && f < c; d++) {
|
|
677
|
-
const m =
|
|
677
|
+
const m = s ? l ? (u - d + a) % a : (d + u) % a : l ? a - 1 - d : d, p = r[d][0] - o[m][0], g = r[d][1] - o[m][1];
|
|
678
678
|
f += p * p + g * g;
|
|
679
679
|
}
|
|
680
|
-
f < c && (c = f, i = { offset:
|
|
680
|
+
f < c && (c = f, i = { offset: s ? u / a : 0, reversed: l });
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
return i;
|
|
@@ -689,78 +689,78 @@ function kn(t, e, n) {
|
|
|
689
689
|
return n ? ((e.reversed ? e.offset - t : t - e.offset) % 1 + 1) % 1 : e.reversed ? 1 - t : t;
|
|
690
690
|
}
|
|
691
691
|
function wn(t, e, n) {
|
|
692
|
-
const
|
|
692
|
+
const s = t.closed && e.closed, r = Tn(t, e, n.shapeIndex), o = Math.max(
|
|
693
693
|
mn,
|
|
694
694
|
Math.min(yn, Math.ceil(Math.max(t.length, e.length) / Mn))
|
|
695
695
|
), a = /* @__PURE__ */ new Set(), i = (u) => a.add(Math.round(u * 1e7) / 1e7);
|
|
696
696
|
for (let u = 0; u <= o; u++) i(u / o);
|
|
697
697
|
for (const u of Ht(t)) i(u);
|
|
698
|
-
for (const u of Ht(e)) i(kn(u,
|
|
698
|
+
for (const u of Ht(e)) i(kn(u, r, s));
|
|
699
699
|
let c = [...a].sort((u, f) => u - f);
|
|
700
|
-
|
|
700
|
+
s && (c = c.filter((u) => u < 1));
|
|
701
701
|
const l = [], h = [];
|
|
702
702
|
for (const u of c)
|
|
703
|
-
l.push(...St(t, u)), h.push(...St(e, xn(u,
|
|
704
|
-
return Sn({ from: l, to: h, closed:
|
|
703
|
+
l.push(...St(t, u)), h.push(...St(e, xn(u, r, s)));
|
|
704
|
+
return Sn({ from: l, to: h, closed: s });
|
|
705
705
|
}
|
|
706
706
|
function Sn(t) {
|
|
707
707
|
const e = t.from.length / 2;
|
|
708
708
|
if (e <= 3) return t;
|
|
709
709
|
const n = new Uint8Array(e);
|
|
710
710
|
n[0] = 1, n[e - 1] = 1;
|
|
711
|
-
const
|
|
712
|
-
for (;
|
|
713
|
-
const [a, i] =
|
|
711
|
+
const s = [[0, e - 1]];
|
|
712
|
+
for (; s.length > 0; ) {
|
|
713
|
+
const [a, i] = s.pop();
|
|
714
714
|
let c = -1, l = _n;
|
|
715
715
|
for (let h = a + 1; h < i; h++) {
|
|
716
716
|
const u = Math.max(Qt(t.from, a, i, h), Qt(t.to, a, i, h));
|
|
717
717
|
u > l && (l = u, c = h);
|
|
718
718
|
}
|
|
719
|
-
c !== -1 && (n[c] = 1,
|
|
719
|
+
c !== -1 && (n[c] = 1, s.push([a, c], [c, i]));
|
|
720
720
|
}
|
|
721
|
-
const
|
|
721
|
+
const r = [], o = [];
|
|
722
722
|
for (let a = 0; a < e; a++)
|
|
723
|
-
n[a] && (
|
|
724
|
-
return { from:
|
|
723
|
+
n[a] && (r.push(t.from[a * 2], t.from[a * 2 + 1]), o.push(t.to[a * 2], t.to[a * 2 + 1]));
|
|
724
|
+
return { from: r, to: o, closed: t.closed };
|
|
725
725
|
}
|
|
726
|
-
function Qt(t, e, n,
|
|
727
|
-
const
|
|
726
|
+
function Qt(t, e, n, s) {
|
|
727
|
+
const r = t[e * 2], o = t[e * 2 + 1], a = t[n * 2] - r, i = t[n * 2 + 1] - o, c = t[s * 2] - r, l = t[s * 2 + 1] - o, h = a * a + i * i, u = h === 0 ? 0 : Math.max(0, Math.min(1, (c * a + l * i) / h));
|
|
728
728
|
return Math.hypot(c - u * a, l - u * i);
|
|
729
729
|
}
|
|
730
730
|
function An(t, e, n) {
|
|
731
|
-
const
|
|
732
|
-
if (X && X.from === t && X.to === e && X.shapeIndex ===
|
|
733
|
-
const o = et.get(String(
|
|
731
|
+
const s = n.shapeIndex;
|
|
732
|
+
if (X && X.from === t && X.to === e && X.shapeIndex === s) return X.plan;
|
|
733
|
+
const o = et.get(String(s ?? "auto"))?.get(t)?.get(e);
|
|
734
734
|
if (o)
|
|
735
|
-
return X = { from: t, to: e, shapeIndex:
|
|
735
|
+
return X = { from: t, to: e, shapeIndex: s, plan: o }, o;
|
|
736
736
|
const a = G(t).subpaths.filter((d) => d.length > 0).length === G(e).subpaths.filter((d) => d.length > 0).length, i = Vt(t, !a), c = Vt(e, !a), l = {
|
|
737
737
|
pairs: i.map((d, m) => wn(d, c[m], n))
|
|
738
738
|
};
|
|
739
739
|
at >= bn && (et.clear(), at = 0);
|
|
740
|
-
const h = String(
|
|
740
|
+
const h = String(s ?? "auto"), u = et.get(h) ?? /* @__PURE__ */ new Map();
|
|
741
741
|
et.set(h, u);
|
|
742
742
|
const f = u.get(t) ?? /* @__PURE__ */ new Map();
|
|
743
|
-
return u.set(t, f), f.set(e, l), at++, X = { from: t, to: e, shapeIndex:
|
|
743
|
+
return u.set(t, f), f.set(e, l), at++, X = { from: t, to: e, shapeIndex: s, plan: l }, l;
|
|
744
744
|
}
|
|
745
|
-
function vn(t, e, n,
|
|
745
|
+
function vn(t, e, n, s = {}) {
|
|
746
746
|
if (!t) return e;
|
|
747
747
|
if (!e) return t;
|
|
748
|
-
const
|
|
749
|
-
if (
|
|
750
|
-
if (
|
|
751
|
-
const o = An(t, e,
|
|
752
|
-
if (o.pairs.length === 0) return
|
|
748
|
+
const r = Math.max(0, Math.min(1, n));
|
|
749
|
+
if (r === 0) return t;
|
|
750
|
+
if (r === 1) return e;
|
|
751
|
+
const o = An(t, e, s);
|
|
752
|
+
if (o.pairs.length === 0) return r < 0.5 ? t : e;
|
|
753
753
|
let a = "";
|
|
754
754
|
for (const i of o.pairs) {
|
|
755
755
|
for (let c = 0; c < i.from.length; c += 2) {
|
|
756
|
-
const l = jt(i.from[c] + (i.to[c] - i.from[c]) *
|
|
756
|
+
const l = jt(i.from[c] + (i.to[c] - i.from[c]) * r), h = jt(i.from[c + 1] + (i.to[c + 1] - i.from[c + 1]) * r);
|
|
757
757
|
a += `${c === 0 ? a ? " M" : "M" : " L"}${l} ${h}`;
|
|
758
758
|
}
|
|
759
759
|
i.closed && (a += " Z");
|
|
760
760
|
}
|
|
761
761
|
return a;
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function Us() {
|
|
764
764
|
et.clear(), at = 0, X = void 0;
|
|
765
765
|
}
|
|
766
766
|
function Pn(t) {
|
|
@@ -773,23 +773,23 @@ function Ct() {
|
|
|
773
773
|
function it(t, e) {
|
|
774
774
|
const n = Math.hypot(t[0], t[1], t[2]);
|
|
775
775
|
if (n === 0) return Ct();
|
|
776
|
-
const
|
|
777
|
-
return [t[0] *
|
|
776
|
+
const s = e * Q / 2, r = Math.sin(s) / n;
|
|
777
|
+
return [t[0] * r, t[1] * r, t[2] * r, Math.cos(s)];
|
|
778
778
|
}
|
|
779
779
|
function Rn(t, e, n) {
|
|
780
780
|
return At(At(it([0, 1, 0], e), it([1, 0, 0], t)), it([0, 0, 1], n));
|
|
781
781
|
}
|
|
782
782
|
function Cn(t) {
|
|
783
|
-
const [e, n,
|
|
783
|
+
const [e, n, s, r] = z(t), o = 2 * (e * s + n * r), a = 2 * (e * n + s * r), i = 1 - 2 * (e * e + s * s), c = 2 * (n * s - e * r), l = 1 - 2 * (n * n + s * s), h = 2 * (e * s - n * r), u = 1 - 2 * (e * e + n * n), f = Math.asin(Math.max(-1, Math.min(1, -c)));
|
|
784
784
|
return Math.abs(c) < 0.9999999 ? [f / Q, Math.atan2(o, u) / Q, Math.atan2(a, i) / Q] : [f / Q, Math.atan2(-h, l) / Q, 0];
|
|
785
785
|
}
|
|
786
786
|
function At(t, e) {
|
|
787
|
-
const [n,
|
|
787
|
+
const [n, s, r, o] = t, [a, i, c, l] = e;
|
|
788
788
|
return [
|
|
789
|
-
o * a + n * l +
|
|
790
|
-
o * i - n * c +
|
|
791
|
-
o * c + n * i -
|
|
792
|
-
o * l - n * a -
|
|
789
|
+
o * a + n * l + s * c - r * i,
|
|
790
|
+
o * i - n * c + s * l + r * a,
|
|
791
|
+
o * c + n * i - s * a + r * l,
|
|
792
|
+
o * l - n * a - s * i - r * c
|
|
793
793
|
];
|
|
794
794
|
}
|
|
795
795
|
function de(t, e) {
|
|
@@ -806,28 +806,28 @@ function Dn(t) {
|
|
|
806
806
|
return [-t[0], -t[1], -t[2], t[3]];
|
|
807
807
|
}
|
|
808
808
|
function ge(t, e, n) {
|
|
809
|
-
const
|
|
810
|
-
let
|
|
811
|
-
if (o < 0 && (
|
|
809
|
+
const s = z(t);
|
|
810
|
+
let r = z(e), o = de(s, r);
|
|
811
|
+
if (o < 0 && (r = [-r[0], -r[1], -r[2], -r[3]], o = -o), o > $n)
|
|
812
812
|
return z([
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
813
|
+
s[0] + (r[0] - s[0]) * n,
|
|
814
|
+
s[1] + (r[1] - s[1]) * n,
|
|
815
|
+
s[2] + (r[2] - s[2]) * n,
|
|
816
|
+
s[3] + (r[3] - s[3]) * n
|
|
817
817
|
]);
|
|
818
818
|
const a = Math.acos(o), i = Math.sin(a), c = Math.sin((1 - n) * a) / i, l = Math.sin(n * a) / i;
|
|
819
819
|
return z([
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
820
|
+
s[0] * c + r[0] * l,
|
|
821
|
+
s[1] * c + r[1] * l,
|
|
822
|
+
s[2] * c + r[2] * l,
|
|
823
|
+
s[3] * c + r[3] * l
|
|
824
824
|
]);
|
|
825
825
|
}
|
|
826
826
|
function In(t, e) {
|
|
827
|
-
const [n,
|
|
828
|
-
return [e[0] + o * a + (
|
|
827
|
+
const [n, s, r, o] = z(t), a = 2 * (s * e[2] - r * e[1]), i = 2 * (r * e[0] - n * e[2]), c = 2 * (n * e[1] - s * e[0]);
|
|
828
|
+
return [e[0] + o * a + (s * c - r * i), e[1] + o * i + (r * a - n * c), e[2] + o * c + (n * i - s * a)];
|
|
829
829
|
}
|
|
830
|
-
const
|
|
830
|
+
const js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
831
831
|
__proto__: null,
|
|
832
832
|
conjugate: Dn,
|
|
833
833
|
dot: de,
|
|
@@ -844,12 +844,12 @@ const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
844
844
|
function Gt(t) {
|
|
845
845
|
const e = mt.get(t);
|
|
846
846
|
if (e) return e;
|
|
847
|
-
const n = t.replace("#", ""),
|
|
847
|
+
const n = t.replace("#", ""), s = [
|
|
848
848
|
parseInt(n.slice(0, 2), 16),
|
|
849
849
|
parseInt(n.slice(2, 4), 16),
|
|
850
850
|
parseInt(n.slice(4, 6), 16)
|
|
851
851
|
];
|
|
852
|
-
return mt.size < me && mt.set(t,
|
|
852
|
+
return mt.size < me && mt.set(t, s), s;
|
|
853
853
|
}
|
|
854
854
|
const Kt = (t) => t.charCodeAt(0) === 35, Zt = (t) => t.startsWith("rgb"), qt = (t) => t.startsWith("rgba"), En = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/, Mt = (t) => Math.round(t).toString(16).padStart(2, "0");
|
|
855
855
|
function Ln(t, e, n) {
|
|
@@ -861,28 +861,28 @@ function Jt(t) {
|
|
|
861
861
|
const n = t.match(En);
|
|
862
862
|
if (!n)
|
|
863
863
|
throw new Error(`Invalid rgb color: ${t}`);
|
|
864
|
-
const
|
|
864
|
+
const s = parseInt(n[1], 10), r = parseInt(n[2], 10), o = parseInt(n[3], 10), a = n[4] !== void 0 ? [s, r, o, parseFloat(n[4])] : [s, r, o];
|
|
865
865
|
return yt.size < me && yt.set(t, a), a;
|
|
866
866
|
}
|
|
867
867
|
const On = (t, e, n) => {
|
|
868
868
|
if (Kt(t) && Kt(e)) {
|
|
869
|
-
const [
|
|
869
|
+
const [s, r, o] = Gt(t), [a, i, c] = Gt(e), l = N(s, a, n), h = N(r, i, n), u = N(o, c, n);
|
|
870
870
|
return Ln(l, h, u);
|
|
871
871
|
}
|
|
872
872
|
if ((Zt(t) || qt(t)) && (Zt(e) || qt(e))) {
|
|
873
|
-
const
|
|
874
|
-
if (
|
|
875
|
-
const c =
|
|
873
|
+
const s = Jt(t), r = Jt(e), o = Math.round(N(s[0], r[0], n)), a = Math.round(N(s[1], r[1], n)), i = Math.round(N(s[2], r[2], n));
|
|
874
|
+
if (s.length === 4 || r.length === 4) {
|
|
875
|
+
const c = s[3] ?? 1, l = r[3] ?? 1, h = N(c, l, n);
|
|
876
876
|
return `rgba(${o}, ${a}, ${i}, ${h})`;
|
|
877
877
|
}
|
|
878
878
|
return `rgb(${o}, ${a}, ${i})`;
|
|
879
879
|
}
|
|
880
880
|
return n < 1 ? t : e;
|
|
881
881
|
}, Fn = (t, e, n) => {
|
|
882
|
-
const
|
|
883
|
-
for (let o = 0; o <
|
|
884
|
-
|
|
885
|
-
return
|
|
882
|
+
const s = Math.min(t.length, e.length), r = [];
|
|
883
|
+
for (let o = 0; o < s; o++)
|
|
884
|
+
r.push(N(t[o], e[o], n));
|
|
885
|
+
return r;
|
|
886
886
|
}, Nn = (t, e, n) => ge(t, e, n), te = (t, e, n) => n < 1 ? t : e, Xn = (t, e, n) => vn(t, e, n);
|
|
887
887
|
function ye(t, e) {
|
|
888
888
|
return e === "slerp" ? Nn : typeof t == "number" ? N : Array.isArray(t) ? Fn : typeof t == "string" ? t.startsWith("#") || t.startsWith("rgb") ? On : Pn(t) ? Xn : te : te;
|
|
@@ -892,7 +892,7 @@ function _e(t, e = {}) {
|
|
|
892
892
|
if (!V(t))
|
|
893
893
|
throw new Error(`bakeSpringTrack: track "${t.id}" is not a spring track`);
|
|
894
894
|
const n = new ut(t.spring);
|
|
895
|
-
return Te(t, (
|
|
895
|
+
return Te(t, (s) => n.valueAt(s), n.settleTime(), t.spring.from, t.spring.to, e);
|
|
896
896
|
}
|
|
897
897
|
function be(t, e = {}) {
|
|
898
898
|
if (!j(t))
|
|
@@ -900,19 +900,19 @@ function be(t, e = {}) {
|
|
|
900
900
|
const n = t.inertia;
|
|
901
901
|
return Te(
|
|
902
902
|
t,
|
|
903
|
-
(
|
|
903
|
+
(s) => kt(n, s),
|
|
904
904
|
ft(n),
|
|
905
905
|
n.from,
|
|
906
906
|
ht(n),
|
|
907
907
|
e
|
|
908
908
|
);
|
|
909
909
|
}
|
|
910
|
-
function Te(t, e, n,
|
|
910
|
+
function Te(t, e, n, s, r, o) {
|
|
911
911
|
const a = o.intervalMs ?? Me, i = o.tolerance ?? 0.01, c = t.delay ?? 0, l = [];
|
|
912
912
|
for (let u = 0; u <= n; u += a)
|
|
913
913
|
l.push({ time: u + c, value: e(u), easing: "linear" });
|
|
914
914
|
const h = l[l.length - 1];
|
|
915
|
-
return !h || h.time < n + c ? l.push({ time: n + c, value:
|
|
915
|
+
return !h || h.time < n + c ? l.push({ time: n + c, value: r, easing: "linear" }) : h.value = r, c > 0 && l.unshift({ time: 0, value: s, easing: "linear" }), {
|
|
916
916
|
id: t.id,
|
|
917
917
|
target: t.target,
|
|
918
918
|
property: t.property,
|
|
@@ -921,11 +921,11 @@ function Te(t, e, n, r, s, o) {
|
|
|
921
921
|
...t.stagger && { stagger: { ...t.stagger } }
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
|
-
function Yn(t, e, n,
|
|
925
|
-
const
|
|
924
|
+
function Yn(t, e, n, s = {}) {
|
|
925
|
+
const r = s.intervalMs ?? Me, o = typeof n == "function" ? n : he(n), a = ye(t.value, s.interpolation), i = e.time - t.time;
|
|
926
926
|
if (i <= 0) return [e];
|
|
927
927
|
const c = [];
|
|
928
|
-
for (let h =
|
|
928
|
+
for (let h = r; h < i; h += r) {
|
|
929
929
|
const u = h / i;
|
|
930
930
|
c.push({
|
|
931
931
|
time: t.time + h,
|
|
@@ -936,20 +936,20 @@ function Yn(t, e, n, r = {}) {
|
|
|
936
936
|
const l = o(1);
|
|
937
937
|
return c.push({ ...e, ...l !== 1 && { value: a(t.value, e.value, l) }, easing: "linear" }), c;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Vs(t, e) {
|
|
940
940
|
return V(t) ? _e(t, e) : j(t) ? be(t, e) : t;
|
|
941
941
|
}
|
|
942
942
|
function zn(t, e = {}) {
|
|
943
943
|
const n = t.keyframes;
|
|
944
944
|
if (!n.some((o) => xt(o.easing))) return t;
|
|
945
|
-
const
|
|
945
|
+
const s = n.length > 0 ? [n[0]] : [], r = { ...e, interpolation: t.interpolation ?? e.interpolation };
|
|
946
946
|
for (let o = 1; o < n.length; o++) {
|
|
947
947
|
const a = n[o];
|
|
948
|
-
xt(a.easing) ?
|
|
948
|
+
xt(a.easing) ? s.push(...Yn(n[o - 1], a, a.easing, r)) : s.push(a);
|
|
949
949
|
}
|
|
950
|
-
return { ...t, keyframes:
|
|
950
|
+
return { ...t, keyframes: s };
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function Hs(t, e) {
|
|
953
953
|
return t.filter(Ne).map((n) => zn(n, e)).concat(
|
|
954
954
|
t.filter(V).map((n) => _e(n, e)),
|
|
955
955
|
t.filter(j).map((n) => be(n, e))
|
|
@@ -958,16 +958,16 @@ function Hr(t, e) {
|
|
|
958
958
|
function Un(t, e) {
|
|
959
959
|
if (t.length <= 2) return t;
|
|
960
960
|
const n = [t[0]];
|
|
961
|
-
for (let
|
|
962
|
-
const
|
|
961
|
+
for (let s = 1; s < t.length - 1; s++) {
|
|
962
|
+
const r = n[n.length - 1], o = t[s], a = t[s + 1], i = a.time - r.time;
|
|
963
963
|
if (i <= 0) continue;
|
|
964
|
-
const c = (o.time -
|
|
964
|
+
const c = (o.time - r.time) / i, l = r.value + (a.value - r.value) * c;
|
|
965
965
|
Math.abs(o.value - l) > e && n.push(o);
|
|
966
966
|
}
|
|
967
967
|
return n.push(t[t.length - 1]), n;
|
|
968
968
|
}
|
|
969
969
|
function jn(t) {
|
|
970
|
-
const e = [...t.keyframes].sort((n,
|
|
970
|
+
const e = [...t.keyframes].sort((n, s) => n.time - s.time);
|
|
971
971
|
return {
|
|
972
972
|
...t,
|
|
973
973
|
keyframes: e
|
|
@@ -976,9 +976,9 @@ function jn(t) {
|
|
|
976
976
|
function U(t) {
|
|
977
977
|
return t.targets && t.targets.length > 0 ? t.targets : [t.target];
|
|
978
978
|
}
|
|
979
|
-
function K(t, e, n,
|
|
980
|
-
const
|
|
981
|
-
return !
|
|
979
|
+
function K(t, e, n, s) {
|
|
980
|
+
const r = n ?? 0;
|
|
981
|
+
return !s || e <= 1 ? r : r + ae(t, e, s);
|
|
982
982
|
}
|
|
983
983
|
class _t {
|
|
984
984
|
track;
|
|
@@ -1002,12 +1002,12 @@ class _t {
|
|
|
1002
1002
|
* each sampled at its own offset time.
|
|
1003
1003
|
*/
|
|
1004
1004
|
getTargetValues(e) {
|
|
1005
|
-
const n = this.targets.length,
|
|
1006
|
-
for (let
|
|
1007
|
-
const o = K(
|
|
1008
|
-
a !== void 0 &&
|
|
1005
|
+
const n = this.targets.length, s = [];
|
|
1006
|
+
for (let r = 0; r < n; r++) {
|
|
1007
|
+
const o = K(r, n, this.track.delay, this.track.stagger), a = this.valueForOffset(e - o);
|
|
1008
|
+
a !== void 0 && s.push({ target: this.targets[r], value: a, start: o + this.track.keyframes[0].time });
|
|
1009
1009
|
}
|
|
1010
|
-
return
|
|
1010
|
+
return s;
|
|
1011
1011
|
}
|
|
1012
1012
|
/**
|
|
1013
1013
|
* Get the duration of this track — the last keyframe, plus any delay, the
|
|
@@ -1017,8 +1017,8 @@ class _t {
|
|
|
1017
1017
|
const { keyframes: e } = this.track;
|
|
1018
1018
|
if (e.length === 0)
|
|
1019
1019
|
return 0;
|
|
1020
|
-
const n = e[e.length - 1].time,
|
|
1021
|
-
return n + (this.track.delay ?? 0) +
|
|
1020
|
+
const n = e[e.length - 1].time, s = this.track.stagger ? Rt(this.targets.length, this.track.stagger) : 0;
|
|
1021
|
+
return n + (this.track.delay ?? 0) + s + (this.track.endDelay ?? 0);
|
|
1022
1022
|
}
|
|
1023
1023
|
/**
|
|
1024
1024
|
* Get the track metadata.
|
|
@@ -1035,22 +1035,22 @@ class _t {
|
|
|
1035
1035
|
return n[0].value;
|
|
1036
1036
|
if (e >= n[n.length - 1].time)
|
|
1037
1037
|
return n[n.length - 1].value;
|
|
1038
|
-
const { from:
|
|
1039
|
-
if (!
|
|
1038
|
+
const { from: s, to: r } = this.findSurroundingKeyframes(e);
|
|
1039
|
+
if (!s || !r)
|
|
1040
1040
|
return;
|
|
1041
|
-
if (
|
|
1042
|
-
return
|
|
1043
|
-
const o =
|
|
1044
|
-
return ye(
|
|
1041
|
+
if (s.time === e)
|
|
1042
|
+
return s.value;
|
|
1043
|
+
const o = r.time - s.time, a = (e - s.time) / o, c = he(r.easing)(a);
|
|
1044
|
+
return ye(s.value, this.track.interpolation)(s.value, r.value, c);
|
|
1045
1045
|
}
|
|
1046
1046
|
/**
|
|
1047
1047
|
* Find the keyframes surrounding a given time.
|
|
1048
1048
|
*/
|
|
1049
1049
|
findSurroundingKeyframes(e) {
|
|
1050
1050
|
const { keyframes: n } = this.track;
|
|
1051
|
-
for (let
|
|
1052
|
-
if (e >= n[
|
|
1053
|
-
return { from: n[
|
|
1051
|
+
for (let s = 0; s < n.length - 1; s++)
|
|
1052
|
+
if (e >= n[s].time && e <= n[s + 1].time)
|
|
1053
|
+
return { from: n[s], to: n[s + 1] };
|
|
1054
1054
|
return { from: null, to: null };
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
@@ -1065,12 +1065,12 @@ class Vn {
|
|
|
1065
1065
|
return this.sampler.valueAt(e - K(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
1066
1066
|
}
|
|
1067
1067
|
getTargetValues(e) {
|
|
1068
|
-
const n = this.targets.length,
|
|
1069
|
-
for (let
|
|
1070
|
-
const o = K(
|
|
1071
|
-
|
|
1068
|
+
const n = this.targets.length, s = [];
|
|
1069
|
+
for (let r = 0; r < n; r++) {
|
|
1070
|
+
const o = K(r, n, this.track.delay, this.track.stagger);
|
|
1071
|
+
s.push({ target: this.targets[r], value: this.sampler.valueAt(e - o), start: o });
|
|
1072
1072
|
}
|
|
1073
|
-
return
|
|
1073
|
+
return s;
|
|
1074
1074
|
}
|
|
1075
1075
|
/** Settle time plus delay and the widest stagger offset. */
|
|
1076
1076
|
getDuration() {
|
|
@@ -1092,12 +1092,12 @@ class Hn {
|
|
|
1092
1092
|
return kt(this.track.inertia, e - K(0, this.targets.length, this.track.delay, this.track.stagger));
|
|
1093
1093
|
}
|
|
1094
1094
|
getTargetValues(e) {
|
|
1095
|
-
const n = this.targets.length,
|
|
1096
|
-
for (let
|
|
1097
|
-
const o = K(
|
|
1098
|
-
|
|
1095
|
+
const n = this.targets.length, s = [];
|
|
1096
|
+
for (let r = 0; r < n; r++) {
|
|
1097
|
+
const o = K(r, n, this.track.delay, this.track.stagger);
|
|
1098
|
+
s.push({ target: this.targets[r], value: kt(this.track.inertia, e - o), start: o });
|
|
1099
1099
|
}
|
|
1100
|
-
return
|
|
1100
|
+
return s;
|
|
1101
1101
|
}
|
|
1102
1102
|
/** Settle time plus delay and the widest stagger offset. */
|
|
1103
1103
|
getDuration() {
|
|
@@ -1111,16 +1111,16 @@ class Hn {
|
|
|
1111
1111
|
function xe(t, e) {
|
|
1112
1112
|
const n = { ...gn(t.pathData, e) };
|
|
1113
1113
|
if (t.matrix) {
|
|
1114
|
-
const [
|
|
1115
|
-
n.x =
|
|
1114
|
+
const [s, r, o, a, i, c] = t.matrix, { x: l, y: h } = n;
|
|
1115
|
+
n.x = s * l + o * h + i, n.y = r * l + a * h + c;
|
|
1116
1116
|
const u = n.angle * Math.PI / 180, f = Math.cos(u), d = Math.sin(u);
|
|
1117
|
-
n.angle = Math.atan2(
|
|
1117
|
+
n.angle = Math.atan2(r * f + a * d, s * f + o * d) * 180 / Math.PI;
|
|
1118
1118
|
}
|
|
1119
1119
|
return t.autoRotate && t.rotateOffset && (n.angle += t.rotateOffset), n;
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const
|
|
1123
|
-
return xe(t,
|
|
1121
|
+
function Bs(t, e, n, s) {
|
|
1122
|
+
const r = e + (n - e) * s;
|
|
1123
|
+
return xe(t, r);
|
|
1124
1124
|
}
|
|
1125
1125
|
const bt = {
|
|
1126
1126
|
upperCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
@@ -1133,14 +1133,14 @@ function Wn(t) {
|
|
|
1133
1133
|
return n.length > 0 ? n : Array.from(bt.upperCase);
|
|
1134
1134
|
}
|
|
1135
1135
|
function Qn(t, e, n) {
|
|
1136
|
-
let
|
|
1137
|
-
return
|
|
1136
|
+
let s = (t | 0) ^ Math.imul(e + 1, 2654435761) ^ Math.imul(n + 1, 2246822507);
|
|
1137
|
+
return s = Math.imul(s ^ s >>> 16, 2146121005), s = Math.imul(s ^ s >>> 15, 2221713035), (s ^ s >>> 16) >>> 0;
|
|
1138
1138
|
}
|
|
1139
1139
|
function Gn(t, e, n = 0) {
|
|
1140
|
-
const
|
|
1141
|
-
if (o <= 0) return
|
|
1142
|
-
if (o >= 1) return
|
|
1143
|
-
const a = Array.from(
|
|
1140
|
+
const s = t.from ?? "", r = t.to, o = Math.max(0, Math.min(1, e));
|
|
1141
|
+
if (o <= 0) return s;
|
|
1142
|
+
if (o >= 1) return r;
|
|
1143
|
+
const a = Array.from(s), i = Array.from(r), c = t.rightToLeft ?? !1;
|
|
1144
1144
|
if (t.mode === "type") {
|
|
1145
1145
|
const y = Math.round(o * Math.max(a.length, i.length));
|
|
1146
1146
|
return c ? a.slice(0, Math.max(0, a.length - y)).join("") + i.slice(Math.max(0, i.length - y)).join("") : i.slice(0, y).join("") + a.slice(y).join("");
|
|
@@ -1275,31 +1275,31 @@ class ke {
|
|
|
1275
1275
|
const n = this.duration;
|
|
1276
1276
|
if (n <= 0)
|
|
1277
1277
|
return;
|
|
1278
|
-
let
|
|
1278
|
+
let r = e * this.speed;
|
|
1279
1279
|
if (this._repeatDelayRemaining > 0) {
|
|
1280
|
-
const i = Math.min(this._repeatDelayRemaining,
|
|
1281
|
-
if (this._repeatDelayRemaining -= i,
|
|
1280
|
+
const i = Math.min(this._repeatDelayRemaining, r);
|
|
1281
|
+
if (this._repeatDelayRemaining -= i, r -= i, this._repeatDelayRemaining > 0) {
|
|
1282
1282
|
this.onUpdate?.(this.getStateAtTime(this._currentTime));
|
|
1283
1283
|
return;
|
|
1284
1284
|
}
|
|
1285
1285
|
this._wrapAfterDelay && (this._wrapAfterDelay = !1, this._currentTime = 0);
|
|
1286
1286
|
}
|
|
1287
1287
|
const o = 1e3;
|
|
1288
|
-
for (let i = 0; i < o &&
|
|
1288
|
+
for (let i = 0; i < o && r > 0 && this._playbackState === "playing"; i++)
|
|
1289
1289
|
if (this._direction === "forward") {
|
|
1290
1290
|
const c = n - this._currentTime;
|
|
1291
|
-
if (
|
|
1292
|
-
if (
|
|
1291
|
+
if (r >= c) {
|
|
1292
|
+
if (r -= c, this._currentTime = n, !this._handleEndReached())
|
|
1293
1293
|
break;
|
|
1294
1294
|
} else
|
|
1295
|
-
this._currentTime +=
|
|
1295
|
+
this._currentTime += r, r = 0;
|
|
1296
1296
|
} else {
|
|
1297
1297
|
const c = this._currentTime;
|
|
1298
|
-
if (
|
|
1299
|
-
if (
|
|
1298
|
+
if (r >= c) {
|
|
1299
|
+
if (r -= c, this._currentTime = 0, !this._handleStartReached())
|
|
1300
1300
|
break;
|
|
1301
1301
|
} else
|
|
1302
|
-
this._currentTime -=
|
|
1302
|
+
this._currentTime -= r, r = 0;
|
|
1303
1303
|
}
|
|
1304
1304
|
const a = this.getStateAtTime(this._currentTime);
|
|
1305
1305
|
this.onUpdate?.(a);
|
|
@@ -1312,10 +1312,10 @@ class ke {
|
|
|
1312
1312
|
if (e = Xe(e, this._config.drawingRate ?? 0), this._hasSharedWrites())
|
|
1313
1313
|
this._resolveShared(e, n);
|
|
1314
1314
|
else
|
|
1315
|
-
for (const [
|
|
1316
|
-
const o =
|
|
1317
|
-
for (const { target: a, value: i, start: c } of
|
|
1318
|
-
this._write(n,
|
|
1315
|
+
for (const [s, r] of this._trackPlayers) {
|
|
1316
|
+
const o = r.getTrack().property;
|
|
1317
|
+
for (const { target: a, value: i, start: c } of r.getTargetValues(e))
|
|
1318
|
+
this._write(n, s, a, o, i, e - c);
|
|
1319
1319
|
}
|
|
1320
1320
|
return {
|
|
1321
1321
|
values: n,
|
|
@@ -1339,26 +1339,26 @@ class ke {
|
|
|
1339
1339
|
* turn. `findConflicts()` reports overlaps by the same rule.
|
|
1340
1340
|
*/
|
|
1341
1341
|
_resolveShared(e, n) {
|
|
1342
|
-
const
|
|
1343
|
-
for (const [
|
|
1342
|
+
const s = /* @__PURE__ */ new Map();
|
|
1343
|
+
for (const [r, o] of this._trackPlayers) {
|
|
1344
1344
|
const a = o.getTrack().property;
|
|
1345
1345
|
for (const { target: i, value: c, start: l } of o.getTargetValues(e)) {
|
|
1346
|
-
const h = `${i}\0${a}`, u = l <= e, f =
|
|
1347
|
-
(!f || (u !== f.started ? u : u ? l >= f.start : l <= f.start)) &&
|
|
1346
|
+
const h = `${i}\0${a}`, u = l <= e, f = s.get(h);
|
|
1347
|
+
(!f || (u !== f.started ? u : u ? l >= f.start : l <= f.start)) && s.set(h, { trackId: r, target: i, property: a, value: c, start: l, started: u });
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
|
-
for (const { trackId:
|
|
1351
|
-
this._write(n,
|
|
1350
|
+
for (const { trackId: r, target: o, property: a, value: i, start: c } of s.values())
|
|
1351
|
+
this._write(n, r, o, a, i, e - c);
|
|
1352
1352
|
}
|
|
1353
1353
|
/**
|
|
1354
1354
|
* Write one track's value for a target, expanding the progress of motion paths
|
|
1355
1355
|
* (into x/y/rotation) and text tracks (into the string). `elapsed` is the time
|
|
1356
1356
|
* since this target's animation on the track started.
|
|
1357
1357
|
*/
|
|
1358
|
-
_write(e, n,
|
|
1358
|
+
_write(e, n, s, r, o, a) {
|
|
1359
1359
|
if (o === void 0) return;
|
|
1360
|
-
let i = e.get(
|
|
1361
|
-
i || (i = /* @__PURE__ */ new Map(), e.set(
|
|
1360
|
+
let i = e.get(s);
|
|
1361
|
+
i || (i = /* @__PURE__ */ new Map(), e.set(s, i));
|
|
1362
1362
|
const c = this._textTracks.get(n);
|
|
1363
1363
|
if (c && typeof o == "number") {
|
|
1364
1364
|
i.set("text", Gn(c.textConfig, o, Math.max(0, a)));
|
|
@@ -1369,7 +1369,7 @@ class ke {
|
|
|
1369
1369
|
const h = xe(l.motionPathConfig, o);
|
|
1370
1370
|
i.set("motionPathX", h.x), i.set("motionPathY", h.y), l.motionPathConfig.autoRotate && i.set("motionPathRotate", h.angle);
|
|
1371
1371
|
} else
|
|
1372
|
-
i.set(
|
|
1372
|
+
i.set(r, o);
|
|
1373
1373
|
}
|
|
1374
1374
|
/** Cached: does any target+property have more than one track? */
|
|
1375
1375
|
_sharedWrites = null;
|
|
@@ -1378,13 +1378,13 @@ class ke {
|
|
|
1378
1378
|
const e = /* @__PURE__ */ new Set();
|
|
1379
1379
|
this._sharedWrites = !1;
|
|
1380
1380
|
t: for (const n of this._tracks)
|
|
1381
|
-
for (const
|
|
1382
|
-
const
|
|
1383
|
-
if (e.has(
|
|
1381
|
+
for (const s of U(n)) {
|
|
1382
|
+
const r = `${s}\0${n.property}`;
|
|
1383
|
+
if (e.has(r)) {
|
|
1384
1384
|
this._sharedWrites = !0;
|
|
1385
1385
|
break t;
|
|
1386
1386
|
}
|
|
1387
|
-
e.add(
|
|
1387
|
+
e.add(r);
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
return this._sharedWrites;
|
|
@@ -1403,7 +1403,7 @@ class ke {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
if ($t(e))
|
|
1405
1405
|
this._trackPlayers.set(e.id, new _t(e)), this._textTracks.set(e.id, e);
|
|
1406
|
-
else if (
|
|
1406
|
+
else if (re(e)) {
|
|
1407
1407
|
const n = {
|
|
1408
1408
|
id: e.id,
|
|
1409
1409
|
target: e.target,
|
|
@@ -1424,13 +1424,13 @@ class ke {
|
|
|
1424
1424
|
* different id. Does nothing if no track has `trackId`.
|
|
1425
1425
|
*/
|
|
1426
1426
|
replaceTrack(e, n) {
|
|
1427
|
-
const
|
|
1428
|
-
if (
|
|
1429
|
-
const
|
|
1427
|
+
const s = this._tracks.findIndex((o) => o.id === e);
|
|
1428
|
+
if (s < 0) return;
|
|
1429
|
+
const r = this._tracks.slice(s + 1);
|
|
1430
1430
|
this.removeTrack(e);
|
|
1431
|
-
for (const o of
|
|
1431
|
+
for (const o of r) this.removeTrack(o.id);
|
|
1432
1432
|
this.addTrack(n);
|
|
1433
|
-
for (const o of
|
|
1433
|
+
for (const o of r) this.addTrack(o);
|
|
1434
1434
|
}
|
|
1435
1435
|
/**
|
|
1436
1436
|
* Remove a track by its ID.
|
|
@@ -1455,9 +1455,9 @@ class ke {
|
|
|
1455
1455
|
* tweens on an element.
|
|
1456
1456
|
*/
|
|
1457
1457
|
removeTracks(e = {}) {
|
|
1458
|
-
const n = this.getTracks(e).map((
|
|
1459
|
-
for (const
|
|
1460
|
-
this.removeTrack(
|
|
1458
|
+
const n = this.getTracks(e).map((s) => s.id);
|
|
1459
|
+
for (const s of n)
|
|
1460
|
+
this.removeTrack(s);
|
|
1461
1461
|
return n;
|
|
1462
1462
|
}
|
|
1463
1463
|
/**
|
|
@@ -1466,12 +1466,12 @@ class ke {
|
|
|
1466
1466
|
getTrackSpan(e) {
|
|
1467
1467
|
const n = this._trackPlayers.get(e);
|
|
1468
1468
|
if (!n) return;
|
|
1469
|
-
const
|
|
1470
|
-
if (V(
|
|
1471
|
-
return { from:
|
|
1472
|
-
const o =
|
|
1469
|
+
const s = n.getTrack(), r = s.delay ?? 0;
|
|
1470
|
+
if (V(s) || j(s))
|
|
1471
|
+
return { from: r, to: n.getDuration() };
|
|
1472
|
+
const o = s.keyframes;
|
|
1473
1473
|
if (!(!o || o.length === 0))
|
|
1474
|
-
return { from: o[0].time +
|
|
1474
|
+
return { from: o[0].time + r, to: n.getDuration() };
|
|
1475
1475
|
}
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Overlapping writes to the same target+property.
|
|
@@ -1484,22 +1484,22 @@ class ke {
|
|
|
1484
1484
|
findConflicts() {
|
|
1485
1485
|
const e = [];
|
|
1486
1486
|
for (let n = 0; n < this._tracks.length; n++) {
|
|
1487
|
-
const
|
|
1488
|
-
if (
|
|
1487
|
+
const s = this._tracks[n], r = this.getTrackSpan(s.id);
|
|
1488
|
+
if (r)
|
|
1489
1489
|
for (let o = 0; o < n; o++) {
|
|
1490
1490
|
const a = this._tracks[o];
|
|
1491
|
-
if (a.property !==
|
|
1492
|
-
const i = U(a).filter((u) => U(
|
|
1491
|
+
if (a.property !== s.property) continue;
|
|
1492
|
+
const i = U(a).filter((u) => U(s).includes(u));
|
|
1493
1493
|
if (i.length === 0) continue;
|
|
1494
1494
|
const c = this.getTrackSpan(a.id);
|
|
1495
|
-
if (!c || !(c.from <=
|
|
1496
|
-
const h =
|
|
1495
|
+
if (!c || !(c.from <= r.to && r.from <= c.to)) continue;
|
|
1496
|
+
const h = r.from >= c.from;
|
|
1497
1497
|
for (const u of i)
|
|
1498
1498
|
e.push({
|
|
1499
1499
|
target: u,
|
|
1500
|
-
property:
|
|
1501
|
-
losingTrackId: h ? a.id :
|
|
1502
|
-
winningTrackId: h ?
|
|
1500
|
+
property: s.property,
|
|
1501
|
+
losingTrackId: h ? a.id : s.id,
|
|
1502
|
+
winningTrackId: h ? s.id : a.id
|
|
1503
1503
|
});
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
@@ -1508,8 +1508,8 @@ class ke {
|
|
|
1508
1508
|
_matches(e, n) {
|
|
1509
1509
|
if (n.id !== void 0 && e.id !== n.id || n.property !== void 0 && e.property !== n.property || n.target !== void 0 && !U(e).includes(n.target)) return !1;
|
|
1510
1510
|
if (n.timeRange) {
|
|
1511
|
-
const
|
|
1512
|
-
if (!
|
|
1511
|
+
const s = this.getTrackSpan(e.id);
|
|
1512
|
+
if (!s || s.to < n.timeRange.from || s.from > n.timeRange.to) return !1;
|
|
1513
1513
|
}
|
|
1514
1514
|
return !0;
|
|
1515
1515
|
}
|
|
@@ -1518,7 +1518,7 @@ class ke {
|
|
|
1518
1518
|
*/
|
|
1519
1519
|
toDefinition() {
|
|
1520
1520
|
return {
|
|
1521
|
-
formatVersion:
|
|
1521
|
+
formatVersion: se(this._tracks),
|
|
1522
1522
|
id: this.id,
|
|
1523
1523
|
name: this.name,
|
|
1524
1524
|
config: { ...this._config },
|
|
@@ -1536,8 +1536,8 @@ class ke {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
/** Replace the markers (kept in time order); an empty list removes them. */
|
|
1538
1538
|
setMarkers(e) {
|
|
1539
|
-
const n = e && e.length > 0 ? [...e].sort((
|
|
1540
|
-
n ?
|
|
1539
|
+
const n = e && e.length > 0 ? [...e].sort((r, o) => r.time - o.time).map((r) => ({ ...r })) : void 0, s = { ...this._config };
|
|
1540
|
+
n ? s.markers = n : delete s.markers, this._config = s;
|
|
1541
1541
|
}
|
|
1542
1542
|
/** Caption text per language, per marker id */
|
|
1543
1543
|
get captions() {
|
|
@@ -1546,7 +1546,7 @@ class ke {
|
|
|
1546
1546
|
/** Replace the captions; languages with no captions are dropped. */
|
|
1547
1547
|
setCaptions(e) {
|
|
1548
1548
|
const n = {};
|
|
1549
|
-
for (const [
|
|
1549
|
+
for (const [s, r] of Object.entries(e ?? {})) n[s] = { ...r };
|
|
1550
1550
|
this._captions = Object.keys(n).length > 0 ? n : void 0;
|
|
1551
1551
|
}
|
|
1552
1552
|
/** Start the between-iterations pause, if the timeline configures one. */
|
|
@@ -1577,22 +1577,22 @@ class ke {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
const Kn = 100;
|
|
1580
|
-
function
|
|
1581
|
-
const
|
|
1580
|
+
function Ws(t, e, n, s) {
|
|
1581
|
+
const r = [], o = [], { duration: a, alternate: i } = s, c = (d, m, p, g) => {
|
|
1582
1582
|
o.push([d, m]);
|
|
1583
1583
|
const M = [];
|
|
1584
1584
|
t.forEach((y, k) => {
|
|
1585
1585
|
(p === "forward" ? (g ? y >= d : y > d) && y <= m : (g ? y <= d : y < d) && y >= m) && M.push(k);
|
|
1586
1586
|
}), M.sort((y, k) => (p === "forward" ? t[y] - t[k] : t[k] - t[y]) || y - k);
|
|
1587
|
-
for (const y of M)
|
|
1587
|
+
for (const y of M) r.push({ kind: "event", index: y, direction: p });
|
|
1588
1588
|
};
|
|
1589
1589
|
let l = e.time, h = e.direction, u = e.fresh === !0;
|
|
1590
1590
|
const f = Math.min(Kn, Math.max(0, n.iteration - e.iteration));
|
|
1591
1591
|
for (let d = 0; d < f; d++) {
|
|
1592
1592
|
const m = h === "forward" ? a : 0;
|
|
1593
|
-
c(l, m, h, u),
|
|
1593
|
+
c(l, m, h, u), r.push({ kind: "repeat" }), i ? (h = h === "forward" ? "reverse" : "forward", l = m, u = !1) : (l = h === "forward" ? 0 : a, u = !0);
|
|
1594
1594
|
}
|
|
1595
|
-
return f > 0 &&
|
|
1595
|
+
return f > 0 && s.holding && !i ? { crossings: r, passes: o } : (c(l, n.time, h, u), { crossings: r, passes: o });
|
|
1596
1596
|
}
|
|
1597
1597
|
function Zn(t) {
|
|
1598
1598
|
return j(t) ? {
|
|
@@ -1616,7 +1616,7 @@ function Zn(t) {
|
|
|
1616
1616
|
textConfig: { ...t.textConfig },
|
|
1617
1617
|
keyframes: t.keyframes.map(Tt),
|
|
1618
1618
|
...F(t)
|
|
1619
|
-
} :
|
|
1619
|
+
} : re(t) ? {
|
|
1620
1620
|
id: t.id,
|
|
1621
1621
|
target: t.target,
|
|
1622
1622
|
property: "motionPath",
|
|
@@ -1681,12 +1681,12 @@ function qn(t) {
|
|
|
1681
1681
|
target: e.target,
|
|
1682
1682
|
property: "text",
|
|
1683
1683
|
textConfig: { ...e.textConfig },
|
|
1684
|
-
keyframes: [...e.keyframes].sort((n,
|
|
1684
|
+
keyframes: [...e.keyframes].sort((n, s) => n.time - s.time),
|
|
1685
1685
|
...F(e)
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
1688
|
if (t.property === "motionPath" && "motionPathConfig" in t) {
|
|
1689
|
-
const e = t, n = [...e.keyframes].sort((
|
|
1689
|
+
const e = t, n = [...e.keyframes].sort((s, r) => s.time - r.time);
|
|
1690
1690
|
return {
|
|
1691
1691
|
id: e.id,
|
|
1692
1692
|
target: e.target,
|
|
@@ -1708,7 +1708,7 @@ function qn(t) {
|
|
|
1708
1708
|
function Jn(t) {
|
|
1709
1709
|
const e = t._config.markers;
|
|
1710
1710
|
return {
|
|
1711
|
-
formatVersion:
|
|
1711
|
+
formatVersion: se(t.tracks),
|
|
1712
1712
|
id: t.id,
|
|
1713
1713
|
name: t.name,
|
|
1714
1714
|
config: {
|
|
@@ -1724,7 +1724,7 @@ function Jn(t) {
|
|
|
1724
1724
|
...t.captions && { captions: JSON.parse(JSON.stringify(t.captions)) }
|
|
1725
1725
|
};
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function ts(t) {
|
|
1728
1728
|
const e = t.formatVersion ?? 1;
|
|
1729
1729
|
if (e > Xt)
|
|
1730
1730
|
throw new Error(
|
|
@@ -1738,14 +1738,14 @@ function tr(t) {
|
|
|
1738
1738
|
captions: t.captions
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
1741
|
-
function
|
|
1741
|
+
function Qs(t) {
|
|
1742
1742
|
return JSON.stringify(Jn(t));
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function Gs(t) {
|
|
1745
1745
|
const e = JSON.parse(t);
|
|
1746
|
-
return
|
|
1746
|
+
return ts(e);
|
|
1747
1747
|
}
|
|
1748
|
-
function
|
|
1748
|
+
function Ks(t) {
|
|
1749
1749
|
let e = 2166136261;
|
|
1750
1750
|
for (let n = 0; n < t.length; n++)
|
|
1751
1751
|
e ^= t.charCodeAt(n), e = Math.imul(e, 16777619);
|
|
@@ -1763,24 +1763,24 @@ function Se(t) {
|
|
|
1763
1763
|
function Ae(t, e, n) {
|
|
1764
1764
|
return e + t.next() * (n - e);
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1767
|
-
if (
|
|
1768
|
-
const
|
|
1769
|
-
return e + o *
|
|
1766
|
+
function es(t, e, n, s) {
|
|
1767
|
+
if (s <= 0) return Ae(t, e, n);
|
|
1768
|
+
const r = Math.floor((n - e) / s), o = Math.round(t.next() * r);
|
|
1769
|
+
return e + o * s;
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function Zs(t, e) {
|
|
1772
1772
|
if (e.length !== 0)
|
|
1773
1773
|
return e[Math.floor(t.next() * e.length)];
|
|
1774
1774
|
}
|
|
1775
1775
|
const ve = /^([+\-*/])=\s*(-?[\d.]+)$/, Pe = /^random\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*(?:,\s*(-?[\d.]+)\s*)?\)$/i;
|
|
1776
|
-
function
|
|
1776
|
+
function qs(t) {
|
|
1777
1777
|
return typeof t != "string" ? !1 : ve.test(t.trim()) || Pe.test(t.trim());
|
|
1778
1778
|
}
|
|
1779
1779
|
function $e(t, e = {}) {
|
|
1780
1780
|
if (typeof t != "string") return t;
|
|
1781
|
-
const n = t.trim(),
|
|
1782
|
-
if (
|
|
1783
|
-
const [, o, a] =
|
|
1781
|
+
const n = t.trim(), s = ve.exec(n);
|
|
1782
|
+
if (s) {
|
|
1783
|
+
const [, o, a] = s, i = e.base ?? 0, c = Number.parseFloat(a);
|
|
1784
1784
|
switch (o) {
|
|
1785
1785
|
case "+":
|
|
1786
1786
|
return i + c;
|
|
@@ -1792,27 +1792,27 @@ function $e(t, e = {}) {
|
|
|
1792
1792
|
return c === 0 ? i : i / c;
|
|
1793
1793
|
}
|
|
1794
1794
|
}
|
|
1795
|
-
const
|
|
1796
|
-
if (
|
|
1795
|
+
const r = Pe.exec(n);
|
|
1796
|
+
if (r) {
|
|
1797
1797
|
if (!e.random)
|
|
1798
1798
|
throw new Error(
|
|
1799
1799
|
`resolveValue: "${n}" needs a random source — pass one via context.random`
|
|
1800
1800
|
);
|
|
1801
|
-
const o = Number.parseFloat(
|
|
1802
|
-
return i !== void 0 ?
|
|
1801
|
+
const o = Number.parseFloat(r[1]), a = Number.parseFloat(r[2]), i = r[3] !== void 0 ? Number.parseFloat(r[3]) : void 0;
|
|
1802
|
+
return i !== void 0 ? es(e.random, o, a, i) : Ae(e.random, o, a);
|
|
1803
1803
|
}
|
|
1804
1804
|
return t;
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1807
|
-
const
|
|
1808
|
-
let
|
|
1806
|
+
function ns(t, e = 0, n) {
|
|
1807
|
+
const s = [];
|
|
1808
|
+
let r = e;
|
|
1809
1809
|
for (const o of t) {
|
|
1810
|
-
const a = $e(o, { base:
|
|
1811
|
-
|
|
1810
|
+
const a = $e(o, { base: r, random: n });
|
|
1811
|
+
s.push(a), typeof a == "number" && (r = a);
|
|
1812
1812
|
}
|
|
1813
|
-
return
|
|
1813
|
+
return s;
|
|
1814
1814
|
}
|
|
1815
|
-
class
|
|
1815
|
+
class Js {
|
|
1816
1816
|
random;
|
|
1817
1817
|
constructor(e) {
|
|
1818
1818
|
this.random = Se(e);
|
|
@@ -1825,101 +1825,101 @@ class Jr {
|
|
|
1825
1825
|
return $e(e, { base: n, random: this.random });
|
|
1826
1826
|
}
|
|
1827
1827
|
resolveSequence(e, n = 0) {
|
|
1828
|
-
return
|
|
1828
|
+
return ns(e, n, this.random);
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
|
-
const
|
|
1832
|
-
function
|
|
1831
|
+
const ss = 600;
|
|
1832
|
+
function tr(t) {
|
|
1833
1833
|
if (Array.isArray(t)) {
|
|
1834
1834
|
const [f, d, m, p] = t;
|
|
1835
1835
|
return { fn: ee(f, d, m, p), bezier: [f, d, m, p] };
|
|
1836
1836
|
}
|
|
1837
1837
|
const { segments: e } = G(t);
|
|
1838
1838
|
if (e.length === 0) throw new Error(`customEase: no curve in "${t}"`);
|
|
1839
|
-
const n = e[0].startX,
|
|
1839
|
+
const n = e[0].startX, s = e[0].startY, r = e[e.length - 1], o = r.endX - n, a = r.endY - s;
|
|
1840
1840
|
if (o === 0 || a === 0) throw new Error(`customEase: "${t}" must move along both axes`);
|
|
1841
|
-
const i = (f) => (f - n) / o, c = (f) => (f -
|
|
1842
|
-
if (e.length === 1 &&
|
|
1843
|
-
const [f, d, m, p] =
|
|
1841
|
+
const i = (f) => (f - n) / o, c = (f) => (f - s) / a;
|
|
1842
|
+
if (e.length === 1 && r.type === "C") {
|
|
1843
|
+
const [f, d, m, p] = r.points, g = [i(f), c(d), i(m), c(p)];
|
|
1844
1844
|
return { fn: ee(...g), bezier: g };
|
|
1845
1845
|
}
|
|
1846
|
-
const l = [], h = [], u = Math.max(8, Math.ceil(
|
|
1846
|
+
const l = [], h = [], u = Math.max(8, Math.ceil(ss / e.length));
|
|
1847
1847
|
for (const f of e)
|
|
1848
1848
|
for (let d = l.length === 0 ? 0 : 1; d <= u; d++) {
|
|
1849
|
-
const [m, p] =
|
|
1849
|
+
const [m, p] = rs(f, d / u);
|
|
1850
1850
|
l.push(i(m)), h.push(c(p));
|
|
1851
1851
|
}
|
|
1852
|
-
return { fn:
|
|
1852
|
+
return { fn: os(l, h) };
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1855
|
-
const n = 0.1 + Math.max(0, Math.min(1, t.strength ?? 0.7)) * 0.7,
|
|
1856
|
-
for (let o = n; o > 2e-3; o *= n)
|
|
1857
|
-
const
|
|
1854
|
+
function er(t = {}) {
|
|
1855
|
+
const n = 0.1 + Math.max(0, Math.min(1, t.strength ?? 0.7)) * 0.7, s = [1];
|
|
1856
|
+
for (let o = n; o > 2e-3; o *= n) s.push(2 * Math.sqrt(o));
|
|
1857
|
+
const r = s.reduce((o, a) => o + a, 0);
|
|
1858
1858
|
return (o) => {
|
|
1859
1859
|
if (o <= 0) return 0;
|
|
1860
1860
|
if (o >= 1) return 1;
|
|
1861
|
-
let a = o *
|
|
1862
|
-
for (let i = 0; i <
|
|
1863
|
-
if (a <=
|
|
1864
|
-
if (i === 0) return (a /
|
|
1865
|
-
const c =
|
|
1861
|
+
let a = o * r;
|
|
1862
|
+
for (let i = 0; i < s.length; i++) {
|
|
1863
|
+
if (a <= s[i]) {
|
|
1864
|
+
if (i === 0) return (a / s[0]) ** 2;
|
|
1865
|
+
const c = s[i] / 2, l = c * c, h = a - c;
|
|
1866
1866
|
return 1 - (l - h * h);
|
|
1867
1867
|
}
|
|
1868
|
-
a -=
|
|
1868
|
+
a -= s[i];
|
|
1869
1869
|
}
|
|
1870
1870
|
return 1;
|
|
1871
1871
|
};
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1874
|
-
const e = Math.max(1, t.wiggles ?? 10), n = t.type ?? "easeOut",
|
|
1875
|
-
return (
|
|
1873
|
+
function nr(t = {}) {
|
|
1874
|
+
const e = Math.max(1, t.wiggles ?? 10), n = t.type ?? "easeOut", s = (r) => n === "uniform" ? 1 : n === "easeInOut" ? Math.sin(Math.PI * r) : (1 - r) ** 2;
|
|
1875
|
+
return (r) => r <= 0 || r >= 1 ? 0 : Math.sin(r * e * Math.PI * 2) * s(r);
|
|
1876
1876
|
}
|
|
1877
|
-
function
|
|
1877
|
+
function rs(t, e) {
|
|
1878
1878
|
if (t.type === "L") {
|
|
1879
1879
|
const [l, h] = t.points;
|
|
1880
1880
|
return [t.startX + (l - t.startX) * e, t.startY + (h - t.startY) * e];
|
|
1881
1881
|
}
|
|
1882
|
-
const [n,
|
|
1882
|
+
const [n, s, r, o, a, i] = t.points, c = 1 - e;
|
|
1883
1883
|
return [
|
|
1884
|
-
c * c * c * t.startX + 3 * c * c * e * n + 3 * c * e * e *
|
|
1885
|
-
c * c * c * t.startY + 3 * c * c * e *
|
|
1884
|
+
c * c * c * t.startX + 3 * c * c * e * n + 3 * c * e * e * r + e * e * e * a,
|
|
1885
|
+
c * c * c * t.startY + 3 * c * c * e * s + 3 * c * e * e * o + e * e * e * i
|
|
1886
1886
|
];
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function os(t, e) {
|
|
1889
1889
|
return (n) => {
|
|
1890
1890
|
if (n <= t[0]) return e[0];
|
|
1891
1891
|
if (n >= t[t.length - 1]) return e[e.length - 1];
|
|
1892
|
-
let
|
|
1893
|
-
for (;
|
|
1894
|
-
const a =
|
|
1895
|
-
t[a] <= n ?
|
|
1892
|
+
let s = 0, r = t.length - 1;
|
|
1893
|
+
for (; r - s > 1; ) {
|
|
1894
|
+
const a = s + r >> 1;
|
|
1895
|
+
t[a] <= n ? s = a : r = a;
|
|
1896
1896
|
}
|
|
1897
|
-
const o = t[
|
|
1898
|
-
return o === 0 ? e[
|
|
1897
|
+
const o = t[r] - t[s];
|
|
1898
|
+
return o === 0 ? e[r] : e[s] + (n - t[s]) / o * (e[r] - e[s]);
|
|
1899
1899
|
};
|
|
1900
1900
|
}
|
|
1901
|
-
function ee(t, e, n,
|
|
1902
|
-
const
|
|
1901
|
+
function ee(t, e, n, s) {
|
|
1902
|
+
const r = (a, i, c) => 3 * (1 - a) * (1 - a) * a * i + 3 * (1 - a) * a * a * c + a * a * a, o = (a, i, c) => 3 * (1 - a) * (1 - a) * i + 6 * (1 - a) * a * (c - i) + 3 * a * a * (1 - c);
|
|
1903
1903
|
return (a) => {
|
|
1904
1904
|
if (a <= 0) return 0;
|
|
1905
1905
|
if (a >= 1) return 1;
|
|
1906
1906
|
let i = a;
|
|
1907
1907
|
for (let h = 0; h < 8; h++) {
|
|
1908
|
-
const u =
|
|
1909
|
-
if (Math.abs(u) < 1e-6) return
|
|
1908
|
+
const u = r(i, t, n) - a, f = o(i, t, n);
|
|
1909
|
+
if (Math.abs(u) < 1e-6) return r(i, e, s);
|
|
1910
1910
|
if (Math.abs(f) < 1e-6) break;
|
|
1911
1911
|
i -= u / f;
|
|
1912
1912
|
}
|
|
1913
1913
|
let c = 0, l = 1;
|
|
1914
1914
|
i = a;
|
|
1915
1915
|
for (let h = 0; h < 40; h++)
|
|
1916
|
-
|
|
1917
|
-
return
|
|
1916
|
+
r(i, t, n) < a ? c = i : l = i, i = (c + l) / 2;
|
|
1917
|
+
return r(i, e, s);
|
|
1918
1918
|
};
|
|
1919
1919
|
}
|
|
1920
|
-
const
|
|
1921
|
-
function
|
|
1922
|
-
const n = e.lead ??
|
|
1920
|
+
const as = 350, is = 300, cs = 550;
|
|
1921
|
+
function sr(t, e = {}) {
|
|
1922
|
+
const n = e.lead ?? as, s = e.gap ?? is, r = e.tail ?? cs, o = [];
|
|
1923
1923
|
let a = 0;
|
|
1924
1924
|
return t.forEach((i, c) => {
|
|
1925
1925
|
const l = [];
|
|
@@ -1927,7 +1927,7 @@ function rs(t, e = {}) {
|
|
|
1927
1927
|
i.lines.forEach((f, d) => {
|
|
1928
1928
|
if (!(f.duration >= 0))
|
|
1929
1929
|
throw new Error(`narration: scene ${c} line ${d} has an invalid duration (${f.duration})`);
|
|
1930
|
-
d > 0 && (h +=
|
|
1930
|
+
d > 0 && (h += s), l.push({
|
|
1931
1931
|
id: f.id ?? `s${c}-l${d}`,
|
|
1932
1932
|
scene: c,
|
|
1933
1933
|
line: d,
|
|
@@ -1936,17 +1936,17 @@ function rs(t, e = {}) {
|
|
|
1936
1936
|
text: f.text
|
|
1937
1937
|
}), h += f.duration;
|
|
1938
1938
|
});
|
|
1939
|
-
const u = h +
|
|
1939
|
+
const u = h + r + (i.tail ?? 0);
|
|
1940
1940
|
o.push({ id: i.id ?? `s${c}`, start: a, duration: u - a, cues: l }), a = u;
|
|
1941
1941
|
}), { duration: a, scenes: o, cues: o.flatMap((i) => i.cues) };
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function rr(t) {
|
|
1944
1944
|
return t.cues.map((e) => ({ id: e.id, time: e.start, label: e.text }));
|
|
1945
1945
|
}
|
|
1946
|
-
function
|
|
1946
|
+
function or(t, e) {
|
|
1947
1947
|
let n = t.scenes[0];
|
|
1948
|
-
for (const
|
|
1949
|
-
if (e >=
|
|
1948
|
+
for (const s of t.scenes)
|
|
1949
|
+
if (e >= s.start) n = s;
|
|
1950
1950
|
else break;
|
|
1951
1951
|
return n;
|
|
1952
1952
|
}
|
|
@@ -1957,25 +1957,25 @@ function Dt(t, e) {
|
|
|
1957
1957
|
function It(t, e) {
|
|
1958
1958
|
return (e - t.offset) / Re(t);
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1960
|
+
function ar(t, e) {
|
|
1961
1961
|
return Dt(t, Math.round(It(t, e)));
|
|
1962
1962
|
}
|
|
1963
|
-
function
|
|
1963
|
+
function ir(t, e) {
|
|
1964
1964
|
return Dt(t, Math.ceil(It(t, e) - 1e-9));
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1967
|
-
const
|
|
1968
|
-
if (!(t.bpm > 0) || n < e) return
|
|
1966
|
+
function cr(t, e, n) {
|
|
1967
|
+
const s = Math.max(1, Math.round(t.beatsPerBar ?? 4)), r = [];
|
|
1968
|
+
if (!(t.bpm > 0) || n < e) return r;
|
|
1969
1969
|
for (let o = Math.ceil(It(t, e) - 1e-9); ; o++) {
|
|
1970
1970
|
const a = Dt(t, o);
|
|
1971
1971
|
if (a > n + 1e-9) break;
|
|
1972
|
-
|
|
1972
|
+
r.push({ time: a, bar: (o % s + s) % s === 0, n: o });
|
|
1973
1973
|
}
|
|
1974
|
-
return
|
|
1974
|
+
return r;
|
|
1975
1975
|
}
|
|
1976
1976
|
const B = 100;
|
|
1977
|
-
function
|
|
1978
|
-
const
|
|
1977
|
+
function ur(t, e, n = {}) {
|
|
1978
|
+
const s = n.minBpm ?? 70, r = n.maxBpm ?? 180, o = Math.max(1, Math.round(e / B)), a = Math.min(t.length, Math.round((n.maxSeconds ?? 60) * e)), i = Math.floor(a / o);
|
|
1979
1979
|
if (i < 4) return { bpm: 120, offset: 0, confidence: 0 };
|
|
1980
1980
|
const c = new Float64Array(i);
|
|
1981
1981
|
for (let _ = 0; _ < i; _++) {
|
|
@@ -1987,7 +1987,7 @@ function us(t, e, n = {}) {
|
|
|
1987
1987
|
for (let _ = 1; _ < i; _++) l[_] = Math.max(0, c[_] - c[_ - 1]);
|
|
1988
1988
|
const h = l.reduce((_, T) => _ + T, 0) / i;
|
|
1989
1989
|
for (let _ = 0; _ < i; _++) l[_] = Math.max(0, l[_] - h);
|
|
1990
|
-
const u = Math.max(1, Math.floor(60 * B /
|
|
1990
|
+
const u = Math.max(1, Math.floor(60 * B / r)), f = Math.min(i - 1, Math.ceil(60 * B / s)), d = (_) => {
|
|
1991
1991
|
let T = 0;
|
|
1992
1992
|
for (let x = _; x < i; x++) T += l[x] * l[x - _];
|
|
1993
1993
|
return T / (i - _);
|
|
@@ -2020,14 +2020,14 @@ function us(t, e, n = {}) {
|
|
|
2020
2020
|
const v = 60 * B / k, A = m > 0 ? Math.max(0, Math.min(1, d(p) / m)) : 0, C = (w + 0.5) * 1e3 / B;
|
|
2021
2021
|
return { bpm: Math.round(v * 100) / 100, offset: Math.round(C % (6e4 / v)), confidence: A };
|
|
2022
2022
|
}
|
|
2023
|
-
const
|
|
2024
|
-
function
|
|
2025
|
-
const n = e.target ?? "Camera",
|
|
2026
|
-
const p =
|
|
2023
|
+
const us = 600, ls = 250, ne = 1;
|
|
2024
|
+
function lr(t, e) {
|
|
2025
|
+
const n = e.target ?? "Camera", s = { x: e.stage.width / 2, y: e.stage.height / 2 }, r = {}, o = (u, f, d, m) => {
|
|
2026
|
+
const p = r[u] ??= [];
|
|
2027
2027
|
for (; p.length > 0 && p[p.length - 1].time >= f; ) p.pop();
|
|
2028
2028
|
p.push({ time: f, value: d, ...m ? { easing: m } : {} });
|
|
2029
2029
|
}, a = (u) => {
|
|
2030
|
-
const f = u.rotate * Math.PI / 180, d = (u.focusX -
|
|
2030
|
+
const f = u.rotate * Math.PI / 180, d = (u.focusX - s.x) * u.scale, m = (u.focusY - s.y) * u.scale;
|
|
2031
2031
|
return {
|
|
2032
2032
|
x: -(d * Math.cos(f) - m * Math.sin(f)),
|
|
2033
2033
|
y: -(d * Math.sin(f) + m * Math.cos(f)),
|
|
@@ -2038,20 +2038,20 @@ function ls(t, e) {
|
|
|
2038
2038
|
const m = a(f);
|
|
2039
2039
|
for (const p of ["x", "y", "scale", "rotate"]) o(p, u, m[p], d);
|
|
2040
2040
|
};
|
|
2041
|
-
let c = { focusX:
|
|
2041
|
+
let c = { focusX: s.x, focusY: s.y, scale: 1, rotate: 0 };
|
|
2042
2042
|
const l = [...t].sort((u, f) => u.at - f.at), h = l.filter((u) => !("shake" in u));
|
|
2043
2043
|
h.length > 0 && i(0, c);
|
|
2044
2044
|
for (const u of h)
|
|
2045
2045
|
if ("frame" in u) {
|
|
2046
|
-
const f = Math.max(ne, u.duration ??
|
|
2046
|
+
const f = Math.max(ne, u.duration ?? us);
|
|
2047
2047
|
i(u.at, c), c = {
|
|
2048
|
-
focusX: u.frame.focus?.x ??
|
|
2049
|
-
focusY: u.frame.focus?.y ??
|
|
2048
|
+
focusX: u.frame.focus?.x ?? s.x,
|
|
2049
|
+
focusY: u.frame.focus?.y ?? s.y,
|
|
2050
2050
|
scale: u.frame.scale ?? 1,
|
|
2051
2051
|
rotate: u.frame.rotate ?? 0
|
|
2052
2052
|
}, i(u.at + f, c, u.easing ?? (f > ne ? "ease-in-out" : void 0));
|
|
2053
2053
|
} else {
|
|
2054
|
-
const { follow: f } = u, d = f.lag ??
|
|
2054
|
+
const { follow: f } = u, d = f.lag ?? ls, m = new ke({ id: "follow", tracks: [{ id: "x", target: "s", property: "x", keyframes: f.x }] }), p = (y) => m.getStateAtTime(y).values.get("s")?.get("x") ?? c.focusX, g = [u.at, ...f.x.map((y) => y.time).filter((y) => y > u.at && y < u.until), u.until];
|
|
2055
2055
|
i(u.at, c);
|
|
2056
2056
|
const M = (y) => ({
|
|
2057
2057
|
focusX: p(y) + (f.lead ?? 0),
|
|
@@ -2074,40 +2074,51 @@ function ls(t, e) {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
for (const M of ["shakeX", "shakeY", "shakeRotate"]) o(M, u.at + u.duration, 0, "ease-out");
|
|
2076
2076
|
}
|
|
2077
|
-
return Object.entries(
|
|
2077
|
+
return Object.entries(r).map(([u, f]) => ({ id: `${n}-${u}`, target: n, property: u, keyframes: f }));
|
|
2078
2078
|
}
|
|
2079
|
-
function
|
|
2080
|
-
const n = t.toLowerCase(),
|
|
2081
|
-
let
|
|
2079
|
+
function hs(t, e) {
|
|
2080
|
+
const n = t.toLowerCase(), s = e.toLowerCase();
|
|
2081
|
+
let r = Array.from({ length: s.length + 1 }, (o, a) => a);
|
|
2082
2082
|
for (let o = 1; o <= n.length; o++) {
|
|
2083
2083
|
const a = [o];
|
|
2084
|
-
for (let i = 1; i <=
|
|
2085
|
-
a[i] = Math.min(
|
|
2086
|
-
|
|
2084
|
+
for (let i = 1; i <= s.length; i++)
|
|
2085
|
+
a[i] = Math.min(r[i] + 1, a[i - 1] + 1, r[i - 1] + (n[o - 1] === s[i - 1] ? 0 : 1));
|
|
2086
|
+
r = a;
|
|
2087
2087
|
}
|
|
2088
|
-
return s
|
|
2088
|
+
return r[s.length];
|
|
2089
2089
|
}
|
|
2090
|
-
function
|
|
2091
|
-
const n = t.toLowerCase(),
|
|
2092
|
-
if (
|
|
2093
|
-
let
|
|
2090
|
+
function fs(t, e) {
|
|
2091
|
+
const n = t.toLowerCase(), s = e.find((a) => a.toLowerCase().includes(n) || n.includes(a.toLowerCase()));
|
|
2092
|
+
if (s && Math.min(t.length, s.length) >= 3) return s;
|
|
2093
|
+
let r, o = 1 / 0;
|
|
2094
2094
|
for (const a of e) {
|
|
2095
|
-
const i =
|
|
2096
|
-
i < o && (o = i,
|
|
2095
|
+
const i = hs(t, a);
|
|
2096
|
+
i < o && (o = i, r = a);
|
|
2097
2097
|
}
|
|
2098
|
-
return
|
|
2098
|
+
return r !== void 0 && o <= Math.max(2, Math.floor(t.length / 3)) ? r : void 0;
|
|
2099
|
+
}
|
|
2100
|
+
function hr(t, e, n, s) {
|
|
2101
|
+
const r = typeof e == "string" ? s ?? fs(e, n) : void 0;
|
|
2102
|
+
return `Unknown ${t} ${JSON.stringify(e)}${r ? `: did you mean "${r}"?` : "."} Known: ${n.join(", ")}`;
|
|
2099
2103
|
}
|
|
2100
|
-
function
|
|
2101
|
-
const s =
|
|
2102
|
-
|
|
2104
|
+
function fr(t, e) {
|
|
2105
|
+
const n = e.step ?? 33, s = e.stiffness ?? 120, r = e.damping ?? 9, o = e.mass ?? 1;
|
|
2106
|
+
let a = t(e.start), i = 0;
|
|
2107
|
+
const c = [{ time: e.start, value: a }];
|
|
2108
|
+
let l = e.start + n;
|
|
2109
|
+
for (let h = e.start + 1; h <= e.end; h++) {
|
|
2110
|
+
const f = s * (t(h) - a) - r * i;
|
|
2111
|
+
i += f / o * 1e-3, a += i * 1e-3, (h >= l || h === e.end) && (c.push({ time: h, value: a }), l += n);
|
|
2112
|
+
}
|
|
2113
|
+
return c;
|
|
2103
2114
|
}
|
|
2104
2115
|
const O = (t) => Math.round(t * 1e3) / 1e3;
|
|
2105
|
-
function
|
|
2116
|
+
function dr(t, e = {}) {
|
|
2106
2117
|
if (t.length === 0) return "";
|
|
2107
|
-
const n = e.curviness ?? 1,
|
|
2118
|
+
const n = e.curviness ?? 1, s = e.closed ?? !1, r = t.length;
|
|
2108
2119
|
let o = `M${O(t[0].x)} ${O(t[0].y)}`;
|
|
2109
|
-
if (
|
|
2110
|
-
const a = (c) =>
|
|
2120
|
+
if (r === 1) return o;
|
|
2121
|
+
const a = (c) => s ? t[(c % r + r) % r] : t[Math.max(0, Math.min(r - 1, c))], i = s ? r : r - 1;
|
|
2111
2122
|
for (let c = 0; c < i; c++) {
|
|
2112
2123
|
const l = a(c - 1), h = a(c), u = a(c + 1), f = a(c + 2);
|
|
2113
2124
|
if (n === 0) {
|
|
@@ -2117,86 +2128,86 @@ function fs(t, e = {}) {
|
|
|
2117
2128
|
const d = n / 6, m = h.x + (u.x - l.x) * d, p = h.y + (u.y - l.y) * d, g = u.x - (f.x - h.x) * d, M = u.y - (f.y - h.y) * d;
|
|
2118
2129
|
o += ` C${O(m)} ${O(p)} ${O(g)} ${O(M)} ${O(u.x)} ${O(u.y)}`;
|
|
2119
2130
|
}
|
|
2120
|
-
return
|
|
2131
|
+
return s ? `${o} Z` : o;
|
|
2121
2132
|
}
|
|
2122
2133
|
const D = (t, e = 0) => {
|
|
2123
2134
|
const n = parseFloat(t ?? "");
|
|
2124
2135
|
return Number.isFinite(n) ? n : e;
|
|
2125
2136
|
};
|
|
2126
|
-
function
|
|
2137
|
+
function ds(t) {
|
|
2127
2138
|
const e = (t ?? "").trim().split(/[\s,]+/).filter(Boolean).map(Number), n = [];
|
|
2128
|
-
for (let
|
|
2139
|
+
for (let s = 0; s + 1 < e.length; s += 2) n.push({ x: e[s], y: e[s + 1] });
|
|
2129
2140
|
return n;
|
|
2130
2141
|
}
|
|
2131
|
-
function
|
|
2142
|
+
function pr(t) {
|
|
2132
2143
|
const e = t.attributes;
|
|
2133
2144
|
switch (t.tag.toLowerCase()) {
|
|
2134
2145
|
case "path":
|
|
2135
2146
|
return e.d ?? null;
|
|
2136
2147
|
case "circle":
|
|
2137
2148
|
case "ellipse": {
|
|
2138
|
-
const n = D(e.cx),
|
|
2139
|
-
return `M${n +
|
|
2149
|
+
const n = D(e.cx), s = D(e.cy), r = t.tag.toLowerCase() === "circle" ? D(e.r) : D(e.rx), o = t.tag.toLowerCase() === "circle" ? D(e.r) : D(e.ry);
|
|
2150
|
+
return `M${n + r} ${s} A${r} ${o} 0 1 1 ${n - r} ${s} A${r} ${o} 0 1 1 ${n + r} ${s} Z`;
|
|
2140
2151
|
}
|
|
2141
2152
|
case "rect": {
|
|
2142
|
-
const n = D(e.x),
|
|
2153
|
+
const n = D(e.x), s = D(e.y), r = D(e.width), o = D(e.height);
|
|
2143
2154
|
let a = e.rx != null ? D(e.rx) : e.ry != null ? D(e.ry) : 0, i = e.ry != null ? D(e.ry) : a;
|
|
2144
|
-
return a = Math.min(a,
|
|
2155
|
+
return a = Math.min(a, r / 2), i = Math.min(i, o / 2), a === 0 || i === 0 ? `M${n} ${s} H${n + r} V${s + o} H${n} Z` : `M${n + a} ${s} H${n + r - a} A${a} ${i} 0 0 1 ${n + r} ${s + i} V${s + o - i} A${a} ${i} 0 0 1 ${n + r - a} ${s + o} H${n + a} A${a} ${i} 0 0 1 ${n} ${s + o - i} V${s + i} A${a} ${i} 0 0 1 ${n + a} ${s} Z`;
|
|
2145
2156
|
}
|
|
2146
2157
|
case "line":
|
|
2147
2158
|
return `M${D(e.x1)} ${D(e.y1)} L${D(e.x2)} ${D(e.y2)}`;
|
|
2148
2159
|
case "polyline":
|
|
2149
2160
|
case "polygon": {
|
|
2150
|
-
const n =
|
|
2161
|
+
const n = ds(e.points);
|
|
2151
2162
|
if (n.length === 0) return null;
|
|
2152
|
-
const
|
|
2153
|
-
return t.tag.toLowerCase() === "polygon" ? `${
|
|
2163
|
+
const s = n.map((r, o) => `${o === 0 ? "M" : "L"}${r.x} ${r.y}`).join(" ");
|
|
2164
|
+
return t.tag.toLowerCase() === "polygon" ? `${s} Z` : s;
|
|
2154
2165
|
}
|
|
2155
2166
|
default:
|
|
2156
2167
|
return null;
|
|
2157
2168
|
}
|
|
2158
2169
|
}
|
|
2159
|
-
function
|
|
2160
|
-
const
|
|
2170
|
+
function gr(t, e, n) {
|
|
2171
|
+
const s = Math.max(2, Math.round(n.samples ?? 32)), r = Math.max(0, n.length), o = n.since !== void 0 ? Math.max(e - r, n.since) : e - r;
|
|
2161
2172
|
if (o >= e) return [];
|
|
2162
2173
|
const a = n.period, i = [];
|
|
2163
|
-
for (let c = 0; c <
|
|
2164
|
-
const l = o + (e - o) * c / (
|
|
2165
|
-
i.push({ at: t(h), time: l, age:
|
|
2174
|
+
for (let c = 0; c < s; c++) {
|
|
2175
|
+
const l = o + (e - o) * c / (s - 1), h = a && a > 0 && c < s - 1 ? (l % a + a) % a : l;
|
|
2176
|
+
i.push({ at: t(h), time: l, age: r > 0 ? (e - l) / r : 0 });
|
|
2166
2177
|
}
|
|
2167
2178
|
return i;
|
|
2168
2179
|
}
|
|
2169
|
-
const
|
|
2170
|
-
function
|
|
2171
|
-
const e = [], n = [],
|
|
2172
|
-
for (let i = o + a; i >= 0 && i <
|
|
2180
|
+
const ps = 2.5;
|
|
2181
|
+
function mr(t) {
|
|
2182
|
+
const e = [], n = [], s = t.length, r = (o, a) => {
|
|
2183
|
+
for (let i = o + a; i >= 0 && i < s; i += a) {
|
|
2173
2184
|
const c = (t[i].x - t[o].x) * a, l = (t[i].y - t[o].y) * a, h = Math.hypot(c, l);
|
|
2174
2185
|
if (h > 1e-9) return [c / h, l / h];
|
|
2175
2186
|
}
|
|
2176
2187
|
return null;
|
|
2177
2188
|
};
|
|
2178
|
-
for (let o = 0; o <
|
|
2179
|
-
const a = t[o], i =
|
|
2189
|
+
for (let o = 0; o < s; o++) {
|
|
2190
|
+
const a = t[o], i = r(o, -1), c = r(o, 1), l = i ?? c ?? [1, 0], h = c ?? i ?? [1, 0];
|
|
2180
2191
|
let u = l[0] + h[0], f = l[1] + h[1];
|
|
2181
2192
|
const d = Math.hypot(u, f);
|
|
2182
2193
|
d < 1e-9 ? (u = l[0], f = l[1]) : (u /= d, f /= d);
|
|
2183
|
-
const m = u * l[0] + f * l[1], p = Math.min(
|
|
2194
|
+
const m = u * l[0] + f * l[1], p = Math.min(ps, 1 / Math.max(m, 1e-6)), g = a.width / 2 * p;
|
|
2184
2195
|
e.push({ x: a.x - f * g, y: a.y + u * g }), n.push({ x: a.x + f * g, y: a.y - u * g });
|
|
2185
2196
|
}
|
|
2186
2197
|
return { left: e, right: n };
|
|
2187
2198
|
}
|
|
2188
|
-
function
|
|
2199
|
+
function yr(t) {
|
|
2189
2200
|
const e = t.length;
|
|
2190
2201
|
if (e < 2) return null;
|
|
2191
2202
|
const n = t[e - 1];
|
|
2192
|
-
for (let
|
|
2193
|
-
const
|
|
2203
|
+
for (let s = e - 2; s >= 0; s--) {
|
|
2204
|
+
const r = n.x - t[s].x, o = n.y - t[s].y, a = Math.hypot(r, o);
|
|
2194
2205
|
if (a > 1e-9)
|
|
2195
|
-
return { x: n.x, y: n.y, radius: n.width / 2, start: Math.atan2(
|
|
2206
|
+
return { x: n.x, y: n.y, radius: n.width / 2, start: Math.atan2(r / a, -o / a) };
|
|
2196
2207
|
}
|
|
2197
2208
|
return null;
|
|
2198
2209
|
}
|
|
2199
|
-
function
|
|
2210
|
+
function gs(t, e) {
|
|
2200
2211
|
return [t[0] + e[0], t[1] + e[1], t[2] + e[2]];
|
|
2201
2212
|
}
|
|
2202
2213
|
function Et(t, e) {
|
|
@@ -2214,60 +2225,60 @@ function vt(t, e) {
|
|
|
2214
2225
|
function Lt(t) {
|
|
2215
2226
|
return Math.hypot(t[0], t[1], t[2]);
|
|
2216
2227
|
}
|
|
2217
|
-
function
|
|
2228
|
+
function ms(t, e) {
|
|
2218
2229
|
return Lt(Et(t, e));
|
|
2219
2230
|
}
|
|
2220
2231
|
function Pt(t) {
|
|
2221
2232
|
const e = Lt(t);
|
|
2222
2233
|
return e === 0 ? [0, 0, 0] : Ce(t, 1 / e);
|
|
2223
2234
|
}
|
|
2224
|
-
function
|
|
2235
|
+
function ys(t, e, n) {
|
|
2225
2236
|
return [t[0] + (e[0] - t[0]) * n, t[1] + (e[1] - t[1]) * n, t[2] + (e[2] - t[2]) * n];
|
|
2226
2237
|
}
|
|
2227
|
-
const
|
|
2238
|
+
const Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2228
2239
|
__proto__: null,
|
|
2229
|
-
add:
|
|
2240
|
+
add: gs,
|
|
2230
2241
|
cross: vt,
|
|
2231
|
-
distance:
|
|
2242
|
+
distance: ms,
|
|
2232
2243
|
dot: ct,
|
|
2233
2244
|
length: Lt,
|
|
2234
|
-
lerp:
|
|
2245
|
+
lerp: ys,
|
|
2235
2246
|
normalize: Pt,
|
|
2236
2247
|
scale: Ce,
|
|
2237
2248
|
subtract: Et
|
|
2238
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2239
|
-
function
|
|
2249
|
+
}, Symbol.toStringTag, { value: "Module" })), Ms = Math.PI / 180;
|
|
2250
|
+
function _s() {
|
|
2240
2251
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
2241
2252
|
}
|
|
2242
|
-
function
|
|
2253
|
+
function bs(t, e) {
|
|
2243
2254
|
const n = new Array(16);
|
|
2244
|
-
for (let
|
|
2245
|
-
for (let
|
|
2255
|
+
for (let s = 0; s < 4; s++)
|
|
2256
|
+
for (let r = 0; r < 4; r++) {
|
|
2246
2257
|
let o = 0;
|
|
2247
|
-
for (let a = 0; a < 4; a++) o += t[a * 4 +
|
|
2248
|
-
n[
|
|
2258
|
+
for (let a = 0; a < 4; a++) o += t[a * 4 + r] * e[s * 4 + a];
|
|
2259
|
+
n[s * 4 + r] = o;
|
|
2249
2260
|
}
|
|
2250
2261
|
return n;
|
|
2251
2262
|
}
|
|
2252
|
-
function
|
|
2263
|
+
function Ts(t) {
|
|
2253
2264
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t[0], t[1], t[2], 1];
|
|
2254
2265
|
}
|
|
2255
|
-
function
|
|
2266
|
+
function xs(t) {
|
|
2256
2267
|
return [t[0], 0, 0, 0, 0, t[1], 0, 0, 0, 0, t[2], 0, 0, 0, 0, 1];
|
|
2257
2268
|
}
|
|
2258
2269
|
function De(t) {
|
|
2259
|
-
const [e, n,
|
|
2270
|
+
const [e, n, s, r] = t;
|
|
2260
2271
|
return [
|
|
2261
|
-
1 - 2 * (n * n +
|
|
2262
|
-
2 * (e * n +
|
|
2263
|
-
2 * (e *
|
|
2272
|
+
1 - 2 * (n * n + s * s),
|
|
2273
|
+
2 * (e * n + s * r),
|
|
2274
|
+
2 * (e * s - n * r),
|
|
2264
2275
|
0,
|
|
2265
|
-
2 * (e * n -
|
|
2266
|
-
1 - 2 * (e * e +
|
|
2267
|
-
2 * (n *
|
|
2276
|
+
2 * (e * n - s * r),
|
|
2277
|
+
1 - 2 * (e * e + s * s),
|
|
2278
|
+
2 * (n * s + e * r),
|
|
2268
2279
|
0,
|
|
2269
|
-
2 * (e *
|
|
2270
|
-
2 * (n *
|
|
2280
|
+
2 * (e * s + n * r),
|
|
2281
|
+
2 * (n * s - e * r),
|
|
2271
2282
|
1 - 2 * (e * e + n * n),
|
|
2272
2283
|
0,
|
|
2273
2284
|
0,
|
|
@@ -2276,130 +2287,130 @@ function De(t) {
|
|
|
2276
2287
|
1
|
|
2277
2288
|
];
|
|
2278
2289
|
}
|
|
2279
|
-
function
|
|
2280
|
-
const
|
|
2281
|
-
for (let
|
|
2282
|
-
r
|
|
2283
|
-
return
|
|
2290
|
+
function ks(t, e, n) {
|
|
2291
|
+
const s = De(e);
|
|
2292
|
+
for (let r = 0; r < 3; r++)
|
|
2293
|
+
s[r] *= n[0], s[4 + r] *= n[1], s[8 + r] *= n[2];
|
|
2294
|
+
return s[12] = t[0], s[13] = t[1], s[14] = t[2], s;
|
|
2284
2295
|
}
|
|
2285
|
-
function
|
|
2296
|
+
function ws(t) {
|
|
2286
2297
|
const e = new Array(16);
|
|
2287
|
-
for (let n = 0; n < 4; n++) for (let
|
|
2298
|
+
for (let n = 0; n < 4; n++) for (let s = 0; s < 4; s++) e[s * 4 + n] = t[n * 4 + s];
|
|
2288
2299
|
return e;
|
|
2289
2300
|
}
|
|
2290
|
-
function
|
|
2291
|
-
const [e, n,
|
|
2301
|
+
function Ss(t) {
|
|
2302
|
+
const [e, n, s, r, o, a, i, c, l, h, u, f, d, m, p, g] = t, M = e * a - n * o, y = e * i - s * o, k = e * c - r * o, w = n * i - s * a, b = n * c - r * a, v = s * c - r * i, A = l * m - h * d, C = l * p - u * d, _ = l * g - f * d, T = h * p - u * m, x = h * g - f * m, S = u * g - f * p, $ = M * S - y * x + k * T + w * _ - b * C + v * A;
|
|
2292
2303
|
if (Math.abs($) < 1e-12) return null;
|
|
2293
2304
|
const P = 1 / $;
|
|
2294
2305
|
return [
|
|
2295
2306
|
(a * S - i * x + c * T) * P,
|
|
2296
|
-
(
|
|
2307
|
+
(s * x - n * S - r * T) * P,
|
|
2297
2308
|
(m * v - p * b + g * w) * P,
|
|
2298
2309
|
(u * b - h * v - f * w) * P,
|
|
2299
2310
|
(i * _ - o * S - c * C) * P,
|
|
2300
|
-
(e * S -
|
|
2311
|
+
(e * S - s * _ + r * C) * P,
|
|
2301
2312
|
(p * k - d * v - g * y) * P,
|
|
2302
2313
|
(l * v - u * k + f * y) * P,
|
|
2303
2314
|
(o * x - a * _ + c * A) * P,
|
|
2304
|
-
(n * _ - e * x -
|
|
2315
|
+
(n * _ - e * x - r * A) * P,
|
|
2305
2316
|
(d * b - m * k + g * M) * P,
|
|
2306
2317
|
(h * k - l * b - f * M) * P,
|
|
2307
2318
|
(a * C - o * T - i * A) * P,
|
|
2308
|
-
(e * T - n * C +
|
|
2319
|
+
(e * T - n * C + s * A) * P,
|
|
2309
2320
|
(m * y - d * w - p * M) * P,
|
|
2310
2321
|
(l * w - h * y + u * M) * P
|
|
2311
2322
|
];
|
|
2312
2323
|
}
|
|
2313
|
-
function
|
|
2314
|
-
const
|
|
2315
|
-
return [
|
|
2324
|
+
function As(t, e, n, s) {
|
|
2325
|
+
const r = 1 / Math.tan(t * Ms / 2), o = 1 / (n - s);
|
|
2326
|
+
return [r / e, 0, 0, 0, 0, r, 0, 0, 0, 0, (s + n) * o, -1, 0, 0, 2 * s * n * o, 0];
|
|
2316
2327
|
}
|
|
2317
|
-
function
|
|
2318
|
-
const a = 1 / (e - t), i = 1 / (
|
|
2319
|
-
return [2 * a, 0, 0, 0, 0, 2 * i, 0, 0, 0, 0, -2 * c, 0, -(e + t) * a, -(
|
|
2328
|
+
function vs(t, e, n, s, r, o) {
|
|
2329
|
+
const a = 1 / (e - t), i = 1 / (s - n), c = 1 / (o - r);
|
|
2330
|
+
return [2 * a, 0, 0, 0, 0, 2 * i, 0, 0, 0, 0, -2 * c, 0, -(e + t) * a, -(s + n) * i, -(o + r) * c, 1];
|
|
2320
2331
|
}
|
|
2321
|
-
function
|
|
2322
|
-
const
|
|
2332
|
+
function Ps(t, e, n = [0, 1, 0]) {
|
|
2333
|
+
const s = Pt(Et(t, e)), r = Pt(vt(n, s)), o = vt(s, r);
|
|
2323
2334
|
return [
|
|
2324
|
-
s[0],
|
|
2325
|
-
o[0],
|
|
2326
2335
|
r[0],
|
|
2336
|
+
o[0],
|
|
2337
|
+
s[0],
|
|
2327
2338
|
0,
|
|
2328
|
-
s[1],
|
|
2329
|
-
o[1],
|
|
2330
2339
|
r[1],
|
|
2340
|
+
o[1],
|
|
2341
|
+
s[1],
|
|
2331
2342
|
0,
|
|
2332
|
-
s[2],
|
|
2333
|
-
o[2],
|
|
2334
2343
|
r[2],
|
|
2344
|
+
o[2],
|
|
2345
|
+
s[2],
|
|
2335
2346
|
0,
|
|
2336
|
-
-ct(s, t),
|
|
2337
|
-
-ct(o, t),
|
|
2338
2347
|
-ct(r, t),
|
|
2348
|
+
-ct(o, t),
|
|
2349
|
+
-ct(s, t),
|
|
2339
2350
|
1
|
|
2340
2351
|
];
|
|
2341
2352
|
}
|
|
2342
|
-
function $
|
|
2343
|
-
const n = t[0] * e[0] + t[4] * e[1] + t[8] * e[2] + t[12],
|
|
2344
|
-
return o === 1 || o === 0 ? [n,
|
|
2353
|
+
function $s(t, e) {
|
|
2354
|
+
const n = t[0] * e[0] + t[4] * e[1] + t[8] * e[2] + t[12], s = t[1] * e[0] + t[5] * e[1] + t[9] * e[2] + t[13], r = t[2] * e[0] + t[6] * e[1] + t[10] * e[2] + t[14], o = t[3] * e[0] + t[7] * e[1] + t[11] * e[2] + t[15];
|
|
2355
|
+
return o === 1 || o === 0 ? [n, s, r] : [n / o, s / o, r / o];
|
|
2345
2356
|
}
|
|
2346
|
-
const
|
|
2357
|
+
const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2347
2358
|
__proto__: null,
|
|
2348
|
-
compose:
|
|
2359
|
+
compose: ks,
|
|
2349
2360
|
fromQuat: De,
|
|
2350
|
-
identity:
|
|
2351
|
-
invert:
|
|
2352
|
-
lookAt:
|
|
2353
|
-
multiply:
|
|
2354
|
-
orthographic:
|
|
2355
|
-
perspective:
|
|
2356
|
-
scaling:
|
|
2357
|
-
transformPoint: $
|
|
2358
|
-
translation:
|
|
2359
|
-
transpose:
|
|
2361
|
+
identity: _s,
|
|
2362
|
+
invert: Ss,
|
|
2363
|
+
lookAt: Ps,
|
|
2364
|
+
multiply: bs,
|
|
2365
|
+
orthographic: vs,
|
|
2366
|
+
perspective: As,
|
|
2367
|
+
scaling: xs,
|
|
2368
|
+
transformPoint: $s,
|
|
2369
|
+
translation: Ts,
|
|
2370
|
+
transpose: ws
|
|
2360
2371
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2361
2372
|
export {
|
|
2362
|
-
|
|
2373
|
+
Ds as Clock,
|
|
2363
2374
|
Me as DEFAULT_BAKE_INTERVAL_MS,
|
|
2364
2375
|
Yt as DEFAULT_INERTIA_FRICTION,
|
|
2365
2376
|
L as DEFAULT_SPRING,
|
|
2366
2377
|
Xt as FORMAT_VERSION,
|
|
2367
2378
|
Ve as INERTIA_MAX_DURATION_MS,
|
|
2368
2379
|
Hn as InertiaTrackPlayer,
|
|
2369
|
-
|
|
2370
|
-
|
|
2380
|
+
zs as MORPH_SAMPLES,
|
|
2381
|
+
Cs as ManualClock,
|
|
2371
2382
|
ie as SPRING_MAX_DURATION_MS,
|
|
2372
|
-
|
|
2383
|
+
Is as SPRING_PRESETS,
|
|
2373
2384
|
tt as SPRING_STEP_MS,
|
|
2374
2385
|
ut as SpringSampler,
|
|
2375
2386
|
Vn as SpringTrackPlayer,
|
|
2376
2387
|
ke as Timeline,
|
|
2377
2388
|
_t as TrackPlayer,
|
|
2378
|
-
|
|
2379
|
-
|
|
2389
|
+
Js as ValueResolver,
|
|
2390
|
+
sn as backOut,
|
|
2380
2391
|
Yn as bakeEasing,
|
|
2381
2392
|
be as bakeInertiaTrack,
|
|
2382
2393
|
_e as bakeSpringTrack,
|
|
2383
2394
|
It as beatAtTime,
|
|
2384
2395
|
Re as beatLength,
|
|
2385
2396
|
Dt as beatTime,
|
|
2386
|
-
|
|
2397
|
+
cr as beatsBetween,
|
|
2387
2398
|
nn as bounceOut,
|
|
2388
|
-
|
|
2399
|
+
lr as cameraTracks,
|
|
2389
2400
|
Wn as charactersFor,
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2401
|
+
Us as clearMorphCache,
|
|
2402
|
+
Xs as clearPathCache,
|
|
2403
|
+
fs as closestName,
|
|
2393
2404
|
tn as createCubicBezier,
|
|
2394
2405
|
Se as createRandom,
|
|
2395
2406
|
jn as createTrack,
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2407
|
+
Fs as criticalDamping,
|
|
2408
|
+
er as customBounce,
|
|
2409
|
+
tr as customEase,
|
|
2410
|
+
nr as customWiggle,
|
|
2411
|
+
ts as deserializeTimeline,
|
|
2401
2412
|
qn as deserializeTrack,
|
|
2402
|
-
|
|
2413
|
+
ur as detectTempo,
|
|
2403
2414
|
Ke as easeIn,
|
|
2404
2415
|
ce as easeInCubic,
|
|
2405
2416
|
qe as easeInOut,
|
|
@@ -2409,80 +2420,81 @@ export {
|
|
|
2409
2420
|
Ze as easeOut,
|
|
2410
2421
|
ue as easeOutCubic,
|
|
2411
2422
|
Qe as easeOutQuad,
|
|
2412
|
-
|
|
2423
|
+
hs as editDistance,
|
|
2413
2424
|
en as elasticOut,
|
|
2414
2425
|
zn as expandParametricEasings,
|
|
2415
|
-
|
|
2416
|
-
|
|
2426
|
+
se as formatVersionFor,
|
|
2427
|
+
Gs as fromJSON,
|
|
2417
2428
|
he as getEasingFunction,
|
|
2418
2429
|
ye as getInterpolator,
|
|
2419
2430
|
xe as getMotionPathPoint,
|
|
2420
|
-
|
|
2431
|
+
Ys as getPathLength,
|
|
2421
2432
|
gn as getPointAtProgress,
|
|
2422
2433
|
Ne as hasKeyframes,
|
|
2423
|
-
|
|
2434
|
+
Ks as hashSeed,
|
|
2424
2435
|
Xe as heldTime,
|
|
2425
2436
|
ft as inertiaDuration,
|
|
2426
2437
|
ht as inertiaRest,
|
|
2427
2438
|
kt as inertiaValueAt,
|
|
2428
|
-
|
|
2439
|
+
Ns as inertiaVelocityAt,
|
|
2429
2440
|
Fn as interpolateArray,
|
|
2430
2441
|
On as interpolateColor,
|
|
2431
|
-
|
|
2442
|
+
Bs as interpolateMotionPath,
|
|
2432
2443
|
N as interpolateNumber,
|
|
2433
2444
|
Xn as interpolatePathString,
|
|
2434
2445
|
Nn as interpolateQuaternion,
|
|
2435
2446
|
te as interpolateString,
|
|
2436
2447
|
Fe as isCubicBezierEasing,
|
|
2437
2448
|
j as isInertiaTrack,
|
|
2438
|
-
|
|
2439
|
-
|
|
2449
|
+
Rs as isMotionPathPoint,
|
|
2450
|
+
re as isMotionPathTrack,
|
|
2440
2451
|
xt as isParametricEasing,
|
|
2441
2452
|
Pn as isPathData,
|
|
2442
2453
|
V as isSpringTrack,
|
|
2443
2454
|
$t as isTextTrack,
|
|
2444
|
-
|
|
2445
|
-
|
|
2455
|
+
Os as isUnderdamped,
|
|
2456
|
+
qs as isUnresolved,
|
|
2446
2457
|
wt as linear,
|
|
2447
|
-
|
|
2458
|
+
_r as mat4,
|
|
2448
2459
|
Ye as maxStaggerDistance,
|
|
2449
2460
|
vn as morphPath,
|
|
2450
|
-
|
|
2451
|
-
|
|
2461
|
+
rr as narrationMarkers,
|
|
2462
|
+
or as narrationSceneAt,
|
|
2452
2463
|
He as naturalRest,
|
|
2453
|
-
|
|
2454
|
-
|
|
2464
|
+
ar as nearestBeat,
|
|
2465
|
+
ir as nextBeat,
|
|
2455
2466
|
on as parametricEasing,
|
|
2456
2467
|
G as parsePath,
|
|
2457
|
-
|
|
2458
|
-
|
|
2468
|
+
sr as planNarration,
|
|
2469
|
+
Ws as playheadCrossings,
|
|
2459
2470
|
fe as pointAtDistance,
|
|
2460
|
-
|
|
2461
|
-
|
|
2471
|
+
dr as pointsToPath,
|
|
2472
|
+
js as quat,
|
|
2462
2473
|
Ae as randomBetween,
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2474
|
+
Zs as randomChoice,
|
|
2475
|
+
es as randomSnapped,
|
|
2476
|
+
ns as resolveSequence,
|
|
2466
2477
|
$e as resolveValue,
|
|
2467
|
-
|
|
2468
|
-
|
|
2478
|
+
mr as ribbon,
|
|
2479
|
+
yr as ribbonHeadCap,
|
|
2469
2480
|
Jn as serializeTimeline,
|
|
2470
2481
|
Zn as serializeTrack,
|
|
2471
|
-
|
|
2482
|
+
pr as shapeToPathData,
|
|
2472
2483
|
Un as simplifyKeyframes,
|
|
2473
|
-
|
|
2474
|
-
|
|
2484
|
+
Ls as springDuration,
|
|
2485
|
+
fr as springFollow,
|
|
2486
|
+
Es as springValueAt,
|
|
2475
2487
|
oe as staggerDistance,
|
|
2476
2488
|
ae as staggerOffset,
|
|
2477
2489
|
ze as staggerOffsets,
|
|
2478
2490
|
Rt as staggerSpan,
|
|
2479
|
-
|
|
2491
|
+
rn as stepsEasing,
|
|
2480
2492
|
Gn as textAt,
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2493
|
+
Qs as toJSON,
|
|
2494
|
+
Vs as toKeyframedTrack,
|
|
2495
|
+
Hs as toKeyframedTracks,
|
|
2484
2496
|
U as trackTargets,
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2497
|
+
gr as trailSamples,
|
|
2498
|
+
hr as unknownName,
|
|
2499
|
+
Mr as vec3
|
|
2488
2500
|
};
|