@ssgoi/core 2.5.4 → 2.5.5

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.
@@ -15,10 +15,11 @@ function R(i, a) {
15
15
  n.height
16
16
  );
17
17
  }
18
- const v = (i, a) => {
19
- i.style.position = "absolute", i.style.width = "100%", i.style.top = `${-1 * ((a == null ? void 0 : a.scroll.y) ?? 0)}px`, i.style.left = "0";
18
+ const O = (i, a) => {
19
+ var o;
20
+ i.style.position = "absolute", i.style.width = "100%", i.style.top = `${-1 * (((o = a == null ? void 0 : a.scrollOffset) == null ? void 0 : o.y) ?? 0)}px`, i.style.left = "0";
20
21
  };
21
- function M(i, a = "viewport") {
22
+ function v(i, a = "viewport") {
22
23
  if (a === "positioned-parent") {
23
24
  const o = i.positionedParent.getBoundingClientRect();
24
25
  return {
@@ -37,7 +38,7 @@ function M(i, a = "viewport") {
37
38
  };
38
39
  }
39
40
  }
40
- const F = (i = {}) => O(i), O = (i = {}) => {
41
+ const F = (i = {}) => M(i), M = (i = {}) => {
41
42
  var l, y;
42
43
  const a = {
43
44
  // Much slower animation - 4x duration by reducing stiffness further
@@ -55,7 +56,7 @@ const F = (i = {}) => O(i), O = (i = {}) => {
55
56
  from: 1,
56
57
  to: 0,
57
58
  prepare: () => {
58
- v(t, g), t.style.opacity = "1";
59
+ O(t, g), t.style.opacity = "1";
59
60
  },
60
61
  tick: (w) => {
61
62
  t.style.opacity = String(w);
@@ -66,7 +67,7 @@ const F = (i = {}) => O(i), O = (i = {}) => {
66
67
  };
67
68
  },
68
69
  in: async (t, g) => {
69
- const s = M(g, d), w = t.style.transform, b = t.style.transformOrigin, x = t.style.position, $ = t.style.zIndex;
70
+ const s = v(g, d), w = t.style.transform, b = t.style.transformOrigin, x = t.style.position, $ = t.style.zIndex;
70
71
  return {
71
72
  spring: a,
72
73
  from: 0,
@@ -79,38 +80,38 @@ const F = (i = {}) => O(i), O = (i = {}) => {
79
80
  ), t.style.setProperty("--border-radius-scale", "1"), t.style.willChange = "transform", t.style.backfaceVisibility = "hidden", d === "positioned-parent")
80
81
  t.style.transformOrigin = "50% 50%", t.style.position = "absolute", t.style.top = "0px", t.style.left = "0px", t.style.width = `${s.width}px`, t.style.height = `${s.height}px`;
81
82
  else {
82
- const p = s.left + s.width / 2, h = s.top + s.height / 2;
83
- t.style.transformOrigin = `${p}px ${h}px`, t.style.position = "fixed", t.style.top = `${s.top}px`, t.style.left = `${s.left}px`, t.style.width = `${s.width}px`, t.style.height = `${s.height}px`;
83
+ const f = s.left + s.width / 2, h = s.top + s.height / 2;
84
+ t.style.transformOrigin = `${f}px ${h}px`, t.style.position = "fixed", t.style.top = `${s.top}px`, t.style.left = `${s.left}px`, t.style.width = `${s.width}px`, t.style.height = `${s.height}px`;
84
85
  }
85
86
  t.style.zIndex = "1000", t.style.overflow = "hidden", t.style.transform = `rotate(${o}deg) scale(${e}) translateZ(0)`, t.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", t.style.opacity = "1";
86
87
  },
87
88
  tick: (r) => {
88
- let p;
89
+ let f;
89
90
  if (r <= 0.05)
90
- p = e;
91
+ f = e;
91
92
  else if (r <= n) {
92
93
  const c = (r - 0.05) / (n - 0.05), u = Math.pow(c, 9);
93
- p = e + (0.8 - e) * u;
94
+ f = e + (0.8 - e) * u;
94
95
  } else {
95
96
  const c = (r - n) / (1 - n);
96
- p = 0.8 + 0.2 * (1 - Math.pow(1 - c, 3));
97
+ f = 0.8 + 0.2 * (1 - Math.pow(1 - c, 3));
97
98
  }
98
99
  let h;
99
- const f = 0.7;
100
- if (r <= f)
100
+ const p = 0.7;
101
+ if (r <= p)
101
102
  h = o;
102
103
  else {
103
- const c = (r - f) / (1 - f), u = 1 - Math.pow(1 - c, 2);
104
+ const c = (r - p) / (1 - p), u = 1 - Math.pow(1 - c, 2);
104
105
  h = o * (1 - u);
105
106
  }
106
107
  let P;
107
- if (r <= f)
108
+ if (r <= p)
108
109
  P = 1;
109
110
  else {
110
- const c = (r - f) / (1 - f);
111
+ const c = (r - p) / (1 - p);
111
112
  P = 1 - Math.pow(c, 0.5);
112
113
  }
113
- t.style.transform = `rotate(${h.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`, t.style.setProperty(
114
+ t.style.transform = `rotate(${h.toFixed(2)}deg) scale(${f.toFixed(4)}) translateZ(0)`, t.style.setProperty(
114
115
  "--border-radius-scale",
115
116
  P.toFixed(4)
116
117
  );
@@ -125,6 +126,6 @@ const F = (i = {}) => O(i), O = (i = {}) => {
125
126
  export {
126
127
  F as a,
127
128
  R as g,
128
- O as j,
129
- v as p
129
+ M as j,
130
+ O as p
130
131
  };
@@ -1 +1 @@
1
- {"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAa9D,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAuFlD,CAAC"}
1
+ {"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAa9D,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAuHlD,CAAC"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../jaemin-DL1-g_B5.cjs"),Y=t=>new Promise(n=>setTimeout(n,t));function q(t,n=0){const i=Math.pow(10,n);return Math.round(t*i)/i}const G={stiffness:80,damping:25},V={stiffness:75,damping:25},j=300,K=10,Z="horizontal",J="#000000",Q=(t={})=>{const{inSpring:n=V,outSpring:i=G,transitionDelay:d=j,blindCount:r=K,direction:s=Z,staggerDelay:c=100,blindColor:e=J}=t;let a,o=null;const l=(p,g,y="left")=>{window.getComputedStyle(p).position==="static"&&(p.style.position="relative");const h=document.createElement("div");h.className="blind-container",h.style.cssText=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../jaemin-BG8HRXG1.cjs"),Y=t=>new Promise(n=>setTimeout(n,t));function V(t,n=0){const i=Math.pow(10,n);return Math.round(t*i)/i}const q={stiffness:80,damping:25},G={stiffness:75,damping:25},j=300,K=10,Z="horizontal",J="#000000",Q=(t={})=>{const{inSpring:n=G,outSpring:i=q,transitionDelay:d=j,blindCount:r=K,direction:s=Z,staggerDelay:c=100,blindColor:e=J}=t;let a,l=null;const o=(p,g,u="left")=>{window.getComputedStyle(p).position==="static"&&(p.style.position="relative");const h=document.createElement("div");h.className="blind-container",h.style.cssText=`
2
2
  position: absolute;
3
3
  top: 0;
4
4
  left: 0;
@@ -7,29 +7,29 @@
7
7
  pointer-events: none;
8
8
  z-index: 9999;
9
9
  overflow: hidden;
10
- `;const f=[];for(let $=0;$<r;$++){const x=document.createElement("div");if(s==="horizontal"){const w=100/r,C=`calc(${w}% + 1px)`;x.style.cssText=`
10
+ `;const f=[];for(let $=0;$<r;$++){const w=document.createElement("div");if(s==="horizontal"){const x=100/r,S=`calc(${x}% + 1px)`;w.style.cssText=`
11
11
  position: absolute;
12
- top: ${w*$}%;
12
+ top: ${x*$}%;
13
13
  left: 0;
14
14
  width: 100%;
15
- height: ${C};
15
+ height: ${S};
16
16
  background: ${e};
17
17
  transform: scaleX(${g==="hidden"?0:1});
18
- transform-origin: ${y} center;
18
+ transform-origin: ${u} center;
19
19
  will-change: transform;
20
- `}else{const w=100/r,C=`calc(${w}% + 1px)`;x.style.cssText=`
20
+ `}else{const x=100/r,S=`calc(${x}% + 1px)`;w.style.cssText=`
21
21
  position: absolute;
22
22
  top: 0;
23
- left: ${w*$}%;
24
- width: ${C};
23
+ left: ${x*$}%;
24
+ width: ${S};
25
25
  height: 100%;
26
26
  background: ${e};
27
27
  transform: scaleY(${g==="hidden"?0:1});
28
- transform-origin: ${y==="left"?"top":"bottom"} center;
28
+ transform-origin: ${u==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}f.push(x),h.appendChild(x)}return p.appendChild(h),{container:h,blinds:f}};return{out:()=>{let p=null;return a=new Promise(y=>{o=y}),{springs:Array.from({length:r},(y,u)=>({from:0,to:1,spring:i,offset:u*c,tick:h=>{if(!p)return;const f=p.blinds[u];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:y=>{m.prepareOutgoing(y),y.style.zIndex="1000",p=l(y,"hidden","left")},onStart:()=>{},onEnd:()=>{o&&o()}}},in:()=>{let p=null;return{springs:Array.from({length:r},(y,u)=>({from:1,to:0,spring:n,offset:u*c,tick:h=>{if(!p)return;const f=p.blinds[u];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:y=>{y.style.position="relative",y.style.zIndex="0",p=l(y,"closed","right")},onStart:()=>{},wait:async()=>{a&&await a,await Y(d)},onEnd:()=>{p&&p.container&&p.container.remove()}}}}},R={stiffness:150,damping:20},tt={stiffness:100,damping:20},nt=(t={})=>{var s,c;const{opacity:n=!1,direction:i="enter"}=t,d=i==="enter"?R:tt,r={stiffness:((s=t.spring)==null?void 0:s.stiffness)??d.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??d.damping};return i==="enter"?{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform"},tick:a=>{e.style.transform=`translateX(${(1-a)*100}%)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto"}}),out:(e,a)=>({spring:r,prepare:o=>{m.prepareOutgoing(o,a),o.style.zIndex="-1",o.style.willChange=n?"transform, opacity":"transform"},tick:o=>{e.style.transform=`translateX(${-(1-o)*20}%)`,n&&(e.style.opacity=o.toString())}})}:{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform"},tick:a=>{e.style.transform=`translateX(${-(1-a)*20}%)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto"}}),out:(e,a)=>({spring:r,prepare:o=>{m.prepareOutgoing(o,a),o.style.willChange=n?"transform, opacity":"transform",o.style.zIndex="100"},tick:o=>{e.style.transform=`translateX(${(1-o)*100}%)`,n&&(e.style.opacity=o.toString())}})}},et={stiffness:65,damping:16},it={stiffness:65,damping:14},st=0,rt=(t={})=>{const{inSpring:n=it,outSpring:i=et,transitionDelay:d=st}=t;let r,s=null;return{in:c=>({spring:n,prepare:e=>{e.style.opacity="0",e.style.willChange="opacity"},wait:async()=>{r&&(await r,await Y(d))},tick:e=>{const a=q(e,2);c.style.opacity=a.toString()},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>(r=new Promise(a=>{s=a}),{spring:i,tick:a=>{c.style.opacity=a.toString()},prepare:()=>{m.prepareOutgoing(c,e),c.style.willChange="opacity"},onEnd:()=>{s&&s(),c.style.willChange="auto"}})}},lt={stiffness:5,damping:3.5},at=.8,ot="white",b={start:0,end:.45},E={start:.85,end:1},A={start:.2,end:.9},ct=t=>{var r;const n=(t==null?void 0:t.spring)??lt,i=(t==null?void 0:t.scale)??at,d=((r=t==null?void 0:t.border)==null?void 0:r.color)??ot;return{out:async(s,c)=>{const e=P(c),a=m.getRect(document.body,c.positionedParent),o=ht(d,{...e,top:a.top});let l=1,p=-e.top;return{spring:n,prepare:()=>{m.prepareOutgoing(s),_(s,e),I(s,e),pt(s,e);for(const g of o)c.positionedParent.appendChild(g)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const g of o)c.positionedParent.removeChild(g)},1e3)},tick:g=>{const y=1-g;if(b.start<=y&&y<=b.end){const f=L(y,b.start,b.end);l=1-(1-i)*f}if(E.start<=y&&y<=E.end){const f=L(y,E.start,E.end);l=i+(1-i)*f}if(A.start<=y&&y<=A.end){const f=L(y,A.start,A.end);p=-e.top-e.height*f}s.style.transform=`translateY(${p}px) scale(${l})`;const u=(e.width-e.width*l)/2,h=(e.height-e.height*l)/2;dt(o,u,h)}}},in:async(s,c)=>{const e=P(c);let a=i,o=-e.top+e.height;return{spring:n,prepare:()=>{_(s,e),I(s,e),s.style.transform=`translateY(${-e.top+e.height}px) scale(${i})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""},tick:l=>{if(b.start<=l&&l<=b.end){const p=L(l,b.start,b.end);a=1-(1-i)*p}if(E.start<=l&&l<=E.end){const p=L(l,E.start,E.end);a=i+(1-i)*p}if(A.start<=l&&l<=A.end){const p=L(l,A.start,A.end);o=-e.top+e.height*(1-p)}s.style.transform=`translateY(${o}px) scale(${a})`}}}}};function dt(t,n,i){const d=n*.7,r=i*.7;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)`}function ht(t="white",n){const r=document.createElement("div");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";const s=document.createElement("div");s.style.position="absolute",s.style.width="15px",s.style.height="1px",s.style.backgroundColor=t,s.style.top="0",s.style.left="0";const c=document.createElement("div");c.style.position="absolute",c.style.width="1px",c.style.height="15px",c.style.backgroundColor=t,c.style.top="0",c.style.left="0",r.appendChild(s),r.appendChild(c);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${n.top-1}px`,e.style.left=`${n.left+n.width-15+1}px`,e.style.width="15px",e.style.height="15px";const a=document.createElement("div");a.style.position="absolute",a.style.width="15px",a.style.height="1px",a.style.backgroundColor=t,a.style.top="0",a.style.right="0";const o=document.createElement("div");o.style.position="absolute",o.style.width="1px",o.style.height="15px",o.style.backgroundColor=t,o.style.top="0",o.style.right="0",e.appendChild(a),e.appendChild(o);const l=document.createElement("div");l.style.position="fixed",l.style.pointerEvents="none",l.style.zIndex="9999",l.style.top=`${n.top+n.height-15+1}px`,l.style.left=`${n.left-1}px`,l.style.width="15px",l.style.height="15px";const p=document.createElement("div");p.style.position="absolute",p.style.width="15px",p.style.height="1px",p.style.backgroundColor=t,p.style.bottom="0",p.style.left="0";const g=document.createElement("div");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);const y=document.createElement("div");y.style.position="fixed",y.style.pointerEvents="none",y.style.zIndex="9999",y.style.top=`${n.top+n.height-15+1}px`,y.style.left=`${n.left+n.width-15+1}px`,y.style.width="15px",y.style.height="15px";const u=document.createElement("div");u.style.position="absolute",u.style.width="15px",u.style.height="1px",u.style.backgroundColor=t,u.style.bottom="0",u.style.right="0";const h=document.createElement("div");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",y.appendChild(u),y.appendChild(h),{topLeft:r,topRight:e,bottomLeft:l,bottomRight:y,*[Symbol.iterator](){yield r,yield e,yield l,yield y}}}function P(t){const n=m.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function _(t,n){const i=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${i}px ${d}px`}function I(t,n){t.style.clipPath=`polygon(
30
+ `}f.push(w),h.appendChild(w)}return p.appendChild(h),{container:h,blinds:f}};return{out:()=>{let p=null;return a=new Promise(u=>{l=u}),{springs:Array.from({length:r},(u,y)=>({from:0,to:1,spring:i,offset:y*c,tick:h=>{if(!p)return;const f=p.blinds[y];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:u=>{b.prepareOutgoing(u),u.style.zIndex="1000",p=o(u,"hidden","left")},onStart:()=>{},onEnd:()=>{l&&l()}}},in:()=>{let p=null;return{springs:Array.from({length:r},(u,y)=>({from:1,to:0,spring:n,offset:y*c,tick:h=>{if(!p)return;const f=p.blinds[y];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:u=>{u.style.position="relative",u.style.zIndex="0",p=o(u,"closed","right")},onStart:()=>{},wait:async()=>{a&&await a,await Y(d)},onEnd:()=>{p&&p.container&&p.container.remove()}}}}},R={stiffness:150,damping:20},tt={stiffness:100,damping:20},nt=(t={})=>{var s,c;const{opacity:n=!1,direction:i="enter"}=t,d=i==="enter"?R:tt,r={stiffness:((s=t.spring)==null?void 0:s.stiffness)??d.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??d.damping};return i==="enter"?{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.perspective="1000px",e.style.transformStyle="preserve-3d",e.style.contain="layout paint"},tick:a=>{e.style.transform=`translate3d(${(1-a)*100}%, 0, 0)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.perspective="",e.style.transformStyle="",e.style.contain=""}}),out:(e,a)=>({spring:r,prepare:l=>{b.prepareOutgoing(l,a),l.style.zIndex="-1",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.perspective="1000px",l.style.transformStyle="preserve-3d",l.style.contain="layout paint",l.style.pointerEvents="none"},tick:l=>{e.style.transform=`translate3d(${-(1-l)*20}%, 0, 0)`,n&&(e.style.opacity=l.toString())}})}:{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.perspective="1000px",e.style.transformStyle="preserve-3d",e.style.contain="layout paint"},tick:a=>{e.style.transform=`translate3d(${-(1-a)*20}%, 0, 0)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.perspective="",e.style.transformStyle="",e.style.contain=""}}),out:(e,a)=>({spring:r,prepare:l=>{b.prepareOutgoing(l,a),l.style.zIndex="100",l.style.willChange=n?"transform, opacity":"transform",l.style.backfaceVisibility="hidden",l.style.perspective="1000px",l.style.transformStyle="preserve-3d",l.style.contain="layout paint",l.style.pointerEvents="none"},tick:l=>{e.style.transform=`translate3d(${(1-l)*100}%, 0, 0)`,n&&(e.style.opacity=l.toString())}})}},et={stiffness:65,damping:16},it={stiffness:65,damping:14},st=0,rt=(t={})=>{const{inSpring:n=it,outSpring:i=et,transitionDelay:d=st}=t;let r,s=null;return{in:c=>({spring:n,prepare:e=>{e.style.opacity="0",e.style.willChange="opacity"},wait:async()=>{r&&(await r,await Y(d))},tick:e=>{const a=V(e,2);c.style.opacity=a.toString()},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>(r=new Promise(a=>{s=a}),{spring:i,tick:a=>{c.style.opacity=a.toString()},prepare:()=>{b.prepareOutgoing(c,e),c.style.willChange="opacity"},onEnd:()=>{s&&s(),c.style.willChange="auto"}})}},lt={stiffness:5,damping:3.5},at=.8,ot="white",m={start:0,end:.45},E={start:.85,end:1},A={start:.2,end:.9},ct=t=>{var r;const n=(t==null?void 0:t.spring)??lt,i=(t==null?void 0:t.scale)??at,d=((r=t==null?void 0:t.border)==null?void 0:r.color)??ot;return{out:async(s,c)=>{const e=v(c),a=b.getRect(document.body,c.positionedParent),l=ht(d,{...e,top:a.top});let o=1,p=-e.top;return{spring:n,prepare:()=>{b.prepareOutgoing(s),P(s,e),_(s,e),pt(s,e);for(const g of l)c.positionedParent.appendChild(g)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const g of l)c.positionedParent.removeChild(g)},1e3)},tick:g=>{const u=1-g;if(m.start<=u&&u<=m.end){const f=L(u,m.start,m.end);o=1-(1-i)*f}if(E.start<=u&&u<=E.end){const f=L(u,E.start,E.end);o=i+(1-i)*f}if(A.start<=u&&u<=A.end){const f=L(u,A.start,A.end);p=-e.top-e.height*f}s.style.transform=`translateY(${p}px) scale(${o})`;const y=(e.width-e.width*o)/2,h=(e.height-e.height*o)/2;dt(l,y,h)}}},in:async(s,c)=>{const e=v(c);let a=i,l=-e.top+e.height;return{spring:n,prepare:()=>{P(s,e),_(s,e),s.style.transform=`translateY(${-e.top+e.height}px) scale(${i})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""},tick:o=>{if(m.start<=o&&o<=m.end){const p=L(o,m.start,m.end);a=1-(1-i)*p}if(E.start<=o&&o<=E.end){const p=L(o,E.start,E.end);a=i+(1-i)*p}if(A.start<=o&&o<=A.end){const p=L(o,A.start,A.end);l=-e.top+e.height*(1-p)}s.style.transform=`translateY(${l}px) scale(${a})`}}}}};function dt(t,n,i){const d=n*.7,r=i*.7;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)`}function ht(t="white",n){const r=document.createElement("div");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";const s=document.createElement("div");s.style.position="absolute",s.style.width="15px",s.style.height="1px",s.style.backgroundColor=t,s.style.top="0",s.style.left="0";const c=document.createElement("div");c.style.position="absolute",c.style.width="1px",c.style.height="15px",c.style.backgroundColor=t,c.style.top="0",c.style.left="0",r.appendChild(s),r.appendChild(c);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${n.top-1}px`,e.style.left=`${n.left+n.width-15+1}px`,e.style.width="15px",e.style.height="15px";const a=document.createElement("div");a.style.position="absolute",a.style.width="15px",a.style.height="1px",a.style.backgroundColor=t,a.style.top="0",a.style.right="0";const l=document.createElement("div");l.style.position="absolute",l.style.width="1px",l.style.height="15px",l.style.backgroundColor=t,l.style.top="0",l.style.right="0",e.appendChild(a),e.appendChild(l);const o=document.createElement("div");o.style.position="fixed",o.style.pointerEvents="none",o.style.zIndex="9999",o.style.top=`${n.top+n.height-15+1}px`,o.style.left=`${n.left-1}px`,o.style.width="15px",o.style.height="15px";const p=document.createElement("div");p.style.position="absolute",p.style.width="15px",p.style.height="1px",p.style.backgroundColor=t,p.style.bottom="0",p.style.left="0";const g=document.createElement("div");g.style.position="absolute",g.style.width="1px",g.style.height="15px",g.style.backgroundColor=t,g.style.bottom="0",g.style.left="0",o.appendChild(p),o.appendChild(g);const u=document.createElement("div");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";const y=document.createElement("div");y.style.position="absolute",y.style.width="15px",y.style.height="1px",y.style.backgroundColor=t,y.style.bottom="0",y.style.right="0";const h=document.createElement("div");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),{topLeft:r,topRight:e,bottomLeft:o,bottomRight:u,*[Symbol.iterator](){yield r,yield e,yield o,yield u}}}function v(t){const n=b.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function P(t,n){const i=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${i}px ${d}px`}function _(t,n){t.style.clipPath=`polygon(
31
31
  ${n.left}px ${n.top}px,
32
32
  ${n.left+n.width}px ${n.top}px,
33
33
  ${n.left+n.width}px ${n.top+n.height}px,
34
34
  ${n.left}px ${n.top+n.height}px
35
- )`}function pt(t,n){t.style.transform=`translateY(${-n.top}px)`}function L(t,n,i){return t<=n?0:t>=i?1:(t-n)/(i-n)}function ut(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const yt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??300,damping:((e=t.spring)==null?void 0:e.damping)??30},i=t.timeout??300,d=t.maxDistance??700;let r=null,s=null;return{in:async(a,o)=>{const l=a,p=Array.from(l.querySelectorAll("[data-hero-key]"));if(p.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(u=>{r?u(!0):(s=u,setTimeout(()=>{s=null,u(!1)},i))})||!r)return r=null,{spring:n,tick:()=>{}};const y=p.map(u=>{const h=u.getAttribute("data-hero-key");if(!h)return null;const f=ut(r,h);if(!f)return null;const $=u,x=m.getRect(r,f),w=m.getRect(l,$),C=x.left-w.left-o.scrollOffset.x,U=x.top-w.top-o.scrollOffset.y,X=x.width/w.width,W=x.height/w.height,z=$.style.transform,B=$.style.position,M=$.style.transformOrigin,H=$.style.zIndex,N=$.style.willChange;return{toEl:$,dx:C,dy:U,dw:X,dh:W,originalTransform:z,originalPosition:B,originalTransformOrigin:M,originalZIndex:H,originalWillChange:N}}).filter(u=>u!==null&&Math.abs(u.dy)<=d);return r=null,y.length===0?{spring:n,tick:()=>{}}:{spring:n,prepare:()=>{y.forEach(({toEl:u})=>{u.style.position="relative",u.style.transformOrigin="top left",u.style.zIndex="1000",u.style.willChange="transform"})},tick:u=>{y.forEach(({toEl:h,dx:f,dy:$,dw:x,dh:w})=>{h.style.transform=`translate(${(1-u)*f}px,${(1-u)*$}px) scale(${u+(1-u)*x}, ${u+(1-u)*w})`})},onEnd:()=>{y.forEach(({toEl:u,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:x,originalWillChange:w})=>{u.style.transform=h,u.style.position=f,u.style.transformOrigin=$,u.style.zIndex=x,u.style.willChange=w})}}},out:async a=>({onStart:()=>{r=a,s&&(s(!0),s=null)},prepare:o=>{m.prepareOutgoing(o),o.style.opacity="0"}})}};function gt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,o=Math.max(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(o-1)*h})`}}function ft({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,o=Math.min(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(o-1)*h})`}}function $t(t,n,i){const d=t.querySelector("[data-instagram-detail-key]"),r=n.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||n.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let s=null,c=null,e=!1;if(!d&&r){c=r;const l=c.getAttribute("data-instagram-detail-key");if(!l)return null;s=t.querySelector(`[data-instagram-gallery-key="${l}"]`),s&&(e=!0)}else if(d&&!r){c=d;const l=c.getAttribute("data-instagram-detail-key");if(!l)return null;s=n.querySelector(`[data-instagram-gallery-key="${l}"]`),s&&(e=!1)}if(!s||!c)return null;const a=m.getRect(e?t:n,s),o=m.getRect(e?n:t,c);return e?{isEnterMode:!0,inAnimation:gt({detailRect:o,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n)}:{isEnterMode:!1,outAnimation:ft({detailRect:o,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const wt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??150,damping:((e=t.spring)==null?void 0:e.damping)??20},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:o})=>{const l=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=$t(d,l,o),s?(d=null,{spring:n,tick:g=>{s!=null&&s.inAnimation&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async(a,o)=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:l=>{m.prepareOutgoing(l,o),s!=null&&s.isEnterMode||(l.style.zIndex="-1")},tick:l=>{s!=null&&s.outAnimation&&s.outAnimation(l)}})}};function xt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,o=Math.max(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(o-1)*h})`}}function mt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2+i.x,s=n.top-t.top+(n.height-t.height)/2+i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return o=>{d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const l=1-o;d.style.transform=`translate(${r*l-i.x}px, ${s*l-i.y}px) scale(${1+(a-1)*l})`,d.style.opacity=`${1-l}`}}function bt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2-i.x,s=n.top-t.top+(n.height-t.height)/2-i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return o=>{const l=1-o,p=o;d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,d.style.transform=`translate(${r*l}px, ${s*l}px) scale(${1+(a-1)*l})`,d.style.opacity=`${p}`}}function Et({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,o=Math.min(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(o-1)*h})`}}function At(t,n,i){const d=t.querySelector("[data-pinterest-detail-key]"),r=n.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||n.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let s=null,c=null,e=!1;if(!d&&r){c=r;const l=c.getAttribute("data-pinterest-detail-key");if(!l)return null;s=t.querySelector(`[data-pinterest-gallery-key="${l}"]`),s&&(e=!0)}else if(d&&!r){c=d;const l=c.getAttribute("data-pinterest-detail-key");if(!l)return null;s=n.querySelector(`[data-pinterest-gallery-key="${l}"]`),s&&(e=!1)}if(!s||!c)return null;const a=m.getRect(e?t:n,s),o=m.getRect(e?n:t,c);return e?{inAnimation:xt({detailRect:o,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n),outAnimation:mt({galleryRect:a,detailRect:o,scrollOffset:i},t)}:{inAnimation:bt({galleryRect:a,detailRect:o,scrollOffset:i},n),outAnimation:Et({detailRect:o,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const Lt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??30,damping:((e=t.spring)==null?void 0:e.damping)??10},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:o})=>{const l=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=At(d,l,o),s?(d=null,{spring:n,tick:g=>{s&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async a=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:o=>{m.prepareOutgoing(o),o.style.zIndex="-1"},tick:o=>{s&&s.outAnimation(o)}})}},D={stiffness:5,damping:4},Ct=(t={})=>{var a,o;const n=t.direction??"up",i={stiffness:((a=t.spring)==null?void 0:a.stiffness)??D.stiffness,damping:((o=t.spring)==null?void 0:o.damping)??D.damping},d=n==="up";let r=null,s=null,c=null;const e=()=>{if(r===null||s===null)return null;const l=Math.min(r,s),p=window.innerHeight;return Math.max(l,p)};return{in:l=>(s=l.offsetHeight,r!==null&&(c=e()),{spring:i,prepare:()=>{l.style.willChange="transform"},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*c:(1-p)*-c;l.style.transform=`translateY(${g}px)`},onEnd:()=>{l.style.willChange="auto"}}),out:l=>({spring:i,onStart:()=>{r=l.offsetHeight,s!==null&&(c=e())},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*-c:(1-p)*c;l.style.transform=`translateY(${g}px)`},prepare:p=>{m.prepareOutgoing(p),p.style.zIndex=d?"-1":"1",p.style.willChange="transform"}})}},O={stiffness:15,damping:7},Tt=(t={})=>{var r,s;const n=t.direction??"left",i={stiffness:((r=t.spring)==null?void 0:r.stiffness)??O.stiffness,damping:((s=t.spring)==null?void 0:s.damping)??O.damping},d=n==="left";return{in:c=>({spring:i,prepare:()=>{c.style.willChange="transform"},tick:e=>{const a=d?(1-e)*100:(1-e)*-100;c.style.transform=`translateX(${a}%)`},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>({spring:i,tick:a=>{const o=d?(1-a)*-100:(1-a)*100;c.style.transform=`translateX(${o}%)`},prepare:a=>{m.prepareOutgoing(a,e),a.style.zIndex=d?"-1":"1",a.style.willChange="transform"}})}},v={stiffness:17,damping:6},S=20,k=800,St=()=>{let t,n=null;return{in:i=>({spring:v,prepare:d=>{d.style.willChange="transform",d.style.transform=`perspective(${k}px) rotateY(${S}deg) translateX(-100%)`},wait:async()=>{t&&await t},tick:d=>{const r=(1-d)*S,s=-(1-d)*100;i.style.transform=`perspective(${k}px) rotateY(${r}deg) translateX(${s}%)`},onEnd:()=>{i.style.transform="",i.style.willChange="auto"}}),out:(i,d)=>(t=new Promise(r=>{n=r}),{spring:v,prepare:r=>{m.prepareOutgoing(r,d),r.style.willChange="transform"},tick:r=>{const s=1-r,c=s*S,e=s*100;i.style.transform=`perspective(${k}px) rotateY(${-c}deg) translateX(${e}%)`},onEnd:()=>{n&&n(),i.style.transform=""}})}},kt={stiffness:1,damping:1},Pt={stiffness:20,damping:25},_t="#000000",It="circle",F="CURTAIN_REVEAL_OVERLAY_ID",Dt={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},Ot={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},vt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ft={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Yt=.4,T=.5,Ut=.2;function Xt(t,n){switch(t){case"circle":return`circle(${n*100}% at 50% 50%)`;case"square":return`inset(${(1-n)*50}% round ${10*n}%)`;case"triangle":{const i=n*100;return`polygon(50% ${50-i}%, ${50-i}% ${50+i}%, ${50+i}% ${50+i}%)`}}}const Wt=t=>t.reduce((n,i)=>n+i,0),zt=(t={})=>{const{background:n=_t,texts:i=[],shape:d=It,inSpring:r=Pt,outSpring:s=kt,textStyle:c={}}=t;return{out:(e,a)=>{const o=e.style.opacity;return{spring:s,from:1,to:0,prepare:l=>{m.prepareOutgoing(l,a),l.style.opacity="1"},tick:l=>{const p=Math.max(0,l-Yt);e.style.opacity=String(p)},onEnd:()=>{e.style.opacity=o}}},in:e=>{let a=null,o=null,l=null;const p=document.body.style.overflow,g=document.getElementById(F);let y=[];const u=()=>{a=document.createElement("div"),a.id=F,Object.assign(a.style,Dt,{background:n}),document.body.appendChild(a),o=document.createElement("div"),Object.assign(o.style,Ot),a.appendChild(o),l=document.createElement("div"),Object.assign(l.style,vt),o.appendChild(l),i.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ft,c),l.appendChild(f)}),y=Array.from(l.children).map(h=>h.getBoundingClientRect().width)};return{spring:r,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",g==null||g.remove(),u(),a&&o&&(a.style.clipPath="none",o.style.transform="scale(1)")},tick:h=>{if(!(!a||!o||!l)){if(h<=T&&i.length>0){const f=h/T,$=Math.min(Math.floor(f*i.length),i.length-1),x=y[$]??0,w=Wt(y.slice(0,$));o.style.width=`${x}px`,l.style.transform=`translateX(-${w}px)`}if(h>T){const $=1-Math.max(0,Math.min(1,(h-T)/Ut));a.style.clipPath=Xt(d,$),o.style.transform=`scale(${$})`}}},onEnd:()=>{a==null||a.remove(),a=o=l=null,document.body.style.overflow=p}}}}};exports.jaemin=m.jaemin;exports.blind=Q;exports.curtainReveal=zt;exports.drill=nt;exports.fade=rt;exports.film=ct;exports.hero=yt;exports.instagram=wt;exports.pinterest=Lt;exports.scroll=Ct;exports.slide=Tt;exports.strip=St;
35
+ )`}function pt(t,n){t.style.transform=`translateY(${-n.top}px)`}function L(t,n,i){return t<=n?0:t>=i?1:(t-n)/(i-n)}function yt(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const ut=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??300,damping:((e=t.spring)==null?void 0:e.damping)??30},i=t.timeout??300,d=t.maxDistance??700;let r=null,s=null;return{in:async(a,l)=>{const o=a,p=Array.from(o.querySelectorAll("[data-hero-key]"));if(p.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(y=>{r?y(!0):(s=y,setTimeout(()=>{s=null,y(!1)},i))})||!r)return r=null,{spring:n,tick:()=>{}};const u=p.map(y=>{const h=y.getAttribute("data-hero-key");if(!h)return null;const f=yt(r,h);if(!f)return null;const $=y,w=b.getRect(r,f),x=b.getRect(o,$),S=w.left-x.left-l.scrollOffset.x,U=w.top-x.top-l.scrollOffset.y,W=w.width/x.width,X=w.height/x.height,z=$.style.transform,B=$.style.position,M=$.style.transformOrigin,H=$.style.zIndex,N=$.style.willChange;return{toEl:$,dx:S,dy:U,dw:W,dh:X,originalTransform:z,originalPosition:B,originalTransformOrigin:M,originalZIndex:H,originalWillChange:N}}).filter(y=>y!==null&&Math.abs(y.dy)<=d);return r=null,u.length===0?{spring:n,tick:()=>{}}:{spring:n,prepare:()=>{u.forEach(({toEl:y})=>{y.style.position="relative",y.style.transformOrigin="top left",y.style.zIndex="1000",y.style.willChange="transform"})},tick:y=>{u.forEach(({toEl:h,dx:f,dy:$,dw:w,dh:x})=>{h.style.transform=`translate(${(1-y)*f}px,${(1-y)*$}px) scale(${y+(1-y)*w}, ${y+(1-y)*x})`})},onEnd:()=>{u.forEach(({toEl:y,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:w,originalWillChange:x})=>{y.style.transform=h,y.style.position=f,y.style.transformOrigin=$,y.style.zIndex=w,y.style.willChange=x})}}},out:async a=>({onStart:()=>{r=a,s&&(s(!0),s=null)},prepare:l=>{b.prepareOutgoing(l),l.style.opacity="0"}})}};function gt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function ft({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function $t(t,n,i){const d=t.querySelector("[data-instagram-detail-key]"),r=n.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||n.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let s=null,c=null,e=!1;if(!d&&r){c=r;const o=c.getAttribute("data-instagram-detail-key");if(!o)return null;s=t.querySelector(`[data-instagram-gallery-key="${o}"]`),s&&(e=!0)}else if(d&&!r){c=d;const o=c.getAttribute("data-instagram-detail-key");if(!o)return null;s=n.querySelector(`[data-instagram-gallery-key="${o}"]`),s&&(e=!1)}if(!s||!c)return null;const a=b.getRect(e?t:n,s),l=b.getRect(e?n:t,c);return e?{isEnterMode:!0,inAnimation:gt({detailRect:l,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n)}:{isEnterMode:!1,outAnimation:ft({detailRect:l,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const xt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??150,damping:((e=t.spring)==null?void 0:e.damping)??20},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:l})=>{const o=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=$t(d,o,l),s?(d=null,{spring:n,tick:g=>{s!=null&&s.inAnimation&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async a=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:l=>{b.prepareOutgoing(l),s!=null&&s.isEnterMode||(l.style.zIndex="-1")},tick:l=>{s!=null&&s.outAnimation&&s.outAnimation(l)}})}};function wt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,l=Math.max(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(l-1)*h})`}}function bt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2+i.x,s=n.top-t.top+(n.height-t.height)/2+i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return l=>{d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const o=1-l;d.style.transform=`translate(${r*o-i.x}px, ${s*o-i.y}px) scale(${1+(a-1)*o})`,d.style.opacity=`${1-o}`}}function mt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2-i.x,s=n.top-t.top+(n.height-t.height)/2-i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return l=>{const o=1-l,p=l;d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,d.style.transform=`translate(${r*o}px, ${s*o}px) scale(${1+(a-1)*o})`,d.style.opacity=`${p}`}}function Et({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,l=Math.min(e,a),o=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,u=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,y=>{const h=1-y,f=o*h,$=p*h,w=g*h,x=u*h;r.style.clipPath=`inset(${f}% ${$}% ${w}% ${x}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(l-1)*h})`}}function At(t,n,i){const d=t.querySelector("[data-pinterest-detail-key]"),r=n.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||n.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let s=null,c=null,e=!1;if(!d&&r){c=r;const o=c.getAttribute("data-pinterest-detail-key");if(!o)return null;s=t.querySelector(`[data-pinterest-gallery-key="${o}"]`),s&&(e=!0)}else if(d&&!r){c=d;const o=c.getAttribute("data-pinterest-detail-key");if(!o)return null;s=n.querySelector(`[data-pinterest-gallery-key="${o}"]`),s&&(e=!1)}if(!s||!c)return null;const a=b.getRect(e?t:n,s),l=b.getRect(e?n:t,c);return e?{inAnimation:wt({detailRect:l,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n),outAnimation:bt({galleryRect:a,detailRect:l,scrollOffset:i},t)}:{inAnimation:mt({galleryRect:a,detailRect:l,scrollOffset:i},n),outAnimation:Et({detailRect:l,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const Lt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??30,damping:((e=t.spring)==null?void 0:e.damping)??10},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:l})=>{const o=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=At(d,o,l),s?(d=null,{spring:n,tick:g=>{s&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async a=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:l=>{b.prepareOutgoing(l),l.style.zIndex="-1"},tick:l=>{s&&s.outAnimation(l)}})}},I={stiffness:5,damping:4},St=(t={})=>{var a,l;const n=t.direction??"up",i={stiffness:((a=t.spring)==null?void 0:a.stiffness)??I.stiffness,damping:((l=t.spring)==null?void 0:l.damping)??I.damping},d=n==="up";let r=null,s=null,c=null;const e=()=>{if(r===null||s===null)return null;const o=Math.min(r,s),p=window.innerHeight;return Math.max(o,p)};return{in:o=>(s=o.offsetHeight,r!==null&&(c=e()),{spring:i,prepare:()=>{o.style.willChange="transform"},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*c:(1-p)*-c;o.style.transform=`translateY(${g}px)`},onEnd:()=>{o.style.willChange="auto"}}),out:o=>({spring:i,onStart:()=>{r=o.offsetHeight,s!==null&&(c=e())},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*-c:(1-p)*c;o.style.transform=`translateY(${g}px)`},prepare:p=>{b.prepareOutgoing(p),p.style.zIndex=d?"-1":"1",p.style.willChange="transform"}})}},D={stiffness:15,damping:7},Ct=(t={})=>{var r,s;const n=t.direction??"left",i={stiffness:((r=t.spring)==null?void 0:r.stiffness)??D.stiffness,damping:((s=t.spring)==null?void 0:s.damping)??D.damping},d=n==="left";return{in:c=>({spring:i,prepare:()=>{c.style.willChange="transform"},tick:e=>{const a=d?(1-e)*100:(1-e)*-100;c.style.transform=`translateX(${a}%)`},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>({spring:i,tick:a=>{const l=d?(1-a)*-100:(1-a)*100;c.style.transform=`translateX(${l}%)`},prepare:a=>{b.prepareOutgoing(a,e),a.style.zIndex=d?"-1":"1",a.style.willChange="transform"}})}},O={stiffness:17,damping:6},T=20,k=800,Tt=()=>{let t,n=null;return{in:i=>({spring:O,prepare:d=>{d.style.willChange="transform",d.style.transform=`perspective(${k}px) rotateY(${T}deg) translateX(-100%)`},wait:async()=>{t&&await t},tick:d=>{const r=(1-d)*T,s=-(1-d)*100;i.style.transform=`perspective(${k}px) rotateY(${r}deg) translateX(${s}%)`},onEnd:()=>{i.style.transform="",i.style.willChange="auto"}}),out:(i,d)=>(t=new Promise(r=>{n=r}),{spring:O,prepare:r=>{b.prepareOutgoing(r,d),r.style.willChange="transform"},tick:r=>{const s=1-r,c=s*T,e=s*100;i.style.transform=`perspective(${k}px) rotateY(${-c}deg) translateX(${e}%)`},onEnd:()=>{n&&n(),i.style.transform=""}})}},kt={stiffness:1,damping:1},vt={stiffness:20,damping:25},Pt="#000000",_t="circle",F="CURTAIN_REVEAL_OVERLAY_ID",It={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},Dt={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Ot={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ft={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Yt=.4,C=.5,Ut=.2;function Wt(t,n){switch(t){case"circle":return`circle(${n*100}% at 50% 50%)`;case"square":return`inset(${(1-n)*50}% round ${10*n}%)`;case"triangle":{const i=n*100;return`polygon(50% ${50-i}%, ${50-i}% ${50+i}%, ${50+i}% ${50+i}%)`}}}const Xt=t=>t.reduce((n,i)=>n+i,0),zt=(t={})=>{const{background:n=Pt,texts:i=[],shape:d=_t,inSpring:r=vt,outSpring:s=kt,textStyle:c={}}=t;return{out:(e,a)=>{const l=e.style.opacity;return{spring:s,from:1,to:0,prepare:o=>{b.prepareOutgoing(o,a),o.style.opacity="1"},tick:o=>{const p=Math.max(0,o-Yt);e.style.opacity=String(p)},onEnd:()=>{e.style.opacity=l}}},in:e=>{let a=null,l=null,o=null;const p=document.body.style.overflow,g=document.getElementById(F);let u=[];const y=()=>{a=document.createElement("div"),a.id=F,Object.assign(a.style,It,{background:n}),document.body.appendChild(a),l=document.createElement("div"),Object.assign(l.style,Dt),a.appendChild(l),o=document.createElement("div"),Object.assign(o.style,Ot),l.appendChild(o),i.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ft,c),o.appendChild(f)}),u=Array.from(o.children).map(h=>h.getBoundingClientRect().width)};return{spring:r,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",g==null||g.remove(),y(),a&&l&&(a.style.clipPath="none",l.style.transform="scale(1)")},tick:h=>{if(!(!a||!l||!o)){if(h<=C&&i.length>0){const f=h/C,$=Math.min(Math.floor(f*i.length),i.length-1),w=u[$]??0,x=Xt(u.slice(0,$));l.style.width=`${w}px`,o.style.transform=`translateX(-${x}px)`}if(h>C){const $=1-Math.max(0,Math.min(1,(h-C)/Ut));a.style.clipPath=Wt(d,$),l.style.transform=`scale(${$})`}}},onEnd:()=>{a==null||a.remove(),a=l=o=null,document.body.style.overflow=p}}}}};exports.jaemin=b.jaemin;exports.blind=Q;exports.curtainReveal=zt;exports.drill=nt;exports.fade=rt;exports.film=ct;exports.hero=ut;exports.instagram=xt;exports.pinterest=Lt;exports.scroll=St;exports.slide=Ct;exports.strip=Tt;