{"version":3,"file":"AnimatedLine.ecaF311v.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/qZTCereBLDok8DZFNksB/sX3Xc1k3U0eXxt6MjFGp/AnimatedLine.js"],"sourcesContent":["// Animated line that animates from left to right, only when in view, with full customization\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useInView}from\"framer-motion\";/**\n * Animated Line\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AnimatedLine(props){const{color,thickness,duration,delay,borderRadius,style,width=300,height=4}=props;const ref=useRef(null);const isStatic=useIsStaticRenderer();const inView=useInView(ref,{once:true,margin:\"-10% 0px\"});const[animate,setAnimate]=useState(false);useEffect(()=>{if(isStatic){startTransition(()=>setAnimate(true));return;}if(inView){// Fix: clear previous timeout to avoid multiple triggers\nlet timeoutId;timeoutId=window.setTimeout(()=>{startTransition(()=>setAnimate(true));},delay*1e3);return()=>{if(timeoutId!==undefined)clearTimeout(timeoutId);};}},[inView,isStatic,delay]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...style,width:\"100%\",height:thickness,display:\"flex\",alignItems:\"center\",justifyContent:\"flex-start\",position:\"relative\",overflow:\"hidden\",background:\"transparent\"},children:/*#__PURE__*/_jsx(\"div\",{style:{height:thickness,width:animate?\"100%\":0,background:color,borderRadius,transition:`width ${duration}s cubic-bezier(0.4,0,0.2,1)`}})});}addPropertyControls(AnimatedLine,{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},thickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:4,min:1,max:32,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:1.2,min:.1,max:5,step:.05,unit:\"s\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:5,step:.05,unit:\"s\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedLine\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedLine.map"],"mappings":"sQAMG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,QAAM,eAAa,QAAM,QAAM,IAAI,SAAO,GAAG,EAAY,EAAIA,EAAO,KAAK,CAAO,EAAS,GAAqB,CAAO,EAAO,EAAU,EAAI,CAAC,KAAK,GAAK,OAAO,WAAW,CAAC,CAAM,CAAC,EAAQ,GAAYC,EAAS,GAAM,CACpG,OADqG,MAAc,CAAC,GAAG,EAAS,CAAC,MAAoB,EAAW,GAAK,CAAC,CAAC,OAAQ,GAAG,EAAO,CACrX,IAAI,EAA8F,MAApF,GAAU,EAAO,eAAe,CAAC,MAAoB,EAAW,GAAK,CAAC,EAAG,EAAM,IAAI,KAAW,CAAI,IAAY,IAAA,IAAU,aAAa,EAAU,IAAM,CAAC,EAAO,EAAS,EAAM,CAAC,CAAqB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,EAAU,QAAQ,OAAO,WAAW,SAAS,eAAe,aAAa,SAAS,WAAW,SAAS,SAAS,WAAW,cAAc,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAU,MAAM,EAAQ,OAAO,EAAE,WAAW,EAAM,eAAa,WAAW,SAAS,EAAS,6BAA6B,CAAC,CAAC,CAAC,CAAC,sBANnhB,IAA6D,IAAwE,IAAqC,CAM2W,EAAoB,EAAa,CAAC,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,aAAa,UAAU,CAAC,UAAU,CAAC,KAAK,EAA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