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