@ssgoi/core 7.2.0 → 7.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/animation.d.ts +21 -0
- package/dist/animation/animation.d.ts.map +1 -1
- package/dist/animation/host-animation.d.ts +28 -19
- package/dist/animation/host-animation.d.ts.map +1 -1
- package/dist/animation/multi-animation.d.ts +13 -2
- package/dist/animation/multi-animation.d.ts.map +1 -1
- package/dist/animation/web-animation.d.ts +76 -4
- package/dist/animation/web-animation.d.ts.map +1 -1
- package/dist/animation/web-presentation.d.ts +25 -0
- package/dist/animation/web-presentation.d.ts.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1206 -1184
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +924 -631
- package/dist/{page-motion-MEazegOU.js → page-motion-CoPTk-Gd.js} +1 -1
- package/dist/{page-motion-DF3fFkOw.cjs → page-motion-Dhj3UfzO.cjs} +1 -1
- package/dist/provider-BLf6XeXT.js +291 -0
- package/dist/provider-JDtJ5Jzf.cjs +1 -0
- package/dist/retain-opacity-C5ajTKSI.cjs +1 -0
- package/dist/retain-opacity-ChyA_fg_.js +1142 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/motion-matching.d.ts +31 -0
- package/dist/runtime/motion-matching.d.ts.map +1 -0
- package/dist/runtime/timeline.d.ts +6 -2
- package/dist/runtime/timeline.d.ts.map +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +29 -25
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/transitions/blind/transition.d.ts.map +1 -1
- package/dist/transitions/crossfade.d.ts +1 -6
- package/dist/transitions/crossfade.d.ts.map +1 -1
- package/dist/transitions/film/transition.d.ts.map +1 -1
- package/dist/transitions/hero/in-place.d.ts +5 -2
- package/dist/transitions/hero/in-place.d.ts.map +1 -1
- package/dist/transitions/hero/provider/chrome/fade.d.ts.map +1 -1
- package/dist/transitions/hero/provider/chrome/static.d.ts.map +1 -1
- package/dist/transitions/hero/transition.d.ts.map +1 -1
- package/dist/transitions/hero/types.d.ts +2 -1
- package/dist/transitions/hero/types.d.ts.map +1 -1
- package/dist/transitions/shared-visibility.d.ts +2 -0
- package/dist/transitions/shared-visibility.d.ts.map +1 -0
- package/dist/transitions/sheet/transition.d.ts.map +1 -1
- package/dist/transitions/zoom/crossfade.d.ts.map +1 -1
- package/dist/transitions/zoom/provider/blur.d.ts.map +1 -1
- package/dist/transitions/zoom/transition.d.ts.map +1 -1
- package/dist/transitions/zoom/types.d.ts +2 -1
- package/dist/transitions/zoom/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/retain-opacity.d.ts +7 -0
- package/dist/utils/retain-opacity.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/multi-animation-Du9W3ZS_.js +0 -503
- package/dist/multi-animation-hDUcfD7W.cjs +0 -1
- package/dist/provider-Cea0Pfm1.js +0 -232
- package/dist/provider-D9Q2URox.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (t, e, n) =>
|
|
4
|
-
import { d as k, w as
|
|
5
|
-
import { W as
|
|
6
|
-
import { A as
|
|
7
|
-
import { P as
|
|
8
|
-
import { F as
|
|
9
|
-
class
|
|
1
|
+
var ke = Object.defineProperty;
|
|
2
|
+
var De = (t, e, n) => e in t ? ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var _ = (t, e, n) => De(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { d as k, w as D } from "./index-B_K3Vnj-.js";
|
|
5
|
+
import { W as w, M as I, r as ot } from "./retain-opacity-ChyA_fg_.js";
|
|
6
|
+
import { A as ur } from "./retain-opacity-ChyA_fg_.js";
|
|
7
|
+
import { P as Fe, I as x, S as vt, b as Me, d as Pt, a as Te, D as Ye } from "./provider-BLf6XeXT.js";
|
|
8
|
+
import { F as Le, a as He, p as it, S as ze } from "./page-motion-CoPTk-Gd.js";
|
|
9
|
+
class Ne {
|
|
10
10
|
constructor(e) {
|
|
11
11
|
_(this, "durationSec");
|
|
12
12
|
this.durationSec = Math.max(1 / 60, e.durationSec);
|
|
13
13
|
}
|
|
14
14
|
step(e, n, o) {
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
return (
|
|
15
|
+
const i = n - e.position;
|
|
16
|
+
if (i === 0) return e;
|
|
17
|
+
const r = Math.sign(i), c = Math.abs(i) / this.durationSec, s = r * c * o, l = e.position + s;
|
|
18
|
+
return (r > 0 ? l >= n : l <= n) ? { position: n, velocity: 0 } : { position: l, velocity: r * c };
|
|
19
19
|
}
|
|
20
20
|
isSettled(e, n) {
|
|
21
|
-
return Math.abs(e.position - n) <
|
|
21
|
+
return Math.abs(e.position - n) < Fe;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
function n(
|
|
24
|
+
function Ft(t, e) {
|
|
25
|
+
function n(r) {
|
|
26
26
|
let c = 0, s = 0;
|
|
27
|
-
const l =
|
|
28
|
-
let d =
|
|
27
|
+
const l = r.offsetWidth, a = r.offsetHeight;
|
|
28
|
+
let d = r;
|
|
29
29
|
for (; d; )
|
|
30
30
|
c += d.offsetTop, s += d.offsetLeft, d = d.offsetParent;
|
|
31
31
|
return c -= window.scrollY, s -= window.scrollX, { top: c, left: s, width: l, height: a };
|
|
32
32
|
}
|
|
33
|
-
const o = n(t),
|
|
33
|
+
const o = n(t), i = n(e);
|
|
34
34
|
return new DOMRect(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
i.left - o.left,
|
|
36
|
+
i.top - o.top,
|
|
37
|
+
i.width,
|
|
38
|
+
i.height
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(),
|
|
41
|
+
function z(t, e) {
|
|
42
|
+
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), i = (s, l) => l > 0 && Math.abs(s - l) > 0.5 ? s / l : 1, r = i(n.width, t.offsetWidth), c = i(n.height, t.offsetHeight);
|
|
43
43
|
return new DOMRect(
|
|
44
|
-
(o.left - n.left) /
|
|
44
|
+
(o.left - n.left) / r,
|
|
45
45
|
(o.top - n.top) / c,
|
|
46
|
-
o.width /
|
|
46
|
+
o.width / r,
|
|
47
47
|
o.height / c
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
const { scrollingElement: n, positionedParent: o } = t,
|
|
50
|
+
function V(t, e) {
|
|
51
|
+
const { scrollingElement: n, positionedParent: o } = t, i = n !== o && n.contains(o) ? Ft(n, o).top : 0;
|
|
52
52
|
return {
|
|
53
53
|
top: t[e].scroll.y,
|
|
54
54
|
left: 0,
|
|
55
55
|
width: n.clientWidth,
|
|
56
|
-
height: n.clientHeight -
|
|
56
|
+
height: n.clientHeight - i
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const { scrollingElement: n, positionedParent: o } = t,
|
|
59
|
+
function ue(t, e) {
|
|
60
|
+
const { scrollingElement: n, positionedParent: o } = t, i = n !== o && n.contains(o) ? Ft(n, o).top : 0;
|
|
61
61
|
return {
|
|
62
|
-
top: t[e].scroll.y -
|
|
62
|
+
top: t[e].scroll.y - i,
|
|
63
63
|
height: n.clientHeight
|
|
64
64
|
};
|
|
65
65
|
}
|
|
@@ -70,7 +70,7 @@ const Ht = 8, zt = {
|
|
|
70
70
|
doubleSpring: 1.2
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
function
|
|
73
|
+
function We({
|
|
74
74
|
direction: t
|
|
75
75
|
}) {
|
|
76
76
|
const e = t === "forward" ? Ht : -Ht;
|
|
@@ -95,22 +95,22 @@ function ze({
|
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Ve() {
|
|
99
99
|
return {
|
|
100
100
|
outPhysics: zt,
|
|
101
101
|
inPhysics: zt,
|
|
102
102
|
// Both sides run together — the cross-fade is the whole point of the
|
|
103
103
|
// snappy feel. (fluid's sibling uses staggered fade-through.)
|
|
104
104
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
105
|
-
build:
|
|
105
|
+
build: We
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
const Nt = 30,
|
|
108
|
+
const Nt = 30, Xe = {
|
|
109
109
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
110
|
-
},
|
|
110
|
+
}, Be = {
|
|
111
111
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
112
112
|
};
|
|
113
|
-
function
|
|
113
|
+
function Ue({
|
|
114
114
|
direction: t
|
|
115
115
|
}) {
|
|
116
116
|
const e = t === "forward" ? 1 : -1, n = -Nt * e, o = Nt * e;
|
|
@@ -118,9 +118,9 @@ function Xe({
|
|
|
118
118
|
out: {
|
|
119
119
|
willChange: "transform, opacity",
|
|
120
120
|
startStyle: {},
|
|
121
|
-
animate: (
|
|
122
|
-
transform: `translate3d(${n *
|
|
123
|
-
opacity: `${1 -
|
|
121
|
+
animate: (i) => ({
|
|
122
|
+
transform: `translate3d(${n * i}px, 0, 0)`,
|
|
123
|
+
opacity: `${1 - i}`
|
|
124
124
|
})
|
|
125
125
|
},
|
|
126
126
|
in: {
|
|
@@ -129,33 +129,33 @@ function Xe({
|
|
|
129
129
|
transform: `translate3d(${o}px, 0, 0)`,
|
|
130
130
|
opacity: "0"
|
|
131
131
|
},
|
|
132
|
-
animate: (
|
|
133
|
-
transform: `translate3d(${o * (1 -
|
|
134
|
-
opacity: `${
|
|
132
|
+
animate: (i) => ({
|
|
133
|
+
transform: `translate3d(${o * (1 - i)}px, 0, 0)`,
|
|
134
|
+
opacity: `${i}`
|
|
135
135
|
})
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function je() {
|
|
140
140
|
return {
|
|
141
|
-
outPhysics:
|
|
142
|
-
inPhysics:
|
|
141
|
+
outPhysics: Xe,
|
|
142
|
+
inPhysics: Be,
|
|
143
143
|
// Phased motion: outgoing falls away first under inertia, then incoming
|
|
144
144
|
// springs in. The fade-through shape comes from the integrator curves
|
|
145
145
|
// plus the sequence handoff, not from FADE_SPLIT inside animate(t).
|
|
146
146
|
composition: { mode: "sequence" },
|
|
147
|
-
build:
|
|
147
|
+
build: Ue
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
const
|
|
151
|
-
snappy:
|
|
152
|
-
fluid:
|
|
153
|
-
}, Wt = 8,
|
|
150
|
+
const Ze = {
|
|
151
|
+
snappy: Ve(),
|
|
152
|
+
fluid: je()
|
|
153
|
+
}, Wt = 8, Ge = {
|
|
154
154
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
155
|
-
},
|
|
155
|
+
}, qe = {
|
|
156
156
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
157
157
|
};
|
|
158
|
-
function
|
|
158
|
+
function Ke({
|
|
159
159
|
direction: t
|
|
160
160
|
}) {
|
|
161
161
|
const e = t === "forward" ? 1 : -1, n = -Wt * e, o = Wt * e;
|
|
@@ -163,9 +163,9 @@ function Ge({
|
|
|
163
163
|
out: {
|
|
164
164
|
willChange: "transform, opacity",
|
|
165
165
|
startStyle: {},
|
|
166
|
-
animate: (
|
|
167
|
-
transform: `translate3d(0, ${n *
|
|
168
|
-
opacity: `${1 -
|
|
166
|
+
animate: (i) => ({
|
|
167
|
+
transform: `translate3d(0, ${n * i}px, 0)`,
|
|
168
|
+
opacity: `${1 - i}`
|
|
169
169
|
})
|
|
170
170
|
},
|
|
171
171
|
in: {
|
|
@@ -174,24 +174,24 @@ function Ge({
|
|
|
174
174
|
transform: `translate3d(0, ${o}px, 0)`,
|
|
175
175
|
opacity: "0"
|
|
176
176
|
},
|
|
177
|
-
animate: (
|
|
178
|
-
transform: `translate3d(0, ${o * (1 -
|
|
179
|
-
opacity: `${
|
|
177
|
+
animate: (i) => ({
|
|
178
|
+
transform: `translate3d(0, ${o * (1 - i)}px, 0)`,
|
|
179
|
+
opacity: `${i}`
|
|
180
180
|
})
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Je() {
|
|
185
185
|
return {
|
|
186
|
-
outPhysics:
|
|
187
|
-
inPhysics:
|
|
186
|
+
outPhysics: Ge,
|
|
187
|
+
inPhysics: qe,
|
|
188
188
|
composition: { mode: "sequence" },
|
|
189
|
-
build:
|
|
189
|
+
build: Ke
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const Qe = 40, tn = {
|
|
193
193
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
194
|
-
},
|
|
194
|
+
}, en = {
|
|
195
195
|
spring: {
|
|
196
196
|
stiffness: 400,
|
|
197
197
|
damping: 30,
|
|
@@ -200,8 +200,8 @@ const Ke = 40, Je = {
|
|
|
200
200
|
restSpeed: 0.1
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
|
-
function
|
|
204
|
-
const e =
|
|
203
|
+
function nn(t) {
|
|
204
|
+
const e = Qe;
|
|
205
205
|
return {
|
|
206
206
|
out: {
|
|
207
207
|
willChange: "opacity",
|
|
@@ -223,31 +223,31 @@ function tn(t) {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function on() {
|
|
227
227
|
return {
|
|
228
|
-
outPhysics:
|
|
229
|
-
inPhysics:
|
|
228
|
+
outPhysics: tn,
|
|
229
|
+
inPhysics: en,
|
|
230
230
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
231
|
-
build:
|
|
231
|
+
build: nn
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
const Vt =
|
|
234
|
+
const Vt = Je(), rn = {
|
|
235
235
|
snappy: Vt,
|
|
236
236
|
directional: Vt,
|
|
237
|
-
"non-directional":
|
|
237
|
+
"non-directional": on()
|
|
238
238
|
}, Xt = {
|
|
239
239
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
240
|
-
},
|
|
241
|
-
function
|
|
240
|
+
}, pt = 0.1, ft = 1 / 3, Bt = (t) => Math.max(0, Math.min(1, t));
|
|
241
|
+
function sn({
|
|
242
242
|
direction: t
|
|
243
243
|
}) {
|
|
244
|
-
const e = t === "forward" ? 1 : -1, n = 1 - e *
|
|
244
|
+
const e = t === "forward" ? 1 : -1, n = 1 - e * pt;
|
|
245
245
|
return {
|
|
246
246
|
out: {
|
|
247
247
|
willChange: "transform, opacity",
|
|
248
248
|
startStyle: {},
|
|
249
249
|
animate: (o) => ({
|
|
250
|
-
transform: `scale(${1 + e * o *
|
|
250
|
+
transform: `scale(${1 + e * o * pt})`,
|
|
251
251
|
opacity: `${Bt(1 - o / ft)}`
|
|
252
252
|
})
|
|
253
253
|
},
|
|
@@ -258,26 +258,26 @@ function on({
|
|
|
258
258
|
opacity: "0"
|
|
259
259
|
},
|
|
260
260
|
animate: (o) => ({
|
|
261
|
-
transform: `scale(${n + e * o *
|
|
261
|
+
transform: `scale(${n + e * o * pt})`,
|
|
262
262
|
opacity: `${Bt((o - ft) / (1 - ft))}`
|
|
263
263
|
})
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function an() {
|
|
268
268
|
return {
|
|
269
269
|
outPhysics: Xt,
|
|
270
270
|
inPhysics: Xt,
|
|
271
271
|
// Scale must move together on both sides; fade-through is encoded inside
|
|
272
272
|
// each tick (piecewise), not via composition staggering — so parallel.
|
|
273
273
|
composition: { mode: "parallel" },
|
|
274
|
-
build:
|
|
274
|
+
build: sn
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
const Ut = {
|
|
278
278
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
279
279
|
}, ht = 0.1, yt = 1 / 3, jt = (t) => Math.max(0, Math.min(1, t));
|
|
280
|
-
function
|
|
280
|
+
function cn() {
|
|
281
281
|
return {
|
|
282
282
|
out: {
|
|
283
283
|
willChange: "opacity",
|
|
@@ -299,42 +299,42 @@ function sn() {
|
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function ln() {
|
|
303
303
|
return {
|
|
304
304
|
outPhysics: Ut,
|
|
305
305
|
inPhysics: Ut,
|
|
306
306
|
composition: { mode: "parallel" },
|
|
307
|
-
build:
|
|
307
|
+
build: cn
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
const Zt =
|
|
310
|
+
const Zt = an(), dn = {
|
|
311
311
|
snappy: Zt,
|
|
312
312
|
directional: Zt,
|
|
313
|
-
"non-directional":
|
|
314
|
-
},
|
|
315
|
-
x:
|
|
316
|
-
y:
|
|
317
|
-
z:
|
|
313
|
+
"non-directional": ln()
|
|
314
|
+
}, un = {
|
|
315
|
+
x: Ze,
|
|
316
|
+
y: rn,
|
|
317
|
+
z: dn
|
|
318
318
|
};
|
|
319
|
-
function
|
|
320
|
-
const n =
|
|
319
|
+
function pn(t, e) {
|
|
320
|
+
const n = un[t];
|
|
321
321
|
return n[e] ?? n.snappy;
|
|
322
322
|
}
|
|
323
|
-
const
|
|
323
|
+
const fn = "x", hn = "snappy";
|
|
324
324
|
function Gt(t, e) {
|
|
325
325
|
t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
|
|
326
326
|
for (const [n, o] of Object.entries(e.startStyle))
|
|
327
327
|
t.style[n] = o;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function pe(t) {
|
|
330
330
|
t.style.willChange = "auto", t.style.backfaceVisibility = "", t.style.contain = "", t.style.transform = "", t.style.opacity = "", t.style.clipPath = "";
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
|
|
332
|
+
function yn(t) {
|
|
333
|
+
pe(t), t.style.pointerEvents = "";
|
|
334
334
|
}
|
|
335
|
-
const
|
|
336
|
-
const e = t.type ??
|
|
337
|
-
const c = o.build({ direction:
|
|
335
|
+
const mn = (t = {}) => {
|
|
336
|
+
const e = t.type ?? fn, n = t.feel ?? hn, o = pn(e, n), i = (r) => {
|
|
337
|
+
const c = o.build({ direction: r });
|
|
338
338
|
return {
|
|
339
339
|
prepare: ({ from: s, to: l }) => (s.then((a) => {
|
|
340
340
|
Gt(a, c.out), a.style.pointerEvents = "none";
|
|
@@ -343,50 +343,50 @@ const hn = (t = {}) => {
|
|
|
343
343
|
}), {}),
|
|
344
344
|
animation: ({ from: s, to: l, context: a }) => {
|
|
345
345
|
if (e === "z") {
|
|
346
|
-
const y =
|
|
347
|
-
s.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`, l.style.clipPath = `inset(${
|
|
346
|
+
const y = V(a, "from"), p = V(a, "to");
|
|
347
|
+
s.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`, l.style.clipPath = `inset(${p.top}px 0 calc(100% - ${p.top + p.height}px) 0)`;
|
|
348
348
|
}
|
|
349
|
-
const d = new
|
|
349
|
+
const d = new w({
|
|
350
350
|
element: s,
|
|
351
|
-
integrator:
|
|
351
|
+
integrator: x.from(o.outPhysics),
|
|
352
352
|
style: (y) => c.out.animate(y),
|
|
353
353
|
// Restore the reused from node's inline styles on complete. This
|
|
354
354
|
// covers willChange/backfaceVisibility/contain/transform/opacity (from
|
|
355
355
|
// applyStartStyle + the WAAPI final frame), pointerEvents (set in
|
|
356
356
|
// prepare), and clipPath (set above for z; harmless no-op otherwise).
|
|
357
|
-
|
|
358
|
-
}),
|
|
357
|
+
onDispose: () => yn(s)
|
|
358
|
+
}), u = new w({
|
|
359
359
|
element: l,
|
|
360
|
-
integrator:
|
|
360
|
+
integrator: x.from(o.inPhysics),
|
|
361
361
|
style: (y) => c.in.animate(y),
|
|
362
|
-
|
|
362
|
+
onDispose: () => pe(l)
|
|
363
363
|
});
|
|
364
|
-
return new
|
|
365
|
-
{ out: d, in:
|
|
364
|
+
return new I(
|
|
365
|
+
{ out: d, in: u },
|
|
366
366
|
o.composition
|
|
367
367
|
);
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
370
|
};
|
|
371
371
|
return k({
|
|
372
|
-
forward:
|
|
373
|
-
backward:
|
|
372
|
+
forward: i("forward"),
|
|
373
|
+
backward: i("backward")
|
|
374
374
|
});
|
|
375
375
|
};
|
|
376
|
-
function
|
|
376
|
+
function gn(t, e, n) {
|
|
377
377
|
return t === "y" ? e === "non-directional" ? "non-directional" : "directional" : t !== "x" || e === "snappy" || n === "snappy" ? "snappy" : "fluid";
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const n = t.type ?? "x", o = t.variant,
|
|
381
|
-
return
|
|
382
|
-
|
|
379
|
+
function Vi(t = {}, e = {}) {
|
|
380
|
+
const n = t.type ?? "x", o = t.variant, i = t.feel, r = gn(n, o, i);
|
|
381
|
+
return D(
|
|
382
|
+
mn({ type: n, feel: r }),
|
|
383
383
|
e.override
|
|
384
384
|
);
|
|
385
385
|
}
|
|
386
|
-
const
|
|
386
|
+
const bn = {
|
|
387
387
|
spring: { stiffness: 200, damping: 22 }
|
|
388
|
-
},
|
|
389
|
-
function qt(t, e, n, o,
|
|
388
|
+
}, wn = 10, Sn = "horizontal", xn = "#000000";
|
|
389
|
+
function qt(t, e, n, o, i, r) {
|
|
390
390
|
window.getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
391
391
|
const s = document.createElement("div");
|
|
392
392
|
s.style.cssText = `
|
|
@@ -403,29 +403,29 @@ function qt(t, e, n, o, r, i) {
|
|
|
403
403
|
for (let a = 0; a < e; a++) {
|
|
404
404
|
const d = document.createElement("div");
|
|
405
405
|
if (n === "horizontal") {
|
|
406
|
-
const
|
|
406
|
+
const u = 100 / e;
|
|
407
407
|
d.style.cssText = `
|
|
408
408
|
position: absolute;
|
|
409
|
-
top: ${
|
|
409
|
+
top: ${u * a}%;
|
|
410
410
|
left: 0;
|
|
411
411
|
width: 100%;
|
|
412
|
-
height: calc(${
|
|
412
|
+
height: calc(${u}% + 1px);
|
|
413
413
|
background: ${o};
|
|
414
|
-
transform: scaleX(${
|
|
415
|
-
transform-origin: ${
|
|
414
|
+
transform: scaleX(${i === "hidden" ? 0 : 1});
|
|
415
|
+
transform-origin: ${r} center;
|
|
416
416
|
will-change: transform;
|
|
417
417
|
`;
|
|
418
418
|
} else {
|
|
419
|
-
const
|
|
419
|
+
const u = 100 / e;
|
|
420
420
|
d.style.cssText = `
|
|
421
421
|
position: absolute;
|
|
422
422
|
top: 0;
|
|
423
|
-
left: ${
|
|
424
|
-
width: calc(${
|
|
423
|
+
left: ${u * a}%;
|
|
424
|
+
width: calc(${u}% + 1px);
|
|
425
425
|
height: 100%;
|
|
426
426
|
background: ${o};
|
|
427
|
-
transform: scaleY(${
|
|
428
|
-
transform-origin: ${
|
|
427
|
+
transform: scaleY(${i === "hidden" ? 0 : 1});
|
|
428
|
+
transform-origin: ${r === "left" ? "top" : "bottom"} center;
|
|
429
429
|
will-change: transform;
|
|
430
430
|
`;
|
|
431
431
|
}
|
|
@@ -433,100 +433,115 @@ function qt(t, e, n, o, r, i) {
|
|
|
433
433
|
}
|
|
434
434
|
return t.appendChild(s), { container: s, blinds: l };
|
|
435
435
|
}
|
|
436
|
-
const
|
|
437
|
-
const e = t.blindCount ??
|
|
438
|
-
prepare: async ({ from: c, to: s }) => {
|
|
439
|
-
const
|
|
440
|
-
l.
|
|
441
|
-
|
|
442
|
-
|
|
436
|
+
const En = (t = {}) => {
|
|
437
|
+
const e = t.blindCount ?? wn, n = t.direction ?? Sn, o = t.blindColor ?? xn, i = t.physics ?? bn, r = {
|
|
438
|
+
prepare: async ({ from: c, to: s, signal: l, onCleanup: a }) => {
|
|
439
|
+
const d = await c, u = await s;
|
|
440
|
+
if (l != null && l.aborted) throw new Error("Blind preparation superseded");
|
|
441
|
+
d.style.zIndex = "1000";
|
|
442
|
+
const y = qt(
|
|
443
|
+
d,
|
|
443
444
|
e,
|
|
444
445
|
n,
|
|
445
446
|
o,
|
|
446
447
|
"hidden",
|
|
447
448
|
"left"
|
|
448
449
|
);
|
|
449
|
-
|
|
450
|
+
u.style.position = "relative", u.style.zIndex = "0";
|
|
450
451
|
const p = qt(
|
|
451
|
-
|
|
452
|
+
u,
|
|
452
453
|
e,
|
|
453
454
|
n,
|
|
454
455
|
o,
|
|
455
456
|
"closed",
|
|
456
457
|
"right"
|
|
457
458
|
);
|
|
458
|
-
return {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
return a == null || a(() => {
|
|
460
|
+
y.container.remove(), p.container.remove();
|
|
461
|
+
}), {
|
|
462
|
+
fromEl: d,
|
|
463
|
+
fromBlinds: y.blinds,
|
|
464
|
+
fromContainer: y.container,
|
|
462
465
|
toBlinds: p.blinds,
|
|
463
466
|
toContainer: p.container
|
|
464
467
|
};
|
|
465
468
|
},
|
|
466
469
|
animation: ({
|
|
467
470
|
fromEl: c,
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
471
|
+
to: s,
|
|
472
|
+
fromBlinds: l,
|
|
473
|
+
fromContainer: a,
|
|
474
|
+
toBlinds: d,
|
|
475
|
+
toContainer: u
|
|
472
476
|
}) => {
|
|
473
|
-
const
|
|
474
|
-
(
|
|
475
|
-
element:
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
const y = l.map(
|
|
478
|
+
(b, g) => new w({
|
|
479
|
+
element: b,
|
|
480
|
+
motion: {
|
|
481
|
+
lifetime: "temporary",
|
|
482
|
+
role: "occlusion",
|
|
483
|
+
key: `blind:${n}:${e}:${g}`,
|
|
484
|
+
space: c
|
|
485
|
+
},
|
|
486
|
+
integrator: x.from(i),
|
|
487
|
+
style: (E) => ({
|
|
488
|
+
transform: n === "horizontal" ? `scaleX(${E})` : `scaleY(${E})`
|
|
479
489
|
})
|
|
480
490
|
})
|
|
481
|
-
),
|
|
482
|
-
(
|
|
483
|
-
element:
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
+
), p = d.map(
|
|
492
|
+
(b, g) => new w({
|
|
493
|
+
element: b,
|
|
494
|
+
motion: {
|
|
495
|
+
lifetime: "temporary",
|
|
496
|
+
role: "occlusion",
|
|
497
|
+
key: `blind:${n}:${e}:${g}`,
|
|
498
|
+
space: s
|
|
499
|
+
},
|
|
500
|
+
integrator: x.from(i),
|
|
501
|
+
style: (E, C) => ({
|
|
502
|
+
transform: n === "horizontal" ? `scaleX(${C})` : `scaleY(${C})`
|
|
503
|
+
})
|
|
491
504
|
})
|
|
492
|
-
),
|
|
493
|
-
|
|
494
|
-
{ out: u, in: f },
|
|
505
|
+
), f = new I(y, { mode: "parallel" }), h = new I(p, { mode: "parallel" }), m = new I(
|
|
506
|
+
{ out: f, in: h },
|
|
495
507
|
{ mode: "sequence" }
|
|
496
508
|
);
|
|
509
|
+
return m.onDispose = (b) => {
|
|
510
|
+
u.remove(), a.remove(), b.owns(c) && (c.style.zIndex = "", c.style.position = "");
|
|
511
|
+
}, m;
|
|
497
512
|
}
|
|
498
513
|
};
|
|
499
|
-
return k({ forward:
|
|
514
|
+
return k({ forward: r, backward: r });
|
|
500
515
|
};
|
|
501
|
-
function
|
|
516
|
+
function Xi(t = {}, e = {}) {
|
|
502
517
|
const { type: n = "horizontal" } = t;
|
|
503
|
-
return
|
|
518
|
+
return D(En({ direction: n }), e.override);
|
|
504
519
|
}
|
|
505
|
-
function
|
|
520
|
+
function K(t, e = {}) {
|
|
506
521
|
const n = Object.fromEntries(
|
|
507
|
-
Object.entries(t).map(([o,
|
|
508
|
-
const
|
|
522
|
+
Object.entries(t).map(([o, i]) => {
|
|
523
|
+
const r = i;
|
|
509
524
|
return [
|
|
510
525
|
o,
|
|
511
|
-
Array.isArray(
|
|
526
|
+
Array.isArray(r) ? r.length === 1 ? r[0] : new I(r) : r
|
|
512
527
|
];
|
|
513
528
|
})
|
|
514
529
|
);
|
|
515
|
-
return new
|
|
530
|
+
return new I(n, e);
|
|
516
531
|
}
|
|
517
|
-
function
|
|
532
|
+
function J(t) {
|
|
518
533
|
const e = t.onComplete;
|
|
519
534
|
t.onComplete = () => {
|
|
520
535
|
e == null || e(), t.releaseFill();
|
|
521
536
|
};
|
|
522
537
|
}
|
|
523
|
-
const
|
|
538
|
+
const $n = {
|
|
524
539
|
spring: {
|
|
525
540
|
stiffness: 250,
|
|
526
541
|
damping: 23,
|
|
527
542
|
doubleSpring: 0.7
|
|
528
543
|
}
|
|
529
|
-
},
|
|
544
|
+
}, Z = 0.5;
|
|
530
545
|
function Cn(t) {
|
|
531
546
|
const e = t === "enter" ? -100 : 100, n = t === "enter" ? 100 : -100;
|
|
532
547
|
return {
|
|
@@ -535,29 +550,29 @@ function Cn(t) {
|
|
|
535
550
|
startStyle: {},
|
|
536
551
|
animate: (o) => ({
|
|
537
552
|
transform: `translate3d(${e * o}%, 0, 0)`,
|
|
538
|
-
opacity: `${
|
|
553
|
+
opacity: `${Z + (1 - Z) * (1 - o)}`
|
|
539
554
|
})
|
|
540
555
|
},
|
|
541
556
|
in: {
|
|
542
557
|
willChange: "transform, opacity",
|
|
543
558
|
startStyle: {
|
|
544
559
|
transform: `translate3d(${n}%, 0, 0)`,
|
|
545
|
-
opacity: `${
|
|
560
|
+
opacity: `${Z}`
|
|
546
561
|
},
|
|
547
562
|
animate: (o) => ({
|
|
548
563
|
transform: `translate3d(${n * (1 - o)}%, 0, 0)`,
|
|
549
|
-
opacity: `${
|
|
564
|
+
opacity: `${Z + (1 - Z) * o}`
|
|
550
565
|
})
|
|
551
566
|
}
|
|
552
567
|
};
|
|
553
568
|
}
|
|
554
|
-
function
|
|
569
|
+
function An() {
|
|
555
570
|
return {
|
|
556
|
-
physics:
|
|
571
|
+
physics: $n,
|
|
557
572
|
build: Cn
|
|
558
573
|
};
|
|
559
574
|
}
|
|
560
|
-
const
|
|
575
|
+
const vn = {
|
|
561
576
|
spring: {
|
|
562
577
|
stiffness: 230,
|
|
563
578
|
damping: 25,
|
|
@@ -567,7 +582,7 @@ const $n = {
|
|
|
567
582
|
}
|
|
568
583
|
}
|
|
569
584
|
};
|
|
570
|
-
function
|
|
585
|
+
function Pn(t) {
|
|
571
586
|
const e = t === "enter" ? -20 : 100, n = t === "enter" ? 100 : -20;
|
|
572
587
|
return {
|
|
573
588
|
out: {
|
|
@@ -588,51 +603,51 @@ function An(t) {
|
|
|
588
603
|
}
|
|
589
604
|
};
|
|
590
605
|
}
|
|
591
|
-
function
|
|
606
|
+
function Rn() {
|
|
592
607
|
return {
|
|
593
|
-
physics:
|
|
594
|
-
build:
|
|
608
|
+
physics: vn,
|
|
609
|
+
build: Pn
|
|
595
610
|
};
|
|
596
611
|
}
|
|
597
|
-
const
|
|
598
|
-
parallax:
|
|
599
|
-
crossfade:
|
|
600
|
-
}, L = "0",
|
|
612
|
+
const In = {
|
|
613
|
+
parallax: Rn(),
|
|
614
|
+
crossfade: An()
|
|
615
|
+
}, L = "0", fe = "1", M = "2", On = "parallax";
|
|
601
616
|
function Kt(t, e) {
|
|
602
617
|
t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
|
|
603
618
|
for (const [n, o] of Object.entries(e.startStyle))
|
|
604
619
|
t.style[n] = o;
|
|
605
620
|
}
|
|
606
|
-
const
|
|
607
|
-
const e =
|
|
608
|
-
const
|
|
621
|
+
const _n = (t = {}) => {
|
|
622
|
+
const e = In[t.type ?? On], n = e.physics, o = (i) => {
|
|
623
|
+
const r = i === "forward" ? "enter" : "exit", c = e.build(r), s = r === "enter" ? L : M, l = r === "enter" ? M : L;
|
|
609
624
|
return {
|
|
610
|
-
prepare: ({ from: a, to: d }) => (a.then((
|
|
611
|
-
Kt(
|
|
612
|
-
}), d.then((
|
|
613
|
-
Kt(
|
|
625
|
+
prepare: ({ from: a, to: d }) => (a.then((u) => {
|
|
626
|
+
Kt(u, c.out), u.style.pointerEvents = "none", u.style.zIndex = s;
|
|
627
|
+
}), d.then((u) => {
|
|
628
|
+
Kt(u, c.in), u.style.position = "relative", u.style.zIndex = l;
|
|
614
629
|
}), {}),
|
|
615
630
|
animation: ({ from: a, to: d }) => {
|
|
616
|
-
const
|
|
631
|
+
const u = new w({
|
|
617
632
|
element: a,
|
|
618
|
-
integrator:
|
|
619
|
-
style: (
|
|
633
|
+
integrator: x.from(n),
|
|
634
|
+
style: (p) => c.out.animate(p),
|
|
620
635
|
// The outgoing node is the real, reused element (re-hidden on navigate),
|
|
621
636
|
// so clear every inline style we set on it — mirroring the `to` cleanup,
|
|
622
637
|
// plus the out-only `pointerEvents` / `zIndex`.
|
|
623
|
-
|
|
638
|
+
onDispose: () => {
|
|
624
639
|
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.opacity = "", a.style.pointerEvents = "", a.style.zIndex = "";
|
|
625
640
|
}
|
|
626
|
-
}), y = new
|
|
641
|
+
}), y = new w({
|
|
627
642
|
element: d,
|
|
628
|
-
integrator:
|
|
629
|
-
style: (
|
|
630
|
-
|
|
643
|
+
integrator: x.from(n),
|
|
644
|
+
style: (p) => c.in.animate(p),
|
|
645
|
+
onDispose: () => {
|
|
631
646
|
d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.contain = "", d.style.transform = "", d.style.opacity = "", d.style.position === "relative" && (d.style.position = ""), d.style.zIndex === l && (d.style.zIndex = "");
|
|
632
647
|
}
|
|
633
648
|
});
|
|
634
|
-
return [
|
|
635
|
-
{ out:
|
|
649
|
+
return [u, y].forEach(J), new I(
|
|
650
|
+
{ out: u, in: y },
|
|
636
651
|
{ mode: "parallel" }
|
|
637
652
|
);
|
|
638
653
|
}
|
|
@@ -643,41 +658,41 @@ const In = (t = {}) => {
|
|
|
643
658
|
backward: o("backward")
|
|
644
659
|
});
|
|
645
660
|
};
|
|
646
|
-
function
|
|
661
|
+
function kn(t) {
|
|
647
662
|
return t === "slide" || t === "crossfade" ? "crossfade" : "parallax";
|
|
648
663
|
}
|
|
649
|
-
function
|
|
650
|
-
const n = t.type, o =
|
|
651
|
-
return
|
|
664
|
+
function Bi(t = {}, e = {}) {
|
|
665
|
+
const n = t.type, o = kn(n);
|
|
666
|
+
return D(_n({ type: o }), e.override);
|
|
652
667
|
}
|
|
653
|
-
const
|
|
654
|
-
const e = t.physics ??
|
|
655
|
-
prepare: ({ to:
|
|
656
|
-
|
|
668
|
+
const Dn = (t = {}) => {
|
|
669
|
+
const e = t.physics ?? Le, n = t.physics ?? He, o = {
|
|
670
|
+
prepare: ({ to: i }) => (i.then((r) => {
|
|
671
|
+
r.style.opacity = "0", r.style.willChange = "opacity";
|
|
657
672
|
}), {}),
|
|
658
|
-
animation: ({ from:
|
|
659
|
-
const c = new
|
|
660
|
-
element:
|
|
661
|
-
integrator:
|
|
673
|
+
animation: ({ from: i, to: r }) => {
|
|
674
|
+
const c = new w({
|
|
675
|
+
element: i,
|
|
676
|
+
integrator: x.from(n),
|
|
662
677
|
// Default bounds (0, 1). `u` runs 1→0 as the animation moves
|
|
663
678
|
// forward, mapping opacity from fully visible to invisible.
|
|
664
679
|
style: (l) => ({
|
|
665
|
-
opacity:
|
|
680
|
+
opacity: it("fade", "out", "forward", l).opacity
|
|
666
681
|
}),
|
|
667
|
-
|
|
668
|
-
|
|
682
|
+
onDispose: () => {
|
|
683
|
+
i.style.willChange = "auto", i.style.opacity = "";
|
|
669
684
|
}
|
|
670
|
-
}), s = new
|
|
671
|
-
element:
|
|
672
|
-
integrator:
|
|
685
|
+
}), s = new w({
|
|
686
|
+
element: r,
|
|
687
|
+
integrator: x.from(e),
|
|
673
688
|
style: (l) => ({
|
|
674
|
-
opacity:
|
|
689
|
+
opacity: it("fade", "in", "forward", l).opacity
|
|
675
690
|
}),
|
|
676
|
-
|
|
677
|
-
|
|
691
|
+
onDispose: () => {
|
|
692
|
+
r.style.willChange = "auto", r.style.opacity = "";
|
|
678
693
|
}
|
|
679
694
|
});
|
|
680
|
-
return new
|
|
695
|
+
return new I(
|
|
681
696
|
{ out: c, in: s },
|
|
682
697
|
{ mode: "sequence" }
|
|
683
698
|
);
|
|
@@ -685,22 +700,22 @@ const _n = (t = {}) => {
|
|
|
685
700
|
};
|
|
686
701
|
return k({ forward: o, backward: o });
|
|
687
702
|
};
|
|
688
|
-
function
|
|
689
|
-
return
|
|
703
|
+
function Ui(t = {}, e = {}) {
|
|
704
|
+
return D(Dn(), e.override);
|
|
690
705
|
}
|
|
691
706
|
const mt = {
|
|
692
707
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
693
708
|
translate: { stiffness: 15, damping: 7 },
|
|
694
709
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
695
|
-
},
|
|
710
|
+
}, X = {
|
|
696
711
|
scaleDown: 0,
|
|
697
712
|
translate: 0.2,
|
|
698
713
|
scaleUp: 0.8
|
|
699
|
-
},
|
|
700
|
-
function
|
|
701
|
-
const { items: e, from: n, to: o, recordFrame:
|
|
714
|
+
}, Fn = 0.8, Mn = "white", Jt = 1e3 / 60, Tn = 600;
|
|
715
|
+
function Yn(t) {
|
|
716
|
+
const { items: e, from: n, to: o, recordFrame: i } = t, r = Jt / 1e3, c = Math.abs(o - n), s = e.map((a) => ({
|
|
702
717
|
item: a,
|
|
703
|
-
integrator: new
|
|
718
|
+
integrator: new vt({
|
|
704
719
|
stiffness: a.spring.stiffness,
|
|
705
720
|
damping: a.spring.damping
|
|
706
721
|
}),
|
|
@@ -711,21 +726,21 @@ function Mn(t) {
|
|
|
711
726
|
}));
|
|
712
727
|
for (let a = 0; a < s.length; a++)
|
|
713
728
|
(a === 0 || s[a].item.offset === 0) && (s[a].started = !0);
|
|
714
|
-
|
|
729
|
+
i(0);
|
|
715
730
|
let l = 0;
|
|
716
731
|
for (let a = 1; a <= Tn; a++) {
|
|
717
732
|
const d = a * Jt;
|
|
718
733
|
l = d;
|
|
719
|
-
for (const
|
|
720
|
-
!
|
|
721
|
-
for (let
|
|
722
|
-
const y = s[
|
|
734
|
+
for (const u of s)
|
|
735
|
+
!u.started || u.settled || (u.state = u.integrator.step(u.state, o, r), u.integrator.isSettled(u.state, o) ? (u.settleTime += r, u.settleTime >= Me && (u.state = { position: o, velocity: 0 }, u.settled = !0)) : u.settleTime = 0, u.item.tick(u.state.position));
|
|
736
|
+
for (let u = 1; u < s.length; u++) {
|
|
737
|
+
const y = s[u];
|
|
723
738
|
if (y.started) continue;
|
|
724
|
-
const
|
|
725
|
-
if (!
|
|
726
|
-
(c === 0 ? 1 : Math.abs(
|
|
739
|
+
const p = s[u - 1];
|
|
740
|
+
if (!p.started) continue;
|
|
741
|
+
(c === 0 ? 1 : Math.abs(p.state.position - n) / c) >= y.item.offset && (y.started = !0);
|
|
727
742
|
}
|
|
728
|
-
if (
|
|
743
|
+
if (i(d), s.every((u) => u.settled)) return d;
|
|
729
744
|
}
|
|
730
745
|
return l;
|
|
731
746
|
}
|
|
@@ -736,86 +751,86 @@ function gt(t, e) {
|
|
|
736
751
|
} : e;
|
|
737
752
|
}
|
|
738
753
|
function Qt(t) {
|
|
739
|
-
const { rect: e, scale: n, direction: o, override:
|
|
754
|
+
const { rect: e, scale: n, direction: o, override: i } = t, r = o === "out" ? { scale: 1, translateY: -e.top } : { scale: n, translateY: -e.top + e.height }, c = gt(i, mt.scaleDown), s = gt(i, mt.translate), l = gt(i, mt.scaleUp), a = o === "out" ? 1 : 0, d = o === "out" ? 0 : 1, u = o === "out" ? [
|
|
740
755
|
{
|
|
741
756
|
spring: c,
|
|
742
|
-
offset:
|
|
757
|
+
offset: X.scaleDown,
|
|
743
758
|
tick: (f) => {
|
|
744
759
|
const h = 1 - f;
|
|
745
|
-
|
|
760
|
+
r.scale = 1 - (1 - n) * h;
|
|
746
761
|
}
|
|
747
762
|
},
|
|
748
763
|
{
|
|
749
764
|
spring: s,
|
|
750
|
-
offset:
|
|
765
|
+
offset: X.translate,
|
|
751
766
|
tick: (f) => {
|
|
752
767
|
const h = 1 - f;
|
|
753
|
-
|
|
768
|
+
r.translateY = -e.top - e.height * h;
|
|
754
769
|
}
|
|
755
770
|
},
|
|
756
771
|
{
|
|
757
772
|
spring: l,
|
|
758
|
-
offset:
|
|
773
|
+
offset: X.scaleUp,
|
|
759
774
|
tick: (f) => {
|
|
760
775
|
const h = 1 - f;
|
|
761
|
-
|
|
776
|
+
r.scale = n + (1 - n) * h;
|
|
762
777
|
}
|
|
763
778
|
}
|
|
764
779
|
] : [
|
|
765
780
|
{
|
|
766
781
|
spring: c,
|
|
767
|
-
offset:
|
|
782
|
+
offset: X.scaleDown,
|
|
768
783
|
tick: (f) => {
|
|
769
|
-
|
|
784
|
+
r.scale = 1 - (1 - n) * f;
|
|
770
785
|
}
|
|
771
786
|
},
|
|
772
787
|
{
|
|
773
788
|
spring: s,
|
|
774
|
-
offset:
|
|
789
|
+
offset: X.translate,
|
|
775
790
|
tick: (f) => {
|
|
776
|
-
|
|
791
|
+
r.translateY = -e.top + e.height * (1 - f);
|
|
777
792
|
}
|
|
778
793
|
},
|
|
779
794
|
{
|
|
780
795
|
spring: l,
|
|
781
|
-
offset:
|
|
796
|
+
offset: X.scaleUp,
|
|
782
797
|
tick: (f) => {
|
|
783
|
-
|
|
798
|
+
r.scale = n + (1 - n) * f;
|
|
784
799
|
}
|
|
785
800
|
}
|
|
786
|
-
], y = [],
|
|
787
|
-
items:
|
|
801
|
+
], y = [], p = Yn({
|
|
802
|
+
items: u,
|
|
788
803
|
from: a,
|
|
789
804
|
to: d,
|
|
790
805
|
recordFrame: (f) => y.push({
|
|
791
806
|
time: f,
|
|
792
|
-
scale:
|
|
793
|
-
translateY:
|
|
807
|
+
scale: r.scale,
|
|
808
|
+
translateY: r.translateY
|
|
794
809
|
})
|
|
795
810
|
});
|
|
796
|
-
return { snapshots: y, totalDuration:
|
|
811
|
+
return { snapshots: y, totalDuration: p };
|
|
797
812
|
}
|
|
798
|
-
function
|
|
813
|
+
function Ln(t, e) {
|
|
799
814
|
if (t.length === 0) return { time: 0, scale: 1, translateY: 0 };
|
|
800
815
|
if (t.length === 1 || e <= 0) return t[0];
|
|
801
816
|
if (e >= 1) return t[t.length - 1];
|
|
802
|
-
const n = e * (t.length - 1), o = Math.floor(n),
|
|
803
|
-
if (o ===
|
|
804
|
-
const
|
|
817
|
+
const n = e * (t.length - 1), o = Math.floor(n), i = Math.ceil(n);
|
|
818
|
+
if (o === i) return t[o];
|
|
819
|
+
const r = t[o], c = t[i], s = n - o;
|
|
805
820
|
return {
|
|
806
|
-
time:
|
|
807
|
-
scale:
|
|
808
|
-
translateY:
|
|
821
|
+
time: r.time + (c.time - r.time) * s,
|
|
822
|
+
scale: r.scale + (c.scale - r.scale) * s,
|
|
823
|
+
translateY: r.translateY + (c.translateY - r.translateY) * s
|
|
809
824
|
};
|
|
810
825
|
}
|
|
811
|
-
const
|
|
826
|
+
const Hn = [
|
|
812
827
|
[1, 1],
|
|
813
828
|
[-1, 1],
|
|
814
829
|
[1, -1],
|
|
815
830
|
[-1, -1]
|
|
816
831
|
];
|
|
817
|
-
function
|
|
818
|
-
const
|
|
832
|
+
function zn(t, e) {
|
|
833
|
+
const i = (r, c, s) => {
|
|
819
834
|
const l = document.createElement("div");
|
|
820
835
|
Object.assign(l.style, {
|
|
821
836
|
position: "fixed",
|
|
@@ -823,7 +838,7 @@ function Ln(t, e) {
|
|
|
823
838
|
zIndex: "9999",
|
|
824
839
|
width: "15px",
|
|
825
840
|
height: "15px",
|
|
826
|
-
...
|
|
841
|
+
...r
|
|
827
842
|
});
|
|
828
843
|
const a = document.createElement("div");
|
|
829
844
|
Object.assign(a.style, {
|
|
@@ -845,7 +860,7 @@ function Ln(t, e) {
|
|
|
845
860
|
}), l.appendChild(a), l.appendChild(d), l;
|
|
846
861
|
};
|
|
847
862
|
return {
|
|
848
|
-
topLeft:
|
|
863
|
+
topLeft: i(
|
|
849
864
|
{
|
|
850
865
|
top: `${e.top - 1}px`,
|
|
851
866
|
left: `${e.left - 1}px`
|
|
@@ -853,7 +868,7 @@ function Ln(t, e) {
|
|
|
853
868
|
"left",
|
|
854
869
|
"top"
|
|
855
870
|
),
|
|
856
|
-
topRight:
|
|
871
|
+
topRight: i(
|
|
857
872
|
{
|
|
858
873
|
top: `${e.top - 1}px`,
|
|
859
874
|
left: `${e.left + e.width - 15 + 1}px`
|
|
@@ -861,7 +876,7 @@ function Ln(t, e) {
|
|
|
861
876
|
"right",
|
|
862
877
|
"top"
|
|
863
878
|
),
|
|
864
|
-
bottomLeft:
|
|
879
|
+
bottomLeft: i(
|
|
865
880
|
{
|
|
866
881
|
top: `${e.top + e.height - 15 + 1}px`,
|
|
867
882
|
left: `${e.left - 1}px`
|
|
@@ -869,7 +884,7 @@ function Ln(t, e) {
|
|
|
869
884
|
"left",
|
|
870
885
|
"bottom"
|
|
871
886
|
),
|
|
872
|
-
bottomRight:
|
|
887
|
+
bottomRight: i(
|
|
873
888
|
{
|
|
874
889
|
top: `${e.top + e.height - 15 + 1}px`,
|
|
875
890
|
left: `${e.left + e.width - 15 + 1}px`
|
|
@@ -891,46 +906,49 @@ function ee(t, e) {
|
|
|
891
906
|
${e.left}px ${e.top + e.height}px
|
|
892
907
|
)`;
|
|
893
908
|
}
|
|
894
|
-
function bt(t, e, n, o,
|
|
895
|
-
const
|
|
896
|
-
return new
|
|
909
|
+
function bt(t, e, n, o, i) {
|
|
910
|
+
const r = n / 1e3;
|
|
911
|
+
return new w({
|
|
897
912
|
element: t,
|
|
898
|
-
integrator: new
|
|
913
|
+
integrator: new Ne({ durationSec: r }),
|
|
899
914
|
lowerBound: 0,
|
|
900
915
|
upperBound: 1,
|
|
901
|
-
style: (c) => o(
|
|
902
|
-
|
|
916
|
+
style: (c) => o(Ln(e, c)),
|
|
917
|
+
onDispose: i
|
|
903
918
|
});
|
|
904
919
|
}
|
|
905
|
-
const
|
|
906
|
-
var
|
|
907
|
-
const e = ((
|
|
908
|
-
prepare: ({ from: c, to: s, context: l }) => {
|
|
909
|
-
const
|
|
910
|
-
...
|
|
911
|
-
top:
|
|
920
|
+
const Nn = (t = {}) => {
|
|
921
|
+
var r;
|
|
922
|
+
const e = ((r = t.border) == null ? void 0 : r.color) ?? Mn, n = Fn, o = t.physics, i = {
|
|
923
|
+
prepare: ({ from: c, to: s, context: l, onCleanup: a }) => {
|
|
924
|
+
const d = V(l, "from"), u = V(l, "to"), y = Ft(document.body, l.positionedParent), p = zn(e, {
|
|
925
|
+
...d,
|
|
926
|
+
top: y.top
|
|
927
|
+
});
|
|
928
|
+
a == null || a(() => {
|
|
929
|
+
for (const f of Object.values(p)) f.remove();
|
|
912
930
|
});
|
|
913
|
-
for (const
|
|
931
|
+
for (const f of [
|
|
914
932
|
"topLeft",
|
|
915
933
|
"topRight",
|
|
916
934
|
"bottomLeft",
|
|
917
935
|
"bottomRight"
|
|
918
936
|
])
|
|
919
|
-
l.positionedParent.appendChild(
|
|
920
|
-
return c.then((
|
|
921
|
-
te(
|
|
922
|
-
}), s.then((
|
|
923
|
-
te(
|
|
924
|
-
}), { borders:
|
|
937
|
+
l.positionedParent.appendChild(p[f]);
|
|
938
|
+
return c.then((f) => {
|
|
939
|
+
te(f, d), ee(f, d), f.style.transform = `translateY(${-d.top}px)`;
|
|
940
|
+
}), s.then((f) => {
|
|
941
|
+
te(f, u), ee(f, u), f.style.transform = `translateY(${-u.top + u.height}px) scale(${n})`;
|
|
942
|
+
}), { borders: p, fromRect: d, toRect: u };
|
|
925
943
|
},
|
|
926
|
-
animation: ({ from: c, to: s, context: l, borders: a, fromRect: d, toRect:
|
|
944
|
+
animation: ({ from: c, to: s, context: l, borders: a, fromRect: d, toRect: u }) => {
|
|
927
945
|
const y = Qt({
|
|
928
946
|
rect: d,
|
|
929
947
|
scale: n,
|
|
930
948
|
direction: "out",
|
|
931
949
|
override: o
|
|
932
|
-
}),
|
|
933
|
-
rect:
|
|
950
|
+
}), p = Qt({
|
|
951
|
+
rect: u,
|
|
934
952
|
scale: n,
|
|
935
953
|
direction: "in",
|
|
936
954
|
override: o
|
|
@@ -938,102 +956,104 @@ const Hn = (t = {}) => {
|
|
|
938
956
|
c,
|
|
939
957
|
y.snapshots,
|
|
940
958
|
y.totalDuration,
|
|
941
|
-
(
|
|
942
|
-
transform: `translateY(${
|
|
959
|
+
(g) => ({
|
|
960
|
+
transform: `translateY(${g.translateY}px) scale(${g.scale})`
|
|
943
961
|
}),
|
|
944
962
|
() => {
|
|
945
963
|
c.style.clipPath = "", c.style.transformOrigin = "", c.style.transform = "";
|
|
946
964
|
}
|
|
947
965
|
), h = bt(
|
|
948
966
|
s,
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
(
|
|
952
|
-
transform: `translateY(${
|
|
967
|
+
p.snapshots,
|
|
968
|
+
p.totalDuration,
|
|
969
|
+
(g) => ({
|
|
970
|
+
transform: `translateY(${g.translateY}px) scale(${g.scale})`
|
|
953
971
|
}),
|
|
954
972
|
() => {
|
|
955
973
|
s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
|
|
956
974
|
}
|
|
957
|
-
), m =
|
|
958
|
-
const
|
|
975
|
+
), m = Hn.map(([g, E], C) => {
|
|
976
|
+
const v = ["topLeft", "topRight", "bottomLeft", "bottomRight"][C];
|
|
959
977
|
return bt(
|
|
960
|
-
a[
|
|
978
|
+
a[v],
|
|
961
979
|
y.snapshots,
|
|
962
980
|
y.totalDuration,
|
|
963
|
-
(
|
|
964
|
-
const
|
|
965
|
-
return { transform: `translate(${
|
|
981
|
+
(A) => {
|
|
982
|
+
const S = (d.width - d.width * A.scale) / 2 * 0.7 * g, $ = (d.height - d.height * A.scale) / 2 * 0.7 * E;
|
|
983
|
+
return { transform: `translate(${S}px, ${$}px)` };
|
|
966
984
|
}
|
|
967
985
|
);
|
|
968
|
-
})
|
|
986
|
+
});
|
|
987
|
+
for (const g of m)
|
|
988
|
+
g instanceof w && (g.motion.lifetime = "temporary");
|
|
989
|
+
const b = K({
|
|
969
990
|
out: f,
|
|
970
991
|
in: h,
|
|
971
992
|
borders: m
|
|
972
|
-
})
|
|
973
|
-
return b.
|
|
974
|
-
g
|
|
975
|
-
const
|
|
976
|
-
for (const A of [
|
|
993
|
+
});
|
|
994
|
+
return b.onDispose = () => {
|
|
995
|
+
const g = l.positionedParent;
|
|
996
|
+
for (const E of [
|
|
977
997
|
"topLeft",
|
|
978
998
|
"topRight",
|
|
979
999
|
"bottomLeft",
|
|
980
1000
|
"bottomRight"
|
|
981
1001
|
]) {
|
|
982
|
-
const
|
|
983
|
-
|
|
1002
|
+
const C = a[E];
|
|
1003
|
+
C.parentElement === g && g.removeChild(C);
|
|
984
1004
|
}
|
|
985
1005
|
}, b;
|
|
986
1006
|
}
|
|
987
1007
|
};
|
|
988
|
-
return k({ forward:
|
|
1008
|
+
return k({ forward: i, backward: i });
|
|
989
1009
|
};
|
|
990
|
-
function
|
|
1010
|
+
function ji(t = {}, e = {}) {
|
|
991
1011
|
const { options: n } = t, o = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
|
|
992
|
-
return
|
|
1012
|
+
return D(Nn(o), e.override);
|
|
993
1013
|
}
|
|
994
|
-
function
|
|
1014
|
+
function Wn(t) {
|
|
995
1015
|
if (!t) return null;
|
|
996
1016
|
if (t.includes("/")) {
|
|
997
1017
|
const n = t.split("/");
|
|
998
1018
|
if (n.length !== 2) return null;
|
|
999
|
-
const o = Number.parseFloat(n[0] ?? ""),
|
|
1000
|
-
return Number.isFinite(o) && Number.isFinite(
|
|
1019
|
+
const o = Number.parseFloat(n[0] ?? ""), i = Number.parseFloat(n[1] ?? "");
|
|
1020
|
+
return Number.isFinite(o) && Number.isFinite(i) && o > 0 && i > 0 ? o / i : null;
|
|
1001
1021
|
}
|
|
1002
1022
|
const e = Number.parseFloat(t);
|
|
1003
1023
|
return Number.isFinite(e) && e > 0 ? e : null;
|
|
1004
1024
|
}
|
|
1005
|
-
function
|
|
1025
|
+
function Vn(t) {
|
|
1006
1026
|
return t === "contain" || t === "cover" ? t : null;
|
|
1007
1027
|
}
|
|
1008
1028
|
function Rt(t) {
|
|
1009
1029
|
return t.tagName === "IMG";
|
|
1010
1030
|
}
|
|
1011
|
-
function
|
|
1031
|
+
function he(t) {
|
|
1012
1032
|
var n;
|
|
1013
1033
|
if (Rt(t)) return t;
|
|
1014
1034
|
if (t.tagName === "PICTURE" || t.tagName === "VIDEO")
|
|
1015
1035
|
return null;
|
|
1016
1036
|
const e = [];
|
|
1017
1037
|
for (const o of Array.from(t.children)) {
|
|
1018
|
-
const
|
|
1019
|
-
((n =
|
|
1038
|
+
const i = o;
|
|
1039
|
+
((n = i.getAttribute) == null ? void 0 : n.call(i, "data-ssgoi-crossfade")) == null && Rt(i) && e.push(i);
|
|
1020
1040
|
}
|
|
1021
1041
|
return e.length === 1 ? e[0] ?? null : null;
|
|
1022
1042
|
}
|
|
1023
|
-
function
|
|
1043
|
+
function Xn(t) {
|
|
1024
1044
|
var l, a;
|
|
1025
1045
|
if (!Rt(t)) return null;
|
|
1026
1046
|
const e = t, n = e.naturalWidth, o = e.naturalHeight;
|
|
1027
1047
|
if (typeof n == "number" && typeof o == "number" && Number.isFinite(n) && Number.isFinite(o) && n > 0 && o > 0)
|
|
1028
1048
|
return n / o;
|
|
1029
|
-
const
|
|
1049
|
+
const i = ((l = t.getAttribute("width")) == null ? void 0 : l.trim()) ?? "", r = ((a = t.getAttribute("height")) == null ? void 0 : a.trim()) ?? "", c = i === "" ? Number.NaN : Number(i), s = r === "" ? Number.NaN : Number(r);
|
|
1030
1050
|
return Number.isFinite(c) && Number.isFinite(s) && c > 0 && s > 0 ? c / s : null;
|
|
1031
1051
|
}
|
|
1032
|
-
function
|
|
1052
|
+
function Bn(t) {
|
|
1033
1053
|
const e = t.trim().toLowerCase().replace(/\s+/g, " ");
|
|
1034
1054
|
return e === "" || e === "center" || e === "center center" || e === "50% 50%";
|
|
1035
1055
|
}
|
|
1036
|
-
function
|
|
1056
|
+
function Q(t) {
|
|
1037
1057
|
if (typeof getComputedStyle == "function")
|
|
1038
1058
|
try {
|
|
1039
1059
|
return getComputedStyle(t);
|
|
@@ -1041,10 +1061,10 @@ function J(t) {
|
|
|
1041
1061
|
}
|
|
1042
1062
|
return t.style;
|
|
1043
1063
|
}
|
|
1044
|
-
function
|
|
1045
|
-
const e =
|
|
1064
|
+
function Un(t) {
|
|
1065
|
+
const e = Q(t), n = Bn(e.objectPosition ?? "");
|
|
1046
1066
|
return {
|
|
1047
|
-
fit: n ?
|
|
1067
|
+
fit: n ? Vn(e.objectFit ?? null) : null,
|
|
1048
1068
|
centered: n
|
|
1049
1069
|
};
|
|
1050
1070
|
}
|
|
@@ -1056,7 +1076,7 @@ function Mt(t) {
|
|
|
1056
1076
|
return Number.isFinite(n) && n >= 0 ? n : null;
|
|
1057
1077
|
}
|
|
1058
1078
|
function It(t) {
|
|
1059
|
-
const e =
|
|
1079
|
+
const e = Q(t), n = [
|
|
1060
1080
|
e.borderTopLeftRadius,
|
|
1061
1081
|
e.borderTopRightRadius,
|
|
1062
1082
|
e.borderBottomRightRadius,
|
|
@@ -1064,21 +1084,21 @@ function It(t) {
|
|
|
1064
1084
|
].map(Mt), o = n[0];
|
|
1065
1085
|
if (o == null)
|
|
1066
1086
|
return { radius: 0, supported: !1 };
|
|
1067
|
-
const
|
|
1068
|
-
(
|
|
1087
|
+
const i = n.every(
|
|
1088
|
+
(r) => r !== null && Math.abs(r - o) < 1e-3
|
|
1069
1089
|
);
|
|
1070
|
-
return { radius:
|
|
1090
|
+
return { radius: i ? o : 0, supported: i };
|
|
1071
1091
|
}
|
|
1072
|
-
function
|
|
1073
|
-
var
|
|
1092
|
+
function jn(t, e) {
|
|
1093
|
+
var i;
|
|
1074
1094
|
if (!e) return null;
|
|
1075
|
-
const n = (
|
|
1095
|
+
const n = (i = t.getAttribute(e)) == null ? void 0 : i.trim();
|
|
1076
1096
|
if (n == null || n === "") return null;
|
|
1077
1097
|
const o = Number.parseFloat(n);
|
|
1078
1098
|
return Number.isFinite(o) && o >= 0 ? o : null;
|
|
1079
1099
|
}
|
|
1080
|
-
function
|
|
1081
|
-
const e =
|
|
1100
|
+
function Zn(t) {
|
|
1101
|
+
const e = Q(t);
|
|
1082
1102
|
return [
|
|
1083
1103
|
e.paddingTop,
|
|
1084
1104
|
e.paddingRight,
|
|
@@ -1090,17 +1110,17 @@ function Un(t) {
|
|
|
1090
1110
|
e.borderLeftWidth
|
|
1091
1111
|
].every((o) => o ? Mt(o) === 0 : !0);
|
|
1092
1112
|
}
|
|
1093
|
-
function
|
|
1094
|
-
const e =
|
|
1113
|
+
function Gn(t) {
|
|
1114
|
+
const e = Q(t), n = (o) => o === "hidden" || o === "clip";
|
|
1095
1115
|
return n(e.overflowX) && n(e.overflowY);
|
|
1096
1116
|
}
|
|
1097
|
-
function
|
|
1117
|
+
function N(t) {
|
|
1098
1118
|
return t.left + t.width / 2;
|
|
1099
1119
|
}
|
|
1100
|
-
function
|
|
1120
|
+
function W(t) {
|
|
1101
1121
|
return t.top + t.height / 2;
|
|
1102
1122
|
}
|
|
1103
|
-
function
|
|
1123
|
+
function j(t, e) {
|
|
1104
1124
|
return {
|
|
1105
1125
|
top: Math.max(0, e.top - t.top),
|
|
1106
1126
|
right: Math.max(0, t.left + t.width - (e.left + e.width)),
|
|
@@ -1109,29 +1129,29 @@ function U(t, e) {
|
|
|
1109
1129
|
};
|
|
1110
1130
|
}
|
|
1111
1131
|
function Ot(t, e) {
|
|
1112
|
-
const n = Math.max(t.left, e.left), o = Math.max(t.top, e.top),
|
|
1113
|
-
return
|
|
1132
|
+
const n = Math.max(t.left, e.left), o = Math.max(t.top, e.top), i = Math.min(t.left + t.width, e.left + e.width), r = Math.min(t.top + t.height, e.top + e.height);
|
|
1133
|
+
return i > n && r > o ? { left: n, top: o, width: i - n, height: r - o } : null;
|
|
1114
1134
|
}
|
|
1115
|
-
function
|
|
1135
|
+
function G(t, e) {
|
|
1116
1136
|
return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
|
|
1117
1137
|
}
|
|
1118
|
-
function
|
|
1138
|
+
function qn(t, e, n) {
|
|
1119
1139
|
const o = t.width / t.height;
|
|
1120
|
-
let
|
|
1121
|
-
return n === "contain" ? o > e ? (
|
|
1122
|
-
left: t.left + (t.width -
|
|
1123
|
-
top: t.top + (t.height -
|
|
1124
|
-
width:
|
|
1125
|
-
height:
|
|
1140
|
+
let i, r;
|
|
1141
|
+
return n === "contain" ? o > e ? (r = t.height, i = r * e) : (i = t.width, r = i / e) : o > e ? (i = t.width, r = i / e) : (r = t.height, i = r * e), {
|
|
1142
|
+
left: t.left + (t.width - i) / 2,
|
|
1143
|
+
top: t.top + (t.height - r) / 2,
|
|
1144
|
+
width: i,
|
|
1145
|
+
height: r
|
|
1126
1146
|
};
|
|
1127
1147
|
}
|
|
1128
|
-
function
|
|
1129
|
-
const o = e !== null && n !== null && t.width > 0 && t.height > 0 ?
|
|
1148
|
+
function ye(t, e, n) {
|
|
1149
|
+
const o = e !== null && n !== null && t.width > 0 && t.height > 0 ? qn(t, e, n) : t, i = n === "contain" ? o : t;
|
|
1130
1150
|
return {
|
|
1131
1151
|
bbox: t,
|
|
1132
1152
|
content: o,
|
|
1133
|
-
window:
|
|
1134
|
-
clipInset:
|
|
1153
|
+
window: i,
|
|
1154
|
+
clipInset: j(o, i),
|
|
1135
1155
|
aspectRatio: e,
|
|
1136
1156
|
fit: n,
|
|
1137
1157
|
radius: 0,
|
|
@@ -1144,14 +1164,14 @@ function fe(t, e, n) {
|
|
|
1144
1164
|
}
|
|
1145
1165
|
function _t(t, e, n) {
|
|
1146
1166
|
return {
|
|
1147
|
-
...
|
|
1167
|
+
...ye(t, null, null),
|
|
1148
1168
|
radius: e,
|
|
1149
1169
|
radiusSource: n,
|
|
1150
1170
|
bboxRadius: e,
|
|
1151
1171
|
bboxRadiusSource: n
|
|
1152
1172
|
};
|
|
1153
1173
|
}
|
|
1154
|
-
function
|
|
1174
|
+
function me(t, e) {
|
|
1155
1175
|
const n = t.aspectRatio, o = e.aspectRatio;
|
|
1156
1176
|
return t.contentAware && e.contentAware && n !== null && o !== null && Math.abs(n - o) / Math.max(n, o) < 0.01;
|
|
1157
1177
|
}
|
|
@@ -1162,165 +1182,139 @@ function ne(t) {
|
|
|
1162
1182
|
t.bboxRadiusSource
|
|
1163
1183
|
);
|
|
1164
1184
|
}
|
|
1165
|
-
function
|
|
1166
|
-
return
|
|
1167
|
-
}
|
|
1168
|
-
function
|
|
1169
|
-
const
|
|
1170
|
-
t.getAttribute(o.legacyAspectRatioAttribute) ?? (
|
|
1171
|
-
) : null, s = c ?? (
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1185
|
+
function ge(t, e) {
|
|
1186
|
+
return me(t, e) ? [t, e] : [ne(t), ne(e)];
|
|
1187
|
+
}
|
|
1188
|
+
function Kn(t, e, n, o) {
|
|
1189
|
+
const i = he(t), r = i ? n(i) : e, c = o.legacyAspectRatioAttribute ? Wn(
|
|
1190
|
+
t.getAttribute(o.legacyAspectRatioAttribute) ?? (i == null ? void 0 : i.getAttribute(o.legacyAspectRatioAttribute)) ?? null
|
|
1191
|
+
) : null, s = c ?? (i ? Xn(i) : null), l = i ? Un(i) : { fit: null, centered: !0 }, a = l.centered && (i === null || Zn(i)) ? l.fit ?? (c !== null ? o.fallbackFit ?? null : null) : null, d = ye(r, s, a), u = Gn(t), p = i !== null && i !== t && u ? Ot(d.window, e) : d.window, f = jn(t, o.legacyRadiusAttribute), h = i === t || u, m = h ? It(t) : { radius: 0, supported: !0 }, b = f ?? m.radius, g = f !== null ? "legacy" : m.supported ? m.radius > 0 ? "computed" : "none" : "unsupported", E = [];
|
|
1192
|
+
p && h && G(p, e) && E.push(m), p && i && G(p, r) && E.push(It(i));
|
|
1193
|
+
const C = E.every(($) => $.supported), v = Math.max(
|
|
1174
1194
|
0,
|
|
1175
|
-
...
|
|
1176
|
-
),
|
|
1177
|
-
return !
|
|
1195
|
+
...E.map(($) => $.radius)
|
|
1196
|
+
), A = f ?? v, S = f !== null ? "legacy" : C ? v > 0 ? "computed" : "none" : "unsupported";
|
|
1197
|
+
return !p || S === "unsupported" ? _t(e, b, g) : {
|
|
1178
1198
|
...d,
|
|
1179
1199
|
bbox: e,
|
|
1180
|
-
window:
|
|
1181
|
-
clipInset:
|
|
1182
|
-
radius:
|
|
1183
|
-
radiusSource:
|
|
1200
|
+
window: p,
|
|
1201
|
+
clipInset: j(d.content, p),
|
|
1202
|
+
radius: A,
|
|
1203
|
+
radiusSource: S,
|
|
1184
1204
|
bboxRadius: b,
|
|
1185
1205
|
bboxRadiusSource: g,
|
|
1186
|
-
mediaElement: d.contentAware ?
|
|
1206
|
+
mediaElement: d.contentAware ? i : null
|
|
1187
1207
|
};
|
|
1188
1208
|
}
|
|
1189
|
-
function
|
|
1190
|
-
const
|
|
1209
|
+
function rt(t, e, n, o) {
|
|
1210
|
+
const i = Kn(
|
|
1191
1211
|
t,
|
|
1192
1212
|
e,
|
|
1193
1213
|
n,
|
|
1194
1214
|
o
|
|
1195
1215
|
);
|
|
1196
|
-
if (!o.clipRoot ||
|
|
1197
|
-
return
|
|
1198
|
-
let
|
|
1216
|
+
if (!o.clipRoot || i.radiusSource === "unsupported")
|
|
1217
|
+
return i;
|
|
1218
|
+
let r = i.window, c = i.radius, s = [c, c, c, c], l = i.radiusSource, a = t.parentElement;
|
|
1199
1219
|
for (; a && a !== o.clipRoot; ) {
|
|
1200
|
-
const
|
|
1201
|
-
if (
|
|
1220
|
+
const u = Q(a), y = (h) => h === "hidden" || h === "clip" || h === "auto" || h === "scroll", p = y(u.overflowX), f = y(u.overflowY);
|
|
1221
|
+
if (p || f) {
|
|
1202
1222
|
if (![
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
].every((
|
|
1208
|
-
return
|
|
1223
|
+
u.borderTopWidth,
|
|
1224
|
+
u.borderRightWidth,
|
|
1225
|
+
u.borderBottomWidth,
|
|
1226
|
+
u.borderLeftWidth
|
|
1227
|
+
].every((S) => Mt(S) === 0) || a.offsetWidth && a.clientWidth && a.offsetWidth - a.clientWidth > 1 || a.offsetHeight && a.clientHeight && a.offsetHeight - a.clientHeight > 1)
|
|
1228
|
+
return i;
|
|
1209
1229
|
const m = n(a), b = {
|
|
1210
|
-
left:
|
|
1211
|
-
top: f ? m.top :
|
|
1212
|
-
width:
|
|
1213
|
-
height: f ? m.height :
|
|
1214
|
-
}, g = Ot(
|
|
1215
|
-
if (!g) return
|
|
1216
|
-
const
|
|
1217
|
-
if (!
|
|
1218
|
-
if (
|
|
1219
|
-
l !== "legacy" && (c = Math.max(c,
|
|
1220
|
-
(
|
|
1230
|
+
left: p ? m.left : r.left,
|
|
1231
|
+
top: f ? m.top : r.top,
|
|
1232
|
+
width: p ? m.width : r.width,
|
|
1233
|
+
height: f ? m.height : r.height
|
|
1234
|
+
}, g = Ot(r, b);
|
|
1235
|
+
if (!g) return i;
|
|
1236
|
+
const E = It(a);
|
|
1237
|
+
if (!E.supported) return i;
|
|
1238
|
+
if (p && f && G(r, m))
|
|
1239
|
+
l !== "legacy" && (c = Math.max(c, E.radius), s = s.map(
|
|
1240
|
+
(S) => Math.max(S, E.radius)
|
|
1221
1241
|
), c > 0 && (l = "computed"));
|
|
1222
|
-
else if (
|
|
1223
|
-
const
|
|
1224
|
-
left: m.left +
|
|
1225
|
-
top: m.top +
|
|
1226
|
-
width: m.width - 2 *
|
|
1227
|
-
height: m.height - 2 *
|
|
1242
|
+
else if (E.radius > 0) {
|
|
1243
|
+
const S = {
|
|
1244
|
+
left: m.left + E.radius,
|
|
1245
|
+
top: m.top + E.radius,
|
|
1246
|
+
width: m.width - 2 * E.radius,
|
|
1247
|
+
height: m.height - 2 * E.radius
|
|
1228
1248
|
};
|
|
1229
|
-
if (!
|
|
1230
|
-
return
|
|
1249
|
+
if (!G(Ot(r, S) ?? m, r))
|
|
1250
|
+
return i;
|
|
1231
1251
|
}
|
|
1232
|
-
const
|
|
1233
|
-
[
|
|
1234
|
-
[
|
|
1235
|
-
[
|
|
1236
|
-
[
|
|
1252
|
+
const C = j(r, g), v = [
|
|
1253
|
+
[C.top, C.left],
|
|
1254
|
+
[C.top, C.right],
|
|
1255
|
+
[C.bottom, C.right],
|
|
1256
|
+
[C.bottom, C.left]
|
|
1237
1257
|
];
|
|
1238
|
-
for (let
|
|
1239
|
-
const
|
|
1240
|
-
if (
|
|
1241
|
-
|
|
1258
|
+
for (let S = 0; S < 4; S++) {
|
|
1259
|
+
const $ = Math.max(...v[S]), R = s[S];
|
|
1260
|
+
if ($ > 0.01 && $ < R) return i;
|
|
1261
|
+
$ > 0.01 && (s[S] = 0);
|
|
1242
1262
|
}
|
|
1243
|
-
const
|
|
1244
|
-
if (g.width <
|
|
1245
|
-
return
|
|
1246
|
-
|
|
1263
|
+
const A = Math.max(...s);
|
|
1264
|
+
if (g.width < A || g.height < A)
|
|
1265
|
+
return i;
|
|
1266
|
+
r = g;
|
|
1247
1267
|
}
|
|
1248
1268
|
a = a.parentElement;
|
|
1249
1269
|
}
|
|
1250
|
-
const d =
|
|
1270
|
+
const d = G(i.bbox, r);
|
|
1251
1271
|
return {
|
|
1252
|
-
...
|
|
1253
|
-
window:
|
|
1254
|
-
clipInset:
|
|
1272
|
+
...i,
|
|
1273
|
+
window: r,
|
|
1274
|
+
clipInset: j(i.content, r),
|
|
1255
1275
|
radius: c,
|
|
1256
1276
|
radiusSource: l,
|
|
1257
|
-
...s.some((
|
|
1277
|
+
...s.some((u) => u !== c) ? { cornerRadii: s } : {},
|
|
1258
1278
|
...d ? { bboxRadius: c, bboxRadiusSource: l } : {}
|
|
1259
1279
|
};
|
|
1260
1280
|
}
|
|
1261
|
-
function
|
|
1262
|
-
const
|
|
1281
|
+
function be(t, e, n, o, i) {
|
|
1282
|
+
const r = n.width / o, c = n.height / i;
|
|
1263
1283
|
return {
|
|
1264
|
-
left:
|
|
1265
|
-
top:
|
|
1266
|
-
width:
|
|
1284
|
+
left: N(t) + (N(n) - N(e)) / o - r / 2,
|
|
1285
|
+
top: W(t) + (W(n) - W(e)) / i - c / 2,
|
|
1286
|
+
width: r,
|
|
1267
1287
|
height: c
|
|
1268
1288
|
};
|
|
1269
1289
|
}
|
|
1270
|
-
const
|
|
1290
|
+
const Jn = {
|
|
1271
1291
|
enter: "contain",
|
|
1272
1292
|
exit: "cover",
|
|
1273
1293
|
legacy: "contain"
|
|
1274
1294
|
};
|
|
1275
|
-
function
|
|
1276
|
-
return
|
|
1277
|
-
}
|
|
1278
|
-
const
|
|
1279
|
-
function
|
|
1280
|
-
const e =
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
e.users.add(n), wt.set(t, e);
|
|
1287
|
-
let o = !1;
|
|
1288
|
-
return {
|
|
1289
|
-
opacity: Number.isFinite(e.opacity) ? e.opacity : 1,
|
|
1290
|
-
set: (r) => {
|
|
1291
|
-
n.value = r, t.style.opacity = String(r);
|
|
1292
|
-
},
|
|
1293
|
-
restore: () => {
|
|
1294
|
-
if (!o) {
|
|
1295
|
-
if (o = !0, e.users.delete(n), e.users.size > 0) {
|
|
1296
|
-
const r = Array.from(e.users), i = r[r.length - 1];
|
|
1297
|
-
(i == null ? void 0 : i.value) !== void 0 && (t.style.opacity = String(i.value));
|
|
1298
|
-
return;
|
|
1299
|
-
}
|
|
1300
|
-
e.value ? t.style.setProperty("opacity", e.value, e.priority) : t.style.removeProperty("opacity"), wt.delete(t);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
};
|
|
1304
|
-
}
|
|
1305
|
-
function Dt(t) {
|
|
1306
|
-
const e = t.cloneNode(!0), n = (o, r) => {
|
|
1307
|
-
const i = getComputedStyle(o), c = r.style;
|
|
1308
|
-
for (const l of Array.from(i))
|
|
1309
|
-
c.setProperty(l, i.getPropertyValue(l));
|
|
1310
|
-
for (const { name: l } of Array.from(r.attributes))
|
|
1311
|
-
(l === "id" || l.startsWith("data-hero-") || l.startsWith("data-zoom-")) && r.removeAttribute(l);
|
|
1295
|
+
function B(t) {
|
|
1296
|
+
return Jn[t];
|
|
1297
|
+
}
|
|
1298
|
+
const st = "data-ssgoi-crossfade", U = (t) => Math.min(1, Math.max(0, t));
|
|
1299
|
+
function Tt(t) {
|
|
1300
|
+
const e = t.cloneNode(!0), n = (o, i) => {
|
|
1301
|
+
const r = getComputedStyle(o), c = i.style;
|
|
1302
|
+
for (const l of Array.from(r))
|
|
1303
|
+
c.setProperty(l, r.getPropertyValue(l));
|
|
1304
|
+
for (const { name: l } of Array.from(i.attributes))
|
|
1305
|
+
(l === "id" || l.startsWith("data-hero-") || l.startsWith("data-zoom-")) && i.removeAttribute(l);
|
|
1312
1306
|
if (o.tagName === "IMG") {
|
|
1313
1307
|
const l = o;
|
|
1314
|
-
l.currentSrc && (
|
|
1308
|
+
l.currentSrc && (i.removeAttribute("srcset"), i.removeAttribute("sizes"), i.setAttribute("src", l.currentSrc)), i.setAttribute("loading", "eager");
|
|
1315
1309
|
}
|
|
1316
1310
|
c.animation = "none", c.transition = "none";
|
|
1317
|
-
const s = Array.from(
|
|
1311
|
+
const s = Array.from(i.children);
|
|
1318
1312
|
Array.from(o.children).forEach((l, a) => {
|
|
1319
1313
|
const d = s[a];
|
|
1320
|
-
d && (l.hasAttribute(
|
|
1314
|
+
d && (l.hasAttribute(st) || l.hasAttribute("data-hero-placeholder") ? d.remove() : n(l, d));
|
|
1321
1315
|
});
|
|
1322
1316
|
};
|
|
1323
|
-
return n(t, e), e.setAttribute(
|
|
1317
|
+
return n(t, e), e.setAttribute(st, ""), e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", ""), Object.assign(e.style, {
|
|
1324
1318
|
position: "absolute",
|
|
1325
1319
|
left: "0",
|
|
1326
1320
|
top: "0",
|
|
@@ -1342,7 +1336,7 @@ function Dt(t) {
|
|
|
1342
1336
|
}), e;
|
|
1343
1337
|
}
|
|
1344
1338
|
function kt(t, e) {
|
|
1345
|
-
const n =
|
|
1339
|
+
const n = z(t, e);
|
|
1346
1340
|
return {
|
|
1347
1341
|
box: {
|
|
1348
1342
|
left: n.left + t.scrollLeft,
|
|
@@ -1354,17 +1348,17 @@ function kt(t, e) {
|
|
|
1354
1348
|
scaleY: e.offsetHeight && Math.abs(n.height - e.offsetHeight) > 0.5 ? n.height / e.offsetHeight : 1
|
|
1355
1349
|
};
|
|
1356
1350
|
}
|
|
1357
|
-
function
|
|
1358
|
-
const { box: n, scaleX: o, scaleY:
|
|
1359
|
-
return `translate(${
|
|
1351
|
+
function Qn(t, e) {
|
|
1352
|
+
const { box: n, scaleX: o, scaleY: i } = e, r = (t.left + t.width / 2 - n.left - n.width / 2) / o, c = (t.top + t.height / 2 - n.top - n.height / 2) / i;
|
|
1353
|
+
return `translate(${r}px, ${c}px) scale(${t.width / n.width}, ${t.height / n.height})`;
|
|
1360
1354
|
}
|
|
1361
|
-
const
|
|
1362
|
-
function
|
|
1363
|
-
return t.fromEl.getAttribute(
|
|
1355
|
+
const at = "data-hero-enter-key", ct = "data-hero-exit-key", q = "data-hero-key";
|
|
1356
|
+
function to(t, e) {
|
|
1357
|
+
return t.fromEl.getAttribute(at) === t.key && t.toEl.getAttribute(ct) === t.key ? !0 : t.fromEl.getAttribute(ct) === t.key && t.toEl.getAttribute(at) === t.key ? !1 : e === "backward" && t.fromEl.getAttribute(q) === t.key && t.toEl.getAttribute(q) === t.key;
|
|
1364
1358
|
}
|
|
1365
|
-
function
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1359
|
+
function eo(t, e, n, o, i) {
|
|
1360
|
+
const r = document.createElement("div");
|
|
1361
|
+
r.setAttribute("data-hero-layer", ""), r.setAttribute("aria-hidden", "true"), r.setAttribute("inert", ""), Object.assign(r.style, {
|
|
1368
1362
|
position: "absolute",
|
|
1369
1363
|
left: "0",
|
|
1370
1364
|
top: "0",
|
|
@@ -1372,11 +1366,11 @@ function Qn(t, e, n, o, r) {
|
|
|
1372
1366
|
height: "100%",
|
|
1373
1367
|
pointerEvents: "none",
|
|
1374
1368
|
isolation: "isolate",
|
|
1375
|
-
zIndex: String(Number(
|
|
1369
|
+
zIndex: String(Number(M) + 1)
|
|
1376
1370
|
});
|
|
1377
1371
|
const c = (a, d) => {
|
|
1378
|
-
const
|
|
1379
|
-
return Object.assign(
|
|
1372
|
+
const u = Tt(a);
|
|
1373
|
+
return Object.assign(u.style, {
|
|
1380
1374
|
left: `${d.left}px`,
|
|
1381
1375
|
top: `${d.top}px`,
|
|
1382
1376
|
width: `${d.width}px`,
|
|
@@ -1385,37 +1379,37 @@ function Qn(t, e, n, o, r) {
|
|
|
1385
1379
|
// Add the two weighted images inside the isolated layer so opaque
|
|
1386
1380
|
// images stay opaque at the midpoint instead of exposing list chrome.
|
|
1387
1381
|
mixBlendMode: "plus-lighter"
|
|
1388
|
-
}),
|
|
1382
|
+
}), i && (u.style.borderRadius = "0"), u;
|
|
1389
1383
|
}, s = c(t, n), l = c(e, o);
|
|
1390
|
-
return s.setAttribute("data-hero-layer-source", ""), l.setAttribute("data-hero-layer-destination", ""),
|
|
1384
|
+
return s.setAttribute("data-hero-layer-source", ""), l.setAttribute("data-hero-layer-destination", ""), r.append(l, s), { layer: r, source: s, destination: l };
|
|
1391
1385
|
}
|
|
1392
|
-
function
|
|
1386
|
+
function lt(t, e) {
|
|
1393
1387
|
const n = e.map((o) => ({
|
|
1394
1388
|
name: o,
|
|
1395
1389
|
value: t.style.getPropertyValue(o),
|
|
1396
1390
|
priority: t.style.getPropertyPriority(o)
|
|
1397
1391
|
}));
|
|
1398
1392
|
return () => {
|
|
1399
|
-
for (const { name: o, value:
|
|
1400
|
-
|
|
1393
|
+
for (const { name: o, value: i, priority: r } of n)
|
|
1394
|
+
i ? t.style.setProperty(o, i, r) : t.style.removeProperty(o);
|
|
1401
1395
|
};
|
|
1402
1396
|
}
|
|
1403
|
-
function
|
|
1397
|
+
function no(t) {
|
|
1404
1398
|
const e = t.getAttribute("data-hero-transitioning");
|
|
1405
1399
|
return t.setAttribute("data-hero-transitioning", ""), () => {
|
|
1406
1400
|
e === null ? t.removeAttribute("data-hero-transitioning") : t.setAttribute("data-hero-transitioning", e);
|
|
1407
1401
|
};
|
|
1408
1402
|
}
|
|
1409
|
-
function
|
|
1410
|
-
const n =
|
|
1411
|
-
return t.style.zIndex = L, e.style.zIndex =
|
|
1412
|
-
n(), o();
|
|
1403
|
+
function oo(t, e) {
|
|
1404
|
+
const n = lt(t, ["z-index"]), o = lt(e, ["z-index", "position"]);
|
|
1405
|
+
return t.style.zIndex = L, e.style.zIndex = M, getComputedStyle(e).position === "static" && (e.style.position = "relative"), (i = () => !0) => {
|
|
1406
|
+
i(t) && n(), i(e) && o();
|
|
1413
1407
|
};
|
|
1414
1408
|
}
|
|
1415
|
-
function
|
|
1409
|
+
function io(t, e, n) {
|
|
1416
1410
|
if (t.tagName !== "IMG") return () => {
|
|
1417
1411
|
};
|
|
1418
|
-
const o = getComputedStyle(t),
|
|
1412
|
+
const o = getComputedStyle(t), i = (y) => Number.parseFloat(y) || 0, r = o.boxSizing === "border-box", c = i(o.width) + (r ? 0 : i(o.paddingLeft) + i(o.paddingRight) + i(o.borderLeftWidth) + i(o.borderRightWidth)), s = i(o.height) + (r ? 0 : i(o.paddingTop) + i(o.paddingBottom) + i(o.borderTopWidth) + i(o.borderBottomWidth)), l = e.width * c / n.width, a = e.height * s / n.height;
|
|
1419
1413
|
let d = null;
|
|
1420
1414
|
o.position !== "absolute" && o.position !== "fixed" && (d = document.createElement("span"), d.setAttribute("data-hero-placeholder", ""), d.setAttribute("aria-hidden", "true"), Object.assign(d.style, {
|
|
1421
1415
|
display: o.display === "inline" ? "inline-block" : o.display,
|
|
@@ -1431,7 +1425,7 @@ function no(t, e, n) {
|
|
|
1431
1425
|
visibility: "hidden",
|
|
1432
1426
|
pointerEvents: "none"
|
|
1433
1427
|
}), t.before(d));
|
|
1434
|
-
const
|
|
1428
|
+
const u = lt(t, [
|
|
1435
1429
|
"position",
|
|
1436
1430
|
"left",
|
|
1437
1431
|
"top",
|
|
@@ -1466,19 +1460,19 @@ function no(t, e, n) {
|
|
|
1466
1460
|
margin: "0",
|
|
1467
1461
|
flex: "none"
|
|
1468
1462
|
}), () => {
|
|
1469
|
-
|
|
1463
|
+
u(), d == null || d.remove();
|
|
1470
1464
|
};
|
|
1471
1465
|
}
|
|
1472
|
-
function
|
|
1473
|
-
const o = (s, l) => `${l > 0 ? s / l * 100 : 0}%`,
|
|
1466
|
+
function dt(t, e, n) {
|
|
1467
|
+
const o = (s, l) => `${l > 0 ? s / l * 100 : 0}%`, i = [
|
|
1474
1468
|
o(e.top, t.height),
|
|
1475
1469
|
o(e.right, t.width),
|
|
1476
1470
|
o(e.bottom, t.height),
|
|
1477
1471
|
o(e.left, t.width)
|
|
1478
|
-
].join(" "),
|
|
1479
|
-
return `inset(${
|
|
1472
|
+
].join(" "), r = n.map((s) => o(s.x, t.width)).join(" "), c = n.map((s) => o(s.y, t.height)).join(" ");
|
|
1473
|
+
return `inset(${i} round ${r} / ${c})`;
|
|
1480
1474
|
}
|
|
1481
|
-
class
|
|
1475
|
+
class ro {
|
|
1482
1476
|
constructor() {
|
|
1483
1477
|
_(this, "previousFromOpacity", "");
|
|
1484
1478
|
}
|
|
@@ -1488,85 +1482,85 @@ class oo {
|
|
|
1488
1482
|
});
|
|
1489
1483
|
}
|
|
1490
1484
|
contribute(e) {
|
|
1491
|
-
return e.
|
|
1492
|
-
e.from.style.opacity = this.previousFromOpacity;
|
|
1485
|
+
return e.onDispose((n) => {
|
|
1486
|
+
n.owns(e.from) && (e.from.style.opacity = this.previousFromOpacity);
|
|
1493
1487
|
}), {};
|
|
1494
1488
|
}
|
|
1495
1489
|
}
|
|
1496
|
-
const
|
|
1497
|
-
function
|
|
1490
|
+
const so = () => new ro();
|
|
1491
|
+
function ao(t, e) {
|
|
1498
1492
|
const n = new Set(e), o = /* @__PURE__ */ new Set();
|
|
1499
1493
|
for (const c of n) {
|
|
1500
1494
|
let s = c.parentElement;
|
|
1501
1495
|
for (; s && s !== t; )
|
|
1502
1496
|
o.add(s), s = s.parentElement;
|
|
1503
1497
|
}
|
|
1504
|
-
const
|
|
1498
|
+
const i = [], r = (c) => {
|
|
1505
1499
|
var s, l;
|
|
1506
|
-
if (!(n.has(c) || ((s = c.getAttribute) == null ? void 0 : s.call(c,
|
|
1500
|
+
if (!(n.has(c) || ((s = c.getAttribute) == null ? void 0 : s.call(c, st)) != null || ((l = c.getAttribute) == null ? void 0 : l.call(c, "data-hero-placeholder")) != null)) {
|
|
1507
1501
|
if (c !== t && !o.has(c)) {
|
|
1508
|
-
|
|
1502
|
+
i.push(c);
|
|
1509
1503
|
return;
|
|
1510
1504
|
}
|
|
1511
1505
|
for (const a of Array.from(c.children))
|
|
1512
|
-
a instanceof HTMLElement &&
|
|
1506
|
+
a instanceof HTMLElement && r(a);
|
|
1513
1507
|
}
|
|
1514
1508
|
};
|
|
1515
|
-
return
|
|
1509
|
+
return r(t), i;
|
|
1516
1510
|
}
|
|
1517
|
-
class
|
|
1511
|
+
class co {
|
|
1518
1512
|
contribute(e) {
|
|
1519
|
-
const { from: n, to: o, resolved:
|
|
1520
|
-
(
|
|
1521
|
-
), l = (s.length ?
|
|
1522
|
-
element:
|
|
1523
|
-
opacity:
|
|
1524
|
-
willChange:
|
|
1525
|
-
targetOpacity: Number.parseFloat(getComputedStyle(
|
|
1513
|
+
const { from: n, to: o, resolved: i, physics: r, onDispose: c } = e, s = i.pairs.map(
|
|
1514
|
+
(p) => he(p.toEl) ?? p.toEl
|
|
1515
|
+
), l = (s.length ? ao(o, s) : [o]).map((p) => ({
|
|
1516
|
+
element: p,
|
|
1517
|
+
opacity: p.style.opacity,
|
|
1518
|
+
willChange: p.style.willChange,
|
|
1519
|
+
targetOpacity: Number.parseFloat(getComputedStyle(p).opacity) || 0
|
|
1526
1520
|
})), a = /* @__PURE__ */ new Set();
|
|
1527
|
-
for (const
|
|
1528
|
-
for (let f =
|
|
1521
|
+
for (const p of s)
|
|
1522
|
+
for (let f = p.parentElement; f && (a.add(f), f !== o); f = f.parentElement)
|
|
1529
1523
|
;
|
|
1530
|
-
const d = Array.from(a).map((
|
|
1531
|
-
element:
|
|
1532
|
-
color: getComputedStyle(
|
|
1533
|
-
previousColor:
|
|
1524
|
+
const d = Array.from(a).map((p) => ({
|
|
1525
|
+
element: p,
|
|
1526
|
+
color: getComputedStyle(p).backgroundColor,
|
|
1527
|
+
previousColor: p.style.backgroundColor
|
|
1534
1528
|
})).filter(
|
|
1535
|
-
({ color:
|
|
1536
|
-
),
|
|
1529
|
+
({ color: p }) => p && p !== "transparent" && p !== "rgba(0, 0, 0, 0)"
|
|
1530
|
+
), u = n.style.opacity, y = n.style.willChange;
|
|
1537
1531
|
n.style.willChange = "opacity";
|
|
1538
|
-
for (const { element:
|
|
1539
|
-
|
|
1540
|
-
for (const { element:
|
|
1541
|
-
|
|
1542
|
-
return c(() => {
|
|
1543
|
-
n.style.opacity =
|
|
1544
|
-
for (const { element:
|
|
1545
|
-
|
|
1546
|
-
for (const { element:
|
|
1547
|
-
|
|
1532
|
+
for (const { element: p } of l)
|
|
1533
|
+
p.style.opacity = "0", p.style.willChange = "opacity";
|
|
1534
|
+
for (const { element: p } of d)
|
|
1535
|
+
p.style.backgroundColor = "transparent";
|
|
1536
|
+
return c((p) => {
|
|
1537
|
+
p.owns(n) && (n.style.opacity = u, n.style.willChange = y);
|
|
1538
|
+
for (const { element: f, opacity: h, willChange: m } of l)
|
|
1539
|
+
p.owns(f) && (f.style.opacity = h, f.style.willChange = m);
|
|
1540
|
+
for (const { element: f, previousColor: h } of d)
|
|
1541
|
+
p.owns(f) && (f.style.backgroundColor = h);
|
|
1548
1542
|
}), {
|
|
1549
1543
|
out: [
|
|
1550
|
-
new
|
|
1544
|
+
new w({
|
|
1551
1545
|
element: n,
|
|
1552
|
-
integrator:
|
|
1553
|
-
style: (
|
|
1546
|
+
integrator: x.from(r),
|
|
1547
|
+
style: (p, f) => ({ opacity: f })
|
|
1554
1548
|
})
|
|
1555
1549
|
],
|
|
1556
1550
|
in: [
|
|
1557
1551
|
...l.map(
|
|
1558
|
-
({ element:
|
|
1559
|
-
element:
|
|
1560
|
-
integrator:
|
|
1552
|
+
({ element: p, targetOpacity: f }) => new w({
|
|
1553
|
+
element: p,
|
|
1554
|
+
integrator: x.from(r),
|
|
1561
1555
|
style: (h) => ({
|
|
1562
1556
|
opacity: Math.min(1, Math.max(0, h)) * f
|
|
1563
1557
|
})
|
|
1564
1558
|
})
|
|
1565
1559
|
),
|
|
1566
1560
|
...d.map(
|
|
1567
|
-
({ element:
|
|
1568
|
-
element:
|
|
1569
|
-
integrator:
|
|
1561
|
+
({ element: p, color: f }) => new w({
|
|
1562
|
+
element: p,
|
|
1563
|
+
integrator: x.from(r),
|
|
1570
1564
|
style: (h) => ({
|
|
1571
1565
|
backgroundColor: `color-mix(in srgb, ${f} ${Math.min(1, Math.max(0, h)) * 100}%, transparent)`
|
|
1572
1566
|
})
|
|
@@ -1576,118 +1570,118 @@ class so {
|
|
|
1576
1570
|
};
|
|
1577
1571
|
}
|
|
1578
1572
|
}
|
|
1579
|
-
const
|
|
1580
|
-
static:
|
|
1581
|
-
fade:
|
|
1582
|
-
},
|
|
1573
|
+
const lo = () => new co(), uo = {
|
|
1574
|
+
static: so,
|
|
1575
|
+
fade: lo
|
|
1576
|
+
}, po = {
|
|
1583
1577
|
spring: { stiffness: 320, damping: 30 }
|
|
1584
|
-
},
|
|
1578
|
+
}, fo = () => po, ho = {
|
|
1585
1579
|
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1586
|
-
},
|
|
1587
|
-
default:
|
|
1588
|
-
smooth:
|
|
1589
|
-
},
|
|
1580
|
+
}, yo = () => ho, mo = {
|
|
1581
|
+
default: fo,
|
|
1582
|
+
smooth: yo
|
|
1583
|
+
}, go = 700, bo = "data-hero-aspect-ratio", wo = "data-hero-radius";
|
|
1590
1584
|
function oe(t, e, n, o) {
|
|
1591
|
-
const
|
|
1592
|
-
const s =
|
|
1585
|
+
const i = (c) => {
|
|
1586
|
+
const s = z(t, c);
|
|
1593
1587
|
return {
|
|
1594
1588
|
left: s.left + t.scrollLeft,
|
|
1595
1589
|
top: s.top + t.scrollTop,
|
|
1596
1590
|
width: s.width,
|
|
1597
1591
|
height: s.height
|
|
1598
1592
|
};
|
|
1599
|
-
},
|
|
1600
|
-
return
|
|
1593
|
+
}, r = i(e);
|
|
1594
|
+
return rt(e, r, i, {
|
|
1601
1595
|
clipRoot: o,
|
|
1602
1596
|
fallbackFit: n,
|
|
1603
|
-
legacyAspectRatioAttribute:
|
|
1604
|
-
legacyRadiusAttribute:
|
|
1597
|
+
legacyAspectRatioAttribute: bo,
|
|
1598
|
+
legacyRadiusAttribute: wo
|
|
1605
1599
|
});
|
|
1606
1600
|
}
|
|
1607
|
-
function
|
|
1601
|
+
function et(t, e) {
|
|
1608
1602
|
const n = /* @__PURE__ */ new Map(), o = t.querySelectorAll(`[${e}]`);
|
|
1609
|
-
for (const
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1603
|
+
for (const i of Array.from(o)) {
|
|
1604
|
+
const r = i.getAttribute(e);
|
|
1605
|
+
r && (n.has(r) || n.set(r, i));
|
|
1612
1606
|
}
|
|
1613
1607
|
return n;
|
|
1614
1608
|
}
|
|
1615
|
-
function
|
|
1616
|
-
const n = [], o =
|
|
1609
|
+
function So(t, e) {
|
|
1610
|
+
const n = [], o = et(e, at), i = et(t, ct);
|
|
1617
1611
|
for (const [s, l] of o) {
|
|
1618
|
-
const a =
|
|
1612
|
+
const a = i.get(s);
|
|
1619
1613
|
a && n.push({
|
|
1620
1614
|
key: s,
|
|
1621
1615
|
fromEl: a,
|
|
1622
1616
|
toEl: l,
|
|
1623
|
-
fromFit:
|
|
1624
|
-
toFit:
|
|
1617
|
+
fromFit: B("exit"),
|
|
1618
|
+
toFit: B("enter")
|
|
1625
1619
|
});
|
|
1626
1620
|
}
|
|
1627
|
-
const
|
|
1628
|
-
for (const [s, l] of
|
|
1621
|
+
const r = et(t, at), c = et(e, ct);
|
|
1622
|
+
for (const [s, l] of r) {
|
|
1629
1623
|
const a = c.get(s);
|
|
1630
1624
|
a && n.push({
|
|
1631
1625
|
key: s,
|
|
1632
1626
|
fromEl: l,
|
|
1633
1627
|
toEl: a,
|
|
1634
|
-
fromFit:
|
|
1635
|
-
toFit:
|
|
1628
|
+
fromFit: B("enter"),
|
|
1629
|
+
toFit: B("exit")
|
|
1636
1630
|
});
|
|
1637
1631
|
}
|
|
1638
1632
|
return n;
|
|
1639
1633
|
}
|
|
1640
|
-
function
|
|
1634
|
+
function xo(t, e) {
|
|
1641
1635
|
const n = [], o = Array.from(
|
|
1642
|
-
e.querySelectorAll(`[${
|
|
1636
|
+
e.querySelectorAll(`[${q}]`)
|
|
1643
1637
|
);
|
|
1644
|
-
for (const
|
|
1645
|
-
const
|
|
1646
|
-
if (!
|
|
1638
|
+
for (const i of o) {
|
|
1639
|
+
const r = i.getAttribute(q);
|
|
1640
|
+
if (!r) continue;
|
|
1647
1641
|
const c = t.querySelector(
|
|
1648
|
-
`[${
|
|
1642
|
+
`[${q}="${r}"]`
|
|
1649
1643
|
);
|
|
1650
1644
|
c && n.push({
|
|
1651
|
-
key:
|
|
1645
|
+
key: r,
|
|
1652
1646
|
fromEl: c,
|
|
1653
|
-
toEl:
|
|
1654
|
-
fromFit:
|
|
1655
|
-
toFit:
|
|
1647
|
+
toEl: i,
|
|
1648
|
+
fromFit: B("legacy"),
|
|
1649
|
+
toFit: B("legacy")
|
|
1656
1650
|
});
|
|
1657
1651
|
}
|
|
1658
1652
|
return n;
|
|
1659
1653
|
}
|
|
1660
|
-
function
|
|
1661
|
-
const n =
|
|
1662
|
-
return n.length > 0 ? n :
|
|
1654
|
+
function Eo(t, e) {
|
|
1655
|
+
const n = So(t, e);
|
|
1656
|
+
return n.length > 0 ? n : xo(t, e);
|
|
1663
1657
|
}
|
|
1664
|
-
function
|
|
1665
|
-
return
|
|
1658
|
+
function $o(t, e) {
|
|
1659
|
+
return ge(t, e);
|
|
1666
1660
|
}
|
|
1667
1661
|
function Co(t, e) {
|
|
1668
1662
|
return t.radiusSource === "unsupported" || e.radiusSource === "unsupported" ? !1 : t.mediaElement !== null || e.mediaElement !== null || t.radiusSource === "computed" || t.radiusSource === "legacy" || e.radiusSource === "computed" || e.radiusSource === "legacy";
|
|
1669
1663
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const { fromEl:
|
|
1672
|
-
oe(t,
|
|
1673
|
-
oe(t, c, e.toFit,
|
|
1674
|
-
), a = s.content, d = s.window,
|
|
1675
|
-
if (a.width === 0 || a.height === 0 || d.width === 0 || d.height === 0 ||
|
|
1664
|
+
function Ao(t, e, n, o, i) {
|
|
1665
|
+
const { fromEl: r, toEl: c } = e, [s, l] = $o(
|
|
1666
|
+
oe(t, r, e.fromFit, o),
|
|
1667
|
+
oe(t, c, e.toFit, i)
|
|
1668
|
+
), a = s.content, d = s.window, u = l.content, y = l.window, p = l.clipInset, f = s.radiusSource === "unsupported" || l.radiusSource === "unsupported", h = f ? 0 : s.radius, m = f ? 0 : l.radius;
|
|
1669
|
+
if (a.width === 0 || a.height === 0 || d.width === 0 || d.height === 0 || u.width === 0 || u.height === 0 || y.width === 0 || y.height === 0)
|
|
1676
1670
|
return null;
|
|
1677
|
-
const b = a.width /
|
|
1678
|
-
if (Math.abs(
|
|
1679
|
-
const
|
|
1680
|
-
|
|
1681
|
-
|
|
1671
|
+
const b = a.width / u.width, g = a.height / u.height, E = N(a), C = W(a), v = N(u), A = W(u), S = E - v, $ = C - A;
|
|
1672
|
+
if (Math.abs($) > n) return null;
|
|
1673
|
+
const R = j(
|
|
1674
|
+
u,
|
|
1675
|
+
be(u, a, d, b, g)
|
|
1682
1676
|
);
|
|
1683
1677
|
return {
|
|
1684
1678
|
fromContent: a,
|
|
1685
|
-
toContent:
|
|
1686
|
-
fromVisualEl: s.mediaElement ??
|
|
1679
|
+
toContent: u,
|
|
1680
|
+
fromVisualEl: s.mediaElement ?? r,
|
|
1687
1681
|
toVisualEl: l.mediaElement ?? c,
|
|
1688
1682
|
resetRadius: Co(s, l),
|
|
1689
|
-
styleFor: (
|
|
1690
|
-
const
|
|
1683
|
+
styleFor: (F, O, P) => {
|
|
1684
|
+
const T = (O * S + (P ? v - N(P.box) : 0)) / ((P == null ? void 0 : P.scaleX) ?? 1), Y = (O * $ + (P ? A - W(P.box) : 0)) / ((P == null ? void 0 : P.scaleY) ?? 1), H = F + O * b, ut = F + O * g, $e = s.cornerRadii ?? [
|
|
1691
1685
|
h,
|
|
1692
1686
|
h,
|
|
1693
1687
|
h,
|
|
@@ -1697,85 +1691,102 @@ function Eo(t, e, n, o, r) {
|
|
|
1697
1691
|
m,
|
|
1698
1692
|
m,
|
|
1699
1693
|
m
|
|
1700
|
-
],
|
|
1701
|
-
const Lt = Math.max(0,
|
|
1694
|
+
], Ae = $e.map((Oe, _e) => {
|
|
1695
|
+
const Lt = Math.max(0, Oe * O + Ce[_e] * F);
|
|
1702
1696
|
return {
|
|
1703
|
-
x: Lt / Math.max(Math.abs(
|
|
1704
|
-
y: Lt / Math.max(Math.abs(
|
|
1697
|
+
x: Lt / Math.max(Math.abs(H), 1e-6),
|
|
1698
|
+
y: Lt / Math.max(Math.abs(ut), 1e-6)
|
|
1705
1699
|
};
|
|
1706
|
-
}),
|
|
1700
|
+
}), ve = R.top * O + p.top * F, Pe = R.right * O + p.right * F, Re = R.bottom * O + p.bottom * F, Ie = R.left * O + p.left * F;
|
|
1707
1701
|
return {
|
|
1708
|
-
transform:
|
|
1709
|
-
clipPath:
|
|
1710
|
-
|
|
1702
|
+
transform: P ? `translate(${T}px, ${Y}px) scale(${H * u.width / P.box.width}, ${ut * u.height / P.box.height})` : `translate(${T}px, ${Y}px) scale(${H}, ${ut})`,
|
|
1703
|
+
clipPath: dt(
|
|
1704
|
+
u,
|
|
1711
1705
|
{
|
|
1712
|
-
top:
|
|
1713
|
-
right:
|
|
1714
|
-
bottom:
|
|
1715
|
-
left:
|
|
1706
|
+
top: ve,
|
|
1707
|
+
right: Pe,
|
|
1708
|
+
bottom: Re,
|
|
1709
|
+
left: Ie
|
|
1716
1710
|
},
|
|
1717
|
-
|
|
1711
|
+
Ae
|
|
1718
1712
|
)
|
|
1719
1713
|
};
|
|
1720
1714
|
}
|
|
1721
1715
|
};
|
|
1722
1716
|
}
|
|
1723
|
-
function
|
|
1717
|
+
function ie(t, e, n) {
|
|
1718
|
+
return {
|
|
1719
|
+
key: t,
|
|
1720
|
+
role: "shared-media",
|
|
1721
|
+
space: e,
|
|
1722
|
+
lifetime: n ? "temporary" : "persistent"
|
|
1723
|
+
};
|
|
1724
|
+
}
|
|
1725
|
+
function re(t) {
|
|
1726
|
+
return {
|
|
1727
|
+
role: "shared-media-source",
|
|
1728
|
+
space: t,
|
|
1729
|
+
lifetime: "temporary"
|
|
1730
|
+
};
|
|
1731
|
+
}
|
|
1732
|
+
function vo(t, e) {
|
|
1724
1733
|
t.style.transform = e.transform, t.style.clipPath = e.clipPath;
|
|
1725
1734
|
}
|
|
1726
|
-
class
|
|
1735
|
+
class Po {
|
|
1727
1736
|
contribute(e) {
|
|
1728
|
-
const { resolved: n, physics: o, positionedParent:
|
|
1729
|
-
c(
|
|
1730
|
-
const
|
|
1731
|
-
const
|
|
1732
|
-
r,
|
|
1733
|
-
a,
|
|
1737
|
+
const { resolved: n, physics: o, positionedParent: i, maxDistance: r, onDispose: c } = e, s = oo(e.from, e.to);
|
|
1738
|
+
c((d) => s(d.owns));
|
|
1739
|
+
const l = n.pairs.flatMap((d) => {
|
|
1740
|
+
const u = Ao(
|
|
1734
1741
|
i,
|
|
1742
|
+
d,
|
|
1743
|
+
r,
|
|
1735
1744
|
e.from,
|
|
1736
1745
|
e.to
|
|
1737
1746
|
);
|
|
1738
|
-
return
|
|
1747
|
+
return u ? [{ pair: d, plan: u }] : [];
|
|
1739
1748
|
});
|
|
1740
|
-
e.resolved = { pairs:
|
|
1741
|
-
const
|
|
1742
|
-
for (const { pair:
|
|
1743
|
-
const { fromVisualEl:
|
|
1744
|
-
if (
|
|
1745
|
-
const { layer:
|
|
1746
|
-
p,
|
|
1749
|
+
e.resolved = { pairs: l.map(({ pair: d }) => d) };
|
|
1750
|
+
const a = [];
|
|
1751
|
+
for (const { pair: d, plan: u } of l) {
|
|
1752
|
+
const { fromVisualEl: y, toVisualEl: p } = u, f = ot(y), h = ot(p);
|
|
1753
|
+
if (to(d, e.direction)) {
|
|
1754
|
+
const { layer: $, source: R, destination: F } = eo(
|
|
1747
1755
|
y,
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1756
|
+
p,
|
|
1757
|
+
u.fromContent,
|
|
1758
|
+
u.toContent,
|
|
1759
|
+
u.resetRadius
|
|
1760
|
+
), O = {
|
|
1761
|
+
box: u.fromContent,
|
|
1753
1762
|
scaleX: 1,
|
|
1754
1763
|
scaleY: 1
|
|
1755
|
-
},
|
|
1756
|
-
...
|
|
1757
|
-
opacity:
|
|
1758
|
-
}),
|
|
1759
|
-
...
|
|
1760
|
-
opacity:
|
|
1764
|
+
}, P = (Y, H) => ({
|
|
1765
|
+
...u.styleFor(Y, H, O),
|
|
1766
|
+
opacity: U(H) * f.opacity
|
|
1767
|
+
}), T = (Y, H) => ({
|
|
1768
|
+
...u.styleFor(Y, H),
|
|
1769
|
+
opacity: U(Y) * h.opacity
|
|
1761
1770
|
});
|
|
1762
|
-
Object.assign(
|
|
1763
|
-
|
|
1764
|
-
}),
|
|
1765
|
-
new
|
|
1766
|
-
element:
|
|
1767
|
-
|
|
1768
|
-
|
|
1771
|
+
Object.assign(R.style, P(0, 1)), Object.assign(F.style, T(0, 1)), i.appendChild($), f.set(0), h.set(0), c(() => {
|
|
1772
|
+
$.remove(), f.restore(), h.restore();
|
|
1773
|
+
}), a.push(
|
|
1774
|
+
new w({
|
|
1775
|
+
element: R,
|
|
1776
|
+
motion: re(i),
|
|
1777
|
+
integrator: x.from(o),
|
|
1778
|
+
style: P
|
|
1769
1779
|
}),
|
|
1770
|
-
new
|
|
1771
|
-
element:
|
|
1772
|
-
|
|
1773
|
-
|
|
1780
|
+
new w({
|
|
1781
|
+
element: F,
|
|
1782
|
+
motion: ie(d.key, i, !0),
|
|
1783
|
+
integrator: x.from(o),
|
|
1784
|
+
style: T
|
|
1774
1785
|
})
|
|
1775
1786
|
);
|
|
1776
1787
|
continue;
|
|
1777
1788
|
}
|
|
1778
|
-
const
|
|
1789
|
+
const m = Tt(y), b = no(p), g = lt(p, [
|
|
1779
1790
|
"transform",
|
|
1780
1791
|
"transform-origin",
|
|
1781
1792
|
"clip-path",
|
|
@@ -1783,95 +1794,97 @@ class Ao {
|
|
|
1783
1794
|
"border-radius",
|
|
1784
1795
|
"will-change"
|
|
1785
1796
|
]);
|
|
1786
|
-
|
|
1787
|
-
const
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
),
|
|
1792
|
-
|
|
1793
|
-
const
|
|
1794
|
-
...
|
|
1795
|
-
opacity:
|
|
1796
|
-
}),
|
|
1797
|
-
...
|
|
1798
|
-
opacity:
|
|
1797
|
+
p.style.transform = "none", p.style.transformOrigin = "center center", p.style.willChange = "transform, clip-path, opacity", u.resetRadius && (p.style.borderRadius = "0");
|
|
1798
|
+
const E = io(
|
|
1799
|
+
p,
|
|
1800
|
+
u.toContent,
|
|
1801
|
+
z(i, p)
|
|
1802
|
+
), C = kt(i, p);
|
|
1803
|
+
m.style.width = `${u.fromContent.width / C.scaleX}px`, m.style.height = `${u.fromContent.height / C.scaleY}px`, m.style.zIndex = getComputedStyle(p).zIndex, u.resetRadius && (m.style.borderRadius = "0"), p.after(m);
|
|
1804
|
+
const v = kt(i, m), A = ($, R) => ({
|
|
1805
|
+
...u.styleFor($, R, v),
|
|
1806
|
+
opacity: U(R) * f.opacity
|
|
1807
|
+
}), S = ($, R) => ({
|
|
1808
|
+
...u.styleFor($, R, C),
|
|
1809
|
+
opacity: U($) * h.opacity
|
|
1799
1810
|
});
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
}),
|
|
1803
|
-
new
|
|
1804
|
-
element:
|
|
1805
|
-
|
|
1806
|
-
|
|
1811
|
+
vo(p, S(0, 1)), Object.assign(m.style, A(0, 1)), h.set(0), f.set(0), c(() => {
|
|
1812
|
+
E(), g(), f.restore(), h.restore(), b(), m.remove();
|
|
1813
|
+
}), a.push(
|
|
1814
|
+
new w({
|
|
1815
|
+
element: m,
|
|
1816
|
+
motion: re(i),
|
|
1817
|
+
integrator: x.from(o),
|
|
1818
|
+
style: A
|
|
1807
1819
|
}),
|
|
1808
|
-
new
|
|
1809
|
-
element:
|
|
1810
|
-
|
|
1811
|
-
|
|
1820
|
+
new w({
|
|
1821
|
+
element: p,
|
|
1822
|
+
motion: ie(d.key, i, !1),
|
|
1823
|
+
integrator: x.from(o),
|
|
1824
|
+
style: S
|
|
1812
1825
|
})
|
|
1813
1826
|
);
|
|
1814
1827
|
}
|
|
1815
|
-
return { shared:
|
|
1828
|
+
return { shared: a };
|
|
1816
1829
|
}
|
|
1817
1830
|
}
|
|
1818
|
-
function
|
|
1819
|
-
return [new
|
|
1831
|
+
function Ro(t) {
|
|
1832
|
+
return [new Po(), uo[t.type]()];
|
|
1820
1833
|
}
|
|
1821
|
-
const
|
|
1822
|
-
const e =
|
|
1823
|
-
prepare: (
|
|
1834
|
+
const Io = (t) => {
|
|
1835
|
+
const e = mo[t.variant](), n = go, o = {
|
|
1836
|
+
prepare: (i) => {
|
|
1824
1837
|
var l;
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
]).then(([a, d]) => ({ pairs:
|
|
1829
|
-
from:
|
|
1830
|
-
to:
|
|
1838
|
+
const r = Ro(t), c = Promise.all([
|
|
1839
|
+
i.from,
|
|
1840
|
+
i.to
|
|
1841
|
+
]).then(([a, d]) => ({ pairs: Eo(a, d) })), s = {
|
|
1842
|
+
from: i.from,
|
|
1843
|
+
to: i.to,
|
|
1831
1844
|
resolved: c
|
|
1832
1845
|
};
|
|
1833
|
-
for (const a of
|
|
1846
|
+
for (const a of r)
|
|
1834
1847
|
(l = a.prepare) == null || l.call(a, s);
|
|
1835
|
-
return c.then((a) => ({ resolved: a, strategies:
|
|
1848
|
+
return c.then((a) => ({ resolved: a, strategies: r }));
|
|
1836
1849
|
},
|
|
1837
|
-
animation: ({ from:
|
|
1850
|
+
animation: ({ from: i, to: r, context: c, resolved: s, strategies: l }) => {
|
|
1838
1851
|
var h;
|
|
1839
1852
|
if (s.pairs.length === 0)
|
|
1840
|
-
return
|
|
1853
|
+
return K({ shared: [], out: [], in: [] });
|
|
1841
1854
|
const a = [], d = (m) => {
|
|
1842
1855
|
a.push(m);
|
|
1843
|
-
},
|
|
1856
|
+
}, u = {
|
|
1844
1857
|
direction: c.direction,
|
|
1845
|
-
from:
|
|
1846
|
-
to:
|
|
1858
|
+
from: i,
|
|
1859
|
+
to: r,
|
|
1847
1860
|
resolved: s,
|
|
1848
1861
|
physics: e,
|
|
1849
1862
|
positionedParent: c.positionedParent,
|
|
1850
1863
|
maxDistance: n,
|
|
1851
|
-
|
|
1864
|
+
onDispose: d
|
|
1852
1865
|
}, y = {
|
|
1853
1866
|
shared: [],
|
|
1854
1867
|
out: [],
|
|
1855
1868
|
in: []
|
|
1856
1869
|
};
|
|
1857
1870
|
for (const m of l) {
|
|
1858
|
-
const b = (h = m.contribute) == null ? void 0 : h.call(m,
|
|
1871
|
+
const b = (h = m.contribute) == null ? void 0 : h.call(m, u);
|
|
1859
1872
|
if (b)
|
|
1860
1873
|
for (const g of Object.keys(y))
|
|
1861
1874
|
y[g].push(...b[g] ?? []);
|
|
1862
1875
|
}
|
|
1863
|
-
const
|
|
1864
|
-
return
|
|
1865
|
-
f == null || f();
|
|
1866
|
-
for (const
|
|
1867
|
-
|
|
1868
|
-
for (const
|
|
1876
|
+
const p = K(y), f = p.onDispose;
|
|
1877
|
+
return p.onDispose = (m) => {
|
|
1878
|
+
f == null || f(m);
|
|
1879
|
+
for (const b of Object.values(y).flat())
|
|
1880
|
+
b instanceof w && b.releaseFill();
|
|
1881
|
+
for (const b of a)
|
|
1869
1882
|
try {
|
|
1870
|
-
m
|
|
1871
|
-
} catch (
|
|
1872
|
-
console.error("[hero] cleanup error",
|
|
1883
|
+
b(m);
|
|
1884
|
+
} catch (g) {
|
|
1885
|
+
console.error("[hero] cleanup error", g);
|
|
1873
1886
|
}
|
|
1874
|
-
},
|
|
1887
|
+
}, p;
|
|
1875
1888
|
}
|
|
1876
1889
|
};
|
|
1877
1890
|
return k({
|
|
@@ -1879,57 +1892,57 @@ const vo = (t) => {
|
|
|
1879
1892
|
backward: o
|
|
1880
1893
|
});
|
|
1881
1894
|
};
|
|
1882
|
-
function
|
|
1895
|
+
function Zi(t = {}, e = {}) {
|
|
1883
1896
|
const n = t.type ?? "static", o = t.variant ?? "default";
|
|
1884
|
-
return
|
|
1897
|
+
return D(Io({ type: n, variant: o }), e.override);
|
|
1885
1898
|
}
|
|
1886
|
-
const
|
|
1899
|
+
const Oo = {
|
|
1887
1900
|
spring: { stiffness: 50, damping: 30 }
|
|
1888
|
-
},
|
|
1901
|
+
}, _o = {
|
|
1889
1902
|
spring: { stiffness: 80, damping: 25 }
|
|
1890
|
-
},
|
|
1891
|
-
const e = t.physics ??
|
|
1903
|
+
}, ko = (t = {}) => {
|
|
1904
|
+
const e = t.physics ?? Oo, n = t.initialRotation ?? 45, o = t.initialScale ?? 0.01, i = t.rotationTriggerPoint ?? 0.8, r = {
|
|
1892
1905
|
prepare: ({ from: c, to: s, context: l }) => (c.then((a) => {
|
|
1893
1906
|
a.style.opacity = "1";
|
|
1894
1907
|
}), s.then((a) => {
|
|
1895
|
-
const d =
|
|
1896
|
-
a.style.setProperty("--max-border-radius", `${
|
|
1897
|
-
const y = d.left + d.width / 2,
|
|
1898
|
-
a.style.transformOrigin = `${y}px ${
|
|
1908
|
+
const d = V(l, "to"), u = Math.min(d.width, d.height) * 0.4;
|
|
1909
|
+
a.style.setProperty("--max-border-radius", `${u}px`), a.style.setProperty("--border-radius-scale", "1"), a.style.willChange = "transform", a.style.backfaceVisibility = "hidden";
|
|
1910
|
+
const y = d.left + d.width / 2, p = d.top + d.height / 2;
|
|
1911
|
+
a.style.transformOrigin = `${y}px ${p}px`, a.style.position = "fixed", a.style.top = `${d.top}px`, a.style.left = `${d.left}px`, a.style.width = `${d.width}px`, a.style.height = `${d.height}px`, a.style.zIndex = "1000", a.style.overflow = "hidden", a.style.transform = `rotate(${n}deg) scale(${o}) translateZ(0)`, a.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", a.style.opacity = "1";
|
|
1899
1912
|
}), {}),
|
|
1900
1913
|
animation: ({ from: c, to: s }) => {
|
|
1901
|
-
const l = new
|
|
1914
|
+
const l = new w({
|
|
1902
1915
|
element: c,
|
|
1903
|
-
integrator:
|
|
1904
|
-
style: (d,
|
|
1916
|
+
integrator: x.from(_o),
|
|
1917
|
+
style: (d, u) => ({ opacity: u }),
|
|
1905
1918
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1906
1919
|
// navigation), so reset every inline style we wrote to it — mirroring
|
|
1907
1920
|
// the "to" cleanup below. prepare sets opacity and the out style fades
|
|
1908
1921
|
// it toward 0, so clear opacity or the reused node stays invisible.
|
|
1909
|
-
|
|
1922
|
+
onDispose: () => {
|
|
1910
1923
|
c.style.opacity = "";
|
|
1911
1924
|
}
|
|
1912
|
-
}), a = new
|
|
1925
|
+
}), a = new w({
|
|
1913
1926
|
element: s,
|
|
1914
|
-
integrator:
|
|
1927
|
+
integrator: x.from(e),
|
|
1915
1928
|
style: (d) => {
|
|
1916
|
-
let
|
|
1929
|
+
let u;
|
|
1917
1930
|
if (d <= 0.05)
|
|
1918
|
-
|
|
1919
|
-
else if (d <=
|
|
1920
|
-
const h = (d - 0.05) / (
|
|
1921
|
-
|
|
1931
|
+
u = o;
|
|
1932
|
+
else if (d <= i) {
|
|
1933
|
+
const h = (d - 0.05) / (i - 0.05), m = Math.pow(h, 9);
|
|
1934
|
+
u = o + (0.8 - o) * m;
|
|
1922
1935
|
} else {
|
|
1923
|
-
const h = (d -
|
|
1924
|
-
|
|
1936
|
+
const h = (d - i) / (1 - i);
|
|
1937
|
+
u = 0.8 + 0.2 * (1 - Math.pow(1 - h, 3));
|
|
1925
1938
|
}
|
|
1926
1939
|
const y = 0.7;
|
|
1927
|
-
let
|
|
1940
|
+
let p;
|
|
1928
1941
|
if (d <= y)
|
|
1929
|
-
|
|
1942
|
+
p = n;
|
|
1930
1943
|
else {
|
|
1931
1944
|
const h = (d - y) / (1 - y), m = 1 - Math.pow(1 - h, 2);
|
|
1932
|
-
|
|
1945
|
+
p = n * (1 - m);
|
|
1933
1946
|
}
|
|
1934
1947
|
let f;
|
|
1935
1948
|
if (d <= y)
|
|
@@ -1939,38 +1952,38 @@ const Ro = {
|
|
|
1939
1952
|
f = 1 - Math.pow(h, 0.5);
|
|
1940
1953
|
}
|
|
1941
1954
|
return {
|
|
1942
|
-
transform: `rotate(${
|
|
1955
|
+
transform: `rotate(${p.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,
|
|
1943
1956
|
"--border-radius-scale": f.toFixed(4)
|
|
1944
1957
|
};
|
|
1945
1958
|
},
|
|
1946
|
-
|
|
1959
|
+
onDispose: () => {
|
|
1947
1960
|
s.style.willChange = "", s.style.backfaceVisibility = "", s.style.removeProperty("--max-border-radius"), s.style.removeProperty("--border-radius-scale"), s.style.transform = "", s.style.transformOrigin = "", s.style.position = "", s.style.zIndex = "", s.style.top = "", s.style.left = "", s.style.width = "", s.style.height = "", s.style.overflow = "", s.style.borderRadius = "";
|
|
1948
1961
|
}
|
|
1949
1962
|
});
|
|
1950
|
-
return new
|
|
1963
|
+
return new I(
|
|
1951
1964
|
{ out: l, in: a },
|
|
1952
1965
|
{ mode: "parallel" }
|
|
1953
1966
|
);
|
|
1954
1967
|
}
|
|
1955
1968
|
};
|
|
1956
|
-
return k({ forward:
|
|
1969
|
+
return k({ forward: r, backward: r });
|
|
1957
1970
|
};
|
|
1958
|
-
function
|
|
1959
|
-
return
|
|
1971
|
+
function Gi(t = {}, e = {}) {
|
|
1972
|
+
return D(ko(), e.override);
|
|
1960
1973
|
}
|
|
1961
|
-
const
|
|
1974
|
+
const Do = {
|
|
1962
1975
|
spring: { stiffness: 100, damping: 30 }
|
|
1963
|
-
},
|
|
1964
|
-
const e = t.physics ??
|
|
1965
|
-
prepare: ({ from: o, to:
|
|
1966
|
-
|
|
1967
|
-
}),
|
|
1968
|
-
|
|
1976
|
+
}, Fo = (t = {}) => {
|
|
1977
|
+
const e = t.physics ?? Do, n = {
|
|
1978
|
+
prepare: ({ from: o, to: i }) => (o.then((r) => {
|
|
1979
|
+
r.style.transformOrigin = "center center", r.style.willChange = "transform, opacity";
|
|
1980
|
+
}), i.then((r) => {
|
|
1981
|
+
r.style.opacity = "0", r.style.transform = "rotate(-180deg)", r.style.transformOrigin = "center center", r.style.willChange = "transform, opacity";
|
|
1969
1982
|
}), {}),
|
|
1970
|
-
animation: ({ from: o, to:
|
|
1971
|
-
const
|
|
1983
|
+
animation: ({ from: o, to: i }) => {
|
|
1984
|
+
const r = new w({
|
|
1972
1985
|
element: o,
|
|
1973
|
-
integrator:
|
|
1986
|
+
integrator: x.from(e),
|
|
1974
1987
|
style: (s) => ({
|
|
1975
1988
|
transform: `rotate(${s * 180}deg)`,
|
|
1976
1989
|
opacity: s < 0.5 ? 1 : 0
|
|
@@ -1978,33 +1991,33 @@ const _o = {
|
|
|
1978
1991
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1979
1992
|
// navigation), so clear every inline style we wrote to `from`
|
|
1980
1993
|
// (prepare + the final WAAPI frame), mirroring the `to` cleanup.
|
|
1981
|
-
|
|
1994
|
+
onDispose: () => {
|
|
1982
1995
|
o.style.willChange = "auto", o.style.transform = "", o.style.transformOrigin = "", o.style.opacity = "";
|
|
1983
1996
|
}
|
|
1984
|
-
}), c = new
|
|
1985
|
-
element:
|
|
1986
|
-
integrator:
|
|
1997
|
+
}), c = new w({
|
|
1998
|
+
element: i,
|
|
1999
|
+
integrator: x.from(e),
|
|
1987
2000
|
// u runs 1→0, so -u*180 unwinds -180→0.
|
|
1988
2001
|
style: (s, l) => ({
|
|
1989
2002
|
transform: `rotate(${-l * 180}deg)`,
|
|
1990
2003
|
opacity: s > 0.5 ? 1 : 0
|
|
1991
2004
|
}),
|
|
1992
|
-
|
|
1993
|
-
|
|
2005
|
+
onDispose: () => {
|
|
2006
|
+
i.style.willChange = "auto", i.style.transform = "", i.style.transformOrigin = "", i.style.opacity = "";
|
|
1994
2007
|
}
|
|
1995
2008
|
});
|
|
1996
|
-
return new
|
|
1997
|
-
{ out:
|
|
2009
|
+
return new I(
|
|
2010
|
+
{ out: r, in: c },
|
|
1998
2011
|
{ mode: "parallel" }
|
|
1999
2012
|
);
|
|
2000
2013
|
}
|
|
2001
2014
|
};
|
|
2002
2015
|
return k({ forward: n, backward: n });
|
|
2003
2016
|
};
|
|
2004
|
-
function
|
|
2005
|
-
return
|
|
2017
|
+
function qi(t = {}, e = {}) {
|
|
2018
|
+
return D(Fo(), e.override);
|
|
2006
2019
|
}
|
|
2007
|
-
const
|
|
2020
|
+
const Mo = {
|
|
2008
2021
|
spring: {
|
|
2009
2022
|
stiffness: 20,
|
|
2010
2023
|
damping: 8,
|
|
@@ -2013,8 +2026,8 @@ const Fo = {
|
|
|
2013
2026
|
restSpeed: 1e-3
|
|
2014
2027
|
}
|
|
2015
2028
|
}, To = (t = {}) => {
|
|
2016
|
-
const e = t.physics ??
|
|
2017
|
-
const
|
|
2029
|
+
const e = t.physics ?? Mo, n = t.directional ?? !0, o = (i) => {
|
|
2030
|
+
const r = !n || i === "forward", c = r ? L : M, s = r ? M : L;
|
|
2018
2031
|
return {
|
|
2019
2032
|
prepare: ({ from: l, to: a }) => (l.then((d) => {
|
|
2020
2033
|
d.style.zIndex = c, d.style.willChange = "transform", d.style.backfaceVisibility = "hidden", d.style.contain = "layout paint", d.style.pointerEvents = "none";
|
|
@@ -2022,27 +2035,27 @@ const Fo = {
|
|
|
2022
2035
|
d.style.willChange = "transform", d.style.backfaceVisibility = "hidden", d.style.contain = "layout paint", d.style.position = "relative", d.style.zIndex = s;
|
|
2023
2036
|
}), {}),
|
|
2024
2037
|
animation: ({ from: l, to: a }) => {
|
|
2025
|
-
const d = l.offsetHeight,
|
|
2038
|
+
const d = l.offsetHeight, u = a.offsetHeight, y = window.innerHeight, p = Math.max(Math.min(d, u), y), f = new w({
|
|
2026
2039
|
element: l,
|
|
2027
|
-
integrator:
|
|
2028
|
-
style: (m) => ({ transform: `translate3d(0, ${
|
|
2040
|
+
integrator: x.from(e),
|
|
2041
|
+
style: (m) => ({ transform: `translate3d(0, ${r ? -p * m : p * m}px, 0)` }),
|
|
2029
2042
|
// The outgoing node is the real, reused element (re-hidden then shown
|
|
2030
2043
|
// again on the next navigation), so mirror the incoming cleanup and
|
|
2031
2044
|
// also reset the out-only props applied in prepare (zIndex,
|
|
2032
2045
|
// pointerEvents) — otherwise the leftover inline styles corrupt the
|
|
2033
2046
|
// page the next time it appears.
|
|
2034
|
-
|
|
2047
|
+
onDispose: () => {
|
|
2035
2048
|
l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "", l.style.transform = "", l.style.pointerEvents = "", l.style.zIndex = "";
|
|
2036
2049
|
}
|
|
2037
|
-
}), h = new
|
|
2050
|
+
}), h = new w({
|
|
2038
2051
|
element: a,
|
|
2039
|
-
integrator:
|
|
2040
|
-
style: (m, b) => ({ transform: `translate3d(0, ${
|
|
2041
|
-
|
|
2052
|
+
integrator: x.from(e),
|
|
2053
|
+
style: (m, b) => ({ transform: `translate3d(0, ${r ? b * p : b * -p}px, 0)` }),
|
|
2054
|
+
onDispose: () => {
|
|
2042
2055
|
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === s && (a.style.zIndex = "");
|
|
2043
2056
|
}
|
|
2044
2057
|
});
|
|
2045
|
-
return [f, h].forEach(
|
|
2058
|
+
return [f, h].forEach(J), new I(
|
|
2046
2059
|
{ out: f, in: h },
|
|
2047
2060
|
{ mode: "parallel" }
|
|
2048
2061
|
);
|
|
@@ -2054,57 +2067,57 @@ const Fo = {
|
|
|
2054
2067
|
backward: o("backward")
|
|
2055
2068
|
});
|
|
2056
2069
|
};
|
|
2057
|
-
function
|
|
2070
|
+
function Ki(t = {}, e = {}) {
|
|
2058
2071
|
const { type: n = "directional" } = t;
|
|
2059
|
-
return
|
|
2072
|
+
return D(
|
|
2060
2073
|
To({ directional: n === "directional" }),
|
|
2061
2074
|
e.override
|
|
2062
2075
|
);
|
|
2063
2076
|
}
|
|
2064
|
-
const
|
|
2077
|
+
const Yo = {
|
|
2065
2078
|
spring: { stiffness: 200, damping: 24 }
|
|
2066
|
-
},
|
|
2079
|
+
}, Lo = {
|
|
2067
2080
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
2068
|
-
},
|
|
2069
|
-
function
|
|
2081
|
+
}, wt = 0.2;
|
|
2082
|
+
function Ho() {
|
|
2070
2083
|
return {
|
|
2071
|
-
enterPhysics:
|
|
2072
|
-
exitPhysics:
|
|
2084
|
+
enterPhysics: Yo,
|
|
2085
|
+
exitPhysics: Lo,
|
|
2073
2086
|
background: {
|
|
2074
2087
|
willChange: "transform, opacity",
|
|
2075
2088
|
enterStyle: (t, e) => ({
|
|
2076
|
-
transform: `scale(${1 -
|
|
2089
|
+
transform: `scale(${1 - wt * t})`,
|
|
2077
2090
|
opacity: e
|
|
2078
2091
|
}),
|
|
2079
2092
|
exitStyle: (t) => ({
|
|
2080
|
-
transform: `scale(${1 -
|
|
2093
|
+
transform: `scale(${1 - wt + wt * t})`,
|
|
2081
2094
|
opacity: t
|
|
2082
2095
|
})
|
|
2083
2096
|
}
|
|
2084
2097
|
};
|
|
2085
2098
|
}
|
|
2086
|
-
const
|
|
2099
|
+
const zo = {
|
|
2087
2100
|
spring: { stiffness: 200, damping: 24 }
|
|
2088
|
-
},
|
|
2101
|
+
}, No = {
|
|
2089
2102
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
2090
|
-
}, St = 0.08,
|
|
2091
|
-
function
|
|
2103
|
+
}, St = 0.08, Wo = 16, xt = 0.6, Vo = (t) => `blur(${Math.max(0, t).toFixed(2)}px)`;
|
|
2104
|
+
function Xo() {
|
|
2092
2105
|
return {
|
|
2093
|
-
enterPhysics:
|
|
2094
|
-
exitPhysics:
|
|
2106
|
+
enterPhysics: zo,
|
|
2107
|
+
exitPhysics: No,
|
|
2095
2108
|
background: {
|
|
2096
2109
|
willChange: "transform, opacity",
|
|
2097
2110
|
// enter: t 0 → 1 as the sheet rises. At rest (t = 0) the page is
|
|
2098
2111
|
// untouched; at peak it is shrunk and dimmed.
|
|
2099
2112
|
enterStyle: (t) => ({
|
|
2100
2113
|
transform: `scale(${1 - St * t})`,
|
|
2101
|
-
opacity: 1 - (1 -
|
|
2114
|
+
opacity: 1 - (1 - xt) * t
|
|
2102
2115
|
}),
|
|
2103
2116
|
// exit: t 0 → 1 as the sheet falls away and the page returns to rest —
|
|
2104
2117
|
// the inverse ramp of enter.
|
|
2105
2118
|
exitStyle: (t) => ({
|
|
2106
2119
|
transform: `scale(${1 - St + St * t})`,
|
|
2107
|
-
opacity:
|
|
2120
|
+
opacity: xt + (1 - xt) * t
|
|
2108
2121
|
})
|
|
2109
2122
|
},
|
|
2110
2123
|
overlay: {
|
|
@@ -2122,27 +2135,27 @@ function Wo() {
|
|
|
2122
2135
|
// enter: 0 → MAX as the sheet rises (progress 0 → 1).
|
|
2123
2136
|
// exit: MAX → 0 as it falls (progress 0 → 1, so the visual is inverted).
|
|
2124
2137
|
style: (t, e) => {
|
|
2125
|
-
const n = t === "enter" ? e : 1 - e, o =
|
|
2138
|
+
const n = t === "enter" ? e : 1 - e, o = Vo(Wo * n);
|
|
2126
2139
|
return { backdropFilter: o, WebkitBackdropFilter: o };
|
|
2127
2140
|
}
|
|
2128
2141
|
}
|
|
2129
2142
|
};
|
|
2130
2143
|
}
|
|
2131
|
-
const
|
|
2144
|
+
const Bo = {
|
|
2132
2145
|
spring: {
|
|
2133
2146
|
stiffness: 190,
|
|
2134
2147
|
damping: 25
|
|
2135
2148
|
}
|
|
2136
|
-
},
|
|
2149
|
+
}, Uo = {
|
|
2137
2150
|
spring: {
|
|
2138
2151
|
stiffness: 190,
|
|
2139
2152
|
damping: 25
|
|
2140
2153
|
}
|
|
2141
2154
|
};
|
|
2142
|
-
function
|
|
2155
|
+
function jo() {
|
|
2143
2156
|
return {
|
|
2144
|
-
enterPhysics:
|
|
2145
|
-
exitPhysics:
|
|
2157
|
+
enterPhysics: Bo,
|
|
2158
|
+
exitPhysics: Uo,
|
|
2146
2159
|
background: {
|
|
2147
2160
|
willChange: "",
|
|
2148
2161
|
enterStyle: () => ({}),
|
|
@@ -2150,124 +2163,125 @@ function Bo() {
|
|
|
2150
2163
|
}
|
|
2151
2164
|
};
|
|
2152
2165
|
}
|
|
2153
|
-
const
|
|
2154
|
-
static:
|
|
2155
|
-
"background-scale":
|
|
2156
|
-
blur:
|
|
2157
|
-
},
|
|
2158
|
-
const e =
|
|
2166
|
+
const Zo = {
|
|
2167
|
+
static: jo(),
|
|
2168
|
+
"background-scale": Ho(),
|
|
2169
|
+
blur: Xo()
|
|
2170
|
+
}, Go = "static", qo = "transform", Ko = (t = {}) => {
|
|
2171
|
+
const e = Zo[t.type ?? Go], n = e.background, o = e.overlay, i = n.willChange !== "", r = (c) => {
|
|
2159
2172
|
const s = c === "forward" ? "enter" : "exit", l = s === "enter" ? "to" : "from", a = s === "enter" ? "from" : "to", d = s === "enter" ? e.enterPhysics : e.exitPhysics;
|
|
2160
2173
|
return {
|
|
2161
|
-
prepare: ({ from:
|
|
2162
|
-
const h = { from:
|
|
2174
|
+
prepare: ({ from: u, to: y, context: p, createElement: f }) => {
|
|
2175
|
+
const h = { from: u, to: y }[l], m = { from: u, to: y }[a];
|
|
2163
2176
|
h.then((g) => {
|
|
2164
|
-
g.style.willChange =
|
|
2177
|
+
g.style.willChange = qo, g.style.backfaceVisibility = "hidden", g.style.contain = "layout paint", g.style.zIndex = M, s === "enter" ? g.style.position = "relative" : g.style.pointerEvents = "none";
|
|
2165
2178
|
}), m.then((g) => {
|
|
2166
|
-
|
|
2179
|
+
i && (g.style.willChange = n.willChange, g.style.backfaceVisibility = "hidden", g.style.contain = "layout paint"), g.style.zIndex = L, s === "enter" ? g.style.pointerEvents = "none" : g.style.position = "relative";
|
|
2167
2180
|
});
|
|
2168
2181
|
let b;
|
|
2169
|
-
return o && (b = f("sheet-overlay"), Object.assign(b.style, o.initialStyle), b.style.willChange = o.willChange,
|
|
2182
|
+
return o && (b = f("sheet-overlay"), Object.assign(b.style, o.initialStyle), b.style.willChange = o.willChange, p.positionedParent.appendChild(b)), { overlay: b };
|
|
2170
2183
|
},
|
|
2171
|
-
animation: ({ from:
|
|
2172
|
-
const h = { from:
|
|
2173
|
-
|
|
2174
|
-
},
|
|
2175
|
-
const
|
|
2176
|
-
y.style.position === "relative" && (y.style.position = ""), y.style.zIndex ===
|
|
2184
|
+
animation: ({ from: u, to: y, context: p, overlay: f }) => {
|
|
2185
|
+
const h = { from: u, to: y }[l], m = { from: u, to: y }[a], b = V(p, l), g = () => {
|
|
2186
|
+
u.style.pointerEvents = "", u.style.zIndex = "";
|
|
2187
|
+
}, E = () => {
|
|
2188
|
+
const S = s === "enter" ? M : L;
|
|
2189
|
+
y.style.position === "relative" && (y.style.position = ""), y.style.zIndex === S && (y.style.zIndex = "");
|
|
2177
2190
|
};
|
|
2178
2191
|
h.style.clipPath = `inset(${b.top}px 0 calc(100% - ${b.top + b.height}px) 0)`;
|
|
2179
|
-
const
|
|
2180
|
-
transform: `translate3d(0, ${
|
|
2181
|
-
}) : (
|
|
2182
|
-
transform: `translate3d(0, ${
|
|
2183
|
-
}),
|
|
2192
|
+
const C = s === "enter" ? (S, $) => ({
|
|
2193
|
+
transform: `translate3d(0, ${$ * b.height}px, 0)`
|
|
2194
|
+
}) : (S) => ({
|
|
2195
|
+
transform: `translate3d(0, ${S * b.height}px, 0)`
|
|
2196
|
+
}), v = new w({
|
|
2184
2197
|
element: h,
|
|
2185
|
-
integrator:
|
|
2186
|
-
style:
|
|
2187
|
-
|
|
2188
|
-
h.style.willChange = "auto", h.style.backfaceVisibility = "", h.style.contain = "", h.style.clipPath = "", h.style.transform = "", g(),
|
|
2198
|
+
integrator: x.from(d),
|
|
2199
|
+
style: C,
|
|
2200
|
+
onDispose: (S) => {
|
|
2201
|
+
h.style.willChange = "auto", h.style.backfaceVisibility = "", h.style.contain = "", h.style.clipPath = "", h.style.transform = "", S.owns(u) && g(), S.owns(y) && E();
|
|
2189
2202
|
}
|
|
2190
2203
|
});
|
|
2191
|
-
|
|
2192
|
-
const
|
|
2193
|
-
sheet:
|
|
2194
|
-
background: new
|
|
2195
|
-
overlay: new
|
|
2204
|
+
J(v);
|
|
2205
|
+
const A = {
|
|
2206
|
+
sheet: v,
|
|
2207
|
+
background: new I([]),
|
|
2208
|
+
overlay: new I([])
|
|
2196
2209
|
};
|
|
2197
|
-
if (
|
|
2198
|
-
const
|
|
2199
|
-
|
|
2200
|
-
const
|
|
2201
|
-
m.style.clipPath = `inset(${
|
|
2202
|
-
const
|
|
2210
|
+
if (i) {
|
|
2211
|
+
const S = m.scrollHeight;
|
|
2212
|
+
S > 0 && (m.style.height = `${S}px`);
|
|
2213
|
+
const $ = V(p, a), R = $.left + $.width / 2, F = $.top + $.height / 2;
|
|
2214
|
+
m.style.clipPath = `inset(${$.top}px 0 calc(100% - ${$.top + $.height}px) 0)`, m.style.transformOrigin = `${R}px ${F}px`;
|
|
2215
|
+
const O = s === "enter" ? (T, Y) => n.enterStyle(T, Y) : (T) => n.exitStyle(T), P = new w({
|
|
2203
2216
|
element: m,
|
|
2204
|
-
integrator:
|
|
2205
|
-
style:
|
|
2217
|
+
integrator: x.from(d),
|
|
2218
|
+
style: O,
|
|
2206
2219
|
// The background is the reused outgoing (`from`) node on `enter` and
|
|
2207
2220
|
// the surviving incoming (`to`) node on `exit` — in both cases its
|
|
2208
2221
|
// inline styles must be cleared on settle so the reused node is not
|
|
2209
2222
|
// left scaled/faded/clipped the next time it is shown. releaseFill
|
|
2210
2223
|
// below drops the WAAPI fill so these resets actually take effect.
|
|
2211
|
-
|
|
2224
|
+
onDispose: () => {
|
|
2212
2225
|
m.style.willChange = "auto", m.style.backfaceVisibility = "", m.style.contain = "", m.style.clipPath = "", m.style.transformOrigin = "", m.style.transform = "", m.style.opacity = "", m.style.height = "";
|
|
2213
2226
|
}
|
|
2214
2227
|
});
|
|
2215
|
-
|
|
2228
|
+
J(P), A.background = P;
|
|
2216
2229
|
}
|
|
2217
2230
|
if (f && o) {
|
|
2218
|
-
f.style.zIndex =
|
|
2219
|
-
const
|
|
2220
|
-
f.style.top = `${
|
|
2231
|
+
f.style.zIndex = fe;
|
|
2232
|
+
const S = ue(p, "to");
|
|
2233
|
+
f.style.top = `${S.top}px`, f.style.height = `${S.height}px`, A.overlay = new w({
|
|
2221
2234
|
element: f,
|
|
2222
|
-
|
|
2223
|
-
|
|
2235
|
+
motion: { lifetime: "temporary", role: "overlay" },
|
|
2236
|
+
integrator: x.from(d),
|
|
2237
|
+
style: ($) => o.style(s, $)
|
|
2224
2238
|
});
|
|
2225
2239
|
}
|
|
2226
|
-
return new
|
|
2240
|
+
return new I(A, { mode: "parallel" });
|
|
2227
2241
|
}
|
|
2228
2242
|
};
|
|
2229
2243
|
};
|
|
2230
2244
|
return k({
|
|
2231
|
-
forward:
|
|
2232
|
-
backward:
|
|
2245
|
+
forward: r("forward"),
|
|
2246
|
+
backward: r("backward")
|
|
2233
2247
|
});
|
|
2234
2248
|
};
|
|
2235
|
-
function
|
|
2249
|
+
function Jo(t) {
|
|
2236
2250
|
return t === "scale" || t === "background-scale" ? "background-scale" : t === "blur" ? "blur" : "static";
|
|
2237
2251
|
}
|
|
2238
|
-
function
|
|
2239
|
-
const n = t.type, o =
|
|
2240
|
-
return
|
|
2252
|
+
function Ji(t = {}, e = {}) {
|
|
2253
|
+
const n = t.type, o = Jo(n);
|
|
2254
|
+
return D(Ko({ type: o }), e.override);
|
|
2241
2255
|
}
|
|
2242
|
-
const
|
|
2243
|
-
const e = t.physics ??
|
|
2244
|
-
const
|
|
2256
|
+
const Qo = (t = {}) => {
|
|
2257
|
+
const e = t.physics ?? ze, n = (o) => {
|
|
2258
|
+
const i = o === "forward" ? 100 : -100;
|
|
2245
2259
|
return {
|
|
2246
|
-
prepare: ({ from:
|
|
2260
|
+
prepare: ({ from: r, to: c }) => (r.then((s) => {
|
|
2247
2261
|
s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none";
|
|
2248
2262
|
}), c.then((s) => {
|
|
2249
|
-
s.style.transform = `translate3d(${
|
|
2263
|
+
s.style.transform = `translate3d(${i}%, 0, 0)`, s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint";
|
|
2250
2264
|
}), {}),
|
|
2251
|
-
animation: ({ from:
|
|
2252
|
-
const s = new
|
|
2253
|
-
element:
|
|
2254
|
-
integrator:
|
|
2255
|
-
style: (a) => ({ transform: `translate3d(${100 *
|
|
2265
|
+
animation: ({ from: r, to: c }) => {
|
|
2266
|
+
const s = new w({
|
|
2267
|
+
element: r,
|
|
2268
|
+
integrator: x.from(e),
|
|
2269
|
+
style: (a) => ({ transform: `translate3d(${100 * it("slide", "out", o, a).x}%, 0, 0)` }),
|
|
2256
2270
|
// The outgoing node is the real Activity page and gets reused on the
|
|
2257
2271
|
// next navigation, so reset every inline style we wrote to it (mirror
|
|
2258
2272
|
// the incoming cleanup, plus the out-only pointerEvents).
|
|
2259
|
-
|
|
2260
|
-
|
|
2273
|
+
onDispose: () => {
|
|
2274
|
+
r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.pointerEvents = "";
|
|
2261
2275
|
}
|
|
2262
|
-
}), l = new
|
|
2276
|
+
}), l = new w({
|
|
2263
2277
|
element: c,
|
|
2264
|
-
integrator:
|
|
2265
|
-
style: (a) => ({ transform: `translate3d(${100 *
|
|
2266
|
-
|
|
2278
|
+
integrator: x.from(e),
|
|
2279
|
+
style: (a) => ({ transform: `translate3d(${100 * it("slide", "in", o, a).x}%, 0, 0)` }),
|
|
2280
|
+
onDispose: () => {
|
|
2267
2281
|
c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "", c.style.transform = "";
|
|
2268
2282
|
}
|
|
2269
2283
|
});
|
|
2270
|
-
return new
|
|
2284
|
+
return new I(
|
|
2271
2285
|
{ out: s, in: l },
|
|
2272
2286
|
{ mode: "parallel" }
|
|
2273
2287
|
);
|
|
@@ -2279,59 +2293,71 @@ const Ko = (t = {}) => {
|
|
|
2279
2293
|
backward: n("backward")
|
|
2280
2294
|
});
|
|
2281
2295
|
};
|
|
2282
|
-
function
|
|
2283
|
-
return
|
|
2296
|
+
function Qi(t = {}, e = {}) {
|
|
2297
|
+
return D(Qo(), e.override);
|
|
2284
2298
|
}
|
|
2285
|
-
const
|
|
2299
|
+
const ti = {
|
|
2286
2300
|
spring: { stiffness: 17, damping: 6 }
|
|
2287
|
-
}, Et = 20,
|
|
2288
|
-
const e = t.physics ??
|
|
2289
|
-
prepare: ({ from: o, to:
|
|
2290
|
-
|
|
2291
|
-
}),
|
|
2292
|
-
|
|
2301
|
+
}, Et = 20, nt = 800, ei = (t = {}) => {
|
|
2302
|
+
const e = t.physics ?? ti, n = {
|
|
2303
|
+
prepare: ({ from: o, to: i }) => (o.then((r) => {
|
|
2304
|
+
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none", r.style.transform = `perspective(${nt}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
2305
|
+
}), i.then((r) => {
|
|
2306
|
+
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.transform = `perspective(${nt}px) rotateY(${Et}deg) translate3d(-100%, 0, 0)`;
|
|
2293
2307
|
}), {}),
|
|
2294
|
-
animation: ({ from: o, to:
|
|
2295
|
-
const
|
|
2308
|
+
animation: ({ from: o, to: i }) => {
|
|
2309
|
+
const r = new w({
|
|
2296
2310
|
element: o,
|
|
2297
|
-
integrator:
|
|
2311
|
+
integrator: x.from(e),
|
|
2298
2312
|
style: (s) => {
|
|
2299
2313
|
const l = -s * Et, a = s * 100;
|
|
2300
2314
|
return {
|
|
2301
|
-
transform: `perspective(${
|
|
2315
|
+
transform: `perspective(${nt}px) rotateY(${l}deg) translate3d(${a}%, 0, 0)`
|
|
2302
2316
|
};
|
|
2303
2317
|
},
|
|
2304
2318
|
// The outgoing node is reused (Activity/cacheComponents re-hide it),
|
|
2305
2319
|
// so restore every inline style we wrote to `from` — mirroring the
|
|
2306
2320
|
// incoming cleanup below, plus the out-only `pointerEvents`.
|
|
2307
|
-
|
|
2321
|
+
onDispose: () => {
|
|
2308
2322
|
o.style.transform = "", o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.pointerEvents = "";
|
|
2309
2323
|
}
|
|
2310
|
-
}), c = new
|
|
2311
|
-
element:
|
|
2312
|
-
integrator:
|
|
2324
|
+
}), c = new w({
|
|
2325
|
+
element: i,
|
|
2326
|
+
integrator: x.from(e),
|
|
2313
2327
|
style: (s, l) => {
|
|
2314
2328
|
const a = l * Et, d = -l * 100;
|
|
2315
2329
|
return {
|
|
2316
|
-
transform: `perspective(${
|
|
2330
|
+
transform: `perspective(${nt}px) rotateY(${a}deg) translate3d(${d}%, 0, 0)`
|
|
2317
2331
|
};
|
|
2318
2332
|
},
|
|
2319
|
-
|
|
2320
|
-
|
|
2333
|
+
onDispose: () => {
|
|
2334
|
+
i.style.transform = "", i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
|
|
2321
2335
|
}
|
|
2322
2336
|
});
|
|
2323
|
-
return new
|
|
2324
|
-
{ out:
|
|
2337
|
+
return new I(
|
|
2338
|
+
{ out: r, in: c },
|
|
2325
2339
|
{ mode: "sequence" }
|
|
2326
2340
|
);
|
|
2327
2341
|
}
|
|
2328
2342
|
};
|
|
2329
2343
|
return k({ forward: n, backward: n });
|
|
2330
2344
|
};
|
|
2331
|
-
function
|
|
2332
|
-
return
|
|
2345
|
+
function tr(t = {}, e = {}) {
|
|
2346
|
+
return D(ei(), e.override);
|
|
2347
|
+
}
|
|
2348
|
+
const $t = /* @__PURE__ */ new WeakMap();
|
|
2349
|
+
function ni(t) {
|
|
2350
|
+
const e = $t.get(t) ?? {
|
|
2351
|
+
opacity: t.style.opacity,
|
|
2352
|
+
users: 0
|
|
2353
|
+
};
|
|
2354
|
+
e.users++, $t.set(t, e), t.style.opacity = "0";
|
|
2355
|
+
let n = !1;
|
|
2356
|
+
return () => {
|
|
2357
|
+
n || (n = !0, !(--e.users > 0) && (t.style.opacity === "0" && (t.style.opacity = e.opacity), $t.delete(t)));
|
|
2358
|
+
};
|
|
2333
2359
|
}
|
|
2334
|
-
function
|
|
2360
|
+
function oi(t, e) {
|
|
2335
2361
|
return e.left >= t.left - 0.01 && e.top >= t.top - 0.01 && e.left + e.width <= t.left + t.width + 0.01 && e.top + e.height <= t.top + t.height + 0.01;
|
|
2336
2362
|
}
|
|
2337
2363
|
function Yt(t) {
|
|
@@ -2343,28 +2369,28 @@ function Yt(t) {
|
|
|
2343
2369
|
scaleX: t.exitRect.width / t.enterRect.width,
|
|
2344
2370
|
scaleY: t.exitRect.height / t.enterRect.height
|
|
2345
2371
|
}), { enterMedia: n, exitMedia: o } = t;
|
|
2346
|
-
if (!n || !o || !
|
|
2347
|
-
const
|
|
2348
|
-
if (
|
|
2372
|
+
if (!n || !o || !me(n, o)) return e();
|
|
2373
|
+
const i = n.content, r = o.content;
|
|
2374
|
+
if (i.width <= 0 || i.height <= 0 || r.width <= 0 || r.height <= 0)
|
|
2349
2375
|
return e();
|
|
2350
|
-
const c =
|
|
2351
|
-
r,
|
|
2376
|
+
const c = r.width / i.width, s = r.height / i.height, l = be(
|
|
2352
2377
|
i,
|
|
2378
|
+
r,
|
|
2353
2379
|
o.window,
|
|
2354
2380
|
c,
|
|
2355
2381
|
s
|
|
2356
2382
|
);
|
|
2357
|
-
return
|
|
2383
|
+
return oi(n.window, l) ? {
|
|
2358
2384
|
contentAware: !0,
|
|
2359
|
-
enterContent:
|
|
2360
|
-
exitContent:
|
|
2385
|
+
enterContent: i,
|
|
2386
|
+
exitContent: r,
|
|
2361
2387
|
startWindow: l,
|
|
2362
2388
|
scaleX: c,
|
|
2363
2389
|
scaleY: s,
|
|
2364
2390
|
exitCornerRadii: o.cornerRadii
|
|
2365
2391
|
} : e();
|
|
2366
2392
|
}
|
|
2367
|
-
function
|
|
2393
|
+
function we(t, e) {
|
|
2368
2394
|
return {
|
|
2369
2395
|
top: t.top,
|
|
2370
2396
|
right: e.width - (t.left + t.width),
|
|
@@ -2372,80 +2398,80 @@ function ge(t, e) {
|
|
|
2372
2398
|
left: t.left
|
|
2373
2399
|
};
|
|
2374
2400
|
}
|
|
2375
|
-
function
|
|
2401
|
+
function ii(t, e, n) {
|
|
2376
2402
|
return {
|
|
2377
2403
|
x: t / Math.max(Math.abs(e), 1e-6),
|
|
2378
2404
|
y: t / Math.max(Math.abs(n), 1e-6)
|
|
2379
2405
|
};
|
|
2380
2406
|
}
|
|
2381
|
-
function
|
|
2407
|
+
function Se(t, e, n, o, i, r) {
|
|
2382
2408
|
return (n ?? [t]).map(
|
|
2383
|
-
(c) =>
|
|
2409
|
+
(c) => ii(
|
|
2384
2410
|
Math.max(0, c * o + e * (1 - o)),
|
|
2385
|
-
|
|
2386
|
-
|
|
2411
|
+
i,
|
|
2412
|
+
r
|
|
2387
2413
|
)
|
|
2388
2414
|
);
|
|
2389
2415
|
}
|
|
2390
|
-
function
|
|
2391
|
-
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius:
|
|
2416
|
+
function ri(t) {
|
|
2417
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, r = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = r, u = s.left - c.left + (s.width - c.width) / 2 - n.x, y = s.top - c.top + (s.height - c.height) / 2 - n.y, p = we(l, e);
|
|
2392
2418
|
return {
|
|
2393
|
-
transformOrigin: `${
|
|
2419
|
+
transformOrigin: `${N(c)}px ${W(c)}px`,
|
|
2394
2420
|
animate: (f) => {
|
|
2395
|
-
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g =
|
|
2396
|
-
|
|
2421
|
+
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g = Se(
|
|
2422
|
+
i,
|
|
2397
2423
|
o,
|
|
2398
|
-
|
|
2424
|
+
r.exitCornerRadii,
|
|
2399
2425
|
h,
|
|
2400
2426
|
m,
|
|
2401
2427
|
b
|
|
2402
2428
|
);
|
|
2403
2429
|
return {
|
|
2404
|
-
clipPath:
|
|
2430
|
+
clipPath: dt(
|
|
2405
2431
|
e,
|
|
2406
2432
|
{
|
|
2407
|
-
top:
|
|
2408
|
-
right:
|
|
2409
|
-
bottom:
|
|
2410
|
-
left:
|
|
2433
|
+
top: p.top * h,
|
|
2434
|
+
right: p.right * h,
|
|
2435
|
+
bottom: p.bottom * h,
|
|
2436
|
+
left: p.left * h
|
|
2411
2437
|
},
|
|
2412
2438
|
g
|
|
2413
2439
|
),
|
|
2414
|
-
transform: `translate(${
|
|
2440
|
+
transform: `translate(${u * h}px, ${y * h}px) scale(${m}, ${b})`
|
|
2415
2441
|
};
|
|
2416
2442
|
}
|
|
2417
2443
|
};
|
|
2418
2444
|
}
|
|
2419
|
-
function
|
|
2420
|
-
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius:
|
|
2445
|
+
function si(t) {
|
|
2446
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, r = Yt(t), { enterContent: c, exitContent: s, startWindow: l, scaleX: a, scaleY: d } = r, u = s.left - c.left + (s.width - c.width) / 2 + n.x, y = s.top - c.top + (s.height - c.height) / 2 + n.y, p = we(l, e);
|
|
2421
2447
|
return {
|
|
2422
|
-
transformOrigin: `${
|
|
2448
|
+
transformOrigin: `${N(c)}px ${W(c)}px`,
|
|
2423
2449
|
animate: (f) => {
|
|
2424
|
-
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g =
|
|
2425
|
-
|
|
2450
|
+
const h = 1 - f, m = 1 + (a - 1) * h, b = 1 + (d - 1) * h, g = Se(
|
|
2451
|
+
i,
|
|
2426
2452
|
o,
|
|
2427
|
-
|
|
2453
|
+
r.exitCornerRadii,
|
|
2428
2454
|
h,
|
|
2429
2455
|
m,
|
|
2430
2456
|
b
|
|
2431
2457
|
);
|
|
2432
2458
|
return {
|
|
2433
|
-
clipPath:
|
|
2459
|
+
clipPath: dt(
|
|
2434
2460
|
e,
|
|
2435
2461
|
{
|
|
2436
|
-
top:
|
|
2437
|
-
right:
|
|
2438
|
-
bottom:
|
|
2439
|
-
left:
|
|
2462
|
+
top: p.top * h,
|
|
2463
|
+
right: p.right * h,
|
|
2464
|
+
bottom: p.bottom * h,
|
|
2465
|
+
left: p.left * h
|
|
2440
2466
|
},
|
|
2441
2467
|
g
|
|
2442
2468
|
),
|
|
2443
|
-
transform: `translate(${
|
|
2469
|
+
transform: `translate(${u * h - n.x}px, ${y * h}px) scale(${m}, ${b})`
|
|
2444
2470
|
};
|
|
2445
2471
|
}
|
|
2446
2472
|
};
|
|
2447
2473
|
}
|
|
2448
|
-
const
|
|
2474
|
+
const ai = {
|
|
2449
2475
|
spring: {
|
|
2450
2476
|
stiffness: 380,
|
|
2451
2477
|
damping: 30,
|
|
@@ -2456,30 +2482,30 @@ const rr = {
|
|
|
2456
2482
|
damping: 30
|
|
2457
2483
|
}
|
|
2458
2484
|
}
|
|
2459
|
-
},
|
|
2460
|
-
function
|
|
2485
|
+
}, xe = 0.12, ci = 18;
|
|
2486
|
+
function li() {
|
|
2461
2487
|
return {
|
|
2462
2488
|
transformOrigin: "50% 50%",
|
|
2463
2489
|
animate: (t) => {
|
|
2464
2490
|
const e = 1 - t;
|
|
2465
2491
|
return {
|
|
2466
|
-
transform: `scale(${1 -
|
|
2492
|
+
transform: `scale(${1 - xe * e})`
|
|
2467
2493
|
};
|
|
2468
2494
|
}
|
|
2469
2495
|
};
|
|
2470
2496
|
}
|
|
2471
|
-
function
|
|
2497
|
+
function di() {
|
|
2472
2498
|
return {
|
|
2473
2499
|
transformOrigin: "50% 50%",
|
|
2474
2500
|
animate: (t) => {
|
|
2475
2501
|
const e = 1 - t;
|
|
2476
2502
|
return {
|
|
2477
|
-
transform: `scale(${1 -
|
|
2503
|
+
transform: `scale(${1 - xe * e})`
|
|
2478
2504
|
};
|
|
2479
2505
|
}
|
|
2480
2506
|
};
|
|
2481
2507
|
}
|
|
2482
|
-
const
|
|
2508
|
+
const Ct = {
|
|
2483
2509
|
willChange: "backdrop-filter",
|
|
2484
2510
|
// `top` + `height` are set per-transition in OverlayStrategy.contribute (they
|
|
2485
2511
|
// track the live scroll position), so they are intentionally omitted here.
|
|
@@ -2495,52 +2521,53 @@ const $t = {
|
|
|
2495
2521
|
WebkitBackdropFilter: "blur(0px)"
|
|
2496
2522
|
},
|
|
2497
2523
|
style: (t, e) => {
|
|
2498
|
-
const n = t === "enter" ? e : 1 - e, o = `blur(${
|
|
2524
|
+
const n = t === "enter" ? e : 1 - e, o = `blur(${ci * n}px)`;
|
|
2499
2525
|
return {
|
|
2500
2526
|
backdropFilter: o,
|
|
2501
2527
|
WebkitBackdropFilter: o
|
|
2502
2528
|
};
|
|
2503
2529
|
}
|
|
2504
2530
|
};
|
|
2505
|
-
class
|
|
2531
|
+
class ui {
|
|
2506
2532
|
constructor() {
|
|
2507
2533
|
_(this, "name", "background");
|
|
2508
|
-
_(this, "physics",
|
|
2534
|
+
_(this, "physics", ai);
|
|
2509
2535
|
}
|
|
2510
2536
|
contribute(e) {
|
|
2511
|
-
const { from: n, to: o, resolved:
|
|
2537
|
+
const { from: n, to: o, resolved: i, physics: r } = e, c = i.mode === "enter", s = c ? n : o, l = c ? li() : di();
|
|
2512
2538
|
return l && (s.style.transformOrigin = l.transformOrigin), [
|
|
2513
|
-
new
|
|
2539
|
+
new w({
|
|
2514
2540
|
element: s,
|
|
2515
|
-
integrator:
|
|
2541
|
+
integrator: x.from(r),
|
|
2516
2542
|
style: c ? (a, d) => l.animate(d) : (a) => l.animate(a)
|
|
2517
2543
|
})
|
|
2518
2544
|
];
|
|
2519
2545
|
}
|
|
2520
2546
|
}
|
|
2521
|
-
class
|
|
2547
|
+
class pi {
|
|
2522
2548
|
constructor() {
|
|
2523
2549
|
_(this, "name", "overlay");
|
|
2524
2550
|
}
|
|
2525
2551
|
prepare(e) {
|
|
2526
2552
|
const n = e.createElement("zoom-overlay");
|
|
2527
|
-
return Object.assign(n.style,
|
|
2553
|
+
return Object.assign(n.style, Ct.initialStyle), n.style.willChange = Ct.willChange, e.context.positionedParent.appendChild(n), { overlay: n };
|
|
2528
2554
|
}
|
|
2529
2555
|
contribute(e) {
|
|
2530
2556
|
const n = e.extras.overlay;
|
|
2531
2557
|
if (!n) return [];
|
|
2532
|
-
n.style.zIndex =
|
|
2533
|
-
const o =
|
|
2558
|
+
n.style.zIndex = fe;
|
|
2559
|
+
const o = ue(e.context, "to");
|
|
2534
2560
|
return n.style.top = `${o.top}px`, n.style.height = `${o.height}px`, [
|
|
2535
|
-
new
|
|
2561
|
+
new w({
|
|
2536
2562
|
element: n,
|
|
2537
|
-
|
|
2538
|
-
|
|
2563
|
+
motion: { lifetime: "temporary", role: "overlay" },
|
|
2564
|
+
integrator: x.from(e.physics),
|
|
2565
|
+
style: (i) => Ct.style(e.resolved.mode, i)
|
|
2539
2566
|
})
|
|
2540
2567
|
];
|
|
2541
2568
|
}
|
|
2542
2569
|
}
|
|
2543
|
-
const
|
|
2570
|
+
const fi = {
|
|
2544
2571
|
spring: {
|
|
2545
2572
|
stiffness: 380,
|
|
2546
2573
|
damping: 30,
|
|
@@ -2550,82 +2577,82 @@ const dr = {
|
|
|
2550
2577
|
}
|
|
2551
2578
|
}
|
|
2552
2579
|
};
|
|
2553
|
-
function
|
|
2580
|
+
function hi({
|
|
2554
2581
|
enterRect: t,
|
|
2555
2582
|
exitRect: e,
|
|
2556
2583
|
scrollOffset: n
|
|
2557
2584
|
}) {
|
|
2558
|
-
const o = t.left - e.left + (t.width - e.width) / 2 + n.x,
|
|
2585
|
+
const o = t.left - e.left + (t.width - e.width) / 2 + n.x, i = t.top - e.top + (t.height - e.height) / 2 + n.y, r = t.width / e.width, c = t.height / e.height, s = Math.max(r, c);
|
|
2559
2586
|
return {
|
|
2560
2587
|
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
2561
2588
|
animate: (l) => {
|
|
2562
2589
|
const a = 1 - l;
|
|
2563
2590
|
return {
|
|
2564
|
-
transform: `translate(${o * a - n.x}px, ${
|
|
2591
|
+
transform: `translate(${o * a - n.x}px, ${i * a}px) scale(${1 + (s - 1) * a})`
|
|
2565
2592
|
};
|
|
2566
2593
|
}
|
|
2567
2594
|
};
|
|
2568
2595
|
}
|
|
2569
|
-
function
|
|
2596
|
+
function yi({
|
|
2570
2597
|
enterRect: t,
|
|
2571
2598
|
exitRect: e,
|
|
2572
2599
|
scrollOffset: n
|
|
2573
2600
|
}) {
|
|
2574
|
-
const o = t.left - e.left + (t.width - e.width) / 2 - n.x,
|
|
2601
|
+
const o = t.left - e.left + (t.width - e.width) / 2 - n.x, i = t.top - e.top + (t.height - e.height) / 2 - n.y, r = t.width / e.width, c = t.height / e.height, s = Math.max(r, c);
|
|
2575
2602
|
return {
|
|
2576
2603
|
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
2577
2604
|
animate: (l) => {
|
|
2578
2605
|
const a = 1 - l;
|
|
2579
2606
|
return {
|
|
2580
|
-
transform: `translate(${o * a}px, ${
|
|
2607
|
+
transform: `translate(${o * a}px, ${i * a}px) scale(${1 + (s - 1) * a})`
|
|
2581
2608
|
};
|
|
2582
2609
|
}
|
|
2583
2610
|
};
|
|
2584
2611
|
}
|
|
2585
|
-
class
|
|
2612
|
+
class mi {
|
|
2586
2613
|
constructor() {
|
|
2587
2614
|
_(this, "name", "background");
|
|
2588
|
-
_(this, "physics",
|
|
2615
|
+
_(this, "physics", fi);
|
|
2589
2616
|
}
|
|
2590
2617
|
contribute(e) {
|
|
2591
|
-
const { from: n, to: o, resolved:
|
|
2618
|
+
const { from: n, to: o, resolved: i, input: r, physics: c } = e, s = i.mode === "enter", l = s ? n : o, a = s ? hi(r) : yi(r);
|
|
2592
2619
|
return a && (l.style.transformOrigin = a.transformOrigin), [
|
|
2593
|
-
new
|
|
2620
|
+
new w({
|
|
2594
2621
|
element: l,
|
|
2595
|
-
integrator:
|
|
2596
|
-
style: s ? (d,
|
|
2622
|
+
integrator: x.from(c),
|
|
2623
|
+
style: s ? (d, u) => a.animate(u) : (d) => a.animate(d)
|
|
2597
2624
|
})
|
|
2598
2625
|
];
|
|
2599
2626
|
}
|
|
2600
2627
|
}
|
|
2601
|
-
const
|
|
2628
|
+
const gi = {
|
|
2602
2629
|
spring: {
|
|
2603
2630
|
stiffness: 530,
|
|
2604
2631
|
damping: 34,
|
|
2605
2632
|
doubleSpring: 1
|
|
2606
2633
|
}
|
|
2607
2634
|
};
|
|
2608
|
-
class
|
|
2635
|
+
class bi {
|
|
2609
2636
|
constructor() {
|
|
2610
2637
|
_(this, "name", "background");
|
|
2611
|
-
_(this, "physics",
|
|
2638
|
+
_(this, "physics", gi);
|
|
2612
2639
|
}
|
|
2613
2640
|
contribute(e) {
|
|
2614
2641
|
return [];
|
|
2615
2642
|
}
|
|
2616
2643
|
}
|
|
2617
|
-
const
|
|
2618
|
-
expand: () => new
|
|
2619
|
-
static: () => new
|
|
2620
|
-
blur: () => new
|
|
2644
|
+
const wi = {
|
|
2645
|
+
expand: () => new mi(),
|
|
2646
|
+
static: () => new bi(),
|
|
2647
|
+
blur: () => new ui()
|
|
2621
2648
|
};
|
|
2622
|
-
function
|
|
2623
|
-
return
|
|
2649
|
+
function Si(t) {
|
|
2650
|
+
return wi[t]();
|
|
2624
2651
|
}
|
|
2625
|
-
function
|
|
2626
|
-
var
|
|
2627
|
-
const { resolved: e, input: n, from: o, to:
|
|
2628
|
-
a.contentAware && (f.style.width = `${a.exitContent.width}px`, f.style.height = `${a.exitContent.height}px`, f.style.borderRadius = "0"), f.style.zIndex = getComputedStyle(
|
|
2652
|
+
function xi(t) {
|
|
2653
|
+
var E, C;
|
|
2654
|
+
const { resolved: e, input: n, from: o, to: i, physics: r, onDispose: c } = t, s = e.mode === "enter", l = s ? i : o, a = Yt(n), d = a.contentAware ? ((E = n.exitMedia) == null ? void 0 : E.mediaElement) ?? e.exitEl : e.exitEl, u = a.contentAware ? ((C = n.enterMedia) == null ? void 0 : C.mediaElement) ?? e.enterEl : e.enterEl, y = ot(d), p = ot(u), f = Tt(d);
|
|
2655
|
+
a.contentAware && (f.style.width = `${a.exitContent.width}px`, f.style.height = `${a.exitContent.height}px`, f.style.borderRadius = "0"), f.style.zIndex = getComputedStyle(u).zIndex, u.after(f), f.style.transform = Qn(
|
|
2629
2656
|
{
|
|
2630
2657
|
width: a.enterContent.width,
|
|
2631
2658
|
height: a.enterContent.height,
|
|
@@ -2634,132 +2661,121 @@ function br(t) {
|
|
|
2634
2661
|
},
|
|
2635
2662
|
kt(l, f)
|
|
2636
2663
|
);
|
|
2637
|
-
const h = n.enterMedia ??
|
|
2664
|
+
const h = n.enterMedia ?? rt(
|
|
2638
2665
|
e.enterEl,
|
|
2639
2666
|
n.enterRect,
|
|
2640
|
-
(
|
|
2667
|
+
(v) => z(l, v),
|
|
2641
2668
|
{ clipRoot: l, legacyRadiusAttribute: "data-zoom-radius" }
|
|
2642
2669
|
);
|
|
2643
2670
|
if ((a.contentAware ? h.radiusSource : h.bboxRadiusSource) !== "unsupported") {
|
|
2644
|
-
const
|
|
2645
|
-
f.style.borderRadius = "0", f.style.clipPath =
|
|
2671
|
+
const v = a.contentAware ? h.window : n.enterRect, A = a.contentAware ? h.cornerRadii ?? [h.radius] : [h.bboxRadius];
|
|
2672
|
+
f.style.borderRadius = "0", f.style.clipPath = dt(
|
|
2646
2673
|
a.enterContent,
|
|
2647
|
-
|
|
2648
|
-
|
|
2674
|
+
j(a.enterContent, v),
|
|
2675
|
+
A.map((S) => ({ x: S, y: S }))
|
|
2649
2676
|
);
|
|
2650
2677
|
}
|
|
2651
|
-
const b = (
|
|
2652
|
-
opacity:
|
|
2653
|
-
}), g = (
|
|
2654
|
-
opacity:
|
|
2678
|
+
const b = (v, A) => ({
|
|
2679
|
+
opacity: U(s ? A : v) * y.opacity
|
|
2680
|
+
}), g = (v, A) => ({
|
|
2681
|
+
opacity: U(s ? v : A) * p.opacity
|
|
2655
2682
|
});
|
|
2656
|
-
return f.style.opacity = String(b(0, 1).opacity), y.set(0),
|
|
2657
|
-
f.remove(), y.restore(),
|
|
2683
|
+
return f.style.opacity = String(b(0, 1).opacity), y.set(0), p.set(g(0, 1).opacity), c(() => {
|
|
2684
|
+
f.remove(), y.restore(), p.restore();
|
|
2658
2685
|
}), [
|
|
2659
|
-
new
|
|
2686
|
+
new w({
|
|
2660
2687
|
element: f,
|
|
2661
|
-
|
|
2688
|
+
motion: { lifetime: "temporary", role: "shared-media-source" },
|
|
2689
|
+
integrator: x.from(r),
|
|
2662
2690
|
style: b
|
|
2663
2691
|
}),
|
|
2664
|
-
new
|
|
2665
|
-
element:
|
|
2666
|
-
integrator:
|
|
2692
|
+
new w({
|
|
2693
|
+
element: u,
|
|
2694
|
+
integrator: x.from(r),
|
|
2667
2695
|
style: g
|
|
2668
2696
|
})
|
|
2669
2697
|
];
|
|
2670
2698
|
}
|
|
2671
|
-
const
|
|
2672
|
-
function
|
|
2699
|
+
const Dt = "data-zoom-enter-key", se = "data-zoom-exit-key", ae = "data-zoom-radius";
|
|
2700
|
+
function Ei(t, e) {
|
|
2673
2701
|
return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
|
|
2674
2702
|
}
|
|
2675
|
-
function
|
|
2703
|
+
function $i(t, e) {
|
|
2676
2704
|
const n = [];
|
|
2677
2705
|
let o = e;
|
|
2678
2706
|
for (; o && o !== t; ) {
|
|
2679
|
-
const
|
|
2680
|
-
if (!
|
|
2681
|
-
for (const
|
|
2682
|
-
|
|
2683
|
-
o =
|
|
2707
|
+
const i = o.parentElement;
|
|
2708
|
+
if (!i) break;
|
|
2709
|
+
for (const r of Array.from(i.children))
|
|
2710
|
+
r !== o && r instanceof HTMLElement && !r.hasAttribute(st) && n.push(r);
|
|
2711
|
+
o = i;
|
|
2684
2712
|
}
|
|
2685
2713
|
return n;
|
|
2686
2714
|
}
|
|
2687
|
-
function
|
|
2688
|
-
const e = t.querySelectorAll(`[${
|
|
2715
|
+
function ce(t) {
|
|
2716
|
+
const e = t.querySelectorAll(`[${Dt}]`);
|
|
2689
2717
|
return e.length !== 1 ? null : e[0];
|
|
2690
2718
|
}
|
|
2691
|
-
function
|
|
2692
|
-
const n = t.querySelectorAll(`[${
|
|
2719
|
+
function le(t, e) {
|
|
2720
|
+
const n = t.querySelectorAll(`[${se}]`);
|
|
2693
2721
|
for (const o of n)
|
|
2694
|
-
if (o.getAttribute(
|
|
2722
|
+
if (o.getAttribute(se) === e)
|
|
2695
2723
|
return o;
|
|
2696
2724
|
return null;
|
|
2697
2725
|
}
|
|
2698
|
-
function
|
|
2726
|
+
function Ci(t, e, n) {
|
|
2699
2727
|
if (n === "forward") {
|
|
2700
|
-
const c =
|
|
2728
|
+
const c = ce(e);
|
|
2701
2729
|
if (!c) return null;
|
|
2702
|
-
const s = c.getAttribute(
|
|
2730
|
+
const s = c.getAttribute(Dt);
|
|
2703
2731
|
if (!s) return null;
|
|
2704
|
-
const l =
|
|
2732
|
+
const l = le(t, s);
|
|
2705
2733
|
return l ? { mode: "enter", enterEl: c, exitEl: l } : null;
|
|
2706
2734
|
}
|
|
2707
|
-
const o =
|
|
2735
|
+
const o = ce(t);
|
|
2708
2736
|
if (!o) return null;
|
|
2709
|
-
const
|
|
2710
|
-
if (!
|
|
2711
|
-
const
|
|
2712
|
-
return
|
|
2737
|
+
const i = o.getAttribute(Dt);
|
|
2738
|
+
if (!i) return null;
|
|
2739
|
+
const r = le(e, i);
|
|
2740
|
+
return r ? { mode: "exit", enterEl: o, exitEl: r } : null;
|
|
2713
2741
|
}
|
|
2714
|
-
function
|
|
2715
|
-
const
|
|
2742
|
+
function Ai(t, e, n, o) {
|
|
2743
|
+
const i = t.mode === "enter" ? n : e, r = t.mode === "enter" ? e : n, c = z(i, t.enterEl), s = z(r, t.exitEl), l = rt(
|
|
2716
2744
|
t.enterEl,
|
|
2717
2745
|
c,
|
|
2718
|
-
(m) =>
|
|
2746
|
+
(m) => z(i, m),
|
|
2719
2747
|
{
|
|
2720
|
-
clipRoot:
|
|
2721
|
-
legacyRadiusAttribute:
|
|
2748
|
+
clipRoot: i,
|
|
2749
|
+
legacyRadiusAttribute: ae
|
|
2722
2750
|
}
|
|
2723
|
-
), a =
|
|
2751
|
+
), a = rt(
|
|
2724
2752
|
t.exitEl,
|
|
2725
2753
|
s,
|
|
2726
|
-
(m) =>
|
|
2754
|
+
(m) => z(r, m),
|
|
2727
2755
|
{
|
|
2728
|
-
clipRoot:
|
|
2729
|
-
legacyRadiusAttribute:
|
|
2756
|
+
clipRoot: r,
|
|
2757
|
+
legacyRadiusAttribute: ae
|
|
2730
2758
|
}
|
|
2731
|
-
), [d,
|
|
2759
|
+
), [d, u] = ge(l, a), y = d.contentAware && u.contentAware, p = t.mode === "enter" ? n.getBoundingClientRect() : e.getBoundingClientRect(), f = {
|
|
2732
2760
|
left: 0,
|
|
2733
2761
|
top: 0,
|
|
2734
|
-
width:
|
|
2735
|
-
height:
|
|
2736
|
-
}, h = d.radiusSource === "legacy" ||
|
|
2762
|
+
width: p.width,
|
|
2763
|
+
height: p.height
|
|
2764
|
+
}, h = d.radiusSource === "legacy" || Ei(d.window, f) ? d.radius : 0;
|
|
2737
2765
|
return {
|
|
2738
2766
|
enterRect: c,
|
|
2739
2767
|
exitRect: s,
|
|
2740
2768
|
...y ? {
|
|
2741
2769
|
enterMedia: d,
|
|
2742
|
-
exitMedia:
|
|
2770
|
+
exitMedia: u
|
|
2743
2771
|
} : {},
|
|
2744
|
-
pageRect:
|
|
2772
|
+
pageRect: p,
|
|
2745
2773
|
scrollOffset: o,
|
|
2746
2774
|
enterRadius: h,
|
|
2747
|
-
exitRadius:
|
|
2775
|
+
exitRadius: u.radius
|
|
2748
2776
|
};
|
|
2749
2777
|
}
|
|
2750
|
-
|
|
2751
|
-
function Er(t) {
|
|
2752
|
-
const e = At.get(t) ?? {
|
|
2753
|
-
opacity: t.style.opacity,
|
|
2754
|
-
users: 0
|
|
2755
|
-
};
|
|
2756
|
-
e.users++, At.set(t, e), t.style.opacity = "0";
|
|
2757
|
-
let n = !1;
|
|
2758
|
-
return () => {
|
|
2759
|
-
n || (n = !0, !(--e.users > 0) && (t.style.opacity === "0" && (t.style.opacity = e.opacity), At.delete(t)));
|
|
2760
|
-
};
|
|
2761
|
-
}
|
|
2762
|
-
class $r {
|
|
2778
|
+
class vi {
|
|
2763
2779
|
constructor() {
|
|
2764
2780
|
_(this, "name", "tile");
|
|
2765
2781
|
}
|
|
@@ -2769,53 +2785,53 @@ class $r {
|
|
|
2769
2785
|
});
|
|
2770
2786
|
}
|
|
2771
2787
|
contribute(e) {
|
|
2772
|
-
const { from: n, to: o, resolved:
|
|
2773
|
-
s(
|
|
2774
|
-
const
|
|
2775
|
-
n.style.zIndex =
|
|
2788
|
+
const { from: n, to: o, resolved: i, input: r, physics: c, onDispose: s } = e, l = i.mode === "enter", a = l ? ri(r) : si(r), d = l ? o : n, u = l ? "t" : "u", y = xi(e);
|
|
2789
|
+
s(ni(i.exitEl)), a && (d.style.transformOrigin = a.transformOrigin);
|
|
2790
|
+
const p = l ? L : M, f = l ? M : L, h = n.style.zIndex;
|
|
2791
|
+
n.style.zIndex = p;
|
|
2776
2792
|
const m = o.style.zIndex, b = o.style.position;
|
|
2777
|
-
return o.style.zIndex = f, o.style.position = "relative", s(() => {
|
|
2778
|
-
d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.transformOrigin = "", d.style.contain = "", n
|
|
2793
|
+
return o.style.zIndex = f, o.style.position = "relative", s((g) => {
|
|
2794
|
+
g.owns(d) && (d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.transformOrigin = "", d.style.contain = ""), g.owns(n) && (n.style.zIndex = h, n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = ""), g.owns(o) && (o.style.zIndex = m, o.style.position = b, o.style.transformOrigin = "");
|
|
2779
2795
|
}), [
|
|
2780
2796
|
...y,
|
|
2781
|
-
new
|
|
2797
|
+
new w({
|
|
2782
2798
|
element: d,
|
|
2783
|
-
integrator:
|
|
2799
|
+
integrator: x.from(c),
|
|
2784
2800
|
// Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
|
|
2785
2801
|
// the legacy convention from v5's outAnim path. Either way, feed
|
|
2786
2802
|
// the progress that matches the tileConfig's authored direction.
|
|
2787
|
-
style:
|
|
2803
|
+
style: u === "t" ? (g) => a.animate(g) : (g, E) => a.animate(E)
|
|
2788
2804
|
})
|
|
2789
2805
|
];
|
|
2790
2806
|
}
|
|
2791
2807
|
}
|
|
2792
|
-
class
|
|
2808
|
+
class Pi {
|
|
2793
2809
|
constructor() {
|
|
2794
2810
|
_(this, "name", "content");
|
|
2795
2811
|
}
|
|
2796
2812
|
contribute(e) {
|
|
2797
|
-
const { resolved: n, physics: o, from:
|
|
2813
|
+
const { resolved: n, physics: o, from: i, to: r, onDispose: c } = e, s = n.mode === "enter" ? r : i, l = $i(s, n.enterEl);
|
|
2798
2814
|
if (l.length === 0) return [];
|
|
2799
2815
|
const a = l.map((d) => d.style.opacity);
|
|
2800
2816
|
if (n.mode === "enter")
|
|
2801
2817
|
for (const d of l) d.style.opacity = "0";
|
|
2802
|
-
return c(() => {
|
|
2803
|
-
for (let
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2818
|
+
return c((d) => {
|
|
2819
|
+
for (let u = 0; u < l.length; u++) {
|
|
2820
|
+
const y = l[u];
|
|
2821
|
+
y && d.owns(y) && (y.style.opacity = a[u] ?? "");
|
|
2806
2822
|
}
|
|
2807
2823
|
}), l.map(
|
|
2808
|
-
(d) => new
|
|
2824
|
+
(d) => new w({
|
|
2809
2825
|
element: d,
|
|
2810
|
-
integrator:
|
|
2811
|
-
style: (
|
|
2812
|
-
opacity: n.mode === "enter" ?
|
|
2826
|
+
integrator: x.from(o),
|
|
2827
|
+
style: (u, y) => ({
|
|
2828
|
+
opacity: n.mode === "enter" ? u : y
|
|
2813
2829
|
})
|
|
2814
2830
|
})
|
|
2815
2831
|
);
|
|
2816
2832
|
}
|
|
2817
2833
|
}
|
|
2818
|
-
class
|
|
2834
|
+
class Ri {
|
|
2819
2835
|
constructor() {
|
|
2820
2836
|
_(this, "name", "content");
|
|
2821
2837
|
}
|
|
@@ -2823,29 +2839,29 @@ class Pr {
|
|
|
2823
2839
|
return [];
|
|
2824
2840
|
}
|
|
2825
2841
|
}
|
|
2826
|
-
const
|
|
2827
|
-
default: () => new
|
|
2828
|
-
fade: () => new
|
|
2842
|
+
const Ii = {
|
|
2843
|
+
default: () => new Ri(),
|
|
2844
|
+
fade: () => new Pi()
|
|
2829
2845
|
};
|
|
2830
|
-
function
|
|
2831
|
-
return
|
|
2846
|
+
function Oi(t) {
|
|
2847
|
+
return Ii[t]();
|
|
2832
2848
|
}
|
|
2833
|
-
function
|
|
2834
|
-
const e =
|
|
2849
|
+
function At(t) {
|
|
2850
|
+
const e = Si(t.type);
|
|
2835
2851
|
return { strategies: [
|
|
2836
|
-
new
|
|
2852
|
+
new vi(),
|
|
2837
2853
|
e,
|
|
2838
|
-
|
|
2854
|
+
Oi(t.variant),
|
|
2839
2855
|
// Overlay is intrinsically tied to backdrop-filter-driven types. Today
|
|
2840
2856
|
// that's only `blur`; the table-driven factory above owns the mapping
|
|
2841
2857
|
// so this conditional is the single line that knows the relationship.
|
|
2842
|
-
...t.type === "blur" ? [new
|
|
2858
|
+
...t.type === "blur" ? [new pi()] : []
|
|
2843
2859
|
], physics: e.physics };
|
|
2844
2860
|
}
|
|
2845
|
-
const
|
|
2846
|
-
const {
|
|
2861
|
+
const _i = (t) => {
|
|
2862
|
+
const { physics: e } = At(t), n = (o) => ({
|
|
2847
2863
|
prepare: (i) => {
|
|
2848
|
-
const c = {
|
|
2864
|
+
const { strategies: r } = At(t), c = {
|
|
2849
2865
|
from: i.from,
|
|
2850
2866
|
to: i.to,
|
|
2851
2867
|
context: { positionedParent: i.context.positionedParent },
|
|
@@ -2854,33 +2870,39 @@ const Or = (t) => {
|
|
|
2854
2870
|
// compatible.
|
|
2855
2871
|
createElement: i.createElement
|
|
2856
2872
|
}, s = {};
|
|
2857
|
-
for (const l of
|
|
2873
|
+
for (const l of r) {
|
|
2858
2874
|
if (!l.prepare) continue;
|
|
2859
2875
|
const a = l.prepare(c);
|
|
2860
2876
|
a && Object.assign(s, a);
|
|
2861
2877
|
}
|
|
2862
|
-
return s;
|
|
2878
|
+
return { ...s, strategies: r };
|
|
2863
2879
|
},
|
|
2864
|
-
animation: ({
|
|
2880
|
+
animation: ({
|
|
2881
|
+
from: i,
|
|
2882
|
+
to: r,
|
|
2883
|
+
context: c,
|
|
2884
|
+
strategies: s = At(t).strategies,
|
|
2885
|
+
...l
|
|
2886
|
+
}) => {
|
|
2865
2887
|
var b;
|
|
2866
|
-
const a =
|
|
2888
|
+
const a = Ci(i, r, o);
|
|
2867
2889
|
if (!a)
|
|
2868
|
-
return
|
|
2890
|
+
return K({
|
|
2869
2891
|
tile: [],
|
|
2870
2892
|
background: [],
|
|
2871
2893
|
content: [],
|
|
2872
2894
|
overlay: []
|
|
2873
2895
|
});
|
|
2874
|
-
const d =
|
|
2896
|
+
const d = Ai(a, i, r, c.scrollOffset), u = [], p = {
|
|
2875
2897
|
from: i,
|
|
2876
|
-
to:
|
|
2898
|
+
to: r,
|
|
2877
2899
|
resolved: a,
|
|
2878
2900
|
input: d,
|
|
2879
|
-
physics:
|
|
2880
|
-
context:
|
|
2901
|
+
physics: e,
|
|
2902
|
+
context: c,
|
|
2881
2903
|
extras: l,
|
|
2882
|
-
|
|
2883
|
-
|
|
2904
|
+
onDispose: (g) => {
|
|
2905
|
+
u.push(g);
|
|
2884
2906
|
}
|
|
2885
2907
|
}, f = {
|
|
2886
2908
|
tile: [],
|
|
@@ -2888,41 +2910,41 @@ const Or = (t) => {
|
|
|
2888
2910
|
content: [],
|
|
2889
2911
|
overlay: []
|
|
2890
2912
|
};
|
|
2891
|
-
for (const g of
|
|
2892
|
-
f[g.name].push(...((b = g.contribute) == null ? void 0 : b.call(g,
|
|
2893
|
-
const h = Object.values(f).flat(), m =
|
|
2894
|
-
m.
|
|
2895
|
-
for (const
|
|
2913
|
+
for (const g of s)
|
|
2914
|
+
f[g.name].push(...((b = g.contribute) == null ? void 0 : b.call(g, p)) ?? []);
|
|
2915
|
+
const h = Object.values(f).flat(), m = K(f);
|
|
2916
|
+
m.onDispose = (g) => {
|
|
2917
|
+
for (const E of u)
|
|
2896
2918
|
try {
|
|
2897
|
-
g
|
|
2898
|
-
} catch (
|
|
2899
|
-
console.error("[zoom] cleanup error",
|
|
2919
|
+
E(g);
|
|
2920
|
+
} catch (C) {
|
|
2921
|
+
console.error("[zoom] cleanup error", C);
|
|
2900
2922
|
}
|
|
2901
2923
|
};
|
|
2902
2924
|
for (const g of h)
|
|
2903
|
-
g instanceof
|
|
2925
|
+
g instanceof w && J(g);
|
|
2904
2926
|
return m;
|
|
2905
2927
|
}
|
|
2906
2928
|
});
|
|
2907
2929
|
return k({
|
|
2908
|
-
forward:
|
|
2909
|
-
backward:
|
|
2930
|
+
forward: n("forward"),
|
|
2931
|
+
backward: n("backward")
|
|
2910
2932
|
});
|
|
2911
2933
|
};
|
|
2912
|
-
function
|
|
2934
|
+
function ki(t) {
|
|
2913
2935
|
const e = t.type ?? "static", n = t.variant ?? (t.fade ? "fade" : "default");
|
|
2914
2936
|
return { type: e, variant: n };
|
|
2915
2937
|
}
|
|
2916
|
-
function
|
|
2917
|
-
const n =
|
|
2918
|
-
return
|
|
2938
|
+
function er(t = {}, e = {}) {
|
|
2939
|
+
const n = ki(t);
|
|
2940
|
+
return D(_i(n), e.override);
|
|
2919
2941
|
}
|
|
2920
|
-
const
|
|
2921
|
-
function
|
|
2922
|
-
const n = Math.sqrt(t), o = e / (2 * n),
|
|
2923
|
-
return { duration:
|
|
2942
|
+
const de = 1 / 60, Di = 600;
|
|
2943
|
+
function Fi(t, e) {
|
|
2944
|
+
const n = Math.sqrt(t), o = e / (2 * n), i = 2 * Math.PI / n, r = o <= 1 ? 1 - o : 1 / o - 1;
|
|
2945
|
+
return { duration: i, bounce: r, zeta: o };
|
|
2924
2946
|
}
|
|
2925
|
-
function
|
|
2947
|
+
function tt(t) {
|
|
2926
2948
|
if (!Number.isFinite(t.stiffness) || t.stiffness <= 0)
|
|
2927
2949
|
throw new Error("spring(): stiffness must be finite and > 0");
|
|
2928
2950
|
if (!Number.isFinite(t.damping) || t.damping < 0)
|
|
@@ -2933,42 +2955,42 @@ function Q(t) {
|
|
|
2933
2955
|
])
|
|
2934
2956
|
if (n !== void 0 && (!Number.isFinite(n) || n <= 0))
|
|
2935
2957
|
throw new Error(`spring(): ${e} must be finite and > 0`);
|
|
2936
|
-
return
|
|
2958
|
+
return x.from({ spring: t });
|
|
2937
2959
|
}
|
|
2938
|
-
function
|
|
2960
|
+
function Mi(t) {
|
|
2939
2961
|
let e = { position: 0, velocity: 0 };
|
|
2940
|
-
for (let n = 1; n <=
|
|
2941
|
-
if (e = t.step(e, 1,
|
|
2962
|
+
for (let n = 1; n <= Di; n++)
|
|
2963
|
+
if (e = t.step(e, 1, de), e.position >= 1) return n * de * 1e3;
|
|
2942
2964
|
return 1 / 0;
|
|
2943
2965
|
}
|
|
2944
|
-
function
|
|
2966
|
+
function Ti(t) {
|
|
2945
2967
|
const { duration: e, resistance: n = 1.5, restDelta: o } = t;
|
|
2946
2968
|
if (!Number.isFinite(e) || !(e > 0))
|
|
2947
2969
|
throw new Error("easeIn(): duration must be finite and > 0");
|
|
2948
|
-
const
|
|
2949
|
-
let
|
|
2970
|
+
const i = e * 1e3;
|
|
2971
|
+
let r = 0.01, c = 1e6;
|
|
2950
2972
|
for (let s = 0; s < 60; s++) {
|
|
2951
|
-
const l = Math.sqrt(
|
|
2973
|
+
const l = Math.sqrt(r * c), a = new Pt({
|
|
2952
2974
|
acceleration: l,
|
|
2953
2975
|
resistance: n,
|
|
2954
2976
|
restDelta: o
|
|
2955
2977
|
});
|
|
2956
|
-
|
|
2978
|
+
Mi(a) > i ? r = l : c = l;
|
|
2957
2979
|
}
|
|
2958
|
-
return new
|
|
2980
|
+
return new Pt({ acceleration: c, resistance: n, restDelta: o });
|
|
2959
2981
|
}
|
|
2960
|
-
class
|
|
2982
|
+
class Ee {
|
|
2961
2983
|
constructor(e, n) {
|
|
2962
2984
|
if (this.inner = e, this.factor = n, !Number.isFinite(n) || !(n > 0))
|
|
2963
2985
|
throw new Error("scale(): factor must be finite and > 0");
|
|
2964
2986
|
}
|
|
2965
2987
|
step(e, n, o) {
|
|
2966
|
-
const
|
|
2988
|
+
const i = Math.max(1, Math.ceil(this.factor)), r = o * this.factor / i;
|
|
2967
2989
|
let c = {
|
|
2968
2990
|
...e,
|
|
2969
2991
|
velocity: e.velocity / this.factor
|
|
2970
2992
|
};
|
|
2971
|
-
for (let s = 0; s <
|
|
2993
|
+
for (let s = 0; s < i; s++) c = this.inner.step(c, n, r);
|
|
2972
2994
|
return { ...c, velocity: c.velocity * this.factor };
|
|
2973
2995
|
}
|
|
2974
2996
|
isSettled(e, n) {
|
|
@@ -2978,13 +3000,13 @@ class xe {
|
|
|
2978
3000
|
);
|
|
2979
3001
|
}
|
|
2980
3002
|
}
|
|
2981
|
-
function
|
|
2982
|
-
return new
|
|
3003
|
+
function nr(t, e) {
|
|
3004
|
+
return new Ee(t, e);
|
|
2983
3005
|
}
|
|
2984
|
-
function
|
|
3006
|
+
function Yi(t) {
|
|
2985
3007
|
const e = Te(t, 0, 1, 0), n = e.length ? e[e.length - 1].time : 0;
|
|
2986
|
-
if (t instanceof
|
|
2987
|
-
const o =
|
|
3008
|
+
if (t instanceof Ee) {
|
|
3009
|
+
const o = Yi(t.inner);
|
|
2988
3010
|
return {
|
|
2989
3011
|
...o,
|
|
2990
3012
|
kind: "scaled",
|
|
@@ -2992,61 +3014,61 @@ function Dr(t) {
|
|
|
2992
3014
|
settleMs: n
|
|
2993
3015
|
};
|
|
2994
3016
|
}
|
|
2995
|
-
return t instanceof
|
|
2996
|
-
kind: t instanceof
|
|
2997
|
-
...
|
|
3017
|
+
return t instanceof vt || t instanceof Ye ? {
|
|
3018
|
+
kind: t instanceof vt ? "spring" : "double-spring",
|
|
3019
|
+
...Fi(t.stiffness, t.damping),
|
|
2998
3020
|
settleMs: n
|
|
2999
|
-
} : t instanceof
|
|
3021
|
+
} : t instanceof Pt ? { kind: "inertia", settleMs: n } : { kind: "custom", settleMs: n };
|
|
3000
3022
|
}
|
|
3001
|
-
const
|
|
3023
|
+
const or = tt({
|
|
3002
3024
|
stiffness: 246.74011002723395,
|
|
3003
3025
|
damping: 31.41592653589793
|
|
3004
|
-
}),
|
|
3026
|
+
}), ir = tt({
|
|
3005
3027
|
stiffness: 438.6490844928604,
|
|
3006
3028
|
damping: 35.604716740684324
|
|
3007
|
-
}),
|
|
3029
|
+
}), rr = tt({
|
|
3008
3030
|
stiffness: 194.9551486634935,
|
|
3009
3031
|
damping: 19.54768762233649
|
|
3010
|
-
}),
|
|
3032
|
+
}), sr = tt({
|
|
3011
3033
|
stiffness: 130.5071656342394,
|
|
3012
3034
|
damping: 22.84794657156213
|
|
3013
|
-
}),
|
|
3035
|
+
}), ar = tt({
|
|
3014
3036
|
stiffness: 986.9604401089358,
|
|
3015
3037
|
damping: 62.83185307179586
|
|
3016
|
-
}),
|
|
3038
|
+
}), cr = Ti({ duration: 0.2 });
|
|
3017
3039
|
export {
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3040
|
+
ur as Animation,
|
|
3041
|
+
Ye as DoubleSpringIntegrator,
|
|
3042
|
+
Pt as InertiaIntegrator,
|
|
3043
|
+
x as IntegratorProvider,
|
|
3044
|
+
Ne as LinearIntegrator,
|
|
3045
|
+
I as MultiAnimation,
|
|
3046
|
+
Ee as ScaledIntegrator,
|
|
3047
|
+
vt as SpringIntegrator,
|
|
3048
|
+
w as WebAnimation,
|
|
3049
|
+
cr as accelerate,
|
|
3050
|
+
Vi as axis,
|
|
3051
|
+
Xi as blind,
|
|
3052
|
+
rr as bouncy,
|
|
3031
3053
|
k as defineTransition,
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3054
|
+
Yi as describeIntegrator,
|
|
3055
|
+
Bi as drill,
|
|
3056
|
+
Ti as easeIn,
|
|
3057
|
+
Ui as fade,
|
|
3058
|
+
ji as film,
|
|
3059
|
+
sr as gentle,
|
|
3060
|
+
Zi as hero,
|
|
3061
|
+
Gi as jaemin,
|
|
3062
|
+
qi as rotate,
|
|
3063
|
+
nr as scale,
|
|
3064
|
+
Ki as scroll,
|
|
3065
|
+
Ji as sheet,
|
|
3066
|
+
Qi as slide,
|
|
3067
|
+
or as smooth,
|
|
3068
|
+
ir as snappy,
|
|
3069
|
+
tt as spring,
|
|
3070
|
+
tr as strip,
|
|
3071
|
+
ar as swift,
|
|
3072
|
+
D as withOverride,
|
|
3073
|
+
er as zoom
|
|
3052
3074
|
};
|