{"version":3,"file":"AbstractShapesAnimation.D4fk6dV5.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/Schu4dVUh9lUAkeFCYcr/ufhqudT8urt9GTUr58h2/AbstractShapesAnimation.js"],"sourcesContent":["// Abstract minimal animation with shapes being drawn and erased perpetually\n// Matches the style of the reference image with colorful geometric shapes\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";/**\n * Abstract Shapes Animation\n *\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 600\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AbstractShapesAnimation(props){const{backgroundColor=\"#FFFFFF\",shapeColors={color1:\"#5B9FFF\",color2:\"#FFB84D\",color3:\"#FF9999\",color4:\"#5DCCB8\",color5:\"#A8E6CF\"},strokeWidth=12,animationDuration=3,shapeCount=12,sizeRange={minSize:60,maxSize:140},distribution=100}=props;const isStatic=useIsStaticRenderer();const[shapes,setShapes]=useState([]);const containerRef=useRef(null);const keyCounterRef=useRef(0);const createShape=delay=>{const colors=[shapeColors.color1,shapeColors.color2,shapeColors.color3,shapeColors.color4,shapeColors.color5];const types=[\"circle\",\"square\",\"triangle\",\"squiggle\"];const margin=(100-distribution)/2;return{type:types[Math.floor(Math.random()*types.length)],x:margin+Math.random()*distribution,y:margin+Math.random()*distribution,size:sizeRange.minSize+Math.random()*(sizeRange.maxSize-sizeRange.minSize),rotation:Math.random()*360,color:colors[Math.floor(Math.random()*colors.length)],delay,key:keyCounterRef.current++};};useEffect(()=>{if(typeof window===\"undefined\")return;const newShapes=Array.from({length:shapeCount},(_,i)=>createShape(i/shapeCount*animationDuration));startTransition(()=>setShapes(newShapes));},[shapeCount,shapeColors,animationDuration,sizeRange,distribution]);const handleAnimationComplete=shapeKey=>{if(isStatic)return;startTransition(()=>{setShapes(prevShapes=>{const shapeIndex=prevShapes.findIndex(s=>s.key===shapeKey);if(shapeIndex===-1)return prevShapes;const newShapes=[...prevShapes];newShapes[shapeIndex]=createShape(0);return newShapes;});});};const renderShape=(shape,index)=>{const commonProps={initial:{pathLength:0,opacity:0},animate:isStatic?{pathLength:.7,opacity:1}:{pathLength:[0,1,1,0],opacity:[0,1,1,0]},transition:isStatic?{duration:0}:{duration:animationDuration,delay:shape.delay,ease:\"easeInOut\"},onAnimationComplete:()=>handleAnimationComplete(shape.key),style:{position:\"absolute\",left:`${shape.x}%`,top:`${shape.y}%`,transform:`translate(-50%, -50%) rotate(${shape.rotation}deg)`}};if(shape.type===\"circle\"){return /*#__PURE__*/_jsx(motion.svg,{width:shape.size,height:shape.size,viewBox:\"0 0 100 100\",...commonProps,children:/*#__PURE__*/_jsx(motion.circle,{cx:\"50\",cy:\"50\",r:\"40\",fill:\"none\",stroke:shape.color,strokeWidth:strokeWidth,strokeLinecap:\"round\",initial:{pathLength:0},animate:isStatic?{pathLength:.7}:{pathLength:[0,1,1,0]},transition:isStatic?{duration:0}:{duration:animationDuration,delay:shape.delay,ease:\"easeInOut\"}})},shape.key);}if(shape.type===\"square\"){return /*#__PURE__*/_jsx(motion.svg,{width:shape.size,height:shape.size,viewBox:\"0 0 100 100\",...commonProps,children:/*#__PURE__*/_jsx(motion.rect,{x:\"15\",y:\"15\",width:\"70\",height:\"70\",fill:\"none\",stroke:shape.color,strokeWidth:strokeWidth,strokeLinecap:\"round\",strokeLinejoin:\"round\",initial:{pathLength:0},animate:isStatic?{pathLength:.7}:{pathLength:[0,1,1,0]},transition:isStatic?{duration:0}:{duration:animationDuration,delay:shape.delay,ease:\"easeInOut\"}})},shape.key);}if(shape.type===\"triangle\"){return /*#__PURE__*/_jsx(motion.svg,{width:shape.size,height:shape.size,viewBox:\"0 0 100 100\",...commonProps,children:/*#__PURE__*/_jsx(motion.path,{d:\"M 50 15 L 85 85 L 15 85 Z\",fill:\"none\",stroke:shape.color,strokeWidth:strokeWidth,strokeLinecap:\"round\",strokeLinejoin:\"round\",initial:{pathLength:0},animate:isStatic?{pathLength:.7}:{pathLength:[0,1,1,0]},transition:isStatic?{duration:0}:{duration:animationDuration,delay:shape.delay,ease:\"easeInOut\"}})},shape.key);}if(shape.type===\"squiggle\"){return /*#__PURE__*/_jsx(motion.svg,{width:shape.size*1.5,height:shape.size*.6,viewBox:\"0 0 150 60\",...commonProps,children:/*#__PURE__*/_jsx(motion.path,{d:\"M 10 40 Q 30 10, 50 30 T 90 30 T 130 40\",fill:\"none\",stroke:shape.color,strokeWidth:strokeWidth,strokeLinecap:\"round\",strokeLinejoin:\"round\",initial:{pathLength:0},animate:isStatic?{pathLength:.7}:{pathLength:[0,1,1,0]},transition:isStatic?{duration:0}:{duration:animationDuration,delay:shape.delay,ease:\"easeInOut\"}})},shape.key);}return null;};return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",backgroundColor,position:\"relative\",overflow:\"hidden\"},children:shapes.map((shape,index)=>renderShape(shape,index))});}addPropertyControls(AbstractShapesAnimation,{backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},shapeColors:{type:ControlType.Object,title:\"Shape Colors\",controls:{color1:{type:ControlType.Color,title:\"Color 1\",defaultValue:\"#5B9FFF\"},color2:{type:ControlType.Color,title:\"Color 2\",defaultValue:\"#FFB84D\"},color3:{type:ControlType.Color,title:\"Color 3\",defaultValue:\"#FF9999\"},color4:{type:ControlType.Color,title:\"Color 4\",defaultValue:\"#5DCCB8\"},color5:{type:ControlType.Color,title:\"Color 5\",defaultValue:\"#A8E6CF\"}}},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",defaultValue:12,min:4,max:24,step:1},animationDuration:{type:ControlType.Number,title:\"Animation Duration\",defaultValue:3,min:1,max:10,step:.5,unit:\"s\"},shapeCount:{type:ControlType.Number,title:\"Shape Count\",defaultValue:12,min:4,max:30,step:1},sizeRange:{type:ControlType.Object,title:\"Size Range\",controls:{minSize:{type:ControlType.Number,title:\"Min Size\",defaultValue:60,min:20,max:200,step:5,unit:\"px\"},maxSize:{type:ControlType.Number,title:\"Max Size\",defaultValue:140,min:40,max:300,step:5,unit:\"px\"}}},distribution:{type:ControlType.Number,title:\"Distribution\",defaultValue:100,min:20,max:100,step:5,unit:\"%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AbstractShapesAnimation\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"800\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"600\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AbstractShapesAnimation.map"],"mappings":"sQAUG,SAAwB,EAAwB,EAAM,CAAC,GAAK,CAAC,kBAAgB,UAAU,cAAY,CAAC,OAAO,UAAU,OAAO,UAAU,OAAO,UAAU,OAAO,UAAU,OAAO,SAAS,EAAE,cAAY,GAAG,oBAAkB,EAAE,aAAW,GAAG,YAAU,CAAC,QAAQ,GAAG,QAAQ,GAAG,EAAE,eAAa,KAAK,EAAY,EAAS,EAAoB,EAAO,CAAC,EAAO,GAAWA,EAAS,CAAC,CAAC,EAAQ,EAAaC,EAAO,IAAI,EAAQ,EAAcA,EAAO,CAAC,EAAQ,EAAY,GAAO,CAAC,IAAM,EAAO,CAAC,EAAY,OAAO,EAAY,OAAO,EAAY,OAAO,EAAY,OAAO,EAAY,MAAM,EAAQ,EAAM,CAAC,SAAS,SAAS,WAAW,UAAU,EAAQ,GAAQ,IAAI,GAAc,EAAE,MAAM,CAAC,KAAK,EAAM,KAAK,MAAM,KAAK,OAAO,EAAE,EAAM,MAAM,GAAG,EAAE,EAAO,KAAK,OAAO,EAAE,EAAa,EAAE,EAAO,KAAK,OAAO,EAAE,EAAa,KAAK,EAAU,QAAQ,KAAK,OAAO,GAAG,EAAU,QAAQ,EAAU,SA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