@cliquify.me/animations 10.0.2 → 10.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsx as H, Fragment as vt, jsxs as Vt } from "react/jsx-runtime";
2
- import q, { useMemo as jt } from "react";
3
- import { interpolate as G, Easing as E } from "remotion";
4
- const Ht = () => ({
1
+ import { jsx as H, Fragment as It, jsxs as jt } from "react/jsx-runtime";
2
+ import J, { useMemo as Ht } from "react";
3
+ import { interpolate as K, Easing as R } from "remotion";
4
+ const Tt = () => ({
5
5
  scale: (t) => ({ transform: `scale(${t})` }),
6
6
  growIn: (t) => ({ transform: `scale(${t})` }),
7
7
  shrinkIn: (t) => ({ transform: `scale(${t})` }),
@@ -93,258 +93,258 @@ const Ht = () => ({
93
93
  borderRadius: `${t}px`,
94
94
  overflow: "hidden"
95
95
  })
96
- }), Xt = (t, d = 0) => {
97
- const n = [], l = t / 5;
98
- for (let i = 0; i < 6; i += 1)
99
- n.push(i * l + d);
100
- return n;
101
- }, Tt = (t, d, n, l = !1) => {
102
- const { from: i, to: s, ease: b } = d, h = d.durationInFrames || 30, f = Number(i), o = Number(s), r = Math.max(1, Number(h));
103
- if (isNaN(f) || isNaN(o))
96
+ }), Bt = (t, f = 0) => {
97
+ const l = [], a = t / 5;
98
+ for (let c = 0; c < 6; c += 1)
99
+ l.push(c * a + f);
100
+ return l;
101
+ }, Wt = (t, f, l, a = !1) => {
102
+ const { from: c, to: n, ease: g } = f, p = f.durationInFrames || 30, u = Number(c), s = Number(n), r = Math.max(1, Number(p));
103
+ if (isNaN(u) || isNaN(s))
104
104
  return console.error("Invalid animation values:", {
105
- from: i,
106
- to: s,
107
- animationDurationInFrames: h,
108
- property: d.property
109
- }), f;
110
- h === void 0 && console.warn(
111
- `durationInFrames is undefined for animation: ${d.property}. Using 1 frame as default.`
105
+ from: c,
106
+ to: n,
107
+ animationDurationInFrames: p,
108
+ property: f.property
109
+ }), u;
110
+ p === void 0 && console.warn(
111
+ `durationInFrames is undefined for animation: ${f.property}. Using 1 frame as default.`
112
112
  );
113
- const c = d.delay || 0;
114
- if (d.property === "hide-show" || d.property === "hide" || d.property === "show")
115
- return t < c ? f : o;
113
+ const d = f.delay || 0;
114
+ if (f.property === "hide-show" || f.property === "hide" || f.property === "show")
115
+ return t < d ? u : s;
116
116
  let $;
117
- if (d.property === "moveScaleIn" ? $ = l ? [
118
- n - r - c,
119
- n - r * 0.5 - c
117
+ if (f.property === "moveScaleIn" ? $ = a ? [
118
+ l - r - d,
119
+ Math.max(0, l - 1 - d)
120
120
  ] : [
121
- c + r * 0.5,
122
- c + r
123
- ] : d.property === "moveTranslateY" ? $ = l ? [
124
- n - r * 0.5 - c,
125
- n - c
121
+ d + r * 0.5,
122
+ d + r
123
+ ] : f.property === "moveTranslateY" ? $ = a ? [
124
+ l - r * 0.5 - d,
125
+ Math.max(0, l - 1 - d)
126
126
  ] : [
127
- c,
128
- c + r * 0.5
129
- ] : $ = l ? [
130
- n - r - c,
131
- n - c
127
+ d,
128
+ d + r * 0.5
129
+ ] : $ = a ? [
130
+ l - r - d,
131
+ Math.max(0, l - 1 - d)
132
132
  ] : [
133
- c,
134
- c + r
135
- ], d.property.includes("shake")) {
136
- const v = l ? Xt(
133
+ d,
134
+ d + r
135
+ ], f.property.includes("shake")) {
136
+ const X = a ? Bt(
137
137
  r,
138
- n - r - c
139
- ) : Xt(r, c);
140
- return G(
138
+ l - r - d
139
+ ) : Bt(r, d);
140
+ return K(
141
141
  t,
142
- v,
143
- [0, f, o, f, o, 0],
142
+ X,
143
+ [0, u, s, u, s, 0],
144
144
  {
145
145
  extrapolateLeft: "clamp",
146
146
  extrapolateRight: "clamp",
147
- easing: b
147
+ easing: g
148
148
  }
149
149
  );
150
150
  }
151
- return G(t, $, [f, o], {
151
+ return K(t, $, [u, s], {
152
152
  extrapolateLeft: "clamp",
153
153
  extrapolateRight: "clamp",
154
- easing: b
154
+ easing: g
155
155
  });
156
- }, J = (t) => {
156
+ }, Q = (t) => {
157
157
  if (t == null) return 0;
158
158
  if (typeof t == "number")
159
159
  return Number.isNaN(t) ? 0 : t;
160
160
  if (typeof t == "object") {
161
161
  if (t.rotate !== void 0 && t.rotate !== null) {
162
- const i = parseFloat(String(t.rotate));
163
- if (!Number.isNaN(i)) return i;
162
+ const c = parseFloat(String(t.rotate));
163
+ if (!Number.isNaN(c)) return c;
164
164
  }
165
165
  if (t.rotation !== void 0 && t.rotation !== null) {
166
- const i = parseFloat(String(t.rotation));
167
- if (!Number.isNaN(i)) return i;
166
+ const c = parseFloat(String(t.rotation));
167
+ if (!Number.isNaN(c)) return c;
168
168
  }
169
- return t.transform ? J(t.transform) : 0;
169
+ return t.transform ? Q(t.transform) : 0;
170
170
  }
171
- const d = String(t), n = /rotate\((-?[\d.]+)deg\)/.exec(d);
172
- if (n)
173
- return parseFloat(n[1]) || 0;
174
- const l = /matrix\(([^)]+)\)/.exec(d);
175
- if (l) {
176
- const i = l[1].split(",").map((s) => parseFloat(s.trim()));
177
- if (i.length >= 4) {
178
- const [s, b] = i;
179
- return Math.atan2(b, s) * (180 / Math.PI);
171
+ const f = String(t), l = /rotate\((-?[\d.]+)deg\)/.exec(f);
172
+ if (l)
173
+ return parseFloat(l[1]) || 0;
174
+ const a = /matrix\(([^)]+)\)/.exec(f);
175
+ if (a) {
176
+ const c = a[1].split(",").map((n) => parseFloat(n.trim()));
177
+ if (c.length >= 4) {
178
+ const [n, g] = c;
179
+ return Math.atan2(g, n) * (180 / Math.PI);
180
180
  }
181
181
  }
182
182
  return 0;
183
- }, It = (t, d, n, l, i) => {
184
- var f, o, r, c, $;
185
- const { property: s } = t;
186
- if (s === "move") {
187
- const v = Number(((f = t.details) == null ? void 0 : f.fromX) ?? t.from ?? 0), B = Number(((o = t.details) == null ? void 0 : o.toX) ?? t.to ?? 0), T = Number(((r = t.details) == null ? void 0 : r.fromY) ?? 0), P = Number(((c = t.details) == null ? void 0 : c.toY) ?? 0), F = Number((($ = t.details) == null ? void 0 : $.scale) || 1) || 1;
188
- let V = i;
189
- if (V == null || Number.isNaN(V)) {
190
- const p = t.details;
191
- V = J((p == null ? void 0 : p.rotate) ?? (p == null ? void 0 : p.rotation) ?? (p == null ? void 0 : p.transform));
183
+ }, Pt = (t, f, l, a, c) => {
184
+ var u, s, r, d, $;
185
+ const { property: n } = t;
186
+ if (n === "move") {
187
+ const X = Number(((u = t.details) == null ? void 0 : u.fromX) ?? t.from ?? 0), B = Number(((s = t.details) == null ? void 0 : s.toX) ?? t.to ?? 0), T = Number(((r = t.details) == null ? void 0 : r.fromY) ?? 0), P = Number(((d = t.details) == null ? void 0 : d.toY) ?? 0), E = Number((($ = t.details) == null ? void 0 : $.scale) || 1) || 1;
188
+ let O = c;
189
+ if (O == null || Number.isNaN(O)) {
190
+ const m = t.details;
191
+ O = Q((m == null ? void 0 : m.rotate) ?? (m == null ? void 0 : m.rotation) ?? (m == null ? void 0 : m.transform));
192
192
  }
193
- const e = t.delay || 0, x = t.durationInFrames || 30, C = l ? [n - x - e, n - e] : [e, e + x], O = G(d, C, [v, B], {
193
+ const e = t.delay || 0, x = t.durationInFrames || 30, F = a ? [l - x - e, Math.max(0, l - 1 - e)] : [e, e + x], C = K(f, F, [X, B], {
194
194
  extrapolateLeft: "clamp",
195
195
  extrapolateRight: "clamp",
196
196
  easing: t.ease
197
- }), S = G(d, C, [T, P], {
197
+ }), w = K(f, F, [T, P], {
198
198
  extrapolateLeft: "clamp",
199
199
  extrapolateRight: "clamp",
200
200
  easing: t.ease
201
- }), w = (V || 0) * Math.PI / 180, Y = Math.cos(w), a = Math.sin(w), g = O * Y + S * a, m = -O * a + S * Y, j = g / F, R = m / F;
201
+ }), S = (O || 0) * Math.PI / 180, Y = Math.cos(S), i = Math.sin(S), h = C * Y + w * i, y = -C * i + w * Y, V = h / E, Z = y / E;
202
202
  return {
203
- transform: `translateX(${j}px) translateY(${R}px)`
203
+ transform: `translateX(${V}px) translateY(${Z}px)`
204
204
  };
205
205
  }
206
- const b = Tt(d, t, n, l), h = Ht();
207
- return (h[s] || h.default)(b);
208
- }, M = (t, d, n, l = !1, i = !1, s) => q.useMemo(() => {
206
+ const g = Wt(f, t, l, a), p = Tt();
207
+ return (p[n] || p.default)(g);
208
+ }, G = (t, f, l, a = !1, c = !1, n) => J.useMemo(() => {
209
209
  if (t.length === 0) return {};
210
- const b = t.filter(
211
- (h) => h.from !== void 0 && h.to !== void 0
210
+ const g = t.filter(
211
+ (p) => p.from !== void 0 && p.to !== void 0
212
212
  );
213
- if (b.length !== t.length && console.error("Some animations are invalid and will be ignored"), i) {
214
- const h = [];
215
- return b.reverse().forEach((o) => {
216
- const r = It(
217
- o,
218
- n,
219
- d,
213
+ if (g.length !== t.length && console.error("Some animations are invalid and will be ignored"), c) {
214
+ const p = [];
215
+ return g.reverse().forEach((s) => {
216
+ const r = Pt(
217
+ s,
218
+ l,
219
+ f,
220
220
  !1,
221
- s
221
+ n
222
222
  );
223
- h.push(r);
224
- }), h.reduce(
225
- (o, r) => (Object.keys(r).forEach((c) => {
226
- c === "transform" || c === "filter" ? o[c] = o[c] ? `${o[c]} ${r[c]}` : r[c] : o[c] = r[c];
227
- }), o),
223
+ p.push(r);
224
+ }), p.reduce(
225
+ (s, r) => (Object.keys(r).forEach((d) => {
226
+ d === "transform" || d === "filter" ? s[d] = s[d] ? `${s[d]} ${r[d]}` : r[d] : s[d] = r[d];
227
+ }), s),
228
228
  {}
229
229
  );
230
230
  } else
231
- return b.map((f) => It(f, n, d, l, s)).reduce(
232
- (f, o) => (Object.keys(o).forEach((r) => {
233
- r === "transform" || r === "filter" ? f[r] = f[r] ? `${f[r]} ${o[r]}` : o[r] : f[r] = o[r];
234
- }), f),
231
+ return g.map((u) => Pt(u, l, f, a, n)).reduce(
232
+ (u, s) => (Object.keys(s).forEach((r) => {
233
+ r === "transform" || r === "filter" ? u[r] = u[r] ? `${u[r]} ${s[r]}` : s[r] : u[r] = s[r];
234
+ }), u),
235
235
  {}
236
236
  );
237
- }, [t, n, d, l, s]), U = (t) => t ? Array.isArray(t) ? t : [t] : [], Dt = (...t) => {
238
- const d = [];
239
- return t.forEach((n) => {
240
- Array.isArray(n) ? d.push(...n) : n && d.push(n);
241
- }), d.filter((n) => n !== void 0).reduce((n, l) => n.find(
242
- (s) => s.property === l.property
243
- ) ? n.map(
244
- (s) => s.property === l.property ? {
245
- ...s,
246
- from: Math.min(s.from, l.from),
247
- to: Math.max(s.to, l.to),
237
+ }, [t, l, f, a, n]), q = (t) => t ? Array.isArray(t) ? t : [t] : [], Gt = (...t) => {
238
+ const f = [];
239
+ return t.forEach((l) => {
240
+ Array.isArray(l) ? f.push(...l) : l && f.push(l);
241
+ }), f.filter((l) => l !== void 0).reduce((l, a) => l.find(
242
+ (n) => n.property === a.property
243
+ ) ? l.map(
244
+ (n) => n.property === a.property ? {
245
+ ...n,
246
+ from: Math.min(n.from, a.from),
247
+ to: Math.max(n.to, a.to),
248
248
  durationInFrames: Math.max(
249
- s.durationInFrames,
250
- l.durationInFrames
249
+ n.durationInFrames,
250
+ a.durationInFrames
251
251
  ),
252
- delay: Math.min(s.delay || 0, l.delay || 0),
253
- ease: (b) => (s.ease(b) + l.ease(b)) / 2
252
+ delay: Math.min(n.delay || 0, a.delay || 0),
253
+ ease: (g) => (n.ease(g) + a.ease(g)) / 2
254
254
  // Average the easing functions
255
- } : s
256
- ) : [...n, l], []);
257
- }, Gt = ({
255
+ } : n
256
+ ) : [...l, a], []);
257
+ }, Jt = ({
258
258
  animationIn: t,
259
- animationOut: d,
260
- durationInFrames: n,
261
- children: l,
262
- style: i = {},
263
- frame: s,
264
- isTransition: b = !1,
265
- basicCharAnimationsIn: h = [],
266
- basicCharAnimationsOut: f = []
259
+ animationOut: f,
260
+ durationInFrames: l,
261
+ children: a,
262
+ style: c = {},
263
+ frame: n,
264
+ isTransition: g = !1,
265
+ basicCharAnimationsIn: p = [],
266
+ basicCharAnimationsOut: u = []
267
267
  }) => {
268
- const o = J(
269
- (i == null ? void 0 : i.transform) || (i == null ? void 0 : i.rotate) || (i == null ? void 0 : i.rotation)
270
- ), r = M(
271
- U(t),
268
+ const s = Q(
269
+ (c == null ? void 0 : c.transform) || (c == null ? void 0 : c.rotate) || (c == null ? void 0 : c.rotation)
270
+ ), r = G(
271
+ q(t),
272
+ l,
272
273
  n,
273
- s,
274
274
  !1,
275
275
  !1,
276
- o
277
- ), c = M(
278
- U(d),
276
+ s
277
+ ), d = G(
278
+ q(f),
279
+ l,
279
280
  n,
280
- s,
281
281
  !0,
282
282
  !1,
283
- o
284
- ), $ = M(
285
- U(h),
283
+ s
284
+ ), $ = G(
285
+ q(p),
286
+ l,
286
287
  n,
287
- s,
288
288
  !0,
289
289
  !1,
290
- o
291
- ), v = M(
292
- U(f),
290
+ s
291
+ ), X = G(
292
+ q(u),
293
+ l,
293
294
  n,
294
- s,
295
295
  !0,
296
296
  !1,
297
- o
298
- ), B = q.useMemo(() => {
299
- const S = Object.keys(r).length > 0, w = t == null ? void 0 : t.reduce(
300
- (a, g) => Math.min(a, g.delay || 0),
297
+ s
298
+ ), B = J.useMemo(() => {
299
+ const w = Object.keys(r).length > 0, S = t == null ? void 0 : t.reduce(
300
+ (i, h) => Math.min(i, h.delay || 0),
301
301
  1 / 0
302
- ), Y = s - (w || 0);
303
- return S && Y < 0 ? { visibility: b ? "visible" : "hidden" } : r;
304
- }, [r, s, t, b]), T = q.useMemo(() => {
305
- if (s > n)
306
- return { visibility: b ? "visible" : "hidden" };
307
- const S = U(d);
308
- if (!S || S.length === 0) return {};
309
- let w = 0;
310
- S.forEach((a) => {
311
- const g = (a.durationInFrames || 0) + (a.delay || 0);
312
- g > w && (w = g);
302
+ ), Y = n - (S || 0);
303
+ return w && Y < 0 ? { visibility: g ? "visible" : "hidden" } : r;
304
+ }, [r, n, t, g]), T = J.useMemo(() => {
305
+ if (n > l)
306
+ return { visibility: g ? "visible" : "hidden" };
307
+ const w = q(f);
308
+ if (!w || w.length === 0) return {};
309
+ let S = 0;
310
+ w.forEach((i) => {
311
+ const h = (i.durationInFrames || 0) + (i.delay || 0);
312
+ h > S && (S = h);
313
313
  });
314
- const Y = Math.max(0, n - w);
315
- return s < Y ? {} : c;
316
- }, [c, s, d, n, b]), P = q.useMemo(() => {
317
- const S = {
314
+ const Y = Math.max(0, l - S);
315
+ return n < Y ? {} : d;
316
+ }, [d, n, f, l, g]), P = J.useMemo(() => {
317
+ const w = {
318
318
  ...B
319
319
  };
320
- return Object.entries(T).forEach(([w, Y]) => {
321
- w === "transform" ? S[w] = `${S[w] || ""} ${Y || ""}`.trim() : w in S && typeof S[w] == "number" && typeof Y == "number" ? S[w] = S[w] * Y : S[w] = Y;
322
- }), S;
323
- }, [B, T]), F = jt(() => {
324
- const S = P.transform || "", {
325
- translateX: w,
320
+ return Object.entries(T).forEach(([S, Y]) => {
321
+ S === "transform" ? w[S] = `${w[S] || ""} ${Y || ""}`.trim() : S in w && typeof w[S] == "number" && typeof Y == "number" ? w[S] = w[S] * Y : w[S] = Y;
322
+ }), w;
323
+ }, [B, T]), E = Ht(() => {
324
+ const w = P.transform || "", {
325
+ translateX: S,
326
326
  translateY: Y,
327
- scale: a,
328
- rotation: g,
329
- rotateX: m,
330
- rotateY: j,
331
- rotateZ: R
332
- } = Wt(S);
333
- return `${g} ${w} ${Y} ${a} ${m} ${j} ${R}`.trim();
327
+ scale: i,
328
+ rotation: h,
329
+ rotateX: y,
330
+ rotateY: V,
331
+ rotateZ: Z
332
+ } = Lt(w);
333
+ return `${h} ${S} ${Y} ${i} ${y} ${V} ${Z}`.trim();
334
334
  }, [P]), {
335
- top: V,
335
+ top: O,
336
336
  left: e,
337
337
  position: x,
338
- transform: C,
339
- ...O
340
- } = i || {};
338
+ transform: F,
339
+ ...C
340
+ } = c || {};
341
341
  return /* @__PURE__ */ H(
342
342
  "div",
343
343
  {
344
344
  style: {
345
345
  width: "100%",
346
346
  height: "100%",
347
- overflow: P.overflow || $.overflow || v.overflow || "visible",
347
+ overflow: P.overflow || $.overflow || X.overflow || "visible",
348
348
  pointerEvents: "none"
349
349
  },
350
350
  children: /* @__PURE__ */ H(
@@ -353,71 +353,71 @@ const Ht = () => ({
353
353
  style: {
354
354
  width: "100%",
355
355
  height: "100%",
356
- ...O,
356
+ ...C,
357
357
  ...P,
358
358
  overflow: "visible",
359
- transform: F,
359
+ transform: E,
360
360
  pointerEvents: "none",
361
361
  background: Object.keys(P).length === 0 ? "transparent" : P.backgroundColor
362
362
  },
363
- children: l
363
+ children: a
364
364
  }
365
365
  )
366
366
  }
367
367
  );
368
- }, Wt = (t) => {
369
- let d = "", n = "", l = "scale(1)", i = "", s = "", b = "", h = "";
370
- const f = t.match(/translateX\([^)]+\)/g);
371
- f && (d = f[f.length - 1]);
372
- const o = t.match(/translateY\([^)]+\)/g);
373
- o && (n = o[o.length - 1]);
368
+ }, Lt = (t) => {
369
+ let f = "", l = "", a = "scale(1)", c = "", n = "", g = "", p = "";
370
+ const u = t.match(/translateX\([^)]+\)/g);
371
+ u && (f = u[u.length - 1]);
372
+ const s = t.match(/translateY\([^)]+\)/g);
373
+ s && (l = s[s.length - 1]);
374
374
  const r = t.match(/scale\([^)]+\)/g);
375
- r && (l = r[r.length - 1]);
376
- const c = t.match(/rotate\([^)]+\)/g);
377
- c && (i = c[c.length - 1]);
375
+ r && (a = r[r.length - 1]);
376
+ const d = t.match(/rotate\([^)]+\)/g);
377
+ d && (c = d[d.length - 1]);
378
378
  const $ = t.match(/rotateX\([^)]+\)/g);
379
- $ && (s = $[$.length - 1]);
380
- const v = t.match(/rotateY\([^)]+\)/g);
381
- v && (b = v[v.length - 1]);
379
+ $ && (n = $[$.length - 1]);
380
+ const X = t.match(/rotateY\([^)]+\)/g);
381
+ X && (g = X[X.length - 1]);
382
382
  const B = t.match(/rotateZ\([^)]+\)/g);
383
- return B && (h = B[B.length - 1]), { translateX: d, translateY: n, scale: l, rotation: i, rotateX: s, rotateY: b, rotateZ: h };
384
- }, Jt = ({
383
+ return B && (p = B[B.length - 1]), { translateX: f, translateY: l, scale: a, rotation: c, rotateX: n, rotateY: g, rotateZ: p };
384
+ }, Kt = ({
385
385
  animationTimed: t,
386
- durationInFrames: d,
387
- children: n,
388
- style: l = {},
389
- frame: i
386
+ durationInFrames: f,
387
+ children: l,
388
+ style: a = {},
389
+ frame: c
390
390
  }) => {
391
- const s = J(
392
- (l == null ? void 0 : l.transform) || (l == null ? void 0 : l.rotate) || (l == null ? void 0 : l.rotation)
393
- ), b = M(
394
- U(t),
395
- d,
396
- i,
391
+ const n = Q(
392
+ (a == null ? void 0 : a.transform) || (a == null ? void 0 : a.rotate) || (a == null ? void 0 : a.rotation)
393
+ ), g = G(
394
+ q(t),
395
+ f,
396
+ c,
397
397
  !1,
398
398
  !0,
399
- s
400
- ), h = q.useMemo(() => ({
401
- ...b
402
- }), [b]), f = !!h.borderRadius;
399
+ n
400
+ ), p = J.useMemo(() => ({
401
+ ...g
402
+ }), [g]), u = !!p.borderRadius;
403
403
  return /* @__PURE__ */ H(
404
404
  "div",
405
405
  {
406
406
  style: {
407
- overflow: f ? "hidden" : h.overflow || "visible",
408
- borderRadius: h.borderRadius,
407
+ overflow: u ? "hidden" : p.overflow || "visible",
408
+ borderRadius: p.borderRadius,
409
409
  pointerEvents: "none",
410
- height: l.height || "100%",
411
- width: l.width || "100%",
412
- ...h,
413
- ...f ? { overflow: "hidden" } : {}
410
+ height: a.height || "100%",
411
+ width: a.width || "100%",
412
+ ...p,
413
+ ...u ? { overflow: "hidden" } : {}
414
414
  },
415
415
  children: /* @__PURE__ */ H(
416
416
  "div",
417
417
  {
418
418
  style: {
419
- overflow: f ? "hidden" : "visible",
420
- borderRadius: h.borderRadius,
419
+ overflow: u ? "hidden" : "visible",
420
+ borderRadius: p.borderRadius,
421
421
  pointerEvents: "none",
422
422
  height: "100%",
423
423
  width: "100%",
@@ -425,186 +425,188 @@ const Ht = () => ({
425
425
  alignItems: "center",
426
426
  justifyContent: "center"
427
427
  },
428
- children: n
428
+ children: l
429
429
  }
430
430
  )
431
431
  }
432
432
  );
433
- }, Lt = (t) => {
433
+ }, Mt = (t) => {
434
434
  if (typeof (t == null ? void 0 : t.ease) == "function")
435
435
  return t.ease;
436
436
  switch (t == null ? void 0 : t.easing) {
437
437
  case "ease-in":
438
438
  case "accelerate":
439
- return E.in(E.cubic);
439
+ return R.in(R.cubic);
440
440
  case "ease-out":
441
441
  case "smooth":
442
442
  case "slowDown":
443
- return E.out(E.cubic);
443
+ return R.out(R.cubic);
444
444
  case "ease-in-out":
445
445
  case "natural":
446
446
  case "swing":
447
- return E.inOut(E.cubic);
447
+ return R.inOut(R.cubic);
448
448
  case "bounce":
449
- return E.bounce;
449
+ return R.bounce;
450
450
  case "elastic":
451
- return E.elastic(1);
451
+ return R.elastic(1);
452
452
  case "overshoot":
453
453
  case "impulse":
454
- return E.out(E.back(1.7));
454
+ return R.out(R.back(1.7));
455
455
  case "none":
456
456
  case "linear":
457
457
  default:
458
- return E.linear;
458
+ return R.linear;
459
459
  }
460
- }, Zt = (t, d) => {
461
- const n = d * Math.PI / 180, l = Math.cos(n), i = Math.sin(n), s = t / 100 * 50, b = 50, h = 50, f = 200, o = l, r = i, c = -i, $ = l;
460
+ }, Ut = (t, f) => {
461
+ const l = f * Math.PI / 180, a = Math.cos(l), c = Math.sin(l), n = t / 100 * 50, g = 50, p = 50, u = 200, s = a, r = c, d = -c, $ = a;
462
462
  return `polygon(${[
463
463
  [
464
- b - o * f - c * s,
465
- h - r * f - $ * s
464
+ g - s * u - d * n,
465
+ p - r * u - $ * n
466
466
  ],
467
467
  [
468
- b + o * f - c * s,
469
- h + r * f - $ * s
468
+ g + s * u - d * n,
469
+ p + r * u - $ * n
470
470
  ],
471
471
  [
472
- b + o * f + c * s,
473
- h + r * f + $ * s
472
+ g + s * u + d * n,
473
+ p + r * u + $ * n
474
474
  ],
475
475
  [
476
- b - o * f + c * s,
477
- h - r * f + $ * s
476
+ g - s * u + d * n,
477
+ p - r * u + $ * n
478
478
  ]
479
479
  ].map(([B, T]) => `${B}% ${T}%`).join(", ")})`;
480
- }, zt = ({
480
+ }, Zt = ({
481
481
  children: t,
482
- currentWidth: d,
483
- currentHeight: n,
484
- frame: l,
485
- item: i,
486
- keyframeAnimations: s,
487
- durationInFrames: b
482
+ currentWidth: f,
483
+ currentHeight: l,
484
+ frame: a,
485
+ item: c,
486
+ keyframeAnimations: n,
487
+ durationInFrames: g
488
488
  }) => {
489
- var et, rt, ot, st, nt, lt, at, it, ct, dt, ft, ut, pt, ht, gt, bt, $t, xt, St, wt, mt, yt, Nt, Yt;
490
- if (!s || !Array.isArray(s) || s.length === 0)
491
- return /* @__PURE__ */ H(vt, { children: t });
492
- const h = (u) => {
493
- var y, I;
494
- return !!((y = u == null ? void 0 : u.property) != null && y.includes("maskReveal") || (I = u == null ? void 0 : u.id) != null && I.includes("maskReveal"));
495
- }, f = (u) => {
496
- var y, I;
497
- return !!((u == null ? void 0 : u.type) === "exit" || (y = u == null ? void 0 : u.property) != null && y.includes("Out") || (I = u == null ? void 0 : u.id) != null && I.includes("Out"));
498
- }, o = s.find(
499
- (u) => h(u) && !f(u)
500
- ), r = s.find(
501
- (u) => h(u) && f(u)
489
+ var rt, ot, st, nt, lt, at, it, ct, dt, ft, ut, pt, ht, gt, bt, $t, xt, wt, St, yt, Nt, mt, Yt, vt, Xt;
490
+ if (!n || !Array.isArray(n) || n.length === 0)
491
+ return /* @__PURE__ */ H(It, { children: t });
492
+ const p = (o) => {
493
+ var b, v, M, z, U, N;
494
+ return !!((b = o == null ? void 0 : o.property) != null && b.includes("maskReveal") || (v = o == null ? void 0 : o.id) != null && v.includes("maskReveal") || (M = o == null ? void 0 : o.property) != null && M.includes("maskUp") || (z = o == null ? void 0 : o.id) != null && z.includes("maskUp") || (U = o == null ? void 0 : o.property) != null && U.includes("maskDown") || (N = o == null ? void 0 : o.id) != null && N.includes("maskDown"));
495
+ }, u = (o) => {
496
+ var b, v;
497
+ return !!((o == null ? void 0 : o.type) === "exit" || (b = o == null ? void 0 : o.property) != null && b.includes("Out") || (v = o == null ? void 0 : o.id) != null && v.includes("Out"));
498
+ }, s = n.find(
499
+ (o) => p(o) && !u(o)
500
+ ), r = n.find(
501
+ (o) => p(o) && u(o)
502
502
  );
503
- if (!o && !r)
504
- return /* @__PURE__ */ H(vt, { children: t });
505
- const c = Math.max(1, b || 300), $ = o ? Math.max(1, Number(o.durationInFrames || 30)) : 30, v = o ? Math.max(0, Number(o.delay || 0)) : 0, B = r ? Math.max(1, Number(r.durationInFrames || 30)) : 30, T = r ? Math.max(0, Number(r.delay || 0)) : 0, P = r ? Math.max(0, c - B - T) : Number.POSITIVE_INFINITY;
506
- let F = !1, V = !1, e = null, x = !1, C = 30, O = 0;
507
- if (r && (l >= P || !o)) {
508
- e = r, x = !0, C = B;
509
- const u = o || P < c ? P : 0;
510
- O = l - u;
511
- const y = String(r.property || r.id || ""), I = y.includes("Blur") || y.includes("Soft") || !!((et = r == null ? void 0 : r.details) != null && et.blurBottom) || !!((rt = r == null ? void 0 : r.details) != null && rt.softEdge);
512
- O >= C - 1 && !I && (F = !0);
513
- } else if (o)
514
- if (l < v)
515
- F = !0, e = o, x = !1, C = $, O = 0;
516
- else if (l < v + $)
517
- e = o, x = !1, C = $, O = l - v;
503
+ if (!s && !r)
504
+ return /* @__PURE__ */ H(It, { children: t });
505
+ const d = Math.max(1, g || 300), $ = s ? Math.max(1, Number(s.durationInFrames || 30)) : 30, X = s ? Math.max(0, Number(s.delay || 0)) : 0, B = r ? Math.max(1, Number(r.durationInFrames || 30)) : 30, T = r ? Math.max(0, Number(r.delay || 0)) : 0, P = r ? Math.max(0, d - B - T) : Number.POSITIVE_INFINITY;
506
+ let E = !1, O = !1, e = null, x = !1, F = 30, C = 0;
507
+ if (r && (a >= P || !s)) {
508
+ e = r, x = !0, F = B;
509
+ const o = s || P < d ? P : 0;
510
+ C = a - o;
511
+ const b = String(r.property || r.id || ""), v = b.includes("Blur") || b.includes("Soft") || !!((rt = r == null ? void 0 : r.details) != null && rt.blurBottom) || !!((ot = r == null ? void 0 : r.details) != null && ot.softEdge);
512
+ C >= F - 1 && !v && (E = !0);
513
+ } else if (s)
514
+ if (a < X)
515
+ E = !0, e = s, x = !1, F = $, C = 0;
516
+ else if (a < X + $)
517
+ e = s, x = !1, F = $, C = a - X;
518
518
  else {
519
- const u = String(o.property || o.id || "");
520
- u.includes("Blur") || u.includes("Soft") || !!((ot = o == null ? void 0 : o.details) != null && ot.blurBottom) || !!((st = o == null ? void 0 : o.details) != null && st.softEdge) ? (e = o, x = !1, C = $, O = $) : (V = !0, e = null);
519
+ const o = String(s.property || s.id || "");
520
+ o.includes("Blur") || o.includes("Soft") || !!((st = s == null ? void 0 : s.details) != null && st.blurBottom) || !!((nt = s == null ? void 0 : s.details) != null && nt.softEdge) ? (e = s, x = !1, F = $, C = $) : (O = !0, e = null);
521
521
  }
522
522
  else
523
- V = !0, e = null;
524
- const S = Math.max(0, O), w = C > 0 ? Math.min(Math.max(0, S / C), 1) : 1, Y = e ? Lt(e) : E.linear, a = Math.max(
523
+ O = !0, e = null;
524
+ const w = Math.max(0, C), S = F > 0 ? Math.min(Math.max(0, w / F), 1) : 1, Y = e ? Mt(e) : R.linear, i = Math.max(
525
525
  0,
526
- Math.min(1, Y(w))
526
+ Math.min(1, Y(S))
527
527
  );
528
- let g, m = "", j = 1;
529
- const R = String(
528
+ let h, y = "", V = 1;
529
+ const Z = String(
530
530
  (e == null ? void 0 : e.property) || (e == null ? void 0 : e.id) || ""
531
- ), p = ((nt = e == null ? void 0 : e.details) == null ? void 0 : nt.direction) || "up";
532
- if (F)
533
- g = "inset(100%)";
534
- else if (V || !e)
535
- g = void 0;
531
+ ), m = ((lt = e == null ? void 0 : e.details) == null ? void 0 : lt.direction) || "up";
532
+ if (E)
533
+ h = "inset(100%)";
534
+ else if (O || !e)
535
+ h = void 0;
536
536
  else {
537
- const u = R.includes("ShrinkScale"), y = R.includes("CenterScale"), I = R.includes("Slide") || R.includes("slide");
538
- if (y) {
537
+ const o = String(
538
+ e.property || e.id || ""
539
+ ), b = ((at = e.details) == null ? void 0 : at.direction) || (o.includes("maskDown") ? "down" : (o.includes("maskUp"), "up")), v = o.includes("ShrinkScale"), M = o.includes("CenterScale"), z = o.includes("Slide") || o.includes("slide");
540
+ if (M) {
539
541
  const N = Number(
540
- ((lt = e == null ? void 0 : e.details) == null ? void 0 : lt.angle) ?? (e == null ? void 0 : e.angle) ?? 0
541
- ), Z = x ? 100 * (1 - a) : 100 * a;
542
- g = Zt(
543
- Z,
542
+ ((it = e == null ? void 0 : e.details) == null ? void 0 : it.angle) ?? (e == null ? void 0 : e.angle) ?? 0
543
+ ), D = x ? 100 * (1 - i) : 100 * i;
544
+ h = Ut(
545
+ D,
544
546
  N
545
547
  );
546
- } else if (u) {
548
+ } else if (v) {
547
549
  const N = Number(
548
- ((at = e == null ? void 0 : e.details) == null ? void 0 : at.initialVisiblePercent) ?? (e == null ? void 0 : e.initialVisiblePercent) ?? 50
549
- ), Z = Math.max(
550
+ ((ct = e == null ? void 0 : e.details) == null ? void 0 : ct.initialVisiblePercent) ?? (e == null ? void 0 : e.initialVisiblePercent) ?? 50
551
+ ), D = Math.max(
550
552
  0,
551
553
  Math.min(50, (100 - N) / 2)
552
- ), z = x ? Z * a : Z * (1 - a);
553
- g = `inset(
554
- ${z}%
555
- ${z}%
556
- ${z}%
557
- ${z}%
554
+ ), j = x ? D * i : D * (1 - i);
555
+ h = `inset(
556
+ ${j}%
557
+ ${j}%
558
+ ${j}%
559
+ ${j}%
558
560
  )`;
559
- } else if (I)
560
- g = "inset(0% 0% 0% 0%)", x ? p === "down" ? m = `translateY(${100 * a}%)` : p === "left" ? m = `translateX(${-100 * a}%)` : p === "right" ? m = `translateX(${100 * a}%)` : m = `translateY(${-100 * a}%)` : p === "down" ? m = `translateY(${-100 * (1 - a)}%)` : p === "left" ? m = `translateX(${100 * (1 - a)}%)` : p === "right" ? m = `translateX(${-100 * (1 - a)}%)` : m = `translateY(${100 * (1 - a)}%)`;
561
- else if (R.includes("Center"))
562
- g = `circle(${x ? 150 * (1 - a) : 150 * a}% at 50% 50%)`;
563
- else if (R.includes("Corner")) {
564
- const N = x ? a : 1 - a;
565
- p === "down" ? g = `inset(0 ${100 * N}% ${100 * N}% 0)` : p === "up" ? g = `inset(${100 * N}% ${100 * N}% 0 0)` : p === "left" ? g = `inset(0 0 ${100 * N}% ${100 * N}%)` : p === "right" ? g = `inset(${100 * N}% 0 0 ${100 * N}%)` : g = `inset(0 ${100 * N}% ${100 * N}% 0)`;
561
+ } else if (z)
562
+ h = "inset(0% 0% 0% 0%)", x ? b === "down" ? y = `translateY(${100 * i}%)` : b === "left" ? y = `translateX(${-100 * i}%)` : b === "right" ? y = `translateX(${100 * i}%)` : y = `translateY(${-100 * i}%)` : b === "down" ? y = `translateY(${-100 * (1 - i)}%)` : b === "left" ? y = `translateX(${100 * (1 - i)}%)` : b === "right" ? y = `translateX(${-100 * (1 - i)}%)` : y = `translateY(${100 * (1 - i)}%)`;
563
+ else if (o.includes("Center"))
564
+ h = `circle(${x ? 150 * (1 - i) : 150 * i}% at 50% 50%)`;
565
+ else if (o.includes("Corner")) {
566
+ const N = x ? i : 1 - i;
567
+ b === "down" ? h = `inset(0 ${100 * N}% ${100 * N}% 0)` : b === "up" ? h = `inset(${100 * N}% ${100 * N}% 0 0)` : b === "left" ? h = `inset(0 0 ${100 * N}% ${100 * N}%)` : b === "right" ? h = `inset(${100 * N}% 0 0 ${100 * N}%)` : h = `inset(0 ${100 * N}% ${100 * N}% 0)`;
566
568
  } else
567
- x ? p === "down" ? g = `inset(${100 * a}% 0 0 0)` : p === "left" ? g = `inset(0 0 0 ${100 * a}%)` : p === "right" ? g = `inset(0 ${100 * a}% 0 0)` : g = `inset(0 0 ${100 * a}% 0)` : p === "down" ? g = `inset(0 0 ${100 * (1 - a)}% 0)` : p === "left" ? g = `inset(0 0 0 ${100 * (1 - a)}%)` : p === "right" ? g = `inset(0 ${100 * (1 - a)}% 0 0)` : g = `inset(${100 * (1 - a)}% 0 0 0)`;
568
- const Q = !!((it = e == null ? void 0 : e.details) != null && it.scale || e != null && e.scale);
569
- y || u ? ((ct = e == null ? void 0 : e.details) == null ? void 0 : ct.scale) === !1 ? j = 1 : j = x ? 1 + 0.5 * a : 1.5 - 0.5 * a : Q && (j = x ? 1 - 0.2 * a : 0.8 + 0.2 * a);
569
+ x ? b === "down" ? h = `inset(${100 * i}% 0 0 0)` : b === "left" ? h = `inset(0 0 0 ${100 * i}%)` : b === "right" ? h = `inset(0 ${100 * i}% 0 0)` : h = `inset(0 0 ${100 * i}% 0)` : b === "down" ? h = `inset(0 0 ${100 * (1 - i)}% 0)` : b === "left" ? h = `inset(0 0 0 ${100 * (1 - i)}%)` : b === "right" ? h = `inset(0 ${100 * (1 - i)}% 0 0)` : h = `inset(${100 * (1 - i)}% 0 0 0)`;
570
+ const U = !!((dt = e == null ? void 0 : e.details) != null && dt.scale || e != null && e.scale);
571
+ M || v ? ((ft = e == null ? void 0 : e.details) == null ? void 0 : ft.scale) === !1 ? V = 1 : V = x ? 1 + 0.5 * i : 1.5 - 0.5 * i : U && (V = x ? 1 - 0.2 * i : 0.8 + 0.2 * i);
570
572
  }
571
- const K = R.includes("Blur") || R.includes("Soft") || !!((dt = e == null ? void 0 : e.details) != null && dt.blurBottom) || !!((ft = e == null ? void 0 : e.details) != null && ft.softEdge);
573
+ const _ = Z.includes("Blur") || Z.includes("Soft") || !!((ut = e == null ? void 0 : e.details) != null && ut.blurBottom) || !!((pt = e == null ? void 0 : e.details) != null && pt.softEdge);
572
574
  let L;
573
- if (K && !F && e) {
574
- g = void 0;
575
- const u = 30, y = ((ut = e == null ? void 0 : e.details) == null ? void 0 : ut.blurPosition) || "bottom";
576
- x ? p === "up" ? m = `translateY(${u * a}%)` : p === "down" ? m = `translateY(${-u * a}%)` : p === "left" ? m = `translateX(${u * a}%)` : p === "right" && (m = `translateX(${-u * a}%)`) : p === "up" ? m = `translateY(${u * (1 - a)}%)` : p === "down" ? m = `translateY(${-u * (1 - a)}%)` : p === "left" ? m = `translateX(${u * (1 - a)}%)` : p === "right" && (m = `translateX(${-u * (1 - a)}%)`);
577
- const I = typeof ((pt = e == null ? void 0 : e.details) == null ? void 0 : pt.blurHeight) == "number" ? e.details.blurHeight : parseInt(String(((ht = e == null ? void 0 : e.details) == null ? void 0 : ht.blurHeight) || "35"), 10) || 35, Q = x ? 100 : 0, N = x ? 0 : 100, Z = Number(((gt = e == null ? void 0 : e.details) == null ? void 0 : gt.initialOpacity) ?? Q) / 100, z = Number(((bt = e == null ? void 0 : e.details) == null ? void 0 : bt.finalOpacity) ?? N) / 100, Ot = Math.max(
575
+ if (_ && !E && e) {
576
+ h = void 0;
577
+ const o = 30, b = ((ht = e == null ? void 0 : e.details) == null ? void 0 : ht.blurPosition) || "bottom";
578
+ x ? m === "up" ? y = `translateY(${o * i}%)` : m === "down" ? y = `translateY(${-o * i}%)` : m === "left" ? y = `translateX(${o * i}%)` : m === "right" && (y = `translateX(${-o * i}%)`) : m === "up" ? y = `translateY(${o * (1 - i)}%)` : m === "down" ? y = `translateY(${-o * (1 - i)}%)` : m === "left" ? y = `translateX(${o * (1 - i)}%)` : m === "right" && (y = `translateX(${-o * (1 - i)}%)`);
579
+ const v = typeof ((gt = e == null ? void 0 : e.details) == null ? void 0 : gt.blurHeight) == "number" ? e.details.blurHeight : parseInt(String(((bt = e == null ? void 0 : e.details) == null ? void 0 : bt.blurHeight) || "35"), 10) || 35, M = x ? 100 : 0, z = x ? 0 : 100, U = Number((($t = e == null ? void 0 : e.details) == null ? void 0 : $t.initialOpacity) ?? M) / 100, N = Number(((xt = e == null ? void 0 : e.details) == null ? void 0 : xt.finalOpacity) ?? z) / 100, D = Math.max(
578
580
  0,
579
- Math.min(1, Z + (z - Z) * a)
580
- ), D = Math.max(0, 1 - Ot);
581
- y === "bottom" ? L = `linear-gradient(to bottom, black 0%, black ${100 - I}%, rgba(0,0,0,${D}) 100%)` : y === "top" ? L = `linear-gradient(to top, black 0%, black ${100 - I}%, rgba(0,0,0,${D}) 100%)` : y === "right" ? L = `linear-gradient(to right, black 0%, black ${100 - I}%, rgba(0,0,0,${D}) 100%)` : y === "left" && (L = `linear-gradient(to left, black 0%, black ${100 - I}%, rgba(0,0,0,${D}) 100%)`);
581
+ Math.min(1, U + (N - U) * i)
582
+ ), j = Math.max(0, 1 - D);
583
+ b === "bottom" ? L = `linear-gradient(to bottom, black 0%, black ${100 - v}%, rgba(0,0,0,${j}) 100%)` : b === "top" ? L = `linear-gradient(to top, black 0%, black ${100 - v}%, rgba(0,0,0,${j}) 100%)` : b === "right" ? L = `linear-gradient(to right, black 0%, black ${100 - v}%, rgba(0,0,0,${j}) 100%)` : b === "left" && (L = `linear-gradient(to left, black 0%, black ${100 - v}%, rgba(0,0,0,${j}) 100%)`);
582
584
  }
583
- const Bt = [
584
- m,
585
- j !== 1 ? `scale(${j})` : ""
586
- ].filter(Boolean).join(" ") || void 0, W = ($t = i == null ? void 0 : i.details) == null ? void 0 : $t.boxShadow, _ = W && (W.x || W.y || W.blur) ? `drop-shadow(${W.x || 0}px ${W.y || 0}px ${W.blur || 0}px ${W.color || "#000000"})` : void 0, A = Number(((xt = e == null ? void 0 : e.details) == null ? void 0 : xt.blurAmount) ?? 16), Pt = !!(K && (((St = e == null ? void 0 : e.details) == null ? void 0 : St.blurBottom) ?? !0)), X = ((wt = e == null ? void 0 : e.details) == null ? void 0 : wt.blurPosition) || "bottom", k = typeof ((mt = e == null ? void 0 : e.details) == null ? void 0 : mt.blurHeight) == "number" ? `${e.details.blurHeight}%` : ((yt = e == null ? void 0 : e.details) == null ? void 0 : yt.blurHeight) || "35%", Rt = x ? 100 : 0, Et = x ? 0 : 100, tt = Number(((Nt = e == null ? void 0 : e.details) == null ? void 0 : Nt.initialOpacity) ?? Rt) / 100, Ft = Number(((Yt = e == null ? void 0 : e.details) == null ? void 0 : Yt.finalOpacity) ?? Et) / 100, Ct = K && e ? Math.max(0, Math.min(1, tt + (Ft - tt) * a)) : 1;
585
+ const Rt = [
586
+ y,
587
+ V !== 1 ? `scale(${V})` : ""
588
+ ].filter(Boolean).join(" ") || void 0, W = (wt = c == null ? void 0 : c.details) == null ? void 0 : wt.boxShadow, k = W && (W.x || W.y || W.blur) ? `drop-shadow(${W.x || 0}px ${W.y || 0}px ${W.blur || 0}px ${W.color || "#000000"})` : void 0, A = Number(((St = e == null ? void 0 : e.details) == null ? void 0 : St.blurAmount) ?? 16), Et = !!(_ && (((yt = e == null ? void 0 : e.details) == null ? void 0 : yt.blurBottom) ?? !0)), I = ((Nt = e == null ? void 0 : e.details) == null ? void 0 : Nt.blurPosition) || "bottom", tt = typeof ((mt = e == null ? void 0 : e.details) == null ? void 0 : mt.blurHeight) == "number" ? `${e.details.blurHeight}%` : ((Yt = e == null ? void 0 : e.details) == null ? void 0 : Yt.blurHeight) || "35%", Ft = x ? 100 : 0, Ct = x ? 0 : 100, et = Number(((vt = e == null ? void 0 : e.details) == null ? void 0 : vt.initialOpacity) ?? Ft) / 100, Ot = Number(((Xt = e == null ? void 0 : e.details) == null ? void 0 : Xt.finalOpacity) ?? Ct) / 100, Vt = _ && e ? Math.max(0, Math.min(1, et + (Ot - et) * i)) : 1;
587
589
  return /* @__PURE__ */ H(
588
590
  "div",
589
591
  {
590
592
  style: {
591
- width: d !== void 0 ? d : "100%",
592
- height: n !== void 0 ? n : "100%",
593
+ width: f !== void 0 ? f : "100%",
594
+ height: l !== void 0 ? l : "100%",
593
595
  position: "relative",
594
- visibility: F ? "hidden" : "visible"
596
+ visibility: E ? "hidden" : "visible"
595
597
  },
596
- children: /* @__PURE__ */ Vt(
598
+ children: /* @__PURE__ */ jt(
597
599
  "div",
598
600
  {
599
601
  style: {
600
602
  width: "100%",
601
603
  height: "100%",
602
604
  position: "relative",
603
- clipPath: g || void 0,
604
- WebkitClipPath: g || void 0,
605
+ clipPath: h || void 0,
606
+ WebkitClipPath: h || void 0,
605
607
  maskImage: L || void 0,
606
608
  WebkitMaskImage: L || void 0,
607
- overflow: g || L ? "hidden" : "visible"
609
+ overflow: h || L ? "hidden" : "visible"
608
610
  },
609
611
  children: [
610
612
  /* @__PURE__ */ H(
@@ -613,31 +615,31 @@ const Ht = () => ({
613
615
  style: {
614
616
  width: "100%",
615
617
  height: "100%",
616
- transform: Bt,
618
+ transform: Rt,
617
619
  transformOrigin: "center",
618
- filter: _,
619
- WebkitFilter: _
620
+ filter: k,
621
+ WebkitFilter: k
620
622
  },
621
623
  children: t
622
624
  }
623
625
  ),
624
- Pt && !F && /* @__PURE__ */ H(
626
+ Et && !E && /* @__PURE__ */ H(
625
627
  "div",
626
628
  {
627
629
  style: {
628
630
  position: "absolute",
629
- top: X === "top" ? 0 : void 0,
630
- bottom: X === "bottom" ? 0 : void 0,
631
+ top: I === "top" ? 0 : void 0,
632
+ bottom: I === "bottom" ? 0 : void 0,
631
633
  left: 0,
632
634
  right: 0,
633
- width: X === "left" || X === "right" ? k : "100%",
634
- height: X === "top" || X === "bottom" ? k : "100%",
635
+ width: I === "left" || I === "right" ? tt : "100%",
636
+ height: I === "top" || I === "bottom" ? tt : "100%",
635
637
  pointerEvents: "none",
636
- opacity: Ct,
638
+ opacity: Vt,
637
639
  backdropFilter: `blur(${A}px)`,
638
640
  WebkitBackdropFilter: `blur(${A}px)`,
639
- maskImage: X === "top" ? "linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : X === "left" ? "linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : X === "right" ? "linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : "linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)",
640
- WebkitMaskImage: X === "top" ? "linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : X === "left" ? "linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : X === "right" ? "linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : "linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)"
641
+ maskImage: I === "top" ? "linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : I === "left" ? "linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : I === "right" ? "linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : "linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)",
642
+ WebkitMaskImage: I === "top" ? "linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : I === "left" ? "linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : I === "right" ? "linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)" : "linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)"
641
643
  }
642
644
  }
643
645
  )
@@ -646,13 +648,13 @@ const Ht = () => ({
646
648
  )
647
649
  }
648
650
  );
649
- }, Kt = zt;
651
+ }, Qt = Zt;
650
652
  export {
651
- Gt as BoxAnim,
652
- Jt as ContentAnim,
653
- Kt as MaskAnim,
654
- Dt as combine,
655
- U as combineAnimations,
656
- Wt as extractTransformations,
657
- M as useAnimation
653
+ Jt as BoxAnim,
654
+ Kt as ContentAnim,
655
+ Qt as MaskAnim,
656
+ Gt as combine,
657
+ q as combineAnimations,
658
+ Lt as extractTransformations,
659
+ G as useAnimation
658
660
  };
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
- (function(E,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react/jsx-runtime"),require("react"),require("remotion")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","remotion"],v):(E=typeof globalThis<"u"?globalThis:E||self,v(E.animations={},E.jsxRuntime,E.React,E.remotion))})(this,function(E,v,z,m){"use strict";const Bt=()=>({scale:t=>({transform:`scale(${t})`}),growIn:t=>({transform:`scale(${t})`}),shrinkIn:t=>({transform:`scale(${t})`}),shrinkOut:t=>({transform:`scale(${t})`}),opacity:t=>({opacity:t}),translateX:t=>({transform:`translateX(${t}%)`}),translateY:t=>({transform:`translateY(${t}%)`}),rotate:t=>({transform:`rotate(${t}deg)`}),spin:t=>({transform:`rotate(${t}deg)`}),spinIn:t=>({transform:`rotate(${t}deg)`}),twistIn:t=>({transform:`rotate(${t}deg)`}),twistOut:t=>({transform:`rotate(${t}deg)`}),moveScaleIn:t=>({transform:`scale(${t})`}),spinOut:t=>({transform:`rotate(${t}deg)`}),default:()=>({}),rotateY:t=>({transform:`rotateY(${t}deg)`}),rotateX:t=>({transform:`rotateX(${t}deg)`}),blur:t=>({filter:`blur(${t}px)`}),blurIn:t=>({filter:`blur(${t}px)`}),blurOut:t=>({filter:`blur(${t}px)`}),blurV2In:t=>({filter:`blur(${t}px)`}),blurSlide:t=>({filter:`blur(${t}px)`,transform:`translateY(${t*5}%)`}),blurSlideV2In:t=>({filter:`blur(${t}px)`}),brightness:t=>({filter:`brightness(${t}%)`}),contrast:t=>({filter:`contrast(${t}%)`}),grayscale:t=>({filter:`grayscale(${t}%)`}),hue:t=>({filter:`hue-rotate(${t}deg)`}),saturation:t=>({filter:`saturate(${t}%)`}),vignette:t=>({filter:`contrast(${100+t*20}%) brightness(${100-t*20}%)`}),noise:t=>({filter:`contrast(${100+t*40}%) brightness(${100+t*20}%)`}),pixelate:t=>({filter:`contrast(${100+t*2}%)`}),chromaticAberration:t=>({filter:`hue-rotate(${t*10}deg) contrast(110%)`}),lightLeak:t=>({filter:`brightness(${100+t*50}%) saturate(${100+t*30}%)`}),duotone:t=>({filter:`sepia(${t*100}%) hue-rotate(${t*180}deg)`}),shakeHorizontalIn:t=>({transform:`translateX(${t}px)`}),shakeVerticalIn:t=>({transform:`translateY(${t}px)`}),shakeHorizontalOut:t=>({transform:`translateX(${t}px)`}),shakeVerticalOut:t=>({transform:`translateY(${t}px)`}),maskUpIn:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),maskUpOut:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),maskDownIn:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),maskDownOut:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),moveTranslateY:t=>({transform:`translateY(${t}%)`}),"hide-show":t=>({opacity:t}),hide:t=>({opacity:t}),show:t=>({opacity:t}),borderRadius:t=>({borderRadius:`${t}px`,overflow:"hidden"}),"corner-radius":t=>({borderRadius:`${t}px`,overflow:"hidden"})}),_=(t,d=0)=>{const s=[],l=t/5;for(let i=0;i<6;i+=1)s.push(i*l+d);return s},It=(t,d,s,l=!1)=>{const{from:i,to:n,ease:b}=d,h=d.durationInFrames||30,f=Number(i),o=Number(n),r=Math.max(1,Number(h));if(isNaN(f)||isNaN(o))return console.error("Invalid animation values:",{from:i,to:n,animationDurationInFrames:h,property:d.property}),f;h===void 0&&console.warn(`durationInFrames is undefined for animation: ${d.property}. Using 1 frame as default.`);const c=d.delay||0;if(d.property==="hide-show"||d.property==="hide"||d.property==="show")return t<c?f:o;let $;if(d.property==="moveScaleIn"?$=l?[s-r-c,s-r*.5-c]:[c+r*.5,c+r]:d.property==="moveTranslateY"?$=l?[s-r*.5-c,s-c]:[c,c+r*.5]:$=l?[s-r-c,s-c]:[c,c+r],d.property.includes("shake")){const B=l?_(r,s-r-c):_(r,c);return m.interpolate(t,B,[0,f,o,f,o,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:b})}return m.interpolate(t,$,[f,o],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:b})},G=t=>{if(t==null)return 0;if(typeof t=="number")return Number.isNaN(t)?0:t;if(typeof t=="object"){if(t.rotate!==void 0&&t.rotate!==null){const i=parseFloat(String(t.rotate));if(!Number.isNaN(i))return i}if(t.rotation!==void 0&&t.rotation!==null){const i=parseFloat(String(t.rotation));if(!Number.isNaN(i))return i}return t.transform?G(t.transform):0}const d=String(t),s=/rotate\((-?[\d.]+)deg\)/.exec(d);if(s)return parseFloat(s[1])||0;const l=/matrix\(([^)]+)\)/.exec(d);if(l){const i=l[1].split(",").map(n=>parseFloat(n.trim()));if(i.length>=4){const[n,b]=i;return Math.atan2(b,n)*(180/Math.PI)}}return 0},A=(t,d,s,l,i)=>{var f,o,r,c,$;const{property:n}=t;if(n==="move"){const B=Number(((f=t.details)==null?void 0:f.fromX)??t.from??0),F=Number(((o=t.details)==null?void 0:o.toX)??t.to??0),L=Number(((r=t.details)==null?void 0:r.fromY)??0),j=Number(((c=t.details)==null?void 0:c.toY)??0),O=Number((($=t.details)==null?void 0:$.scale)||1)||1;let H=i;if(H==null||Number.isNaN(H)){const p=t.details;H=G((p==null?void 0:p.rotate)??(p==null?void 0:p.rotation)??(p==null?void 0:p.transform))}const e=t.delay||0,x=t.durationInFrames||30,T=l?[s-x-e,s-e]:[e,e+x],V=m.interpolate(d,T,[B,F],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:t.ease}),S=m.interpolate(d,T,[L,j],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:t.ease}),w=(H||0)*Math.PI/180,X=Math.cos(w),a=Math.sin(w),g=V*X+S*a,y=-V*a+S*X,W=g/O,C=y/O;return{transform:`translateX(${W}px) translateY(${C}px)`}}const b=It(d,t,s,l),h=Bt();return(h[n]||h.default)(b)},U=(t,d,s,l=!1,i=!1,n)=>z.useMemo(()=>{if(t.length===0)return{};const b=t.filter(h=>h.from!==void 0&&h.to!==void 0);if(b.length!==t.length&&console.error("Some animations are invalid and will be ignored"),i){const h=[];return b.reverse().forEach(o=>{const r=A(o,s,d,!1,n);h.push(r)}),h.reduce((o,r)=>(Object.keys(r).forEach(c=>{c==="transform"||c==="filter"?o[c]=o[c]?`${o[c]} ${r[c]}`:r[c]:o[c]=r[c]}),o),{})}else return b.map(f=>A(f,s,d,l,n)).reduce((f,o)=>(Object.keys(o).forEach(r=>{r==="transform"||r==="filter"?f[r]=f[r]?`${f[r]} ${o[r]}`:o[r]:f[r]=o[r]}),f),{})},[t,s,d,l,n]),M=t=>t?Array.isArray(t)?t:[t]:[],Pt=(...t)=>{const d=[];return t.forEach(s=>{Array.isArray(s)?d.push(...s):s&&d.push(s)}),d.filter(s=>s!==void 0).reduce((s,l)=>s.find(n=>n.property===l.property)?s.map(n=>n.property===l.property?{...n,from:Math.min(n.from,l.from),to:Math.max(n.to,l.to),durationInFrames:Math.max(n.durationInFrames,l.durationInFrames),delay:Math.min(n.delay||0,l.delay||0),ease:b=>(n.ease(b)+l.ease(b))/2}:n):[...s,l],[])},Ft=({animationIn:t,animationOut:d,durationInFrames:s,children:l,style:i={},frame:n,isTransition:b=!1,basicCharAnimationsIn:h=[],basicCharAnimationsOut:f=[]})=>{const o=G((i==null?void 0:i.transform)||(i==null?void 0:i.rotate)||(i==null?void 0:i.rotation)),r=U(M(t),s,n,!1,!1,o),c=U(M(d),s,n,!0,!1,o),$=U(M(h),s,n,!0,!1,o),B=U(M(f),s,n,!0,!1,o),F=z.useMemo(()=>{const S=Object.keys(r).length>0,w=t==null?void 0:t.reduce((a,g)=>Math.min(a,g.delay||0),1/0),X=n-(w||0);return S&&X<0?{visibility:b?"visible":"hidden"}:r},[r,n,t,b]),L=z.useMemo(()=>{if(n>s)return{visibility:b?"visible":"hidden"};const S=M(d);if(!S||S.length===0)return{};let w=0;S.forEach(a=>{const g=(a.durationInFrames||0)+(a.delay||0);g>w&&(w=g)});const X=Math.max(0,s-w);return n<X?{}:c},[c,n,d,s,b]),j=z.useMemo(()=>{const S={...F};return Object.entries(L).forEach(([w,X])=>{w==="transform"?S[w]=`${S[w]||""} ${X||""}`.trim():w in S&&typeof S[w]=="number"&&typeof X=="number"?S[w]=S[w]*X:S[w]=X}),S},[F,L]),O=z.useMemo(()=>{const S=j.transform||"",{translateX:w,translateY:X,scale:a,rotation:g,rotateX:y,rotateY:W,rotateZ:C}=k(S);return`${g} ${w} ${X} ${a} ${y} ${W} ${C}`.trim()},[j]),{top:H,left:e,position:x,transform:T,...V}=i||{};return v.jsx("div",{style:{width:"100%",height:"100%",overflow:j.overflow||$.overflow||B.overflow||"visible",pointerEvents:"none"},children:v.jsx("div",{style:{width:"100%",height:"100%",...V,...j,overflow:"visible",transform:O,pointerEvents:"none",background:Object.keys(j).length===0?"transparent":j.backgroundColor},children:l})})},k=t=>{let d="",s="",l="scale(1)",i="",n="",b="",h="";const f=t.match(/translateX\([^)]+\)/g);f&&(d=f[f.length-1]);const o=t.match(/translateY\([^)]+\)/g);o&&(s=o[o.length-1]);const r=t.match(/scale\([^)]+\)/g);r&&(l=r[r.length-1]);const c=t.match(/rotate\([^)]+\)/g);c&&(i=c[c.length-1]);const $=t.match(/rotateX\([^)]+\)/g);$&&(n=$[$.length-1]);const B=t.match(/rotateY\([^)]+\)/g);B&&(b=B[B.length-1]);const F=t.match(/rotateZ\([^)]+\)/g);return F&&(h=F[F.length-1]),{translateX:d,translateY:s,scale:l,rotation:i,rotateX:n,rotateY:b,rotateZ:h}},jt=({animationTimed:t,durationInFrames:d,children:s,style:l={},frame:i})=>{const n=G((l==null?void 0:l.transform)||(l==null?void 0:l.rotate)||(l==null?void 0:l.rotation)),b=U(M(t),d,i,!1,!0,n),h=z.useMemo(()=>({...b}),[b]),f=!!h.borderRadius;return v.jsx("div",{style:{overflow:f?"hidden":h.overflow||"visible",borderRadius:h.borderRadius,pointerEvents:"none",height:l.height||"100%",width:l.width||"100%",...h,...f?{overflow:"hidden"}:{}},children:v.jsx("div",{style:{overflow:f?"hidden":"visible",borderRadius:h.borderRadius,pointerEvents:"none",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:s})})},Ct=t=>{if(typeof(t==null?void 0:t.ease)=="function")return t.ease;switch(t==null?void 0:t.easing){case"ease-in":case"accelerate":return m.Easing.in(m.Easing.cubic);case"ease-out":case"smooth":case"slowDown":return m.Easing.out(m.Easing.cubic);case"ease-in-out":case"natural":case"swing":return m.Easing.inOut(m.Easing.cubic);case"bounce":return m.Easing.bounce;case"elastic":return m.Easing.elastic(1);case"overshoot":case"impulse":return m.Easing.out(m.Easing.back(1.7));case"none":case"linear":default:return m.Easing.linear}},Ot=(t,d)=>{const s=d*Math.PI/180,l=Math.cos(s),i=Math.sin(s),n=t/100*50,b=50,h=50,f=200,o=l,r=i,c=-i,$=l;return`polygon(${[[b-o*f-c*n,h-r*f-$*n],[b+o*f-c*n,h+r*f-$*n],[b+o*f+c*n,h+r*f+$*n],[b-o*f+c*n,h-r*f+$*n]].map(([F,L])=>`${F}% ${L}%`).join(", ")})`},Tt=({children:t,currentWidth:d,currentHeight:s,frame:l,item:i,keyframeAnimations:n,durationInFrames:b})=>{var nt,st,lt,at,it,ct,dt,ft,ut,pt,ht,gt,bt,$t,xt,St,wt,yt,Nt,Yt,vt,mt,Et,Xt;if(!n||!Array.isArray(n)||n.length===0)return v.jsx(v.Fragment,{children:t});const h=u=>{var N,P;return!!((N=u==null?void 0:u.property)!=null&&N.includes("maskReveal")||(P=u==null?void 0:u.id)!=null&&P.includes("maskReveal"))},f=u=>{var N,P;return!!((u==null?void 0:u.type)==="exit"||(N=u==null?void 0:u.property)!=null&&N.includes("Out")||(P=u==null?void 0:u.id)!=null&&P.includes("Out"))},o=n.find(u=>h(u)&&!f(u)),r=n.find(u=>h(u)&&f(u));if(!o&&!r)return v.jsx(v.Fragment,{children:t});const c=Math.max(1,b||300),$=o?Math.max(1,Number(o.durationInFrames||30)):30,B=o?Math.max(0,Number(o.delay||0)):0,F=r?Math.max(1,Number(r.durationInFrames||30)):30,L=r?Math.max(0,Number(r.delay||0)):0,j=r?Math.max(0,c-F-L):Number.POSITIVE_INFINITY;let O=!1,H=!1,e=null,x=!1,T=30,V=0;if(r&&(l>=j||!o)){e=r,x=!0,T=F;const u=o||j<c?j:0;V=l-u;const N=String(r.property||r.id||""),P=N.includes("Blur")||N.includes("Soft")||!!((nt=r==null?void 0:r.details)!=null&&nt.blurBottom)||!!((st=r==null?void 0:r.details)!=null&&st.softEdge);V>=T-1&&!P&&(O=!0)}else if(o)if(l<B)O=!0,e=o,x=!1,T=$,V=0;else if(l<B+$)e=o,x=!1,T=$,V=l-B;else{const u=String(o.property||o.id||"");u.includes("Blur")||u.includes("Soft")||!!((lt=o==null?void 0:o.details)!=null&&lt.blurBottom)||!!((at=o==null?void 0:o.details)!=null&&at.softEdge)?(e=o,x=!1,T=$,V=$):(H=!0,e=null)}else H=!0,e=null;const S=Math.max(0,V),w=T>0?Math.min(Math.max(0,S/T),1):1,X=e?Ct(e):m.Easing.linear,a=Math.max(0,Math.min(1,X(w)));let g,y="",W=1;const C=String((e==null?void 0:e.property)||(e==null?void 0:e.id)||""),p=((it=e==null?void 0:e.details)==null?void 0:it.direction)||"up";if(O)g="inset(100%)";else if(H||!e)g=void 0;else{const u=C.includes("ShrinkScale"),N=C.includes("CenterScale"),P=C.includes("Slide")||C.includes("slide");if(N){const Y=Number(((ct=e==null?void 0:e.details)==null?void 0:ct.angle)??(e==null?void 0:e.angle)??0),q=x?100*(1-a):100*a;g=Ot(q,Y)}else if(u){const Y=Number(((dt=e==null?void 0:e.details)==null?void 0:dt.initialVisiblePercent)??(e==null?void 0:e.initialVisiblePercent)??50),q=Math.max(0,Math.min(50,(100-Y)/2)),D=x?q*a:q*(1-a);g=`inset(
2
- ${D}%
3
- ${D}%
4
- ${D}%
5
- ${D}%
6
- )`}else if(P)g="inset(0% 0% 0% 0%)",x?p==="down"?y=`translateY(${100*a}%)`:p==="left"?y=`translateX(${-100*a}%)`:p==="right"?y=`translateX(${100*a}%)`:y=`translateY(${-100*a}%)`:p==="down"?y=`translateY(${-100*(1-a)}%)`:p==="left"?y=`translateX(${100*(1-a)}%)`:p==="right"?y=`translateX(${-100*(1-a)}%)`:y=`translateY(${100*(1-a)}%)`;else if(C.includes("Center"))g=`circle(${x?150*(1-a):150*a}% at 50% 50%)`;else if(C.includes("Corner")){const Y=x?a:1-a;p==="down"?g=`inset(0 ${100*Y}% ${100*Y}% 0)`:p==="up"?g=`inset(${100*Y}% ${100*Y}% 0 0)`:p==="left"?g=`inset(0 0 ${100*Y}% ${100*Y}%)`:p==="right"?g=`inset(${100*Y}% 0 0 ${100*Y}%)`:g=`inset(0 ${100*Y}% ${100*Y}% 0)`}else x?p==="down"?g=`inset(${100*a}% 0 0 0)`:p==="left"?g=`inset(0 0 0 ${100*a}%)`:p==="right"?g=`inset(0 ${100*a}% 0 0)`:g=`inset(0 0 ${100*a}% 0)`:p==="down"?g=`inset(0 0 ${100*(1-a)}% 0)`:p==="left"?g=`inset(0 0 0 ${100*(1-a)}%)`:p==="right"?g=`inset(0 ${100*(1-a)}% 0 0)`:g=`inset(${100*(1-a)}% 0 0 0)`;const Q=!!((ft=e==null?void 0:e.details)!=null&&ft.scale||e!=null&&e.scale);N||u?((ut=e==null?void 0:e.details)==null?void 0:ut.scale)===!1?W=1:W=x?1+.5*a:1.5-.5*a:Q&&(W=x?1-.2*a:.8+.2*a)}const K=C.includes("Blur")||C.includes("Soft")||!!((pt=e==null?void 0:e.details)!=null&&pt.blurBottom)||!!((ht=e==null?void 0:e.details)!=null&&ht.softEdge);let Z;if(K&&!O&&e){g=void 0;const u=30,N=((gt=e==null?void 0:e.details)==null?void 0:gt.blurPosition)||"bottom";x?p==="up"?y=`translateY(${u*a}%)`:p==="down"?y=`translateY(${-u*a}%)`:p==="left"?y=`translateX(${u*a}%)`:p==="right"&&(y=`translateX(${-u*a}%)`):p==="up"?y=`translateY(${u*(1-a)}%)`:p==="down"?y=`translateY(${-u*(1-a)}%)`:p==="left"?y=`translateX(${u*(1-a)}%)`:p==="right"&&(y=`translateX(${-u*(1-a)}%)`);const P=typeof((bt=e==null?void 0:e.details)==null?void 0:bt.blurHeight)=="number"?e.details.blurHeight:parseInt(String((($t=e==null?void 0:e.details)==null?void 0:$t.blurHeight)||"35"),10)||35,Q=x?100:0,Y=x?0:100,q=Number(((xt=e==null?void 0:e.details)==null?void 0:xt.initialOpacity)??Q)/100,D=Number(((St=e==null?void 0:e.details)==null?void 0:St.finalOpacity)??Y)/100,Zt=Math.max(0,Math.min(1,q+(D-q)*a)),J=Math.max(0,1-Zt);N==="bottom"?Z=`linear-gradient(to bottom, black 0%, black ${100-P}%, rgba(0,0,0,${J}) 100%)`:N==="top"?Z=`linear-gradient(to top, black 0%, black ${100-P}%, rgba(0,0,0,${J}) 100%)`:N==="right"?Z=`linear-gradient(to right, black 0%, black ${100-P}%, rgba(0,0,0,${J}) 100%)`:N==="left"&&(Z=`linear-gradient(to left, black 0%, black ${100-P}%, rgba(0,0,0,${J}) 100%)`)}const Vt=[y,W!==1?`scale(${W})`:""].filter(Boolean).join(" ")||void 0,R=(wt=i==null?void 0:i.details)==null?void 0:wt.boxShadow,tt=R&&(R.x||R.y||R.blur)?`drop-shadow(${R.x||0}px ${R.y||0}px ${R.blur||0}px ${R.color||"#000000"})`:void 0,et=Number(((yt=e==null?void 0:e.details)==null?void 0:yt.blurAmount)??16),Ht=!!(K&&(((Nt=e==null?void 0:e.details)==null?void 0:Nt.blurBottom)??!0)),I=((Yt=e==null?void 0:e.details)==null?void 0:Yt.blurPosition)||"bottom",rt=typeof((vt=e==null?void 0:e.details)==null?void 0:vt.blurHeight)=="number"?`${e.details.blurHeight}%`:((mt=e==null?void 0:e.details)==null?void 0:mt.blurHeight)||"35%",Wt=x?100:0,Lt=x?0:100,ot=Number(((Et=e==null?void 0:e.details)==null?void 0:Et.initialOpacity)??Wt)/100,Rt=Number(((Xt=e==null?void 0:e.details)==null?void 0:Xt.finalOpacity)??Lt)/100,Mt=K&&e?Math.max(0,Math.min(1,ot+(Rt-ot)*a)):1;return v.jsx("div",{style:{width:d!==void 0?d:"100%",height:s!==void 0?s:"100%",position:"relative",visibility:O?"hidden":"visible"},children:v.jsxs("div",{style:{width:"100%",height:"100%",position:"relative",clipPath:g||void 0,WebkitClipPath:g||void 0,maskImage:Z||void 0,WebkitMaskImage:Z||void 0,overflow:g||Z?"hidden":"visible"},children:[v.jsx("div",{style:{width:"100%",height:"100%",transform:Vt,transformOrigin:"center",filter:tt,WebkitFilter:tt},children:t}),Ht&&!O&&v.jsx("div",{style:{position:"absolute",top:I==="top"?0:void 0,bottom:I==="bottom"?0:void 0,left:0,right:0,width:I==="left"||I==="right"?rt:"100%",height:I==="top"||I==="bottom"?rt:"100%",pointerEvents:"none",opacity:Mt,backdropFilter:`blur(${et}px)`,WebkitBackdropFilter:`blur(${et}px)`,maskImage:I==="top"?"linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":I==="left"?"linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":I==="right"?"linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":"linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)",WebkitMaskImage:I==="top"?"linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":I==="left"?"linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":I==="right"?"linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":"linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)"}})]})})};E.BoxAnim=Ft,E.ContentAnim=jt,E.MaskAnim=Tt,E.combine=Pt,E.combineAnimations=M,E.extractTransformations=k,E.useAnimation=U,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
1
+ (function(X,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react/jsx-runtime"),require("react"),require("remotion")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","remotion"],v):(X=typeof globalThis<"u"?globalThis:X||self,v(X.animations={},X.jsxRuntime,X.React,X.remotion))})(this,function(X,v,z,E){"use strict";const Pt=()=>({scale:t=>({transform:`scale(${t})`}),growIn:t=>({transform:`scale(${t})`}),shrinkIn:t=>({transform:`scale(${t})`}),shrinkOut:t=>({transform:`scale(${t})`}),opacity:t=>({opacity:t}),translateX:t=>({transform:`translateX(${t}%)`}),translateY:t=>({transform:`translateY(${t}%)`}),rotate:t=>({transform:`rotate(${t}deg)`}),spin:t=>({transform:`rotate(${t}deg)`}),spinIn:t=>({transform:`rotate(${t}deg)`}),twistIn:t=>({transform:`rotate(${t}deg)`}),twistOut:t=>({transform:`rotate(${t}deg)`}),moveScaleIn:t=>({transform:`scale(${t})`}),spinOut:t=>({transform:`rotate(${t}deg)`}),default:()=>({}),rotateY:t=>({transform:`rotateY(${t}deg)`}),rotateX:t=>({transform:`rotateX(${t}deg)`}),blur:t=>({filter:`blur(${t}px)`}),blurIn:t=>({filter:`blur(${t}px)`}),blurOut:t=>({filter:`blur(${t}px)`}),blurV2In:t=>({filter:`blur(${t}px)`}),blurSlide:t=>({filter:`blur(${t}px)`,transform:`translateY(${t*5}%)`}),blurSlideV2In:t=>({filter:`blur(${t}px)`}),brightness:t=>({filter:`brightness(${t}%)`}),contrast:t=>({filter:`contrast(${t}%)`}),grayscale:t=>({filter:`grayscale(${t}%)`}),hue:t=>({filter:`hue-rotate(${t}deg)`}),saturation:t=>({filter:`saturate(${t}%)`}),vignette:t=>({filter:`contrast(${100+t*20}%) brightness(${100-t*20}%)`}),noise:t=>({filter:`contrast(${100+t*40}%) brightness(${100+t*20}%)`}),pixelate:t=>({filter:`contrast(${100+t*2}%)`}),chromaticAberration:t=>({filter:`hue-rotate(${t*10}deg) contrast(110%)`}),lightLeak:t=>({filter:`brightness(${100+t*50}%) saturate(${100+t*30}%)`}),duotone:t=>({filter:`sepia(${t*100}%) hue-rotate(${t*180}deg)`}),shakeHorizontalIn:t=>({transform:`translateX(${t}px)`}),shakeVerticalIn:t=>({transform:`translateY(${t}px)`}),shakeHorizontalOut:t=>({transform:`translateX(${t}px)`}),shakeVerticalOut:t=>({transform:`translateY(${t}px)`}),maskUpIn:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),maskUpOut:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),maskDownIn:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),maskDownOut:t=>({transform:`translateY(${t}px)`,overflow:"hidden"}),moveTranslateY:t=>({transform:`translateY(${t}%)`}),"hide-show":t=>({opacity:t}),hide:t=>({opacity:t}),show:t=>({opacity:t}),borderRadius:t=>({borderRadius:`${t}px`,overflow:"hidden"}),"corner-radius":t=>({borderRadius:`${t}px`,overflow:"hidden"})}),k=(t,f=0)=>{const l=[],a=t/5;for(let c=0;c<6;c+=1)l.push(c*a+f);return l},Ft=(t,f,l,a=!1)=>{const{from:c,to:n,ease:g}=f,p=f.durationInFrames||30,u=Number(c),s=Number(n),r=Math.max(1,Number(p));if(isNaN(u)||isNaN(s))return console.error("Invalid animation values:",{from:c,to:n,animationDurationInFrames:p,property:f.property}),u;p===void 0&&console.warn(`durationInFrames is undefined for animation: ${f.property}. Using 1 frame as default.`);const d=f.delay||0;if(f.property==="hide-show"||f.property==="hide"||f.property==="show")return t<d?u:s;let $;if(f.property==="moveScaleIn"?$=a?[l-r-d,Math.max(0,l-1-d)]:[d+r*.5,d+r]:f.property==="moveTranslateY"?$=a?[l-r*.5-d,Math.max(0,l-1-d)]:[d,d+r*.5]:$=a?[l-r-d,Math.max(0,l-1-d)]:[d,d+r],f.property.includes("shake")){const m=a?k(r,l-r-d):k(r,d);return E.interpolate(t,m,[0,u,s,u,s,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:g})}return E.interpolate(t,$,[u,s],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:g})},Q=t=>{if(t==null)return 0;if(typeof t=="number")return Number.isNaN(t)?0:t;if(typeof t=="object"){if(t.rotate!==void 0&&t.rotate!==null){const c=parseFloat(String(t.rotate));if(!Number.isNaN(c))return c}if(t.rotation!==void 0&&t.rotation!==null){const c=parseFloat(String(t.rotation));if(!Number.isNaN(c))return c}return t.transform?Q(t.transform):0}const f=String(t),l=/rotate\((-?[\d.]+)deg\)/.exec(f);if(l)return parseFloat(l[1])||0;const a=/matrix\(([^)]+)\)/.exec(f);if(a){const c=a[1].split(",").map(n=>parseFloat(n.trim()));if(c.length>=4){const[n,g]=c;return Math.atan2(g,n)*(180/Math.PI)}}return 0},A=(t,f,l,a,c)=>{var u,s,r,d,$;const{property:n}=t;if(n==="move"){const m=Number(((u=t.details)==null?void 0:u.fromX)??t.from??0),F=Number(((s=t.details)==null?void 0:s.toX)??t.to??0),W=Number(((r=t.details)==null?void 0:r.fromY)??0),j=Number(((d=t.details)==null?void 0:d.toY)??0),C=Number((($=t.details)==null?void 0:$.scale)||1)||1;let V=c;if(V==null||Number.isNaN(V)){const Y=t.details;V=Q((Y==null?void 0:Y.rotate)??(Y==null?void 0:Y.rotation)??(Y==null?void 0:Y.transform))}const e=t.delay||0,x=t.durationInFrames||30,O=a?[l-x-e,Math.max(0,l-1-e)]:[e,e+x],T=E.interpolate(f,O,[m,F],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:t.ease}),S=E.interpolate(f,O,[W,j],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:t.ease}),w=(V||0)*Math.PI/180,B=Math.cos(w),i=Math.sin(w),h=T*B+S*i,y=-T*i+S*B,H=h/C,G=y/C;return{transform:`translateX(${H}px) translateY(${G}px)`}}const g=Ft(f,t,l,a),p=Pt();return(p[n]||p.default)(g)},D=(t,f,l,a=!1,c=!1,n)=>z.useMemo(()=>{if(t.length===0)return{};const g=t.filter(p=>p.from!==void 0&&p.to!==void 0);if(g.length!==t.length&&console.error("Some animations are invalid and will be ignored"),c){const p=[];return g.reverse().forEach(s=>{const r=A(s,l,f,!1,n);p.push(r)}),p.reduce((s,r)=>(Object.keys(r).forEach(d=>{d==="transform"||d==="filter"?s[d]=s[d]?`${s[d]} ${r[d]}`:r[d]:s[d]=r[d]}),s),{})}else return g.map(u=>A(u,l,f,a,n)).reduce((u,s)=>(Object.keys(s).forEach(r=>{r==="transform"||r==="filter"?u[r]=u[r]?`${u[r]} ${s[r]}`:s[r]:u[r]=s[r]}),u),{})},[t,l,f,a,n]),R=t=>t?Array.isArray(t)?t:[t]:[],jt=(...t)=>{const f=[];return t.forEach(l=>{Array.isArray(l)?f.push(...l):l&&f.push(l)}),f.filter(l=>l!==void 0).reduce((l,a)=>l.find(n=>n.property===a.property)?l.map(n=>n.property===a.property?{...n,from:Math.min(n.from,a.from),to:Math.max(n.to,a.to),durationInFrames:Math.max(n.durationInFrames,a.durationInFrames),delay:Math.min(n.delay||0,a.delay||0),ease:g=>(n.ease(g)+a.ease(g))/2}:n):[...l,a],[])},Ct=({animationIn:t,animationOut:f,durationInFrames:l,children:a,style:c={},frame:n,isTransition:g=!1,basicCharAnimationsIn:p=[],basicCharAnimationsOut:u=[]})=>{const s=Q((c==null?void 0:c.transform)||(c==null?void 0:c.rotate)||(c==null?void 0:c.rotation)),r=D(R(t),l,n,!1,!1,s),d=D(R(f),l,n,!0,!1,s),$=D(R(p),l,n,!0,!1,s),m=D(R(u),l,n,!0,!1,s),F=z.useMemo(()=>{const S=Object.keys(r).length>0,w=t==null?void 0:t.reduce((i,h)=>Math.min(i,h.delay||0),1/0),B=n-(w||0);return S&&B<0?{visibility:g?"visible":"hidden"}:r},[r,n,t,g]),W=z.useMemo(()=>{if(n>l)return{visibility:g?"visible":"hidden"};const S=R(f);if(!S||S.length===0)return{};let w=0;S.forEach(i=>{const h=(i.durationInFrames||0)+(i.delay||0);h>w&&(w=h)});const B=Math.max(0,l-w);return n<B?{}:d},[d,n,f,l,g]),j=z.useMemo(()=>{const S={...F};return Object.entries(W).forEach(([w,B])=>{w==="transform"?S[w]=`${S[w]||""} ${B||""}`.trim():w in S&&typeof S[w]=="number"&&typeof B=="number"?S[w]=S[w]*B:S[w]=B}),S},[F,W]),C=z.useMemo(()=>{const S=j.transform||"",{translateX:w,translateY:B,scale:i,rotation:h,rotateX:y,rotateY:H,rotateZ:G}=tt(S);return`${h} ${w} ${B} ${i} ${y} ${H} ${G}`.trim()},[j]),{top:V,left:e,position:x,transform:O,...T}=c||{};return v.jsx("div",{style:{width:"100%",height:"100%",overflow:j.overflow||$.overflow||m.overflow||"visible",pointerEvents:"none"},children:v.jsx("div",{style:{width:"100%",height:"100%",...T,...j,overflow:"visible",transform:C,pointerEvents:"none",background:Object.keys(j).length===0?"transparent":j.backgroundColor},children:a})})},tt=t=>{let f="",l="",a="scale(1)",c="",n="",g="",p="";const u=t.match(/translateX\([^)]+\)/g);u&&(f=u[u.length-1]);const s=t.match(/translateY\([^)]+\)/g);s&&(l=s[s.length-1]);const r=t.match(/scale\([^)]+\)/g);r&&(a=r[r.length-1]);const d=t.match(/rotate\([^)]+\)/g);d&&(c=d[d.length-1]);const $=t.match(/rotateX\([^)]+\)/g);$&&(n=$[$.length-1]);const m=t.match(/rotateY\([^)]+\)/g);m&&(g=m[m.length-1]);const F=t.match(/rotateZ\([^)]+\)/g);return F&&(p=F[F.length-1]),{translateX:f,translateY:l,scale:a,rotation:c,rotateX:n,rotateY:g,rotateZ:p}},Ot=({animationTimed:t,durationInFrames:f,children:l,style:a={},frame:c})=>{const n=Q((a==null?void 0:a.transform)||(a==null?void 0:a.rotate)||(a==null?void 0:a.rotation)),g=D(R(t),f,c,!1,!0,n),p=z.useMemo(()=>({...g}),[g]),u=!!p.borderRadius;return v.jsx("div",{style:{overflow:u?"hidden":p.overflow||"visible",borderRadius:p.borderRadius,pointerEvents:"none",height:a.height||"100%",width:a.width||"100%",...p,...u?{overflow:"hidden"}:{}},children:v.jsx("div",{style:{overflow:u?"hidden":"visible",borderRadius:p.borderRadius,pointerEvents:"none",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:l})})},Tt=t=>{if(typeof(t==null?void 0:t.ease)=="function")return t.ease;switch(t==null?void 0:t.easing){case"ease-in":case"accelerate":return E.Easing.in(E.Easing.cubic);case"ease-out":case"smooth":case"slowDown":return E.Easing.out(E.Easing.cubic);case"ease-in-out":case"natural":case"swing":return E.Easing.inOut(E.Easing.cubic);case"bounce":return E.Easing.bounce;case"elastic":return E.Easing.elastic(1);case"overshoot":case"impulse":return E.Easing.out(E.Easing.back(1.7));case"none":case"linear":default:return E.Easing.linear}},Vt=(t,f)=>{const l=f*Math.PI/180,a=Math.cos(l),c=Math.sin(l),n=t/100*50,g=50,p=50,u=200,s=a,r=c,d=-c,$=a;return`polygon(${[[g-s*u-d*n,p-r*u-$*n],[g+s*u-d*n,p+r*u-$*n],[g+s*u+d*n,p+r*u+$*n],[g-s*u+d*n,p-r*u+$*n]].map(([F,W])=>`${F}% ${W}%`).join(", ")})`},Ht=({children:t,currentWidth:f,currentHeight:l,frame:a,item:c,keyframeAnimations:n,durationInFrames:g})=>{var nt,lt,at,it,ct,dt,ft,ut,pt,ht,gt,bt,$t,xt,St,wt,yt,Nt,Yt,vt,Et,Xt,Bt,It,mt;if(!n||!Array.isArray(n)||n.length===0)return v.jsx(v.Fragment,{children:t});const p=o=>{var b,I,Z,J,q,N;return!!((b=o==null?void 0:o.property)!=null&&b.includes("maskReveal")||(I=o==null?void 0:o.id)!=null&&I.includes("maskReveal")||(Z=o==null?void 0:o.property)!=null&&Z.includes("maskUp")||(J=o==null?void 0:o.id)!=null&&J.includes("maskUp")||(q=o==null?void 0:o.property)!=null&&q.includes("maskDown")||(N=o==null?void 0:o.id)!=null&&N.includes("maskDown"))},u=o=>{var b,I;return!!((o==null?void 0:o.type)==="exit"||(b=o==null?void 0:o.property)!=null&&b.includes("Out")||(I=o==null?void 0:o.id)!=null&&I.includes("Out"))},s=n.find(o=>p(o)&&!u(o)),r=n.find(o=>p(o)&&u(o));if(!s&&!r)return v.jsx(v.Fragment,{children:t});const d=Math.max(1,g||300),$=s?Math.max(1,Number(s.durationInFrames||30)):30,m=s?Math.max(0,Number(s.delay||0)):0,F=r?Math.max(1,Number(r.durationInFrames||30)):30,W=r?Math.max(0,Number(r.delay||0)):0,j=r?Math.max(0,d-F-W):Number.POSITIVE_INFINITY;let C=!1,V=!1,e=null,x=!1,O=30,T=0;if(r&&(a>=j||!s)){e=r,x=!0,O=F;const o=s||j<d?j:0;T=a-o;const b=String(r.property||r.id||""),I=b.includes("Blur")||b.includes("Soft")||!!((nt=r==null?void 0:r.details)!=null&&nt.blurBottom)||!!((lt=r==null?void 0:r.details)!=null&&lt.softEdge);T>=O-1&&!I&&(C=!0)}else if(s)if(a<m)C=!0,e=s,x=!1,O=$,T=0;else if(a<m+$)e=s,x=!1,O=$,T=a-m;else{const o=String(s.property||s.id||"");o.includes("Blur")||o.includes("Soft")||!!((at=s==null?void 0:s.details)!=null&&at.blurBottom)||!!((it=s==null?void 0:s.details)!=null&&it.softEdge)?(e=s,x=!1,O=$,T=$):(V=!0,e=null)}else V=!0,e=null;const S=Math.max(0,T),w=O>0?Math.min(Math.max(0,S/O),1):1,B=e?Tt(e):E.Easing.linear,i=Math.max(0,Math.min(1,B(w)));let h,y="",H=1;const G=String((e==null?void 0:e.property)||(e==null?void 0:e.id)||""),Y=((ct=e==null?void 0:e.details)==null?void 0:ct.direction)||"up";if(C)h="inset(100%)";else if(V||!e)h=void 0;else{const o=String(e.property||e.id||""),b=((dt=e.details)==null?void 0:dt.direction)||(o.includes("maskDown")?"down":(o.includes("maskUp"),"up")),I=o.includes("ShrinkScale"),Z=o.includes("CenterScale"),J=o.includes("Slide")||o.includes("slide");if(Z){const N=Number(((ft=e==null?void 0:e.details)==null?void 0:ft.angle)??(e==null?void 0:e.angle)??0),K=x?100*(1-i):100*i;h=Vt(K,N)}else if(I){const N=Number(((ut=e==null?void 0:e.details)==null?void 0:ut.initialVisiblePercent)??(e==null?void 0:e.initialVisiblePercent)??50),K=Math.max(0,Math.min(50,(100-N)/2)),M=x?K*i:K*(1-i);h=`inset(
2
+ ${M}%
3
+ ${M}%
4
+ ${M}%
5
+ ${M}%
6
+ )`}else if(J)h="inset(0% 0% 0% 0%)",x?b==="down"?y=`translateY(${100*i}%)`:b==="left"?y=`translateX(${-100*i}%)`:b==="right"?y=`translateX(${100*i}%)`:y=`translateY(${-100*i}%)`:b==="down"?y=`translateY(${-100*(1-i)}%)`:b==="left"?y=`translateX(${100*(1-i)}%)`:b==="right"?y=`translateX(${-100*(1-i)}%)`:y=`translateY(${100*(1-i)}%)`;else if(o.includes("Center"))h=`circle(${x?150*(1-i):150*i}% at 50% 50%)`;else if(o.includes("Corner")){const N=x?i:1-i;b==="down"?h=`inset(0 ${100*N}% ${100*N}% 0)`:b==="up"?h=`inset(${100*N}% ${100*N}% 0 0)`:b==="left"?h=`inset(0 0 ${100*N}% ${100*N}%)`:b==="right"?h=`inset(${100*N}% 0 0 ${100*N}%)`:h=`inset(0 ${100*N}% ${100*N}% 0)`}else x?b==="down"?h=`inset(${100*i}% 0 0 0)`:b==="left"?h=`inset(0 0 0 ${100*i}%)`:b==="right"?h=`inset(0 ${100*i}% 0 0)`:h=`inset(0 0 ${100*i}% 0)`:b==="down"?h=`inset(0 0 ${100*(1-i)}% 0)`:b==="left"?h=`inset(0 0 0 ${100*(1-i)}%)`:b==="right"?h=`inset(0 ${100*(1-i)}% 0 0)`:h=`inset(${100*(1-i)}% 0 0 0)`;const q=!!((pt=e==null?void 0:e.details)!=null&&pt.scale||e!=null&&e.scale);Z||I?((ht=e==null?void 0:e.details)==null?void 0:ht.scale)===!1?H=1:H=x?1+.5*i:1.5-.5*i:q&&(H=x?1-.2*i:.8+.2*i)}const _=G.includes("Blur")||G.includes("Soft")||!!((gt=e==null?void 0:e.details)!=null&&gt.blurBottom)||!!((bt=e==null?void 0:e.details)!=null&&bt.softEdge);let U;if(_&&!C&&e){h=void 0;const o=30,b=(($t=e==null?void 0:e.details)==null?void 0:$t.blurPosition)||"bottom";x?Y==="up"?y=`translateY(${o*i}%)`:Y==="down"?y=`translateY(${-o*i}%)`:Y==="left"?y=`translateX(${o*i}%)`:Y==="right"&&(y=`translateX(${-o*i}%)`):Y==="up"?y=`translateY(${o*(1-i)}%)`:Y==="down"?y=`translateY(${-o*(1-i)}%)`:Y==="left"?y=`translateX(${o*(1-i)}%)`:Y==="right"&&(y=`translateX(${-o*(1-i)}%)`);const I=typeof((xt=e==null?void 0:e.details)==null?void 0:xt.blurHeight)=="number"?e.details.blurHeight:parseInt(String(((St=e==null?void 0:e.details)==null?void 0:St.blurHeight)||"35"),10)||35,Z=x?100:0,J=x?0:100,q=Number(((wt=e==null?void 0:e.details)==null?void 0:wt.initialOpacity)??Z)/100,N=Number(((yt=e==null?void 0:e.details)==null?void 0:yt.finalOpacity)??J)/100,K=Math.max(0,Math.min(1,q+(N-q)*i)),M=Math.max(0,1-K);b==="bottom"?U=`linear-gradient(to bottom, black 0%, black ${100-I}%, rgba(0,0,0,${M}) 100%)`:b==="top"?U=`linear-gradient(to top, black 0%, black ${100-I}%, rgba(0,0,0,${M}) 100%)`:b==="right"?U=`linear-gradient(to right, black 0%, black ${100-I}%, rgba(0,0,0,${M}) 100%)`:b==="left"&&(U=`linear-gradient(to left, black 0%, black ${100-I}%, rgba(0,0,0,${M}) 100%)`)}const Mt=[y,H!==1?`scale(${H})`:""].filter(Boolean).join(" ")||void 0,L=(Nt=c==null?void 0:c.details)==null?void 0:Nt.boxShadow,et=L&&(L.x||L.y||L.blur)?`drop-shadow(${L.x||0}px ${L.y||0}px ${L.blur||0}px ${L.color||"#000000"})`:void 0,rt=Number(((Yt=e==null?void 0:e.details)==null?void 0:Yt.blurAmount)??16),Wt=!!(_&&(((vt=e==null?void 0:e.details)==null?void 0:vt.blurBottom)??!0)),P=((Et=e==null?void 0:e.details)==null?void 0:Et.blurPosition)||"bottom",ot=typeof((Xt=e==null?void 0:e.details)==null?void 0:Xt.blurHeight)=="number"?`${e.details.blurHeight}%`:((Bt=e==null?void 0:e.details)==null?void 0:Bt.blurHeight)||"35%",Lt=x?100:0,Rt=x?0:100,st=Number(((It=e==null?void 0:e.details)==null?void 0:It.initialOpacity)??Lt)/100,Ut=Number(((mt=e==null?void 0:e.details)==null?void 0:mt.finalOpacity)??Rt)/100,Zt=_&&e?Math.max(0,Math.min(1,st+(Ut-st)*i)):1;return v.jsx("div",{style:{width:f!==void 0?f:"100%",height:l!==void 0?l:"100%",position:"relative",visibility:C?"hidden":"visible"},children:v.jsxs("div",{style:{width:"100%",height:"100%",position:"relative",clipPath:h||void 0,WebkitClipPath:h||void 0,maskImage:U||void 0,WebkitMaskImage:U||void 0,overflow:h||U?"hidden":"visible"},children:[v.jsx("div",{style:{width:"100%",height:"100%",transform:Mt,transformOrigin:"center",filter:et,WebkitFilter:et},children:t}),Wt&&!C&&v.jsx("div",{style:{position:"absolute",top:P==="top"?0:void 0,bottom:P==="bottom"?0:void 0,left:0,right:0,width:P==="left"||P==="right"?ot:"100%",height:P==="top"||P==="bottom"?ot:"100%",pointerEvents:"none",opacity:Zt,backdropFilter:`blur(${rt}px)`,WebkitBackdropFilter:`blur(${rt}px)`,maskImage:P==="top"?"linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":P==="left"?"linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":P==="right"?"linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":"linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)",WebkitMaskImage:P==="top"?"linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":P==="left"?"linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":P==="right"?"linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)":"linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 75%, transparent 100%)"}})]})})};X.BoxAnim=Ct,X.ContentAnim=Ot,X.MaskAnim=Ht,X.combine=jt,X.combineAnimations=R,X.extractTransformations=tt,X.useAnimation=D,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cliquify.me/animations",
3
- "version": "10.0.2",
3
+ "version": "10.0.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,8 +26,8 @@
26
26
  "typescript": "^5.3.3",
27
27
  "vite": "^5.2.0",
28
28
  "vite-plugin-dts": "^3.9.1",
29
- "@cliquify.me/types": "9.0.3",
30
- "@cliquify.me/typescript-config": "1.0.0"
29
+ "@cliquify.me/types": "9.0.5",
30
+ "@cliquify.me/typescript-config": "1.0.2"
31
31
  },
32
32
  "dependencies": {
33
33
  "remotion": "4.0.506",
@@ -38,7 +38,7 @@
38
38
  "@designcombo/events": "^1.0.2",
39
39
  "react": "^18.2.0 || ^19.0.0",
40
40
  "remotion": "4.0.506",
41
- "@cliquify.me/types": "9.0.3"
41
+ "@cliquify.me/types": "9.0.5"
42
42
  },
43
43
  "scripts": {
44
44
  "dev": "vite",