@ssgoi/core 2.3.0 → 2.4.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,23 +1,23 @@
1
- const D = (t) => {
2
- t.style.position = "absolute", t.style.width = "100%", t.style.top = "0", t.style.left = "0";
3
- }, N = (t) => new Promise((n) => setTimeout(n, t)), C = { stiffness: 80, damping: 25 }, v = { stiffness: 75, damping: 25 }, G = 300, q = 10, B = "horizontal", M = "#000000", st = (t = {}) => {
1
+ const W = (t) => new Promise((n) => setTimeout(n, t)), m = (t, n) => {
2
+ t.style.position = "absolute", t.style.width = "100%", t.style.top = `${-1 * ((n == null ? void 0 : n.scroll.y) ?? 0)}px`, t.style.left = "0";
3
+ }, H = { stiffness: 80, damping: 25 }, X = { stiffness: 75, damping: 25 }, U = 300, N = 10, M = "horizontal", B = "#000000", rt = (t = {}) => {
4
4
  const {
5
- inSpring: n = v,
6
- outSpring: e = C,
7
- transitionDelay: i = G,
8
- blindCount: l = q,
9
- direction: a = B,
10
- staggerDelay: r = 100,
11
- blindColor: s = M
5
+ inSpring: n = X,
6
+ outSpring: l = H,
7
+ transitionDelay: h = U,
8
+ blindCount: o = N,
9
+ direction: i = M,
10
+ staggerDelay: s = 100,
11
+ blindColor: e = B
12
12
  } = t;
13
- let o, h = null;
14
- const d = (p, c, f, u = !1) => {
15
- const y = Math.min(0.5, r * f / 1e3), g = 1 - y, x = (u ? f - 1 - c : c) / f * y, S = x + g;
16
- return p <= x ? 0 : p >= S ? 1 : (p - x) / g;
17
- }, $ = (p, c, f = "left") => {
13
+ let r, d = null;
14
+ const c = (p, a, g, y = !1) => {
15
+ const f = Math.min(0.5, s * g / 1e3), $ = 1 - f, x = (y ? g - 1 - a : a) / g * f, w = x + $;
16
+ return p <= x ? 0 : p >= w ? 1 : (p - x) / $;
17
+ }, u = (p, a, g = "left") => {
18
18
  window.getComputedStyle(p).position === "static" && (p.style.position = "relative");
19
- const y = document.createElement("div");
20
- y.className = "blind-container", y.style.cssText = `
19
+ const f = document.createElement("div");
20
+ f.className = "blind-container", f.style.cssText = `
21
21
  position: absolute;
22
22
  top: 0;
23
23
  left: 0;
@@ -27,68 +27,68 @@ const D = (t) => {
27
27
  z-index: 9999;
28
28
  overflow: hidden;
29
29
  `;
30
- const g = [];
31
- for (let w = 0; w < l; w++) {
30
+ const $ = [];
31
+ for (let b = 0; b < o; b++) {
32
32
  const x = document.createElement("div");
33
- if (a === "horizontal") {
34
- const S = 100 / l, A = `calc(${S}% + 1px)`;
33
+ if (i === "horizontal") {
34
+ const w = 100 / o, L = `calc(${w}% + 1px)`;
35
35
  x.style.cssText = `
36
36
  position: absolute;
37
- top: ${S * w}%;
37
+ top: ${w * b}%;
38
38
  left: 0;
39
39
  width: 100%;
40
- height: ${A};
41
- background: ${s};
42
- transform: scaleX(${c === "hidden" ? 0 : 1});
43
- transform-origin: ${f} center;
40
+ height: ${L};
41
+ background: ${e};
42
+ transform: scaleX(${a === "hidden" ? 0 : 1});
43
+ transform-origin: ${g} center;
44
44
  will-change: transform;
45
45
  `;
46
46
  } else {
47
- const S = 100 / l, A = `calc(${S}% + 1px)`;
47
+ const w = 100 / o, L = `calc(${w}% + 1px)`;
48
48
  x.style.cssText = `
49
49
  position: absolute;
50
50
  top: 0;
51
- left: ${S * w}%;
52
- width: ${A};
51
+ left: ${w * b}%;
52
+ width: ${L};
53
53
  height: 100%;
54
- background: ${s};
55
- transform: scaleY(${c === "hidden" ? 0 : 1});
56
- transform-origin: ${f === "left" ? "top" : "bottom"} center;
54
+ background: ${e};
55
+ transform: scaleY(${a === "hidden" ? 0 : 1});
56
+ transform-origin: ${g === "left" ? "top" : "bottom"} center;
57
57
  will-change: transform;
58
58
  `;
59
59
  }
60
- g.push(x), y.appendChild(x);
60
+ $.push(x), f.appendChild(x);
61
61
  }
62
- return p.appendChild(y), { container: y, blinds: g };
62
+ return p.appendChild(f), { container: f, blinds: $ };
63
63
  };
64
64
  return {
65
65
  out: () => {
66
66
  let p = null;
67
- return o = new Promise((c) => {
68
- h = c;
67
+ return r = new Promise((a) => {
68
+ d = a;
69
69
  }), {
70
- spring: e,
71
- prepare: (c) => {
72
- D(c), c.style.zIndex = "1000", p = $(c, "hidden", "left");
70
+ spring: l,
71
+ prepare: (a) => {
72
+ m(a), a.style.zIndex = "1000", p = u(a, "hidden", "left");
73
73
  },
74
74
  onStart: () => {
75
75
  },
76
- tick: (c) => {
76
+ tick: (a) => {
77
77
  if (!p) return;
78
- const f = 1 - c;
79
- p.blinds.forEach((u, y) => {
80
- const g = d(
78
+ const g = 1 - a;
79
+ p.blinds.forEach((y, f) => {
80
+ const $ = c(
81
+ g,
81
82
  f,
82
- y,
83
- l,
83
+ o,
84
84
  !1
85
85
  // not reversed - left to right
86
86
  );
87
- a === "horizontal" ? u.style.transform = `scaleX(${g})` : u.style.transform = `scaleY(${g})`;
87
+ i === "horizontal" ? y.style.transform = `scaleX(${$})` : y.style.transform = `scaleY(${$})`;
88
88
  });
89
89
  },
90
90
  onEnd: () => {
91
- h && h();
91
+ d && d();
92
92
  }
93
93
  };
94
94
  },
@@ -96,24 +96,24 @@ const D = (t) => {
96
96
  let p = null;
97
97
  return {
98
98
  spring: n,
99
- prepare: (c) => {
100
- c.style.position = "relative", c.style.zIndex = "0", p = $(c, "closed", "right");
99
+ prepare: (a) => {
100
+ a.style.position = "relative", a.style.zIndex = "0", p = u(a, "closed", "right");
101
101
  },
102
102
  onStart: () => {
103
103
  },
104
104
  wait: async () => {
105
- o && await o, await N(i);
105
+ r && await r, await W(h);
106
106
  },
107
- tick: (c) => {
108
- p && p.blinds.forEach((f, u) => {
109
- const y = d(
110
- c,
111
- u,
112
- l,
107
+ tick: (a) => {
108
+ p && p.blinds.forEach((g, y) => {
109
+ const f = c(
110
+ a,
111
+ y,
112
+ o,
113
113
  !1
114
114
  // same direction as OUT - left to right
115
115
  );
116
- a === "horizontal" ? f.style.transform = `scaleX(${1 - y})` : f.style.transform = `scaleY(${1 - y})`;
116
+ i === "horizontal" ? g.style.transform = `scaleX(${1 - f})` : g.style.transform = `scaleY(${1 - f})`;
117
117
  });
118
118
  },
119
119
  onEnd: () => {
@@ -122,111 +122,109 @@ const D = (t) => {
122
122
  };
123
123
  }
124
124
  };
125
- }, k = (t) => {
126
- t.style.position = "absolute", t.style.width = "100%", t.style.top = "0", t.style.left = "0";
127
- }, it = (t = {}) => {
128
- var l, a;
129
- const { opacity: n = !1, direction: e = "enter" } = t, i = {
130
- stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? 150,
131
- damping: ((a = t.spring) == null ? void 0 : a.damping) ?? 20
125
+ }, ot = (t = {}) => {
126
+ var o, i;
127
+ const { opacity: n = !1, direction: l = "enter" } = t, h = {
128
+ stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? 150,
129
+ damping: ((i = t.spring) == null ? void 0 : i.damping) ?? 20
132
130
  };
133
- return e === "enter" ? {
134
- in: (r) => ({
135
- spring: i,
136
- tick: (s) => {
137
- r.style.transform = `translateX(${(1 - s) * 100}%)`, n && (r.style.opacity = s.toString());
131
+ return l === "enter" ? {
132
+ in: (s) => ({
133
+ spring: h,
134
+ tick: (e) => {
135
+ s.style.transform = `translateX(${(1 - e) * 100}%)`, n && (s.style.opacity = e.toString());
138
136
  }
139
137
  }),
140
- out: (r) => ({
141
- spring: i,
142
- prepare: (s) => {
143
- k(s), s.style.zIndex = "-1";
138
+ out: (s, e) => ({
139
+ spring: h,
140
+ prepare: (r) => {
141
+ m(r, e), r.style.zIndex = "-1";
144
142
  },
145
- tick: (s) => {
146
- r.style.transform = `translateX(${-(1 - s) * 20}%)`, n && (r.style.opacity = s.toString());
143
+ tick: (r) => {
144
+ s.style.transform = `translateX(${-(1 - r) * 20}%)`, n && (s.style.opacity = r.toString());
147
145
  }
148
146
  })
149
147
  } : {
150
- in: (r) => ({
148
+ in: (s) => ({
151
149
  spring: {
152
150
  stiffness: 100,
153
151
  damping: 20
154
152
  },
155
- tick: (s) => {
156
- r.style.transform = `translateX(${-(1 - s) * 20}%)`, n && (r.style.opacity = s.toString());
153
+ tick: (e) => {
154
+ s.style.transform = `translateX(${-(1 - e) * 20}%)`, n && (s.style.opacity = e.toString());
157
155
  }
158
156
  }),
159
- out: (r) => ({
157
+ out: (s, e) => ({
160
158
  spring: {
161
159
  stiffness: 100,
162
160
  damping: 20
163
161
  },
164
- prepare: (s) => {
165
- k(s), s.style.zIndex = "100";
162
+ prepare: (r) => {
163
+ m(r, e), r.style.zIndex = "100";
166
164
  },
167
- tick: (s) => {
168
- r.style.transform = `translateX(${(1 - s) * 100}%)`, n && (r.style.opacity = s.toString());
165
+ tick: (r) => {
166
+ s.style.transform = `translateX(${(1 - r) * 100}%)`, n && (s.style.opacity = r.toString());
169
167
  }
170
168
  })
171
169
  };
172
- }, H = (t) => new Promise((n) => setTimeout(n, t)), W = { stiffness: 400, damping: 20 }, Z = { stiffness: 40, damping: 8 }, j = 100, et = (t = {}) => {
170
+ }, G = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 400, damping: 20 }, V = { stiffness: 40, damping: 8 }, Z = 100, lt = (t = {}) => {
173
171
  const {
174
- inSpring: n = Z,
175
- outSpring: e = W,
176
- transitionDelay: i = j
172
+ inSpring: n = V,
173
+ outSpring: l = q,
174
+ transitionDelay: h = Z
177
175
  } = t;
178
- let l, a = null;
176
+ let o, i = null;
179
177
  return {
180
- in: (r) => ({
178
+ in: (s) => ({
181
179
  spring: n,
182
- prepare: (s) => {
183
- s.style.opacity = "0";
180
+ prepare: (e) => {
181
+ e.style.opacity = "0";
184
182
  },
185
183
  wait: async () => {
186
- l && (await l, await H(i));
184
+ o && (await o, await G(h));
187
185
  },
188
- tick: (s) => {
189
- r.style.opacity = s.toString();
186
+ tick: (e) => {
187
+ s.style.opacity = e.toString();
190
188
  }
191
189
  }),
192
- out: (r) => (l = new Promise((s) => {
193
- a = s;
190
+ out: (s, e) => (o = new Promise((r) => {
191
+ i = r;
194
192
  }), {
195
- spring: e,
196
- tick: (s) => {
197
- r.style.opacity = s.toString();
193
+ spring: l,
194
+ tick: (r) => {
195
+ s.style.opacity = r.toString();
198
196
  },
199
- prepare: k,
197
+ prepare: (r) => m(r, e),
200
198
  onEnd: () => {
201
- a && a();
199
+ i && i();
202
200
  }
203
201
  })
204
202
  };
205
203
  };
206
204
  function P(t, n) {
207
- function e(a) {
208
- let r = 0, s = 0;
209
- const o = a.offsetWidth, h = a.offsetHeight;
210
- let d = a;
211
- for (; d; )
212
- r += d.offsetTop, s += d.offsetLeft, d = d.offsetParent;
213
- return r -= window.scrollY, s -= window.scrollX, { top: r, left: s, width: o, height: h };
205
+ function l(i) {
206
+ let s = 0, e = 0;
207
+ const r = i.offsetWidth, d = i.offsetHeight;
208
+ let c = i;
209
+ for (; c; )
210
+ s += c.offsetTop, e += c.offsetLeft, c = c.offsetParent;
211
+ return s -= window.scrollY, e -= window.scrollX, { top: s, left: e, width: r, height: d };
214
212
  }
215
- const i = e(t), l = e(n);
213
+ const h = l(t), o = l(n);
216
214
  return new DOMRect(
217
- l.left - i.left,
218
- l.top - i.top,
219
- l.width,
220
- l.height
215
+ o.left - h.left,
216
+ o.top - h.top,
217
+ o.width,
218
+ o.height
221
219
  );
222
220
  }
223
- const J = {
221
+ const j = {
224
222
  stiffness: 10,
225
223
  // Lower stiffness for smoother motion
226
224
  damping: 5
227
225
  // Lower damping for more fluid movement
228
- }, m = 0.2, T = 0.82;
229
- function I(t) {
226
+ }, k = 0.2, E = 0.82;
227
+ function T(t) {
230
228
  const n = P(document.body, t.positionedParent);
231
229
  return {
232
230
  top: t.scroll.y,
@@ -235,11 +233,11 @@ function I(t) {
235
233
  height: window.innerHeight - n.top
236
234
  };
237
235
  }
238
- function b(t, n) {
239
- const e = n.left + n.width / 2, i = n.top + n.height / 2;
240
- t.style.transformOrigin = `${e}px ${i}px`;
236
+ function A(t, n) {
237
+ const l = n.left + n.width / 2, h = n.top + n.height / 2;
238
+ t.style.transformOrigin = `${l}px ${h}px`;
241
239
  }
242
- function Y(t, n) {
240
+ function I(t, n) {
243
241
  t.style.clipPath = `polygon(
244
242
  ${n.left}px ${n.top}px,
245
243
  ${n.left + n.width}px ${n.top}px,
@@ -247,120 +245,173 @@ function Y(t, n) {
247
245
  ${n.left}px ${n.top + n.height}px
248
246
  )`;
249
247
  }
250
- function E(t, n, e) {
251
- return t <= n ? 0 : t >= e ? 1 : (t - n) / (e - n);
248
+ function J(t, n) {
249
+ t.style.transform = `translateY(${-n.top}px)`;
250
+ }
251
+ function S(t, n, l) {
252
+ return t <= n ? 0 : t >= l ? 1 : (t - n) / (l - n);
253
+ }
254
+ function C(t, n, l) {
255
+ t.topLeft.style.transform = `translate(${n}px, ${l}px)`, t.topRight.style.transform = `translate(${-n}px, ${l}px)`, t.bottomLeft.style.transform = `translate(${n}px, ${-l}px)`, t.bottomRight.style.transform = `translate(${-n}px, ${-l}px)`;
252
256
  }
253
- const rt = (t) => {
254
- const n = (t == null ? void 0 : t.spring) ?? J, e = (t == null ? void 0 : t.scale) ?? 0.9;
257
+ function K(t = "white", n) {
258
+ const o = document.createElement("div");
259
+ o.style.position = "fixed", o.style.pointerEvents = "none", o.style.zIndex = "9999", o.style.top = `${n.top - 2}px`, o.style.left = `${n.left - 2}px`, o.style.width = "10px", o.style.height = "10px";
260
+ const i = document.createElement("div");
261
+ i.style.position = "absolute", i.style.width = "10px", i.style.height = "2px", i.style.backgroundColor = t, i.style.top = "0", i.style.left = "0";
262
+ const s = document.createElement("div");
263
+ s.style.position = "absolute", s.style.width = "2px", s.style.height = "10px", s.style.backgroundColor = t, s.style.top = "0", s.style.left = "0", o.appendChild(i), o.appendChild(s);
264
+ const e = document.createElement("div");
265
+ e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${n.top - 2}px`, e.style.left = `${n.left + n.width - 10 + 2}px`, e.style.width = "10px", e.style.height = "10px";
266
+ const r = document.createElement("div");
267
+ r.style.position = "absolute", r.style.width = "10px", r.style.height = "2px", r.style.backgroundColor = t, r.style.top = "0", r.style.right = "0";
268
+ const d = document.createElement("div");
269
+ d.style.position = "absolute", d.style.width = "2px", d.style.height = "10px", d.style.backgroundColor = t, d.style.top = "0", d.style.right = "0", e.appendChild(r), e.appendChild(d);
270
+ const c = document.createElement("div");
271
+ c.style.position = "fixed", c.style.pointerEvents = "none", c.style.zIndex = "9999", c.style.top = `${n.top + n.height - 10 + 2}px`, c.style.left = `${n.left - 2}px`, c.style.width = "10px", c.style.height = "10px";
272
+ const u = document.createElement("div");
273
+ u.style.position = "absolute", u.style.width = "10px", u.style.height = "2px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.left = "0";
274
+ const p = document.createElement("div");
275
+ p.style.position = "absolute", p.style.width = "2px", p.style.height = "10px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.left = "0", c.appendChild(u), c.appendChild(p);
276
+ const a = document.createElement("div");
277
+ a.style.position = "fixed", a.style.pointerEvents = "none", a.style.zIndex = "9999", a.style.top = `${n.top + n.height - 10 + 2}px`, a.style.left = `${n.left + n.width - 10 + 2}px`, a.style.width = "10px", a.style.height = "10px";
278
+ const g = document.createElement("div");
279
+ g.style.position = "absolute", g.style.width = "10px", g.style.height = "2px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.right = "0";
280
+ const y = document.createElement("div");
281
+ return y.style.position = "absolute", y.style.width = "2px", y.style.height = "10px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.right = "0", a.appendChild(g), a.appendChild(y), {
282
+ topLeft: o,
283
+ topRight: e,
284
+ bottomLeft: c,
285
+ bottomRight: a,
286
+ *[Symbol.iterator]() {
287
+ yield o, yield e, yield c, yield a;
288
+ }
289
+ };
290
+ }
291
+ const at = (t) => {
292
+ var o;
293
+ const n = (t == null ? void 0 : t.spring) ?? j, l = (t == null ? void 0 : t.scale) ?? 0.92, h = ((o = t == null ? void 0 : t.border) == null ? void 0 : o.color) ?? "white";
255
294
  return {
256
- out: async (i, l) => {
257
- const a = I(l);
295
+ out: async (i, s) => {
296
+ const e = T(s), r = P(document.body, s.positionedParent), d = K(h, {
297
+ ...e,
298
+ top: r.top
299
+ });
258
300
  return {
259
301
  spring: n,
260
302
  prepare: () => {
261
- D(i), b(i, a), Y(i, a);
303
+ m(i), A(i, e), I(i, e), J(i, e);
304
+ for (const c of d)
305
+ s.positionedParent.appendChild(c), c.style.transition = "transform 0.1s ease-out";
262
306
  },
263
307
  onEnd: () => {
264
- i.style.clipPath = "", i.style.transformOrigin = "";
308
+ i.style.clipPath = "", i.style.transformOrigin = "", setTimeout(() => {
309
+ for (const c of d)
310
+ s.positionedParent.removeChild(c);
311
+ }, 1e3);
265
312
  },
266
- tick: (r) => {
267
- const s = 1 - r;
268
- if (s < m) {
269
- const o = E(s, 0, m), h = 1 - (1 - e) * o;
270
- i.style.transform = `scale(${h})`;
271
- } else if (s < T) {
272
- const o = E(
273
- s,
274
- m,
275
- T
276
- ), h = -a.height * o;
277
- i.style.transform = `translateY(${h}px) scale(${e})`;
313
+ tick: (c) => {
314
+ const u = 1 - c;
315
+ if (u < k) {
316
+ const p = S(u, 0, k), a = 1 - (1 - l) * p;
317
+ i.style.transform = `translateY(${-e.top}px) scale(${a})`;
318
+ const g = (e.width - e.width * a) / 2, y = (e.height - e.height * a) / 2;
319
+ C(d, g, y);
320
+ } else if (u < E) {
321
+ const p = S(
322
+ u,
323
+ k,
324
+ E
325
+ ), a = -e.top - e.height * p;
326
+ i.style.transform = `translateY(${a}px) scale(${l})`;
278
327
  } else {
279
- const o = E(s, T, 1), h = e + (1 - e) * o;
280
- i.style.transform = `translateY(${-a.height}px) scale(${h})`;
328
+ const p = S(u, E, 1), a = l + (1 - l) * p;
329
+ i.style.transform = `translateY(${-e.top - e.height}px) scale(${a})`;
330
+ const g = (e.width - e.width * a) / 2, y = (e.height - e.height * a) / 2;
331
+ C(d, g, y);
281
332
  }
282
333
  }
283
334
  };
284
335
  },
285
- in: async (i, l) => {
286
- const a = I(l);
336
+ in: async (i, s) => {
337
+ const e = T(s);
287
338
  return {
288
339
  spring: n,
289
340
  prepare: () => {
290
- b(i, a), Y(i, a), i.style.transform = `translateY(${a.height}px) scale(${e})`;
341
+ A(i, e), I(i, e), i.style.transform = `translateY(${-e.top + e.height}px) scale(${l})`;
291
342
  },
292
343
  onEnd: () => {
293
- i.style.clipPath = "", i.style.transformOrigin = "";
344
+ i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
294
345
  },
295
346
  tick: (r) => {
296
- if (r < m)
297
- i.style.transform = `translateY(${a.height}px) scale(${e})`, i.style.opacity = "0";
298
- else if (r < T) {
299
- const s = E(
347
+ if (r < k)
348
+ i.style.transform = `translateY(${-e.top + e.height}px) scale(${l})`, i.style.opacity = "0";
349
+ else if (r < E) {
350
+ const d = S(
300
351
  r,
301
- m,
302
- T
303
- ), o = a.height * (1 - s);
304
- i.style.transform = `translateY(${o}px) scale(${e})`, i.style.opacity = "1";
352
+ k,
353
+ E
354
+ ), c = -e.top + e.height * (1 - d);
355
+ i.style.transform = `translateY(${c}px) scale(${l})`, i.style.opacity = "1";
305
356
  } else {
306
- const s = E(r, T, 1), o = e + (1 - e) * s;
307
- i.style.transform = `scale(${o})`, i.style.opacity = "1";
357
+ const d = S(r, E, 1), c = l + (1 - l) * d;
358
+ i.style.transform = `translateY(${-e.top}px) scale(${c})`, i.style.opacity = "1";
308
359
  }
309
360
  }
310
361
  };
311
362
  }
312
363
  };
313
364
  };
314
- function K(t, n) {
365
+ function Q(t, n) {
315
366
  return t.querySelector(`[data-hero-key="${n}"]`);
316
367
  }
317
- const at = (t = {}) => {
318
- var a, r;
368
+ const dt = (t = {}) => {
369
+ var i, s;
319
370
  const n = {
320
- stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? 300,
321
- damping: ((r = t.spring) == null ? void 0 : r.damping) ?? 30
322
- }, e = t.timeout ?? 300;
323
- let i = null, l = null;
371
+ stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 300,
372
+ damping: ((s = t.spring) == null ? void 0 : s.damping) ?? 30
373
+ }, l = t.timeout ?? 300;
374
+ let h = null, o = null;
324
375
  return {
325
- in: async (s, o) => {
326
- const h = s, d = Array.from(h.querySelectorAll("[data-hero-key]"));
327
- if (d.length === 0)
376
+ in: async (e, r) => {
377
+ const d = e, c = Array.from(d.querySelectorAll("[data-hero-key]"));
378
+ if (c.length === 0)
328
379
  return {
329
380
  spring: n,
330
381
  tick: () => {
331
382
  }
332
383
  // No hero elements, skip animation
333
384
  };
334
- if (!await new Promise((c) => {
335
- i ? c(!0) : (l = c, setTimeout(() => {
336
- l = null, c(!1);
337
- }, e));
338
- }) || !i)
339
- return i = null, {
385
+ if (!await new Promise((a) => {
386
+ h ? a(!0) : (o = a, setTimeout(() => {
387
+ o = null, a(!1);
388
+ }, l));
389
+ }) || !h)
390
+ return h = null, {
340
391
  spring: n,
341
392
  tick: () => {
342
393
  }
343
394
  // No fromNode, skip animation
344
395
  };
345
- const p = d.map((c) => {
346
- const f = c.getAttribute("data-hero-key");
347
- if (!f) return null;
348
- const u = K(i, f);
349
- if (!u) return null;
350
- const y = c, g = P(i, u), w = P(h, y), x = g.left - w.left - o.scrollOffset.x, S = g.top - w.top - o.scrollOffset.y, A = g.width / w.width, F = g.height / w.height, O = y.style.transform, X = y.style.position, U = y.style.transformOrigin, z = y.style.zIndex;
396
+ const p = c.map((a) => {
397
+ const g = a.getAttribute("data-hero-key");
398
+ if (!g) return null;
399
+ const y = Q(h, g);
400
+ if (!y) return null;
401
+ const f = a, $ = P(h, y), b = P(d, f), x = $.left - b.left - r.scrollOffset.x, w = $.top - b.top - r.scrollOffset.y, L = $.width / b.width, F = $.height / b.height, Y = f.style.transform, _ = f.style.position, z = f.style.transformOrigin, O = f.style.zIndex;
351
402
  return {
352
- toEl: y,
403
+ toEl: f,
353
404
  dx: x,
354
- dy: S,
355
- dw: A,
405
+ dy: w,
406
+ dw: L,
356
407
  dh: F,
357
- originalTransform: O,
358
- originalPosition: X,
359
- originalTransformOrigin: U,
360
- originalZIndex: z
408
+ originalTransform: Y,
409
+ originalPosition: _,
410
+ originalTransformOrigin: z,
411
+ originalZIndex: O
361
412
  };
362
413
  }).filter(Boolean);
363
- return i = null, p.length === 0 ? {
414
+ return h = null, p.length === 0 ? {
364
415
  spring: n,
365
416
  tick: () => {
366
417
  }
@@ -368,156 +419,246 @@ const at = (t = {}) => {
368
419
  } : {
369
420
  spring: n,
370
421
  prepare: () => {
371
- p.forEach(({ toEl: c }) => {
372
- c.style.position = "relative", c.style.transformOrigin = "top left", c.style.zIndex = "1000";
422
+ p.forEach(({ toEl: a }) => {
423
+ a.style.position = "relative", a.style.transformOrigin = "top left", a.style.zIndex = "1000";
373
424
  });
374
425
  },
375
- tick: (c) => {
376
- p.forEach(({ toEl: f, dx: u, dy: y, dw: g, dh: w }) => {
377
- f.style.transform = `translate(${(1 - c) * u}px,${(1 - c) * y}px) scale(${c + (1 - c) * g}, ${c + (1 - c) * w})`;
426
+ tick: (a) => {
427
+ p.forEach(({ toEl: g, dx: y, dy: f, dw: $, dh: b }) => {
428
+ g.style.transform = `translate(${(1 - a) * y}px,${(1 - a) * f}px) scale(${a + (1 - a) * $}, ${a + (1 - a) * b})`;
378
429
  });
379
430
  },
380
431
  onEnd: () => {
381
432
  p.forEach(
382
433
  ({
383
- toEl: c,
384
- originalTransform: f,
385
- originalPosition: u,
386
- originalTransformOrigin: y,
387
- originalZIndex: g
434
+ toEl: a,
435
+ originalTransform: g,
436
+ originalPosition: y,
437
+ originalTransformOrigin: f,
438
+ originalZIndex: $
388
439
  }) => {
389
- c.style.transform = f, c.style.position = u, c.style.transformOrigin = y, c.style.zIndex = g;
440
+ a.style.transform = g, a.style.position = y, a.style.transformOrigin = f, a.style.zIndex = $;
390
441
  }
391
442
  );
392
443
  }
393
444
  };
394
445
  },
395
- out: async (s) => ({
446
+ out: async (e) => ({
396
447
  onStart: () => {
397
- i = s, l && (l(!0), l = null);
448
+ h = e, o && (o(!0), o = null);
398
449
  },
399
- prepare: (o) => {
400
- k(o), o.style.opacity = "0";
450
+ prepare: (r) => {
451
+ m(r), r.style.opacity = "0";
401
452
  }
402
453
  })
403
454
  };
404
455
  };
405
- function Q({
456
+ function R(t) {
457
+ const n = P(document.body, t.positionedParent);
458
+ return {
459
+ top: t.scroll.y,
460
+ left: 0,
461
+ width: n.width,
462
+ height: window.innerHeight - n.top
463
+ };
464
+ }
465
+ const ct = (t = {}) => {
466
+ var i, s;
467
+ const n = {
468
+ // Much slower animation - 4x duration by reducing stiffness further
469
+ stiffness: ((i = t.spring) == null ? void 0 : i.stiffness) ?? 50,
470
+ damping: ((s = t.spring) == null ? void 0 : s.damping) ?? 30
471
+ }, l = t.initialRotation ?? 45, h = t.initialScale ?? 0.01, o = t.rotationTriggerPoint ?? 0.8;
472
+ return {
473
+ out: async (e, r) => {
474
+ const d = e.style.opacity;
475
+ return {
476
+ spring: {
477
+ stiffness: 80,
478
+ damping: 25
479
+ },
480
+ from: 1,
481
+ to: 0,
482
+ prepare: () => {
483
+ m(e, r), e.style.opacity = "1";
484
+ },
485
+ tick: (c) => {
486
+ e.style.opacity = String(c);
487
+ },
488
+ onEnd: () => {
489
+ e.style.opacity = d;
490
+ }
491
+ };
492
+ },
493
+ in: async (e, r) => {
494
+ const d = R(r), c = e.style.transform, u = e.style.transformOrigin, p = e.style.position, a = e.style.zIndex;
495
+ return {
496
+ spring: n,
497
+ from: 0,
498
+ to: 1,
499
+ prepare: () => {
500
+ const g = Math.min(d.width, d.height) * 0.4;
501
+ e.style.setProperty(
502
+ "--max-border-radius",
503
+ `${g}px`
504
+ ), e.style.setProperty("--border-radius-scale", "1"), e.style.willChange = "transform", e.style.backfaceVisibility = "hidden";
505
+ const y = d.left + d.width / 2, f = d.top + d.height / 2;
506
+ e.style.transformOrigin = `${y}px ${f}px`, e.style.position = "fixed", e.style.top = `${d.top}px`, e.style.left = `${d.left}px`, e.style.width = `${d.width}px`, e.style.height = `${d.height}px`, e.style.zIndex = "1000", e.style.overflow = "hidden", e.style.transform = `rotate(${l}deg) scale(${h}) translateZ(0)`, e.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", e.style.opacity = "1";
507
+ },
508
+ tick: (g) => {
509
+ let y;
510
+ if (g <= 0.05)
511
+ y = h;
512
+ else if (g <= o) {
513
+ const x = (g - 0.05) / (o - 0.05), w = Math.pow(x, 9);
514
+ y = h + (0.8 - h) * w;
515
+ } else {
516
+ const x = (g - o) / (1 - o);
517
+ y = 0.8 + 0.2 * (1 - Math.pow(1 - x, 3));
518
+ }
519
+ let f;
520
+ const $ = 0.7;
521
+ if (g <= $)
522
+ f = l;
523
+ else {
524
+ const x = (g - $) / (1 - $), w = 1 - Math.pow(1 - x, 2);
525
+ f = l * (1 - w);
526
+ }
527
+ let b;
528
+ if (g <= $)
529
+ b = 1;
530
+ else {
531
+ const x = (g - $) / (1 - $);
532
+ b = 1 - Math.pow(x, 0.5);
533
+ }
534
+ e.style.transform = `rotate(${f.toFixed(2)}deg) scale(${y.toFixed(4)}) translateZ(0)`, e.style.setProperty(
535
+ "--border-radius-scale",
536
+ b.toFixed(4)
537
+ );
538
+ },
539
+ onEnd: () => {
540
+ e.style.willChange = "", e.style.backfaceVisibility = "", e.style.removeProperty("--max-border-radius"), e.style.removeProperty("--border-radius-scale"), e.style.transform = c, e.style.transformOrigin = u, e.style.position = p, e.style.zIndex = a, e.style.top = "", e.style.left = "", e.style.width = "", e.style.height = "", e.style.overflow = "", e.style.borderRadius = "";
541
+ }
542
+ };
543
+ }
544
+ };
545
+ };
546
+ function tt({
406
547
  detailRect: t,
407
548
  galleryRect: n,
408
- pageRect: e,
409
- scrollOffset: i
410
- }, l) {
411
- const a = n.left - t.left + (n.width - t.width) / 2 - i.x, r = n.top - t.top + (n.height - t.height) / 2 - i.y, s = n.width / t.width, o = n.height / t.height, h = Math.max(s, o), d = t.top / e.height * 100, $ = (e.width - (t.left + t.width)) / e.width * 100, p = (e.height - (t.top + t.height)) / e.height * 100, c = t.left / e.width * 100;
412
- return l.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (f) => {
413
- const u = 1 - f, y = d * u, g = $ * u, w = p * u, x = c * u;
414
- l.style.clipPath = `inset(${y}% ${g}% ${w}% ${x}%)`, l.style.transform = `translate(${a * u}px, ${r * u}px) scale(${1 + (h - 1) * u})`;
549
+ pageRect: l,
550
+ scrollOffset: h
551
+ }, o) {
552
+ const i = n.left - t.left + (n.width - t.width) / 2 - h.x, s = n.top - t.top + (n.height - t.height) / 2 - h.y, e = n.width / t.width, r = n.height / t.height, d = Math.max(e, r), c = t.top / l.height * 100, u = (l.width - (t.left + t.width)) / l.width * 100, p = (l.height - (t.top + t.height)) / l.height * 100, a = t.left / l.width * 100;
553
+ return o.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (g) => {
554
+ const y = 1 - g, f = c * y, $ = u * y, b = p * y, x = a * y;
555
+ o.style.clipPath = `inset(${f}% ${$}% ${b}% ${x}%)`, o.style.transform = `translate(${i * y}px, ${s * y}px) scale(${1 + (d - 1) * y})`;
415
556
  };
416
557
  }
417
- function V({
558
+ function et({
418
559
  galleryRect: t,
419
560
  detailRect: n,
420
- scrollOffset: e
421
- }, i) {
422
- const l = n.left - t.left + (n.width - t.width) / 2 + e.x, a = n.top - t.top + (n.height - t.height) / 2 + e.y, r = n.width / t.width, s = n.height / t.height, o = Math.max(r, s);
423
- return (h) => {
424
- i.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`;
425
- const d = 1 - h;
426
- i.style.transform = `translate(${l * d - e.x}px, ${a * d - e.y}px) scale(${1 + (o - 1) * d})`, i.style.opacity = `${1 - d}`;
561
+ scrollOffset: l
562
+ }, h) {
563
+ const o = n.left - t.left + (n.width - t.width) / 2 + l.x, i = n.top - t.top + (n.height - t.height) / 2 + l.y, s = n.width / t.width, e = n.height / t.height, r = Math.max(s, e);
564
+ return (d) => {
565
+ h.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`;
566
+ const c = 1 - d;
567
+ h.style.transform = `translate(${o * c - l.x}px, ${i * c - l.y}px) scale(${1 + (r - 1) * c})`, h.style.opacity = `${1 - c}`;
427
568
  };
428
569
  }
429
- function R({
570
+ function nt({
430
571
  galleryRect: t,
431
572
  detailRect: n,
432
- scrollOffset: e
433
- }, i) {
434
- const l = n.left - t.left + (n.width - t.width) / 2 - e.x, a = n.top - t.top + (n.height - t.height) / 2 - e.y, r = n.width / t.width, s = n.height / t.height, o = Math.max(r, s);
435
- return (h) => {
436
- const d = 1 - h, $ = h;
437
- i.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, i.style.transform = `translate(${l * d}px, ${a * d}px) scale(${1 + (o - 1) * d})`, i.style.opacity = `${$}`;
573
+ scrollOffset: l
574
+ }, h) {
575
+ const o = n.left - t.left + (n.width - t.width) / 2 - l.x, i = n.top - t.top + (n.height - t.height) / 2 - l.y, s = n.width / t.width, e = n.height / t.height, r = Math.max(s, e);
576
+ return (d) => {
577
+ const c = 1 - d, u = d;
578
+ h.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, h.style.transform = `translate(${o * c}px, ${i * c}px) scale(${1 + (r - 1) * c})`, h.style.opacity = `${u}`;
438
579
  };
439
580
  }
440
- function tt({
581
+ function it({
441
582
  detailRect: t,
442
583
  galleryRect: n,
443
- pageRect: e,
444
- scrollOffset: i
445
- }, l) {
446
- const a = n.left - t.left + (n.width - t.width) / 2 + i.x, r = n.top - t.top + (n.height - t.height) / 2 + i.y, s = n.width / t.width, o = n.height / t.height, h = Math.min(s, o), d = t.top / e.height * 100, $ = (e.width - (t.left + t.width)) / e.width * 100, p = (e.height - (t.top + t.height)) / e.height * 100, c = t.left / e.width * 100;
447
- return l.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (f) => {
448
- const u = 1 - f, y = d * u, g = $ * u, w = p * u, x = c * u;
449
- l.style.clipPath = `inset(${y}% ${g}% ${w}% ${x}%)`, l.style.transform = `translate(${a * u - i.x}px, ${r * u - i.y}px) scale(${1 + (h - 1) * u})`;
584
+ pageRect: l,
585
+ scrollOffset: h
586
+ }, o) {
587
+ const i = n.left - t.left + (n.width - t.width) / 2 + h.x, s = n.top - t.top + (n.height - t.height) / 2 + h.y, e = n.width / t.width, r = n.height / t.height, d = Math.min(e, r), c = t.top / l.height * 100, u = (l.width - (t.left + t.width)) / l.width * 100, p = (l.height - (t.top + t.height)) / l.height * 100, a = t.left / l.width * 100;
588
+ return o.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (g) => {
589
+ const y = 1 - g, f = c * y, $ = u * y, b = p * y, x = a * y;
590
+ o.style.clipPath = `inset(${f}% ${$}% ${b}% ${x}%)`, o.style.transform = `translate(${i * y - h.x}px, ${s * y - h.y}px) scale(${1 + (d - 1) * y})`;
450
591
  };
451
592
  }
452
- function nt(t, n, e) {
453
- const i = t.querySelector(
593
+ function st(t, n, l) {
594
+ const h = t.querySelector(
454
595
  "[data-pinterest-detail-key]"
455
- ), l = n.querySelector(
596
+ ), o = n.querySelector(
456
597
  "[data-pinterest-detail-key]"
457
598
  );
458
599
  if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 || n.querySelectorAll("[data-pinterest-detail-key]").length > 1)
459
600
  return null;
460
- let a = null, r = null, s = !1;
461
- if (!i && l) {
462
- r = l;
463
- const $ = r.getAttribute("data-pinterest-detail-key");
464
- if (!$) return null;
465
- a = t.querySelector(
466
- `[data-pinterest-gallery-key="${$}"]`
467
- ), a && (s = !0);
468
- } else if (i && !l) {
469
- r = i;
470
- const $ = r.getAttribute("data-pinterest-detail-key");
471
- if (!$) return null;
472
- a = n.querySelector(
473
- `[data-pinterest-gallery-key="${$}"]`
474
- ), a && (s = !1);
601
+ let i = null, s = null, e = !1;
602
+ if (!h && o) {
603
+ s = o;
604
+ const u = s.getAttribute("data-pinterest-detail-key");
605
+ if (!u) return null;
606
+ i = t.querySelector(
607
+ `[data-pinterest-gallery-key="${u}"]`
608
+ ), i && (e = !0);
609
+ } else if (h && !o) {
610
+ s = h;
611
+ const u = s.getAttribute("data-pinterest-detail-key");
612
+ if (!u) return null;
613
+ i = n.querySelector(
614
+ `[data-pinterest-gallery-key="${u}"]`
615
+ ), i && (e = !1);
475
616
  }
476
- if (!a || !r)
617
+ if (!i || !s)
477
618
  return null;
478
- const o = P(s ? t : n, a), h = P(s ? n : t, r), d = n.getBoundingClientRect();
479
- return s ? {
480
- inAnimation: Q(
481
- { detailRect: h, galleryRect: o, pageRect: d, scrollOffset: e },
619
+ const r = P(e ? t : n, i), d = P(e ? n : t, s), c = n.getBoundingClientRect();
620
+ return e ? {
621
+ inAnimation: tt(
622
+ { detailRect: d, galleryRect: r, pageRect: c, scrollOffset: l },
482
623
  n
483
624
  ),
484
- outAnimation: V(
485
- { galleryRect: o, detailRect: h, scrollOffset: e },
625
+ outAnimation: et(
626
+ { galleryRect: r, detailRect: d, scrollOffset: l },
486
627
  t
487
628
  )
488
629
  } : {
489
- inAnimation: R(
490
- { galleryRect: o, detailRect: h, scrollOffset: e },
630
+ inAnimation: nt(
631
+ { galleryRect: r, detailRect: d, scrollOffset: l },
491
632
  n
492
633
  ),
493
- outAnimation: tt(
494
- { detailRect: h, galleryRect: o, pageRect: d, scrollOffset: e },
634
+ outAnimation: it(
635
+ { detailRect: d, galleryRect: r, pageRect: c, scrollOffset: l },
495
636
  t
496
637
  )
497
638
  };
498
639
  }
499
- const lt = (t = {}) => {
500
- var r, s;
640
+ const ht = (t = {}) => {
641
+ var s, e;
501
642
  const n = {
502
- stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? 50,
503
- damping: ((s = t.spring) == null ? void 0 : s.damping) ?? 10
504
- }, e = t.timeout ?? 300;
505
- let i = null, l = null, a = null;
643
+ stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? 50,
644
+ damping: ((e = t.spring) == null ? void 0 : e.damping) ?? 10
645
+ }, l = t.timeout ?? 300;
646
+ let h = null, o = null, i = null;
506
647
  return {
507
- in: async (o, { scrollOffset: h }) => {
508
- const d = o;
648
+ in: async (r, { scrollOffset: d }) => {
649
+ const c = r;
509
650
  return !await new Promise((p) => {
510
- i ? p(!0) : (l = p, setTimeout(() => {
511
- l = null, p(!1);
512
- }, e));
513
- }) || !i ? (i = null, {
651
+ h ? p(!0) : (o = p, setTimeout(() => {
652
+ o = null, p(!1);
653
+ }, l));
654
+ }) || !h ? (h = null, {
514
655
  spring: n,
515
656
  tick: () => {
516
657
  }
517
- }) : (a = nt(i, d, h), a ? (i = null, {
658
+ }) : (i = st(h, c, d), i ? (h = null, {
518
659
  spring: n,
519
660
  tick: (p) => {
520
- a && a.inAnimation(p);
661
+ i && i.inAnimation(p);
521
662
  }
522
663
  }) : {
523
664
  spring: n,
@@ -525,83 +666,98 @@ const lt = (t = {}) => {
525
666
  }
526
667
  });
527
668
  },
528
- out: async (o) => ({
669
+ out: async (r) => ({
529
670
  spring: n,
530
671
  onStart: () => {
531
- i = o, l && (l(!0), l = null);
672
+ h = r, o && (o(!0), o = null);
532
673
  },
533
- prepare: (h) => {
534
- k(h), h.style.zIndex = "-1";
674
+ prepare: (d) => {
675
+ m(d), d.style.zIndex = "-1";
535
676
  },
536
- tick: (h) => {
537
- a && a.outAnimation(h);
677
+ tick: (d) => {
678
+ i && i.outAnimation(d);
538
679
  }
539
680
  })
540
681
  };
541
- }, _ = {
682
+ }, v = {
542
683
  stiffness: 30,
543
684
  damping: 7
544
- }, ot = (t = {}) => {
545
- var l, a;
546
- const n = t.direction ?? "up", e = {
547
- stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? _.stiffness,
548
- damping: ((a = t.spring) == null ? void 0 : a.damping) ?? _.damping
549
- }, i = n === "up";
685
+ }, pt = (t = {}) => {
686
+ var r, d;
687
+ const n = t.direction ?? "up", l = {
688
+ stiffness: ((r = t.spring) == null ? void 0 : r.stiffness) ?? v.stiffness,
689
+ damping: ((d = t.spring) == null ? void 0 : d.damping) ?? v.damping
690
+ }, h = n === "up";
691
+ let o = null, i = null, s = null;
692
+ const e = () => {
693
+ if (o === null || i === null)
694
+ return null;
695
+ const c = Math.min(o, i), u = window.innerHeight;
696
+ return Math.max(c, u);
697
+ };
550
698
  return {
551
- in: (r) => ({
552
- spring: e,
553
- tick: (s) => {
554
- const o = i ? (1 - s) * 100 : (1 - s) * -100;
555
- r.style.transform = `translateY(${o}vh)`;
699
+ in: (c) => (i = c.offsetHeight, o !== null && (s = e()), {
700
+ spring: l,
701
+ tick: (u) => {
702
+ if (s === null && (s = e(), s === null))
703
+ return;
704
+ const p = h ? (1 - u) * s : (1 - u) * -s;
705
+ c.style.transform = `translateY(${p}px)`;
556
706
  }
557
707
  }),
558
- out: (r) => ({
559
- spring: e,
560
- tick: (s) => {
561
- const o = i ? (1 - s) * -100 : (1 - s) * 100;
562
- r.style.transform = `translateY(${o}vh)`;
708
+ out: (c) => ({
709
+ spring: l,
710
+ onStart: () => {
711
+ o = c.offsetHeight, i !== null && (s = e());
712
+ },
713
+ tick: (u) => {
714
+ if (s === null && (s = e(), s === null))
715
+ return;
716
+ const p = h ? (1 - u) * -s : (1 - u) * s;
717
+ c.style.transform = `translateY(${p}px)`;
563
718
  },
564
- prepare: (s) => {
565
- k(s), s.style.zIndex = i ? "-1" : "1";
719
+ prepare: (u) => {
720
+ m(u), u.style.zIndex = h ? "-1" : "1";
566
721
  }
567
722
  })
568
723
  };
569
- }, L = {
724
+ }, D = {
570
725
  stiffness: 30,
571
726
  damping: 7
572
- }, ct = (t = {}) => {
573
- var l, a;
574
- const n = t.direction ?? "left", e = {
575
- stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? L.stiffness,
576
- damping: ((a = t.spring) == null ? void 0 : a.damping) ?? L.damping
577
- }, i = n === "left";
727
+ }, yt = (t = {}) => {
728
+ var o, i;
729
+ const n = t.direction ?? "left", l = {
730
+ stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? D.stiffness,
731
+ damping: ((i = t.spring) == null ? void 0 : i.damping) ?? D.damping
732
+ }, h = n === "left";
578
733
  return {
579
- in: (r) => ({
580
- spring: e,
581
- tick: (s) => {
582
- const o = i ? (1 - s) * 100 : (1 - s) * -100;
583
- r.style.transform = `translateX(${o}%)`;
734
+ in: (s) => ({
735
+ spring: l,
736
+ tick: (e) => {
737
+ const r = h ? (1 - e) * 100 : (1 - e) * -100;
738
+ s.style.transform = `translateX(${r}%)`;
584
739
  }
585
740
  }),
586
- out: (r) => ({
587
- spring: e,
588
- tick: (s) => {
589
- const o = i ? (1 - s) * -100 : (1 - s) * 100;
590
- r.style.transform = `translateX(${o}%)`;
741
+ out: (s, e) => ({
742
+ spring: l,
743
+ tick: (r) => {
744
+ const d = h ? (1 - r) * -100 : (1 - r) * 100;
745
+ s.style.transform = `translateX(${d}%)`;
591
746
  },
592
- prepare: (s) => {
593
- D(s), s.style.zIndex = i ? "-1" : "1";
747
+ prepare: (r) => {
748
+ m(r, e), r.style.zIndex = h ? "-1" : "1";
594
749
  }
595
750
  })
596
751
  };
597
752
  };
598
753
  export {
599
- st as blind,
600
- it as drill,
601
- et as fade,
602
- rt as film,
603
- at as hero,
604
- lt as pinterest,
605
- ot as scroll,
606
- ct as slide
754
+ rt as blind,
755
+ ot as drill,
756
+ lt as fade,
757
+ at as film,
758
+ dt as hero,
759
+ ct as jaemin,
760
+ ht as pinterest,
761
+ pt as scroll,
762
+ yt as slide
607
763
  };