{"version":3,"file":"shared-lib.DMoCYsDm.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/SGnOZWXGb0BDTMZ91twn/EgQDbK8tBt2bqaAKdQey/Motion.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef,useState}from\"react\";import{useReducedMotion}from\"framer-motion\";const EASE_IN=[.22,1,.36,1];const EASE_HERO=[.33,1,.68,1];// Safari swaps the fallback font in mid-animation, so the hero waits for real\n// glyphs (capped so a slow font never holds the page hostage).\nlet fontsReady=null;function whenFontsReady(){if(typeof document===\"undefined\")return Promise.resolve();if(!fontsReady){const timeout=new Promise(r=>setTimeout(r,1500));const fonts=document.fonts?.ready.then(()=>undefined)??Promise.resolve();fontsReady=Promise.race([fonts,timeout]);}return fontsReady;}function useFontsReady(){const[ready,setReady]=useState(false);useEffect(()=>{let alive=true;whenFontsReady().then(()=>alive&&setReady(true));return()=>{alive=false;};},[]);return ready;}function heroPiece(Component,delay,y,duration){return /*#__PURE__*/forwardRef((props,ref)=>{const ready=useFontsReady();const reduce=useReducedMotion();if(reduce)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,ref:ref,initial:{opacity:0,y},animate:ready?{opacity:1,y:0}:{opacity:0,y},transition:{duration,delay,ease:EASE_HERO}});});}// Heroes are the one slow, deliberate moment: the plate develops first, then\n// headline, subtitle and actions follow on a softer ease than the rest of the site.\nexport function withHeroTitle(Component){return heroPiece(Component,.25,16,1);}export function withHeroSub(Component){return heroPiece(Component,.42,12,1);}export function withHeroActions(Component){return heroPiece(Component,.58,10,.9);}// The plate \"develops\" into place after the headline lands, and only once\n// its image is fully decoded, so a hero never shows half-loaded.\nexport function withHeroPlate(Component){return /*#__PURE__*/forwardRef((props,forwarded)=>{const local=useRef(null);const fonts=useFontsReady();const reduce=useReducedMotion();const[decoded,setDecoded]=useState(false);useEffect(()=>{const el=local.current;if(!el)return setDecoded(true);const imgs=Array.from(el.querySelectorAll(\"img\"));Promise.all(imgs.map(img=>img.complete&&img.naturalWidth?Promise.resolve():img.decode().catch(()=>undefined))).then(()=>setDecoded(true));},[]);const setRef=node=>{local.current=node;if(typeof forwarded===\"function\")forwarded(node);else if(forwarded)forwarded.current=node;};if(reduce)return /*#__PURE__*/_jsx(Component,{...props,ref:forwarded});const ready=fonts&&decoded;return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,// Opacity only: a scale transform shows the plate's edge as a\n// hairline seam under the sky gradient while it settles.\ninitial:{opacity:0},animate:ready?{opacity:1}:{opacity:0},transition:{duration:.9,delay:.1,ease:EASE_IN}});});}// Images start loading ~1.5 screens early and reveal (a short rise and fade)\n// only when they are both in view and fully decoded, so nothing ever pops in\n// half-loaded or animates in empty.\nexport function useEarlyReveal(local,enabled){const[shown,setShown]=useState(false);useEffect(()=>{const el=local.current;if(!enabled)return;if(!el)return setShown(true);let inView=false;let decoded=false;let done=false;const show=()=>{if(!done&&inView&&decoded){done=true;setShown(true);}};const decodeAll=()=>{const imgs=Array.from(el.querySelectorAll(\"img\"));imgs.forEach(img=>{if(img.loading===\"lazy\")img.loading=\"eager\";});Promise.all(imgs.map(img=>img.complete&&img.naturalWidth?Promise.resolve():img.decode().catch(()=>undefined))).then(()=>{decoded=true;show();});};const near=new IntersectionObserver(e=>{if(e.some(x=>x.isIntersecting)){near.disconnect();decodeAll();}},{rootMargin:\"150% 0px 150% 0px\"});const view=new IntersectionObserver(e=>{if(e.some(x=>x.isIntersecting)){view.disconnect();inView=true;show();}},{threshold:.12});near.observe(el);view.observe(el);// Never leave anything hidden if decoding stalls.\nconst failsafe=setTimeout(()=>{decoded=true;show();},4e3);return()=>{near.disconnect();view.disconnect();clearTimeout(failsafe);};},[enabled]);return shown;}export function withImageReveal(Component){return /*#__PURE__*/forwardRef((props,forwarded)=>{const local=useRef(null);const reduce=useReducedMotion();const shown=useEarlyReveal(local,!reduce);const setRef=node=>{local.current=node;if(typeof forwarded===\"function\")forwarded(node);else if(forwarded)forwarded.current=node;};if(reduce)return /*#__PURE__*/_jsx(Component,{...props,ref:forwarded});return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,initial:{opacity:0,y:12},animate:shown?{opacity:1,y:0}:{opacity:0,y:12},transition:{duration:.7,ease:EASE_IN}});});}// Rules and progress bars draw from the left when they enter, so a section's\n// structure appears to be ruled in rather than faded in.\nfunction drawLine(Component,delay,duration){return /*#__PURE__*/forwardRef((props,ref)=>{const reduce=useReducedMotion();if(reduce)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,ref:ref,initial:{scaleX:0,originX:0},whileInView:{scaleX:1},viewport:{once:true,amount:.9},transition:{duration,delay,ease:EASE_IN},style:{...props.style,transformOrigin:\"0% 50%\"}});});}export function withDrawLine(Component){return drawLine(Component,.1,.7);}// The design step's progress bar fills after its row has settled.\nexport function withProgressFill(Component){return drawLine(Component,.45,1.1);}const EASE_STATE=[.65,0,.35,1];const pageAge=()=>typeof performance===\"undefined\"?0:performance.now();// Work tabs: the active underline is one shared element, so switching tabs\n// slides it to the new label instead of jumping.\nexport function withTabLine(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const reduce=useReducedMotion();return /*#__PURE__*/_jsx(Component,{...props,ref:ref,layoutId:\"work-tab-line\",transition:reduce?{duration:0}:{duration:.45,ease:EASE_STATE}});});}// Content swapped in by a tab settles in; skipped on first load, where the\n// section's own reveal already runs.\nexport function withTabSwap(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const reduce=useReducedMotion();const[animate]=useState(()=>!reduce&&pageAge()>1500);if(!animate)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,ref:ref,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.45,ease:EASE_IN}});});}// Active/inactive label swap crossfades instead of flashing.\nexport function withTabLabel(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const reduce=useReducedMotion();const[animate]=useState(()=>!reduce&&pageAge()>1500);if(!animate)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,ref:ref,initial:{opacity:0},animate:{opacity:1},transition:{duration:.25,ease:EASE_IN}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"useEarlyReveal\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroSub\":{\"type\":\"reactHoc\",\"name\":\"withHeroSub\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTabLabel\":{\"type\":\"reactHoc\",\"name\":\"withTabLabel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroActions\":{\"type\":\"reactHoc\",\"name\":\"withHeroActions\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withImageReveal\":{\"type\":\"reactHoc\",\"name\":\"withImageReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTabSwap\":{\"type\":\"reactHoc\",\"name\":\"withTabSwap\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTabLine\":{\"type\":\"reactHoc\",\"name\":\"withTabLine\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroTitle\":{\"type\":\"reactHoc\",\"name\":\"withHeroTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withProgressFill\":{\"type\":\"reactHoc\",\"name\":\"withProgressFill\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDrawLine\":{\"type\":\"reactHoc\",\"name\":\"withDrawLine\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroPlate\":{\"type\":\"reactHoc\",\"name\":\"withHeroPlate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Motion.map"],"mappings":"wLAEoB,SAAS,GAAgB,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,QAAQ,QAAQ,EAAE,GAAG,CAAC,EAAW,CAAC,IAAM,EAAQ,IAAI,QAAQ,GAA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