{"version":3,"file":"withAnimatedText.ByT498dj.mjs","names":[],"sources":["https:/framerusercontent.com/modules/souMjlpYUJAk4OzqydYv/wkdP7ORQphOZWPbdIQmb/withAnimatedText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{stagger,useAnimate,useInView}from\"framer-motion\";const MIN_FONT_SIZE=\"2rem\";const MAX_FONT_SIZE=\"25rem\";const PREFERRED_FONT_SIZE=\"17cqi\";export function withAnimateChar(Component){return props=>{const[scopeRef,animate]=useAnimate();const isInView=useInView(scopeRef,{amount:.5});const easeOutCirc=[.075,.82,.165,1];const easeInCirc=[.6,.04,.98,.335];const settings={delay:stagger(.1)};useEffect(()=>{if(isInView){animate(\"span\",{y:[\"100%\",\"0%\"]},{...settings,duration:2,ease:easeOutCirc,onPlay:()=>scopeRef.current.style.opacity=1});}else{animate(\"span\",{y:[\"0%\",\"-100%\"]},{...settings,duration:1,ease:easeInCirc});}},[isInView]);useEffect(()=>{const text=scopeRef.current.querySelector(\".framer-text\");text.style.display=\"flex\";text.style.justifyContent=\"center\";text.style.fontSize=`clamp(${MIN_FONT_SIZE}, ${PREFERRED_FONT_SIZE}, ${MAX_FONT_SIZE})`;text.innerHTML=text.textContent.split(\"\").map((character,index)=>`<span style=\"display: inline-block\">${character}</span>`).join(\"\");},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:0},ref:scopeRef});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withAnimateChar\":{\"type\":\"reactHoc\",\"name\":\"withAnimateChar\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./withAnimatedText.map"],"mappings":"2QAAyN,SAAgB,EAAgB,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,GAAK,CAAC,EAAS,EAAQ,CAAC,GAAY,CAAO,EAAS,EAAU,EAAS,CAAC,OAAO,EAAG,EAAC,CAAO,EAAY,CAAC,KAA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