@ssgoi/core 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/animator/spring-core.d.ts +23 -4
  2. package/dist/animator/spring-core.d.ts.map +1 -1
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +0 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +169 -127
  7. package/dist/transitions/blur.d.ts +2 -5
  8. package/dist/transitions/blur.d.ts.map +1 -1
  9. package/dist/transitions/bounce.d.ts +2 -5
  10. package/dist/transitions/bounce.d.ts.map +1 -1
  11. package/dist/transitions/fade.d.ts +2 -5
  12. package/dist/transitions/fade.d.ts.map +1 -1
  13. package/dist/transitions/fly.d.ts +2 -5
  14. package/dist/transitions/fly.d.ts.map +1 -1
  15. package/dist/transitions/index.cjs +1 -1
  16. package/dist/transitions/index.js +181 -172
  17. package/dist/transitions/mask.d.ts +2 -5
  18. package/dist/transitions/mask.d.ts.map +1 -1
  19. package/dist/transitions/none.d.ts +2 -5
  20. package/dist/transitions/none.d.ts.map +1 -1
  21. package/dist/transitions/rotate.d.ts +2 -5
  22. package/dist/transitions/rotate.d.ts.map +1 -1
  23. package/dist/transitions/scale.d.ts +2 -5
  24. package/dist/transitions/scale.d.ts.map +1 -1
  25. package/dist/transitions/slide.d.ts +2 -5
  26. package/dist/transitions/slide.d.ts.map +1 -1
  27. package/dist/types.d.ts +14 -0
  28. package/dist/types.d.ts.map +1 -1
  29. package/dist/view-transitions/depth.d.ts +19 -0
  30. package/dist/view-transitions/depth.d.ts.map +1 -0
  31. package/dist/view-transitions/drill.d.ts.map +1 -1
  32. package/dist/view-transitions/fade.d.ts.map +1 -1
  33. package/dist/view-transitions/index.cjs +15 -15
  34. package/dist/view-transitions/index.d.ts +5 -2
  35. package/dist/view-transitions/index.d.ts.map +1 -1
  36. package/dist/view-transitions/index.js +992 -599
  37. package/dist/view-transitions/instagram.d.ts.map +1 -1
  38. package/dist/view-transitions/jaemin.d.ts +0 -4
  39. package/dist/view-transitions/jaemin.d.ts.map +1 -1
  40. package/dist/view-transitions/pinterest.d.ts.map +1 -1
  41. package/dist/view-transitions/sheet.d.ts +19 -0
  42. package/dist/view-transitions/sheet.d.ts.map +1 -0
  43. package/dist/view-transitions/slide.d.ts.map +1 -1
  44. package/dist/view-transitions/swap.d.ts +13 -0
  45. package/dist/view-transitions/swap.d.ts.map +1 -0
  46. package/package.json +1 -1
  47. package/dist/jaemin-BG8HRXG1.cjs +0 -1
  48. package/dist/jaemin-BWkrXq0V.js +0 -131
@@ -1,26 +1,44 @@
1
- import { p as x, g as b } from "../jaemin-BWkrXq0V.js";
2
- import { a as Ht } from "../jaemin-BWkrXq0V.js";
3
- const F = (t) => new Promise((n) => setTimeout(n, t));
4
- function T() {
1
+ const m = (t, n) => {
2
+ var r;
3
+ t.style.position = "absolute", t.style.width = "100%", t.style.top = `${-1 * (((r = n == null ? void 0 : n.scrollOffset) == null ? void 0 : r.y) ?? 0)}px`, t.style.left = "0";
4
+ }, W = (t) => new Promise((n) => setTimeout(n, t));
5
+ function x(t, n) {
6
+ function r(o) {
7
+ let d = 0, s = 0;
8
+ const c = o.offsetWidth, e = o.offsetHeight;
9
+ let i = o;
10
+ for (; i; )
11
+ d += i.offsetTop, s += i.offsetLeft, i = i.offsetParent;
12
+ return d -= window.scrollY, s -= window.scrollX, { top: d, left: s, width: c, height: e };
13
+ }
14
+ const p = r(t), a = r(n);
15
+ return new DOMRect(
16
+ a.left - p.left,
17
+ a.top - p.top,
18
+ a.width,
19
+ a.height
20
+ );
21
+ }
22
+ function S() {
5
23
  let t, n;
6
- return { promise: new Promise((d, r) => {
7
- t = d, n = r;
24
+ return { promise: new Promise((p, a) => {
25
+ t = p, n = a;
8
26
  }), resolve: t, reject: n };
9
27
  }
10
- const N = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, q = 300, j = 10, K = "horizontal", Z = "#000000", It = (t = {}) => {
28
+ const Q = { stiffness: 80, damping: 25 }, R = { stiffness: 75, damping: 25 }, tt = 300, nt = 10, it = "horizontal", st = "#000000", Nt = (t = {}) => {
11
29
  const {
12
- inSpring: n = G,
13
- outSpring: s = N,
14
- transitionDelay: d = q,
15
- blindCount: r = j,
16
- direction: a = K,
17
- blindColor: l = Z
30
+ inSpring: n = R,
31
+ outSpring: r = Q,
32
+ transitionDelay: p = tt,
33
+ blindCount: a = nt,
34
+ direction: o = it,
35
+ blindColor: d = st
18
36
  } = t;
19
- let i, c = null;
20
- const o = (e, p, y = "left") => {
21
- window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
22
- const g = document.createElement("div");
23
- g.className = "blind-container", g.style.cssText = `
37
+ let s, c = null;
38
+ const e = (i, y, h = "left") => {
39
+ window.getComputedStyle(i).position === "static" && (i.style.position = "relative");
40
+ const l = document.createElement("div");
41
+ l.className = "blind-container", l.style.cssText = `
24
42
  position: absolute;
25
43
  top: 0;
26
44
  left: 0;
@@ -31,66 +49,66 @@ const N = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, q
31
49
  overflow: hidden;
32
50
  `;
33
51
  const u = [];
34
- for (let m = 0; m < r; m++) {
52
+ for (let b = 0; b < a; b++) {
35
53
  const f = document.createElement("div");
36
- if (a === "horizontal") {
37
- const w = 100 / r, $ = `calc(${w}% + 1px)`;
54
+ if (o === "horizontal") {
55
+ const $ = 100 / a, w = `calc(${$}% + 1px)`;
38
56
  f.style.cssText = `
39
57
  position: absolute;
40
- top: ${w * m}%;
58
+ top: ${$ * b}%;
41
59
  left: 0;
42
60
  width: 100%;
43
- height: ${$};
44
- background: ${l};
45
- transform: scaleX(${p === "hidden" ? 0 : 1});
46
- transform-origin: ${y} center;
61
+ height: ${w};
62
+ background: ${d};
63
+ transform: scaleX(${y === "hidden" ? 0 : 1});
64
+ transform-origin: ${h} center;
47
65
  will-change: transform;
48
66
  `;
49
67
  } else {
50
- const w = 100 / r, $ = `calc(${w}% + 1px)`;
68
+ const $ = 100 / a, w = `calc(${$}% + 1px)`;
51
69
  f.style.cssText = `
52
70
  position: absolute;
53
71
  top: 0;
54
- left: ${w * m}%;
55
- width: ${$};
72
+ left: ${$ * b}%;
73
+ width: ${w};
56
74
  height: 100%;
57
- background: ${l};
58
- transform: scaleY(${p === "hidden" ? 0 : 1});
59
- transform-origin: ${y === "left" ? "top" : "bottom"} center;
75
+ background: ${d};
76
+ transform: scaleY(${y === "hidden" ? 0 : 1});
77
+ transform-origin: ${h === "left" ? "top" : "bottom"} center;
60
78
  will-change: transform;
61
79
  `;
62
80
  }
63
- u.push(f), g.appendChild(f);
81
+ u.push(f), l.appendChild(f);
64
82
  }
65
- return e.appendChild(g), { container: g, blinds: u };
83
+ return i.appendChild(l), { container: l, blinds: u };
66
84
  };
67
85
  return {
68
86
  out: () => {
69
- let e = null;
70
- i = new Promise((h) => {
71
- c = h;
87
+ let i = null;
88
+ s = new Promise((g) => {
89
+ c = g;
72
90
  });
73
- const p = (h) => {
74
- const g = 1 - h;
91
+ const y = (g) => {
92
+ const l = 1 - g;
75
93
  return {
76
- transform: a === "horizontal" ? `scaleX(${g})` : `scaleY(${g})`
94
+ transform: o === "horizontal" ? `scaleX(${l})` : `scaleY(${l})`
77
95
  };
78
96
  };
79
97
  return {
80
- springs: Array.from({ length: r }, (h, g) => ({
81
- spring: s,
98
+ springs: Array.from({ length: a }, (g, l) => ({
99
+ spring: r,
82
100
  offset: 0.2,
83
101
  css: {
84
102
  // Use getter for lazy element access (evaluated after prepare)
85
103
  get element() {
86
- return e == null ? void 0 : e.blinds[g];
104
+ return i == null ? void 0 : i.blinds[l];
87
105
  },
88
- style: p
106
+ style: y
89
107
  }
90
108
  })),
91
109
  schedule: "stagger",
92
- prepare: (h) => {
93
- x(h), h.style.zIndex = "1000", e = o(h, "hidden", "left");
110
+ prepare: (g) => {
111
+ m(g), g.style.zIndex = "1000", i = e(g, "hidden", "left");
94
112
  },
95
113
  onStart: () => {
96
114
  },
@@ -100,308 +118,545 @@ const N = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, q
100
118
  };
101
119
  },
102
120
  in: () => {
103
- let e = null;
104
- const p = (h) => {
105
- const g = 1 - h;
121
+ let i = null;
122
+ const y = (g) => {
123
+ const l = 1 - g;
106
124
  return {
107
- transform: a === "horizontal" ? `scaleX(${g})` : `scaleY(${g})`
125
+ transform: o === "horizontal" ? `scaleX(${l})` : `scaleY(${l})`
108
126
  };
109
127
  };
110
128
  return {
111
- springs: Array.from({ length: r }, (h, g) => ({
129
+ springs: Array.from({ length: a }, (g, l) => ({
112
130
  spring: n,
113
131
  offset: 0.2,
114
132
  css: {
115
133
  // Use getter for lazy element access (evaluated after prepare)
116
134
  get element() {
117
- return e == null ? void 0 : e.blinds[g];
135
+ return i == null ? void 0 : i.blinds[l];
118
136
  },
119
- style: p
137
+ style: y
120
138
  }
121
139
  })),
122
140
  schedule: "stagger",
123
- prepare: (h) => {
124
- h.style.position = "relative", h.style.zIndex = "0", e = o(h, "closed", "right");
141
+ prepare: (g) => {
142
+ g.style.position = "relative", g.style.zIndex = "0", i = e(g, "closed", "right");
125
143
  },
126
144
  onStart: () => {
127
145
  },
128
146
  wait: async () => {
129
- i && await i, await F(d);
147
+ s && await s, await W(p);
148
+ },
149
+ onEnd: () => {
150
+ i && i.container && i.container.remove();
151
+ }
152
+ };
153
+ }
154
+ };
155
+ }, et = { stiffness: 1, damping: 1 }, rt = { stiffness: 20, damping: 25 }, at = "#000000", ot = "circle", F = "CURTAIN_REVEAL_OVERLAY_ID", lt = {
156
+ position: "fixed",
157
+ inset: "0",
158
+ width: "100vw",
159
+ height: "100%",
160
+ zIndex: "9999",
161
+ display: "flex",
162
+ alignItems: "center",
163
+ justifyContent: "center",
164
+ overflow: "hidden"
165
+ }, ct = {
166
+ position: "relative",
167
+ display: "inline-block",
168
+ height: "5.5rem",
169
+ overflow: "hidden"
170
+ }, dt = {
171
+ display: "flex",
172
+ height: "100%",
173
+ willChange: "transform",
174
+ transition: "transform 0.3s ease"
175
+ }, pt = {
176
+ display: "inline-flex",
177
+ alignItems: "center",
178
+ justifyContent: "center",
179
+ whiteSpace: "nowrap",
180
+ fontSize: "5.5rem",
181
+ fontWeight: "900",
182
+ letterSpacing: "0.02em",
183
+ color: "#FFFFFF"
184
+ }, yt = 0.4, k = 0.5, ht = 0.2;
185
+ function gt(t, n) {
186
+ switch (t) {
187
+ case "circle":
188
+ return `circle(${n * 100}% at 50% 50%)`;
189
+ case "square":
190
+ return `inset(${(1 - n) * 50}% round ${10 * n}%)`;
191
+ case "triangle": {
192
+ const r = n * 100;
193
+ return `polygon(50% ${50 - r}%, ${50 - r}% ${50 + r}%, ${50 + r}% ${50 + r}%)`;
194
+ }
195
+ }
196
+ }
197
+ const ut = (t) => t.reduce((n, r) => n + r, 0), Wt = (t = {}) => {
198
+ const {
199
+ background: n = at,
200
+ texts: r = [],
201
+ shape: p = ot,
202
+ inSpring: a = rt,
203
+ outSpring: o = et,
204
+ textStyle: d = {}
205
+ } = t;
206
+ return {
207
+ out: (s, c) => {
208
+ const e = s.style.opacity;
209
+ return {
210
+ spring: o,
211
+ from: 1,
212
+ to: 0,
213
+ prepare: (i) => {
214
+ m(i, c), i.style.opacity = "1";
215
+ },
216
+ tick: (i) => {
217
+ const y = Math.max(0, i - yt);
218
+ s.style.opacity = String(y);
219
+ },
220
+ onEnd: () => {
221
+ s.style.opacity = e;
222
+ }
223
+ };
224
+ },
225
+ in: (s) => {
226
+ let c = null, e = null, i = null;
227
+ const y = document.body.style.overflow, h = document.getElementById(
228
+ F
229
+ );
230
+ let g = [];
231
+ const l = () => {
232
+ c = document.createElement("div"), c.id = F, Object.assign(c.style, lt, { background: n }), document.body.appendChild(c), e = document.createElement("div"), Object.assign(e.style, ct), c.appendChild(e), i = document.createElement("div"), Object.assign(i.style, dt), e.appendChild(i), r.forEach((u) => {
233
+ const b = document.createElement("div");
234
+ b.textContent = u, Object.assign(b.style, pt, d), i.appendChild(b);
235
+ }), g = Array.from(i.children).map(
236
+ (u) => u.getBoundingClientRect().width
237
+ );
238
+ };
239
+ return {
240
+ spring: a,
241
+ from: 0,
242
+ to: 1,
243
+ prepare: () => {
244
+ document.body.style.overflow = "hidden", s.style.opacity = "1", h == null || h.remove(), l(), c && e && (c.style.clipPath = "none", e.style.transform = "scale(1)");
245
+ },
246
+ tick: (u) => {
247
+ if (!(!c || !e || !i)) {
248
+ if (u <= k && r.length > 0) {
249
+ const b = u / k, f = Math.min(
250
+ Math.floor(b * r.length),
251
+ r.length - 1
252
+ ), $ = g[f] ?? 0, w = ut(g.slice(0, f));
253
+ e.style.width = `${$}px`, i.style.transform = `translateX(-${w}px)`;
254
+ }
255
+ if (u > k) {
256
+ const f = 1 - Math.max(
257
+ 0,
258
+ Math.min(1, (u - k) / ht)
259
+ );
260
+ c.style.clipPath = gt(p, f), e.style.transform = `scale(${f})`;
261
+ }
262
+ }
263
+ },
264
+ onEnd: () => {
265
+ c == null || c.remove(), c = e = i = null, document.body.style.overflow = y;
266
+ }
267
+ };
268
+ }
269
+ };
270
+ }, ft = {
271
+ stiffness: 300,
272
+ damping: 22,
273
+ doubleSpring: 0.5
274
+ }, wt = {
275
+ stiffness: 300,
276
+ damping: 22,
277
+ doubleSpring: 0.5
278
+ }, C = 0.05;
279
+ function P(t) {
280
+ const n = x(document.body, t.positionedParent), r = t.scroll.y, p = window.innerHeight - n.top;
281
+ return {
282
+ top: r,
283
+ left: 0,
284
+ width: n.width,
285
+ height: p
286
+ };
287
+ }
288
+ const Mt = (t = {}) => {
289
+ var d, s, c;
290
+ const { direction: n = "enter" } = t, r = n === "enter" ? ft : wt, p = {
291
+ stiffness: ((d = t.spring) == null ? void 0 : d.stiffness) ?? r.stiffness,
292
+ damping: ((s = t.spring) == null ? void 0 : s.damping) ?? r.damping,
293
+ doubleSpring: ((c = t.spring) == null ? void 0 : c.doubleSpring) ?? r.doubleSpring
294
+ };
295
+ let { promise: a, resolve: o } = S();
296
+ return n === "enter" ? {
297
+ // Entering page: scales up from small (0.8 → 1) with fade in
298
+ in: (e, i) => {
299
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2;
300
+ return {
301
+ spring: p,
302
+ prepare: () => {
303
+ e.style.opacity = "0", e.style.willChange = "transform, opacity", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.transformOrigin = `${h}px ${g}px`;
304
+ },
305
+ wait: async () => {
306
+ if (a) {
307
+ await a;
308
+ const l = S();
309
+ a = l.promise, o = l.resolve;
310
+ }
311
+ },
312
+ css: (l) => ({
313
+ transform: `scale(${1 - C + l * C})`,
314
+ opacity: l
315
+ }),
316
+ onEnd: () => {
317
+ e.style.opacity = "1", e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transformOrigin = "";
318
+ }
319
+ };
320
+ },
321
+ // Exiting page: scales up (1 → 1.2) with fade out, goes to back
322
+ out: (e, i) => {
323
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2 + i.scrollOffset.y;
324
+ return {
325
+ spring: p,
326
+ prepare: (l) => {
327
+ m(l, i), l.style.zIndex = "-1", l.style.willChange = "transform, opacity", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint", l.style.pointerEvents = "none", l.style.transformOrigin = `${h}px ${g}px`;
328
+ },
329
+ css: (l) => ({
330
+ transform: `scale(${1 + (1 - l) * C})`,
331
+ opacity: l
332
+ }),
333
+ onEnd: () => {
334
+ o && o();
335
+ }
336
+ };
337
+ }
338
+ } : {
339
+ // Entering page: scales down from large (1.2 → 1) with fade in
340
+ in: (e, i) => {
341
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2;
342
+ return {
343
+ spring: p,
344
+ prepare: () => {
345
+ e.style.opacity = "0", e.style.willChange = "transform, opacity", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.transformOrigin = `${h}px ${g}px`;
346
+ },
347
+ wait: async () => {
348
+ if (a) {
349
+ await a;
350
+ const l = S();
351
+ a = l.promise, o = l.resolve;
352
+ }
130
353
  },
354
+ css: (l) => ({
355
+ transform: `scale(${1 + C - l * C})`,
356
+ opacity: l
357
+ }),
131
358
  onEnd: () => {
132
- e && e.container && e.container.remove();
359
+ e.style.opacity = "1", e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transformOrigin = "";
360
+ }
361
+ };
362
+ },
363
+ // Exiting page: scales down to small (1 → 0.8) with fade out
364
+ out: (e, i) => {
365
+ const y = P(i), h = y.left + y.width / 2, g = y.top + y.height / 2 + i.scrollOffset.y;
366
+ return {
367
+ spring: p,
368
+ prepare: (l) => {
369
+ m(l, i), l.style.zIndex = "100", l.style.willChange = "transform, opacity", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint", l.style.pointerEvents = "none", l.style.transformOrigin = `${h}px ${g}px`;
370
+ },
371
+ css: (l) => ({
372
+ transform: `scale(${1 - (1 - l) * C})`,
373
+ opacity: l
374
+ }),
375
+ onEnd: () => {
376
+ o && o();
133
377
  }
134
378
  };
135
379
  }
136
380
  };
137
- }, J = {
138
- stiffness: 150,
139
- damping: 20
140
- }, Q = {
141
- stiffness: 100,
142
- damping: 20
143
- }, Ot = (t = {}) => {
144
- var a, l;
145
- const { opacity: n = !1, direction: s = "enter" } = t, d = s === "enter" ? J : Q, r = {
146
- stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? d.stiffness,
147
- damping: ((l = t.spring) == null ? void 0 : l.damping) ?? d.damping
381
+ }, bt = {
382
+ stiffness: 125,
383
+ damping: 14,
384
+ doubleSpring: 0.5
385
+ }, $t = {
386
+ stiffness: 128,
387
+ damping: 14,
388
+ doubleSpring: 0.5
389
+ }, Gt = (t = {}) => {
390
+ var o, d, s;
391
+ const { opacity: n = !1, direction: r = "enter" } = t, p = r === "enter" ? bt : $t, a = {
392
+ stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? p.stiffness,
393
+ damping: ((d = t.spring) == null ? void 0 : d.damping) ?? p.damping,
394
+ doubleSpring: ((s = t.spring) == null ? void 0 : s.doubleSpring) ?? p.doubleSpring
148
395
  };
149
- return s === "enter" ? {
150
- in: (i) => ({
151
- spring: r,
396
+ return r === "enter" ? {
397
+ in: (c) => ({
398
+ spring: a,
152
399
  prepare: () => {
153
- i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
400
+ c.style.willChange = n ? "transform, opacity" : "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint";
154
401
  },
155
- css: (c) => {
156
- const o = {
157
- transform: `translate3d(${(1 - c) * 100}%, 0, 0)`
402
+ css: (e) => {
403
+ const i = {
404
+ transform: `translate3d(${(1 - e) * 100}%, 0, 0)`
158
405
  };
159
- return n && (o.opacity = c), o;
406
+ return n && (i.opacity = e), i;
160
407
  },
161
408
  onEnd: () => {
162
- i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
409
+ c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "";
163
410
  }
164
411
  }),
165
- out: (i, c) => ({
166
- spring: r,
167
- prepare: (o) => {
168
- x(o, c), o.style.zIndex = "-1", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
412
+ out: (c, e) => ({
413
+ spring: a,
414
+ prepare: (i) => {
415
+ m(i, e), i.style.zIndex = "-1", i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
169
416
  },
170
- css: (o) => {
171
- const e = {
172
- transform: `translate3d(${-(1 - o) * 20}%, 0, 0)`
417
+ css: (i) => {
418
+ const y = {
419
+ transform: `translate3d(${-(1 - i) * 20}%, 0, 0)`
173
420
  };
174
- return n && (e.opacity = o), e;
421
+ return n && (y.opacity = i), y;
175
422
  }
176
423
  })
177
424
  } : {
178
- in: (i) => ({
179
- spring: r,
425
+ in: (c) => ({
426
+ spring: a,
180
427
  prepare: () => {
181
- i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
428
+ c.style.willChange = n ? "transform, opacity" : "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint";
182
429
  },
183
- css: (c) => {
184
- const o = {
185
- transform: `translate3d(${-(1 - c) * 20}%, 0, 0)`
430
+ css: (e) => {
431
+ const i = {
432
+ transform: `translate3d(${-(1 - e) * 20}%, 0, 0)`
186
433
  };
187
- return n && (o.opacity = c), o;
434
+ return n && (i.opacity = e), i;
188
435
  },
189
436
  onEnd: () => {
190
- i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
437
+ c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "";
191
438
  }
192
439
  }),
193
- out: (i, c) => ({
194
- spring: r,
195
- prepare: (o) => {
196
- x(o, c), o.style.zIndex = "100", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
440
+ out: (c, e) => ({
441
+ spring: a,
442
+ prepare: (i) => {
443
+ m(i, e), i.style.zIndex = "100", i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
197
444
  },
198
- css: (o) => {
199
- const e = {
200
- transform: `translate3d(${(1 - o) * 100}%, 0, 0)`
445
+ css: (i) => {
446
+ const y = {
447
+ transform: `translate3d(${(1 - i) * 100}%, 0, 0)`
201
448
  };
202
- return n && (e.opacity = o), e;
449
+ return n && (y.opacity = i), y;
203
450
  }
204
451
  })
205
452
  };
206
- }, R = { stiffness: 120, damping: 15 }, tt = { stiffness: 100, damping: 20 }, nt = 0, Dt = (t = {}) => {
453
+ }, mt = {
454
+ stiffness: 180,
455
+ damping: 20,
456
+ doubleSpring: !0
457
+ }, xt = {
458
+ stiffness: 170,
459
+ damping: 20,
460
+ doubleSpring: !0
461
+ }, Et = 0, Bt = (t = {}) => {
207
462
  const {
208
- inSpring: n = tt,
209
- outSpring: s = R,
210
- transitionDelay: d = nt
463
+ inSpring: n = xt,
464
+ outSpring: r = mt,
465
+ transitionDelay: p = Et
211
466
  } = t;
212
- let { promise: r, resolve: a } = T();
467
+ let { promise: a, resolve: o } = S();
213
468
  return {
214
- in: (l) => ({
469
+ in: (d) => ({
215
470
  spring: n,
216
471
  prepare: () => {
217
- l.style.opacity = "0", l.style.willChange = "opacity";
472
+ d.style.opacity = "0", d.style.willChange = "opacity";
218
473
  },
219
474
  wait: async () => {
220
- if (r) {
221
- await r;
222
- const i = T();
223
- r = i.promise, a = i.resolve, await F(d);
475
+ if (a) {
476
+ await a;
477
+ const s = S();
478
+ a = s.promise, o = s.resolve, await W(p);
224
479
  }
225
480
  },
226
- css: (i) => ({
227
- opacity: i
481
+ css: (s) => ({
482
+ opacity: s
228
483
  }),
229
484
  onEnd: () => {
230
- l.style.willChange = "auto", l.style.opacity = "1";
485
+ d.style.willChange = "auto", d.style.opacity = "1";
231
486
  }
232
487
  }),
233
- out: (l, i) => ({
234
- spring: s,
488
+ out: (d, s) => ({
489
+ spring: r,
235
490
  css: (c) => ({
236
491
  opacity: c
237
492
  }),
238
493
  prepare: () => {
239
- x(l, i), l.style.willChange = "opacity";
494
+ m(d, s), d.style.willChange = "opacity";
240
495
  },
241
496
  onEnd: () => {
242
- a && a(), l.style.willChange = "auto";
497
+ o && o(), d.style.willChange = "auto";
243
498
  }
244
499
  })
245
500
  };
246
- }, et = {
501
+ }, St = {
247
502
  scaleDown: { stiffness: 20, damping: 7 },
248
503
  // Soft start for cinematic scale
249
504
  translate: { stiffness: 15, damping: 7 },
250
505
  // Medium for movement
251
506
  scaleUp: { stiffness: 20, damping: 7 }
252
507
  // Crisp return to full size
253
- }, E = {
508
+ }, A = {
254
509
  scaleDown: 0,
255
510
  // Start immediately
256
511
  translate: 0.2,
257
512
  // Start when scaleDown is 25% complete
258
513
  scaleUp: 0.8
259
514
  // Start when translate is 70% complete
260
- }, it = 0.8, st = "white", Pt = (t) => {
261
- var r;
262
- const n = et, s = it, d = ((r = t == null ? void 0 : t.border) == null ? void 0 : r.color) ?? st;
515
+ }, Ct = 0.8, At = "white", qt = (t) => {
516
+ var a;
517
+ const n = St, r = Ct, p = ((a = t == null ? void 0 : t.border) == null ? void 0 : a.color) ?? At;
263
518
  return {
264
- out: async (a, l) => {
265
- const i = k(l), c = b(document.body, l.positionedParent), o = rt(d, {
266
- ...i,
519
+ out: async (o, d) => {
520
+ const s = Y(d), c = x(document.body, d.positionedParent), e = Pt(p, {
521
+ ...s,
267
522
  top: c.top
268
- }), e = {
523
+ }), i = {
269
524
  scale: 1,
270
- translateY: -i.top
271
- }, p = () => {
272
- a.style.transform = `translateY(${e.translateY}px) scale(${e.scale})`;
273
- const y = (i.width - i.width * e.scale) / 2, h = (i.height - i.height * e.scale) / 2;
274
- at(o, y, h);
525
+ translateY: -s.top
526
+ }, y = () => {
527
+ o.style.transform = `translateY(${i.translateY}px) scale(${i.scale})`;
528
+ const h = (s.width - s.width * i.scale) / 2, g = (s.height - s.height * i.scale) / 2;
529
+ kt(e, h, g);
275
530
  };
276
531
  return {
277
532
  springs: [
278
533
  // Spring 1: Scale Down (1 → scale)
279
534
  {
280
535
  spring: n.scaleDown,
281
- offset: E.scaleDown,
282
- tick: (y) => {
283
- const h = 1 - y;
284
- e.scale = 1 - (1 - s) * h, p();
536
+ offset: A.scaleDown,
537
+ tick: (h) => {
538
+ const g = 1 - h;
539
+ i.scale = 1 - (1 - r) * g, y();
285
540
  }
286
541
  },
287
542
  // Spring 2: Translate (vertical movement)
288
543
  {
289
544
  spring: n.translate,
290
- offset: E.translate,
291
- tick: (y) => {
292
- const h = 1 - y;
293
- e.translateY = -i.top - i.height * h, p();
545
+ offset: A.translate,
546
+ tick: (h) => {
547
+ const g = 1 - h;
548
+ i.translateY = -s.top - s.height * g, y();
294
549
  }
295
550
  },
296
551
  // Spring 3: Scale Up (scale → 1)
297
552
  {
298
553
  spring: n.scaleUp,
299
- offset: E.scaleUp,
300
- tick: (y) => {
301
- const h = 1 - y;
302
- e.scale = s + (1 - s) * h, p();
554
+ offset: A.scaleUp,
555
+ tick: (h) => {
556
+ const g = 1 - h;
557
+ i.scale = r + (1 - r) * g, y();
303
558
  }
304
559
  }
305
560
  ],
306
561
  schedule: "stagger",
307
562
  prepare: () => {
308
- x(a), S(a, i), _(a, i), lt(a, i);
309
- for (const y of o)
310
- l.positionedParent.appendChild(y);
563
+ m(o), V(o, s), U(o, s), Tt(o, s);
564
+ for (const h of e)
565
+ d.positionedParent.appendChild(h);
311
566
  },
312
567
  onEnd: () => {
313
- a.style.clipPath = "", a.style.transformOrigin = "", setTimeout(() => {
314
- for (const y of o)
315
- l.positionedParent.removeChild(y);
568
+ o.style.clipPath = "", o.style.transformOrigin = "", setTimeout(() => {
569
+ for (const h of e)
570
+ d.positionedParent.removeChild(h);
316
571
  }, 1e3);
317
572
  }
318
573
  };
319
574
  },
320
- in: async (a, l) => {
321
- const i = k(l), c = {
322
- scale: s,
323
- translateY: -i.top + i.height
324
- }, o = () => {
325
- a.style.transform = `translateY(${c.translateY}px) scale(${c.scale})`;
575
+ in: async (o, d) => {
576
+ const s = Y(d), c = {
577
+ scale: r,
578
+ translateY: -s.top + s.height
579
+ }, e = () => {
580
+ o.style.transform = `translateY(${c.translateY}px) scale(${c.scale})`;
326
581
  };
327
582
  return {
328
583
  springs: [
329
584
  // Spring 1: Scale Down (1 → scale) - element starts scaled, shrinks further
330
585
  {
331
586
  spring: n.scaleDown,
332
- offset: E.scaleDown,
333
- tick: (e) => {
334
- c.scale = 1 - (1 - s) * e, o();
587
+ offset: A.scaleDown,
588
+ tick: (i) => {
589
+ c.scale = 1 - (1 - r) * i, e();
335
590
  }
336
591
  },
337
592
  // Spring 2: Translate (vertical movement from bottom to top)
338
593
  {
339
594
  spring: n.translate,
340
- offset: E.translate,
341
- tick: (e) => {
342
- c.translateY = -i.top + i.height * (1 - e), o();
595
+ offset: A.translate,
596
+ tick: (i) => {
597
+ c.translateY = -s.top + s.height * (1 - i), e();
343
598
  }
344
599
  },
345
600
  // Spring 3: Scale Up (scale → 1) - element returns to full size
346
601
  {
347
602
  spring: n.scaleUp,
348
- offset: E.scaleUp,
349
- tick: (e) => {
350
- c.scale = s + (1 - s) * e, o();
603
+ offset: A.scaleUp,
604
+ tick: (i) => {
605
+ c.scale = r + (1 - r) * i, e();
351
606
  }
352
607
  }
353
608
  ],
354
609
  schedule: "stagger",
355
610
  prepare: () => {
356
- S(a, i), _(a, i), a.style.transform = `translateY(${-i.top + i.height}px) scale(${s})`;
611
+ V(o, s), U(o, s), o.style.transform = `translateY(${-s.top + s.height}px) scale(${r})`;
357
612
  },
358
613
  onEnd: () => {
359
- a.style.clipPath = "", a.style.transformOrigin = "", a.style.transform = "";
614
+ o.style.clipPath = "", o.style.transformOrigin = "", o.style.transform = "";
360
615
  }
361
616
  };
362
617
  }
363
618
  };
364
619
  };
365
- function at(t, n, s) {
366
- const d = n * 0.7, r = s * 0.7;
367
- t.topLeft.style.transform = `translate(${d}px, ${r}px)`, t.topRight.style.transform = `translate(${-d}px, ${r}px)`, t.bottomLeft.style.transform = `translate(${d}px, ${-r}px)`, t.bottomRight.style.transform = `translate(${-d}px, ${-r}px)`;
620
+ function kt(t, n, r) {
621
+ const p = n * 0.7, a = r * 0.7;
622
+ t.topLeft.style.transform = `translate(${p}px, ${a}px)`, t.topRight.style.transform = `translate(${-p}px, ${a}px)`, t.bottomLeft.style.transform = `translate(${p}px, ${-a}px)`, t.bottomRight.style.transform = `translate(${-p}px, ${-a}px)`;
368
623
  }
369
- function rt(t = "white", n) {
370
- const r = document.createElement("div");
371
- r.style.position = "fixed", r.style.pointerEvents = "none", r.style.zIndex = "9999", r.style.top = `${n.top - 1}px`, r.style.left = `${n.left - 1}px`, r.style.width = "15px", r.style.height = "15px";
624
+ function Pt(t = "white", n) {
372
625
  const a = document.createElement("div");
373
- a.style.position = "absolute", a.style.width = "15px", a.style.height = "1px", a.style.backgroundColor = t, a.style.top = "0", a.style.left = "0";
374
- const l = document.createElement("div");
375
- l.style.position = "absolute", l.style.width = "1px", l.style.height = "15px", l.style.backgroundColor = t, l.style.top = "0", l.style.left = "0", r.appendChild(a), r.appendChild(l);
376
- const i = document.createElement("div");
377
- i.style.position = "fixed", i.style.pointerEvents = "none", i.style.zIndex = "9999", i.style.top = `${n.top - 1}px`, i.style.left = `${n.left + n.width - 15 + 1}px`, i.style.width = "15px", i.style.height = "15px";
626
+ a.style.position = "fixed", a.style.pointerEvents = "none", a.style.zIndex = "9999", a.style.top = `${n.top - 1}px`, a.style.left = `${n.left - 1}px`, a.style.width = "15px", a.style.height = "15px";
627
+ const o = document.createElement("div");
628
+ o.style.position = "absolute", o.style.width = "15px", o.style.height = "1px", o.style.backgroundColor = t, o.style.top = "0", o.style.left = "0";
629
+ const d = document.createElement("div");
630
+ d.style.position = "absolute", d.style.width = "1px", d.style.height = "15px", d.style.backgroundColor = t, d.style.top = "0", d.style.left = "0", a.appendChild(o), a.appendChild(d);
631
+ const s = document.createElement("div");
632
+ s.style.position = "fixed", s.style.pointerEvents = "none", s.style.zIndex = "9999", s.style.top = `${n.top - 1}px`, s.style.left = `${n.left + n.width - 15 + 1}px`, s.style.width = "15px", s.style.height = "15px";
378
633
  const c = document.createElement("div");
379
634
  c.style.position = "absolute", c.style.width = "15px", c.style.height = "1px", c.style.backgroundColor = t, c.style.top = "0", c.style.right = "0";
380
- const o = document.createElement("div");
381
- o.style.position = "absolute", o.style.width = "1px", o.style.height = "15px", o.style.backgroundColor = t, o.style.top = "0", o.style.right = "0", i.appendChild(c), i.appendChild(o);
382
635
  const e = document.createElement("div");
383
- e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${n.top + n.height - 15 + 1}px`, e.style.left = `${n.left - 1}px`, e.style.width = "15px", e.style.height = "15px";
384
- const p = document.createElement("div");
385
- p.style.position = "absolute", p.style.width = "15px", p.style.height = "1px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.left = "0";
636
+ e.style.position = "absolute", e.style.width = "1px", e.style.height = "15px", e.style.backgroundColor = t, e.style.top = "0", e.style.right = "0", s.appendChild(c), s.appendChild(e);
637
+ const i = document.createElement("div");
638
+ i.style.position = "fixed", i.style.pointerEvents = "none", i.style.zIndex = "9999", i.style.top = `${n.top + n.height - 15 + 1}px`, i.style.left = `${n.left - 1}px`, i.style.width = "15px", i.style.height = "15px";
386
639
  const y = document.createElement("div");
387
- y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0", e.appendChild(p), e.appendChild(y);
640
+ y.style.position = "absolute", y.style.width = "15px", y.style.height = "1px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0";
388
641
  const h = document.createElement("div");
389
- h.style.position = "fixed", h.style.pointerEvents = "none", h.style.zIndex = "9999", h.style.top = `${n.top + n.height - 15 + 1}px`, h.style.left = `${n.left + n.width - 15 + 1}px`, h.style.width = "15px", h.style.height = "15px";
642
+ h.style.position = "absolute", h.style.width = "1px", h.style.height = "15px", h.style.backgroundColor = t, h.style.bottom = "0", h.style.left = "0", i.appendChild(y), i.appendChild(h);
390
643
  const g = document.createElement("div");
391
- g.style.position = "absolute", g.style.width = "15px", g.style.height = "1px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.right = "0";
644
+ g.style.position = "fixed", g.style.pointerEvents = "none", g.style.zIndex = "9999", g.style.top = `${n.top + n.height - 15 + 1}px`, g.style.left = `${n.left + n.width - 15 + 1}px`, g.style.width = "15px", g.style.height = "15px";
645
+ const l = document.createElement("div");
646
+ l.style.position = "absolute", l.style.width = "15px", l.style.height = "1px", l.style.backgroundColor = t, l.style.bottom = "0", l.style.right = "0";
392
647
  const u = document.createElement("div");
393
- return u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.right = "0", h.appendChild(g), h.appendChild(u), {
394
- topLeft: r,
395
- topRight: i,
396
- bottomLeft: e,
397
- bottomRight: h,
648
+ return u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.right = "0", g.appendChild(l), g.appendChild(u), {
649
+ topLeft: a,
650
+ topRight: s,
651
+ bottomLeft: i,
652
+ bottomRight: g,
398
653
  *[Symbol.iterator]() {
399
- yield r, yield i, yield e, yield h;
654
+ yield a, yield s, yield i, yield g;
400
655
  }
401
656
  };
402
657
  }
403
- function k(t) {
404
- const n = b(document.body, t.positionedParent);
658
+ function Y(t) {
659
+ const n = x(document.body, t.positionedParent);
405
660
  return {
406
661
  top: t.scroll.y,
407
662
  left: 0,
@@ -409,11 +664,11 @@ function k(t) {
409
664
  height: window.innerHeight - n.top
410
665
  };
411
666
  }
412
- function S(t, n) {
413
- const s = n.left + n.width / 2, d = n.top + n.height / 2;
414
- t.style.transformOrigin = `${s}px ${d}px`;
667
+ function V(t, n) {
668
+ const r = n.left + n.width / 2, p = n.top + n.height / 2;
669
+ t.style.transformOrigin = `${r}px ${p}px`;
415
670
  }
416
- function _(t, n) {
671
+ function U(t, n) {
417
672
  t.style.clipPath = `polygon(
418
673
  ${n.left}px ${n.top}px,
419
674
  ${n.left + n.width}px ${n.top}px,
@@ -421,90 +676,90 @@ function _(t, n) {
421
676
  ${n.left}px ${n.top + n.height}px
422
677
  )`;
423
678
  }
424
- function lt(t, n) {
679
+ function Tt(t, n) {
425
680
  t.style.transform = `translateY(${-n.top}px)`;
426
681
  }
427
- function ot(t, n) {
682
+ function Ot(t, n) {
428
683
  return t.querySelector(`[data-hero-key="${n}"]`);
429
684
  }
430
- const vt = (t = {}) => {
431
- var l, i;
685
+ const jt = (t = {}) => {
686
+ var d, s;
432
687
  const n = {
433
- stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? 300,
434
- damping: ((i = t.spring) == null ? void 0 : i.damping) ?? 30
435
- }, s = t.timeout ?? 300, d = t.maxDistance ?? 700;
436
- let r = null, a = null;
688
+ stiffness: ((d = t.spring) == null ? void 0 : d.stiffness) ?? 300,
689
+ damping: ((s = t.spring) == null ? void 0 : s.damping) ?? 30
690
+ }, r = t.timeout ?? 300, p = t.maxDistance ?? 700;
691
+ let a = null, o = null;
437
692
  return {
438
- in: async (c, o) => {
439
- const e = c, p = Array.from(e.querySelectorAll("[data-hero-key]"));
440
- if (p.length === 0)
693
+ in: async (c, e) => {
694
+ const i = c, y = Array.from(i.querySelectorAll("[data-hero-key]"));
695
+ if (y.length === 0)
441
696
  return {
442
697
  spring: n,
443
698
  tick: () => {
444
699
  }
445
700
  // No hero elements, skip animation
446
701
  };
447
- if (!await new Promise((g) => {
448
- r ? g(!0) : (a = g, setTimeout(() => {
449
- a = null, g(!1);
450
- }, s));
451
- }) || !r)
452
- return r = null, {
702
+ if (!await new Promise((l) => {
703
+ a ? l(!0) : (o = l, setTimeout(() => {
704
+ o = null, l(!1);
705
+ }, r));
706
+ }) || !a)
707
+ return a = null, {
453
708
  spring: n,
454
709
  tick: () => {
455
710
  }
456
711
  // No fromNode, skip animation
457
712
  };
458
- const h = p.map((g) => {
459
- const u = g.getAttribute("data-hero-key");
713
+ const g = y.map((l) => {
714
+ const u = l.getAttribute("data-hero-key");
460
715
  if (!u) return null;
461
- const m = ot(r, u);
462
- if (!m) return null;
463
- const f = g, w = b(r, m), $ = b(e, f), Y = w.left - $.left - o.scrollOffset.x, U = w.top - $.top - o.scrollOffset.y, V = w.width / $.width, W = w.height / $.height, z = f.style.transform, X = f.style.position, M = f.style.transformOrigin, B = f.style.zIndex, H = f.style.willChange;
716
+ const b = Ot(a, u);
717
+ if (!b) return null;
718
+ const f = l, $ = x(a, b), w = x(i, f), E = $.left - w.left - e.scrollOffset.x, M = $.top - w.top - e.scrollOffset.y, G = $.width / w.width, B = $.height / w.height, q = f.style.transform, j = f.style.position, Z = f.style.transformOrigin, J = f.style.zIndex, K = f.style.willChange;
464
719
  return {
465
720
  toEl: f,
466
- dx: Y,
467
- dy: U,
468
- dw: V,
469
- dh: W,
470
- originalTransform: z,
471
- originalPosition: X,
472
- originalTransformOrigin: M,
473
- originalZIndex: B,
474
- originalWillChange: H
721
+ dx: E,
722
+ dy: M,
723
+ dw: G,
724
+ dh: B,
725
+ originalTransform: q,
726
+ originalPosition: j,
727
+ originalTransformOrigin: Z,
728
+ originalZIndex: J,
729
+ originalWillChange: K
475
730
  };
476
731
  }).filter(
477
- (g) => g !== null && Math.abs(g.dy) <= d
732
+ (l) => l !== null && Math.abs(l.dy) <= p
478
733
  );
479
- return r = null, h.length === 0 ? {
734
+ return a = null, g.length === 0 ? {
480
735
  spring: n,
481
736
  tick: () => {
482
737
  }
483
738
  // No matching hero elements
484
739
  } : {
485
- springs: h.map(({ toEl: g, dx: u, dy: m, dw: f, dh: w }) => ({
740
+ springs: g.map(({ toEl: l, dx: u, dy: b, dw: f, dh: $ }) => ({
486
741
  spring: n,
487
- tick: ($) => {
488
- g.style.transform = `translate(${(1 - $) * u}px, ${(1 - $) * m}px) scale(${$ + (1 - $) * f}, ${$ + (1 - $) * w})`;
742
+ tick: (w) => {
743
+ l.style.transform = `translate(${(1 - w) * u}px, ${(1 - w) * b}px) scale(${w + (1 - w) * f}, ${w + (1 - w) * $})`;
489
744
  }
490
745
  })),
491
746
  schedule: "parallel",
492
747
  prepare: () => {
493
- h.forEach(({ toEl: g }) => {
494
- g.style.position = "relative", g.style.transformOrigin = "top left", g.style.zIndex = "1000", g.style.willChange = "transform";
748
+ g.forEach(({ toEl: l }) => {
749
+ l.style.position = "relative", l.style.transformOrigin = "top left", l.style.zIndex = "1000", l.style.willChange = "transform";
495
750
  });
496
751
  },
497
752
  onEnd: () => {
498
- h.forEach(
753
+ g.forEach(
499
754
  ({
500
- toEl: g,
755
+ toEl: l,
501
756
  originalTransform: u,
502
- originalPosition: m,
757
+ originalPosition: b,
503
758
  originalTransformOrigin: f,
504
- originalZIndex: w,
505
- originalWillChange: $
759
+ originalZIndex: $,
760
+ originalWillChange: w
506
761
  }) => {
507
- g.style.transform = u, g.style.position = m, g.style.transformOrigin = f, g.style.zIndex = w, g.style.willChange = $;
762
+ l.style.transform = u, l.style.position = b, l.style.transformOrigin = f, l.style.zIndex = $, l.style.willChange = w;
508
763
  }
509
764
  );
510
765
  }
@@ -513,320 +768,419 @@ const vt = (t = {}) => {
513
768
  out: async (c) => ({
514
769
  spring: n,
515
770
  onStart: () => {
516
- r = c, a && (a(!0), a = null);
771
+ a = c, o && (o(!0), o = null);
517
772
  },
518
773
  tick: () => {
519
774
  },
520
- prepare: (o) => {
521
- x(o), o.style.opacity = "0";
775
+ prepare: (e) => {
776
+ m(e), e.style.opacity = "0";
522
777
  }
523
778
  })
524
779
  };
780
+ }, L = {
781
+ stiffness: 140,
782
+ damping: 19,
783
+ doubleSpring: 0.8
525
784
  };
526
- function ct({
785
+ function Lt({
527
786
  detailRect: t,
528
787
  galleryRect: n,
529
- pageRect: s,
530
- scrollOffset: d
788
+ pageRect: r,
789
+ scrollOffset: p
531
790
  }) {
532
- const r = n.left - t.left + (n.width - t.width) / 2 - d.x, a = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, p = (s.height - (t.top + t.height)) / s.height * 100, y = t.left / s.width * 100;
791
+ const a = n.left - t.left + (n.width - t.width) / 2 - p.x, o = n.top - t.top + (n.height - t.height) / 2 - p.y, d = n.width / t.width, s = n.height / t.height, c = Math.max(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
533
792
  return {
534
793
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
535
- animate: (g) => {
536
- const u = 1 - g;
794
+ animate: (l) => {
795
+ const u = 1 - l;
537
796
  return {
538
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
539
- transform: `translate(${r * u}px, ${a * u}px) scale(${1 + (c - 1) * u})`
797
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
798
+ transform: `translate(${a * u}px, ${o * u}px) scale(${1 + (c - 1) * u})`
540
799
  };
541
800
  }
542
801
  };
543
802
  }
544
- function dt({
803
+ function vt({
545
804
  detailRect: t,
546
805
  galleryRect: n,
547
- pageRect: s,
548
- scrollOffset: d
806
+ pageRect: r,
807
+ scrollOffset: p
549
808
  }) {
550
- const r = n.left - t.left + (n.width - t.width) / 2 + d.x, a = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, p = (s.height - (t.top + t.height)) / s.height * 100, y = t.left / s.width * 100;
809
+ const a = n.left - t.left + (n.width - t.width) / 2 + p.x, o = n.top - t.top + (n.height - t.height) / 2 + p.y, d = n.width / t.width, s = n.height / t.height, c = Math.min(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
551
810
  return {
552
811
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
553
- animate: (g) => {
554
- const u = 1 - g;
812
+ animate: (l) => {
813
+ const u = 1 - l;
555
814
  return {
556
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
557
- transform: `translate(${r * u - d.x}px, ${a * u - d.y}px) scale(${1 + (c - 1) * u})`
815
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
816
+ transform: `translate(${a * u - p.x}px, ${o * u - p.y}px) scale(${1 + (c - 1) * u})`
558
817
  };
559
818
  }
560
819
  };
561
820
  }
562
- function ht(t, n, s) {
563
- const d = t.querySelector(
821
+ function It(t, n, r) {
822
+ const p = t.querySelector(
564
823
  "[data-instagram-detail-key]"
565
- ), r = n.querySelector(
824
+ ), a = n.querySelector(
566
825
  "[data-instagram-detail-key]"
567
826
  );
568
827
  if (t.querySelectorAll("[data-instagram-detail-key]").length > 1 || n.querySelectorAll("[data-instagram-detail-key]").length > 1)
569
828
  return null;
570
- let a = null, l = null, i = !1;
571
- if (!d && r) {
572
- l = r;
573
- const e = l.getAttribute("data-instagram-detail-key");
574
- if (!e) return null;
575
- a = t.querySelector(
576
- `[data-instagram-gallery-key="${e}"]`
577
- ), a && (i = !0);
578
- } else if (d && !r) {
579
- l = d;
580
- const e = l.getAttribute("data-instagram-detail-key");
581
- if (!e) return null;
582
- a = n.querySelector(
583
- `[data-instagram-gallery-key="${e}"]`
584
- ), a && (i = !1);
829
+ let o = null, d = null, s = !1;
830
+ if (!p && a) {
831
+ d = a;
832
+ const i = d.getAttribute("data-instagram-detail-key");
833
+ if (!i) return null;
834
+ o = t.querySelector(
835
+ `[data-instagram-gallery-key="${i}"]`
836
+ ), o && (s = !0);
837
+ } else if (p && !a) {
838
+ d = p;
839
+ const i = d.getAttribute("data-instagram-detail-key");
840
+ if (!i) return null;
841
+ o = n.querySelector(
842
+ `[data-instagram-gallery-key="${i}"]`
843
+ ), o && (s = !1);
585
844
  }
586
- if (!a || !l)
845
+ if (!o || !d)
587
846
  return null;
588
- const c = b(i ? t : n, a), o = b(i ? n : t, l);
589
- if (i) {
590
- const e = ct({
591
- detailRect: o,
847
+ const c = x(s ? t : n, o), e = x(s ? n : t, d);
848
+ if (s) {
849
+ const i = Lt({
850
+ detailRect: e,
592
851
  galleryRect: c,
593
852
  pageRect: n.getBoundingClientRect(),
594
- scrollOffset: s
853
+ scrollOffset: r
595
854
  });
596
- return n.style.transformOrigin = e.transformOrigin, {
855
+ return n.style.transformOrigin = i.transformOrigin, {
597
856
  isEnterMode: !0,
598
- inAnimation: e.animate
857
+ inAnimation: i.animate
599
858
  // No outAnimation - gallery stays visible
600
859
  };
601
860
  } else {
602
- const e = dt({
603
- detailRect: o,
861
+ const i = vt({
862
+ detailRect: e,
604
863
  galleryRect: c,
605
864
  pageRect: t.getBoundingClientRect(),
606
- scrollOffset: s
865
+ scrollOffset: r
607
866
  });
608
- return t.style.transformOrigin = e.transformOrigin, {
867
+ return t.style.transformOrigin = i.transformOrigin, {
609
868
  isEnterMode: !1,
610
- outAnimation: e.animate
869
+ outAnimation: i.animate
611
870
  // No inAnimation - gallery stays visible
612
871
  };
613
872
  }
614
873
  }
615
- const Ft = (t = {}) => {
616
- var i, c;
874
+ const Zt = (t = {}) => {
875
+ var s, c, e;
617
876
  const n = {
618
- stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 150,
619
- damping: ((c = t.spring) == null ? void 0 : c.damping) ?? 20
620
- }, s = t.timeout ?? 300;
621
- let d = null, r = null, a = null, l = null;
877
+ stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? L.stiffness,
878
+ damping: ((c = t.spring) == null ? void 0 : c.damping) ?? L.damping,
879
+ doubleSpring: ((e = t.spring) == null ? void 0 : e.doubleSpring) ?? L.doubleSpring
880
+ }, r = t.timeout ?? 300;
881
+ let p = null, a = null, o = null, d = null;
622
882
  return {
623
- in: async (o, { scrollOffset: e }) => {
624
- const p = o;
625
- return !await new Promise((h) => {
626
- d ? h(!0) : (r = h, setTimeout(() => {
627
- r = null, h(!1);
628
- }, s));
629
- }) || !d ? (l == null || l(), l = null, d = null, {
883
+ in: async (i, { scrollOffset: y }) => {
884
+ const h = i;
885
+ return !await new Promise((l) => {
886
+ p ? l(!0) : (a = l, setTimeout(() => {
887
+ a = null, l(!1);
888
+ }, r));
889
+ }) || !p ? (d == null || d(), d = null, p = null, {
630
890
  spring: n,
631
891
  css: () => ({})
632
- }) : (a = ht(d, p, e), l == null || l(), l = null, a ? (d = null, {
892
+ }) : (o = It(p, h, y), d == null || d(), d = null, o ? (p = null, {
633
893
  spring: n,
634
- css: (h) => a != null && a.inAnimation ? a.inAnimation(h) : {}
635
- }) : (d = null, {
894
+ css: (l) => o != null && o.inAnimation ? o.inAnimation(l) : {}
895
+ }) : (p = null, {
636
896
  spring: n,
637
897
  css: () => ({})
638
898
  }));
639
899
  },
640
- out: async (o, e) => {
641
- const p = new Promise((y) => {
642
- l = y;
900
+ out: async (i, y) => {
901
+ const h = new Promise((g) => {
902
+ d = g;
643
903
  });
644
904
  return {
645
905
  spring: n,
646
- prepare: (y) => {
647
- a != null && a.isEnterMode ? x(y) : (x(y, e), y.style.zIndex = "-1");
906
+ prepare: (g) => {
907
+ o != null && o.isEnterMode ? m(g) : (m(g, y), g.style.zIndex = "-1");
648
908
  },
649
909
  wait: async () => {
650
- d = o, r && (r(!0), r = null), await p;
910
+ p = i, a && (a(!0), a = null), await h;
651
911
  },
652
- css: (y) => a != null && a.outAnimation ? a.outAnimation(y) : {}
912
+ css: (g) => o != null && o.outAnimation ? o.outAnimation(g) : {}
653
913
  };
654
914
  }
655
915
  };
656
916
  };
657
- function pt({
917
+ function _t(t) {
918
+ const n = x(document.body, t.positionedParent);
919
+ return {
920
+ top: t.scroll.y,
921
+ left: 0,
922
+ width: n.width,
923
+ height: window.innerHeight - n.top
924
+ };
925
+ }
926
+ const Jt = (t = {}) => {
927
+ var o, d;
928
+ const n = {
929
+ stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? 50,
930
+ damping: ((d = t.spring) == null ? void 0 : d.damping) ?? 30
931
+ }, r = t.initialRotation ?? 45, p = t.initialScale ?? 0.01, a = t.rotationTriggerPoint ?? 0.8;
932
+ return {
933
+ out: async (s, c) => {
934
+ const e = s.style.opacity;
935
+ return {
936
+ spring: {
937
+ stiffness: 80,
938
+ damping: 25
939
+ },
940
+ from: 1,
941
+ to: 0,
942
+ prepare: () => {
943
+ m(s, c), s.style.opacity = "1";
944
+ },
945
+ tick: (i) => {
946
+ s.style.opacity = String(i);
947
+ },
948
+ onEnd: () => {
949
+ s.style.opacity = e;
950
+ }
951
+ };
952
+ },
953
+ in: async (s, c) => {
954
+ const e = _t(c), i = s.style.transform, y = s.style.transformOrigin, h = s.style.position, g = s.style.zIndex;
955
+ return {
956
+ spring: n,
957
+ from: 0,
958
+ to: 1,
959
+ prepare: () => {
960
+ const l = Math.min(e.width, e.height) * 0.4;
961
+ s.style.setProperty(
962
+ "--max-border-radius",
963
+ `${l}px`
964
+ ), s.style.setProperty("--border-radius-scale", "1"), s.style.willChange = "transform", s.style.backfaceVisibility = "hidden";
965
+ const u = e.left + e.width / 2, b = e.top + e.height / 2;
966
+ s.style.transformOrigin = `${u}px ${b}px`, s.style.position = "fixed", s.style.top = `${e.top}px`, s.style.left = `${e.left}px`, s.style.width = `${e.width}px`, s.style.height = `${e.height}px`, s.style.zIndex = "1000", s.style.overflow = "hidden", s.style.transform = `rotate(${r}deg) scale(${p}) translateZ(0)`, s.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", s.style.opacity = "1";
967
+ },
968
+ tick: (l) => {
969
+ let u;
970
+ if (l <= 0.05)
971
+ u = p;
972
+ else if (l <= a) {
973
+ const w = (l - 0.05) / (a - 0.05), E = Math.pow(w, 9);
974
+ u = p + (0.8 - p) * E;
975
+ } else {
976
+ const w = (l - a) / (1 - a);
977
+ u = 0.8 + 0.2 * (1 - Math.pow(1 - w, 3));
978
+ }
979
+ let b;
980
+ const f = 0.7;
981
+ if (l <= f)
982
+ b = r;
983
+ else {
984
+ const w = (l - f) / (1 - f), E = 1 - Math.pow(1 - w, 2);
985
+ b = r * (1 - E);
986
+ }
987
+ let $;
988
+ if (l <= f)
989
+ $ = 1;
990
+ else {
991
+ const w = (l - f) / (1 - f);
992
+ $ = 1 - Math.pow(w, 0.5);
993
+ }
994
+ s.style.transform = `rotate(${b.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`, s.style.setProperty(
995
+ "--border-radius-scale",
996
+ $.toFixed(4)
997
+ );
998
+ },
999
+ onEnd: () => {
1000
+ s.style.willChange = "", s.style.backfaceVisibility = "", s.style.removeProperty("--max-border-radius"), s.style.removeProperty("--border-radius-scale"), s.style.transform = i, s.style.transformOrigin = y, s.style.position = h, s.style.zIndex = g, s.style.top = "", s.style.left = "", s.style.width = "", s.style.height = "", s.style.overflow = "", s.style.borderRadius = "";
1001
+ }
1002
+ };
1003
+ }
1004
+ };
1005
+ }, v = {
1006
+ stiffness: 140,
1007
+ damping: 19,
1008
+ doubleSpring: 0.7
1009
+ };
1010
+ function Dt({
658
1011
  detailRect: t,
659
1012
  galleryRect: n,
660
- pageRect: s,
661
- scrollOffset: d
1013
+ pageRect: r,
1014
+ scrollOffset: p
662
1015
  }) {
663
- const r = n.left - t.left + (n.width - t.width) / 2 - d.x, a = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, p = (s.height - (t.top + t.height)) / s.height * 100, y = t.left / s.width * 100;
1016
+ const a = n.left - t.left + (n.width - t.width) / 2 - p.x, o = n.top - t.top + (n.height - t.height) / 2 - p.y, d = n.width / t.width, s = n.height / t.height, c = Math.max(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
664
1017
  return {
665
1018
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
666
- animate: (g) => {
667
- const u = 1 - g;
1019
+ animate: (l) => {
1020
+ const u = 1 - l;
668
1021
  return {
669
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
670
- transform: `translate(${r * u}px, ${a * u}px) scale(${1 + (c - 1) * u})`
1022
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
1023
+ transform: `translate(${a * u}px, ${o * u}px) scale(${1 + (c - 1) * u})`
671
1024
  };
672
1025
  }
673
1026
  };
674
1027
  }
675
- function yt({
1028
+ function Ft({
676
1029
  galleryRect: t,
677
1030
  detailRect: n,
678
- scrollOffset: s
1031
+ scrollOffset: r
679
1032
  }) {
680
- const d = n.left - t.left + (n.width - t.width) / 2 + s.x, r = n.top - t.top + (n.height - t.height) / 2 + s.y, a = n.width / t.width, l = n.height / t.height, i = Math.max(a, l);
1033
+ const p = n.left - t.left + (n.width - t.width) / 2 + r.x, a = n.top - t.top + (n.height - t.height) / 2 + r.y, o = n.width / t.width, d = n.height / t.height, s = Math.max(o, d);
681
1034
  return {
682
1035
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
683
- animate: (o) => {
684
- const e = 1 - o;
1036
+ animate: (e) => {
1037
+ const i = 1 - e;
685
1038
  return {
686
- transform: `translate(${d * e - s.x}px, ${r * e - s.y}px) scale(${1 + (i - 1) * e})`,
687
- opacity: `${1 - e}`
1039
+ transform: `translate(${p * i - r.x}px, ${a * i - r.y}px) scale(${1 + (s - 1) * i})`,
1040
+ opacity: `${1 - i}`
688
1041
  };
689
1042
  }
690
1043
  };
691
1044
  }
692
- function gt({
1045
+ function Yt({
693
1046
  galleryRect: t,
694
1047
  detailRect: n,
695
- scrollOffset: s
1048
+ scrollOffset: r
696
1049
  }) {
697
- const d = n.left - t.left + (n.width - t.width) / 2 - s.x, r = n.top - t.top + (n.height - t.height) / 2 - s.y, a = n.width / t.width, l = n.height / t.height, i = Math.max(a, l);
1050
+ const p = n.left - t.left + (n.width - t.width) / 2 - r.x, a = n.top - t.top + (n.height - t.height) / 2 - r.y, o = n.width / t.width, d = n.height / t.height, s = Math.max(o, d);
698
1051
  return {
699
1052
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
700
- animate: (o) => {
701
- const e = 1 - o, p = o;
1053
+ animate: (e) => {
1054
+ const i = 1 - e, y = e;
702
1055
  return {
703
- transform: `translate(${d * e}px, ${r * e}px) scale(${1 + (i - 1) * e})`,
704
- opacity: `${p}`
1056
+ transform: `translate(${p * i}px, ${a * i}px) scale(${1 + (s - 1) * i})`,
1057
+ opacity: `${y}`
705
1058
  };
706
1059
  }
707
1060
  };
708
1061
  }
709
- function ut({
1062
+ function Vt({
710
1063
  detailRect: t,
711
1064
  galleryRect: n,
712
- pageRect: s,
713
- scrollOffset: d
1065
+ pageRect: r,
1066
+ scrollOffset: p
714
1067
  }) {
715
- const r = n.left - t.left + (n.width - t.width) / 2 + d.x, a = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, p = (s.height - (t.top + t.height)) / s.height * 100, y = t.left / s.width * 100;
1068
+ const a = n.left - t.left + (n.width - t.width) / 2 + p.x, o = n.top - t.top + (n.height - t.height) / 2 + p.y, d = n.width / t.width, s = n.height / t.height, c = Math.min(d, s), e = t.top / r.height * 100, i = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, h = t.left / r.width * 100;
716
1069
  return {
717
1070
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
718
- animate: (g) => {
719
- const u = 1 - g;
1071
+ animate: (l) => {
1072
+ const u = 1 - l;
720
1073
  return {
721
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
722
- transform: `translate(${r * u - d.x}px, ${a * u - d.y}px) scale(${1 + (c - 1) * u})`
1074
+ clipPath: `inset(${e * u}% ${i * u}% ${y * u}% ${h * u}%)`,
1075
+ transform: `translate(${a * u - p.x}px, ${o * u - p.y}px) scale(${1 + (c - 1) * u})`
723
1076
  };
724
1077
  }
725
1078
  };
726
1079
  }
727
- function ft(t, n, s) {
728
- const d = t.querySelector(
1080
+ function Ut(t, n, r) {
1081
+ const p = t.querySelector(
729
1082
  "[data-pinterest-detail-key]"
730
- ), r = n.querySelector(
1083
+ ), a = n.querySelector(
731
1084
  "[data-pinterest-detail-key]"
732
1085
  );
733
1086
  if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 || n.querySelectorAll("[data-pinterest-detail-key]").length > 1)
734
1087
  return null;
735
- let a = null, l = null, i = !1;
736
- if (!d && r) {
737
- l = r;
738
- const e = l.getAttribute("data-pinterest-detail-key");
739
- if (!e) return null;
740
- a = t.querySelector(
741
- `[data-pinterest-gallery-key="${e}"]`
742
- ), a && (i = !0);
743
- } else if (d && !r) {
744
- l = d;
745
- const e = l.getAttribute("data-pinterest-detail-key");
746
- if (!e) return null;
747
- a = n.querySelector(
748
- `[data-pinterest-gallery-key="${e}"]`
749
- ), a && (i = !1);
1088
+ let o = null, d = null, s = !1;
1089
+ if (!p && a) {
1090
+ d = a;
1091
+ const i = d.getAttribute("data-pinterest-detail-key");
1092
+ if (!i) return null;
1093
+ o = t.querySelector(
1094
+ `[data-pinterest-gallery-key="${i}"]`
1095
+ ), o && (s = !0);
1096
+ } else if (p && !a) {
1097
+ d = p;
1098
+ const i = d.getAttribute("data-pinterest-detail-key");
1099
+ if (!i) return null;
1100
+ o = n.querySelector(
1101
+ `[data-pinterest-gallery-key="${i}"]`
1102
+ ), o && (s = !1);
750
1103
  }
751
- if (!a || !l)
1104
+ if (!o || !d)
752
1105
  return null;
753
- const c = b(i ? t : n, a), o = b(i ? n : t, l);
754
- if (i) {
755
- const e = pt({
756
- detailRect: o,
1106
+ const c = x(s ? t : n, o), e = x(s ? n : t, d);
1107
+ if (s) {
1108
+ const i = Dt({
1109
+ detailRect: e,
757
1110
  galleryRect: c,
758
1111
  pageRect: n.getBoundingClientRect(),
759
- scrollOffset: s
760
- }), p = yt({
1112
+ scrollOffset: r
1113
+ }), y = Ft({
761
1114
  galleryRect: c,
762
- detailRect: o,
763
- scrollOffset: s
1115
+ detailRect: e,
1116
+ scrollOffset: r
764
1117
  });
765
- return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
766
- inAnimation: e.animate,
767
- outAnimation: p.animate
1118
+ return n.style.transformOrigin = i.transformOrigin, t.style.transformOrigin = y.transformOrigin, {
1119
+ inAnimation: i.animate,
1120
+ outAnimation: y.animate
768
1121
  };
769
1122
  } else {
770
- const e = gt({
1123
+ const i = Yt({
771
1124
  galleryRect: c,
772
- detailRect: o,
773
- scrollOffset: s
774
- }), p = ut({
775
- detailRect: o,
1125
+ detailRect: e,
1126
+ scrollOffset: r
1127
+ }), y = Vt({
1128
+ detailRect: e,
776
1129
  galleryRect: c,
777
1130
  pageRect: t.getBoundingClientRect(),
778
- scrollOffset: s
1131
+ scrollOffset: r
779
1132
  });
780
- return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
781
- inAnimation: e.animate,
782
- outAnimation: p.animate
1133
+ return n.style.transformOrigin = i.transformOrigin, t.style.transformOrigin = y.transformOrigin, {
1134
+ inAnimation: i.animate,
1135
+ outAnimation: y.animate
783
1136
  };
784
1137
  }
785
1138
  }
786
- const Yt = (t = {}) => {
787
- var i, c;
1139
+ const Kt = (t = {}) => {
1140
+ var s, c, e;
788
1141
  const n = {
789
- stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 30,
790
- damping: ((c = t.spring) == null ? void 0 : c.damping) ?? 10
791
- }, s = t.timeout ?? 300;
792
- let d = null, r = null, a = null, l = null;
1142
+ stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? v.stiffness,
1143
+ damping: ((c = t.spring) == null ? void 0 : c.damping) ?? v.damping,
1144
+ doubleSpring: ((e = t.spring) == null ? void 0 : e.doubleSpring) ?? v.doubleSpring
1145
+ }, r = t.timeout ?? 300;
1146
+ let p = null, a = null, o = null, d = null;
793
1147
  return {
794
- in: async (o, { scrollOffset: e }) => {
795
- const p = o;
796
- return !await new Promise((h) => {
797
- d ? h(!0) : (r = h, setTimeout(() => {
798
- r = null, h(!1);
799
- }, s));
800
- }) || !d ? (l == null || l(), l = null, d = null, {
1148
+ in: async (i, { scrollOffset: y }) => {
1149
+ const h = i;
1150
+ return !await new Promise((l) => {
1151
+ p ? l(!0) : (a = l, setTimeout(() => {
1152
+ a = null, l(!1);
1153
+ }, r));
1154
+ }) || !p ? (d == null || d(), d = null, p = null, {
801
1155
  spring: n,
802
1156
  css: () => ({})
803
- }) : (a = ft(d, p, e), l == null || l(), l = null, a ? (d = null, {
1157
+ }) : (o = Ut(p, h, y), d == null || d(), d = null, o ? (p = null, {
804
1158
  spring: n,
805
- css: (h) => a ? a.inAnimation(h) : {}
806
- }) : (d = null, {
1159
+ css: (l) => o ? o.inAnimation(l) : {}
1160
+ }) : (p = null, {
807
1161
  spring: n,
808
1162
  css: () => ({})
809
1163
  }));
810
1164
  },
811
- out: async (o) => {
812
- const e = new Promise((p) => {
813
- l = p;
1165
+ out: async (i) => {
1166
+ const y = new Promise((h) => {
1167
+ d = h;
814
1168
  });
815
1169
  return {
816
1170
  spring: n,
817
- prepare: (p) => {
818
- x(p), p.style.zIndex = "-1";
1171
+ prepare: (h) => {
1172
+ m(h), h.style.zIndex = "-1";
819
1173
  },
820
1174
  wait: async () => {
821
- d = o, r && (r(!0), r = null), await e;
1175
+ p = i, a && (a(!0), a = null), await y;
822
1176
  },
823
- css: (p) => a ? a.outAnimation(p) : {}
1177
+ css: (h) => o ? o.outAnimation(h) : {}
824
1178
  };
825
1179
  }
826
1180
  };
827
- }, I = { stiffness: 100, damping: 30 }, Ut = () => ({
1181
+ }, X = { stiffness: 100, damping: 30 }, Qt = () => ({
828
1182
  in: (t) => ({
829
- spring: I,
1183
+ spring: X,
830
1184
  prepare: () => {
831
1185
  t.style.opacity = "0", t.style.transform = "rotate(-180deg)", t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
832
1186
  },
@@ -840,264 +1194,303 @@ const Yt = (t = {}) => {
840
1194
  }
841
1195
  }),
842
1196
  out: (t, n) => ({
843
- spring: I,
1197
+ spring: X,
844
1198
  prepare: () => {
845
- x(t, n), t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
1199
+ m(t, n), t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
846
1200
  },
847
- css: (s) => ({
1201
+ css: (r) => ({
848
1202
  // 0deg → 180deg, hide after 90deg (progress < 0.5)
849
- transform: `rotate(${(1 - s) * 180}deg)`,
850
- opacity: s > 0.5 ? 1 : 0
1203
+ transform: `rotate(${(1 - r) * 180}deg)`,
1204
+ opacity: r > 0.5 ? 1 : 0
851
1205
  }),
852
1206
  onEnd: () => {
853
1207
  t.style.willChange = "auto";
854
1208
  }
855
1209
  })
856
- }), O = {
1210
+ }), z = {
857
1211
  stiffness: 5,
858
1212
  damping: 4
859
- }, Vt = (t = {}) => {
860
- var c, o;
861
- const n = t.direction ?? "up", s = {
862
- stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? O.stiffness,
863
- damping: ((o = t.spring) == null ? void 0 : o.damping) ?? O.damping
864
- }, d = n === "up";
865
- let r = null, a = null, l = null;
866
- const i = () => {
867
- if (r === null || a === null)
1213
+ }, Rt = (t = {}) => {
1214
+ var c, e;
1215
+ const n = t.direction ?? "up", r = {
1216
+ stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? z.stiffness,
1217
+ damping: ((e = t.spring) == null ? void 0 : e.damping) ?? z.damping
1218
+ }, p = n === "up";
1219
+ let a = null, o = null, d = null;
1220
+ const s = () => {
1221
+ if (a === null || o === null)
868
1222
  return null;
869
- const e = Math.min(r, a), p = window.innerHeight;
870
- return Math.max(e, p);
1223
+ const i = Math.min(a, o), y = window.innerHeight;
1224
+ return Math.max(i, y);
871
1225
  };
872
1226
  return {
873
- in: (e) => (a = e.offsetHeight, r !== null && (l = i()), {
874
- spring: s,
1227
+ in: (i) => (o = i.offsetHeight, a !== null && (d = s()), {
1228
+ spring: r,
875
1229
  prepare: () => {
876
- e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
1230
+ i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
877
1231
  },
878
- tick: (p) => {
879
- l === null && (l = i());
880
- const y = l ?? window.innerHeight, h = d ? (1 - p) * y : (1 - p) * -y;
881
- e.style.transform = `translate3d(0, ${h}px, 0)`;
1232
+ tick: (y) => {
1233
+ d === null && (d = s());
1234
+ const h = d ?? window.innerHeight, g = p ? (1 - y) * h : (1 - y) * -h;
1235
+ i.style.transform = `translate3d(0, ${g}px, 0)`;
882
1236
  },
883
1237
  onEnd: () => {
884
- e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "";
1238
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
885
1239
  }
886
1240
  }),
887
- out: (e, p) => ({
888
- spring: s,
1241
+ out: (i, y) => ({
1242
+ spring: r,
889
1243
  onStart: () => {
890
- r = e.offsetHeight, a !== null && (l = i());
1244
+ a = i.offsetHeight, o !== null && (d = s());
891
1245
  },
892
- tick: (y) => {
893
- l === null && (l = i());
894
- const h = l ?? window.innerHeight, g = d ? (1 - y) * -h : (1 - y) * h;
895
- e.style.transform = `translate3d(0, ${g}px, 0)`;
1246
+ tick: (h) => {
1247
+ d === null && (d = s());
1248
+ const g = d ?? window.innerHeight, l = p ? (1 - h) * -g : (1 - h) * g;
1249
+ i.style.transform = `translate3d(0, ${l}px, 0)`;
896
1250
  },
897
- prepare: (y) => {
898
- x(y, p), y.style.zIndex = d ? "-1" : "1", y.style.willChange = "transform", y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.pointerEvents = "none";
1251
+ prepare: (h) => {
1252
+ m(h, y), h.style.zIndex = p ? "-1" : "1", h.style.willChange = "transform", h.style.backfaceVisibility = "hidden", h.style.contain = "layout paint", h.style.pointerEvents = "none";
899
1253
  }
900
1254
  })
901
1255
  };
902
- }, D = {
903
- stiffness: 15,
904
- damping: 7
905
- }, Wt = (t = {}) => {
906
- var r, a;
907
- const n = t.direction ?? "left", s = {
908
- stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? D.stiffness,
909
- damping: ((a = t.spring) == null ? void 0 : a.damping) ?? D.damping
910
- }, d = n === "left";
1256
+ }, Xt = {
1257
+ stiffness: 140,
1258
+ damping: 15,
1259
+ doubleSpring: 0.5
1260
+ }, zt = {
1261
+ stiffness: 145,
1262
+ damping: 15,
1263
+ doubleSpring: 0.5
1264
+ };
1265
+ function T(t) {
1266
+ const n = x(document.body, t.positionedParent), r = t.scroll.y, p = window.innerHeight - n.top;
1267
+ return {
1268
+ top: r,
1269
+ left: 0,
1270
+ width: n.width,
1271
+ height: p
1272
+ };
1273
+ }
1274
+ const tn = (t = {}) => {
1275
+ var a, o, d;
1276
+ const { direction: n = "enter" } = t, r = n === "enter" ? Xt : zt, p = {
1277
+ stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? r.stiffness,
1278
+ damping: ((o = t.spring) == null ? void 0 : o.damping) ?? r.damping,
1279
+ doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? r.doubleSpring
1280
+ };
1281
+ return n === "enter" ? {
1282
+ // Entering sheet: slides up from bottom
1283
+ in: (s, c) => {
1284
+ const i = T(c).height;
1285
+ return {
1286
+ spring: p,
1287
+ prepare: () => {
1288
+ s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint";
1289
+ },
1290
+ css: (y) => ({
1291
+ transform: `translate3d(0, ${(1 - y) * i}px, 0)`
1292
+ }),
1293
+ onEnd: () => {
1294
+ s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
1295
+ }
1296
+ };
1297
+ },
1298
+ // Exiting background: scales down with fade
1299
+ out: (s, c) => {
1300
+ const e = T(c), i = e.left + e.width / 2, y = e.top + e.height / 2 + c.scrollOffset.y;
1301
+ return {
1302
+ spring: p,
1303
+ prepare: (h) => {
1304
+ m(h, c), h.style.zIndex = "-1", h.style.willChange = "transform, opacity", h.style.backfaceVisibility = "hidden", h.style.contain = "layout paint", h.style.pointerEvents = "none", h.style.transformOrigin = `${i}px ${y}px`;
1305
+ },
1306
+ css: (h) => ({
1307
+ transform: `scale(${0.8 + h * 0.2})`,
1308
+ opacity: h
1309
+ })
1310
+ };
1311
+ }
1312
+ } : {
1313
+ // Entering background: scales up with fade
1314
+ in: (s, c) => {
1315
+ const e = T(c), i = e.left + e.width / 2, y = e.top + e.height / 2;
1316
+ return {
1317
+ spring: p,
1318
+ prepare: () => {
1319
+ s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${i}px ${y}px`;
1320
+ },
1321
+ css: (h) => ({
1322
+ transform: `scale(${0.8 + h * 0.2})`,
1323
+ opacity: h
1324
+ }),
1325
+ onEnd: () => {
1326
+ s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "";
1327
+ }
1328
+ };
1329
+ },
1330
+ // Exiting sheet: slides down with high z-index
1331
+ out: (s, c) => {
1332
+ const i = T(c).height;
1333
+ return {
1334
+ spring: p,
1335
+ prepare: (y) => {
1336
+ m(y, c), y.style.zIndex = "100", y.style.willChange = "transform", y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.pointerEvents = "none";
1337
+ },
1338
+ css: (y) => ({
1339
+ transform: `translate3d(0, ${(1 - y) * i}px, 0)`
1340
+ })
1341
+ };
1342
+ }
1343
+ };
1344
+ }, I = {
1345
+ stiffness: 140,
1346
+ damping: 19,
1347
+ doubleSpring: 0.8
1348
+ }, nn = (t = {}) => {
1349
+ var a, o, d;
1350
+ const n = t.direction ?? "left", r = {
1351
+ stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? I.stiffness,
1352
+ damping: ((o = t.spring) == null ? void 0 : o.damping) ?? I.damping,
1353
+ doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? I.doubleSpring
1354
+ }, p = n === "left";
911
1355
  return {
912
- in: (l) => ({
913
- spring: s,
1356
+ in: (s) => ({
1357
+ spring: r,
914
1358
  prepare: () => {
915
- l.style.willChange = "transform", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint";
1359
+ s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint";
916
1360
  },
917
- css: (i) => ({
918
- transform: `translate3d(${d ? (1 - i) * 100 : (1 - i) * -100}%, 0, 0)`
1361
+ css: (c) => ({
1362
+ transform: `translate3d(${p ? (1 - c) * 100 : (1 - c) * -100}%, 0, 0)`
919
1363
  }),
920
1364
  onEnd: () => {
921
- l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "";
1365
+ s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
922
1366
  }
923
1367
  }),
924
- out: (l, i) => ({
925
- spring: s,
926
- css: (c) => ({
927
- transform: `translate3d(${d ? (1 - c) * -100 : (1 - c) * 100}%, 0, 0)`
1368
+ out: (s, c) => ({
1369
+ spring: r,
1370
+ css: (e) => ({
1371
+ transform: `translate3d(${p ? (1 - e) * -100 : (1 - e) * 100}%, 0, 0)`
928
1372
  }),
929
- prepare: (c) => {
930
- x(c, i), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint", c.style.pointerEvents = "none";
1373
+ prepare: (e) => {
1374
+ m(e, c), e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.pointerEvents = "none";
931
1375
  }
932
1376
  })
933
1377
  };
934
- }, P = { stiffness: 17, damping: 6 }, L = 20, C = 800, zt = () => {
1378
+ }, H = { stiffness: 17, damping: 6 }, _ = 20, O = 800, sn = () => {
935
1379
  let t, n = null;
936
1380
  return {
937
- in: (s) => ({
938
- spring: P,
1381
+ in: (r) => ({
1382
+ spring: H,
939
1383
  prepare: () => {
940
- s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transform = `perspective(${C}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`;
1384
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.transform = `perspective(${O}px) rotateY(${_}deg) translate3d(-100%, 0, 0)`;
941
1385
  },
942
1386
  wait: async () => {
943
1387
  t && await t;
944
1388
  },
945
- css: (d) => {
946
- const r = (1 - d) * L, a = -(1 - d) * 100;
1389
+ css: (p) => {
1390
+ const a = (1 - p) * _, o = -(1 - p) * 100;
947
1391
  return {
948
- transform: `perspective(${C}px) rotateY(${r}deg) translate3d(${a}%, 0, 0)`
1392
+ transform: `perspective(${O}px) rotateY(${a}deg) translate3d(${o}%, 0, 0)`
949
1393
  };
950
1394
  },
951
1395
  onEnd: () => {
952
- s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
1396
+ r.style.transform = "", r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "";
953
1397
  }
954
1398
  }),
955
- out: (s, d) => (t = new Promise((r) => {
956
- n = r;
1399
+ out: (r, p) => (t = new Promise((a) => {
1400
+ n = a;
957
1401
  }), {
958
- spring: P,
959
- prepare: (r) => {
960
- x(r, d), r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none", r.style.transform = `perspective(${C}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1402
+ spring: H,
1403
+ prepare: (a) => {
1404
+ m(a, p), a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none", a.style.transform = `perspective(${O}px) rotateY(0deg) translate3d(0%, 0, 0)`;
961
1405
  },
962
- css: (r) => {
963
- const a = 1 - r, l = a * L, i = a * 100;
1406
+ css: (a) => {
1407
+ const o = 1 - a, d = o * _, s = o * 100;
964
1408
  return {
965
- transform: `perspective(${C}px) rotateY(${-l}deg) translate3d(${i}%, 0, 0)`
1409
+ transform: `perspective(${O}px) rotateY(${-d}deg) translate3d(${s}%, 0, 0)`
966
1410
  };
967
1411
  },
968
1412
  onEnd: () => {
969
- n && n(), s.style.transform = "";
1413
+ n && n(), r.style.transform = "";
970
1414
  }
971
1415
  })
972
1416
  };
973
- }, $t = { stiffness: 1, damping: 1 }, mt = { stiffness: 20, damping: 25 }, wt = "#000000", xt = "circle", v = "CURTAIN_REVEAL_OVERLAY_ID", bt = {
974
- position: "fixed",
975
- inset: "0",
976
- width: "100vw",
977
- height: "100%",
978
- zIndex: "9999",
979
- display: "flex",
980
- alignItems: "center",
981
- justifyContent: "center",
982
- overflow: "hidden"
983
- }, Et = {
984
- position: "relative",
985
- display: "inline-block",
986
- height: "5.5rem",
987
- overflow: "hidden"
988
- }, Ct = {
989
- display: "flex",
990
- height: "100%",
991
- willChange: "transform",
992
- transition: "transform 0.3s ease"
993
- }, At = {
994
- display: "inline-flex",
995
- alignItems: "center",
996
- justifyContent: "center",
997
- whiteSpace: "nowrap",
998
- fontSize: "5.5rem",
999
- fontWeight: "900",
1000
- letterSpacing: "0.02em",
1001
- color: "#FFFFFF"
1002
- }, Lt = 0.4, A = 0.5, Tt = 0.2;
1003
- function kt(t, n) {
1004
- switch (t) {
1005
- case "circle":
1006
- return `circle(${n * 100}% at 50% 50%)`;
1007
- case "square":
1008
- return `inset(${(1 - n) * 50}% round ${10 * n}%)`;
1009
- case "triangle": {
1010
- const s = n * 100;
1011
- return `polygon(50% ${50 - s}%, ${50 - s}% ${50 + s}%, ${50 + s}% ${50 + s}%)`;
1012
- }
1013
- }
1417
+ }, D = {
1418
+ stiffness: 300,
1419
+ damping: 22,
1420
+ doubleSpring: 0.5
1421
+ }, N = 0.05;
1422
+ function Ht(t) {
1423
+ const n = x(document.body, t.positionedParent), r = t.scroll.y, p = window.innerHeight - n.top;
1424
+ return {
1425
+ top: r,
1426
+ left: 0,
1427
+ width: n.width,
1428
+ height: p
1429
+ };
1014
1430
  }
1015
- const St = (t) => t.reduce((n, s) => n + s, 0), Xt = (t = {}) => {
1016
- const {
1017
- background: n = wt,
1018
- texts: s = [],
1019
- shape: d = xt,
1020
- inSpring: r = mt,
1021
- outSpring: a = $t,
1022
- textStyle: l = {}
1023
- } = t;
1431
+ const en = (t = {}) => {
1432
+ var a, o, d;
1433
+ const n = {
1434
+ stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? D.stiffness,
1435
+ damping: ((o = t.spring) == null ? void 0 : o.damping) ?? D.damping,
1436
+ doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? D.doubleSpring
1437
+ };
1438
+ let { promise: r, resolve: p } = S();
1024
1439
  return {
1025
- out: (i, c) => {
1026
- const o = i.style.opacity;
1027
- return {
1028
- spring: a,
1029
- from: 1,
1030
- to: 0,
1031
- prepare: (e) => {
1032
- x(e, c), e.style.opacity = "1";
1033
- },
1034
- tick: (e) => {
1035
- const p = Math.max(0, e - Lt);
1036
- i.style.opacity = String(p);
1037
- },
1038
- onEnd: () => {
1039
- i.style.opacity = o;
1040
- }
1041
- };
1042
- },
1043
- in: (i) => {
1044
- let c = null, o = null, e = null;
1045
- const p = document.body.style.overflow, y = document.getElementById(
1046
- v
1047
- );
1048
- let h = [];
1049
- const g = () => {
1050
- c = document.createElement("div"), c.id = v, Object.assign(c.style, bt, { background: n }), document.body.appendChild(c), o = document.createElement("div"), Object.assign(o.style, Et), c.appendChild(o), e = document.createElement("div"), Object.assign(e.style, Ct), o.appendChild(e), s.forEach((u) => {
1051
- const m = document.createElement("div");
1052
- m.textContent = u, Object.assign(m.style, At, l), e.appendChild(m);
1053
- }), h = Array.from(e.children).map(
1054
- (u) => u.getBoundingClientRect().width
1055
- );
1056
- };
1440
+ // Entering page: scales up from small (0.95 → 1) with fade in
1441
+ in: (s, c) => {
1442
+ const e = Ht(c), i = e.left + e.width / 2, y = e.top + e.height / 2;
1057
1443
  return {
1058
- spring: r,
1059
- from: 0,
1060
- to: 1,
1444
+ spring: n,
1061
1445
  prepare: () => {
1062
- document.body.style.overflow = "hidden", i.style.opacity = "1", y == null || y.remove(), g(), c && o && (c.style.clipPath = "none", o.style.transform = "scale(1)");
1446
+ s.style.opacity = "0", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${i}px ${y}px`;
1063
1447
  },
1064
- tick: (u) => {
1065
- if (!(!c || !o || !e)) {
1066
- if (u <= A && s.length > 0) {
1067
- const m = u / A, f = Math.min(
1068
- Math.floor(m * s.length),
1069
- s.length - 1
1070
- ), w = h[f] ?? 0, $ = St(h.slice(0, f));
1071
- o.style.width = `${w}px`, e.style.transform = `translateX(-${$}px)`;
1072
- }
1073
- if (u > A) {
1074
- const f = 1 - Math.max(
1075
- 0,
1076
- Math.min(1, (u - A) / Tt)
1077
- );
1078
- c.style.clipPath = kt(d, f), o.style.transform = `scale(${f})`;
1079
- }
1448
+ wait: async () => {
1449
+ if (r) {
1450
+ await r;
1451
+ const h = S();
1452
+ r = h.promise, p = h.resolve;
1080
1453
  }
1081
1454
  },
1455
+ css: (h) => ({
1456
+ transform: `scale(${1 - N + h * N})`,
1457
+ opacity: h
1458
+ }),
1082
1459
  onEnd: () => {
1083
- c == null || c.remove(), c = o = e = null, document.body.style.overflow = p;
1460
+ s.style.opacity = "1", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "";
1084
1461
  }
1085
1462
  };
1086
- }
1463
+ },
1464
+ // Exiting page: fade out only (no scale)
1465
+ out: (s, c) => ({
1466
+ spring: n,
1467
+ prepare: (e) => {
1468
+ m(e, c), e.style.willChange = "opacity", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint", e.style.pointerEvents = "none";
1469
+ },
1470
+ css: (e) => ({
1471
+ opacity: e
1472
+ }),
1473
+ onEnd: () => {
1474
+ p && p();
1475
+ }
1476
+ })
1087
1477
  };
1088
1478
  };
1089
1479
  export {
1090
- It as blind,
1091
- Xt as curtainReveal,
1092
- Ot as drill,
1093
- Dt as fade,
1094
- Pt as film,
1095
- vt as hero,
1096
- Ft as instagram,
1097
- Ht as jaemin,
1098
- Yt as pinterest,
1099
- Ut as rotate,
1100
- Vt as scroll,
1101
- Wt as slide,
1102
- zt as strip
1480
+ Nt as blind,
1481
+ Wt as curtainReveal,
1482
+ Mt as depth,
1483
+ Gt as drill,
1484
+ Bt as fade,
1485
+ qt as film,
1486
+ jt as hero,
1487
+ Zt as instagram,
1488
+ Jt as jaemin,
1489
+ Kt as pinterest,
1490
+ Qt as rotate,
1491
+ Rt as scroll,
1492
+ tn as sheet,
1493
+ nn as slide,
1494
+ sn as strip,
1495
+ en as swap
1103
1496
  };