{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/jGGZxRgCRo62AZCb5pQA/EsAQbZDDTAorEoqNnsvv/ScrollTextReveal.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useScroll,useTransform,useSpring}from\"framer-motion\";import{useRef,useEffect,useState}from\"react\";const EachWord=({word,starting,ending,startOpacity,endOpacity,progress,stiffness,damping})=>{const[sanitizedWord,setSanitizedWord]=useState(word);const progressVal=useTransform(progress,[starting,ending],[startOpacity,endOpacity]);const smoothProgress=useSpring(progressVal,{stiffness,damping});const animationStyles={opacity:smoothProgress,willChange:\"opacity\"};useEffect(()=>{if(typeof window!==\"undefined\"){import(\"dompurify\").then(DOMPurify=>{setSanitizedWord(DOMPurify.sanitize(word));});}},[word]);return /*#__PURE__*/_jsx(motion.span,{style:animationStyles,dangerouslySetInnerHTML:{__html:sanitizedWord}});};export default function Reveal(props){const text=props.text;const words=text.split(/(<[^>]+>[^<]*<\\/[^>]+>|<[^>]+>|[^<>\\s]+)/g).filter(Boolean)// Split by HTML tags and words, keeping tags with their content together\n;const totalWords=words.length;const ref=useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[`start ${props.startOffset}`,`end ${props.endOffset}`]});return /*#__PURE__*/_jsx(\"p\",{ref:ref,style:{...props.font,color:props.textColor,margin:0,padding:0},children:words.map((word,idx)=>{const starting=idx/totalWords;const ending=(idx+1)/totalWords;return /*#__PURE__*/_jsx(EachWord,{word:word,starting:starting,ending:ending,startOpacity:props.startOpacity,endOpacity:props.endOpacity,progress:scrollYProgress,stiffness:props.stiffness,damping:props.damping},idx);})});}addPropertyControls(Reveal,{text:{title:\"Text\",type:ControlType.String,defaultValue:\"Step into the future where each collection is a doorway to a different realm. <br><br>From the <b>nomadic trails</b> of the desert to the bustling streets of the urban jungle, our collections merge the <u>past's heritage</u> with the future's possibilities.<br><br>Futuristic architecture in the Amazon jungle\",displayTextArea:true},font:{type:\"font\",controls:\"extended\"},textColor:{type:ControlType.Color},startOffset:{title:\"Start Offset\",type:ControlType.Number,defaultValue:.75,min:0,max:1,step:.01},endOffset:{title:\"End Offset\",type:ControlType.Number,defaultValue:.15,min:0,max:1,step:.01},stiffness:{title:\"Stiffness\",type:ControlType.Number,defaultValue:100,min:0,max:1e3,step:1},damping:{title:\"Damping\",type:ControlType.Number,defaultValue:20,min:0,max:100,step:1},startOpacity:{title:\"Start Opacity\",type:ControlType.Number,defaultValue:.1,min:0,max:1,step:.01},endOpacity:{title:\"End Opacity\",type:ControlType.Number,defaultValue:1,min:0,max:1,step:.01}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Reveal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollTextReveal.map"],
  "mappings": "mJAA+M,IAAMA,EAAS,CAAC,CAAC,KAAAC,EAAK,SAAAC,EAAS,OAAAC,EAAO,aAAAC,EAAa,WAAAC,EAAW,SAAAC,EAAS,UAAAC,EAAU,QAAAC,CAAO,IAAI,CAAC,GAAK,CAACC,EAAcC,CAAgB,EAAEC,EAASV,CAAI,EAAQW,EAAYC,EAAaP,EAAS,CAACJ,EAASC,CAAM,EAAE,CAACC,EAAaC,CAAU,CAAC,EAAwES,EAAgB,CAAC,QAAlEC,EAAUH,EAAY,CAAC,UAAAL,EAAU,QAAAC,CAAO,CAAC,EAAgD,WAAW,SAAS,EAAE,OAAAQ,EAAU,IAAI,CAAI,OAAOC,EAAS,KAAa,OAAO,uBAAW,EAAE,KAAKC,GAAW,CAACR,EAAiBQ,EAAU,SAASjB,CAAI,CAAC,CAAE,CAAC,CAAG,EAAE,CAACA,CAAI,CAAC,EAAsBkB,EAAKC,EAAO,KAAK,CAAC,MAAMN,EAAgB,wBAAwB,CAAC,OAAOL,CAAa,CAAC,CAAC,CAAE,EAAiB,SAARY,EAAwBC,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AAE,IAAI,IAAI,KAAK,CAAC,EAAE,aAAa,CAAC,MAAM,gBAAgB,KAAKA,EAAY,OAAO,aAAa,GAAG,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,WAAW,CAAC,MAAM,cAAc,KAAKA,EAAY,OAAO,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC",
  "names": ["EachWord", "word", "starting", "ending", "startOpacity", "endOpacity", "progress", "stiffness", "damping", "sanitizedWord", "setSanitizedWord", "ye", "progressVal", "useTransform", "animationStyles", "useSpring", "ue", "window", "DOMPurify", "p", "motion", "Reveal", "props", "words", "totalWords", "ref", "pe", "scrollYProgress", "useScroll", "idx", "addPropertyControls", "ControlType"]
}
