@ssgoi/core 7.1.2 → 7.1.3-beta.1

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