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