{"version":3,"file":"CounterUp.D52M-BUF.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/XGViTI1KTxBEe160eWwb/0so2pZuRDwPW6T098gJF/pZiwXqXMg.js","https:/framerusercontent.com/modules/nuHT6PYyaZms6Ty84iYd/Dzj5L0HELqpgnoI6dpzL/CounterUp.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.25 0 L 9 5.5 L 14.5 5.5 L 10 9 L 11.5 14.5 L 7.25 11 L 3 14.5 L 4.5 9 L 0 5.5 L 5.5 5.5 Z\" fill=\"transparent\" height=\"14.5px\" id=\"F8nsDrGan\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(4.75 4.75)\" width=\"14.5px\"/></svg>';const getProps=({dots,height,id,stroke,width,width1,...props})=>{return{...props,BKVe8Pgvw:dots??props.BKVe8Pgvw??1,fICyAUQY1:stroke??props.fICyAUQY1??\"rgb(0, 0, 0)\",lKf_CQTz5:width1??props.lKf_CQTz5??1.5};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,fICyAUQY1,lKf_CQTz5,BKVe8Pgvw,...restProps}=getProps(props);const href=useSVGTemplate(\"4076580750\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-bzbHV\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1335ju\":lKf_CQTz5,\"--18mrqx2\":fICyAUQY1,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-bzbHV { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"fICyAUQY1\":\"stroke\",\"lKf_CQTz5\":\"width1\",\"BKVe8Pgvw\":\"dots\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Star\",\"color\":{\"type\":\"variable\",\"value\":\"18mrqx2\"},\"set\":{\"localId\":\"vectorSet/SuYHhKUZG\",\"id\":\"SuYHhKUZG\",\"moduleId\":\"EqX8thWQjdZcOB1c6p5N\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-bzbHV\");Icon.displayName=\"Star\";export default Icon;addPropertyControls(Icon,{fICyAUQY1:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Stroke\",type:ControlType.Color},lKf_CQTz5:{defaultValue:1.5,displayStepper:true,hidden:false,max:4,min:0,step:.5,title:\"Width\",type:ControlType.Number},BKVe8Pgvw:{defaultValue:1,displayStepper:true,hidden:true,max:4,min:1,title:\"Dots\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerVariables\":\"{\\\"fICyAUQY1\\\":\\\"stroke\\\",\\\"lKf_CQTz5\\\":\\\"width1\\\",\\\"BKVe8Pgvw\\\":\\\"dots\\\"}\",\"framerVector\":\"{\\\"name\\\":\\\"Star\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"18mrqx2\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/SuYHhKUZG\\\",\\\"id\\\":\\\"SuYHhKUZG\\\",\\\"moduleId\\\":\\\"EqX8thWQjdZcOB1c6p5N\\\"}}\",\"framerIntrinsicWidth\":\"24\",\"framerImmutableVariables\":\"true\",\"framerDisableUnlink\":\"true\",\"framerIntrinsicHeight\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Counter up component that animates numbers when scrolled into view\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef,startTransition}from\"react\";import{useInView,useMotionValue,useSpring,motion}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Counter Up component that animates numbers when scrolled into view\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CounterUp(props){const{startNumber=0,endNumber=100,duration=2,delay=0,prefix=\"\",suffix=\"\",separator=true,decimals=0,font,textColor,textAlign=\"left\",style}=props;const ref=useRef(null);const isInView=useInView(ref,{once:true,margin:\"-10%\"});const isStatic=useIsStaticRenderer();const[hasStarted,setHasStarted]=useState(false);const motionValue=useMotionValue(startNumber);const springValue=useSpring(motionValue,{duration:duration*1e3,bounce:0});const[displayValue,setDisplayValue]=useState(startNumber);useEffect(()=>{if(isStatic){setDisplayValue(endNumber);return;}const unsubscribe=springValue.on(\"change\",latest=>{startTransition(()=>{setDisplayValue(latest);});});return unsubscribe;},[springValue,endNumber,isStatic]);useEffect(()=>{if(isStatic)return;if(isInView&&!hasStarted){const timer=setTimeout(()=>{motionValue.set(endNumber);startTransition(()=>{setHasStarted(true);});},delay*1e3);return()=>clearTimeout(timer);}},[isInView,hasStarted,endNumber,delay,motionValue,isStatic]);const formatNumber=value=>{const rounded=Number(value.toFixed(decimals));const formatted=separator?rounded.toLocaleString():rounded.toString();return`${prefix}${formatted}${suffix}`;};const isFixedWidth=style&&style.width===\"100%\";return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...style,position:\"relative\",...isFixedWidth?{}:{width:\"max-content\"},textAlign,color:textColor,...font},children:/*#__PURE__*/_jsx(motion.span,{children:formatNumber(displayValue)})});}addPropertyControls(CounterUp,{startNumber:{type:ControlType.Number,title:\"Start Number\",defaultValue:0,step:1},endNumber:{type:ControlType.Number,title:\"End Number\",defaultValue:100,step:1},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:2,min:.1,max:10,step:.1,unit:\"s\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:5,step:.1,unit:\"s\"},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\",placeholder:\"$\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\"\",placeholder:\"%\"},separator:{type:ControlType.Boolean,title:\"Thousand Separator\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},decimals:{type:ControlType.Number,title:\"Decimal Places\",defaultValue:0,min:0,max:3,step:1,displayStepper:true},textAlign:{type:ControlType.Enum,title:\"Text Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"32px\",variant:\"Bold\",letterSpacing:\"-0.03em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CounterUp\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerCont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