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