{"version":3,"file":"DrawPath.CS2As5XW.mjs","names":["useState","useRef","useId","p","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","de","init_jsx_runtime","p","ie","ce","useReducedMotion","init_framer_motion_DhsWWWsN","addPropertyControls","ControlType","init_framer_BisrWwwE","useIsStaticRenderer","useProgress","setP","off","raf","read","el","ref","r","vh","span","bottomAnchor","from","to","onScroll","DrawPath","mid","reduce","stat","still","p$1","len","props","d","PATHS","init_DrawPath"],"sources":["https:/framerusercontent.com/modules/pweY2GNMq7wDbntvsTEZ/IOn49fQLuxO36AtmOPXv/DrawPath.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useReducedMotion}from\"framer-motion\";import{useEffect,useId,useRef,useState}from\"react\";// Scroll progress of an element between two viewport lines (fractions of the viewport height).\n// 0 when its top reaches `from`, 1 when its bottom reaches `to`. Plain scroll listener, so it\n// stays correct with smooth-scroll libraries and inside sticky layouts.\nfunction useProgress(ref,from,to,bottomAnchor,off){const[p,setP]=useState(off?1:0);useEffect(()=>{if(off)return;let raf=0;const read=()=>{raf=0;const el=ref.current;if(!el)return;const r=el.getBoundingClientRect();const vh=window.innerHeight;const span=bottomAnchor?(from-to)*vh+r.height:(from-to)*vh;setP(Math.max(0,Math.min(1,(from*vh-r.top)/Math.max(1,span))));};const onScroll=()=>{if(!raf)raf=requestAnimationFrame(read);};read();window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",onScroll);return()=>{window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",onScroll);if(raf)cancelAnimationFrame(raf);};},[from,to,bottomAnchor,off]);return p;}const PATHS={curve:\"M 6 8 C 160 6, 200 120, 330 128 S 520 150, 640 250 S 820 330, 994 392\",line:\"M 6 200 L 994 200\",loop:\"M 6 330 C 120 330, 180 120, 330 120 S 480 330, 560 250 S 560 90, 700 90 S 880 220, 994 120\"};/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 1000\n * @framerIntrinsicHeight 400\n */export default function DrawPath(props){const ref=useRef(null);const mid=\"dp\"+useId().replace(/[^a-zA-Z0-9]/g,\"\");const reduce=useReducedMotion();const stat=useIsStaticRenderer();const still=!!reduce||stat;const p=useProgress(ref,.85,.55,true,still);const len=still?1:Math.max(0,Math.min(1,(p-props.start/100)/Math.max(.01,(props.end-props.start)/100)));const d=PATHS[props.shape]||PATHS.curve;return /*#__PURE__*/_jsxs(\"svg\",{ref:ref,viewBox:\"0 0 1000 400\",preserveAspectRatio:\"none\",\"aria-hidden\":\"true\",style:{width:\"100%\",height:\"100%\",overflow:\"visible\",pointerEvents:\"none\",display:\"block\"},children:[/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsx(\"mask\",{id:mid,maskUnits:\"userSpaceOnUse\",x:\"-20\",y:\"-20\",width:\"1040\",height:\"440\",children:/*#__PURE__*/_jsx(\"path\",{d:d,fill:\"none\",stroke:\"#fff\",strokeWidth:props.thickness+6,strokeLinecap:\"round\",vectorEffect:\"non-scaling-stroke\",pathLength:1,strokeDasharray:\"1 1\",strokeDashoffset:1-len})})}),/*#__PURE__*/_jsx(\"path\",{d:d,fill:\"none\",stroke:props.color,strokeWidth:props.thickness,strokeLinecap:\"round\",strokeDasharray:props.dashed?\"2 9\":undefined,vectorEffect:\"non-scaling-stroke\",mask:\"url(#\"+mid+\")\"})]});}DrawPath.defaultProps={width:1e3,height:400};addPropertyControls(DrawPath,{shape:{type:ControlType.Enum,title:\"Shape\",options:[\"curve\",\"line\",\"loop\"],optionTitles:[\"Curve\",\"Line\",\"Loop\"],defaultValue:\"curve\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#2F5BEA\"},thickness:{type:ControlType.Number,title:\"Weight\",defaultValue:2,min:1,max:8,step:.5,unit:\"px\"},dashed:{type:ControlType.Boolean,title:\"Dashed\",defaultValue:true},start:{type:ControlType.Number,title:\"Start at\",defaultValue:0,min:0,max:90,unit:\"%\"},end:{type:ControlType.Number,title:\"Done at\",defaultValue:100,min:10,max:100,unit:\"%\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DrawPath\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"400\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"1000\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DrawPath.map"],"mappings":"A,yQAGA,SAASoB,EAAY,EAAI,EAAK,EAAG,EAAa,EAAI,CAAC,GAAK,CAACT,EAAEU,GAAMrB,EAAS,IAAO,EAA+mB,OAA7mBa,MAAc,CAAC,GAAGS,EAAI,OAAO,IAAIC,EAAI,EAAQC,MAAS,CAAC,EAAI,EAAE,IAAMC,EAAGC,EAAI,QAAQ,GAAG,CAACD,EAAG,OAAO,IAAME,EAAEF,EAAG,sBAAsB,EAAQG,EAAGvB,EAAO,YAAkBwB,EAAKC,GAAcC,EAAKC,GAAIJ,EAAGD,EAAE,QAAQI,EAAKC,GAAIJ,EAAGP,EAAK,KAAK,IAAI,EAAE,KAAK,IAAI,GAAGU,EAAKH,EAAGD,EAAE,KAAK,KAAK,IAAI,EAAEE,CAAI,CAAC,CAAC,CAAC,CAAE,EAAQI,MAAa,CAAC,AAAQV,IAAI,sBAAsBC,CAAI,CAAE,EAA8G,OAA5GA,EAAK,EAAEnB,EAAO,iBAAiB,SAAS4B,EAAS,CAAC,QAAQ,EAAI,CAAC,EAAE5B,EAAO,iBAAiB,SAAS4B,CAAQ,MAAY,CAAC5B,EAAO,oBAAoB,SAAS4B,CAAQ,EAAE5B,EAAO,oBAAoB,SAAS4B,CAAQ,EAAKV,GAAI,qBAAqBA,CAAG,CAAE,CAAE,EAAE,CAACQ,EAAKC,EAAGF,EAAaR,CAAG,CA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