@wix/interact 2.8.0 → 2.8.2
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-CHEx5VT7.mjs → index-CXd-XY1L.mjs} +233 -221
- package/dist/index-CXd-XY1L.mjs.map +1 -0
- package/dist/{index-DDOkQ8gk.js → index-CeIuoLxG.js} +7 -7
- package/dist/index-CeIuoLxG.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/handlers/effectHandlers.d.ts +2 -2
- package/dist/types/handlers/effectHandlers.d.ts.map +1 -1
- package/dist/types/handlers/eventTrigger.d.ts.map +1 -1
- package/dist/types/types/handlers.d.ts +4 -0
- package/dist/types/types/handlers.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/index-CHEx5VT7.mjs.map +0 -1
- package/dist/index-DDOkQ8gk.js.map +0 -1
|
@@ -153,14 +153,14 @@ const $t = (e) => e, pn = (e) => 1 - Math.cos(e * Math.PI / 2), gn = (e) => Math
|
|
|
153
153
|
if (a === 0)
|
|
154
154
|
f = r === 0 ? `(${e} / ${o})` : `((sqrt(max(0, ${o * o} + ${4 * r} * ${e})) - ${o}) / ${2 * r})`;
|
|
155
155
|
else {
|
|
156
|
-
const d = r / (3 * a),
|
|
156
|
+
const d = r / (3 * a), m = 2 * Math.pow(r, 3) - 9 * o * r * a, p = 54 * Math.pow(a, 3), h = (3 * a * o - r * r) / (9 * a * a), g = `((${m} - ${27 * a * a} * ${e}) / ${p})`;
|
|
157
157
|
if (h < 0) {
|
|
158
158
|
const v = 2 * Math.sqrt(-h);
|
|
159
159
|
let y = 0;
|
|
160
160
|
for (const E of [0, 1, 2])
|
|
161
161
|
[0, 0.25, 0.5, 0.75, 1].every((S) => {
|
|
162
162
|
const T = Math.min(
|
|
163
|
-
Math.max(2 * (
|
|
163
|
+
Math.max(2 * (m - 27 * a * a * S) / (p * h * v), -1),
|
|
164
164
|
1
|
|
165
165
|
), I = v * Math.cos((Math.acos(T) - E * 2 * Math.PI) / 3) - d;
|
|
166
166
|
return I >= -1e-6 && I <= 1.000001;
|
|
@@ -275,11 +275,11 @@ function me(e) {
|
|
|
275
275
|
return e ? tt[e] || e : tt.linear;
|
|
276
276
|
}
|
|
277
277
|
function Wn(e, t, n, s) {
|
|
278
|
-
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, l = 3 * (s - t) - a, u = 1 - a - l, c = (
|
|
279
|
-
function p
|
|
280
|
-
let h =
|
|
278
|
+
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, l = 3 * (s - t) - a, u = 1 - a - l, c = (p) => ((r * p + o) * p + i) * p, f = (p) => ((u * p + l) * p + a) * p, d = (p) => (3 * r * p + 2 * o) * p + i;
|
|
279
|
+
function m(p) {
|
|
280
|
+
let h = p;
|
|
281
281
|
for (let y = 0; y < 8; y++) {
|
|
282
|
-
const $ = c(h) -
|
|
282
|
+
const $ = c(h) - p;
|
|
283
283
|
if (Math.abs($) < 1e-7) return h;
|
|
284
284
|
const E = d(h);
|
|
285
285
|
if (Math.abs(E) < 1e-6) break;
|
|
@@ -288,12 +288,12 @@ function Wn(e, t, n, s) {
|
|
|
288
288
|
let g = 0, v = 1;
|
|
289
289
|
for (h = (g + v) / 2; v - g > 1e-7; ) {
|
|
290
290
|
const y = c(h);
|
|
291
|
-
if (Math.abs(y -
|
|
292
|
-
|
|
291
|
+
if (Math.abs(y - p) < 1e-7) return h;
|
|
292
|
+
p > y ? g = h : v = h, h = (g + v) / 2;
|
|
293
293
|
}
|
|
294
294
|
return h;
|
|
295
295
|
}
|
|
296
|
-
return (
|
|
296
|
+
return (p) => p <= 0 ? 0 : p >= 1 ? 1 : f(m(p));
|
|
297
297
|
}
|
|
298
298
|
function It(e) {
|
|
299
299
|
const t = e.match(
|
|
@@ -430,12 +430,12 @@ class Xn extends ie {
|
|
|
430
430
|
i.animations.forEach((r, a) => {
|
|
431
431
|
const l = r.effect;
|
|
432
432
|
if (!l) return;
|
|
433
|
-
const { delay: u, duration: c, iterations: f } = this.timingOptions[o][a], d = u + t[o],
|
|
433
|
+
const { delay: u, duration: c, iterations: f } = this.timingOptions[o][a], d = u + t[o], m = n - (d + c * f);
|
|
434
434
|
if (i.isCSS && this.sequenceId) {
|
|
435
|
-
const { target:
|
|
436
|
-
|
|
435
|
+
const { target: p } = l;
|
|
436
|
+
p instanceof HTMLElement && (p.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), p.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), l.updateTiming({ endDelay: m });
|
|
437
437
|
} else
|
|
438
|
-
l.updateTiming({ delay: d + this.delay, endDelay:
|
|
438
|
+
l.updateTiming({ delay: d + this.delay, endDelay: m });
|
|
439
439
|
});
|
|
440
440
|
});
|
|
441
441
|
}
|
|
@@ -742,15 +742,15 @@ function Jn() {
|
|
|
742
742
|
c.scheduled || (c.scheduled = !0, c.raf(r.bind(null, c)));
|
|
743
743
|
}
|
|
744
744
|
function r(c) {
|
|
745
|
-
var f = c.writes, d = c.reads,
|
|
745
|
+
var f = c.writes, d = c.reads, m;
|
|
746
746
|
try {
|
|
747
747
|
n("flushing reads", d.length), c.runTasks(d), n("flushing writes", f.length), c.runTasks(f);
|
|
748
|
-
} catch (
|
|
749
|
-
|
|
748
|
+
} catch (p) {
|
|
749
|
+
m = p;
|
|
750
750
|
}
|
|
751
|
-
if (c.scheduled = !1, (d.length || f.length) && o(c),
|
|
752
|
-
if (n("task errored",
|
|
753
|
-
else throw
|
|
751
|
+
if (c.scheduled = !1, (d.length || f.length) && o(c), m)
|
|
752
|
+
if (n("task errored", m.message), c.catch) c.catch(m);
|
|
753
|
+
else throw m;
|
|
754
754
|
}
|
|
755
755
|
function a(c, f) {
|
|
756
756
|
var d = c.indexOf(f);
|
|
@@ -866,16 +866,16 @@ function At(e, t, n, s, i) {
|
|
|
866
866
|
...t,
|
|
867
867
|
namedEffect: { id: "", type: "CustomMouse" }
|
|
868
868
|
});
|
|
869
|
-
const
|
|
869
|
+
const m = te(
|
|
870
870
|
d
|
|
871
|
-
),
|
|
872
|
-
|
|
871
|
+
), p = ot(
|
|
872
|
+
m,
|
|
873
873
|
t,
|
|
874
874
|
o,
|
|
875
875
|
n,
|
|
876
876
|
s
|
|
877
877
|
);
|
|
878
|
-
return typeof
|
|
878
|
+
return typeof p != "function" ? null : p(o);
|
|
879
879
|
}
|
|
880
880
|
const r = te(t), a = ot(
|
|
881
881
|
r,
|
|
@@ -892,22 +892,25 @@ function At(e, t, n, s, i) {
|
|
|
892
892
|
c && window.ViewTimeline && (u = new ViewTimeline({
|
|
893
893
|
subject: n.element || Y(n.componentId)
|
|
894
894
|
}));
|
|
895
|
-
const f = l.map(({ effect: d, options:
|
|
896
|
-
const g = h ? Ot(o, h) : o, v = new KeyframeEffect(g || null, [],
|
|
895
|
+
const f = l.map(({ effect: d, options: m, id: p, part: h }) => {
|
|
896
|
+
const g = h ? Ot(o, h) : o, v = new KeyframeEffect(g || null, [], m);
|
|
897
897
|
_.mutate(() => {
|
|
898
898
|
"timing" in d && v.updateTiming(d.timing), v.setKeyframes(bt(d.keyframes));
|
|
899
899
|
});
|
|
900
900
|
const y = c && u ? { timeline: u } : {}, $ = typeof d.customEffect == "function" ? new Qn(
|
|
901
901
|
d.customEffect,
|
|
902
902
|
g || null,
|
|
903
|
-
|
|
903
|
+
m,
|
|
904
904
|
y
|
|
905
905
|
) : new Animation(v, y.timeline);
|
|
906
906
|
if (c)
|
|
907
907
|
if (u)
|
|
908
908
|
_.mutate(() => {
|
|
909
|
-
|
|
910
|
-
|
|
909
|
+
if (g) {
|
|
910
|
+
const { start: E, end: b } = Mt(d);
|
|
911
|
+
$.rangeStart = E, $.rangeEnd = b;
|
|
912
|
+
}
|
|
913
|
+
$.play();
|
|
911
914
|
});
|
|
912
915
|
else {
|
|
913
916
|
const { startOffset: E, endOffset: b } = t;
|
|
@@ -927,7 +930,7 @@ function At(e, t, n, s, i) {
|
|
|
927
930
|
});
|
|
928
931
|
});
|
|
929
932
|
}
|
|
930
|
-
return
|
|
933
|
+
return p && ($.id = p), $;
|
|
931
934
|
});
|
|
932
935
|
return f.length > 1 && f.forEach((d) => d.persist?.()), new ie(f, {
|
|
933
936
|
...t,
|
|
@@ -937,17 +940,17 @@ function At(e, t, n, s, i) {
|
|
|
937
940
|
});
|
|
938
941
|
}
|
|
939
942
|
function ss(e, t, n) {
|
|
940
|
-
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: l } = e.options, u = e.effect.name, c = s === "auto", { sequenceId: f, delay: d, offset:
|
|
943
|
+
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: l } = e.options, u = e.effect.name, c = s === "auto", { sequenceId: f, delay: d, offset: m, offsetEasing: p = "linear" } = n || {};
|
|
941
944
|
let h = `${i ?? 0}ms`;
|
|
942
|
-
if (f && typeof
|
|
943
|
-
const g = Kn(
|
|
945
|
+
if (f && typeof p == "string") {
|
|
946
|
+
const g = Kn(p);
|
|
944
947
|
if (g) {
|
|
945
948
|
const v = (i ?? 0) + (d ?? 0);
|
|
946
|
-
if (
|
|
949
|
+
if (m) {
|
|
947
950
|
const y = g(
|
|
948
951
|
`(var(--motion-${f}-index, 0) / var(--motion-${f}-last, 1))`
|
|
949
952
|
);
|
|
950
|
-
h = `calc(${`(${v} + ${y} * ${
|
|
953
|
+
h = `calc(${`(${v} + ${y} * ${m} * var(--motion-${f}-last, 1))`} * 1ms)`;
|
|
951
954
|
} else
|
|
952
955
|
h = `${v}ms`;
|
|
953
956
|
}
|
|
@@ -1023,9 +1026,9 @@ function Rt(e, t, n, s = {}) {
|
|
|
1023
1026
|
getProgress() {
|
|
1024
1027
|
return a.getProgress();
|
|
1025
1028
|
},
|
|
1026
|
-
effect(d,
|
|
1027
|
-
const { activeDuration:
|
|
1028
|
-
f.currentTime = ((h || 0) + (
|
|
1029
|
+
effect(d, m) {
|
|
1030
|
+
const { activeDuration: p } = f.effect.getComputedTiming(), { delay: h } = f.effect.getTiming();
|
|
1031
|
+
f.currentTime = ((h || 0) + (p || 0)) * m;
|
|
1029
1032
|
},
|
|
1030
1033
|
disabled: i,
|
|
1031
1034
|
destroy() {
|
|
@@ -1033,24 +1036,24 @@ function Rt(e, t, n, s = {}) {
|
|
|
1033
1036
|
}
|
|
1034
1037
|
}));
|
|
1035
1038
|
} else if (n.trigger === "pointer-move") {
|
|
1036
|
-
const u = t, { centeredToTarget: c, transitionDuration: f, transitionEasing: d } = u,
|
|
1039
|
+
const u = t, { centeredToTarget: c, transitionDuration: f, transitionEasing: d } = u, m = n.axis;
|
|
1037
1040
|
if (u.keyframeEffect) {
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1041
|
+
const p = a;
|
|
1042
|
+
return p.animations?.length === 0 ? null : {
|
|
1040
1043
|
target: (typeof e == "string" ? Y(e) : e) ?? void 0,
|
|
1041
1044
|
centeredToTarget: c,
|
|
1042
|
-
ready:
|
|
1045
|
+
ready: p.ready,
|
|
1043
1046
|
_currentProgress: 0,
|
|
1044
1047
|
getProgress() {
|
|
1045
1048
|
return this._currentProgress;
|
|
1046
1049
|
},
|
|
1047
1050
|
effect(g, v) {
|
|
1048
|
-
const y =
|
|
1049
|
-
this._currentProgress = y,
|
|
1051
|
+
const y = m === "x" ? v.x : v.y;
|
|
1052
|
+
this._currentProgress = y, p.progress(y);
|
|
1050
1053
|
},
|
|
1051
1054
|
disabled: i ?? !1,
|
|
1052
1055
|
destroy() {
|
|
1053
|
-
|
|
1056
|
+
p.cancel();
|
|
1054
1057
|
}
|
|
1055
1058
|
};
|
|
1056
1059
|
}
|
|
@@ -1172,8 +1175,8 @@ function hs({
|
|
|
1172
1175
|
transition: n,
|
|
1173
1176
|
transitionProperties: s
|
|
1174
1177
|
}), a = xt({ transition: n, transitionProperties: s }).map(
|
|
1175
|
-
(
|
|
1176
|
-
), l = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, c = `[data-interact-effect~="${t}"] ${i}`, f = o ? ge(u, o) : u, d = o ? ge(c, o) : c,
|
|
1178
|
+
(p) => `${p.name}: ${p.value};`
|
|
1179
|
+
), l = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, c = `[data-interact-effect~="${t}"] ${i}`, f = o ? ge(u, o) : u, d = o ? ge(c, o) : c, m = [
|
|
1177
1180
|
`${f},
|
|
1178
1181
|
${d} {
|
|
1179
1182
|
${a.join(`
|
|
@@ -1181,12 +1184,12 @@ function hs({
|
|
|
1181
1184
|
}`
|
|
1182
1185
|
];
|
|
1183
1186
|
if (r.length) {
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1187
|
+
const p = `[data-interact-key="${l}"] ${i}`, h = o ? ge(p, o) : p;
|
|
1188
|
+
m.push(`${h} {
|
|
1186
1189
|
transition: ${r.join(", ")};
|
|
1187
1190
|
}`);
|
|
1188
1191
|
}
|
|
1189
|
-
return
|
|
1192
|
+
return m;
|
|
1190
1193
|
}
|
|
1191
1194
|
function re(e, t, n) {
|
|
1192
1195
|
const s = (e || []).filter((i) => t[i]?.type === n && t[i].predicate).map((i) => t[i].predicate).join(") and (");
|
|
@@ -1314,20 +1317,20 @@ function Gt(e, t, n, s, i = {}) {
|
|
|
1314
1317
|
const { effects: o = {}, conditions: r = {} } = n, { key: a, trigger: l, conditions: u = [] } = t, c = l === "pointerMove";
|
|
1315
1318
|
e.effectId || (e.effectId = s || ne());
|
|
1316
1319
|
const { effectId: f } = e, d = { ...o[f] || {}, ...e };
|
|
1317
|
-
let { key:
|
|
1318
|
-
if (!
|
|
1320
|
+
let { key: m, conditions: p, triggerType: h } = d;
|
|
1321
|
+
if (!m) {
|
|
1319
1322
|
if (!a)
|
|
1320
1323
|
return null;
|
|
1321
|
-
|
|
1324
|
+
m = a;
|
|
1322
1325
|
}
|
|
1323
|
-
if (fs(
|
|
1326
|
+
if (fs(m))
|
|
1324
1327
|
return null;
|
|
1325
1328
|
const g = u.filter(
|
|
1326
1329
|
(S) => r[S].type === "media"
|
|
1327
1330
|
);
|
|
1328
|
-
|
|
1331
|
+
p = [
|
|
1329
1332
|
...new Set(
|
|
1330
|
-
[...
|
|
1333
|
+
[...p || [], ...g].filter(
|
|
1331
1334
|
(S) => r[S]
|
|
1332
1335
|
)
|
|
1333
1336
|
)
|
|
@@ -1339,7 +1342,7 @@ function Gt(e, t, n, s, i = {}) {
|
|
|
1339
1342
|
}
|
|
1340
1343
|
if (!Es(d, c))
|
|
1341
1344
|
return null;
|
|
1342
|
-
const $ = { ...d, key:
|
|
1345
|
+
const $ = { ...d, key: m, conditions: p, effectId: f, triggerType: h }, E = { ...$, initial: mn(t, $) }, b = zt(
|
|
1343
1346
|
E,
|
|
1344
1347
|
Te(
|
|
1345
1348
|
d.reducedMotionPolicy,
|
|
@@ -1360,29 +1363,29 @@ function ws(e, t, n, s, i, o = {}) {
|
|
|
1360
1363
|
o.defaultPolicy
|
|
1361
1364
|
);
|
|
1362
1365
|
let {
|
|
1363
|
-
effects:
|
|
1364
|
-
conditions:
|
|
1366
|
+
effects: m,
|
|
1367
|
+
conditions: p,
|
|
1365
1368
|
triggerType: h,
|
|
1366
1369
|
delay: g = 0,
|
|
1367
1370
|
offset: v = 0,
|
|
1368
1371
|
offsetEasing: y = "linear"
|
|
1369
1372
|
} = f;
|
|
1370
|
-
if (typeof y == "function" || !
|
|
1373
|
+
if (typeof y == "function" || !m)
|
|
1371
1374
|
return null;
|
|
1372
1375
|
h || (h = Ht.get(l));
|
|
1373
1376
|
const $ = u.filter(
|
|
1374
1377
|
(S) => a[S].type === "media"
|
|
1375
1378
|
);
|
|
1376
|
-
|
|
1379
|
+
p = [
|
|
1377
1380
|
...new Set(
|
|
1378
|
-
[...
|
|
1381
|
+
[...p || [], ...$].filter(
|
|
1379
1382
|
(S) => a[S]
|
|
1380
1383
|
)
|
|
1381
1384
|
)
|
|
1382
1385
|
];
|
|
1383
|
-
const b =
|
|
1386
|
+
const b = m.map((S, T) => {
|
|
1384
1387
|
const I = Gt(
|
|
1385
|
-
{ ...S, triggerType: h, conditions: [...S.conditions || [], ...
|
|
1388
|
+
{ ...S, triggerType: h, conditions: [...S.conditions || [], ...p] },
|
|
1386
1389
|
t,
|
|
1387
1390
|
n,
|
|
1388
1391
|
`${c}-eff-${T}`,
|
|
@@ -1393,7 +1396,7 @@ function ws(e, t, n, s, i, o = {}) {
|
|
|
1393
1396
|
return b.length ? {
|
|
1394
1397
|
sequenceId: c,
|
|
1395
1398
|
triggerType: h,
|
|
1396
|
-
conditions:
|
|
1399
|
+
conditions: p,
|
|
1397
1400
|
delay: g,
|
|
1398
1401
|
offset: v,
|
|
1399
1402
|
offsetEasing: y,
|
|
@@ -1456,7 +1459,7 @@ function Ts(e) {
|
|
|
1456
1459
|
l = `${l}:is(${f})`;
|
|
1457
1460
|
}
|
|
1458
1461
|
n && (l = `${l} ${n}`), a && (l = `${l}${a}`), r && (l = ge(l, r));
|
|
1459
|
-
const u = s.map(({ name: f, value: d, important:
|
|
1462
|
+
const u = s.map(({ name: f, value: d, important: m }) => `${f}: ${d}${m ? " !important" : ""};`).join(`
|
|
1460
1463
|
`), c = `${l} {
|
|
1461
1464
|
${u}
|
|
1462
1465
|
}`;
|
|
@@ -1750,8 +1753,8 @@ function Ns(e, t, n, s, i, o) {
|
|
|
1750
1753
|
key: c,
|
|
1751
1754
|
effectId: f,
|
|
1752
1755
|
conditions: d,
|
|
1753
|
-
namedEffect:
|
|
1754
|
-
keyframeEffect:
|
|
1756
|
+
namedEffect: m,
|
|
1757
|
+
keyframeEffect: p,
|
|
1755
1758
|
transition: h,
|
|
1756
1759
|
transitionProperties: g,
|
|
1757
1760
|
initial: v
|
|
@@ -1768,7 +1771,7 @@ function Ns(e, t, n, s, i, o) {
|
|
|
1768
1771
|
const { declarations: S } = E[0];
|
|
1769
1772
|
e.plugins && E.push(...Ut("effect", t, c, y, e.plugins));
|
|
1770
1773
|
const T = v && t.duration === 0;
|
|
1771
|
-
if ((
|
|
1774
|
+
if ((m || p) && !T) {
|
|
1772
1775
|
const I = N(t), P = os(null, I, s, o).filter(
|
|
1773
1776
|
(O) => O.name
|
|
1774
1777
|
), k = P.length ? {} : { "": [] };
|
|
@@ -1881,7 +1884,7 @@ function Kt(e, t, n, s, i, o) {
|
|
|
1881
1884
|
{ animation: f === "animation", transition: f === "transition", timeline: !1 },
|
|
1882
1885
|
l
|
|
1883
1886
|
), e.targetsMap.set(r, a), [];
|
|
1884
|
-
const d = a.assigned,
|
|
1887
|
+
const d = a.assigned, m = c.map((h) => (h.namedEffect && (h.suffix = e.keyframeSlots.get(t.slotKey)), a.assigned = new Set(d), {
|
|
1885
1888
|
...Ns(
|
|
1886
1889
|
e,
|
|
1887
1890
|
h,
|
|
@@ -1892,13 +1895,13 @@ function Kt(e, t, n, s, i, o) {
|
|
|
1892
1895
|
),
|
|
1893
1896
|
assigned: a.assigned
|
|
1894
1897
|
}));
|
|
1895
|
-
a.assigned = new Set(
|
|
1898
|
+
a.assigned = new Set(m.flatMap((h) => [...h.assigned])), m.forEach(
|
|
1896
1899
|
({ keyframes: h }) => h.forEach(({ name: g, keyframes: v }) => e.keyframesMap.set(g, v))
|
|
1897
1900
|
);
|
|
1898
|
-
const
|
|
1899
|
-
Ce.map((h) => [h,
|
|
1901
|
+
const p = Object.fromEntries(
|
|
1902
|
+
Ce.map((h) => [h, m.some((g) => g.wrote[h])])
|
|
1900
1903
|
);
|
|
1901
|
-
return je(a,
|
|
1904
|
+
return je(a, p, l), e.targetsMap.set(r, a), m.flatMap(({ rules: h }) => h);
|
|
1902
1905
|
}
|
|
1903
1906
|
function zs(e, t, n, s) {
|
|
1904
1907
|
const i = [], o = /* @__PURE__ */ new Set(), r = qs(t);
|
|
@@ -1926,34 +1929,34 @@ function Hs(e, t, n) {
|
|
|
1926
1929
|
id: J("trigger", [n], e.configIndex)
|
|
1927
1930
|
}, c = /* @__PURE__ */ new Set();
|
|
1928
1931
|
l === "viewProgress" && a.push(xs(e, t, u.id, c));
|
|
1929
|
-
const f = o.map((
|
|
1932
|
+
const f = o.map((m, p) => {
|
|
1930
1933
|
const h = Gt(
|
|
1931
|
-
|
|
1934
|
+
m,
|
|
1932
1935
|
t,
|
|
1933
1936
|
e.config,
|
|
1934
|
-
J("eff", [n,
|
|
1937
|
+
J("eff", [n, p], e.configIndex),
|
|
1935
1938
|
{ force: e.forceReducedMotion, defaultPolicy: e.reducedMotionPolicy }
|
|
1936
1939
|
);
|
|
1937
|
-
return h && Object.assign(h, { slotKey: Ee(n,
|
|
1938
|
-
}).filter((
|
|
1940
|
+
return h && Object.assign(h, { slotKey: Ee(n, p) });
|
|
1941
|
+
}).filter((m) => m !== null);
|
|
1939
1942
|
a.push(
|
|
1940
|
-
...f.flatMap((
|
|
1943
|
+
...f.flatMap((m) => Kt(e, m, u, c))
|
|
1941
1944
|
);
|
|
1942
1945
|
const d = r.map(
|
|
1943
|
-
(
|
|
1944
|
-
|
|
1946
|
+
(m, p) => ws(
|
|
1947
|
+
m,
|
|
1945
1948
|
t,
|
|
1946
1949
|
e.config,
|
|
1947
|
-
J("seq", [n,
|
|
1948
|
-
(h) => Ee(n, h,
|
|
1950
|
+
J("seq", [n, p], e.configIndex),
|
|
1951
|
+
(h) => Ee(n, h, p),
|
|
1949
1952
|
{ force: e.forceReducedMotion, defaultPolicy: e.reducedMotionPolicy }
|
|
1950
1953
|
)
|
|
1951
|
-
).filter((
|
|
1954
|
+
).filter((m) => m !== null);
|
|
1952
1955
|
return a.push(
|
|
1953
1956
|
...d.flatMap(
|
|
1954
|
-
(
|
|
1957
|
+
(m) => zs(e, m, u, c)
|
|
1955
1958
|
)
|
|
1956
|
-
), l === "viewProgress" && c.size > 1 && e.scopedTimelines.push(`--${u.id}`), c.forEach((
|
|
1959
|
+
), l === "viewProgress" && c.size > 1 && e.scopedTimelines.push(`--${u.id}`), c.forEach((m) => Ls(e.targetsMap.get(m))), a;
|
|
1957
1960
|
}
|
|
1958
1961
|
function Gs(e = {}) {
|
|
1959
1962
|
return typeof e == "boolean" ? { useFirstChild: e } : e;
|
|
@@ -2004,18 +2007,18 @@ function Qt(e, t = {}) {
|
|
|
2004
2007
|
}), s;
|
|
2005
2008
|
}
|
|
2006
2009
|
function Ws(e, t) {
|
|
2007
|
-
const { ctx: n, cssRules: s } = Xt(e, Gs(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation:
|
|
2008
|
-
i.flatMap((
|
|
2009
|
-
|
|
2010
|
-
...[...
|
|
2010
|
+
const { ctx: n, cssRules: s } = Xt(e, Gs(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: m }) => m.listIndex)), r = Math.max(0, ...i.map(({ transition: m }) => m.listIndex)), a = Math.max(0, ...i.map(({ timeline: m }) => m.listIndex)), l = _s(
|
|
2011
|
+
i.flatMap((m) => [
|
|
2012
|
+
m,
|
|
2013
|
+
...[...m.partSelectors].map((p) => ({ key: m.key, childSelector: p }))
|
|
2011
2014
|
]),
|
|
2012
2015
|
o,
|
|
2013
2016
|
r,
|
|
2014
2017
|
a,
|
|
2015
2018
|
n.configIndex
|
|
2016
|
-
), u = Math.max(0, ...i.map(({ animation:
|
|
2019
|
+
), u = Math.max(0, ...i.map(({ animation: m }) => m.slotCursor)), c = Math.max(
|
|
2017
2020
|
0,
|
|
2018
|
-
...i.map(({ transition:
|
|
2021
|
+
...i.map(({ transition: m }) => m.slotCursor)
|
|
2019
2022
|
), f = Cs(
|
|
2020
2023
|
o,
|
|
2021
2024
|
r,
|
|
@@ -2090,8 +2093,8 @@ function en(e, t = !1) {
|
|
|
2090
2093
|
const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
|
|
2091
2094
|
d && c * d > f && _.mutate(() => {
|
|
2092
2095
|
o.unobserve(l);
|
|
2093
|
-
const
|
|
2094
|
-
X.set(l,
|
|
2096
|
+
const p = en(e, !0);
|
|
2097
|
+
X.set(l, p), p.observe(l);
|
|
2095
2098
|
});
|
|
2096
2099
|
});
|
|
2097
2100
|
return;
|
|
@@ -2196,20 +2199,20 @@ function qe(e, t, n, s, i) {
|
|
|
2196
2199
|
const u = a.sticky;
|
|
2197
2200
|
if (u) {
|
|
2198
2201
|
if ("end" in u && e[l - 1]?.element) {
|
|
2199
|
-
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + u.end - s,
|
|
2202
|
+
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + u.end - s, m = o + d - a.offset, p = m < r.start, h = !p && m <= n;
|
|
2200
2203
|
let g = 0;
|
|
2201
|
-
(
|
|
2204
|
+
(p || h) && (g = a.offset, r.end += g), p && (r.start += g);
|
|
2202
2205
|
}
|
|
2203
2206
|
if ("start" in u) {
|
|
2204
2207
|
const c = o - u.start, f = c < r.start, d = !f && c <= r.end;
|
|
2205
|
-
let
|
|
2206
|
-
const
|
|
2207
|
-
if (
|
|
2208
|
+
let m = 0;
|
|
2209
|
+
const p = e[l - 1]?.element;
|
|
2210
|
+
if (p) {
|
|
2208
2211
|
if (f || d) {
|
|
2209
|
-
const h = (i ?
|
|
2210
|
-
|
|
2212
|
+
const h = (i ? p.offsetWidth : p.offsetHeight) || 0, g = a.offset, v = (i ? a.element.offsetWidth : a.element.offsetHeight) || 0;
|
|
2213
|
+
m = h - (g + v), o += m, r.end += m;
|
|
2211
2214
|
}
|
|
2212
|
-
f && (r.start +=
|
|
2215
|
+
f && (r.start += m);
|
|
2213
2216
|
}
|
|
2214
2217
|
}
|
|
2215
2218
|
}
|
|
@@ -2217,24 +2220,24 @@ function qe(e, t, n, s, i) {
|
|
|
2217
2220
|
}
|
|
2218
2221
|
function si(e, t, n, s, i, o) {
|
|
2219
2222
|
const { start: r, end: a, duration: l } = e;
|
|
2220
|
-
let u = r, c = a, f = e.startRange, d = e.endRange,
|
|
2223
|
+
let u = r, c = a, f = e.startRange, d = e.endRange, m;
|
|
2221
2224
|
if (typeof l == "string") {
|
|
2222
|
-
f = { name: l, offset: 0 }, d = { name: l, offset: 100 }, u = H(f, n, t), c = H(d, n, t),
|
|
2223
|
-
const
|
|
2224
|
-
u =
|
|
2225
|
+
f = { name: l, offset: 0 }, d = { name: l, offset: 100 }, u = H(f, n, t), c = H(d, n, t), m = c - u;
|
|
2226
|
+
const p = qe(o, u, c, n, s);
|
|
2227
|
+
u = p.start, c = p.end;
|
|
2225
2228
|
} else {
|
|
2226
2229
|
if (f || r?.name) {
|
|
2227
2230
|
f = f || r;
|
|
2228
|
-
const
|
|
2229
|
-
u = v.start + f.offset / 100 * (v.end - v.start) +
|
|
2231
|
+
const p = $e(f.add, i), h = H({ ...f, offset: 0 }, n, t), g = H({ ...f, offset: 100 }, n, t), v = qe(o, h, g, n, s);
|
|
2232
|
+
u = v.start + f.offset / 100 * (v.end - v.start) + p;
|
|
2230
2233
|
}
|
|
2231
2234
|
if (d || a?.name) {
|
|
2232
2235
|
d = d || a;
|
|
2233
|
-
const
|
|
2234
|
-
c = v.start + d.offset / 100 * (v.end - v.start) +
|
|
2236
|
+
const p = $e(d.add, i), h = H({ ...d, offset: 0 }, n, t), g = H({ ...d, offset: 100 }, n, t), v = qe(o, h, g, n, s);
|
|
2237
|
+
c = v.start + d.offset / 100 * (v.end - v.start) + p;
|
|
2235
2238
|
} else typeof l == "number" && (c = u + l);
|
|
2236
2239
|
}
|
|
2237
|
-
return !
|
|
2240
|
+
return !m && !l && (m = c - u), { ...e, start: u, end: c, startRange: f, endRange: d, duration: m || l };
|
|
2238
2241
|
}
|
|
2239
2242
|
function ii(e) {
|
|
2240
2243
|
return e.position === "sticky";
|
|
@@ -2262,8 +2265,8 @@ function ue(e, t, n, s, i) {
|
|
|
2262
2265
|
const o = e[0].viewSource, r = [];
|
|
2263
2266
|
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, l = 0, u = o;
|
|
2264
2267
|
for (; u; ) {
|
|
2265
|
-
const f = window.getComputedStyle(u), d = ii(f),
|
|
2266
|
-
if ((!
|
|
2268
|
+
const f = window.getComputedStyle(u), d = ii(f), m = d ? li(f, s) : void 0, p = ci(u, s, d);
|
|
2269
|
+
if ((!m || !("end" in m)) && (l += p), r.push({ element: u, offset: p, sticky: m }), u = u.offsetParent, oi(f, u, t))
|
|
2267
2270
|
break;
|
|
2268
2271
|
if (u === t) {
|
|
2269
2272
|
r.push({ element: u, offset: 0 });
|
|
@@ -2369,7 +2372,7 @@ function hi(e) {
|
|
|
2369
2372
|
g || (g = [], i.set(h.viewSource, g), a.observe(h.viewSource)), g.push(h);
|
|
2370
2373
|
}
|
|
2371
2374
|
}));
|
|
2372
|
-
function
|
|
2375
|
+
function m({ p: h, vp: g }) {
|
|
2373
2376
|
h = +h.toFixed(1);
|
|
2374
2377
|
const v = +g.toFixed(4);
|
|
2375
2378
|
if (h !== r) {
|
|
@@ -2381,12 +2384,12 @@ function hi(e) {
|
|
|
2381
2384
|
r = h;
|
|
2382
2385
|
}
|
|
2383
2386
|
}
|
|
2384
|
-
function
|
|
2387
|
+
function p() {
|
|
2385
2388
|
t.scenes.forEach((h) => h.destroy?.()), a && (a.disconnect(), a = null), l && (l.disconnect(), l = null), u && (c ? (c.disconnect(), c = null) : window.removeEventListener("resize", u));
|
|
2386
2389
|
}
|
|
2387
2390
|
return {
|
|
2388
|
-
tick:
|
|
2389
|
-
destroy:
|
|
2391
|
+
tick: m,
|
|
2392
|
+
destroy: p
|
|
2390
2393
|
};
|
|
2391
2394
|
}
|
|
2392
2395
|
const mi = {
|
|
@@ -2672,8 +2675,8 @@ function Pi(e) {
|
|
|
2672
2675
|
}), s = function(c) {
|
|
2673
2676
|
for (let f of e.scenes)
|
|
2674
2677
|
if (!f.disabled) {
|
|
2675
|
-
const d = f.transform?.x(c.x) || c.x / e.rect.width,
|
|
2676
|
-
e.allowActiveEvent && (c.active = d <= 1 &&
|
|
2678
|
+
const d = f.transform?.x(c.x) || c.x / e.rect.width, m = f.transform?.y(c.y) || c.y / e.rect.height, p = +mt(0, 1, d).toPrecision(4), h = +mt(0, 1, m).toPrecision(4), g = { x: c.vx, y: c.vy };
|
|
2679
|
+
e.allowActiveEvent && (c.active = d <= 1 && m <= 1 && d >= 0 && m >= 0), f.effect(f, { x: p, y: h }, g, c.active);
|
|
2677
2680
|
}
|
|
2678
2681
|
Object.assign(n, c);
|
|
2679
2682
|
}, t && (r = Ci.bind(l, s, n), a = Ti(document, r));
|
|
@@ -2849,11 +2852,11 @@ function Di(e, t, n, s, { selectorCondition: i, animation: o, sourceAnimationOpt
|
|
|
2849
2852
|
return;
|
|
2850
2853
|
const { effectId: l } = s, u = (d) => {
|
|
2851
2854
|
if (i && !t.matches(i)) return;
|
|
2852
|
-
const
|
|
2855
|
+
const m = d.animationName, p = d.detail?.effectId, h = r ? qt(e, r) : null;
|
|
2853
2856
|
if (h) {
|
|
2854
|
-
if (h.playState === "running" ||
|
|
2857
|
+
if (h.playState === "running" || m && !h.hasAnimationName(m))
|
|
2855
2858
|
return;
|
|
2856
|
-
if (
|
|
2859
|
+
if (p && p !== l && !h.hasAnimationId(p))
|
|
2857
2860
|
return;
|
|
2858
2861
|
}
|
|
2859
2862
|
a.play();
|
|
@@ -2875,28 +2878,31 @@ function Hi(e, t, n, s, i) {
|
|
|
2875
2878
|
return null;
|
|
2876
2879
|
let r = !0;
|
|
2877
2880
|
const a = t.triggerType || "alternate";
|
|
2878
|
-
return
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
if (
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2881
|
+
return {
|
|
2882
|
+
handler: (u) => {
|
|
2883
|
+
if (n && !e.matches(n)) return;
|
|
2884
|
+
const c = !s, f = s?.enter?.includes(u.type), d = s?.leave?.includes(u.type);
|
|
2885
|
+
if (f || c) {
|
|
2886
|
+
if (a === "alternate" || a === "state")
|
|
2887
|
+
r ? (r = !1, o.play()) : a === "alternate" ? o.reverse() : a === "state" && (o.playState === "running" ? o.pause() : o.playState !== "finished" && o.play());
|
|
2888
|
+
else {
|
|
2889
|
+
if (o.progress(0), delete e.dataset.interactEnter, o.isCSS) {
|
|
2890
|
+
const m = () => {
|
|
2891
|
+
_.mutate(() => {
|
|
2892
|
+
e.dataset.interactEnter = "done";
|
|
2893
|
+
});
|
|
2894
|
+
};
|
|
2895
|
+
o.onFinish(m), o.onAbort(m);
|
|
2896
|
+
}
|
|
2897
|
+
o.play();
|
|
2892
2898
|
}
|
|
2893
|
-
|
|
2899
|
+
return;
|
|
2894
2900
|
}
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2901
|
+
d && (a === "alternate" ? o.reverse() : a === "repeat" ? (o.cancel(), _.mutate(() => {
|
|
2902
|
+
delete e.dataset.interactEnter;
|
|
2903
|
+
})) : a === "state" && o.playState === "running" && o.pause());
|
|
2904
|
+
},
|
|
2905
|
+
cleanup: () => o.cancel()
|
|
2900
2906
|
};
|
|
2901
2907
|
}
|
|
2902
2908
|
function Gi(e, t, {
|
|
@@ -2910,8 +2916,8 @@ function Gi(e, t, {
|
|
|
2910
2916
|
if (r && !e.matches(r)) return;
|
|
2911
2917
|
const d = l ? e.closest(
|
|
2912
2918
|
`${s} > ${i || ""}:has(:scope)`
|
|
2913
|
-
) : void 0,
|
|
2914
|
-
|
|
2919
|
+
) : void 0, m = !a, p = a?.enter?.includes(f.type), h = a?.leave?.includes(f.type);
|
|
2920
|
+
m ? t.toggleEffect(n, u, d) : (p && t.toggleEffect(n, c ? "add" : u, d), h && c && t.toggleEffect(n, "remove", d));
|
|
2915
2921
|
};
|
|
2916
2922
|
}
|
|
2917
2923
|
const We = /* @__PURE__ */ new WeakMap();
|
|
@@ -2965,45 +2971,51 @@ function Qi(e) {
|
|
|
2965
2971
|
}
|
|
2966
2972
|
function Zi(e, t, n, s, { targetController: i, selectorCondition: o, animation: r }) {
|
|
2967
2973
|
const a = Ki(s.eventConfig), l = n.transition || n.transitionProperties, u = Qi(a);
|
|
2968
|
-
let c, f = !1;
|
|
2969
|
-
if (l
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2974
|
+
let c, f, d = !1;
|
|
2975
|
+
if (l)
|
|
2976
|
+
c = Gi(
|
|
2977
|
+
t,
|
|
2978
|
+
i,
|
|
2979
|
+
n,
|
|
2980
|
+
o,
|
|
2981
|
+
u
|
|
2982
|
+
);
|
|
2983
|
+
else {
|
|
2984
|
+
const y = Hi(
|
|
2985
|
+
t,
|
|
2986
|
+
n,
|
|
2987
|
+
o,
|
|
2988
|
+
u,
|
|
2989
|
+
r
|
|
2990
|
+
);
|
|
2991
|
+
c = y?.handler ?? null, f = y?.cleanup, d = n.triggerType === "once";
|
|
2992
|
+
}
|
|
2993
|
+
if (!c)
|
|
2982
2994
|
return;
|
|
2983
|
-
const
|
|
2984
|
-
function
|
|
2985
|
-
const
|
|
2986
|
-
|
|
2995
|
+
const m = c, p = new AbortController();
|
|
2996
|
+
function h(y, $, E) {
|
|
2997
|
+
const b = Yi($, e, m);
|
|
2998
|
+
y.addEventListener($, b, { ...E, signal: p.signal });
|
|
2987
2999
|
}
|
|
2988
|
-
const
|
|
2989
|
-
p.abort();
|
|
3000
|
+
const v = { source: e, target: t, cleanup: () => {
|
|
3001
|
+
p.abort(), f?.();
|
|
2990
3002
|
} };
|
|
2991
|
-
if (q(We, e,
|
|
2992
|
-
const
|
|
2993
|
-
|
|
2994
|
-
|
|
3003
|
+
if (q(We, e, v), q(We, t, v), u) {
|
|
3004
|
+
const y = a.enter, $ = a.leave;
|
|
3005
|
+
y.forEach((S) => {
|
|
3006
|
+
S === "focusin" && (e.tabIndex = 0), h(e, S, { passive: !0, once: d });
|
|
2995
3007
|
});
|
|
2996
|
-
const
|
|
2997
|
-
(l ?
|
|
2998
|
-
if (
|
|
2999
|
-
|
|
3008
|
+
const E = !n.stateAction || n.stateAction === "toggle";
|
|
3009
|
+
(l ? E : n.triggerType !== "once") && $.forEach((S) => {
|
|
3010
|
+
if (S === "focusout") {
|
|
3011
|
+
h(e, S, { once: d });
|
|
3000
3012
|
return;
|
|
3001
3013
|
}
|
|
3002
|
-
|
|
3014
|
+
h(e, S, { passive: !0 });
|
|
3003
3015
|
});
|
|
3004
3016
|
} else
|
|
3005
|
-
(a.toggle ?? []).forEach((
|
|
3006
|
-
|
|
3017
|
+
(a.toggle ?? []).forEach(($) => {
|
|
3018
|
+
h(e, $, { once: d, passive: $ !== "keydown" });
|
|
3007
3019
|
});
|
|
3008
3020
|
}
|
|
3009
3021
|
function Ji(e) {
|
|
@@ -3275,15 +3287,15 @@ function no(e, t, n) {
|
|
|
3275
3287
|
function so(e, t, n) {
|
|
3276
3288
|
const { configIndex: s } = n, { effects: i = {}, sequences: o = {}, conditions: r = {} } = e, a = {}, l = e.interactions ? Qt(e, n) : /* @__PURE__ */ new Map();
|
|
3277
3289
|
return e.interactions?.forEach((u, c) => {
|
|
3278
|
-
const f = u.key, d = ++to, { effects:
|
|
3290
|
+
const f = u.key, d = ++to, { effects: m, sequences: p, ...h } = u;
|
|
3279
3291
|
if (!f) {
|
|
3280
3292
|
console.error(`Interaction ${d} is missing a key for source element.`);
|
|
3281
3293
|
return;
|
|
3282
3294
|
}
|
|
3283
3295
|
Re(a, f);
|
|
3284
|
-
const g =
|
|
3296
|
+
const g = m ? Array.from(m) : [];
|
|
3285
3297
|
g.reverse();
|
|
3286
|
-
const v =
|
|
3298
|
+
const v = p?.map((E, b) => {
|
|
3287
3299
|
if (yt(E)) {
|
|
3288
3300
|
const T = o[E.sequenceId];
|
|
3289
3301
|
return T ? { ...T, ...E } : (console.warn(`Interact: Sequence "${E.sequenceId}" not found in config`), E);
|
|
@@ -3452,7 +3464,7 @@ function an(e, t, n, s, i) {
|
|
|
3452
3464
|
}, f = c.key, d = A(a.interactionId, e);
|
|
3453
3465
|
if (o[d] || n.addedInteractions[d] && !i)
|
|
3454
3466
|
return;
|
|
3455
|
-
const
|
|
3467
|
+
const m = _e(
|
|
3456
3468
|
c,
|
|
3457
3469
|
n,
|
|
3458
3470
|
{
|
|
@@ -3464,28 +3476,28 @@ function an(e, t, n, s, i) {
|
|
|
3464
3476
|
},
|
|
3465
3477
|
{ policy: s.reducedMotionPolicy }
|
|
3466
3478
|
);
|
|
3467
|
-
if (
|
|
3479
|
+
if (m) {
|
|
3468
3480
|
o[d] = !0;
|
|
3469
|
-
const
|
|
3481
|
+
const p = f && A(f, e);
|
|
3470
3482
|
let h;
|
|
3471
|
-
if (
|
|
3472
|
-
if (h = w.getController(
|
|
3483
|
+
if (p) {
|
|
3484
|
+
if (h = w.getController(p), !h)
|
|
3473
3485
|
return;
|
|
3474
|
-
|
|
3486
|
+
m.listContainer && h.watchChildList(m.listContainer);
|
|
3475
3487
|
} else
|
|
3476
3488
|
h = t;
|
|
3477
|
-
if (z(
|
|
3489
|
+
if (z(p || s.key, m))
|
|
3478
3490
|
return;
|
|
3479
3491
|
Me(
|
|
3480
3492
|
h,
|
|
3481
3493
|
h.element,
|
|
3482
|
-
|
|
3483
|
-
|
|
3494
|
+
m,
|
|
3495
|
+
p || s.key,
|
|
3484
3496
|
"effect"
|
|
3485
3497
|
);
|
|
3486
3498
|
const [g, v] = on(
|
|
3487
3499
|
s,
|
|
3488
|
-
|
|
3500
|
+
m,
|
|
3489
3501
|
t.element,
|
|
3490
3502
|
t.useFirstChild,
|
|
3491
3503
|
h.element,
|
|
@@ -3495,14 +3507,14 @@ function an(e, t, n, s, i) {
|
|
|
3495
3507
|
if (!g || !v)
|
|
3496
3508
|
return;
|
|
3497
3509
|
n.addedInteractions[d] = !0;
|
|
3498
|
-
const y =
|
|
3499
|
-
|
|
3510
|
+
const y = p || s.key, $ = x(
|
|
3511
|
+
m.conditions || [],
|
|
3500
3512
|
n.dataCache.conditions
|
|
3501
3513
|
);
|
|
3502
3514
|
r.push([
|
|
3503
3515
|
y,
|
|
3504
3516
|
s,
|
|
3505
|
-
|
|
3517
|
+
m,
|
|
3506
3518
|
g,
|
|
3507
3519
|
v,
|
|
3508
3520
|
$,
|
|
@@ -3542,8 +3554,8 @@ function ln(e, t, n, s, i, o, r, a) {
|
|
|
3542
3554
|
return z(y || s, g);
|
|
3543
3555
|
}))
|
|
3544
3556
|
return null;
|
|
3545
|
-
const d = [],
|
|
3546
|
-
let
|
|
3557
|
+
const d = [], m = cn(e, t, o);
|
|
3558
|
+
let p = !1;
|
|
3547
3559
|
for (const h of u) {
|
|
3548
3560
|
const g = h.effectId, v = _e(
|
|
3549
3561
|
c(h),
|
|
@@ -3553,7 +3565,7 @@ function ln(e, t, n, s, i, o, r, a) {
|
|
|
3553
3565
|
key: r.updateKey,
|
|
3554
3566
|
onUpdate: r.onUpdate
|
|
3555
3567
|
},
|
|
3556
|
-
{ policy:
|
|
3568
|
+
{ policy: m, collapsesStagger: m !== "ignore" }
|
|
3557
3569
|
);
|
|
3558
3570
|
if (!v) continue;
|
|
3559
3571
|
const y = v.key, $ = y && A(y, s);
|
|
@@ -3571,7 +3583,7 @@ function ln(e, t, n, s, i, o, r, a) {
|
|
|
3571
3583
|
"effect"
|
|
3572
3584
|
);
|
|
3573
3585
|
let S;
|
|
3574
|
-
if (a && b === a.controllerKey && v.listContainer === a.listContainer ? (S = be(v, a.elements), S.length > 0 && (
|
|
3586
|
+
if (a && b === a.controllerKey && v.listContainer === a.listContainer ? (S = be(v, a.elements), S.length > 0 && (p = !0)) : S = Se(
|
|
3575
3587
|
v,
|
|
3576
3588
|
E.element,
|
|
3577
3589
|
E.useFirstChild
|
|
@@ -3579,7 +3591,7 @@ function ln(e, t, n, s, i, o, r, a) {
|
|
|
3579
3591
|
const T = N(v);
|
|
3580
3592
|
d.push({ target: S, options: T });
|
|
3581
3593
|
}
|
|
3582
|
-
return a && !
|
|
3594
|
+
return a && !p ? null : d.length > 0 ? d : null;
|
|
3583
3595
|
}
|
|
3584
3596
|
function Ye(e, t, n) {
|
|
3585
3597
|
const s = n ? be(e, n) : Se(e, t.element, t.useFirstChild);
|
|
@@ -3613,12 +3625,12 @@ function oo(e, t, n, s, i) {
|
|
|
3613
3625
|
s.sequences?.forEach((o) => {
|
|
3614
3626
|
let r;
|
|
3615
3627
|
if (io(o)) {
|
|
3616
|
-
const
|
|
3617
|
-
if (!
|
|
3628
|
+
const p = n.dataCache.sequences[o.sequenceId];
|
|
3629
|
+
if (!p) {
|
|
3618
3630
|
console.warn(`Interact: Sequence "${o.sequenceId}" not found in cache`);
|
|
3619
3631
|
return;
|
|
3620
3632
|
}
|
|
3621
|
-
r = { ...
|
|
3633
|
+
r = { ...p, ...o };
|
|
3622
3634
|
} else
|
|
3623
3635
|
r = o;
|
|
3624
3636
|
const a = r.sequenceId || ne(), l = A(`${e}::seq::${a}`, e);
|
|
@@ -3638,12 +3650,12 @@ function oo(e, t, n, s, i) {
|
|
|
3638
3650
|
);
|
|
3639
3651
|
if (!c) return;
|
|
3640
3652
|
if (i && n.addedInteractions[l]) {
|
|
3641
|
-
const
|
|
3653
|
+
const p = un(
|
|
3642
3654
|
t,
|
|
3643
3655
|
s.listContainer,
|
|
3644
3656
|
i
|
|
3645
3657
|
);
|
|
3646
|
-
w.addToSequence(l, c,
|
|
3658
|
+
w.addToSequence(l, c, p);
|
|
3647
3659
|
const h = w.getSequence(
|
|
3648
3660
|
l,
|
|
3649
3661
|
Be(r, s, n),
|
|
@@ -3668,11 +3680,11 @@ function oo(e, t, n, s, i) {
|
|
|
3668
3680
|
), d = x(
|
|
3669
3681
|
s.conditions || [],
|
|
3670
3682
|
n.dataCache.conditions
|
|
3671
|
-
),
|
|
3672
|
-
|
|
3683
|
+
), m = Ye(s, t, i);
|
|
3684
|
+
m && (n.addedInteractions[l] = !0, Ue(
|
|
3673
3685
|
s,
|
|
3674
3686
|
r,
|
|
3675
|
-
|
|
3687
|
+
m,
|
|
3676
3688
|
f,
|
|
3677
3689
|
d
|
|
3678
3690
|
));
|
|
@@ -3688,10 +3700,10 @@ function ro(e, t, n, s, i) {
|
|
|
3688
3700
|
);
|
|
3689
3701
|
if (f && !f.matches)
|
|
3690
3702
|
return !1;
|
|
3691
|
-
const d = c.key && A(c.key, e),
|
|
3692
|
-
if (!
|
|
3703
|
+
const d = c.key && A(c.key, e), m = w.getController(d);
|
|
3704
|
+
if (!m)
|
|
3693
3705
|
return !0;
|
|
3694
|
-
const
|
|
3706
|
+
const p = u.sequenceId || ne(), h = A(`${d}::seq::${p}`, d);
|
|
3695
3707
|
if (n.addedInteractions[h] && !i || z(d, c))
|
|
3696
3708
|
return !0;
|
|
3697
3709
|
const v = ln(
|
|
@@ -3699,7 +3711,7 @@ function ro(e, t, n, s, i) {
|
|
|
3699
3711
|
c,
|
|
3700
3712
|
h,
|
|
3701
3713
|
d,
|
|
3702
|
-
|
|
3714
|
+
m,
|
|
3703
3715
|
n,
|
|
3704
3716
|
{
|
|
3705
3717
|
updateKey: e,
|
|
@@ -3719,7 +3731,7 @@ function ro(e, t, n, s, i) {
|
|
|
3719
3731
|
), $ = x(
|
|
3720
3732
|
c.conditions || [],
|
|
3721
3733
|
n.dataCache.conditions
|
|
3722
|
-
), E = Ye(c,
|
|
3734
|
+
), E = Ye(c, m);
|
|
3723
3735
|
return E && (n.addedInteractions[h] = !0, Ue(
|
|
3724
3736
|
c,
|
|
3725
3737
|
u,
|
|
@@ -3736,16 +3748,16 @@ function fn(e, t, n, s, i) {
|
|
|
3736
3748
|
const f = A(c, e);
|
|
3737
3749
|
if (n.addedInteractions[f] && !i)
|
|
3738
3750
|
return;
|
|
3739
|
-
r[c].some(({ effect:
|
|
3751
|
+
r[c].some(({ effect: m, ...p }, h) => {
|
|
3740
3752
|
const g = F(
|
|
3741
|
-
|
|
3753
|
+
p.conditions || [],
|
|
3742
3754
|
n.dataCache.conditions
|
|
3743
3755
|
);
|
|
3744
3756
|
if (g && !g.matches)
|
|
3745
3757
|
return !1;
|
|
3746
|
-
const v =
|
|
3758
|
+
const v = m.effectId, y = {
|
|
3747
3759
|
...n.dataCache.effects[v] || {},
|
|
3748
|
-
...
|
|
3760
|
+
...m,
|
|
3749
3761
|
effectId: v
|
|
3750
3762
|
};
|
|
3751
3763
|
if (s && y.listContainer !== s)
|
|
@@ -3760,11 +3772,11 @@ function fn(e, t, n, s, i) {
|
|
|
3760
3772
|
t.update();
|
|
3761
3773
|
}
|
|
3762
3774
|
},
|
|
3763
|
-
{ policy:
|
|
3775
|
+
{ policy: p.reducedMotionPolicy }
|
|
3764
3776
|
);
|
|
3765
3777
|
if ($) {
|
|
3766
|
-
const E =
|
|
3767
|
-
if (!b || z(E,
|
|
3778
|
+
const E = p.key && A(p.key, e), b = w.getController(E);
|
|
3779
|
+
if (!b || z(E, p) || z(e, $))
|
|
3768
3780
|
return !0;
|
|
3769
3781
|
Me(
|
|
3770
3782
|
t,
|
|
@@ -3774,7 +3786,7 @@ function fn(e, t, n, s, i) {
|
|
|
3774
3786
|
"effect"
|
|
3775
3787
|
), $.listContainer && t.watchChildList($.listContainer);
|
|
3776
3788
|
const [S, T] = on(
|
|
3777
|
-
|
|
3789
|
+
p,
|
|
3778
3790
|
$,
|
|
3779
3791
|
b.element,
|
|
3780
3792
|
b.useFirstChild,
|
|
@@ -3792,7 +3804,7 @@ function fn(e, t, n, s, i) {
|
|
|
3792
3804
|
);
|
|
3793
3805
|
return l.push([
|
|
3794
3806
|
e,
|
|
3795
|
-
|
|
3807
|
+
p,
|
|
3796
3808
|
$,
|
|
3797
3809
|
S,
|
|
3798
3810
|
T,
|
|
@@ -3830,14 +3842,14 @@ function Et(e, t, n, s, i, o, r, a, l) {
|
|
|
3830
3842
|
}
|
|
3831
3843
|
let c;
|
|
3832
3844
|
if (n === "animationEnd") {
|
|
3833
|
-
const f = o.effectId, d = l ? w.getInstance(l) : void 0,
|
|
3845
|
+
const f = o.effectId, d = l ? w.getInstance(l) : void 0, m = d?.dataCache.effects[f], p = m && _e(m, d, {
|
|
3834
3846
|
id: `${l}::animationEnd::${f}`,
|
|
3835
3847
|
key: l,
|
|
3836
3848
|
onUpdate: () => {
|
|
3837
3849
|
w.getController(l)?.update();
|
|
3838
3850
|
}
|
|
3839
3851
|
});
|
|
3840
|
-
|
|
3852
|
+
p && (c = N(p));
|
|
3841
3853
|
}
|
|
3842
3854
|
W[n]?.add(t, s, i, o, {
|
|
3843
3855
|
targetController: u,
|
|
@@ -4017,4 +4029,4 @@ export {
|
|
|
4017
4029
|
uo as g,
|
|
4018
4030
|
ho as r
|
|
4019
4031
|
};
|
|
4020
|
-
//# sourceMappingURL=index-
|
|
4032
|
+
//# sourceMappingURL=index-CXd-XY1L.mjs.map
|