{"version":3,"file":"RotatingConicalGradient.CEjESp2h.mjs","names":[],"sources":["https:/framerusercontent.com/modules/EFEr7aUraHUiiv7vmDif/BF0NDL9ZGIpGeUs7j0ak/RotatingConicalGradient.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect,useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function RotatingConicalGradient({color,length,duration,repeatType,animate,loop,distance,angle,eased}){const conicGradientRef=useRef(null);const[aspectRatio,setAspectRatio]=useState(1);useEffect(()=>{if(conicGradientRef.current){const{width,height}=conicGradientRef.current.getBoundingClientRect();setAspectRatio(width/height);}},[conicGradientRef.current]);return /*#__PURE__*/_jsx(motion.div,{ref:conicGradientRef,style:{display:\"grid\",alignItems:\"center\",color:\"white\",justifyItems:\"center\",width:\"100%\",height:\"100%\",background:`conic-gradient(from -55deg at ${distance/aspectRatio}% ${distance}% , transparent ${angle-(10+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`},initial:\"initial\",animate:{background:[`conic-gradient(from -55deg at ${distance/aspectRatio}% ${distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 35deg at ${100-distance/aspectRatio}% ${distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 125deg at ${100-distance/aspectRatio}% ${100-distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 215deg at ${distance/aspectRatio}% ${100-distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`,`conic-gradient(from 310deg at ${distance/aspectRatio}% ${distance}% , transparent ${angle-(2+length)}deg, ${color}  ${angle}deg, transparent ${angle+length}deg)`]},transition:{duration,repeat:loop?Infinity:1,repeatType,ease:\"linear\",[eased&&\"times\"]:aspectRatio>1?[0,.25+.25/aspectRatio,.5,.75+.25/aspectRatio,1]:[0,aspectRatio*.25,.5,.5+aspectRatio*.25,1]}});}addPropertyControls(RotatingConicalGradient,{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#ff5e5e\"},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:315,min:0,max:360,step:1},length:{type:ControlType.Number,title:\"Length\",defaultValue:10,min:1,max:100,step:1},distance:{type:ControlType.Number,title:\"Distance\",defaultValue:5,min:1,max:100,step:1},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:4,min:1,max:20,step:1},animate:{type:ControlType.Boolean,title:\"Animate Rotation\",defaultValue:true},eased:{type:ControlType.Boolean,title:\"Ease\",defaultValue:true},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true},repeatType:{type:ControlType.Enum,title:\"Replay Type\",defaultValue:\"loop\",options:[\"loop\",\"reverse\",\"mirror\"],optionTitles:[\"Loop\",\"Reverse\",\"Mirror\"],hidden(props){return!props.loop;}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingConicalGradient\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RotatingConicalGradient.map"],"mappings":"kWAA8K,SAAwB,EAAwB,CAAC,QAAM,SAAO,WAAS,aAAW,UAAQ,OAAK,WAAS,QAAM,QAAM,CAAC,CAAC,IAAM,EAAiB,EAAO,KAAK,CAAM,CAAC,EAAY,EAAe,CAAC,EAAS,EAAE,CAA8K,MAA7K,GAAU,IAAI,CAAC,GAAG,EAAiB,QAAQ,CAAC,GAAK,CAAC,QAAM,SAAO,CAAC,EAAiB,QAAQ,uBAAuB,CAAC,EAAe,EAAM,EAAO,AAAE,CAAC,EAAC,CAAC,EAAiB,OAAQ,EAAC,CAAqB,EAAK,EAAO,IAAI,CAAC,IAAI,EAAiB,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,MAAM,QAAQ,aAAa,SAAS,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