{"version":3,"file":"ScrollProgress.D6ExZghc.mjs","names":["__esmMin","init_jsx_runtime","c","motion","useSpring","useScroll","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BWFVvmND","ControlType","ScrollProgress","props","scaleX","scrollYProgress","originX","alignment","containerStyle","trackColor","inset","isFixed","indicatorColor","borderRadius","init_ScrollProgress"],"sources":["https:/framerusercontent.com/modules/Qn5au7kp4FJQ61N5ZOQQ/zDy0SPgjrHF2ovpgmfq6/ScrollProgress.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useScroll,useSpring}from\"framer-motion\";/**\n * Scroll Progress\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 10\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ScrollProgress(props){const{trackColor,indicatorColor,borderRadius,alignment,inset,isFixed,zIndex}=props;const{scrollYProgress}=useScroll();const scaleX=useSpring(scrollYProgress,{stiffness:100,damping:30,restDelta:.001});const isHorizontal=true// Simplified as per prompt request for horizontal line\n;// Determine origin for scaling based on alignment\nlet originX=0;if(isHorizontal){if(alignment===\"center\")originX=.5;else if(alignment===\"end\")originX=1;}const containerStyle={width:\"100%\",height:\"100%\",minHeight:5,backgroundColor:trackColor,borderRadius:borderRadius,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:alignment===\"start\"?\"flex-start\":alignment===\"end\"?\"flex-end\":\"center\",padding:inset};if(isFixed){Object.assign(containerStyle,{position:\"fixed\",top:0,left:0,right:0,zIndex:zIndex});}return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",backgroundColor:indicatorColor,borderRadius:Math.max(0,borderRadius-inset),scaleX,originX}})});}addPropertyControls(ScrollProgress,{isFixed:{type:ControlType.Boolean,title:\"Fixed Top\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},zIndex:{type:ControlType.Number,title:\"Z-Index\",defaultValue:999,min:0,hidden:props=>!props.isFixed},trackColor:{type:ControlType.Color,title:\"Track\",defaultValue:\"rgba(0,0,0,0.1)\"},indicatorColor:{type:ControlType.Color,title:\"Indicator\",defaultValue:\"#0099FF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:5,min:0,max:100},inset:{type:ControlType.Number,title:\"Inset\",defaultValue:0,min:0,max:20,displayStepper:true},alignment:{type:ControlType.Enum,title:\"Origin\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"start\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollProgress\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"10\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollProgress.map"],"mappings":"A,2NAQG,SAAwBU,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,iBAAe,eAAa,YAAU,QAAM,UAAQ,UAAQC,EAAW,CAAC,mBAAiBN,EAAU,EAAQO,EAAOR,EAAUS,EAAgB,CAAC,UAAU,IAAI,QAAQ,GAAG,UAAU,IAAI,CAAC,EAEnPC,EAAQ,EAAsBC,IAAY,SAAS,EAAQ,GAAWA,IAAY,QAAM,EAAQ,GAAG,IAAMC,EAAe,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,EAAE,gBAAgBC,EAAwB,eAAa,SAAS,SAAS,QAAQ,OAAO,WAAW,SAAS,eAAeF,IAAY,QAAQ,aAAaA,IAAY,MAAM,WAAW,SAAS,QAAQG,CAAK,EAAmG,OAA9FC,GAAS,OAAO,OAAOH,EAAe,CAAC,SAAS,QAAQ,IAAI,EAAE,KAAK,EAAE,MA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