@ssgoi/core 7.1.2 → 7.1.3-beta.0

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