@ssgoi/core 4.3.2 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +416 -385
- package/dist/ssgoi-transition/create-context-manager.d.ts +5 -0
- package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -1
- package/dist/ssgoi-transition/create-navigation-direction-detector.d.ts +20 -0
- package/dist/ssgoi-transition/create-navigation-direction-detector.d.ts.map +1 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -1
- package/dist/ssgoi-transition/navigation-detector-strategy.d.ts.map +1 -1
- package/dist/types.d.ts +42 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/is-android.d.ts +5 -0
- package/dist/utils/is-android.d.ts.map +1 -0
- package/dist/utils/is-desktop.d.ts +5 -0
- package/dist/utils/is-desktop.d.ts.map +1 -0
- package/dist/utils/is-ios.d.ts +6 -0
- package/dist/utils/is-ios.d.ts.map +1 -0
- package/dist/utils/match-platform.d.ts +8 -0
- package/dist/utils/match-platform.d.ts.map +1 -0
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +9 -9
- package/dist/view-transitions/index.js +217 -217
- package/package.json +14 -13
- package/dist/ssgoi-transition/create-swipe-detector.d.ts +0 -11
- package/dist/ssgoi-transition/create-swipe-detector.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var d = (e, n, t) =>
|
|
4
|
-
import { normalizeToMultiAnimation as M, normalizeSchedule as
|
|
5
|
-
import { isCssAnimation as
|
|
6
|
-
import { S as
|
|
7
|
-
class
|
|
1
|
+
var at = Object.defineProperty;
|
|
2
|
+
var ct = (e, n, t) => n in e ? at(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var d = (e, n, t) => ct(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { normalizeToMultiAnimation as M, normalizeSchedule as G } from "./types.js";
|
|
5
|
+
import { isCssAnimation as Kt, isMultiAnimation as Jt, isSingleAnimation as Qt, isTickAnimation as Zt } from "./types.js";
|
|
6
|
+
import { S as Q, I as lt, a as ut } from "./provider-Cu4NSF1Q.js";
|
|
7
|
+
class ft {
|
|
8
8
|
constructor() {
|
|
9
9
|
d(this, "listeners", /* @__PURE__ */ new Set());
|
|
10
10
|
d(this, "rafId", null);
|
|
@@ -30,9 +30,9 @@ class ot {
|
|
|
30
30
|
i > this.lagThreshold || i < 0 ? (this.startTime += i - this.adjustedLag, i = this.adjustedLag) : i > this.maxDeltaTime && (i = this.maxDeltaTime), this.lastUpdate = n;
|
|
31
31
|
const r = n - this.startTime, o = r - this.nextTime;
|
|
32
32
|
if (o > 0) {
|
|
33
|
-
const
|
|
34
|
-
this.elapsed = r / 1e3, this.nextTime += o + (o >= this.gap ? 4 : this.gap - o), this.listeners.forEach((
|
|
35
|
-
|
|
33
|
+
const a = i / 1e3;
|
|
34
|
+
this.elapsed = r / 1e3, this.nextTime += o + (o >= this.gap ? 4 : this.gap - o), this.listeners.forEach((l) => {
|
|
35
|
+
l(a, this.elapsed);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
this.listeners.size > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.isRunning = !1, this.rafId = null);
|
|
@@ -68,64 +68,64 @@ class ot {
|
|
|
68
68
|
return this.elapsed;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
function
|
|
71
|
+
const U = new ft();
|
|
72
|
+
function dt(e) {
|
|
73
73
|
const {
|
|
74
74
|
integrator: n,
|
|
75
75
|
from: t,
|
|
76
76
|
to: i,
|
|
77
77
|
velocity: r = 0,
|
|
78
78
|
onUpdate: o,
|
|
79
|
-
onComplete:
|
|
80
|
-
onStart:
|
|
79
|
+
onComplete: a,
|
|
80
|
+
onStart: l
|
|
81
81
|
} = e;
|
|
82
|
-
let
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
if (
|
|
86
|
-
if (
|
|
87
|
-
|
|
82
|
+
let s = { position: t, velocity: r }, u = !0, p = 0, C = !1;
|
|
83
|
+
const S = (T) => {
|
|
84
|
+
if (u) {
|
|
85
|
+
if (C || (C = !0, l == null || l()), s = n.step(s, i, T), n.isSettled(s, i)) {
|
|
86
|
+
if (p += Math.min(T, 0.033), p >= Q) {
|
|
87
|
+
s = { position: i, velocity: 0 }, u = !1, o(s.position), U.unsubscribe(S), a();
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
90
|
} else
|
|
91
|
-
|
|
92
|
-
o(
|
|
91
|
+
p = 0;
|
|
92
|
+
o(s.position);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
return
|
|
95
|
+
return U.subscribe(S), {
|
|
96
96
|
stop: () => {
|
|
97
|
-
|
|
97
|
+
u && (u = !1, U.unsubscribe(S));
|
|
98
98
|
},
|
|
99
|
-
getPosition: () =>
|
|
100
|
-
getVelocity: () =>
|
|
101
|
-
isRunning: () =>
|
|
99
|
+
getPosition: () => s.position,
|
|
100
|
+
getVelocity: () => s.velocity,
|
|
101
|
+
isRunning: () => u
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
function
|
|
106
|
-
let o = { position: n, velocity: i },
|
|
107
|
-
const
|
|
108
|
-
for (let
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
time:
|
|
104
|
+
const z = 1e3 / 60;
|
|
105
|
+
function mt(e, n, t, i = 0) {
|
|
106
|
+
let o = { position: n, velocity: i }, a = 0;
|
|
107
|
+
const l = [];
|
|
108
|
+
for (let s = 0; s < 600; s++) {
|
|
109
|
+
const u = s * z;
|
|
110
|
+
if (l.push({
|
|
111
|
+
time: u,
|
|
112
112
|
position: o.position,
|
|
113
113
|
velocity: o.velocity
|
|
114
|
-
}), o = e.step(o, t,
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
time: (
|
|
114
|
+
}), o = e.step(o, t, z / 1e3), e.isSettled(o, t)) {
|
|
115
|
+
if (a += z / 1e3, a >= Q) {
|
|
116
|
+
l.push({
|
|
117
|
+
time: (s + 1) * z,
|
|
118
118
|
position: t,
|
|
119
119
|
velocity: 0
|
|
120
120
|
});
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
} else
|
|
124
|
-
|
|
124
|
+
a = 0;
|
|
125
125
|
}
|
|
126
|
-
return
|
|
126
|
+
return l;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function X(e, n) {
|
|
129
129
|
if (e.length === 0)
|
|
130
130
|
return { position: 0, velocity: 0 };
|
|
131
131
|
const t = e[0], i = e[e.length - 1];
|
|
@@ -135,71 +135,71 @@ function j(e, n) {
|
|
|
135
135
|
return { position: i.position, velocity: i.velocity };
|
|
136
136
|
let r = 0, o = e.length - 1;
|
|
137
137
|
for (; r < o - 1; ) {
|
|
138
|
-
const
|
|
139
|
-
e[
|
|
138
|
+
const u = Math.floor((r + o) / 2);
|
|
139
|
+
e[u].time <= n ? r = u : o = u;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const a = e[r], l = e[o], s = (n - a.time) / (l.time - a.time);
|
|
142
142
|
return {
|
|
143
|
-
position:
|
|
144
|
-
velocity:
|
|
143
|
+
position: a.position + (l.position - a.position) * s,
|
|
144
|
+
velocity: a.velocity + (l.velocity - a.velocity) * s
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function ht(e, n) {
|
|
148
148
|
return e.map((t) => n(t.position));
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function gt(e) {
|
|
151
151
|
const {
|
|
152
152
|
integrator: n,
|
|
153
153
|
element: t,
|
|
154
154
|
from: i,
|
|
155
155
|
to: r,
|
|
156
156
|
velocity: o = 0,
|
|
157
|
-
style:
|
|
158
|
-
onComplete:
|
|
159
|
-
onStart:
|
|
160
|
-
} = e,
|
|
161
|
-
if (
|
|
162
|
-
return
|
|
157
|
+
style: a,
|
|
158
|
+
onComplete: l,
|
|
159
|
+
onStart: s
|
|
160
|
+
} = e, u = mt(n, i, r, o);
|
|
161
|
+
if (u.length === 0)
|
|
162
|
+
return s == null || s(), l(), {
|
|
163
163
|
stop: () => {
|
|
164
164
|
},
|
|
165
165
|
getPosition: () => r,
|
|
166
166
|
getVelocity: () => 0,
|
|
167
167
|
isRunning: () => !1
|
|
168
168
|
};
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
171
|
-
for (const
|
|
172
|
-
t.style[
|
|
173
|
-
const
|
|
174
|
-
duration:
|
|
169
|
+
const p = ht(u, a), C = u[u.length - 1], S = C.time, T = p[0];
|
|
170
|
+
if (T)
|
|
171
|
+
for (const f of Object.keys(T))
|
|
172
|
+
t.style[f] = "";
|
|
173
|
+
const h = t.animate(p, {
|
|
174
|
+
duration: S,
|
|
175
175
|
fill: "forwards",
|
|
176
176
|
easing: "linear",
|
|
177
177
|
composite: "replace"
|
|
178
178
|
});
|
|
179
|
-
let
|
|
180
|
-
const
|
|
181
|
-
return
|
|
182
|
-
|
|
179
|
+
let y = !0;
|
|
180
|
+
const m = performance.now();
|
|
181
|
+
return s == null || s(), h.onfinish = () => {
|
|
182
|
+
y && (y = !1, l());
|
|
183
183
|
}, {
|
|
184
184
|
stop: () => {
|
|
185
|
-
|
|
185
|
+
y && (y = !1, h.cancel());
|
|
186
186
|
},
|
|
187
187
|
getPosition: () => {
|
|
188
|
-
if (!
|
|
189
|
-
return
|
|
190
|
-
const
|
|
191
|
-
return
|
|
188
|
+
if (!y)
|
|
189
|
+
return C.position;
|
|
190
|
+
const f = performance.now() - m;
|
|
191
|
+
return X(u, f).position;
|
|
192
192
|
},
|
|
193
193
|
getVelocity: () => {
|
|
194
|
-
if (!
|
|
194
|
+
if (!y)
|
|
195
195
|
return 0;
|
|
196
|
-
const
|
|
197
|
-
return
|
|
196
|
+
const f = performance.now() - m;
|
|
197
|
+
return X(u, f).velocity;
|
|
198
198
|
},
|
|
199
|
-
isRunning: () =>
|
|
199
|
+
isRunning: () => y
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function yt(e) {
|
|
203
203
|
const { to: n, onStart: t, onComplete: i } = e;
|
|
204
204
|
return t == null || t(), i(), {
|
|
205
205
|
stop: () => {
|
|
@@ -209,7 +209,7 @@ function ut(e) {
|
|
|
209
209
|
isRunning: () => !1
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class pt {
|
|
213
213
|
/**
|
|
214
214
|
* Get bound runner based on animation mode
|
|
215
215
|
*
|
|
@@ -221,20 +221,20 @@ class ft {
|
|
|
221
221
|
const { tick: t, css: i } = n;
|
|
222
222
|
if (t && i)
|
|
223
223
|
throw new Error("Cannot use both 'tick' and 'css' options together");
|
|
224
|
-
return i ? (r) =>
|
|
224
|
+
return i ? (r) => gt({
|
|
225
225
|
...r,
|
|
226
226
|
element: i.element,
|
|
227
227
|
style: i.style
|
|
228
|
-
}) : t ? (r) =>
|
|
228
|
+
}) : t ? (r) => dt({
|
|
229
229
|
...r,
|
|
230
230
|
onUpdate: t
|
|
231
|
-
}) :
|
|
231
|
+
}) : yt;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
class
|
|
234
|
+
class Z {
|
|
235
235
|
}
|
|
236
|
-
const
|
|
237
|
-
class
|
|
236
|
+
const wt = { stiffness: 300, damping: 30 };
|
|
237
|
+
class $ extends Z {
|
|
238
238
|
constructor(t) {
|
|
239
239
|
super();
|
|
240
240
|
d(this, "options");
|
|
@@ -259,14 +259,14 @@ class W extends B {
|
|
|
259
259
|
else if (t.css) {
|
|
260
260
|
const { element: i, style: r } = t.css;
|
|
261
261
|
this.updateFn = (o) => {
|
|
262
|
-
const
|
|
263
|
-
for (const [
|
|
264
|
-
i.style[
|
|
262
|
+
const a = r(o);
|
|
263
|
+
for (const [l, s] of Object.entries(a))
|
|
264
|
+
i.style[l] = typeof s == "number" ? String(s) : s;
|
|
265
265
|
};
|
|
266
266
|
} else
|
|
267
267
|
this.updateFn = () => {
|
|
268
268
|
};
|
|
269
|
-
this.runner =
|
|
269
|
+
this.runner = pt.from({
|
|
270
270
|
tick: t.tick,
|
|
271
271
|
css: t.css
|
|
272
272
|
});
|
|
@@ -285,10 +285,10 @@ class W extends B {
|
|
|
285
285
|
*/
|
|
286
286
|
createIntegrator() {
|
|
287
287
|
const t = this.options.physics;
|
|
288
|
-
return t != null && t.integrator ? t.integrator() : t != null && t.spring || t != null && t.inertia ?
|
|
288
|
+
return t != null && t.integrator ? t.integrator() : t != null && t.spring || t != null && t.inertia ? lt.from({
|
|
289
289
|
spring: t.spring,
|
|
290
290
|
inertia: t.inertia
|
|
291
|
-
}) : new
|
|
291
|
+
}) : new ut(wt);
|
|
292
292
|
}
|
|
293
293
|
runAnimation(t) {
|
|
294
294
|
this.isAnimating = !0, this.controls = this.runner({
|
|
@@ -344,7 +344,7 @@ class W extends B {
|
|
|
344
344
|
this.options = { ...this.options, ...t };
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
class
|
|
347
|
+
class q extends Z {
|
|
348
348
|
constructor(t) {
|
|
349
349
|
super();
|
|
350
350
|
d(this, "config");
|
|
@@ -368,7 +368,7 @@ class z extends B {
|
|
|
368
368
|
}
|
|
369
369
|
initializeAnimators() {
|
|
370
370
|
this.config.items.forEach((t, i) => {
|
|
371
|
-
const r = this.generateId(), o = new
|
|
371
|
+
const r = this.generateId(), o = new $({
|
|
372
372
|
from: this.from,
|
|
373
373
|
to: this.to,
|
|
374
374
|
physics: t.physics,
|
|
@@ -402,9 +402,9 @@ class z extends B {
|
|
|
402
402
|
return this.direction === "forward" ? this.itemOrder : [...this.itemOrder].reverse();
|
|
403
403
|
}
|
|
404
404
|
onAnimatorComplete(t) {
|
|
405
|
-
var r, o,
|
|
405
|
+
var r, o, a, l, s, u;
|
|
406
406
|
const i = this.animators.get(t);
|
|
407
|
-
!i || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (o = (r = i.item).onComplete) == null || o.call(r), (
|
|
407
|
+
!i || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (o = (r = i.item).onComplete) == null || o.call(r), (l = (a = this.config).onProgress) == null || l.call(a, this.completedCount, this.config.items.length), this.completedCount === this.config.items.length && (this.stopScheduler(), (u = (s = this.config).onEnd) == null || u.call(s)));
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
410
410
|
* Check and start springs based on previous spring's progress
|
|
@@ -419,10 +419,10 @@ class z extends B {
|
|
|
419
419
|
this.startAnimator(r);
|
|
420
420
|
continue;
|
|
421
421
|
}
|
|
422
|
-
const
|
|
423
|
-
if (!
|
|
424
|
-
const
|
|
425
|
-
|
|
422
|
+
const a = t[i - 1], l = this.animators.get(a);
|
|
423
|
+
if (!l || !l.started) continue;
|
|
424
|
+
const s = this.getAnimatorProgress(l), u = o.item.normalizedOffset;
|
|
425
|
+
s >= u && this.startAnimator(r);
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
startAnimator(t) {
|
|
@@ -470,7 +470,7 @@ class z extends B {
|
|
|
470
470
|
return;
|
|
471
471
|
const i = t.animator.getCurrentState();
|
|
472
472
|
if (i.position === i.to) {
|
|
473
|
-
const o = new
|
|
473
|
+
const o = new $({
|
|
474
474
|
from: this.to,
|
|
475
475
|
to: this.from,
|
|
476
476
|
physics: t.item.physics,
|
|
@@ -537,10 +537,10 @@ class z extends B {
|
|
|
537
537
|
* Uses first animator's state for initialization
|
|
538
538
|
*/
|
|
539
539
|
static fromState(t, i) {
|
|
540
|
-
return new
|
|
540
|
+
return new q({ ...i, state: t });
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const tt = Symbol.for("TRANSITION_STRATEGY"), vt = (e) => ({
|
|
544
544
|
runIn: async (n) => {
|
|
545
545
|
const { currentAnimation: t } = e;
|
|
546
546
|
if (t && t.direction === "out") {
|
|
@@ -607,7 +607,7 @@ const J = Symbol.for("TRANSITION_STRATEGY"), dt = (e) => ({
|
|
|
607
607
|
direction: "forward"
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
|
-
}),
|
|
610
|
+
}), St = () => ({
|
|
611
611
|
runIn: async (e) => e.in ? {
|
|
612
612
|
config: await e.in,
|
|
613
613
|
state: {
|
|
@@ -644,25 +644,25 @@ const J = Symbol.for("TRANSITION_STRATEGY"), dt = (e) => ({
|
|
|
644
644
|
to: 0,
|
|
645
645
|
direction: "forward"
|
|
646
646
|
}
|
|
647
|
-
}),
|
|
648
|
-
function
|
|
647
|
+
}), et = "data-ssgoi-scope", it = "data-ssgoi-scope-ready";
|
|
648
|
+
function Ut() {
|
|
649
649
|
return (e) => {
|
|
650
650
|
if (e)
|
|
651
|
-
return e.setAttribute(
|
|
651
|
+
return e.setAttribute(et, ""), queueMicrotask(() => {
|
|
652
652
|
queueMicrotask(() => {
|
|
653
|
-
e.setAttribute(
|
|
653
|
+
e.setAttribute(it, "true");
|
|
654
654
|
});
|
|
655
655
|
}), () => {
|
|
656
656
|
};
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
return e.hasAttribute(
|
|
659
|
+
function At(e) {
|
|
660
|
+
return e.hasAttribute(it);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return e.closest(`[${
|
|
662
|
+
function Ct(e) {
|
|
663
|
+
return e.closest(`[${et}]`);
|
|
664
664
|
}
|
|
665
|
-
const
|
|
665
|
+
const Tt = (e) => {
|
|
666
666
|
let n = e.parentElement;
|
|
667
667
|
for (; n && n !== document.body; ) {
|
|
668
668
|
const t = window.getComputedStyle(n), i = t.overflow + t.overflowY + t.overflowX;
|
|
@@ -671,7 +671,7 @@ const wt = (e) => {
|
|
|
671
671
|
n = n.parentElement;
|
|
672
672
|
}
|
|
673
673
|
return document.documentElement;
|
|
674
|
-
},
|
|
674
|
+
}, bt = (e) => {
|
|
675
675
|
let n = e.parentElement;
|
|
676
676
|
for (; n && n !== document.body; ) {
|
|
677
677
|
const t = window.getComputedStyle(n).position;
|
|
@@ -681,7 +681,7 @@ const wt = (e) => {
|
|
|
681
681
|
}
|
|
682
682
|
return document.body;
|
|
683
683
|
};
|
|
684
|
-
function
|
|
684
|
+
function K(e) {
|
|
685
685
|
return new Promise((n) => {
|
|
686
686
|
requestAnimationFrame(() => {
|
|
687
687
|
requestAnimationFrame(() => {
|
|
@@ -690,132 +690,145 @@ function G(e) {
|
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
|
|
693
|
+
function nt() {
|
|
694
|
+
return typeof window > "u" || typeof navigator > "u" ? !1 : /iPad|iPhone|iPod/.test(navigator.userAgent) || // iPad on iOS 13+ reports as MacIntel but has touch
|
|
695
|
+
navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
696
|
+
}
|
|
697
|
+
function rt() {
|
|
698
|
+
return typeof window > "u" || typeof navigator > "u" ? !1 : /Android/i.test(navigator.userAgent);
|
|
699
|
+
}
|
|
700
|
+
function kt() {
|
|
701
|
+
return typeof window > "u" || typeof navigator > "u" ? !1 : !nt() && !rt();
|
|
702
|
+
}
|
|
703
|
+
function Et(e) {
|
|
704
|
+
return e.length === 0 ? !1 : !!(e.includes("all") || e.includes("ios") && nt() || e.includes("android") && rt() || e.includes("desktop") && kt());
|
|
705
|
+
}
|
|
706
|
+
function Pt(e, n) {
|
|
707
|
+
var T;
|
|
695
708
|
let t = null, i = null, r = null, o = null;
|
|
696
|
-
const
|
|
709
|
+
const a = {
|
|
697
710
|
get currentAnimation() {
|
|
698
711
|
return t;
|
|
699
712
|
}
|
|
700
|
-
},
|
|
701
|
-
var
|
|
713
|
+
}, l = ((T = n == null ? void 0 : n.strategy) == null ? void 0 : T.call(n, a)) || vt(a), s = async (h) => {
|
|
714
|
+
var x, v;
|
|
702
715
|
i && (i.remove(), i = null);
|
|
703
|
-
const
|
|
704
|
-
if (!
|
|
716
|
+
const y = e(), m = y.in && y.in(h), f = !(n != null && n.strategy) && y.out ? y.out(h) : void 0;
|
|
717
|
+
if (!m)
|
|
705
718
|
return;
|
|
706
|
-
const
|
|
707
|
-
in: M(
|
|
708
|
-
out:
|
|
709
|
-
},
|
|
710
|
-
if (!
|
|
719
|
+
const A = {
|
|
720
|
+
in: M(m),
|
|
721
|
+
out: f ? M(f) : void 0
|
|
722
|
+
}, g = await l.runIn(A);
|
|
723
|
+
if (!g.config) {
|
|
711
724
|
t && (t.direction = "in");
|
|
712
725
|
return;
|
|
713
726
|
}
|
|
714
|
-
const
|
|
715
|
-
(
|
|
716
|
-
const
|
|
727
|
+
const c = g.config;
|
|
728
|
+
(x = c.prepare) == null || x.call(c);
|
|
729
|
+
const E = G(
|
|
717
730
|
{
|
|
718
|
-
...
|
|
731
|
+
...c,
|
|
719
732
|
onEnd: () => {
|
|
720
|
-
var
|
|
721
|
-
t = null, (
|
|
733
|
+
var w;
|
|
734
|
+
t = null, (w = c.onEnd) == null || w.call(c);
|
|
722
735
|
}
|
|
723
736
|
},
|
|
724
|
-
|
|
737
|
+
h
|
|
725
738
|
);
|
|
726
|
-
|
|
727
|
-
const
|
|
728
|
-
config:
|
|
729
|
-
from:
|
|
730
|
-
to:
|
|
739
|
+
c.wait && await c.wait();
|
|
740
|
+
const b = q.fromState(g.state, {
|
|
741
|
+
config: E,
|
|
742
|
+
from: g.from,
|
|
743
|
+
to: g.to
|
|
731
744
|
});
|
|
732
|
-
t = { controller:
|
|
733
|
-
},
|
|
734
|
-
var
|
|
735
|
-
i =
|
|
736
|
-
const
|
|
737
|
-
if (!
|
|
745
|
+
t = { controller: b, direction: "in" }, (v = c.onReady) == null || v.call(c), await K(), g.direction === "forward" ? b.forward() : b.backward();
|
|
746
|
+
}, u = async (h) => {
|
|
747
|
+
var v, w;
|
|
748
|
+
i = h;
|
|
749
|
+
const y = e(), m = !(n != null && n.strategy) && y.in ? y.in(h) : void 0, f = y.out && y.out(h);
|
|
750
|
+
if (!f)
|
|
738
751
|
return;
|
|
739
|
-
const
|
|
740
|
-
in:
|
|
741
|
-
out: M(
|
|
742
|
-
},
|
|
743
|
-
if (!
|
|
752
|
+
const A = {
|
|
753
|
+
in: m ? M(m) : void 0,
|
|
754
|
+
out: M(f)
|
|
755
|
+
}, g = await l.runOut(A);
|
|
756
|
+
if (!g.config) {
|
|
744
757
|
t && (t.direction = "out"), i && (i.remove(), i = null);
|
|
745
758
|
return;
|
|
746
759
|
}
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
const
|
|
760
|
+
const c = g.config;
|
|
761
|
+
x(), (v = c.prepare) == null || v.call(c);
|
|
762
|
+
const E = G(
|
|
750
763
|
{
|
|
751
|
-
...
|
|
764
|
+
...c,
|
|
752
765
|
onEnd: () => {
|
|
753
|
-
var
|
|
754
|
-
(
|
|
766
|
+
var I, k;
|
|
767
|
+
(I = c.onEnd) == null || I.call(c), i && (i.remove(), i = null), t = null, (k = n == null ? void 0 : n.onCleanupEnd) == null || k.call(n);
|
|
755
768
|
}
|
|
756
769
|
},
|
|
757
|
-
|
|
770
|
+
h
|
|
758
771
|
);
|
|
759
|
-
|
|
760
|
-
const
|
|
761
|
-
config:
|
|
762
|
-
from:
|
|
763
|
-
to:
|
|
772
|
+
c.wait && await c.wait();
|
|
773
|
+
const b = q.fromState(g.state, {
|
|
774
|
+
config: E,
|
|
775
|
+
from: g.from,
|
|
776
|
+
to: g.to
|
|
764
777
|
});
|
|
765
|
-
t = { controller:
|
|
766
|
-
function
|
|
778
|
+
t = { controller: b, direction: "out" }, (w = c.onReady) == null || w.call(c), await K(), g.direction === "forward" ? b.forward() : b.backward();
|
|
779
|
+
function x() {
|
|
767
780
|
!r || !i || (o && r.contains(o) ? r.insertBefore(i, o) : r.appendChild(i));
|
|
768
781
|
}
|
|
769
782
|
};
|
|
770
|
-
let
|
|
771
|
-
const
|
|
772
|
-
if (
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
document.contains(
|
|
777
|
-
}) :
|
|
783
|
+
let p = null, C = !1;
|
|
784
|
+
const S = (h) => () => {
|
|
785
|
+
if (C) return;
|
|
786
|
+
C = !0;
|
|
787
|
+
const y = h.cloneNode(!0);
|
|
788
|
+
p ? queueMicrotask(() => {
|
|
789
|
+
document.contains(p) && u(y);
|
|
790
|
+
}) : u(y);
|
|
778
791
|
};
|
|
779
|
-
return (
|
|
780
|
-
if (
|
|
792
|
+
return (h) => {
|
|
793
|
+
if (h)
|
|
781
794
|
return requestAnimationFrame(() => {
|
|
782
|
-
r =
|
|
783
|
-
}),
|
|
784
|
-
|
|
785
|
-
}) :
|
|
795
|
+
r = h.parentElement, o = h.nextElementSibling;
|
|
796
|
+
}), C = !1, (n == null ? void 0 : n.scope) === "local" ? queueMicrotask(() => {
|
|
797
|
+
p = Ct(h), !(p && !At(p)) && s(h);
|
|
798
|
+
}) : s(h), S(h);
|
|
786
799
|
};
|
|
787
800
|
}
|
|
788
|
-
const
|
|
789
|
-
let
|
|
790
|
-
function
|
|
791
|
-
if (e instanceof HTMLElement &&
|
|
792
|
-
const t =
|
|
793
|
-
|
|
801
|
+
const R = /* @__PURE__ */ new Map();
|
|
802
|
+
let P = null, B = !1;
|
|
803
|
+
function ot(e) {
|
|
804
|
+
if (e instanceof HTMLElement && R.has(e)) {
|
|
805
|
+
const t = R.get(e);
|
|
806
|
+
R.delete(e), queueMicrotask(() => {
|
|
794
807
|
t();
|
|
795
808
|
});
|
|
796
809
|
}
|
|
797
810
|
const n = e.childNodes;
|
|
798
811
|
for (let t = 0; t < n.length; t++) {
|
|
799
812
|
const i = n[t];
|
|
800
|
-
i &&
|
|
813
|
+
i && ot(i);
|
|
801
814
|
}
|
|
802
815
|
}
|
|
803
|
-
function
|
|
804
|
-
|
|
816
|
+
function Rt() {
|
|
817
|
+
B || typeof document > "u" || (B = !0, P = new MutationObserver((e) => {
|
|
805
818
|
for (const n of e) {
|
|
806
819
|
const t = n.removedNodes;
|
|
807
820
|
for (let i = 0; i < t.length; i++) {
|
|
808
821
|
const r = t[i];
|
|
809
|
-
r &&
|
|
822
|
+
r && ot(r);
|
|
810
823
|
}
|
|
811
824
|
}
|
|
812
|
-
}), document.body ?
|
|
825
|
+
}), document.body ? P.observe(document.body, {
|
|
813
826
|
childList: !0,
|
|
814
827
|
subtree: !0
|
|
815
828
|
}) : document.addEventListener(
|
|
816
829
|
"DOMContentLoaded",
|
|
817
830
|
() => {
|
|
818
|
-
|
|
831
|
+
P == null || P.observe(document.body, {
|
|
819
832
|
childList: !0,
|
|
820
833
|
subtree: !0
|
|
821
834
|
});
|
|
@@ -823,69 +836,69 @@ function St() {
|
|
|
823
836
|
{ once: !0 }
|
|
824
837
|
));
|
|
825
838
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
839
|
+
function It(e, n) {
|
|
840
|
+
Rt(), R.set(e, n);
|
|
828
841
|
}
|
|
829
|
-
function
|
|
830
|
-
return
|
|
842
|
+
function Bt(e) {
|
|
843
|
+
return R.has(e);
|
|
831
844
|
}
|
|
832
|
-
function
|
|
833
|
-
return
|
|
845
|
+
function jt() {
|
|
846
|
+
return R.size;
|
|
834
847
|
}
|
|
835
|
-
function
|
|
836
|
-
const n =
|
|
837
|
-
return n ? (
|
|
848
|
+
function Ht(e) {
|
|
849
|
+
const n = R.get(e);
|
|
850
|
+
return n ? (R.delete(e), n(), !0) : !1;
|
|
838
851
|
}
|
|
839
|
-
function
|
|
840
|
-
|
|
852
|
+
function Wt() {
|
|
853
|
+
R.clear(), P == null || P.disconnect(), P = null, B = !1;
|
|
841
854
|
}
|
|
842
|
-
const
|
|
843
|
-
function
|
|
844
|
-
|
|
845
|
-
let i =
|
|
855
|
+
const L = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map();
|
|
856
|
+
function xt(e, n, t) {
|
|
857
|
+
L.set(e, n);
|
|
858
|
+
let i = j.get(e);
|
|
846
859
|
if (i)
|
|
847
860
|
return i;
|
|
848
861
|
const r = n;
|
|
849
|
-
return i =
|
|
862
|
+
return i = Pt(
|
|
850
863
|
() => {
|
|
851
|
-
const o =
|
|
864
|
+
const o = L.get(e);
|
|
852
865
|
return o || (console.warn(`Transition "${String(e)}" not found`), {});
|
|
853
866
|
},
|
|
854
867
|
{
|
|
855
868
|
strategy: t == null ? void 0 : t.strategy,
|
|
856
869
|
scope: t == null ? void 0 : t.scope,
|
|
857
870
|
onCleanupEnd: () => {
|
|
858
|
-
|
|
871
|
+
L.get(e) === r && Vt(e);
|
|
859
872
|
}
|
|
860
873
|
}
|
|
861
|
-
),
|
|
874
|
+
), j.set(e, i), i;
|
|
862
875
|
}
|
|
863
|
-
function
|
|
864
|
-
|
|
876
|
+
function Vt(e) {
|
|
877
|
+
L.delete(e), j.delete(e), H.delete(e);
|
|
865
878
|
}
|
|
866
|
-
function
|
|
867
|
-
const t =
|
|
879
|
+
function Yt(e, n = "manual") {
|
|
880
|
+
const t = xt(
|
|
868
881
|
e.key,
|
|
869
882
|
{
|
|
870
883
|
in: e.in,
|
|
871
884
|
out: e.out
|
|
872
885
|
},
|
|
873
886
|
{
|
|
874
|
-
strategy: e[
|
|
887
|
+
strategy: e[tt],
|
|
875
888
|
scope: e.scope
|
|
876
889
|
}
|
|
877
890
|
);
|
|
878
891
|
if (n === "manual")
|
|
879
892
|
return t;
|
|
880
|
-
let i =
|
|
893
|
+
let i = H.get(e.key);
|
|
881
894
|
return i || (i = (r) => {
|
|
882
895
|
if (r) {
|
|
883
896
|
const o = t(r);
|
|
884
|
-
o &&
|
|
897
|
+
o && It(r, o);
|
|
885
898
|
}
|
|
886
|
-
},
|
|
899
|
+
}, H.set(e.key, i), i);
|
|
887
900
|
}
|
|
888
|
-
function
|
|
901
|
+
function Ft(e) {
|
|
889
902
|
const n = e.filter((t) => t.symmetric).map((t) => ({
|
|
890
903
|
from: t.to,
|
|
891
904
|
to: t.from,
|
|
@@ -893,107 +906,107 @@ function Et(e) {
|
|
|
893
906
|
}));
|
|
894
907
|
return [...e, ...n];
|
|
895
908
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
const s = c.touches[0];
|
|
905
|
-
if (!s) return;
|
|
906
|
-
const g = s.clientX - t, h = s.clientY - i;
|
|
907
|
-
g > window.outerWidth / 2 - 5 && Math.abs(g) > Math.abs(h) ? n = !0 : n = !1;
|
|
908
|
-
}, a = () => {
|
|
909
|
-
e && (r = !1, t = 0, i = 0);
|
|
910
|
-
}, m = () => n, y = () => {
|
|
911
|
-
typeof window > "u" || e && (window.addEventListener("touchstart", l, { passive: !0 }), window.addEventListener("touchmove", f, { passive: !0 }), window.addEventListener("touchend", a, { passive: !0 }));
|
|
912
|
-
}, S = () => {
|
|
913
|
-
typeof window > "u" || (window.removeEventListener("touchstart", l), window.removeEventListener("touchmove", f), window.removeEventListener("touchend", a));
|
|
914
|
-
};
|
|
915
|
-
let C = 0;
|
|
916
|
-
return {
|
|
917
|
-
initialize: y,
|
|
918
|
-
cleanup: S,
|
|
919
|
-
isSwipePending: m,
|
|
920
|
-
resetSwipeDetection: () => {
|
|
921
|
-
requestAnimationFrame(() => {
|
|
922
|
-
C++, C > 1 && (C = 0, n = !1);
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
};
|
|
926
|
-
}
|
|
927
|
-
function Rt(e = {}) {
|
|
928
|
-
const { preserveScroll: n = !1 } = e;
|
|
929
|
-
let t = null, i = null;
|
|
930
|
-
const r = /* @__PURE__ */ new Map();
|
|
931
|
-
let o = null, l = !1;
|
|
932
|
-
const f = () => {
|
|
933
|
-
t && o && !l && r.set(o, {
|
|
934
|
-
x: t.scrollLeft,
|
|
935
|
-
y: t.scrollTop
|
|
936
|
-
});
|
|
937
|
-
}, a = (c) => {
|
|
938
|
-
if (!t || !n) return;
|
|
939
|
-
const s = r.get(c);
|
|
940
|
-
if (!s) return;
|
|
941
|
-
const g = 10;
|
|
942
|
-
let h = 0;
|
|
943
|
-
const T = () => {
|
|
944
|
-
if (!t) return;
|
|
945
|
-
t.scrollTo({
|
|
946
|
-
top: s.y,
|
|
947
|
-
left: s.x
|
|
948
|
-
});
|
|
949
|
-
const p = t.scrollTop, u = t.scrollLeft;
|
|
950
|
-
!(Math.abs(p - s.y) < 1 && Math.abs(u - s.x) < 1) && h < g && (h++, requestAnimationFrame(T));
|
|
951
|
-
};
|
|
952
|
-
requestAnimationFrame(T);
|
|
909
|
+
function Ot() {
|
|
910
|
+
var l;
|
|
911
|
+
let e = typeof history < "u" ? ((l = history.state) == null ? void 0 : l.ssgoiIndex) ?? 0 : 0, n = "push", t = !1;
|
|
912
|
+
const i = (s) => {
|
|
913
|
+
var p;
|
|
914
|
+
t = !0;
|
|
915
|
+
const u = ((p = s.state) == null ? void 0 : p.ssgoiIndex) ?? 0;
|
|
916
|
+
u < e ? n = "back" : u > e && (n = "forward"), e = u;
|
|
953
917
|
};
|
|
954
918
|
return {
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
})), o = s, n && t && (r.get(s) ? a(s) : t.scrollTo({ top: 0, left: 0 }));
|
|
959
|
-
const g = 10;
|
|
960
|
-
let h = 0;
|
|
961
|
-
const T = () => {
|
|
962
|
-
h++, h >= g ? l = !1 : requestAnimationFrame(T);
|
|
963
|
-
};
|
|
964
|
-
requestAnimationFrame(T);
|
|
919
|
+
initialize: () => {
|
|
920
|
+
var s;
|
|
921
|
+
typeof window > "u" || (window.addEventListener("popstate", i), ((s = history.state) == null ? void 0 : s.ssgoiIndex) == null ? history.replaceState({ ...history.state, ssgoiIndex: e }, "") : e = history.state.ssgoiIndex);
|
|
965
922
|
},
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
y: -h.y + g.y
|
|
971
|
-
};
|
|
923
|
+
onPageEnter: () => {
|
|
924
|
+
t || (e++, history.replaceState({ ...history.state, ssgoiIndex: e }, ""));
|
|
925
|
+
const s = n;
|
|
926
|
+
return n = "push", t = !1, s;
|
|
972
927
|
},
|
|
973
|
-
|
|
974
|
-
getPositionedParentElement: () => i ? yt(i) : document.body,
|
|
975
|
-
getScrollPosition: (c) => c && r.has(c) ? r.get(c) : { x: 0, y: 0 }
|
|
928
|
+
isBack: () => n === "back"
|
|
976
929
|
};
|
|
977
930
|
}
|
|
978
|
-
function
|
|
931
|
+
function F(e, n) {
|
|
979
932
|
if (n === "*")
|
|
980
933
|
return !0;
|
|
981
934
|
if (n.endsWith("/*")) {
|
|
982
|
-
const t = n.slice(0, -
|
|
983
|
-
return e
|
|
935
|
+
const t = n.slice(0, -1);
|
|
936
|
+
return e.startsWith(t) && e.length > t.length;
|
|
984
937
|
}
|
|
985
938
|
return e === n;
|
|
986
939
|
}
|
|
987
|
-
function
|
|
940
|
+
function J(e, n, t) {
|
|
988
941
|
for (const i of t)
|
|
989
|
-
if (
|
|
942
|
+
if (F(e, i.from) && F(n, i.to))
|
|
990
943
|
return i.transition;
|
|
991
944
|
for (const i of t)
|
|
992
|
-
if ((i.from === "*" ||
|
|
945
|
+
if ((i.from === "*" || F(e, i.from)) && (i.to === "*" || F(n, i.to)))
|
|
993
946
|
return i.transition;
|
|
994
947
|
return null;
|
|
995
948
|
}
|
|
996
|
-
function
|
|
949
|
+
function Mt(e = {}) {
|
|
950
|
+
const { preserveScroll: n = !1, resetPatterns: t = [] } = e, i = (m) => t.some((f) => F(m, f));
|
|
951
|
+
let r = null, o = null;
|
|
952
|
+
const a = /* @__PURE__ */ new Map();
|
|
953
|
+
let l = null, s = !1;
|
|
954
|
+
const u = () => {
|
|
955
|
+
r && l && !s && a.set(l, {
|
|
956
|
+
x: r.scrollLeft,
|
|
957
|
+
y: r.scrollTop
|
|
958
|
+
});
|
|
959
|
+
}, p = (m) => {
|
|
960
|
+
if (!r || !n) return;
|
|
961
|
+
if (i(m)) {
|
|
962
|
+
r.scrollTo({ top: 0, left: 0 });
|
|
963
|
+
return;
|
|
964
|
+
}
|
|
965
|
+
const f = a.get(m);
|
|
966
|
+
if (!f) {
|
|
967
|
+
r.scrollTo({ top: 0, left: 0 });
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
const A = 10;
|
|
971
|
+
let g = 0;
|
|
972
|
+
const c = () => {
|
|
973
|
+
if (!r) return;
|
|
974
|
+
r.scrollTo({
|
|
975
|
+
top: f.y,
|
|
976
|
+
left: f.x
|
|
977
|
+
});
|
|
978
|
+
const E = r.scrollTop, b = r.scrollLeft;
|
|
979
|
+
!(Math.abs(E - f.y) < 1 && Math.abs(b - f.x) < 1) && g < A && (g++, requestAnimationFrame(c));
|
|
980
|
+
};
|
|
981
|
+
requestAnimationFrame(c);
|
|
982
|
+
};
|
|
983
|
+
return {
|
|
984
|
+
initializeContext: (m, f) => {
|
|
985
|
+
s = !0, o = m, r || (r = Tt(m), (r === document.documentElement ? window : r).addEventListener("scroll", u, {
|
|
986
|
+
passive: !0
|
|
987
|
+
})), l = f, p(f);
|
|
988
|
+
const A = 10;
|
|
989
|
+
let g = 0;
|
|
990
|
+
const c = () => {
|
|
991
|
+
g++, g >= A ? s = !1 : requestAnimationFrame(c);
|
|
992
|
+
};
|
|
993
|
+
requestAnimationFrame(c);
|
|
994
|
+
},
|
|
995
|
+
calculateScrollOffset: (m, f) => {
|
|
996
|
+
const A = m && a.has(m) ? a.get(m) : { x: 0, y: 0 }, g = f && i(f);
|
|
997
|
+
g && a.set(f, { x: 0, y: 0 });
|
|
998
|
+
const c = g ? { x: 0, y: 0 } : f && a.has(f) ? a.get(f) : { x: 0, y: 0 };
|
|
999
|
+
return {
|
|
1000
|
+
x: -c.x + A.x,
|
|
1001
|
+
y: -c.y + A.y
|
|
1002
|
+
};
|
|
1003
|
+
},
|
|
1004
|
+
getScrollContainer: () => r,
|
|
1005
|
+
getPositionedParentElement: () => o ? bt(o) : document.body,
|
|
1006
|
+
getScrollPosition: (m) => m && a.has(m) ? a.get(m) : { x: 0, y: 0 }
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
function zt() {
|
|
997
1010
|
let e = null;
|
|
998
1011
|
function n() {
|
|
999
1012
|
if (e != null && e.from && (e != null && e.to) && (e != null && e.outResolve) && (e != null && e.inResolve)) {
|
|
@@ -1012,7 +1025,7 @@ function Pt() {
|
|
|
1012
1025
|
}
|
|
1013
1026
|
};
|
|
1014
1027
|
}
|
|
1015
|
-
function
|
|
1028
|
+
function Lt() {
|
|
1016
1029
|
let e = null;
|
|
1017
1030
|
function n() {
|
|
1018
1031
|
var i, r;
|
|
@@ -1020,6 +1033,10 @@ function kt() {
|
|
|
1020
1033
|
}
|
|
1021
1034
|
function t() {
|
|
1022
1035
|
if (e != null && e.from && (e != null && e.to) && (e != null && e.outResolve) && (e != null && e.inResolve)) {
|
|
1036
|
+
if (e.from === e.to) {
|
|
1037
|
+
n();
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1023
1040
|
const i = { from: e.from, to: e.to };
|
|
1024
1041
|
e.outResolve(i), e.inResolve(i), e = null;
|
|
1025
1042
|
}
|
|
@@ -1035,119 +1052,133 @@ function kt() {
|
|
|
1035
1052
|
}
|
|
1036
1053
|
};
|
|
1037
1054
|
}
|
|
1038
|
-
function
|
|
1055
|
+
function Gt(e, n) {
|
|
1039
1056
|
const {
|
|
1040
1057
|
transitions: t = [],
|
|
1041
1058
|
defaultTransition: i,
|
|
1042
|
-
middleware: r = (
|
|
1059
|
+
middleware: r = (v, w) => ({ from: v, to: w }),
|
|
1043
1060
|
// Identity function as default
|
|
1044
|
-
skipOnIosSwipe: o
|
|
1045
|
-
|
|
1046
|
-
experimentalPreserveScroll: l = !1
|
|
1061
|
+
skipOnIosSwipe: o,
|
|
1062
|
+
skipAnimationOnBack: a,
|
|
1063
|
+
experimentalPreserveScroll: l = !1,
|
|
1047
1064
|
// Default to false - manual scroll management
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
)
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1065
|
+
scrollResetPatterns: s = []
|
|
1066
|
+
// Default to empty array - no routes reset scroll
|
|
1067
|
+
} = e;
|
|
1068
|
+
o !== void 0 && console.warn(
|
|
1069
|
+
"[SSGOI] skipOnIosSwipe is deprecated. Use skipAnimationOnBack: ['ios'] instead."
|
|
1070
|
+
);
|
|
1071
|
+
const p = Et(a ?? (o === !1 ? [] : ["ios"])), { outFirst: C = !0, createNavigationDetector: S } = n || {}, T = (S == null ? void 0 : S()) ?? (C ? zt() : Lt()), h = Ft(t), {
|
|
1072
|
+
initializeContext: y,
|
|
1073
|
+
calculateScrollOffset: m,
|
|
1074
|
+
getScrollContainer: f,
|
|
1075
|
+
getPositionedParentElement: A,
|
|
1076
|
+
getScrollPosition: g
|
|
1077
|
+
} = Mt({
|
|
1078
|
+
preserveScroll: l,
|
|
1079
|
+
resetPatterns: s
|
|
1080
|
+
}), c = Ot();
|
|
1081
|
+
p && c.initialize();
|
|
1082
|
+
const E = async (v, w) => {
|
|
1083
|
+
const I = p && c.isBack();
|
|
1084
|
+
T.trigger(v, w);
|
|
1085
|
+
const k = await T.get(w);
|
|
1086
|
+
if (!k) return () => ({});
|
|
1087
|
+
if (w === "in" && p && c.onPageEnter(), I) {
|
|
1088
|
+
if (w === "out")
|
|
1089
|
+
return () => ({});
|
|
1090
|
+
if (w === "in")
|
|
1091
|
+
return async (V) => ({
|
|
1092
|
+
onReady: () => {
|
|
1093
|
+
V.style.visibility = "visible";
|
|
1094
|
+
}
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
const { from: W, to: st } = r(
|
|
1098
|
+
k.from,
|
|
1099
|
+
k.to
|
|
1100
|
+
), D = J(
|
|
1101
|
+
W,
|
|
1102
|
+
st,
|
|
1103
|
+
h
|
|
1073
1104
|
) || i;
|
|
1074
|
-
if (!
|
|
1075
|
-
const
|
|
1076
|
-
if (
|
|
1077
|
-
const
|
|
1078
|
-
scrollOffset:
|
|
1079
|
-
scroll:
|
|
1105
|
+
if (!D) return () => ({});
|
|
1106
|
+
const Y = m(k.from, k.to);
|
|
1107
|
+
if (w === "out") {
|
|
1108
|
+
const V = {
|
|
1109
|
+
scrollOffset: Y,
|
|
1110
|
+
scroll: g(k.from),
|
|
1080
1111
|
get scrollingElement() {
|
|
1081
|
-
return
|
|
1112
|
+
return f() || document.documentElement;
|
|
1082
1113
|
},
|
|
1083
1114
|
get positionedParent() {
|
|
1084
|
-
return
|
|
1115
|
+
return A();
|
|
1085
1116
|
}
|
|
1086
1117
|
};
|
|
1087
|
-
return (
|
|
1118
|
+
return (O) => D.out(O, V);
|
|
1088
1119
|
} else {
|
|
1089
|
-
const
|
|
1090
|
-
scrollOffset:
|
|
1120
|
+
const V = {
|
|
1121
|
+
scrollOffset: Y,
|
|
1091
1122
|
get scroll() {
|
|
1092
|
-
return
|
|
1123
|
+
return g(k.to);
|
|
1093
1124
|
},
|
|
1094
1125
|
get scrollingElement() {
|
|
1095
|
-
return
|
|
1126
|
+
return f() || document.documentElement;
|
|
1096
1127
|
},
|
|
1097
1128
|
get positionedParent() {
|
|
1098
|
-
return
|
|
1129
|
+
return A();
|
|
1099
1130
|
}
|
|
1100
1131
|
};
|
|
1101
|
-
return async (
|
|
1102
|
-
const
|
|
1103
|
-
return
|
|
1104
|
-
|
|
1105
|
-
},
|
|
1132
|
+
return async (O) => {
|
|
1133
|
+
const N = await Promise.resolve(D.in(O, V)), _ = N.onReady;
|
|
1134
|
+
return N.onReady = () => {
|
|
1135
|
+
O.style.visibility = "visible", _ == null || _();
|
|
1136
|
+
}, N;
|
|
1106
1137
|
};
|
|
1107
1138
|
}
|
|
1108
|
-
},
|
|
1109
|
-
key:
|
|
1110
|
-
in: async (
|
|
1111
|
-
out: async (
|
|
1139
|
+
}, b = (v) => ({
|
|
1140
|
+
key: v,
|
|
1141
|
+
in: async (w) => (y(w, v), (await E(v, "in"))(w)),
|
|
1142
|
+
out: async (w) => (await E(v, "out"))(w),
|
|
1112
1143
|
// Add page transition strategy for page-level transitions
|
|
1113
|
-
[
|
|
1114
|
-
}),
|
|
1115
|
-
if (
|
|
1144
|
+
[tt]: St
|
|
1145
|
+
}), x = (v, w) => {
|
|
1146
|
+
if (p && c.isBack())
|
|
1116
1147
|
return !1;
|
|
1117
|
-
const { from:
|
|
1118
|
-
return !!(
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1148
|
+
const { from: I, to: k } = r(v, w);
|
|
1149
|
+
return !!(J(
|
|
1150
|
+
I,
|
|
1151
|
+
k,
|
|
1152
|
+
h
|
|
1122
1153
|
) || i);
|
|
1123
1154
|
};
|
|
1124
|
-
return
|
|
1125
|
-
getTransition:
|
|
1126
|
-
hasMatchingTransition:
|
|
1127
|
-
} :
|
|
1155
|
+
return S ? {
|
|
1156
|
+
getTransition: b,
|
|
1157
|
+
hasMatchingTransition: x
|
|
1158
|
+
} : b;
|
|
1128
1159
|
}
|
|
1129
1160
|
export {
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1161
|
+
et as SCOPE_ATTR,
|
|
1162
|
+
it as SCOPE_READY_ATTR,
|
|
1163
|
+
tt as TRANSITION_STRATEGY,
|
|
1164
|
+
Lt as createAnyOrderDetector,
|
|
1165
|
+
vt as createDefaultStrategy,
|
|
1166
|
+
zt as createOutFirstDetector,
|
|
1167
|
+
St as createPageTransitionStrategy,
|
|
1168
|
+
Gt as createSggoiTransitionContext,
|
|
1169
|
+
Ut as createTransitionScope,
|
|
1170
|
+
Ct as findScope,
|
|
1171
|
+
jt as getWatchedCount,
|
|
1172
|
+
Kt as isCssAnimation,
|
|
1173
|
+
Jt as isMultiAnimation,
|
|
1174
|
+
At as isScopeReady,
|
|
1175
|
+
Qt as isSingleAnimation,
|
|
1176
|
+
Zt as isTickAnimation,
|
|
1177
|
+
Bt as isWatched,
|
|
1178
|
+
G as normalizeSchedule,
|
|
1148
1179
|
M as normalizeToMultiAnimation,
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1180
|
+
Wt as resetObserver,
|
|
1181
|
+
Yt as transition,
|
|
1182
|
+
Ht as triggerUnmount,
|
|
1183
|
+
It as watchUnmount
|
|
1153
1184
|
};
|