@mkbabb/keyframes.js 1.1.5 → 1.2.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/LICENSE +21 -674
- package/dist/keyframes.d.ts +450 -0
- package/dist/keyframes.js +1288 -0
- package/package.json +5 -13
- package/dist/assets/CSSCodeEditor.vue_vue_type_script_setup_true_lang-DoeFo9B0.js +0 -15
- package/dist/assets/KeyframeTimeline-DCuTtSyj.js +0 -3
- package/dist/assets/KeyframeTimeline-Jb8HiEJ9.css +0 -1
- package/dist/assets/KeyframesStringControls-gfJd8pQq.js +0 -6
- package/dist/assets/codicon-DCmgc-ay.ttf +0 -0
- package/dist/assets/css.worker-DaIVPe4I.js +0 -78
- package/dist/assets/cube-CrhWuGpy.png +0 -0
- package/dist/assets/editor.worker-D_e4rV1K.js +0 -11
- package/dist/assets/html2canvas.esm-DXEQVQnt.js +0 -5
- package/dist/assets/index-BV83975F.css +0 -1
- package/dist/assets/index-DJ_IAlfb.js +0 -651
- package/dist/assets/ppmycota-logo-2-CAWHh5aE.svg +0 -5
- package/dist/assets/ppmycota-logo-3-BIN0nMRd.svg +0 -5
- package/dist/assets/vendor-highlight-CTbb6sRM.js +0 -1
- package/dist/assets/vendor-monaco-BS62pb6i.js +0 -1035
- package/dist/assets/vendor-monaco-bo9aZu7E.css +0 -1
- package/dist/assets/vendor-prettier-CT2Eqd5k.js +0 -89
- package/dist/index.html +0 -20
|
@@ -0,0 +1,1288 @@
|
|
|
1
|
+
import { CSSFunction as J, ValueUnit as f, CSSValueUnit as A, identifier as j, hyphenToCamelCase as mt, ValueArray as V, number as dt, camelCaseToHyphen as gt, memoize as w, tryParse as F, FunctionValue as x, easeInOutCubic as tt, lerp as E, requestAnimationFrame as v, cancelAnimationFrame as et, parseCSSValueUnit as st, unpackMatrixValues as yt, normalizeColorUnits as wt, COMPUTED_UNITS as U, convertToDPI as Vt, convertToMs as nt, convertToDegrees as St, convertToPixels as Tt, RESOLUTION_UNITS as bt, TIME_UNITS as vt, ANGLE_UNITS as Ft, LENGTH_UNITS as Pt, timingFunctions as it, flattenObject as rt, unflattenObjectToString as ot, clamp as C, scale as at, seekPreviousValue as R, unflattenObject as Et, sleep as It, isObject as Ot } from "@mkbabb/value.js";
|
|
2
|
+
import { CSSCubicBezier as Ke, bezierPresets as Ye, bounceInEase as Re, bounceInEaseHalf as We, bounceInOutEase as Le, bounceOutEase as Be, bounceOutEaseHalf as De, easeInBounce as He, easeInCirc as Xe, easeInCubic as ze, easeInExpo as Ge, easeInOutCirc as Ze, easeInOutCubic as qe, easeInOutExpo as Qe, easeInOutQuad as Je, easeInOutSine as ts, easeInQuad as es, easeInSine as ss, easeOutCirc as ns, easeOutCubic as is, easeOutExpo as rs, easeOutQuad as os, easeOutSine as as, jumpTerms as us, linear as ls, smoothStep3 as cs, stepEnd as hs, stepStart as fs, steppedEase as ps, timingFunctions as ms } from "@mkbabb/value.js";
|
|
3
|
+
import { string as g, all as $, regex as ut, any as I, whitespace as Ct } from "@mkbabb/parse-that";
|
|
4
|
+
const Mt = (e) => e.replace(/\/\*[\s\S]*?\*\//g, ""), At = (e) => e.replace(/\s*!important/gi, ""), _ = (e) => At(Mt(e));
|
|
5
|
+
g("(");
|
|
6
|
+
g(")");
|
|
7
|
+
const kt = g(";"), jt = g(":"), N = g("{"), K = g("}"), xt = g(","), Ut = g("."), m = Ct, $t = (e) => {
|
|
8
|
+
const t = [];
|
|
9
|
+
for (const s of e.flat(1 / 0)) {
|
|
10
|
+
if (s instanceof f || s instanceof x) {
|
|
11
|
+
t.push(s);
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
throw new TypeError(
|
|
15
|
+
`Expected parsed CSS value node, got ${typeof s}.`
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
}, _t = J.Function, Nt = $(N, ut(/[^{}]+/), K).map(
|
|
20
|
+
(e) => {
|
|
21
|
+
const t = e.join(`
|
|
22
|
+
`), s = JSON.parse(t);
|
|
23
|
+
return new f(s, "json");
|
|
24
|
+
}
|
|
25
|
+
), Y = I(
|
|
26
|
+
A.Value,
|
|
27
|
+
_t,
|
|
28
|
+
Nt,
|
|
29
|
+
ut(/[^\(\)\{\}\s,;]+/).map((e) => new f(e))
|
|
30
|
+
).trim(m), Kt = Y.sepBy(m), Yt = $(
|
|
31
|
+
j.skip(jt).trim(m).map((e) => mt(e)),
|
|
32
|
+
Kt.skip(kt.opt()).trim(m)
|
|
33
|
+
).map((e) => {
|
|
34
|
+
const [t, s] = e, n = new V(...$t(s));
|
|
35
|
+
return n.setProperty(t), {
|
|
36
|
+
[t]: n
|
|
37
|
+
};
|
|
38
|
+
}), Rt = I(
|
|
39
|
+
A.TimePercentage.trim(m).map((e) => e.toString()),
|
|
40
|
+
dt.map((e) => `${e}%`)
|
|
41
|
+
), Wt = Rt.sepBy(xt).trim(m), lt = Yt.many().trim(m).wrap(N, K).map((e) => Object.assign({}, ...e)), Lt = g("@keyframes").trim(m).next(j), W = $(Wt, lt).map(
|
|
42
|
+
([e, t]) => e.reduce((s, n) => (s.set(n, t), s), /* @__PURE__ */ new Map())
|
|
43
|
+
), ct = I(
|
|
44
|
+
Lt.next(W.many(1).trim(m).wrap(N, K).trim(m)),
|
|
45
|
+
W.many(1).trim(m)
|
|
46
|
+
).map((e) => e.reduce(
|
|
47
|
+
(t, s) => {
|
|
48
|
+
for (const [n, i] of s)
|
|
49
|
+
t.has(n) ? t.set(n, { ...t.get(n), ...i }) : t.set(n, i);
|
|
50
|
+
return t;
|
|
51
|
+
},
|
|
52
|
+
/* @__PURE__ */ new Map()
|
|
53
|
+
)), Bt = Ut.trim(m).next(j).trim(m), Dt = lt.map((e) => {
|
|
54
|
+
const t = {};
|
|
55
|
+
for (const [s, n] of Object.entries(e))
|
|
56
|
+
if (s.includes("animation")) {
|
|
57
|
+
const i = s.replace(/^animation/i, "").replace(/^\w/, (r) => r.toLowerCase()), o = gt(n.toString());
|
|
58
|
+
t[i] = o, delete e[s];
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
options: t,
|
|
62
|
+
values: e
|
|
63
|
+
};
|
|
64
|
+
}), Ht = Bt.next(Dt), Xt = I(
|
|
65
|
+
Ht.map((e) => e),
|
|
66
|
+
ct.map((e) => ({
|
|
67
|
+
keyframes: e
|
|
68
|
+
}))
|
|
69
|
+
), zt = Xt.sepBy(m).map((e) => Object.assign({}, ...e)), L = {
|
|
70
|
+
Value: Y,
|
|
71
|
+
FunctionArgs: J.FunctionArgs
|
|
72
|
+
}, Gt = w(
|
|
73
|
+
(e) => F(Y, _(e))
|
|
74
|
+
), Zt = w(
|
|
75
|
+
(e) => F(ct, _(e))
|
|
76
|
+
);
|
|
77
|
+
w((e) => {
|
|
78
|
+
const t = F(
|
|
79
|
+
zt,
|
|
80
|
+
_(e)
|
|
81
|
+
), s = {
|
|
82
|
+
keyframes: t.keyframes
|
|
83
|
+
};
|
|
84
|
+
return t.options != null && (s.options = t.options), t.values != null && (s.values = t.values), s;
|
|
85
|
+
});
|
|
86
|
+
w(
|
|
87
|
+
(e) => F(A.Percentage, String(e)).valueOf()
|
|
88
|
+
);
|
|
89
|
+
const B = w((e) => F(
|
|
90
|
+
A.Time.map((t) => t.unit === "ms" ? t.value : t.unit === "s" ? t.value * 1e3 : t.value),
|
|
91
|
+
e
|
|
92
|
+
));
|
|
93
|
+
w((e) => e >= 5e3 ? `${e / 1e3}s` : `${e}ms`);
|
|
94
|
+
w((e) => e === 1 / 0 ? "infinite" : String(e));
|
|
95
|
+
const qt = {
|
|
96
|
+
duration: 1e3,
|
|
97
|
+
delay: 0,
|
|
98
|
+
iterationCount: 1,
|
|
99
|
+
direction: "normal",
|
|
100
|
+
fillMode: "forwards",
|
|
101
|
+
timingFunction: tt,
|
|
102
|
+
useWAAPI: !0,
|
|
103
|
+
colorSpace: "oklab"
|
|
104
|
+
}, Qt = {
|
|
105
|
+
zIndex: 0,
|
|
106
|
+
weight: 1,
|
|
107
|
+
blendMode: "replace",
|
|
108
|
+
enabled: !0
|
|
109
|
+
}, O = (e) => typeof e != "object" || e == null ? !1 : "value" in e && typeof e.value == "number";
|
|
110
|
+
class Jt {
|
|
111
|
+
animations = {};
|
|
112
|
+
transform;
|
|
113
|
+
superKey;
|
|
114
|
+
paused = !1;
|
|
115
|
+
started = !1;
|
|
116
|
+
done = !1;
|
|
117
|
+
singleTarget = !0;
|
|
118
|
+
lastTickTime = 0;
|
|
119
|
+
handleId = void 0;
|
|
120
|
+
resolvePromise = null;
|
|
121
|
+
constructor(...t) {
|
|
122
|
+
const s = [];
|
|
123
|
+
for (const n of t) {
|
|
124
|
+
let i, o;
|
|
125
|
+
n instanceof pt ? i = n : (i = n.animation, o = n.layer), this.transform ??= i.frames[0].transform;
|
|
126
|
+
const r = k(i);
|
|
127
|
+
this.animations[r] = {
|
|
128
|
+
values: {},
|
|
129
|
+
animation: i,
|
|
130
|
+
layer: { ...Qt, ...o }
|
|
131
|
+
}, i.managed = !0, s.push(i);
|
|
132
|
+
}
|
|
133
|
+
this.singleTarget = s.every(
|
|
134
|
+
(n) => n.targets[0] === s[0]?.targets[0]
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
setSuperKey(t) {
|
|
138
|
+
return this.superKey = t, Object.values(this.animations).forEach((s) => {
|
|
139
|
+
s.animation.superKey = t;
|
|
140
|
+
}), this;
|
|
141
|
+
}
|
|
142
|
+
setTargets(...t) {
|
|
143
|
+
Object.values(this.animations).forEach((n) => {
|
|
144
|
+
n.animation.setTargets(...t);
|
|
145
|
+
});
|
|
146
|
+
const s = Object.values(this.animations).map(
|
|
147
|
+
(n) => n.animation
|
|
148
|
+
);
|
|
149
|
+
return this.singleTarget = s.every(
|
|
150
|
+
(n) => n.targets[0] === s[0]?.targets[0]
|
|
151
|
+
), this;
|
|
152
|
+
}
|
|
153
|
+
onStart() {
|
|
154
|
+
return this.started = !0, this;
|
|
155
|
+
}
|
|
156
|
+
onEnd() {
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
transformFramesGrouped(t) {
|
|
160
|
+
const s = {}, n = Object.values(this.animations);
|
|
161
|
+
n.sort((o, r) => o.layer.zIndex - r.layer.zIndex);
|
|
162
|
+
let i = !0;
|
|
163
|
+
for (const o of n) {
|
|
164
|
+
const { animation: r, values: a, layer: u } = o;
|
|
165
|
+
if (i = i && r.done, !u.enabled) continue;
|
|
166
|
+
if (!(r.done || r.paused)) {
|
|
167
|
+
const l = r.interpFrames(r.t, !1);
|
|
168
|
+
Object.assign(a, l);
|
|
169
|
+
}
|
|
170
|
+
const c = u.properties ? Object.fromEntries(
|
|
171
|
+
Object.entries(a).filter(
|
|
172
|
+
([l]) => u.properties.has(l)
|
|
173
|
+
)
|
|
174
|
+
) : a;
|
|
175
|
+
switch (u.blendMode) {
|
|
176
|
+
case "replace":
|
|
177
|
+
Object.assign(s, c);
|
|
178
|
+
break;
|
|
179
|
+
case "add":
|
|
180
|
+
for (const [l, h] of Object.entries(c))
|
|
181
|
+
if (l in s) {
|
|
182
|
+
const d = s[l], p = h;
|
|
183
|
+
O(d) && O(p) ? d.value = d.value + p.value : s[l] = h;
|
|
184
|
+
} else
|
|
185
|
+
s[l] = h;
|
|
186
|
+
break;
|
|
187
|
+
case "weighted":
|
|
188
|
+
for (const [l, h] of Object.entries(c))
|
|
189
|
+
if (l in s && u.weight < 1) {
|
|
190
|
+
const d = s[l], p = h;
|
|
191
|
+
O(d) && O(p) ? d.value = E(
|
|
192
|
+
u.weight,
|
|
193
|
+
d.value,
|
|
194
|
+
p.value
|
|
195
|
+
) : s[l] = h;
|
|
196
|
+
} else
|
|
197
|
+
s[l] = h;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return this.done = i, this.transform(s, t), s;
|
|
202
|
+
}
|
|
203
|
+
async tick(t) {
|
|
204
|
+
return this.lastTickTime = t, this.started || this.onStart(), await Promise.all(
|
|
205
|
+
Object.values(this.animations).map(async (s) => {
|
|
206
|
+
(!s.animation.paused || s.animation.pausedTime === 0) && await s.animation.tick(t);
|
|
207
|
+
})
|
|
208
|
+
), this.done && this.onEnd(), this;
|
|
209
|
+
}
|
|
210
|
+
async draw(t) {
|
|
211
|
+
await this.tick(t), !this.paused && (this.singleTarget ? this.transformFramesGrouped(t) : this.done = Object.values(this.animations).map(({ animation: s }) => (s.interpFrames(s.t, !0), s)).every((s) => s.done), this.done ? (this.reset(), this.resolvePromise && this.resolvePromise()) : this.handleId = v(this.draw.bind(this)));
|
|
212
|
+
}
|
|
213
|
+
async play() {
|
|
214
|
+
return new Promise((t) => {
|
|
215
|
+
this.resolvePromise = t, this.handleId = v(this.draw.bind(this));
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
pause() {
|
|
219
|
+
const t = this.paused;
|
|
220
|
+
if (this.started) {
|
|
221
|
+
this.paused = !this.paused;
|
|
222
|
+
const s = this.lastTickTime || performance.now();
|
|
223
|
+
if (Object.values(this.animations).forEach((n) => {
|
|
224
|
+
const i = n.animation;
|
|
225
|
+
this.paused ? (i.pause(!1), i.pausedTime === 0 && (i.pausedTime = s)) : i.paused = !1;
|
|
226
|
+
}), this.paused && this.singleTarget) {
|
|
227
|
+
for (const n of Object.values(this.animations)) {
|
|
228
|
+
const i = n.animation, o = i.interpFrames(i.t, !1);
|
|
229
|
+
Object.assign(n.values, o);
|
|
230
|
+
}
|
|
231
|
+
this.transformFramesGrouped(s);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return t && (this.handleId = v(this.draw.bind(this))), this;
|
|
235
|
+
}
|
|
236
|
+
reset() {
|
|
237
|
+
return Object.values(this.animations).forEach((t) => {
|
|
238
|
+
const s = t.animation;
|
|
239
|
+
s.started && s.frames.length > 0 && s.interpFrames(0, !0), s.managed = !1, s.reset();
|
|
240
|
+
}), this.started = !1, this.done = !1, this.paused = !1, this.lastTickTime = 0, this;
|
|
241
|
+
}
|
|
242
|
+
stop() {
|
|
243
|
+
return et(this.handleId), this.reset(), this;
|
|
244
|
+
}
|
|
245
|
+
playing() {
|
|
246
|
+
return !(!this.started || this.paused);
|
|
247
|
+
}
|
|
248
|
+
forcePause() {
|
|
249
|
+
this.paused = !0, Object.values(this.animations).forEach((t) => {
|
|
250
|
+
t.animation.paused = !0;
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
forcePlay() {
|
|
254
|
+
this.paused = !1, Object.values(this.animations).forEach((t) => {
|
|
255
|
+
t.animation.paused = !1;
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
// --- Layer management API ---
|
|
259
|
+
/** Set layer config for an animation by name or reference. Chainable. */
|
|
260
|
+
setLayerConfig(t, s) {
|
|
261
|
+
const n = typeof t == "string" ? t : k(t), i = this.animations[n];
|
|
262
|
+
return i && Object.assign(i.layer, s), this;
|
|
263
|
+
}
|
|
264
|
+
/** Convenience toggle for enabling/disabling a layer. Chainable. */
|
|
265
|
+
setLayerEnabled(t, s) {
|
|
266
|
+
return this.setLayerConfig(t, { enabled: s });
|
|
267
|
+
}
|
|
268
|
+
/** Read the layer config for an animation. */
|
|
269
|
+
getLayerConfig(t) {
|
|
270
|
+
const s = typeof t == "string" ? t : k(t);
|
|
271
|
+
return this.animations[s]?.layer;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
const te = /* @__PURE__ */ new Set([
|
|
275
|
+
"scaleX",
|
|
276
|
+
"scaleY",
|
|
277
|
+
"scaleZ",
|
|
278
|
+
"skewX",
|
|
279
|
+
"skewY",
|
|
280
|
+
"skewZ",
|
|
281
|
+
"translateX",
|
|
282
|
+
"translateY",
|
|
283
|
+
"translateZ",
|
|
284
|
+
"rotateX",
|
|
285
|
+
"rotateY",
|
|
286
|
+
"rotateZ",
|
|
287
|
+
"perspectiveX",
|
|
288
|
+
"perspectiveY",
|
|
289
|
+
"perspectiveZ",
|
|
290
|
+
"perspectiveW"
|
|
291
|
+
]), ee = (e) => typeof e == "string" && Pt.includes(e), se = (e) => typeof e == "string" && Ft.includes(e), ne = (e) => typeof e == "string" && vt.includes(e), ie = (e) => typeof e == "string" && bt.includes(e), D = (e) => typeof e == "string" && U.includes(e), re = (e) => te.has(
|
|
292
|
+
e
|
|
293
|
+
), oe = (e, t) => {
|
|
294
|
+
if (typeof e != "number" || !Number.isFinite(e))
|
|
295
|
+
throw new TypeError(
|
|
296
|
+
`Expected numeric ${t}, got ${String(e)}.`
|
|
297
|
+
);
|
|
298
|
+
return e;
|
|
299
|
+
}, H = (e) => {
|
|
300
|
+
if (e.unit !== "color")
|
|
301
|
+
throw new TypeError("Expected a color ValueUnit.");
|
|
302
|
+
return e;
|
|
303
|
+
}, ae = (e) => e, X = /* @__PURE__ */ new WeakMap();
|
|
304
|
+
let ue = 0;
|
|
305
|
+
const le = (e) => {
|
|
306
|
+
let t = X.get(e);
|
|
307
|
+
return t === void 0 && (t = ue++, X.set(e, t)), t;
|
|
308
|
+
}, z = w(
|
|
309
|
+
(e, t) => (() => {
|
|
310
|
+
if (!t)
|
|
311
|
+
return e;
|
|
312
|
+
if (e.unit === "var") {
|
|
313
|
+
const i = getComputedStyle(t).getPropertyValue(
|
|
314
|
+
e.value
|
|
315
|
+
);
|
|
316
|
+
return st(i);
|
|
317
|
+
}
|
|
318
|
+
if (e.unit === "calc" && e.property && e.subProperty && e.value && t) {
|
|
319
|
+
const i = ae(t.style), o = i[e.property] ?? "", r = e.subProperty ? `${e.subProperty}(${e.toString()})` : e.toString();
|
|
320
|
+
i[e.property] = r;
|
|
321
|
+
const a = getComputedStyle(t).getPropertyValue(
|
|
322
|
+
e.property
|
|
323
|
+
);
|
|
324
|
+
i[e.property] = o;
|
|
325
|
+
const u = Gt(a);
|
|
326
|
+
if (u instanceof f)
|
|
327
|
+
return u;
|
|
328
|
+
if (u.name.startsWith("matrix")) {
|
|
329
|
+
const c = yt(u);
|
|
330
|
+
if (re(e.subProperty)) {
|
|
331
|
+
const l = c[e.subProperty];
|
|
332
|
+
if (l != null)
|
|
333
|
+
return new f(l, "px", [
|
|
334
|
+
"length",
|
|
335
|
+
"absolute"
|
|
336
|
+
]);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return e;
|
|
341
|
+
})().coalesce(e),
|
|
342
|
+
{
|
|
343
|
+
keyFn: (e, t) => `${e.toString()}-${t ? le(t) : "null"}`,
|
|
344
|
+
// Don't cache when the element is disconnected (e.g. inside a Teleport
|
|
345
|
+
// defer DocumentFragment). Layout-dependent units like cqw/vh resolve
|
|
346
|
+
// to 0 without a live DOM context.
|
|
347
|
+
shouldCache: (e, t, s) => !s || s.isConnected
|
|
348
|
+
}
|
|
349
|
+
), ce = (e, t, s = !1) => {
|
|
350
|
+
if (e?.superType?.[0] !== t?.superType?.[0])
|
|
351
|
+
return s ? [e, t] : [e.clone(), t.clone()];
|
|
352
|
+
const n = (r) => {
|
|
353
|
+
const a = r?.superType?.[0], u = oe(r.value, "ValueUnit");
|
|
354
|
+
switch (a) {
|
|
355
|
+
case "length":
|
|
356
|
+
if (!ee(r.unit))
|
|
357
|
+
throw new TypeError(
|
|
358
|
+
`Unsupported length unit: ${String(r.unit)}`
|
|
359
|
+
);
|
|
360
|
+
return {
|
|
361
|
+
value: Tt(
|
|
362
|
+
u,
|
|
363
|
+
r.unit,
|
|
364
|
+
r.targets?.[0]
|
|
365
|
+
),
|
|
366
|
+
unit: "px"
|
|
367
|
+
};
|
|
368
|
+
case "angle":
|
|
369
|
+
if (!se(r.unit))
|
|
370
|
+
throw new TypeError(
|
|
371
|
+
`Unsupported angle unit: ${String(r.unit)}`
|
|
372
|
+
);
|
|
373
|
+
return {
|
|
374
|
+
value: St(u, r.unit),
|
|
375
|
+
unit: "deg"
|
|
376
|
+
};
|
|
377
|
+
case "time":
|
|
378
|
+
if (!ne(r.unit))
|
|
379
|
+
throw new TypeError(
|
|
380
|
+
`Unsupported time unit: ${String(r.unit)}`
|
|
381
|
+
);
|
|
382
|
+
return {
|
|
383
|
+
value: nt(u, r.unit),
|
|
384
|
+
unit: "ms"
|
|
385
|
+
};
|
|
386
|
+
case "resolution":
|
|
387
|
+
if (!ie(r.unit))
|
|
388
|
+
throw new TypeError(
|
|
389
|
+
`Unsupported resolution unit: ${String(r.unit)}`
|
|
390
|
+
);
|
|
391
|
+
return {
|
|
392
|
+
value: Vt(u, r.unit),
|
|
393
|
+
unit: "dpi"
|
|
394
|
+
};
|
|
395
|
+
default:
|
|
396
|
+
return {
|
|
397
|
+
value: u,
|
|
398
|
+
unit: typeof r.unit == "string" ? r.unit : ""
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
}, [i, o] = [
|
|
402
|
+
n(e),
|
|
403
|
+
n(t)
|
|
404
|
+
];
|
|
405
|
+
return s ? (e.value = i.value, e.unit = i.unit, t.value = o.value, t.unit = o.unit, [e, t]) : [
|
|
406
|
+
new f(
|
|
407
|
+
i.value,
|
|
408
|
+
i.unit,
|
|
409
|
+
e.superType,
|
|
410
|
+
e.subProperty,
|
|
411
|
+
e.property,
|
|
412
|
+
e.targets
|
|
413
|
+
),
|
|
414
|
+
new f(
|
|
415
|
+
o.value,
|
|
416
|
+
o.unit,
|
|
417
|
+
t.superType,
|
|
418
|
+
t.subProperty,
|
|
419
|
+
t.property,
|
|
420
|
+
t.targets
|
|
421
|
+
)
|
|
422
|
+
];
|
|
423
|
+
};
|
|
424
|
+
function he(e, t, s = "oklab", n) {
|
|
425
|
+
e = e.coalesce(t), t = t.coalesce(e);
|
|
426
|
+
const i = {
|
|
427
|
+
start: e,
|
|
428
|
+
stop: t,
|
|
429
|
+
value: e.clone(),
|
|
430
|
+
computed: !1
|
|
431
|
+
};
|
|
432
|
+
if (e.unit === "color" && t.unit === "color") {
|
|
433
|
+
const [o, r] = wt(
|
|
434
|
+
H(e),
|
|
435
|
+
H(t),
|
|
436
|
+
s,
|
|
437
|
+
!1,
|
|
438
|
+
!0,
|
|
439
|
+
!1,
|
|
440
|
+
n
|
|
441
|
+
);
|
|
442
|
+
i.start = o, i.stop = r, i.value = o.clone();
|
|
443
|
+
}
|
|
444
|
+
if (e.unit !== t.unit) {
|
|
445
|
+
const [o, r] = ce(
|
|
446
|
+
e,
|
|
447
|
+
t,
|
|
448
|
+
!0
|
|
449
|
+
);
|
|
450
|
+
i.start = o, i.stop = r, i.value = o.clone();
|
|
451
|
+
}
|
|
452
|
+
return i.computed = D(e.unit) || D(t.unit), i;
|
|
453
|
+
}
|
|
454
|
+
const b = (e) => {
|
|
455
|
+
if (e instanceof f)
|
|
456
|
+
return [e.clone()];
|
|
457
|
+
if (e instanceof x)
|
|
458
|
+
return e.values.flatMap((t) => b(t));
|
|
459
|
+
if (e instanceof V)
|
|
460
|
+
return e.flatMap((t) => b(t));
|
|
461
|
+
throw new TypeError(
|
|
462
|
+
`Expected ValueUnit/FunctionValue/ValueArray, got ${typeof e}`
|
|
463
|
+
);
|
|
464
|
+
}, fe = (e) => {
|
|
465
|
+
const t = e.split(".").pop(), s = e.split(".").shift();
|
|
466
|
+
if (!t || !s)
|
|
467
|
+
throw new Error(`Invalid flattened key: ${e}`);
|
|
468
|
+
return { mainKey: s, childKey: t };
|
|
469
|
+
}, P = (e, t, s) => (e.setProperty(t), s !== t && e.setSubProperty(s), e), M = (e) => {
|
|
470
|
+
if (typeof e == "string") {
|
|
471
|
+
const t = it[e];
|
|
472
|
+
return typeof t == "function" && t.length <= 1 ? t : void 0;
|
|
473
|
+
} else if (e == null)
|
|
474
|
+
return;
|
|
475
|
+
return e;
|
|
476
|
+
};
|
|
477
|
+
function pe(e, { start: t, stop: s, value: n }) {
|
|
478
|
+
const i = t.targets?.[0] ?? s.targets?.[0];
|
|
479
|
+
if (!i)
|
|
480
|
+
throw new Error(
|
|
481
|
+
"Cannot interpolate computed values without a target element."
|
|
482
|
+
);
|
|
483
|
+
const o = z(t, i), r = z(s, i), a = U.includes(o.unit) ? r.unit : o.unit, u = E(e, o.value, r.value);
|
|
484
|
+
return n.value = u, n.unit = a, n;
|
|
485
|
+
}
|
|
486
|
+
function me(e, { start: t, stop: s, value: n }) {
|
|
487
|
+
return t.value.keys().forEach((i) => {
|
|
488
|
+
const o = t.value[i], r = s.value[i], a = o instanceof f ? o.value : o, u = r instanceof f ? r.value : r, c = E(e, a, u), l = n.value[i];
|
|
489
|
+
l instanceof f ? l.value = c : n.value[i] = c;
|
|
490
|
+
}), n;
|
|
491
|
+
}
|
|
492
|
+
function de(e, t) {
|
|
493
|
+
const { start: s, stop: n, computed: i } = t;
|
|
494
|
+
return typeof s.value == "number" && typeof n.value == "number" ? t.value.value = E(e, s.value, n.value) : s.unit === "color" ? me(e, t) : i && pe(e, t), t;
|
|
495
|
+
}
|
|
496
|
+
const G = /* @__PURE__ */ new Map();
|
|
497
|
+
function ge(e) {
|
|
498
|
+
const t = rt(e), s = (i, o) => {
|
|
499
|
+
const { childKey: r, mainKey: a } = fe(i);
|
|
500
|
+
if (o instanceof f)
|
|
501
|
+
return P(
|
|
502
|
+
new V(...b(o)),
|
|
503
|
+
a,
|
|
504
|
+
r
|
|
505
|
+
);
|
|
506
|
+
if (o instanceof x) {
|
|
507
|
+
const p = o.values.flatMap(
|
|
508
|
+
(y) => b(s(i, y))
|
|
509
|
+
);
|
|
510
|
+
return P(
|
|
511
|
+
new V(...p),
|
|
512
|
+
a,
|
|
513
|
+
r
|
|
514
|
+
);
|
|
515
|
+
} else if (o instanceof V) {
|
|
516
|
+
const p = o.flatMap(
|
|
517
|
+
(y) => b(s(i, y))
|
|
518
|
+
);
|
|
519
|
+
return P(
|
|
520
|
+
new V(...p),
|
|
521
|
+
a,
|
|
522
|
+
r
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
const u = String(o), c = `${r}:${u}`, l = G.get(c);
|
|
526
|
+
if (l)
|
|
527
|
+
return P(l.clone(), a, r);
|
|
528
|
+
const h = F(
|
|
529
|
+
I(
|
|
530
|
+
L.FunctionArgs.map((p) => (p.setSubProperty(r), p)),
|
|
531
|
+
L.Value
|
|
532
|
+
),
|
|
533
|
+
u
|
|
534
|
+
), d = P(
|
|
535
|
+
new V(...b(h)),
|
|
536
|
+
a,
|
|
537
|
+
r
|
|
538
|
+
);
|
|
539
|
+
return G.set(c, d.clone()), d;
|
|
540
|
+
};
|
|
541
|
+
return Object.entries(t).reduce(
|
|
542
|
+
(i, [o, r]) => (i[o] = s(o, r), i),
|
|
543
|
+
{}
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
const ye = (e, t, s, n, i = "oklab", o) => {
|
|
547
|
+
const r = n[t], a = n[s];
|
|
548
|
+
if (!r || !a)
|
|
549
|
+
throw new Error(
|
|
550
|
+
`Invalid interpolation frame bounds (${t} -> ${s}).`
|
|
551
|
+
);
|
|
552
|
+
const u = r[e], c = a[e];
|
|
553
|
+
if (!u || !c)
|
|
554
|
+
throw new Error(`Missing variable "${e}" in interpolation bounds.`);
|
|
555
|
+
const l = Math.max(u.length, c.length), h = (y) => {
|
|
556
|
+
const S = y.map((T) => {
|
|
557
|
+
if (!(T instanceof f))
|
|
558
|
+
throw new TypeError(
|
|
559
|
+
`Interpolation for "${e}" requires ValueUnit leaves.`
|
|
560
|
+
);
|
|
561
|
+
return T;
|
|
562
|
+
});
|
|
563
|
+
for (; S.length < l; )
|
|
564
|
+
S.push(new f(0));
|
|
565
|
+
return S;
|
|
566
|
+
}, d = h(u), p = h(c);
|
|
567
|
+
return d.map((y, S) => {
|
|
568
|
+
const T = p[S];
|
|
569
|
+
if (!T)
|
|
570
|
+
throw new Error(
|
|
571
|
+
`Missing right-hand interpolation value at index ${S}.`
|
|
572
|
+
);
|
|
573
|
+
if (!(y instanceof f) || !(T instanceof f))
|
|
574
|
+
throw new TypeError(
|
|
575
|
+
`Interpolation for "${e}" requires ValueUnit leaves.`
|
|
576
|
+
);
|
|
577
|
+
return he(y, T, i, o);
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
function we(e, t, s) {
|
|
581
|
+
const [n, i] = [e.start, t.start];
|
|
582
|
+
return {
|
|
583
|
+
start: n.value * s / 100,
|
|
584
|
+
stop: i.value * s / 100
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
function ht(e, t, s = !0) {
|
|
588
|
+
e = s ? e : rt(e);
|
|
589
|
+
const n = ot(e);
|
|
590
|
+
t.forEach((i) => {
|
|
591
|
+
Object.entries(n).forEach(([o, r]) => {
|
|
592
|
+
i.style.setProperty(o, r);
|
|
593
|
+
});
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
const Ve = (e) => e;
|
|
597
|
+
class Se {
|
|
598
|
+
keyframes;
|
|
599
|
+
segments;
|
|
600
|
+
positions;
|
|
601
|
+
timingFn;
|
|
602
|
+
result;
|
|
603
|
+
constructor(t, s) {
|
|
604
|
+
if (t.length < 2)
|
|
605
|
+
throw new Error(
|
|
606
|
+
"NumericAnimation requires at least 2 keyframes."
|
|
607
|
+
);
|
|
608
|
+
if (this.keyframes = t.map((n) => ({ ...n })), this.timingFn = (s?.timingFunction ? M(s.timingFunction) : void 0) ?? Ve, s?.positions) {
|
|
609
|
+
if (s.positions.length !== t.length)
|
|
610
|
+
throw new Error(
|
|
611
|
+
"positions length must match keyframes length."
|
|
612
|
+
);
|
|
613
|
+
this.positions = s.positions;
|
|
614
|
+
} else
|
|
615
|
+
this.positions = t.map(
|
|
616
|
+
(n, i) => i / (t.length - 1) * 100
|
|
617
|
+
);
|
|
618
|
+
this.result = { ...t[0] }, this.segments = this.buildSegments();
|
|
619
|
+
}
|
|
620
|
+
buildSegments() {
|
|
621
|
+
const t = [];
|
|
622
|
+
for (let s = 0; s < this.keyframes.length - 1; s++)
|
|
623
|
+
t.push(this.buildSegment(s));
|
|
624
|
+
return t;
|
|
625
|
+
}
|
|
626
|
+
buildSegment(t) {
|
|
627
|
+
const s = this.keyframes[t], n = this.keyframes[t + 1], i = Object.keys(s);
|
|
628
|
+
return {
|
|
629
|
+
startPos: this.positions[t],
|
|
630
|
+
stopPos: this.positions[t + 1],
|
|
631
|
+
keys: i,
|
|
632
|
+
startVals: i.map((o) => s[o]),
|
|
633
|
+
stopVals: i.map((o) => n[o]),
|
|
634
|
+
timingFunction: this.timingFn
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
/** Map [0, 1] progress to interpolated values. Zero allocation. */
|
|
638
|
+
at(t) {
|
|
639
|
+
const s = C(t, 0, 1) * 100;
|
|
640
|
+
let n = this.segments[0];
|
|
641
|
+
for (let r = 0; r < this.segments.length; r++) {
|
|
642
|
+
const a = this.segments[r];
|
|
643
|
+
if (s >= a.startPos && s <= a.stopPos) {
|
|
644
|
+
n = a;
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
r === this.segments.length - 1 && (n = a);
|
|
648
|
+
}
|
|
649
|
+
const i = at(
|
|
650
|
+
C(s, n.startPos, n.stopPos),
|
|
651
|
+
n.startPos,
|
|
652
|
+
n.stopPos,
|
|
653
|
+
0,
|
|
654
|
+
1
|
|
655
|
+
), o = n.timingFunction(i);
|
|
656
|
+
for (let r = 0; r < n.keys.length; r++)
|
|
657
|
+
this.result[n.keys[r]] = E(
|
|
658
|
+
o,
|
|
659
|
+
n.startVals[r],
|
|
660
|
+
n.stopVals[r]
|
|
661
|
+
);
|
|
662
|
+
return this.result;
|
|
663
|
+
}
|
|
664
|
+
/** Update a keyframe's values in-place, recomputing adjacent segments. */
|
|
665
|
+
updateKeyframe(t, s) {
|
|
666
|
+
if (t < 0 || t >= this.keyframes.length)
|
|
667
|
+
throw new RangeError(
|
|
668
|
+
`Keyframe index ${t} out of range [0, ${this.keyframes.length - 1}].`
|
|
669
|
+
);
|
|
670
|
+
return Object.assign(this.keyframes[t], s), t > 0 && (this.segments[t - 1] = this.buildSegment(t - 1)), t < this.keyframes.length - 1 && (this.segments[t] = this.buildSegment(t)), this;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
const Te = {
|
|
674
|
+
damping: 0.1,
|
|
675
|
+
snapThreshold: 1e-3,
|
|
676
|
+
initial: 0,
|
|
677
|
+
clamp: !0
|
|
678
|
+
};
|
|
679
|
+
class be {
|
|
680
|
+
options;
|
|
681
|
+
targetValue;
|
|
682
|
+
currentValue;
|
|
683
|
+
isSettled;
|
|
684
|
+
constructor(t) {
|
|
685
|
+
this.options = { ...Te, ...t }, this.targetValue = this.options.initial, this.currentValue = this.options.initial, this.isSettled = !0;
|
|
686
|
+
}
|
|
687
|
+
get target() {
|
|
688
|
+
return this.targetValue;
|
|
689
|
+
}
|
|
690
|
+
get current() {
|
|
691
|
+
return this.currentValue;
|
|
692
|
+
}
|
|
693
|
+
get settled() {
|
|
694
|
+
return this.isSettled;
|
|
695
|
+
}
|
|
696
|
+
setTarget(t) {
|
|
697
|
+
this.options.clamp && (t = Math.max(0, Math.min(1, t))), t !== this.targetValue && (this.targetValue = t, this.isSettled = !1);
|
|
698
|
+
}
|
|
699
|
+
/** Advance one step using fixed damping. Returns current value. */
|
|
700
|
+
tick() {
|
|
701
|
+
return this.isSettled ? this.currentValue : (this.currentValue += (this.targetValue - this.currentValue) * this.options.damping, Math.abs(this.targetValue - this.currentValue) < this.options.snapThreshold && (this.currentValue = this.targetValue, this.isSettled = !0), this.options.clamp && (this.currentValue = Math.max(
|
|
702
|
+
0,
|
|
703
|
+
Math.min(1, this.currentValue)
|
|
704
|
+
)), this.currentValue);
|
|
705
|
+
}
|
|
706
|
+
/** Frame-rate independent tick. dt is in milliseconds. */
|
|
707
|
+
tickDt(t) {
|
|
708
|
+
if (this.isSettled) return this.currentValue;
|
|
709
|
+
const s = 1 - Math.exp(-this.options.damping * t / 16.667);
|
|
710
|
+
return this.currentValue += (this.targetValue - this.currentValue) * s, Math.abs(this.targetValue - this.currentValue) < this.options.snapThreshold && (this.currentValue = this.targetValue, this.isSettled = !0), this.options.clamp && (this.currentValue = Math.max(
|
|
711
|
+
0,
|
|
712
|
+
Math.min(1, this.currentValue)
|
|
713
|
+
)), this.currentValue;
|
|
714
|
+
}
|
|
715
|
+
/** Immediately set current = target. */
|
|
716
|
+
snap() {
|
|
717
|
+
this.currentValue = this.targetValue, this.isSettled = !0;
|
|
718
|
+
}
|
|
719
|
+
/** Reset to a specific value (default 0). */
|
|
720
|
+
reset(t) {
|
|
721
|
+
const s = t ?? 0;
|
|
722
|
+
this.targetValue = s, this.currentValue = s, this.isSettled = !0;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
const Z = (e) => {
|
|
726
|
+
if (e instanceof HTMLElement) {
|
|
727
|
+
const t = e.getBoundingClientRect();
|
|
728
|
+
return { x: t.x, y: t.y, width: t.width, height: t.height };
|
|
729
|
+
}
|
|
730
|
+
return e;
|
|
731
|
+
};
|
|
732
|
+
class je {
|
|
733
|
+
animation;
|
|
734
|
+
transformOrigin;
|
|
735
|
+
timingFunction;
|
|
736
|
+
constructor(t, s, n) {
|
|
737
|
+
this.transformOrigin = n?.transformOrigin ?? "top left", this.timingFunction = n?.timingFunction, this.measure(t, s);
|
|
738
|
+
}
|
|
739
|
+
/** Re-measure source and destination, rebuilding the internal animation. */
|
|
740
|
+
measure(t, s) {
|
|
741
|
+
const n = Z(t), i = Z(s), o = i.x - n.x, r = i.y - n.y, a = n.width === 0 ? 1 : i.width / n.width, u = n.height === 0 ? 1 : i.height / n.height;
|
|
742
|
+
return this.animation = new Se(
|
|
743
|
+
[
|
|
744
|
+
{ translateX: 0, translateY: 0, scaleX: 1, scaleY: 1 },
|
|
745
|
+
{ translateX: o, translateY: r, scaleX: a, scaleY: u }
|
|
746
|
+
],
|
|
747
|
+
{ timingFunction: this.timingFunction }
|
|
748
|
+
), this;
|
|
749
|
+
}
|
|
750
|
+
/** Get raw transform values at the given progress [0, 1]. */
|
|
751
|
+
at(t) {
|
|
752
|
+
return this.animation.at(t);
|
|
753
|
+
}
|
|
754
|
+
/** Get a CSS transform string at the given progress [0, 1]. */
|
|
755
|
+
toCSSTransform(t) {
|
|
756
|
+
const { translateX: s, translateY: n, scaleX: i, scaleY: o } = this.animation.at(t);
|
|
757
|
+
return `translate(${s}px, ${n}px) scale(${i}, ${o})`;
|
|
758
|
+
}
|
|
759
|
+
/** Apply the morph transform to an element at the given progress [0, 1]. */
|
|
760
|
+
apply(t, s) {
|
|
761
|
+
t.style.transform = this.toCSSTransform(s), t.style.transformOrigin = this.transformOrigin;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
const ve = (e) => {
|
|
765
|
+
if (e == null) return null;
|
|
766
|
+
if (typeof e == "function") return e;
|
|
767
|
+
const t = it[e];
|
|
768
|
+
return typeof t == "function" && t.length <= 1 ? t : null;
|
|
769
|
+
}, q = (e) => Math.max(0, Math.min(1, e));
|
|
770
|
+
class ft {
|
|
771
|
+
smoother;
|
|
772
|
+
easingFn;
|
|
773
|
+
currentProgress = 0;
|
|
774
|
+
constructor(t) {
|
|
775
|
+
this.easingFn = ve(t?.easing), t?.smoothing === !1 ? this.smoother = null : this.smoother = new be(
|
|
776
|
+
t?.smoothing
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
/** Advance one frame. Applies easing -> boundary snap -> smoothing. */
|
|
780
|
+
tick() {
|
|
781
|
+
let t = q(this.sample());
|
|
782
|
+
return this.easingFn && (t = this.easingFn(t)), this.smoother ? (this.smoother.setTarget(t), t <= 0 || t >= 1 ? this.smoother.snap() : this.smoother.tick(), this.currentProgress = this.smoother.current) : this.currentProgress = t, this.currentProgress;
|
|
783
|
+
}
|
|
784
|
+
/** Frame-rate independent variant. dt in ms. */
|
|
785
|
+
tickDt(t) {
|
|
786
|
+
let s = q(this.sample());
|
|
787
|
+
return this.easingFn && (s = this.easingFn(s)), this.smoother ? (this.smoother.setTarget(s), s <= 0 || s >= 1 ? this.smoother.snap() : this.smoother.tickDt(t), this.currentProgress = this.smoother.current) : this.currentProgress = s, this.currentProgress;
|
|
788
|
+
}
|
|
789
|
+
get progress() {
|
|
790
|
+
return this.currentProgress;
|
|
791
|
+
}
|
|
792
|
+
/** True if no smoother or smoother is settled. */
|
|
793
|
+
get settled() {
|
|
794
|
+
return this.smoother == null || this.smoother.settled;
|
|
795
|
+
}
|
|
796
|
+
/** Immediately converge smoother to current target. */
|
|
797
|
+
snap() {
|
|
798
|
+
this.smoother?.snap(), this.smoother && (this.currentProgress = this.smoother.current);
|
|
799
|
+
}
|
|
800
|
+
/** Reset progress to a specific value (default 0). */
|
|
801
|
+
reset(t) {
|
|
802
|
+
const s = t ?? 0;
|
|
803
|
+
this.smoother && this.smoother.reset(s), this.currentProgress = s;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
class xe extends ft {
|
|
807
|
+
threshold;
|
|
808
|
+
getScrollY;
|
|
809
|
+
getViewportHeight;
|
|
810
|
+
constructor(t) {
|
|
811
|
+
super(t), this.threshold = t?.threshold ?? 0.35, this.getScrollY = t?.getScrollY ?? (() => window.scrollY), this.getViewportHeight = t?.getViewportHeight ?? (() => window.innerHeight);
|
|
812
|
+
}
|
|
813
|
+
sample() {
|
|
814
|
+
const t = this.getViewportHeight() * this.threshold;
|
|
815
|
+
return t <= 0 ? 0 : this.getScrollY() / t;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
class Ue extends ft {
|
|
819
|
+
value = 0;
|
|
820
|
+
constructor(t) {
|
|
821
|
+
super({ smoothing: !1, ...t });
|
|
822
|
+
}
|
|
823
|
+
/** Set the raw progress value. */
|
|
824
|
+
set(t) {
|
|
825
|
+
this.value = t;
|
|
826
|
+
}
|
|
827
|
+
sample() {
|
|
828
|
+
return this.value;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
const Fe = (e) => typeof e.transform == "function", Q = (e) => typeof e == "string" && U.includes(e);
|
|
832
|
+
function Pe(e) {
|
|
833
|
+
if (!e.targets || e.targets.length === 0)
|
|
834
|
+
return !1;
|
|
835
|
+
const t = Fe(e) ? e.transform : void 0;
|
|
836
|
+
for (const s of e.frames) {
|
|
837
|
+
const n = s.transform;
|
|
838
|
+
if (n !== ht && n !== t)
|
|
839
|
+
return !1;
|
|
840
|
+
}
|
|
841
|
+
if (e.frames.length > 1) {
|
|
842
|
+
const s = e.frames[0].timingFunction;
|
|
843
|
+
for (let n = 1; n < e.frames.length; n++)
|
|
844
|
+
if (e.frames[n].timingFunction !== s)
|
|
845
|
+
return !1;
|
|
846
|
+
}
|
|
847
|
+
for (const s of e.frames)
|
|
848
|
+
for (const n of Object.values(s.interpVars))
|
|
849
|
+
for (const i of n) {
|
|
850
|
+
const o = i.start?.unit, r = i.stop?.unit;
|
|
851
|
+
if (Q(o) || Q(r))
|
|
852
|
+
return !1;
|
|
853
|
+
}
|
|
854
|
+
for (const s of e.frames)
|
|
855
|
+
for (const n of Object.values(s.interpVars))
|
|
856
|
+
for (const i of n)
|
|
857
|
+
if (i.start?.unit === "color" || i.stop?.unit === "color")
|
|
858
|
+
return !1;
|
|
859
|
+
return !0;
|
|
860
|
+
}
|
|
861
|
+
function Ee(e) {
|
|
862
|
+
const t = e.options.duration, s = [], n = /* @__PURE__ */ new Set();
|
|
863
|
+
for (const o of e.frames)
|
|
864
|
+
n.add(o.time.start), n.add(o.time.stop);
|
|
865
|
+
const i = [...n].sort((o, r) => o - r);
|
|
866
|
+
for (const o of i) {
|
|
867
|
+
const r = e.interpFrames(o, !1);
|
|
868
|
+
if (Object.keys(r).length === 0) continue;
|
|
869
|
+
const a = ot(r), u = {
|
|
870
|
+
offset: Math.max(0, Math.min(1, o / t)),
|
|
871
|
+
...a
|
|
872
|
+
};
|
|
873
|
+
s.push(u);
|
|
874
|
+
}
|
|
875
|
+
return s;
|
|
876
|
+
}
|
|
877
|
+
function Ie(e) {
|
|
878
|
+
const t = e.options, s = {
|
|
879
|
+
normal: "normal",
|
|
880
|
+
reverse: "reverse",
|
|
881
|
+
alternate: "alternate",
|
|
882
|
+
"alternate-reverse": "alternate-reverse"
|
|
883
|
+
}, n = {
|
|
884
|
+
none: "none",
|
|
885
|
+
forwards: "forwards",
|
|
886
|
+
backwards: "backwards",
|
|
887
|
+
both: "both"
|
|
888
|
+
};
|
|
889
|
+
return {
|
|
890
|
+
duration: t.duration,
|
|
891
|
+
delay: t.delay,
|
|
892
|
+
iterations: t.iterationCount === 1 / 0 ? 1 / 0 : t.iterationCount,
|
|
893
|
+
// TODO(HIGH): Remove enum fallbacks; throw when direction/fill values are outside supported WAAPI maps.
|
|
894
|
+
direction: s[t.direction] ?? "normal",
|
|
895
|
+
fill: n[t.fillMode] ?? "forwards",
|
|
896
|
+
// WAAPI easing is set per-animation — we use the frame's timing function name
|
|
897
|
+
// For custom functions we fall back to linear (the JS interpolation handles easing)
|
|
898
|
+
easing: "linear"
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
async function Oe(e) {
|
|
902
|
+
const t = Ee(e), s = Ie(e), n = [];
|
|
903
|
+
for (const i of e.targets) {
|
|
904
|
+
const o = i.animate(t, s);
|
|
905
|
+
n.push(o);
|
|
906
|
+
}
|
|
907
|
+
return await Promise.all(n.map((i) => i.finished)), n;
|
|
908
|
+
}
|
|
909
|
+
const Ce = (e) => typeof e != "object" || e == null ? !1 : typeof e.clone == "function", k = (e) => typeof e == "string" ? e : e.name ?? String(e.id);
|
|
910
|
+
let Me = 0;
|
|
911
|
+
class pt {
|
|
912
|
+
id = Me++;
|
|
913
|
+
name;
|
|
914
|
+
superKey;
|
|
915
|
+
targets;
|
|
916
|
+
options;
|
|
917
|
+
templateFrames = [];
|
|
918
|
+
parsedVars = [];
|
|
919
|
+
frameId = 0;
|
|
920
|
+
frames = [];
|
|
921
|
+
handleId = void 0;
|
|
922
|
+
startTime = void 0;
|
|
923
|
+
pausedTime = 0;
|
|
924
|
+
prevTime = 0;
|
|
925
|
+
t = 0;
|
|
926
|
+
iteration = 0;
|
|
927
|
+
started = !1;
|
|
928
|
+
done = !1;
|
|
929
|
+
reversed = !1;
|
|
930
|
+
paused = !1;
|
|
931
|
+
/** When true, this animation is managed by an AnimationGroup and should not run its own rAF loop. */
|
|
932
|
+
managed = !1;
|
|
933
|
+
unflatten = !0;
|
|
934
|
+
resolvePromise = null;
|
|
935
|
+
_playingPromise = null;
|
|
936
|
+
dispatchAnimationEvent(t) {
|
|
937
|
+
if (!(typeof AnimationEvent > "u"))
|
|
938
|
+
for (const s of this.targets)
|
|
939
|
+
typeof s?.dispatchEvent == "function" && s.dispatchEvent(
|
|
940
|
+
new AnimationEvent(t, {
|
|
941
|
+
animationName: this.name ?? "",
|
|
942
|
+
elapsedTime: this.t / 1e3
|
|
943
|
+
})
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
constructor(t, s, n, i) {
|
|
947
|
+
this.options = {}, this.setOptions({ ...qt, ...t ?? {} }), this.targets = s == null ? [] : Array.isArray(s) ? s : [s], this.name = n, this.superKey = i;
|
|
948
|
+
}
|
|
949
|
+
convertFrameStart(t) {
|
|
950
|
+
if (t.start.unit === "s" || t.start.unit === "ms" || !t.start.unit) {
|
|
951
|
+
const s = t.start.unit === "s" ? "s" : "ms", n = nt(t.start.value, s);
|
|
952
|
+
t.start.value = n / this.options.duration * 100, t.start.unit = "%";
|
|
953
|
+
}
|
|
954
|
+
return t.start.value = C(t.start.value, 0, 100), t;
|
|
955
|
+
}
|
|
956
|
+
addFrame(t, s, n, i) {
|
|
957
|
+
typeof t == "number" ? t = String(t) + "%" : typeof t == "string" ? t = t : t instanceof f && (t = String(t));
|
|
958
|
+
const o = st(t);
|
|
959
|
+
let r = {
|
|
960
|
+
id: this.frameId,
|
|
961
|
+
start: o,
|
|
962
|
+
vars: s,
|
|
963
|
+
transform: n,
|
|
964
|
+
timingFunction: M(i) ?? this.options.timingFunction
|
|
965
|
+
};
|
|
966
|
+
return this.convertFrameStart(
|
|
967
|
+
r
|
|
968
|
+
), this.templateFrames.push(
|
|
969
|
+
r
|
|
970
|
+
), this.frameId += 1, this;
|
|
971
|
+
}
|
|
972
|
+
createFrame(t, s) {
|
|
973
|
+
const n = this.templateFrames[t], i = this.templateFrames[s], o = {
|
|
974
|
+
start: t,
|
|
975
|
+
stop: s
|
|
976
|
+
}, r = we(n, i, this.options.duration);
|
|
977
|
+
let a = n.transform;
|
|
978
|
+
if (a == null) {
|
|
979
|
+
const l = R(
|
|
980
|
+
t,
|
|
981
|
+
this.frames,
|
|
982
|
+
(h) => h.transform != null
|
|
983
|
+
);
|
|
984
|
+
a = this.frames[l].transform;
|
|
985
|
+
}
|
|
986
|
+
let u = n.timingFunction;
|
|
987
|
+
if (u == null) {
|
|
988
|
+
const l = R(
|
|
989
|
+
t,
|
|
990
|
+
this.frames,
|
|
991
|
+
(h) => h.timingFunction != null
|
|
992
|
+
);
|
|
993
|
+
u = this.frames[l].timingFunction;
|
|
994
|
+
}
|
|
995
|
+
return {
|
|
996
|
+
id: this.frameId++,
|
|
997
|
+
ixs: o,
|
|
998
|
+
start: n.start,
|
|
999
|
+
time: r,
|
|
1000
|
+
vars: void 0,
|
|
1001
|
+
flatVars: void 0,
|
|
1002
|
+
interpVars: {},
|
|
1003
|
+
transform: a,
|
|
1004
|
+
timingFunction: u
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
reconcileVars(t) {
|
|
1008
|
+
const s = this.parsedVars[t];
|
|
1009
|
+
s && Object.keys(s).forEach((n) => {
|
|
1010
|
+
const i = this.parsedVars.findIndex(
|
|
1011
|
+
(c, l) => l > t && c[n] != null
|
|
1012
|
+
);
|
|
1013
|
+
if (i === -1)
|
|
1014
|
+
return;
|
|
1015
|
+
const [o, r] = [t, i], a = this.frames.findIndex(
|
|
1016
|
+
(c) => c.ixs.start === o && c.ixs.stop === r
|
|
1017
|
+
), u = a !== -1 ? this.frames[a] : this.createFrame(o, r);
|
|
1018
|
+
u.interpVars[n] = ye(
|
|
1019
|
+
n,
|
|
1020
|
+
o,
|
|
1021
|
+
r,
|
|
1022
|
+
this.parsedVars,
|
|
1023
|
+
this.options.colorSpace,
|
|
1024
|
+
this.options.hueMethod
|
|
1025
|
+
), a === -1 && this.frames.push(u);
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
parse() {
|
|
1029
|
+
this.frames = [], this.templateFrames.sort((t, s) => t.start.value - s.start.value), this.parsedVars = this.templateFrames.map((t) => {
|
|
1030
|
+
const s = ge(
|
|
1031
|
+
t.vars
|
|
1032
|
+
);
|
|
1033
|
+
return Object.values(s).forEach((n) => {
|
|
1034
|
+
n.setTargets(this.targets);
|
|
1035
|
+
}), s;
|
|
1036
|
+
});
|
|
1037
|
+
for (let t = 0; t < this.templateFrames.length - 1; t++)
|
|
1038
|
+
this.frames.push(this.createFrame(t, t + 1));
|
|
1039
|
+
return this.frames.forEach((t, s) => this.reconcileVars(s)), this.frames.sort((t, s) => t.time.start === s.time.start ? t.time.stop - s.time.stop : t.time.start - s.time.start), this.frames = this.frames.filter(
|
|
1040
|
+
(t) => t.interpVars != null && Object.keys(t.interpVars).length > 0
|
|
1041
|
+
), this.frames.forEach((t) => {
|
|
1042
|
+
const s = Object.entries(t.interpVars).reduce((n, [i, o]) => (n[i] = o.map((r) => r.value), n), {});
|
|
1043
|
+
t.flatVars = s, t.vars = Et(t.flatVars);
|
|
1044
|
+
}), this;
|
|
1045
|
+
}
|
|
1046
|
+
setTimingFunction(t) {
|
|
1047
|
+
return this.options.timingFunction = M(t) ?? tt, this;
|
|
1048
|
+
}
|
|
1049
|
+
setIterationCount(t) {
|
|
1050
|
+
if (!t || t === "infinite" || t === "∞" || t === "Infinity")
|
|
1051
|
+
this.options.iterationCount = 1 / 0;
|
|
1052
|
+
else if (typeof t == "string") {
|
|
1053
|
+
const s = parseFloat(t.trim());
|
|
1054
|
+
if (isNaN(s) || s < 0) return this;
|
|
1055
|
+
this.options.iterationCount = s;
|
|
1056
|
+
} else {
|
|
1057
|
+
if (isNaN(t) || t < 0) return this;
|
|
1058
|
+
this.options.iterationCount = t;
|
|
1059
|
+
}
|
|
1060
|
+
return this;
|
|
1061
|
+
}
|
|
1062
|
+
setDuration(t) {
|
|
1063
|
+
typeof t == "string" && (t = B(t));
|
|
1064
|
+
const s = t ?? this.options.duration;
|
|
1065
|
+
if (!isFinite(s) || s <= 0) return this;
|
|
1066
|
+
const n = this.options.duration, i = s / n;
|
|
1067
|
+
for (let o = 0; o < this.frames.length; o++) {
|
|
1068
|
+
const r = this.frames[o];
|
|
1069
|
+
r.time.start *= i, r.time.stop *= i;
|
|
1070
|
+
}
|
|
1071
|
+
return this.options.duration = s, this;
|
|
1072
|
+
}
|
|
1073
|
+
setDelay(t) {
|
|
1074
|
+
return typeof t == "string" && (t = B(t)), this.options.delay = t ?? 0, this;
|
|
1075
|
+
}
|
|
1076
|
+
setDirection(t) {
|
|
1077
|
+
return this.options.direction = t ?? "normal", this.reversed = !1, (this.options.direction === "reverse" || this.options.direction === "alternate-reverse" && this.iteration % 2 === 0 || this.options.direction === "alternate" && this.iteration % 2 === 1) && (this.reversed = !0), this;
|
|
1078
|
+
}
|
|
1079
|
+
setFillMode(t) {
|
|
1080
|
+
return this.options.fillMode = t ?? "forwards", this;
|
|
1081
|
+
}
|
|
1082
|
+
setUseWAAPI(t) {
|
|
1083
|
+
return this.options.useWAAPI = t ?? !0, this;
|
|
1084
|
+
}
|
|
1085
|
+
setColorSpace(t) {
|
|
1086
|
+
return this.options.colorSpace = t ?? "oklab", this;
|
|
1087
|
+
}
|
|
1088
|
+
setHueMethod(t) {
|
|
1089
|
+
return t !== void 0 && (this.options.hueMethod = t), this;
|
|
1090
|
+
}
|
|
1091
|
+
setOptions(t) {
|
|
1092
|
+
return this.setTimingFunction(t.timingFunction), this.setDuration(t.duration), this.setIterationCount(t.iterationCount), this.setDelay(t.delay), this.setDirection(t.direction), this.setFillMode(t.fillMode), this.setUseWAAPI(t.useWAAPI), this.setColorSpace(t.colorSpace), this.setHueMethod(t.hueMethod), this;
|
|
1093
|
+
}
|
|
1094
|
+
reverse() {
|
|
1095
|
+
if (this.startTime !== void 0) {
|
|
1096
|
+
const t = this.t, s = this.options.duration - 2 * t;
|
|
1097
|
+
this.startTime -= s;
|
|
1098
|
+
}
|
|
1099
|
+
return this.reversed = !this.reversed, this;
|
|
1100
|
+
}
|
|
1101
|
+
fillForwards() {
|
|
1102
|
+
this.interpFrames(this.options.duration, !0);
|
|
1103
|
+
}
|
|
1104
|
+
fillBackwards() {
|
|
1105
|
+
this.interpFrames(0, !0);
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Stateless progress query. Maps [0,1] from first keyframe to last,
|
|
1109
|
+
* regardless of playback direction. `apply=true` invokes transform callbacks.
|
|
1110
|
+
*/
|
|
1111
|
+
at(t, s = !1) {
|
|
1112
|
+
const n = this.reversed;
|
|
1113
|
+
this.reversed = !1;
|
|
1114
|
+
const i = C(t, 0, 1) * this.options.duration, o = this.interpFrames(i, s);
|
|
1115
|
+
return this.reversed = n, o;
|
|
1116
|
+
}
|
|
1117
|
+
interpFrames(t, s = !1) {
|
|
1118
|
+
t = this.reversed ? this.options.duration - t : t;
|
|
1119
|
+
const n = {};
|
|
1120
|
+
for (let i = 0; i < this.frames.length; i++) {
|
|
1121
|
+
const o = this.frames[i], { start: r, stop: a } = o.time;
|
|
1122
|
+
if (t < r || t > a)
|
|
1123
|
+
continue;
|
|
1124
|
+
const u = at(t, r, a, 0, 1), c = o.timingFunction(u);
|
|
1125
|
+
for (const l of Object.values(o.interpVars))
|
|
1126
|
+
for (const h of l)
|
|
1127
|
+
de(c, h);
|
|
1128
|
+
s && o.transform(
|
|
1129
|
+
this.unflatten ? o.vars : o.flatVars,
|
|
1130
|
+
t
|
|
1131
|
+
), Object.assign(n, o.flatVars);
|
|
1132
|
+
}
|
|
1133
|
+
return n;
|
|
1134
|
+
}
|
|
1135
|
+
async onStart() {
|
|
1136
|
+
this.reversed = !1, (this.options.direction === "reverse" || this.options.direction === "alternate-reverse" && this.iteration % 2 === 0 || this.options.direction === "alternate" && this.iteration % 2 === 1) && this.reverse(), (this.options.fillMode === "backwards" || this.options.fillMode === "both") && this.fillBackwards(), this.options.delay > 0 && (this.paused = !0, await It(this.options.delay), this.paused = !1), this.started = !0;
|
|
1137
|
+
}
|
|
1138
|
+
async onEnd() {
|
|
1139
|
+
this.options.fillMode === "forwards" || this.options.fillMode === "both" ? this.fillForwards() : (this.options.fillMode === "none" || this.options.fillMode === "backwards") && this.fillBackwards(), this.startTime = void 0, this.iteration >= this.options.iterationCount - 1 ? (this.done = !0, this.iteration = 0, this.dispatchAnimationEvent("animationend")) : (this.iteration += 1, this.dispatchAnimationEvent("animationiteration"));
|
|
1140
|
+
}
|
|
1141
|
+
async tick(t) {
|
|
1142
|
+
if (this.startTime === void 0 && (await this.onStart(), this.startTime = t + this.options.delay, this.dispatchAnimationEvent("animationstart")), this.paused && this.pausedTime === 0)
|
|
1143
|
+
return this.pausedTime = t, this.t;
|
|
1144
|
+
if (this.pausedTime > 0 && !this.paused) {
|
|
1145
|
+
const s = t - this.pausedTime;
|
|
1146
|
+
this.startTime += s, this.pausedTime = 0;
|
|
1147
|
+
}
|
|
1148
|
+
return this.t = t - this.startTime, this.t >= this.options.duration && (await this.onEnd(), this.t = this.options.duration), this.t;
|
|
1149
|
+
}
|
|
1150
|
+
async draw(t) {
|
|
1151
|
+
this.managed || (t = await this.tick(t), !this.paused && (this.interpFrames(t, !0), this.done ? (this.reset(), this.resolvePromise && this.resolvePromise()) : this.handleId = v(this.draw.bind(this))));
|
|
1152
|
+
}
|
|
1153
|
+
/** Internal rAF-based play loop. */
|
|
1154
|
+
_playRAF() {
|
|
1155
|
+
return new Promise((t) => {
|
|
1156
|
+
this.resolvePromise = t, this.handleId = v(this.draw.bind(this));
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
/** Play via the Web Animations API for compositor-thread execution. */
|
|
1160
|
+
async _playWAAPI() {
|
|
1161
|
+
try {
|
|
1162
|
+
await Oe(this), this.reset();
|
|
1163
|
+
} catch {
|
|
1164
|
+
return this._playRAF();
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
async play() {
|
|
1168
|
+
if (this.managed)
|
|
1169
|
+
return;
|
|
1170
|
+
if (this._playingPromise) return this._playingPromise;
|
|
1171
|
+
let t;
|
|
1172
|
+
return this.options.useWAAPI && this.targets.length > 0 && typeof this.targets[0]?.animate == "function" && Pe(this) ? t = this._playWAAPI() : t = this._playRAF(), this._playingPromise = t, t.finally(() => {
|
|
1173
|
+
this._playingPromise = null;
|
|
1174
|
+
}), t;
|
|
1175
|
+
}
|
|
1176
|
+
pause(t = !0) {
|
|
1177
|
+
return this.paused && t ? this.resume() : (this.started && (this.paused = !0), this);
|
|
1178
|
+
}
|
|
1179
|
+
resume() {
|
|
1180
|
+
return this.started && this.paused && (this.paused = !1, this.handleId = v(this.draw.bind(this))), this;
|
|
1181
|
+
}
|
|
1182
|
+
stop() {
|
|
1183
|
+
et(this.handleId), this.reset();
|
|
1184
|
+
}
|
|
1185
|
+
playing() {
|
|
1186
|
+
return !(!this.started || this.paused);
|
|
1187
|
+
}
|
|
1188
|
+
/** Returns the effective time accounting for direction reversal. */
|
|
1189
|
+
get effectiveT() {
|
|
1190
|
+
return this.reversed ? this.options.duration - this.t : this.t;
|
|
1191
|
+
}
|
|
1192
|
+
reset() {
|
|
1193
|
+
return this.done = !1, this.started = !1, this.paused = !1, this.reversed = !1, this.iteration = 0, this.startTime = void 0, this.pausedTime = 0, this.t = 0, this;
|
|
1194
|
+
}
|
|
1195
|
+
setTargets(...t) {
|
|
1196
|
+
return this.targets = t, this.frames.forEach((s) => {
|
|
1197
|
+
Object.values(s.interpVars).forEach((n) => {
|
|
1198
|
+
n.forEach(({ start: i, stop: o, value: r }) => {
|
|
1199
|
+
i.setTargets(this.targets), o.setTargets(this.targets), r.setTargets(this.targets);
|
|
1200
|
+
});
|
|
1201
|
+
});
|
|
1202
|
+
}), this;
|
|
1203
|
+
}
|
|
1204
|
+
group(...t) {
|
|
1205
|
+
return new Jt(this, ...t);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
class $e extends pt {
|
|
1209
|
+
constructor(t, ...s) {
|
|
1210
|
+
super(t, s), this.unflatten = !1;
|
|
1211
|
+
}
|
|
1212
|
+
fromVars(t, s) {
|
|
1213
|
+
this.unflatten = s != null, s ??= this.transform.bind(this);
|
|
1214
|
+
for (let n = 0; n < t.length; n++) {
|
|
1215
|
+
const i = t[n], o = Math.round(n / (t.length - 1) * 100);
|
|
1216
|
+
this.addFrame(o, i, s);
|
|
1217
|
+
}
|
|
1218
|
+
return this.parse(), this;
|
|
1219
|
+
}
|
|
1220
|
+
fromKeyframes(t, s) {
|
|
1221
|
+
this.unflatten = s != null, s ??= this.transform.bind(this), Ot(t) && (t = new Map(Object.entries(t)));
|
|
1222
|
+
const n = t instanceof Map ? t.entries() : Object.entries(t);
|
|
1223
|
+
for (const [i, o] of n)
|
|
1224
|
+
this.addFrame(i, o, s);
|
|
1225
|
+
return this.parse(), this;
|
|
1226
|
+
}
|
|
1227
|
+
fromString(t, s) {
|
|
1228
|
+
this.unflatten = s != null, s ??= this.transform.bind(this);
|
|
1229
|
+
const n = Zt(t);
|
|
1230
|
+
for (const [i, o] of n.entries()) {
|
|
1231
|
+
const r = Object.fromEntries(
|
|
1232
|
+
Object.entries(o).map(([c, l]) => [
|
|
1233
|
+
c,
|
|
1234
|
+
Ce(l) ? l.clone() : l
|
|
1235
|
+
])
|
|
1236
|
+
), a = r.animationTimingFunction ?? r.timingFunction;
|
|
1237
|
+
delete r.animationTimingFunction, delete r.timingFunction;
|
|
1238
|
+
const u = a ? M(a.toString()) : void 0;
|
|
1239
|
+
this.addFrame(i, r, s, u);
|
|
1240
|
+
}
|
|
1241
|
+
return this.parse(), this;
|
|
1242
|
+
}
|
|
1243
|
+
transform(t) {
|
|
1244
|
+
ht(t, this.targets);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
export {
|
|
1248
|
+
pt as Animation,
|
|
1249
|
+
Jt as AnimationGroup,
|
|
1250
|
+
Ke as CSSCubicBezier,
|
|
1251
|
+
$e as CSSKeyframesAnimation,
|
|
1252
|
+
je as ElementMorph,
|
|
1253
|
+
Ue as ManualTimeline,
|
|
1254
|
+
Se as NumericAnimation,
|
|
1255
|
+
xe as ScrollTimeline,
|
|
1256
|
+
be as SmoothProgress,
|
|
1257
|
+
ft as Timeline,
|
|
1258
|
+
Ye as bezierPresets,
|
|
1259
|
+
Re as bounceInEase,
|
|
1260
|
+
We as bounceInEaseHalf,
|
|
1261
|
+
Le as bounceInOutEase,
|
|
1262
|
+
Be as bounceOutEase,
|
|
1263
|
+
De as bounceOutEaseHalf,
|
|
1264
|
+
He as easeInBounce,
|
|
1265
|
+
Xe as easeInCirc,
|
|
1266
|
+
ze as easeInCubic,
|
|
1267
|
+
Ge as easeInExpo,
|
|
1268
|
+
Ze as easeInOutCirc,
|
|
1269
|
+
qe as easeInOutCubic,
|
|
1270
|
+
Qe as easeInOutExpo,
|
|
1271
|
+
Je as easeInOutQuad,
|
|
1272
|
+
ts as easeInOutSine,
|
|
1273
|
+
es as easeInQuad,
|
|
1274
|
+
ss as easeInSine,
|
|
1275
|
+
ns as easeOutCirc,
|
|
1276
|
+
is as easeOutCubic,
|
|
1277
|
+
rs as easeOutExpo,
|
|
1278
|
+
os as easeOutQuad,
|
|
1279
|
+
as as easeOutSine,
|
|
1280
|
+
k as getAnimationId,
|
|
1281
|
+
us as jumpTerms,
|
|
1282
|
+
ls as linear,
|
|
1283
|
+
cs as smoothStep3,
|
|
1284
|
+
hs as stepEnd,
|
|
1285
|
+
fs as stepStart,
|
|
1286
|
+
ps as steppedEase,
|
|
1287
|
+
ms as timingFunctions
|
|
1288
|
+
};
|