@wix/interact 2.5.16 → 2.5.18
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/cjs/index.js +1 -1
- package/dist/cjs/react.js +1 -1
- package/dist/cjs/web.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/react.js +2 -2
- package/dist/es/web.js +2 -2
- package/dist/{index-Cv5FJznH.mjs → index-52_TK7E2.mjs} +1642 -1553
- package/dist/index-52_TK7E2.mjs.map +1 -0
- package/dist/index-C2vE7jWq.js +24 -0
- package/dist/index-C2vE7jWq.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/Interact.d.ts.map +1 -1
- package/dist/types/core/add.d.ts.map +1 -1
- package/dist/types/core/css.d.ts +13 -0
- package/dist/types/core/css.d.ts.map +1 -1
- package/dist/types/core/cssUtils.d.ts +5 -4
- package/dist/types/core/cssUtils.d.ts.map +1 -1
- package/dist/types/core/resolvers.d.ts +1 -1
- package/dist/types/core/resolvers.d.ts.map +1 -1
- package/dist/types/types/config.d.ts +2 -0
- package/dist/types/types/config.d.ts.map +1 -1
- package/dist/types/types/css.d.ts +1 -1
- package/dist/types/types/css.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-Cv5FJznH.mjs.map +0 -1
- package/dist/index-DsygTJ-K.js +0 -24
- package/dist/index-DsygTJ-K.js.map +0 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Nt(e) {
|
|
2
2
|
return [...e.matchAll(/\[([-\w]+)]/g)].map(([t, n]) => n);
|
|
3
3
|
}
|
|
4
4
|
function q(e, t) {
|
|
5
|
-
const n =
|
|
5
|
+
const n = Nt(t);
|
|
6
6
|
let s = 0;
|
|
7
7
|
return n.length ? e.replace(/\[]/g, () => {
|
|
8
8
|
const i = n[s++];
|
|
9
9
|
return i !== void 0 ? `[${i}]` : "[]";
|
|
10
10
|
}) : e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return e.trigger === "viewEnter" && t.triggerType === "once" &&
|
|
12
|
+
function jt(e, t) {
|
|
13
|
+
return e.trigger === "viewEnter" && t.triggerType === "once" && G(e) === G(t);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function G(e) {
|
|
16
16
|
const { key: t, listContainer: n, listItemSelector: s, selector: i } = e;
|
|
17
17
|
return `${t}\0${n || ""}\0${s || ""}\0${i || ""}`;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
const Je = "$";
|
|
20
|
+
class Z {
|
|
20
21
|
animations;
|
|
21
22
|
options;
|
|
22
23
|
ready;
|
|
@@ -120,64 +121,64 @@ class Q {
|
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
const
|
|
124
|
-
linear:
|
|
125
|
-
sineIn:
|
|
126
|
-
sineOut:
|
|
127
|
-
sineInOut:
|
|
128
|
-
quadIn:
|
|
129
|
-
quadOut:
|
|
130
|
-
quadInOut:
|
|
131
|
-
cubicIn:
|
|
132
|
-
cubicOut:
|
|
133
|
-
cubicInOut:
|
|
134
|
-
quartIn:
|
|
135
|
-
quartOut:
|
|
136
|
-
quartInOut:
|
|
137
|
-
quintIn:
|
|
138
|
-
quintOut:
|
|
139
|
-
quintInOut:
|
|
140
|
-
expoIn:
|
|
141
|
-
expoOut:
|
|
142
|
-
expoInOut:
|
|
143
|
-
circIn:
|
|
144
|
-
circOut:
|
|
145
|
-
circInOut:
|
|
146
|
-
backIn:
|
|
147
|
-
backOut:
|
|
148
|
-
backInOut:
|
|
149
|
-
},
|
|
150
|
-
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, c = 3 * n,
|
|
151
|
-
let
|
|
124
|
+
const et = (e) => e, zt = (e) => 1 - Math.cos(e * Math.PI / 2), Ht = (e) => Math.sin(e * Math.PI / 2), Dt = (e) => -(Math.cos(Math.PI * e) - 1) / 2, Gt = (e) => e ** 2, Wt = (e) => 1 - (1 - e) ** 2, Vt = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, Kt = (e) => e ** 3, Yt = (e) => 1 - (1 - e) ** 3, Bt = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, Ut = (e) => e ** 4, Qt = (e) => 1 - (1 - e) ** 4, Xt = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, Zt = (e) => e ** 5, Jt = (e) => 1 - (1 - e) ** 5, en = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, tn = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), nn = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), sn = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, on = (e) => 1 - Math.sqrt(1 - e ** 2), rn = (e) => Math.sqrt(1 - (e - 1) ** 2), an = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, cn = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, ln = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, un = (e, t = 1.70158 * 1.525) => e < 0.5 ? (2 * e) ** 2 * ((t + 1) * 2 * e - t) / 2 : ((2 * e - 2) ** 2 * ((t + 1) * (e * 2 - 2) + t) + 2) / 2, Fe = {
|
|
125
|
+
linear: et,
|
|
126
|
+
sineIn: zt,
|
|
127
|
+
sineOut: Ht,
|
|
128
|
+
sineInOut: Dt,
|
|
129
|
+
quadIn: Gt,
|
|
130
|
+
quadOut: Wt,
|
|
131
|
+
quadInOut: Vt,
|
|
132
|
+
cubicIn: Kt,
|
|
133
|
+
cubicOut: Yt,
|
|
134
|
+
cubicInOut: Bt,
|
|
135
|
+
quartIn: Ut,
|
|
136
|
+
quartOut: Qt,
|
|
137
|
+
quartInOut: Xt,
|
|
138
|
+
quintIn: Zt,
|
|
139
|
+
quintOut: Jt,
|
|
140
|
+
quintInOut: en,
|
|
141
|
+
expoIn: tn,
|
|
142
|
+
expoOut: nn,
|
|
143
|
+
expoInOut: sn,
|
|
144
|
+
circIn: on,
|
|
145
|
+
circOut: rn,
|
|
146
|
+
circInOut: an,
|
|
147
|
+
backIn: cn,
|
|
148
|
+
backOut: ln,
|
|
149
|
+
backInOut: un
|
|
150
|
+
}, V = (e, t, n, s, i) => {
|
|
151
|
+
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, c = 3 * n, u = 3 * (i - 2 * n), l = 1 - 3 * i + 3 * n;
|
|
152
|
+
let f;
|
|
152
153
|
if (a === 0)
|
|
153
|
-
|
|
154
|
+
f = r === 0 ? `(${e} / ${o})` : `((sqrt(max(0, ${o * o} + ${4 * r} * ${e})) - ${o}) / ${2 * r})`;
|
|
154
155
|
else {
|
|
155
|
-
const d = r / (3 * a),
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
let
|
|
156
|
+
const d = r / (3 * a), p = 2 * Math.pow(r, 3) - 9 * o * r * a, h = 54 * Math.pow(a, 3), m = (3 * a * o - r * r) / (9 * a * a), g = `((${p} - ${27 * a * a} * ${e}) / ${h})`;
|
|
157
|
+
if (m < 0) {
|
|
158
|
+
const y = 2 * Math.sqrt(-m);
|
|
159
|
+
let v = 0;
|
|
159
160
|
for (const $ of [0, 1, 2])
|
|
160
161
|
[0, 0.25, 0.5, 0.75, 1].every((S) => {
|
|
161
|
-
const
|
|
162
|
-
Math.max(2 * (
|
|
162
|
+
const C = Math.min(
|
|
163
|
+
Math.max(2 * (p - 27 * a * a * S) / (h * m * y), -1),
|
|
163
164
|
1
|
|
164
|
-
), O =
|
|
165
|
+
), O = y * Math.cos((Math.acos(C) - $ * 2 * Math.PI) / 3) - d;
|
|
165
166
|
return O >= -1e-6 && O <= 1.000001;
|
|
166
|
-
}) && (
|
|
167
|
-
const E = `(acos(clamp(-1, ${2 / (
|
|
168
|
-
|
|
167
|
+
}) && (v = $);
|
|
168
|
+
const E = `(acos(clamp(-1, ${2 / (m * y)} * ${g}, 1)) - ${360 * v}deg) / 3`;
|
|
169
|
+
f = `(${y} * cos(${E}) - ${d})`;
|
|
169
170
|
} else {
|
|
170
|
-
const
|
|
171
|
-
|
|
171
|
+
const y = `sqrt(pow(${g}, 2) + ${Math.pow(m, 3)})`;
|
|
172
|
+
f = `(pow(${y} - ${g}, 1 / 3) - pow(${y} + ${g}, 1 / 3) - ${d})`;
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
|
-
return `(${
|
|
175
|
-
},
|
|
175
|
+
return `(${l} * pow(${f}, 3) + ${u} * pow(${f}, 2) + ${c} * ${f})`;
|
|
176
|
+
}, Re = {
|
|
176
177
|
linear: (e) => e,
|
|
177
|
-
ease: (e) =>
|
|
178
|
-
easeIn: (e) =>
|
|
179
|
-
easeOut: (e) =>
|
|
180
|
-
easeInOut: (e) =>
|
|
178
|
+
ease: (e) => V(e, 0.25, 0.1, 0.25, 1),
|
|
179
|
+
easeIn: (e) => V(e, 0.42, 0, 1, 1),
|
|
180
|
+
easeOut: (e) => V(e, 0, 0, 0.58, 1),
|
|
181
|
+
easeInOut: (e) => V(e, 0.42, 0, 0.58, 1),
|
|
181
182
|
sineIn: (e) => `(1 - cos(${e} * 90deg))`,
|
|
182
183
|
sineOut: (e) => `(sin(${e} * 90deg))`,
|
|
183
184
|
sineInOut: (e) => `((1 - cos(${e} * 180deg)) / 2)`,
|
|
@@ -202,7 +203,7 @@ const Qe = (e) => e, kt = (e) => 1 - Math.cos(e * Math.PI / 2), Mt = (e) => Math
|
|
|
202
203
|
backIn: (e) => `(2.70158 * pow(${e}, 3) - 1.70158 * ${e} * ${e})`,
|
|
203
204
|
backOut: (e) => `(1 + 2.70158 * pow(${e} - 1, 3) + 1.70158 * (${e} - 1) * (${e} - 1))`,
|
|
204
205
|
backInOut: (e) => `((round(${e}) * (2 + (2 * ${e} - 2) * (2 * ${e} - 2) * (2.5949095 + 3.5949095 * (2 * ${e} - 2))) + (1 - round(${e})) * 4 * ${e} * ${e} * (3.5949095 * 2 * ${e} - 2.5949095)) / 2)`
|
|
205
|
-
},
|
|
206
|
+
}, Ne = {
|
|
206
207
|
linear: "linear",
|
|
207
208
|
ease: "ease",
|
|
208
209
|
easeIn: "ease-in",
|
|
@@ -233,68 +234,68 @@ const Qe = (e) => e, kt = (e) => 1 - Math.cos(e * Math.PI / 2), Mt = (e) => Math
|
|
|
233
234
|
backOut: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
234
235
|
backInOut: "cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
235
236
|
};
|
|
236
|
-
function
|
|
237
|
+
function fn(e) {
|
|
237
238
|
return e === "percentage" ? "%" : e || "px";
|
|
238
239
|
}
|
|
239
|
-
const
|
|
240
|
+
const dn = /^(webkit|moz|ms|o)(?=[A-Z])/, hn = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
240
241
|
float: "cssFloat",
|
|
241
242
|
"animation-timing-function": "easing",
|
|
242
243
|
"animation-composition": "composite"
|
|
243
244
|
});
|
|
244
245
|
function fe(e) {
|
|
245
|
-
return e.startsWith("--") ? e : (
|
|
246
|
+
return e.startsWith("--") ? e : (dn.test(e) ? `-${e}` : e).replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
|
|
246
247
|
}
|
|
247
|
-
function
|
|
248
|
+
function mn(e) {
|
|
248
249
|
return e.startsWith("--") || !e.includes("-") ? e : e.replace(/^-/, "").replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
251
|
+
function tt(e) {
|
|
252
|
+
return hn[e] || mn(e);
|
|
252
253
|
}
|
|
253
|
-
function
|
|
254
|
+
function pn(e) {
|
|
254
255
|
for (const t in e)
|
|
255
|
-
if (Object.hasOwn(e, t) &&
|
|
256
|
+
if (Object.hasOwn(e, t) && tt(t) !== t)
|
|
256
257
|
return !0;
|
|
257
258
|
return !1;
|
|
258
259
|
}
|
|
259
|
-
function
|
|
260
|
+
function gn(e) {
|
|
260
261
|
if (!Array.isArray(e))
|
|
261
262
|
return e;
|
|
262
263
|
let t;
|
|
263
264
|
return e.forEach((n, s) => {
|
|
264
|
-
if (!n || typeof n != "object" || !
|
|
265
|
+
if (!n || typeof n != "object" || !pn(n))
|
|
265
266
|
return;
|
|
266
267
|
t ??= e.slice();
|
|
267
268
|
const i = {};
|
|
268
269
|
for (const o in n)
|
|
269
|
-
Object.hasOwn(n, o) && (i[
|
|
270
|
+
Object.hasOwn(n, o) && (i[tt(o)] = n[o]);
|
|
270
271
|
t[s] = i;
|
|
271
272
|
}), t || e;
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
-
return e ?
|
|
275
|
-
}
|
|
276
|
-
function
|
|
277
|
-
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, c = 3 * (s - t) - a,
|
|
278
|
-
function
|
|
279
|
-
let
|
|
280
|
-
for (let
|
|
281
|
-
const E =
|
|
282
|
-
if (Math.abs(E) < 1e-7) return
|
|
283
|
-
const $ = d(
|
|
274
|
+
function ae(e) {
|
|
275
|
+
return e ? Ne[e] || e : Ne.linear;
|
|
276
|
+
}
|
|
277
|
+
function vn(e, t, n, s) {
|
|
278
|
+
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, c = 3 * (s - t) - a, u = 1 - a - c, l = (h) => ((r * h + o) * h + i) * h, f = (h) => ((u * h + c) * h + a) * h, d = (h) => (3 * r * h + 2 * o) * h + i;
|
|
279
|
+
function p(h) {
|
|
280
|
+
let m = h;
|
|
281
|
+
for (let v = 0; v < 8; v++) {
|
|
282
|
+
const E = l(m) - h;
|
|
283
|
+
if (Math.abs(E) < 1e-7) return m;
|
|
284
|
+
const $ = d(m);
|
|
284
285
|
if (Math.abs($) < 1e-6) break;
|
|
285
|
-
|
|
286
|
+
m -= E / $;
|
|
286
287
|
}
|
|
287
|
-
let g = 0,
|
|
288
|
-
for (
|
|
289
|
-
const
|
|
290
|
-
if (Math.abs(
|
|
291
|
-
h >
|
|
288
|
+
let g = 0, y = 1;
|
|
289
|
+
for (m = (g + y) / 2; y - g > 1e-7; ) {
|
|
290
|
+
const v = l(m);
|
|
291
|
+
if (Math.abs(v - h) < 1e-7) return m;
|
|
292
|
+
h > v ? g = m : y = m, m = (g + y) / 2;
|
|
292
293
|
}
|
|
293
|
-
return
|
|
294
|
+
return m;
|
|
294
295
|
}
|
|
295
|
-
return (h) => h <= 0 ? 0 : h >= 1 ? 1 :
|
|
296
|
+
return (h) => h <= 0 ? 0 : h >= 1 ? 1 : f(p(h));
|
|
296
297
|
}
|
|
297
|
-
function
|
|
298
|
+
function nt(e) {
|
|
298
299
|
const t = e.match(
|
|
299
300
|
/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/
|
|
300
301
|
);
|
|
@@ -303,17 +304,17 @@ function Ze(e) {
|
|
|
303
304
|
if (![n, s, i, o].some(isNaN))
|
|
304
305
|
return [n, s, i, o];
|
|
305
306
|
}
|
|
306
|
-
function
|
|
307
|
-
const t =
|
|
307
|
+
function yn(e) {
|
|
308
|
+
const t = nt(e);
|
|
308
309
|
if (!(!t || t.some(isNaN)))
|
|
309
|
-
return
|
|
310
|
+
return vn(...t);
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
-
const t =
|
|
312
|
+
function En(e) {
|
|
313
|
+
const t = nt(e);
|
|
313
314
|
if (!(!t || t.some(isNaN)))
|
|
314
|
-
return (n) =>
|
|
315
|
+
return (n) => V(n, ...t);
|
|
315
316
|
}
|
|
316
|
-
function
|
|
317
|
+
function st(e) {
|
|
317
318
|
const t = e.match(/^linear\((.+)\)$/);
|
|
318
319
|
if (!t) return;
|
|
319
320
|
const n = t[1].split(",").map((o) => o.trim()).filter(Boolean);
|
|
@@ -323,11 +324,11 @@ function Je(e) {
|
|
|
323
324
|
const r = o.split(/\s+/), a = parseFloat(r[0]);
|
|
324
325
|
if (isNaN(a)) return;
|
|
325
326
|
const c = [];
|
|
326
|
-
for (let
|
|
327
|
-
if (r[
|
|
328
|
-
const
|
|
329
|
-
if (isNaN(
|
|
330
|
-
c.push(
|
|
327
|
+
for (let u = 1; u < r.length; u++)
|
|
328
|
+
if (r[u].endsWith("%")) {
|
|
329
|
+
const l = parseFloat(r[u]) / 100;
|
|
330
|
+
if (isNaN(l)) return;
|
|
331
|
+
c.push(l);
|
|
331
332
|
}
|
|
332
333
|
c.length === 0 ? s.push({ output: a, pos: null }) : c.length === 1 ? s.push({ output: a, pos: c[0] }) : (s.push({ output: a, pos: c[0] }), s.push({ output: a, pos: c[1] }));
|
|
333
334
|
}
|
|
@@ -339,9 +340,9 @@ function Je(e) {
|
|
|
339
340
|
const o = i - 1;
|
|
340
341
|
let r = i;
|
|
341
342
|
for (; r < s.length && s[r].pos === null; ) r++;
|
|
342
|
-
const a = s[o].pos, c = s[r].pos,
|
|
343
|
-
for (let
|
|
344
|
-
s[
|
|
343
|
+
const a = s[o].pos, c = s[r].pos, u = r - o;
|
|
344
|
+
for (let l = o + 1; l < r; l++)
|
|
345
|
+
s[l].pos = a + (c - a) * (l - o) / u;
|
|
345
346
|
i = r + 1;
|
|
346
347
|
} else
|
|
347
348
|
i++;
|
|
@@ -349,8 +350,8 @@ function Je(e) {
|
|
|
349
350
|
s[o].pos < s[o - 1].pos && (s[o].pos = s[o - 1].pos);
|
|
350
351
|
return s;
|
|
351
352
|
}
|
|
352
|
-
function
|
|
353
|
-
const t =
|
|
353
|
+
function wn(e) {
|
|
354
|
+
const t = st(e);
|
|
354
355
|
if (t)
|
|
355
356
|
return (n) => {
|
|
356
357
|
if (n <= t[0].pos) return t[0].output;
|
|
@@ -365,8 +366,8 @@ function ln(e) {
|
|
|
365
366
|
return a.pos === r.pos ? a.output : r.output + (a.output - r.output) * (n - r.pos) / (a.pos - r.pos);
|
|
366
367
|
};
|
|
367
368
|
}
|
|
368
|
-
function
|
|
369
|
-
const t =
|
|
369
|
+
function $n(e) {
|
|
370
|
+
const t = st(e);
|
|
370
371
|
if (t)
|
|
371
372
|
return (n) => {
|
|
372
373
|
const s = [`${t[0].output}`];
|
|
@@ -382,17 +383,17 @@ function dn(e) {
|
|
|
382
383
|
return `(${s.join(" + ")})`;
|
|
383
384
|
};
|
|
384
385
|
}
|
|
385
|
-
function
|
|
386
|
+
function it(e) {
|
|
386
387
|
if (!e) return;
|
|
387
|
-
const t =
|
|
388
|
-
return t || (
|
|
388
|
+
const t = Fe[e];
|
|
389
|
+
return t || (yn(e) ?? wn(e) ?? Fe.linear);
|
|
389
390
|
}
|
|
390
|
-
function
|
|
391
|
+
function bn(e) {
|
|
391
392
|
if (!e) return;
|
|
392
|
-
const t =
|
|
393
|
-
return t || (
|
|
393
|
+
const t = Re[e];
|
|
394
|
+
return t || (En(e) ?? $n(e) ?? Re.linear);
|
|
394
395
|
}
|
|
395
|
-
class
|
|
396
|
+
class Sn extends Z {
|
|
396
397
|
animationGroups;
|
|
397
398
|
delay;
|
|
398
399
|
offset;
|
|
@@ -401,7 +402,7 @@ class mn extends Q {
|
|
|
401
402
|
timingOptions;
|
|
402
403
|
constructor(t, n = {}) {
|
|
403
404
|
const s = t.flatMap((i) => [...i.animations]);
|
|
404
|
-
super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.sequenceId = n.sequenceId, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing :
|
|
405
|
+
super(s), this.animationGroups = t, this.delay = n.delay ?? 0, this.offset = n.offset ?? 0, this.sequenceId = n.sequenceId, this.offsetEasing = typeof n.offsetEasing == "function" ? n.offsetEasing : it(n.offsetEasing) ?? et, this.timingOptions = this.animationGroups.map((i) => i.getTimingOptions().map(({ delay: o, duration: r, iterations: a }) => ({
|
|
405
406
|
delay: o,
|
|
406
407
|
duration: Number.isFinite(r) ? r : 0,
|
|
407
408
|
iterations: Number.isFinite(a) ? a : 1
|
|
@@ -429,12 +430,12 @@ class mn extends Q {
|
|
|
429
430
|
i.animations.forEach((r, a) => {
|
|
430
431
|
const c = r.effect;
|
|
431
432
|
if (!c) return;
|
|
432
|
-
const { delay:
|
|
433
|
+
const { delay: u, duration: l, iterations: f } = this.timingOptions[o][a], d = u + t[o], p = n - (d + l * f);
|
|
433
434
|
if (i.isCSS && this.sequenceId) {
|
|
434
435
|
const { target: h } = c;
|
|
435
|
-
h instanceof HTMLElement && (h.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), h.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), c.updateTiming({ endDelay:
|
|
436
|
+
h instanceof HTMLElement && (h.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), h.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), c.updateTiming({ endDelay: p });
|
|
436
437
|
} else
|
|
437
|
-
c.updateTiming({ delay: d + this.delay, endDelay:
|
|
438
|
+
c.updateTiming({ delay: d + this.delay, endDelay: p });
|
|
438
439
|
});
|
|
439
440
|
});
|
|
440
441
|
}
|
|
@@ -443,8 +444,8 @@ class mn extends Q {
|
|
|
443
444
|
for (let s = 0; s < this.timingOptions.length; s++) {
|
|
444
445
|
const i = this.timingOptions[s].reduce((o, r) => {
|
|
445
446
|
if (!r) return o;
|
|
446
|
-
const { delay: a, duration: c, iterations:
|
|
447
|
-
return Math.max(o, a + c *
|
|
447
|
+
const { delay: a, duration: c, iterations: u } = r;
|
|
448
|
+
return Math.max(o, a + c * u);
|
|
448
449
|
}, 0);
|
|
449
450
|
n.push(t[s] + i);
|
|
450
451
|
}
|
|
@@ -461,7 +462,7 @@ class mn extends Q {
|
|
|
461
462
|
for (const { index: s, group: i } of n) {
|
|
462
463
|
const o = Math.min(s, this.animationGroups.length);
|
|
463
464
|
this.animationGroups.splice(o, 0, i), this.timingOptions.splice(o, 0, i.getTimingOptions());
|
|
464
|
-
const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((c,
|
|
465
|
+
const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((c, u) => c + u.animations.length, 0);
|
|
465
466
|
this.animations.splice(a, 0, ...r);
|
|
466
467
|
}
|
|
467
468
|
this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((s) => s.ready)).then(() => {
|
|
@@ -490,7 +491,7 @@ class mn extends Q {
|
|
|
490
491
|
}
|
|
491
492
|
}
|
|
492
493
|
}
|
|
493
|
-
class
|
|
494
|
+
class In {
|
|
494
495
|
_animation;
|
|
495
496
|
customEffect;
|
|
496
497
|
progress;
|
|
@@ -630,20 +631,20 @@ class pn {
|
|
|
630
631
|
return this._animation.dispatchEvent(t);
|
|
631
632
|
}
|
|
632
633
|
}
|
|
633
|
-
function
|
|
634
|
+
function Tn(e) {
|
|
634
635
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
635
636
|
}
|
|
636
|
-
var
|
|
637
|
-
function
|
|
638
|
-
return
|
|
637
|
+
var ce = { exports: {} }, je = ce.exports, ze;
|
|
638
|
+
function Cn() {
|
|
639
|
+
return ze || (ze = 1, (function(e) {
|
|
639
640
|
(function(t) {
|
|
640
641
|
var n = function() {
|
|
641
|
-
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(
|
|
642
|
-
return setTimeout(
|
|
642
|
+
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(l) {
|
|
643
|
+
return setTimeout(l, 16);
|
|
643
644
|
};
|
|
644
645
|
function i() {
|
|
645
|
-
var
|
|
646
|
-
|
|
646
|
+
var l = this;
|
|
647
|
+
l.reads = [], l.writes = [], l.raf = s.bind(t);
|
|
647
648
|
}
|
|
648
649
|
i.prototype = {
|
|
649
650
|
constructor: i,
|
|
@@ -655,8 +656,8 @@ function vn() {
|
|
|
655
656
|
*
|
|
656
657
|
* @param {Array} tasks
|
|
657
658
|
*/
|
|
658
|
-
runTasks: function(
|
|
659
|
-
for (var
|
|
659
|
+
runTasks: function(l) {
|
|
660
|
+
for (var f; f = l.shift(); ) f();
|
|
660
661
|
},
|
|
661
662
|
/**
|
|
662
663
|
* Adds a job to the read batch and
|
|
@@ -666,8 +667,8 @@ function vn() {
|
|
|
666
667
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
667
668
|
* @public
|
|
668
669
|
*/
|
|
669
|
-
measure: function(
|
|
670
|
-
var d =
|
|
670
|
+
measure: function(l, f) {
|
|
671
|
+
var d = f ? l.bind(f) : l;
|
|
671
672
|
return this.reads.push(d), o(this), d;
|
|
672
673
|
},
|
|
673
674
|
/**
|
|
@@ -679,8 +680,8 @@ function vn() {
|
|
|
679
680
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
680
681
|
* @public
|
|
681
682
|
*/
|
|
682
|
-
mutate: function(
|
|
683
|
-
var d =
|
|
683
|
+
mutate: function(l, f) {
|
|
684
|
+
var d = f ? l.bind(f) : l;
|
|
684
685
|
return this.writes.push(d), o(this), d;
|
|
685
686
|
},
|
|
686
687
|
/**
|
|
@@ -690,8 +691,8 @@ function vn() {
|
|
|
690
691
|
* @return {Boolean} success
|
|
691
692
|
* @public
|
|
692
693
|
*/
|
|
693
|
-
clear: function(
|
|
694
|
-
return a(this.reads,
|
|
694
|
+
clear: function(l) {
|
|
695
|
+
return a(this.reads, l) || a(this.writes, l);
|
|
695
696
|
},
|
|
696
697
|
/**
|
|
697
698
|
* Extend this FastDom with some
|
|
@@ -727,85 +728,85 @@ function vn() {
|
|
|
727
728
|
* @param {Object} props properties to mixin
|
|
728
729
|
* @return {FastDom}
|
|
729
730
|
*/
|
|
730
|
-
extend: function(
|
|
731
|
-
if (typeof
|
|
732
|
-
var
|
|
733
|
-
return c(
|
|
731
|
+
extend: function(l) {
|
|
732
|
+
if (typeof l != "object") throw new Error("expected object");
|
|
733
|
+
var f = Object.create(this);
|
|
734
|
+
return c(f, l), f.fastdom = this, f.initialize && f.initialize(), f;
|
|
734
735
|
},
|
|
735
736
|
// override this with a function
|
|
736
737
|
// to prevent Errors in console
|
|
737
738
|
// when tasks throw
|
|
738
739
|
catch: null
|
|
739
740
|
};
|
|
740
|
-
function o(
|
|
741
|
-
|
|
741
|
+
function o(l) {
|
|
742
|
+
l.scheduled || (l.scheduled = !0, l.raf(r.bind(null, l)));
|
|
742
743
|
}
|
|
743
|
-
function r(
|
|
744
|
-
var
|
|
744
|
+
function r(l) {
|
|
745
|
+
var f = l.writes, d = l.reads, p;
|
|
745
746
|
try {
|
|
746
|
-
n("flushing reads", d.length),
|
|
747
|
+
n("flushing reads", d.length), l.runTasks(d), n("flushing writes", f.length), l.runTasks(f);
|
|
747
748
|
} catch (h) {
|
|
748
|
-
|
|
749
|
+
p = h;
|
|
749
750
|
}
|
|
750
|
-
if (
|
|
751
|
-
if (n("task errored",
|
|
752
|
-
else throw
|
|
751
|
+
if (l.scheduled = !1, (d.length || f.length) && o(l), p)
|
|
752
|
+
if (n("task errored", p.message), l.catch) l.catch(p);
|
|
753
|
+
else throw p;
|
|
753
754
|
}
|
|
754
|
-
function a(
|
|
755
|
-
var d =
|
|
756
|
-
return !!~d && !!
|
|
755
|
+
function a(l, f) {
|
|
756
|
+
var d = l.indexOf(f);
|
|
757
|
+
return !!~d && !!l.splice(d, 1);
|
|
757
758
|
}
|
|
758
|
-
function c(
|
|
759
|
-
for (var d in
|
|
760
|
-
|
|
759
|
+
function c(l, f) {
|
|
760
|
+
for (var d in f)
|
|
761
|
+
f.hasOwnProperty(d) && (l[d] = f[d]);
|
|
761
762
|
}
|
|
762
|
-
var
|
|
763
|
-
e.exports =
|
|
764
|
-
})(typeof window < "u" ? window : typeof
|
|
765
|
-
})(
|
|
766
|
-
}
|
|
767
|
-
var
|
|
768
|
-
const
|
|
769
|
-
function
|
|
770
|
-
Object.assign(
|
|
771
|
-
}
|
|
772
|
-
function
|
|
773
|
-
return e in
|
|
763
|
+
var u = t.fastdom = t.fastdom || new i();
|
|
764
|
+
e.exports = u;
|
|
765
|
+
})(typeof window < "u" ? window : typeof je < "u" ? je : globalThis);
|
|
766
|
+
})(ce)), ce.exports;
|
|
767
|
+
}
|
|
768
|
+
var On = Cn();
|
|
769
|
+
const _ = /* @__PURE__ */ Tn(On), Se = {};
|
|
770
|
+
function _n(e) {
|
|
771
|
+
Object.assign(Se, e);
|
|
772
|
+
}
|
|
773
|
+
function ot(e, t = !0) {
|
|
774
|
+
return e in Se ? Se[e] : (t && console.warn(
|
|
774
775
|
`${e} not found in registry. Please make sure to import and register the preset.`
|
|
775
776
|
), null);
|
|
776
777
|
}
|
|
777
|
-
function
|
|
778
|
+
function W(e, t) {
|
|
778
779
|
return e ? (t || document).getElementById(e) : null;
|
|
779
780
|
}
|
|
780
|
-
function
|
|
781
|
+
function An(e, t) {
|
|
781
782
|
return e?.matches(`[data-motion-part~="${t}"]`) ? e : e?.querySelector(`[data-motion-part~="${t}"]`);
|
|
782
783
|
}
|
|
783
|
-
function
|
|
784
|
+
function kn(e) {
|
|
784
785
|
const t = e.alternate ? "alternate" : "";
|
|
785
786
|
return e.reversed ? `${t ? `${t}-` : ""}reverse` : t || "normal";
|
|
786
787
|
}
|
|
787
|
-
function
|
|
788
|
-
return `${e.value}${
|
|
788
|
+
function Ee(e) {
|
|
789
|
+
return `${e.value}${fn(e.unit)}`;
|
|
789
790
|
}
|
|
790
|
-
function
|
|
791
|
-
return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${
|
|
791
|
+
function He(e, t, n) {
|
|
792
|
+
return `${e.name || "cover"} ${n && e.offset.unit !== "percentage" ? `calc(100% + ${Ee(e.offset)}${t ? ` + ${t}` : ""})` : t ? `calc(${Ee(e.offset)} + ${t})` : Ee(e.offset)}`;
|
|
792
793
|
}
|
|
793
|
-
function
|
|
794
|
+
function rt(e) {
|
|
794
795
|
return {
|
|
795
|
-
start:
|
|
796
|
-
end:
|
|
796
|
+
start: He(e.startOffset, e.startOffsetAdd),
|
|
797
|
+
end: He(e.endOffset, e.endOffsetAdd, !0)
|
|
797
798
|
};
|
|
798
799
|
}
|
|
799
|
-
function
|
|
800
|
-
return (t) =>
|
|
800
|
+
function at(e) {
|
|
801
|
+
return (t) => _.measure(() => t(e));
|
|
801
802
|
}
|
|
802
|
-
function
|
|
803
|
-
return (t) =>
|
|
803
|
+
function ct(e) {
|
|
804
|
+
return (t) => _.mutate(() => t(e));
|
|
804
805
|
}
|
|
805
|
-
function
|
|
806
|
+
function Q(e) {
|
|
806
807
|
if (e.namedEffect) {
|
|
807
808
|
const t = e.namedEffect.type;
|
|
808
|
-
return typeof t == "string" ?
|
|
809
|
+
return typeof t == "string" ? ot(t) : null;
|
|
809
810
|
} else if (e.keyframeEffect) {
|
|
810
811
|
const t = (s) => {
|
|
811
812
|
const { name: i, keyframes: o } = s.keyframeEffect;
|
|
@@ -819,17 +820,17 @@ function B(e) {
|
|
|
819
820
|
return (t) => [{ ...t, keyframes: [] }];
|
|
820
821
|
return null;
|
|
821
822
|
}
|
|
822
|
-
function
|
|
823
|
+
function lt(e, t, n, s) {
|
|
823
824
|
return e.map((i, o) => {
|
|
824
825
|
const r = {
|
|
825
826
|
fill: i.fill,
|
|
826
|
-
easing:
|
|
827
|
+
easing: ae(i.easing),
|
|
827
828
|
iterations: i.iterations === 0 ? 1 / 0 : i.iterations || 1,
|
|
828
829
|
composite: i.composite,
|
|
829
|
-
direction:
|
|
830
|
+
direction: kn(i)
|
|
830
831
|
};
|
|
831
|
-
|
|
832
|
-
const a =
|
|
832
|
+
Le(t) ? (r.duration = i.duration, r.delay = i.delay || 0) : t?.trigger === "view-progress" && (s || window.ViewTimeline) ? r.duration = "auto" : (r.duration = 99.99, r.delay = 0.01);
|
|
833
|
+
const a = gn(i.keyframes);
|
|
833
834
|
return {
|
|
834
835
|
effect: a === i.keyframes ? i : { ...i, keyframes: a },
|
|
835
836
|
options: r,
|
|
@@ -838,33 +839,33 @@ function it(e, t, n, s) {
|
|
|
838
839
|
};
|
|
839
840
|
});
|
|
840
841
|
}
|
|
841
|
-
function
|
|
842
|
+
function Le(e) {
|
|
842
843
|
return !e || e.trigger !== "pointer-move" && e.trigger !== "view-progress";
|
|
843
844
|
}
|
|
844
|
-
function
|
|
845
|
+
function De(e, t, n, s, i) {
|
|
845
846
|
if (e) {
|
|
846
|
-
if (
|
|
847
|
+
if (Le(s) && (t.duration = t.duration || 1, i?.reducedMotion))
|
|
847
848
|
if (t.iterations === 1 || t.iterations == null)
|
|
848
849
|
t = { ...t, duration: 1 };
|
|
849
850
|
else
|
|
850
851
|
return [];
|
|
851
852
|
let o;
|
|
852
|
-
return n instanceof HTMLElement && (o = { measure:
|
|
853
|
+
return n instanceof HTMLElement && (o = { measure: at(n), mutate: ct(n) }), e.web ? e.web(t, o, i) : e(t, o, i);
|
|
853
854
|
}
|
|
854
855
|
return [];
|
|
855
856
|
}
|
|
856
|
-
function
|
|
857
|
-
const o = typeof e == "string" ?
|
|
857
|
+
function ut(e, t, n, s, i) {
|
|
858
|
+
const o = typeof e == "string" ? W(e, i) : e;
|
|
858
859
|
if (n?.trigger === "pointer-move" && !t.keyframeEffect) {
|
|
859
860
|
let d = t;
|
|
860
861
|
t.customEffect && (d = {
|
|
861
862
|
...t,
|
|
862
863
|
namedEffect: { id: "", type: "CustomMouse" }
|
|
863
864
|
});
|
|
864
|
-
const
|
|
865
|
+
const p = Q(
|
|
865
866
|
d
|
|
866
|
-
), h =
|
|
867
|
-
|
|
867
|
+
), h = De(
|
|
868
|
+
p,
|
|
868
869
|
t,
|
|
869
870
|
o,
|
|
870
871
|
n,
|
|
@@ -872,7 +873,7 @@ function ot(e, t, n, s, i) {
|
|
|
872
873
|
);
|
|
873
874
|
return typeof h != "function" ? null : h(o);
|
|
874
875
|
}
|
|
875
|
-
const r =
|
|
876
|
+
const r = Q(t), a = De(
|
|
876
877
|
r,
|
|
877
878
|
t,
|
|
878
879
|
o,
|
|
@@ -881,33 +882,33 @@ function ot(e, t, n, s, i) {
|
|
|
881
882
|
);
|
|
882
883
|
if (!a || a.length === 0)
|
|
883
884
|
return null;
|
|
884
|
-
const c =
|
|
885
|
-
let
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
subject: n.element ||
|
|
885
|
+
const c = lt(a, n, t.effectId);
|
|
886
|
+
let u;
|
|
887
|
+
const l = n?.trigger === "view-progress";
|
|
888
|
+
l && window.ViewTimeline && (u = new ViewTimeline({
|
|
889
|
+
subject: n.element || W(n.componentId)
|
|
889
890
|
}));
|
|
890
|
-
const
|
|
891
|
-
const g =
|
|
892
|
-
|
|
893
|
-
"timing" in d &&
|
|
891
|
+
const f = c.map(({ effect: d, options: p, id: h, part: m }) => {
|
|
892
|
+
const g = m ? An(o, m) : o, y = new KeyframeEffect(g || null, [], p);
|
|
893
|
+
_.mutate(() => {
|
|
894
|
+
"timing" in d && y.updateTiming(d.timing), y.setKeyframes(d.keyframes);
|
|
894
895
|
});
|
|
895
|
-
const
|
|
896
|
+
const v = l && u ? { timeline: u } : {}, E = typeof d.customEffect == "function" ? new In(
|
|
896
897
|
d.customEffect,
|
|
897
898
|
g || null,
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
) : new Animation(
|
|
901
|
-
if (
|
|
902
|
-
if (
|
|
903
|
-
|
|
904
|
-
const { start: $, end: b } =
|
|
899
|
+
p,
|
|
900
|
+
v
|
|
901
|
+
) : new Animation(y, v.timeline);
|
|
902
|
+
if (l)
|
|
903
|
+
if (u)
|
|
904
|
+
_.mutate(() => {
|
|
905
|
+
const { start: $, end: b } = rt(d);
|
|
905
906
|
E.rangeStart = $, E.rangeEnd = b, E.play();
|
|
906
907
|
});
|
|
907
908
|
else {
|
|
908
909
|
const { startOffset: $, endOffset: b } = t;
|
|
909
|
-
|
|
910
|
-
const S = d.startOffset || $,
|
|
910
|
+
_.mutate(() => {
|
|
911
|
+
const S = d.startOffset || $, C = d.endOffset || b;
|
|
911
912
|
Object.assign(E, {
|
|
912
913
|
start: {
|
|
913
914
|
name: S.name,
|
|
@@ -915,8 +916,8 @@ function ot(e, t, n, s, i) {
|
|
|
915
916
|
add: d.startOffsetAdd
|
|
916
917
|
},
|
|
917
918
|
end: {
|
|
918
|
-
name:
|
|
919
|
-
offset:
|
|
919
|
+
name: C.name,
|
|
920
|
+
offset: C.offset?.value,
|
|
920
921
|
add: d.endOffsetAdd
|
|
921
922
|
}
|
|
922
923
|
});
|
|
@@ -924,127 +925,127 @@ function ot(e, t, n, s, i) {
|
|
|
924
925
|
}
|
|
925
926
|
return h && (E.id = h), E;
|
|
926
927
|
});
|
|
927
|
-
return new
|
|
928
|
+
return new Z(f, {
|
|
928
929
|
...t,
|
|
929
930
|
trigger: { ...n || {} },
|
|
930
931
|
// make sure the group is ready after all animation targets are measured and mutated
|
|
931
|
-
measured: new Promise((d) =>
|
|
932
|
+
measured: new Promise((d) => _.mutate(d))
|
|
932
933
|
});
|
|
933
934
|
}
|
|
934
|
-
function
|
|
935
|
+
function qn(e, t) {
|
|
935
936
|
return e ? `#${e}${t ? `[data-motion-part~="${t}"]` : ""}` : "";
|
|
936
937
|
}
|
|
937
|
-
function
|
|
938
|
-
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: c } = e.options,
|
|
939
|
-
let
|
|
940
|
-
if (
|
|
941
|
-
const g =
|
|
938
|
+
function Mn(e, t, n) {
|
|
939
|
+
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: c } = e.options, u = e.effect.name, l = s === "auto", { sequenceId: f, delay: d, offset: p, offsetEasing: h = "linear" } = n || {};
|
|
940
|
+
let m = `${i ?? 0}ms`;
|
|
941
|
+
if (f && typeof h == "string") {
|
|
942
|
+
const g = bn(h);
|
|
942
943
|
if (g) {
|
|
943
|
-
const
|
|
944
|
-
if (
|
|
945
|
-
const
|
|
946
|
-
`(var(--motion-${
|
|
944
|
+
const y = (i ?? 0) + (d ?? 0);
|
|
945
|
+
if (p) {
|
|
946
|
+
const v = g(
|
|
947
|
+
`(var(--motion-${f}-index, 0) / var(--motion-${f}-last, 1))`
|
|
947
948
|
);
|
|
948
|
-
|
|
949
|
+
m = `calc(${`(${y} + ${v} * ${p} * var(--motion-${f}-last, 1))`} * 1ms)`;
|
|
949
950
|
} else
|
|
950
|
-
|
|
951
|
+
m = `${y}ms`;
|
|
951
952
|
}
|
|
952
953
|
}
|
|
953
|
-
return `${
|
|
954
|
+
return `${u} ${l ? "auto" : `${s}ms`}${l ? " " : ` ${m} `}${a}${r && r !== "none" ? ` ${r}` : ""} ${!o || o === 1 / 0 ? "infinite" : o}${c === "normal" ? "" : ` ${c}`} ${t ? "" : "paused"}`;
|
|
954
955
|
}
|
|
955
|
-
function
|
|
956
|
-
return e?.style ? (
|
|
956
|
+
function Pn(e, t, n) {
|
|
957
|
+
return e?.style ? (Le(n) && (t.duration = t.duration || 1), e.style(t)) : [];
|
|
957
958
|
}
|
|
958
|
-
function
|
|
959
|
-
const i =
|
|
960
|
-
return r.map((c,
|
|
961
|
-
const { start:
|
|
959
|
+
function Ln(e, t, n, s) {
|
|
960
|
+
const i = Q(t), o = Pn(i, t), r = lt(o, n, t.effectId, !0), a = n?.trigger === "view-progress";
|
|
961
|
+
return r.map((c, u) => {
|
|
962
|
+
const { start: l, end: f } = a ? rt(c.effect) : {};
|
|
962
963
|
return {
|
|
963
|
-
target:
|
|
964
|
-
animation:
|
|
964
|
+
target: qn(e, c.part),
|
|
965
|
+
animation: Mn(c, a, s),
|
|
965
966
|
composition: c.options.composite,
|
|
966
967
|
custom: c.effect.custom,
|
|
967
968
|
name: c.effect.name,
|
|
968
969
|
keyframes: c.effect.keyframes,
|
|
969
|
-
id: c.id && `${c.id}-${
|
|
970
|
+
id: c.id && `${c.id}-${u + 1}`,
|
|
970
971
|
animationTimeline: a ? `--${n?.id}` : "",
|
|
971
|
-
animationRange:
|
|
972
|
+
animationRange: l || f ? `${l} ${f}` : ""
|
|
972
973
|
};
|
|
973
974
|
});
|
|
974
975
|
}
|
|
975
|
-
function
|
|
976
|
-
const s =
|
|
976
|
+
function xn(e, t, n) {
|
|
977
|
+
const s = Q(t), i = e instanceof HTMLElement ? e : W(e);
|
|
977
978
|
if (s && s.prepare && i) {
|
|
978
|
-
const o = { measure:
|
|
979
|
+
const o = { measure: at(i), mutate: ct(i) };
|
|
979
980
|
s.prepare(t, o);
|
|
980
981
|
}
|
|
981
|
-
n &&
|
|
982
|
+
n && _.mutate(n);
|
|
982
983
|
}
|
|
983
|
-
function
|
|
984
|
-
const n =
|
|
984
|
+
function ft(e, t) {
|
|
985
|
+
const n = Q(t);
|
|
985
986
|
if (!n)
|
|
986
987
|
return null;
|
|
987
988
|
if (!n.style)
|
|
988
|
-
return t.effectId && e ?
|
|
989
|
-
const s = n.getNames(t), o = (typeof e == "string" ?
|
|
989
|
+
return t.effectId && e ? Fn(e, t.effectId) : null;
|
|
990
|
+
const s = n.getNames(t), o = (typeof e == "string" ? W(e) : e)?.getAnimations(), r = o?.map((c) => c.animationName) || [], a = [];
|
|
990
991
|
return s.forEach((c) => {
|
|
991
992
|
r.includes(c) && a.push(
|
|
992
|
-
o?.find((
|
|
993
|
+
o?.find((u) => u.animationName === c)
|
|
993
994
|
);
|
|
994
|
-
}), a?.length ? new
|
|
995
|
+
}), a?.length ? new Z(a) : null;
|
|
995
996
|
}
|
|
996
|
-
function
|
|
997
|
-
const s = (typeof e == "string" ?
|
|
997
|
+
function Fn(e, t) {
|
|
998
|
+
const s = (typeof e == "string" ? W(e) : e)?.getAnimations().filter((i) => {
|
|
998
999
|
const o = i.id || i.animationName;
|
|
999
1000
|
return o ? o.startsWith(t) : !0;
|
|
1000
1001
|
});
|
|
1001
|
-
return s?.length ? new
|
|
1002
|
+
return s?.length ? new Z(s) : null;
|
|
1002
1003
|
}
|
|
1003
|
-
function
|
|
1004
|
-
const { disabled: i, allowActiveEvent: o, ...r } = s, a =
|
|
1004
|
+
function dt(e, t, n, s = {}) {
|
|
1005
|
+
const { disabled: i, allowActiveEvent: o, ...r } = s, a = ut(e, t, n, r);
|
|
1005
1006
|
if (!a)
|
|
1006
1007
|
return null;
|
|
1007
1008
|
let c = {};
|
|
1008
1009
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
1009
|
-
const
|
|
1010
|
-
return a.animations.map((
|
|
1010
|
+
const u = n.element || W(n.componentId), { ready: l } = a;
|
|
1011
|
+
return a.animations.map((f) => ({
|
|
1011
1012
|
/* we use getters for start and end in order to access the animation's start and end
|
|
1012
1013
|
only when initializing the scrub scene rather than immediately */
|
|
1013
1014
|
get start() {
|
|
1014
|
-
return
|
|
1015
|
+
return f.start;
|
|
1015
1016
|
},
|
|
1016
1017
|
get end() {
|
|
1017
|
-
return
|
|
1018
|
+
return f.end;
|
|
1018
1019
|
},
|
|
1019
|
-
viewSource:
|
|
1020
|
-
ready:
|
|
1020
|
+
viewSource: u,
|
|
1021
|
+
ready: l,
|
|
1021
1022
|
getProgress() {
|
|
1022
1023
|
return a.getProgress();
|
|
1023
1024
|
},
|
|
1024
|
-
effect(d,
|
|
1025
|
-
const { activeDuration: h } =
|
|
1026
|
-
|
|
1025
|
+
effect(d, p) {
|
|
1026
|
+
const { activeDuration: h } = f.effect.getComputedTiming(), { delay: m } = f.effect.getTiming();
|
|
1027
|
+
f.currentTime = ((m || 0) + (h || 0)) * p;
|
|
1027
1028
|
},
|
|
1028
1029
|
disabled: i,
|
|
1029
1030
|
destroy() {
|
|
1030
|
-
|
|
1031
|
+
f.cancel();
|
|
1031
1032
|
}
|
|
1032
1033
|
}));
|
|
1033
1034
|
} else if (n.trigger === "pointer-move") {
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1035
|
+
const u = t, { centeredToTarget: l, transitionDuration: f, transitionEasing: d } = u, p = n.axis;
|
|
1036
|
+
if (u.keyframeEffect) {
|
|
1036
1037
|
const h = a;
|
|
1037
1038
|
return h.animations?.length === 0 ? null : {
|
|
1038
1039
|
target: void 0,
|
|
1039
|
-
centeredToTarget:
|
|
1040
|
+
centeredToTarget: l,
|
|
1040
1041
|
ready: h.ready,
|
|
1041
1042
|
_currentProgress: 0,
|
|
1042
1043
|
getProgress() {
|
|
1043
1044
|
return this._currentProgress;
|
|
1044
1045
|
},
|
|
1045
|
-
effect(g,
|
|
1046
|
-
const
|
|
1047
|
-
this._currentProgress =
|
|
1046
|
+
effect(g, y) {
|
|
1047
|
+
const v = p === "x" ? y.x : y.y;
|
|
1048
|
+
this._currentProgress = v, h.progress(v);
|
|
1048
1049
|
},
|
|
1049
1050
|
disabled: i ?? !1,
|
|
1050
1051
|
destroy() {
|
|
@@ -1053,23 +1054,23 @@ function at(e, t, n, s = {}) {
|
|
|
1053
1054
|
};
|
|
1054
1055
|
}
|
|
1055
1056
|
c = {
|
|
1056
|
-
centeredToTarget:
|
|
1057
|
+
centeredToTarget: l,
|
|
1057
1058
|
allowActiveEvent: o
|
|
1058
|
-
}, t.customEffect &&
|
|
1059
|
+
}, t.customEffect && f && (c.transitionDuration = f, c.transitionEasing = it(d)), c.target = a.target;
|
|
1059
1060
|
}
|
|
1060
1061
|
return {
|
|
1061
1062
|
...c,
|
|
1062
1063
|
getProgress() {
|
|
1063
1064
|
return a.getProgress();
|
|
1064
1065
|
},
|
|
1065
|
-
effect(
|
|
1066
|
+
effect(u, l, f, d) {
|
|
1066
1067
|
a.progress(
|
|
1067
|
-
|
|
1068
|
+
f ? {
|
|
1068
1069
|
// @ts-expect-error spread error on p
|
|
1069
|
-
...
|
|
1070
|
-
v:
|
|
1070
|
+
...l,
|
|
1071
|
+
v: f,
|
|
1071
1072
|
active: d
|
|
1072
|
-
} :
|
|
1073
|
+
} : l
|
|
1073
1074
|
);
|
|
1074
1075
|
},
|
|
1075
1076
|
disabled: i,
|
|
@@ -1078,56 +1079,370 @@ function at(e, t, n, s = {}) {
|
|
|
1078
1079
|
}
|
|
1079
1080
|
};
|
|
1080
1081
|
}
|
|
1081
|
-
function
|
|
1082
|
-
const i =
|
|
1082
|
+
function J(e, t, n, s = !1) {
|
|
1083
|
+
const i = ft(e, t);
|
|
1083
1084
|
return i ? (i.ready = new Promise((o) => {
|
|
1084
|
-
|
|
1085
|
-
}), i) :
|
|
1085
|
+
xn(e, t, o);
|
|
1086
|
+
}), i) : ut(e, t, n, { reducedMotion: s });
|
|
1086
1087
|
}
|
|
1087
|
-
function
|
|
1088
|
+
function Rn(e) {
|
|
1088
1089
|
return e === null ? [null] : typeof e == "string" ? Array.from(document.querySelectorAll(e)) : Array.isArray(e) ? e : [e];
|
|
1089
1090
|
}
|
|
1090
|
-
function
|
|
1091
|
+
function ht(e, t) {
|
|
1091
1092
|
const n = [];
|
|
1092
1093
|
for (const { target: s, options: i } of e) {
|
|
1093
|
-
const o =
|
|
1094
|
+
const o = Rn(s);
|
|
1094
1095
|
for (const r of o) {
|
|
1095
|
-
const a =
|
|
1096
|
+
const a = J(
|
|
1096
1097
|
r,
|
|
1097
1098
|
i,
|
|
1098
1099
|
void 0,
|
|
1099
1100
|
t?.reducedMotion
|
|
1100
1101
|
);
|
|
1101
|
-
a instanceof
|
|
1102
|
+
a instanceof Z && n.push(a);
|
|
1102
1103
|
}
|
|
1103
1104
|
}
|
|
1104
1105
|
return n;
|
|
1105
1106
|
}
|
|
1106
|
-
function
|
|
1107
|
-
const s =
|
|
1108
|
-
return new
|
|
1107
|
+
function Nn(e, t, n) {
|
|
1108
|
+
const s = ht(t, n);
|
|
1109
|
+
return new Sn(s, e);
|
|
1110
|
+
}
|
|
1111
|
+
function jn(e, t = 2) {
|
|
1112
|
+
return parseFloat(e.toFixed(t));
|
|
1113
|
+
}
|
|
1114
|
+
function zn(e) {
|
|
1115
|
+
return /\[]/g.test(e);
|
|
1116
|
+
}
|
|
1117
|
+
function Hn(e) {
|
|
1118
|
+
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1119
|
+
}
|
|
1120
|
+
function le(e, t) {
|
|
1121
|
+
return t.includes("&") ? t.replace(/&/g, e) : `${e}${t}`;
|
|
1122
|
+
}
|
|
1123
|
+
function X() {
|
|
1124
|
+
return "wi-12343210".replace(
|
|
1125
|
+
/\d/g,
|
|
1126
|
+
(e) => String.fromCharCode(
|
|
1127
|
+
(+e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +e / 4) + 97
|
|
1128
|
+
)
|
|
1129
|
+
// 97 for "a"
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
function mt(e) {
|
|
1133
|
+
const { transition: t, transitionProperties: n } = e;
|
|
1134
|
+
return (t?.styleProperties || n || []).map((i) => ({
|
|
1135
|
+
...i,
|
|
1136
|
+
name: fe(i.name)
|
|
1137
|
+
}));
|
|
1138
|
+
}
|
|
1139
|
+
function pt(e) {
|
|
1140
|
+
let { transition: t, transitionProperties: n } = e, s = [];
|
|
1141
|
+
if (t?.styleProperties) {
|
|
1142
|
+
const { duration: i, easing: o, delay: r } = t;
|
|
1143
|
+
i && (t.styleProperties.some(
|
|
1144
|
+
(c) => c.name.startsWith("--")
|
|
1145
|
+
) ? s = [
|
|
1146
|
+
`all ${i}ms ${ae(o || "ease")}${r ? ` ${r}ms` : ""}`,
|
|
1147
|
+
"visibility 0s"
|
|
1148
|
+
] : s = t.styleProperties.map(
|
|
1149
|
+
(c) => `${fe(c.name)} ${i}ms ${ae(
|
|
1150
|
+
o || "ease"
|
|
1151
|
+
)}${r ? ` ${r}ms` : ""}`
|
|
1152
|
+
));
|
|
1153
|
+
} else
|
|
1154
|
+
s = n?.filter((i) => i.duration).map(
|
|
1155
|
+
(i) => `${fe(i.name)} ${i.duration}ms ${ae(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
|
|
1156
|
+
) || [];
|
|
1157
|
+
return s;
|
|
1158
|
+
}
|
|
1159
|
+
function Dn({
|
|
1160
|
+
key: e,
|
|
1161
|
+
effectId: t,
|
|
1162
|
+
transition: n,
|
|
1163
|
+
transitionProperties: s,
|
|
1164
|
+
childSelector: i = "> :first-child",
|
|
1165
|
+
selectorCondition: o
|
|
1166
|
+
}) {
|
|
1167
|
+
const r = pt({
|
|
1168
|
+
transition: n,
|
|
1169
|
+
transitionProperties: s
|
|
1170
|
+
}), a = mt({ transition: n, transitionProperties: s }).map(
|
|
1171
|
+
(h) => `${h.name}: ${h.value};`
|
|
1172
|
+
), c = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, l = `[data-interact-effect~="${t}"] ${i}`, f = o ? le(u, o) : u, d = o ? le(l, o) : l, p = [
|
|
1173
|
+
`${f},
|
|
1174
|
+
${d} {
|
|
1175
|
+
${a.join(`
|
|
1176
|
+
`)}
|
|
1177
|
+
}`
|
|
1178
|
+
];
|
|
1179
|
+
if (r.length) {
|
|
1180
|
+
const h = `[data-interact-key="${c}"] ${i}`, m = o ? le(h, o) : h;
|
|
1181
|
+
p.push(`@media (prefers-reduced-motion: no-preference) { ${m} {
|
|
1182
|
+
transition: ${r.join(", ")};
|
|
1183
|
+
} }`);
|
|
1184
|
+
}
|
|
1185
|
+
return p;
|
|
1186
|
+
}
|
|
1187
|
+
function ee(e, t, n) {
|
|
1188
|
+
const s = (e || []).filter((i) => t[i]?.type === n && t[i].predicate).map((i) => t[i].predicate).join(") and (");
|
|
1189
|
+
return s && `(${s})`;
|
|
1190
|
+
}
|
|
1191
|
+
function M(e, t) {
|
|
1192
|
+
const n = ee(e, t, "media");
|
|
1193
|
+
return n && window.matchMedia(n);
|
|
1194
|
+
}
|
|
1195
|
+
function P(e, t) {
|
|
1196
|
+
return (e || []).filter((n) => t[n]?.type === "selector" && t[n].predicate).map((n) => `:is(${t[n].predicate})`).join("");
|
|
1197
|
+
}
|
|
1198
|
+
const gt = /* @__PURE__ */ new Map([
|
|
1199
|
+
["viewEnter", "once"],
|
|
1200
|
+
["animationEnd", "once"],
|
|
1201
|
+
["hover", "alternate"],
|
|
1202
|
+
["click", "alternate"],
|
|
1203
|
+
["activate", "alternate"],
|
|
1204
|
+
["interest", "alternate"]
|
|
1205
|
+
]);
|
|
1206
|
+
function vt(e, t, n, s) {
|
|
1207
|
+
const { effects: i = {}, conditions: o = {} } = n, { key: r, trigger: a } = t, c = a === "pointerMove";
|
|
1208
|
+
e.effectId || (e.effectId = s || X());
|
|
1209
|
+
const { effectId: u } = e, l = { ...i[u] || {}, ...e };
|
|
1210
|
+
let { key: f, conditions: d, triggerType: p } = l;
|
|
1211
|
+
if (!f) {
|
|
1212
|
+
if (!r)
|
|
1213
|
+
return null;
|
|
1214
|
+
f = r;
|
|
1215
|
+
}
|
|
1216
|
+
if (zn(f))
|
|
1217
|
+
return null;
|
|
1218
|
+
d = [
|
|
1219
|
+
...new Set((d || []).filter((b) => o[b]))
|
|
1220
|
+
], p || (p = gt.get(a));
|
|
1221
|
+
const { namedEffect: h, customEffect: m, keyframeEffect: g, transition: y, transitionProperties: v, ...E } = {
|
|
1222
|
+
...l,
|
|
1223
|
+
key: f,
|
|
1224
|
+
conditions: d,
|
|
1225
|
+
effectId: u,
|
|
1226
|
+
triggerType: p
|
|
1227
|
+
}, $ = jt(t, E);
|
|
1228
|
+
if (h)
|
|
1229
|
+
return c || !h.type ? null : { namedEffect: h, initial: $, ...E };
|
|
1230
|
+
if (g) {
|
|
1231
|
+
if (!g.name) {
|
|
1232
|
+
const b = u && !(i[u] && "keyframeEffect" in e);
|
|
1233
|
+
g.name = b ? u : X();
|
|
1234
|
+
}
|
|
1235
|
+
return { keyframeEffect: g, initial: $, ...E };
|
|
1236
|
+
} else return m ? c ? null : { initial: $, ...E } : y ? { transition: y, initial: $, ...E } : v ? { transitionProperties: v, initial: $, ...E } : { initial: $, ...E };
|
|
1237
|
+
}
|
|
1238
|
+
function Gn(e, t, n, s, i) {
|
|
1239
|
+
const { sequences: o = {}, conditions: r = {} } = n;
|
|
1240
|
+
e.sequenceId || (e.sequenceId = s || X());
|
|
1241
|
+
const { sequenceId: a } = e, c = { ...o[a] || {}, ...e };
|
|
1242
|
+
let {
|
|
1243
|
+
effects: u,
|
|
1244
|
+
conditions: l,
|
|
1245
|
+
triggerType: f,
|
|
1246
|
+
delay: d = 0,
|
|
1247
|
+
offset: p = 0,
|
|
1248
|
+
offsetEasing: h = "linear"
|
|
1249
|
+
} = c;
|
|
1250
|
+
if (typeof h == "function" || !u)
|
|
1251
|
+
return null;
|
|
1252
|
+
f || (f = gt.get(t.trigger)), l = [
|
|
1253
|
+
...new Set((l || []).filter((y) => r[y]))
|
|
1254
|
+
];
|
|
1255
|
+
const g = u.map((y, v) => {
|
|
1256
|
+
const E = vt(
|
|
1257
|
+
{ ...y, triggerType: f, conditions: [...y.conditions || [], ...l] },
|
|
1258
|
+
t,
|
|
1259
|
+
n,
|
|
1260
|
+
`${a}-eff-${v}`
|
|
1261
|
+
);
|
|
1262
|
+
return E && Object.assign(E, { slotKey: i?.(v) });
|
|
1263
|
+
}).filter((y) => y !== null);
|
|
1264
|
+
return g.length ? {
|
|
1265
|
+
sequenceId: a,
|
|
1266
|
+
triggerType: f,
|
|
1267
|
+
conditions: l,
|
|
1268
|
+
delay: d,
|
|
1269
|
+
offset: p,
|
|
1270
|
+
offsetEasing: h,
|
|
1271
|
+
effects: g
|
|
1272
|
+
} : null;
|
|
1273
|
+
}
|
|
1274
|
+
function Wn(e) {
|
|
1275
|
+
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : fe(e);
|
|
1276
|
+
}
|
|
1277
|
+
function Vn(e) {
|
|
1278
|
+
if (!e.length)
|
|
1279
|
+
return [];
|
|
1280
|
+
const t = e.map((i) => ({ ...i }));
|
|
1281
|
+
t[0].offset === void 0 && (t[0].offset = 0), t.length === 1 ? e[0].offset === void 0 && (t[0].offset = 1) : t[t.length - 1].offset === void 0 && (t[t.length - 1].offset = 1);
|
|
1282
|
+
let n = 0, s = t[0].offset;
|
|
1283
|
+
for (let i = 1; i < t.length; i++)
|
|
1284
|
+
if (t[i].offset !== void 0) {
|
|
1285
|
+
const o = t[i].offset;
|
|
1286
|
+
if (o < s)
|
|
1287
|
+
return console.error("Offsets must be monotonically non-decreasing"), [];
|
|
1288
|
+
if (o > 1)
|
|
1289
|
+
return console.error("Offsets must be in the range [0,1]"), [];
|
|
1290
|
+
const r = i - n;
|
|
1291
|
+
for (let a = n + 1; a < i; a++) {
|
|
1292
|
+
const c = (a - n) / r;
|
|
1293
|
+
t[a].offset = s + (o - s) * c;
|
|
1294
|
+
}
|
|
1295
|
+
n = i, s = o;
|
|
1296
|
+
}
|
|
1297
|
+
return t;
|
|
1298
|
+
}
|
|
1299
|
+
function Kn(e, t) {
|
|
1300
|
+
const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${Wn(s)}: ${i};`).join(`
|
|
1301
|
+
`);
|
|
1302
|
+
return `${t}% {
|
|
1303
|
+
${n}
|
|
1304
|
+
}`;
|
|
1305
|
+
}
|
|
1306
|
+
function Yn(e, t) {
|
|
1307
|
+
const n = Vn(t);
|
|
1308
|
+
if (!n.length)
|
|
1309
|
+
return "";
|
|
1310
|
+
let s = n.map((i) => {
|
|
1311
|
+
const o = i.offset, r = jn(o * 100);
|
|
1312
|
+
return Kn(i, r);
|
|
1313
|
+
}).join(`
|
|
1314
|
+
`);
|
|
1315
|
+
return `@keyframes ${e} {
|
|
1316
|
+
${s}
|
|
1317
|
+
}`;
|
|
1318
|
+
}
|
|
1319
|
+
function Bn(e) {
|
|
1320
|
+
const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: a } = e;
|
|
1321
|
+
if (!s.length)
|
|
1322
|
+
return "";
|
|
1323
|
+
let c = `[data-interact-key="${t}"]`;
|
|
1324
|
+
if (o && o.length) {
|
|
1325
|
+
const f = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
|
|
1326
|
+
c = `${c}:is(${f})`;
|
|
1327
|
+
}
|
|
1328
|
+
n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c = le(c, r));
|
|
1329
|
+
const u = s.map(({ name: f, value: d, important: p }) => `${f}: ${d}${p ? " !important" : ""};`).join(`
|
|
1330
|
+
`), l = `${c} {
|
|
1331
|
+
${u}
|
|
1332
|
+
}`;
|
|
1333
|
+
return i ? `@media ${i} {
|
|
1334
|
+
${l}
|
|
1335
|
+
}` : l;
|
|
1336
|
+
}
|
|
1337
|
+
const Ie = [
|
|
1338
|
+
"animation",
|
|
1339
|
+
"animation-composition",
|
|
1340
|
+
"animation-timeline",
|
|
1341
|
+
"animation-range"
|
|
1342
|
+
], ve = [
|
|
1343
|
+
...Ie,
|
|
1344
|
+
"transition",
|
|
1345
|
+
"view-timeline"
|
|
1346
|
+
], xe = ["animation", "transition", "timeline"];
|
|
1347
|
+
function F(e) {
|
|
1348
|
+
return e === "transition" ? "transition" : e === "view-timeline" ? "timeline" : "animation";
|
|
1349
|
+
}
|
|
1350
|
+
const j = {
|
|
1351
|
+
transition: "_",
|
|
1352
|
+
animation: "none",
|
|
1353
|
+
"animation-composition": "replace",
|
|
1354
|
+
"animation-timeline": "auto",
|
|
1355
|
+
"animation-range": "normal",
|
|
1356
|
+
"view-timeline": "none"
|
|
1357
|
+
};
|
|
1358
|
+
function R(e, t, n = !1) {
|
|
1359
|
+
return `--${e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "")}${n ? "-slot" : ""}-${t}`;
|
|
1360
|
+
}
|
|
1361
|
+
function Un(e, t, n, s, i = 0) {
|
|
1362
|
+
const o = {
|
|
1363
|
+
animation: e,
|
|
1364
|
+
transition: t,
|
|
1365
|
+
timeline: i
|
|
1366
|
+
}, r = {
|
|
1367
|
+
animation: n,
|
|
1368
|
+
transition: s,
|
|
1369
|
+
timeline: 0
|
|
1370
|
+
};
|
|
1371
|
+
return ve.flatMap((a) => [
|
|
1372
|
+
...Array.from(
|
|
1373
|
+
{ length: o[F(a)] },
|
|
1374
|
+
(c, u) => `@property ${R(a, u)} { syntax: "*"; inherits: false; initial-value: ${j[a]}; }`
|
|
1375
|
+
),
|
|
1376
|
+
...Array.from(
|
|
1377
|
+
{ length: r[F(a)] },
|
|
1378
|
+
(c, u) => `@property ${R(a, u, !0)} { syntax: "*"; inherits: false; initial-value: ${j[a]}; }`
|
|
1379
|
+
)
|
|
1380
|
+
]);
|
|
1381
|
+
}
|
|
1382
|
+
function Qn(e, t, n) {
|
|
1383
|
+
const s = ve.filter(
|
|
1384
|
+
(r) => e[F(r)].slotsInSequence > 0
|
|
1385
|
+
);
|
|
1386
|
+
if (s.length === 0)
|
|
1387
|
+
return null;
|
|
1388
|
+
const i = s.map((r) => {
|
|
1389
|
+
const { listIndex: a, slotCursor: c, slotsInSequence: u } = e[F(r)];
|
|
1390
|
+
return {
|
|
1391
|
+
name: R(r, a),
|
|
1392
|
+
value: Array.from(
|
|
1393
|
+
{ length: u },
|
|
1394
|
+
(l, f) => `var(${R(r, c + f, !0)})`
|
|
1395
|
+
).join(", ")
|
|
1396
|
+
};
|
|
1397
|
+
}), o = { key: e.key, childSelector: e.childSelector, declarations: i };
|
|
1398
|
+
return t && (o.media = ee(t, n || {}, "media"), o.selectorCondition = P(t, n || {})), o;
|
|
1399
|
+
}
|
|
1400
|
+
function Xn(e, t, n, s = 0) {
|
|
1401
|
+
if (e.length === 0)
|
|
1402
|
+
return "";
|
|
1403
|
+
const i = {
|
|
1404
|
+
animation: t,
|
|
1405
|
+
transition: n,
|
|
1406
|
+
timeline: s
|
|
1407
|
+
}, o = ve.filter((c) => i[F(c)] > 0);
|
|
1408
|
+
if (o.length === 0)
|
|
1409
|
+
return "";
|
|
1410
|
+
const r = o.map((c) => ({
|
|
1411
|
+
name: c,
|
|
1412
|
+
value: Array.from(
|
|
1413
|
+
{ length: i[F(c)] },
|
|
1414
|
+
// TODO: maybe add `-intrct` to names? --anm-0 or --trns-0 could collide with user-defined names
|
|
1415
|
+
(u, l) => `var(${R(c, l)})`
|
|
1416
|
+
).join(", ")
|
|
1417
|
+
}));
|
|
1418
|
+
return `${e.map(
|
|
1419
|
+
({ key: c, childSelector: u }) => `[data-interact-key="${c}"]${u ? ` ${u}` : ""}`
|
|
1420
|
+
).join(", ")} {
|
|
1421
|
+
${r.map(({ name: c, value: u }) => ` ${c}: ${u};`).join(`
|
|
1422
|
+
`)}
|
|
1423
|
+
}`;
|
|
1109
1424
|
}
|
|
1110
|
-
const
|
|
1425
|
+
const ne = {
|
|
1111
1426
|
rangeStart: { name: "cover", offset: { value: 0, unit: "percentage" } },
|
|
1112
1427
|
rangeEnd: { name: "cover", offset: { value: 100, unit: "percentage" } }
|
|
1113
1428
|
};
|
|
1114
|
-
function
|
|
1115
|
-
const n = e?.name ??
|
|
1429
|
+
function Zn(e, t) {
|
|
1430
|
+
const n = e?.name ?? ne.rangeStart.name, s = t?.name ?? e?.name ?? ne.rangeEnd.name, i = {
|
|
1116
1431
|
name: n,
|
|
1117
|
-
offset: e?.offset ||
|
|
1432
|
+
offset: e?.offset || ne.rangeStart.offset
|
|
1118
1433
|
}, o = {
|
|
1119
1434
|
name: s,
|
|
1120
|
-
offset: t?.offset ||
|
|
1435
|
+
offset: t?.offset || ne.rangeEnd.offset
|
|
1121
1436
|
};
|
|
1122
1437
|
return { startOffset: i, endOffset: o };
|
|
1123
1438
|
}
|
|
1124
|
-
function
|
|
1439
|
+
function L(e) {
|
|
1125
1440
|
if ("keyframeEffect" in e && !e.keyframeEffect.name && "effectId" in e && (e.keyframeEffect.name = e.effectId), "duration" in e)
|
|
1126
1441
|
return {
|
|
1127
1442
|
id: "",
|
|
1128
1443
|
...e
|
|
1129
1444
|
};
|
|
1130
|
-
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } =
|
|
1445
|
+
const { rangeStart: t, rangeEnd: n, ...s } = e, { startOffset: i, endOffset: o } = Zn(t, n);
|
|
1131
1446
|
return {
|
|
1132
1447
|
id: "",
|
|
1133
1448
|
startOffset: i,
|
|
@@ -1135,11 +1450,11 @@ function P(e) {
|
|
|
1135
1450
|
...s
|
|
1136
1451
|
};
|
|
1137
1452
|
}
|
|
1138
|
-
function
|
|
1453
|
+
function k(e, t, n) {
|
|
1139
1454
|
let s = e.get(t);
|
|
1140
1455
|
s || (s = /* @__PURE__ */ new Set(), e.set(t, s)), s.add(n);
|
|
1141
1456
|
}
|
|
1142
|
-
function
|
|
1457
|
+
function te(e, t) {
|
|
1143
1458
|
e.get(t)?.forEach((s) => {
|
|
1144
1459
|
const { source: i, target: o, cleanup: r } = s;
|
|
1145
1460
|
r();
|
|
@@ -1147,126 +1462,472 @@ function Z(e, t) {
|
|
|
1147
1462
|
e.get(a)?.delete(s);
|
|
1148
1463
|
}), e.delete(t);
|
|
1149
1464
|
}
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1465
|
+
const Jn = [
|
|
1466
|
+
{ name: "visibility", value: "hidden" },
|
|
1467
|
+
{ name: "clip-path", value: "none", important: !0 },
|
|
1468
|
+
{ name: "transform", value: "none", important: !0 },
|
|
1469
|
+
{ name: "translate", value: "none", important: !0 },
|
|
1470
|
+
{ name: "scale", value: "none", important: !0 },
|
|
1471
|
+
{ name: "rotate", value: "none", important: !0 }
|
|
1472
|
+
], Te = { animation: !1, transition: !1, timeline: !1 };
|
|
1473
|
+
function yt(e, t) {
|
|
1474
|
+
const n = () => ({
|
|
1475
|
+
listIndex: 0,
|
|
1476
|
+
slotCursor: 0,
|
|
1477
|
+
slotsInInteraction: 0,
|
|
1478
|
+
slotsInSequence: 0,
|
|
1479
|
+
touched: !1
|
|
1480
|
+
});
|
|
1481
|
+
return {
|
|
1482
|
+
key: e,
|
|
1483
|
+
childSelector: t,
|
|
1484
|
+
assigned: /* @__PURE__ */ new Set(),
|
|
1485
|
+
animation: n(),
|
|
1486
|
+
transition: n(),
|
|
1487
|
+
timeline: n(),
|
|
1488
|
+
keyframeEntries: /* @__PURE__ */ new Map()
|
|
1489
|
+
};
|
|
1162
1490
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1491
|
+
function Et(e, t) {
|
|
1492
|
+
return Object.fromEntries(
|
|
1493
|
+
ve.map((n) => {
|
|
1494
|
+
const s = F(n), { listIndex: i, slotCursor: o, slotsInSequence: r } = e[s];
|
|
1495
|
+
return [
|
|
1496
|
+
n,
|
|
1497
|
+
t[s] ? R(n, o + r, !0) : R(n, i)
|
|
1498
|
+
];
|
|
1499
|
+
})
|
|
1500
|
+
);
|
|
1167
1501
|
}
|
|
1168
|
-
function
|
|
1169
|
-
|
|
1170
|
-
|
|
1502
|
+
function Ce(e, t, n) {
|
|
1503
|
+
xe.forEach((s) => {
|
|
1504
|
+
t[s] && (e[s].touched = !0, n[s] && (e[s].slotsInSequence += 1));
|
|
1171
1505
|
});
|
|
1172
1506
|
}
|
|
1173
|
-
function
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
const n = t.target;
|
|
1177
|
-
t.isIntersecting || ft(n, !1, !0);
|
|
1178
|
-
});
|
|
1179
|
-
}, Pn), V);
|
|
1507
|
+
function wt(e) {
|
|
1508
|
+
const { namedEffect: t, keyframeEffect: n, transition: s, transitionProperties: i } = e;
|
|
1509
|
+
return t || n ? "animation" : s || i ? "transition" : null;
|
|
1180
1510
|
}
|
|
1181
|
-
function
|
|
1511
|
+
function es(e) {
|
|
1512
|
+
const t = /* @__PURE__ */ new Map();
|
|
1513
|
+
return e.effects.forEach((n) => {
|
|
1514
|
+
const s = wt(n);
|
|
1515
|
+
if (!s)
|
|
1516
|
+
return;
|
|
1517
|
+
const i = G(n), o = t.get(i) || { animation: 0, transition: 0, timeline: 0 };
|
|
1518
|
+
o[s] += 1, t.set(i, o);
|
|
1519
|
+
}), new Map(
|
|
1520
|
+
[...t].map(([n, { animation: s, transition: i }]) => [
|
|
1521
|
+
n,
|
|
1522
|
+
{ animation: s > 1, transition: i > 1, timeline: !1 }
|
|
1523
|
+
])
|
|
1524
|
+
);
|
|
1525
|
+
}
|
|
1526
|
+
function ts(e) {
|
|
1527
|
+
xe.forEach((t) => {
|
|
1528
|
+
const n = e[t];
|
|
1529
|
+
n.slotsInInteraction = Math.max(n.slotsInInteraction, n.slotsInSequence), n.slotsInSequence = 0;
|
|
1530
|
+
});
|
|
1531
|
+
}
|
|
1532
|
+
function ns(e) {
|
|
1533
|
+
xe.forEach((t) => {
|
|
1534
|
+
const n = e[t];
|
|
1535
|
+
n.listIndex += n.touched ? 1 : 0, n.slotCursor += n.slotsInInteraction, n.slotsInInteraction = 0, n.touched = !1;
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
const ss = {
|
|
1539
|
+
animation: "animation",
|
|
1540
|
+
"animation-composition": "composition",
|
|
1541
|
+
"animation-timeline": "animationTimeline",
|
|
1542
|
+
"animation-range": "animationRange"
|
|
1543
|
+
};
|
|
1544
|
+
function is(e, t, n, s) {
|
|
1545
|
+
const { key: i, conditions: o } = t, r = ee(o, e.configConditions, "media"), a = P(o, e.configConditions), c = D(t, {
|
|
1546
|
+
asCombinator: !0,
|
|
1547
|
+
useFirstChild: e.useFirstChild,
|
|
1548
|
+
addItemFilter: !0
|
|
1549
|
+
}), u = G(t), l = e.targetsMap.get(u) || yt(i, c), f = Et(l, Te)["view-timeline"];
|
|
1550
|
+
return Ce(l, { animation: !1, transition: !1, timeline: !0 }, Te), e.targetsMap.set(u, l), s.add(u), {
|
|
1551
|
+
key: i,
|
|
1552
|
+
media: r,
|
|
1553
|
+
selectorCondition: a,
|
|
1554
|
+
childSelector: c,
|
|
1555
|
+
declarations: [
|
|
1556
|
+
{
|
|
1557
|
+
name: f,
|
|
1558
|
+
value: `--${n}`
|
|
1559
|
+
}
|
|
1560
|
+
]
|
|
1561
|
+
};
|
|
1562
|
+
}
|
|
1563
|
+
function $t(e, t, n, s, i) {
|
|
1564
|
+
const o = [];
|
|
1565
|
+
for (const r of Object.keys(i)) {
|
|
1566
|
+
const a = `${Je}${r}`;
|
|
1567
|
+
a in t && o.push(
|
|
1568
|
+
...i[r](t[a], {
|
|
1569
|
+
key: n,
|
|
1570
|
+
scope: e,
|
|
1571
|
+
config: t
|
|
1572
|
+
}).map((c) => ({ ...c, key: n, media: s }))
|
|
1573
|
+
);
|
|
1574
|
+
}
|
|
1575
|
+
return o;
|
|
1576
|
+
}
|
|
1577
|
+
function os(e, t, n, s, i, o) {
|
|
1578
|
+
const { assigned: r, childSelector: a } = n, c = { animation: !1, transition: !1, timeline: !1 }, {
|
|
1579
|
+
key: u,
|
|
1580
|
+
effectId: l,
|
|
1581
|
+
conditions: f,
|
|
1582
|
+
namedEffect: d,
|
|
1583
|
+
keyframeEffect: p,
|
|
1584
|
+
transition: h,
|
|
1585
|
+
transitionProperties: m,
|
|
1586
|
+
initial: g
|
|
1587
|
+
} = t, y = ee(f, e.configConditions, "media"), v = P(f, e.configConditions), E = [
|
|
1588
|
+
{
|
|
1589
|
+
key: u,
|
|
1590
|
+
media: y,
|
|
1591
|
+
selectorCondition: v,
|
|
1592
|
+
childSelector: a,
|
|
1593
|
+
declarations: []
|
|
1594
|
+
}
|
|
1595
|
+
];
|
|
1596
|
+
let $ = [];
|
|
1597
|
+
const { declarations: b } = E[0];
|
|
1598
|
+
if (e.plugins && E.push(...$t("effect", t, u, y, e.plugins)), d || p) {
|
|
1599
|
+
const S = L(t), C = Ln(null, S, s, o).filter(
|
|
1600
|
+
(I) => I.name
|
|
1601
|
+
);
|
|
1602
|
+
$ = C.map((I) => ({
|
|
1603
|
+
name: I.name,
|
|
1604
|
+
keyframes: I.keyframes
|
|
1605
|
+
})), b.push(
|
|
1606
|
+
...C.flatMap(
|
|
1607
|
+
({ custom: I }) => Object.entries(I || {}).filter(([T, A]) => A !== void 0).map(([T, A]) => ({ name: T, value: A }))
|
|
1608
|
+
)
|
|
1609
|
+
);
|
|
1610
|
+
const O = Ie.map((I) => ({
|
|
1611
|
+
_listPropertyName: I,
|
|
1612
|
+
name: i[I],
|
|
1613
|
+
value: C.map((T) => {
|
|
1614
|
+
const A = ss[I];
|
|
1615
|
+
return T[A] || j[I];
|
|
1616
|
+
}).join(", ")
|
|
1617
|
+
})).filter(
|
|
1618
|
+
({ _listPropertyName: I, name: T, value: A }) => A !== j[I] || r.has(T)
|
|
1619
|
+
);
|
|
1620
|
+
O.forEach(({ name: I }) => r.add(I)), c.animation = O.length > 0, g ? (E.push({
|
|
1621
|
+
key: u,
|
|
1622
|
+
media: y,
|
|
1623
|
+
selectorCondition: v,
|
|
1624
|
+
childSelector: a,
|
|
1625
|
+
declarations: Jn,
|
|
1626
|
+
selectorSuffix: ":not([data-interact-enter])"
|
|
1627
|
+
}), E.push({
|
|
1628
|
+
key: u,
|
|
1629
|
+
media: y,
|
|
1630
|
+
selectorCondition: v,
|
|
1631
|
+
childSelector: a,
|
|
1632
|
+
declarations: O,
|
|
1633
|
+
selectorSuffix: ':not([data-interact-enter="done"])'
|
|
1634
|
+
})) : b.push(...O);
|
|
1635
|
+
} else if (h || m) {
|
|
1636
|
+
const S = mt(t), C = pt(t);
|
|
1637
|
+
(C.length || r.has(i.transition)) && (b.push({
|
|
1638
|
+
name: i.transition,
|
|
1639
|
+
value: C.join(", ") || j.transition
|
|
1640
|
+
}), r.add(i.transition), c.transition = !0), E.push({
|
|
1641
|
+
key: u,
|
|
1642
|
+
media: y,
|
|
1643
|
+
selectorCondition: v,
|
|
1644
|
+
childSelector: a,
|
|
1645
|
+
states: [l],
|
|
1646
|
+
declarations: S
|
|
1647
|
+
});
|
|
1648
|
+
} else
|
|
1649
|
+
b.push(
|
|
1650
|
+
...Ie.filter(
|
|
1651
|
+
(S) => r.has(i[S])
|
|
1652
|
+
).map((S) => ({
|
|
1653
|
+
name: i[S],
|
|
1654
|
+
value: j[S]
|
|
1655
|
+
}))
|
|
1656
|
+
);
|
|
1657
|
+
return { rules: E.filter((S) => S.declarations.length), keyframes: $, wrote: c };
|
|
1658
|
+
}
|
|
1659
|
+
function rs(e, t, n) {
|
|
1660
|
+
const s = t.namedEffect && ot(t.namedEffect.type, !1);
|
|
1661
|
+
if (!s?.getNames)
|
|
1662
|
+
return;
|
|
1663
|
+
const i = (r) => s.getNames({ ...t, suffix: r });
|
|
1664
|
+
if (i("-1").join() === i().join())
|
|
1665
|
+
return;
|
|
1666
|
+
const o = e.keyframeEntries.get(n) || [];
|
|
1667
|
+
e.keyframeEntries.set(n, [...o, { slotKey: t.slotKey, getNames: i }]);
|
|
1668
|
+
}
|
|
1669
|
+
function bt(e, t, n, s, i, o) {
|
|
1670
|
+
const r = G(t), a = e.targetsMap.get(r) || yt(
|
|
1671
|
+
t.key,
|
|
1672
|
+
D(t, {
|
|
1673
|
+
asCombinator: !0,
|
|
1674
|
+
useFirstChild: e.useFirstChild,
|
|
1675
|
+
addItemFilter: !0
|
|
1676
|
+
})
|
|
1677
|
+
);
|
|
1678
|
+
s.add(r);
|
|
1679
|
+
const c = o?.get(r) || Te, u = Et(a, c);
|
|
1680
|
+
if (e.collectSlots) {
|
|
1681
|
+
rs(a, t, u.animation);
|
|
1682
|
+
const p = wt(t);
|
|
1683
|
+
return Ce(
|
|
1684
|
+
a,
|
|
1685
|
+
{ animation: p === "animation", transition: p === "transition", timeline: !1 },
|
|
1686
|
+
c
|
|
1687
|
+
), e.targetsMap.set(r, a), [];
|
|
1688
|
+
}
|
|
1689
|
+
t.namedEffect && (t.suffix = e.keyframeSlots.get(t.slotKey));
|
|
1690
|
+
const { rules: l, keyframes: f, wrote: d } = os(
|
|
1691
|
+
e,
|
|
1692
|
+
t,
|
|
1693
|
+
a,
|
|
1694
|
+
n,
|
|
1695
|
+
u,
|
|
1696
|
+
i
|
|
1697
|
+
);
|
|
1698
|
+
return f.forEach(({ name: p, keyframes: h }) => e.keyframesMap.set(p, h)), Ce(a, d, c), e.targetsMap.set(r, a), l;
|
|
1699
|
+
}
|
|
1700
|
+
function as(e, t, n, s) {
|
|
1701
|
+
const i = [], o = /* @__PURE__ */ new Set(), r = es(t);
|
|
1702
|
+
i.push(
|
|
1703
|
+
...t.effects.flatMap(
|
|
1704
|
+
(c) => bt(e, c, n, o, t, r)
|
|
1705
|
+
)
|
|
1706
|
+
);
|
|
1707
|
+
const { conditions: a } = t;
|
|
1708
|
+
return o.forEach((c) => {
|
|
1709
|
+
s.add(c);
|
|
1710
|
+
const u = e.targetsMap.get(c), l = Qn(u, a, e.configConditions);
|
|
1711
|
+
l && (l.declarations.forEach(({ name: f }) => u.assigned.add(f)), i.push(l)), ts(u);
|
|
1712
|
+
}), i;
|
|
1713
|
+
}
|
|
1714
|
+
function cs(e, t, n) {
|
|
1715
|
+
const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, a = e.plugins ? $t(
|
|
1716
|
+
"interaction",
|
|
1717
|
+
t,
|
|
1718
|
+
s,
|
|
1719
|
+
ee(i, e.configConditions, "media"),
|
|
1720
|
+
e.plugins
|
|
1721
|
+
) : [], { trigger: c } = t, u = {
|
|
1722
|
+
trigger: Hn(c),
|
|
1723
|
+
id: ["trigger", n].join("-")
|
|
1724
|
+
}, l = /* @__PURE__ */ new Set();
|
|
1725
|
+
c === "viewProgress" && a.push(is(e, t, u.id, l));
|
|
1726
|
+
const f = o.map((p, h) => {
|
|
1727
|
+
const m = vt(
|
|
1728
|
+
p,
|
|
1729
|
+
t,
|
|
1730
|
+
e.config,
|
|
1731
|
+
`eff-${n}-${h}`
|
|
1732
|
+
);
|
|
1733
|
+
return m && Object.assign(m, { slotKey: de(n, h) });
|
|
1734
|
+
}).filter((p) => p !== null);
|
|
1735
|
+
a.push(
|
|
1736
|
+
...f.flatMap((p) => bt(e, p, u, l))
|
|
1737
|
+
);
|
|
1738
|
+
const d = r.map(
|
|
1739
|
+
(p, h) => Gn(
|
|
1740
|
+
p,
|
|
1741
|
+
t,
|
|
1742
|
+
e.config,
|
|
1743
|
+
`seq-${n}-${h}`,
|
|
1744
|
+
(m) => de(n, m, h)
|
|
1745
|
+
)
|
|
1746
|
+
).filter((p) => p !== null);
|
|
1747
|
+
return a.push(
|
|
1748
|
+
...d.flatMap(
|
|
1749
|
+
(p) => as(e, p, u, l)
|
|
1750
|
+
)
|
|
1751
|
+
), l.forEach((p) => ns(e.targetsMap.get(p))), a;
|
|
1752
|
+
}
|
|
1753
|
+
function ls(e = {}) {
|
|
1754
|
+
const { useFirstChild: t = !0, plugins: n } = typeof e == "boolean" ? { useFirstChild: e, plugins: void 0 } : e;
|
|
1755
|
+
return { useFirstChild: t, plugins: n };
|
|
1756
|
+
}
|
|
1757
|
+
function St(e, t) {
|
|
1758
|
+
const { useFirstChild: n = !0, plugins: s, collectSlots: i = !1 } = t, o = {
|
|
1759
|
+
config: e,
|
|
1760
|
+
configConditions: e.conditions || {},
|
|
1761
|
+
targetsMap: /* @__PURE__ */ new Map(),
|
|
1762
|
+
keyframesMap: /* @__PURE__ */ new Map(),
|
|
1763
|
+
keyframeSlots: i ? /* @__PURE__ */ new Map() : It(e),
|
|
1764
|
+
collectSlots: i,
|
|
1765
|
+
useFirstChild: n,
|
|
1766
|
+
plugins: s
|
|
1767
|
+
}, r = e.interactions.flatMap(
|
|
1768
|
+
(a, c) => cs(o, a, c)
|
|
1769
|
+
);
|
|
1770
|
+
return { ctx: o, cssRules: r };
|
|
1771
|
+
}
|
|
1772
|
+
function de(e, t, n) {
|
|
1773
|
+
return [e, n, t].filter((s) => s !== void 0).join(":");
|
|
1774
|
+
}
|
|
1775
|
+
function It(e) {
|
|
1776
|
+
const { ctx: t } = St(e, { collectSlots: !0 }), n = /* @__PURE__ */ new Map(), s = (i) => i ? `-${i}` : void 0;
|
|
1777
|
+
return t.targetsMap.forEach(({ keyframeEntries: i }) => {
|
|
1778
|
+
const o = /* @__PURE__ */ new Set();
|
|
1779
|
+
i.forEach((r) => {
|
|
1780
|
+
const a = (l) => r.flatMap(({ getNames: f }) => f(s(l)));
|
|
1781
|
+
let c = 0, u = a(c);
|
|
1782
|
+
for (; u.some((l) => o.has(l)); )
|
|
1783
|
+
u = a(++c);
|
|
1784
|
+
u.forEach((l) => o.add(l)), c && r.forEach(({ slotKey: l }) => n.set(l, s(c)));
|
|
1785
|
+
});
|
|
1786
|
+
}), n;
|
|
1787
|
+
}
|
|
1788
|
+
function us(e, t) {
|
|
1789
|
+
const { ctx: n, cssRules: s } = St(e, ls(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: d }) => d.listIndex)), r = Math.max(0, ...i.map(({ transition: d }) => d.listIndex)), a = Math.max(0, ...i.map(({ timeline: d }) => d.listIndex)), c = Xn(i, o, r, a), u = Math.max(0, ...i.map(({ animation: d }) => d.slotCursor)), l = Math.max(
|
|
1790
|
+
0,
|
|
1791
|
+
...i.map(({ transition: d }) => d.slotCursor)
|
|
1792
|
+
), f = Un(
|
|
1793
|
+
o,
|
|
1794
|
+
r,
|
|
1795
|
+
u,
|
|
1796
|
+
l,
|
|
1797
|
+
a
|
|
1798
|
+
);
|
|
1799
|
+
return { keyframes: n.keyframesMap, atProperty: f, cssRules: s, listsRule: c };
|
|
1800
|
+
}
|
|
1801
|
+
function ki(e, t) {
|
|
1802
|
+
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o } = us(e, t);
|
|
1803
|
+
return [
|
|
1804
|
+
...i,
|
|
1805
|
+
...[...s.entries()].map(([a, c]) => Yn(a, c)),
|
|
1806
|
+
...n.map(Bn),
|
|
1807
|
+
o
|
|
1808
|
+
].filter((a) => a).join(`
|
|
1809
|
+
`);
|
|
1810
|
+
}
|
|
1811
|
+
const fs = {
|
|
1812
|
+
root: null,
|
|
1813
|
+
rootMargin: "0px 0px -10% 0px",
|
|
1814
|
+
threshold: [0]
|
|
1815
|
+
}, ds = {
|
|
1816
|
+
root: null,
|
|
1817
|
+
rootMargin: "0px",
|
|
1818
|
+
threshold: [0]
|
|
1819
|
+
}, hs = 0.2;
|
|
1820
|
+
function ms(e) {
|
|
1821
|
+
const t = e.trim().split(/\s+/), n = t[0], s = t.length > 1 ? t[1] : t[0], i = (o) => o.startsWith("-") ? o.slice(1) : parseFloat(o) ? `-${o}` : o;
|
|
1822
|
+
return `${i(n)} 0px ${i(s)}`;
|
|
1823
|
+
}
|
|
1824
|
+
const U = {}, x = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakSet(), K = /* @__PURE__ */ new WeakMap();
|
|
1825
|
+
let Tt = {}, Y = null;
|
|
1826
|
+
function ps(e) {
|
|
1827
|
+
Tt = e;
|
|
1828
|
+
}
|
|
1829
|
+
function Ct(e, t, n) {
|
|
1830
|
+
x.get(e)?.forEach(({ source: i, handler: o }) => {
|
|
1831
|
+
i === e && o(t, n);
|
|
1832
|
+
});
|
|
1833
|
+
}
|
|
1834
|
+
function Ge() {
|
|
1835
|
+
return Y || (Y = new IntersectionObserver((e) => {
|
|
1836
|
+
e.forEach((t) => {
|
|
1837
|
+
const n = t.target;
|
|
1838
|
+
t.isIntersecting || Ct(n, !1, !0);
|
|
1839
|
+
});
|
|
1840
|
+
}, ds), Y);
|
|
1841
|
+
}
|
|
1842
|
+
function Ot(e, t = !1) {
|
|
1182
1843
|
const n = JSON.stringify({ ...e, isSafeMode: t });
|
|
1183
|
-
if (
|
|
1184
|
-
return
|
|
1185
|
-
const s = e.threshold ??
|
|
1844
|
+
if (U[n])
|
|
1845
|
+
return U[n];
|
|
1846
|
+
const s = e.threshold ?? hs, i = t ? fs : {
|
|
1186
1847
|
root: null,
|
|
1187
|
-
rootMargin: e.inset ?
|
|
1848
|
+
rootMargin: e.inset ? ms(e.inset) : "0px",
|
|
1188
1849
|
threshold: s
|
|
1189
1850
|
}, o = new IntersectionObserver((r) => {
|
|
1190
1851
|
r.forEach((a) => {
|
|
1191
|
-
const c = a.target,
|
|
1192
|
-
if (
|
|
1193
|
-
|
|
1194
|
-
const
|
|
1195
|
-
if (!
|
|
1852
|
+
const c = a.target, u = !he.has(c);
|
|
1853
|
+
if (u && (he.add(c), e.useSafeViewEnter && !a.isIntersecting)) {
|
|
1854
|
+
_.measure(() => {
|
|
1855
|
+
const l = a.boundingClientRect.height, f = a.rootBounds?.height;
|
|
1856
|
+
if (!f)
|
|
1196
1857
|
return;
|
|
1197
1858
|
const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
|
|
1198
|
-
d &&
|
|
1859
|
+
d && l * d > f && _.mutate(() => {
|
|
1199
1860
|
o.unobserve(c);
|
|
1200
|
-
const h =
|
|
1201
|
-
|
|
1861
|
+
const h = Ot(e, !0);
|
|
1862
|
+
K.set(c, h), h.observe(c);
|
|
1202
1863
|
});
|
|
1203
1864
|
});
|
|
1204
1865
|
return;
|
|
1205
1866
|
}
|
|
1206
|
-
(a.isIntersecting || !
|
|
1867
|
+
(a.isIntersecting || !u) && Ct(c, a.isIntersecting);
|
|
1207
1868
|
});
|
|
1208
1869
|
}, i);
|
|
1209
|
-
return
|
|
1870
|
+
return U[n] = o, o;
|
|
1210
1871
|
}
|
|
1211
|
-
function
|
|
1212
|
-
const a = { ...
|
|
1872
|
+
function gs(e, t, n, s = {}, { reducedMotion: i, selectorCondition: o, animation: r } = {}) {
|
|
1873
|
+
const a = { ...Tt, ...s }, c = n.triggerType || "once", u = r || J(
|
|
1213
1874
|
t,
|
|
1214
|
-
|
|
1875
|
+
L(n),
|
|
1215
1876
|
void 0,
|
|
1216
1877
|
i
|
|
1217
1878
|
);
|
|
1218
|
-
if (!
|
|
1879
|
+
if (!u)
|
|
1219
1880
|
return;
|
|
1220
|
-
const
|
|
1221
|
-
c !== "once" &&
|
|
1222
|
-
let
|
|
1223
|
-
|
|
1881
|
+
const l = Ot(a);
|
|
1882
|
+
c !== "once" && u.persist?.();
|
|
1883
|
+
let f = !0, d = !1, p;
|
|
1884
|
+
p = { source: e, target: t, handler: (g, y) => {
|
|
1224
1885
|
if (!(o && !t.matches(o)))
|
|
1225
1886
|
if (c === "once") {
|
|
1226
1887
|
if (g && !d) {
|
|
1227
1888
|
d = !0;
|
|
1228
|
-
const
|
|
1229
|
-
(!
|
|
1230
|
-
|
|
1231
|
-
}),
|
|
1889
|
+
const v = x.get(e);
|
|
1890
|
+
(!v || v.size === 0 || v.size === 1 && v.has(p)) && ((K.get(e) || l).unobserve(e), he.delete(e)), u.onFinish(() => {
|
|
1891
|
+
x.get(e)?.delete(p), x.get(t)?.delete(p);
|
|
1892
|
+
}), u.play(() => {
|
|
1232
1893
|
const E = () => {
|
|
1233
1894
|
t.dataset.interactEnter = "start";
|
|
1234
1895
|
};
|
|
1235
|
-
if (
|
|
1236
|
-
|
|
1896
|
+
if (u.isCSS) {
|
|
1897
|
+
_.mutate(() => {
|
|
1237
1898
|
requestAnimationFrame(E);
|
|
1238
1899
|
});
|
|
1239
1900
|
const $ = () => {
|
|
1240
|
-
|
|
1901
|
+
_.mutate(() => {
|
|
1241
1902
|
t.dataset.interactEnter = "done";
|
|
1242
1903
|
});
|
|
1243
1904
|
};
|
|
1244
|
-
|
|
1905
|
+
u.onFinish($), u.onAbort($);
|
|
1245
1906
|
} else
|
|
1246
|
-
|
|
1907
|
+
_.mutate(E);
|
|
1247
1908
|
});
|
|
1248
1909
|
}
|
|
1249
|
-
} else c === "alternate" ?
|
|
1910
|
+
} else c === "alternate" ? f && g ? (f = !1, u.play()) : f || u.reverse() : c === "repeat" ? g ? (u.progress(0), u.play()) : y && (u.pause(), u.progress(0)) : c === "state" && (g ? u.play() : y && u.pause());
|
|
1250
1911
|
}, cleanup: () => {
|
|
1251
|
-
(
|
|
1252
|
-
} },
|
|
1912
|
+
(K.get(e) || l).unobserve(e), (c === "repeat" || c === "state") && Ge().unobserve(e), u.cancel(), he.delete(e), K.delete(e);
|
|
1913
|
+
} }, k(x, e, p), k(x, t, p), K.set(e, l), l.observe(e), (c === "repeat" || c === "state") && Ge().observe(e);
|
|
1253
1914
|
}
|
|
1254
|
-
function
|
|
1255
|
-
|
|
1915
|
+
function vs(e) {
|
|
1916
|
+
te(x, e);
|
|
1256
1917
|
}
|
|
1257
|
-
function
|
|
1258
|
-
|
|
1918
|
+
function ys() {
|
|
1919
|
+
Y = null, Object.keys(U).forEach((e) => delete U[e]);
|
|
1259
1920
|
}
|
|
1260
|
-
const
|
|
1261
|
-
add:
|
|
1262
|
-
remove:
|
|
1263
|
-
setOptions:
|
|
1264
|
-
reset:
|
|
1921
|
+
const Es = {
|
|
1922
|
+
add: gs,
|
|
1923
|
+
remove: vs,
|
|
1924
|
+
setOptions: ps,
|
|
1925
|
+
reset: ys
|
|
1265
1926
|
};
|
|
1266
|
-
function
|
|
1927
|
+
function _t(e, t) {
|
|
1267
1928
|
return Object.assign(Object.create(t), e);
|
|
1268
1929
|
}
|
|
1269
|
-
function
|
|
1930
|
+
function ws(e, t, n, s) {
|
|
1270
1931
|
let i = e * (1 - n) + t * n;
|
|
1271
1932
|
if (s) {
|
|
1272
1933
|
const o = i - e;
|
|
@@ -1277,7 +1938,7 @@ function Dn(e, t, n, s) {
|
|
|
1277
1938
|
}
|
|
1278
1939
|
return i;
|
|
1279
1940
|
}
|
|
1280
|
-
function
|
|
1941
|
+
function $s(e) {
|
|
1281
1942
|
let t = !1;
|
|
1282
1943
|
return function() {
|
|
1283
1944
|
t || (t = !0, window.requestAnimationFrame(() => {
|
|
@@ -1285,7 +1946,7 @@ function Hn(e) {
|
|
|
1285
1946
|
}));
|
|
1286
1947
|
};
|
|
1287
1948
|
}
|
|
1288
|
-
function
|
|
1949
|
+
function We(e, t) {
|
|
1289
1950
|
let n = 0;
|
|
1290
1951
|
return function() {
|
|
1291
1952
|
n && window.clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -1293,103 +1954,103 @@ function De(e, t) {
|
|
|
1293
1954
|
}, t);
|
|
1294
1955
|
};
|
|
1295
1956
|
}
|
|
1296
|
-
function
|
|
1957
|
+
function bs(e, t) {
|
|
1297
1958
|
const n = e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);
|
|
1298
|
-
return
|
|
1959
|
+
return me(n[1], t) + me(n[6], t);
|
|
1299
1960
|
}
|
|
1300
|
-
function
|
|
1301
|
-
return e ? /^-?\d+px$/.test(e) ? parseInt(e) : /^-?\d+[lsd]?vh$/.test(e) ? parseInt(e) * t.viewportHeight / 100 : /^-?\d+[lsd]?vw$/.test(e) ? parseInt(e) * t.viewportWidth / 100 : /^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(e) ?
|
|
1961
|
+
function me(e, t) {
|
|
1962
|
+
return e ? /^-?\d+px$/.test(e) ? parseInt(e) : /^-?\d+[lsd]?vh$/.test(e) ? parseInt(e) * t.viewportHeight / 100 : /^-?\d+[lsd]?vw$/.test(e) ? parseInt(e) * t.viewportWidth / 100 : /^calc\s*\(\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\+\s*-?\d+((px)|([lsd]?vh)|([lsd]?vw))\s*\)\s*$/.test(e) ? bs(e, t) : parseInt(e) || 0 : 0;
|
|
1302
1963
|
}
|
|
1303
|
-
function
|
|
1964
|
+
function N(e, t, n) {
|
|
1304
1965
|
const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, a = r - o, c = i / 100;
|
|
1305
|
-
let
|
|
1306
|
-
return s === "entry" ? (
|
|
1966
|
+
let u, l;
|
|
1967
|
+
return s === "entry" ? (u = o - t, l = Math.min(t, a)) : s === "entry-crossing" ? (u = o - t, l = a) : s === "contain" ? (u = Math.min(r - t, o), l = Math.abs(t - a)) : s === "exit" ? (u = Math.max(o, r - t), l = Math.min(t, a)) : s === "exit-crossing" ? (u = o, l = a) : s === "cover" && (u = o - t, l = a + t), u + c * l | 0;
|
|
1307
1968
|
}
|
|
1308
|
-
function
|
|
1969
|
+
function we(e, t, n, s, i) {
|
|
1309
1970
|
let o = 0;
|
|
1310
1971
|
const r = { start: t, end: n };
|
|
1311
1972
|
return e.forEach((a, c) => {
|
|
1312
1973
|
o += a.offset;
|
|
1313
|
-
const
|
|
1314
|
-
if (
|
|
1315
|
-
if ("end" in
|
|
1316
|
-
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) +
|
|
1974
|
+
const u = a.sticky;
|
|
1975
|
+
if (u) {
|
|
1976
|
+
if ("end" in u && e[c - 1]?.element) {
|
|
1977
|
+
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + u.end - s, p = o + d - a.offset, h = p < r.start, m = !h && p <= n;
|
|
1317
1978
|
let g = 0;
|
|
1318
|
-
(h ||
|
|
1979
|
+
(h || m) && (g = a.offset, r.end += g), h && (r.start += g);
|
|
1319
1980
|
}
|
|
1320
|
-
if ("start" in
|
|
1321
|
-
const
|
|
1322
|
-
let
|
|
1981
|
+
if ("start" in u) {
|
|
1982
|
+
const l = o - u.start, f = l < r.start, d = !f && l <= r.end;
|
|
1983
|
+
let p = 0;
|
|
1323
1984
|
const h = e[c - 1]?.element;
|
|
1324
1985
|
if (h) {
|
|
1325
|
-
if (
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1986
|
+
if (f || d) {
|
|
1987
|
+
const m = (i ? h.offsetWidth : h.offsetHeight) || 0, g = a.offset, y = (i ? a.element.offsetWidth : a.element.offsetHeight) || 0;
|
|
1988
|
+
p = m - (g + y), o += p, r.end += p;
|
|
1328
1989
|
}
|
|
1329
|
-
|
|
1990
|
+
f && (r.start += p);
|
|
1330
1991
|
}
|
|
1331
1992
|
}
|
|
1332
1993
|
}
|
|
1333
1994
|
}), r;
|
|
1334
1995
|
}
|
|
1335
|
-
function
|
|
1996
|
+
function Ss(e, t, n, s, i, o) {
|
|
1336
1997
|
const { start: r, end: a, duration: c } = e;
|
|
1337
|
-
let
|
|
1998
|
+
let u = r, l = a, f = e.startRange, d = e.endRange, p;
|
|
1338
1999
|
if (typeof c == "string") {
|
|
1339
|
-
|
|
1340
|
-
const h =
|
|
1341
|
-
|
|
2000
|
+
f = { name: c, offset: 0 }, d = { name: c, offset: 100 }, u = N(f, n, t), l = N(d, n, t), p = l - u;
|
|
2001
|
+
const h = we(o, u, l, n, s);
|
|
2002
|
+
u = h.start, l = h.end;
|
|
1342
2003
|
} else {
|
|
1343
|
-
if (
|
|
1344
|
-
|
|
1345
|
-
const h =
|
|
1346
|
-
|
|
2004
|
+
if (f || r?.name) {
|
|
2005
|
+
f = f || r;
|
|
2006
|
+
const h = me(f.add, i), m = N({ ...f, offset: 0 }, n, t), g = N({ ...f, offset: 100 }, n, t), y = we(o, m, g, n, s);
|
|
2007
|
+
u = y.start + f.offset / 100 * (y.end - y.start) + h;
|
|
1347
2008
|
}
|
|
1348
2009
|
if (d || a?.name) {
|
|
1349
2010
|
d = d || a;
|
|
1350
|
-
const h =
|
|
1351
|
-
|
|
1352
|
-
} else typeof c == "number" && (
|
|
2011
|
+
const h = me(d.add, i), m = N({ ...d, offset: 0 }, n, t), g = N({ ...d, offset: 100 }, n, t), y = we(o, m, g, n, s);
|
|
2012
|
+
l = y.start + d.offset / 100 * (y.end - y.start) + h;
|
|
2013
|
+
} else typeof c == "number" && (l = u + c);
|
|
1353
2014
|
}
|
|
1354
|
-
return !
|
|
2015
|
+
return !p && !c && (p = l - u), { ...e, start: u, end: l, startRange: f, endRange: d, duration: p || c };
|
|
1355
2016
|
}
|
|
1356
|
-
function
|
|
2017
|
+
function Is(e) {
|
|
1357
2018
|
return e.position === "sticky";
|
|
1358
2019
|
}
|
|
1359
|
-
function
|
|
2020
|
+
function Ts(e, t, n) {
|
|
1360
2021
|
return e.position === "fixed" && (!t || t === window.document.body || t === n);
|
|
1361
2022
|
}
|
|
1362
|
-
function
|
|
2023
|
+
function Cs(e, t) {
|
|
1363
2024
|
return parseInt(t ? e.left : e.top);
|
|
1364
2025
|
}
|
|
1365
|
-
function
|
|
2026
|
+
function Os(e, t) {
|
|
1366
2027
|
return parseInt(t ? e.right : e.bottom);
|
|
1367
2028
|
}
|
|
1368
|
-
function
|
|
2029
|
+
function _s(e, t, n) {
|
|
1369
2030
|
n && (e.style.position = "static");
|
|
1370
2031
|
const s = (t ? e.offsetLeft : e.offsetTop) || 0;
|
|
1371
2032
|
return n && (e.style.position = null), s;
|
|
1372
2033
|
}
|
|
1373
|
-
function
|
|
2034
|
+
function As(e, t) {
|
|
1374
2035
|
let n;
|
|
1375
|
-
const s =
|
|
2036
|
+
const s = Cs(e, t), i = Os(e, t), o = !isNaN(s), r = !isNaN(i);
|
|
1376
2037
|
return (o || r) && (n = {}, o && (n.start = s), r && (n.end = i)), n;
|
|
1377
2038
|
}
|
|
1378
|
-
function
|
|
2039
|
+
function se(e, t, n, s, i) {
|
|
1379
2040
|
const o = e[0].viewSource, r = [];
|
|
1380
|
-
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, c = 0,
|
|
1381
|
-
for (;
|
|
1382
|
-
const
|
|
1383
|
-
if ((!
|
|
2041
|
+
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, c = 0, u = o;
|
|
2042
|
+
for (; u; ) {
|
|
2043
|
+
const f = window.getComputedStyle(u), d = Is(f), p = d ? As(f, s) : void 0, h = _s(u, s, d);
|
|
2044
|
+
if ((!p || !("end" in p)) && (c += h), r.push({ element: u, offset: h, sticky: p }), u = u.offsetParent, Ts(f, u, t))
|
|
1384
2045
|
break;
|
|
1385
|
-
if (
|
|
1386
|
-
r.push({ element:
|
|
2046
|
+
if (u === t) {
|
|
2047
|
+
r.push({ element: u, offset: 0 });
|
|
1387
2048
|
break;
|
|
1388
2049
|
}
|
|
1389
2050
|
}
|
|
1390
|
-
return r.reverse(), e.map((
|
|
1391
|
-
...
|
|
1392
|
-
|
|
2051
|
+
return r.reverse(), e.map((f) => ({
|
|
2052
|
+
...Ss(
|
|
2053
|
+
f,
|
|
1393
2054
|
{ start: c, end: c + a },
|
|
1394
2055
|
n,
|
|
1395
2056
|
s,
|
|
@@ -1398,7 +2059,7 @@ function te(e, t, n, s, i) {
|
|
|
1398
2059
|
)
|
|
1399
2060
|
}));
|
|
1400
2061
|
}
|
|
1401
|
-
const
|
|
2062
|
+
const Ve = 100, ks = {
|
|
1402
2063
|
horizontal: !1,
|
|
1403
2064
|
observeViewportEntry: !0,
|
|
1404
2065
|
viewportRootMargin: "7% 7%",
|
|
@@ -1406,116 +2067,116 @@ const He = 100, Xn = {
|
|
|
1406
2067
|
observeSourcesResize: !1,
|
|
1407
2068
|
observeContentResize: !1
|
|
1408
2069
|
};
|
|
1409
|
-
function
|
|
2070
|
+
function qs(e, t, n, s) {
|
|
1410
2071
|
let i = 0;
|
|
1411
2072
|
return e >= t && e <= n ? i = s ? (e - t) / s : 1 : e > n && (i = 1), i;
|
|
1412
2073
|
}
|
|
1413
|
-
function
|
|
2074
|
+
function Ke(e, t) {
|
|
1414
2075
|
return e === window ? t ? window.document.documentElement.clientWidth : window.document.documentElement.clientHeight : t ? e.clientWidth : e.clientHeight;
|
|
1415
2076
|
}
|
|
1416
|
-
function
|
|
2077
|
+
function Ms() {
|
|
1417
2078
|
return {
|
|
1418
2079
|
viewportWidth: window.document.documentElement.clientWidth,
|
|
1419
2080
|
viewportHeight: window.document.documentElement.clientHeight
|
|
1420
2081
|
};
|
|
1421
2082
|
}
|
|
1422
|
-
function
|
|
1423
|
-
const t =
|
|
1424
|
-
let o =
|
|
1425
|
-
const
|
|
2083
|
+
function Ps(e) {
|
|
2084
|
+
const t = _t(e, ks), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
|
|
2085
|
+
let o = Ke(n, s), r, a, c, u, l;
|
|
2086
|
+
const f = [], d = Ms();
|
|
1426
2087
|
if (t.scenes = Object.values(
|
|
1427
2088
|
// TODO(ameerf): find a polyfill and use groupBy instead of following reduce
|
|
1428
2089
|
e.scenes.reduce(
|
|
1429
|
-
(
|
|
1430
|
-
const
|
|
1431
|
-
return
|
|
2090
|
+
(m, g, y) => {
|
|
2091
|
+
const v = g.groupId ? `group-${g.groupId}` : String(y);
|
|
2092
|
+
return m[v] ? m[v].push(g) : m[v] = [g], m;
|
|
1432
2093
|
},
|
|
1433
2094
|
{}
|
|
1434
2095
|
)
|
|
1435
|
-
).flatMap((
|
|
2096
|
+
).flatMap((m) => (m.every((g) => g.viewSource && (typeof g.duration == "string" || g.start?.name)) ? (m = se(m, n, o, s, d), (t.observeSourcesResize || t.observeContentResize) && f.push(m)) : m.forEach((g) => {
|
|
1436
2097
|
g.end == null && (g.end = g.start + g.duration), g.duration == null && (g.duration = g.end - g.start);
|
|
1437
|
-
}),
|
|
1438
|
-
|
|
1439
|
-
}),
|
|
1440
|
-
const
|
|
2098
|
+
}), m)), t.scenes.forEach((m, g) => {
|
|
2099
|
+
m.index = g;
|
|
2100
|
+
}), f.length) {
|
|
2101
|
+
const m = /* @__PURE__ */ new Map();
|
|
1441
2102
|
window.ResizeObserver && (c = new window.ResizeObserver(function(g) {
|
|
1442
|
-
g.forEach((
|
|
1443
|
-
const
|
|
2103
|
+
g.forEach((y) => {
|
|
2104
|
+
const v = m.get(y.target), E = se(v, n, o, s, d);
|
|
1444
2105
|
E.forEach(($, b) => {
|
|
1445
2106
|
t.scenes[$.index] = E[b];
|
|
1446
|
-
}),
|
|
2107
|
+
}), f.splice(f.indexOf(v), 1, E);
|
|
1447
2108
|
});
|
|
1448
|
-
}),
|
|
1449
|
-
c.observe(g[0].viewSource, { box: "border-box" }),
|
|
1450
|
-
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(
|
|
1451
|
-
const
|
|
1452
|
-
const E =
|
|
2109
|
+
}), f.forEach((g) => {
|
|
2110
|
+
c.observe(g[0].viewSource, { box: "border-box" }), m.set(g[0].viewSource, g);
|
|
2111
|
+
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(We(() => {
|
|
2112
|
+
const y = f.map((v) => {
|
|
2113
|
+
const E = se(v, n, o, s, d);
|
|
1453
2114
|
return E.forEach(($, b) => {
|
|
1454
2115
|
t.scenes[$.index] = E[b];
|
|
1455
2116
|
}), E;
|
|
1456
2117
|
});
|
|
1457
|
-
|
|
1458
|
-
|
|
2118
|
+
f.length = 0, f.push(...y), f.forEach((v) => {
|
|
2119
|
+
m.set(v[0].viewSource, v);
|
|
1459
2120
|
});
|
|
1460
|
-
},
|
|
1461
|
-
o =
|
|
1462
|
-
const g =
|
|
1463
|
-
const
|
|
1464
|
-
return
|
|
1465
|
-
t.scenes[E.index] =
|
|
1466
|
-
}),
|
|
2121
|
+
}, Ve)).observe(t.contentRoot, { box: "border-box" })), t.observeViewportResize && (u = We(function() {
|
|
2122
|
+
o = Ke(n, s);
|
|
2123
|
+
const g = f.map((y) => {
|
|
2124
|
+
const v = se(y, n, o, s, d);
|
|
2125
|
+
return v.forEach((E, $) => {
|
|
2126
|
+
t.scenes[E.index] = v[$];
|
|
2127
|
+
}), v;
|
|
1467
2128
|
});
|
|
1468
|
-
|
|
1469
|
-
|
|
2129
|
+
f.length = 0, f.push(...g), f.forEach((y) => {
|
|
2130
|
+
m.set(y[0].viewSource, y);
|
|
1470
2131
|
});
|
|
1471
|
-
},
|
|
2132
|
+
}, Ve), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (l = new window.ResizeObserver(u), l.observe(n, { box: "border-box" })));
|
|
1472
2133
|
}
|
|
1473
|
-
t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(
|
|
1474
|
-
|
|
1475
|
-
(i.get(g.target) || []).forEach((
|
|
1476
|
-
|
|
2134
|
+
t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(m) {
|
|
2135
|
+
m.forEach((g) => {
|
|
2136
|
+
(i.get(g.target) || []).forEach((y) => {
|
|
2137
|
+
y.disabled = !g.isIntersecting;
|
|
1477
2138
|
});
|
|
1478
2139
|
});
|
|
1479
2140
|
}, {
|
|
1480
2141
|
root: n === window ? window.document : n,
|
|
1481
2142
|
rootMargin: t.viewportRootMargin,
|
|
1482
2143
|
threshold: 0
|
|
1483
|
-
}), t.scenes.forEach((
|
|
1484
|
-
if (
|
|
1485
|
-
let g = i.get(
|
|
1486
|
-
g || (g = [], i.set(
|
|
2144
|
+
}), t.scenes.forEach((m) => {
|
|
2145
|
+
if (m.viewSource) {
|
|
2146
|
+
let g = i.get(m.viewSource);
|
|
2147
|
+
g || (g = [], i.set(m.viewSource, g), a.observe(m.viewSource)), g.push(m);
|
|
1487
2148
|
}
|
|
1488
2149
|
}));
|
|
1489
|
-
function
|
|
1490
|
-
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1493
|
-
for (let
|
|
1494
|
-
if (!
|
|
1495
|
-
const { start: E, end: $, duration: b } =
|
|
1496
|
-
|
|
2150
|
+
function p({ p: m, vp: g }) {
|
|
2151
|
+
m = +m.toFixed(1);
|
|
2152
|
+
const y = +g.toFixed(4);
|
|
2153
|
+
if (m !== r) {
|
|
2154
|
+
for (let v of t.scenes)
|
|
2155
|
+
if (!v.disabled) {
|
|
2156
|
+
const { start: E, end: $, duration: b } = v, S = qs(m, E, $, b);
|
|
2157
|
+
v.effect(v, S, y);
|
|
1497
2158
|
}
|
|
1498
|
-
r =
|
|
2159
|
+
r = m;
|
|
1499
2160
|
}
|
|
1500
2161
|
}
|
|
1501
2162
|
function h() {
|
|
1502
|
-
t.scenes.forEach((
|
|
2163
|
+
t.scenes.forEach((m) => m.destroy?.()), a && (a.disconnect(), a = null), c && (c.disconnect(), c = null), u && (l ? (l.disconnect(), l = null) : window.removeEventListener("resize", u));
|
|
1503
2164
|
}
|
|
1504
2165
|
return {
|
|
1505
|
-
tick:
|
|
2166
|
+
tick: p,
|
|
1506
2167
|
destroy: h
|
|
1507
2168
|
};
|
|
1508
2169
|
}
|
|
1509
|
-
const
|
|
2170
|
+
const Ls = {
|
|
1510
2171
|
transitionActive: !1,
|
|
1511
2172
|
transitionFriction: 0.9,
|
|
1512
2173
|
transitionEpsilon: 1,
|
|
1513
2174
|
velocityActive: !1,
|
|
1514
2175
|
velocityMax: 1
|
|
1515
2176
|
};
|
|
1516
|
-
class
|
|
2177
|
+
class xs {
|
|
1517
2178
|
constructor(t = {}) {
|
|
1518
|
-
this.config =
|
|
2179
|
+
this.config = _t(t, Ls), this.progress = {
|
|
1519
2180
|
p: 0,
|
|
1520
2181
|
prevP: 0,
|
|
1521
2182
|
vp: 0
|
|
@@ -1528,7 +2189,7 @@ class ns {
|
|
|
1528
2189
|
this.config.root = n ? window : this.config.root, this.config.contentRoot = this.config.contentRoot || (n ? window.document.body : this.config.root.firstElementChild), this.config.resetProgress = this.config.resetProgress || this.resetProgress.bind(this), this._measure = this.config.measure || (() => {
|
|
1529
2190
|
const s = this.config.root;
|
|
1530
2191
|
this.progress.p = this.config.horizontal ? s.scrollX || s.scrollLeft || 0 : s.scrollY || s.scrollTop || 0;
|
|
1531
|
-
}), this._trigger =
|
|
2192
|
+
}), this._trigger = $s(() => {
|
|
1532
2193
|
this._measure?.(), this.tick(!0);
|
|
1533
2194
|
});
|
|
1534
2195
|
}
|
|
@@ -1574,7 +2235,7 @@ class ns {
|
|
|
1574
2235
|
* Calculate current progress.
|
|
1575
2236
|
*/
|
|
1576
2237
|
lerp() {
|
|
1577
|
-
this.currentProgress.p =
|
|
2238
|
+
this.currentProgress.p = ws(this.currentProgress.p, this.progress.p, +(1 - this.config.transitionFriction).toFixed(3), this.config.transitionEpsilon);
|
|
1578
2239
|
}
|
|
1579
2240
|
/**
|
|
1580
2241
|
* Stop the event and effect, and remove all DOM side-effects.
|
|
@@ -1598,7 +2259,7 @@ class ns {
|
|
|
1598
2259
|
* Reset registered effect.
|
|
1599
2260
|
*/
|
|
1600
2261
|
setupEffect() {
|
|
1601
|
-
this.removeEffect(), this.effect =
|
|
2262
|
+
this.removeEffect(), this.effect = Ps(this.config);
|
|
1602
2263
|
}
|
|
1603
2264
|
/**
|
|
1604
2265
|
* Remove registered effect.
|
|
@@ -1607,67 +2268,67 @@ class ns {
|
|
|
1607
2268
|
this.effect && this.effect.destroy(), this.effect = null;
|
|
1608
2269
|
}
|
|
1609
2270
|
}
|
|
1610
|
-
const
|
|
1611
|
-
let
|
|
1612
|
-
function
|
|
1613
|
-
|
|
2271
|
+
const Oe = /* @__PURE__ */ new WeakMap();
|
|
2272
|
+
let At = () => ({});
|
|
2273
|
+
function Fs(e) {
|
|
2274
|
+
At = e;
|
|
1614
2275
|
}
|
|
1615
|
-
function
|
|
2276
|
+
function Rs(e, t, n, s, { reducedMotion: i }) {
|
|
1616
2277
|
if (i)
|
|
1617
2278
|
return;
|
|
1618
2279
|
const o = {
|
|
1619
2280
|
trigger: "view-progress",
|
|
1620
2281
|
element: e
|
|
1621
|
-
}, r =
|
|
2282
|
+
}, r = L(n);
|
|
1622
2283
|
let a;
|
|
1623
2284
|
if ("ViewTimeline" in window) {
|
|
1624
|
-
const
|
|
2285
|
+
const u = J(
|
|
1625
2286
|
t,
|
|
1626
2287
|
r,
|
|
1627
2288
|
o
|
|
1628
2289
|
);
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
2290
|
+
u && !u.isCSS && (u.play(), a = () => {
|
|
2291
|
+
u.ready.then(() => {
|
|
2292
|
+
u.cancel();
|
|
1632
2293
|
});
|
|
1633
2294
|
});
|
|
1634
2295
|
} else {
|
|
1635
|
-
const
|
|
1636
|
-
if (
|
|
1637
|
-
const
|
|
2296
|
+
const u = dt(t, r, o);
|
|
2297
|
+
if (u) {
|
|
2298
|
+
const l = Array.isArray(u) ? u : [u], f = new xs({
|
|
1638
2299
|
viewSource: e,
|
|
1639
|
-
scenes:
|
|
2300
|
+
scenes: l,
|
|
1640
2301
|
observeViewportEntry: !1,
|
|
1641
2302
|
observeViewportResize: !1,
|
|
1642
2303
|
observeSourcesResize: !0,
|
|
1643
2304
|
root: document.body,
|
|
1644
|
-
...
|
|
2305
|
+
...At()
|
|
1645
2306
|
});
|
|
1646
2307
|
a = () => {
|
|
1647
|
-
|
|
1648
|
-
}, Promise.all(
|
|
2308
|
+
f.destroy();
|
|
2309
|
+
}, Promise.all(l.map((d) => d.ready || Promise.resolve())).then(
|
|
1649
2310
|
() => {
|
|
1650
|
-
|
|
2311
|
+
f.start();
|
|
1651
2312
|
}
|
|
1652
2313
|
);
|
|
1653
2314
|
}
|
|
1654
2315
|
}
|
|
1655
2316
|
if (!a) return;
|
|
1656
2317
|
const c = { source: e, target: t, cleanup: a };
|
|
1657
|
-
|
|
2318
|
+
k(Oe, e, c), k(Oe, t, c);
|
|
1658
2319
|
}
|
|
1659
|
-
function
|
|
1660
|
-
|
|
2320
|
+
function Ns(e) {
|
|
2321
|
+
te(Oe, e);
|
|
1661
2322
|
}
|
|
1662
|
-
const
|
|
1663
|
-
add:
|
|
1664
|
-
remove:
|
|
1665
|
-
registerOptionsGetter:
|
|
2323
|
+
const js = {
|
|
2324
|
+
add: Rs,
|
|
2325
|
+
remove: Ns,
|
|
2326
|
+
registerOptionsGetter: Fs
|
|
1666
2327
|
};
|
|
1667
|
-
function
|
|
2328
|
+
function Ye(e, t, n) {
|
|
1668
2329
|
return Math.min(Math.max(e, n), t);
|
|
1669
2330
|
}
|
|
1670
|
-
function
|
|
2331
|
+
function Be(e) {
|
|
1671
2332
|
let t = !1;
|
|
1672
2333
|
return function() {
|
|
1673
2334
|
if (!t)
|
|
@@ -1676,7 +2337,7 @@ function Ve(e) {
|
|
|
1676
2337
|
});
|
|
1677
2338
|
};
|
|
1678
2339
|
}
|
|
1679
|
-
function
|
|
2340
|
+
function zs(e) {
|
|
1680
2341
|
let t = e, n = 0, s = 0;
|
|
1681
2342
|
if (t.offsetParent)
|
|
1682
2343
|
do
|
|
@@ -1689,7 +2350,7 @@ function as(e) {
|
|
|
1689
2350
|
height: e.offsetHeight
|
|
1690
2351
|
};
|
|
1691
2352
|
}
|
|
1692
|
-
function
|
|
2353
|
+
function Hs() {
|
|
1693
2354
|
const e = window.devicePixelRatio;
|
|
1694
2355
|
let t = !1;
|
|
1695
2356
|
if (e === 1)
|
|
@@ -1702,7 +2363,7 @@ function cs() {
|
|
|
1702
2363
|
});
|
|
1703
2364
|
return document.body.dispatchEvent(n), t;
|
|
1704
2365
|
}
|
|
1705
|
-
function
|
|
2366
|
+
function Ds() {
|
|
1706
2367
|
return new Promise((e) => {
|
|
1707
2368
|
const t = window.scrollY;
|
|
1708
2369
|
let n = !1, s;
|
|
@@ -1721,42 +2382,42 @@ function us() {
|
|
|
1721
2382
|
i(), window.addEventListener("scroll", o), window.scrollY > 0 && window.scrollBy(0, -1);
|
|
1722
2383
|
});
|
|
1723
2384
|
}
|
|
1724
|
-
function
|
|
1725
|
-
|
|
2385
|
+
function Gs(e) {
|
|
2386
|
+
Ds().then((t) => {
|
|
1726
2387
|
e.fixRequired = t, t && (window.addEventListener("scroll", e.scrollHandler), e.scrollHandler());
|
|
1727
2388
|
});
|
|
1728
2389
|
}
|
|
1729
|
-
let
|
|
1730
|
-
const
|
|
1731
|
-
function
|
|
2390
|
+
let ie = 0;
|
|
2391
|
+
const ue = /* @__PURE__ */ new Set();
|
|
2392
|
+
function Ws() {
|
|
1732
2393
|
const e = (n) => {
|
|
1733
2394
|
for (let s of n.changedTouches)
|
|
1734
|
-
|
|
2395
|
+
ue.add(s.identifier);
|
|
1735
2396
|
}, t = (n) => {
|
|
1736
2397
|
for (let s of n.changedTouches)
|
|
1737
|
-
|
|
2398
|
+
ue.delete(s.identifier);
|
|
1738
2399
|
};
|
|
1739
2400
|
return document.addEventListener("touchstart", e, { passive: !0 }), document.addEventListener("touchend", t, { passive: !0 }), function() {
|
|
1740
|
-
|
|
2401
|
+
ue.clear(), document.removeEventListener("touchstart", e), document.removeEventListener("touchend", t);
|
|
1741
2402
|
};
|
|
1742
2403
|
}
|
|
1743
|
-
function
|
|
2404
|
+
function Vs(e, t) {
|
|
1744
2405
|
if ("onscrollend" in window)
|
|
1745
2406
|
return e.addEventListener("scrollend", t), function() {
|
|
1746
2407
|
e.removeEventListener("scrollend", t);
|
|
1747
2408
|
};
|
|
1748
2409
|
let n = 0, s;
|
|
1749
|
-
|
|
2410
|
+
ie || (s = Ws()), ie += 1;
|
|
1750
2411
|
function i(o) {
|
|
1751
2412
|
clearTimeout(n), n = setTimeout(() => {
|
|
1752
|
-
|
|
2413
|
+
ue.size ? setTimeout(i, 100) : (t(o), n = 0);
|
|
1753
2414
|
}, 100);
|
|
1754
2415
|
}
|
|
1755
2416
|
return e.addEventListener("scroll", i), function() {
|
|
1756
|
-
e.removeEventListener("scroll", i),
|
|
2417
|
+
e.removeEventListener("scroll", i), ie -= 1, ie || s();
|
|
1757
2418
|
};
|
|
1758
2419
|
}
|
|
1759
|
-
function
|
|
2420
|
+
function Ks(e, t, n) {
|
|
1760
2421
|
return {
|
|
1761
2422
|
x(s) {
|
|
1762
2423
|
const i = e.left - n.x + e.width / 2, o = i >= t.width / 2, r = (o ? i : t.width - i) * 2, a = o ? 0 : i - r / 2;
|
|
@@ -1768,13 +2429,13 @@ function hs(e, t, n) {
|
|
|
1768
2429
|
}
|
|
1769
2430
|
};
|
|
1770
2431
|
}
|
|
1771
|
-
function
|
|
2432
|
+
function Ys(e, t) {
|
|
1772
2433
|
this.x = window.scrollX, this.y = window.scrollY, requestAnimationFrame(() => e && e(t));
|
|
1773
2434
|
}
|
|
1774
|
-
function
|
|
2435
|
+
function Bs(e) {
|
|
1775
2436
|
e.rect.width = window.document.documentElement.clientWidth, e.rect.height = window.document.documentElement.clientHeight;
|
|
1776
2437
|
}
|
|
1777
|
-
function
|
|
2438
|
+
function Us(e) {
|
|
1778
2439
|
const t = new ResizeObserver((n) => {
|
|
1779
2440
|
n.forEach((s) => {
|
|
1780
2441
|
e.rect.width = s.borderBoxSize[0].inlineSize, e.rect.height = s.borderBoxSize[0].blockSize;
|
|
@@ -1782,38 +2443,38 @@ function gs(e) {
|
|
|
1782
2443
|
});
|
|
1783
2444
|
return t.observe(e.root, { box: "border-box" }), t;
|
|
1784
2445
|
}
|
|
1785
|
-
function
|
|
2446
|
+
function Qs(e) {
|
|
1786
2447
|
let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r, a;
|
|
1787
2448
|
const c = { x: 0, y: 0 };
|
|
1788
|
-
e.scenes.forEach((
|
|
1789
|
-
|
|
1790
|
-
}), s = function(
|
|
1791
|
-
for (let
|
|
1792
|
-
if (!
|
|
1793
|
-
const d =
|
|
1794
|
-
e.allowActiveEvent && (
|
|
2449
|
+
e.scenes.forEach((l) => {
|
|
2450
|
+
l.target && l.centeredToTarget && (l.transform = Ks(zs(l.target), e.rect, c), t = !0), e.root ? i = Us(e) : (o = Bs.bind(null, e), window.addEventListener("resize", o));
|
|
2451
|
+
}), s = function(l) {
|
|
2452
|
+
for (let f of e.scenes)
|
|
2453
|
+
if (!f.disabled) {
|
|
2454
|
+
const d = f.transform?.x(l.x) || l.x / e.rect.width, p = f.transform?.y(l.y) || l.y / e.rect.height, h = +Ye(0, 1, d).toPrecision(4), m = +Ye(0, 1, p).toPrecision(4), g = { x: l.vx, y: l.vy };
|
|
2455
|
+
e.allowActiveEvent && (l.active = d <= 1 && p <= 1 && d >= 0 && p >= 0), f.effect(f, { x: h, y: m }, g, l.active);
|
|
1795
2456
|
}
|
|
1796
|
-
Object.assign(n,
|
|
1797
|
-
}, t && (r =
|
|
1798
|
-
function
|
|
1799
|
-
e.scenes.forEach((
|
|
2457
|
+
Object.assign(n, l);
|
|
2458
|
+
}, t && (r = Ys.bind(c, s, n), a = Vs(document, r));
|
|
2459
|
+
function u() {
|
|
2460
|
+
e.scenes.forEach((l) => l.destroy?.()), a?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
|
|
1800
2461
|
}
|
|
1801
2462
|
return {
|
|
1802
2463
|
tick: s,
|
|
1803
|
-
destroy:
|
|
2464
|
+
destroy: u
|
|
1804
2465
|
};
|
|
1805
2466
|
}
|
|
1806
|
-
const
|
|
1807
|
-
let
|
|
1808
|
-
function
|
|
1809
|
-
|
|
2467
|
+
const Xs = 1e3 / 60 * 3;
|
|
2468
|
+
let oe;
|
|
2469
|
+
function Zs() {
|
|
2470
|
+
z.x = window.scrollX, z.y = window.scrollY;
|
|
1810
2471
|
}
|
|
1811
|
-
const
|
|
1812
|
-
class
|
|
2472
|
+
const z = { x: 0, y: 0, scrollHandler: Zs, fixRequired: void 0 };
|
|
2473
|
+
class Js {
|
|
1813
2474
|
constructor(t = {}) {
|
|
1814
2475
|
this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
|
|
1815
2476
|
let n;
|
|
1816
|
-
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() :
|
|
2477
|
+
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : Be(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : Be(() => {
|
|
1817
2478
|
this.tick();
|
|
1818
2479
|
}), this.config.rect = this.config.root ? {
|
|
1819
2480
|
width: this.config.root.offsetWidth,
|
|
@@ -1836,15 +2497,15 @@ class ws {
|
|
|
1836
2497
|
}, this._pointerEnter = () => {
|
|
1837
2498
|
this.progress.active = !0, this._nextTick = n();
|
|
1838
2499
|
}, this.config.root) {
|
|
1839
|
-
|
|
1840
|
-
const i =
|
|
1841
|
-
typeof
|
|
2500
|
+
oe = typeof oe == "boolean" ? oe : Hs();
|
|
2501
|
+
const i = oe ? window.devicePixelRatio : 1;
|
|
2502
|
+
typeof z.fixRequired > "u" && Gs(z), this._measure = (o) => {
|
|
1842
2503
|
if (o.target !== this.config.root) {
|
|
1843
2504
|
const r = new PointerEvent("pointermove", {
|
|
1844
2505
|
bubbles: !0,
|
|
1845
2506
|
cancelable: !0,
|
|
1846
|
-
clientX: o.x * i +
|
|
1847
|
-
clientY: o.y * i +
|
|
2507
|
+
clientX: o.x * i + z.x,
|
|
2508
|
+
clientY: o.y * i + z.y
|
|
1848
2509
|
});
|
|
1849
2510
|
o.stopPropagation(), this.config.root.dispatchEvent(r);
|
|
1850
2511
|
} else
|
|
@@ -1881,7 +2542,7 @@ class ws {
|
|
|
1881
2542
|
let i = !1;
|
|
1882
2543
|
const o = (r) => {
|
|
1883
2544
|
const a = (r - this._startTime) / t, c = n(Math.min(1, a));
|
|
1884
|
-
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((
|
|
2545
|
+
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [l, f]) => (l === "active" ? u[l] = f : u[l] = this.previousProgress[l] + (f - this.previousProgress[l]) * c, u), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime > Xs), this.effect.tick(this.currentProgress);
|
|
1885
2546
|
};
|
|
1886
2547
|
return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, o(s)) : this._startTime = s, this._nextTransitionTick;
|
|
1887
2548
|
}
|
|
@@ -1910,7 +2571,7 @@ class ws {
|
|
|
1910
2571
|
* Reset registered effect.
|
|
1911
2572
|
*/
|
|
1912
2573
|
setupEffect() {
|
|
1913
|
-
this.removeEffect(), this.effect =
|
|
2574
|
+
this.removeEffect(), this.effect = Qs(this.config);
|
|
1914
2575
|
}
|
|
1915
2576
|
/**
|
|
1916
2577
|
* Remove registered effect.
|
|
@@ -1919,82 +2580,82 @@ class ws {
|
|
|
1919
2580
|
this.effect && this.effect.destroy(), this.effect = null;
|
|
1920
2581
|
}
|
|
1921
2582
|
}
|
|
1922
|
-
const
|
|
1923
|
-
let
|
|
1924
|
-
function
|
|
1925
|
-
|
|
2583
|
+
const _e = /* @__PURE__ */ new WeakMap();
|
|
2584
|
+
let kt = () => ({});
|
|
2585
|
+
function ei(e) {
|
|
2586
|
+
kt = e;
|
|
1926
2587
|
}
|
|
1927
|
-
function
|
|
2588
|
+
function ti(e, t, n, s = {}, { reducedMotion: i }) {
|
|
1928
2589
|
if (i)
|
|
1929
2590
|
return;
|
|
1930
2591
|
const o = {
|
|
1931
2592
|
trigger: "pointer-move",
|
|
1932
2593
|
element: e,
|
|
1933
2594
|
axis: s.axis ?? "y"
|
|
1934
|
-
}, r =
|
|
2595
|
+
}, r = dt(t, L(n), o);
|
|
1935
2596
|
if (r) {
|
|
1936
|
-
const a = Array.isArray(r) ? r : [r], c = new
|
|
2597
|
+
const a = Array.isArray(r) ? r : [r], c = new Js({
|
|
1937
2598
|
root: s.hitArea === "self" ? e : void 0,
|
|
1938
2599
|
scenes: a,
|
|
1939
|
-
...
|
|
1940
|
-
}),
|
|
2600
|
+
...kt()
|
|
2601
|
+
}), l = { source: e, target: t, cleanup: () => {
|
|
1941
2602
|
c.destroy();
|
|
1942
2603
|
} };
|
|
1943
|
-
|
|
1944
|
-
a.map((
|
|
2604
|
+
k(_e, e, l), k(_e, t, l), Promise.all(
|
|
2605
|
+
a.map((f) => f.ready || Promise.resolve())
|
|
1945
2606
|
).then(() => {
|
|
1946
2607
|
c.start();
|
|
1947
2608
|
});
|
|
1948
2609
|
}
|
|
1949
2610
|
}
|
|
1950
|
-
function
|
|
1951
|
-
|
|
1952
|
-
}
|
|
1953
|
-
const
|
|
1954
|
-
add:
|
|
1955
|
-
remove:
|
|
1956
|
-
registerOptionsGetter:
|
|
1957
|
-
},
|
|
1958
|
-
function
|
|
2611
|
+
function ni(e) {
|
|
2612
|
+
te(_e, e);
|
|
2613
|
+
}
|
|
2614
|
+
const si = {
|
|
2615
|
+
add: ti,
|
|
2616
|
+
remove: ni,
|
|
2617
|
+
registerOptionsGetter: ei
|
|
2618
|
+
}, Ae = /* @__PURE__ */ new WeakMap();
|
|
2619
|
+
function ii(e, t, n, s, {
|
|
1959
2620
|
reducedMotion: i,
|
|
1960
2621
|
selectorCondition: o,
|
|
1961
2622
|
animation: r,
|
|
1962
2623
|
sourceAnimationOptions: a
|
|
1963
2624
|
}) {
|
|
1964
|
-
const c = r ||
|
|
2625
|
+
const c = r || J(
|
|
1965
2626
|
t,
|
|
1966
|
-
|
|
2627
|
+
L(n),
|
|
1967
2628
|
void 0,
|
|
1968
2629
|
i
|
|
1969
2630
|
);
|
|
1970
2631
|
if (!c)
|
|
1971
2632
|
return;
|
|
1972
|
-
const { effectId:
|
|
2633
|
+
const { effectId: u } = s, l = (p) => {
|
|
1973
2634
|
if (o && !t.matches(o)) return;
|
|
1974
|
-
const h =
|
|
2635
|
+
const h = p.animationName, m = p.detail?.effectId, g = a ? ft(e, a) : null;
|
|
1975
2636
|
if (g) {
|
|
1976
2637
|
if (g.playState === "running" || h && !g.hasAnimationName(h))
|
|
1977
2638
|
return;
|
|
1978
|
-
if (
|
|
2639
|
+
if (m && m !== u && !g.hasAnimationId(m))
|
|
1979
2640
|
return;
|
|
1980
2641
|
}
|
|
1981
2642
|
c.play();
|
|
1982
2643
|
}, d = { source: e, target: t, cleanup: () => {
|
|
1983
|
-
c.cancel(), e.removeEventListener("animationend",
|
|
2644
|
+
c.cancel(), e.removeEventListener("animationend", l);
|
|
1984
2645
|
} };
|
|
1985
|
-
|
|
2646
|
+
k(Ae, e, d), k(Ae, t, d), e.addEventListener("animationend", l);
|
|
1986
2647
|
}
|
|
1987
|
-
function
|
|
1988
|
-
|
|
2648
|
+
function oi(e) {
|
|
2649
|
+
te(Ae, e);
|
|
1989
2650
|
}
|
|
1990
|
-
const
|
|
1991
|
-
add:
|
|
1992
|
-
remove:
|
|
2651
|
+
const ri = {
|
|
2652
|
+
add: ii,
|
|
2653
|
+
remove: oi
|
|
1993
2654
|
};
|
|
1994
|
-
function
|
|
1995
|
-
const r = o ||
|
|
2655
|
+
function ai(e, t, n = !1, s, i, o) {
|
|
2656
|
+
const r = o || J(
|
|
1996
2657
|
e,
|
|
1997
|
-
|
|
2658
|
+
L(t),
|
|
1998
2659
|
void 0,
|
|
1999
2660
|
n
|
|
2000
2661
|
);
|
|
@@ -2002,150 +2663,150 @@ function _s(e, t, n = !1, s, i, o) {
|
|
|
2002
2663
|
return null;
|
|
2003
2664
|
let a = !0;
|
|
2004
2665
|
const c = t.triggerType || "alternate";
|
|
2005
|
-
return (
|
|
2666
|
+
return (u) => {
|
|
2006
2667
|
if (s && !e.matches(s)) return;
|
|
2007
|
-
const
|
|
2008
|
-
if (
|
|
2668
|
+
const l = !i, f = i?.enter?.includes(u.type), d = i?.leave?.includes(u.type);
|
|
2669
|
+
if (f || l) {
|
|
2009
2670
|
if (c === "alternate" || c === "state")
|
|
2010
2671
|
a ? (a = !1, r.play()) : c === "alternate" ? r.reverse() : c === "state" && (r.playState === "running" ? r.pause() : r.playState !== "finished" && r.play());
|
|
2011
2672
|
else {
|
|
2012
2673
|
if (r.progress(0), delete e.dataset.interactEnter, r.isCSS) {
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2674
|
+
const p = () => {
|
|
2675
|
+
_.mutate(() => {
|
|
2015
2676
|
e.dataset.interactEnter = "done";
|
|
2016
2677
|
});
|
|
2017
2678
|
};
|
|
2018
|
-
r.onFinish(
|
|
2679
|
+
r.onFinish(p), r.onAbort(p);
|
|
2019
2680
|
}
|
|
2020
2681
|
r.play();
|
|
2021
2682
|
}
|
|
2022
2683
|
return;
|
|
2023
2684
|
}
|
|
2024
|
-
d && (c === "alternate" ? r.reverse() : c === "repeat" ? (r.cancel(),
|
|
2685
|
+
d && (c === "alternate" ? r.reverse() : c === "repeat" ? (r.cancel(), _.mutate(() => {
|
|
2025
2686
|
delete e.dataset.interactEnter;
|
|
2026
2687
|
})) : c === "state" && r.playState === "running" && r.pause());
|
|
2027
2688
|
};
|
|
2028
2689
|
}
|
|
2029
|
-
function
|
|
2690
|
+
function ci(e, t, {
|
|
2030
2691
|
effectId: n,
|
|
2031
2692
|
listContainer: s,
|
|
2032
2693
|
listItemSelector: i,
|
|
2033
2694
|
stateAction: o
|
|
2034
2695
|
}, r, a) {
|
|
2035
|
-
const c = !!s,
|
|
2036
|
-
return (
|
|
2696
|
+
const c = !!s, u = o ?? "toggle", l = u === "toggle";
|
|
2697
|
+
return (f) => {
|
|
2037
2698
|
if (r && !e.matches(r)) return;
|
|
2038
2699
|
const d = c ? e.closest(
|
|
2039
2700
|
`${s} > ${i || ""}:has(:scope)`
|
|
2040
|
-
) : void 0,
|
|
2041
|
-
|
|
2701
|
+
) : void 0, p = !a, h = a?.enter?.includes(f.type), m = a?.leave?.includes(f.type);
|
|
2702
|
+
p ? t.toggleEffect(n, u, d) : (h && t.toggleEffect(n, l ? "add" : u, d), m && l && t.toggleEffect(n, "remove", d));
|
|
2042
2703
|
};
|
|
2043
2704
|
}
|
|
2044
|
-
const
|
|
2045
|
-
function
|
|
2705
|
+
const ke = /* @__PURE__ */ new WeakMap();
|
|
2706
|
+
function Ue(e, t) {
|
|
2046
2707
|
return (n) => {
|
|
2047
2708
|
const s = n;
|
|
2048
2709
|
e.contains(s.relatedTarget) || t(s);
|
|
2049
2710
|
};
|
|
2050
2711
|
}
|
|
2051
|
-
function
|
|
2712
|
+
function li(e) {
|
|
2052
2713
|
return (t) => {
|
|
2053
2714
|
const n = t;
|
|
2054
2715
|
n.pointerType && e(n);
|
|
2055
2716
|
};
|
|
2056
2717
|
}
|
|
2057
|
-
function
|
|
2718
|
+
function ui(e) {
|
|
2058
2719
|
return (t) => {
|
|
2059
2720
|
const n = t;
|
|
2060
2721
|
n.code === "Space" ? (n.preventDefault(), e(n)) : n.code === "Enter" && e(n);
|
|
2061
2722
|
};
|
|
2062
2723
|
}
|
|
2063
|
-
const
|
|
2064
|
-
focusin: (e, t) =>
|
|
2065
|
-
focusout: (e, t) =>
|
|
2066
|
-
click: (e, t) =>
|
|
2067
|
-
keydown: (e, t) =>
|
|
2724
|
+
const fi = {
|
|
2725
|
+
focusin: (e, t) => Ue(e, t),
|
|
2726
|
+
focusout: (e, t) => Ue(e, t),
|
|
2727
|
+
click: (e, t) => li(t),
|
|
2728
|
+
keydown: (e, t) => ui(t)
|
|
2068
2729
|
};
|
|
2069
|
-
function
|
|
2070
|
-
const s =
|
|
2730
|
+
function di(e, t, n) {
|
|
2731
|
+
const s = fi[e];
|
|
2071
2732
|
return s ? s(t, n) : (i) => n(i);
|
|
2072
2733
|
}
|
|
2073
|
-
function
|
|
2734
|
+
function hi(e) {
|
|
2074
2735
|
return typeof e == "object" && !Array.isArray(e) && ("enter" in e || "leave" in e);
|
|
2075
2736
|
}
|
|
2076
|
-
function
|
|
2737
|
+
function mi(e) {
|
|
2077
2738
|
if (typeof e == "string")
|
|
2078
2739
|
return { toggle: [e] };
|
|
2079
2740
|
if (Array.isArray(e))
|
|
2080
2741
|
return { toggle: [...e] };
|
|
2081
|
-
if (
|
|
2742
|
+
if (hi(e)) {
|
|
2082
2743
|
const t = e.enter ? [...e.enter] : [], n = e.leave ? [...e.leave] : [];
|
|
2083
2744
|
return { enter: t, leave: n };
|
|
2084
2745
|
}
|
|
2085
2746
|
return {};
|
|
2086
2747
|
}
|
|
2087
|
-
function
|
|
2748
|
+
function pi(e) {
|
|
2088
2749
|
return !!(e.enter?.length || e.leave?.length);
|
|
2089
2750
|
}
|
|
2090
|
-
function
|
|
2091
|
-
return
|
|
2751
|
+
function gi(e) {
|
|
2752
|
+
return pi(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
|
|
2092
2753
|
}
|
|
2093
|
-
function
|
|
2754
|
+
function vi(e, t, n, s, {
|
|
2094
2755
|
reducedMotion: i,
|
|
2095
2756
|
targetController: o,
|
|
2096
2757
|
selectorCondition: r,
|
|
2097
2758
|
animation: a
|
|
2098
2759
|
}) {
|
|
2099
|
-
const c =
|
|
2100
|
-
let
|
|
2101
|
-
if (
|
|
2760
|
+
const c = mi(s.eventConfig), u = n.transition || n.transitionProperties, l = gi(c);
|
|
2761
|
+
let f, d = !1;
|
|
2762
|
+
if (u ? f = ci(
|
|
2102
2763
|
t,
|
|
2103
2764
|
o,
|
|
2104
2765
|
n,
|
|
2105
2766
|
r,
|
|
2106
|
-
|
|
2107
|
-
) : (
|
|
2767
|
+
l
|
|
2768
|
+
) : (f = ai(
|
|
2108
2769
|
t,
|
|
2109
2770
|
n,
|
|
2110
2771
|
i,
|
|
2111
2772
|
r,
|
|
2112
|
-
|
|
2773
|
+
l,
|
|
2113
2774
|
a
|
|
2114
|
-
), d = n.triggerType === "once"), !
|
|
2775
|
+
), d = n.triggerType === "once"), !f)
|
|
2115
2776
|
return;
|
|
2116
|
-
const
|
|
2117
|
-
function
|
|
2118
|
-
const b =
|
|
2119
|
-
|
|
2777
|
+
const p = f, h = new AbortController();
|
|
2778
|
+
function m(v, E, $) {
|
|
2779
|
+
const b = di(E, e, p);
|
|
2780
|
+
v.addEventListener(E, b, { ...$, signal: h.signal });
|
|
2120
2781
|
}
|
|
2121
|
-
const
|
|
2782
|
+
const y = { source: e, target: t, cleanup: () => {
|
|
2122
2783
|
h.abort();
|
|
2123
2784
|
} };
|
|
2124
|
-
if (
|
|
2125
|
-
const
|
|
2126
|
-
|
|
2127
|
-
S === "focusin" && (e.tabIndex = 0),
|
|
2785
|
+
if (k(ke, e, y), k(ke, t, y), l) {
|
|
2786
|
+
const v = c.enter, E = c.leave;
|
|
2787
|
+
v.forEach((S) => {
|
|
2788
|
+
S === "focusin" && (e.tabIndex = 0), m(e, S, { passive: !0, once: d });
|
|
2128
2789
|
});
|
|
2129
2790
|
const $ = !n.stateAction || n.stateAction === "toggle";
|
|
2130
|
-
(
|
|
2791
|
+
(u ? $ : n.triggerType !== "once") && E.forEach((S) => {
|
|
2131
2792
|
if (S === "focusout") {
|
|
2132
|
-
|
|
2793
|
+
m(e, S, { once: d });
|
|
2133
2794
|
return;
|
|
2134
2795
|
}
|
|
2135
|
-
|
|
2796
|
+
m(e, S, { passive: !0 });
|
|
2136
2797
|
});
|
|
2137
2798
|
} else
|
|
2138
2799
|
(c.toggle ?? []).forEach((E) => {
|
|
2139
|
-
|
|
2800
|
+
m(e, E, { once: d, passive: E !== "keydown" });
|
|
2140
2801
|
});
|
|
2141
2802
|
}
|
|
2142
|
-
function
|
|
2143
|
-
|
|
2803
|
+
function yi(e) {
|
|
2804
|
+
te(ke, e);
|
|
2144
2805
|
}
|
|
2145
|
-
const
|
|
2146
|
-
add:
|
|
2147
|
-
remove:
|
|
2148
|
-
},
|
|
2806
|
+
const B = {
|
|
2807
|
+
add: vi,
|
|
2808
|
+
remove: yi
|
|
2809
|
+
}, qe = {
|
|
2149
2810
|
click: ["click"],
|
|
2150
2811
|
activate: ["click", "keydown"],
|
|
2151
2812
|
hover: { enter: ["mouseenter"], leave: ["mouseleave"] },
|
|
@@ -2153,40 +2814,40 @@ const Y = {
|
|
|
2153
2814
|
enter: ["mouseenter", "focusin"],
|
|
2154
2815
|
leave: ["mouseleave", "focusout"]
|
|
2155
2816
|
}
|
|
2156
|
-
},
|
|
2157
|
-
click:
|
|
2158
|
-
hover:
|
|
2817
|
+
}, Qe = {
|
|
2818
|
+
click: qe.activate,
|
|
2819
|
+
hover: qe.interest
|
|
2159
2820
|
};
|
|
2160
|
-
function
|
|
2161
|
-
const t =
|
|
2821
|
+
function re(e) {
|
|
2822
|
+
const t = qe[e];
|
|
2162
2823
|
return (n, s, i, o, r) => {
|
|
2163
|
-
const a = r?.allowA11yTriggers && e in
|
|
2164
|
-
|
|
2824
|
+
const a = r?.allowA11yTriggers && e in Qe ? Qe[e] : t;
|
|
2825
|
+
B.add(n, s, i, { eventConfig: a }, r ?? {});
|
|
2165
2826
|
};
|
|
2166
2827
|
}
|
|
2167
|
-
const
|
|
2168
|
-
viewEnter:
|
|
2828
|
+
const H = {
|
|
2829
|
+
viewEnter: Es,
|
|
2169
2830
|
hover: {
|
|
2170
|
-
add:
|
|
2171
|
-
remove:
|
|
2831
|
+
add: re("hover"),
|
|
2832
|
+
remove: B.remove
|
|
2172
2833
|
},
|
|
2173
2834
|
click: {
|
|
2174
|
-
add:
|
|
2175
|
-
remove:
|
|
2835
|
+
add: re("click"),
|
|
2836
|
+
remove: B.remove
|
|
2176
2837
|
},
|
|
2177
|
-
animationEnd:
|
|
2178
|
-
viewProgress:
|
|
2179
|
-
pointerMove:
|
|
2838
|
+
animationEnd: ri,
|
|
2839
|
+
viewProgress: js,
|
|
2840
|
+
pointerMove: si,
|
|
2180
2841
|
activate: {
|
|
2181
|
-
add:
|
|
2182
|
-
remove:
|
|
2842
|
+
add: re("activate"),
|
|
2843
|
+
remove: B.remove
|
|
2183
2844
|
},
|
|
2184
2845
|
interest: {
|
|
2185
|
-
add:
|
|
2186
|
-
remove:
|
|
2846
|
+
add: re("interest"),
|
|
2847
|
+
remove: B.remove
|
|
2187
2848
|
}
|
|
2188
2849
|
};
|
|
2189
|
-
function
|
|
2850
|
+
function Ei(e) {
|
|
2190
2851
|
return e.replace(/\[([-\w]+)]/g, "[]");
|
|
2191
2852
|
}
|
|
2192
2853
|
class w {
|
|
@@ -2210,7 +2871,7 @@ class w {
|
|
|
2210
2871
|
if (typeof window > "u" || !window.customElements)
|
|
2211
2872
|
return;
|
|
2212
2873
|
const s = n?.useCustomElement ?? !!w.defineInteractElement;
|
|
2213
|
-
this.dataCache =
|
|
2874
|
+
this.dataCache = bi(t, s);
|
|
2214
2875
|
const i = w.defineInteractElement?.();
|
|
2215
2876
|
s && i === !1 ? document.querySelectorAll("interact-element").forEach((o) => {
|
|
2216
2877
|
o.connect();
|
|
@@ -2236,7 +2897,7 @@ class w {
|
|
|
2236
2897
|
return !!this.get(t);
|
|
2237
2898
|
}
|
|
2238
2899
|
get(t) {
|
|
2239
|
-
const n =
|
|
2900
|
+
const n = Ei(t);
|
|
2240
2901
|
return this.dataCache.interactions[n];
|
|
2241
2902
|
}
|
|
2242
2903
|
clearMediaQueryListenersForKey(t) {
|
|
@@ -2269,11 +2930,11 @@ class w {
|
|
|
2269
2930
|
}), w.instances.length = 0, w.controllerCache.clear(), w.sequenceCache.clear(), w.elementSequenceMap = /* @__PURE__ */ new WeakMap();
|
|
2270
2931
|
}
|
|
2271
2932
|
static setup(t) {
|
|
2272
|
-
t.scrollOptionsGetter &&
|
|
2933
|
+
t.scrollOptionsGetter && H.viewProgress.registerOptionsGetter?.(
|
|
2273
2934
|
t.scrollOptionsGetter
|
|
2274
|
-
), t.pointerOptionsGetter &&
|
|
2935
|
+
), t.pointerOptionsGetter && H.pointerMove.registerOptionsGetter?.(
|
|
2275
2936
|
t.pointerOptionsGetter
|
|
2276
|
-
), t.viewEnter &&
|
|
2937
|
+
), t.viewEnter && H.viewEnter.setOptions(
|
|
2277
2938
|
t.viewEnter
|
|
2278
2939
|
), t.allowA11yTriggers !== void 0 && (w.allowA11yTriggers = t.allowA11yTriggers);
|
|
2279
2940
|
}
|
|
@@ -2291,7 +2952,7 @@ class w {
|
|
|
2291
2952
|
static deleteController(t) {
|
|
2292
2953
|
w.controllerCache.delete(t);
|
|
2293
2954
|
}
|
|
2294
|
-
static registerEffects =
|
|
2955
|
+
static registerEffects = _n;
|
|
2295
2956
|
/**
|
|
2296
2957
|
* Registers a plugin under a name. When the config carries a plugin field (e.g. `$splitText`) with a matching key
|
|
2297
2958
|
* (on an interaction or effect), Interact invokes the plugin with the field's value and a
|
|
@@ -2309,14 +2970,14 @@ class w {
|
|
|
2309
2970
|
static getSequence(t, n, s, i) {
|
|
2310
2971
|
const o = w.sequenceCache.get(t);
|
|
2311
2972
|
if (o) return o;
|
|
2312
|
-
const r =
|
|
2973
|
+
const r = Nn(n, s, i);
|
|
2313
2974
|
return w.sequenceCache.set(t, r), w._registerSequenceElements(s, r), r;
|
|
2314
2975
|
}
|
|
2315
2976
|
static addToSequence(t, n, s, i) {
|
|
2316
2977
|
const o = w.sequenceCache.get(t);
|
|
2317
2978
|
if (!o) return !1;
|
|
2318
|
-
const a =
|
|
2319
|
-
index: s[
|
|
2979
|
+
const a = ht(n, i).map((c, u) => ({
|
|
2980
|
+
index: s[u] ?? o.animationGroups.length,
|
|
2320
2981
|
group: c
|
|
2321
2982
|
}));
|
|
2322
2983
|
return o.addGroups(a), w._registerSequenceElements(n, o), !0;
|
|
@@ -2343,7 +3004,7 @@ class w {
|
|
|
2343
3004
|
}
|
|
2344
3005
|
}
|
|
2345
3006
|
}
|
|
2346
|
-
let
|
|
3007
|
+
let wi = 0;
|
|
2347
3008
|
function D(e, {
|
|
2348
3009
|
asCombinator: t = !1,
|
|
2349
3010
|
addItemFilter: n = !1,
|
|
@@ -2356,10 +3017,10 @@ function D(e, {
|
|
|
2356
3017
|
return e.selector;
|
|
2357
3018
|
return s ? t ? "> :first-child" : ":scope > :first-child" : "";
|
|
2358
3019
|
}
|
|
2359
|
-
function
|
|
3020
|
+
function Xe(e) {
|
|
2360
3021
|
return "sequenceId" in e && !("effects" in e);
|
|
2361
3022
|
}
|
|
2362
|
-
function
|
|
3023
|
+
function $e(e, t) {
|
|
2363
3024
|
return e[t] || (e[t] = {
|
|
2364
3025
|
triggers: [],
|
|
2365
3026
|
effects: {},
|
|
@@ -2368,66 +3029,76 @@ function Ee(e, t) {
|
|
|
2368
3029
|
selectors: /* @__PURE__ */ new Set()
|
|
2369
3030
|
}), e[t];
|
|
2370
3031
|
}
|
|
2371
|
-
function
|
|
2372
|
-
const { effects:
|
|
2373
|
-
return
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
3032
|
+
function $i(e, t, n) {
|
|
3033
|
+
const { effects: s = [] } = e;
|
|
3034
|
+
return s.some((i, o) => n.has(t(o))) ? {
|
|
3035
|
+
...e,
|
|
3036
|
+
effects: s.map((i, o) => {
|
|
3037
|
+
const r = n.get(t(o));
|
|
3038
|
+
return r ? { ...i, suffix: r } : i;
|
|
3039
|
+
})
|
|
3040
|
+
} : e;
|
|
3041
|
+
}
|
|
3042
|
+
function bi(e, t = !1) {
|
|
3043
|
+
const { effects: n = {}, sequences: s = {}, conditions: i = {} } = e, o = {}, r = e.interactions ? It(e) : /* @__PURE__ */ new Map();
|
|
3044
|
+
return e.interactions?.forEach((a, c) => {
|
|
3045
|
+
const u = a.key, l = ++wi, { effects: f, sequences: d, ...p } = a;
|
|
3046
|
+
if (!u) {
|
|
3047
|
+
console.error(`Interaction ${l} is missing a key for source element.`);
|
|
2377
3048
|
return;
|
|
2378
3049
|
}
|
|
2379
|
-
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2382
|
-
const
|
|
2383
|
-
if (
|
|
2384
|
-
const
|
|
2385
|
-
return
|
|
3050
|
+
$e(o, u);
|
|
3051
|
+
const h = f ? Array.from(f) : [];
|
|
3052
|
+
h.reverse();
|
|
3053
|
+
const m = d?.map((v, E) => {
|
|
3054
|
+
if (Xe(v)) {
|
|
3055
|
+
const b = s[v.sequenceId];
|
|
3056
|
+
return b ? { ...b, ...v } : (console.warn(`Interact: Sequence "${v.sequenceId}" not found in config`), v);
|
|
2386
3057
|
}
|
|
2387
|
-
const
|
|
2388
|
-
return
|
|
2389
|
-
}),
|
|
2390
|
-
...
|
|
2391
|
-
effects:
|
|
2392
|
-
sequences:
|
|
3058
|
+
const $ = v;
|
|
3059
|
+
return $.sequenceId || ($.sequenceId = `seq-${c}-${E}`), $;
|
|
3060
|
+
}), g = {
|
|
3061
|
+
...p,
|
|
3062
|
+
effects: h.length > 0 ? h : void 0,
|
|
3063
|
+
sequences: m?.map(
|
|
3064
|
+
(v, E) => $i(v, ($) => de(c, $, E), r)
|
|
3065
|
+
)
|
|
2393
3066
|
};
|
|
2394
|
-
o[
|
|
2395
|
-
D(
|
|
3067
|
+
o[u].triggers.push(g), o[u].selectors.add(
|
|
3068
|
+
D(g, { useFirstChild: t })
|
|
2396
3069
|
);
|
|
2397
|
-
const
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
const $ = v.effectId;
|
|
2406
|
-
if (g && v.listContainer && (E !== c || v.listContainer !== g))
|
|
3070
|
+
const y = g.listContainer;
|
|
3071
|
+
h.forEach((v, E) => {
|
|
3072
|
+
const $ = v.effectId ? n[v.effectId] : void 0;
|
|
3073
|
+
let b = v.key || $?.key;
|
|
3074
|
+
const S = h.length - 1 - E;
|
|
3075
|
+
v.effectId || (v.effectId = `eff-${c}-${S}`);
|
|
3076
|
+
const C = r.get(de(c, S));
|
|
3077
|
+
if (C && (v.suffix = C), b = b || u, v.key = b, y && v.listContainer && (b !== u || v.listContainer !== y))
|
|
2407
3078
|
return;
|
|
2408
|
-
const b = `${
|
|
2409
|
-
if (v.interactionId =
|
|
3079
|
+
const O = G({ ...$, ...v, key: b }), I = `${u}::${O}::${l}`;
|
|
3080
|
+
if (v.interactionId = I, o[u].interactionIds.add(I), b === u)
|
|
2410
3081
|
return;
|
|
2411
|
-
const
|
|
2412
|
-
|
|
2413
|
-
}),
|
|
2414
|
-
if (!v ||
|
|
2415
|
-
const
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
let
|
|
2419
|
-
if (!
|
|
2420
|
-
const T = n[
|
|
2421
|
-
T && (
|
|
3082
|
+
const T = $e(o, b);
|
|
3083
|
+
T.effects[I] || (T.effects[I] = [], T.interactionIds.add(I)), T.effects[I].push({ ...p, effect: v }), T.selectors.add(D(v, { useFirstChild: t }));
|
|
3084
|
+
}), m?.forEach((v) => {
|
|
3085
|
+
if (!v || Xe(v)) return;
|
|
3086
|
+
const E = v, $ = E.sequenceId;
|
|
3087
|
+
E.effects.forEach((S, C) => {
|
|
3088
|
+
S.effectId || (S.effectId = `eff-${$}-${C}`);
|
|
3089
|
+
let O = S.key;
|
|
3090
|
+
if (!O && S.effectId) {
|
|
3091
|
+
const T = n[S.effectId];
|
|
3092
|
+
T && (O = T.key);
|
|
2422
3093
|
}
|
|
2423
|
-
|
|
2424
|
-
const
|
|
2425
|
-
if (
|
|
2426
|
-
const T =
|
|
2427
|
-
T.sequences[
|
|
2428
|
-
...
|
|
2429
|
-
sequence:
|
|
2430
|
-
}), T.selectors.add(
|
|
3094
|
+
O = O || u;
|
|
3095
|
+
const I = D(S, { useFirstChild: t });
|
|
3096
|
+
if (I && o[u].selectors.add(I), O !== u) {
|
|
3097
|
+
const T = $e(o, O), A = `${O}::seq::${$}::${l}`;
|
|
3098
|
+
T.sequences[A] || (T.sequences[A] = [], T.interactionIds.add(A)), T.sequences[A].push({
|
|
3099
|
+
...p,
|
|
3100
|
+
sequence: E
|
|
3101
|
+
}), T.selectors.add(I);
|
|
2431
3102
|
}
|
|
2432
3103
|
});
|
|
2433
3104
|
});
|
|
@@ -2438,139 +3109,51 @@ function Hs(e, t = !1) {
|
|
|
2438
3109
|
interactions: o
|
|
2439
3110
|
};
|
|
2440
3111
|
}
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
3112
|
+
function ye(e, t, n, s, i) {
|
|
3113
|
+
const o = w.getPluginsNames();
|
|
3114
|
+
for (const r of o) {
|
|
3115
|
+
const a = `${Je}${r}`;
|
|
3116
|
+
if (!(a in n))
|
|
3117
|
+
continue;
|
|
3118
|
+
const c = n[a];
|
|
3119
|
+
if (c !== null && typeof c == "object") {
|
|
3120
|
+
if (e._appliedPlugins.has(c))
|
|
3121
|
+
continue;
|
|
3122
|
+
e._appliedPlugins.add(c);
|
|
3123
|
+
}
|
|
3124
|
+
const l = w.getPlugin(r)(c, { root: t, key: s, scope: i, config: n });
|
|
3125
|
+
typeof l == "function" && e._pluginCleanups.push(l);
|
|
3126
|
+
}
|
|
2450
3127
|
}
|
|
2451
|
-
function
|
|
2452
|
-
|
|
3128
|
+
function pe(e, t, n) {
|
|
3129
|
+
if (e.listContainer) {
|
|
3130
|
+
const s = t.querySelector(e.listContainer);
|
|
3131
|
+
return s ? e.selector ? Array.from(s.querySelectorAll(e.selector)) : Array.from(s.children) : (console.warn(`Interact: No container found for list container "${e.listContainer}"`), []);
|
|
3132
|
+
}
|
|
3133
|
+
if (e.selector) {
|
|
3134
|
+
const s = t.querySelectorAll(e.selector);
|
|
3135
|
+
if (s.length > 0)
|
|
3136
|
+
return Array.from(s);
|
|
3137
|
+
console.warn(`Interact: No elements found for selector "${e.selector}"`);
|
|
3138
|
+
}
|
|
3139
|
+
return n ? t.firstElementChild : t;
|
|
2453
3140
|
}
|
|
2454
|
-
function
|
|
2455
|
-
return
|
|
2456
|
-
/\d/g,
|
|
2457
|
-
(e) => String.fromCharCode(
|
|
2458
|
-
(+e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +e / 4) + 97
|
|
2459
|
-
)
|
|
2460
|
-
// 97 for "a"
|
|
2461
|
-
);
|
|
3141
|
+
function ge(e, t) {
|
|
3142
|
+
return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
|
|
2462
3143
|
}
|
|
2463
|
-
function
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
}));
|
|
3144
|
+
function qt(e, t, n, s, i, o, r, a) {
|
|
3145
|
+
return [
|
|
3146
|
+
r ? ge(e, r) : pe(e, n, s),
|
|
3147
|
+
a ? ge(t, a) : pe(t, i, o)
|
|
3148
|
+
];
|
|
2469
3149
|
}
|
|
2470
|
-
function
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
const
|
|
2474
|
-
|
|
2475
|
-
(c) => c.name.startsWith("--")
|
|
2476
|
-
) ? s = [
|
|
2477
|
-
`all ${i}ms ${oe(o || "ease")}${r ? ` ${r}ms` : ""}`,
|
|
2478
|
-
"visibility 0s"
|
|
2479
|
-
] : s = t.styleProperties.map(
|
|
2480
|
-
(c) => `${fe(c.name)} ${i}ms ${oe(
|
|
2481
|
-
o || "ease"
|
|
2482
|
-
)}${r ? ` ${r}ms` : ""}`
|
|
2483
|
-
));
|
|
2484
|
-
} else
|
|
2485
|
-
s = n?.filter((i) => i.duration).map(
|
|
2486
|
-
(i) => `${fe(i.name)} ${i.duration}ms ${oe(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
|
|
2487
|
-
) || [];
|
|
2488
|
-
return s;
|
|
2489
|
-
}
|
|
2490
|
-
function Ys({
|
|
2491
|
-
key: e,
|
|
2492
|
-
effectId: t,
|
|
2493
|
-
transition: n,
|
|
2494
|
-
transitionProperties: s,
|
|
2495
|
-
childSelector: i = "> :first-child",
|
|
2496
|
-
selectorCondition: o
|
|
2497
|
-
}) {
|
|
2498
|
-
const r = vt({
|
|
2499
|
-
transition: n,
|
|
2500
|
-
transitionProperties: s
|
|
2501
|
-
}), a = gt({ transition: n, transitionProperties: s }).map(
|
|
2502
|
-
(h) => `${h.name}: ${h.value};`
|
|
2503
|
-
), c = e.replace(/"/g, "'"), f = `:is(:state(${t}), :--${t}) ${i}`, u = `[data-interact-effect~="${t}"] ${i}`, l = o ? ce(f, o) : f, d = o ? ce(u, o) : u, m = [
|
|
2504
|
-
`${l},
|
|
2505
|
-
${d} {
|
|
2506
|
-
${a.join(`
|
|
2507
|
-
`)}
|
|
2508
|
-
}`
|
|
2509
|
-
];
|
|
2510
|
-
if (r.length) {
|
|
2511
|
-
const h = `[data-interact-key="${c}"] ${i}`, p = o ? ce(h, o) : h;
|
|
2512
|
-
m.push(`@media (prefers-reduced-motion: no-preference) { ${p} {
|
|
2513
|
-
transition: ${r.join(", ")};
|
|
2514
|
-
} }`);
|
|
2515
|
-
}
|
|
2516
|
-
return m;
|
|
2517
|
-
}
|
|
2518
|
-
function J(e, t, n) {
|
|
2519
|
-
const s = (e || []).filter((i) => t[i]?.type === n && t[i].predicate).map((i) => t[i].predicate).join(") and (");
|
|
2520
|
-
return s && `(${s})`;
|
|
2521
|
-
}
|
|
2522
|
-
function k(e, t) {
|
|
2523
|
-
const n = J(e, t, "media");
|
|
2524
|
-
return n && window.matchMedia(n);
|
|
2525
|
-
}
|
|
2526
|
-
function M(e, t) {
|
|
2527
|
-
return (e || []).filter((n) => t[n]?.type === "selector" && t[n].predicate).map((n) => `:is(${t[n].predicate})`).join("");
|
|
2528
|
-
}
|
|
2529
|
-
function ge(e, t, n, s, i) {
|
|
2530
|
-
const o = w.getPluginsNames();
|
|
2531
|
-
for (const r of o) {
|
|
2532
|
-
const a = `${pt}${r}`;
|
|
2533
|
-
if (!(a in n))
|
|
2534
|
-
continue;
|
|
2535
|
-
const c = n[a];
|
|
2536
|
-
if (c !== null && typeof c == "object") {
|
|
2537
|
-
if (e._appliedPlugins.has(c))
|
|
2538
|
-
continue;
|
|
2539
|
-
e._appliedPlugins.add(c);
|
|
2540
|
-
}
|
|
2541
|
-
const u = w.getPlugin(r)(c, { root: t, key: s, scope: i, config: n });
|
|
2542
|
-
typeof u == "function" && e._pluginCleanups.push(u);
|
|
2543
|
-
}
|
|
2544
|
-
}
|
|
2545
|
-
function he(e, t, n) {
|
|
2546
|
-
if (e.listContainer) {
|
|
2547
|
-
const s = t.querySelector(e.listContainer);
|
|
2548
|
-
return s ? e.selector ? Array.from(s.querySelectorAll(e.selector)) : Array.from(s.children) : (console.warn(`Interact: No container found for list container "${e.listContainer}"`), []);
|
|
2549
|
-
}
|
|
2550
|
-
if (e.selector) {
|
|
2551
|
-
const s = t.querySelectorAll(e.selector);
|
|
2552
|
-
if (s.length > 0)
|
|
2553
|
-
return Array.from(s);
|
|
2554
|
-
console.warn(`Interact: No elements found for selector "${e.selector}"`);
|
|
2555
|
-
}
|
|
2556
|
-
return n ? t.firstElementChild : t;
|
|
2557
|
-
}
|
|
2558
|
-
function me(e, t) {
|
|
2559
|
-
return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
|
|
2560
|
-
}
|
|
2561
|
-
function yt(e, t, n, s, i, o, r, a) {
|
|
2562
|
-
return [
|
|
2563
|
-
r ? me(e, r) : he(e, n, s),
|
|
2564
|
-
a ? me(t, a) : he(t, i, o)
|
|
2565
|
-
];
|
|
2566
|
-
}
|
|
2567
|
-
function Et(e, t, n, s, i, o, r, a) {
|
|
2568
|
-
const c = Array.isArray(s), f = Array.isArray(i);
|
|
2569
|
-
c ? s.forEach((u, l) => {
|
|
2570
|
-
const d = f ? i[l] : i;
|
|
2571
|
-
d && Ue(
|
|
3150
|
+
function Mt(e, t, n, s, i, o, r, a) {
|
|
3151
|
+
const c = Array.isArray(s), u = Array.isArray(i);
|
|
3152
|
+
c ? s.forEach((l, f) => {
|
|
3153
|
+
const d = u ? i[f] : i;
|
|
3154
|
+
d && Ze(
|
|
2572
3155
|
e,
|
|
2573
|
-
|
|
3156
|
+
l,
|
|
2574
3157
|
t.trigger,
|
|
2575
3158
|
d,
|
|
2576
3159
|
n,
|
|
@@ -2579,12 +3162,12 @@ function Et(e, t, n, s, i, o, r, a) {
|
|
|
2579
3162
|
r,
|
|
2580
3163
|
a
|
|
2581
3164
|
);
|
|
2582
|
-
}) : (
|
|
2583
|
-
|
|
3165
|
+
}) : (u ? i : [i]).forEach((f) => {
|
|
3166
|
+
Ze(
|
|
2584
3167
|
e,
|
|
2585
3168
|
s,
|
|
2586
3169
|
t.trigger,
|
|
2587
|
-
|
|
3170
|
+
f,
|
|
2588
3171
|
n,
|
|
2589
3172
|
t.params,
|
|
2590
3173
|
o,
|
|
@@ -2593,122 +3176,122 @@ function Et(e, t, n, s, i, o, r, a) {
|
|
|
2593
3176
|
);
|
|
2594
3177
|
});
|
|
2595
3178
|
}
|
|
2596
|
-
function
|
|
3179
|
+
function Pt(e, t, n, s, i) {
|
|
2597
3180
|
const o = {}, r = [];
|
|
2598
|
-
(s.effects || []).forEach((a) => {
|
|
2599
|
-
const
|
|
2600
|
-
...n.dataCache.effects[
|
|
3181
|
+
(s.effects || []).forEach((a, c) => {
|
|
3182
|
+
const u = a.effectId, l = {
|
|
3183
|
+
...n.dataCache.effects[u] || {},
|
|
2601
3184
|
...a,
|
|
2602
|
-
effectId:
|
|
2603
|
-
},
|
|
2604
|
-
if (o[
|
|
3185
|
+
effectId: u
|
|
3186
|
+
}, f = l.key, d = q(a.interactionId, e);
|
|
3187
|
+
if (o[d] || n.addedInteractions[d] && !i)
|
|
2605
3188
|
return;
|
|
2606
|
-
const
|
|
2607
|
-
if (
|
|
3189
|
+
const p = M(l.conditions || [], n.dataCache.conditions);
|
|
3190
|
+
if (p && n.setupMediaQueryListener(`${d}::${c}`, p, e, () => {
|
|
2608
3191
|
t.update();
|
|
2609
|
-
}), !
|
|
2610
|
-
o[
|
|
2611
|
-
const
|
|
2612
|
-
let
|
|
2613
|
-
if (
|
|
2614
|
-
if (
|
|
3192
|
+
}), !p || p.matches) {
|
|
3193
|
+
o[d] = !0;
|
|
3194
|
+
const h = f && q(f, e);
|
|
3195
|
+
let m;
|
|
3196
|
+
if (h) {
|
|
3197
|
+
if (m = w.getController(h), !m)
|
|
2615
3198
|
return;
|
|
2616
|
-
|
|
3199
|
+
l.listContainer && m.watchChildList(l.listContainer);
|
|
2617
3200
|
} else
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
3201
|
+
m = t;
|
|
3202
|
+
ye(
|
|
3203
|
+
m,
|
|
3204
|
+
m.element,
|
|
3205
|
+
l,
|
|
3206
|
+
h || s.key,
|
|
2624
3207
|
"effect"
|
|
2625
3208
|
);
|
|
2626
|
-
const [
|
|
3209
|
+
const [g, y] = qt(
|
|
2627
3210
|
s,
|
|
2628
|
-
|
|
3211
|
+
l,
|
|
2629
3212
|
t.element,
|
|
2630
3213
|
t.useFirstChild,
|
|
2631
|
-
|
|
2632
|
-
|
|
3214
|
+
m.element,
|
|
3215
|
+
m.useFirstChild,
|
|
2633
3216
|
i
|
|
2634
3217
|
);
|
|
2635
|
-
if (!
|
|
3218
|
+
if (!g || !y)
|
|
2636
3219
|
return;
|
|
2637
|
-
n.addedInteractions[
|
|
2638
|
-
const v =
|
|
2639
|
-
|
|
3220
|
+
n.addedInteractions[d] = !0;
|
|
3221
|
+
const v = h || s.key, E = P(
|
|
3222
|
+
l.conditions || [],
|
|
2640
3223
|
n.dataCache.conditions
|
|
2641
3224
|
);
|
|
2642
3225
|
r.push([
|
|
2643
3226
|
v,
|
|
2644
3227
|
s,
|
|
2645
|
-
|
|
2646
|
-
p,
|
|
3228
|
+
l,
|
|
2647
3229
|
g,
|
|
2648
3230
|
y,
|
|
2649
|
-
|
|
3231
|
+
E,
|
|
3232
|
+
m.useFirstChild,
|
|
2650
3233
|
e
|
|
2651
3234
|
]);
|
|
2652
3235
|
}
|
|
2653
3236
|
}), r.reverse().forEach((a) => {
|
|
2654
|
-
|
|
2655
|
-
}),
|
|
3237
|
+
Mt(...a);
|
|
3238
|
+
}), Ii(e, t, n, s, i);
|
|
2656
3239
|
}
|
|
2657
|
-
function
|
|
3240
|
+
function Si(e) {
|
|
2658
3241
|
return "sequenceId" in e && !("effects" in e);
|
|
2659
3242
|
}
|
|
2660
|
-
function
|
|
2661
|
-
const a =
|
|
3243
|
+
function Lt(e, t, n, s, i, o, r) {
|
|
3244
|
+
const a = M(e.conditions || [], i.dataCache.conditions);
|
|
2662
3245
|
if (a && i.setupMediaQueryListener(t, a, o.updateKey, o.onUpdate), a && !a.matches) return null;
|
|
2663
|
-
const c = e.effects || [],
|
|
2664
|
-
let
|
|
2665
|
-
for (const
|
|
2666
|
-
const d =
|
|
3246
|
+
const c = e.effects || [], u = [];
|
|
3247
|
+
let l = !1;
|
|
3248
|
+
for (const f of c) {
|
|
3249
|
+
const d = f.effectId, h = {
|
|
2667
3250
|
...d ? i.dataCache.effects[d] || {} : {},
|
|
2668
|
-
...
|
|
2669
|
-
},
|
|
2670
|
-
if (
|
|
3251
|
+
...f
|
|
3252
|
+
}, m = M(h.conditions || [], i.dataCache.conditions);
|
|
3253
|
+
if (m) {
|
|
2671
3254
|
const S = `${t}::${d || "eff"}`;
|
|
2672
3255
|
i.setupMediaQueryListener(
|
|
2673
3256
|
S,
|
|
2674
|
-
|
|
3257
|
+
m,
|
|
2675
3258
|
o.updateKey,
|
|
2676
3259
|
o.onUpdate
|
|
2677
3260
|
);
|
|
2678
3261
|
}
|
|
2679
|
-
if (
|
|
2680
|
-
const g = h.key,
|
|
2681
|
-
let
|
|
2682
|
-
if (
|
|
2683
|
-
if (
|
|
3262
|
+
if (m && !m.matches) continue;
|
|
3263
|
+
const g = h.key, y = g && q(g, n);
|
|
3264
|
+
let v;
|
|
3265
|
+
if (y) {
|
|
3266
|
+
if (v = w.getController(y), !v) return null;
|
|
2684
3267
|
} else
|
|
2685
|
-
|
|
2686
|
-
const E =
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
3268
|
+
v = s;
|
|
3269
|
+
const E = y || n;
|
|
3270
|
+
ye(
|
|
3271
|
+
v,
|
|
3272
|
+
v.element,
|
|
2690
3273
|
h,
|
|
2691
3274
|
E,
|
|
2692
3275
|
"effect"
|
|
2693
3276
|
);
|
|
2694
3277
|
let $;
|
|
2695
|
-
if (r && E === r.controllerKey && h.listContainer === r.listContainer ? ($ =
|
|
3278
|
+
if (r && E === r.controllerKey && h.listContainer === r.listContainer ? ($ = ge(h, r.elements), $.length > 0 && (l = !0)) : $ = pe(
|
|
2696
3279
|
h,
|
|
2697
|
-
|
|
2698
|
-
|
|
3280
|
+
v.element,
|
|
3281
|
+
v.useFirstChild
|
|
2699
3282
|
), !$ || Array.isArray($) && $.length === 0) return null;
|
|
2700
|
-
const b =
|
|
2701
|
-
|
|
3283
|
+
const b = L(h);
|
|
3284
|
+
u.push({ target: $, options: b });
|
|
2702
3285
|
}
|
|
2703
|
-
return r && !
|
|
3286
|
+
return r && !l ? null : u.length > 0 ? u : null;
|
|
2704
3287
|
}
|
|
2705
|
-
function
|
|
2706
|
-
const s = n ?
|
|
3288
|
+
function Me(e, t, n) {
|
|
3289
|
+
const s = n ? ge(e, n) : pe(e, t.element, t.useFirstChild);
|
|
2707
3290
|
return Array.isArray(s) && s.length === 0 ? null : s;
|
|
2708
3291
|
}
|
|
2709
|
-
function
|
|
3292
|
+
function Pe(e, t, n, s, i) {
|
|
2710
3293
|
(Array.isArray(n) ? n : [n]).forEach((r) => {
|
|
2711
|
-
|
|
3294
|
+
H[e.trigger]?.add(
|
|
2712
3295
|
r,
|
|
2713
3296
|
r,
|
|
2714
3297
|
{ triggerType: t.triggerType },
|
|
@@ -2722,7 +3305,7 @@ function _e(e, t, n, s, i) {
|
|
|
2722
3305
|
);
|
|
2723
3306
|
});
|
|
2724
3307
|
}
|
|
2725
|
-
function
|
|
3308
|
+
function xt(e, t, n) {
|
|
2726
3309
|
const o = (e.useFirstChild ? e.element.firstElementChild : e.element)?.querySelector(t);
|
|
2727
3310
|
if (!o) return n.map((a, c) => c);
|
|
2728
3311
|
const r = Array.from(o.children);
|
|
@@ -2731,10 +3314,10 @@ function bt(e, t, n) {
|
|
|
2731
3314
|
return c >= 0 ? c : r.length;
|
|
2732
3315
|
});
|
|
2733
3316
|
}
|
|
2734
|
-
function
|
|
3317
|
+
function Ii(e, t, n, s, i) {
|
|
2735
3318
|
s.sequences?.forEach((o) => {
|
|
2736
3319
|
let r;
|
|
2737
|
-
if (
|
|
3320
|
+
if (Si(o)) {
|
|
2738
3321
|
const h = n.dataCache.sequences[o.sequenceId];
|
|
2739
3322
|
if (!h) {
|
|
2740
3323
|
console.warn(`Interact: Sequence "${o.sequenceId}" not found in cache`);
|
|
@@ -2743,153 +3326,158 @@ function Bs(e, t, n, s, i) {
|
|
|
2743
3326
|
r = { ...h, ...o };
|
|
2744
3327
|
} else
|
|
2745
3328
|
r = o;
|
|
2746
|
-
const a = r.sequenceId ||
|
|
3329
|
+
const a = r.sequenceId || X(), c = q(`${e}::seq::${a}`, e);
|
|
2747
3330
|
if (n.addedInteractions[c] && !i) return;
|
|
2748
|
-
const
|
|
3331
|
+
const u = i && s.listContainer ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0, l = Lt(
|
|
2749
3332
|
r,
|
|
2750
3333
|
c,
|
|
2751
3334
|
e,
|
|
2752
3335
|
t,
|
|
2753
3336
|
n,
|
|
2754
3337
|
{ updateKey: e, onUpdate: () => t.update() },
|
|
2755
|
-
|
|
3338
|
+
u
|
|
2756
3339
|
);
|
|
2757
|
-
if (!
|
|
3340
|
+
if (!l) return;
|
|
2758
3341
|
if (i && n.addedInteractions[c]) {
|
|
2759
|
-
const h =
|
|
3342
|
+
const h = xt(
|
|
2760
3343
|
t,
|
|
2761
3344
|
s.listContainer,
|
|
2762
3345
|
i
|
|
2763
3346
|
);
|
|
2764
|
-
w.addToSequence(c,
|
|
3347
|
+
w.addToSequence(c, l, h, {
|
|
2765
3348
|
reducedMotion: w.forceReducedMotion
|
|
2766
3349
|
});
|
|
2767
|
-
const
|
|
3350
|
+
const m = w.getSequence(c, r, l, {
|
|
2768
3351
|
reducedMotion: w.forceReducedMotion
|
|
2769
|
-
}), g =
|
|
3352
|
+
}), g = P(
|
|
2770
3353
|
s.conditions || [],
|
|
2771
3354
|
n.dataCache.conditions
|
|
2772
|
-
),
|
|
2773
|
-
|
|
3355
|
+
), y = Me(s, t, i);
|
|
3356
|
+
y && Pe(
|
|
2774
3357
|
s,
|
|
2775
3358
|
r,
|
|
2776
|
-
|
|
2777
|
-
|
|
3359
|
+
y,
|
|
3360
|
+
m,
|
|
2778
3361
|
g
|
|
2779
3362
|
);
|
|
2780
3363
|
return;
|
|
2781
3364
|
}
|
|
2782
|
-
const
|
|
3365
|
+
const f = w.getSequence(c, r, l, {
|
|
2783
3366
|
reducedMotion: w.forceReducedMotion
|
|
2784
|
-
}), d =
|
|
3367
|
+
}), d = P(
|
|
2785
3368
|
s.conditions || [],
|
|
2786
3369
|
n.dataCache.conditions
|
|
2787
|
-
),
|
|
2788
|
-
|
|
3370
|
+
), p = Me(s, t, i);
|
|
3371
|
+
p && (n.addedInteractions[c] = !0, Pe(
|
|
2789
3372
|
s,
|
|
2790
3373
|
r,
|
|
2791
|
-
|
|
2792
|
-
|
|
3374
|
+
p,
|
|
3375
|
+
f,
|
|
2793
3376
|
d
|
|
2794
3377
|
));
|
|
2795
3378
|
});
|
|
2796
3379
|
}
|
|
2797
|
-
function
|
|
3380
|
+
function Ti(e, t, n, s, i) {
|
|
2798
3381
|
const o = n.get(e)?.sequences || {};
|
|
2799
3382
|
Object.keys(o).forEach((a) => {
|
|
2800
|
-
o[a].some(({ sequence:
|
|
2801
|
-
const
|
|
2802
|
-
|
|
3383
|
+
o[a].some(({ sequence: u, ...l }) => {
|
|
3384
|
+
const f = M(
|
|
3385
|
+
l.conditions || [],
|
|
2803
3386
|
n.dataCache.conditions
|
|
2804
3387
|
);
|
|
2805
|
-
if (
|
|
3388
|
+
if (f && !f.matches)
|
|
2806
3389
|
return !1;
|
|
2807
|
-
const d =
|
|
2808
|
-
if (!
|
|
3390
|
+
const d = l.key && q(l.key, e), p = w.getController(d);
|
|
3391
|
+
if (!p)
|
|
2809
3392
|
return !0;
|
|
2810
|
-
const h =
|
|
2811
|
-
if (n.addedInteractions[
|
|
3393
|
+
const h = u.sequenceId || X(), m = q(`${d}::seq::${h}`, d);
|
|
3394
|
+
if (n.addedInteractions[m] && !i)
|
|
2812
3395
|
return !0;
|
|
2813
|
-
const
|
|
2814
|
-
|
|
2815
|
-
p,
|
|
2816
|
-
d,
|
|
3396
|
+
const y = Lt(
|
|
3397
|
+
u,
|
|
2817
3398
|
m,
|
|
3399
|
+
d,
|
|
3400
|
+
p,
|
|
2818
3401
|
n,
|
|
2819
3402
|
{ updateKey: e, onUpdate: () => t.update() },
|
|
2820
3403
|
i && s ? { controllerKey: e, listContainer: s, elements: i } : void 0
|
|
2821
3404
|
);
|
|
2822
|
-
if (!
|
|
2823
|
-
if (i && n.addedInteractions[
|
|
2824
|
-
const b =
|
|
2825
|
-
return w.addToSequence(
|
|
3405
|
+
if (!y) return !0;
|
|
3406
|
+
if (i && n.addedInteractions[m]) {
|
|
3407
|
+
const b = xt(t, s, i);
|
|
3408
|
+
return w.addToSequence(m, y, b, {
|
|
2826
3409
|
reducedMotion: w.forceReducedMotion
|
|
2827
3410
|
}), !0;
|
|
2828
3411
|
}
|
|
2829
|
-
const
|
|
3412
|
+
const v = w.getSequence(m, u, y, {
|
|
2830
3413
|
reducedMotion: w.forceReducedMotion
|
|
2831
|
-
}), E =
|
|
2832
|
-
|
|
3414
|
+
}), E = P(
|
|
3415
|
+
l.conditions || [],
|
|
2833
3416
|
n.dataCache.conditions
|
|
2834
|
-
), $ =
|
|
2835
|
-
return $ && (n.addedInteractions[
|
|
3417
|
+
), $ = Me(l, p);
|
|
3418
|
+
return $ && (n.addedInteractions[m] = !0, Pe(
|
|
3419
|
+
l,
|
|
2836
3420
|
u,
|
|
2837
|
-
f,
|
|
2838
3421
|
$,
|
|
2839
|
-
|
|
3422
|
+
v,
|
|
2840
3423
|
E
|
|
2841
3424
|
)), !0;
|
|
2842
3425
|
});
|
|
2843
3426
|
});
|
|
2844
3427
|
}
|
|
2845
|
-
function
|
|
3428
|
+
function Ft(e, t, n, s, i) {
|
|
2846
3429
|
const o = n.get(e), r = o?.effects || {}, a = Object.keys(r), c = [];
|
|
2847
|
-
a.forEach((
|
|
2848
|
-
const
|
|
2849
|
-
if (n.addedInteractions[
|
|
3430
|
+
a.forEach((l) => {
|
|
3431
|
+
const f = q(l, e);
|
|
3432
|
+
if (n.addedInteractions[f] && !i)
|
|
2850
3433
|
return;
|
|
2851
|
-
r[
|
|
2852
|
-
const
|
|
3434
|
+
r[l].some(({ effect: p, ...h }, m) => {
|
|
3435
|
+
const g = M(
|
|
2853
3436
|
h.conditions || [],
|
|
2854
3437
|
n.dataCache.conditions
|
|
2855
3438
|
);
|
|
2856
|
-
if (
|
|
3439
|
+
if (g && !g.matches)
|
|
2857
3440
|
return !1;
|
|
2858
|
-
const
|
|
2859
|
-
...n.dataCache.effects[
|
|
2860
|
-
...
|
|
2861
|
-
effectId:
|
|
3441
|
+
const y = p.effectId, v = {
|
|
3442
|
+
...n.dataCache.effects[y] || {},
|
|
3443
|
+
...p,
|
|
3444
|
+
effectId: y
|
|
2862
3445
|
};
|
|
2863
3446
|
if (s && v.listContainer !== s)
|
|
2864
3447
|
return !1;
|
|
2865
|
-
const
|
|
2866
|
-
if (
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
3448
|
+
const E = M(v.conditions || [], n.dataCache.conditions);
|
|
3449
|
+
if (E && n.setupMediaQueryListener(
|
|
3450
|
+
`${f}::${m}`,
|
|
3451
|
+
E,
|
|
3452
|
+
e,
|
|
3453
|
+
() => {
|
|
3454
|
+
t.update();
|
|
3455
|
+
}
|
|
3456
|
+
), !E || E.matches) {
|
|
3457
|
+
const $ = h.key && q(h.key, e), b = w.getController($);
|
|
3458
|
+
if (!b)
|
|
2871
3459
|
return !0;
|
|
2872
|
-
|
|
3460
|
+
ye(
|
|
2873
3461
|
t,
|
|
2874
3462
|
t.element,
|
|
2875
3463
|
v,
|
|
2876
3464
|
e,
|
|
2877
3465
|
"effect"
|
|
2878
3466
|
), v.listContainer && t.watchChildList(v.listContainer);
|
|
2879
|
-
const [
|
|
3467
|
+
const [S, C] = qt(
|
|
2880
3468
|
h,
|
|
2881
3469
|
v,
|
|
2882
|
-
|
|
2883
|
-
|
|
3470
|
+
b.element,
|
|
3471
|
+
b.useFirstChild,
|
|
2884
3472
|
t.element,
|
|
2885
3473
|
t.useFirstChild,
|
|
2886
3474
|
void 0,
|
|
2887
3475
|
i
|
|
2888
3476
|
);
|
|
2889
|
-
if (!
|
|
3477
|
+
if (!S || !C)
|
|
2890
3478
|
return !0;
|
|
2891
|
-
n.addedInteractions[
|
|
2892
|
-
const
|
|
3479
|
+
n.addedInteractions[f] = !0;
|
|
3480
|
+
const O = P(
|
|
2893
3481
|
v.conditions || [],
|
|
2894
3482
|
n.dataCache.conditions
|
|
2895
3483
|
);
|
|
@@ -2897,25 +3485,25 @@ function St(e, t, n, s, i) {
|
|
|
2897
3485
|
e,
|
|
2898
3486
|
h,
|
|
2899
3487
|
v,
|
|
2900
|
-
b,
|
|
2901
3488
|
S,
|
|
2902
|
-
|
|
3489
|
+
C,
|
|
3490
|
+
O,
|
|
2903
3491
|
t.useFirstChild,
|
|
2904
|
-
|
|
3492
|
+
$ || void 0
|
|
2905
3493
|
]), !0;
|
|
2906
3494
|
}
|
|
2907
3495
|
return !1;
|
|
2908
3496
|
});
|
|
2909
|
-
}), c.reverse().forEach((
|
|
2910
|
-
|
|
2911
|
-
}),
|
|
2912
|
-
const
|
|
2913
|
-
return a.length > 0 ||
|
|
3497
|
+
}), c.reverse().forEach((l) => {
|
|
3498
|
+
Mt(...l);
|
|
3499
|
+
}), Ti(e, t, n, s, i);
|
|
3500
|
+
const u = Object.keys(o?.sequences || {}).length > 0;
|
|
3501
|
+
return a.length > 0 || u;
|
|
2914
3502
|
}
|
|
2915
|
-
function
|
|
2916
|
-
let
|
|
3503
|
+
function Ze(e, t, n, s, i, o, r, a, c) {
|
|
3504
|
+
let u;
|
|
2917
3505
|
if (i.transition || i.transitionProperties) {
|
|
2918
|
-
const
|
|
3506
|
+
const f = {
|
|
2919
3507
|
key: e,
|
|
2920
3508
|
effectId: i.effectId,
|
|
2921
3509
|
transition: i.transition,
|
|
@@ -2927,76 +3515,76 @@ function Ue(e, t, n, s, i, o, r, a, c) {
|
|
|
2927
3515
|
}),
|
|
2928
3516
|
selectorCondition: r
|
|
2929
3517
|
};
|
|
2930
|
-
if (
|
|
3518
|
+
if (u = w.getController(e), !u)
|
|
2931
3519
|
return;
|
|
2932
|
-
|
|
3520
|
+
u.renderStyle(Dn(f));
|
|
2933
3521
|
}
|
|
2934
|
-
let
|
|
3522
|
+
let l;
|
|
2935
3523
|
if (n === "animationEnd") {
|
|
2936
|
-
const
|
|
2937
|
-
|
|
3524
|
+
const f = o.effectId, p = (c ? w.getInstance(c) : void 0)?.dataCache.effects[f];
|
|
3525
|
+
p && (l = L(p));
|
|
2938
3526
|
}
|
|
2939
|
-
|
|
3527
|
+
H[n]?.add(t, s, i, o, {
|
|
2940
3528
|
reducedMotion: w.forceReducedMotion,
|
|
2941
|
-
targetController:
|
|
3529
|
+
targetController: u,
|
|
2942
3530
|
selectorCondition: r,
|
|
2943
3531
|
allowA11yTriggers: w.allowA11yTriggers,
|
|
2944
|
-
sourceAnimationOptions:
|
|
3532
|
+
sourceAnimationOptions: l
|
|
2945
3533
|
});
|
|
2946
3534
|
}
|
|
2947
|
-
function
|
|
3535
|
+
function Ci(e) {
|
|
2948
3536
|
const t = e.key, n = w.getInstance(t);
|
|
2949
3537
|
if (!n)
|
|
2950
3538
|
return console.warn(`No instance found for key: ${t}`), w.setController(t, e), !1;
|
|
2951
3539
|
const { triggers: s = [] } = n?.get(t) || {}, i = s.length > 0;
|
|
2952
3540
|
n.setController(t, e), s.forEach((r, a) => {
|
|
2953
|
-
const c =
|
|
3541
|
+
const c = M(r.conditions, n.dataCache.conditions);
|
|
2954
3542
|
if (c) {
|
|
2955
|
-
const
|
|
2956
|
-
n.setupMediaQueryListener(
|
|
3543
|
+
const u = `${t}::trigger::${a}`;
|
|
3544
|
+
n.setupMediaQueryListener(u, c, t, () => {
|
|
2957
3545
|
e.update();
|
|
2958
3546
|
});
|
|
2959
3547
|
}
|
|
2960
|
-
(!c || c.matches) && (
|
|
3548
|
+
(!c || c.matches) && (ye(e, e.element, r, t, "interaction"), r.listContainer && e.watchChildList(r.listContainer), Pt(t, e, n, r));
|
|
2961
3549
|
});
|
|
2962
3550
|
let o = !1;
|
|
2963
|
-
return n && (o =
|
|
3551
|
+
return n && (o = Ft(t, e, n)), i || o;
|
|
2964
3552
|
}
|
|
2965
|
-
function
|
|
3553
|
+
function Oi(e, t, n) {
|
|
2966
3554
|
const s = e.key, i = w.getInstance(s);
|
|
2967
3555
|
if (i) {
|
|
2968
3556
|
const { triggers: o = [] } = i?.get(s) || {};
|
|
2969
3557
|
o.forEach((r, a) => {
|
|
2970
3558
|
if (r.listContainer !== t)
|
|
2971
3559
|
return;
|
|
2972
|
-
const c =
|
|
3560
|
+
const c = M(r.conditions, i.dataCache.conditions);
|
|
2973
3561
|
if (c) {
|
|
2974
|
-
const
|
|
2975
|
-
i.setupMediaQueryListener(
|
|
3562
|
+
const u = `${s}::listTrigger::${t}::${a}`;
|
|
3563
|
+
i.setupMediaQueryListener(u, c, s, () => {
|
|
2976
3564
|
e.update();
|
|
2977
3565
|
});
|
|
2978
3566
|
}
|
|
2979
|
-
(!c || c.matches) &&
|
|
2980
|
-
}),
|
|
3567
|
+
(!c || c.matches) && Pt(s, e, i, r, n);
|
|
3568
|
+
}), Ft(s, e, i, t, n);
|
|
2981
3569
|
}
|
|
2982
3570
|
}
|
|
2983
|
-
function
|
|
3571
|
+
function _i(e, t = !1) {
|
|
2984
3572
|
const n = e.key, s = w.getInstance(n);
|
|
2985
3573
|
if (!s)
|
|
2986
3574
|
return;
|
|
2987
3575
|
const i = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
|
|
2988
3576
|
let o;
|
|
2989
|
-
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element],
|
|
3577
|
+
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], Rt(o), s.deleteController(n, t);
|
|
2990
3578
|
}
|
|
2991
|
-
function
|
|
2992
|
-
const t = Object.values(
|
|
3579
|
+
function Rt(e) {
|
|
3580
|
+
const t = Object.values(H);
|
|
2993
3581
|
for (const n of e)
|
|
2994
3582
|
for (const s of t)
|
|
2995
3583
|
s.remove(n);
|
|
2996
3584
|
w.removeFromSequences(e);
|
|
2997
3585
|
}
|
|
2998
|
-
const
|
|
2999
|
-
class
|
|
3586
|
+
const be = "interactEffect";
|
|
3587
|
+
class Ai {
|
|
3000
3588
|
element;
|
|
3001
3589
|
key;
|
|
3002
3590
|
connected;
|
|
@@ -3018,10 +3606,10 @@ class Js {
|
|
|
3018
3606
|
}
|
|
3019
3607
|
n !== t && (n && console.warn(
|
|
3020
3608
|
`Interact: Key mismatch between element ${n} and parameter ${t}, updating element key`
|
|
3021
|
-
), this.element.dataset.interactKey = t), this.key = t, this.connected =
|
|
3609
|
+
), this.element.dataset.interactKey = t), this.key = t, this.connected = Ci(this);
|
|
3022
3610
|
}
|
|
3023
3611
|
disconnect({ removeFromCache: t = !1 } = {}) {
|
|
3024
|
-
if ((this.key || this.element.dataset.interactKey) &&
|
|
3612
|
+
if ((this.key || this.element.dataset.interactKey) && _i(this, t), this._pluginCleanups.length) {
|
|
3025
3613
|
for (const s of this._pluginCleanups)
|
|
3026
3614
|
try {
|
|
3027
3615
|
s();
|
|
@@ -3064,12 +3652,12 @@ class Js {
|
|
|
3064
3652
|
return;
|
|
3065
3653
|
}
|
|
3066
3654
|
const o = new Set(
|
|
3067
|
-
this.element.dataset[
|
|
3655
|
+
this.element.dataset[be]?.split(" ") || []
|
|
3068
3656
|
);
|
|
3069
|
-
n === "toggle" ? o.has(t) ? o.delete(t) : o.add(t) : n === "add" ? o.add(t) : n === "remove" ? o.delete(t) : n === "clear" && o.clear(), (s || this.element).dataset[
|
|
3657
|
+
n === "toggle" ? o.has(t) ? o.delete(t) : o.add(t) : n === "add" ? o.add(t) : n === "remove" ? o.delete(t) : n === "clear" && o.clear(), (s || this.element).dataset[be] = Array.from(o).join(" ");
|
|
3070
3658
|
}
|
|
3071
3659
|
getActiveEffects() {
|
|
3072
|
-
const n = (this.element.dataset[
|
|
3660
|
+
const n = (this.element.dataset[be] || "").trim();
|
|
3073
3661
|
return n ? n.split(/\s+/) : [];
|
|
3074
3662
|
}
|
|
3075
3663
|
watchChildList(t) {
|
|
@@ -3087,520 +3675,21 @@ class Js {
|
|
|
3087
3675
|
}), r.addedNodes.forEach((a) => {
|
|
3088
3676
|
a instanceof HTMLElement && o.push(a);
|
|
3089
3677
|
});
|
|
3090
|
-
}),
|
|
3678
|
+
}), Rt(i), s && Oi(this, t, o);
|
|
3091
3679
|
}
|
|
3092
3680
|
}
|
|
3093
|
-
function
|
|
3094
|
-
new
|
|
3681
|
+
function qi(e, t) {
|
|
3682
|
+
new Ai(e, t).connect();
|
|
3095
3683
|
}
|
|
3096
|
-
function
|
|
3684
|
+
function Mi(e) {
|
|
3097
3685
|
const t = w.getController(e);
|
|
3098
3686
|
t && t.disconnect({ removeFromCache: !0 });
|
|
3099
3687
|
}
|
|
3100
|
-
const Tt = /* @__PURE__ */ new Map([
|
|
3101
|
-
["viewEnter", "once"],
|
|
3102
|
-
["animationEnd", "once"],
|
|
3103
|
-
["hover", "alternate"],
|
|
3104
|
-
["click", "alternate"],
|
|
3105
|
-
["activate", "alternate"],
|
|
3106
|
-
["interest", "alternate"]
|
|
3107
|
-
]);
|
|
3108
|
-
function Ct(e, t, n, s) {
|
|
3109
|
-
const { effects: i = {}, conditions: o = {} } = n, { key: r, trigger: a } = t, c = a === "pointerMove";
|
|
3110
|
-
e.effectId || (e.effectId = s || U());
|
|
3111
|
-
const { effectId: f } = e, u = { ...i[f] || {}, ...e };
|
|
3112
|
-
let { key: l, conditions: d, triggerType: m } = u;
|
|
3113
|
-
if (!l) {
|
|
3114
|
-
if (!r)
|
|
3115
|
-
return null;
|
|
3116
|
-
l = r;
|
|
3117
|
-
}
|
|
3118
|
-
if (Ws(l))
|
|
3119
|
-
return null;
|
|
3120
|
-
d = [
|
|
3121
|
-
...new Set((d || []).filter((b) => o[b]))
|
|
3122
|
-
], m || (m = Tt.get(a));
|
|
3123
|
-
const { namedEffect: h, customEffect: p, keyframeEffect: g, transition: v, transitionProperties: y, ...E } = {
|
|
3124
|
-
...u,
|
|
3125
|
-
key: l,
|
|
3126
|
-
conditions: d,
|
|
3127
|
-
effectId: f,
|
|
3128
|
-
triggerType: m
|
|
3129
|
-
}, $ = qt(t, E);
|
|
3130
|
-
if (h)
|
|
3131
|
-
return c || !h.type ? null : { namedEffect: h, initial: $, ...E };
|
|
3132
|
-
if (g) {
|
|
3133
|
-
if (!g.name) {
|
|
3134
|
-
const b = f && !(i[f] && "keyframeEffect" in e);
|
|
3135
|
-
g.name = b ? f : U();
|
|
3136
|
-
}
|
|
3137
|
-
return { keyframeEffect: g, initial: $, ...E };
|
|
3138
|
-
} else return p ? c ? null : { initial: $, ...E } : v ? { transition: v, initial: $, ...E } : y ? { transitionProperties: y, initial: $, ...E } : { initial: $, ...E };
|
|
3139
|
-
}
|
|
3140
|
-
function ei(e, t, n, s) {
|
|
3141
|
-
const { sequences: i = {}, conditions: o = {} } = n;
|
|
3142
|
-
e.sequenceId || (e.sequenceId = s || U());
|
|
3143
|
-
const { sequenceId: r } = e, a = { ...i[r] || {}, ...e };
|
|
3144
|
-
let {
|
|
3145
|
-
effects: c,
|
|
3146
|
-
conditions: f,
|
|
3147
|
-
triggerType: u,
|
|
3148
|
-
delay: l = 0,
|
|
3149
|
-
offset: d = 0,
|
|
3150
|
-
offsetEasing: m = "linear"
|
|
3151
|
-
} = a;
|
|
3152
|
-
if (typeof m == "function")
|
|
3153
|
-
return null;
|
|
3154
|
-
u || (u = Tt.get(t.trigger)), f = [
|
|
3155
|
-
...new Set((f || []).filter((g) => o[g]))
|
|
3156
|
-
];
|
|
3157
|
-
const p = c.map((g, v) => (g.conditions ? g.conditions.push(...f) : g.conditions = [...f], Ct(
|
|
3158
|
-
{ ...g, triggerType: u },
|
|
3159
|
-
t,
|
|
3160
|
-
n,
|
|
3161
|
-
`${r}-eff-${v}`
|
|
3162
|
-
))).filter((g) => g !== null);
|
|
3163
|
-
return p.length ? {
|
|
3164
|
-
sequenceId: r,
|
|
3165
|
-
triggerType: u,
|
|
3166
|
-
conditions: f,
|
|
3167
|
-
delay: l,
|
|
3168
|
-
offset: d,
|
|
3169
|
-
offsetEasing: m,
|
|
3170
|
-
effects: p
|
|
3171
|
-
} : null;
|
|
3172
|
-
}
|
|
3173
|
-
function ti(e) {
|
|
3174
|
-
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : fe(e);
|
|
3175
|
-
}
|
|
3176
|
-
function ni(e) {
|
|
3177
|
-
if (!e.length)
|
|
3178
|
-
return [];
|
|
3179
|
-
const t = e.map((i) => ({ ...i }));
|
|
3180
|
-
t[0].offset === void 0 && (t[0].offset = 0), t.length === 1 ? e[0].offset === void 0 && (t[0].offset = 1) : t[t.length - 1].offset === void 0 && (t[t.length - 1].offset = 1);
|
|
3181
|
-
let n = 0, s = t[0].offset;
|
|
3182
|
-
for (let i = 1; i < t.length; i++)
|
|
3183
|
-
if (t[i].offset !== void 0) {
|
|
3184
|
-
const o = t[i].offset;
|
|
3185
|
-
if (o < s)
|
|
3186
|
-
return console.error("Offsets must be monotonically non-decreasing"), [];
|
|
3187
|
-
if (o > 1)
|
|
3188
|
-
return console.error("Offsets must be in the range [0,1]"), [];
|
|
3189
|
-
const r = i - n;
|
|
3190
|
-
for (let a = n + 1; a < i; a++) {
|
|
3191
|
-
const c = (a - n) / r;
|
|
3192
|
-
t[a].offset = s + (o - s) * c;
|
|
3193
|
-
}
|
|
3194
|
-
n = i, s = o;
|
|
3195
|
-
}
|
|
3196
|
-
return t;
|
|
3197
|
-
}
|
|
3198
|
-
function si(e, t) {
|
|
3199
|
-
const n = Object.entries(e).filter(([s, i]) => s !== "offset" && i !== void 0 && i !== null).map(([s, i]) => `${ti(s)}: ${i};`).join(`
|
|
3200
|
-
`);
|
|
3201
|
-
return `${t}% {
|
|
3202
|
-
${n}
|
|
3203
|
-
}`;
|
|
3204
|
-
}
|
|
3205
|
-
function ii(e, t) {
|
|
3206
|
-
const n = ni(t);
|
|
3207
|
-
if (!n.length)
|
|
3208
|
-
return "";
|
|
3209
|
-
let s = n.map((i) => {
|
|
3210
|
-
const o = i.offset, r = Gs(o * 100);
|
|
3211
|
-
return si(i, r);
|
|
3212
|
-
}).join(`
|
|
3213
|
-
`);
|
|
3214
|
-
return `@keyframes ${e} {
|
|
3215
|
-
${s}
|
|
3216
|
-
}`;
|
|
3217
|
-
}
|
|
3218
|
-
function oi(e) {
|
|
3219
|
-
const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: a } = e;
|
|
3220
|
-
if (!s.length)
|
|
3221
|
-
return "";
|
|
3222
|
-
let c = `[data-interact-key="${t}"]`;
|
|
3223
|
-
if (o && o.length) {
|
|
3224
|
-
const l = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
|
|
3225
|
-
c = `${c}:is(${l})`;
|
|
3226
|
-
}
|
|
3227
|
-
n && (c = `${c} ${n}`), a && (c = `${c}${a}`), r && (c = ce(c, r));
|
|
3228
|
-
const f = s.map(({ name: l, value: d, important: m }) => `${l}: ${d}${m ? " !important" : ""};`).join(`
|
|
3229
|
-
`), u = `${c} {
|
|
3230
|
-
${f}
|
|
3231
|
-
}`;
|
|
3232
|
-
return i ? `@media ${i} {
|
|
3233
|
-
${u}
|
|
3234
|
-
}` : u;
|
|
3235
|
-
}
|
|
3236
|
-
const pe = [
|
|
3237
|
-
"animation",
|
|
3238
|
-
"animation-composition",
|
|
3239
|
-
"animation-timeline",
|
|
3240
|
-
"animation-range"
|
|
3241
|
-
], ke = [
|
|
3242
|
-
...pe,
|
|
3243
|
-
"transition"
|
|
3244
|
-
], Me = ["animation", "transition"];
|
|
3245
|
-
function Ae(e) {
|
|
3246
|
-
return e === "transition" ? "transition" : "animation";
|
|
3247
|
-
}
|
|
3248
|
-
const z = {
|
|
3249
|
-
transition: "_",
|
|
3250
|
-
animation: "none",
|
|
3251
|
-
"animation-composition": "replace",
|
|
3252
|
-
"animation-timeline": "auto",
|
|
3253
|
-
"animation-range": "normal"
|
|
3254
|
-
};
|
|
3255
|
-
function F(e, t, n = !1) {
|
|
3256
|
-
return `--${e.replace(new RegExp("(?<!(^|-))([aeiou]|tion)", "g"), "")}${n ? "-slot" : ""}-${t}`;
|
|
3257
|
-
}
|
|
3258
|
-
function ri(e, t, n, s) {
|
|
3259
|
-
return ke.flatMap((i) => [
|
|
3260
|
-
...Array.from(
|
|
3261
|
-
{ length: i === "transition" ? t : e },
|
|
3262
|
-
(o, r) => `@property ${F(i, r)} { syntax: "*"; inherits: false; initial-value: ${z[i]}; }`
|
|
3263
|
-
),
|
|
3264
|
-
...Array.from(
|
|
3265
|
-
{ length: i === "transition" ? s : n },
|
|
3266
|
-
(o, r) => `@property ${F(i, r, !0)} { syntax: "*"; inherits: false; initial-value: ${z[i]}; }`
|
|
3267
|
-
)
|
|
3268
|
-
]);
|
|
3269
|
-
}
|
|
3270
|
-
function ai(e, t, n) {
|
|
3271
|
-
const s = ke.filter(
|
|
3272
|
-
(r) => e[Ae(r)].slotsInSequence > 0
|
|
3273
|
-
);
|
|
3274
|
-
if (s.length === 0)
|
|
3275
|
-
return null;
|
|
3276
|
-
const i = s.map((r) => {
|
|
3277
|
-
const { listIndex: a, slotCursor: c, slotsInSequence: f } = e[Ae(r)];
|
|
3278
|
-
return {
|
|
3279
|
-
name: F(r, a),
|
|
3280
|
-
value: Array.from(
|
|
3281
|
-
{ length: f },
|
|
3282
|
-
(u, l) => `var(${F(r, c + l, !0)})`
|
|
3283
|
-
).join(", ")
|
|
3284
|
-
};
|
|
3285
|
-
}), o = { key: e.key, childSelector: e.childSelector, declarations: i };
|
|
3286
|
-
return t && (o.media = J(t, n || {}, "media"), o.selectorCondition = M(t, n || {})), o;
|
|
3287
|
-
}
|
|
3288
|
-
function ci(e, t, n) {
|
|
3289
|
-
if (e.length === 0)
|
|
3290
|
-
return "";
|
|
3291
|
-
const s = [
|
|
3292
|
-
...t <= 0 ? [] : pe,
|
|
3293
|
-
...n <= 0 ? [] : ["transition"]
|
|
3294
|
-
];
|
|
3295
|
-
if (s.length === 0)
|
|
3296
|
-
return "";
|
|
3297
|
-
const i = s.map((r) => ({
|
|
3298
|
-
name: r,
|
|
3299
|
-
value: Array.from(
|
|
3300
|
-
{ length: r === "transition" ? n : t },
|
|
3301
|
-
// TODO: maybe add `-intrct` to names? --anm-0 or --trns-0 could collide with user-defined names
|
|
3302
|
-
(a, c) => `var(${F(r, c)})`
|
|
3303
|
-
).join(", ")
|
|
3304
|
-
}));
|
|
3305
|
-
return `${e.map(
|
|
3306
|
-
({ key: r, childSelector: a }) => `[data-interact-key="${r}"]${a ? ` ${a}` : ""}`
|
|
3307
|
-
).join(", ")} {
|
|
3308
|
-
${i.map(({ name: r, value: a }) => ` ${r}: ${a};`).join(`
|
|
3309
|
-
`)}
|
|
3310
|
-
}`;
|
|
3311
|
-
}
|
|
3312
|
-
const ui = [
|
|
3313
|
-
{ name: "visibility", value: "hidden" },
|
|
3314
|
-
{ name: "transform", value: "none", important: !0 },
|
|
3315
|
-
{ name: "translate", value: "none", important: !0 },
|
|
3316
|
-
{ name: "scale", value: "none", important: !0 },
|
|
3317
|
-
{ name: "rotate", value: "none", important: !0 }
|
|
3318
|
-
], fi = { animation: !1, transition: !1 };
|
|
3319
|
-
function li(e, t) {
|
|
3320
|
-
const n = () => ({
|
|
3321
|
-
listIndex: 0,
|
|
3322
|
-
slotCursor: 0,
|
|
3323
|
-
slotsInInteraction: 0,
|
|
3324
|
-
slotsInSequence: 0,
|
|
3325
|
-
touched: !1
|
|
3326
|
-
});
|
|
3327
|
-
return {
|
|
3328
|
-
key: e,
|
|
3329
|
-
childSelector: t,
|
|
3330
|
-
assigned: /* @__PURE__ */ new Set(),
|
|
3331
|
-
animation: n(),
|
|
3332
|
-
transition: n()
|
|
3333
|
-
};
|
|
3334
|
-
}
|
|
3335
|
-
function di(e, t) {
|
|
3336
|
-
return Object.fromEntries(
|
|
3337
|
-
ke.map((n) => {
|
|
3338
|
-
const s = Ae(n), { listIndex: i, slotCursor: o, slotsInSequence: r } = e[s];
|
|
3339
|
-
return [
|
|
3340
|
-
n,
|
|
3341
|
-
t[s] ? F(n, o + r, !0) : F(n, i)
|
|
3342
|
-
];
|
|
3343
|
-
})
|
|
3344
|
-
);
|
|
3345
|
-
}
|
|
3346
|
-
function hi(e, t, n) {
|
|
3347
|
-
Me.forEach((s) => {
|
|
3348
|
-
t[s] && (e[s].touched = !0, n[s] && (e[s].slotsInSequence += 1));
|
|
3349
|
-
});
|
|
3350
|
-
}
|
|
3351
|
-
function mi(e) {
|
|
3352
|
-
const { namedEffect: t, keyframeEffect: n, transition: s, transitionProperties: i } = e;
|
|
3353
|
-
return t || n ? "animation" : s || i ? "transition" : null;
|
|
3354
|
-
}
|
|
3355
|
-
function pi(e) {
|
|
3356
|
-
const t = /* @__PURE__ */ new Map();
|
|
3357
|
-
return e.effects.forEach((n) => {
|
|
3358
|
-
const s = mi(n);
|
|
3359
|
-
if (!s)
|
|
3360
|
-
return;
|
|
3361
|
-
const i = ue(n), o = t.get(i) || { animation: 0, transition: 0 };
|
|
3362
|
-
o[s] += 1, t.set(i, o);
|
|
3363
|
-
}), new Map(
|
|
3364
|
-
[...t].map(([n, { animation: s, transition: i }]) => [
|
|
3365
|
-
n,
|
|
3366
|
-
{ animation: s > 1, transition: i > 1 }
|
|
3367
|
-
])
|
|
3368
|
-
);
|
|
3369
|
-
}
|
|
3370
|
-
function gi(e) {
|
|
3371
|
-
Me.forEach((t) => {
|
|
3372
|
-
const n = e[t];
|
|
3373
|
-
n.slotsInInteraction = Math.max(n.slotsInInteraction, n.slotsInSequence), n.slotsInSequence = 0;
|
|
3374
|
-
});
|
|
3375
|
-
}
|
|
3376
|
-
function vi(e) {
|
|
3377
|
-
Me.forEach((t) => {
|
|
3378
|
-
const n = e[t];
|
|
3379
|
-
n.listIndex += n.touched ? 1 : 0, n.slotCursor += n.slotsInInteraction, n.slotsInInteraction = 0, n.touched = !1;
|
|
3380
|
-
});
|
|
3381
|
-
}
|
|
3382
|
-
const yi = {
|
|
3383
|
-
animation: "animation",
|
|
3384
|
-
"animation-composition": "composition",
|
|
3385
|
-
"animation-timeline": "animationTimeline",
|
|
3386
|
-
"animation-range": "animationRange"
|
|
3387
|
-
};
|
|
3388
|
-
function Ei(e, t, n) {
|
|
3389
|
-
const { key: s, conditions: i } = t, o = J(i, e.configConditions, "media"), r = M(i, e.configConditions), a = D(t, {
|
|
3390
|
-
asCombinator: !0,
|
|
3391
|
-
useFirstChild: e.useFirstChild,
|
|
3392
|
-
addItemFilter: !0
|
|
3393
|
-
});
|
|
3394
|
-
return {
|
|
3395
|
-
key: s,
|
|
3396
|
-
media: o,
|
|
3397
|
-
selectorCondition: r,
|
|
3398
|
-
childSelector: a,
|
|
3399
|
-
declarations: [
|
|
3400
|
-
{
|
|
3401
|
-
name: "view-timeline",
|
|
3402
|
-
value: `--${n}`
|
|
3403
|
-
}
|
|
3404
|
-
]
|
|
3405
|
-
};
|
|
3406
|
-
}
|
|
3407
|
-
function Ot(e, t, n, s, i) {
|
|
3408
|
-
const o = [];
|
|
3409
|
-
for (const r of Object.keys(i)) {
|
|
3410
|
-
const a = `${pt}${r}`;
|
|
3411
|
-
a in t && o.push(
|
|
3412
|
-
...i[r](t[a], {
|
|
3413
|
-
key: n,
|
|
3414
|
-
scope: e,
|
|
3415
|
-
config: t
|
|
3416
|
-
}).map((c) => ({ ...c, key: n, media: s }))
|
|
3417
|
-
);
|
|
3418
|
-
}
|
|
3419
|
-
return o;
|
|
3420
|
-
}
|
|
3421
|
-
function wi(e, t, n, s, i, o) {
|
|
3422
|
-
const { assigned: r, childSelector: a } = n, c = { animation: !1, transition: !1 }, {
|
|
3423
|
-
key: f,
|
|
3424
|
-
effectId: u,
|
|
3425
|
-
conditions: l,
|
|
3426
|
-
namedEffect: d,
|
|
3427
|
-
keyframeEffect: m,
|
|
3428
|
-
transition: h,
|
|
3429
|
-
transitionProperties: p,
|
|
3430
|
-
initial: g
|
|
3431
|
-
} = t, v = J(l, e.configConditions, "media"), y = M(l, e.configConditions), E = [
|
|
3432
|
-
{
|
|
3433
|
-
key: f,
|
|
3434
|
-
media: v,
|
|
3435
|
-
selectorCondition: y,
|
|
3436
|
-
childSelector: a,
|
|
3437
|
-
declarations: []
|
|
3438
|
-
}
|
|
3439
|
-
];
|
|
3440
|
-
let $ = [];
|
|
3441
|
-
const { declarations: b } = E[0];
|
|
3442
|
-
if (e.plugins && E.push(...Ot("effect", t, f, v, e.plugins)), d || m) {
|
|
3443
|
-
const S = P(t), I = Cn(null, S, s, o).filter(
|
|
3444
|
-
(T) => T.name
|
|
3445
|
-
);
|
|
3446
|
-
$ = I.map((T) => ({
|
|
3447
|
-
name: T.name,
|
|
3448
|
-
keyframes: T.keyframes
|
|
3449
|
-
})), b.push(
|
|
3450
|
-
...I.flatMap(
|
|
3451
|
-
({ custom: T }) => Object.entries(T || {}).filter(([_, x]) => x !== void 0).map(([_, x]) => ({ name: _, value: x }))
|
|
3452
|
-
)
|
|
3453
|
-
);
|
|
3454
|
-
const O = pe.map((T) => ({
|
|
3455
|
-
_listPropertyName: T,
|
|
3456
|
-
name: i[T],
|
|
3457
|
-
value: I.map((_) => {
|
|
3458
|
-
const x = yi[T];
|
|
3459
|
-
return _[x] || z[T];
|
|
3460
|
-
}).join(", ")
|
|
3461
|
-
})).filter(
|
|
3462
|
-
({ _listPropertyName: T, name: _, value: x }) => x !== z[T] || r.has(_)
|
|
3463
|
-
);
|
|
3464
|
-
O.forEach(({ name: T }) => r.add(T)), c.animation = O.length > 0, g ? (E.push({
|
|
3465
|
-
key: f,
|
|
3466
|
-
media: v,
|
|
3467
|
-
selectorCondition: y,
|
|
3468
|
-
childSelector: a,
|
|
3469
|
-
declarations: ui,
|
|
3470
|
-
selectorSuffix: ":not([data-interact-enter])"
|
|
3471
|
-
}), E.push({
|
|
3472
|
-
key: f,
|
|
3473
|
-
media: v,
|
|
3474
|
-
selectorCondition: y,
|
|
3475
|
-
childSelector: a,
|
|
3476
|
-
declarations: O,
|
|
3477
|
-
selectorSuffix: ':not([data-interact-enter="done"])'
|
|
3478
|
-
})) : b.push(...O);
|
|
3479
|
-
} else if (h || p) {
|
|
3480
|
-
const S = gt(t), I = vt(t);
|
|
3481
|
-
(I.length || r.has(i.transition)) && (b.push({
|
|
3482
|
-
name: i.transition,
|
|
3483
|
-
value: I.join(", ") || z.transition
|
|
3484
|
-
}), r.add(i.transition), c.transition = !0), E.push({
|
|
3485
|
-
key: f,
|
|
3486
|
-
media: v,
|
|
3487
|
-
selectorCondition: y,
|
|
3488
|
-
childSelector: a,
|
|
3489
|
-
states: [u],
|
|
3490
|
-
declarations: S
|
|
3491
|
-
});
|
|
3492
|
-
} else
|
|
3493
|
-
b.push(
|
|
3494
|
-
...pe.filter(
|
|
3495
|
-
(S) => r.has(i[S])
|
|
3496
|
-
).map((S) => ({
|
|
3497
|
-
name: i[S],
|
|
3498
|
-
value: z[S]
|
|
3499
|
-
}))
|
|
3500
|
-
);
|
|
3501
|
-
return { rules: E.filter((S) => S.declarations.length), keyframes: $, wrote: c };
|
|
3502
|
-
}
|
|
3503
|
-
function _t(e, t, n, s, i, o) {
|
|
3504
|
-
const r = ue(t), a = e.targetsMap.get(r) || li(
|
|
3505
|
-
t.key,
|
|
3506
|
-
D(t, {
|
|
3507
|
-
asCombinator: !0,
|
|
3508
|
-
useFirstChild: e.useFirstChild,
|
|
3509
|
-
addItemFilter: !0
|
|
3510
|
-
})
|
|
3511
|
-
);
|
|
3512
|
-
s.add(r);
|
|
3513
|
-
const c = o?.get(r) || fi, f = di(a, c), { rules: u, keyframes: l, wrote: d } = wi(
|
|
3514
|
-
e,
|
|
3515
|
-
t,
|
|
3516
|
-
a,
|
|
3517
|
-
n,
|
|
3518
|
-
f,
|
|
3519
|
-
i
|
|
3520
|
-
);
|
|
3521
|
-
return l.forEach(({ name: m, keyframes: h }) => e.keyframesMap.set(m, h)), hi(a, d, c), e.targetsMap.set(r, a), u;
|
|
3522
|
-
}
|
|
3523
|
-
function $i(e, t, n, s) {
|
|
3524
|
-
const i = [], o = /* @__PURE__ */ new Set(), r = pi(t);
|
|
3525
|
-
i.push(
|
|
3526
|
-
...t.effects.flatMap(
|
|
3527
|
-
(c) => _t(e, c, n, o, t, r)
|
|
3528
|
-
)
|
|
3529
|
-
);
|
|
3530
|
-
const { conditions: a } = t;
|
|
3531
|
-
return o.forEach((c) => {
|
|
3532
|
-
s.add(c);
|
|
3533
|
-
const f = e.targetsMap.get(c), u = ai(f, a, e.configConditions);
|
|
3534
|
-
u && (u.declarations.forEach(({ name: l }) => f.assigned.add(l)), i.push(u)), gi(f);
|
|
3535
|
-
}), i;
|
|
3536
|
-
}
|
|
3537
|
-
function bi(e, t, n) {
|
|
3538
|
-
const { key: s, conditions: i, effects: o = [], sequences: r = [] } = t, a = e.plugins ? Ot(
|
|
3539
|
-
"interaction",
|
|
3540
|
-
t,
|
|
3541
|
-
s,
|
|
3542
|
-
J(i, e.configConditions, "media"),
|
|
3543
|
-
e.plugins
|
|
3544
|
-
) : [], { trigger: c } = t, f = {
|
|
3545
|
-
trigger: Vs(c),
|
|
3546
|
-
id: ["trigger", n].join("-")
|
|
3547
|
-
};
|
|
3548
|
-
c === "viewProgress" && a.push(Ei(e, t, f.id));
|
|
3549
|
-
const u = /* @__PURE__ */ new Set(), l = o.map(
|
|
3550
|
-
(m, h) => Ct(m, t, e.config, `eff-${n}-${h}`)
|
|
3551
|
-
).filter((m) => m !== null);
|
|
3552
|
-
a.push(
|
|
3553
|
-
...l.flatMap((m) => _t(e, m, f, u))
|
|
3554
|
-
);
|
|
3555
|
-
const d = r.map(
|
|
3556
|
-
(m, h) => ei(m, t, e.config, `seq-${n}-${h}`)
|
|
3557
|
-
).filter((m) => m !== null);
|
|
3558
|
-
return a.push(
|
|
3559
|
-
...d.flatMap(
|
|
3560
|
-
(m) => $i(e, m, f, u)
|
|
3561
|
-
)
|
|
3562
|
-
), u.forEach((m) => vi(e.targetsMap.get(m))), a;
|
|
3563
|
-
}
|
|
3564
|
-
function Si(e = {}) {
|
|
3565
|
-
const { useFirstChild: t = !0, plugins: n } = typeof e == "boolean" ? { useFirstChild: e, plugins: void 0 } : e;
|
|
3566
|
-
return { useFirstChild: t, plugins: n };
|
|
3567
|
-
}
|
|
3568
|
-
function Ii(e, t) {
|
|
3569
|
-
const { useFirstChild: n, plugins: s } = Si(t), i = {
|
|
3570
|
-
config: e,
|
|
3571
|
-
configConditions: e.conditions || {},
|
|
3572
|
-
targetsMap: /* @__PURE__ */ new Map(),
|
|
3573
|
-
keyframesMap: /* @__PURE__ */ new Map(),
|
|
3574
|
-
useFirstChild: n,
|
|
3575
|
-
plugins: s
|
|
3576
|
-
}, o = e.interactions.flatMap(
|
|
3577
|
-
(m, h) => bi(i, m, h)
|
|
3578
|
-
), r = [...i.targetsMap.values()], a = Math.max(0, ...r.map(({ animation: m }) => m.listIndex)), c = Math.max(0, ...r.map(({ transition: m }) => m.listIndex)), f = ci(r, a, c), u = Math.max(0, ...r.map(({ animation: m }) => m.slotCursor)), l = Math.max(
|
|
3579
|
-
0,
|
|
3580
|
-
...r.map(({ transition: m }) => m.slotCursor)
|
|
3581
|
-
), d = ri(
|
|
3582
|
-
a,
|
|
3583
|
-
c,
|
|
3584
|
-
u,
|
|
3585
|
-
l
|
|
3586
|
-
);
|
|
3587
|
-
return { keyframes: i.keyframesMap, atProperty: d, cssRules: o, listsRule: f };
|
|
3588
|
-
}
|
|
3589
|
-
function Oi(e, t) {
|
|
3590
|
-
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o } = Ii(e, t);
|
|
3591
|
-
return [
|
|
3592
|
-
...i,
|
|
3593
|
-
...[...s.entries()].map(([a, c]) => ii(a, c)),
|
|
3594
|
-
...n.map(oi),
|
|
3595
|
-
o
|
|
3596
|
-
].filter((a) => a).join(`
|
|
3597
|
-
`);
|
|
3598
|
-
}
|
|
3599
3688
|
export {
|
|
3600
|
-
|
|
3689
|
+
Ai as I,
|
|
3601
3690
|
w as a,
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3691
|
+
qi as b,
|
|
3692
|
+
ki as g,
|
|
3693
|
+
Mi as r
|
|
3605
3694
|
};
|
|
3606
|
-
//# sourceMappingURL=index-
|
|
3695
|
+
//# sourceMappingURL=index-52_TK7E2.mjs.map
|