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