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