@ssgoi/core 6.5.0 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- var Mt = Object.defineProperty;
2
- var Ut = (e, t, n) => t in e ? Mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var $ = (e, t, n) => Ut(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { P as K, V as Dt, W as m, M as C, S as Rt } from "./multi-animation-Ch5rI3rB.js";
5
- import { A as Fs } from "./multi-animation-Ch5rI3rB.js";
6
- function v(e, t) {
1
+ var Rt = Object.defineProperty;
2
+ var Ut = (e, t, n) => t in e ? Rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var C = (e, t, n) => Ut(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { P as J, V as vt, W as g, M as x, S as Vt } from "./multi-animation-Ch5rI3rB.js";
5
+ import { A as Ls } from "./multi-animation-Ch5rI3rB.js";
6
+ function D(e, t) {
7
7
  const n = [];
8
8
  for (let s = 0; s < e.length; s++)
9
9
  for (let o = s + 1; o < e.length; o++) {
10
- const i = e[s], r = e[o];
11
- !i || !r || n.push({
10
+ const i = e[s], l = e[o];
11
+ !i || !l || n.push({
12
12
  from: i,
13
- to: r,
13
+ to: l,
14
14
  transition: t(),
15
15
  symmetric: !0
16
16
  });
17
17
  }
18
18
  return n;
19
19
  }
20
- function vt(e, t) {
20
+ function Ot(e, t) {
21
21
  return [
22
22
  {
23
23
  from: e.exit,
@@ -31,41 +31,41 @@ function vt(e, t) {
31
31
  }
32
32
  ];
33
33
  }
34
- function G(e, t, n) {
34
+ function Q(e, t, n) {
35
35
  const s = [];
36
36
  for (let o = 0; o < e.length; o++)
37
37
  for (let i = o + 1; i < e.length; i++) {
38
- const r = e[o], l = e[i];
39
- !r || !l || s.push(
38
+ const l = e[o], a = e[i];
39
+ !l || !a || s.push(
40
40
  {
41
- from: r,
42
- to: l,
41
+ from: l,
42
+ to: a,
43
43
  transition: n(t.forward)
44
44
  },
45
45
  {
46
- from: l,
47
- to: r,
46
+ from: a,
47
+ to: l,
48
48
  transition: n(t.backward)
49
49
  }
50
50
  );
51
51
  }
52
52
  return s;
53
53
  }
54
- class k {
54
+ class L {
55
55
  constructor(t) {
56
- $(this, "omega");
56
+ C(this, "omega");
57
57
  // Angular frequency
58
- $(this, "zeta");
58
+ C(this, "zeta");
59
59
  // Damping ratio
60
- $(this, "restDelta");
61
- $(this, "restSpeed");
60
+ C(this, "restDelta");
61
+ C(this, "restSpeed");
62
62
  const { stiffness: n, damping: s } = t, o = 1;
63
- this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? K, this.restSpeed = t.restSpeed ?? Dt;
63
+ this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? J, this.restSpeed = t.restSpeed ?? vt;
64
64
  }
65
65
  step(t, n, s) {
66
- const o = Math.min(s, 0.033), { omega: i, zeta: r } = this, { position: l, velocity: c } = t, a = -2 * o * r * i * c, p = o * i * i * (n - l), d = c + a + p;
66
+ const o = Math.min(s, 0.033), { omega: i, zeta: l } = this, { position: a, velocity: r } = t, c = -2 * o * l * i * r, p = o * i * i * (n - a), d = r + c + p;
67
67
  return {
68
- position: l + o * d,
68
+ position: a + o * d,
69
69
  velocity: d
70
70
  };
71
71
  }
@@ -74,20 +74,20 @@ class k {
74
74
  return s < this.restDelta && o < this.restSpeed;
75
75
  }
76
76
  }
77
- class Vt {
77
+ class Nt {
78
78
  constructor(t) {
79
- $(this, "leader");
80
- $(this, "follower");
81
- $(this, "restDelta");
82
- $(this, "restSpeed");
83
- this.restDelta = t.restDelta ?? K, this.restSpeed = t.restSpeed ?? Dt, this.leader = new k({
79
+ C(this, "leader");
80
+ C(this, "follower");
81
+ C(this, "restDelta");
82
+ C(this, "restSpeed");
83
+ this.restDelta = t.restDelta ?? J, this.restSpeed = t.restSpeed ?? vt, this.leader = new L({
84
84
  stiffness: t.stiffness,
85
85
  damping: t.damping,
86
86
  restDelta: this.restDelta,
87
87
  restSpeed: this.restSpeed
88
88
  });
89
89
  let n, s, o, i;
90
- typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, i = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new k({
90
+ typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, i = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new L({
91
91
  stiffness: n,
92
92
  damping: s,
93
93
  restDelta: o ?? this.restDelta,
@@ -98,15 +98,15 @@ class Vt {
98
98
  const i = t._leader ?? {
99
99
  position: t.position,
100
100
  velocity: t.velocity
101
- }, r = this.leader.step(i, n, s), l = this.follower.step(
101
+ }, l = this.leader.step(i, n, s), a = this.follower.step(
102
102
  t,
103
- r.position,
103
+ l.position,
104
104
  s
105
105
  );
106
106
  return {
107
- position: l.position,
108
- velocity: l.velocity,
109
- _leader: r
107
+ position: a.position,
108
+ velocity: a.velocity,
109
+ _leader: l
110
110
  };
111
111
  }
112
112
  isSettled(t, n) {
@@ -114,46 +114,46 @@ class Vt {
114
114
  return s._leader ? Math.abs(n - s._leader.position) < this.restDelta && Math.abs(s._leader.velocity) < this.restSpeed && o : o;
115
115
  }
116
116
  }
117
- const zt = 0.01, Nt = 500, Xt = 10;
118
- class Bt {
117
+ const Xt = 0.01, Bt = 500, Zt = 10;
118
+ class Wt {
119
119
  constructor(t) {
120
- $(this, "acceleration");
121
- $(this, "resistance");
122
- $(this, "resistanceType");
123
- $(this, "min");
124
- $(this, "max");
125
- $(this, "bounceStiffness");
126
- $(this, "bounceDamping");
127
- $(this, "restDelta");
128
- this.acceleration = t.acceleration, this.resistance = t.resistance, this.resistanceType = t.resistanceType ?? "quadratic", this.min = t.min, this.max = t.max, this.bounceStiffness = t.bounceStiffness ?? Nt, this.bounceDamping = t.bounceDamping ?? Xt, this.restDelta = t.restDelta ?? zt;
120
+ C(this, "acceleration");
121
+ C(this, "resistance");
122
+ C(this, "resistanceType");
123
+ C(this, "min");
124
+ C(this, "max");
125
+ C(this, "bounceStiffness");
126
+ C(this, "bounceDamping");
127
+ C(this, "restDelta");
128
+ this.acceleration = t.acceleration, this.resistance = t.resistance, this.resistanceType = t.resistanceType ?? "quadratic", this.min = t.min, this.max = t.max, this.bounceStiffness = t.bounceStiffness ?? Bt, this.bounceDamping = t.bounceDamping ?? Zt, this.restDelta = t.restDelta ?? Xt;
129
129
  }
130
130
  step(t, n, s) {
131
- const o = Math.min(s, 0.033), { acceleration: i, resistance: r, resistanceType: l, min: c, max: a } = this, { position: p, velocity: d } = t, f = c !== void 0 && p < c, u = a !== void 0 && p > a;
131
+ const o = Math.min(s, 0.033), { acceleration: i, resistance: l, resistanceType: a, min: r, max: c } = this, { position: p, velocity: d } = t, f = r !== void 0 && p < r, u = c !== void 0 && p > c;
132
132
  let y;
133
133
  if (f || u) {
134
- const b = p - (f ? c : a), x = -this.bounceStiffness * b, E = -this.bounceDamping * d;
135
- y = x + E;
134
+ const b = p - (f ? r : c), P = -this.bounceStiffness * b, _ = -this.bounceDamping * d;
135
+ y = P + _;
136
136
  } else {
137
- const S = n > p ? 1 : -1;
137
+ const m = n > p ? 1 : -1;
138
138
  let b;
139
- l === "linear" ? b = r * d : b = r * d * Math.abs(d), y = S * i - b;
139
+ a === "linear" ? b = l * d : b = l * d * Math.abs(d), y = m * i - b;
140
140
  }
141
141
  const h = d + y * o;
142
- let w = p + h * o;
142
+ let S = p + h * o;
143
143
  if (!f && !u) {
144
- const S = n > p ? 1 : -1;
145
- (S > 0 && w > n || S < 0 && w < n) && (w = n);
144
+ const m = n > p ? 1 : -1;
145
+ (m > 0 && S > n || m < 0 && S < n) && (S = n);
146
146
  }
147
147
  return {
148
- position: w,
149
- velocity: w === n ? 0 : h
148
+ position: S,
149
+ velocity: S === n ? 0 : h
150
150
  };
151
151
  }
152
152
  isSettled(t, n) {
153
153
  return Math.abs(n - t.position) < this.restDelta;
154
154
  }
155
155
  }
156
- class g {
156
+ class w {
157
157
  /**
158
158
  * Create an Integrator from physics config
159
159
  *
@@ -167,7 +167,7 @@ class g {
167
167
  "Cannot use both 'spring' and 'inertia' together. Choose one physics type."
168
168
  );
169
169
  if (t.inertia)
170
- return new Bt({
170
+ return new Wt({
171
171
  acceleration: t.inertia.acceleration,
172
172
  resistance: t.inertia.resistance,
173
173
  resistanceType: t.inertia.resistanceType,
@@ -184,7 +184,7 @@ class g {
184
184
  return typeof s == "number" ? o = s : typeof s == "object" && (o = {
185
185
  stiffness: s.stiffness,
186
186
  damping: s.damping
187
- }), new Vt({
187
+ }), new Nt({
188
188
  stiffness: n.stiffness,
189
189
  damping: n.damping,
190
190
  follower: o,
@@ -192,7 +192,7 @@ class g {
192
192
  restSpeed: n.restSpeed
193
193
  });
194
194
  }
195
- return new k({
195
+ return new L({
196
196
  stiffness: n.stiffness,
197
197
  damping: n.damping,
198
198
  restDelta: n.restDelta,
@@ -204,32 +204,32 @@ class g {
204
204
  * @deprecated Use from({ spring: config }) instead
205
205
  */
206
206
  static fromSpring(t) {
207
- return g.from({ spring: t });
207
+ return w.from({ spring: t });
208
208
  }
209
209
  }
210
- class Wt {
210
+ class qt {
211
211
  constructor(t) {
212
- $(this, "durationSec");
212
+ C(this, "durationSec");
213
213
  this.durationSec = Math.max(1 / 60, t.durationSec);
214
214
  }
215
215
  step(t, n, s) {
216
216
  const o = n - t.position;
217
217
  if (o === 0) return t;
218
- const i = Math.sign(o), r = Math.abs(o) / this.durationSec, l = i * r * s, c = t.position + l;
219
- return (i > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: i * r };
218
+ const i = Math.sign(o), l = Math.abs(o) / this.durationSec, a = i * l * s, r = t.position + a;
219
+ return (i > 0 ? r >= n : r <= n) ? { position: n, velocity: 0 } : { position: r, velocity: i * l };
220
220
  }
221
221
  isSettled(t, n) {
222
- return Math.abs(t.position - n) < K;
222
+ return Math.abs(t.position - n) < J;
223
223
  }
224
224
  }
225
- function J(e, t) {
225
+ function tt(e, t) {
226
226
  function n(i) {
227
- let r = 0, l = 0;
228
- const c = i.offsetWidth, a = i.offsetHeight;
227
+ let l = 0, a = 0;
228
+ const r = i.offsetWidth, c = i.offsetHeight;
229
229
  let p = i;
230
230
  for (; p; )
231
- r += p.offsetTop, l += p.offsetLeft, p = p.offsetParent;
232
- return r -= window.scrollY, l -= window.scrollX, { top: r, left: l, width: c, height: a };
231
+ l += p.offsetTop, a += p.offsetLeft, p = p.offsetParent;
232
+ return l -= window.scrollY, a -= window.scrollX, { top: l, left: a, width: r, height: c };
233
233
  }
234
234
  const s = n(e), o = n(t);
235
235
  return new DOMRect(
@@ -239,7 +239,7 @@ function J(e, t) {
239
239
  o.height
240
240
  );
241
241
  }
242
- function tt(e, t) {
242
+ function nt(e, t) {
243
243
  const n = e.getBoundingClientRect(), s = t.getBoundingClientRect(), o = e.offsetWidth > 0 ? n.width / e.offsetWidth : 1, i = e.offsetHeight > 0 ? n.height / e.offsetHeight : 1;
244
244
  return new DOMRect(
245
245
  (s.left - n.left) / o,
@@ -248,8 +248,8 @@ function tt(e, t) {
248
248
  s.height / i
249
249
  );
250
250
  }
251
- function I(e, t) {
252
- const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? J(n, s).top : 0;
251
+ function T(e, t) {
252
+ const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? tt(n, s).top : 0;
253
253
  return {
254
254
  top: e[t].scroll.y,
255
255
  left: 0,
@@ -257,7 +257,7 @@ function I(e, t) {
257
257
  height: n.clientHeight - o
258
258
  };
259
259
  }
260
- const et = 8, nt = {
260
+ const st = 8, ot = {
261
261
  spring: {
262
262
  stiffness: 1e3,
263
263
  damping: 40,
@@ -266,10 +266,10 @@ const et = 8, nt = {
266
266
  restSpeed: 0.1
267
267
  }
268
268
  };
269
- function Zt({
269
+ function Kt({
270
270
  direction: e
271
271
  }) {
272
- const t = e === "forward" ? et : -et;
272
+ const t = e === "forward" ? st : -st;
273
273
  return {
274
274
  out: {
275
275
  willChange: "transform, opacity",
@@ -291,25 +291,25 @@ function Zt({
291
291
  }
292
292
  };
293
293
  }
294
- function qt() {
294
+ function jt() {
295
295
  return {
296
- outPhysics: nt,
297
- inPhysics: nt,
296
+ outPhysics: ot,
297
+ inPhysics: ot,
298
298
  // Both sides run together — the cross-fade is the whole point of the
299
299
  // snappy feel. (fluid's sibling uses staggered fade-through.)
300
300
  composition: { mode: "parallel", startAt: [0, 0] },
301
- build: Zt
301
+ build: Kt
302
302
  };
303
303
  }
304
- const st = 30, jt = {
304
+ const it = 30, Gt = {
305
305
  inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
306
- }, Kt = {
306
+ }, Jt = {
307
307
  spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
308
308
  };
309
- function Gt({
309
+ function Qt({
310
310
  direction: e
311
311
  }) {
312
- const t = e === "forward" ? 1 : -1, n = -st * t, s = st * t;
312
+ const t = e === "forward" ? 1 : -1, n = -it * t, s = it * t;
313
313
  return {
314
314
  out: {
315
315
  willChange: "transform, opacity",
@@ -332,29 +332,29 @@ function Gt({
332
332
  }
333
333
  };
334
334
  }
335
- function Jt() {
335
+ function te() {
336
336
  return {
337
- outPhysics: jt,
338
- inPhysics: Kt,
337
+ outPhysics: Gt,
338
+ inPhysics: Jt,
339
339
  // Phased motion: outgoing falls away first under inertia, then incoming
340
340
  // springs in. The fade-through shape comes from the integrator curves
341
341
  // plus the sequence handoff, not from FADE_SPLIT inside animate(t).
342
342
  composition: { mode: "sequence" },
343
- build: Gt
343
+ build: Qt
344
344
  };
345
345
  }
346
- const Qt = {
347
- snappy: qt(),
348
- fluid: Jt()
349
- }, ot = 8, te = {
346
+ const ee = {
347
+ snappy: jt(),
348
+ fluid: te()
349
+ }, rt = 8, ne = {
350
350
  inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
351
- }, ee = {
351
+ }, se = {
352
352
  spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
353
353
  };
354
- function ne({
354
+ function oe({
355
355
  direction: e
356
356
  }) {
357
- const t = e === "forward" ? 1 : -1, n = -ot * t, s = ot * t;
357
+ const t = e === "forward" ? 1 : -1, n = -rt * t, s = rt * t;
358
358
  return {
359
359
  out: {
360
360
  willChange: "transform, opacity",
@@ -377,21 +377,21 @@ function ne({
377
377
  }
378
378
  };
379
379
  }
380
- function se() {
380
+ function ie() {
381
381
  return {
382
- outPhysics: te,
383
- inPhysics: ee,
382
+ outPhysics: ne,
383
+ inPhysics: se,
384
384
  composition: { mode: "sequence" },
385
- build: ne
385
+ build: oe
386
386
  };
387
387
  }
388
- const oe = 8, ie = {
388
+ const re = 8, ae = {
389
389
  inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
390
- }, re = {
390
+ }, le = {
391
391
  spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
392
392
  };
393
- function ae(e) {
394
- const t = oe;
393
+ function ce(e) {
394
+ const t = re;
395
395
  return {
396
396
  out: {
397
397
  willChange: "opacity",
@@ -413,32 +413,32 @@ function ae(e) {
413
413
  }
414
414
  };
415
415
  }
416
- function le() {
416
+ function pe() {
417
417
  return {
418
- outPhysics: ie,
419
- inPhysics: re,
418
+ outPhysics: ae,
419
+ inPhysics: le,
420
420
  composition: { mode: "sequence" },
421
- build: ae
421
+ build: ce
422
422
  };
423
423
  }
424
- const it = se(), ce = {
425
- snappy: it,
426
- directional: it,
427
- "non-directional": le()
428
- }, rt = {
424
+ const at = ie(), de = {
425
+ snappy: at,
426
+ directional: at,
427
+ "non-directional": pe()
428
+ }, lt = {
429
429
  spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
430
- }, M = 0.1, U = 1 / 3, at = (e) => Math.max(0, Math.min(1, e));
431
- function pe({
430
+ }, R = 0.1, U = 1 / 3, ct = (e) => Math.max(0, Math.min(1, e));
431
+ function fe({
432
432
  direction: e
433
433
  }) {
434
- const t = e === "forward" ? 1 : -1, n = 1 - t * M;
434
+ const t = e === "forward" ? 1 : -1, n = 1 - t * R;
435
435
  return {
436
436
  out: {
437
437
  willChange: "transform, opacity",
438
438
  startStyle: {},
439
439
  animate: (s) => ({
440
- transform: `scale(${1 + t * s * M})`,
441
- opacity: `${at(1 - s / U)}`
440
+ transform: `scale(${1 + t * s * R})`,
441
+ opacity: `${ct(1 - s / U)}`
442
442
  })
443
443
  },
444
444
  in: {
@@ -448,130 +448,130 @@ function pe({
448
448
  opacity: "0"
449
449
  },
450
450
  animate: (s) => ({
451
- transform: `scale(${n + t * s * M})`,
452
- opacity: `${at((s - U) / (1 - U))}`
451
+ transform: `scale(${n + t * s * R})`,
452
+ opacity: `${ct((s - U) / (1 - U))}`
453
453
  })
454
454
  }
455
455
  };
456
456
  }
457
- function de() {
457
+ function ye() {
458
458
  return {
459
- outPhysics: rt,
460
- inPhysics: rt,
459
+ outPhysics: lt,
460
+ inPhysics: lt,
461
461
  // Scale must move together on both sides; fade-through is encoded inside
462
462
  // each tick (piecewise), not via composition staggering — so parallel.
463
463
  composition: { mode: "parallel" },
464
- build: pe
464
+ build: fe
465
465
  };
466
466
  }
467
- const lt = {
467
+ const pt = {
468
468
  spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
469
- }, R = 0.1, V = 1 / 3, ct = (e) => Math.max(0, Math.min(1, e));
470
- function fe() {
469
+ }, V = 0.1, N = 1 / 3, dt = (e) => Math.max(0, Math.min(1, e));
470
+ function he() {
471
471
  return {
472
472
  out: {
473
473
  willChange: "opacity",
474
474
  startStyle: {},
475
475
  animate: (e) => ({
476
- opacity: `${ct(1 - e / V)}`
476
+ opacity: `${dt(1 - e / N)}`
477
477
  })
478
478
  },
479
479
  in: {
480
480
  willChange: "transform, opacity",
481
481
  startStyle: {
482
- transform: `scale(${1 - R})`,
482
+ transform: `scale(${1 - V})`,
483
483
  opacity: "0"
484
484
  },
485
485
  animate: (e) => ({
486
- transform: `scale(${1 - R + e * R})`,
487
- opacity: `${ct((e - V) / (1 - V))}`
486
+ transform: `scale(${1 - V + e * V})`,
487
+ opacity: `${dt((e - N) / (1 - N))}`
488
488
  })
489
489
  }
490
490
  };
491
491
  }
492
- function ye() {
492
+ function ue() {
493
493
  return {
494
- outPhysics: lt,
495
- inPhysics: lt,
494
+ outPhysics: pt,
495
+ inPhysics: pt,
496
496
  composition: { mode: "parallel" },
497
- build: fe
497
+ build: he
498
498
  };
499
499
  }
500
- const pt = de(), he = {
501
- snappy: pt,
502
- directional: pt,
503
- "non-directional": ye()
504
- }, ue = {
505
- x: Qt,
506
- y: ce,
507
- z: he
500
+ const ft = ye(), me = {
501
+ snappy: ft,
502
+ directional: ft,
503
+ "non-directional": ue()
504
+ }, ge = {
505
+ x: ee,
506
+ y: de,
507
+ z: me
508
508
  };
509
- function me(e, t) {
510
- const n = ue[e];
509
+ function we(e, t) {
510
+ const n = ge[e];
511
511
  return n[t] ?? n.snappy;
512
512
  }
513
- const ge = "x", we = "snappy";
514
- function dt(e, t) {
513
+ const Se = "x", be = "snappy";
514
+ function yt(e, t) {
515
515
  e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
516
516
  for (const [n, s] of Object.entries(t.startStyle))
517
517
  e.style[n] = s;
518
518
  }
519
- function It(e) {
519
+ function Tt(e) {
520
520
  e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transform = "", e.style.opacity = "", e.style.clipPath = "";
521
521
  }
522
- function Se(e) {
523
- It(e), e.style.pointerEvents = "";
522
+ function $e(e) {
523
+ Tt(e), e.style.pointerEvents = "";
524
524
  }
525
- const be = (e = {}) => {
526
- const t = e.direction ?? "forward", n = e.type ?? ge, s = e.feel ?? we, o = me(n, s), i = o.build({ direction: t });
525
+ const Ce = (e = {}) => {
526
+ const t = e.direction ?? "forward", n = e.type ?? Se, s = e.feel ?? be, o = we(n, s), i = o.build({ direction: t });
527
527
  return {
528
- prepare: ({ from: r, to: l }) => (r.then((c) => {
529
- dt(c, i.out), c.style.pointerEvents = "none";
530
- }), l.then((c) => {
531
- dt(c, i.in);
528
+ prepare: ({ from: l, to: a }) => (l.then((r) => {
529
+ yt(r, i.out), r.style.pointerEvents = "none";
530
+ }), a.then((r) => {
531
+ yt(r, i.in);
532
532
  }), {}),
533
- animation: ({ from: r, to: l, context: c }) => {
533
+ animation: ({ from: l, to: a, context: r }) => {
534
534
  if (n === "z") {
535
- const d = I(c, "from"), f = I(c, "to");
536
- r.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`, l.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`;
535
+ const d = T(r, "from"), f = T(r, "to");
536
+ l.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`, a.style.clipPath = `inset(${f.top}px 0 calc(100% - ${f.top + f.height}px) 0)`;
537
537
  }
538
- const a = new m({
539
- element: r,
540
- integrator: g.from(o.outPhysics),
538
+ const c = new g({
539
+ element: l,
540
+ integrator: w.from(o.outPhysics),
541
541
  style: (d) => i.out.animate(d),
542
542
  // Restore the reused from node's inline styles on complete. This
543
543
  // covers willChange/backfaceVisibility/contain/transform/opacity (from
544
544
  // applyStartStyle + the WAAPI final frame), pointerEvents (set in
545
545
  // prepare), and clipPath (set above for z; harmless no-op otherwise).
546
- onComplete: () => Se(r)
547
- }), p = new m({
548
- element: l,
549
- integrator: g.from(o.inPhysics),
546
+ onComplete: () => $e(l)
547
+ }), p = new g({
548
+ element: a,
549
+ integrator: w.from(o.inPhysics),
550
550
  style: (d) => i.in.animate(d),
551
- onComplete: () => It(l)
551
+ onComplete: () => Tt(a)
552
552
  });
553
- return new C([a, p], o.composition);
553
+ return new x([c, p], o.composition);
554
554
  }
555
555
  };
556
556
  };
557
- function $e(e, t, n) {
557
+ function xe(e, t, n) {
558
558
  return e === "y" ? t === "non-directional" ? "non-directional" : "directional" : e !== "x" || t === "snappy" || n === "snappy" ? "snappy" : "fluid";
559
559
  }
560
- function ws(e) {
561
- const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i = $e(n, s, o);
562
- return G(
560
+ function $s(e) {
561
+ const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i = xe(n, s, o);
562
+ return Q(
563
563
  t,
564
564
  { forward: "forward", backward: "backward" },
565
- (r) => be({ type: n, direction: r, feel: i })
565
+ (l) => Ce({ type: n, direction: l, feel: i })
566
566
  );
567
567
  }
568
- const Ce = {
568
+ const Ee = {
569
569
  spring: { stiffness: 200, damping: 22 }
570
- }, Ee = 10, xe = "horizontal", Pe = "#000000";
571
- function ft(e, t, n, s, o, i) {
570
+ }, Pe = 10, _e = "horizontal", Ie = "#000000";
571
+ function ht(e, t, n, s, o, i) {
572
572
  window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
573
- const l = document.createElement("div");
574
- l.style.cssText = `
573
+ const a = document.createElement("div");
574
+ a.style.cssText = `
575
575
  position: absolute;
576
576
  top: 0;
577
577
  left: 0;
@@ -581,14 +581,14 @@ function ft(e, t, n, s, o, i) {
581
581
  z-index: 9999;
582
582
  overflow: hidden;
583
583
  `;
584
- const c = [];
585
- for (let a = 0; a < t; a++) {
584
+ const r = [];
585
+ for (let c = 0; c < t; c++) {
586
586
  const p = document.createElement("div");
587
587
  if (n === "horizontal") {
588
588
  const d = 100 / t;
589
589
  p.style.cssText = `
590
590
  position: absolute;
591
- top: ${d * a}%;
591
+ top: ${d * c}%;
592
592
  left: 0;
593
593
  width: 100%;
594
594
  height: calc(${d}% + 1px);
@@ -602,7 +602,7 @@ function ft(e, t, n, s, o, i) {
602
602
  p.style.cssText = `
603
603
  position: absolute;
604
604
  top: 0;
605
- left: ${d * a}%;
605
+ left: ${d * c}%;
606
606
  width: calc(${d}% + 1px);
607
607
  height: 100%;
608
608
  background: ${s};
@@ -611,27 +611,27 @@ function ft(e, t, n, s, o, i) {
611
611
  will-change: transform;
612
612
  `;
613
613
  }
614
- c.push(p), l.appendChild(p);
614
+ r.push(p), a.appendChild(p);
615
615
  }
616
- return e.appendChild(l), { container: l, blinds: c };
616
+ return e.appendChild(a), { container: a, blinds: r };
617
617
  }
618
- const _e = (e = {}) => {
619
- const t = e.blindCount ?? Ee, n = e.direction ?? xe, s = e.blindColor ?? Pe, o = e.physics ?? Ce;
618
+ const De = (e = {}) => {
619
+ const t = e.blindCount ?? Pe, n = e.direction ?? _e, s = e.blindColor ?? Ie, o = e.physics ?? Ee;
620
620
  return {
621
- prepare: async ({ from: i, to: r }) => {
622
- const l = await i, c = await r;
623
- l.style.zIndex = "1000";
624
- const a = ft(
625
- l,
621
+ prepare: async ({ from: i, to: l }) => {
622
+ const a = await i, r = await l;
623
+ a.style.zIndex = "1000";
624
+ const c = ht(
625
+ a,
626
626
  t,
627
627
  n,
628
628
  s,
629
629
  "hidden",
630
630
  "left"
631
631
  );
632
- c.style.position = "relative", c.style.zIndex = "0";
633
- const p = ft(
634
- c,
632
+ r.style.position = "relative", r.style.zIndex = "0";
633
+ const p = ht(
634
+ r,
635
635
  t,
636
636
  n,
637
637
  s,
@@ -639,55 +639,55 @@ const _e = (e = {}) => {
639
639
  "right"
640
640
  );
641
641
  return {
642
- fromEl: l,
643
- fromBlinds: a.blinds,
644
- fromContainer: a.container,
642
+ fromEl: a,
643
+ fromBlinds: c.blinds,
644
+ fromContainer: c.container,
645
645
  toBlinds: p.blinds,
646
646
  toContainer: p.container
647
647
  };
648
648
  },
649
649
  animation: ({
650
650
  fromEl: i,
651
- fromBlinds: r,
652
- fromContainer: l,
653
- toBlinds: c,
654
- toContainer: a
651
+ fromBlinds: l,
652
+ fromContainer: a,
653
+ toBlinds: r,
654
+ toContainer: c
655
655
  }) => {
656
- const p = r.map(
657
- (y) => new m({
656
+ const p = l.map(
657
+ (y) => new g({
658
658
  element: y,
659
- integrator: g.from(o),
659
+ integrator: w.from(o),
660
660
  style: (h) => ({
661
661
  transform: n === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
662
662
  })
663
663
  })
664
- ), d = c.map(
665
- (y, h) => new m({
664
+ ), d = r.map(
665
+ (y, h) => new g({
666
666
  element: y,
667
- integrator: g.from(o),
668
- style: (w, S) => ({
669
- transform: n === "horizontal" ? `scaleX(${S})` : `scaleY(${S})`
667
+ integrator: w.from(o),
668
+ style: (S, m) => ({
669
+ transform: n === "horizontal" ? `scaleX(${m})` : `scaleY(${m})`
670
670
  }),
671
- onComplete: h === c.length - 1 ? () => {
672
- a.remove(), l.remove(), i.style.zIndex = "", i.style.position = "";
671
+ onComplete: h === r.length - 1 ? () => {
672
+ c.remove(), a.remove(), i.style.zIndex = "", i.style.position = "";
673
673
  } : void 0
674
674
  })
675
- ), f = new C(p, { mode: "parallel" }), u = new C(d, { mode: "parallel" });
676
- return new C([f, u], { mode: "sequence" });
675
+ ), f = new x(p, { mode: "parallel" }), u = new x(d, { mode: "parallel" });
676
+ return new x([f, u], { mode: "sequence" });
677
677
  }
678
678
  };
679
679
  };
680
- function Ss(e) {
680
+ function Cs(e) {
681
681
  const { paths: t, type: n = "horizontal" } = e;
682
- return v(
682
+ return D(
683
683
  t,
684
- () => _e({ direction: n })
684
+ () => De({ direction: n })
685
685
  );
686
686
  }
687
- const De = {
687
+ const ve = {
688
688
  spring: { stiffness: 200, damping: 20, doubleSpring: 0.7 }
689
- }, O = 0.5;
690
- function ve(e) {
689
+ }, F = 0.5;
690
+ function Oe(e) {
691
691
  const t = e === "enter" ? -100 : 100, n = e === "enter" ? 100 : -100;
692
692
  return {
693
693
  out: {
@@ -695,32 +695,32 @@ function ve(e) {
695
695
  startStyle: {},
696
696
  animate: (s) => ({
697
697
  transform: `translate3d(${t * s}%, 0, 0)`,
698
- opacity: `${O + (1 - O) * (1 - s)}`
698
+ opacity: `${F + (1 - F) * (1 - s)}`
699
699
  })
700
700
  },
701
701
  in: {
702
702
  willChange: "transform, opacity",
703
703
  startStyle: {
704
704
  transform: `translate3d(${n}%, 0, 0)`,
705
- opacity: `${O}`
705
+ opacity: `${F}`
706
706
  },
707
707
  animate: (s) => ({
708
708
  transform: `translate3d(${n * (1 - s)}%, 0, 0)`,
709
- opacity: `${O + (1 - O) * s}`
709
+ opacity: `${F + (1 - F) * s}`
710
710
  })
711
711
  }
712
712
  };
713
713
  }
714
- function Ie() {
714
+ function Te() {
715
715
  return {
716
- physics: De,
717
- build: ve
716
+ physics: ve,
717
+ build: Oe
718
718
  };
719
719
  }
720
- const Te = {
720
+ const Ae = {
721
721
  spring: { stiffness: 170, damping: 22 }
722
722
  };
723
- function Oe(e) {
723
+ function Fe(e) {
724
724
  const t = e === "enter" ? -20 : 100, n = e === "enter" ? 100 : -20;
725
725
  return {
726
726
  out: {
@@ -741,166 +741,172 @@ function Oe(e) {
741
741
  }
742
742
  };
743
743
  }
744
- function Ae() {
744
+ function ke() {
745
745
  return {
746
- physics: Te,
747
- build: Oe
746
+ physics: Ae,
747
+ build: Fe
748
748
  };
749
749
  }
750
- const Fe = {
751
- parallax: Ae(),
752
- crossfade: Ie()
753
- }, ke = "parallax";
754
- function yt(e, t) {
750
+ const Ye = {
751
+ parallax: ke(),
752
+ crossfade: Te()
753
+ }, v = "0", Le = "1", O = "2", He = "parallax";
754
+ function ut(e, t) {
755
755
  e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
756
756
  for (const [n, s] of Object.entries(t.startStyle))
757
757
  e.style[n] = s;
758
758
  }
759
- const Ye = (e = {}) => {
760
- const t = e.direction ?? "enter", n = Fe[e.type ?? ke], s = n.physics, o = n.build(t);
759
+ const Me = (e = {}) => {
760
+ const t = e.direction ?? "enter", n = Ye[e.type ?? He], s = n.physics, o = n.build(t), i = t === "enter" ? v : O, l = t === "enter" ? O : v;
761
761
  return {
762
- prepare: ({ from: i, to: r }) => (i.then((l) => {
763
- yt(l, o.out), l.style.pointerEvents = "none", l.style.zIndex = t === "enter" ? "-1" : "100";
764
- }), r.then((l) => {
765
- yt(l, o.in);
762
+ prepare: ({ from: a, to: r }) => (a.then((c) => {
763
+ ut(c, o.out), c.style.pointerEvents = "none", c.style.zIndex = i;
764
+ }), r.then((c) => {
765
+ ut(c, o.in), c.style.position = "relative", c.style.zIndex = l;
766
766
  }), {}),
767
- animation: ({ from: i, to: r }) => {
768
- const l = new m({
769
- element: i,
770
- integrator: g.from(s),
771
- style: (a) => o.out.animate(a),
767
+ animation: ({ from: a, to: r }) => {
768
+ const c = new g({
769
+ element: a,
770
+ integrator: w.from(s),
771
+ style: (d) => o.out.animate(d),
772
772
  // The outgoing node is the real, reused element (re-hidden on navigate),
773
773
  // so clear every inline style we set on it — mirroring the `to` cleanup,
774
774
  // plus the out-only `pointerEvents` / `zIndex`.
775
775
  onComplete: () => {
776
- i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "", i.style.opacity = "", i.style.pointerEvents = "", i.style.zIndex = "";
776
+ a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.opacity = "", a.style.pointerEvents = "", a.style.zIndex = "";
777
777
  }
778
- }), c = new m({
778
+ }), p = new g({
779
779
  element: r,
780
- integrator: g.from(s),
781
- style: (a) => o.in.animate(a),
780
+ integrator: w.from(s),
781
+ style: (d) => o.in.animate(d),
782
782
  onComplete: () => {
783
- r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.opacity = "";
783
+ r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.opacity = "", r.style.position === "relative" && (r.style.position = ""), r.style.zIndex === l && (r.style.zIndex = "");
784
784
  }
785
785
  });
786
- return new C([l, c], { mode: "parallel" });
786
+ for (const d of [c, p]) {
787
+ const f = d.onComplete;
788
+ d.onComplete = () => {
789
+ f == null || f(), d.releaseFill();
790
+ };
791
+ }
792
+ return new x([c, p], { mode: "parallel" });
787
793
  }
788
794
  };
789
795
  };
790
- function Le(e) {
796
+ function ze(e) {
791
797
  return e === "slide" || e === "crossfade" ? "crossfade" : "parallax";
792
798
  }
793
- function bs(e) {
794
- const { enter: t, exit: n } = e, s = e.type, o = Le(s);
795
- return vt(
799
+ function xs(e) {
800
+ const { enter: t, exit: n } = e, s = e.type, o = ze(s);
801
+ return Ot(
796
802
  { enter: t, exit: n },
797
- (i) => Ye({ direction: i, type: o })
803
+ (i) => Me({ direction: i, type: o })
798
804
  );
799
805
  }
800
- const He = {
806
+ const Re = {
801
807
  spring: { stiffness: 180, damping: 20, doubleSpring: !0 }
802
- }, Me = {
808
+ }, Ue = {
803
809
  spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
804
- }, Ue = (e = {}) => {
805
- const t = e.physics ?? Me, n = e.physics ?? He;
810
+ }, Ve = (e = {}) => {
811
+ const t = e.physics ?? Ue, n = e.physics ?? Re;
806
812
  return {
807
813
  prepare: ({ to: s }) => (s.then((o) => {
808
814
  o.style.opacity = "0", o.style.willChange = "opacity";
809
815
  }), {}),
810
816
  animation: ({ from: s, to: o }) => {
811
- const i = new m({
817
+ const i = new g({
812
818
  element: s,
813
- integrator: g.from(n),
819
+ integrator: w.from(n),
814
820
  // Default bounds (0, 1). `u` runs 1→0 as the animation moves
815
821
  // forward, mapping opacity from fully visible to invisible.
816
- style: (l, c) => ({ opacity: c }),
822
+ style: (a, r) => ({ opacity: r }),
817
823
  onComplete: () => {
818
824
  s.style.willChange = "auto", s.style.opacity = "";
819
825
  }
820
- }), r = new m({
826
+ }), l = new g({
821
827
  element: o,
822
- integrator: g.from(t),
823
- style: (l) => ({ opacity: l }),
828
+ integrator: w.from(t),
829
+ style: (a) => ({ opacity: a }),
824
830
  onComplete: () => {
825
831
  o.style.willChange = "auto", o.style.opacity = "";
826
832
  }
827
833
  });
828
- return new C([i, r], { mode: "sequence" });
834
+ return new x([i, l], { mode: "sequence" });
829
835
  }
830
836
  };
831
837
  };
832
- function $s(e) {
838
+ function Es(e) {
833
839
  const { paths: t } = e;
834
- return v(t, () => Ue());
840
+ return D(t, () => Ve());
835
841
  }
836
- const z = {
842
+ const X = {
837
843
  scaleDown: { stiffness: 20, damping: 7 },
838
844
  translate: { stiffness: 15, damping: 7 },
839
845
  scaleUp: { stiffness: 20, damping: 7 }
840
- }, T = {
846
+ }, A = {
841
847
  scaleDown: 0,
842
848
  translate: 0.2,
843
849
  scaleUp: 0.8
844
- }, Re = 0.8, Ve = "white", ht = 1e3 / 60, ze = 600;
845
- function Ne(e) {
846
- const { items: t, from: n, to: s, recordFrame: o } = e, i = ht / 1e3, r = Math.abs(s - n), l = t.map((a) => ({
847
- item: a,
848
- integrator: new k({
849
- stiffness: a.spring.stiffness,
850
- damping: a.spring.damping
850
+ }, Ne = 0.8, Xe = "white", mt = 1e3 / 60, Be = 600;
851
+ function Ze(e) {
852
+ const { items: t, from: n, to: s, recordFrame: o } = e, i = mt / 1e3, l = Math.abs(s - n), a = t.map((c) => ({
853
+ item: c,
854
+ integrator: new L({
855
+ stiffness: c.spring.stiffness,
856
+ damping: c.spring.damping
851
857
  }),
852
858
  state: { position: n, velocity: 0 },
853
859
  started: !1,
854
860
  settled: !1,
855
861
  settleTime: 0
856
862
  }));
857
- for (let a = 0; a < l.length; a++)
858
- (a === 0 || l[a].item.offset === 0) && (l[a].started = !0);
863
+ for (let c = 0; c < a.length; c++)
864
+ (c === 0 || a[c].item.offset === 0) && (a[c].started = !0);
859
865
  o(0);
860
- let c = 0;
861
- for (let a = 1; a <= ze; a++) {
862
- const p = a * ht;
863
- c = p;
864
- for (const d of l)
865
- !d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >= Rt && (d.state = { position: s, velocity: 0 }, d.settled = !0)) : d.settleTime = 0, d.item.tick(d.state.position));
866
- for (let d = 1; d < l.length; d++) {
867
- const f = l[d];
866
+ let r = 0;
867
+ for (let c = 1; c <= Be; c++) {
868
+ const p = c * mt;
869
+ r = p;
870
+ for (const d of a)
871
+ !d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >= Vt && (d.state = { position: s, velocity: 0 }, d.settled = !0)) : d.settleTime = 0, d.item.tick(d.state.position));
872
+ for (let d = 1; d < a.length; d++) {
873
+ const f = a[d];
868
874
  if (f.started) continue;
869
- const u = l[d - 1];
875
+ const u = a[d - 1];
870
876
  if (!u.started) continue;
871
- (r === 0 ? 1 : Math.abs(u.state.position - n) / r) >= f.item.offset && (f.started = !0);
877
+ (l === 0 ? 1 : Math.abs(u.state.position - n) / l) >= f.item.offset && (f.started = !0);
872
878
  }
873
- if (o(p), l.every((d) => d.settled)) return p;
879
+ if (o(p), a.every((d) => d.settled)) return p;
874
880
  }
875
- return c;
881
+ return r;
876
882
  }
877
- function N(e, t) {
883
+ function B(e, t) {
878
884
  return e != null && e.spring ? {
879
885
  stiffness: e.spring.stiffness,
880
886
  damping: e.spring.damping
881
887
  } : t;
882
888
  }
883
- function ut(e) {
884
- const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, r = N(o, z.scaleDown), l = N(o, z.translate), c = N(o, z.scaleUp), a = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
889
+ function gt(e) {
890
+ const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, l = B(o, X.scaleDown), a = B(o, X.translate), r = B(o, X.scaleUp), c = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
885
891
  {
886
- spring: r,
887
- offset: T.scaleDown,
892
+ spring: l,
893
+ offset: A.scaleDown,
888
894
  tick: (y) => {
889
895
  const h = 1 - y;
890
896
  i.scale = 1 - (1 - n) * h;
891
897
  }
892
898
  },
893
899
  {
894
- spring: l,
895
- offset: T.translate,
900
+ spring: a,
901
+ offset: A.translate,
896
902
  tick: (y) => {
897
903
  const h = 1 - y;
898
904
  i.translateY = -t.top - t.height * h;
899
905
  }
900
906
  },
901
907
  {
902
- spring: c,
903
- offset: T.scaleUp,
908
+ spring: r,
909
+ offset: A.scaleUp,
904
910
  tick: (y) => {
905
911
  const h = 1 - y;
906
912
  i.scale = n + (1 - n) * h;
@@ -908,29 +914,29 @@ function ut(e) {
908
914
  }
909
915
  ] : [
910
916
  {
911
- spring: r,
912
- offset: T.scaleDown,
917
+ spring: l,
918
+ offset: A.scaleDown,
913
919
  tick: (y) => {
914
920
  i.scale = 1 - (1 - n) * y;
915
921
  }
916
922
  },
917
923
  {
918
- spring: l,
919
- offset: T.translate,
924
+ spring: a,
925
+ offset: A.translate,
920
926
  tick: (y) => {
921
927
  i.translateY = -t.top + t.height * (1 - y);
922
928
  }
923
929
  },
924
930
  {
925
- spring: c,
926
- offset: T.scaleUp,
931
+ spring: r,
932
+ offset: A.scaleUp,
927
933
  tick: (y) => {
928
934
  i.scale = n + (1 - n) * y;
929
935
  }
930
936
  }
931
- ], f = [], u = Ne({
937
+ ], f = [], u = Ze({
932
938
  items: d,
933
- from: a,
939
+ from: c,
934
940
  to: p,
935
941
  recordFrame: (y) => f.push({
936
942
  time: y,
@@ -940,29 +946,29 @@ function ut(e) {
940
946
  });
941
947
  return { snapshots: f, totalDuration: u };
942
948
  }
943
- function Xe(e, t) {
949
+ function We(e, t) {
944
950
  if (e.length === 0) return { time: 0, scale: 1, translateY: 0 };
945
951
  if (e.length === 1 || t <= 0) return e[0];
946
952
  if (t >= 1) return e[e.length - 1];
947
953
  const n = t * (e.length - 1), s = Math.floor(n), o = Math.ceil(n);
948
954
  if (s === o) return e[s];
949
- const i = e[s], r = e[o], l = n - s;
955
+ const i = e[s], l = e[o], a = n - s;
950
956
  return {
951
- time: i.time + (r.time - i.time) * l,
952
- scale: i.scale + (r.scale - i.scale) * l,
953
- translateY: i.translateY + (r.translateY - i.translateY) * l
957
+ time: i.time + (l.time - i.time) * a,
958
+ scale: i.scale + (l.scale - i.scale) * a,
959
+ translateY: i.translateY + (l.translateY - i.translateY) * a
954
960
  };
955
961
  }
956
- const Be = [
962
+ const qe = [
957
963
  [1, 1],
958
964
  [-1, 1],
959
965
  [1, -1],
960
966
  [-1, -1]
961
967
  ];
962
- function We(e, t) {
963
- const o = (i, r, l) => {
964
- const c = document.createElement("div");
965
- Object.assign(c.style, {
968
+ function Ke(e, t) {
969
+ const o = (i, l, a) => {
970
+ const r = document.createElement("div");
971
+ Object.assign(r.style, {
966
972
  position: "fixed",
967
973
  pointerEvents: "none",
968
974
  zIndex: "9999",
@@ -970,14 +976,14 @@ function We(e, t) {
970
976
  height: "15px",
971
977
  ...i
972
978
  });
973
- const a = document.createElement("div");
974
- Object.assign(a.style, {
979
+ const c = document.createElement("div");
980
+ Object.assign(c.style, {
975
981
  position: "absolute",
976
982
  width: "15px",
977
983
  height: "1px",
978
984
  backgroundColor: e,
979
- [l]: "0",
980
- [r]: "0"
985
+ [a]: "0",
986
+ [l]: "0"
981
987
  });
982
988
  const p = document.createElement("div");
983
989
  return Object.assign(p.style, {
@@ -985,9 +991,9 @@ function We(e, t) {
985
991
  width: "1px",
986
992
  height: "15px",
987
993
  backgroundColor: e,
988
- [l]: "0",
989
- [r]: "0"
990
- }), c.appendChild(a), c.appendChild(p), c;
994
+ [a]: "0",
995
+ [l]: "0"
996
+ }), r.appendChild(c), r.appendChild(p), r;
991
997
  };
992
998
  return {
993
999
  topLeft: o(
@@ -1024,11 +1030,11 @@ function We(e, t) {
1024
1030
  )
1025
1031
  };
1026
1032
  }
1027
- function mt(e, t) {
1033
+ function wt(e, t) {
1028
1034
  const n = t.left + t.width / 2, s = t.top + t.height / 2;
1029
1035
  e.style.transformOrigin = `${n}px ${s}px`;
1030
1036
  }
1031
- function gt(e, t) {
1037
+ function St(e, t) {
1032
1038
  e.style.clipPath = `polygon(
1033
1039
  ${t.left}px ${t.top}px,
1034
1040
  ${t.left + t.width}px ${t.top}px,
@@ -1036,24 +1042,24 @@ function gt(e, t) {
1036
1042
  ${t.left}px ${t.top + t.height}px
1037
1043
  )`;
1038
1044
  }
1039
- function X(e, t, n, s, o) {
1045
+ function Z(e, t, n, s, o) {
1040
1046
  const i = n / 1e3;
1041
- return new m({
1047
+ return new g({
1042
1048
  element: e,
1043
- integrator: new Wt({ durationSec: i }),
1049
+ integrator: new qt({ durationSec: i }),
1044
1050
  lowerBound: 0,
1045
1051
  upperBound: 1,
1046
- style: (r) => s(Xe(t, r)),
1052
+ style: (l) => s(We(t, l)),
1047
1053
  onComplete: o
1048
1054
  });
1049
1055
  }
1050
- const Ze = (e = {}) => {
1056
+ const je = (e = {}) => {
1051
1057
  var o;
1052
- const t = ((o = e.border) == null ? void 0 : o.color) ?? Ve, n = Re, s = e.physics;
1058
+ const t = ((o = e.border) == null ? void 0 : o.color) ?? Xe, n = Ne, s = e.physics;
1053
1059
  return {
1054
- prepare: ({ from: i, to: r, context: l }) => {
1055
- const c = I(l, "from"), a = I(l, "to"), p = J(document.body, l.positionedParent), d = We(t, {
1056
- ...c,
1060
+ prepare: ({ from: i, to: l, context: a }) => {
1061
+ const r = T(a, "from"), c = T(a, "to"), p = tt(document.body, a.positionedParent), d = Ke(t, {
1062
+ ...r,
1057
1063
  top: p.top
1058
1064
  });
1059
1065
  for (const f of [
@@ -1062,25 +1068,25 @@ const Ze = (e = {}) => {
1062
1068
  "bottomLeft",
1063
1069
  "bottomRight"
1064
1070
  ])
1065
- l.positionedParent.appendChild(d[f]);
1071
+ a.positionedParent.appendChild(d[f]);
1066
1072
  return i.then((f) => {
1067
- mt(f, c), gt(f, c), f.style.transform = `translateY(${-c.top}px)`;
1068
- }), r.then((f) => {
1069
- mt(f, a), gt(f, a), f.style.transform = `translateY(${-a.top + a.height}px) scale(${n})`;
1070
- }), { borders: d, fromRect: c, toRect: a };
1073
+ wt(f, r), St(f, r), f.style.transform = `translateY(${-r.top}px)`;
1074
+ }), l.then((f) => {
1075
+ wt(f, c), St(f, c), f.style.transform = `translateY(${-c.top + c.height}px) scale(${n})`;
1076
+ }), { borders: d, fromRect: r, toRect: c };
1071
1077
  },
1072
- animation: ({ from: i, to: r, context: l, borders: c, fromRect: a, toRect: p }) => {
1073
- const d = ut({
1074
- rect: a,
1078
+ animation: ({ from: i, to: l, context: a, borders: r, fromRect: c, toRect: p }) => {
1079
+ const d = gt({
1080
+ rect: c,
1075
1081
  scale: n,
1076
1082
  direction: "out",
1077
1083
  override: s
1078
- }), f = ut({
1084
+ }), f = gt({
1079
1085
  rect: p,
1080
1086
  scale: n,
1081
1087
  direction: "in",
1082
1088
  override: s
1083
- }), u = X(
1089
+ }), u = Z(
1084
1090
  i,
1085
1091
  d.snapshots,
1086
1092
  d.totalDuration,
@@ -1090,54 +1096,54 @@ const Ze = (e = {}) => {
1090
1096
  () => {
1091
1097
  i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
1092
1098
  }
1093
- ), y = X(
1094
- r,
1099
+ ), y = Z(
1100
+ l,
1095
1101
  f.snapshots,
1096
1102
  f.totalDuration,
1097
1103
  (b) => ({
1098
1104
  transform: `translateY(${b.translateY}px) scale(${b.scale})`
1099
1105
  }),
1100
1106
  () => {
1101
- r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
1107
+ l.style.clipPath = "", l.style.transformOrigin = "", l.style.transform = "";
1102
1108
  }
1103
- ), h = Be.map(([b, x], E) => {
1104
- const P = ["topLeft", "topRight", "bottomLeft", "bottomRight"][E];
1105
- return X(
1106
- c[P],
1109
+ ), h = qe.map(([b, P], _) => {
1110
+ const I = ["topLeft", "topRight", "bottomLeft", "bottomRight"][_];
1111
+ return Z(
1112
+ r[I],
1107
1113
  d.snapshots,
1108
1114
  d.totalDuration,
1109
- (D) => {
1110
- const _ = (a.width - a.width * D.scale) / 2 * 0.7 * b, H = (a.height - a.height * D.scale) / 2 * 0.7 * x;
1111
- return { transform: `translate(${_}px, ${H}px)` };
1115
+ ($) => {
1116
+ const E = (c.width - c.width * $.scale) / 2 * 0.7 * b, z = (c.height - c.height * $.scale) / 2 * 0.7 * P;
1117
+ return { transform: `translate(${E}px, ${z}px)` };
1112
1118
  }
1113
1119
  );
1114
- }), w = new C([u, y, ...h], {
1120
+ }), S = new x([u, y, ...h], {
1115
1121
  mode: "parallel"
1116
- }), S = w.onComplete;
1117
- return w.onComplete = () => {
1118
- S == null || S();
1119
- const b = l.positionedParent;
1120
- for (const x of [
1122
+ }), m = S.onComplete;
1123
+ return S.onComplete = () => {
1124
+ m == null || m();
1125
+ const b = a.positionedParent;
1126
+ for (const P of [
1121
1127
  "topLeft",
1122
1128
  "topRight",
1123
1129
  "bottomLeft",
1124
1130
  "bottomRight"
1125
1131
  ]) {
1126
- const E = c[x];
1127
- E.parentElement === b && b.removeChild(E);
1132
+ const _ = r[P];
1133
+ _.parentElement === b && b.removeChild(_);
1128
1134
  }
1129
- }, w;
1135
+ }, S;
1130
1136
  }
1131
1137
  };
1132
1138
  };
1133
- function Cs(e) {
1139
+ function Ps(e) {
1134
1140
  const { paths: t, options: n } = e, s = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
1135
- return v(t, () => Ze(s));
1141
+ return D(t, () => je(s));
1136
1142
  }
1137
- const wt = "data-hero-enter-key", St = "data-hero-exit-key", B = "data-hero-key";
1138
- class qe {
1143
+ const bt = "data-hero-enter-key", $t = "data-hero-exit-key", W = "data-hero-key";
1144
+ class Ge {
1139
1145
  constructor() {
1140
- $(this, "previousFromOpacity", "");
1146
+ C(this, "previousFromOpacity", "");
1141
1147
  }
1142
1148
  prepare(t) {
1143
1149
  t.from.then((n) => {
@@ -1150,38 +1156,38 @@ class qe {
1150
1156
  }), [];
1151
1157
  }
1152
1158
  }
1153
- const je = () => new qe();
1154
- class Ke {
1159
+ const Je = () => new Ge();
1160
+ class Qe {
1155
1161
  contribute(t) {
1156
- const { from: n, to: s, physics: o, onComplete: i } = t, r = n.style.opacity, l = s.style.opacity, c = n.style.willChange, a = s.style.willChange;
1162
+ const { from: n, to: s, physics: o, onComplete: i } = t, l = n.style.opacity, a = s.style.opacity, r = n.style.willChange, c = s.style.willChange;
1157
1163
  return s.style.opacity = "0", n.style.willChange = "opacity", s.style.willChange = "opacity", i(() => {
1158
- n.style.opacity = r, s.style.opacity = l, n.style.willChange = c, s.style.willChange = a;
1164
+ n.style.opacity = l, s.style.opacity = a, n.style.willChange = r, s.style.willChange = c;
1159
1165
  }), [
1160
- new m({
1166
+ new g({
1161
1167
  element: n,
1162
- integrator: g.from(o),
1168
+ integrator: w.from(o),
1163
1169
  style: (p, d) => ({ opacity: d })
1164
1170
  }),
1165
- new m({
1171
+ new g({
1166
1172
  element: s,
1167
- integrator: g.from(o),
1173
+ integrator: w.from(o),
1168
1174
  style: (p) => ({ opacity: p })
1169
1175
  })
1170
1176
  ];
1171
1177
  }
1172
1178
  }
1173
- const Ge = () => new Ke(), Je = {
1174
- static: je,
1175
- fade: Ge
1176
- }, Qe = {
1179
+ const tn = () => new Qe(), en = {
1180
+ static: Je,
1181
+ fade: tn
1182
+ }, nn = {
1177
1183
  spring: { stiffness: 320, damping: 30 }
1178
- }, tn = () => Qe, en = {
1184
+ }, sn = () => nn, on = {
1179
1185
  spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
1180
- }, nn = () => en, sn = {
1181
- default: tn,
1182
- smooth: nn
1183
- }, on = 700, rn = "data-hero-aspect-ratio", an = "data-hero-radius";
1184
- function ln(e) {
1186
+ }, rn = () => on, an = {
1187
+ default: sn,
1188
+ smooth: rn
1189
+ }, ln = 700, cn = "data-hero-aspect-ratio", pn = "data-hero-radius";
1190
+ function dn(e) {
1185
1191
  if (!e) return null;
1186
1192
  if (e.includes("/")) {
1187
1193
  const [n, s] = e.split("/"), o = parseFloat(n ?? ""), i = parseFloat(s ?? "");
@@ -1190,19 +1196,19 @@ function ln(e) {
1190
1196
  const t = parseFloat(e);
1191
1197
  return Number.isFinite(t) && t > 0 ? t : null;
1192
1198
  }
1193
- function bt(e) {
1194
- const t = e.getAttribute(an);
1199
+ function Ct(e) {
1200
+ const t = e.getAttribute(pn);
1195
1201
  if (!t) return 0;
1196
1202
  const n = parseFloat(t);
1197
1203
  return Number.isFinite(n) && n > 0 ? n : 0;
1198
1204
  }
1199
- function Y(e) {
1205
+ function H(e) {
1200
1206
  return e.left + e.width / 2;
1201
1207
  }
1202
- function L(e) {
1208
+ function M(e) {
1203
1209
  return e.top + e.height / 2;
1204
1210
  }
1205
- function cn(e, t) {
1211
+ function fn(e, t) {
1206
1212
  return {
1207
1213
  top: Math.max(0, t.top - e.top),
1208
1214
  right: Math.max(0, e.left + e.width - (t.left + t.width)),
@@ -1210,7 +1216,7 @@ function cn(e, t) {
1210
1216
  left: Math.max(0, t.left - e.left)
1211
1217
  };
1212
1218
  }
1213
- function pn(e, t, n) {
1219
+ function yn(e, t, n) {
1214
1220
  const s = e.width / e.height;
1215
1221
  let o, i;
1216
1222
  return n === "contain" ? s > t ? (i = e.height, o = i * t) : (o = e.width, i = o / t) : s > t ? (o = e.width, i = o / t) : (i = e.height, o = i * t), {
@@ -1220,8 +1226,8 @@ function pn(e, t, n) {
1220
1226
  height: i
1221
1227
  };
1222
1228
  }
1223
- function $t(e, t, n) {
1224
- const s = J(e, t), o = ln(t.getAttribute(rn));
1229
+ function xt(e, t, n) {
1230
+ const s = tt(e, t), o = dn(t.getAttribute(cn));
1225
1231
  if (o === null)
1226
1232
  return {
1227
1233
  bbox: s,
@@ -1229,24 +1235,24 @@ function $t(e, t, n) {
1229
1235
  window: s,
1230
1236
  clipInset: { top: 0, right: 0, bottom: 0, left: 0 }
1231
1237
  };
1232
- const i = pn(s, o, n), r = n === "cover" ? s : i;
1238
+ const i = yn(s, o, n), l = n === "cover" ? s : i;
1233
1239
  return {
1234
1240
  bbox: s,
1235
1241
  content: i,
1236
- window: r,
1237
- clipInset: cn(i, r)
1242
+ window: l,
1243
+ clipInset: fn(i, l)
1238
1244
  };
1239
1245
  }
1240
- function dn(e, t, n, s) {
1241
- const o = n.width / s, i = n.height / s, r = e.width / 2 + (Y(n) - Y(t)) / s - o / 2, l = e.height / 2 + (L(n) - L(t)) / s - i / 2;
1246
+ function hn(e, t, n, s) {
1247
+ const o = n.width / s, i = n.height / s, l = e.width / 2 + (H(n) - H(t)) / s - o / 2, a = e.height / 2 + (M(n) - M(t)) / s - i / 2;
1242
1248
  return {
1243
- top: Math.max(0, l),
1244
- right: Math.max(0, e.width - r - o),
1245
- bottom: Math.max(0, e.height - l - i),
1246
- left: Math.max(0, r)
1249
+ top: Math.max(0, a),
1250
+ right: Math.max(0, e.width - l - o),
1251
+ bottom: Math.max(0, e.height - a - i),
1252
+ left: Math.max(0, l)
1247
1253
  };
1248
1254
  }
1249
- function A(e, t) {
1255
+ function k(e, t) {
1250
1256
  const n = /* @__PURE__ */ new Map(), s = e.querySelectorAll(`[${t}]`);
1251
1257
  for (const o of Array.from(s)) {
1252
1258
  const i = o.getAttribute(t);
@@ -1254,44 +1260,44 @@ function A(e, t) {
1254
1260
  }
1255
1261
  return n;
1256
1262
  }
1257
- function fn(e, t) {
1258
- const n = [], s = A(t, wt), o = A(e, St);
1259
- for (const [l, c] of s) {
1260
- const a = o.get(l);
1261
- a && n.push({
1262
- key: l,
1263
- fromEl: a,
1264
- toEl: c,
1263
+ function un(e, t) {
1264
+ const n = [], s = k(t, bt), o = k(e, $t);
1265
+ for (const [a, r] of s) {
1266
+ const c = o.get(a);
1267
+ c && n.push({
1268
+ key: a,
1269
+ fromEl: c,
1270
+ toEl: r,
1265
1271
  fromFit: "cover",
1266
1272
  toFit: "contain"
1267
1273
  });
1268
1274
  }
1269
- const i = A(e, wt), r = A(t, St);
1270
- for (const [l, c] of i) {
1271
- const a = r.get(l);
1272
- a && n.push({
1273
- key: l,
1274
- fromEl: c,
1275
- toEl: a,
1275
+ const i = k(e, bt), l = k(t, $t);
1276
+ for (const [a, r] of i) {
1277
+ const c = l.get(a);
1278
+ c && n.push({
1279
+ key: a,
1280
+ fromEl: r,
1281
+ toEl: c,
1276
1282
  fromFit: "contain",
1277
1283
  toFit: "cover"
1278
1284
  });
1279
1285
  }
1280
1286
  return n;
1281
1287
  }
1282
- function yn(e, t) {
1288
+ function mn(e, t) {
1283
1289
  const n = [], s = Array.from(
1284
- t.querySelectorAll(`[${B}]`)
1290
+ t.querySelectorAll(`[${W}]`)
1285
1291
  );
1286
1292
  for (const o of s) {
1287
- const i = o.getAttribute(B);
1293
+ const i = o.getAttribute(W);
1288
1294
  if (!i) continue;
1289
- const r = e.querySelector(
1290
- `[${B}="${i}"]`
1295
+ const l = e.querySelector(
1296
+ `[${W}="${i}"]`
1291
1297
  );
1292
- r && n.push({
1298
+ l && n.push({
1293
1299
  key: i,
1294
- fromEl: r,
1300
+ fromEl: l,
1295
1301
  toEl: o,
1296
1302
  fromFit: "contain",
1297
1303
  toFit: "contain"
@@ -1299,104 +1305,104 @@ function yn(e, t) {
1299
1305
  }
1300
1306
  return n;
1301
1307
  }
1302
- function hn(e, t) {
1303
- const n = fn(e, t);
1304
- return n.length > 0 ? n : yn(e, t);
1308
+ function gn(e, t) {
1309
+ const n = un(e, t);
1310
+ return n.length > 0 ? n : mn(e, t);
1305
1311
  }
1306
- function un(e, t, n) {
1307
- const { fromEl: s, toEl: o } = t, i = $t(e, s, t.fromFit), r = $t(e, o, t.toFit), l = i.content, c = i.window, a = r.content, p = r.window, d = r.clipInset, f = bt(s), u = bt(o);
1308
- if (l.width === 0 || l.height === 0 || c.width === 0 || c.height === 0 || a.width === 0 || a.height === 0 || p.width === 0 || p.height === 0)
1312
+ function wn(e, t, n) {
1313
+ const { fromEl: s, toEl: o } = t, i = xt(e, s, t.fromFit), l = xt(e, o, t.toFit), a = i.content, r = i.window, c = l.content, p = l.window, d = l.clipInset, f = Ct(s), u = Ct(o);
1314
+ if (a.width === 0 || a.height === 0 || r.width === 0 || r.height === 0 || c.width === 0 || c.height === 0 || p.width === 0 || p.height === 0)
1309
1315
  return null;
1310
1316
  const y = Math.max(
1311
- l.width / a.width,
1312
- l.height / a.height
1313
- ), h = Y(l), w = L(l), S = Y(a), b = L(a), x = h - S, E = w - b;
1314
- if (Math.abs(E) > n) return null;
1315
- const P = dn(
1316
- a,
1317
- l,
1317
+ a.width / c.width,
1318
+ a.height / c.height
1319
+ ), h = H(a), S = M(a), m = H(c), b = M(c), P = h - m, _ = S - b;
1320
+ if (Math.abs(_) > n) return null;
1321
+ const I = hn(
1318
1322
  c,
1323
+ a,
1324
+ r,
1319
1325
  y
1320
1326
  );
1321
1327
  return {
1322
- toContent: a,
1328
+ toContent: c,
1323
1329
  hasRadius: f > 0 || u > 0,
1324
- styleFor: (D, _) => {
1325
- const H = _ * x, At = _ * E, Q = D + _ * y, Ft = (f * _ + u * D) / Q, kt = P.top * _ + d.top * D, Yt = P.right * _ + d.right * D, Lt = P.bottom * _ + d.bottom * D, Ht = P.left * _ + d.left * D;
1330
+ styleFor: ($, E) => {
1331
+ const z = E * P, kt = E * _, et = $ + E * y, Yt = (f * E + u * $) / et, Lt = I.top * E + d.top * $, Ht = I.right * E + d.right * $, Mt = I.bottom * E + d.bottom * $, zt = I.left * E + d.left * $;
1326
1332
  return {
1327
- transform: `translate(${H}px, ${At}px) scale(${Q})`,
1328
- clipPath: `inset(${kt}px ${Yt}px ${Lt}px ${Ht}px round ${Ft}px)`
1333
+ transform: `translate(${z}px, ${kt}px) scale(${et})`,
1334
+ clipPath: `inset(${Lt}px ${Ht}px ${Mt}px ${zt}px round ${Yt}px)`
1329
1335
  };
1330
1336
  }
1331
1337
  };
1332
1338
  }
1333
- function mn(e, t) {
1339
+ function Sn(e, t) {
1334
1340
  e.style.transform = t.transform, e.style.clipPath = t.clipPath;
1335
1341
  }
1336
- class gn {
1342
+ class bn {
1337
1343
  contribute(t) {
1338
- const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete: r } = t, l = [];
1339
- for (const c of n.pairs) {
1340
- const { fromEl: a, toEl: p } = c, d = un(o, c, i);
1344
+ const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete: l } = t, a = [];
1345
+ for (const r of n.pairs) {
1346
+ const { fromEl: c, toEl: p } = r, d = wn(o, r, i);
1341
1347
  if (!d) continue;
1342
1348
  const f = p.cloneNode(!0);
1343
- f.style.position = "absolute", f.style.left = `${d.toContent.left}px`, f.style.top = `${d.toContent.top}px`, f.style.width = `${d.toContent.width}px`, f.style.height = `${d.toContent.height}px`, f.style.margin = "0", f.style.transformOrigin = "center center", f.style.zIndex = "1000", f.style.willChange = "transform, clip-path", f.style.pointerEvents = "none", f.style.maxWidth = "none", f.style.maxHeight = "none", d.hasRadius && (f.style.borderRadius = "0"), mn(f, d.styleFor(0, 1)), o.appendChild(f);
1344
- const u = a.style.opacity, y = p.style.opacity;
1345
- a.style.opacity = "0", p.style.opacity = "0", r(() => {
1346
- a.style.opacity = u, p.style.opacity = y, f.parentElement && f.parentElement.removeChild(f);
1347
- }), l.push(
1348
- new m({
1349
+ f.style.position = "absolute", f.style.left = `${d.toContent.left}px`, f.style.top = `${d.toContent.top}px`, f.style.width = `${d.toContent.width}px`, f.style.height = `${d.toContent.height}px`, f.style.margin = "0", f.style.transformOrigin = "center center", f.style.zIndex = "1000", f.style.willChange = "transform, clip-path", f.style.pointerEvents = "none", f.style.maxWidth = "none", f.style.maxHeight = "none", d.hasRadius && (f.style.borderRadius = "0"), Sn(f, d.styleFor(0, 1)), o.appendChild(f);
1350
+ const u = c.style.opacity, y = p.style.opacity;
1351
+ c.style.opacity = "0", p.style.opacity = "0", l(() => {
1352
+ c.style.opacity = u, p.style.opacity = y, f.parentElement && f.parentElement.removeChild(f);
1353
+ }), a.push(
1354
+ new g({
1349
1355
  element: f,
1350
- integrator: g.from(s),
1356
+ integrator: w.from(s),
1351
1357
  style: d.styleFor
1352
1358
  })
1353
1359
  );
1354
1360
  }
1355
- return l;
1361
+ return a;
1356
1362
  }
1357
1363
  }
1358
- function wn(e) {
1359
- return [new gn(), Je[e.type]()];
1364
+ function $n(e) {
1365
+ return [new bn(), en[e.type]()];
1360
1366
  }
1361
- const Sn = (e) => {
1362
- const t = wn(e), n = sn[e.variant](), s = on;
1367
+ const Cn = (e) => {
1368
+ const t = $n(e), n = an[e.variant](), s = ln;
1363
1369
  return {
1364
1370
  prepare: (o) => {
1365
- var l;
1371
+ var a;
1366
1372
  const i = Promise.all([
1367
1373
  o.from,
1368
1374
  o.to
1369
- ]).then(([c, a]) => ({ pairs: hn(c, a) })), r = {
1375
+ ]).then(([r, c]) => ({ pairs: gn(r, c) })), l = {
1370
1376
  from: o.from,
1371
1377
  to: o.to,
1372
1378
  resolved: i
1373
1379
  };
1374
- for (const c of t)
1375
- (l = c.prepare) == null || l.call(c, r);
1376
- return i.then((c) => ({ resolved: c }));
1380
+ for (const r of t)
1381
+ (a = r.prepare) == null || a.call(r, l);
1382
+ return i.then((r) => ({ resolved: r }));
1377
1383
  },
1378
- animation: ({ from: o, to: i, context: r, resolved: l }) => {
1379
- if (l.pairs.length === 0)
1380
- return new C([], { mode: "parallel" });
1381
- const c = [], a = (y) => {
1382
- c.push(y);
1384
+ animation: ({ from: o, to: i, context: l, resolved: a }) => {
1385
+ if (a.pairs.length === 0)
1386
+ return new x([], { mode: "parallel" });
1387
+ const r = [], c = (y) => {
1388
+ r.push(y);
1383
1389
  }, p = {
1384
1390
  from: o,
1385
1391
  to: i,
1386
- resolved: l,
1392
+ resolved: a,
1387
1393
  physics: n,
1388
- positionedParent: r.positionedParent,
1394
+ positionedParent: l.positionedParent,
1389
1395
  maxDistance: s,
1390
- onComplete: a
1396
+ onComplete: c
1391
1397
  }, d = [];
1392
1398
  for (const y of t)
1393
1399
  y.contribute && d.push(...y.contribute(p));
1394
1400
  if (d.length === 0)
1395
- return new C([], { mode: "parallel" });
1396
- const f = new C(d, { mode: "parallel" }), u = f.onComplete;
1401
+ return new x([], { mode: "parallel" });
1402
+ const f = new x(d, { mode: "parallel" }), u = f.onComplete;
1397
1403
  return f.onComplete = () => {
1398
1404
  u == null || u();
1399
- for (const y of c)
1405
+ for (const y of r)
1400
1406
  try {
1401
1407
  y();
1402
1408
  } catch (h) {
@@ -1406,33 +1412,33 @@ const Sn = (e) => {
1406
1412
  }
1407
1413
  };
1408
1414
  };
1409
- function Es(e) {
1415
+ function _s(e) {
1410
1416
  const { paths: t } = e, n = e.type ?? "static", s = e.variant ?? "default";
1411
- return v(
1417
+ return D(
1412
1418
  t,
1413
- () => Sn({ type: n, variant: s })
1419
+ () => Cn({ type: n, variant: s })
1414
1420
  );
1415
1421
  }
1416
- const bn = {
1422
+ const xn = {
1417
1423
  spring: { stiffness: 50, damping: 30 }
1418
- }, $n = {
1424
+ }, En = {
1419
1425
  spring: { stiffness: 80, damping: 25 }
1420
- }, Cn = (e = {}) => {
1421
- const t = e.physics ?? bn, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
1426
+ }, Pn = (e = {}) => {
1427
+ const t = e.physics ?? xn, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
1422
1428
  return {
1423
- prepare: ({ from: i, to: r, context: l }) => (i.then((c) => {
1424
- c.style.opacity = "1";
1425
- }), r.then((c) => {
1426
- const a = I(l, "to"), p = Math.min(a.width, a.height) * 0.4;
1427
- c.style.setProperty("--max-border-radius", `${p}px`), c.style.setProperty("--border-radius-scale", "1"), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden";
1428
- const d = a.left + a.width / 2, f = a.top + a.height / 2;
1429
- c.style.transformOrigin = `${d}px ${f}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(${s}) translateZ(0)`, c.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", c.style.opacity = "1";
1429
+ prepare: ({ from: i, to: l, context: a }) => (i.then((r) => {
1430
+ r.style.opacity = "1";
1431
+ }), l.then((r) => {
1432
+ const c = T(a, "to"), p = Math.min(c.width, c.height) * 0.4;
1433
+ r.style.setProperty("--max-border-radius", `${p}px`), r.style.setProperty("--border-radius-scale", "1"), r.style.willChange = "transform", r.style.backfaceVisibility = "hidden";
1434
+ const d = c.left + c.width / 2, f = c.top + c.height / 2;
1435
+ r.style.transformOrigin = `${d}px ${f}px`, r.style.position = "fixed", r.style.top = `${c.top}px`, r.style.left = `${c.left}px`, r.style.width = `${c.width}px`, r.style.height = `${c.height}px`, r.style.zIndex = "1000", r.style.overflow = "hidden", r.style.transform = `rotate(${n}deg) scale(${s}) translateZ(0)`, r.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", r.style.opacity = "1";
1430
1436
  }), {}),
1431
- animation: ({ from: i, to: r }) => {
1432
- const l = new m({
1437
+ animation: ({ from: i, to: l }) => {
1438
+ const a = new g({
1433
1439
  element: i,
1434
- integrator: g.from($n),
1435
- style: (a, p) => ({ opacity: p }),
1440
+ integrator: w.from(En),
1441
+ style: (c, p) => ({ opacity: p }),
1436
1442
  // The outgoing node is reused (re-hidden, shown again on the next
1437
1443
  // navigation), so reset every inline style we wrote to it — mirroring
1438
1444
  // the "to" cleanup below. prepare sets opacity and the out style fades
@@ -1440,33 +1446,33 @@ const bn = {
1440
1446
  onComplete: () => {
1441
1447
  i.style.opacity = "";
1442
1448
  }
1443
- }), c = new m({
1444
- element: r,
1445
- integrator: g.from(t),
1446
- style: (a) => {
1449
+ }), r = new g({
1450
+ element: l,
1451
+ integrator: w.from(t),
1452
+ style: (c) => {
1447
1453
  let p;
1448
- if (a <= 0.05)
1454
+ if (c <= 0.05)
1449
1455
  p = s;
1450
- else if (a <= o) {
1451
- const y = (a - 0.05) / (o - 0.05), h = Math.pow(y, 9);
1456
+ else if (c <= o) {
1457
+ const y = (c - 0.05) / (o - 0.05), h = Math.pow(y, 9);
1452
1458
  p = s + (0.8 - s) * h;
1453
1459
  } else {
1454
- const y = (a - o) / (1 - o);
1460
+ const y = (c - o) / (1 - o);
1455
1461
  p = 0.8 + 0.2 * (1 - Math.pow(1 - y, 3));
1456
1462
  }
1457
1463
  const d = 0.7;
1458
1464
  let f;
1459
- if (a <= d)
1465
+ if (c <= d)
1460
1466
  f = n;
1461
1467
  else {
1462
- const y = (a - d) / (1 - d), h = 1 - Math.pow(1 - y, 2);
1468
+ const y = (c - d) / (1 - d), h = 1 - Math.pow(1 - y, 2);
1463
1469
  f = n * (1 - h);
1464
1470
  }
1465
1471
  let u;
1466
- if (a <= d)
1472
+ if (c <= d)
1467
1473
  u = 1;
1468
1474
  else {
1469
- const y = (a - d) / (1 - d);
1475
+ const y = (c - d) / (1 - d);
1470
1476
  u = 1 - Math.pow(y, 0.5);
1471
1477
  }
1472
1478
  return {
@@ -1475,21 +1481,21 @@ const bn = {
1475
1481
  };
1476
1482
  },
1477
1483
  onComplete: () => {
1478
- 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 = "";
1484
+ l.style.willChange = "", l.style.backfaceVisibility = "", l.style.removeProperty("--max-border-radius"), l.style.removeProperty("--border-radius-scale"), l.style.transform = "", l.style.transformOrigin = "", l.style.position = "", l.style.zIndex = "", l.style.top = "", l.style.left = "", l.style.width = "", l.style.height = "", l.style.overflow = "", l.style.borderRadius = "";
1479
1485
  }
1480
1486
  });
1481
- return new C([l, c], { mode: "parallel" });
1487
+ return new x([a, r], { mode: "parallel" });
1482
1488
  }
1483
1489
  };
1484
1490
  };
1485
- function xs(e) {
1491
+ function Is(e) {
1486
1492
  const { paths: t } = e;
1487
- return v(t, () => Cn());
1493
+ return D(t, () => Pn());
1488
1494
  }
1489
- const En = {
1495
+ const _n = {
1490
1496
  spring: { stiffness: 100, damping: 30 }
1491
- }, xn = (e = {}) => {
1492
- const t = e.physics ?? En;
1497
+ }, In = (e = {}) => {
1498
+ const t = e.physics ?? _n;
1493
1499
  return {
1494
1500
  prepare: ({ from: n, to: s }) => (n.then((o) => {
1495
1501
  o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
@@ -1497,12 +1503,12 @@ const En = {
1497
1503
  o.style.opacity = "0", o.style.transform = "rotate(-180deg)", o.style.transformOrigin = "center center", o.style.willChange = "transform, opacity";
1498
1504
  }), {}),
1499
1505
  animation: ({ from: n, to: s }) => {
1500
- const o = new m({
1506
+ const o = new g({
1501
1507
  element: n,
1502
- integrator: g.from(t),
1503
- style: (r) => ({
1504
- transform: `rotate(${r * 180}deg)`,
1505
- opacity: r < 0.5 ? 1 : 0
1508
+ integrator: w.from(t),
1509
+ style: (l) => ({
1510
+ transform: `rotate(${l * 180}deg)`,
1511
+ opacity: l < 0.5 ? 1 : 0
1506
1512
  }),
1507
1513
  // The outgoing node is reused (re-hidden, shown again on the next
1508
1514
  // navigation), so clear every inline style we wrote to `from`
@@ -1510,27 +1516,27 @@ const En = {
1510
1516
  onComplete: () => {
1511
1517
  n.style.willChange = "auto", n.style.transform = "", n.style.transformOrigin = "", n.style.opacity = "";
1512
1518
  }
1513
- }), i = new m({
1519
+ }), i = new g({
1514
1520
  element: s,
1515
- integrator: g.from(t),
1521
+ integrator: w.from(t),
1516
1522
  // u runs 1→0, so -u*180 unwinds -180→0.
1517
- style: (r, l) => ({
1518
- transform: `rotate(${-l * 180}deg)`,
1519
- opacity: r > 0.5 ? 1 : 0
1523
+ style: (l, a) => ({
1524
+ transform: `rotate(${-a * 180}deg)`,
1525
+ opacity: l > 0.5 ? 1 : 0
1520
1526
  }),
1521
1527
  onComplete: () => {
1522
1528
  s.style.willChange = "auto", s.style.transform = "", s.style.transformOrigin = "", s.style.opacity = "";
1523
1529
  }
1524
1530
  });
1525
- return new C([o, i], { mode: "parallel" });
1531
+ return new x([o, i], { mode: "parallel" });
1526
1532
  }
1527
1533
  };
1528
1534
  };
1529
- function Ps(e) {
1535
+ function Ds(e) {
1530
1536
  const { paths: t } = e;
1531
- return v(t, () => xn());
1537
+ return D(t, () => In());
1532
1538
  }
1533
- const Pn = {
1539
+ const Dn = {
1534
1540
  spring: {
1535
1541
  stiffness: 20,
1536
1542
  damping: 8,
@@ -1538,81 +1544,87 @@ const Pn = {
1538
1544
  restDelta: 1e-3,
1539
1545
  restSpeed: 1e-3
1540
1546
  }
1541
- }, Ct = (e = {}) => {
1542
- const t = e.direction ?? "up", n = e.physics ?? Pn, s = t === "up";
1547
+ }, Et = (e = {}) => {
1548
+ const t = e.direction ?? "up", n = e.physics ?? Dn, s = t === "up", o = s ? v : O, i = s ? O : v;
1543
1549
  return {
1544
- prepare: ({ from: o, to: i }) => (o.then((r) => {
1545
- r.style.zIndex = s ? "-1" : "1", r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1546
- }), i.then((r) => {
1547
- r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
1550
+ prepare: ({ from: l, to: a }) => (l.then((r) => {
1551
+ r.style.zIndex = o, r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1552
+ }), a.then((r) => {
1553
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.position = "relative", r.style.zIndex = i;
1548
1554
  }), {}),
1549
- animation: ({ from: o, to: i }) => {
1550
- const r = o.offsetHeight, l = i.offsetHeight, c = window.innerHeight, a = Math.max(Math.min(r, l), c), p = new m({
1551
- element: o,
1552
- integrator: g.from(n),
1553
- style: (f) => ({ transform: `translate3d(0, ${s ? -a * f : a * f}px, 0)` }),
1555
+ animation: ({ from: l, to: a }) => {
1556
+ const r = l.offsetHeight, c = a.offsetHeight, p = window.innerHeight, d = Math.max(Math.min(r, c), p), f = new g({
1557
+ element: l,
1558
+ integrator: w.from(n),
1559
+ style: (y) => ({ transform: `translate3d(0, ${s ? -d * y : d * y}px, 0)` }),
1554
1560
  // The outgoing node is the real, reused element (re-hidden then shown
1555
1561
  // again on the next navigation), so mirror the incoming cleanup and
1556
1562
  // also reset the out-only props applied in prepare (zIndex,
1557
1563
  // pointerEvents) — otherwise the leftover inline styles corrupt the
1558
1564
  // page the next time it appears.
1559
1565
  onComplete: () => {
1560
- o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "", o.style.zIndex = "";
1566
+ l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "", l.style.transform = "", l.style.pointerEvents = "", l.style.zIndex = "";
1561
1567
  }
1562
- }), d = new m({
1563
- element: i,
1564
- integrator: g.from(n),
1565
- style: (f, u) => ({ transform: `translate3d(0, ${s ? u * a : u * -a}px, 0)` }),
1568
+ }), u = new g({
1569
+ element: a,
1570
+ integrator: w.from(n),
1571
+ style: (y, h) => ({ transform: `translate3d(0, ${s ? h * d : h * -d}px, 0)` }),
1566
1572
  onComplete: () => {
1567
- i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
1573
+ a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transform = "", a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === i && (a.style.zIndex = "");
1568
1574
  }
1569
1575
  });
1570
- return new C([p, d], { mode: "parallel" });
1576
+ for (const y of [f, u]) {
1577
+ const h = y.onComplete;
1578
+ y.onComplete = () => {
1579
+ h == null || h(), y.releaseFill();
1580
+ };
1581
+ }
1582
+ return new x([f, u], { mode: "parallel" });
1571
1583
  }
1572
1584
  };
1573
1585
  };
1574
- function _s(e) {
1586
+ function vs(e) {
1575
1587
  const { paths: t, type: n = "directional" } = e;
1576
- return n === "non-directional" ? v(
1588
+ return n === "non-directional" ? D(
1577
1589
  t,
1578
- () => Ct({ direction: "up" })
1579
- ) : G(
1590
+ () => Et({ direction: "up" })
1591
+ ) : Q(
1580
1592
  t,
1581
1593
  { forward: "up", backward: "down" },
1582
- (s) => Ct({ direction: s })
1594
+ (s) => Et({ direction: s })
1583
1595
  );
1584
1596
  }
1585
- const _n = {
1597
+ const vn = {
1586
1598
  spring: { stiffness: 200, damping: 24 }
1587
- }, Dn = {
1599
+ }, On = {
1588
1600
  inertia: { acceleration: 25, resistance: 1.2 }
1589
- }, W = 0.2;
1590
- function vn() {
1601
+ }, q = 0.2;
1602
+ function Tn() {
1591
1603
  return {
1592
- enterPhysics: _n,
1593
- exitPhysics: Dn,
1604
+ enterPhysics: vn,
1605
+ exitPhysics: On,
1594
1606
  background: {
1595
1607
  willChange: "transform, opacity",
1596
1608
  enterStyle: (e, t) => ({
1597
- transform: `scale(${1 - W * e})`,
1609
+ transform: `scale(${1 - q * e})`,
1598
1610
  opacity: t
1599
1611
  }),
1600
1612
  exitStyle: (e) => ({
1601
- transform: `scale(${1 - W + W * e})`,
1613
+ transform: `scale(${1 - q + q * e})`,
1602
1614
  opacity: e
1603
1615
  })
1604
1616
  }
1605
1617
  };
1606
1618
  }
1607
- const In = {
1619
+ const An = {
1608
1620
  spring: { stiffness: 300, damping: 30 }
1609
- }, Tn = {
1621
+ }, Fn = {
1610
1622
  inertia: { acceleration: 30, resistance: 1 }
1611
1623
  };
1612
- function On() {
1624
+ function kn() {
1613
1625
  return {
1614
- enterPhysics: In,
1615
- exitPhysics: Tn,
1626
+ enterPhysics: An,
1627
+ exitPhysics: Fn,
1616
1628
  background: {
1617
1629
  willChange: "",
1618
1630
  enterStyle: () => ({}),
@@ -1620,137 +1632,142 @@ function On() {
1620
1632
  }
1621
1633
  };
1622
1634
  }
1623
- const An = {
1624
- static: On(),
1625
- "background-scale": vn()
1626
- }, Fn = "static", kn = "transform", Yn = (e = {}) => {
1627
- const t = e.direction ?? "enter", n = An[e.type ?? Fn], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, i = o.willChange !== "";
1635
+ const Yn = {
1636
+ static: kn(),
1637
+ "background-scale": Tn()
1638
+ }, Ln = "static", Hn = "transform", Mn = (e = {}) => {
1639
+ const t = e.direction ?? "enter", n = Yn[e.type ?? Ln], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, i = o.willChange !== "";
1628
1640
  return {
1629
- prepare: ({ from: r, to: l }) => {
1630
- const c = t === "enter" ? l : r, a = t === "enter" ? r : l;
1631
- return c.then((p) => {
1632
- p.style.willChange = kn, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", t === "exit" && (p.style.pointerEvents = "none", p.style.zIndex = "100");
1633
- }), a.then((p) => {
1634
- i && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), t === "enter" && (p.style.pointerEvents = "none", p.style.zIndex = "-1");
1641
+ prepare: ({ from: l, to: a }) => {
1642
+ const r = t === "enter" ? a : l, c = t === "enter" ? l : a;
1643
+ return r.then((p) => {
1644
+ p.style.willChange = Hn, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", p.style.zIndex = O, t === "enter" ? p.style.position = "relative" : p.style.pointerEvents = "none";
1645
+ }), c.then((p) => {
1646
+ i && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), p.style.zIndex = v, t === "enter" ? p.style.pointerEvents = "none" : p.style.position = "relative";
1635
1647
  }), {};
1636
1648
  },
1637
- animation: ({ from: r, to: l, context: c }) => {
1638
- const a = t === "enter" ? l : r, p = t === "enter" ? r : l, d = I(
1639
- c,
1649
+ animation: ({ from: l, to: a, context: r }) => {
1650
+ const c = t === "enter" ? a : l, p = t === "enter" ? l : a, d = T(
1651
+ r,
1640
1652
  t === "enter" ? "to" : "from"
1641
1653
  ), f = () => {
1642
- r.style.pointerEvents = "", r.style.zIndex = "";
1654
+ l.style.pointerEvents = "", l.style.zIndex = "";
1655
+ }, u = () => {
1656
+ const $ = t === "enter" ? O : v;
1657
+ a.style.position === "relative" && (a.style.position = ""), a.style.zIndex === $ && (a.style.zIndex = "");
1658
+ }, y = ($) => {
1659
+ const E = $.onComplete;
1660
+ $.onComplete = () => {
1661
+ E == null || E(), $.releaseFill();
1662
+ };
1643
1663
  };
1644
- a.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
1645
- const u = t === "enter" ? (E, P) => ({
1646
- transform: `translate3d(0, ${P * d.height}px, 0)`
1647
- }) : (E) => ({
1664
+ c.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
1665
+ const h = t === "enter" ? ($, E) => ({
1648
1666
  transform: `translate3d(0, ${E * d.height}px, 0)`
1649
- }), y = new m({
1650
- element: a,
1651
- integrator: g.from(s),
1652
- style: u,
1667
+ }) : ($) => ({
1668
+ transform: `translate3d(0, ${$ * d.height}px, 0)`
1669
+ }), S = new g({
1670
+ element: c,
1671
+ integrator: w.from(s),
1672
+ style: h,
1653
1673
  onComplete: () => {
1654
- a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.clipPath = "", a.style.transform = "", f();
1674
+ c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "", c.style.clipPath = "", c.style.transform = "", f(), u();
1655
1675
  }
1656
1676
  });
1657
- if (!i)
1658
- return new C([y], { mode: "parallel" });
1659
- const h = I(
1660
- c,
1677
+ if (y(S), !i)
1678
+ return new x([S], { mode: "parallel" });
1679
+ const m = T(
1680
+ r,
1661
1681
  t === "enter" ? "from" : "to"
1662
- ), w = h.left + h.width / 2, S = h.top + h.height / 2;
1663
- p.style.clipPath = `inset(${h.top}px 0 calc(100% - ${h.top + h.height}px) 0)`, p.style.transformOrigin = `${w}px ${S}px`;
1664
- const b = t === "enter" ? (E, P) => o.enterStyle(E, P) : (E) => o.exitStyle(E), x = new m({
1682
+ ), b = m.left + m.width / 2, P = m.top + m.height / 2;
1683
+ p.style.clipPath = `inset(${m.top}px 0 calc(100% - ${m.top + m.height}px) 0)`, p.style.transformOrigin = `${b}px ${P}px`;
1684
+ const _ = t === "enter" ? ($, E) => o.enterStyle($, E) : ($) => o.exitStyle($), I = new g({
1665
1685
  element: p,
1666
- integrator: g.from(s),
1667
- style: b,
1668
- // On `exit` the background is the incoming (`to`) node; on `enter` it is
1669
- // the reused outgoing (`from`) node — in both cases its inline styles
1670
- // must be restored when the animation settles, so the reused node is
1671
- // not left scaled/faded/clipped the next time it is shown. The `enter`
1672
- // branch mirrors the `exit` cleanup and additionally clears the
1673
- // transform/opacity final frame WAAPI leaves behind.
1674
- onComplete: t === "exit" ? () => {
1675
- p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "";
1676
- } : () => {
1686
+ integrator: w.from(s),
1687
+ style: _,
1688
+ // The background is the reused outgoing (`from`) node on `enter` and the
1689
+ // surviving incoming (`to`) node on `exit` — in both cases its inline
1690
+ // styles must be cleared on settle so the reused node is not left
1691
+ // scaled/faded/clipped the next time it is shown. releaseFill below
1692
+ // drops the WAAPI fill so these resets actually take effect.
1693
+ onComplete: () => {
1677
1694
  p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "", p.style.transform = "", p.style.opacity = "";
1678
1695
  }
1679
1696
  });
1680
- return new C([y, x], { mode: "parallel" });
1697
+ return y(I), new x([S, I], { mode: "parallel" });
1681
1698
  }
1682
1699
  };
1683
1700
  };
1684
- function Ln(e) {
1701
+ function zn(e) {
1685
1702
  return e === "scale" || e === "background-scale" ? "background-scale" : "static";
1686
1703
  }
1687
- function Ds(e) {
1688
- const { enter: t, exit: n } = e, s = e.type, o = Ln(s);
1689
- return vt(
1704
+ function Os(e) {
1705
+ const { enter: t, exit: n } = e, s = e.type, o = zn(s);
1706
+ return Ot(
1690
1707
  { enter: t, exit: n },
1691
- (i) => Yn({ direction: i, type: o })
1708
+ (i) => Mn({ direction: i, type: o })
1692
1709
  );
1693
1710
  }
1694
- const Hn = {
1711
+ const Rn = {
1695
1712
  spring: { stiffness: 170, damping: 22, doubleSpring: 0.8 }
1696
- }, Mn = (e = {}) => {
1697
- const t = e.direction ?? "left", n = e.physics ?? Hn, s = t === "left";
1713
+ }, Un = (e = {}) => {
1714
+ const t = e.direction ?? "left", n = e.physics ?? Rn, s = t === "left";
1698
1715
  return {
1699
- prepare: ({ from: o, to: i }) => (o.then((r) => {
1700
- r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1701
- }), i.then((r) => {
1702
- const l = s ? 100 : -100;
1703
- r.style.transform = `translate3d(${l}%, 0, 0)`, r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
1716
+ prepare: ({ from: o, to: i }) => (o.then((l) => {
1717
+ l.style.willChange = "transform", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint", l.style.pointerEvents = "none";
1718
+ }), i.then((l) => {
1719
+ const a = s ? 100 : -100;
1720
+ l.style.transform = `translate3d(${a}%, 0, 0)`, l.style.willChange = "transform", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint";
1704
1721
  }), {}),
1705
1722
  animation: ({ from: o, to: i }) => {
1706
- const r = new m({
1723
+ const l = new g({
1707
1724
  element: o,
1708
- integrator: g.from(n),
1709
- style: (c) => ({ transform: `translate3d(${s ? -100 * c : 100 * c}%, 0, 0)` }),
1725
+ integrator: w.from(n),
1726
+ style: (r) => ({ transform: `translate3d(${s ? -100 * r : 100 * r}%, 0, 0)` }),
1710
1727
  // The outgoing node is the real Activity page and gets reused on the
1711
1728
  // next navigation, so reset every inline style we wrote to it (mirror
1712
1729
  // the incoming cleanup, plus the out-only pointerEvents).
1713
1730
  onComplete: () => {
1714
1731
  o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "";
1715
1732
  }
1716
- }), l = new m({
1733
+ }), a = new g({
1717
1734
  element: i,
1718
- integrator: g.from(n),
1719
- style: (c, a) => ({ transform: `translate3d(${s ? a * 100 : a * -100}%, 0, 0)` }),
1735
+ integrator: w.from(n),
1736
+ style: (r, c) => ({ transform: `translate3d(${s ? c * 100 : c * -100}%, 0, 0)` }),
1720
1737
  onComplete: () => {
1721
1738
  i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
1722
1739
  }
1723
1740
  });
1724
- return new C([r, l], { mode: "parallel" });
1741
+ return new x([l, a], { mode: "parallel" });
1725
1742
  }
1726
1743
  };
1727
1744
  };
1728
- function vs(e) {
1745
+ function Ts(e) {
1729
1746
  const { paths: t } = e;
1730
- return G(
1747
+ return Q(
1731
1748
  t,
1732
1749
  { forward: "left", backward: "right" },
1733
- (n) => Mn({ direction: n })
1750
+ (n) => Un({ direction: n })
1734
1751
  );
1735
1752
  }
1736
- const Un = {
1753
+ const Vn = {
1737
1754
  spring: { stiffness: 17, damping: 6 }
1738
- }, Z = 20, F = 800, Rn = (e = {}) => {
1739
- const t = e.physics ?? Un;
1755
+ }, K = 20, Y = 800, Nn = (e = {}) => {
1756
+ const t = e.physics ?? Vn;
1740
1757
  return {
1741
1758
  prepare: ({ from: n, to: s }) => (n.then((o) => {
1742
- o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${F}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1759
+ o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${Y}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1743
1760
  }), s.then((o) => {
1744
- o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${F}px) rotateY(${Z}deg) translate3d(-100%, 0, 0)`;
1761
+ o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${Y}px) rotateY(${K}deg) translate3d(-100%, 0, 0)`;
1745
1762
  }), {}),
1746
1763
  animation: ({ from: n, to: s }) => {
1747
- const o = new m({
1764
+ const o = new g({
1748
1765
  element: n,
1749
- integrator: g.from(t),
1750
- style: (r) => {
1751
- const l = -r * Z, c = r * 100;
1766
+ integrator: w.from(t),
1767
+ style: (l) => {
1768
+ const a = -l * K, r = l * 100;
1752
1769
  return {
1753
- transform: `perspective(${F}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
1770
+ transform: `perspective(${Y}px) rotateY(${a}deg) translate3d(${r}%, 0, 0)`
1754
1771
  };
1755
1772
  },
1756
1773
  // The outgoing node is reused (Activity/cacheComponents re-hide it),
@@ -1759,28 +1776,28 @@ const Un = {
1759
1776
  onComplete: () => {
1760
1777
  n.style.transform = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.pointerEvents = "";
1761
1778
  }
1762
- }), i = new m({
1779
+ }), i = new g({
1763
1780
  element: s,
1764
- integrator: g.from(t),
1765
- style: (r, l) => {
1766
- const c = l * Z, a = -l * 100;
1781
+ integrator: w.from(t),
1782
+ style: (l, a) => {
1783
+ const r = a * K, c = -a * 100;
1767
1784
  return {
1768
- transform: `perspective(${F}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
1785
+ transform: `perspective(${Y}px) rotateY(${r}deg) translate3d(${c}%, 0, 0)`
1769
1786
  };
1770
1787
  },
1771
1788
  onComplete: () => {
1772
1789
  s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
1773
1790
  }
1774
1791
  });
1775
- return new C([o, i], { mode: "sequence" });
1792
+ return new x([o, i], { mode: "sequence" });
1776
1793
  }
1777
1794
  };
1778
1795
  };
1779
- function Is(e) {
1796
+ function As(e) {
1780
1797
  const { paths: t } = e;
1781
- return v(t, () => Rn());
1798
+ return D(t, () => Nn());
1782
1799
  }
1783
- function Vn({
1800
+ function Xn({
1784
1801
  enterRect: e,
1785
1802
  exitRect: t,
1786
1803
  pageRect: n,
@@ -1788,19 +1805,19 @@ function Vn({
1788
1805
  enterRadius: o,
1789
1806
  exitRadius: i
1790
1807
  }) {
1791
- const r = t.left - e.left + (t.width - e.width) / 2 - s.x, l = t.top - e.top + (t.height - e.height) / 2 - s.y, c = t.width / e.width, a = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
1808
+ const l = t.left - e.left + (t.width - e.width) / 2 - s.x, a = t.top - e.top + (t.height - e.height) / 2 - s.y, r = t.width / e.width, c = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
1792
1809
  return {
1793
1810
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
1794
1811
  animate: (y) => {
1795
- const h = 1 - y, w = 1 + (c - 1) * h, S = 1 + (a - 1) * h, x = (i * h + o * (1 - h)) / ((w + S) / 2);
1812
+ const h = 1 - y, S = 1 + (r - 1) * h, m = 1 + (c - 1) * h, P = (i * h + o * (1 - h)) / ((S + m) / 2);
1796
1813
  return {
1797
- clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${x}px)`,
1798
- transform: `translate(${r * h}px, ${l * h}px) scale(${w}, ${S})`
1814
+ clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${P}px)`,
1815
+ transform: `translate(${l * h}px, ${a * h}px) scale(${S}, ${m})`
1799
1816
  };
1800
1817
  }
1801
1818
  };
1802
1819
  }
1803
- function zn({
1820
+ function Bn({
1804
1821
  enterRect: e,
1805
1822
  exitRect: t,
1806
1823
  pageRect: n,
@@ -1808,187 +1825,183 @@ function zn({
1808
1825
  enterRadius: o,
1809
1826
  exitRadius: i
1810
1827
  }) {
1811
- const r = t.left - e.left + (t.width - e.width) / 2 + s.x, l = t.top - e.top + (t.height - e.height) / 2 + s.y, c = t.width / e.width, a = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
1828
+ const l = t.left - e.left + (t.width - e.width) / 2 + s.x, a = t.top - e.top + (t.height - e.height) / 2 + s.y, r = t.width / e.width, c = t.height / e.height, p = e.top / n.height * 100, d = (n.width - (e.left + e.width)) / n.width * 100, f = (n.height - (e.top + e.height)) / n.height * 100, u = e.left / n.width * 100;
1812
1829
  return {
1813
1830
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
1814
1831
  animate: (y) => {
1815
- const h = 1 - y, w = 1 + (c - 1) * h, S = 1 + (a - 1) * h, x = (o * (1 - h) + i * h) / ((w + S) / 2);
1832
+ const h = 1 - y, S = 1 + (r - 1) * h, m = 1 + (c - 1) * h, P = (o * (1 - h) + i * h) / ((S + m) / 2);
1816
1833
  return {
1817
- clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${x}px)`,
1818
- transform: `translate(${r * h - s.x}px, ${l * h}px) scale(${w}, ${S})`
1834
+ clipPath: `inset(${p * h}% ${d * h}% ${f * h}% ${u * h}% round ${P}px)`,
1835
+ transform: `translate(${l * h - s.x}px, ${a * h}px) scale(${S}, ${m})`
1819
1836
  };
1820
1837
  }
1821
1838
  };
1822
1839
  }
1823
- const Nn = {
1840
+ const Zn = {
1824
1841
  spring: {
1825
1842
  stiffness: 430,
1826
1843
  damping: 33,
1827
1844
  doubleSpring: 1
1828
1845
  }
1829
- }, Tt = 0.12, Xn = 18;
1830
- function Bn() {
1846
+ }, At = 0.12, Wn = 18;
1847
+ function qn() {
1831
1848
  return {
1832
1849
  transformOrigin: "50% 50%",
1833
1850
  animate: (e) => {
1834
1851
  const t = 1 - e;
1835
1852
  return {
1836
- transform: `scale(${1 - Tt * t})`
1853
+ transform: `scale(${1 - At * t})`
1837
1854
  };
1838
1855
  }
1839
1856
  };
1840
1857
  }
1841
- function Wn() {
1858
+ function Kn() {
1842
1859
  return {
1843
1860
  transformOrigin: "50% 50%",
1844
1861
  animate: (e) => {
1845
1862
  const t = 1 - e;
1846
1863
  return {
1847
- transform: `scale(${1 - Tt * t})`
1864
+ transform: `scale(${1 - At * t})`
1848
1865
  };
1849
1866
  }
1850
1867
  };
1851
1868
  }
1852
- const q = {
1869
+ const j = {
1853
1870
  willChange: "backdrop-filter",
1854
1871
  initialStyle: {
1855
1872
  position: "absolute",
1856
1873
  inset: "0",
1857
1874
  pointerEvents: "none",
1858
- // z-index is mode-dependent and applied in OverlayStrategy.contribute
1859
- // once `resolved.mode` is known. Sits between the background page and
1860
- // the zoomed tile:
1861
- // enter — tile (`to`) is default(0), background (`from`) at -2,
1862
- // overlay at -1.
1863
- // exit — tile (`from`) is at +2, background (`to`) default(0),
1864
- // overlay at +1.
1875
+ // z-index is applied in OverlayStrategy.contribute. The overlay always
1876
+ // sits at Z_OVERLAY, between the background page (Z_BACKGROUND) and the
1877
+ // zoomed tile (Z_FOREGROUND), in both enter and exit.
1865
1878
  backdropFilter: "blur(0px)",
1866
1879
  WebkitBackdropFilter: "blur(0px)"
1867
1880
  },
1868
1881
  style: (e, t) => {
1869
- const n = e === "enter" ? t : 1 - t, s = `blur(${Xn * n}px)`;
1882
+ const n = e === "enter" ? t : 1 - t, s = `blur(${Wn * n}px)`;
1870
1883
  return {
1871
1884
  backdropFilter: s,
1872
1885
  WebkitBackdropFilter: s
1873
1886
  };
1874
1887
  }
1875
1888
  };
1876
- class Zn {
1889
+ class jn {
1877
1890
  constructor() {
1878
- $(this, "physics", Nn);
1891
+ C(this, "physics", Zn);
1879
1892
  }
1880
1893
  contribute(t) {
1881
- const { from: n, to: s, resolved: o, physics: i } = t, r = o.mode === "enter", l = r ? n : s, c = r ? Bn() : Wn();
1882
- return c && (l.style.transformOrigin = c.transformOrigin), [
1883
- new m({
1884
- element: l,
1885
- integrator: g.from(i),
1886
- style: r ? (a, p) => c.animate(p) : (a) => c.animate(a)
1894
+ const { from: n, to: s, resolved: o, physics: i } = t, l = o.mode === "enter", a = l ? n : s, r = l ? qn() : Kn();
1895
+ return r && (a.style.transformOrigin = r.transformOrigin), [
1896
+ new g({
1897
+ element: a,
1898
+ integrator: w.from(i),
1899
+ style: l ? (c, p) => r.animate(p) : (c) => r.animate(c)
1887
1900
  })
1888
1901
  ];
1889
1902
  }
1890
1903
  }
1891
- class qn {
1904
+ class Gn {
1892
1905
  prepare(t) {
1893
1906
  const n = t.createElement("zoom-overlay");
1894
- return Object.assign(n.style, q.initialStyle), n.style.willChange = q.willChange, t.context.positionedParent.appendChild(n), { overlay: n };
1907
+ return Object.assign(n.style, j.initialStyle), n.style.willChange = j.willChange, t.context.positionedParent.appendChild(n), { overlay: n };
1895
1908
  }
1896
1909
  contribute(t) {
1897
1910
  const n = t.extras.overlay;
1898
- return n ? (n.style.zIndex = t.resolved.mode === "enter" ? "-1" : "1", [
1899
- new m({
1911
+ return n ? (n.style.zIndex = Le, [
1912
+ new g({
1900
1913
  element: n,
1901
- integrator: g.from(t.physics),
1902
- style: (s) => q.style(t.resolved.mode, s)
1914
+ integrator: w.from(t.physics),
1915
+ style: (s) => j.style(t.resolved.mode, s)
1903
1916
  })
1904
1917
  ]) : [];
1905
1918
  }
1906
1919
  }
1907
- const jn = {
1920
+ const Jn = {
1908
1921
  spring: {
1909
1922
  stiffness: 430,
1910
1923
  damping: 33,
1911
1924
  doubleSpring: 1
1912
1925
  }
1913
1926
  };
1914
- function Kn({
1927
+ function Qn({
1915
1928
  enterRect: e,
1916
1929
  exitRect: t,
1917
1930
  scrollOffset: n
1918
1931
  }) {
1919
- const s = e.left - t.left + (e.width - t.width) / 2 + n.x, o = e.top - t.top + (e.height - t.height) / 2 + n.y, i = e.width / t.width, r = e.height / t.height, l = Math.max(i, r);
1932
+ const s = e.left - t.left + (e.width - t.width) / 2 + n.x, o = e.top - t.top + (e.height - t.height) / 2 + n.y, i = e.width / t.width, l = e.height / t.height, a = Math.max(i, l);
1920
1933
  return {
1921
1934
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
1922
- animate: (c) => {
1923
- const a = 1 - c;
1935
+ animate: (r) => {
1936
+ const c = 1 - r;
1924
1937
  return {
1925
- transform: `translate(${s * a - n.x}px, ${o * a}px) scale(${1 + (l - 1) * a})`
1938
+ transform: `translate(${s * c - n.x}px, ${o * c}px) scale(${1 + (a - 1) * c})`
1926
1939
  };
1927
1940
  }
1928
1941
  };
1929
1942
  }
1930
- function Gn({
1943
+ function ts({
1931
1944
  enterRect: e,
1932
1945
  exitRect: t,
1933
1946
  scrollOffset: n
1934
1947
  }) {
1935
- const s = e.left - t.left + (e.width - t.width) / 2 - n.x, o = e.top - t.top + (e.height - t.height) / 2 - n.y, i = e.width / t.width, r = e.height / t.height, l = Math.max(i, r);
1948
+ const s = e.left - t.left + (e.width - t.width) / 2 - n.x, o = e.top - t.top + (e.height - t.height) / 2 - n.y, i = e.width / t.width, l = e.height / t.height, a = Math.max(i, l);
1936
1949
  return {
1937
1950
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
1938
- animate: (c) => {
1939
- const a = 1 - c;
1951
+ animate: (r) => {
1952
+ const c = 1 - r;
1940
1953
  return {
1941
- transform: `translate(${s * a}px, ${o * a}px) scale(${1 + (l - 1) * a})`
1954
+ transform: `translate(${s * c}px, ${o * c}px) scale(${1 + (a - 1) * c})`
1942
1955
  };
1943
1956
  }
1944
1957
  };
1945
1958
  }
1946
- class Jn {
1959
+ class es {
1947
1960
  constructor() {
1948
- $(this, "physics", jn);
1961
+ C(this, "physics", Jn);
1949
1962
  }
1950
1963
  contribute(t) {
1951
- const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", c = l ? n : s, a = l ? Kn(i) : Gn(i);
1952
- return a && (c.style.transformOrigin = a.transformOrigin), [
1953
- new m({
1954
- element: c,
1955
- integrator: g.from(r),
1956
- style: l ? (p, d) => a.animate(d) : (p) => a.animate(p)
1964
+ const { from: n, to: s, resolved: o, input: i, physics: l } = t, a = o.mode === "enter", r = a ? n : s, c = a ? Qn(i) : ts(i);
1965
+ return c && (r.style.transformOrigin = c.transformOrigin), [
1966
+ new g({
1967
+ element: r,
1968
+ integrator: w.from(l),
1969
+ style: a ? (p, d) => c.animate(d) : (p) => c.animate(p)
1957
1970
  })
1958
1971
  ];
1959
1972
  }
1960
1973
  }
1961
- const Qn = {
1974
+ const ns = {
1962
1975
  spring: {
1963
1976
  stiffness: 530,
1964
1977
  damping: 34,
1965
1978
  doubleSpring: 1
1966
1979
  }
1967
1980
  };
1968
- class ts {
1981
+ class ss {
1969
1982
  constructor() {
1970
- $(this, "physics", Qn);
1983
+ C(this, "physics", ns);
1971
1984
  }
1972
1985
  contribute(t) {
1973
1986
  return [];
1974
1987
  }
1975
1988
  }
1976
- const es = {
1977
- expand: () => new Jn(),
1978
- static: () => new ts(),
1979
- blur: () => new Zn()
1989
+ const os = {
1990
+ expand: () => new es(),
1991
+ static: () => new ss(),
1992
+ blur: () => new jn()
1980
1993
  };
1981
- function ns(e) {
1982
- return es[e]();
1994
+ function is(e) {
1995
+ return os[e]();
1983
1996
  }
1984
- const j = "data-zoom-enter-key", Et = "data-zoom-exit-key", ss = "data-zoom-radius";
1985
- function xt(e) {
1986
- const t = e.getAttribute(ss);
1997
+ const G = "data-zoom-enter-key", Pt = "data-zoom-exit-key", rs = "data-zoom-radius";
1998
+ function _t(e) {
1999
+ const t = e.getAttribute(rs);
1987
2000
  if (!t) return 0;
1988
2001
  const n = parseFloat(t);
1989
2002
  return Number.isFinite(n) && n > 0 ? n : 0;
1990
2003
  }
1991
- function os(e, t) {
2004
+ function as(e, t) {
1992
2005
  const n = [];
1993
2006
  let s = t;
1994
2007
  for (; s && s !== e; ) {
@@ -2000,89 +2013,91 @@ function os(e, t) {
2000
2013
  }
2001
2014
  return n;
2002
2015
  }
2003
- function Pt(e) {
2004
- const t = e.querySelectorAll(`[${j}]`);
2016
+ function It(e) {
2017
+ const t = e.querySelectorAll(`[${G}]`);
2005
2018
  return t.length !== 1 ? null : t[0];
2006
2019
  }
2007
- function _t(e, t) {
2008
- const n = e.querySelectorAll(`[${Et}]`);
2020
+ function Dt(e, t) {
2021
+ const n = e.querySelectorAll(`[${Pt}]`);
2009
2022
  for (const s of n)
2010
- if (s.getAttribute(Et) === t)
2023
+ if (s.getAttribute(Pt) === t)
2011
2024
  return s;
2012
2025
  return null;
2013
2026
  }
2014
- function is(e, t) {
2015
- const n = Pt(e), s = Pt(t);
2027
+ function ls(e, t) {
2028
+ const n = It(e), s = It(t);
2016
2029
  if (!n && s) {
2017
- const o = s.getAttribute(j);
2030
+ const o = s.getAttribute(G);
2018
2031
  if (!o) return null;
2019
- const i = _t(e, o);
2032
+ const i = Dt(e, o);
2020
2033
  return i ? { mode: "enter", enterEl: s, exitEl: i } : null;
2021
2034
  }
2022
2035
  if (n && !s) {
2023
- const o = n.getAttribute(j);
2036
+ const o = n.getAttribute(G);
2024
2037
  if (!o) return null;
2025
- const i = _t(t, o);
2038
+ const i = Dt(t, o);
2026
2039
  return i ? { mode: "exit", enterEl: n, exitEl: i } : null;
2027
2040
  }
2028
2041
  return null;
2029
2042
  }
2030
- function rs(e, t, n, s) {
2043
+ function cs(e, t, n, s) {
2031
2044
  return {
2032
- enterRect: tt(
2045
+ enterRect: nt(
2033
2046
  e.mode === "enter" ? n : t,
2034
2047
  e.enterEl
2035
2048
  ),
2036
- exitRect: tt(
2049
+ exitRect: nt(
2037
2050
  e.mode === "enter" ? t : n,
2038
2051
  e.exitEl
2039
2052
  ),
2040
2053
  pageRect: e.mode === "enter" ? n.getBoundingClientRect() : t.getBoundingClientRect(),
2041
2054
  scrollOffset: s,
2042
- enterRadius: xt(e.enterEl),
2043
- exitRadius: xt(e.exitEl)
2055
+ enterRadius: _t(e.enterEl),
2056
+ exitRadius: _t(e.exitEl)
2044
2057
  };
2045
2058
  }
2046
- class as {
2059
+ class ps {
2047
2060
  prepare(t) {
2048
2061
  t.from.then((n) => {
2049
2062
  n.style.willChange = "transform, clip-path, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
2050
2063
  });
2051
2064
  }
2052
2065
  contribute(t) {
2053
- const { from: n, to: s, resolved: o, input: i, physics: r, onComplete: l } = t, c = o.mode === "enter", a = c ? Vn(i) : zn(i), p = c ? s : n, d = c ? "t" : "u";
2054
- a && (p.style.transformOrigin = a.transformOrigin);
2055
- const f = c ? "-2" : "2", u = n.style.zIndex;
2056
- return n.style.zIndex = f, l(() => {
2057
- p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = u, n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
2066
+ const { from: n, to: s, resolved: o, input: i, physics: l, onComplete: a } = t, r = o.mode === "enter", c = r ? Xn(i) : Bn(i), p = r ? s : n, d = r ? "t" : "u";
2067
+ c && (p.style.transformOrigin = c.transformOrigin);
2068
+ const f = r ? v : O, u = r ? O : v, y = n.style.zIndex;
2069
+ n.style.zIndex = f;
2070
+ const h = s.style.zIndex, S = s.style.position;
2071
+ return s.style.zIndex = u, s.style.position = "relative", a(() => {
2072
+ p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = y, s.style.zIndex === u && (s.style.zIndex = h), s.style.position === "relative" && (s.style.position = S), s.style.transformOrigin = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
2058
2073
  }), [
2059
- new m({
2074
+ new g({
2060
2075
  element: p,
2061
- integrator: g.from(r),
2076
+ integrator: w.from(l),
2062
2077
  // Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
2063
2078
  // the legacy convention from v5's outAnim path. Either way, feed
2064
2079
  // the progress that matches the tileConfig's authored direction.
2065
- style: d === "t" ? (y) => a.animate(y) : (y, h) => a.animate(h)
2080
+ style: d === "t" ? (m) => c.animate(m) : (m, b) => c.animate(b)
2066
2081
  })
2067
2082
  ];
2068
2083
  }
2069
2084
  }
2070
- class ls {
2085
+ class ds {
2071
2086
  contribute(t) {
2072
- const { resolved: n, physics: s, from: o, to: i, onComplete: r } = t, l = n.mode === "enter" ? i : o, c = os(l, n.enterEl);
2073
- if (c.length === 0) return [];
2074
- const a = c.map((p) => p.style.opacity);
2087
+ const { resolved: n, physics: s, from: o, to: i, onComplete: l } = t, a = n.mode === "enter" ? i : o, r = as(a, n.enterEl);
2088
+ if (r.length === 0) return [];
2089
+ const c = r.map((p) => p.style.opacity);
2075
2090
  if (n.mode === "enter")
2076
- for (const p of c) p.style.opacity = "0";
2077
- return r(() => {
2078
- for (let p = 0; p < c.length; p++) {
2079
- const d = c[p];
2080
- d && (d.style.opacity = a[p] ?? "");
2091
+ for (const p of r) p.style.opacity = "0";
2092
+ return l(() => {
2093
+ for (let p = 0; p < r.length; p++) {
2094
+ const d = r[p];
2095
+ d && (d.style.opacity = c[p] ?? "");
2081
2096
  }
2082
- }), c.map(
2083
- (p) => new m({
2097
+ }), r.map(
2098
+ (p) => new g({
2084
2099
  element: p,
2085
- integrator: g.from(s),
2100
+ integrator: w.from(s),
2086
2101
  style: (d, f) => ({
2087
2102
  opacity: n.mode === "enter" ? d : f
2088
2103
  })
@@ -2090,35 +2105,35 @@ class ls {
2090
2105
  );
2091
2106
  }
2092
2107
  }
2093
- class Ot {
2108
+ class Ft {
2094
2109
  contribute() {
2095
2110
  return [];
2096
2111
  }
2097
2112
  }
2098
- const cs = {
2099
- default: () => new Ot(),
2100
- fade: () => new ls()
2113
+ const fs = {
2114
+ default: () => new Ft(),
2115
+ fade: () => new ds()
2101
2116
  };
2102
- function ps(e) {
2103
- return cs[e]();
2117
+ function ys(e) {
2118
+ return fs[e]();
2104
2119
  }
2105
- class ds extends Ot {
2120
+ class hs extends Ft {
2106
2121
  }
2107
- function fs(e) {
2108
- const t = ns(e.type);
2122
+ function us(e) {
2123
+ const t = is(e.type);
2109
2124
  return { strategies: [
2110
- new as(),
2125
+ new ps(),
2111
2126
  t,
2112
- ps(e.variant),
2113
- new ds(),
2127
+ ys(e.variant),
2128
+ new hs(),
2114
2129
  // Overlay is intrinsically tied to backdrop-filter-driven types. Today
2115
2130
  // that's only `blur`; the table-driven factory above owns the mapping
2116
2131
  // so this conditional is the single line that knows the relationship.
2117
- ...e.type === "blur" ? [new qn()] : []
2132
+ ...e.type === "blur" ? [new Gn()] : []
2118
2133
  ], physics: t.physics };
2119
2134
  }
2120
- const ys = (e) => {
2121
- const { strategies: t, physics: n } = fs(e);
2135
+ const ms = (e) => {
2136
+ const { strategies: t, physics: n } = us(e);
2122
2137
  return {
2123
2138
  prepare: (s) => {
2124
2139
  const o = {
@@ -2130,26 +2145,26 @@ const ys = (e) => {
2130
2145
  // compatible.
2131
2146
  createElement: s.createElement
2132
2147
  }, i = {};
2133
- for (const r of t) {
2134
- if (!r.prepare) continue;
2135
- const l = r.prepare(o);
2136
- l && Object.assign(i, l);
2148
+ for (const l of t) {
2149
+ if (!l.prepare) continue;
2150
+ const a = l.prepare(o);
2151
+ a && Object.assign(i, a);
2137
2152
  }
2138
2153
  return i;
2139
2154
  },
2140
- animation: ({ from: s, to: o, context: i, ...r }) => {
2141
- const l = is(s, o);
2142
- if (!l)
2143
- return new C([], { mode: "parallel" });
2144
- const c = rs(l, s, o, i.scrollOffset), a = [], d = {
2155
+ animation: ({ from: s, to: o, context: i, ...l }) => {
2156
+ const a = ls(s, o);
2157
+ if (!a)
2158
+ return new x([], { mode: "parallel" });
2159
+ const r = cs(a, s, o, i.scrollOffset), c = [], d = {
2145
2160
  from: s,
2146
2161
  to: o,
2147
- resolved: l,
2148
- input: c,
2162
+ resolved: a,
2163
+ input: r,
2149
2164
  physics: n,
2150
- extras: r,
2165
+ extras: l,
2151
2166
  onComplete: (y) => {
2152
- a.push(y);
2167
+ c.push(y);
2153
2168
  }
2154
2169
  }, f = [];
2155
2170
  for (const y of t)
@@ -2159,51 +2174,51 @@ const ys = (e) => {
2159
2174
  const y = u.onComplete;
2160
2175
  u.onComplete = () => {
2161
2176
  y == null || y();
2162
- for (const h of a)
2177
+ for (const h of c)
2163
2178
  try {
2164
2179
  h();
2165
- } catch (w) {
2166
- console.error("[zoom] cleanup error", w);
2180
+ } catch (S) {
2181
+ console.error("[zoom] cleanup error", S);
2167
2182
  }
2168
2183
  };
2169
2184
  }
2170
2185
  for (const y of f) {
2171
- if (!(y instanceof m)) continue;
2186
+ if (!(y instanceof g)) continue;
2172
2187
  const h = y.onComplete;
2173
2188
  y.onComplete = () => {
2174
2189
  h == null || h(), y.releaseFill();
2175
2190
  };
2176
2191
  }
2177
- return new C(f, { mode: "parallel" });
2192
+ return new x(f, { mode: "parallel" });
2178
2193
  }
2179
2194
  };
2180
2195
  };
2181
- function hs(e) {
2196
+ function gs(e) {
2182
2197
  const t = e.type ?? "static", n = e.variant ?? (e.fade ? "fade" : "default");
2183
2198
  return { type: t, variant: n };
2184
2199
  }
2185
- function Ts(e) {
2186
- const t = hs(e);
2187
- return v(
2200
+ function Fs(e) {
2201
+ const t = gs(e);
2202
+ return D(
2188
2203
  e.paths,
2189
- () => ys(t)
2204
+ () => ms(t)
2190
2205
  );
2191
2206
  }
2192
2207
  export {
2193
- Fs as Animation,
2194
- C as MultiAnimation,
2195
- m as WebAnimation,
2196
- ws as axis,
2197
- Ss as blind,
2198
- bs as drill,
2199
- $s as fade,
2200
- Cs as film,
2201
- Es as hero,
2202
- xs as jaemin,
2203
- Ps as rotate,
2204
- _s as scroll,
2205
- Ds as sheet,
2206
- vs as slide,
2207
- Is as strip,
2208
- Ts as zoom
2208
+ Ls as Animation,
2209
+ x as MultiAnimation,
2210
+ g as WebAnimation,
2211
+ $s as axis,
2212
+ Cs as blind,
2213
+ xs as drill,
2214
+ Es as fade,
2215
+ Ps as film,
2216
+ _s as hero,
2217
+ Is as jaemin,
2218
+ Ds as rotate,
2219
+ vs as scroll,
2220
+ Os as sheet,
2221
+ Ts as slide,
2222
+ As as strip,
2223
+ Fs as zoom
2209
2224
  };