{"version":3,"file":"Motion.BNCLBoKc.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","c","J","init_jsx_runtime","ce","de","useTransform","useMotionValue","useScroll","useSpring","animate","useReducedMotion","init_framer_motion_DhsWWWsN","useInView","init_framer_B1b760uK","useIsStaticRenderer","withCountUp","ref","inView","still","useStill","node","findNumberNode","full","match","raw","target","commas","before","after","format","n","v","controls","Component","props","mergeRefs","forwardedRef","withScrollLine","progress","scrollYProgress","scaleY","withSwipeRow","el","child","withPhotoReveal","hidden","clipPath","started","start","p","unsubscribe","init_Motion","forwarded","isStatic","reduce","root","walker"],"sources":["https:/framerusercontent.com/modules/WUmqIFZzFUmpTPfiKho4/gZsGfuwr2D5nyEruC1kI/Motion.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useIsStaticRenderer}from\"framer\";import{animate,useInView,useMotionValue,useReducedMotion,useScroll,useSpring,useTransform}from\"framer-motion\";import{forwardRef,useEffect,useRef}from\"react\";// Site-wide motion touches for Honored 25. Every override renders the node untouched for\n// reduced-motion visitors and on the Framer canvas.\n// Points both our own ref and the canvas ref at the same element.\nconst mergeRefs=(own,forwarded)=>el=>{own.current=el;if(typeof forwarded===\"function\")forwarded(el);else if(forwarded)forwarded.current=el;};const useStill=()=>{const isStatic=useIsStaticRenderer();const reduce=useReducedMotion();return isStatic||!!reduce;};// Finds the text node holding the stat's digits inside our own rendered element.\nconst findNumberNode=root=>{if(!root)return null;const walker=document.createTreeWalker(root,NodeFilter.SHOW_TEXT);let node=walker.nextNode();while(node){if(/\\d/.test(node.nodeValue||\"\"))return node;node=walker.nextNode();}return null;};/**\n * Counts the first number in a text layer up from zero when it scrolls into view.\n * Keeps prefixes, commas and suffixes (\"$77K\", \"$11,000\", \"100s\", \"$77K raised…\").\n */export function withCountUp(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const ref=useRef(null);const inView=useInView(ref,{once:true,amount:.8});const still=useStill();useEffect(()=>{if(still||!inView)return;const node=findNumberNode(ref.current);if(!node)return;const full=node.nodeValue||\"\";const match=full.match(/\\d[\\d,]*/);if(!match||match.index===undefined)return;const raw=match[0];const target=parseInt(raw.replace(/,/g,\"\"),10);const commas=raw.includes(\",\");const before=full.slice(0,match.index);const after=full.slice(match.index+raw.length);const format=v=>{const n=Math.round(v);return before+(commas?n.toLocaleString(\"en-US\"):String(n))+after;};node.nodeValue=format(0);const controls=animate(0,target,{duration:Math.min(1.8,.9+target/2e4),ease:[.16,1,.3,1],onUpdate:v=>{node.nodeValue=format(v);},onComplete:()=>{node.nodeValue=full;}});return()=>{controls.stop();node.nodeValue=full;};},[inView,still]);return /*#__PURE__*/_jsx(Component,{...props,ref:mergeRefs(ref,forwardedRef)});});}/**\n * A line that fills top-to-bottom as its own element scrolls through the viewport.\n * Use on a thin frame laid over a faint track.\n */export function withScrollLine(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const ref=useRef(null);const still=useStill();const{scrollYProgress}=useScroll({target:ref,offset:[\"start 75%\",\"end 55%\"]});const progress=useSpring(scrollYProgress,{stiffness:120,damping:30,restDelta:.001});// One motion value drives the line either way: scroll-linked, or fully drawn for reduced motion.\nconst scaleY=useMotionValue(still?1:0);useEffect(()=>{if(still){scaleY.set(1);return;}scaleY.set(progress.get());return progress.on(\"change\",v=>scaleY.set(v));},[still]);return /*#__PURE__*/_jsx(Component,{...props,ref:mergeRefs(ref,forwardedRef),style:{...props.style,scaleY,transformOrigin:\"50% 0%\"}});});}/**\n * Turns a horizontal row into a swipe gallery: snaps each child to the left edge and hides the scrollbar.\n * Use on a horizontal stack with overflow-x set to auto.\n */export function withSwipeRow(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el)return;for(const child of Array.from(el.children))child.style.scrollSnapAlign=\"start\";},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:mergeRefs(ref,forwardedRef),style:{...props.style,scrollSnapType:\"x mandatory\",scrollbarWidth:\"none\",WebkitOverflowScrolling:\"touch\",overscrollBehaviorX:\"contain\"}});});}/**\n * Wipes a photo in from the top the first time it scrolls into view.\n */export function withPhotoReveal(Component){return /*#__PURE__*/forwardRef((props,forwardedRef)=>{const ref=useRef(null);const still=useStill();// Triggered from scroll position, not IntersectionObserver: Chrome reports a fully\n// clipped element as never intersecting, so an in-view check would never fire.\nconst{scrollYProgress}=useScroll({target:ref,offset:[\"start end\",\"start 75%\"]});const hidden=useMotionValue(still?0:100);const clipPath=useTransform(hidden,v=>`inset(0% 0% ${v}% 0%)`);const started=useRef(false);useEffect(()=>{if(still){hidden.set(0);return;}let controls;const start=p=>{if(started.current||p<=.02)return;started.current=true;controls=animate(hidden,0,{duration:1.1,ease:[.65,0,.35,1]});};start(scrollYProgress.get());const unsubscribe=scrollYProgress.on(\"change\",start);return()=>{unsubscribe();controls?.stop();};},[still]);return /*#__PURE__*/_jsx(Component,{...props,ref:mergeRefs(ref,forwardedRef),style:{...props.style,clipPath}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCountUp\":{\"type\":\"reactHoc\",\"name\":\"withCountUp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPhotoReveal\":{\"type\":\"reactHoc\",\"name\":\"withPhotoReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSwipeRow\":{\"type\":\"reactHoc\",\"name\":\"withSwipeRow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollLine\":{\"type\":\"reactHoc\",\"name\":\"withScrollLine\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Motion.map"],"mappings":"A,6QAOG,SAAgBkB,EAAY,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAe,CAAC,IAAMC,EAAInB,EAAO,IAAI,EAAQoB,EAAOL,EAAUI,EAAI,CAAC,KAAK,GAAK,OAAO,EAAE,CAAC,EAAQE,EAAMC,EAAS,EAAivB,OAA/uBhB,MAAc,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