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