{"version":3,"file":"ReadingProgress.-sUgiH8T.mjs","names":["__esmMin","c","init_jsx_runtime","useSpring","motion","useScroll","useReducedMotion","init_framer_motion_DhsWWWsN","useLocaleInfo","addPropertyControls","init_framer_CKT6jEEQ","ControlType","ReadingProgress","reduce","spring","scrollYProgress","code","activeLocale","rtl","direction","track","color","smooth","init_ReadingProgress"],"sources":["https:/framerusercontent.com/modules/GP4kpfraKx28uPGy7ZnG/t3uYzEHae3kt1gMgGwFU/ReadingProgress.js"],"sourcesContent":["// ReadingProgress: a thin bar that fills as the page is read, for the case study template.\n// Why code: Framer's scroll effects scale a layer on both axes, so a 3 px line can't grow in width only.\n// This uses Framer's own motion hook (useScroll) and nothing else; no scroll provider is added.\n// Place one instance at the top of the page, set it to Fixed, Top 0, full width, Height 3.\n// Colour: pick the \"Service/Accent Signature\" colour style, so the bar follows the case's Palette.\n// In Arabic the bar fills from the right; in English from the left (Auto direction).\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";import{motion,useScroll,useSpring,useReducedMotion}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1440\n * @framerIntrinsicHeight 3\n */export default function ReadingProgress({color,track,direction,smooth}){const{scrollYProgress}=useScroll();const reduce=useReducedMotion();const spring=useSpring(scrollYProgress,{stiffness:140,damping:26,restDelta:.001});const{activeLocale}=useLocaleInfo();const code=String(activeLocale?.code||\"ar\").toLowerCase();const rtl=direction===\"auto\"?code.startsWith(\"ar\"):direction===\"rtl\";return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",background:track,overflow:\"hidden\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",background:color,transformOrigin:rtl?\"100% 50%\":\"0% 50%\",scaleX:smooth&&!reduce?spring:scrollYProgress}})});}ReadingProgress.defaultProps={color:\"rgb(0, 26, 255)\",track:\"rgba(0, 0, 0, 0)\",direction:\"auto\",smooth:true};addPropertyControls(ReadingProgress,{color:{type:ControlType.Color,title:\"Colour\",defaultValue:\"rgb(0, 26, 255)\"},track:{type:ControlType.Color,title:\"Track\",defaultValue:\"rgba(0, 0, 0, 0)\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"auto\",\"rtl\",\"ltr\"],optionTitles:[\"Auto (by language)\",\"Right to left\",\"Left to right\"],defaultValue:\"auto\"},smooth:{type:ControlType.Boolean,title:\"Smooth\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ReadingProgress\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"3\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"1440\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReadingProgress.map"],"mappings":"A,0OAWG,SAAwBY,EAAgB,CAAC,QAAM,QAAM,YAAU,UAAQ,CAAC,GAAK,CAAC,mBAAiBP,EAAU,EAAQQ,EAAOP,EAAiB,EAAQQ,EAAOX,EAAUY,EAAgB,CAAC,UAAU,IAAI,QAAQ,GAAG,UAAU,IAAI,CAAC,EAAO,CAAC,gBAAcP,EAAc,EAAQQ,EAAK,OAAOC,GAAc,MAAM,IAAI,CAAC,CAAC,YAAY,EAAQC,EAAIC,IAAY,OAAOH,EAAK,WAAW,IAAI,EAAEG,IAAY,MAAM,MAAoB,gBAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,WAAWC,EAAM,SAAS,QAAQ,EAAE,cAAc,OAAO,SAAsB,gBAAKhB,EAAO,IAAI,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,WAAWiB,EAAM,gBAAgBH,EAAI,WAAW,SAAS,OAAOI,GAAQ,CAACT,EAAOC,EAAOC,CAAe,CAA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