{"version":3,"file":"ScrollScale.CKAVwQPr.mjs","names":["React.useRef","__esmMin","c","J","init_jsx_runtime","init_npm_react_18_3_1","de","useTransform","useSpring","useScroll","init_framer_motion_DhsWWWsN","useScrollScale","ref","p","scrollYProgress","withScrollScale","local","setRef","el","mv","Component","props","init_ScrollScale"],"sources":["https:/framerusercontent.com/modules/9H30oQNvFvXZejHwJM1R/S6D8aiP1DZCEtbrdBEjI/ScrollScale.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{useScroll,useSpring,useTransform}from\"framer-motion\";/*\n * ScrollScale (3 Nov 2026): a code override that scales a hero graphic into view as the page\n * scrolls. It starts slightly smaller and softer while its top sits low in the viewport and reaches\n * full size by the time its top is about a third of the way down, with a soft spring so it never\n * snaps. Apply to the graphic (or the frame holding a stack of graphics) as Code Override\n * withScrollScale. Used on the utilities hero dashboard and the tech and telecoms hero graphics.\n * 5 Nov 2026: no opacity fade. Graphics stay fully opaque while they scale, so nothing behind them\n * (particles, lines) shows through (Ethan: infographics must be solid, glass belongs inside them).\n */function useScrollScale(ref){const{scrollYProgress}=useScroll({target:ref,offset:[\"start end\",\"start 30%\"]});const p=useSpring(scrollYProgress,{stiffness:90,damping:26,mass:.6});return{scale:useTransform(p,[0,1],[.86,1]),y:useTransform(p,[0,1],[36,0])};}export function withScrollScale(Component){return /*#__PURE__*/React.forwardRef((props,ref)=>{const local=React.useRef(null);const setRef=el=>{local.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;};const mv=useScrollScale(local);return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,style:{...props.style,scale:mv.scale,y:mv.y,transformOrigin:\"50% 0%\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollScale\":{\"type\":\"reactHoc\",\"name\":\"withScrollScale\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollScale.map"],"mappings":"A,wLAQG,SAASW,EAAe,EAAI,CAAC,GAAK,CAAC,mBAAiBF,EAAU,CAAC,OAAOG,EAAI,OAAO,CAAC,YAAY,WAAW,CAAC,CAAC,EAAQC,EAAEL,EAAUM,EAAgB,CAAC,UAAU,GAAG,QAAQ,GAAG,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,MAAMP,EAAaM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,EAAEN,EAAaM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC,SAAgBE,EAAgB,EAAU,CAAC,MAAoB,iBAAkB,EAAM,IAAM,CAAC,IAAMC,EAAMhB,EAAa,IAAI,EAAQiB,EAAO,GAAI,CAAC,EAAM,QAAQC,EAAM,OAAON,GAAM,WAAWA,EAAIM,CAAE,EAAUN,IAAI,EAAI,QAAQM,EAAG,EAAQC,EAAGR,EAAeK,CAAK,EAAE,MAAoB,gBAAKI,EAAU,CAAC,GAAGC,EAAM,IAAIJ,EAAO,MAAM,CAAC,GAAGI,EAAM,MAAM,MAAMF,EAAG,MAAM,EAAEA,EAAG,EAAE,gBAAgB,QAAQ,CAAC,CAAC,CAAE,CAAC,CAAE,C"}