{"version":3,"file":"StackScale.nlDfrwQn.mjs","names":["useRef","__esmMin","init_ssg_sandbox_shims","window","de","c","init_jsx_runtime","init_npm_react_18_3_1","ce","withStackScale","ref","el","target","current","raf","docTop","y","measure","vh","top","h","render","onScroll","Component","props","init_StackScale"],"sources":["https:/framerusercontent.com/modules/fbxJwdYNvP6TjOnZNOHf/xKinqNWaSoBtgeQrQ95b/StackScale.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";export function withStackScale(Component){return props=>{const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el||typeof window===\"undefined\")return;let target=0,current=0,raf=0;const docTop=()=>{let y=0,n=el;while(n){y+=n.offsetTop;n=n.offsetParent;}return y;};const measure=()=>{const vh=window.innerHeight,top=docTop(),h=el.offsetHeight;target=Math.min(1,Math.max(0,(window.scrollY-(top-vh))/(vh+h)));};const render=()=>{current+=(target-current)*.08;if(Math.abs(target-current)<5e-4)current=target;el.style.transform=\"scale(\"+(1-.1*current).toFixed(4)+\")\";raf=current!==target?requestAnimationFrame(render):0;};const onScroll=()=>{measure();if(!raf)raf=requestAnimationFrame(render);};measure();current=target;render();window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",onScroll);return()=>{window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",onScroll);cancelAnimationFrame(raf);};},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withStackScale\":{\"type\":\"reactHoc\",\"name\":\"withStackScale\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StackScale.map"],"mappings":"A,uIAA+E,SAAgBS,EAAe,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMC,EAAIV,EAAO,IAAI,EAA63B,OAA33BQ,MAAc,CAAC,IAAMG,EAAGD,EAAI,QAAQ,GAAG,CAACC,GAAWR,IAA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