{"version":3,"file":"AnimatedLine.Qt8Jbbyj.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/hl4LgVBw1NGR17LvL6HL/WcHElmcQj26eNPeTusTr/AnimatedLine.js"],"sourcesContent":["// Animated line that moves from left to right when in view\n// Configurable thickness, color, duration, delay, ratio, and direction\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{motion,useInView}from\"framer-motion\";import{useRef}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 5\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AnimatedLine(props){const{thickness=4,color=\"#0099FF\",duration=1.5,delay=0,ratio=1,direction=\"left-to-right\"}=props;const ref=useRef(null);const isInView=useInView(ref,{once:true,margin:\"-50px\"});const isStatic=useIsStaticRenderer();const isHorizontal=direction===\"left-to-right\"||direction===\"right-to-left\";const isReverse=direction===\"right-to-left\"||direction===\"bottom-to-top\";const getInitialScale=()=>{if(isHorizontal){return{scaleX:0,scaleY:1};}return{scaleX:1,scaleY:0};};const getAnimateScale=()=>{if(isHorizontal){return{scaleX:ratio,scaleY:1};}return{scaleX:1,scaleY:ratio};};const getTransformOrigin=()=>{switch(direction){case\"left-to-right\":return\"left center\";case\"right-to-left\":return\"right center\";case\"top-to-bottom\":return\"center top\";case\"bottom-to-top\":return\"center bottom\";default:return\"left center\";}};return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\"},children:/*#__PURE__*/_jsx(motion.div,{initial:isStatic?getAnimateScale():getInitialScale(),animate:isStatic||isInView?getAnimateScale():getInitialScale(),transition:{duration:duration,delay:delay,ease:[.25,.1,.25,1]},style:{width:isHorizontal?\"100%\":`${thickness}px`,height:isHorizontal?`${thickness}px`:\"100%\",backgroundColor:color,transformOrigin:getTransformOrigin(),willChange:\"transform\"}})});}addPropertyControls(AnimatedLine,{thickness:{type:ControlType.Number,title:\"Thickness\",defaultValue:4,min:1,max:50,step:1,unit:\"px\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#0099FF\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:1.5,min:.1,max:10,step:.1,unit:\"s\"},delay:{type:ControlType.Number,title:\"Delay\",defaultValue:0,min:0,max:5,step:.1,unit:\"s\"},ratio:{type:ControlType.Number,title:\"Length Ratio\",defaultValue:1,min:.1,max:1,step:.05},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"left-to-right\",\"right-to-left\",\"top-to-bottom\",\"bottom-to-top\"],optionTitles:[\"Left to Right\",\"Right to Left\",\"Top to Bottom\",\"Bottom to Top\"],defaultValue:\"left-to-right\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedLine\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"200\",\"framerIntrinsicHeight\":\"5\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedLine.map"],"mappings":"0OAQG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,YAAU,EAAE,QAAM,UAAU,WAAS,IAAI,QAAM,EAAE,QAAM,EAAE,YAAU,iBAAiB,EAAY,EAAIA,EAAO,IAAI,EAAQ,EAAS,EAAU,EAAI,CAAC,KAAK,GAAK,OAAO,OAAO,CAAC,EAAQ,EAAS,EAAoB,EAAQ,EAAa,IAAY,iBAAiB,IAAY,gBAA+F,MAAwB,EAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EAAU,MAAwB,EAAoB,CAAC,OAAO,EAAM,OAAO,CAAC,EAAS,CAAC,OAAO,EAAE,OAAO,CAAK,EAAqP,OAAoB,EAAK,MAAM,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