{"version":3,"file":"CountUp.CTXCHPod.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/yD8vq7Vs9p9mPNfE1sjr/2x7z5T5vZwQ6kzXIPr9z/CountUp.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{animate,useInView,useReducedMotion}from\"framer-motion\";/**\n * Counts every number in `value` up from zero when it scrolls into view.\n * Non-numeric parts (\"+\", \"%\", \"–\") are kept as-is, so \"10–40%\" animates both numbers.\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CountUp(props){const{value=\"15\",duration=1.6,color=\"#044BD9\",font,align=\"left\"}=props;const ref=useRef(null);const inView=useInView(ref,{once:true,amount:.6});const reduce=useReducedMotion();const isStatic=useIsStaticRenderer();const parts=value.split(/(\\d+(?:\\.\\d+)?)/);const targets=parts.map(p=>/^\\d/.test(p)?parseFloat(p):null);const[progress,setProgress]=useState(isStatic||reduce?1:0);useEffect(()=>{if(!inView||isStatic||reduce)return;const controls=animate(0,1,{duration,ease:[.2,.7,.2,1],onUpdate:v=>setProgress(v)});return()=>controls.stop();},[inView,isStatic,reduce,duration]);const text=parts.map((p,i)=>{const t=targets[i];if(t===null)return p;const decimals=(p.split(\".\")[1]||\"\").length;return(t*progress).toFixed(decimals);}).join(\"\");return /*#__PURE__*/_jsx(\"span\",{ref:ref,\"aria-label\":value,style:{...props.style,position:\"relative\",display:\"block\",whiteSpace:\"nowrap\",minWidth:\"max-content\",color,textAlign:align,fontVariantNumeric:\"tabular-nums\",...font},children:text});}addPropertyControls(CountUp,{value:{type:ControlType.String,defaultValue:\"15+\"},duration:{type:ControlType.Number,defaultValue:1.6,min:.2,max:5,step:.1,unit:\"s\"},color:{type:ControlType.Color,defaultValue:\"#044BD9\"},font:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:55,variant:\"Medium\",lineHeight:\"1em\"}},align:{type:ControlType.Enum,options:[\"left\",\"center\",\"right\"],defaultValue:\"left\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CountUp\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CountUp.map"],"mappings":"+PAMG,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,KAAK,WAAS,IAAI,QAAM,UAAU,OAAK,QAAM,QAAQ,EAAY,EAAIA,EAAO,IAAI,EAAQ,EAAO,EAAU,EAAI,CAAC,KAAK,GAAK,OAAO,EAAE,CAAC,EAAQ,EAAO,EAAiB,EAAQ,EAAS,EAAoB,EAAQ,EAAM,EAAM,MAAM,iBAAiB,EAAQ,EAAQ,EAAM,IAAI,GAAG,MAAM,KAAK,CAAC,EAAE,WAAW,CAAC,EAAE,IAAI,EAAO,CAAC,EAAS,GAAaC,EAAS,GAAU,EAAO,EAAE,CAAC,EAAE,MAAc,CAAC,GAAG,CAAC,GAAQ,GAAU,EAAO,OAAO,IAAM,EAAS,EAAQ,EAAE,EAAE,CAAC,WAAS,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,SAAS,GAAG,EAAY,CAAC,CAAC,CAAC,EAAE,UAAU,EAAS,KAAK,CAAE,EAAE,CAAC,EAAO,EAAS,EAAO,CAAQ,CAAC,EAAE,IAAM,EAAK,EAAM,KAAK,EAAE,IAAI,CAAC,IAAM,EAAE,EAAQ,GAAG,GAAG,IAAI,KAAK,OAAO,EAAE,IAAM,GAAU,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,GAAA,CAAI,OAAO,OAAO,EAAE,EAAA,CAAU,QAAQ,CAAQ,CAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,OAAoB,E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