@ssgoi/core 2.3.1 → 2.5.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/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +332 -304
- package/dist/jaemin-BAi8PTrj.js +130 -0
- package/dist/jaemin-DL1-g_B5.cjs +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/prepare-outgoing.d.ts +2 -1
- package/dist/utils/prepare-outgoing.d.ts.map +1 -1
- package/dist/utils.d.ts +0 -5
- package/dist/utils.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts +3 -0
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/hero-rotate.d.ts +28 -0
- package/dist/view-transitions/hero-rotate.d.ts.map +1 -0
- package/dist/view-transitions/hero.d.ts +1 -0
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +17 -17
- package/dist/view-transitions/index.d.ts +2 -0
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +494 -376
- package/dist/view-transitions/jaemin.d.ts +25 -0
- package/dist/view-transitions/jaemin.d.ts.map +1 -0
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/strip.d.ts +3 -0
- package/dist/view-transitions/strip.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,108 +1,109 @@
|
|
|
1
|
-
var
|
|
2
|
-
var _ = (
|
|
3
|
-
var
|
|
4
|
-
import { animate as
|
|
5
|
-
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var _ = (e, t, n) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => _(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { animate as x } from "popmotion";
|
|
5
|
+
import { j as nt } from "./jaemin-BAi8PTrj.js";
|
|
6
|
+
class A {
|
|
6
7
|
constructor(t) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
v(this, "options");
|
|
9
|
+
v(this, "currentValue");
|
|
10
|
+
v(this, "velocity");
|
|
11
|
+
v(this, "isAnimating", !1);
|
|
12
|
+
v(this, "controls", null);
|
|
12
13
|
// For object animations
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
v(this, "animationMap", null);
|
|
15
|
+
v(this, "activeAnimations", /* @__PURE__ */ new Set());
|
|
16
|
+
v(this, "completedAnimations", /* @__PURE__ */ new Set());
|
|
17
|
+
v(this, "updatedProperties", /* @__PURE__ */ new Set());
|
|
18
|
+
v(this, "animate", (t = !1) => {
|
|
18
19
|
!this.isAnimating && this.options.onStart && this.options.onStart(), this.isAnimating = !0;
|
|
19
|
-
const
|
|
20
|
+
const n = t ? this.options.from : this.options.to;
|
|
20
21
|
if (typeof this.currentValue == "object" && this.currentValue !== null) {
|
|
21
|
-
this.animateObject(
|
|
22
|
+
this.animateObject(n);
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
24
|
-
let
|
|
25
|
-
const
|
|
25
|
+
let o = this.currentValue, s = performance.now();
|
|
26
|
+
const i = {
|
|
26
27
|
from: this.currentValue,
|
|
27
|
-
to:
|
|
28
|
+
to: n,
|
|
28
29
|
stiffness: this.options.spring.stiffness,
|
|
29
30
|
damping: this.options.spring.damping,
|
|
30
31
|
mass: 1
|
|
31
32
|
};
|
|
32
|
-
typeof this.velocity == "number" && (
|
|
33
|
-
...
|
|
34
|
-
onUpdate: (
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
if (typeof
|
|
38
|
-
const
|
|
39
|
-
this.velocity =
|
|
40
|
-
} else if (typeof
|
|
41
|
-
const
|
|
42
|
-
Object.keys(
|
|
43
|
-
const
|
|
44
|
-
if (typeof
|
|
45
|
-
const
|
|
46
|
-
|
|
33
|
+
typeof this.velocity == "number" && (i.velocity = this.velocity * 1e3), this.controls = x({
|
|
34
|
+
...i,
|
|
35
|
+
onUpdate: (u) => {
|
|
36
|
+
const d = performance.now(), a = (d - s) / 1e3;
|
|
37
|
+
if (a > 0) {
|
|
38
|
+
if (typeof u == "number" && typeof o == "number") {
|
|
39
|
+
const m = (u - o) / a;
|
|
40
|
+
this.velocity = m / 1e3;
|
|
41
|
+
} else if (typeof u == "object" && u !== null) {
|
|
42
|
+
const m = {};
|
|
43
|
+
Object.keys(u).forEach((l) => {
|
|
44
|
+
const r = u[l], f = o[l];
|
|
45
|
+
if (typeof r == "number" && typeof f == "number") {
|
|
46
|
+
const g = (r - f) / a;
|
|
47
|
+
m[l] = g / 1e3;
|
|
47
48
|
}
|
|
48
|
-
}), this.velocity =
|
|
49
|
+
}), this.velocity = m;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
o = u, s = d;
|
|
51
52
|
}
|
|
52
|
-
this.currentValue =
|
|
53
|
+
this.currentValue = u, this.options.onUpdate(u);
|
|
53
54
|
},
|
|
54
55
|
onComplete: () => {
|
|
55
|
-
this.currentValue =
|
|
56
|
-
this.velocity[
|
|
56
|
+
this.currentValue = n, this.isAnimating = !1, this.controls = null, typeof this.velocity == "object" && this.velocity !== null ? Object.keys(this.velocity).forEach((u) => {
|
|
57
|
+
this.velocity[u] = 0;
|
|
57
58
|
}) : this.velocity = 0, this.options.onComplete();
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
-
const
|
|
62
|
+
v(this, "animateObject", (t) => {
|
|
63
|
+
const n = this.currentValue, o = Object.keys(n);
|
|
63
64
|
this.animationMap = /* @__PURE__ */ new Map(), this.activeAnimations.clear(), this.completedAnimations.clear(), this.updatedProperties.clear();
|
|
64
|
-
const
|
|
65
|
-
let
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
(
|
|
70
|
-
) &&
|
|
65
|
+
const s = { ...n }, i = {};
|
|
66
|
+
let u = !1;
|
|
67
|
+
const d = () => {
|
|
68
|
+
const a = o.filter((l) => !this.completedAnimations.has(l));
|
|
69
|
+
if (a.every(
|
|
70
|
+
(l) => this.updatedProperties.has(l)
|
|
71
|
+
) && a.length > 0) {
|
|
71
72
|
if (typeof this.velocity == "object" && this.velocity) {
|
|
72
|
-
const
|
|
73
|
-
Object.keys(
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
76
|
-
typeof
|
|
73
|
+
const l = performance.now();
|
|
74
|
+
Object.keys(s).forEach((r) => {
|
|
75
|
+
if (i[r]) {
|
|
76
|
+
const f = (l - i[r]) / 1e3, g = this.currentValue[r], c = s[r];
|
|
77
|
+
typeof g == "number" && typeof c == "number" && f > 0 && (this.velocity[r] = (c - g) / f / 1e3);
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
+
i[r] = l;
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
this.currentValue = { ...
|
|
82
|
+
this.currentValue = { ...s }, this.options.onUpdate(this.currentValue), this.updatedProperties.clear(), !u && this.options.onStart && (u = !0, this.options.onStart());
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
|
-
|
|
85
|
-
this.activeAnimations.add(
|
|
86
|
-
const
|
|
87
|
-
from:
|
|
88
|
-
to: t[
|
|
85
|
+
o.forEach((a) => {
|
|
86
|
+
this.activeAnimations.add(a);
|
|
87
|
+
const m = {
|
|
88
|
+
from: n[a],
|
|
89
|
+
to: t[a],
|
|
89
90
|
stiffness: this.options.spring.stiffness,
|
|
90
91
|
damping: this.options.spring.damping,
|
|
91
92
|
mass: 1
|
|
92
93
|
};
|
|
93
|
-
typeof this.velocity == "object" && this.velocity &&
|
|
94
|
-
const
|
|
95
|
-
...
|
|
96
|
-
onUpdate: (
|
|
97
|
-
|
|
94
|
+
typeof this.velocity == "object" && this.velocity && a in this.velocity && (m.velocity = this.velocity[a] * 1e3);
|
|
95
|
+
const l = x({
|
|
96
|
+
...m,
|
|
97
|
+
onUpdate: (r) => {
|
|
98
|
+
s[a] = r, this.updatedProperties.add(a), d();
|
|
98
99
|
},
|
|
99
100
|
onComplete: () => {
|
|
100
|
-
this.completedAnimations.add(
|
|
101
|
-
this.velocity[
|
|
101
|
+
this.completedAnimations.add(a), this.updatedProperties.delete(a), this.completedAnimations.size === o.length && (this.currentValue = t, this.isAnimating = !1, this.animationMap = null, typeof this.velocity == "object" && this.velocity && Object.keys(this.velocity).forEach((r) => {
|
|
102
|
+
this.velocity[r] = 0;
|
|
102
103
|
}), this.options.onComplete());
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
|
-
this.animationMap.set(
|
|
106
|
+
this.animationMap.set(a, l);
|
|
106
107
|
});
|
|
107
108
|
});
|
|
108
109
|
if (this.options = {
|
|
@@ -115,10 +116,10 @@ class C {
|
|
|
115
116
|
}),
|
|
116
117
|
onStart: t.onStart
|
|
117
118
|
}, this.currentValue = this.options.from, typeof this.options.from == "object" && this.options.from !== null) {
|
|
118
|
-
const
|
|
119
|
-
Object.keys(this.options.from).forEach((
|
|
120
|
-
o
|
|
121
|
-
}), this.velocity =
|
|
119
|
+
const n = {};
|
|
120
|
+
Object.keys(this.options.from).forEach((o) => {
|
|
121
|
+
n[o] = 0;
|
|
122
|
+
}), this.velocity = n;
|
|
122
123
|
} else
|
|
123
124
|
this.velocity = 0;
|
|
124
125
|
}
|
|
@@ -132,8 +133,8 @@ class C {
|
|
|
132
133
|
reverse() {
|
|
133
134
|
const t = this.options.from;
|
|
134
135
|
if (this.options.from = this.options.to, this.options.to = t, this.isAnimating) {
|
|
135
|
-
const
|
|
136
|
-
this.stop(), this.animate(!
|
|
136
|
+
const n = this.shouldReverse();
|
|
137
|
+
this.stop(), this.animate(!n);
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
shouldReverse() {
|
|
@@ -172,37 +173,37 @@ class C {
|
|
|
172
173
|
// Configuration
|
|
173
174
|
updateOptions(t) {
|
|
174
175
|
if (this.options = { ...this.options, ...t }, this.isAnimating && this.controls) {
|
|
175
|
-
const
|
|
176
|
-
this.stop(), this.animate(!
|
|
176
|
+
const n = this.shouldReverse();
|
|
177
|
+
this.stop(), this.animate(!n);
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
180
|
// Static factory method
|
|
180
|
-
static fromState(t,
|
|
181
|
-
const
|
|
182
|
-
return
|
|
181
|
+
static fromState(t, n) {
|
|
182
|
+
const o = new A(n);
|
|
183
|
+
return o.setValue(t.position), o.setVelocity(t.velocity), o;
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
|
-
const
|
|
186
|
+
const j = Symbol.for("TRANSITION_STRATEGY"), D = (e) => ({
|
|
186
187
|
runIn: async (t) => {
|
|
187
|
-
const { currentAnimation:
|
|
188
|
-
if (
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
191
|
-
const
|
|
188
|
+
const { currentAnimation: n } = e;
|
|
189
|
+
if (n && n.direction === "out") {
|
|
190
|
+
const u = n.animator.getCurrentState();
|
|
191
|
+
if (n.animator.stop(), t.out) {
|
|
192
|
+
const d = await t.out, { from: a = 1, to: m = 0 } = d;
|
|
192
193
|
return {
|
|
193
|
-
config:
|
|
194
|
-
state:
|
|
195
|
-
from:
|
|
194
|
+
config: d,
|
|
195
|
+
state: u,
|
|
196
|
+
from: a,
|
|
196
197
|
// OUT animation's from
|
|
197
|
-
to:
|
|
198
|
+
to: m,
|
|
198
199
|
// OUT animation's to
|
|
199
200
|
direction: "backward"
|
|
200
201
|
// Will actually go 0→1
|
|
201
202
|
};
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
|
-
const
|
|
205
|
-
if (!
|
|
205
|
+
const o = await t.in;
|
|
206
|
+
if (!o)
|
|
206
207
|
return {
|
|
207
208
|
state: {
|
|
208
209
|
position: 0,
|
|
@@ -212,41 +213,41 @@ const x = Symbol.for("TRANSITION_STRATEGY"), I = (n) => ({
|
|
|
212
213
|
to: 1,
|
|
213
214
|
direction: "forward"
|
|
214
215
|
};
|
|
215
|
-
const { from:
|
|
216
|
+
const { from: s = 0, to: i = 1 } = o;
|
|
216
217
|
return {
|
|
217
|
-
config:
|
|
218
|
+
config: o,
|
|
218
219
|
state: {
|
|
219
|
-
position:
|
|
220
|
+
position: s,
|
|
220
221
|
velocity: 0
|
|
221
222
|
},
|
|
222
|
-
from:
|
|
223
|
-
to:
|
|
223
|
+
from: s,
|
|
224
|
+
to: i,
|
|
224
225
|
direction: "forward"
|
|
225
226
|
};
|
|
226
227
|
},
|
|
227
228
|
runOut: async (t) => {
|
|
228
|
-
const { currentAnimation:
|
|
229
|
-
if (
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
const
|
|
229
|
+
const { currentAnimation: n } = e;
|
|
230
|
+
if (n && n.direction === "in") {
|
|
231
|
+
const u = n.animator.getCurrentState();
|
|
232
|
+
if (n.animator.stop(), t.in) {
|
|
233
|
+
const d = await t.in, { from: a = 0, to: m = 1 } = d;
|
|
233
234
|
return {
|
|
234
|
-
config:
|
|
235
|
+
config: d,
|
|
235
236
|
state: {
|
|
236
|
-
position:
|
|
237
|
-
velocity:
|
|
237
|
+
position: u.position,
|
|
238
|
+
velocity: u.velocity
|
|
238
239
|
},
|
|
239
|
-
from:
|
|
240
|
+
from: a,
|
|
240
241
|
// IN animation's from
|
|
241
|
-
to:
|
|
242
|
+
to: m,
|
|
242
243
|
// IN animation's to
|
|
243
244
|
direction: "backward"
|
|
244
245
|
// Will actually go 1→0
|
|
245
246
|
};
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
249
|
+
const o = await t.out;
|
|
250
|
+
if (!o)
|
|
250
251
|
return {
|
|
251
252
|
state: {
|
|
252
253
|
position: 1,
|
|
@@ -256,21 +257,21 @@ const x = Symbol.for("TRANSITION_STRATEGY"), I = (n) => ({
|
|
|
256
257
|
to: 0,
|
|
257
258
|
direction: "forward"
|
|
258
259
|
};
|
|
259
|
-
const { from:
|
|
260
|
+
const { from: s = 1, to: i = 0 } = o;
|
|
260
261
|
return {
|
|
261
|
-
config:
|
|
262
|
+
config: o,
|
|
262
263
|
state: {
|
|
263
|
-
position:
|
|
264
|
+
position: s,
|
|
264
265
|
velocity: 0
|
|
265
266
|
},
|
|
266
|
-
from:
|
|
267
|
-
to:
|
|
267
|
+
from: s,
|
|
268
|
+
to: i,
|
|
268
269
|
direction: "forward"
|
|
269
270
|
};
|
|
270
271
|
}
|
|
271
|
-
}),
|
|
272
|
-
runIn: async (
|
|
273
|
-
const t = await
|
|
272
|
+
}), z = () => ({
|
|
273
|
+
runIn: async (e) => {
|
|
274
|
+
const t = await e.in;
|
|
274
275
|
if (!t)
|
|
275
276
|
return {
|
|
276
277
|
state: {
|
|
@@ -281,20 +282,20 @@ const x = Symbol.for("TRANSITION_STRATEGY"), I = (n) => ({
|
|
|
281
282
|
to: 1,
|
|
282
283
|
direction: "forward"
|
|
283
284
|
};
|
|
284
|
-
const { from:
|
|
285
|
+
const { from: n = 0, to: o = 1 } = t;
|
|
285
286
|
return {
|
|
286
287
|
config: t,
|
|
287
288
|
state: {
|
|
288
|
-
position:
|
|
289
|
+
position: n,
|
|
289
290
|
velocity: 0
|
|
290
291
|
},
|
|
291
|
-
from:
|
|
292
|
-
to:
|
|
292
|
+
from: n,
|
|
293
|
+
to: o,
|
|
293
294
|
direction: "forward"
|
|
294
295
|
};
|
|
295
296
|
},
|
|
296
|
-
runOut: async (
|
|
297
|
-
const t = await
|
|
297
|
+
runOut: async (e) => {
|
|
298
|
+
const t = await e.out;
|
|
298
299
|
if (!t)
|
|
299
300
|
return {
|
|
300
301
|
state: {
|
|
@@ -305,282 +306,309 @@ const x = Symbol.for("TRANSITION_STRATEGY"), I = (n) => ({
|
|
|
305
306
|
to: 0,
|
|
306
307
|
direction: "forward"
|
|
307
308
|
};
|
|
308
|
-
const { from:
|
|
309
|
+
const { from: n = 1, to: o = 0 } = t;
|
|
309
310
|
return {
|
|
310
311
|
config: t,
|
|
311
312
|
state: {
|
|
312
|
-
position:
|
|
313
|
+
position: n,
|
|
313
314
|
velocity: 0
|
|
314
315
|
},
|
|
315
|
-
from:
|
|
316
|
-
to:
|
|
316
|
+
from: n,
|
|
317
|
+
to: o,
|
|
317
318
|
direction: "forward"
|
|
318
319
|
};
|
|
319
320
|
}
|
|
320
321
|
});
|
|
321
|
-
function
|
|
322
|
-
var
|
|
323
|
-
let
|
|
324
|
-
const
|
|
322
|
+
function N(e, t) {
|
|
323
|
+
var l;
|
|
324
|
+
let n = null, o = null, s = null, i = null;
|
|
325
|
+
const u = {
|
|
325
326
|
get currentAnimation() {
|
|
326
|
-
return
|
|
327
|
+
return n;
|
|
327
328
|
}
|
|
328
|
-
},
|
|
329
|
-
var
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
in:
|
|
333
|
-
out:
|
|
334
|
-
},
|
|
335
|
-
if (!
|
|
329
|
+
}, d = ((l = t == null ? void 0 : t.strategy) == null ? void 0 : l.call(t, u)) || D(u), a = async (r) => {
|
|
330
|
+
var p, h;
|
|
331
|
+
o && (o.remove(), o = null);
|
|
332
|
+
const f = e(), g = {
|
|
333
|
+
in: f.in && Promise.resolve(f.in(r)),
|
|
334
|
+
out: f.out && Promise.resolve(f.out(r))
|
|
335
|
+
}, c = await d.runIn(g);
|
|
336
|
+
if (!c.config)
|
|
336
337
|
return;
|
|
337
|
-
(
|
|
338
|
-
const
|
|
339
|
-
from:
|
|
340
|
-
to:
|
|
341
|
-
spring:
|
|
342
|
-
onStart:
|
|
343
|
-
onUpdate:
|
|
338
|
+
(h = (p = c.config).prepare) == null || h.call(p, r), c.config.wait && await c.config.wait();
|
|
339
|
+
const S = A.fromState(c.state, {
|
|
340
|
+
from: c.from,
|
|
341
|
+
to: c.to,
|
|
342
|
+
spring: c.config.spring,
|
|
343
|
+
onStart: c.config.onStart,
|
|
344
|
+
onUpdate: c.config.tick,
|
|
344
345
|
onComplete: () => {
|
|
345
|
-
var
|
|
346
|
-
|
|
346
|
+
var y, w;
|
|
347
|
+
n = null, (w = (y = c.config) == null ? void 0 : y.onEnd) == null || w.call(y);
|
|
347
348
|
}
|
|
348
349
|
});
|
|
349
|
-
|
|
350
|
-
},
|
|
351
|
-
var
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
in:
|
|
355
|
-
out:
|
|
356
|
-
},
|
|
357
|
-
if (!
|
|
350
|
+
n = { animator: S, direction: "in" }, c.direction === "forward" ? S.forward() : S.backward();
|
|
351
|
+
}, m = async (r) => {
|
|
352
|
+
var h, y;
|
|
353
|
+
o = r;
|
|
354
|
+
const f = e(), g = {
|
|
355
|
+
in: f.in && Promise.resolve(f.in(r)),
|
|
356
|
+
out: f.out && Promise.resolve(f.out(r))
|
|
357
|
+
}, c = await d.runOut(g);
|
|
358
|
+
if (!c.config)
|
|
358
359
|
return;
|
|
359
|
-
(
|
|
360
|
-
const
|
|
361
|
-
from:
|
|
362
|
-
to:
|
|
363
|
-
spring:
|
|
364
|
-
onStart:
|
|
365
|
-
onUpdate:
|
|
360
|
+
(y = (h = c.config).prepare) == null || y.call(h, r), p(), c.config.wait && await c.config.wait();
|
|
361
|
+
const S = A.fromState(c.state, {
|
|
362
|
+
from: c.from,
|
|
363
|
+
to: c.to,
|
|
364
|
+
spring: c.config.spring,
|
|
365
|
+
onStart: c.config.onStart,
|
|
366
|
+
onUpdate: c.config.tick,
|
|
366
367
|
onComplete: () => {
|
|
367
|
-
var
|
|
368
|
-
(
|
|
368
|
+
var w, b, C;
|
|
369
|
+
(b = (w = c.config) == null ? void 0 : w.onEnd) == null || b.call(w), o && (o.remove(), o = null), n = null, (C = t == null ? void 0 : t.onCleanupEnd) == null || C.call(t);
|
|
369
370
|
}
|
|
370
371
|
});
|
|
371
|
-
|
|
372
|
-
function
|
|
373
|
-
!
|
|
372
|
+
n = { animator: S, direction: "out" }, c.direction === "forward" ? S.forward() : S.backward();
|
|
373
|
+
function p() {
|
|
374
|
+
!s || !o || (i && s.contains(i) ? s.insertBefore(o, i) : s.appendChild(o));
|
|
374
375
|
}
|
|
375
376
|
};
|
|
376
|
-
return (
|
|
377
|
-
if (
|
|
378
|
-
return
|
|
379
|
-
const
|
|
380
|
-
|
|
377
|
+
return (r) => {
|
|
378
|
+
if (r)
|
|
379
|
+
return s = r.parentElement, i = r.nextElementSibling, a(r), () => {
|
|
380
|
+
const f = r.cloneNode(!0);
|
|
381
|
+
m(f);
|
|
381
382
|
};
|
|
382
383
|
};
|
|
383
384
|
}
|
|
384
|
-
const
|
|
385
|
-
if (!
|
|
386
|
-
const t =
|
|
387
|
-
`).map((
|
|
388
|
-
for (let
|
|
389
|
-
const
|
|
390
|
-
if (!
|
|
385
|
+
const L = 3, $ = (e) => {
|
|
386
|
+
if (!e) return null;
|
|
387
|
+
const t = e.split(`
|
|
388
|
+
`).map((n) => n.trim());
|
|
389
|
+
for (let n = L; n < Math.min(t.length, 6); n++) {
|
|
390
|
+
const o = t[n], s = o == null ? void 0 : o.match(/\(?([^):]+):(\d+):(\d+)\)?$/);
|
|
391
|
+
if (!s)
|
|
391
392
|
continue;
|
|
392
|
-
const
|
|
393
|
-
return { file:
|
|
393
|
+
const i = s[1] ?? "", u = s[2] ?? "0", d = s[3] ?? "0";
|
|
394
|
+
return { file: i.split(/[\\/]/).pop() || i, line: u, column: d };
|
|
394
395
|
}
|
|
395
396
|
return null;
|
|
396
|
-
},
|
|
397
|
-
function
|
|
398
|
-
|
|
399
|
-
let
|
|
400
|
-
return
|
|
397
|
+
}, V = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map();
|
|
398
|
+
function k(e, t, n) {
|
|
399
|
+
V.set(e, t);
|
|
400
|
+
let o = T.get(e);
|
|
401
|
+
return o || (o = N(
|
|
401
402
|
() => {
|
|
402
|
-
const
|
|
403
|
-
return
|
|
403
|
+
const s = V.get(e);
|
|
404
|
+
return s || (console.warn(`Transition "${String(e)}" not found`), {});
|
|
404
405
|
},
|
|
405
406
|
{
|
|
406
|
-
strategy:
|
|
407
|
-
onCleanupEnd: () => M(
|
|
407
|
+
strategy: n,
|
|
408
|
+
onCleanupEnd: () => M(e)
|
|
408
409
|
}
|
|
409
|
-
),
|
|
410
|
+
), T.set(e, o), o);
|
|
410
411
|
}
|
|
411
|
-
function M(
|
|
412
|
-
|
|
412
|
+
function M(e) {
|
|
413
|
+
V.delete(e), T.delete(e);
|
|
413
414
|
}
|
|
414
|
-
function
|
|
415
|
-
const
|
|
416
|
-
return
|
|
415
|
+
function F() {
|
|
416
|
+
const e = $(new Error().stack);
|
|
417
|
+
return e ? `auto_${e.file}_${e.line}_${e.column}` : Symbol(`ssgoi_auto_${Date.now()}`);
|
|
417
418
|
}
|
|
418
|
-
const
|
|
419
|
+
const O = globalThis.FinalizationRegistry, R = O ? new O((e) => {
|
|
419
420
|
try {
|
|
420
|
-
M(
|
|
421
|
+
M(e);
|
|
421
422
|
} catch {
|
|
422
423
|
}
|
|
423
424
|
}) : void 0;
|
|
424
|
-
function
|
|
425
|
-
const t =
|
|
426
|
-
if (
|
|
425
|
+
function J(e) {
|
|
426
|
+
const t = e.key ?? F();
|
|
427
|
+
if (e.ref && R)
|
|
427
428
|
try {
|
|
428
|
-
|
|
429
|
+
R.register(e.ref, t);
|
|
429
430
|
} catch {
|
|
430
431
|
}
|
|
431
|
-
return
|
|
432
|
+
return k(
|
|
432
433
|
t,
|
|
433
434
|
{
|
|
434
|
-
in:
|
|
435
|
-
out:
|
|
435
|
+
in: e.in,
|
|
436
|
+
out: e.out
|
|
436
437
|
},
|
|
437
|
-
|
|
438
|
+
e[j]
|
|
438
439
|
);
|
|
439
440
|
}
|
|
440
|
-
const
|
|
441
|
-
let t =
|
|
441
|
+
const K = (e) => {
|
|
442
|
+
let t = e.parentElement;
|
|
442
443
|
for (; t && t !== document.body; ) {
|
|
443
|
-
const
|
|
444
|
-
if (
|
|
444
|
+
const n = window.getComputedStyle(t), o = n.overflow + n.overflowY + n.overflowX;
|
|
445
|
+
if (o.includes("auto") || o.includes("scroll") || t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth)
|
|
445
446
|
return t;
|
|
446
447
|
t = t.parentElement;
|
|
447
448
|
}
|
|
448
449
|
return document.documentElement;
|
|
449
|
-
},
|
|
450
|
-
let t =
|
|
450
|
+
}, W = (e) => {
|
|
451
|
+
let t = e.parentElement;
|
|
451
452
|
for (; t && t !== document.body; ) {
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
453
|
+
const n = window.getComputedStyle(t).position;
|
|
454
|
+
if (n === "relative" || n === "absolute" || n === "fixed" || n === "sticky")
|
|
454
455
|
return t;
|
|
455
456
|
t = t.parentElement;
|
|
456
457
|
}
|
|
457
458
|
return document.body;
|
|
458
459
|
};
|
|
459
|
-
function
|
|
460
|
-
const t =
|
|
461
|
-
from:
|
|
462
|
-
to:
|
|
463
|
-
transition:
|
|
460
|
+
function X(e) {
|
|
461
|
+
const t = e.filter((n) => n.symmetric).map((n) => ({
|
|
462
|
+
from: n.to,
|
|
463
|
+
to: n.from,
|
|
464
|
+
transition: n.transition
|
|
464
465
|
}));
|
|
465
|
-
return [...
|
|
466
|
+
return [...e, ...t];
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
-
let n =
|
|
469
|
-
const
|
|
468
|
+
function Y(e) {
|
|
469
|
+
let t = !1, n = !1;
|
|
470
|
+
const o = (a) => {
|
|
471
|
+
if (!e) return;
|
|
472
|
+
const m = a.touches[0];
|
|
473
|
+
m && (n = m.clientX < 50);
|
|
474
|
+
}, s = () => {
|
|
475
|
+
e && (n && (t = !0, setTimeout(() => {
|
|
476
|
+
t = !1;
|
|
477
|
+
}, 500)), n = !1);
|
|
478
|
+
};
|
|
479
|
+
return {
|
|
480
|
+
initialize: () => {
|
|
481
|
+
typeof window > "u" || e && (window.addEventListener("touchstart", o, { passive: !0 }), window.addEventListener("touchend", s, { passive: !0 }));
|
|
482
|
+
},
|
|
483
|
+
cleanup: () => {
|
|
484
|
+
typeof window > "u" || (window.removeEventListener("touchstart", o), window.removeEventListener("touchend", s));
|
|
485
|
+
},
|
|
486
|
+
isSwipePending: () => t
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function G() {
|
|
490
|
+
let e = null, t = null;
|
|
491
|
+
const n = /* @__PURE__ */ new Map();
|
|
470
492
|
let o = null;
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
x:
|
|
474
|
-
y:
|
|
493
|
+
const s = () => {
|
|
494
|
+
e && o && n.set(o, {
|
|
495
|
+
x: e.scrollLeft,
|
|
496
|
+
y: e.scrollTop
|
|
475
497
|
});
|
|
476
498
|
};
|
|
477
499
|
return {
|
|
478
|
-
|
|
479
|
-
|
|
500
|
+
initializeContext: (l, r) => {
|
|
501
|
+
t = l, e || (e = K(l), (e === document.documentElement ? window : e).addEventListener("scroll", s, {
|
|
480
502
|
passive: !0
|
|
481
|
-
})), o =
|
|
503
|
+
})), o = r;
|
|
482
504
|
},
|
|
483
|
-
calculateScrollOffset: (
|
|
484
|
-
const f =
|
|
505
|
+
calculateScrollOffset: (l, r) => {
|
|
506
|
+
const f = l && n.has(l) ? n.get(l) : { x: 0, y: 0 }, g = r && n.has(r) ? n.get(r) : { x: 0, y: 0 };
|
|
485
507
|
return {
|
|
486
|
-
x: -
|
|
487
|
-
y: -
|
|
508
|
+
x: -g.x + f.x,
|
|
509
|
+
y: -g.y + f.y
|
|
488
510
|
};
|
|
489
511
|
},
|
|
490
|
-
getScrollContainer: () =>
|
|
491
|
-
|
|
512
|
+
getScrollContainer: () => e,
|
|
513
|
+
getPositionedParentElement: () => t ? W(t) : document.body,
|
|
514
|
+
getScrollPosition: (l) => l && n.has(l) ? n.get(l) : { x: 0, y: 0 }
|
|
492
515
|
};
|
|
493
516
|
}
|
|
494
|
-
function
|
|
517
|
+
function Q(e) {
|
|
495
518
|
const {
|
|
496
519
|
transitions: t = [],
|
|
497
|
-
defaultTransition:
|
|
498
|
-
middleware:
|
|
520
|
+
defaultTransition: n,
|
|
521
|
+
middleware: o = (p, h) => ({ from: p, to: h }),
|
|
499
522
|
// Identity function as default
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
523
|
+
skipOnIosSwipe: s = !0
|
|
524
|
+
// Default to true - skip animations on iOS swipe
|
|
525
|
+
} = e;
|
|
526
|
+
let i = null;
|
|
527
|
+
const u = X(t), {
|
|
528
|
+
initializeContext: d,
|
|
529
|
+
calculateScrollOffset: a,
|
|
530
|
+
getScrollContainer: m,
|
|
531
|
+
getPositionedParentElement: l,
|
|
532
|
+
getScrollPosition: r
|
|
533
|
+
} = G(), f = Y(s);
|
|
534
|
+
f.initialize();
|
|
535
|
+
function g() {
|
|
536
|
+
if (i != null && i.from && (i != null && i.to)) {
|
|
537
|
+
const { from: p, to: h } = o(
|
|
538
|
+
i.from,
|
|
539
|
+
i.to
|
|
540
|
+
), w = H(
|
|
541
|
+
p,
|
|
515
542
|
h,
|
|
516
|
-
|
|
517
|
-
) ||
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
),
|
|
521
|
-
scrollOffset:
|
|
522
|
-
scroll:
|
|
543
|
+
u
|
|
544
|
+
) || n, b = a(
|
|
545
|
+
i.from,
|
|
546
|
+
i.to
|
|
547
|
+
), C = {
|
|
548
|
+
scrollOffset: b,
|
|
549
|
+
scroll: r(i.from),
|
|
523
550
|
get scrollingElement() {
|
|
524
|
-
return
|
|
551
|
+
return m() || document.documentElement;
|
|
525
552
|
},
|
|
526
553
|
get positionedParent() {
|
|
527
|
-
|
|
528
|
-
return d ? j(d) : document.body;
|
|
554
|
+
return l();
|
|
529
555
|
}
|
|
530
|
-
},
|
|
531
|
-
scrollOffset:
|
|
532
|
-
scroll
|
|
556
|
+
}, U = {
|
|
557
|
+
scrollOffset: b,
|
|
558
|
+
get scroll() {
|
|
559
|
+
return i ? r(i.to) : { x: 0, y: 0 };
|
|
560
|
+
},
|
|
533
561
|
get scrollingElement() {
|
|
534
|
-
return
|
|
562
|
+
return m() || document.documentElement;
|
|
535
563
|
},
|
|
536
564
|
get positionedParent() {
|
|
537
|
-
|
|
538
|
-
return d ? j(d) : document.body;
|
|
565
|
+
return l();
|
|
539
566
|
}
|
|
540
567
|
};
|
|
541
|
-
|
|
542
|
-
(
|
|
543
|
-
),
|
|
544
|
-
(
|
|
545
|
-
)),
|
|
568
|
+
w && (w.out && i.outResolve && i.outResolve(
|
|
569
|
+
(P) => w.out(P, C)
|
|
570
|
+
), w.in && i.inResolve && i.inResolve(
|
|
571
|
+
(P) => w.in(P, U)
|
|
572
|
+
)), i = null;
|
|
546
573
|
}
|
|
547
574
|
}
|
|
548
|
-
const c = async (
|
|
549
|
-
|
|
550
|
-
})) : (
|
|
551
|
-
|
|
575
|
+
const c = async (p, h) => f.isSwipePending() ? () => ({}) : h === "in" && (!i || !i.from) ? () => ({}) : (i || (i = {}), h === "out" ? (i.from = p, new Promise((y) => {
|
|
576
|
+
i.outResolve = y, g();
|
|
577
|
+
})) : (i.to = p, new Promise((y) => {
|
|
578
|
+
i.inResolve = y, g();
|
|
552
579
|
})));
|
|
553
|
-
return (
|
|
554
|
-
key:
|
|
555
|
-
in: async (h) => (
|
|
556
|
-
out: async (h) => (await c(
|
|
580
|
+
return (p) => ({
|
|
581
|
+
key: p,
|
|
582
|
+
in: async (h) => (d(h, p), (await c(p, "in"))(h)),
|
|
583
|
+
out: async (h) => (await c(p, "out"))(h),
|
|
557
584
|
// Add page transition strategy for page-level transitions
|
|
558
|
-
[
|
|
585
|
+
[j]: z
|
|
559
586
|
});
|
|
560
587
|
}
|
|
561
|
-
function
|
|
562
|
-
for (const
|
|
563
|
-
if (
|
|
564
|
-
return
|
|
565
|
-
for (const
|
|
566
|
-
if ((
|
|
567
|
-
return
|
|
588
|
+
function H(e, t, n) {
|
|
589
|
+
for (const o of n)
|
|
590
|
+
if (E(e, o.from) && E(t, o.to))
|
|
591
|
+
return o.transition;
|
|
592
|
+
for (const o of n)
|
|
593
|
+
if ((o.from === "*" || E(e, o.from)) && (o.to === "*" || E(t, o.to)))
|
|
594
|
+
return o.transition;
|
|
568
595
|
return null;
|
|
569
596
|
}
|
|
570
|
-
function
|
|
597
|
+
function E(e, t) {
|
|
571
598
|
if (t === "*")
|
|
572
599
|
return !0;
|
|
573
600
|
if (t.endsWith("/*")) {
|
|
574
|
-
const
|
|
575
|
-
return
|
|
601
|
+
const n = t.slice(0, -2);
|
|
602
|
+
return e === n || e.startsWith(n + "/");
|
|
576
603
|
}
|
|
577
|
-
return
|
|
604
|
+
return e === t;
|
|
578
605
|
}
|
|
579
606
|
export {
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
607
|
+
j as TRANSITION_STRATEGY,
|
|
608
|
+
D as createDefaultStrategy,
|
|
609
|
+
z as createPageTransitionStrategy,
|
|
610
|
+
Q as createSggoiTransitionContext,
|
|
611
|
+
F as generateAutoKey,
|
|
612
|
+
nt as jaeminInternal,
|
|
613
|
+
J as transition
|
|
586
614
|
};
|