@ssgoi/core 7.0.4 → 7.1.0-beta.0
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/animation/animation.d.ts +4 -66
- package/dist/animation/animation.d.ts.map +1 -1
- package/dist/animation/integrator/provider.d.ts +1 -1
- package/dist/animation/integrator/provider.d.ts.map +1 -1
- package/dist/animation/web-animation.d.ts.map +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.js +1189 -1345
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +543 -707
- package/dist/multi-animation-B5hEmEgN.cjs +1 -0
- package/dist/{multi-animation-ZFZBDBGr.js → multi-animation-DyZGEfKy.js} +72 -128
- package/dist/page-motion-gH3WomQO.cjs +1 -0
- package/dist/page-motion-wmW7PW6B.js +204 -0
- package/dist/resolve-transition-rule-BL12rDDu.cjs +1 -0
- package/dist/resolve-transition-rule-DbkMu0rm.js +160 -0
- package/dist/runtime/animation.d.ts +68 -0
- package/dist/runtime/animation.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +12 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/motion-state.d.ts +25 -0
- package/dist/runtime/motion-state.d.ts.map +1 -0
- package/dist/runtime/page-motion.d.ts +27 -0
- package/dist/runtime/page-motion.d.ts.map +1 -0
- package/dist/runtime/physics.d.ts +30 -0
- package/dist/runtime/physics.d.ts.map +1 -0
- package/dist/runtime/presence.d.ts +20 -0
- package/dist/runtime/presence.d.ts.map +1 -0
- package/dist/runtime/resolve-transition-rule.d.ts +21 -0
- package/dist/runtime/resolve-transition-rule.d.ts.map +1 -0
- package/dist/runtime/timeline.d.ts +12 -0
- package/dist/runtime/timeline.d.ts.map +1 -0
- package/dist/runtime/types.d.ts +53 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +51 -0
- package/dist/ssgoi-transition/navigation-direction.d.ts +3 -4
- package/dist/ssgoi-transition/navigation-direction.d.ts.map +1 -1
- package/dist/ssgoi-transition/path-pattern.d.ts +1 -1
- package/dist/ssgoi-transition/path-pattern.d.ts.map +1 -1
- package/dist/ssgoi-transition/resolve-transition-rule.d.ts +2 -20
- package/dist/ssgoi-transition/resolve-transition-rule.d.ts.map +1 -1
- package/dist/timeline-L_vXntmP.js +68 -0
- package/dist/timeline-Zoo1I4XU.cjs +1 -0
- package/dist/transitions/fade/transition.d.ts.map +1 -1
- package/dist/transitions/slide/transition.d.ts.map +1 -1
- package/dist/types/index.d.ts +17 -147
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -1
- package/dist/multi-animation-6124HEke.cjs +0 -1
package/dist/internal.js
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
var Lt = Object.defineProperty;
|
|
2
|
+
var Dt = (n, e, t) => e in n ? Lt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var K = (n, e, t) => Dt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { r as _t } from "./resolve-transition-rule-DbkMu0rm.js";
|
|
5
|
+
import { A as Nt } from "./multi-animation-DyZGEfKy.js";
|
|
6
|
+
import { M as ye, W as me } from "./multi-animation-DyZGEfKy.js";
|
|
7
|
+
class It extends Nt {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(...arguments);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
K(this, "child", null);
|
|
11
|
+
K(this, "_state", "idle");
|
|
12
|
+
K(this, "_settled", !1);
|
|
13
|
+
K(this, "listeners", /* @__PURE__ */ new Set());
|
|
13
14
|
}
|
|
14
|
-
attach(
|
|
15
|
-
const
|
|
16
|
-
if (this.child =
|
|
17
|
-
const
|
|
18
|
-
|
|
15
|
+
attach(t) {
|
|
16
|
+
const i = this.child;
|
|
17
|
+
if (this.child = t, this._settled = !1, i) {
|
|
18
|
+
const f = i.getPose();
|
|
19
|
+
i.complete(), t.matchInto(f);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
const c =
|
|
22
|
-
|
|
23
|
-
c == null || c(), this.child ===
|
|
21
|
+
t.playbackRate = this.playbackRate;
|
|
22
|
+
const c = t.onComplete;
|
|
23
|
+
t.onComplete = () => {
|
|
24
|
+
c == null || c(), this.child === t && (this.child = null, this._state = "idle", this._settled = !0), this.notify();
|
|
24
25
|
};
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
}, this._state === "paused" ?
|
|
26
|
+
const r = t.onUpdate;
|
|
27
|
+
t.onUpdate = (f) => {
|
|
28
|
+
var u;
|
|
29
|
+
r == null || r(f), (u = this.onUpdate) == null || u.call(this, f), this.notify();
|
|
30
|
+
}, this._state === "paused" ? t.pause() : this._state === "reversing" ? t.reverse() : (this._state = "playing", t.play()), this.notify();
|
|
30
31
|
}
|
|
31
32
|
play() {
|
|
32
|
-
var
|
|
33
|
-
this._state = "playing", this._settled = !1, (
|
|
33
|
+
var t;
|
|
34
|
+
this._state = "playing", this._settled = !1, (t = this.child) == null || t.play(), this.notify();
|
|
34
35
|
}
|
|
35
36
|
reverse() {
|
|
36
|
-
var
|
|
37
|
-
this._state = "reversing", this._settled = !1, (
|
|
37
|
+
var t;
|
|
38
|
+
this._state = "reversing", this._settled = !1, (t = this.child) == null || t.reverse(), this.notify();
|
|
38
39
|
}
|
|
39
40
|
pause() {
|
|
40
|
-
var
|
|
41
|
-
this._state = "paused", (
|
|
41
|
+
var t;
|
|
42
|
+
this._state = "paused", (t = this.child) == null || t.pause(), this.notify();
|
|
42
43
|
}
|
|
43
44
|
complete() {
|
|
44
|
-
var
|
|
45
|
-
(
|
|
45
|
+
var t;
|
|
46
|
+
(t = this.child) == null || t.complete(), this.notify();
|
|
46
47
|
}
|
|
47
48
|
get isAnimating() {
|
|
48
|
-
var
|
|
49
|
-
return ((
|
|
49
|
+
var t;
|
|
50
|
+
return ((t = this.child) == null ? void 0 : t.isAnimating) ?? !1;
|
|
50
51
|
}
|
|
51
52
|
get isPaused() {
|
|
52
53
|
return this._state === "paused";
|
|
@@ -55,900 +56,735 @@ class zt extends Bt {
|
|
|
55
56
|
return this._settled && !this.child;
|
|
56
57
|
}
|
|
57
58
|
get isReversing() {
|
|
58
|
-
var
|
|
59
|
-
return ((
|
|
59
|
+
var t;
|
|
60
|
+
return ((t = this.child) == null ? void 0 : t.isReversing) ?? this._state === "reversing";
|
|
60
61
|
}
|
|
61
62
|
get progress() {
|
|
62
|
-
var
|
|
63
|
-
return ((
|
|
63
|
+
var t;
|
|
64
|
+
return ((t = this.child) == null ? void 0 : t.progress) ?? 0;
|
|
64
65
|
}
|
|
65
|
-
findTimeForProgress(
|
|
66
|
-
var
|
|
67
|
-
return ((
|
|
66
|
+
findTimeForProgress(t) {
|
|
67
|
+
var i;
|
|
68
|
+
return ((i = this.child) == null ? void 0 : i.findTimeForProgress(t)) ?? null;
|
|
68
69
|
}
|
|
69
70
|
get playbackRate() {
|
|
70
71
|
return super.playbackRate;
|
|
71
72
|
}
|
|
72
|
-
set playbackRate(
|
|
73
|
-
super.playbackRate =
|
|
73
|
+
set playbackRate(t) {
|
|
74
|
+
super.playbackRate = t, this.child && (this.child.playbackRate = t), this.notify();
|
|
74
75
|
}
|
|
75
76
|
getPose() {
|
|
76
|
-
var
|
|
77
|
-
return ((
|
|
77
|
+
var t;
|
|
78
|
+
return ((t = this.child) == null ? void 0 : t.getPose()) ?? [];
|
|
78
79
|
}
|
|
79
80
|
getTimeline() {
|
|
80
|
-
var
|
|
81
|
-
return ((
|
|
81
|
+
var t;
|
|
82
|
+
return ((t = this.child) == null ? void 0 : t.getTimeline()) ?? [];
|
|
82
83
|
}
|
|
83
|
-
matchInto(
|
|
84
|
-
var
|
|
85
|
-
(
|
|
84
|
+
matchInto(t) {
|
|
85
|
+
var i;
|
|
86
|
+
(i = this.child) == null || i.matchInto(t);
|
|
86
87
|
}
|
|
87
88
|
/** Currently attached child, or null when nothing is playing. */
|
|
88
89
|
get activeChild() {
|
|
89
90
|
return this.child;
|
|
90
91
|
}
|
|
91
92
|
/** Subscribe to host state changes. Returns an unsubscribe fn. */
|
|
92
|
-
subscribe(
|
|
93
|
-
return this.listeners.add(
|
|
94
|
-
this.listeners.delete(
|
|
93
|
+
subscribe(t) {
|
|
94
|
+
return this.listeners.add(t), () => {
|
|
95
|
+
this.listeners.delete(t);
|
|
95
96
|
};
|
|
96
97
|
}
|
|
97
98
|
notify() {
|
|
98
|
-
for (const
|
|
99
|
+
for (const t of this.listeners) t();
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
const
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
let
|
|
106
|
-
for (;
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
110
|
-
|
|
102
|
+
const Ht = (n, e) => {
|
|
103
|
+
var t;
|
|
104
|
+
n.style.position = "absolute", n.style.width = "100%", n.style.top = `${-1 * (((t = e == null ? void 0 : e.scrollOffset) == null ? void 0 : t.y) ?? 0)}px`, n.style.left = "0";
|
|
105
|
+
}, gt = /* @__PURE__ */ new Set(["auto", "scroll", "overlay"]), Ft = (n) => {
|
|
106
|
+
let e = n.parentElement;
|
|
107
|
+
for (; e && e !== document.body; ) {
|
|
108
|
+
const t = window.getComputedStyle(e);
|
|
109
|
+
if (gt.has(t.overflowY) || gt.has(t.overflowX))
|
|
110
|
+
return e;
|
|
111
|
+
e = e.parentElement;
|
|
111
112
|
}
|
|
112
113
|
return document.documentElement;
|
|
113
|
-
},
|
|
114
|
-
let
|
|
115
|
-
for (;
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
return
|
|
119
|
-
|
|
114
|
+
}, Bt = (n) => {
|
|
115
|
+
let e = n.parentElement;
|
|
116
|
+
for (; e && e !== document.body; ) {
|
|
117
|
+
const t = window.getComputedStyle(e).position;
|
|
118
|
+
if (t === "relative" || t === "absolute" || t === "fixed" || t === "sticky")
|
|
119
|
+
return e;
|
|
120
|
+
e = e.parentElement;
|
|
120
121
|
}
|
|
121
122
|
return document.body;
|
|
122
123
|
};
|
|
123
|
-
function
|
|
124
|
-
const
|
|
125
|
-
return Promise.all(
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
}),
|
|
124
|
+
function Wt(n) {
|
|
125
|
+
const e = Object.keys(n);
|
|
126
|
+
return Promise.all(e.map((t) => n[t])).then((t) => {
|
|
127
|
+
const i = {};
|
|
128
|
+
return e.forEach((c, r) => {
|
|
129
|
+
i[c] = t[r];
|
|
130
|
+
}), i;
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
|
-
const
|
|
133
|
-
function
|
|
134
|
-
const { resolvePath:
|
|
135
|
-
let
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
return
|
|
139
|
-
},
|
|
140
|
-
let
|
|
141
|
-
const
|
|
142
|
-
let
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
x:
|
|
146
|
-
y:
|
|
133
|
+
const Xt = 768, zt = 10, qt = 10;
|
|
134
|
+
function Gt(n = {}) {
|
|
135
|
+
const { resolvePath: e = (h) => h } = n;
|
|
136
|
+
let t = null, i = !1, c = !1;
|
|
137
|
+
const r = () => {
|
|
138
|
+
const h = (t == null ? void 0 : t.clientWidth) ?? 0, p = h > 0 ? h : typeof window < "u" ? window.innerWidth : 0;
|
|
139
|
+
return p > 0 && p < Xt;
|
|
140
|
+
}, f = () => (c || (i = r(), c = !0), i), u = (h) => `path:${e(h)}`;
|
|
141
|
+
let v = null;
|
|
142
|
+
const d = /* @__PURE__ */ new Map();
|
|
143
|
+
let g = null, S = !1, M = 0, L = 0, I = 0;
|
|
144
|
+
const Y = () => {
|
|
145
|
+
t && g && !S && d.set(u(g), {
|
|
146
|
+
x: t.scrollLeft,
|
|
147
|
+
y: t.scrollTop
|
|
147
148
|
});
|
|
148
|
-
},
|
|
149
|
-
if (!
|
|
150
|
-
const
|
|
151
|
-
let
|
|
152
|
-
const
|
|
153
|
-
if (!
|
|
149
|
+
}, $ = (h, p, T) => {
|
|
150
|
+
if (!t) return;
|
|
151
|
+
const O = ++L, x = u(h), C = p && d.has(x) ? d.get(x) : { x: 0, y: 0 };
|
|
152
|
+
let k = 0;
|
|
153
|
+
const _ = () => {
|
|
154
|
+
if (!t || T !== M || O !== L)
|
|
154
155
|
return;
|
|
155
|
-
|
|
156
|
-
top:
|
|
157
|
-
left:
|
|
158
|
-
}), !(Math.abs(
|
|
156
|
+
p || d.set(x, C), t.scrollTo({
|
|
157
|
+
top: C.y,
|
|
158
|
+
left: C.x
|
|
159
|
+
}), !(Math.abs(t.scrollTop - C.y) < 1 && Math.abs(t.scrollLeft - C.x) < 1) && k < zt && (k++, requestAnimationFrame(_));
|
|
159
160
|
};
|
|
160
|
-
requestAnimationFrame(
|
|
161
|
+
requestAnimationFrame(_);
|
|
161
162
|
};
|
|
162
163
|
return {
|
|
163
|
-
initializeContext: (
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}).observe(
|
|
164
|
+
initializeContext: (h, p, T) => {
|
|
165
|
+
S = !0;
|
|
166
|
+
const O = g === p ? M : ++M;
|
|
167
|
+
v = h, t || (t = Ft(h), i = r(), c = !0, typeof ResizeObserver < "u" && new ResizeObserver(() => {
|
|
168
|
+
i = r();
|
|
169
|
+
}).observe(t), (t === document.documentElement ? window : t).addEventListener("scroll", Y, {
|
|
169
170
|
passive: !0
|
|
170
|
-
})),
|
|
171
|
-
const
|
|
172
|
-
|
|
171
|
+
})), g = p;
|
|
172
|
+
const x = u(p), C = d.get(x), k = (F) => {
|
|
173
|
+
O === M && (I = O, F && C && d.set(x, C), $(p, F, O));
|
|
173
174
|
};
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
T !== void 0 ? k(T) : requestAnimationFrame(() => {
|
|
176
|
+
I !== O && O === M && k(!1);
|
|
176
177
|
});
|
|
177
|
-
let
|
|
178
|
-
const
|
|
179
|
-
|
|
178
|
+
let _ = 0;
|
|
179
|
+
const G = () => {
|
|
180
|
+
O === M && (_++, _ >= qt ? S = !1 : requestAnimationFrame(G));
|
|
180
181
|
};
|
|
181
|
-
return requestAnimationFrame(
|
|
182
|
+
return requestAnimationFrame(G), k;
|
|
182
183
|
},
|
|
183
|
-
calculateScrollOffset: (
|
|
184
|
-
const
|
|
184
|
+
calculateScrollOffset: (h, p, T = !1) => {
|
|
185
|
+
const O = h ? u(h) : null, x = O && d.has(O) ? d.get(O) : { x: 0, y: 0 }, C = p && T ? u(p) : null, k = C && d.has(C) ? d.get(C) : { x: 0, y: 0 };
|
|
185
186
|
return {
|
|
186
|
-
x: -
|
|
187
|
-
y: -
|
|
187
|
+
x: -k.x + x.x,
|
|
188
|
+
y: -k.y + x.y
|
|
188
189
|
};
|
|
189
190
|
},
|
|
190
|
-
evictScrollPosition: (
|
|
191
|
-
|
|
191
|
+
evictScrollPosition: (h) => {
|
|
192
|
+
d.delete(u(h));
|
|
192
193
|
},
|
|
193
|
-
getScrollContainer: () =>
|
|
194
|
-
getPositionedParentElement: () =>
|
|
195
|
-
getScrollPosition: (
|
|
196
|
-
if (!
|
|
197
|
-
const
|
|
198
|
-
return
|
|
194
|
+
getScrollContainer: () => t,
|
|
195
|
+
getPositionedParentElement: () => v ? Bt(v) : document.body,
|
|
196
|
+
getScrollPosition: (h, p = !0) => {
|
|
197
|
+
if (!p) return { x: 0, y: 0 };
|
|
198
|
+
const T = h ? u(h) : null;
|
|
199
|
+
return T && d.has(T) ? d.get(T) : { x: 0, y: 0 };
|
|
199
200
|
},
|
|
200
201
|
// Exposed so a functional `transitions` config can branch on device class.
|
|
201
|
-
getIsMobile:
|
|
202
|
+
getIsMobile: f
|
|
202
203
|
};
|
|
203
204
|
}
|
|
204
|
-
const
|
|
205
|
-
function
|
|
206
|
-
let
|
|
207
|
-
const
|
|
208
|
-
for (let
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
205
|
+
const vt = 30, bt = 8, Et = 1.2, wt = 30, Vt = 600;
|
|
206
|
+
function Kt() {
|
|
207
|
+
let n = null, e = !1, t = !1, i = null, c = null, r = !1;
|
|
208
|
+
const f = (y, b) => {
|
|
209
|
+
for (let P = 0; P < y.length; P++) {
|
|
210
|
+
const R = y.item(P);
|
|
211
|
+
if (R && R.identifier === b) return R;
|
|
211
212
|
}
|
|
212
213
|
return null;
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
},
|
|
214
|
+
}, u = () => {
|
|
215
|
+
i !== null && (clearTimeout(i), i = null);
|
|
216
|
+
}, v = () => {
|
|
216
217
|
c !== null && (clearTimeout(c), c = null);
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
if (
|
|
223
|
-
|
|
218
|
+
}, d = () => {
|
|
219
|
+
e = !0, t = !0, u(), v(), i = setTimeout(() => {
|
|
220
|
+
e = !1, t = !1, i = null;
|
|
221
|
+
}, Vt);
|
|
222
|
+
}, g = (y) => {
|
|
223
|
+
if (y.touches.length !== 1) {
|
|
224
|
+
n = null;
|
|
224
225
|
return;
|
|
225
226
|
}
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
|
|
227
|
+
const b = y.touches.item(0);
|
|
228
|
+
if (!b) {
|
|
229
|
+
n = null;
|
|
229
230
|
return;
|
|
230
231
|
}
|
|
231
|
-
const
|
|
232
|
-
if (!
|
|
233
|
-
|
|
232
|
+
const P = window.innerWidth, R = b.clientX <= vt, H = b.clientX >= P - vt;
|
|
233
|
+
if (!R && !H) {
|
|
234
|
+
n = null;
|
|
234
235
|
return;
|
|
235
236
|
}
|
|
236
|
-
|
|
237
|
-
identifier:
|
|
238
|
-
startX:
|
|
239
|
-
startY:
|
|
240
|
-
fromLeftEdge:
|
|
237
|
+
n = {
|
|
238
|
+
identifier: b.identifier,
|
|
239
|
+
startX: b.clientX,
|
|
240
|
+
startY: b.clientY,
|
|
241
|
+
fromLeftEdge: R,
|
|
241
242
|
moved: !1
|
|
242
243
|
};
|
|
243
|
-
},
|
|
244
|
-
if (!
|
|
245
|
-
if (
|
|
246
|
-
|
|
244
|
+
}, S = (y) => {
|
|
245
|
+
if (!n) return;
|
|
246
|
+
if (y.touches.length !== 1) {
|
|
247
|
+
n = null;
|
|
247
248
|
return;
|
|
248
249
|
}
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
251
|
-
|
|
250
|
+
const b = f(y.touches, n.identifier);
|
|
251
|
+
if (!b) {
|
|
252
|
+
n = null;
|
|
252
253
|
return;
|
|
253
254
|
}
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
|
|
255
|
+
const P = b.clientX - n.startX, R = b.clientY - n.startY, H = Math.abs(P), h = Math.abs(R);
|
|
256
|
+
if (h > bt && h > H * Et) {
|
|
257
|
+
n = null;
|
|
257
258
|
return;
|
|
258
259
|
}
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
},
|
|
262
|
-
if (!
|
|
263
|
-
const
|
|
264
|
-
if (!
|
|
265
|
-
|
|
260
|
+
const p = n.fromLeftEdge ? P > 0 : P < 0;
|
|
261
|
+
H > bt && H > h * Et && p && (n.moved = !0);
|
|
262
|
+
}, M = (y) => {
|
|
263
|
+
if (!n) return;
|
|
264
|
+
const b = f(y.changedTouches, n.identifier);
|
|
265
|
+
if (!b) {
|
|
266
|
+
n = null;
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
|
-
const
|
|
269
|
-
if (
|
|
270
|
-
|
|
269
|
+
const P = b.clientX - n.startX, R = n.fromLeftEdge ? P > 0 : P < 0;
|
|
270
|
+
if (n.moved && R && Math.abs(P) >= wt) {
|
|
271
|
+
d(), n = null;
|
|
271
272
|
return;
|
|
272
273
|
}
|
|
273
|
-
|
|
274
|
-
},
|
|
275
|
-
|
|
274
|
+
n.moved && Math.abs(P) >= wt && d(), n = null;
|
|
275
|
+
}, L = () => {
|
|
276
|
+
n && (n.moved && d(), n = null);
|
|
276
277
|
};
|
|
277
278
|
return { initialize: () => {
|
|
278
|
-
if (typeof window > "u" ||
|
|
279
|
-
|
|
280
|
-
const
|
|
281
|
-
window.addEventListener("touchstart",
|
|
279
|
+
if (typeof window > "u" || r) return;
|
|
280
|
+
r = !0;
|
|
281
|
+
const y = { passive: !0, capture: !0 };
|
|
282
|
+
window.addEventListener("touchstart", g, y), window.addEventListener("touchmove", S, y), window.addEventListener("touchend", M, y), window.addEventListener("touchcancel", L, y);
|
|
282
283
|
}, destroy: () => {
|
|
283
|
-
if (typeof window > "u" || !
|
|
284
|
-
|
|
285
|
-
const
|
|
286
|
-
window.removeEventListener("touchstart",
|
|
284
|
+
if (typeof window > "u" || !r) return;
|
|
285
|
+
r = !1;
|
|
286
|
+
const y = { capture: !0 };
|
|
287
|
+
window.removeEventListener("touchstart", g, y), window.removeEventListener("touchmove", S, y), window.removeEventListener("touchend", M, y), window.removeEventListener("touchcancel", L, y), u(), v(), n = null, e = !1, t = !1;
|
|
287
288
|
}, isSwipeBack: () => {
|
|
288
|
-
const
|
|
289
|
-
return
|
|
289
|
+
const y = e || t;
|
|
290
|
+
return y && u(), y;
|
|
290
291
|
}, onPageEnter: () => {
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
e = !1, u(), v(), c = setTimeout(() => {
|
|
293
|
+
t = !1, c = null;
|
|
293
294
|
}, 0);
|
|
294
295
|
} };
|
|
295
296
|
}
|
|
296
|
-
|
|
297
|
-
function ee(t) {
|
|
298
|
-
const n = t.trim(), e = n.indexOf("#"), o = n.indexOf("?"), c = [e, o].filter((i) => i >= 0).reduce((i, u) => Math.min(i, u), n.length);
|
|
299
|
-
return n.slice(0, c);
|
|
300
|
-
}
|
|
301
|
-
function j(t) {
|
|
302
|
-
const n = ee(t);
|
|
303
|
-
try {
|
|
304
|
-
if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n))
|
|
305
|
-
return j(new URL(n).pathname);
|
|
306
|
-
} catch {
|
|
307
|
-
}
|
|
308
|
-
const o = (n.startsWith("/") ? n : `/${n}`).replace(/\/+/g, "/");
|
|
309
|
-
return (o.length > 1 ? o.replace(/\/+$/g, "") : o) || "/";
|
|
310
|
-
}
|
|
311
|
-
function ne(t) {
|
|
312
|
-
const n = t.trim();
|
|
313
|
-
return n === "*" ? "/**" : j(n);
|
|
314
|
-
}
|
|
315
|
-
function ft(t) {
|
|
316
|
-
return t === "/" ? [] : t.slice(1).split("/");
|
|
317
|
-
}
|
|
318
|
-
function ie(t) {
|
|
319
|
-
return t.startsWith(":") || t.startsWith("[") && t.endsWith("]") || t.startsWith("{") && t.endsWith("}");
|
|
320
|
-
}
|
|
321
|
-
function oe(t, n) {
|
|
322
|
-
const e = j(t), o = ne(n);
|
|
323
|
-
if (e === o)
|
|
324
|
-
return {
|
|
325
|
-
matched: !0,
|
|
326
|
-
specificity: jt + ft(o).length * Ct,
|
|
327
|
-
pattern: n
|
|
328
|
-
};
|
|
329
|
-
const c = ft(e), i = ft(o);
|
|
330
|
-
let u = 0;
|
|
331
|
-
for (let f = 0; f < i.length; f++) {
|
|
332
|
-
const h = i[f], a = c[f], p = f === i.length - 1;
|
|
333
|
-
if (h === "**")
|
|
334
|
-
return {
|
|
335
|
-
matched: p && c.length >= f,
|
|
336
|
-
specificity: u,
|
|
337
|
-
pattern: n
|
|
338
|
-
};
|
|
339
|
-
if (a === void 0 || h === void 0)
|
|
340
|
-
return { matched: !1, specificity: 0, pattern: n };
|
|
341
|
-
if (h === "*") {
|
|
342
|
-
u += te;
|
|
343
|
-
continue;
|
|
344
|
-
}
|
|
345
|
-
if (ie(h)) {
|
|
346
|
-
u += Jt;
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
if (h !== a)
|
|
350
|
-
return { matched: !1, specificity: 0, pattern: n };
|
|
351
|
-
u += Ct;
|
|
352
|
-
}
|
|
353
|
-
return {
|
|
354
|
-
matched: c.length === i.length,
|
|
355
|
-
specificity: u,
|
|
356
|
-
pattern: n
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function H(t, n) {
|
|
360
|
-
const e = typeof n == "string" ? [n] : n;
|
|
361
|
-
let o = null;
|
|
362
|
-
for (const c of e) {
|
|
363
|
-
const i = oe(t, c);
|
|
364
|
-
i.matched && (!o || i.specificity > o.specificity) && (o = i);
|
|
365
|
-
}
|
|
366
|
-
return o;
|
|
367
|
-
}
|
|
368
|
-
const Ot = {
|
|
369
|
-
from: !0,
|
|
370
|
-
to: !1
|
|
371
|
-
}, se = {
|
|
372
|
-
from: !0,
|
|
373
|
-
to: !0
|
|
374
|
-
};
|
|
375
|
-
function re(t, n) {
|
|
376
|
-
return n ? t.priority !== n.priority ? t.priority > n.priority : t.specificity !== n.specificity ? t.specificity > n.specificity : t.ruleIndex < n.ruleIndex : !0;
|
|
377
|
-
}
|
|
378
|
-
function dt(t, n) {
|
|
379
|
-
return n === "forward" ? { from: t.from, to: t.to } : { from: t.to, to: t.from };
|
|
380
|
-
}
|
|
381
|
-
function ce(t, n, e, o) {
|
|
382
|
-
let c = null;
|
|
383
|
-
return e.forEach((i, u) => {
|
|
384
|
-
const f = i.priority ?? 0;
|
|
385
|
-
let h = null;
|
|
386
|
-
if (i.on !== void 0) {
|
|
387
|
-
const a = i.except !== void 0 && H(t, i.except) !== null, p = i.except !== void 0 && H(n, i.except) !== null, y = a ? null : H(t, i.on), m = p ? null : H(n, i.on);
|
|
388
|
-
if (y || m) {
|
|
389
|
-
const b = !y && m ? "forward" : y && !m ? "backward" : o, T = !y && m ? "on-enter" : y && !m ? "on-leave" : "on-history", M = i.preserveScroll ?? Ot;
|
|
390
|
-
h = {
|
|
391
|
-
transition: i.transition,
|
|
392
|
-
direction: b,
|
|
393
|
-
ruleIndex: u,
|
|
394
|
-
priority: f,
|
|
395
|
-
specificity: Math.max(
|
|
396
|
-
(y == null ? void 0 : y.specificity) ?? 0,
|
|
397
|
-
(m == null ? void 0 : m.specificity) ?? 0
|
|
398
|
-
),
|
|
399
|
-
reason: T,
|
|
400
|
-
// Both endpoints of an in-scope history navigation are semantic
|
|
401
|
-
// `to` pages. Enter/leave maps the outside and inside endpoints
|
|
402
|
-
// according to the resolved direction.
|
|
403
|
-
preserveScroll: T === "on-history" ? { from: M.to, to: M.to } : dt(M, b)
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
} else if (i.ordered !== void 0) {
|
|
407
|
-
let a = -1, p = -1, y = -1, m = -1;
|
|
408
|
-
if (i.ordered.forEach((b, T) => {
|
|
409
|
-
const M = H(t, b);
|
|
410
|
-
M && M.specificity > y && (a = T, y = M.specificity);
|
|
411
|
-
const D = H(n, b);
|
|
412
|
-
D && D.specificity > m && (p = T, m = D.specificity);
|
|
413
|
-
}), a >= 0 && p >= 0 && a !== p) {
|
|
414
|
-
const b = a < p ? "forward" : "backward";
|
|
415
|
-
h = {
|
|
416
|
-
transition: i.transition,
|
|
417
|
-
direction: b,
|
|
418
|
-
ruleIndex: u,
|
|
419
|
-
priority: f,
|
|
420
|
-
specificity: y + m,
|
|
421
|
-
reason: "ordered",
|
|
422
|
-
preserveScroll: dt(
|
|
423
|
-
i.preserveScroll ?? se,
|
|
424
|
-
b
|
|
425
|
-
)
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
} else {
|
|
429
|
-
const a = H(t, i.from), p = H(n, i.to), y = i.bidirectional === !1 ? null : H(t, i.to), m = i.bidirectional === !1 ? null : H(n, i.from), b = a && p, T = y && m;
|
|
430
|
-
if (b || T) {
|
|
431
|
-
const M = b ? a.specificity + p.specificity : -1, D = T ? y.specificity + m.specificity : -1, G = b && T && M === D ? o : M >= D ? "forward" : "backward";
|
|
432
|
-
h = {
|
|
433
|
-
transition: i.transition,
|
|
434
|
-
direction: G,
|
|
435
|
-
ruleIndex: u,
|
|
436
|
-
priority: f,
|
|
437
|
-
specificity: Math.max(M, D),
|
|
438
|
-
reason: "pair",
|
|
439
|
-
preserveScroll: dt(
|
|
440
|
-
i.preserveScroll ?? Ot,
|
|
441
|
-
G
|
|
442
|
-
)
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
h && re(h, c) && (c = h);
|
|
447
|
-
}), c;
|
|
448
|
-
}
|
|
449
|
-
function le() {
|
|
450
|
-
const t = [];
|
|
297
|
+
function Ut() {
|
|
451
298
|
let n = !1;
|
|
452
299
|
const e = () => {
|
|
453
300
|
n = !0;
|
|
454
301
|
};
|
|
455
302
|
return typeof window < "u" && window.addEventListener("popstate", e), {
|
|
456
|
-
resolve(
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
t.push(i);
|
|
460
|
-
else if (t[t.length - 1] !== i) {
|
|
461
|
-
const a = t.lastIndexOf(i);
|
|
462
|
-
a >= 0 ? t.splice(a + 1) : t.push(i);
|
|
463
|
-
}
|
|
464
|
-
const f = t[t.length - 2], h = n || f === u ? "backward" : "forward";
|
|
465
|
-
if (n = !1, h === "backward") {
|
|
466
|
-
const a = t.lastIndexOf(u);
|
|
467
|
-
a >= 0 ? t.splice(a + 1) : t.push(u);
|
|
468
|
-
} else t[t.length - 1] !== u && t.push(u);
|
|
469
|
-
return h;
|
|
303
|
+
resolve(t, i) {
|
|
304
|
+
const c = n ? "backward" : "forward";
|
|
305
|
+
return n = !1, c;
|
|
470
306
|
},
|
|
471
307
|
dispose() {
|
|
472
308
|
typeof window < "u" && window.removeEventListener("popstate", e);
|
|
473
309
|
}
|
|
474
310
|
};
|
|
475
311
|
}
|
|
476
|
-
function
|
|
477
|
-
let
|
|
478
|
-
function
|
|
479
|
-
var
|
|
480
|
-
|
|
312
|
+
function Yt(n = {}) {
|
|
313
|
+
let e = null, t = null;
|
|
314
|
+
function i() {
|
|
315
|
+
var r, f;
|
|
316
|
+
e && ((r = e.out) == null || r.resolve(null), (f = e.in) == null || f.resolve(null), e = null);
|
|
481
317
|
}
|
|
482
318
|
function c() {
|
|
483
|
-
if (
|
|
484
|
-
if (
|
|
485
|
-
|
|
319
|
+
if (e != null && e.out && e.in) {
|
|
320
|
+
if (e.out.path === e.in.path) {
|
|
321
|
+
i();
|
|
486
322
|
return;
|
|
487
323
|
}
|
|
488
|
-
const
|
|
489
|
-
from:
|
|
490
|
-
to:
|
|
491
|
-
out:
|
|
492
|
-
in:
|
|
324
|
+
const r = {
|
|
325
|
+
from: e.out.path,
|
|
326
|
+
to: e.in.path,
|
|
327
|
+
out: e.out.payload,
|
|
328
|
+
in: e.in.payload
|
|
493
329
|
};
|
|
494
|
-
|
|
330
|
+
t = r, e.out.resolve(r), e.in.resolve(r), e = null;
|
|
495
331
|
}
|
|
496
332
|
}
|
|
497
333
|
return {
|
|
498
|
-
arrive(
|
|
499
|
-
return new Promise((
|
|
500
|
-
var
|
|
501
|
-
const
|
|
502
|
-
if ((
|
|
503
|
-
|
|
334
|
+
arrive(r, f, u) {
|
|
335
|
+
return new Promise((v) => {
|
|
336
|
+
var M, L;
|
|
337
|
+
const d = t === null ? null : f === "out" ? { path: t.from, payload: t.out } : { path: t.to, payload: t.in };
|
|
338
|
+
if ((d == null ? void 0 : d.path) === r) {
|
|
339
|
+
v(null);
|
|
504
340
|
return;
|
|
505
341
|
}
|
|
506
|
-
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
if (
|
|
511
|
-
if (((
|
|
512
|
-
type:
|
|
513
|
-
path:
|
|
514
|
-
current:
|
|
515
|
-
next:
|
|
342
|
+
f === "out" && ((M = e == null ? void 0 : e.in) == null ? void 0 : M.path) === r && !e.out && (e.in.resolve(null), e.in = void 0);
|
|
343
|
+
const g = e == null ? void 0 : e[f];
|
|
344
|
+
g && g.path !== r && i(), e || (e = {});
|
|
345
|
+
const S = e[f];
|
|
346
|
+
if (S) {
|
|
347
|
+
if (((L = n.keepCurrent) == null ? void 0 : L.call(n, {
|
|
348
|
+
type: f,
|
|
349
|
+
path: r,
|
|
350
|
+
current: S.payload,
|
|
351
|
+
next: u
|
|
516
352
|
})) ?? !1) {
|
|
517
|
-
|
|
353
|
+
v(null);
|
|
518
354
|
return;
|
|
519
355
|
}
|
|
520
|
-
|
|
356
|
+
S.resolve(null);
|
|
521
357
|
}
|
|
522
|
-
|
|
358
|
+
e[f] = { path: r, payload: u, resolve: v }, c();
|
|
523
359
|
});
|
|
524
360
|
},
|
|
525
|
-
cancel(
|
|
526
|
-
(
|
|
361
|
+
cancel(r) {
|
|
362
|
+
(e != null && e.out && r(e.out.payload) || e != null && e.in && r(e.in.payload)) && i(), (t && r(t.out) || t && r(t.in)) && (t = null);
|
|
527
363
|
}
|
|
528
364
|
};
|
|
529
365
|
}
|
|
530
|
-
const
|
|
531
|
-
let
|
|
532
|
-
function
|
|
533
|
-
|
|
534
|
-
for (const
|
|
535
|
-
|
|
366
|
+
const $t = {}, q = /* @__PURE__ */ new Map();
|
|
367
|
+
let Q = null, St = !1;
|
|
368
|
+
function Mt(n, e, t) {
|
|
369
|
+
n instanceof HTMLElement && q.has(n) && !n.isConnected && t.set(n, { entry: q.get(n), anchor: e });
|
|
370
|
+
for (const i of Array.from(n.childNodes))
|
|
371
|
+
Mt(i, e, t);
|
|
536
372
|
}
|
|
537
|
-
function
|
|
538
|
-
const
|
|
539
|
-
Array.from(
|
|
373
|
+
function Zt(n) {
|
|
374
|
+
const e = new Set(
|
|
375
|
+
Array.from(n.values(), ({ entry: t }) => t)
|
|
540
376
|
);
|
|
541
|
-
for (const [
|
|
542
|
-
|
|
543
|
-
let
|
|
544
|
-
for (;
|
|
545
|
-
if (
|
|
546
|
-
|
|
377
|
+
for (const [t, { entry: i, anchor: c }] of n) {
|
|
378
|
+
q.delete(t);
|
|
379
|
+
let r = i.parent, f = !1;
|
|
380
|
+
for (; r; ) {
|
|
381
|
+
if (r.group === i.group && e.has(r)) {
|
|
382
|
+
f = !0;
|
|
547
383
|
break;
|
|
548
384
|
}
|
|
549
|
-
|
|
385
|
+
r = r.parent;
|
|
550
386
|
}
|
|
551
|
-
queueMicrotask(() =>
|
|
387
|
+
queueMicrotask(() => i.callback(c, { emit: !f }));
|
|
552
388
|
}
|
|
553
389
|
}
|
|
554
|
-
function
|
|
555
|
-
if (
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
for (const
|
|
390
|
+
function jt() {
|
|
391
|
+
if (St || typeof document > "u") return;
|
|
392
|
+
St = !0, Q = new MutationObserver((e) => {
|
|
393
|
+
const t = /* @__PURE__ */ new Map();
|
|
394
|
+
for (const i of e) {
|
|
559
395
|
const c = {
|
|
560
|
-
parent:
|
|
561
|
-
nextSibling:
|
|
396
|
+
parent: i.target,
|
|
397
|
+
nextSibling: i.nextSibling
|
|
562
398
|
};
|
|
563
|
-
for (const
|
|
564
|
-
|
|
399
|
+
for (const r of Array.from(i.removedNodes))
|
|
400
|
+
Mt(r, c, t);
|
|
565
401
|
}
|
|
566
|
-
|
|
402
|
+
Zt(t);
|
|
567
403
|
});
|
|
568
|
-
const
|
|
569
|
-
|
|
404
|
+
const n = () => {
|
|
405
|
+
Q == null || Q.observe(document.body, { childList: !0, subtree: !0 });
|
|
570
406
|
};
|
|
571
|
-
document.body ?
|
|
407
|
+
document.body ? n() : document.addEventListener("DOMContentLoaded", n, { once: !0 });
|
|
572
408
|
}
|
|
573
|
-
function
|
|
574
|
-
|
|
575
|
-
let
|
|
576
|
-
for (;
|
|
577
|
-
const
|
|
578
|
-
if ((
|
|
579
|
-
c =
|
|
409
|
+
function Jt(n, e, t = $t) {
|
|
410
|
+
jt();
|
|
411
|
+
let i = n.parentElement, c = null;
|
|
412
|
+
for (; i; ) {
|
|
413
|
+
const r = q.get(i);
|
|
414
|
+
if ((r == null ? void 0 : r.group) === t) {
|
|
415
|
+
c = r;
|
|
580
416
|
break;
|
|
581
417
|
}
|
|
582
|
-
|
|
418
|
+
i = i.parentElement;
|
|
583
419
|
}
|
|
584
|
-
return
|
|
585
|
-
element:
|
|
586
|
-
callback:
|
|
587
|
-
group:
|
|
420
|
+
return q.set(n, {
|
|
421
|
+
element: n,
|
|
422
|
+
callback: e,
|
|
423
|
+
group: t,
|
|
588
424
|
parent: c
|
|
589
425
|
}), () => {
|
|
590
|
-
|
|
426
|
+
q.delete(n);
|
|
591
427
|
};
|
|
592
428
|
}
|
|
593
|
-
const
|
|
594
|
-
let
|
|
595
|
-
const
|
|
596
|
-
function
|
|
597
|
-
const
|
|
598
|
-
return
|
|
429
|
+
const at = /* @__PURE__ */ new WeakMap();
|
|
430
|
+
let tt = null;
|
|
431
|
+
const et = "none !important";
|
|
432
|
+
function U(n) {
|
|
433
|
+
const e = n.style.getPropertyValue("display");
|
|
434
|
+
return n.style.getPropertyPriority("display") ? `${e} !important` : e;
|
|
599
435
|
}
|
|
600
|
-
function
|
|
601
|
-
return
|
|
602
|
-
for (const
|
|
603
|
-
const
|
|
604
|
-
if (!
|
|
605
|
-
const c =
|
|
606
|
-
c !==
|
|
436
|
+
function Qt() {
|
|
437
|
+
return tt || (tt = new MutationObserver((n) => {
|
|
438
|
+
for (const e of n) {
|
|
439
|
+
const t = e.target, i = at.get(t);
|
|
440
|
+
if (!i) continue;
|
|
441
|
+
const c = U(t);
|
|
442
|
+
c !== i.accounted && (i.accounted = c, c === et ? (i.reactHidden = !0, i.onHide()) : c !== "none" && i.reactHidden && (i.reactHidden = !1, i.onShow()));
|
|
607
443
|
}
|
|
608
|
-
}),
|
|
444
|
+
}), tt);
|
|
609
445
|
}
|
|
610
|
-
function
|
|
611
|
-
const
|
|
612
|
-
accounted:
|
|
613
|
-
reactHidden:
|
|
614
|
-
onHide:
|
|
615
|
-
onShow:
|
|
446
|
+
function te(n, e) {
|
|
447
|
+
const t = U(n), i = {
|
|
448
|
+
accounted: t,
|
|
449
|
+
reactHidden: t === et,
|
|
450
|
+
onHide: e.onHide,
|
|
451
|
+
onShow: e.onShow
|
|
616
452
|
};
|
|
617
|
-
return
|
|
453
|
+
return at.set(n, i), Qt().observe(n, {
|
|
618
454
|
attributes: !0,
|
|
619
455
|
attributeFilter: ["style"]
|
|
620
456
|
}), {
|
|
621
457
|
get isHidden() {
|
|
622
|
-
return
|
|
458
|
+
return U(n) === et;
|
|
623
459
|
},
|
|
624
|
-
setDisplay(c,
|
|
625
|
-
c === null ?
|
|
460
|
+
setDisplay(c, r = !1) {
|
|
461
|
+
c === null ? n.style.removeProperty("display") : n.style.setProperty(
|
|
626
462
|
"display",
|
|
627
463
|
c,
|
|
628
|
-
|
|
629
|
-
),
|
|
464
|
+
r ? "important" : ""
|
|
465
|
+
), i.accounted = U(n);
|
|
630
466
|
},
|
|
631
467
|
sync() {
|
|
632
|
-
|
|
468
|
+
i.accounted = U(n), i.reactHidden = i.accounted === et;
|
|
633
469
|
},
|
|
634
470
|
stop() {
|
|
635
|
-
|
|
471
|
+
at.delete(n);
|
|
636
472
|
}
|
|
637
473
|
};
|
|
638
474
|
}
|
|
639
|
-
function
|
|
640
|
-
const { transitions:
|
|
475
|
+
function de(n, e = {}) {
|
|
476
|
+
const { transitions: t = [], middleware: i = (o, s) => ({ from: o, to: s }) } = n, c = e.host ?? new It(), r = {}, f = Yt({
|
|
641
477
|
// Nested boundaries can be discovered in separate MutationObserver
|
|
642
478
|
// batches (notably when Suspense reveals a child later). When the same
|
|
643
479
|
// side/path repeats before pairing, the outermost DOM boundary owns it.
|
|
644
|
-
keepCurrent: ({ current:
|
|
645
|
-
}),
|
|
646
|
-
|
|
647
|
-
const
|
|
648
|
-
let
|
|
649
|
-
return
|
|
480
|
+
keepCurrent: ({ current: o, next: s }) => o.element.contains(s.element)
|
|
481
|
+
}), u = Ut(), v = typeof t == "function" ? t : () => t, d = Kt();
|
|
482
|
+
d.initialize();
|
|
483
|
+
const g = /* @__PURE__ */ new Map(), S = (o) => {
|
|
484
|
+
let s = g.get(o);
|
|
485
|
+
return s === void 0 && (s = i(o, o).from, g.set(o, s)), s;
|
|
650
486
|
}, {
|
|
651
|
-
initializeContext:
|
|
652
|
-
calculateScrollOffset:
|
|
653
|
-
evictScrollPosition:
|
|
654
|
-
getScrollContainer:
|
|
655
|
-
getPositionedParentElement:
|
|
656
|
-
getScrollPosition:
|
|
657
|
-
getIsMobile:
|
|
658
|
-
} =
|
|
659
|
-
const
|
|
660
|
-
let
|
|
661
|
-
return
|
|
662
|
-
},
|
|
663
|
-
|
|
664
|
-
parent:
|
|
665
|
-
nextSibling:
|
|
487
|
+
initializeContext: M,
|
|
488
|
+
calculateScrollOffset: L,
|
|
489
|
+
evictScrollPosition: I,
|
|
490
|
+
getScrollContainer: Y,
|
|
491
|
+
getPositionedParentElement: $,
|
|
492
|
+
getScrollPosition: Z,
|
|
493
|
+
getIsMobile: y
|
|
494
|
+
} = Gt({ resolvePath: S }), b = /* @__PURE__ */ new Map(), P = () => {
|
|
495
|
+
const o = y();
|
|
496
|
+
let s = b.get(o);
|
|
497
|
+
return s || (s = v({ isMobile: o }), b.set(o, s)), s;
|
|
498
|
+
}, R = /* @__PURE__ */ new WeakMap(), H = (o) => {
|
|
499
|
+
R.set(o, {
|
|
500
|
+
parent: o.parentNode,
|
|
501
|
+
nextSibling: o.nextSibling
|
|
666
502
|
});
|
|
667
|
-
},
|
|
668
|
-
const
|
|
669
|
-
return
|
|
670
|
-
parent:
|
|
671
|
-
nextSibling:
|
|
503
|
+
}, h = (o) => {
|
|
504
|
+
const s = R.get(o);
|
|
505
|
+
return s || {
|
|
506
|
+
parent: o.parentNode,
|
|
507
|
+
nextSibling: o.nextSibling
|
|
672
508
|
};
|
|
673
|
-
},
|
|
674
|
-
let
|
|
675
|
-
const
|
|
676
|
-
const
|
|
677
|
-
return
|
|
678
|
-
},
|
|
679
|
-
|
|
680
|
-
},
|
|
681
|
-
if (
|
|
682
|
-
|
|
683
|
-
const l =
|
|
684
|
-
l && (l.savedCss !== null && (
|
|
685
|
-
},
|
|
686
|
-
if (
|
|
509
|
+
}, p = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap();
|
|
510
|
+
let O = 0;
|
|
511
|
+
const x = (o) => {
|
|
512
|
+
const s = typeof getComputedStyle < "u" ? getComputedStyle(o).display : "";
|
|
513
|
+
return s && s !== "none" ? s : "block";
|
|
514
|
+
}, C = (o, s) => {
|
|
515
|
+
s.visibleDisplay = o.style.getPropertyValue("display"), s.computedDisplay = x(o);
|
|
516
|
+
}, k = (o, s) => {
|
|
517
|
+
if (T.get(o) !== s) return;
|
|
518
|
+
T.delete(o);
|
|
519
|
+
const l = p.get(o);
|
|
520
|
+
l && (l.savedCss !== null && (o.style.cssText = l.savedCss, l.savedCss = null), l.intent === "hidden" ? l.vis.setDisplay("none", !0) : l.visibleDisplay ? (l.vis.setDisplay(l.visibleDisplay, !1), C(o, l)) : (l.vis.setDisplay(null), C(o, l)));
|
|
521
|
+
}, _ = (o, s) => {
|
|
522
|
+
if (o.mode !== "hidden") return;
|
|
687
523
|
const l = Array.from(
|
|
688
|
-
new Set([
|
|
689
|
-
),
|
|
690
|
-
for (const
|
|
524
|
+
new Set([o.element, s == null ? void 0 : s.element].filter(Boolean))
|
|
525
|
+
), w = ++O;
|
|
526
|
+
for (const a of l) T.set(a, w);
|
|
691
527
|
c.complete();
|
|
692
|
-
for (const
|
|
693
|
-
},
|
|
694
|
-
const
|
|
528
|
+
for (const a of l) k(a, w);
|
|
529
|
+
}, G = (o, s, l, w, a, m, E) => {
|
|
530
|
+
const N = a.element, A = m.element, B = (a.mode ?? "unmount") === "hidden", { parent: W, nextSibling: z } = a.parent ? { parent: a.parent, nextSibling: a.nextSibling } : h(N), j = L(
|
|
695
531
|
l,
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
),
|
|
699
|
-
direction:
|
|
700
|
-
scrollOffset:
|
|
701
|
-
from: { scroll:
|
|
532
|
+
w,
|
|
533
|
+
E.to
|
|
534
|
+
), it = {
|
|
535
|
+
direction: s,
|
|
536
|
+
scrollOffset: j,
|
|
537
|
+
from: { scroll: Z(l) },
|
|
702
538
|
to: {
|
|
703
|
-
scroll:
|
|
539
|
+
scroll: Z(w, E.to)
|
|
704
540
|
},
|
|
705
541
|
get scrollingElement() {
|
|
706
|
-
return
|
|
542
|
+
return Y() || document.documentElement;
|
|
707
543
|
},
|
|
708
544
|
get positionedParent() {
|
|
709
|
-
return
|
|
545
|
+
return $();
|
|
710
546
|
}
|
|
711
547
|
};
|
|
712
|
-
let
|
|
713
|
-
if (
|
|
714
|
-
|
|
715
|
-
const
|
|
716
|
-
|
|
548
|
+
let D;
|
|
549
|
+
if (B) {
|
|
550
|
+
D = N, D.style.top = `${-1 * ((j == null ? void 0 : j.y) ?? 0)}px`;
|
|
551
|
+
const X = p.get(A);
|
|
552
|
+
X && X.savedCss === null && (X.savedCss = A.style.cssText);
|
|
717
553
|
} else
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
const
|
|
723
|
-
from:
|
|
724
|
-
to:
|
|
725
|
-
context:
|
|
726
|
-
createElement: ((
|
|
727
|
-
const
|
|
728
|
-
return
|
|
554
|
+
D = N, Ht(D, it);
|
|
555
|
+
E.from || I(l);
|
|
556
|
+
const J = B ? ++O : 0;
|
|
557
|
+
B && (T.set(A, J), T.set(N, J));
|
|
558
|
+
const pt = Promise.resolve(D), yt = Promise.resolve(A), mt = [], kt = {
|
|
559
|
+
from: pt,
|
|
560
|
+
to: yt,
|
|
561
|
+
context: it,
|
|
562
|
+
createElement: ((X, st = "div") => {
|
|
563
|
+
const V = document.createElement(st);
|
|
564
|
+
return V.setAttribute("data-ssgoi-id", X), mt.push(V), V;
|
|
729
565
|
})
|
|
730
|
-
},
|
|
731
|
-
|
|
566
|
+
}, xt = Promise.resolve(
|
|
567
|
+
o.prepare ? o.prepare(kt) : {}
|
|
732
568
|
);
|
|
733
|
-
|
|
734
|
-
from:
|
|
735
|
-
to:
|
|
736
|
-
extras:
|
|
737
|
-
}).then(({ from:
|
|
738
|
-
!
|
|
739
|
-
const
|
|
740
|
-
from:
|
|
741
|
-
to:
|
|
742
|
-
context:
|
|
743
|
-
...
|
|
744
|
-
}),
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
for (const
|
|
748
|
-
|
|
749
|
-
}, c.attach(
|
|
569
|
+
Wt({
|
|
570
|
+
from: pt,
|
|
571
|
+
to: yt,
|
|
572
|
+
extras: xt
|
|
573
|
+
}).then(({ from: X, to: st, extras: V }) => {
|
|
574
|
+
!B && W && (z && W.contains(z) ? W.insertBefore(D, z) : W.appendChild(D));
|
|
575
|
+
const rt = o.animation({
|
|
576
|
+
from: X,
|
|
577
|
+
to: st,
|
|
578
|
+
context: it,
|
|
579
|
+
...V
|
|
580
|
+
}), lt = rt.onComplete;
|
|
581
|
+
rt.onComplete = () => {
|
|
582
|
+
lt == null || lt(), B ? (k(N, J), k(A, J)) : D.parentNode && D.parentNode.removeChild(D);
|
|
583
|
+
for (const ct of mt)
|
|
584
|
+
ct.parentNode && ct.parentNode.removeChild(ct);
|
|
585
|
+
}, c.attach(rt);
|
|
750
586
|
});
|
|
751
|
-
},
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
var
|
|
755
|
-
if (
|
|
756
|
-
|
|
587
|
+
}, F = (o, s, l) => {
|
|
588
|
+
const w = d.isSwipeBack();
|
|
589
|
+
f.arrive(o, s, l).then((a) => {
|
|
590
|
+
var ot, B, W, z;
|
|
591
|
+
if (s === "in" && d.onPageEnter(), !a) {
|
|
592
|
+
s === "out" && _(l);
|
|
757
593
|
return;
|
|
758
594
|
}
|
|
759
|
-
if (
|
|
760
|
-
const { from:
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
),
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
),
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
595
|
+
if (s !== "in") return;
|
|
596
|
+
const { from: m, to: E } = i(
|
|
597
|
+
a.from,
|
|
598
|
+
a.to
|
|
599
|
+
), N = u.resolve(
|
|
600
|
+
m,
|
|
601
|
+
E
|
|
602
|
+
), A = _t(
|
|
603
|
+
m,
|
|
604
|
+
E,
|
|
605
|
+
P(),
|
|
606
|
+
N
|
|
771
607
|
);
|
|
772
|
-
if (!
|
|
773
|
-
(
|
|
608
|
+
if (!A) {
|
|
609
|
+
(B = (ot = a.in).applyScrollPolicy) == null || B.call(ot, !1), I(a.from), _(a.out, a.in);
|
|
774
610
|
return;
|
|
775
611
|
}
|
|
776
|
-
if ((
|
|
777
|
-
|
|
612
|
+
if ((z = (W = a.in).applyScrollPolicy) == null || z.call(W, A.preserveScroll.to), w) {
|
|
613
|
+
A.preserveScroll.from || I(a.from), _(a.out, a.in);
|
|
778
614
|
return;
|
|
779
615
|
}
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
616
|
+
G(
|
|
617
|
+
A.transition,
|
|
618
|
+
A.direction,
|
|
619
|
+
a.from,
|
|
620
|
+
a.to,
|
|
621
|
+
a.out,
|
|
622
|
+
a.in,
|
|
623
|
+
A.preserveScroll
|
|
788
624
|
);
|
|
789
625
|
});
|
|
790
|
-
},
|
|
791
|
-
const l =
|
|
626
|
+
}, ut = (o, s) => {
|
|
627
|
+
const l = p.get(o);
|
|
792
628
|
if (!l) return;
|
|
793
|
-
const
|
|
794
|
-
if (l.intent = "hidden", l.savedCss === null && (l.savedCss =
|
|
795
|
-
const
|
|
796
|
-
element:
|
|
797
|
-
parent:
|
|
798
|
-
nextSibling:
|
|
629
|
+
const w = l.intent === "hidden";
|
|
630
|
+
if (l.intent = "hidden", l.savedCss === null && (l.savedCss = o.style.cssText), l.vis.setDisplay(l.computedDisplay || "block", !0), o.style.position = "absolute", o.style.width = "100%", o.style.left = "0", w) return;
|
|
631
|
+
const a = h(o), m = {
|
|
632
|
+
element: o,
|
|
633
|
+
parent: a.parent,
|
|
634
|
+
nextSibling: a.nextSibling,
|
|
799
635
|
mode: "hidden"
|
|
800
|
-
},
|
|
801
|
-
l.pendingOutPath = null,
|
|
802
|
-
},
|
|
803
|
-
const l =
|
|
636
|
+
}, E = l.pendingOutPath ?? l.currentPath ?? s;
|
|
637
|
+
l.pendingOutPath = null, F(E, "out", m);
|
|
638
|
+
}, Rt = (o, s) => {
|
|
639
|
+
const l = p.get(o);
|
|
804
640
|
if (!l || l.intent === "visible") return;
|
|
805
|
-
l.intent = "visible", l.currentPath =
|
|
806
|
-
const
|
|
807
|
-
element:
|
|
808
|
-
parent:
|
|
809
|
-
nextSibling:
|
|
810
|
-
applyScrollPolicy:
|
|
641
|
+
l.intent = "visible", l.currentPath = o.getAttribute("data-ssgoi-transition") ?? l.currentPath ?? s, l.pendingOutPath = null, l.pathRevision++, C(o, l), l.savedCss !== null && (o.style.cssText = l.savedCss, l.visibleDisplay ? l.vis.setDisplay(l.visibleDisplay, !1) : l.vis.setDisplay(null));
|
|
642
|
+
const w = l.currentPath, a = M(o, w), m = {
|
|
643
|
+
element: o,
|
|
644
|
+
parent: o.parentElement,
|
|
645
|
+
nextSibling: o.nextElementSibling,
|
|
646
|
+
applyScrollPolicy: a
|
|
811
647
|
};
|
|
812
|
-
|
|
813
|
-
},
|
|
814
|
-
const
|
|
815
|
-
if (
|
|
816
|
-
|
|
648
|
+
F(w, "in", m);
|
|
649
|
+
}, At = (o, s, l, w = !0) => {
|
|
650
|
+
const a = p.get(o), m = (a == null ? void 0 : a.pendingOutPath) ?? (a == null ? void 0 : a.currentPath) ?? s;
|
|
651
|
+
if (a && (a.vis.stop(), p.delete(o), T.delete(o), a.intent === "hidden")) {
|
|
652
|
+
f.cancel((A) => A.element === o);
|
|
817
653
|
return;
|
|
818
654
|
}
|
|
819
|
-
if (!
|
|
820
|
-
const
|
|
821
|
-
element:
|
|
822
|
-
parent:
|
|
823
|
-
nextSibling:
|
|
655
|
+
if (!w) return;
|
|
656
|
+
const E = l ?? h(o), N = {
|
|
657
|
+
element: o,
|
|
658
|
+
parent: E.parent,
|
|
659
|
+
nextSibling: E.nextSibling,
|
|
824
660
|
mode: "unmount"
|
|
825
661
|
};
|
|
826
|
-
|
|
827
|
-
},
|
|
828
|
-
if (
|
|
829
|
-
const
|
|
830
|
-
if (
|
|
831
|
-
|
|
832
|
-
const
|
|
662
|
+
F(m, "out", N);
|
|
663
|
+
}, dt = /* @__PURE__ */ new WeakSet(), ft = (o, s, { enter: l = !0 } = {}) => {
|
|
664
|
+
if (dt.has(s)) {
|
|
665
|
+
const m = p.get(s);
|
|
666
|
+
if (m && m.currentPath !== o) {
|
|
667
|
+
m.intent === "visible" && m.pendingOutPath === null && (m.pendingOutPath = m.currentPath), m.currentPath = o;
|
|
668
|
+
const E = ++m.pathRevision;
|
|
833
669
|
queueMicrotask(() => {
|
|
834
|
-
|
|
670
|
+
m.pathRevision === E && (m.pendingOutPath = null);
|
|
835
671
|
});
|
|
836
672
|
}
|
|
837
673
|
return;
|
|
838
674
|
}
|
|
839
|
-
|
|
840
|
-
const
|
|
841
|
-
onHide: () =>
|
|
842
|
-
onShow: () =>
|
|
843
|
-
}),
|
|
844
|
-
vis:
|
|
675
|
+
dt.add(s), H(s);
|
|
676
|
+
const w = te(s, {
|
|
677
|
+
onHide: () => ut(s, o),
|
|
678
|
+
onShow: () => Rt(s, o)
|
|
679
|
+
}), a = {
|
|
680
|
+
vis: w,
|
|
845
681
|
savedCss: null,
|
|
846
|
-
intent:
|
|
682
|
+
intent: w.isHidden ? "hidden" : "visible",
|
|
847
683
|
visibleDisplay: "",
|
|
848
684
|
computedDisplay: "block",
|
|
849
|
-
currentPath:
|
|
685
|
+
currentPath: o,
|
|
850
686
|
pendingOutPath: null,
|
|
851
687
|
pathRevision: 0
|
|
852
688
|
};
|
|
853
|
-
if (
|
|
854
|
-
const
|
|
855
|
-
element:
|
|
856
|
-
parent:
|
|
857
|
-
nextSibling:
|
|
858
|
-
applyScrollPolicy:
|
|
689
|
+
if (p.set(s, a), !w.isHidden && (C(s, a), l)) {
|
|
690
|
+
const m = M(s, o), E = {
|
|
691
|
+
element: s,
|
|
692
|
+
parent: s.parentElement,
|
|
693
|
+
nextSibling: s.nextElementSibling,
|
|
694
|
+
applyScrollPolicy: m
|
|
859
695
|
};
|
|
860
|
-
|
|
696
|
+
F(o, "in", E);
|
|
861
697
|
}
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
(
|
|
865
|
-
|
|
698
|
+
Jt(
|
|
699
|
+
s,
|
|
700
|
+
(m, E) => At(s, o, m, (E == null ? void 0 : E.emit) ?? !0),
|
|
701
|
+
r
|
|
866
702
|
);
|
|
867
|
-
},
|
|
868
|
-
return { register:
|
|
869
|
-
let
|
|
870
|
-
return
|
|
871
|
-
l &&
|
|
872
|
-
},
|
|
703
|
+
}, ht = /* @__PURE__ */ new Map();
|
|
704
|
+
return { register: ft, refFor: (o) => {
|
|
705
|
+
let s = ht.get(o);
|
|
706
|
+
return s || (s = (l) => {
|
|
707
|
+
l && ft(o, l);
|
|
708
|
+
}, ht.set(o, s)), s;
|
|
873
709
|
} };
|
|
874
710
|
}
|
|
875
|
-
const
|
|
876
|
-
function
|
|
711
|
+
const Ot = "data-ssgoi-root", ee = `[${Ot}]`, nt = "data-ssgoi-transition", Pt = `[${nt}]`, ne = "[data-ssgoi-clone]";
|
|
712
|
+
function oe() {
|
|
877
713
|
return typeof MutationObserver < "u" && typeof HTMLElement < "u" && typeof Node < "u";
|
|
878
714
|
}
|
|
879
|
-
function
|
|
880
|
-
return
|
|
715
|
+
function ie(n) {
|
|
716
|
+
return n.nodeType === Node.ELEMENT_NODE;
|
|
881
717
|
}
|
|
882
|
-
function
|
|
883
|
-
return
|
|
718
|
+
function se(n) {
|
|
719
|
+
return n instanceof HTMLElement;
|
|
884
720
|
}
|
|
885
|
-
function
|
|
886
|
-
let
|
|
887
|
-
for (;
|
|
888
|
-
|
|
889
|
-
return
|
|
721
|
+
function Tt(n) {
|
|
722
|
+
let e = 0, t = n.parentElement;
|
|
723
|
+
for (; t; )
|
|
724
|
+
e++, t = t.parentElement;
|
|
725
|
+
return e;
|
|
890
726
|
}
|
|
891
|
-
function
|
|
892
|
-
const
|
|
893
|
-
(c,
|
|
727
|
+
function Ct(n, e, t = n) {
|
|
728
|
+
const i = Array.from(n).sort(
|
|
729
|
+
(c, r) => Tt(c) - Tt(r)
|
|
894
730
|
);
|
|
895
|
-
for (const c of
|
|
896
|
-
const
|
|
897
|
-
if (
|
|
898
|
-
let
|
|
899
|
-
for (;
|
|
900
|
-
if (
|
|
901
|
-
|
|
731
|
+
for (const c of i) {
|
|
732
|
+
const r = c.getAttribute(nt);
|
|
733
|
+
if (r === null) continue;
|
|
734
|
+
let f = c.parentElement, u = !1;
|
|
735
|
+
for (; f; ) {
|
|
736
|
+
if (t.has(f)) {
|
|
737
|
+
u = !0;
|
|
902
738
|
break;
|
|
903
739
|
}
|
|
904
|
-
|
|
740
|
+
f = f.parentElement;
|
|
905
741
|
}
|
|
906
|
-
|
|
742
|
+
e.register(r, c, { enter: !u });
|
|
907
743
|
}
|
|
908
744
|
}
|
|
909
|
-
function
|
|
910
|
-
if (!
|
|
745
|
+
function fe(n, e) {
|
|
746
|
+
if (!oe()) return () => {
|
|
911
747
|
};
|
|
912
|
-
|
|
913
|
-
const
|
|
914
|
-
if (
|
|
915
|
-
if (
|
|
916
|
-
const
|
|
917
|
-
|
|
748
|
+
n.setAttribute(Ot, "");
|
|
749
|
+
const t = (u) => u.closest(ee) === n, i = (u) => !se(u) || !t(u) || u.closest(ne) || u.getAttribute(nt) === null ? null : u, c = (u, v) => {
|
|
750
|
+
if (ie(u)) {
|
|
751
|
+
if (u.matches(Pt)) {
|
|
752
|
+
const d = i(u);
|
|
753
|
+
d && v.add(d);
|
|
918
754
|
}
|
|
919
|
-
for (const
|
|
920
|
-
const
|
|
921
|
-
|
|
755
|
+
for (const d of u.querySelectorAll(Pt)) {
|
|
756
|
+
const g = i(d);
|
|
757
|
+
g && v.add(g);
|
|
922
758
|
}
|
|
923
759
|
}
|
|
924
|
-
},
|
|
925
|
-
const
|
|
926
|
-
for (const
|
|
927
|
-
if (
|
|
928
|
-
const
|
|
929
|
-
|
|
760
|
+
}, r = new MutationObserver((u) => {
|
|
761
|
+
const v = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
|
|
762
|
+
for (const g of u) {
|
|
763
|
+
if (g.type === "attributes") {
|
|
764
|
+
const S = i(g.target);
|
|
765
|
+
S && v.add(S);
|
|
930
766
|
continue;
|
|
931
767
|
}
|
|
932
|
-
for (const
|
|
933
|
-
c(
|
|
768
|
+
for (const S of g.addedNodes)
|
|
769
|
+
c(S, d);
|
|
934
770
|
}
|
|
935
|
-
for (const
|
|
936
|
-
|
|
771
|
+
for (const g of d) v.add(g);
|
|
772
|
+
Ct(v, e, d);
|
|
937
773
|
});
|
|
938
|
-
|
|
774
|
+
r.observe(n, {
|
|
939
775
|
childList: !0,
|
|
940
776
|
subtree: !0,
|
|
941
777
|
attributes: !0,
|
|
942
|
-
attributeFilter: [
|
|
778
|
+
attributeFilter: [nt]
|
|
943
779
|
});
|
|
944
|
-
const
|
|
945
|
-
return c(
|
|
780
|
+
const f = /* @__PURE__ */ new Set();
|
|
781
|
+
return c(n, f), Ct(f, e), () => r.disconnect();
|
|
946
782
|
}
|
|
947
783
|
export {
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
784
|
+
Nt as Animation,
|
|
785
|
+
It as HostAnimation,
|
|
786
|
+
ye as MultiAnimation,
|
|
787
|
+
me as WebAnimation,
|
|
788
|
+
de as createSggoiTransitionContext,
|
|
789
|
+
fe as observeSsgoiTransitions
|
|
954
790
|
};
|