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