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