@wix/interact 2.8.6 → 2.8.7
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-DSREj0qw.mjs → index-BqQ8gxQF.mjs} +497 -492
- package/dist/{index-DSREj0qw.mjs.map → index-BqQ8gxQF.mjs.map} +1 -1
- package/dist/{index-D8zv4Q-3.js → index-OPFFsr0c.js} +13 -13
- package/dist/{index-D8zv4Q-3.js.map → index-OPFFsr0c.js.map} +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/core/add.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ function R(e, t) {
|
|
|
9
9
|
return i !== void 0 ? `[${i}]` : "[]";
|
|
10
10
|
}) : e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Tn(e, t) {
|
|
13
13
|
return e.trigger === "viewEnter" && t.triggerType === "once" && B(e) === B(t);
|
|
14
14
|
}
|
|
15
15
|
function B(e) {
|
|
@@ -121,9 +121,9 @@ class ce {
|
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
const Pt = (e) => e,
|
|
124
|
+
const Pt = (e) => e, _n = (e) => 1 - Math.cos(e * Math.PI / 2), Mn = (e) => Math.sin(e * Math.PI / 2), On = (e) => -(Math.cos(Math.PI * e) - 1) / 2, Pn = (e) => e ** 2, Cn = (e) => 1 - (1 - e) ** 2, An = (e) => e < 0.5 ? 2 * e ** 2 : 1 - (-2 * e + 2) ** 2 / 2, kn = (e) => e ** 3, qn = (e) => 1 - (1 - e) ** 3, Rn = (e) => e < 0.5 ? 4 * e ** 3 : 1 - (-2 * e + 2) ** 3 / 2, Ln = (e) => e ** 4, Fn = (e) => 1 - (1 - e) ** 4, xn = (e) => e < 0.5 ? 8 * e ** 4 : 1 - (-2 * e + 2) ** 4 / 2, Nn = (e) => e ** 5, Dn = (e) => 1 - (1 - e) ** 5, jn = (e) => e < 0.5 ? 16 * e ** 5 : 1 - (-2 * e + 2) ** 5 / 2, zn = (e) => e === 0 ? 0 : 2 ** (10 * e - 10), Hn = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), Gn = (e) => e === 0 ? 0 : e === 1 ? 1 : e < 0.5 ? 2 ** (20 * e - 10) / 2 : (2 - 2 ** (-20 * e + 10)) / 2, Wn = (e) => 1 - Math.sqrt(1 - e ** 2), Vn = (e) => Math.sqrt(1 - (e - 1) ** 2), Bn = (e) => e < 0.5 ? (1 - Math.sqrt(1 - 4 * e ** 2)) / 2 : (Math.sqrt(-(2 * e - 3) * (2 * e - 1)) + 1) / 2, Yn = (e) => 2.70158 * e ** 3 - 1.70158 * e ** 2, Un = (e) => 1 + 2.70158 * (e - 1) ** 3 + 1.70158 * (e - 1) ** 2, Kn = (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, at = {
|
|
125
125
|
linear: Pt,
|
|
126
|
-
sineIn:
|
|
126
|
+
sineIn: _n,
|
|
127
127
|
sineOut: Mn,
|
|
128
128
|
sineInOut: On,
|
|
129
129
|
quadIn: Pn,
|
|
@@ -148,7 +148,7 @@ const Pt = (e) => e, Tn = (e) => 1 - Math.cos(e * Math.PI / 2), Mn = (e) => Math
|
|
|
148
148
|
backOut: Un,
|
|
149
149
|
backInOut: Kn
|
|
150
150
|
}, Q = (e, t, n, s, i) => {
|
|
151
|
-
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t,
|
|
151
|
+
const o = 3 * t, r = 3 * (s - 2 * t), a = 1 - 3 * s + 3 * t, f = 3 * n, u = 3 * (i - 2 * n), c = 1 - 3 * i + 3 * n;
|
|
152
152
|
let l;
|
|
153
153
|
if (a === 0)
|
|
154
154
|
l = r === 0 ? `(${e} / ${o})` : `((sqrt(max(0, ${o * o} + ${4 * r} * ${e})) - ${o}) / ${2 * r})`;
|
|
@@ -158,9 +158,9 @@ const Pt = (e) => e, Tn = (e) => 1 - Math.cos(e * Math.PI / 2), Mn = (e) => Math
|
|
|
158
158
|
const v = 2 * Math.sqrt(-m);
|
|
159
159
|
let y = 0;
|
|
160
160
|
for (const E of [0, 1, 2])
|
|
161
|
-
[0, 0.25, 0.5, 0.75, 1].every((
|
|
161
|
+
[0, 0.25, 0.5, 0.75, 1].every((S) => {
|
|
162
162
|
const _ = Math.min(
|
|
163
|
-
Math.max(2 * (h - 27 * a * a *
|
|
163
|
+
Math.max(2 * (h - 27 * a * a * S) / (p * m * v), -1),
|
|
164
164
|
1
|
|
165
165
|
), I = v * Math.cos((Math.acos(_) - E * 2 * Math.PI) / 3) - d;
|
|
166
166
|
return I >= -1e-6 && I <= 1.000001;
|
|
@@ -172,7 +172,7 @@ const Pt = (e) => e, Tn = (e) => 1 - Math.cos(e * Math.PI / 2), Mn = (e) => Math
|
|
|
172
172
|
l = `(pow(${v} - ${g}, 1 / 3) - pow(${v} + ${g}, 1 / 3) - ${d})`;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
return `(${
|
|
175
|
+
return `(${c} * pow(${l}, 3) + ${u} * pow(${l}, 2) + ${f} * ${l})`;
|
|
176
176
|
}, ct = {
|
|
177
177
|
linear: (e) => e,
|
|
178
178
|
ease: (e) => Q(e, 0.25, 0.1, 0.25, 1),
|
|
@@ -242,7 +242,7 @@ const Qn = /^(webkit|moz|ms|o)(?=[A-Z])/, Zn = Object.assign(/* @__PURE__ */ Obj
|
|
|
242
242
|
"animation-timing-function": "easing",
|
|
243
243
|
"animation-composition": "composite"
|
|
244
244
|
});
|
|
245
|
-
function
|
|
245
|
+
function Se(e) {
|
|
246
246
|
return e.startsWith("--") ? e : (Qn.test(e) ? `-${e}` : e).replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`);
|
|
247
247
|
}
|
|
248
248
|
function Jn(e) {
|
|
@@ -275,11 +275,11 @@ function ye(e) {
|
|
|
275
275
|
return e ? ft[e] || e : ft.linear;
|
|
276
276
|
}
|
|
277
277
|
function ts(e, t, n, s) {
|
|
278
|
-
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t,
|
|
278
|
+
const i = 3 * e, o = 3 * (n - e) - i, r = 1 - i - o, a = 3 * t, f = 3 * (s - t) - a, u = 1 - a - f, c = (p) => ((r * p + o) * p + i) * p, l = (p) => ((u * p + f) * p + a) * p, d = (p) => (3 * r * p + 2 * o) * p + i;
|
|
279
279
|
function h(p) {
|
|
280
280
|
let m = p;
|
|
281
281
|
for (let y = 0; y < 8; y++) {
|
|
282
|
-
const b =
|
|
282
|
+
const b = c(m) - p;
|
|
283
283
|
if (Math.abs(b) < 1e-7) return m;
|
|
284
284
|
const E = d(m);
|
|
285
285
|
if (Math.abs(E) < 1e-6) break;
|
|
@@ -287,7 +287,7 @@ function ts(e, t, n, s) {
|
|
|
287
287
|
}
|
|
288
288
|
let g = 0, v = 1;
|
|
289
289
|
for (m = (g + v) / 2; v - g > 1e-7; ) {
|
|
290
|
-
const y =
|
|
290
|
+
const y = c(m);
|
|
291
291
|
if (Math.abs(y - p) < 1e-7) return m;
|
|
292
292
|
p > y ? g = m : v = m, m = (g + v) / 2;
|
|
293
293
|
}
|
|
@@ -323,14 +323,14 @@ function qt(e) {
|
|
|
323
323
|
for (const o of n) {
|
|
324
324
|
const r = o.split(/\s+/), a = parseFloat(r[0]);
|
|
325
325
|
if (isNaN(a)) return;
|
|
326
|
-
const
|
|
326
|
+
const f = [];
|
|
327
327
|
for (let u = 1; u < r.length; u++)
|
|
328
328
|
if (r[u].endsWith("%")) {
|
|
329
|
-
const
|
|
330
|
-
if (isNaN(
|
|
331
|
-
|
|
329
|
+
const c = parseFloat(r[u]) / 100;
|
|
330
|
+
if (isNaN(c)) return;
|
|
331
|
+
f.push(c);
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
f.length === 0 ? s.push({ output: a, pos: null }) : f.length === 1 ? s.push({ output: a, pos: f[0] }) : (s.push({ output: a, pos: f[0] }), s.push({ output: a, pos: f[1] }));
|
|
334
334
|
}
|
|
335
335
|
if (s.length === 0) return;
|
|
336
336
|
s[0].pos === null && (s[0].pos = 0), s[s.length - 1].pos === null && (s[s.length - 1].pos = 1);
|
|
@@ -340,9 +340,9 @@ function qt(e) {
|
|
|
340
340
|
const o = i - 1;
|
|
341
341
|
let r = i;
|
|
342
342
|
for (; r < s.length && s[r].pos === null; ) r++;
|
|
343
|
-
const a = s[o].pos,
|
|
344
|
-
for (let
|
|
345
|
-
s[
|
|
343
|
+
const a = s[o].pos, f = s[r].pos, u = r - o;
|
|
344
|
+
for (let c = o + 1; c < r; c++)
|
|
345
|
+
s[c].pos = a + (f - a) * (c - o) / u;
|
|
346
346
|
i = r + 1;
|
|
347
347
|
} else
|
|
348
348
|
i++;
|
|
@@ -359,8 +359,8 @@ function is(e) {
|
|
|
359
359
|
if (n >= s.pos) return s.output;
|
|
360
360
|
let i = 0, o = t.length - 1;
|
|
361
361
|
for (; i < o - 1; ) {
|
|
362
|
-
const
|
|
363
|
-
t[
|
|
362
|
+
const f = i + o >>> 1;
|
|
363
|
+
t[f].pos <= n ? i = f : o = f;
|
|
364
364
|
}
|
|
365
365
|
const r = t[i], a = t[o];
|
|
366
366
|
return a.pos === r.pos ? a.output : r.output + (a.output - r.output) * (n - r.pos) / (a.pos - r.pos);
|
|
@@ -428,14 +428,14 @@ class as extends ce {
|
|
|
428
428
|
const t = this.calculateOffsets(), n = this.getSequenceActiveDuration(t), s = this.animationGroups.length - 1;
|
|
429
429
|
this.animationGroups.forEach((i, o) => {
|
|
430
430
|
i.animations.forEach((r, a) => {
|
|
431
|
-
const
|
|
432
|
-
if (!
|
|
433
|
-
const { delay: u, duration:
|
|
431
|
+
const f = r.effect;
|
|
432
|
+
if (!f) return;
|
|
433
|
+
const { delay: u, duration: c, iterations: l } = this.timingOptions[o][a], d = u + t[o], h = n - (d + c * l);
|
|
434
434
|
if (i.isCSS && this.sequenceId) {
|
|
435
|
-
const { target: p } =
|
|
436
|
-
p instanceof HTMLElement && (p.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), p.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)),
|
|
435
|
+
const { target: p } = f;
|
|
436
|
+
p instanceof HTMLElement && (p.style.setProperty(`--motion-${this.sequenceId}-index`, `${o}`), p.style.setProperty(`--motion-${this.sequenceId}-last`, `${s}`)), f.updateTiming({ endDelay: h });
|
|
437
437
|
} else
|
|
438
|
-
|
|
438
|
+
f.updateTiming({ delay: d + this.delay, endDelay: h });
|
|
439
439
|
});
|
|
440
440
|
});
|
|
441
441
|
}
|
|
@@ -444,8 +444,8 @@ class as extends ce {
|
|
|
444
444
|
for (let s = 0; s < this.timingOptions.length; s++) {
|
|
445
445
|
const i = this.timingOptions[s].reduce((o, r) => {
|
|
446
446
|
if (!r) return o;
|
|
447
|
-
const { delay: a, duration:
|
|
448
|
-
return Math.max(o, a +
|
|
447
|
+
const { delay: a, duration: f, iterations: u } = r;
|
|
448
|
+
return Math.max(o, a + f * u);
|
|
449
449
|
}, 0);
|
|
450
450
|
n.push(t[s] + i);
|
|
451
451
|
}
|
|
@@ -462,7 +462,7 @@ class as extends ce {
|
|
|
462
462
|
for (const { index: s, group: i } of n) {
|
|
463
463
|
const o = Math.min(s, this.animationGroups.length);
|
|
464
464
|
this.animationGroups.splice(o, 0, i), this.timingOptions.splice(o, 0, i.getTimingOptions());
|
|
465
|
-
const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((
|
|
465
|
+
const r = [...i.animations], a = this.animationGroups.slice(0, o).reduce((f, u) => f + u.animations.length, 0);
|
|
466
466
|
this.animations.splice(a, 0, ...r);
|
|
467
467
|
}
|
|
468
468
|
this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((s) => s.ready)).then(() => {
|
|
@@ -503,7 +503,7 @@ class cs {
|
|
|
503
503
|
composite: "add"
|
|
504
504
|
}), { timeline: r } = i;
|
|
505
505
|
this._animation = new Animation(o, r), this._tickCbId = null, this.progress = null, this.customEffect = (a) => t(o.target, a), this._finishHandler = (a) => {
|
|
506
|
-
this.effect.target?.getAnimations().find((
|
|
506
|
+
this.effect.target?.getAnimations().find((f) => f === this._animation) || this.cancel();
|
|
507
507
|
}, this.addEventListener("finish", this._finishHandler), this.addEventListener("remove", this._finishHandler);
|
|
508
508
|
}
|
|
509
509
|
// private tick method for customEffect loop implementation
|
|
@@ -639,12 +639,12 @@ function us() {
|
|
|
639
639
|
return lt || (lt = 1, (function(e) {
|
|
640
640
|
(function(t) {
|
|
641
641
|
var n = function() {
|
|
642
|
-
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(
|
|
643
|
-
return setTimeout(
|
|
642
|
+
}, s = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(c) {
|
|
643
|
+
return setTimeout(c, 16);
|
|
644
644
|
};
|
|
645
645
|
function i() {
|
|
646
|
-
var
|
|
647
|
-
|
|
646
|
+
var c = this;
|
|
647
|
+
c.reads = [], c.writes = [], c.raf = s.bind(t);
|
|
648
648
|
}
|
|
649
649
|
i.prototype = {
|
|
650
650
|
constructor: i,
|
|
@@ -656,8 +656,8 @@ function us() {
|
|
|
656
656
|
*
|
|
657
657
|
* @param {Array} tasks
|
|
658
658
|
*/
|
|
659
|
-
runTasks: function(
|
|
660
|
-
for (var l; l =
|
|
659
|
+
runTasks: function(c) {
|
|
660
|
+
for (var l; l = c.shift(); ) l();
|
|
661
661
|
},
|
|
662
662
|
/**
|
|
663
663
|
* Adds a job to the read batch and
|
|
@@ -667,8 +667,8 @@ function us() {
|
|
|
667
667
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
668
668
|
* @public
|
|
669
669
|
*/
|
|
670
|
-
measure: function(
|
|
671
|
-
var d = l ?
|
|
670
|
+
measure: function(c, l) {
|
|
671
|
+
var d = l ? c.bind(l) : c;
|
|
672
672
|
return this.reads.push(d), o(this), d;
|
|
673
673
|
},
|
|
674
674
|
/**
|
|
@@ -680,8 +680,8 @@ function us() {
|
|
|
680
680
|
* @param {Object} ctx the context to be bound to `fn` (optional).
|
|
681
681
|
* @public
|
|
682
682
|
*/
|
|
683
|
-
mutate: function(
|
|
684
|
-
var d = l ?
|
|
683
|
+
mutate: function(c, l) {
|
|
684
|
+
var d = l ? c.bind(l) : c;
|
|
685
685
|
return this.writes.push(d), o(this), d;
|
|
686
686
|
},
|
|
687
687
|
/**
|
|
@@ -691,8 +691,8 @@ function us() {
|
|
|
691
691
|
* @return {Boolean} success
|
|
692
692
|
* @public
|
|
693
693
|
*/
|
|
694
|
-
clear: function(
|
|
695
|
-
return a(this.reads,
|
|
694
|
+
clear: function(c) {
|
|
695
|
+
return a(this.reads, c) || a(this.writes, c);
|
|
696
696
|
},
|
|
697
697
|
/**
|
|
698
698
|
* Extend this FastDom with some
|
|
@@ -728,37 +728,37 @@ function us() {
|
|
|
728
728
|
* @param {Object} props properties to mixin
|
|
729
729
|
* @return {FastDom}
|
|
730
730
|
*/
|
|
731
|
-
extend: function(
|
|
732
|
-
if (typeof
|
|
731
|
+
extend: function(c) {
|
|
732
|
+
if (typeof c != "object") throw new Error("expected object");
|
|
733
733
|
var l = Object.create(this);
|
|
734
|
-
return
|
|
734
|
+
return f(l, c), l.fastdom = this, l.initialize && l.initialize(), l;
|
|
735
735
|
},
|
|
736
736
|
// override this with a function
|
|
737
737
|
// to prevent Errors in console
|
|
738
738
|
// when tasks throw
|
|
739
739
|
catch: null
|
|
740
740
|
};
|
|
741
|
-
function o(
|
|
742
|
-
|
|
741
|
+
function o(c) {
|
|
742
|
+
c.scheduled || (c.scheduled = !0, c.raf(r.bind(null, c)));
|
|
743
743
|
}
|
|
744
|
-
function r(
|
|
745
|
-
var l =
|
|
744
|
+
function r(c) {
|
|
745
|
+
var l = c.writes, d = c.reads, h;
|
|
746
746
|
try {
|
|
747
|
-
n("flushing reads", d.length),
|
|
747
|
+
n("flushing reads", d.length), c.runTasks(d), n("flushing writes", l.length), c.runTasks(l);
|
|
748
748
|
} catch (p) {
|
|
749
749
|
h = p;
|
|
750
750
|
}
|
|
751
|
-
if (
|
|
752
|
-
if (n("task errored", h.message),
|
|
751
|
+
if (c.scheduled = !1, (d.length || l.length) && o(c), h)
|
|
752
|
+
if (n("task errored", h.message), c.catch) c.catch(h);
|
|
753
753
|
else throw h;
|
|
754
754
|
}
|
|
755
|
-
function a(
|
|
756
|
-
var d =
|
|
757
|
-
return !!~d && !!
|
|
755
|
+
function a(c, l) {
|
|
756
|
+
var d = c.indexOf(l);
|
|
757
|
+
return !!~d && !!c.splice(d, 1);
|
|
758
758
|
}
|
|
759
|
-
function c
|
|
759
|
+
function f(c, l) {
|
|
760
760
|
for (var d in l)
|
|
761
|
-
l.hasOwnProperty(d) && (
|
|
761
|
+
l.hasOwnProperty(d) && (c[d] = l[d]);
|
|
762
762
|
}
|
|
763
763
|
var u = t.fastdom = t.fastdom || new i();
|
|
764
764
|
e.exports = u;
|
|
@@ -886,40 +886,40 @@ function jt(e, t, n, s, i) {
|
|
|
886
886
|
);
|
|
887
887
|
if (!a || a.length === 0)
|
|
888
888
|
return null;
|
|
889
|
-
const
|
|
889
|
+
const f = Dt(a, n, t.effectId);
|
|
890
890
|
let u;
|
|
891
|
-
const
|
|
892
|
-
|
|
891
|
+
const c = n?.trigger === "view-progress";
|
|
892
|
+
c && window.ViewTimeline && (u = new ViewTimeline({
|
|
893
893
|
subject: n.element || Y(n.componentId)
|
|
894
894
|
}));
|
|
895
|
-
const l =
|
|
895
|
+
const l = f.map(({ effect: d, options: h, id: p, part: m }) => {
|
|
896
896
|
const g = m ? Rt(o, m) : o, v = new KeyframeEffect(g || null, [], h);
|
|
897
897
|
A.mutate(() => {
|
|
898
898
|
"timing" in d && v.updateTiming(d.timing), v.setKeyframes(At(d.keyframes));
|
|
899
899
|
});
|
|
900
|
-
const y =
|
|
900
|
+
const y = c && u ? { timeline: u } : {}, b = typeof d.customEffect == "function" ? new cs(
|
|
901
901
|
d.customEffect,
|
|
902
902
|
g || null,
|
|
903
903
|
h,
|
|
904
904
|
y
|
|
905
905
|
) : new Animation(v, y.timeline);
|
|
906
|
-
if (
|
|
906
|
+
if (c)
|
|
907
907
|
if (u)
|
|
908
908
|
A.mutate(() => {
|
|
909
909
|
if (g) {
|
|
910
|
-
const { start: E, end:
|
|
911
|
-
b.rangeStart = E, b.rangeEnd =
|
|
910
|
+
const { start: E, end: $ } = Ft(d);
|
|
911
|
+
b.rangeStart = E, b.rangeEnd = $;
|
|
912
912
|
}
|
|
913
913
|
b.play();
|
|
914
914
|
});
|
|
915
915
|
else {
|
|
916
|
-
const { startOffset: E, endOffset:
|
|
916
|
+
const { startOffset: E, endOffset: $ } = t;
|
|
917
917
|
A.mutate(() => {
|
|
918
|
-
const
|
|
918
|
+
const S = d.startOffset || E, _ = d.endOffset || $;
|
|
919
919
|
Object.assign(b, {
|
|
920
920
|
start: {
|
|
921
|
-
name:
|
|
922
|
-
offset:
|
|
921
|
+
name: S.name,
|
|
922
|
+
offset: S.offset?.value,
|
|
923
923
|
add: d.startOffsetAdd
|
|
924
924
|
},
|
|
925
925
|
end: {
|
|
@@ -940,7 +940,7 @@ function jt(e, t, n, s, i) {
|
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
942
|
function ms(e, t, n) {
|
|
943
|
-
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction:
|
|
943
|
+
const { duration: s, delay: i, iterations: o = 1, fill: r, easing: a = "linear", direction: f } = e.options, u = e.effect.name, c = s === "auto", { sequenceId: l, delay: d, offset: h, offsetEasing: p = "linear" } = n || {};
|
|
944
944
|
let m = `${i ?? 0}ms`;
|
|
945
945
|
if (l && typeof p == "string") {
|
|
946
946
|
const g = rs(p);
|
|
@@ -955,25 +955,25 @@ function ms(e, t, n) {
|
|
|
955
955
|
m = `${v}ms`;
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
|
-
return `${u} ${
|
|
958
|
+
return `${u} ${c ? "auto" : `${s}ms`}${c ? " " : ` ${m} `}${a}${r && r !== "none" ? ` ${r}` : ""} ${!o || o === 1 / 0 ? "infinite" : o}${f === "normal" ? "" : ` ${f}`} ${t ? "" : "paused"}`;
|
|
959
959
|
}
|
|
960
960
|
function ps(e, t, n) {
|
|
961
961
|
return e?.style ? (Je(n) && (t.duration = t.duration || 1), e.style(t)) : [];
|
|
962
962
|
}
|
|
963
963
|
function gs(e, t, n, s) {
|
|
964
964
|
const i = se(t), o = ps(i, t), r = Dt(o, n, t.effectId, !0), a = n?.trigger === "view-progress";
|
|
965
|
-
return r.map((
|
|
966
|
-
const { start:
|
|
965
|
+
return r.map((f, u) => {
|
|
966
|
+
const { start: c, end: l } = a ? Ft(f.effect) : {};
|
|
967
967
|
return {
|
|
968
|
-
part:
|
|
969
|
-
animation: ms(
|
|
970
|
-
composition:
|
|
971
|
-
custom:
|
|
972
|
-
name:
|
|
973
|
-
keyframes: At(
|
|
974
|
-
id:
|
|
968
|
+
part: f.part,
|
|
969
|
+
animation: ms(f, a, s),
|
|
970
|
+
composition: f.options.composite,
|
|
971
|
+
custom: f.effect.custom,
|
|
972
|
+
name: f.effect.name,
|
|
973
|
+
keyframes: At(f.effect.keyframes),
|
|
974
|
+
id: f.id && `${f.id}-${u + 1}`,
|
|
975
975
|
animationTimeline: a ? `--${n?.id}` : "",
|
|
976
|
-
animationRange:
|
|
976
|
+
animationRange: c || l ? `${c} ${l}` : ""
|
|
977
977
|
};
|
|
978
978
|
});
|
|
979
979
|
}
|
|
@@ -991,10 +991,10 @@ function zt(e, t) {
|
|
|
991
991
|
return null;
|
|
992
992
|
if (!n.style)
|
|
993
993
|
return t.effectId && e ? ys(e, t.effectId, n.parts) : null;
|
|
994
|
-
const s = n.getNames(t), o = Lt(e, n.parts)?.flatMap((
|
|
995
|
-
return s.forEach((
|
|
996
|
-
r.includes(
|
|
997
|
-
o?.find((u) => u.animationName ===
|
|
994
|
+
const s = n.getNames(t), o = Lt(e, n.parts)?.flatMap((f) => f.getAnimations()), r = o?.map((f) => f.animationName) || [], a = [];
|
|
995
|
+
return s.forEach((f) => {
|
|
996
|
+
r.includes(f) && a.push(
|
|
997
|
+
o?.find((u) => u.animationName === f)
|
|
998
998
|
);
|
|
999
999
|
}), a?.length ? new ce(a) : null;
|
|
1000
1000
|
}
|
|
@@ -1009,9 +1009,9 @@ function Ht(e, t, n, s = {}) {
|
|
|
1009
1009
|
const { disabled: i, allowActiveEvent: o, ...r } = s, a = jt(e, t, n, r);
|
|
1010
1010
|
if (!a)
|
|
1011
1011
|
return null;
|
|
1012
|
-
let
|
|
1012
|
+
let f = {};
|
|
1013
1013
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
1014
|
-
const u = n.element || Y(n.componentId), { ready:
|
|
1014
|
+
const u = n.element || Y(n.componentId), { ready: c } = a;
|
|
1015
1015
|
return a.animations.map((l) => ({
|
|
1016
1016
|
/* we use getters for start and end in order to access the animation's start and end
|
|
1017
1017
|
only when initializing the scrub scene rather than immediately */
|
|
@@ -1022,7 +1022,7 @@ function Ht(e, t, n, s = {}) {
|
|
|
1022
1022
|
return l.end;
|
|
1023
1023
|
},
|
|
1024
1024
|
viewSource: u,
|
|
1025
|
-
ready:
|
|
1025
|
+
ready: c,
|
|
1026
1026
|
getProgress() {
|
|
1027
1027
|
return a.getProgress();
|
|
1028
1028
|
},
|
|
@@ -1036,12 +1036,12 @@ function Ht(e, t, n, s = {}) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
}));
|
|
1038
1038
|
} else if (n.trigger === "pointer-move") {
|
|
1039
|
-
const u = t, { centeredToTarget:
|
|
1039
|
+
const u = t, { centeredToTarget: c, transitionDuration: l, transitionEasing: d } = u, h = n.axis;
|
|
1040
1040
|
if (u.keyframeEffect) {
|
|
1041
1041
|
const p = a;
|
|
1042
1042
|
return p.animations?.length === 0 ? null : {
|
|
1043
1043
|
target: (typeof e == "string" ? Y(e) : e) ?? void 0,
|
|
1044
|
-
centeredToTarget:
|
|
1044
|
+
centeredToTarget: c,
|
|
1045
1045
|
ready: p.ready,
|
|
1046
1046
|
_currentProgress: 0,
|
|
1047
1047
|
getProgress() {
|
|
@@ -1057,24 +1057,24 @@ function Ht(e, t, n, s = {}) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
};
|
|
1059
1059
|
}
|
|
1060
|
-
|
|
1061
|
-
centeredToTarget:
|
|
1060
|
+
f = {
|
|
1061
|
+
centeredToTarget: c,
|
|
1062
1062
|
allowActiveEvent: o
|
|
1063
|
-
}, t.customEffect && l && (
|
|
1063
|
+
}, t.customEffect && l && (f.transitionDuration = l, f.transitionEasing = Qe(d)), f.target = a.target;
|
|
1064
1064
|
}
|
|
1065
1065
|
return {
|
|
1066
|
-
...
|
|
1066
|
+
...f,
|
|
1067
1067
|
getProgress() {
|
|
1068
1068
|
return a.getProgress();
|
|
1069
1069
|
},
|
|
1070
|
-
effect(u,
|
|
1070
|
+
effect(u, c, l, d) {
|
|
1071
1071
|
a.progress(
|
|
1072
1072
|
l ? {
|
|
1073
1073
|
// @ts-expect-error spread error on p
|
|
1074
|
-
...
|
|
1074
|
+
...c,
|
|
1075
1075
|
v: l,
|
|
1076
1076
|
active: d
|
|
1077
|
-
} :
|
|
1077
|
+
} : c
|
|
1078
1078
|
);
|
|
1079
1079
|
},
|
|
1080
1080
|
disabled: i,
|
|
@@ -1115,10 +1115,10 @@ function ws(e, t, n) {
|
|
|
1115
1115
|
function bs(e, t = 2) {
|
|
1116
1116
|
return parseFloat(e.toFixed(t));
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function Ss(e) {
|
|
1119
1119
|
return /\[]/g.test(e);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function $s(e) {
|
|
1122
1122
|
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1123
1123
|
}
|
|
1124
1124
|
function we(e, t) {
|
|
@@ -1140,7 +1140,7 @@ function Vt(e) {
|
|
|
1140
1140
|
const { transition: t, transitionProperties: n } = e;
|
|
1141
1141
|
return (t?.styleProperties || n || []).map((i) => ({
|
|
1142
1142
|
...i,
|
|
1143
|
-
name:
|
|
1143
|
+
name: Se(i.name)
|
|
1144
1144
|
}));
|
|
1145
1145
|
}
|
|
1146
1146
|
function Bt(e) {
|
|
@@ -1148,18 +1148,18 @@ function Bt(e) {
|
|
|
1148
1148
|
if (t?.styleProperties) {
|
|
1149
1149
|
const { duration: i, easing: o, delay: r } = t;
|
|
1150
1150
|
(i || r) && (t.styleProperties.some(
|
|
1151
|
-
(
|
|
1151
|
+
(f) => f.name.startsWith("--")
|
|
1152
1152
|
) ? s = [
|
|
1153
1153
|
`all ${i || 0}ms ${ye(o || "ease")}${r ? ` ${r}ms` : ""}`,
|
|
1154
1154
|
"visibility 0s"
|
|
1155
1155
|
] : s = t.styleProperties.map(
|
|
1156
|
-
(
|
|
1156
|
+
(f) => `${Se(f.name)} ${i || 0}ms ${ye(
|
|
1157
1157
|
o || "ease"
|
|
1158
1158
|
)}${r ? ` ${r}ms` : ""}`
|
|
1159
1159
|
));
|
|
1160
1160
|
} else
|
|
1161
1161
|
s = n?.filter((i) => i.duration || i.delay).map(
|
|
1162
|
-
(i) => `${
|
|
1162
|
+
(i) => `${Se(i.name)} ${i.duration || 0}ms ${ye(i.easing) || "ease"}${i.delay ? ` ${i.delay}ms` : ""}`
|
|
1163
1163
|
) || [];
|
|
1164
1164
|
return s;
|
|
1165
1165
|
}
|
|
@@ -1176,7 +1176,7 @@ function Is({
|
|
|
1176
1176
|
transitionProperties: s
|
|
1177
1177
|
}), a = Vt({ transition: n, transitionProperties: s }).map(
|
|
1178
1178
|
(p) => `${p.name}: ${p.value};`
|
|
1179
|
-
),
|
|
1179
|
+
), f = e.replace(/"/g, "'"), u = `:is(:state(${t}), :--${t}) ${i}`, c = `[data-interact-effect~="${t}"] ${i}`, l = o ? we(u, o) : u, d = o ? we(c, o) : c, h = [
|
|
1180
1180
|
`${l},
|
|
1181
1181
|
${d} {
|
|
1182
1182
|
${a.join(`
|
|
@@ -1184,7 +1184,7 @@ function Is({
|
|
|
1184
1184
|
}`
|
|
1185
1185
|
];
|
|
1186
1186
|
if (r.length) {
|
|
1187
|
-
const p = `[data-interact-key="${
|
|
1187
|
+
const p = `[data-interact-key="${f}"] ${i}`, m = o ? we(p, o) : p;
|
|
1188
1188
|
h.push(`${m} {
|
|
1189
1189
|
transition: ${r.join(", ")};
|
|
1190
1190
|
}`);
|
|
@@ -1202,13 +1202,13 @@ function H(e, t) {
|
|
|
1202
1202
|
function U(e, t) {
|
|
1203
1203
|
return (e || []).filter((n) => t[n]?.type === "selector" && t[n].predicate).map((n) => `:is(${t[n].predicate})`).join("");
|
|
1204
1204
|
}
|
|
1205
|
-
const Oe = "__rm-reduce", Yt = "__rm-no-preference",
|
|
1205
|
+
const Oe = "__rm-reduce", Yt = "__rm-no-preference", Ts = {
|
|
1206
1206
|
[Oe]: { type: "media", predicate: "prefers-reduced-motion: reduce" },
|
|
1207
1207
|
[Yt]: {
|
|
1208
1208
|
type: "media",
|
|
1209
1209
|
predicate: "prefers-reduced-motion: no-preference"
|
|
1210
1210
|
}
|
|
1211
|
-
},
|
|
1211
|
+
}, _s = /* @__PURE__ */ new Set([
|
|
1212
1212
|
"namedEffect",
|
|
1213
1213
|
"keyframeEffect",
|
|
1214
1214
|
"customEffect",
|
|
@@ -1229,7 +1229,7 @@ const Oe = "__rm-reduce", Yt = "__rm-no-preference", _s = {
|
|
|
1229
1229
|
"transitionEasing"
|
|
1230
1230
|
]);
|
|
1231
1231
|
function Ut(e = {}) {
|
|
1232
|
-
return { ...e, ...
|
|
1232
|
+
return { ...e, ...Ts };
|
|
1233
1233
|
}
|
|
1234
1234
|
function Pe(...e) {
|
|
1235
1235
|
return e.find(Boolean) ?? "collapse";
|
|
@@ -1256,7 +1256,7 @@ function mt(e) {
|
|
|
1256
1256
|
return t === "scrub" || !n || n === 1 / 0 ? null : { ...e, duration: 0 };
|
|
1257
1257
|
}
|
|
1258
1258
|
function Ms(e, t, n) {
|
|
1259
|
-
const s = ([o]) =>
|
|
1259
|
+
const s = ([o]) => _s.has(o), { keyframeEffect: i } = n;
|
|
1260
1260
|
return {
|
|
1261
1261
|
...Object.fromEntries(Object.entries(e).filter((o) => !s(o))),
|
|
1262
1262
|
...Object.fromEntries(Object.entries(n).filter(s)),
|
|
@@ -1314,7 +1314,7 @@ function gt(e, t) {
|
|
|
1314
1314
|
return n ? t || !n.type ? a : { namedEffect: n, ...a } : i ? { keyframeEffect: i, ...a } : s ? a : o ? { transition: o, ...a } : r ? { transitionProperties: r, ...a } : a;
|
|
1315
1315
|
}
|
|
1316
1316
|
function Qt(e, t, n, s, i = {}) {
|
|
1317
|
-
const { effects: o = {}, conditions: r = {} } = n, { key: a, trigger:
|
|
1317
|
+
const { effects: o = {}, conditions: r = {} } = n, { key: a, trigger: f, conditions: u = [] } = t, c = f === "pointerMove";
|
|
1318
1318
|
e.effectId || (e.effectId = s || ie());
|
|
1319
1319
|
const { effectId: l } = e, d = { ...o[l] || {}, ...e };
|
|
1320
1320
|
let { key: h, conditions: p, triggerType: m } = d;
|
|
@@ -1323,26 +1323,26 @@ function Qt(e, t, n, s, i = {}) {
|
|
|
1323
1323
|
return null;
|
|
1324
1324
|
h = a;
|
|
1325
1325
|
}
|
|
1326
|
-
if (
|
|
1326
|
+
if (Ss(h))
|
|
1327
1327
|
return null;
|
|
1328
1328
|
const g = u.filter(
|
|
1329
|
-
(
|
|
1329
|
+
(S) => r[S].type === "media"
|
|
1330
1330
|
);
|
|
1331
1331
|
p = [
|
|
1332
1332
|
...new Set(
|
|
1333
1333
|
[...p || [], ...g].filter(
|
|
1334
|
-
(
|
|
1334
|
+
(S) => r[S]
|
|
1335
1335
|
)
|
|
1336
1336
|
)
|
|
1337
|
-
], m || (m = Xt.get(
|
|
1337
|
+
], m || (m = Xt.get(f));
|
|
1338
1338
|
const { namedEffect: v, keyframeEffect: y } = d;
|
|
1339
1339
|
if (!v && y && !y.name) {
|
|
1340
|
-
const
|
|
1341
|
-
y.name =
|
|
1340
|
+
const S = l && !(o[l] && "keyframeEffect" in e);
|
|
1341
|
+
y.name = S ? l : ie();
|
|
1342
1342
|
}
|
|
1343
|
-
if (!Cs(d,
|
|
1343
|
+
if (!Cs(d, c))
|
|
1344
1344
|
return null;
|
|
1345
|
-
const b = { ...d, key: h, conditions: p, effectId: l, triggerType: m }, E = { ...b, initial:
|
|
1345
|
+
const b = { ...d, key: h, conditions: p, effectId: l, triggerType: m }, E = { ...b, initial: Tn(t, b) }, $ = Kt(
|
|
1346
1346
|
E,
|
|
1347
1347
|
Pe(
|
|
1348
1348
|
d.reducedMotionPolicy,
|
|
@@ -1351,13 +1351,13 @@ function Qt(e, t, n, s, i = {}) {
|
|
|
1351
1351
|
i.defaultPolicy
|
|
1352
1352
|
),
|
|
1353
1353
|
{ effects: o, force: i.force, collapsesStagger: i.collapsesStagger }
|
|
1354
|
-
).map((
|
|
1355
|
-
return
|
|
1354
|
+
).map((S) => gt(S, c));
|
|
1355
|
+
return $.length ? { ...gt(E, c), variants: $ } : null;
|
|
1356
1356
|
}
|
|
1357
1357
|
function As(e, t, n, s, i, o = {}) {
|
|
1358
|
-
const { sequences: r = {}, conditions: a = {} } = n, { trigger:
|
|
1358
|
+
const { sequences: r = {}, conditions: a = {} } = n, { trigger: f, conditions: u = [] } = t;
|
|
1359
1359
|
e.sequenceId || (e.sequenceId = s || ie());
|
|
1360
|
-
const { sequenceId:
|
|
1360
|
+
const { sequenceId: c } = e, l = { ...r[c] || {}, ...e }, d = Pe(
|
|
1361
1361
|
l.reducedMotionPolicy,
|
|
1362
1362
|
t.reducedMotionPolicy,
|
|
1363
1363
|
o.defaultPolicy
|
|
@@ -1372,40 +1372,40 @@ function As(e, t, n, s, i, o = {}) {
|
|
|
1372
1372
|
} = l;
|
|
1373
1373
|
if (typeof y == "function" || !h)
|
|
1374
1374
|
return null;
|
|
1375
|
-
m || (m = Xt.get(
|
|
1375
|
+
m || (m = Xt.get(f));
|
|
1376
1376
|
const b = u.filter(
|
|
1377
|
-
(
|
|
1377
|
+
(S) => a[S].type === "media"
|
|
1378
1378
|
);
|
|
1379
1379
|
p = [
|
|
1380
1380
|
...new Set(
|
|
1381
1381
|
[...p || [], ...b].filter(
|
|
1382
|
-
(
|
|
1382
|
+
(S) => a[S]
|
|
1383
1383
|
)
|
|
1384
1384
|
)
|
|
1385
1385
|
];
|
|
1386
|
-
const
|
|
1386
|
+
const $ = h.map((S, _) => {
|
|
1387
1387
|
const I = Qt(
|
|
1388
|
-
{
|
|
1388
|
+
{ ...S, triggerType: m, conditions: [...S.conditions || [], ...p] },
|
|
1389
1389
|
t,
|
|
1390
1390
|
n,
|
|
1391
|
-
`${
|
|
1391
|
+
`${c}-eff-${_}`,
|
|
1392
1392
|
{ ...o, policy: d, collapsesStagger: d !== "ignore" }
|
|
1393
1393
|
);
|
|
1394
1394
|
return I && Object.assign(I, { slotKey: i?.(_) });
|
|
1395
|
-
}).filter((
|
|
1396
|
-
return
|
|
1397
|
-
sequenceId:
|
|
1395
|
+
}).filter((S) => S !== null);
|
|
1396
|
+
return $.length ? {
|
|
1397
|
+
sequenceId: c,
|
|
1398
1398
|
triggerType: m,
|
|
1399
1399
|
conditions: p,
|
|
1400
1400
|
delay: g,
|
|
1401
1401
|
offset: v,
|
|
1402
1402
|
offsetEasing: y,
|
|
1403
1403
|
reducedMotionPolicy: d,
|
|
1404
|
-
effects:
|
|
1404
|
+
effects: $
|
|
1405
1405
|
} : null;
|
|
1406
1406
|
}
|
|
1407
1407
|
function ks(e) {
|
|
1408
|
-
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" :
|
|
1408
|
+
return e === "cssFloat" ? "float" : e === "easing" ? "animation-timing-function" : e === "cssOffset" ? "offset" : e === "composite" ? "animation-composition" : Se(e);
|
|
1409
1409
|
}
|
|
1410
1410
|
function qs(e) {
|
|
1411
1411
|
if (!e.length)
|
|
@@ -1422,8 +1422,8 @@ function qs(e) {
|
|
|
1422
1422
|
return console.error("Offsets must be in the range [0,1]"), [];
|
|
1423
1423
|
const r = i - n;
|
|
1424
1424
|
for (let a = n + 1; a < i; a++) {
|
|
1425
|
-
const
|
|
1426
|
-
t[a].offset = s + (o - s) *
|
|
1425
|
+
const f = (a - n) / r;
|
|
1426
|
+
t[a].offset = s + (o - s) * f;
|
|
1427
1427
|
}
|
|
1428
1428
|
n = i, s = o;
|
|
1429
1429
|
}
|
|
@@ -1453,19 +1453,19 @@ function Fs(e) {
|
|
|
1453
1453
|
const { key: t, childSelector: n, declarations: s, media: i, states: o, selectorCondition: r, selectorSuffix: a } = e;
|
|
1454
1454
|
if (!s.length)
|
|
1455
1455
|
return "";
|
|
1456
|
-
let
|
|
1456
|
+
let f = `[data-interact-key="${t}"]`;
|
|
1457
1457
|
if (o && o.length) {
|
|
1458
1458
|
const l = o.map((d) => `:state(${d}), :--${d}, [data-interact-effect~="${d}"]`).join(", ");
|
|
1459
|
-
|
|
1459
|
+
f = `${f}:is(${l})`;
|
|
1460
1460
|
}
|
|
1461
|
-
n && (
|
|
1461
|
+
n && (f = `${f} ${n}`), a && (f = `${f}${a}`), r && (f = we(f, r));
|
|
1462
1462
|
const u = s.map(({ name: l, value: d, important: h }) => `${l}: ${d}${h ? " !important" : ""};`).join(`
|
|
1463
|
-
`),
|
|
1463
|
+
`), c = `${f} {
|
|
1464
1464
|
${u}
|
|
1465
1465
|
}`;
|
|
1466
1466
|
return i ? `@media ${i} {
|
|
1467
|
-
${
|
|
1468
|
-
}` :
|
|
1467
|
+
${c}
|
|
1468
|
+
}` : c;
|
|
1469
1469
|
}
|
|
1470
1470
|
const ze = [
|
|
1471
1471
|
"animation",
|
|
@@ -1513,20 +1513,20 @@ function Ns(e, t, n, s, i = 0, o) {
|
|
|
1513
1513
|
animation: n,
|
|
1514
1514
|
transition: s,
|
|
1515
1515
|
timeline: 0
|
|
1516
|
-
},
|
|
1516
|
+
}, f = (u, c) => `@property ${c} { syntax: "*"; inherits: false; initial-value: ${Z[u]}; }`;
|
|
1517
1517
|
return Ce.flatMap((u) => [
|
|
1518
1518
|
...Array.from(
|
|
1519
1519
|
{ length: r[F(u)] },
|
|
1520
|
-
(
|
|
1520
|
+
(c, l) => f(u, z(u, l, !1, o))
|
|
1521
1521
|
),
|
|
1522
1522
|
...Array.from(
|
|
1523
1523
|
{ length: a[F(u)] },
|
|
1524
|
-
(
|
|
1524
|
+
(c, l) => f(u, z(u, l, !0, o))
|
|
1525
1525
|
),
|
|
1526
1526
|
// registers the lists of the configs before it too, for elements they don't target
|
|
1527
1527
|
...Array.from(
|
|
1528
1528
|
{ length: o !== void 0 && r[F(u)] ? o + 1 : 0 },
|
|
1529
|
-
(
|
|
1529
|
+
(c, l) => f(u, oe(u, l))
|
|
1530
1530
|
)
|
|
1531
1531
|
]);
|
|
1532
1532
|
}
|
|
@@ -1537,11 +1537,11 @@ function Ds(e, t, n, s) {
|
|
|
1537
1537
|
if (i.length === 0)
|
|
1538
1538
|
return null;
|
|
1539
1539
|
const o = i.map((a) => {
|
|
1540
|
-
const { listIndex:
|
|
1540
|
+
const { listIndex: f, slotCursor: u, slotsInSequence: c } = e[F(a)];
|
|
1541
1541
|
return {
|
|
1542
|
-
name: z(a,
|
|
1542
|
+
name: z(a, f, !1, s),
|
|
1543
1543
|
value: Array.from(
|
|
1544
|
-
{ length:
|
|
1544
|
+
{ length: c },
|
|
1545
1545
|
(l, d) => `var(${z(a, u + d, !0, s)})`
|
|
1546
1546
|
).join(", ")
|
|
1547
1547
|
};
|
|
@@ -1559,20 +1559,20 @@ function js(e, t, n, s = 0, i) {
|
|
|
1559
1559
|
if (r.length === 0)
|
|
1560
1560
|
return "";
|
|
1561
1561
|
const a = r.flatMap((u) => {
|
|
1562
|
-
const
|
|
1562
|
+
const c = Array.from(
|
|
1563
1563
|
{ length: o[F(u)] },
|
|
1564
1564
|
// TODO: maybe add `-intrct` to names? --anm-0 or --trns-0 could collide with user-defined names
|
|
1565
1565
|
(l, d) => `var(${z(u, d, !1, i)})`
|
|
1566
1566
|
).join(", ");
|
|
1567
|
-
return i === void 0 ? [{ name: u, value:
|
|
1568
|
-
{ name: oe(u, i), value:
|
|
1567
|
+
return i === void 0 ? [{ name: u, value: c }] : [
|
|
1568
|
+
{ name: oe(u, i), value: c },
|
|
1569
1569
|
{ name: u, value: xs(u, i) }
|
|
1570
1570
|
];
|
|
1571
1571
|
});
|
|
1572
1572
|
return `${e.map(
|
|
1573
|
-
({ key: u, childSelector:
|
|
1573
|
+
({ key: u, childSelector: c }) => `[data-interact-key="${u}"]${c ? ` ${c}` : ""}`
|
|
1574
1574
|
).join(", ")} {
|
|
1575
|
-
${a.map(({ name: u, value:
|
|
1575
|
+
${a.map(({ name: u, value: c }) => ` ${u}: ${c};`).join(`
|
|
1576
1576
|
`)}
|
|
1577
1577
|
}`;
|
|
1578
1578
|
}
|
|
@@ -1716,16 +1716,16 @@ const Ys = {
|
|
|
1716
1716
|
"animation-range": "animationRange"
|
|
1717
1717
|
};
|
|
1718
1718
|
function Us(e, t, n, s) {
|
|
1719
|
-
const { key: i, conditions: o } = t, r = ue(o, e.configConditions, "media"), a = U(o, e.configConditions),
|
|
1719
|
+
const { key: i, conditions: o } = t, r = ue(o, e.configConditions, "media"), a = U(o, e.configConditions), f = j(t, {
|
|
1720
1720
|
asCombinator: !0,
|
|
1721
1721
|
useFirstChild: e.useFirstChild,
|
|
1722
1722
|
addItemFilter: !0
|
|
1723
|
-
}), u = B(t),
|
|
1724
|
-
return Ge(
|
|
1723
|
+
}), u = B(t), c = e.targetsMap.get(u) || Jt(i, f), l = en(c, He, e.configIndex)["view-timeline"];
|
|
1724
|
+
return Ge(c, { animation: !1, transition: !1, timeline: !0 }, He), e.targetsMap.set(u, c), s.add(u), {
|
|
1725
1725
|
key: i,
|
|
1726
1726
|
media: r,
|
|
1727
1727
|
selectorCondition: a,
|
|
1728
|
-
childSelector:
|
|
1728
|
+
childSelector: f,
|
|
1729
1729
|
declarations: [
|
|
1730
1730
|
{
|
|
1731
1731
|
name: l,
|
|
@@ -1743,14 +1743,14 @@ function nn(e, t, n, s, i) {
|
|
|
1743
1743
|
key: n,
|
|
1744
1744
|
scope: e,
|
|
1745
1745
|
config: t
|
|
1746
|
-
}).map((
|
|
1746
|
+
}).map((f) => ({ ...f, key: n, media: s }))
|
|
1747
1747
|
);
|
|
1748
1748
|
}
|
|
1749
1749
|
return o;
|
|
1750
1750
|
}
|
|
1751
1751
|
function Ks(e, t, n, s, i, o) {
|
|
1752
|
-
const { assigned: r, childSelector: a, partSelectors:
|
|
1753
|
-
key:
|
|
1752
|
+
const { assigned: r, childSelector: a, partSelectors: f } = n, u = { animation: !1, transition: !1, timeline: !1 }, {
|
|
1753
|
+
key: c,
|
|
1754
1754
|
effectId: l,
|
|
1755
1755
|
conditions: d,
|
|
1756
1756
|
namedEffect: h,
|
|
@@ -1760,33 +1760,33 @@ function Ks(e, t, n, s, i, o) {
|
|
|
1760
1760
|
initial: v
|
|
1761
1761
|
} = t, y = ue(d, e.configConditions, "media"), b = U(d, e.configConditions), E = [
|
|
1762
1762
|
{
|
|
1763
|
-
key:
|
|
1763
|
+
key: c,
|
|
1764
1764
|
media: y,
|
|
1765
1765
|
selectorCondition: b,
|
|
1766
1766
|
childSelector: a,
|
|
1767
1767
|
declarations: []
|
|
1768
1768
|
}
|
|
1769
1769
|
];
|
|
1770
|
-
let
|
|
1771
|
-
const { declarations:
|
|
1772
|
-
e.plugins && E.push(...nn("effect", t,
|
|
1770
|
+
let $ = [];
|
|
1771
|
+
const { declarations: S } = E[0];
|
|
1772
|
+
e.plugins && E.push(...nn("effect", t, c, y, e.plugins));
|
|
1773
1773
|
const _ = v && t.duration === 0;
|
|
1774
1774
|
if ((h || p) && !_) {
|
|
1775
1775
|
const I = x(t), O = gs(null, I, s, o).filter(
|
|
1776
1776
|
(T) => T.name
|
|
1777
|
-
),
|
|
1777
|
+
), P = O.length ? {} : { "": [] };
|
|
1778
1778
|
O.forEach((T) => {
|
|
1779
1779
|
const M = T.part || "";
|
|
1780
|
-
(
|
|
1781
|
-
}),
|
|
1780
|
+
(P[M] ||= []).push(T);
|
|
1781
|
+
}), $ = O.map((T) => ({
|
|
1782
1782
|
name: T.name,
|
|
1783
1783
|
keyframes: T.keyframes
|
|
1784
|
-
})),
|
|
1784
|
+
})), S.push(
|
|
1785
1785
|
...O.flatMap(
|
|
1786
|
-
({ custom: T }) => Object.entries(T || {}).filter(([M,
|
|
1786
|
+
({ custom: T }) => Object.entries(T || {}).filter(([M, C]) => C !== void 0).map(([M, C]) => ({ name: M, value: C }))
|
|
1787
1787
|
)
|
|
1788
|
-
), Object.entries(
|
|
1789
|
-
const
|
|
1788
|
+
), Object.entries(P).forEach(([T, M]) => {
|
|
1789
|
+
const C = ze.map((L) => ({
|
|
1790
1790
|
_listPropertyName: L,
|
|
1791
1791
|
name: i[L],
|
|
1792
1792
|
value: M.map((qe) => {
|
|
@@ -1796,37 +1796,37 @@ function Ks(e, t, n, s, i, o) {
|
|
|
1796
1796
|
})).filter(
|
|
1797
1797
|
({ _listPropertyName: L, name: qe, value: Re }) => Re !== Z[L] || r.has(qe)
|
|
1798
1798
|
);
|
|
1799
|
-
|
|
1799
|
+
C.forEach(({ name: L }) => r.add(L)), u.animation = u.animation || C.length > 0;
|
|
1800
1800
|
const de = T ? `[data-motion-part~="${T}"]` : a;
|
|
1801
|
-
T &&
|
|
1802
|
-
key:
|
|
1801
|
+
T && C.length && f.add(de), v ? (E.push({
|
|
1802
|
+
key: c,
|
|
1803
1803
|
media: y,
|
|
1804
1804
|
selectorCondition: b,
|
|
1805
1805
|
childSelector: de,
|
|
1806
1806
|
declarations: vt,
|
|
1807
1807
|
selectorSuffix: ":not([data-interact-enter])"
|
|
1808
1808
|
}), E.push({
|
|
1809
|
-
key:
|
|
1809
|
+
key: c,
|
|
1810
1810
|
media: y,
|
|
1811
1811
|
selectorCondition: b,
|
|
1812
1812
|
childSelector: de,
|
|
1813
|
-
declarations:
|
|
1813
|
+
declarations: C,
|
|
1814
1814
|
selectorSuffix: ':not([data-interact-enter="done"])'
|
|
1815
1815
|
})) : T ? E.push({
|
|
1816
|
-
key:
|
|
1816
|
+
key: c,
|
|
1817
1817
|
media: y,
|
|
1818
1818
|
selectorCondition: b,
|
|
1819
1819
|
childSelector: de,
|
|
1820
|
-
declarations:
|
|
1821
|
-
}) :
|
|
1820
|
+
declarations: C
|
|
1821
|
+
}) : S.push(...C);
|
|
1822
1822
|
});
|
|
1823
1823
|
} else if (m || g) {
|
|
1824
1824
|
const I = Vt(t), O = Bt(t);
|
|
1825
|
-
(O.length || r.has(i.transition)) && (
|
|
1825
|
+
(O.length || r.has(i.transition)) && (S.push({
|
|
1826
1826
|
name: i.transition,
|
|
1827
1827
|
value: O.join(", ") || Z.transition
|
|
1828
1828
|
}), r.add(i.transition), u.transition = !0), E.push({
|
|
1829
|
-
key:
|
|
1829
|
+
key: c,
|
|
1830
1830
|
media: y,
|
|
1831
1831
|
selectorCondition: b,
|
|
1832
1832
|
childSelector: a,
|
|
@@ -1835,13 +1835,13 @@ function Ks(e, t, n, s, i, o) {
|
|
|
1835
1835
|
});
|
|
1836
1836
|
} else
|
|
1837
1837
|
_ && E.push({
|
|
1838
|
-
key:
|
|
1838
|
+
key: c,
|
|
1839
1839
|
media: y,
|
|
1840
1840
|
selectorCondition: b,
|
|
1841
1841
|
childSelector: a,
|
|
1842
1842
|
declarations: vt,
|
|
1843
1843
|
selectorSuffix: ":not([data-interact-enter])"
|
|
1844
|
-
}),
|
|
1844
|
+
}), S.push(
|
|
1845
1845
|
...ze.filter(
|
|
1846
1846
|
(I) => r.has(i[I])
|
|
1847
1847
|
).map((I) => ({
|
|
@@ -1849,7 +1849,7 @@ function Ks(e, t, n, s, i, o) {
|
|
|
1849
1849
|
value: Z[I]
|
|
1850
1850
|
}))
|
|
1851
1851
|
);
|
|
1852
|
-
return { rules: E.filter((I) => I.declarations.length), keyframes:
|
|
1852
|
+
return { rules: E.filter((I) => I.declarations.length), keyframes: $, wrote: u };
|
|
1853
1853
|
}
|
|
1854
1854
|
function Xs(e, t, n, s) {
|
|
1855
1855
|
const i = t.namedEffect && Ze(t.namedEffect.type, !1);
|
|
@@ -1875,16 +1875,16 @@ function sn(e, t, n, s, i, o) {
|
|
|
1875
1875
|
})
|
|
1876
1876
|
);
|
|
1877
1877
|
s.add(r);
|
|
1878
|
-
const
|
|
1878
|
+
const f = o?.get(r) || He, u = en(a, f, e.configIndex), c = t.variants || [t], l = tn(t);
|
|
1879
1879
|
if (e.collectSlots)
|
|
1880
|
-
return
|
|
1880
|
+
return c.forEach(
|
|
1881
1881
|
(m) => Xs(a, m, u.animation, t.slotKey)
|
|
1882
1882
|
), Ge(
|
|
1883
1883
|
a,
|
|
1884
1884
|
{ animation: l === "animation", transition: l === "transition", timeline: !1 },
|
|
1885
|
-
|
|
1885
|
+
f
|
|
1886
1886
|
), e.targetsMap.set(r, a), [];
|
|
1887
|
-
const d = a.assigned, h =
|
|
1887
|
+
const d = a.assigned, h = c.map((m) => (m.namedEffect && (m.suffix = e.keyframeSlots.get(t.slotKey)), a.assigned = new Set(d), {
|
|
1888
1888
|
...Ks(
|
|
1889
1889
|
e,
|
|
1890
1890
|
m,
|
|
@@ -1901,20 +1901,20 @@ function sn(e, t, n, s, i, o) {
|
|
|
1901
1901
|
const p = Object.fromEntries(
|
|
1902
1902
|
Ae.map((m) => [m, h.some((g) => g.wrote[m])])
|
|
1903
1903
|
);
|
|
1904
|
-
return Ge(a, p,
|
|
1904
|
+
return Ge(a, p, f), e.targetsMap.set(r, a), h.flatMap(({ rules: m }) => m);
|
|
1905
1905
|
}
|
|
1906
1906
|
function Zs(e, t, n, s) {
|
|
1907
1907
|
const i = [], o = /* @__PURE__ */ new Set(), r = Ws(t);
|
|
1908
1908
|
i.push(
|
|
1909
1909
|
...t.effects.flatMap(
|
|
1910
|
-
(
|
|
1910
|
+
(f) => sn(e, f, n, o, t, r)
|
|
1911
1911
|
)
|
|
1912
1912
|
);
|
|
1913
1913
|
const { conditions: a } = t;
|
|
1914
|
-
return o.forEach((
|
|
1915
|
-
s.add(
|
|
1916
|
-
const u = e.targetsMap.get(
|
|
1917
|
-
|
|
1914
|
+
return o.forEach((f) => {
|
|
1915
|
+
s.add(f);
|
|
1916
|
+
const u = e.targetsMap.get(f), c = Ds(u, a, e.configConditions, e.configIndex);
|
|
1917
|
+
c && (c.declarations.forEach(({ name: l }) => u.assigned.add(l)), i.push(c)), Vs(u);
|
|
1918
1918
|
}), i;
|
|
1919
1919
|
}
|
|
1920
1920
|
function Js(e, t, n) {
|
|
@@ -1924,11 +1924,11 @@ function Js(e, t, n) {
|
|
|
1924
1924
|
s,
|
|
1925
1925
|
ue(i, e.configConditions, "media"),
|
|
1926
1926
|
e.plugins
|
|
1927
|
-
) : [], { trigger:
|
|
1928
|
-
trigger:
|
|
1927
|
+
) : [], { trigger: f } = t, u = {
|
|
1928
|
+
trigger: $s(f),
|
|
1929
1929
|
id: te("trigger", [n], e.configIndex)
|
|
1930
|
-
},
|
|
1931
|
-
|
|
1930
|
+
}, c = /* @__PURE__ */ new Set();
|
|
1931
|
+
f === "viewProgress" && a.push(Us(e, t, u.id, c));
|
|
1932
1932
|
const l = o.map((h, p) => {
|
|
1933
1933
|
const m = Qt(
|
|
1934
1934
|
h,
|
|
@@ -1937,10 +1937,10 @@ function Js(e, t, n) {
|
|
|
1937
1937
|
te("eff", [n, p], e.configIndex),
|
|
1938
1938
|
{ force: e.forceReducedMotion, defaultPolicy: e.reducedMotionPolicy }
|
|
1939
1939
|
);
|
|
1940
|
-
return m && Object.assign(m, { slotKey:
|
|
1940
|
+
return m && Object.assign(m, { slotKey: $e(n, p) });
|
|
1941
1941
|
}).filter((h) => h !== null);
|
|
1942
1942
|
a.push(
|
|
1943
|
-
...l.flatMap((h) => sn(e, h, u,
|
|
1943
|
+
...l.flatMap((h) => sn(e, h, u, c))
|
|
1944
1944
|
);
|
|
1945
1945
|
const d = r.map(
|
|
1946
1946
|
(h, p) => As(
|
|
@@ -1948,15 +1948,15 @@ function Js(e, t, n) {
|
|
|
1948
1948
|
t,
|
|
1949
1949
|
e.config,
|
|
1950
1950
|
te("seq", [n, p], e.configIndex),
|
|
1951
|
-
(m) =>
|
|
1951
|
+
(m) => $e(n, m, p),
|
|
1952
1952
|
{ force: e.forceReducedMotion, defaultPolicy: e.reducedMotionPolicy }
|
|
1953
1953
|
)
|
|
1954
1954
|
).filter((h) => h !== null);
|
|
1955
1955
|
return a.push(
|
|
1956
1956
|
...d.flatMap(
|
|
1957
|
-
(h) => Zs(e, h, u,
|
|
1957
|
+
(h) => Zs(e, h, u, c)
|
|
1958
1958
|
)
|
|
1959
|
-
),
|
|
1959
|
+
), f === "viewProgress" && c.size > 1 && e.scopedTimelines.push(`--${u.id}`), c.forEach((h) => Bs(e.targetsMap.get(h))), a;
|
|
1960
1960
|
}
|
|
1961
1961
|
function ei(e = {}) {
|
|
1962
1962
|
return typeof e == "boolean" ? { useFirstChild: e } : e;
|
|
@@ -1969,7 +1969,7 @@ function on(e, t) {
|
|
|
1969
1969
|
collectSlots: o = !1,
|
|
1970
1970
|
forceReducedMotion: r = w.forceReducedMotion,
|
|
1971
1971
|
reducedMotionPolicy: a = w.reducedMotionPolicy
|
|
1972
|
-
} = t,
|
|
1972
|
+
} = t, f = {
|
|
1973
1973
|
config: e,
|
|
1974
1974
|
configConditions: Ut(e.conditions),
|
|
1975
1975
|
targetsMap: /* @__PURE__ */ new Map(),
|
|
@@ -1983,14 +1983,14 @@ function on(e, t) {
|
|
|
1983
1983
|
plugins: s,
|
|
1984
1984
|
configIndex: i
|
|
1985
1985
|
}, u = e.interactions.flatMap(
|
|
1986
|
-
(
|
|
1986
|
+
(c, l) => Js(f, c, l)
|
|
1987
1987
|
);
|
|
1988
|
-
return { ctx:
|
|
1988
|
+
return { ctx: f, cssRules: u };
|
|
1989
1989
|
}
|
|
1990
1990
|
function te(e, t, n) {
|
|
1991
1991
|
return [e, ...n === void 0 ? [] : [`c${n}`], ...t].join("-");
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1993
|
+
function $e(e, t, n) {
|
|
1994
1994
|
return [e, n, t].filter((s) => s !== void 0).join(":");
|
|
1995
1995
|
}
|
|
1996
1996
|
function rn(e, t = {}) {
|
|
@@ -1998,16 +1998,16 @@ function rn(e, t = {}) {
|
|
|
1998
1998
|
return n.targetsMap.forEach(({ keyframeEntries: o }) => {
|
|
1999
1999
|
const r = /* @__PURE__ */ new Set();
|
|
2000
2000
|
o.forEach((a) => {
|
|
2001
|
-
const
|
|
2002
|
-
let u = 0,
|
|
2003
|
-
for (;
|
|
2004
|
-
|
|
2005
|
-
|
|
2001
|
+
const f = (l) => a.flatMap(({ getNames: d }) => d(i(l)));
|
|
2002
|
+
let u = 0, c = f(u);
|
|
2003
|
+
for (; c.some((l) => r.has(l)); )
|
|
2004
|
+
c = f(++u);
|
|
2005
|
+
c.forEach((l) => r.add(l)), u && a.forEach(({ slotKey: l }) => s.set(l, i(u)));
|
|
2006
2006
|
});
|
|
2007
2007
|
}), s;
|
|
2008
2008
|
}
|
|
2009
2009
|
function ti(e, t) {
|
|
2010
|
-
const { ctx: n, cssRules: s } = on(e, ei(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: h }) => h.listIndex)), r = Math.max(0, ...i.map(({ transition: h }) => h.listIndex)), a = Math.max(0, ...i.map(({ timeline: h }) => h.listIndex)),
|
|
2010
|
+
const { ctx: n, cssRules: s } = on(e, ei(t)), i = [...n.targetsMap.values()], o = Math.max(0, ...i.map(({ animation: h }) => h.listIndex)), r = Math.max(0, ...i.map(({ transition: h }) => h.listIndex)), a = Math.max(0, ...i.map(({ timeline: h }) => h.listIndex)), f = js(
|
|
2011
2011
|
i.flatMap((h) => [
|
|
2012
2012
|
h,
|
|
2013
2013
|
...[...h.partSelectors].map((p) => ({ key: h.key, childSelector: p }))
|
|
@@ -2016,18 +2016,18 @@ function ti(e, t) {
|
|
|
2016
2016
|
r,
|
|
2017
2017
|
a,
|
|
2018
2018
|
n.configIndex
|
|
2019
|
-
), u = Math.max(0, ...i.map(({ animation: h }) => h.slotCursor)),
|
|
2019
|
+
), u = Math.max(0, ...i.map(({ animation: h }) => h.slotCursor)), c = Math.max(
|
|
2020
2020
|
0,
|
|
2021
2021
|
...i.map(({ transition: h }) => h.slotCursor)
|
|
2022
2022
|
), l = Ns(
|
|
2023
2023
|
o,
|
|
2024
2024
|
r,
|
|
2025
2025
|
u,
|
|
2026
|
-
|
|
2026
|
+
c,
|
|
2027
2027
|
a,
|
|
2028
2028
|
n.configIndex
|
|
2029
2029
|
), d = zs(n.scopedTimelines, n.configIndex);
|
|
2030
|
-
return { keyframes: n.keyframesMap, atProperty: l, cssRules: s, listsRule:
|
|
2030
|
+
return { keyframes: n.keyframesMap, atProperty: l, cssRules: s, listsRule: f, timelineScopeRule: d };
|
|
2031
2031
|
}
|
|
2032
2032
|
function qo(e, t) {
|
|
2033
2033
|
const { cssRules: n, keyframes: s, atProperty: i, listsRule: o, timelineScopeRule: r } = ti(
|
|
@@ -2036,11 +2036,11 @@ function qo(e, t) {
|
|
|
2036
2036
|
);
|
|
2037
2037
|
return [
|
|
2038
2038
|
...i,
|
|
2039
|
-
...[...s.entries()].map(([
|
|
2039
|
+
...[...s.entries()].map(([f, u]) => Ls(f, u)),
|
|
2040
2040
|
...n.map(Fs),
|
|
2041
2041
|
o,
|
|
2042
2042
|
r
|
|
2043
|
-
].filter((
|
|
2043
|
+
].filter((f) => f).join(`
|
|
2044
2044
|
`);
|
|
2045
2045
|
}
|
|
2046
2046
|
const ni = {
|
|
@@ -2090,42 +2090,42 @@ function nt(e, t = !1) {
|
|
|
2090
2090
|
threshold: s
|
|
2091
2091
|
}, o = new IntersectionObserver((r) => {
|
|
2092
2092
|
r.forEach((a) => {
|
|
2093
|
-
const
|
|
2094
|
-
if (u && (We.add(
|
|
2093
|
+
const f = a.target, u = !We.has(f);
|
|
2094
|
+
if (u && (We.add(f), e.useSafeViewEnter && !a.isIntersecting)) {
|
|
2095
2095
|
A.measure(() => {
|
|
2096
|
-
const
|
|
2096
|
+
const c = a.boundingClientRect.height, l = a.rootBounds?.height;
|
|
2097
2097
|
if (!l)
|
|
2098
2098
|
return;
|
|
2099
2099
|
const d = Array.isArray(e.threshold) ? Math.min(...e.threshold) : e.threshold;
|
|
2100
|
-
d &&
|
|
2101
|
-
o.unobserve(
|
|
2100
|
+
d && c * d > l && A.mutate(() => {
|
|
2101
|
+
o.unobserve(f);
|
|
2102
2102
|
const p = nt(e, !0);
|
|
2103
|
-
re.set(
|
|
2103
|
+
re.set(f, p), p.observe(f);
|
|
2104
2104
|
});
|
|
2105
2105
|
});
|
|
2106
2106
|
return;
|
|
2107
2107
|
}
|
|
2108
|
-
(a.isIntersecting || !u) && an(
|
|
2108
|
+
(a.isIntersecting || !u) && an(f, a.isIntersecting);
|
|
2109
2109
|
});
|
|
2110
2110
|
}, i);
|
|
2111
2111
|
return ne[n] = o, o;
|
|
2112
2112
|
}
|
|
2113
2113
|
function ai(e, t, n, s = {}, { selectorCondition: i, animation: o } = {}) {
|
|
2114
|
-
const r = { ...et, ...s }, a = n.triggerType || "once",
|
|
2115
|
-
if (!
|
|
2114
|
+
const r = { ...et, ...s }, a = n.triggerType || "once", f = o || fe(t, x(n));
|
|
2115
|
+
if (!f)
|
|
2116
2116
|
return;
|
|
2117
2117
|
const u = nt(r);
|
|
2118
|
-
a !== "once" &&
|
|
2119
|
-
let
|
|
2118
|
+
a !== "once" && f.persist?.();
|
|
2119
|
+
let c = !0, l = !1, d;
|
|
2120
2120
|
const h = (m, g) => {
|
|
2121
2121
|
if (!(i && !t.matches(i)))
|
|
2122
2122
|
if (a === "once") {
|
|
2123
2123
|
if (m && !l) {
|
|
2124
2124
|
l = !0;
|
|
2125
2125
|
const v = q.get(e);
|
|
2126
|
-
(!v || v.size === 0 || v.size === 1 && v.has(d)) && Ie(e, u),
|
|
2126
|
+
(!v || v.size === 0 || v.size === 1 && v.has(d)) && Ie(e, u), f.onFinish(() => {
|
|
2127
2127
|
q.get(e)?.delete(d), q.get(t)?.delete(d);
|
|
2128
|
-
}),
|
|
2128
|
+
}), f.play(() => {
|
|
2129
2129
|
const y = () => {
|
|
2130
2130
|
t.dataset.interactEnter = "start";
|
|
2131
2131
|
}, b = () => {
|
|
@@ -2133,15 +2133,15 @@ function ai(e, t, n, s = {}, { selectorCondition: i, animation: o } = {}) {
|
|
|
2133
2133
|
t.dataset.interactEnter = "done";
|
|
2134
2134
|
});
|
|
2135
2135
|
};
|
|
2136
|
-
|
|
2136
|
+
f.isCSS ? (A.mutate(() => {
|
|
2137
2137
|
requestAnimationFrame(y);
|
|
2138
|
-
}),
|
|
2138
|
+
}), f.onFinish(b), f.onAbort(b)) : (A.mutate(y), f.onFinish(b));
|
|
2139
2139
|
});
|
|
2140
2140
|
}
|
|
2141
|
-
} else a === "alternate" ?
|
|
2141
|
+
} else a === "alternate" ? c && m ? (c = !1, f.play()) : c || f.reverse() : a === "repeat" ? m ? (f.progress(0), f.play()) : g && (f.pause(), f.progress(0)) : a === "state" && (m ? f.play() : g && f.pause());
|
|
2142
2142
|
};
|
|
2143
2143
|
d = { source: e, target: t, handler: h, cleanup: () => {
|
|
2144
|
-
Ie(e, u, !0), (a === "repeat" || a === "state") && yt().unobserve(e),
|
|
2144
|
+
Ie(e, u, !0), (a === "repeat" || a === "state") && yt().unobserve(e), f.cancel();
|
|
2145
2145
|
} }, k(q, e, d), k(q, t, d), re.set(e, u), u.observe(e), (a === "repeat" || a === "state") && yt().observe(e), a === "once" && W.get(e)?.get(tt(r)) && h(!0);
|
|
2146
2146
|
}
|
|
2147
2147
|
function ci(e, t = {}) {
|
|
@@ -2155,13 +2155,13 @@ function ci(e, t = {}) {
|
|
|
2155
2155
|
const a = (u) => {
|
|
2156
2156
|
if (!u) return;
|
|
2157
2157
|
i.set(s, !0);
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2160
|
-
},
|
|
2161
|
-
return r = { source: e, target: e, handler: a, cleanup:
|
|
2158
|
+
const c = q.get(e);
|
|
2159
|
+
c?.delete(r), (!c || c.size === 0) && Ie(e, o);
|
|
2160
|
+
}, f = () => Ie(e, o, !0);
|
|
2161
|
+
return r = { source: e, target: e, handler: a, cleanup: f }, k(q, e, r), re.set(e, o), o.observe(e), () => {
|
|
2162
2162
|
i.delete(s), !i.size && W.get(e) === i && W.delete(e);
|
|
2163
2163
|
const u = q.get(e);
|
|
2164
|
-
u?.delete(r) && u.size === 0 &&
|
|
2164
|
+
u?.delete(r) && u.size === 0 && f();
|
|
2165
2165
|
};
|
|
2166
2166
|
}
|
|
2167
2167
|
function fi(e) {
|
|
@@ -2209,32 +2209,32 @@ function Et(e, t) {
|
|
|
2209
2209
|
}
|
|
2210
2210
|
function mi(e, t) {
|
|
2211
2211
|
const n = e.match(/^calc\s*\(\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\+\s*(-?\d+((px)|([lsd]?vh)|([lsd]?vw)))\s*\)\s*$/);
|
|
2212
|
-
return
|
|
2212
|
+
return Te(n[1], t) + Te(n[6], t);
|
|
2213
2213
|
}
|
|
2214
|
-
function
|
|
2214
|
+
function Te(e, t) {
|
|
2215
2215
|
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) ? mi(e, t) : parseInt(e) || 0 : 0;
|
|
2216
2216
|
}
|
|
2217
2217
|
function G(e, t, n) {
|
|
2218
|
-
const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, a = r - o,
|
|
2219
|
-
let u,
|
|
2220
|
-
return s === "entry" ? (u = o - t,
|
|
2218
|
+
const { name: s, offset: i = 0 } = e, { start: o, end: r } = n, a = r - o, f = i / 100;
|
|
2219
|
+
let u, c;
|
|
2220
|
+
return s === "entry" ? (u = o - t, c = Math.min(t, a)) : s === "entry-crossing" ? (u = o - t, c = a) : s === "contain" ? (u = Math.min(r - t, o), c = Math.abs(t - a)) : s === "exit" ? (u = Math.max(o, r - t), c = Math.min(t, a)) : s === "exit-crossing" ? (u = o, c = a) : s === "cover" && (u = o - t, c = a + t), u + f * c | 0;
|
|
2221
2221
|
}
|
|
2222
2222
|
function Fe(e, t, n, s, i) {
|
|
2223
2223
|
let o = 0;
|
|
2224
2224
|
const r = { start: t, end: n };
|
|
2225
|
-
return e.forEach((a,
|
|
2225
|
+
return e.forEach((a, f) => {
|
|
2226
2226
|
o += a.offset;
|
|
2227
2227
|
const u = a.sticky;
|
|
2228
2228
|
if (u) {
|
|
2229
|
-
if ("end" in u && e[
|
|
2229
|
+
if ("end" in u && e[f - 1]?.element) {
|
|
2230
2230
|
const d = ((i ? a.element.offsetWidth : a.element.offsetHeight) || 0) + u.end - s, h = o + d - a.offset, p = h < r.start, m = !p && h <= n;
|
|
2231
2231
|
let g = 0;
|
|
2232
2232
|
(p || m) && (g = a.offset, r.end += g), p && (r.start += g);
|
|
2233
2233
|
}
|
|
2234
2234
|
if ("start" in u) {
|
|
2235
|
-
const
|
|
2235
|
+
const c = o - u.start, l = c < r.start, d = !l && c <= r.end;
|
|
2236
2236
|
let h = 0;
|
|
2237
|
-
const p = e[
|
|
2237
|
+
const p = e[f - 1]?.element;
|
|
2238
2238
|
if (p) {
|
|
2239
2239
|
if (l || d) {
|
|
2240
2240
|
const m = (i ? p.offsetWidth : p.offsetHeight) || 0, g = a.offset, v = (i ? a.element.offsetWidth : a.element.offsetHeight) || 0;
|
|
@@ -2247,25 +2247,25 @@ function Fe(e, t, n, s, i) {
|
|
|
2247
2247
|
}), r;
|
|
2248
2248
|
}
|
|
2249
2249
|
function pi(e, t, n, s, i, o) {
|
|
2250
|
-
const { start: r, end: a, duration:
|
|
2251
|
-
let u = r,
|
|
2252
|
-
if (typeof
|
|
2253
|
-
l = { name:
|
|
2254
|
-
const p = Fe(o, u,
|
|
2255
|
-
u = p.start,
|
|
2250
|
+
const { start: r, end: a, duration: f } = e;
|
|
2251
|
+
let u = r, c = a, l = e.startRange, d = e.endRange, h;
|
|
2252
|
+
if (typeof f == "string") {
|
|
2253
|
+
l = { name: f, offset: 0 }, d = { name: f, offset: 100 }, u = G(l, n, t), c = G(d, n, t), h = c - u;
|
|
2254
|
+
const p = Fe(o, u, c, n, s);
|
|
2255
|
+
u = p.start, c = p.end;
|
|
2256
2256
|
} else {
|
|
2257
2257
|
if (l || r?.name) {
|
|
2258
2258
|
l = l || r;
|
|
2259
|
-
const p =
|
|
2259
|
+
const p = Te(l.add, i), m = G({ ...l, offset: 0 }, n, t), g = G({ ...l, offset: 100 }, n, t), v = Fe(o, m, g, n, s);
|
|
2260
2260
|
u = v.start + l.offset / 100 * (v.end - v.start) + p;
|
|
2261
2261
|
}
|
|
2262
2262
|
if (d || a?.name) {
|
|
2263
2263
|
d = d || a;
|
|
2264
|
-
const p =
|
|
2265
|
-
|
|
2266
|
-
} else typeof
|
|
2264
|
+
const p = Te(d.add, i), m = G({ ...d, offset: 0 }, n, t), g = G({ ...d, offset: 100 }, n, t), v = Fe(o, m, g, n, s);
|
|
2265
|
+
c = v.start + d.offset / 100 * (v.end - v.start) + p;
|
|
2266
|
+
} else typeof f == "number" && (c = u + f);
|
|
2267
2267
|
}
|
|
2268
|
-
return !h && !
|
|
2268
|
+
return !h && !f && (h = c - u), { ...e, start: u, end: c, startRange: l, endRange: d, duration: h || f };
|
|
2269
2269
|
}
|
|
2270
2270
|
function gi(e) {
|
|
2271
2271
|
return e.position === "sticky";
|
|
@@ -2291,10 +2291,10 @@ function bi(e, t) {
|
|
|
2291
2291
|
}
|
|
2292
2292
|
function me(e, t, n, s, i) {
|
|
2293
2293
|
const o = e[0].viewSource, r = [];
|
|
2294
|
-
let a = (s ? o.offsetWidth : o.offsetHeight) || 0,
|
|
2294
|
+
let a = (s ? o.offsetWidth : o.offsetHeight) || 0, f = 0, u = o;
|
|
2295
2295
|
for (; u; ) {
|
|
2296
2296
|
const l = window.getComputedStyle(u), d = gi(l), h = d ? bi(l, s) : void 0, p = wi(u, s, d);
|
|
2297
|
-
if ((!h || !("end" in h)) && (
|
|
2297
|
+
if ((!h || !("end" in h)) && (f += p), r.push({ element: u, offset: p, sticky: h }), u = u.offsetParent, vi(l, u, t))
|
|
2298
2298
|
break;
|
|
2299
2299
|
if (u === t) {
|
|
2300
2300
|
r.push({ element: u, offset: 0 });
|
|
@@ -2304,7 +2304,7 @@ function me(e, t, n, s, i) {
|
|
|
2304
2304
|
return r.reverse(), e.map((l) => ({
|
|
2305
2305
|
...pi(
|
|
2306
2306
|
l,
|
|
2307
|
-
{ start:
|
|
2307
|
+
{ start: f, end: f + a },
|
|
2308
2308
|
n,
|
|
2309
2309
|
s,
|
|
2310
2310
|
i,
|
|
@@ -2312,7 +2312,7 @@ function me(e, t, n, s, i) {
|
|
|
2312
2312
|
)
|
|
2313
2313
|
}));
|
|
2314
2314
|
}
|
|
2315
|
-
const wt = 100,
|
|
2315
|
+
const wt = 100, Si = {
|
|
2316
2316
|
horizontal: !1,
|
|
2317
2317
|
observeViewportEntry: !0,
|
|
2318
2318
|
viewportRootMargin: "7% 7%",
|
|
@@ -2320,7 +2320,7 @@ const wt = 100, $i = {
|
|
|
2320
2320
|
observeSourcesResize: !1,
|
|
2321
2321
|
observeContentResize: !1
|
|
2322
2322
|
};
|
|
2323
|
-
function
|
|
2323
|
+
function $i(e, t, n, s) {
|
|
2324
2324
|
let i = 0;
|
|
2325
2325
|
return e >= t && e <= n ? i = s ? (e - t) / s : 1 : e > n && (i = 1), i;
|
|
2326
2326
|
}
|
|
@@ -2333,9 +2333,9 @@ function Ii() {
|
|
|
2333
2333
|
viewportHeight: window.document.documentElement.clientHeight
|
|
2334
2334
|
};
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2337
|
-
const t = cn(e,
|
|
2338
|
-
let o = bt(n, s), r, a,
|
|
2336
|
+
function Ti(e) {
|
|
2337
|
+
const t = cn(e, Si), n = t.root, s = t.horizontal, i = /* @__PURE__ */ new WeakMap();
|
|
2338
|
+
let o = bt(n, s), r, a, f, u, c;
|
|
2339
2339
|
const l = [], d = Ii();
|
|
2340
2340
|
if (t.scenes = Object.values(
|
|
2341
2341
|
// TODO(ameerf): find a polyfill and use groupBy instead of following reduce
|
|
@@ -2352,20 +2352,20 @@ function _i(e) {
|
|
|
2352
2352
|
m.index = g;
|
|
2353
2353
|
}), l.length) {
|
|
2354
2354
|
const m = /* @__PURE__ */ new Map();
|
|
2355
|
-
window.ResizeObserver && (
|
|
2355
|
+
window.ResizeObserver && (f = new window.ResizeObserver(function(g) {
|
|
2356
2356
|
g.forEach((v) => {
|
|
2357
2357
|
const y = m.get(v.target), b = me(y, n, o, s, d);
|
|
2358
|
-
b.forEach((E,
|
|
2359
|
-
t.scenes[E.index] = b[
|
|
2358
|
+
b.forEach((E, $) => {
|
|
2359
|
+
t.scenes[E.index] = b[$];
|
|
2360
2360
|
}), l.splice(l.indexOf(y), 1, b);
|
|
2361
2361
|
});
|
|
2362
2362
|
}), l.forEach((g) => {
|
|
2363
|
-
|
|
2363
|
+
f.observe(g[0].viewSource, { box: "border-box" }), m.set(g[0].viewSource, g);
|
|
2364
2364
|
}), t.observeContentResize && t.contentRoot && new window.ResizeObserver(Et(() => {
|
|
2365
2365
|
const v = l.map((y) => {
|
|
2366
2366
|
const b = me(y, n, o, s, d);
|
|
2367
|
-
return b.forEach((E,
|
|
2368
|
-
t.scenes[E.index] = b[
|
|
2367
|
+
return b.forEach((E, $) => {
|
|
2368
|
+
t.scenes[E.index] = b[$];
|
|
2369
2369
|
}), b;
|
|
2370
2370
|
});
|
|
2371
2371
|
l.length = 0, l.push(...v), l.forEach((y) => {
|
|
@@ -2382,7 +2382,7 @@ function _i(e) {
|
|
|
2382
2382
|
l.length = 0, l.push(...g), l.forEach((v) => {
|
|
2383
2383
|
m.set(v[0].viewSource, v);
|
|
2384
2384
|
});
|
|
2385
|
-
}, wt), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (
|
|
2385
|
+
}, wt), n === window ? window.addEventListener("resize", u) : window.ResizeObserver && (c = new window.ResizeObserver(u), c.observe(n, { box: "border-box" })));
|
|
2386
2386
|
}
|
|
2387
2387
|
t.observeViewportEntry && window.IntersectionObserver && (a = new window.IntersectionObserver(function(m) {
|
|
2388
2388
|
m.forEach((g) => {
|
|
@@ -2406,21 +2406,21 @@ function _i(e) {
|
|
|
2406
2406
|
if (m !== r) {
|
|
2407
2407
|
for (let y of t.scenes)
|
|
2408
2408
|
if (!y.disabled) {
|
|
2409
|
-
const { start: b, end: E, duration:
|
|
2410
|
-
y.effect(y,
|
|
2409
|
+
const { start: b, end: E, duration: $ } = y, S = $i(m, b, E, $);
|
|
2410
|
+
y.effect(y, S, v);
|
|
2411
2411
|
}
|
|
2412
2412
|
r = m;
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
2415
|
function p() {
|
|
2416
|
-
t.scenes.forEach((m) => m.destroy?.()), a && (a.disconnect(), a = null),
|
|
2416
|
+
t.scenes.forEach((m) => m.destroy?.()), a && (a.disconnect(), a = null), f && (f.disconnect(), f = null), u && (c ? (c.disconnect(), c = null) : window.removeEventListener("resize", u));
|
|
2417
2417
|
}
|
|
2418
2418
|
return {
|
|
2419
2419
|
tick: h,
|
|
2420
2420
|
destroy: p
|
|
2421
2421
|
};
|
|
2422
2422
|
}
|
|
2423
|
-
const
|
|
2423
|
+
const _i = {
|
|
2424
2424
|
transitionActive: !1,
|
|
2425
2425
|
transitionFriction: 0.9,
|
|
2426
2426
|
transitionEpsilon: 1,
|
|
@@ -2429,7 +2429,7 @@ const Ti = {
|
|
|
2429
2429
|
};
|
|
2430
2430
|
class Mi {
|
|
2431
2431
|
constructor(t = {}) {
|
|
2432
|
-
this.config = cn(t,
|
|
2432
|
+
this.config = cn(t, _i), this.progress = {
|
|
2433
2433
|
p: 0,
|
|
2434
2434
|
prevP: 0,
|
|
2435
2435
|
vp: 0
|
|
@@ -2512,7 +2512,7 @@ class Mi {
|
|
|
2512
2512
|
* Reset registered effect.
|
|
2513
2513
|
*/
|
|
2514
2514
|
setupEffect() {
|
|
2515
|
-
this.removeEffect(), this.effect =
|
|
2515
|
+
this.removeEffect(), this.effect = Ti(this.config);
|
|
2516
2516
|
}
|
|
2517
2517
|
/**
|
|
2518
2518
|
* Remove registered effect.
|
|
@@ -2547,9 +2547,9 @@ function Pi(e, t, n, s, { selectorCondition: i }) {
|
|
|
2547
2547
|
} else {
|
|
2548
2548
|
const u = Ht(t, r, o);
|
|
2549
2549
|
if (u) {
|
|
2550
|
-
const
|
|
2550
|
+
const c = Array.isArray(u) ? u : [u], l = new Mi({
|
|
2551
2551
|
viewSource: e,
|
|
2552
|
-
scenes:
|
|
2552
|
+
scenes: c,
|
|
2553
2553
|
observeViewportEntry: !1,
|
|
2554
2554
|
observeViewportResize: !1,
|
|
2555
2555
|
observeSourcesResize: !0,
|
|
@@ -2558,7 +2558,7 @@ function Pi(e, t, n, s, { selectorCondition: i }) {
|
|
|
2558
2558
|
});
|
|
2559
2559
|
a = () => {
|
|
2560
2560
|
l.destroy();
|
|
2561
|
-
}, Promise.all(
|
|
2561
|
+
}, Promise.all(c.map((d) => d.ready || Promise.resolve())).then(
|
|
2562
2562
|
() => {
|
|
2563
2563
|
l.start();
|
|
2564
2564
|
}
|
|
@@ -2566,8 +2566,8 @@ function Pi(e, t, n, s, { selectorCondition: i }) {
|
|
|
2566
2566
|
}
|
|
2567
2567
|
}
|
|
2568
2568
|
if (!a) return;
|
|
2569
|
-
const
|
|
2570
|
-
k(Ve, e,
|
|
2569
|
+
const f = { source: e, target: t, cleanup: a };
|
|
2570
|
+
k(Ve, e, f), k(Ve, t, f);
|
|
2571
2571
|
}
|
|
2572
2572
|
function Ci(e) {
|
|
2573
2573
|
le(Ve, e);
|
|
@@ -2577,10 +2577,10 @@ const Ai = {
|
|
|
2577
2577
|
remove: Ci,
|
|
2578
2578
|
registerOptionsGetter: Oi
|
|
2579
2579
|
};
|
|
2580
|
-
function
|
|
2580
|
+
function St(e, t, n) {
|
|
2581
2581
|
return Math.min(Math.max(e, n), t);
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function $t(e) {
|
|
2584
2584
|
let t = !1;
|
|
2585
2585
|
return function() {
|
|
2586
2586
|
if (!t)
|
|
@@ -2697,19 +2697,19 @@ function zi(e) {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
function Hi(e) {
|
|
2699
2699
|
let t = !1, n = { x: e.rect.width / 2, y: e.rect.height / 2, vx: 0, vy: 0 }, s, i, o, r, a;
|
|
2700
|
-
const
|
|
2701
|
-
e.scenes.forEach((
|
|
2702
|
-
|
|
2703
|
-
}), s = function(
|
|
2700
|
+
const f = { x: 0, y: 0 };
|
|
2701
|
+
e.scenes.forEach((c) => {
|
|
2702
|
+
c.target && c.centeredToTarget && (c.transform = Ni(ki(c.target), e.rect, f), t = !0), e.root ? i = zi(e) : (o = ji.bind(null, e), window.addEventListener("resize", o));
|
|
2703
|
+
}), s = function(c) {
|
|
2704
2704
|
for (let l of e.scenes)
|
|
2705
2705
|
if (!l.disabled) {
|
|
2706
|
-
const d = l.transform?.x(
|
|
2707
|
-
e.allowActiveEvent && (
|
|
2706
|
+
const d = l.transform?.x(c.x) || c.x / e.rect.width, h = l.transform?.y(c.y) || c.y / e.rect.height, p = +St(0, 1, d).toPrecision(4), m = +St(0, 1, h).toPrecision(4), g = { x: c.vx, y: c.vy };
|
|
2707
|
+
e.allowActiveEvent && (c.active = d <= 1 && h <= 1 && d >= 0 && h >= 0), l.effect(l, { x: p, y: m }, g, c.active);
|
|
2708
2708
|
}
|
|
2709
|
-
Object.assign(n,
|
|
2710
|
-
}, t && (r = Di.bind(
|
|
2709
|
+
Object.assign(n, c);
|
|
2710
|
+
}, t && (r = Di.bind(f, s, n), a = xi(document, r));
|
|
2711
2711
|
function u() {
|
|
2712
|
-
e.scenes.forEach((
|
|
2712
|
+
e.scenes.forEach((c) => c.destroy?.()), a?.(), i ? (i.disconnect(), i = null) : (window.removeEventListener("resize", o), o = null), s = null, n = null;
|
|
2713
2713
|
}
|
|
2714
2714
|
return {
|
|
2715
2715
|
tick: s,
|
|
@@ -2726,7 +2726,7 @@ class Vi {
|
|
|
2726
2726
|
constructor(t = {}) {
|
|
2727
2727
|
this.config = { ...t }, this.effect = null, this._nextTick = null, this._nextTransitionTick = null, this._startTime = 0;
|
|
2728
2728
|
let n;
|
|
2729
|
-
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() :
|
|
2729
|
+
this.config.transitionDuration ? n = this.config.noThrottle ? () => this.transition() : $t(() => this.transition()) : n = this.config.noThrottle ? () => (this.tick(), null) : $t(() => {
|
|
2730
2730
|
this.tick();
|
|
2731
2731
|
}), this.config.rect = this.config.root ? {
|
|
2732
2732
|
width: this.config.root.offsetWidth,
|
|
@@ -2793,8 +2793,8 @@ class Vi {
|
|
|
2793
2793
|
const t = this.config.transitionDuration, n = this.config.transitionEasing || ((r) => r), s = performance.now();
|
|
2794
2794
|
let i = !1;
|
|
2795
2795
|
const o = (r) => {
|
|
2796
|
-
const a = (r - this._startTime) / t,
|
|
2797
|
-
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [
|
|
2796
|
+
const a = (r - this._startTime) / t, f = n(Math.min(1, a));
|
|
2797
|
+
i && (this.progress.vx = 0, this.progress.vy = 0, i = !1), this.currentProgress = Object.entries(this.progress).reduce((u, [c, l]) => (c === "active" ? u[c] = l : u[c] = this.previousProgress[c] + (l - this.previousProgress[c]) * f, u), this.currentProgress || {}), a < 1 && (this._nextTransitionTick = requestAnimationFrame(o), i = r - this._startTime > Gi), this.effect.tick(this.currentProgress);
|
|
2798
2798
|
};
|
|
2799
2799
|
return this._startTime ? (this._nextTransitionTick && cancelAnimationFrame(this._nextTransitionTick), Object.assign(this.previousProgress, this.currentProgress), this._startTime = s, o(s)) : this._startTime = s, this._nextTransitionTick;
|
|
2800
2800
|
}
|
|
@@ -2851,18 +2851,18 @@ function Ui(e, t, n, s = {}, { selectorCondition: i }) {
|
|
|
2851
2851
|
axis: s.axis ?? "y"
|
|
2852
2852
|
}, r = Ht(t, x(n), o);
|
|
2853
2853
|
if (r) {
|
|
2854
|
-
const a = Array.isArray(r) ? r : [r],
|
|
2854
|
+
const a = Array.isArray(r) ? r : [r], f = new Vi({
|
|
2855
2855
|
root: s.hitArea === "self" ? e : void 0,
|
|
2856
2856
|
scenes: a,
|
|
2857
2857
|
...un(),
|
|
2858
2858
|
...Yi(n)
|
|
2859
|
-
}),
|
|
2860
|
-
|
|
2859
|
+
}), c = { source: e, target: t, cleanup: () => {
|
|
2860
|
+
f.destroy();
|
|
2861
2861
|
} };
|
|
2862
|
-
k(Be, e,
|
|
2862
|
+
k(Be, e, c), k(Be, t, c), Promise.all(
|
|
2863
2863
|
a.map((l) => l.ready || Promise.resolve())
|
|
2864
2864
|
).then(() => {
|
|
2865
|
-
|
|
2865
|
+
f.start();
|
|
2866
2866
|
});
|
|
2867
2867
|
}
|
|
2868
2868
|
}
|
|
@@ -2899,22 +2899,22 @@ function eo(e, t, n, s, { selectorCondition: i, animation: o, sourceAnimationOpt
|
|
|
2899
2899
|
const a = o || fe(t, x(n));
|
|
2900
2900
|
if (!a)
|
|
2901
2901
|
return;
|
|
2902
|
-
const { effectId:
|
|
2902
|
+
const { effectId: f } = s, u = (h) => {
|
|
2903
2903
|
if (i && !t.matches(i)) return !1;
|
|
2904
2904
|
const p = h.animationName, m = h.detail?.effectId, g = r ? zt(e, r) : null;
|
|
2905
2905
|
if (g) {
|
|
2906
2906
|
if (g.playState === "running" || p && !g.hasAnimationName(p))
|
|
2907
2907
|
return !1;
|
|
2908
|
-
if (m && m !==
|
|
2908
|
+
if (m && m !== f && !g.hasAnimationId(m))
|
|
2909
2909
|
return !1;
|
|
2910
2910
|
}
|
|
2911
2911
|
return !0;
|
|
2912
|
-
},
|
|
2912
|
+
}, c = (h) => {
|
|
2913
2913
|
u(h) && a.play();
|
|
2914
2914
|
}, d = { source: e, target: t, cleanup: () => {
|
|
2915
|
-
a.cancel(), e.removeEventListener("animationend",
|
|
2915
|
+
a.cancel(), e.removeEventListener("animationend", c);
|
|
2916
2916
|
} };
|
|
2917
|
-
k(Ye, e, d), k(Ye, t, d), e.addEventListener("animationend",
|
|
2917
|
+
k(Ye, e, d), k(Ye, t, d), e.addEventListener("animationend", c), Zi(e).some(u) && a.play();
|
|
2918
2918
|
}
|
|
2919
2919
|
function to(e, t, n) {
|
|
2920
2920
|
let s = N.get(e);
|
|
@@ -2922,21 +2922,21 @@ function to(e, t, n) {
|
|
|
2922
2922
|
return;
|
|
2923
2923
|
s || (s = [], N.set(e, s));
|
|
2924
2924
|
const i = /* @__PURE__ */ new Map(), o = (a) => {
|
|
2925
|
-
const
|
|
2925
|
+
const f = a.target;
|
|
2926
2926
|
if (n && !ln(e, n).some(
|
|
2927
|
-
(l) => l ===
|
|
2927
|
+
(l) => l === f || a.bubbles && l.contains(f)
|
|
2928
2928
|
))
|
|
2929
2929
|
return;
|
|
2930
|
-
let u = i.get(
|
|
2931
|
-
u || (u = /* @__PURE__ */ new Map(), i.set(
|
|
2930
|
+
let u = i.get(f);
|
|
2931
|
+
u || (u = /* @__PURE__ */ new Map(), i.set(f, u)), u.set(Qi(a), a);
|
|
2932
2932
|
}, r = {
|
|
2933
2933
|
sourceSelector: n,
|
|
2934
2934
|
events: i,
|
|
2935
2935
|
cleanup: () => e.removeEventListener("animationend", o, !0)
|
|
2936
2936
|
};
|
|
2937
2937
|
return e.addEventListener("animationend", o, !0), s.push(r), () => {
|
|
2938
|
-
const a = N.get(e),
|
|
2939
|
-
|
|
2938
|
+
const a = N.get(e), f = a ? a.indexOf(r) : -1;
|
|
2939
|
+
f !== -1 && (r.cleanup(), a.splice(f, 1), a.length || N.delete(e));
|
|
2940
2940
|
};
|
|
2941
2941
|
}
|
|
2942
2942
|
function no(e) {
|
|
@@ -2957,8 +2957,8 @@ function io(e, t, n, s, i) {
|
|
|
2957
2957
|
return {
|
|
2958
2958
|
handler: (u) => {
|
|
2959
2959
|
if (n && !e.matches(n)) return;
|
|
2960
|
-
const
|
|
2961
|
-
if (l ||
|
|
2960
|
+
const c = !s, l = s?.enter?.includes(u.type), d = s?.leave?.includes(u.type);
|
|
2961
|
+
if (l || c) {
|
|
2962
2962
|
if (a === "alternate" || a === "state")
|
|
2963
2963
|
r ? (r = !1, o.play()) : a === "alternate" ? o.reverse() : a === "state" && (o.playState === "running" ? o.pause() : o.playState !== "finished" && o.play());
|
|
2964
2964
|
else {
|
|
@@ -2987,13 +2987,13 @@ function oo(e, t, {
|
|
|
2987
2987
|
listItemSelector: i,
|
|
2988
2988
|
stateAction: o
|
|
2989
2989
|
}, r, a) {
|
|
2990
|
-
const
|
|
2990
|
+
const f = !!s, u = o ?? "toggle", c = u === "toggle";
|
|
2991
2991
|
return (l) => {
|
|
2992
2992
|
if (r && !e.matches(r)) return;
|
|
2993
|
-
const d =
|
|
2993
|
+
const d = f ? e.closest(
|
|
2994
2994
|
`${s} > ${i || ""}:has(:scope)`
|
|
2995
2995
|
) : void 0, h = !a, p = a?.enter?.includes(l.type), m = a?.leave?.includes(l.type);
|
|
2996
|
-
h ? t.toggleEffect(n, u, d) : (p && t.toggleEffect(n,
|
|
2996
|
+
h ? t.toggleEffect(n, u, d) : (p && t.toggleEffect(n, c ? "add" : u, d), m && c && t.toggleEffect(n, "remove", d));
|
|
2997
2997
|
};
|
|
2998
2998
|
}
|
|
2999
2999
|
const Ue = /* @__PURE__ */ new WeakMap();
|
|
@@ -3046,10 +3046,10 @@ function mo(e) {
|
|
|
3046
3046
|
return ho(e) ? { enter: e.enter ?? [], leave: e.leave ?? [] } : void 0;
|
|
3047
3047
|
}
|
|
3048
3048
|
function po(e, t, n, s, { targetController: i, selectorCondition: o, animation: r }) {
|
|
3049
|
-
const a = lo(s.eventConfig),
|
|
3050
|
-
let
|
|
3051
|
-
if (
|
|
3052
|
-
|
|
3049
|
+
const a = lo(s.eventConfig), f = n.transition || n.transitionProperties, u = mo(a);
|
|
3050
|
+
let c, l, d = !1;
|
|
3051
|
+
if (f)
|
|
3052
|
+
c = oo(
|
|
3053
3053
|
t,
|
|
3054
3054
|
i,
|
|
3055
3055
|
n,
|
|
@@ -3064,30 +3064,30 @@ function po(e, t, n, s, { targetController: i, selectorCondition: o, animation:
|
|
|
3064
3064
|
u,
|
|
3065
3065
|
r
|
|
3066
3066
|
);
|
|
3067
|
-
|
|
3067
|
+
c = y?.handler ?? null, l = y?.cleanup, d = n.triggerType === "once";
|
|
3068
3068
|
}
|
|
3069
|
-
if (!
|
|
3069
|
+
if (!c)
|
|
3070
3070
|
return;
|
|
3071
|
-
const h =
|
|
3071
|
+
const h = c, p = new AbortController();
|
|
3072
3072
|
function m(y, b, E) {
|
|
3073
|
-
const
|
|
3074
|
-
y.addEventListener(b,
|
|
3073
|
+
const $ = fo(b, e, h);
|
|
3074
|
+
y.addEventListener(b, $, { ...E, signal: p.signal });
|
|
3075
3075
|
}
|
|
3076
3076
|
const v = { source: e, target: t, cleanup: () => {
|
|
3077
3077
|
p.abort(), l?.();
|
|
3078
3078
|
} };
|
|
3079
3079
|
if (k(Ue, e, v), k(Ue, t, v), u) {
|
|
3080
3080
|
const y = a.enter, b = a.leave;
|
|
3081
|
-
y.forEach((
|
|
3082
|
-
|
|
3081
|
+
y.forEach((S) => {
|
|
3082
|
+
S === "focusin" && (e.tabIndex = 0), m(e, S, { passive: !0, once: d });
|
|
3083
3083
|
});
|
|
3084
3084
|
const E = !n.stateAction || n.stateAction === "toggle";
|
|
3085
|
-
(
|
|
3086
|
-
if (
|
|
3087
|
-
m(e,
|
|
3085
|
+
(f ? E : n.triggerType !== "once") && b.forEach((S) => {
|
|
3086
|
+
if (S === "focusout") {
|
|
3087
|
+
m(e, S, { once: d });
|
|
3088
3088
|
return;
|
|
3089
3089
|
}
|
|
3090
|
-
m(e,
|
|
3090
|
+
m(e, S, { passive: !0 });
|
|
3091
3091
|
});
|
|
3092
3092
|
} else
|
|
3093
3093
|
(a.toggle ?? []).forEach((b) => {
|
|
@@ -3108,14 +3108,14 @@ const ee = {
|
|
|
3108
3108
|
enter: ["mouseenter", "focusin"],
|
|
3109
3109
|
leave: ["mouseleave", "focusout"]
|
|
3110
3110
|
}
|
|
3111
|
-
},
|
|
3111
|
+
}, Tt = {
|
|
3112
3112
|
click: Ke.activate,
|
|
3113
3113
|
hover: Ke.interest
|
|
3114
3114
|
};
|
|
3115
3115
|
function ve(e) {
|
|
3116
3116
|
const t = Ke[e];
|
|
3117
3117
|
return (n, s, i, o, r) => {
|
|
3118
|
-
const a = r?.allowA11yTriggers && e in
|
|
3118
|
+
const a = r?.allowA11yTriggers && e in Tt ? Tt[e] : t;
|
|
3119
3119
|
ee.add(n, s, i, { eventConfig: a }, r ?? {});
|
|
3120
3120
|
};
|
|
3121
3121
|
}
|
|
@@ -3295,8 +3295,8 @@ class w {
|
|
|
3295
3295
|
static addToSequence(t, n, s) {
|
|
3296
3296
|
const i = w.sequenceCache.get(t);
|
|
3297
3297
|
if (!i) return !1;
|
|
3298
|
-
const r = Gt(n).map((a,
|
|
3299
|
-
index: s[
|
|
3298
|
+
const r = Gt(n).map((a, f) => ({
|
|
3299
|
+
index: s[f] ?? i.animationGroups.length,
|
|
3300
3300
|
group: a
|
|
3301
3301
|
}));
|
|
3302
3302
|
return i.addGroups(r), w._registerSequenceElements(n, i), !0;
|
|
@@ -3336,7 +3336,7 @@ function j(e, {
|
|
|
3336
3336
|
return e.selector;
|
|
3337
3337
|
return s ? t ? "> :first-child" : ":scope > :first-child" : "";
|
|
3338
3338
|
}
|
|
3339
|
-
function
|
|
3339
|
+
function _t(e) {
|
|
3340
3340
|
return "sequenceId" in e && !("effects" in e);
|
|
3341
3341
|
}
|
|
3342
3342
|
function xe(e, t) {
|
|
@@ -3359,8 +3359,8 @@ function Eo(e, t, n) {
|
|
|
3359
3359
|
} : e;
|
|
3360
3360
|
}
|
|
3361
3361
|
function wo(e, t, n) {
|
|
3362
|
-
const { configIndex: s } = n, { effects: i = {}, sequences: o = {}, conditions: r = {} } = e, a = {},
|
|
3363
|
-
return e.interactions?.forEach((u,
|
|
3362
|
+
const { configIndex: s } = n, { effects: i = {}, sequences: o = {}, conditions: r = {} } = e, a = {}, f = e.interactions ? rn(e, n) : /* @__PURE__ */ new Map();
|
|
3363
|
+
return e.interactions?.forEach((u, c) => {
|
|
3364
3364
|
const l = u.key, d = ++yo, { effects: h, sequences: p, ...m } = u;
|
|
3365
3365
|
if (!l) {
|
|
3366
3366
|
console.error(`Interaction ${d} is missing a key for source element.`);
|
|
@@ -3369,21 +3369,21 @@ function wo(e, t, n) {
|
|
|
3369
3369
|
xe(a, l);
|
|
3370
3370
|
const g = h ? Array.from(h) : [];
|
|
3371
3371
|
g.reverse();
|
|
3372
|
-
const v = p?.map((E,
|
|
3373
|
-
if (
|
|
3372
|
+
const v = p?.map((E, $) => {
|
|
3373
|
+
if (_t(E)) {
|
|
3374
3374
|
const _ = o[E.sequenceId];
|
|
3375
3375
|
return _ ? { ..._, ...E } : (console.warn(`Interact: Sequence "${E.sequenceId}" not found in config`), E);
|
|
3376
3376
|
}
|
|
3377
|
-
const
|
|
3378
|
-
return
|
|
3377
|
+
const S = E;
|
|
3378
|
+
return S.sequenceId || (S.sequenceId = te("seq", [c, $], s)), S;
|
|
3379
3379
|
}), y = {
|
|
3380
3380
|
...m,
|
|
3381
3381
|
effects: g.length > 0 ? g : void 0,
|
|
3382
3382
|
sequences: v?.map(
|
|
3383
|
-
(E,
|
|
3383
|
+
(E, $) => Eo(
|
|
3384
3384
|
E,
|
|
3385
|
-
(
|
|
3386
|
-
|
|
3385
|
+
(S) => $e(c, S, $),
|
|
3386
|
+
f
|
|
3387
3387
|
)
|
|
3388
3388
|
)
|
|
3389
3389
|
};
|
|
@@ -3391,40 +3391,40 @@ function wo(e, t, n) {
|
|
|
3391
3391
|
j(y, { useFirstChild: t })
|
|
3392
3392
|
);
|
|
3393
3393
|
const b = y.listContainer;
|
|
3394
|
-
g.forEach((E,
|
|
3395
|
-
const
|
|
3396
|
-
let _ = E.key ||
|
|
3397
|
-
const I = g.length - 1 -
|
|
3394
|
+
g.forEach((E, $) => {
|
|
3395
|
+
const S = E.effectId ? i[E.effectId] : void 0;
|
|
3396
|
+
let _ = E.key || S?.key;
|
|
3397
|
+
const I = g.length - 1 - $;
|
|
3398
3398
|
E.effectId || (E.effectId = te(
|
|
3399
3399
|
"eff",
|
|
3400
|
-
[
|
|
3400
|
+
[c, I],
|
|
3401
3401
|
s
|
|
3402
3402
|
));
|
|
3403
|
-
const O =
|
|
3403
|
+
const O = f.get($e(c, I));
|
|
3404
3404
|
if (O && (E.suffix = O), _ = _ || l, E.key = _, b && E.listContainer && (_ !== l || E.listContainer !== b))
|
|
3405
3405
|
return;
|
|
3406
|
-
const
|
|
3406
|
+
const P = B({ ...S, ...E, key: _ }), T = `${l}::${P}::${d}`;
|
|
3407
3407
|
if (E.interactionId = T, a[l].interactionIds.add(T), _ === l)
|
|
3408
3408
|
return;
|
|
3409
3409
|
const M = xe(a, _);
|
|
3410
3410
|
M.effects[T] || (M.effects[T] = [], M.interactionIds.add(T)), M.effects[T].push({ ...m, effect: E, owner: y }), M.selectors.add(j(E, { useFirstChild: t }));
|
|
3411
3411
|
}), v?.forEach((E) => {
|
|
3412
|
-
if (!E ||
|
|
3413
|
-
const
|
|
3414
|
-
|
|
3415
|
-
I.effectId || (I.effectId = `eff-${
|
|
3416
|
-
let
|
|
3417
|
-
if (!
|
|
3412
|
+
if (!E || _t(E)) return;
|
|
3413
|
+
const $ = E, S = $.sequenceId;
|
|
3414
|
+
$.effects.forEach((I, O) => {
|
|
3415
|
+
I.effectId || (I.effectId = `eff-${S}-${O}`);
|
|
3416
|
+
let P = I.key;
|
|
3417
|
+
if (!P && I.effectId) {
|
|
3418
3418
|
const M = i[I.effectId];
|
|
3419
|
-
M && (
|
|
3419
|
+
M && (P = M.key);
|
|
3420
3420
|
}
|
|
3421
|
-
|
|
3421
|
+
P = P || l;
|
|
3422
3422
|
const T = j(I, { useFirstChild: t });
|
|
3423
|
-
if (T && a[l].selectors.add(T),
|
|
3424
|
-
const M = xe(a,
|
|
3425
|
-
M.sequences[
|
|
3423
|
+
if (T && a[l].selectors.add(T), P !== l) {
|
|
3424
|
+
const M = xe(a, P), C = `${P}::seq::${S}::${d}`;
|
|
3425
|
+
M.sequences[C] || (M.sequences[C] = [], M.interactionIds.add(C)), M.sequences[C].push({
|
|
3426
3426
|
...m,
|
|
3427
|
-
sequence:
|
|
3427
|
+
sequence: $,
|
|
3428
3428
|
owner: y
|
|
3429
3429
|
}), M.selectors.add(T);
|
|
3430
3430
|
}
|
|
@@ -3439,7 +3439,7 @@ function wo(e, t, n) {
|
|
|
3439
3439
|
interactions: a
|
|
3440
3440
|
};
|
|
3441
3441
|
}
|
|
3442
|
-
const
|
|
3442
|
+
const _e = /* @__PURE__ */ new WeakMap();
|
|
3443
3443
|
function st(e) {
|
|
3444
3444
|
return e !== null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
|
|
3445
3445
|
}
|
|
@@ -3454,10 +3454,10 @@ function K(e, t, n, s, i, o = !0) {
|
|
|
3454
3454
|
return !1;
|
|
3455
3455
|
const r = [];
|
|
3456
3456
|
for (const a of w.getPluginsNames()) {
|
|
3457
|
-
const
|
|
3458
|
-
if (!(
|
|
3457
|
+
const f = `${Xe}${a}`;
|
|
3458
|
+
if (!(f in n))
|
|
3459
3459
|
continue;
|
|
3460
|
-
const u = n[
|
|
3460
|
+
const u = n[f], c = u !== null && typeof u == "object", l = c ? e._appliedPlugins.get(u) : void 0;
|
|
3461
3461
|
if (l === !0)
|
|
3462
3462
|
continue;
|
|
3463
3463
|
if (l) {
|
|
@@ -3466,7 +3466,7 @@ function K(e, t, n, s, i, o = !0) {
|
|
|
3466
3466
|
}
|
|
3467
3467
|
if (!o)
|
|
3468
3468
|
continue;
|
|
3469
|
-
|
|
3469
|
+
c && e._appliedPlugins.set(u, !0);
|
|
3470
3470
|
const h = w.getPlugin(a)(u, { root: t, key: s, scope: i, config: n });
|
|
3471
3471
|
if (st(h)) {
|
|
3472
3472
|
const p = e._connectId, m = Promise.resolve(h).then(
|
|
@@ -3479,36 +3479,36 @@ function K(e, t, n, s, i, o = !0) {
|
|
|
3479
3479
|
}
|
|
3480
3480
|
return;
|
|
3481
3481
|
}
|
|
3482
|
-
typeof g == "function" && e._pluginCleanups.push(g),
|
|
3482
|
+
typeof g == "function" && e._pluginCleanups.push(g), c && e._appliedPlugins.set(u, !0);
|
|
3483
3483
|
},
|
|
3484
3484
|
(g) => {
|
|
3485
|
-
console.error(g),
|
|
3485
|
+
console.error(g), c && e._connectId === p && e._appliedPlugins.set(u, !0);
|
|
3486
3486
|
}
|
|
3487
3487
|
);
|
|
3488
|
-
|
|
3488
|
+
c && (e._appliedPlugins.set(u, m), r.push(m));
|
|
3489
3489
|
} else typeof h == "function" && e._pluginCleanups.push(h);
|
|
3490
3490
|
}
|
|
3491
3491
|
return ot(...r);
|
|
3492
3492
|
}
|
|
3493
3493
|
function X(e, t, n, s, i, o) {
|
|
3494
3494
|
if (st(e)) {
|
|
3495
|
-
const
|
|
3495
|
+
const c = s._connectId, l = t._connectId, d = _e.get(t);
|
|
3496
3496
|
e.then(() => {
|
|
3497
|
-
s.connected && s._connectId ===
|
|
3497
|
+
s.connected && s._connectId === c && t._connectId === l && _e.get(t) === d && t.resume();
|
|
3498
3498
|
});
|
|
3499
3499
|
}
|
|
3500
3500
|
const r = D[n.trigger], a = r?.latch;
|
|
3501
3501
|
if (!a)
|
|
3502
3502
|
return;
|
|
3503
|
-
let
|
|
3504
|
-
i ?
|
|
3503
|
+
let f, u;
|
|
3504
|
+
i ? f = En(n, s, o) : r.latchesSubtree && (n.selector || n.listContainer) ? (f = s.element, u = j(n)) : f = ae(
|
|
3505
3505
|
n,
|
|
3506
3506
|
s.element,
|
|
3507
3507
|
s.useFirstChild,
|
|
3508
3508
|
!1
|
|
3509
|
-
),
|
|
3510
|
-
const l = a(
|
|
3511
|
-
l && s._latches.push({ element:
|
|
3509
|
+
), f && (Array.isArray(f) ? f : [f]).forEach((c) => {
|
|
3510
|
+
const l = a(c, n.params, u);
|
|
3511
|
+
l && s._latches.push({ element: c, release: l });
|
|
3512
3512
|
});
|
|
3513
3513
|
}
|
|
3514
3514
|
function bo(e) {
|
|
@@ -3534,20 +3534,20 @@ function Me(e, t) {
|
|
|
3534
3534
|
return t.map((n) => e.selector ? n.querySelector(e.selector) : n).filter(Boolean);
|
|
3535
3535
|
}
|
|
3536
3536
|
function ke(e, t, n, s = {}) {
|
|
3537
|
-
const { effects: i, conditions: o, reducedMotionPolicy: r, forceReducedMotion: a } = t.dataCache,
|
|
3537
|
+
const { effects: i, conditions: o, reducedMotionPolicy: r, forceReducedMotion: a } = t.dataCache, f = Kt(
|
|
3538
3538
|
e,
|
|
3539
3539
|
Pe(e.reducedMotionPolicy, s.policy, r),
|
|
3540
3540
|
{ effects: i, force: a, collapsesStagger: s.collapsesStagger }
|
|
3541
3541
|
);
|
|
3542
3542
|
let u;
|
|
3543
|
-
return
|
|
3544
|
-
const d = H(
|
|
3543
|
+
return f.forEach((c, l) => {
|
|
3544
|
+
const d = H(c.conditions || [], o);
|
|
3545
3545
|
d && t.setupMediaQueryListener(
|
|
3546
3546
|
l ? `${n.id}::rm${l}` : n.id,
|
|
3547
3547
|
d,
|
|
3548
3548
|
n.key,
|
|
3549
3549
|
n.onUpdate
|
|
3550
|
-
), !u && (!d || d.matches) && (u =
|
|
3550
|
+
), !u && (!d || d.matches) && (u = c);
|
|
3551
3551
|
}), u;
|
|
3552
3552
|
}
|
|
3553
3553
|
function dn(e, t, n, s, i, o, r, a) {
|
|
@@ -3557,12 +3557,12 @@ function dn(e, t, n, s, i, o, r, a) {
|
|
|
3557
3557
|
];
|
|
3558
3558
|
}
|
|
3559
3559
|
function hn(e, t, n, s, i, o, r, a) {
|
|
3560
|
-
const
|
|
3561
|
-
|
|
3560
|
+
const f = Array.isArray(s), u = Array.isArray(i);
|
|
3561
|
+
f ? s.forEach((c, l) => {
|
|
3562
3562
|
const d = u ? i[l] : i;
|
|
3563
3563
|
d && Mt(
|
|
3564
3564
|
e,
|
|
3565
|
-
|
|
3565
|
+
c,
|
|
3566
3566
|
t.trigger,
|
|
3567
3567
|
d,
|
|
3568
3568
|
n,
|
|
@@ -3585,21 +3585,21 @@ function hn(e, t, n, s, i, o, r, a) {
|
|
|
3585
3585
|
);
|
|
3586
3586
|
});
|
|
3587
3587
|
}
|
|
3588
|
-
function
|
|
3588
|
+
function So(e, t, n, s, i) {
|
|
3589
3589
|
const o = {}, r = [];
|
|
3590
|
-
return (s.effects || []).forEach((a,
|
|
3591
|
-
const u = a.effectId,
|
|
3590
|
+
return (s.effects || []).forEach((a, f) => {
|
|
3591
|
+
const u = a.effectId, c = {
|
|
3592
3592
|
...n.dataCache.effects[u] || {},
|
|
3593
3593
|
...a,
|
|
3594
3594
|
effectId: u
|
|
3595
|
-
}, l =
|
|
3595
|
+
}, l = c.key, d = R(a.interactionId, e);
|
|
3596
3596
|
if (o[d] || n.addedInteractions[d] && !i)
|
|
3597
3597
|
return;
|
|
3598
3598
|
const h = ke(
|
|
3599
|
-
|
|
3599
|
+
c,
|
|
3600
3600
|
n,
|
|
3601
3601
|
{
|
|
3602
|
-
id: `${d}::${
|
|
3602
|
+
id: `${d}::${f}`,
|
|
3603
3603
|
key: e,
|
|
3604
3604
|
onUpdate: () => {
|
|
3605
3605
|
t.update();
|
|
@@ -3615,11 +3615,11 @@ function $o(e, t, n, s, i) {
|
|
|
3615
3615
|
}
|
|
3616
3616
|
}), r;
|
|
3617
3617
|
}
|
|
3618
|
-
function
|
|
3618
|
+
function $o(e, t, n, s, i) {
|
|
3619
3619
|
const o = [];
|
|
3620
3620
|
return s.sequences?.forEach((r) => {
|
|
3621
3621
|
let a;
|
|
3622
|
-
if (
|
|
3622
|
+
if (_o(r)) {
|
|
3623
3623
|
const d = n.dataCache.sequences[r.sequenceId];
|
|
3624
3624
|
if (!d) {
|
|
3625
3625
|
console.warn(`Interact: Sequence "${r.sequenceId}" not found in cache`);
|
|
@@ -3628,9 +3628,9 @@ function So(e, t, n, s, i) {
|
|
|
3628
3628
|
a = { ...d, ...r };
|
|
3629
3629
|
} else
|
|
3630
3630
|
a = r;
|
|
3631
|
-
const
|
|
3631
|
+
const f = a.sequenceId || ie(), u = R(`${e}::seq::${f}`, e);
|
|
3632
3632
|
if (n.addedInteractions[u] && !i) return;
|
|
3633
|
-
const
|
|
3633
|
+
const c = pn(
|
|
3634
3634
|
a,
|
|
3635
3635
|
s,
|
|
3636
3636
|
u,
|
|
@@ -3641,20 +3641,20 @@ function So(e, t, n, s, i) {
|
|
|
3641
3641
|
onUpdate: () => t.update()
|
|
3642
3642
|
}
|
|
3643
3643
|
);
|
|
3644
|
-
if (!
|
|
3644
|
+
if (!c) return;
|
|
3645
3645
|
const l = i && s.listContainer && n.addedInteractions[u] ? { controllerKey: e, listContainer: s.listContainer, elements: i } : void 0;
|
|
3646
|
-
o.push({ sequenceConfig: a, cacheKey: u, listElements: l, effects:
|
|
3646
|
+
o.push({ sequenceConfig: a, cacheKey: u, listElements: l, effects: c });
|
|
3647
3647
|
}), o;
|
|
3648
3648
|
}
|
|
3649
3649
|
function Io(e, t, n, s, i) {
|
|
3650
|
-
const o =
|
|
3650
|
+
const o = So(e, t, n, s, i), r = $o(e, t, n, s, i);
|
|
3651
3651
|
if (o.some(
|
|
3652
3652
|
({ effectOptions: l, target: d }) => it(d || s.key, l)
|
|
3653
3653
|
) || r.some((l) => gn(l.effects, e)))
|
|
3654
3654
|
return { readiness: !1, effects: [], sequences: [] };
|
|
3655
|
-
const
|
|
3655
|
+
const f = o.filter(
|
|
3656
3656
|
(l) => !!l.targetController
|
|
3657
|
-
), u =
|
|
3657
|
+
), u = f.map(
|
|
3658
3658
|
({ effectOptions: l, target: d, targetController: h }) => K(
|
|
3659
3659
|
h,
|
|
3660
3660
|
h.element,
|
|
@@ -3662,14 +3662,14 @@ function Io(e, t, n, s, i) {
|
|
|
3662
3662
|
d || s.key,
|
|
3663
3663
|
"effect"
|
|
3664
3664
|
)
|
|
3665
|
-
),
|
|
3665
|
+
), c = [];
|
|
3666
3666
|
return r.forEach((l) => {
|
|
3667
3667
|
const d = vn(l.effects, e, t);
|
|
3668
|
-
d && (
|
|
3668
|
+
d && (c.push({ ...l, effects: d }), u.push(...d.map((h) => h.readiness)));
|
|
3669
3669
|
}), {
|
|
3670
3670
|
readiness: ot(...u),
|
|
3671
|
-
effects:
|
|
3672
|
-
sequences:
|
|
3671
|
+
effects: f,
|
|
3672
|
+
sequences: c
|
|
3673
3673
|
};
|
|
3674
3674
|
}
|
|
3675
3675
|
function rt(e, t, n, s, i, o = t) {
|
|
@@ -3685,7 +3685,7 @@ function rt(e, t, n, s, i, o = t) {
|
|
|
3685
3685
|
return;
|
|
3686
3686
|
}
|
|
3687
3687
|
const a = [];
|
|
3688
|
-
r.effects.forEach(({ interactionId:
|
|
3688
|
+
r.effects.forEach(({ interactionId: f, effectOptions: u, target: c, targetController: l }) => {
|
|
3689
3689
|
const [d, h] = dn(
|
|
3690
3690
|
s,
|
|
3691
3691
|
u,
|
|
@@ -3696,12 +3696,12 @@ function rt(e, t, n, s, i, o = t) {
|
|
|
3696
3696
|
// An item pass only extends an attached effect. Until then it attaches to every item at once —
|
|
3697
3697
|
// marking it added for the new items alone would make the full pass skip the others (e.g. the
|
|
3698
3698
|
// one about to resume once an async plugin settled).
|
|
3699
|
-
n.addedInteractions[
|
|
3699
|
+
n.addedInteractions[f] ? i : void 0
|
|
3700
3700
|
);
|
|
3701
3701
|
if (!d || !h)
|
|
3702
3702
|
return;
|
|
3703
|
-
n.addedInteractions[
|
|
3704
|
-
const p =
|
|
3703
|
+
n.addedInteractions[f] = !0;
|
|
3704
|
+
const p = c || s.key, m = U(
|
|
3705
3705
|
u.conditions || [],
|
|
3706
3706
|
n.dataCache.conditions
|
|
3707
3707
|
);
|
|
@@ -3715,8 +3715,8 @@ function rt(e, t, n, s, i, o = t) {
|
|
|
3715
3715
|
l.useFirstChild,
|
|
3716
3716
|
e
|
|
3717
3717
|
]);
|
|
3718
|
-
}), a.reverse().forEach((
|
|
3719
|
-
hn(...
|
|
3718
|
+
}), a.reverse().forEach((f) => {
|
|
3719
|
+
hn(...f);
|
|
3720
3720
|
}), Oo(t, n, s, r.sequences, i);
|
|
3721
3721
|
}
|
|
3722
3722
|
function mn(e, t, n) {
|
|
@@ -3726,23 +3726,23 @@ function mn(e, t, n) {
|
|
|
3726
3726
|
n.dataCache.reducedMotionPolicy
|
|
3727
3727
|
);
|
|
3728
3728
|
}
|
|
3729
|
-
function
|
|
3729
|
+
function To(e, t, n) {
|
|
3730
3730
|
const { forceReducedMotion: s, conditions: i } = n.dataCache, o = H([Oe], i);
|
|
3731
3731
|
return (s || !!(o && o.matches)) && mn(e, t, n) !== "ignore" ? { ...e, offset: 0 } : e;
|
|
3732
3732
|
}
|
|
3733
|
-
function
|
|
3733
|
+
function _o(e) {
|
|
3734
3734
|
return "sequenceId" in e && !("effects" in e);
|
|
3735
3735
|
}
|
|
3736
3736
|
function pn(e, t, n, s, i, o) {
|
|
3737
3737
|
const r = H(e.conditions || [], i.dataCache.conditions);
|
|
3738
3738
|
if (r && i.setupMediaQueryListener(n, r, o.updateKey, o.onUpdate), r && !r.matches) return null;
|
|
3739
|
-
const a = e.effects || [],
|
|
3739
|
+
const a = e.effects || [], f = (l) => {
|
|
3740
3740
|
const d = l.effectId;
|
|
3741
3741
|
return { ...d ? i.dataCache.effects[d] || {} : {}, ...l };
|
|
3742
|
-
}, u = mn(e, t, i),
|
|
3742
|
+
}, u = mn(e, t, i), c = [];
|
|
3743
3743
|
for (const l of a) {
|
|
3744
3744
|
const d = l.effectId, h = ke(
|
|
3745
|
-
|
|
3745
|
+
f(l),
|
|
3746
3746
|
i,
|
|
3747
3747
|
{
|
|
3748
3748
|
id: `${n}::${d || "eff"}`,
|
|
@@ -3753,9 +3753,9 @@ function pn(e, t, n, s, i, o) {
|
|
|
3753
3753
|
);
|
|
3754
3754
|
if (!h) continue;
|
|
3755
3755
|
const p = h.key && R(h.key, s);
|
|
3756
|
-
|
|
3756
|
+
c.push({ effectOptions: h, target: p });
|
|
3757
3757
|
}
|
|
3758
|
-
return
|
|
3758
|
+
return c;
|
|
3759
3759
|
}
|
|
3760
3760
|
function gn(e, t) {
|
|
3761
3761
|
return e.some(
|
|
@@ -3770,14 +3770,14 @@ function vn(e, t, n) {
|
|
|
3770
3770
|
if (r = w.getController(o), !r) return null;
|
|
3771
3771
|
} else
|
|
3772
3772
|
r = n;
|
|
3773
|
-
const a = o || t,
|
|
3773
|
+
const a = o || t, f = K(
|
|
3774
3774
|
r,
|
|
3775
3775
|
r.element,
|
|
3776
3776
|
i,
|
|
3777
3777
|
a,
|
|
3778
3778
|
"effect"
|
|
3779
3779
|
);
|
|
3780
|
-
s.push({ effectOptions: i, targetController: r, resolvedTargetKey: a, readiness:
|
|
3780
|
+
s.push({ effectOptions: i, targetController: r, resolvedTargetKey: a, readiness: f });
|
|
3781
3781
|
}
|
|
3782
3782
|
return s;
|
|
3783
3783
|
}
|
|
@@ -3791,8 +3791,8 @@ function yn(e, t) {
|
|
|
3791
3791
|
o.element,
|
|
3792
3792
|
o.useFirstChild
|
|
3793
3793
|
), !a || Array.isArray(a) && a.length === 0) return null;
|
|
3794
|
-
const
|
|
3795
|
-
n.push({ target: a, options:
|
|
3794
|
+
const f = x(i);
|
|
3795
|
+
n.push({ target: a, options: f });
|
|
3796
3796
|
}
|
|
3797
3797
|
return t && !s ? null : n.length > 0 ? n : null;
|
|
3798
3798
|
}
|
|
@@ -3817,30 +3817,30 @@ function Mo(e, t, n, s, i) {
|
|
|
3817
3817
|
}
|
|
3818
3818
|
function wn(e, t, n) {
|
|
3819
3819
|
const o = (e.useFirstChild ? e.element.firstElementChild : e.element)?.querySelector(t);
|
|
3820
|
-
if (!o) return n.map((a,
|
|
3820
|
+
if (!o) return n.map((a, f) => f);
|
|
3821
3821
|
const r = Array.from(o.children);
|
|
3822
3822
|
return n.map((a) => {
|
|
3823
|
-
const
|
|
3824
|
-
return
|
|
3823
|
+
const f = r.indexOf(a);
|
|
3824
|
+
return f >= 0 ? f : r.length;
|
|
3825
3825
|
});
|
|
3826
3826
|
}
|
|
3827
3827
|
function Oo(e, t, n, s, i) {
|
|
3828
|
-
s.forEach(({ sequenceConfig: o, cacheKey: r, listElements: a, effects:
|
|
3829
|
-
const u = yn(
|
|
3828
|
+
s.forEach(({ sequenceConfig: o, cacheKey: r, listElements: a, effects: f }) => {
|
|
3829
|
+
const u = yn(f, a);
|
|
3830
3830
|
if (!u) return;
|
|
3831
|
-
const
|
|
3832
|
-
if (
|
|
3833
|
-
const p = wn(e, n.listContainer,
|
|
3831
|
+
const c = t.addedInteractions[r] ? i : void 0;
|
|
3832
|
+
if (c) {
|
|
3833
|
+
const p = wn(e, n.listContainer, c);
|
|
3834
3834
|
w.addToSequence(r, u, p);
|
|
3835
3835
|
}
|
|
3836
3836
|
const l = w.getSequence(
|
|
3837
3837
|
r,
|
|
3838
|
-
|
|
3838
|
+
To(o, n, t),
|
|
3839
3839
|
u
|
|
3840
3840
|
), d = U(
|
|
3841
3841
|
n.conditions || [],
|
|
3842
3842
|
t.dataCache.conditions
|
|
3843
|
-
), h = En(n, e,
|
|
3843
|
+
), h = En(n, e, c);
|
|
3844
3844
|
h && (t.addedInteractions[r] = !0, Mo(
|
|
3845
3845
|
n,
|
|
3846
3846
|
o,
|
|
@@ -3850,20 +3850,20 @@ function Oo(e, t, n, s, i) {
|
|
|
3850
3850
|
));
|
|
3851
3851
|
});
|
|
3852
3852
|
}
|
|
3853
|
-
function bn(e, t, n, s, i, o) {
|
|
3854
|
-
const
|
|
3853
|
+
function bn(e, t, n, s, i, o, r = !0) {
|
|
3854
|
+
const a = K(
|
|
3855
3855
|
s,
|
|
3856
3856
|
s.element,
|
|
3857
3857
|
t,
|
|
3858
3858
|
n,
|
|
3859
3859
|
"interaction"
|
|
3860
3860
|
);
|
|
3861
|
-
return
|
|
3861
|
+
return a !== !0 ? (X(a, i, t, s, !1), !1) : r && !o.addedInteractions[e] ? (rt(n, s, o, t, void 0, i), !1) : !0;
|
|
3862
3862
|
}
|
|
3863
3863
|
function Po(e, t, n, s, i) {
|
|
3864
3864
|
const o = n.get(e)?.sequences || {};
|
|
3865
3865
|
Object.keys(o).forEach((a) => {
|
|
3866
|
-
o[a].some(({ sequence: u, owner:
|
|
3866
|
+
o[a].some(({ sequence: u, owner: c, ...l }) => {
|
|
3867
3867
|
const d = H(
|
|
3868
3868
|
l.conditions || [],
|
|
3869
3869
|
n.dataCache.conditions
|
|
@@ -3876,7 +3876,7 @@ function Po(e, t, n, s, i) {
|
|
|
3876
3876
|
const m = u.sequenceId || ie(), g = R(`${h}::seq::${m}`, h);
|
|
3877
3877
|
if (n.addedInteractions[g] && !i || !bn(
|
|
3878
3878
|
g,
|
|
3879
|
-
|
|
3879
|
+
c,
|
|
3880
3880
|
h,
|
|
3881
3881
|
p,
|
|
3882
3882
|
t,
|
|
@@ -3892,7 +3892,7 @@ function Po(e, t, n, s, i) {
|
|
|
3892
3892
|
{ updateKey: e, onUpdate: () => t.update() }
|
|
3893
3893
|
);
|
|
3894
3894
|
if (!v) return !0;
|
|
3895
|
-
const y = gn(v, h) ? null : vn(v, h, p), b = y ? ot(...y.map((
|
|
3895
|
+
const y = gn(v, h) ? null : vn(v, h, p), b = y ? ot(...y.map(($) => $.readiness)) : !1;
|
|
3896
3896
|
if (b !== !0)
|
|
3897
3897
|
return X(b, t, l, p, !0), !0;
|
|
3898
3898
|
const E = yn(y, {
|
|
@@ -3901,20 +3901,20 @@ function Po(e, t, n, s, i) {
|
|
|
3901
3901
|
elements: i
|
|
3902
3902
|
});
|
|
3903
3903
|
if (E) {
|
|
3904
|
-
const
|
|
3905
|
-
w.addToSequence(g, E,
|
|
3904
|
+
const $ = wn(t, s, i);
|
|
3905
|
+
w.addToSequence(g, E, $);
|
|
3906
3906
|
}
|
|
3907
3907
|
return !0;
|
|
3908
3908
|
});
|
|
3909
3909
|
});
|
|
3910
3910
|
}
|
|
3911
|
-
function
|
|
3912
|
-
const o = n.get(e), r = o?.effects || {}, a = Object.keys(r),
|
|
3913
|
-
a.forEach((
|
|
3914
|
-
const l = R(
|
|
3911
|
+
function Sn(e, t, n, s, i) {
|
|
3912
|
+
const o = n.get(e), r = o?.effects || {}, a = Object.keys(r), f = [];
|
|
3913
|
+
a.forEach((c) => {
|
|
3914
|
+
const l = R(c, e);
|
|
3915
3915
|
if (n.addedInteractions[l] && !i)
|
|
3916
3916
|
return;
|
|
3917
|
-
r[
|
|
3917
|
+
r[c].some(({ effect: h, owner: p, ...m }, g) => {
|
|
3918
3918
|
const v = H(
|
|
3919
3919
|
m.conditions || [],
|
|
3920
3920
|
n.dataCache.conditions
|
|
@@ -3941,62 +3941,67 @@ function $n(e, t, n, s, i) {
|
|
|
3941
3941
|
{ policy: m.reducedMotionPolicy }
|
|
3942
3942
|
);
|
|
3943
3943
|
if (E) {
|
|
3944
|
-
const
|
|
3945
|
-
if (
|
|
3944
|
+
const $ = m.key && R(m.key, e), S = w.getController($);
|
|
3945
|
+
if (!S)
|
|
3946
|
+
return !0;
|
|
3947
|
+
const _ = R(c, $) === l;
|
|
3948
|
+
if (!bn(
|
|
3946
3949
|
l,
|
|
3947
3950
|
p,
|
|
3948
|
-
S,
|
|
3949
3951
|
$,
|
|
3952
|
+
S,
|
|
3950
3953
|
t,
|
|
3951
|
-
n
|
|
3954
|
+
n,
|
|
3955
|
+
_
|
|
3952
3956
|
))
|
|
3953
3957
|
return !0;
|
|
3954
|
-
const
|
|
3958
|
+
const I = K(
|
|
3955
3959
|
t,
|
|
3956
3960
|
t.element,
|
|
3957
3961
|
E,
|
|
3958
3962
|
e,
|
|
3959
3963
|
"effect"
|
|
3960
3964
|
);
|
|
3961
|
-
if (
|
|
3962
|
-
return X(
|
|
3965
|
+
if (I !== !0)
|
|
3966
|
+
return X(I, t, m, S, !0), !0;
|
|
3963
3967
|
E.listContainer && t.watchChildList(E.listContainer);
|
|
3964
|
-
const [
|
|
3968
|
+
const [O, P] = dn(
|
|
3965
3969
|
m,
|
|
3966
3970
|
E,
|
|
3967
|
-
|
|
3968
|
-
|
|
3971
|
+
S.element,
|
|
3972
|
+
S.useFirstChild,
|
|
3969
3973
|
t.element,
|
|
3970
3974
|
t.useFirstChild,
|
|
3971
3975
|
void 0,
|
|
3972
3976
|
i
|
|
3973
3977
|
);
|
|
3974
|
-
if (!
|
|
3978
|
+
if (!O || !P)
|
|
3975
3979
|
return !0;
|
|
3976
|
-
|
|
3980
|
+
_ || (n.addedInteractions[l] = !0);
|
|
3981
|
+
const T = U(
|
|
3977
3982
|
E.conditions || [],
|
|
3978
3983
|
n.dataCache.conditions
|
|
3979
3984
|
);
|
|
3980
|
-
return
|
|
3985
|
+
return f.push([
|
|
3981
3986
|
e,
|
|
3982
3987
|
m,
|
|
3983
3988
|
E,
|
|
3984
|
-
I,
|
|
3985
3989
|
O,
|
|
3986
|
-
|
|
3990
|
+
P,
|
|
3991
|
+
T,
|
|
3987
3992
|
t.useFirstChild,
|
|
3988
|
-
|
|
3993
|
+
$ || void 0
|
|
3989
3994
|
]), !0;
|
|
3990
3995
|
}
|
|
3991
3996
|
return !1;
|
|
3992
3997
|
});
|
|
3993
|
-
}),
|
|
3994
|
-
hn(...
|
|
3998
|
+
}), f.reverse().forEach((c) => {
|
|
3999
|
+
hn(...c);
|
|
3995
4000
|
}), Po(e, t, n, s, i);
|
|
3996
4001
|
const u = Object.keys(o?.sequences || {}).length > 0;
|
|
3997
4002
|
return a.length > 0 || u;
|
|
3998
4003
|
}
|
|
3999
|
-
function Mt(e, t, n, s, i, o, r, a,
|
|
4004
|
+
function Mt(e, t, n, s, i, o, r, a, f) {
|
|
4000
4005
|
let u;
|
|
4001
4006
|
if (Wt(i)) {
|
|
4002
4007
|
const l = {
|
|
@@ -4015,22 +4020,22 @@ function Mt(e, t, n, s, i, o, r, a, c) {
|
|
|
4015
4020
|
return;
|
|
4016
4021
|
u.renderStyle(Is(l));
|
|
4017
4022
|
}
|
|
4018
|
-
let
|
|
4023
|
+
let c;
|
|
4019
4024
|
if (n === "animationEnd") {
|
|
4020
|
-
const l = o.effectId, d =
|
|
4021
|
-
id: `${
|
|
4022
|
-
key:
|
|
4025
|
+
const l = o.effectId, d = f ? w.getInstance(f) : void 0, h = d?.dataCache.effects[l], p = h && ke(h, d, {
|
|
4026
|
+
id: `${f}::animationEnd::${l}`,
|
|
4027
|
+
key: f,
|
|
4023
4028
|
onUpdate: () => {
|
|
4024
|
-
w.getController(
|
|
4029
|
+
w.getController(f)?.update();
|
|
4025
4030
|
}
|
|
4026
4031
|
});
|
|
4027
|
-
p && (
|
|
4032
|
+
p && (c = x(p));
|
|
4028
4033
|
}
|
|
4029
4034
|
D[n]?.add(t, s, i, o, {
|
|
4030
4035
|
targetController: u,
|
|
4031
4036
|
selectorCondition: r,
|
|
4032
4037
|
allowA11yTriggers: w.allowA11yTriggers,
|
|
4033
|
-
sourceAnimationOptions:
|
|
4038
|
+
sourceAnimationOptions: c
|
|
4034
4039
|
});
|
|
4035
4040
|
}
|
|
4036
4041
|
function Ot(e) {
|
|
@@ -4038,15 +4043,15 @@ function Ot(e) {
|
|
|
4038
4043
|
if (!n)
|
|
4039
4044
|
return w.setController(t, e), !1;
|
|
4040
4045
|
const { triggers: s = [] } = n?.get(t) || {}, i = s.length > 0;
|
|
4041
|
-
n.setController(t, e),
|
|
4042
|
-
const
|
|
4043
|
-
if (
|
|
4046
|
+
n.setController(t, e), _e.set(e, (_e.get(e) || 0) + 1), bo(e), s.forEach((r, a) => {
|
|
4047
|
+
const f = H(r.conditions, n.dataCache.conditions);
|
|
4048
|
+
if (f) {
|
|
4044
4049
|
const u = `${t}::trigger::${a}`;
|
|
4045
|
-
n.setupMediaQueryListener(u,
|
|
4050
|
+
n.setupMediaQueryListener(u, f, t, () => {
|
|
4046
4051
|
e.update();
|
|
4047
4052
|
});
|
|
4048
4053
|
}
|
|
4049
|
-
if (!
|
|
4054
|
+
if (!f || f.matches) {
|
|
4050
4055
|
const u = K(
|
|
4051
4056
|
e,
|
|
4052
4057
|
e.element,
|
|
@@ -4062,7 +4067,7 @@ function Ot(e) {
|
|
|
4062
4067
|
}
|
|
4063
4068
|
});
|
|
4064
4069
|
let o = !1;
|
|
4065
|
-
return n && (o =
|
|
4070
|
+
return n && (o = Sn(t, e, n)), i || o;
|
|
4066
4071
|
}
|
|
4067
4072
|
function Co(e, t, n) {
|
|
4068
4073
|
const s = e.key, i = w.getInstance(s);
|
|
@@ -4071,14 +4076,14 @@ function Co(e, t, n) {
|
|
|
4071
4076
|
o.forEach((r, a) => {
|
|
4072
4077
|
if (r.listContainer !== t)
|
|
4073
4078
|
return;
|
|
4074
|
-
const
|
|
4075
|
-
if (
|
|
4079
|
+
const f = H(r.conditions, i.dataCache.conditions);
|
|
4080
|
+
if (f) {
|
|
4076
4081
|
const u = `${s}::listTrigger::${t}::${a}`;
|
|
4077
|
-
i.setupMediaQueryListener(u,
|
|
4082
|
+
i.setupMediaQueryListener(u, f, s, () => {
|
|
4078
4083
|
e.update();
|
|
4079
4084
|
});
|
|
4080
4085
|
}
|
|
4081
|
-
if (!
|
|
4086
|
+
if (!f || f.matches) {
|
|
4082
4087
|
const u = K(
|
|
4083
4088
|
e,
|
|
4084
4089
|
e.element,
|
|
@@ -4093,7 +4098,7 @@ function Co(e, t, n) {
|
|
|
4093
4098
|
}
|
|
4094
4099
|
rt(s, e, i, r, n);
|
|
4095
4100
|
}
|
|
4096
|
-
}),
|
|
4101
|
+
}), Sn(s, e, i, t, n);
|
|
4097
4102
|
}
|
|
4098
4103
|
}
|
|
4099
4104
|
function Ao(e, t = !1) {
|
|
@@ -4102,9 +4107,9 @@ function Ao(e, t = !1) {
|
|
|
4102
4107
|
return;
|
|
4103
4108
|
const i = [...s.get(n)?.selectors.values() || []].filter(Boolean).join(",");
|
|
4104
4109
|
let o;
|
|
4105
|
-
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element],
|
|
4110
|
+
i ? (o = [...e.element.querySelectorAll(i)], e.useFirstChild || o.push(e.element)) : o = [e.element], $n(o), s.deleteController(n, t);
|
|
4106
4111
|
}
|
|
4107
|
-
function
|
|
4112
|
+
function $n(e) {
|
|
4108
4113
|
const t = Object.values(D);
|
|
4109
4114
|
for (const n of e)
|
|
4110
4115
|
for (const s of t)
|
|
@@ -4211,7 +4216,7 @@ class ko {
|
|
|
4211
4216
|
}), r.addedNodes.forEach((a) => {
|
|
4212
4217
|
a instanceof HTMLElement && o.push(a);
|
|
4213
4218
|
});
|
|
4214
|
-
}),
|
|
4219
|
+
}), $n(i), s && Co(this, t, o);
|
|
4215
4220
|
}
|
|
4216
4221
|
}
|
|
4217
4222
|
function Ro(e, t) {
|
|
@@ -4228,4 +4233,4 @@ export {
|
|
|
4228
4233
|
qo as g,
|
|
4229
4234
|
Lo as r
|
|
4230
4235
|
};
|
|
4231
|
-
//# sourceMappingURL=index-
|
|
4236
|
+
//# sourceMappingURL=index-BqQ8gxQF.mjs.map
|