{"version":3,"file":"CountUp.DFvyUq0O.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","_e","p","init_jsx_runtime","ce","de","addPropertyControls","init_framer_Duogf4LG","ControlType","useIsStaticRenderer","CountUp","props","isStatic","ref","disp","setDisp","value","el","raf","t0","started","ease","t","step","ts","duration","io","entries","shown","decimals","useGrouping","SERIF","weight","prefix","suffix","init_CountUp"],"sources":["https:/framerusercontent.com/modules/DZMSmBUEq3cchHXcjL2G/FSNkajLeOZ5j20WvF8D3/CountUp.js"],"sourcesContent":["import{jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useRef,useEffect,useState}from\"react\";const SERIF=\"'Hanken Grotesk', sans-serif\";/**\n * Count Up — animates a number from 0 to its value the first time it scrolls into\n * view, then holds. Rendered in Hanken Grotesk (site sans). Pair with a small uppercase caption below it.\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 72\n * @framerDisableUnlink\n */export default function CountUp(props){const{value=12,decimals=0,prefix=\"\",suffix=\"+\",duration=1.5,useGrouping=true,color=\"rgb(33,33,33)\",fontSize=64,weight=500}=props;const isStatic=useIsStaticRenderer();const ref=useRef(null);const[disp,setDisp]=useState(isStatic?value:0);useEffect(()=>{if(isStatic){setDisp(value);return;}const el=ref.current;if(!el){setDisp(value);return;}let raf=0,t0=0,started=false;const ease=t=>1-Math.pow(1-t,3);const step=ts=>{if(!t0)t0=ts;const p=Math.min(1,(ts-t0)/(Math.max(.2,duration)*1e3));setDisp(value*ease(p));if(p<1)raf=requestAnimationFrame(step);};const io=new IntersectionObserver(entries=>entries.forEach(e=>{if(e.isIntersecting&&!started){started=true;raf=requestAnimationFrame(step);}}),{threshold:.45});io.observe(el);return()=>{cancelAnimationFrame(raf);io.disconnect();};},[value,duration,isStatic]);const shown=decimals>0?disp.toFixed(decimals):useGrouping?Math.round(disp).toLocaleString(\"en-US\"):String(Math.round(disp));return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{fontFamily:SERIF,fontSize,fontWeight:weight,lineHeight:1,letterSpacing:\"-0.01em\",color,whiteSpace:\"nowrap\",...props.style},children:[prefix,shown,suffix]});}addPropertyControls(CountUp,{value:{type:ControlType.Number,title:\"Value\",defaultValue:12,min:0,max:1e6,displayStepper:true},decimals:{type:ControlType.Number,title:\"Decimals\",defaultValue:0,min:0,max:2,displayStepper:true},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\"+\"},duration:{type:ControlType.Number,title:\"Duration (s)\",defaultValue:1.5,min:.3,max:4,step:.1},useGrouping:{type:ControlType.Boolean,title:\"Grouping\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgb(33,33,33)\"},fontSize:{type:ControlType.Number,title:\"Font size\",defaultValue:64,min:16,max:140},weight:{type:ControlType.Number,title:\"Weight\",defaultValue:500,min:300,max:800,step:100}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CountUp\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"72\",\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CountUp.map"],"mappings":"A,gMAQG,SAAwBa,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,GAAG,WAAS,EAAE,SAAO,GAAG,SAAO,IAAI,WAAS,IAAI,cAAY,GAAK,QAAM,gBAAgB,WAAS,GAAG,SAAO,KAAKC,EAAYC,EAASH,EAAoB,EAAQI,EAAIhB,EAAO,IAAI,EAAO,CAACiB,EAAKC,G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