{"version":3,"file":"ScrubText.3HCWQzmd.mjs","names":["useRef","__esmMin","de","p","c","init_jsx_runtime","init_npm_react_18_3_1","useScroll","useTransform","init_framer_motion_DhsWWWsN","motion","init_framer_D6uXRwWs","addPropertyControls","fontStore","useIsStaticRenderer","ControlType","fonts","css","className","init_kWbxWfLEA","Word","start","i","n","end","opacity","progress","dim","word","accent","color","ScrubText","props","ref","isStatic","words","text","hl","highlight","s","isAccent","w","h","font","accentColor","dimColor","scrollYProgress","init_ScrubText"],"sources":["https:/framerusercontent.com/modules/N4Labfgplw42sRZLRWkp/i8Y9nrynioUSj9HYlBqK/kWbxWfLEA.js","https:/framerusercontent.com/modules/rPIxe52Vt8kEQwbyRR6O/303ALDcM4UZ5Q29AJAB7/ScrubText.js"],"sourcesContent":["// Generated by Framer (7788242)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"FS;Switzer-italic\",\"FS;Switzer-bold italic\",\"FS;Switzer-bold italic\",\"FS;Switzer-italic\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Switzer\",openType:true,source:\"fontshare\",style:\"italic\",uiFamilyName:\"Switzer\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/XVUY2PHYBA6KMN4RMEMJPHQSTKCQ267G/UICOQA6KCSHFOSCPYDVVDNNCDKYFXHJB/O34WRFYO7JNWEBBA2LRV2XYRUSYXYDKH.woff2\",weight:\"400\"},{cssFamilyName:\"Switzer\",openType:true,source:\"fontshare\",style:\"italic\",uiFamilyName:\"Switzer\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/LVPXCMXCWY3V7PSXRMGRQUJDAS2DT47E/BPEVRT2HG7PPVVUS7A67MZQQZW6LR6A5/A7AS3UPAGLC7MDVC67SBNTE5FGF2Z2RG.woff2\",weight:\"700\"}]}];export const css=['.framer-teMfE .framer-styles-preset-l4kyhu:not(.rich-text-wrapper), .framer-teMfE .framer-styles-preset-l4kyhu.rich-text-wrapper p { --framer-font-family: \"Switzer\", \"Switzer Placeholder\", sans-serif; --framer-font-family-bold: \"Switzer\", \"Switzer Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Switzer\", \"Switzer Placeholder\", sans-serif; --framer-font-family-italic: \"Switzer\", \"Switzer Placeholder\", sans-serif; --framer-font-open-type-features: \\'blwf\\' on, \\'cv03\\' on, \\'cv04\\' on, \\'cv09\\' on, \\'cv11\\' on; --framer-font-size: 12px; --framer-font-style: italic; --framer-font-style-bold: italic; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: 0em; --framer-line-height: 1.45em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-9625d5c7-6096-4f55-9881-46eb3b44cfad); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-teMfE\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useScroll,useTransform}from\"framer-motion\";import{useRef}from\"react\";function Word({word,i,n,progress,color,dim,accent}){const start=i/n;const end=Math.min(1,start+1.5/n);const opacity=useTransform(progress,[start,end],[.16,1]);return /*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"inline-block\",marginRight:\"0.24em\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:dim,position:\"absolute\",inset:0,opacity:0},children:word}),/*#__PURE__*/_jsx(motion.span,{style:{opacity,color:accent?\"inherit\":color,fontStyle:accent?\"italic\":undefined},children:word})]});}/**\n * Scrub Text — words light up one by one as the reader scrolls.\n * Words listed in Highlight are set in italic accent colour.\n *\n * @framerIntrinsicWidth 900\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function ScrubText(props){const{text=\"Golf is only part of the STRYV\\xc9N experience.\",highlight=\"STRYV\\xc9N\",color=\"#F2F0EA\",dimColor=\"#504E49\",accentColor=\"#FF5B1F\",font}=props;const ref=useRef(null);const isStatic=useIsStaticRenderer();const{scrollYProgress}=useScroll({target:ref,offset:[\"start 0.9\",\"end 0.45\"]});const words=text.split(/\\s+/).filter(Boolean);const hl=highlight.split(\",\").map(s=>s.trim().toLowerCase()).filter(Boolean);const isAccent=w=>hl.some(h=>w.toLowerCase().replace(/[.,—–!?;:]/g,\"\").includes(h));return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{position:\"relative\",width:\"100%\",margin:0,...font,...props.style,height:\"auto\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color},children:words.map((w,i)=>{const accent=isAccent(w);if(isStatic)return /*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",marginRight:\"0.24em\",color:accent?accentColor:i<words.length*.55?color:dimColor,fontStyle:accent?\"italic\":undefined},children:w},i);return /*#__PURE__*/_jsx(\"span\",{style:{color:accent?accentColor:undefined},children:/*#__PURE__*/_jsx(Word,{word:w,i:i,n:words.length,progress:scrollYProgress,color:color,dim:dimColor,accent:accent})},i);})})});}addPropertyControls(ScrubText,{text:{type:ControlType.String,displayTextArea:true,defaultValue:\"Golf is only part of the STRYV\\xc9N experience.\"},highlight:{type:ControlType.String,defaultValue:\"STRYV\\xc9N\",description:\"Comma separated words set in italic accent\"},color:{type:ControlType.Color,defaultValue:\"#F2F0EA\"},dimColor:{type:ControlType.Color,defaultValue:\"#504E49\"},accentColor:{type:ControlType.Color,defaultValue:\"#FF5B1F\"},font:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"64px\",variant:\"Medium\",letterSpacing:\"-0.04em\",lineHeight:\"1.05em\",textAlign:\"left\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrubText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"900\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrubText.map"],"mappings":"A,2SAC8Ba,EAAU,UAAU,CAAC,oBAAoB,yBAAyB,yBAAyB,mBAAmB,CAAC,EAAe,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,cAAc,UAAU,SAAS,GAAK,OAAO,YAAY,MAAM,SAAS,aAAa,UAAU,IAAI,yKAAyK,OAAO,KAAK,EAAE,CAAC,cAAc,UAAU,SAAS,GAAK,OAAO,YAAY,MAAM,SAAS,aAAa,UAAU,IAAI,yKAAyK,OAAO,KAAK,CAAC,CAAC,CAAC,EAAe,EAAI,CAAC,wqCAAkrC,EAAe,EAAU,c,OCDhwD,SAASO,EAAK,CAAC,OAAK,IAAE,IAAE,WAAS,QAAM,MAAI,UAAQ,CAAC,IAAMC,EAAMC,EAAEC,EAAQC,EAAI,KAAK,IAAI,EAAEH,EAAM,IAAIE,CAAC,EAAQE,EAAQjB,EAAakB,EAAS,CAACL,EAAMG,CAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,MAAoB,gBAAM,OAAO,CAAC,MAAM,CAAC,SAAS,WAAW,QAAQ,eAAe,YAAY,QAAQ,EAAE,SAAS,CAAc,gBAAK,OAAO,CAAC,MAAM,CAAC,MAAMG,EAAI,SAAS,WAAW,MAAM,EAAE,QAAQ,CAAC,EAAE,SAASC,CAAI,CAAC,EAAe,gBAAKlB,EAAO,KAAK,CAAC,MAAM,CAAC,UAAQ,MAAMmB,EAAO,UAAUC,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