@ssgoi/core 3.1.3 → 3.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,19 +1,19 @@
1
- import { p as x, g as C } from "../jaemin-BWkrXq0V.js";
2
- import { a as Nt } from "../jaemin-BWkrXq0V.js";
3
- const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, j = 300, K = 10, Z = "horizontal", J = "#000000", It = (t = {}) => {
1
+ import { p as x, g as b } from "../jaemin-BWkrXq0V.js";
2
+ import { a as Xt } from "../jaemin-BWkrXq0V.js";
3
+ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damping: 25 }, H = { stiffness: 75, damping: 25 }, N = 300, q = 10, G = "horizontal", j = "#000000", St = (t = {}) => {
4
4
  const {
5
- inSpring: n = G,
6
- outSpring: s = q,
7
- transitionDelay: c = j,
8
- blindCount: r = K,
9
- direction: a = Z,
10
- blindColor: l = J
5
+ inSpring: n = H,
6
+ outSpring: a = B,
7
+ transitionDelay: d = N,
8
+ blindCount: r = q,
9
+ direction: s = G,
10
+ blindColor: l = j
11
11
  } = t;
12
- let i, d = null;
13
- const o = (e, h, p = "left") => {
12
+ let i, c = null;
13
+ const o = (e, h, u = "left") => {
14
14
  window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
15
- const g = document.createElement("div");
16
- g.className = "blind-container", g.style.cssText = `
15
+ const y = document.createElement("div");
16
+ y.className = "blind-container", y.style.cssText = `
17
17
  position: absolute;
18
18
  top: 0;
19
19
  left: 0;
@@ -23,55 +23,62 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
23
23
  z-index: 9999;
24
24
  overflow: hidden;
25
25
  `;
26
- const y = [];
27
- for (let f = 0; f < r; f++) {
28
- const $ = document.createElement("div");
29
- if (a === "horizontal") {
30
- const w = 100 / r, m = `calc(${w}% + 1px)`;
31
- $.style.cssText = `
26
+ const g = [];
27
+ for (let m = 0; m < r; m++) {
28
+ const f = document.createElement("div");
29
+ if (s === "horizontal") {
30
+ const w = 100 / r, $ = `calc(${w}% + 1px)`;
31
+ f.style.cssText = `
32
32
  position: absolute;
33
- top: ${w * f}%;
33
+ top: ${w * m}%;
34
34
  left: 0;
35
35
  width: 100%;
36
- height: ${m};
36
+ height: ${$};
37
37
  background: ${l};
38
38
  transform: scaleX(${h === "hidden" ? 0 : 1});
39
- transform-origin: ${p} center;
39
+ transform-origin: ${u} center;
40
40
  will-change: transform;
41
41
  `;
42
42
  } else {
43
- const w = 100 / r, m = `calc(${w}% + 1px)`;
44
- $.style.cssText = `
43
+ const w = 100 / r, $ = `calc(${w}% + 1px)`;
44
+ f.style.cssText = `
45
45
  position: absolute;
46
46
  top: 0;
47
- left: ${w * f}%;
48
- width: ${m};
47
+ left: ${w * m}%;
48
+ width: ${$};
49
49
  height: 100%;
50
50
  background: ${l};
51
51
  transform: scaleY(${h === "hidden" ? 0 : 1});
52
- transform-origin: ${p === "left" ? "top" : "bottom"} center;
52
+ transform-origin: ${u === "left" ? "top" : "bottom"} center;
53
53
  will-change: transform;
54
54
  `;
55
55
  }
56
- y.push($), g.appendChild($);
56
+ g.push(f), y.appendChild(f);
57
57
  }
58
- return e.appendChild(g), { container: g, blinds: y };
58
+ return e.appendChild(y), { container: y, blinds: g };
59
59
  };
60
60
  return {
61
61
  out: () => {
62
62
  let e = null;
63
- return i = new Promise((p) => {
64
- d = p;
65
- }), {
66
- springs: Array.from({ length: r }, (p, u) => ({
67
- spring: s,
63
+ i = new Promise((p) => {
64
+ c = p;
65
+ });
66
+ const h = (p) => {
67
+ const y = 1 - p;
68
+ return {
69
+ transform: s === "horizontal" ? `scaleX(${y})` : `scaleY(${y})`
70
+ };
71
+ };
72
+ return {
73
+ springs: Array.from({ length: r }, (p, y) => ({
74
+ spring: a,
68
75
  offset: 0.2,
69
- tick: (g) => {
70
- if (!e) return;
71
- const y = e.blinds[u];
72
- if (!y) return;
73
- const f = 1 - g;
74
- a === "horizontal" ? y.style.transform = `scaleX(${f})` : y.style.transform = `scaleY(${f})`;
76
+ css: {
77
+ // Use getter for lazy element access (evaluated after prepare)
78
+ get element() {
79
+ return e == null ? void 0 : e.blinds[y];
80
+ },
81
+ style: h
75
82
  }
76
83
  })),
77
84
  schedule: "stagger",
@@ -81,22 +88,28 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
81
88
  onStart: () => {
82
89
  },
83
90
  onEnd: () => {
84
- d && d();
91
+ c && c();
85
92
  }
86
93
  };
87
94
  },
88
95
  in: () => {
89
96
  let e = null;
97
+ const h = (p) => {
98
+ const y = 1 - p;
99
+ return {
100
+ transform: s === "horizontal" ? `scaleX(${y})` : `scaleY(${y})`
101
+ };
102
+ };
90
103
  return {
91
- springs: Array.from({ length: r }, (p, u) => ({
104
+ springs: Array.from({ length: r }, (p, y) => ({
92
105
  spring: n,
93
106
  offset: 0.2,
94
- tick: (g) => {
95
- if (!e) return;
96
- const y = e.blinds[u];
97
- if (!y) return;
98
- const f = 1 - g;
99
- a === "horizontal" ? y.style.transform = `scaleX(${f})` : y.style.transform = `scaleY(${f})`;
107
+ css: {
108
+ // Use getter for lazy element access (evaluated after prepare)
109
+ get element() {
110
+ return e == null ? void 0 : e.blinds[y];
111
+ },
112
+ style: h
100
113
  }
101
114
  })),
102
115
  schedule: "stagger",
@@ -106,7 +119,7 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
106
119
  onStart: () => {
107
120
  },
108
121
  wait: async () => {
109
- i && await i, await Y(c);
122
+ i && await i, await P(d);
110
123
  },
111
124
  onEnd: () => {
112
125
  e && e.container && e.container.remove();
@@ -114,38 +127,38 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
114
127
  };
115
128
  }
116
129
  };
117
- }, Q = {
130
+ }, K = {
118
131
  stiffness: 150,
119
132
  damping: 20
120
- }, R = {
133
+ }, Z = {
121
134
  stiffness: 100,
122
135
  damping: 20
123
- }, Ot = (t = {}) => {
124
- var a, l;
125
- const { opacity: n = !1, direction: s = "enter" } = t, c = s === "enter" ? Q : R, r = {
126
- stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? c.stiffness,
127
- damping: ((l = t.spring) == null ? void 0 : l.damping) ?? c.damping
136
+ }, _t = (t = {}) => {
137
+ var s, l;
138
+ const { opacity: n = !1, direction: a = "enter" } = t, d = a === "enter" ? K : Z, r = {
139
+ stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? d.stiffness,
140
+ damping: ((l = t.spring) == null ? void 0 : l.damping) ?? d.damping
128
141
  };
129
- return s === "enter" ? {
142
+ return a === "enter" ? {
130
143
  in: (i) => ({
131
144
  spring: r,
132
145
  prepare: () => {
133
146
  i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
134
147
  },
135
- css: (d) => {
148
+ css: (c) => {
136
149
  const o = {
137
- transform: `translate3d(${(1 - d) * 100}%, 0, 0)`
150
+ transform: `translate3d(${(1 - c) * 100}%, 0, 0)`
138
151
  };
139
- return n && (o.opacity = d), o;
152
+ return n && (o.opacity = c), o;
140
153
  },
141
154
  onEnd: () => {
142
155
  i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
143
156
  }
144
157
  }),
145
- out: (i, d) => ({
158
+ out: (i, c) => ({
146
159
  spring: r,
147
160
  prepare: (o) => {
148
- x(o, d), o.style.zIndex = "-1", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
161
+ x(o, c), o.style.zIndex = "-1", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
149
162
  },
150
163
  css: (o) => {
151
164
  const e = {
@@ -160,20 +173,20 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
160
173
  prepare: () => {
161
174
  i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
162
175
  },
163
- css: (d) => {
176
+ css: (c) => {
164
177
  const o = {
165
- transform: `translate3d(${-(1 - d) * 20}%, 0, 0)`
178
+ transform: `translate3d(${-(1 - c) * 20}%, 0, 0)`
166
179
  };
167
- return n && (o.opacity = d), o;
180
+ return n && (o.opacity = c), o;
168
181
  },
169
182
  onEnd: () => {
170
183
  i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
171
184
  }
172
185
  }),
173
- out: (i, d) => ({
186
+ out: (i, c) => ({
174
187
  spring: r,
175
188
  prepare: (o) => {
176
- x(o, d), o.style.zIndex = "100", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
189
+ x(o, c), o.style.zIndex = "100", o.style.willChange = n ? "transform, opacity" : "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
177
190
  },
178
191
  css: (o) => {
179
192
  const e = {
@@ -183,13 +196,13 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
183
196
  }
184
197
  })
185
198
  };
186
- }, tt = { stiffness: 65, damping: 16 }, nt = { stiffness: 65, damping: 14 }, et = 0, Dt = (t = {}) => {
199
+ }, J = { stiffness: 65, damping: 16 }, Q = { stiffness: 65, damping: 14 }, R = 0, It = (t = {}) => {
187
200
  const {
188
- inSpring: n = nt,
189
- outSpring: s = tt,
190
- transitionDelay: c = et
201
+ inSpring: n = Q,
202
+ outSpring: a = J,
203
+ transitionDelay: d = R
191
204
  } = t;
192
- let r, a = null;
205
+ let r, s = null;
193
206
  return {
194
207
  in: (l) => ({
195
208
  spring: n,
@@ -197,7 +210,7 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
197
210
  l.style.willChange = "opacity";
198
211
  },
199
212
  wait: async () => {
200
- r && (await r, await Y(c));
213
+ r && (await r, await P(d));
201
214
  },
202
215
  css: (i) => ({
203
216
  opacity: i
@@ -206,172 +219,180 @@ const Y = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damp
206
219
  l.style.willChange = "auto";
207
220
  }
208
221
  }),
209
- out: (l, i) => (r = new Promise((d) => {
210
- a = d;
222
+ out: (l, i) => (r = new Promise((c) => {
223
+ s = c;
211
224
  }), {
212
- spring: s,
213
- css: (d) => ({
214
- opacity: d
225
+ spring: a,
226
+ css: (c) => ({
227
+ opacity: c
215
228
  }),
216
229
  prepare: () => {
217
230
  x(l, i), l.style.willChange = "opacity";
218
231
  },
219
232
  onEnd: () => {
220
- a && a(), l.style.willChange = "auto";
233
+ s && s(), l.style.willChange = "auto";
221
234
  }
222
235
  })
223
236
  };
224
- }, it = {
225
- stiffness: 5,
226
- // Lower stiffness for smoother motion
227
- damping: 3.5
228
- // Lower damping for more fluid movement
229
- }, st = 0.8, at = "white", b = {
230
- start: 0,
231
- end: 0.45
237
+ }, tt = {
238
+ scaleDown: { stiffness: 20, damping: 7 },
239
+ // Soft start for cinematic scale
240
+ translate: { stiffness: 15, damping: 7 },
241
+ // Medium for movement
242
+ scaleUp: { stiffness: 20, damping: 7 }
243
+ // Crisp return to full size
232
244
  }, E = {
233
- start: 0.85,
234
- end: 1
235
- }, A = {
236
- start: 0.2,
237
- end: 0.9
238
- }, vt = (t) => {
245
+ scaleDown: 0,
246
+ // Start immediately
247
+ translate: 0.2,
248
+ // Start when scaleDown is 25% complete
249
+ scaleUp: 0.8
250
+ // Start when translate is 70% complete
251
+ }, nt = 0.8, et = "white", Ot = (t) => {
239
252
  var r;
240
- const n = (t == null ? void 0 : t.spring) ?? it, s = (t == null ? void 0 : t.scale) ?? st, c = ((r = t == null ? void 0 : t.border) == null ? void 0 : r.color) ?? at;
253
+ const n = tt, a = nt, d = ((r = t == null ? void 0 : t.border) == null ? void 0 : r.color) ?? et;
241
254
  return {
242
- out: async (a, l) => {
243
- const i = _(l), d = C(document.body, l.positionedParent), o = lt(c, {
255
+ out: async (s, l) => {
256
+ const i = T(l), c = b(document.body, l.positionedParent), o = st(d, {
244
257
  ...i,
245
- top: d.top
246
- });
247
- let e = 1, h = -i.top;
258
+ top: c.top
259
+ }), e = {
260
+ scale: 1,
261
+ translateY: -i.top
262
+ }, h = () => {
263
+ s.style.transform = `translateY(${e.translateY}px) scale(${e.scale})`;
264
+ const u = (i.width - i.width * e.scale) / 2, p = (i.height - i.height * e.scale) / 2;
265
+ it(o, u, p);
266
+ };
248
267
  return {
249
- spring: n,
268
+ springs: [
269
+ // Spring 1: Scale Down (1 → scale)
270
+ {
271
+ spring: n.scaleDown,
272
+ offset: E.scaleDown,
273
+ tick: (u) => {
274
+ const p = 1 - u;
275
+ e.scale = 1 - (1 - a) * p, h();
276
+ }
277
+ },
278
+ // Spring 2: Translate (vertical movement)
279
+ {
280
+ spring: n.translate,
281
+ offset: E.translate,
282
+ tick: (u) => {
283
+ const p = 1 - u;
284
+ e.translateY = -i.top - i.height * p, h();
285
+ }
286
+ },
287
+ // Spring 3: Scale Up (scale → 1)
288
+ {
289
+ spring: n.scaleUp,
290
+ offset: E.scaleUp,
291
+ tick: (u) => {
292
+ const p = 1 - u;
293
+ e.scale = a + (1 - a) * p, h();
294
+ }
295
+ }
296
+ ],
297
+ schedule: "stagger",
250
298
  prepare: () => {
251
- x(a), P(a, i), I(a, i), ot(a, i);
252
- for (const p of o)
253
- l.positionedParent.appendChild(p);
299
+ x(s), k(s, i), S(s, i), at(s, i);
300
+ for (const u of o)
301
+ l.positionedParent.appendChild(u);
254
302
  },
255
303
  onEnd: () => {
256
- a.style.clipPath = "", a.style.transformOrigin = "", setTimeout(() => {
257
- for (const p of o)
258
- l.positionedParent.removeChild(p);
304
+ s.style.clipPath = "", s.style.transformOrigin = "", setTimeout(() => {
305
+ for (const u of o)
306
+ l.positionedParent.removeChild(u);
259
307
  }, 1e3);
260
- },
261
- tick: (p) => {
262
- const u = 1 - p;
263
- if (b.start <= u && u <= b.end) {
264
- const f = L(
265
- u,
266
- b.start,
267
- b.end
268
- );
269
- e = 1 - (1 - s) * f;
270
- }
271
- if (E.start <= u && u <= E.end) {
272
- const f = L(
273
- u,
274
- E.start,
275
- E.end
276
- );
277
- e = s + (1 - s) * f;
278
- }
279
- if (A.start <= u && u <= A.end) {
280
- const f = L(
281
- u,
282
- A.start,
283
- A.end
284
- );
285
- h = -i.top - i.height * f;
286
- }
287
- a.style.transform = `translateY(${h}px) scale(${e})`;
288
- const g = (i.width - i.width * e) / 2, y = (i.height - i.height * e) / 2;
289
- rt(o, g, y);
290
308
  }
291
309
  };
292
310
  },
293
- in: async (a, l) => {
294
- const i = _(l);
295
- let d = s, o = -i.top + i.height;
311
+ in: async (s, l) => {
312
+ const i = T(l), c = {
313
+ scale: a,
314
+ translateY: -i.top + i.height
315
+ }, o = () => {
316
+ s.style.transform = `translateY(${c.translateY}px) scale(${c.scale})`;
317
+ };
296
318
  return {
297
- spring: n,
319
+ springs: [
320
+ // Spring 1: Scale Down (1 → scale) - element starts scaled, shrinks further
321
+ {
322
+ spring: n.scaleDown,
323
+ offset: E.scaleDown,
324
+ tick: (e) => {
325
+ c.scale = 1 - (1 - a) * e, o();
326
+ }
327
+ },
328
+ // Spring 2: Translate (vertical movement from bottom to top)
329
+ {
330
+ spring: n.translate,
331
+ offset: E.translate,
332
+ tick: (e) => {
333
+ c.translateY = -i.top + i.height * (1 - e), o();
334
+ }
335
+ },
336
+ // Spring 3: Scale Up (scale → 1) - element returns to full size
337
+ {
338
+ spring: n.scaleUp,
339
+ offset: E.scaleUp,
340
+ tick: (e) => {
341
+ c.scale = a + (1 - a) * e, o();
342
+ }
343
+ }
344
+ ],
345
+ schedule: "stagger",
298
346
  prepare: () => {
299
- P(a, i), I(a, i), a.style.transform = `translateY(${-i.top + i.height}px) scale(${s})`;
347
+ k(s, i), S(s, i), s.style.transform = `translateY(${-i.top + i.height}px) scale(${a})`;
300
348
  },
301
349
  onEnd: () => {
302
- a.style.clipPath = "", a.style.transformOrigin = "", a.style.transform = "";
303
- },
304
- tick: (e) => {
305
- if (b.start <= e && e <= b.end) {
306
- const h = L(
307
- e,
308
- b.start,
309
- b.end
310
- );
311
- d = 1 - (1 - s) * h;
312
- }
313
- if (E.start <= e && e <= E.end) {
314
- const h = L(
315
- e,
316
- E.start,
317
- E.end
318
- );
319
- d = s + (1 - s) * h;
320
- }
321
- if (A.start <= e && e <= A.end) {
322
- const h = L(
323
- e,
324
- A.start,
325
- A.end
326
- );
327
- o = -i.top + i.height * (1 - h);
328
- }
329
- a.style.transform = `translateY(${o}px) scale(${d})`;
350
+ s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
330
351
  }
331
352
  };
332
353
  }
333
354
  };
334
355
  };
335
- function rt(t, n, s) {
336
- const c = n * 0.7, r = s * 0.7;
337
- t.topLeft.style.transform = `translate(${c}px, ${r}px)`, t.topRight.style.transform = `translate(${-c}px, ${r}px)`, t.bottomLeft.style.transform = `translate(${c}px, ${-r}px)`, t.bottomRight.style.transform = `translate(${-c}px, ${-r}px)`;
356
+ function it(t, n, a) {
357
+ const d = n * 0.7, r = a * 0.7;
358
+ t.topLeft.style.transform = `translate(${d}px, ${r}px)`, t.topRight.style.transform = `translate(${-d}px, ${r}px)`, t.bottomLeft.style.transform = `translate(${d}px, ${-r}px)`, t.bottomRight.style.transform = `translate(${-d}px, ${-r}px)`;
338
359
  }
339
- function lt(t = "white", n) {
360
+ function st(t = "white", n) {
340
361
  const r = document.createElement("div");
341
362
  r.style.position = "fixed", r.style.pointerEvents = "none", r.style.zIndex = "9999", r.style.top = `${n.top - 1}px`, r.style.left = `${n.left - 1}px`, r.style.width = "15px", r.style.height = "15px";
342
- const a = document.createElement("div");
343
- a.style.position = "absolute", a.style.width = "15px", a.style.height = "1px", a.style.backgroundColor = t, a.style.top = "0", a.style.left = "0";
363
+ const s = document.createElement("div");
364
+ s.style.position = "absolute", s.style.width = "15px", s.style.height = "1px", s.style.backgroundColor = t, s.style.top = "0", s.style.left = "0";
344
365
  const l = document.createElement("div");
345
- l.style.position = "absolute", l.style.width = "1px", l.style.height = "15px", l.style.backgroundColor = t, l.style.top = "0", l.style.left = "0", r.appendChild(a), r.appendChild(l);
366
+ l.style.position = "absolute", l.style.width = "1px", l.style.height = "15px", l.style.backgroundColor = t, l.style.top = "0", l.style.left = "0", r.appendChild(s), r.appendChild(l);
346
367
  const i = document.createElement("div");
347
368
  i.style.position = "fixed", i.style.pointerEvents = "none", i.style.zIndex = "9999", i.style.top = `${n.top - 1}px`, i.style.left = `${n.left + n.width - 15 + 1}px`, i.style.width = "15px", i.style.height = "15px";
348
- const d = document.createElement("div");
349
- d.style.position = "absolute", d.style.width = "15px", d.style.height = "1px", d.style.backgroundColor = t, d.style.top = "0", d.style.right = "0";
369
+ const c = document.createElement("div");
370
+ c.style.position = "absolute", c.style.width = "15px", c.style.height = "1px", c.style.backgroundColor = t, c.style.top = "0", c.style.right = "0";
350
371
  const o = document.createElement("div");
351
- o.style.position = "absolute", o.style.width = "1px", o.style.height = "15px", o.style.backgroundColor = t, o.style.top = "0", o.style.right = "0", i.appendChild(d), i.appendChild(o);
372
+ o.style.position = "absolute", o.style.width = "1px", o.style.height = "15px", o.style.backgroundColor = t, o.style.top = "0", o.style.right = "0", i.appendChild(c), i.appendChild(o);
352
373
  const e = document.createElement("div");
353
374
  e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${n.top + n.height - 15 + 1}px`, e.style.left = `${n.left - 1}px`, e.style.width = "15px", e.style.height = "15px";
354
375
  const h = document.createElement("div");
355
376
  h.style.position = "absolute", h.style.width = "15px", h.style.height = "1px", h.style.backgroundColor = t, h.style.bottom = "0", h.style.left = "0";
356
- const p = document.createElement("div");
357
- p.style.position = "absolute", p.style.width = "1px", p.style.height = "15px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.left = "0", e.appendChild(h), e.appendChild(p);
358
377
  const u = document.createElement("div");
359
- 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";
360
- const g = document.createElement("div");
361
- g.style.position = "absolute", g.style.width = "15px", g.style.height = "1px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.right = "0";
378
+ u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.left = "0", e.appendChild(h), e.appendChild(u);
379
+ const p = document.createElement("div");
380
+ p.style.position = "fixed", p.style.pointerEvents = "none", p.style.zIndex = "9999", p.style.top = `${n.top + n.height - 15 + 1}px`, p.style.left = `${n.left + n.width - 15 + 1}px`, p.style.width = "15px", p.style.height = "15px";
362
381
  const y = document.createElement("div");
363
- return y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.right = "0", u.appendChild(g), u.appendChild(y), {
382
+ y.style.position = "absolute", y.style.width = "15px", y.style.height = "1px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.right = "0";
383
+ const g = document.createElement("div");
384
+ return g.style.position = "absolute", g.style.width = "1px", g.style.height = "15px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.right = "0", p.appendChild(y), p.appendChild(g), {
364
385
  topLeft: r,
365
386
  topRight: i,
366
387
  bottomLeft: e,
367
- bottomRight: u,
388
+ bottomRight: p,
368
389
  *[Symbol.iterator]() {
369
- yield r, yield i, yield e, yield u;
390
+ yield r, yield i, yield e, yield p;
370
391
  }
371
392
  };
372
393
  }
373
- function _(t) {
374
- const n = C(document.body, t.positionedParent);
394
+ function T(t) {
395
+ const n = b(document.body, t.positionedParent);
375
396
  return {
376
397
  top: t.scroll.y,
377
398
  left: 0,
@@ -379,11 +400,11 @@ function _(t) {
379
400
  height: window.innerHeight - n.top
380
401
  };
381
402
  }
382
- function P(t, n) {
383
- const s = n.left + n.width / 2, c = n.top + n.height / 2;
384
- t.style.transformOrigin = `${s}px ${c}px`;
403
+ function k(t, n) {
404
+ const a = n.left + n.width / 2, d = n.top + n.height / 2;
405
+ t.style.transformOrigin = `${a}px ${d}px`;
385
406
  }
386
- function I(t, n) {
407
+ function S(t, n) {
387
408
  t.style.clipPath = `polygon(
388
409
  ${n.left}px ${n.top}px,
389
410
  ${n.left + n.width}px ${n.top}px,
@@ -391,25 +412,22 @@ function I(t, n) {
391
412
  ${n.left}px ${n.top + n.height}px
392
413
  )`;
393
414
  }
394
- function ot(t, n) {
415
+ function at(t, n) {
395
416
  t.style.transform = `translateY(${-n.top}px)`;
396
417
  }
397
- function L(t, n, s) {
398
- return t <= n ? 0 : t >= s ? 1 : (t - n) / (s - n);
399
- }
400
- function dt(t, n) {
418
+ function rt(t, n) {
401
419
  return t.querySelector(`[data-hero-key="${n}"]`);
402
420
  }
403
- const Ft = (t = {}) => {
421
+ const Dt = (t = {}) => {
404
422
  var l, i;
405
423
  const n = {
406
424
  stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? 300,
407
425
  damping: ((i = t.spring) == null ? void 0 : i.damping) ?? 30
408
- }, s = t.timeout ?? 300, c = t.maxDistance ?? 700;
409
- let r = null, a = null;
426
+ }, a = t.timeout ?? 300, d = t.maxDistance ?? 700;
427
+ let r = null, s = null;
410
428
  return {
411
- in: async (d, o) => {
412
- const e = d, h = Array.from(e.querySelectorAll("[data-hero-key]"));
429
+ in: async (c, o) => {
430
+ const e = c, h = Array.from(e.querySelectorAll("[data-hero-key]"));
413
431
  if (h.length === 0)
414
432
  return {
415
433
  spring: n,
@@ -417,10 +435,10 @@ const Ft = (t = {}) => {
417
435
  }
418
436
  // No hero elements, skip animation
419
437
  };
420
- if (!await new Promise((g) => {
421
- r ? g(!0) : (a = g, setTimeout(() => {
422
- a = null, g(!1);
423
- }, s));
438
+ if (!await new Promise((y) => {
439
+ r ? y(!0) : (s = y, setTimeout(() => {
440
+ s = null, y(!1);
441
+ }, a));
424
442
  }) || !r)
425
443
  return r = null, {
426
444
  spring: n,
@@ -428,65 +446,65 @@ const Ft = (t = {}) => {
428
446
  }
429
447
  // No fromNode, skip animation
430
448
  };
431
- const u = h.map((g) => {
432
- const y = g.getAttribute("data-hero-key");
433
- if (!y) return null;
434
- const f = dt(r, y);
435
- if (!f) return null;
436
- const $ = g, w = C(r, f), m = C(e, $), U = w.left - m.left - o.scrollOffset.x, V = w.top - m.top - o.scrollOffset.y, W = w.width / m.width, z = w.height / m.height, X = $.style.transform, M = $.style.position, B = $.style.transformOrigin, N = $.style.zIndex, H = $.style.willChange;
449
+ const p = h.map((y) => {
450
+ const g = y.getAttribute("data-hero-key");
451
+ if (!g) return null;
452
+ const m = rt(r, g);
453
+ if (!m) return null;
454
+ const f = y, w = b(r, m), $ = b(e, f), v = w.left - $.left - o.scrollOffset.x, F = w.top - $.top - o.scrollOffset.y, Y = w.width / $.width, U = w.height / $.height, V = f.style.transform, W = f.style.position, z = f.style.transformOrigin, X = f.style.zIndex, M = f.style.willChange;
437
455
  return {
438
- toEl: $,
439
- dx: U,
440
- dy: V,
441
- dw: W,
442
- dh: z,
443
- originalTransform: X,
444
- originalPosition: M,
445
- originalTransformOrigin: B,
446
- originalZIndex: N,
447
- originalWillChange: H
456
+ toEl: f,
457
+ dx: v,
458
+ dy: F,
459
+ dw: Y,
460
+ dh: U,
461
+ originalTransform: V,
462
+ originalPosition: W,
463
+ originalTransformOrigin: z,
464
+ originalZIndex: X,
465
+ originalWillChange: M
448
466
  };
449
467
  }).filter(
450
- (g) => g !== null && Math.abs(g.dy) <= c
468
+ (y) => y !== null && Math.abs(y.dy) <= d
451
469
  );
452
- return r = null, u.length === 0 ? {
470
+ return r = null, p.length === 0 ? {
453
471
  spring: n,
454
472
  tick: () => {
455
473
  }
456
474
  // No matching hero elements
457
475
  } : {
458
- springs: u.map(({ toEl: g, dx: y, dy: f, dw: $, dh: w }) => ({
476
+ springs: p.map(({ toEl: y, dx: g, dy: m, dw: f, dh: w }) => ({
459
477
  spring: n,
460
- tick: (m) => {
461
- g.style.transform = `translate(${(1 - m) * y}px, ${(1 - m) * f}px) scale(${m + (1 - m) * $}, ${m + (1 - m) * w})`;
478
+ tick: ($) => {
479
+ y.style.transform = `translate(${(1 - $) * g}px, ${(1 - $) * m}px) scale(${$ + (1 - $) * f}, ${$ + (1 - $) * w})`;
462
480
  }
463
481
  })),
464
482
  schedule: "parallel",
465
483
  prepare: () => {
466
- u.forEach(({ toEl: g }) => {
467
- g.style.position = "relative", g.style.transformOrigin = "top left", g.style.zIndex = "1000", g.style.willChange = "transform";
484
+ p.forEach(({ toEl: y }) => {
485
+ y.style.position = "relative", y.style.transformOrigin = "top left", y.style.zIndex = "1000", y.style.willChange = "transform";
468
486
  });
469
487
  },
470
488
  onEnd: () => {
471
- u.forEach(
489
+ p.forEach(
472
490
  ({
473
- toEl: g,
474
- originalTransform: y,
475
- originalPosition: f,
476
- originalTransformOrigin: $,
491
+ toEl: y,
492
+ originalTransform: g,
493
+ originalPosition: m,
494
+ originalTransformOrigin: f,
477
495
  originalZIndex: w,
478
- originalWillChange: m
496
+ originalWillChange: $
479
497
  }) => {
480
- g.style.transform = y, g.style.position = f, g.style.transformOrigin = $, g.style.zIndex = w, g.style.willChange = m;
498
+ y.style.transform = g, y.style.position = m, y.style.transformOrigin = f, y.style.zIndex = w, y.style.willChange = $;
481
499
  }
482
500
  );
483
501
  }
484
502
  };
485
503
  },
486
- out: async (d) => ({
504
+ out: async (c) => ({
487
505
  spring: n,
488
506
  onStart: () => {
489
- r = d, a && (a(!0), a = null);
507
+ r = c, s && (s(!0), s = null);
490
508
  },
491
509
  tick: () => {
492
510
  },
@@ -496,75 +514,75 @@ const Ft = (t = {}) => {
496
514
  })
497
515
  };
498
516
  };
499
- function ct({
517
+ function lt({
500
518
  detailRect: t,
501
519
  galleryRect: n,
502
- pageRect: s,
503
- scrollOffset: c
520
+ pageRect: a,
521
+ scrollOffset: d
504
522
  }) {
505
- const r = n.left - t.left + (n.width - t.width) / 2 - c.x, a = n.top - t.top + (n.height - t.height) / 2 - c.y, l = n.width / t.width, i = n.height / t.height, d = Math.max(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, h = (s.height - (t.top + t.height)) / s.height * 100, p = t.left / s.width * 100;
523
+ const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
506
524
  return {
507
525
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
508
- animate: (g) => {
509
- const y = 1 - g;
526
+ animate: (y) => {
527
+ const g = 1 - y;
510
528
  return {
511
- clipPath: `inset(${o * y}% ${e * y}% ${h * y}% ${p * y}%)`,
512
- transform: `translate(${r * y}px, ${a * y}px) scale(${1 + (d - 1) * y})`
529
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
530
+ transform: `translate(${r * g}px, ${s * g}px) scale(${1 + (c - 1) * g})`
513
531
  };
514
532
  }
515
533
  };
516
534
  }
517
- function ht({
535
+ function ot({
518
536
  detailRect: t,
519
537
  galleryRect: n,
520
- pageRect: s,
521
- scrollOffset: c
538
+ pageRect: a,
539
+ scrollOffset: d
522
540
  }) {
523
- const r = n.left - t.left + (n.width - t.width) / 2 + c.x, a = n.top - t.top + (n.height - t.height) / 2 + c.y, l = n.width / t.width, i = n.height / t.height, d = Math.min(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, h = (s.height - (t.top + t.height)) / s.height * 100, p = t.left / s.width * 100;
541
+ const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
524
542
  return {
525
543
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
526
- animate: (g) => {
527
- const y = 1 - g;
544
+ animate: (y) => {
545
+ const g = 1 - y;
528
546
  return {
529
- clipPath: `inset(${o * y}% ${e * y}% ${h * y}% ${p * y}%)`,
530
- transform: `translate(${r * y - c.x}px, ${a * y - c.y}px) scale(${1 + (d - 1) * y})`
547
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
548
+ transform: `translate(${r * g - d.x}px, ${s * g - d.y}px) scale(${1 + (c - 1) * g})`
531
549
  };
532
550
  }
533
551
  };
534
552
  }
535
- function yt(t, n, s) {
536
- const c = t.querySelector(
553
+ function ct(t, n, a) {
554
+ const d = t.querySelector(
537
555
  "[data-instagram-detail-key]"
538
556
  ), r = n.querySelector(
539
557
  "[data-instagram-detail-key]"
540
558
  );
541
559
  if (t.querySelectorAll("[data-instagram-detail-key]").length > 1 || n.querySelectorAll("[data-instagram-detail-key]").length > 1)
542
560
  return null;
543
- let a = null, l = null, i = !1;
544
- if (!c && r) {
561
+ let s = null, l = null, i = !1;
562
+ if (!d && r) {
545
563
  l = r;
546
564
  const e = l.getAttribute("data-instagram-detail-key");
547
565
  if (!e) return null;
548
- a = t.querySelector(
566
+ s = t.querySelector(
549
567
  `[data-instagram-gallery-key="${e}"]`
550
- ), a && (i = !0);
551
- } else if (c && !r) {
552
- l = c;
568
+ ), s && (i = !0);
569
+ } else if (d && !r) {
570
+ l = d;
553
571
  const e = l.getAttribute("data-instagram-detail-key");
554
572
  if (!e) return null;
555
- a = n.querySelector(
573
+ s = n.querySelector(
556
574
  `[data-instagram-gallery-key="${e}"]`
557
- ), a && (i = !1);
575
+ ), s && (i = !1);
558
576
  }
559
- if (!a || !l)
577
+ if (!s || !l)
560
578
  return null;
561
- const d = C(i ? t : n, a), o = C(i ? n : t, l);
579
+ const c = b(i ? t : n, s), o = b(i ? n : t, l);
562
580
  if (i) {
563
- const e = ct({
581
+ const e = lt({
564
582
  detailRect: o,
565
- galleryRect: d,
583
+ galleryRect: c,
566
584
  pageRect: n.getBoundingClientRect(),
567
- scrollOffset: s
585
+ scrollOffset: a
568
586
  });
569
587
  return n.style.transformOrigin = e.transformOrigin, {
570
588
  isEnterMode: !0,
@@ -572,11 +590,11 @@ function yt(t, n, s) {
572
590
  // No outAnimation - gallery stays visible
573
591
  };
574
592
  } else {
575
- const e = ht({
593
+ const e = ot({
576
594
  detailRect: o,
577
- galleryRect: d,
595
+ galleryRect: c,
578
596
  pageRect: t.getBoundingClientRect(),
579
- scrollOffset: s
597
+ scrollOffset: a
580
598
  });
581
599
  return t.style.transformOrigin = e.transformOrigin, {
582
600
  isEnterMode: !1,
@@ -585,27 +603,27 @@ function yt(t, n, s) {
585
603
  };
586
604
  }
587
605
  }
588
- const Yt = (t = {}) => {
589
- var i, d;
606
+ const Pt = (t = {}) => {
607
+ var i, c;
590
608
  const n = {
591
609
  stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 150,
592
- damping: ((d = t.spring) == null ? void 0 : d.damping) ?? 20
593
- }, s = t.timeout ?? 300;
594
- let c = null, r = null, a = null, l = null;
610
+ damping: ((c = t.spring) == null ? void 0 : c.damping) ?? 20
611
+ }, a = t.timeout ?? 300;
612
+ let d = null, r = null, s = null, l = null;
595
613
  return {
596
614
  in: async (o, { scrollOffset: e }) => {
597
615
  const h = o;
598
- return !await new Promise((u) => {
599
- c ? u(!0) : (r = u, setTimeout(() => {
600
- r = null, u(!1);
601
- }, s));
602
- }) || !c ? (l == null || l(), l = null, c = null, {
616
+ return !await new Promise((p) => {
617
+ d ? p(!0) : (r = p, setTimeout(() => {
618
+ r = null, p(!1);
619
+ }, a));
620
+ }) || !d ? (l == null || l(), l = null, d = null, {
603
621
  spring: n,
604
622
  css: () => ({})
605
- }) : (a = yt(c, h, e), l == null || l(), l = null, a ? (c = null, {
623
+ }) : (s = ct(d, h, e), l == null || l(), l = null, s ? (d = null, {
606
624
  spring: n,
607
- css: (u) => a != null && a.inAnimation ? a.inAnimation(u) : {}
608
- }) : (c = null, {
625
+ css: (p) => s != null && s.inAnimation ? s.inAnimation(p) : {}
626
+ }) : (d = null, {
609
627
  spring: n,
610
628
  css: () => ({})
611
629
  }));
@@ -617,138 +635,138 @@ const Yt = (t = {}) => {
617
635
  return {
618
636
  spring: n,
619
637
  prepare: (h) => {
620
- x(h), a != null && a.isEnterMode || (h.style.zIndex = "-1");
638
+ x(h), s != null && s.isEnterMode || (h.style.zIndex = "-1");
621
639
  },
622
640
  wait: async () => {
623
- c = o, r && (r(!0), r = null), await e;
641
+ d = o, r && (r(!0), r = null), await e;
624
642
  },
625
- css: (h) => a != null && a.outAnimation ? a.outAnimation(h) : {}
643
+ css: (h) => s != null && s.outAnimation ? s.outAnimation(h) : {}
626
644
  };
627
645
  }
628
646
  };
629
647
  };
630
- function pt({
648
+ function dt({
631
649
  detailRect: t,
632
650
  galleryRect: n,
633
- pageRect: s,
634
- scrollOffset: c
651
+ pageRect: a,
652
+ scrollOffset: d
635
653
  }) {
636
- const r = n.left - t.left + (n.width - t.width) / 2 - c.x, a = n.top - t.top + (n.height - t.height) / 2 - c.y, l = n.width / t.width, i = n.height / t.height, d = Math.max(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, h = (s.height - (t.top + t.height)) / s.height * 100, p = t.left / s.width * 100;
654
+ const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
637
655
  return {
638
656
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
639
- animate: (g) => {
640
- const y = 1 - g;
657
+ animate: (y) => {
658
+ const g = 1 - y;
641
659
  return {
642
- clipPath: `inset(${o * y}% ${e * y}% ${h * y}% ${p * y}%)`,
643
- transform: `translate(${r * y}px, ${a * y}px) scale(${1 + (d - 1) * y})`
660
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
661
+ transform: `translate(${r * g}px, ${s * g}px) scale(${1 + (c - 1) * g})`
644
662
  };
645
663
  }
646
664
  };
647
665
  }
648
- function ut({
666
+ function ht({
649
667
  galleryRect: t,
650
668
  detailRect: n,
651
- scrollOffset: s
669
+ scrollOffset: a
652
670
  }) {
653
- const c = n.left - t.left + (n.width - t.width) / 2 + s.x, r = n.top - t.top + (n.height - t.height) / 2 + s.y, a = n.width / t.width, l = n.height / t.height, i = Math.max(a, l);
671
+ const d = n.left - t.left + (n.width - t.width) / 2 + a.x, r = n.top - t.top + (n.height - t.height) / 2 + a.y, s = n.width / t.width, l = n.height / t.height, i = Math.max(s, l);
654
672
  return {
655
673
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
656
674
  animate: (o) => {
657
675
  const e = 1 - o;
658
676
  return {
659
- transform: `translate(${c * e - s.x}px, ${r * e - s.y}px) scale(${1 + (i - 1) * e})`,
677
+ transform: `translate(${d * e - a.x}px, ${r * e - a.y}px) scale(${1 + (i - 1) * e})`,
660
678
  opacity: `${1 - e}`
661
679
  };
662
680
  }
663
681
  };
664
682
  }
665
- function gt({
683
+ function pt({
666
684
  galleryRect: t,
667
685
  detailRect: n,
668
- scrollOffset: s
686
+ scrollOffset: a
669
687
  }) {
670
- const c = n.left - t.left + (n.width - t.width) / 2 - s.x, r = n.top - t.top + (n.height - t.height) / 2 - s.y, a = n.width / t.width, l = n.height / t.height, i = Math.max(a, l);
688
+ const d = n.left - t.left + (n.width - t.width) / 2 - a.x, r = n.top - t.top + (n.height - t.height) / 2 - a.y, s = n.width / t.width, l = n.height / t.height, i = Math.max(s, l);
671
689
  return {
672
690
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
673
691
  animate: (o) => {
674
692
  const e = 1 - o, h = o;
675
693
  return {
676
- transform: `translate(${c * e}px, ${r * e}px) scale(${1 + (i - 1) * e})`,
694
+ transform: `translate(${d * e}px, ${r * e}px) scale(${1 + (i - 1) * e})`,
677
695
  opacity: `${h}`
678
696
  };
679
697
  }
680
698
  };
681
699
  }
682
- function ft({
700
+ function yt({
683
701
  detailRect: t,
684
702
  galleryRect: n,
685
- pageRect: s,
686
- scrollOffset: c
703
+ pageRect: a,
704
+ scrollOffset: d
687
705
  }) {
688
- const r = n.left - t.left + (n.width - t.width) / 2 + c.x, a = n.top - t.top + (n.height - t.height) / 2 + c.y, l = n.width / t.width, i = n.height / t.height, d = Math.min(l, i), o = t.top / s.height * 100, e = (s.width - (t.left + t.width)) / s.width * 100, h = (s.height - (t.top + t.height)) / s.height * 100, p = t.left / s.width * 100;
706
+ const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
689
707
  return {
690
708
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
691
- animate: (g) => {
692
- const y = 1 - g;
709
+ animate: (y) => {
710
+ const g = 1 - y;
693
711
  return {
694
- clipPath: `inset(${o * y}% ${e * y}% ${h * y}% ${p * y}%)`,
695
- transform: `translate(${r * y - c.x}px, ${a * y - c.y}px) scale(${1 + (d - 1) * y})`
712
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
713
+ transform: `translate(${r * g - d.x}px, ${s * g - d.y}px) scale(${1 + (c - 1) * g})`
696
714
  };
697
715
  }
698
716
  };
699
717
  }
700
- function $t(t, n, s) {
701
- const c = t.querySelector(
718
+ function gt(t, n, a) {
719
+ const d = t.querySelector(
702
720
  "[data-pinterest-detail-key]"
703
721
  ), r = n.querySelector(
704
722
  "[data-pinterest-detail-key]"
705
723
  );
706
724
  if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 || n.querySelectorAll("[data-pinterest-detail-key]").length > 1)
707
725
  return null;
708
- let a = null, l = null, i = !1;
709
- if (!c && r) {
726
+ let s = null, l = null, i = !1;
727
+ if (!d && r) {
710
728
  l = r;
711
729
  const e = l.getAttribute("data-pinterest-detail-key");
712
730
  if (!e) return null;
713
- a = t.querySelector(
731
+ s = t.querySelector(
714
732
  `[data-pinterest-gallery-key="${e}"]`
715
- ), a && (i = !0);
716
- } else if (c && !r) {
717
- l = c;
733
+ ), s && (i = !0);
734
+ } else if (d && !r) {
735
+ l = d;
718
736
  const e = l.getAttribute("data-pinterest-detail-key");
719
737
  if (!e) return null;
720
- a = n.querySelector(
738
+ s = n.querySelector(
721
739
  `[data-pinterest-gallery-key="${e}"]`
722
- ), a && (i = !1);
740
+ ), s && (i = !1);
723
741
  }
724
- if (!a || !l)
742
+ if (!s || !l)
725
743
  return null;
726
- const d = C(i ? t : n, a), o = C(i ? n : t, l);
744
+ const c = b(i ? t : n, s), o = b(i ? n : t, l);
727
745
  if (i) {
728
- const e = pt({
746
+ const e = dt({
729
747
  detailRect: o,
730
- galleryRect: d,
748
+ galleryRect: c,
731
749
  pageRect: n.getBoundingClientRect(),
732
- scrollOffset: s
733
- }), h = ut({
734
- galleryRect: d,
750
+ scrollOffset: a
751
+ }), h = ht({
752
+ galleryRect: c,
735
753
  detailRect: o,
736
- scrollOffset: s
754
+ scrollOffset: a
737
755
  });
738
756
  return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = h.transformOrigin, {
739
757
  inAnimation: e.animate,
740
758
  outAnimation: h.animate
741
759
  };
742
760
  } else {
743
- const e = gt({
744
- galleryRect: d,
761
+ const e = pt({
762
+ galleryRect: c,
745
763
  detailRect: o,
746
- scrollOffset: s
747
- }), h = ft({
764
+ scrollOffset: a
765
+ }), h = yt({
748
766
  detailRect: o,
749
- galleryRect: d,
767
+ galleryRect: c,
750
768
  pageRect: t.getBoundingClientRect(),
751
- scrollOffset: s
769
+ scrollOffset: a
752
770
  });
753
771
  return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = h.transformOrigin, {
754
772
  inAnimation: e.animate,
@@ -756,27 +774,27 @@ function $t(t, n, s) {
756
774
  };
757
775
  }
758
776
  }
759
- const Ut = (t = {}) => {
760
- var i, d;
777
+ const vt = (t = {}) => {
778
+ var i, c;
761
779
  const n = {
762
780
  stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 30,
763
- damping: ((d = t.spring) == null ? void 0 : d.damping) ?? 10
764
- }, s = t.timeout ?? 300;
765
- let c = null, r = null, a = null, l = null;
781
+ damping: ((c = t.spring) == null ? void 0 : c.damping) ?? 10
782
+ }, a = t.timeout ?? 300;
783
+ let d = null, r = null, s = null, l = null;
766
784
  return {
767
785
  in: async (o, { scrollOffset: e }) => {
768
786
  const h = o;
769
- return !await new Promise((u) => {
770
- c ? u(!0) : (r = u, setTimeout(() => {
771
- r = null, u(!1);
772
- }, s));
773
- }) || !c ? (l == null || l(), l = null, c = null, {
787
+ return !await new Promise((p) => {
788
+ d ? p(!0) : (r = p, setTimeout(() => {
789
+ r = null, p(!1);
790
+ }, a));
791
+ }) || !d ? (l == null || l(), l = null, d = null, {
774
792
  spring: n,
775
793
  css: () => ({})
776
- }) : (a = $t(c, h, e), l == null || l(), l = null, a ? (c = null, {
794
+ }) : (s = gt(d, h, e), l == null || l(), l = null, s ? (d = null, {
777
795
  spring: n,
778
- css: (u) => a ? a.inAnimation(u) : {}
779
- }) : (c = null, {
796
+ css: (p) => s ? s.inAnimation(p) : {}
797
+ }) : (d = null, {
780
798
  spring: n,
781
799
  css: () => ({})
782
800
  }));
@@ -791,130 +809,130 @@ const Ut = (t = {}) => {
791
809
  x(h), h.style.zIndex = "-1";
792
810
  },
793
811
  wait: async () => {
794
- c = o, r && (r(!0), r = null), await e;
812
+ d = o, r && (r(!0), r = null), await e;
795
813
  },
796
- css: (h) => a ? a.outAnimation(h) : {}
814
+ css: (h) => s ? s.outAnimation(h) : {}
797
815
  };
798
816
  }
799
817
  };
800
- }, O = {
818
+ }, _ = {
801
819
  stiffness: 5,
802
820
  damping: 4
803
- }, Vt = (t = {}) => {
804
- var d, o;
805
- const n = t.direction ?? "up", s = {
806
- stiffness: ((d = t.spring) == null ? void 0 : d.stiffness) ?? O.stiffness,
807
- damping: ((o = t.spring) == null ? void 0 : o.damping) ?? O.damping
808
- }, c = n === "up";
809
- let r = null, a = null, l = null;
821
+ }, Ft = (t = {}) => {
822
+ var c, o;
823
+ const n = t.direction ?? "up", a = {
824
+ stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? _.stiffness,
825
+ damping: ((o = t.spring) == null ? void 0 : o.damping) ?? _.damping
826
+ }, d = n === "up";
827
+ let r = null, s = null, l = null;
810
828
  const i = () => {
811
- if (r === null || a === null)
829
+ if (r === null || s === null)
812
830
  return null;
813
- const e = Math.min(r, a), h = window.innerHeight;
831
+ const e = Math.min(r, s), h = window.innerHeight;
814
832
  return Math.max(e, h);
815
833
  };
816
834
  return {
817
- in: (e) => (a = e.offsetHeight, r !== null && (l = i()), {
818
- spring: s,
835
+ in: (e) => (s = e.offsetHeight, r !== null && (l = i()), {
836
+ spring: a,
819
837
  prepare: () => {
820
838
  e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
821
839
  },
822
840
  tick: (h) => {
823
841
  l === null && (l = i());
824
- const p = l ?? window.innerHeight, u = c ? (1 - h) * p : (1 - h) * -p;
825
- e.style.transform = `translate3d(0, ${u}px, 0)`;
842
+ const u = l ?? window.innerHeight, p = d ? (1 - h) * u : (1 - h) * -u;
843
+ e.style.transform = `translate3d(0, ${p}px, 0)`;
826
844
  },
827
845
  onEnd: () => {
828
846
  e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "";
829
847
  }
830
848
  }),
831
849
  out: (e, h) => ({
832
- spring: s,
850
+ spring: a,
833
851
  onStart: () => {
834
- r = e.offsetHeight, a !== null && (l = i());
852
+ r = e.offsetHeight, s !== null && (l = i());
835
853
  },
836
- tick: (p) => {
854
+ tick: (u) => {
837
855
  l === null && (l = i());
838
- const u = l ?? window.innerHeight, g = c ? (1 - p) * -u : (1 - p) * u;
839
- e.style.transform = `translate3d(0, ${g}px, 0)`;
856
+ const p = l ?? window.innerHeight, y = d ? (1 - u) * -p : (1 - u) * p;
857
+ e.style.transform = `translate3d(0, ${y}px, 0)`;
840
858
  },
841
- prepare: (p) => {
842
- x(p, h), p.style.zIndex = c ? "-1" : "1", p.style.willChange = "transform", p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", p.style.pointerEvents = "none";
859
+ prepare: (u) => {
860
+ x(u, h), u.style.zIndex = d ? "-1" : "1", u.style.willChange = "transform", u.style.backfaceVisibility = "hidden", u.style.contain = "layout paint", u.style.pointerEvents = "none";
843
861
  }
844
862
  })
845
863
  };
846
- }, D = {
864
+ }, I = {
847
865
  stiffness: 15,
848
866
  damping: 7
849
- }, Wt = (t = {}) => {
850
- var r, a;
851
- const n = t.direction ?? "left", s = {
852
- stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? D.stiffness,
853
- damping: ((a = t.spring) == null ? void 0 : a.damping) ?? D.damping
854
- }, c = n === "left";
867
+ }, Yt = (t = {}) => {
868
+ var r, s;
869
+ const n = t.direction ?? "left", a = {
870
+ stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? I.stiffness,
871
+ damping: ((s = t.spring) == null ? void 0 : s.damping) ?? I.damping
872
+ }, d = n === "left";
855
873
  return {
856
874
  in: (l) => ({
857
- spring: s,
875
+ spring: a,
858
876
  prepare: () => {
859
877
  l.style.willChange = "transform", l.style.backfaceVisibility = "hidden", l.style.contain = "layout paint";
860
878
  },
861
879
  css: (i) => ({
862
- transform: `translate3d(${c ? (1 - i) * 100 : (1 - i) * -100}%, 0, 0)`
880
+ transform: `translate3d(${d ? (1 - i) * 100 : (1 - i) * -100}%, 0, 0)`
863
881
  }),
864
882
  onEnd: () => {
865
883
  l.style.willChange = "auto", l.style.backfaceVisibility = "", l.style.contain = "";
866
884
  }
867
885
  }),
868
886
  out: (l, i) => ({
869
- spring: s,
870
- css: (d) => ({
871
- transform: `translate3d(${c ? (1 - d) * -100 : (1 - d) * 100}%, 0, 0)`
887
+ spring: a,
888
+ css: (c) => ({
889
+ transform: `translate3d(${d ? (1 - c) * -100 : (1 - c) * 100}%, 0, 0)`
872
890
  }),
873
- prepare: (d) => {
874
- x(d, i), d.style.willChange = "transform", d.style.backfaceVisibility = "hidden", d.style.contain = "layout paint", d.style.pointerEvents = "none";
891
+ prepare: (c) => {
892
+ x(c, i), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint", c.style.pointerEvents = "none";
875
893
  }
876
894
  })
877
895
  };
878
- }, v = { stiffness: 17, damping: 6 }, S = 20, T = 800, zt = () => {
896
+ }, O = { stiffness: 17, damping: 6 }, L = 20, C = 800, Ut = () => {
879
897
  let t, n = null;
880
898
  return {
881
- in: (s) => ({
882
- spring: v,
899
+ in: (a) => ({
900
+ spring: O,
883
901
  prepare: () => {
884
- s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transform = `perspective(${T}px) rotateY(${S}deg) translate3d(-100%, 0, 0)`;
902
+ a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.transform = `perspective(${C}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`;
885
903
  },
886
904
  wait: async () => {
887
905
  t && await t;
888
906
  },
889
- css: (c) => {
890
- const r = (1 - c) * S, a = -(1 - c) * 100;
907
+ css: (d) => {
908
+ const r = (1 - d) * L, s = -(1 - d) * 100;
891
909
  return {
892
- transform: `perspective(${T}px) rotateY(${r}deg) translate3d(${a}%, 0, 0)`
910
+ transform: `perspective(${C}px) rotateY(${r}deg) translate3d(${s}%, 0, 0)`
893
911
  };
894
912
  },
895
913
  onEnd: () => {
896
- s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
914
+ a.style.transform = "", a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "";
897
915
  }
898
916
  }),
899
- out: (s, c) => (t = new Promise((r) => {
917
+ out: (a, d) => (t = new Promise((r) => {
900
918
  n = r;
901
919
  }), {
902
- spring: v,
920
+ spring: O,
903
921
  prepare: (r) => {
904
- x(r, c), r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none", r.style.transform = `perspective(${T}px) rotateY(0deg) translate3d(0%, 0, 0)`;
922
+ x(r, d), r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none", r.style.transform = `perspective(${C}px) rotateY(0deg) translate3d(0%, 0, 0)`;
905
923
  },
906
924
  css: (r) => {
907
- const a = 1 - r, l = a * S, i = a * 100;
925
+ const s = 1 - r, l = s * L, i = s * 100;
908
926
  return {
909
- transform: `perspective(${T}px) rotateY(${-l}deg) translate3d(${i}%, 0, 0)`
927
+ transform: `perspective(${C}px) rotateY(${-l}deg) translate3d(${i}%, 0, 0)`
910
928
  };
911
929
  },
912
930
  onEnd: () => {
913
- n && n(), s.style.transform = "";
931
+ n && n(), a.style.transform = "";
914
932
  }
915
933
  })
916
934
  };
917
- }, mt = { stiffness: 1, damping: 1 }, wt = { stiffness: 20, damping: 25 }, xt = "#000000", bt = "circle", F = "CURTAIN_REVEAL_OVERLAY_ID", Et = {
935
+ }, ut = { stiffness: 1, damping: 1 }, ft = { stiffness: 20, damping: 25 }, $t = "#000000", mt = "circle", D = "CURTAIN_REVEAL_OVERLAY_ID", wt = {
918
936
  position: "fixed",
919
937
  inset: "0",
920
938
  width: "100vw",
@@ -924,17 +942,17 @@ const Ut = (t = {}) => {
924
942
  alignItems: "center",
925
943
  justifyContent: "center",
926
944
  overflow: "hidden"
927
- }, At = {
945
+ }, xt = {
928
946
  position: "relative",
929
947
  display: "inline-block",
930
948
  height: "5.5rem",
931
949
  overflow: "hidden"
932
- }, Ct = {
950
+ }, bt = {
933
951
  display: "flex",
934
952
  height: "100%",
935
953
  willChange: "transform",
936
954
  transition: "transform 0.3s ease"
937
- }, Lt = {
955
+ }, Et = {
938
956
  display: "inline-flex",
939
957
  alignItems: "center",
940
958
  justifyContent: "center",
@@ -943,40 +961,40 @@ const Ut = (t = {}) => {
943
961
  fontWeight: "900",
944
962
  letterSpacing: "0.02em",
945
963
  color: "#FFFFFF"
946
- }, Tt = 0.4, k = 0.5, kt = 0.2;
947
- function St(t, n) {
964
+ }, Ct = 0.4, A = 0.5, At = 0.2;
965
+ function Lt(t, n) {
948
966
  switch (t) {
949
967
  case "circle":
950
968
  return `circle(${n * 100}% at 50% 50%)`;
951
969
  case "square":
952
970
  return `inset(${(1 - n) * 50}% round ${10 * n}%)`;
953
971
  case "triangle": {
954
- const s = n * 100;
955
- return `polygon(50% ${50 - s}%, ${50 - s}% ${50 + s}%, ${50 + s}% ${50 + s}%)`;
972
+ const a = n * 100;
973
+ return `polygon(50% ${50 - a}%, ${50 - a}% ${50 + a}%, ${50 + a}% ${50 + a}%)`;
956
974
  }
957
975
  }
958
976
  }
959
- const _t = (t) => t.reduce((n, s) => n + s, 0), Xt = (t = {}) => {
977
+ const Tt = (t) => t.reduce((n, a) => n + a, 0), Vt = (t = {}) => {
960
978
  const {
961
- background: n = xt,
962
- texts: s = [],
963
- shape: c = bt,
964
- inSpring: r = wt,
965
- outSpring: a = mt,
979
+ background: n = $t,
980
+ texts: a = [],
981
+ shape: d = mt,
982
+ inSpring: r = ft,
983
+ outSpring: s = ut,
966
984
  textStyle: l = {}
967
985
  } = t;
968
986
  return {
969
- out: (i, d) => {
987
+ out: (i, c) => {
970
988
  const o = i.style.opacity;
971
989
  return {
972
- spring: a,
990
+ spring: s,
973
991
  from: 1,
974
992
  to: 0,
975
993
  prepare: (e) => {
976
- x(e, d), e.style.opacity = "1";
994
+ x(e, c), e.style.opacity = "1";
977
995
  },
978
996
  tick: (e) => {
979
- const h = Math.max(0, e - Tt);
997
+ const h = Math.max(0, e - Ct);
980
998
  i.style.opacity = String(h);
981
999
  },
982
1000
  onEnd: () => {
@@ -985,17 +1003,17 @@ const _t = (t) => t.reduce((n, s) => n + s, 0), Xt = (t = {}) => {
985
1003
  };
986
1004
  },
987
1005
  in: (i) => {
988
- let d = null, o = null, e = null;
989
- const h = document.body.style.overflow, p = document.getElementById(
990
- F
1006
+ let c = null, o = null, e = null;
1007
+ const h = document.body.style.overflow, u = document.getElementById(
1008
+ D
991
1009
  );
992
- let u = [];
993
- const g = () => {
994
- d = document.createElement("div"), d.id = F, Object.assign(d.style, Et, { background: n }), document.body.appendChild(d), o = document.createElement("div"), Object.assign(o.style, At), d.appendChild(o), e = document.createElement("div"), Object.assign(e.style, Ct), o.appendChild(e), s.forEach((y) => {
995
- const f = document.createElement("div");
996
- f.textContent = y, Object.assign(f.style, Lt, l), e.appendChild(f);
997
- }), u = Array.from(e.children).map(
998
- (y) => y.getBoundingClientRect().width
1010
+ let p = [];
1011
+ const y = () => {
1012
+ c = document.createElement("div"), c.id = D, Object.assign(c.style, wt, { background: n }), document.body.appendChild(c), o = document.createElement("div"), Object.assign(o.style, xt), c.appendChild(o), e = document.createElement("div"), Object.assign(e.style, bt), o.appendChild(e), a.forEach((g) => {
1013
+ const m = document.createElement("div");
1014
+ m.textContent = g, Object.assign(m.style, Et, l), e.appendChild(m);
1015
+ }), p = Array.from(e.children).map(
1016
+ (g) => g.getBoundingClientRect().width
999
1017
  );
1000
1018
  };
1001
1019
  return {
@@ -1003,44 +1021,44 @@ const _t = (t) => t.reduce((n, s) => n + s, 0), Xt = (t = {}) => {
1003
1021
  from: 0,
1004
1022
  to: 1,
1005
1023
  prepare: () => {
1006
- document.body.style.overflow = "hidden", i.style.opacity = "1", p == null || p.remove(), g(), d && o && (d.style.clipPath = "none", o.style.transform = "scale(1)");
1024
+ document.body.style.overflow = "hidden", i.style.opacity = "1", u == null || u.remove(), y(), c && o && (c.style.clipPath = "none", o.style.transform = "scale(1)");
1007
1025
  },
1008
- tick: (y) => {
1009
- if (!(!d || !o || !e)) {
1010
- if (y <= k && s.length > 0) {
1011
- const f = y / k, $ = Math.min(
1012
- Math.floor(f * s.length),
1013
- s.length - 1
1014
- ), w = u[$] ?? 0, m = _t(u.slice(0, $));
1015
- o.style.width = `${w}px`, e.style.transform = `translateX(-${m}px)`;
1026
+ tick: (g) => {
1027
+ if (!(!c || !o || !e)) {
1028
+ if (g <= A && a.length > 0) {
1029
+ const m = g / A, f = Math.min(
1030
+ Math.floor(m * a.length),
1031
+ a.length - 1
1032
+ ), w = p[f] ?? 0, $ = Tt(p.slice(0, f));
1033
+ o.style.width = `${w}px`, e.style.transform = `translateX(-${$}px)`;
1016
1034
  }
1017
- if (y > k) {
1018
- const $ = 1 - Math.max(
1035
+ if (g > A) {
1036
+ const f = 1 - Math.max(
1019
1037
  0,
1020
- Math.min(1, (y - k) / kt)
1038
+ Math.min(1, (g - A) / At)
1021
1039
  );
1022
- d.style.clipPath = St(c, $), o.style.transform = `scale(${$})`;
1040
+ c.style.clipPath = Lt(d, f), o.style.transform = `scale(${f})`;
1023
1041
  }
1024
1042
  }
1025
1043
  },
1026
1044
  onEnd: () => {
1027
- d == null || d.remove(), d = o = e = null, document.body.style.overflow = h;
1045
+ c == null || c.remove(), c = o = e = null, document.body.style.overflow = h;
1028
1046
  }
1029
1047
  };
1030
1048
  }
1031
1049
  };
1032
1050
  };
1033
1051
  export {
1034
- It as blind,
1035
- Xt as curtainReveal,
1036
- Ot as drill,
1037
- Dt as fade,
1038
- vt as film,
1039
- Ft as hero,
1040
- Yt as instagram,
1041
- Nt as jaemin,
1042
- Ut as pinterest,
1043
- Vt as scroll,
1044
- Wt as slide,
1045
- zt as strip
1052
+ St as blind,
1053
+ Vt as curtainReveal,
1054
+ _t as drill,
1055
+ It as fade,
1056
+ Ot as film,
1057
+ Dt as hero,
1058
+ Pt as instagram,
1059
+ Xt as jaemin,
1060
+ vt as pinterest,
1061
+ Ft as scroll,
1062
+ Yt as slide,
1063
+ Ut as strip
1046
1064
  };