{"version":3,"file":"HeadingTextAnimation.DwpQ9Qa4.mjs","names":["fonts","css","className","fonts","css","className","React.useState","React.useRef"],"sources":["https:/framerusercontent.com/modules/sNluOTwJPzBns2CjXdJs/wJ3x16om2IBWYeDzmCVI/e2z2pSXf4.js","https:/framerusercontent.com/modules/hszhwjlpGGSvxPwlu6Zi/oskwSf1YdT2r02C4h6Lx/Pxx9smMdz.js","https:/framerusercontent.com/modules/yz8Ys1U8hIa9XK7m2tcK/JtNRGOGF7Vmv3jesGCvv/fXexAoNph.js","https:/framerusercontent.com/modules/rdoGo4MQeWK7sss9qJyO/7FL1tZVSL0kdAHJqS9nV/HeadingTextAnimation.js"],"sourcesContent":["// Generated by Framer (d369d66)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOMV2;GC Godthem Semi Bold\",\"CUSTOMV2;GC Godthem Bold\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"GC Godthem Semi Bold\",source:\"custom\",style:\"normal\",uiFamilyName:\"GC Godthem\",url:\"https://framerusercontent.com/assets/goiDmjQCYoE4On5oU7b4VLl2tPk.woff2\",weight:\"600\"},{cssFamilyName:\"GC Godthem Bold\",source:\"custom\",style:\"normal\",uiFamilyName:\"GC Godthem\",url:\"https://framerusercontent.com/assets/B1I0yTwpTOQbebF3wSiQ1XFeY.woff2\",weight:\"700\"}]}];export const css=['.framer-bu3Ew .framer-styles-preset-1kni9c5:not(.rich-text-wrapper), .framer-bu3Ew .framer-styles-preset-1kni9c5.rich-text-wrapper h5 { --framer-font-family: \"GC Godthem Semi Bold\", \"GC Godthem Semi Bold Placeholder\", sans-serif; --framer-font-family-bold: \"GC Godthem Bold\", \"GC Godthem Bold Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 28px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }','@media (max-width: 1199px) and (min-width: 810px) { .framer-bu3Ew .framer-styles-preset-1kni9c5:not(.rich-text-wrapper), .framer-bu3Ew .framer-styles-preset-1kni9c5.rich-text-wrapper h5 { --framer-font-family: \"GC Godthem Semi Bold\", \"GC Godthem Semi Bold Placeholder\", sans-serif; --framer-font-family-bold: \"GC Godthem Bold\", \"GC Godthem Bold Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 22px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 809px) and (min-width: 0px) { .framer-bu3Ew .framer-styles-preset-1kni9c5:not(.rich-text-wrapper), .framer-bu3Ew .framer-styles-preset-1kni9c5.rich-text-wrapper h5 { --framer-font-family: \"GC Godthem Semi Bold\", \"GC Godthem Semi Bold Placeholder\", sans-serif; --framer-font-family-bold: \"GC Godthem Bold\", \"GC Godthem Bold Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 18px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 600; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }'];export const className=\"framer-bu3Ew\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (dc3a148)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Instrument Sans-regular\",\"GF;Instrument Sans-700\",\"GF;Instrument Sans-700italic\",\"GF;Instrument Sans-italic\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Instrument Sans\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pximypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr-yp2JGEJOH9npSTF-QfwmS0v3_7Y.woff2\",weight:\"400\"},{family:\"Instrument Sans\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pximypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr-yp2JGEJOH9npSQi_gfwmS0v3_7Y.woff2\",weight:\"700\"},{family:\"Instrument Sans\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pxigypc9vsFDm051Uf6KVwgkfoSbSnNPooZAN0lInHGpCWNE27lgU-XJojENugixkywN2u7YUwU.woff2\",weight:\"700\"},{family:\"Instrument Sans\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pxigypc9vsFDm051Uf6KVwgkfoSbSnNPooZAN0lInHGpCWNE27lgU-XJojENuu-2kywN2u7YUwU.woff2\",weight:\"400\"}]}];export const css=['.framer-dHn7q .framer-styles-preset-14nix7w:not(.rich-text-wrapper), .framer-dHn7q .framer-styles-preset-14nix7w.rich-text-wrapper p { --framer-font-family: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 18px; --framer-font-style: normal; --framer-font-style-bold: normal; --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.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }','@media (max-width: 1199px) and (min-width: 810px) { .framer-dHn7q .framer-styles-preset-14nix7w:not(.rich-text-wrapper), .framer-dHn7q .framer-styles-preset-14nix7w.rich-text-wrapper p { --framer-font-family: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --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.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 809px) and (min-width: 600px) { .framer-dHn7q .framer-styles-preset-14nix7w:not(.rich-text-wrapper), .framer-dHn7q .framer-styles-preset-14nix7w.rich-text-wrapper p { --framer-font-family: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 14px; --framer-font-style: normal; --framer-font-style-bold: normal; --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.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 599px) and (min-width: 0px) { .framer-dHn7q .framer-styles-preset-14nix7w:not(.rich-text-wrapper), .framer-dHn7q .framer-styles-preset-14nix7w.rich-text-wrapper p { --framer-font-family: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 14px; --framer-font-style: normal; --framer-font-style-bold: normal; --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.5em; --framer-paragraph-spacing: 16px; --framer-text-alignment: start; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }'];export const className=\"framer-dHn7q\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (b4533c2)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Instrument Sans-regular\",\"GF;Instrument Sans-700\",\"GF;Instrument Sans-700italic\",\"GF;Instrument Sans-italic\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"Instrument Sans\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pximypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr-yp2JGEJOH9npSTF-QfwmS0v3_7Y.woff2\",weight:\"400\"},{family:\"Instrument Sans\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pximypc9vsFDm051Uf6KVwgkfoSxQ0GsQv8ToedPibnr-yp2JGEJOH9npSQi_gfwmS0v3_7Y.woff2\",weight:\"700\"},{family:\"Instrument Sans\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pxigypc9vsFDm051Uf6KVwgkfoSbSnNPooZAN0lInHGpCWNE27lgU-XJojENugixkywN2u7YUwU.woff2\",weight:\"700\"},{family:\"Instrument Sans\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/instrumentsans/v3/pxigypc9vsFDm051Uf6KVwgkfoSbSnNPooZAN0lInHGpCWNE27lgU-XJojENuu-2kywN2u7YUwU.woff2\",weight:\"400\"}]}];export const css=['.framer-BiY8i .framer-styles-preset-1j1xzvk:not(.rich-text-wrapper), .framer-BiY8i .framer-styles-preset-1j1xzvk.rich-text-wrapper p { --framer-font-family: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 20px; --framer-font-style: normal; --framer-font-style-bold: normal; --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.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }','@media (max-width: 1199px) and (min-width: 810px) { .framer-BiY8i .framer-styles-preset-1j1xzvk:not(.rich-text-wrapper), .framer-BiY8i .framer-styles-preset-1j1xzvk.rich-text-wrapper p { --framer-font-family: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --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.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 809px) and (min-width: 0px) { .framer-BiY8i .framer-styles-preset-1j1xzvk:not(.rich-text-wrapper), .framer-BiY8i .framer-styles-preset-1j1xzvk.rich-text-wrapper p { --framer-font-family: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-family-italic: \"Instrument Sans\", \"Instrument Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --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.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-da81f410-c299-41aa-8ecd-001a1586cb19, #171412); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }'];export const className=\"framer-BiY8i\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const SCRAMBLE_CHARS=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&@$*+=\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 700\n * @framerIntrinsicHeight 160\n */export default function HeadingTextAnimation(props){const{text,mode,font,color,typeSpeed,scrambleSpeed,revealSpeed,cursorWidth,cursorColor,cursorBlink,startDelay,loop,loopPause,align,viewThreshold,replayOnReenter,responsive,minFontSize,fluidWidth}=props;const onCanvas=RenderTarget.current()===RenderTarget.canvas;const[display,setDisplay]=React.useState(onCanvas?text:\"\");const[done,setDone]=React.useState(onCanvas);const[inView,setInView]=React.useState(onCanvas);const[cursorOn,setCursorOn]=React.useState(true);const containerRef=React.useRef(null);// the Font control's size is the desktop max; when responsive, clamp it\n// down toward minFontSize as the *parent frame* narrows. We use cqw\n// (container-query width) instead of vw so the text tracks the container's\n// own width, not the viewport. clamp(min, fluid cqw, max)\nconst desktopSize=parseFloat(font&&font.fontSize)||40;const fontSizeValue=responsive?`clamp(${Math.min(minFontSize,desktopSize)}px, ${fluidWidth}cqw, ${desktopSize}px)`:font&&font.fontSize;// ---- trigger when the heading scrolls into view ------------------------\nReact.useEffect(()=>{if(onCanvas)return;const el=containerRef.current;if(!el||typeof IntersectionObserver===\"undefined\"){setInView(true);return;}const threshold=Math.min(1,Math.max(0,viewThreshold));const io=new IntersectionObserver(entries=>{const entry=entries[0];if(!entry)return;if(entry.isIntersecting){setInView(true);}else if(replayOnReenter){setInView(false);setDone(false);setDisplay(\"\");}},{threshold});io.observe(el);return()=>io.disconnect();},[onCanvas,viewThreshold,replayOnReenter]);// ---- run the animation -------------------------------------------------\nReact.useEffect(()=>{if(onCanvas){setDisplay(text);setDone(true);return;}if(!inView){setDisplay(\"\");setDone(false);return;}const chars=Array.from(text||\"\");let cancelled=false;const timers=[];const later=(fn,ms)=>{const id=setTimeout(fn,ms);timers.push(id);};const finish=()=>{setDone(true);if(loop)later(start,Math.max(0,loopPause)*1e3);};const runType=()=>{setDone(false);setDisplay(\"\");let i=0;const stepMs=1e3/Math.max(1,typeSpeed);const step=()=>{if(cancelled)return;i++;setDisplay(chars.slice(0,i).join(\"\"));if(i<chars.length)later(step,stepMs);else finish();};later(step,stepMs);};const runScramble=()=>{setDone(false);const lockAt=chars.map((_,idx)=>Math.round(idx*(3/Math.max(.1,revealSpeed)))+3);const maxTick=chars.length?Math.max.apply(null,lockAt):0;const tickMs=1e3/Math.max(1,scrambleSpeed);let tick=0;const step=()=>{if(cancelled)return;tick++;const out=chars.map((ch,idx)=>{if(ch===\" \")return\" \";if(tick>=lockAt[idx])return ch;return SCRAMBLE_CHARS.charAt(Math.floor(Math.random()*SCRAMBLE_CHARS.length));});setDisplay(out.join(\"\"));if(tick<maxTick)later(step,tickMs);else{setDisplay(text);finish();}};later(step,tickMs);};const start=()=>{if(cancelled)return;if(mode===\"scramble\")runScramble();else runType();};later(start,Math.max(0,startDelay)*1e3);return()=>{cancelled=true;timers.forEach(id=>clearTimeout(id));};},[onCanvas,inView,text,mode,typeSpeed,scrambleSpeed,revealSpeed,startDelay,loop,loopPause]);// ---- blinking cursor ---------------------------------------------------\nReact.useEffect(()=>{if(onCanvas||!cursorBlink){setCursorOn(true);return;}const id=setInterval(()=>setCursorOn(v=>!v),500);return()=>clearInterval(id);},[onCanvas,cursorBlink]);const idle=!onCanvas&&!inView;// cursor belongs here while idle, and at all times in type mode\nconst reserveCursor=idle||mode===\"type\";const cursorVisible=!cursorBlink||cursorOn;// zero-width cursor: it floats at the caret without taking layout space,\n// so it never shifts where the text wraps and never lands on its own line\nconst cursorEl=reserveCursor?/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"inline-block\",width:0,height:\"1em\",verticalAlign:\"text-bottom\",position:\"relative\"},children:/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",left:cursorWidth*.4,top:0,width:cursorWidth,height:\"1em\",background:cursorColor,opacity:cursorVisible?1:0}})}):null;// The overlay always renders the FULL text so wrapping is locked to the\n// final layout: characters that belong on line 2 are rendered (invisibly)\n// on line 2 from the start, then just become visible in place as they're\n// revealed — they never start on line 1 and jump down.\nconst fullText=text||\"\";const revealed=display;const remainder=fullText.slice(revealed.length);// shared text styling so the sizer and the animated overlay wrap the same\nconst textStyles={...font,fontSize:fontSizeValue,color,// pre-wrap keeps spaces AND honors manual line breaks (\\n in the Text\n// field) while still wrapping when too wide\nwhiteSpace:\"pre-wrap\",overflowWrap:\"break-word\",textAlign:align,margin:0};const justify=align===\"left\"?\"flex-start\":align===\"right\"?\"flex-end\":\"center\";return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{display:\"flex\",alignItems:\"center\",justifyContent:justify,width:\"100%\",height:\"100%\",// make this element a query container so `cqw` in the text's\n// font size resolves against this width (the parent frame)\ncontainerType:\"inline-size\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",minWidth:0},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{...textStyles,display:\"block\",visibility:\"hidden\"},children:fullText}),/*#__PURE__*/_jsxs(\"span\",{style:{...textStyles,display:\"block\",position:\"absolute\",top:0,left:0,width:\"100%\"},children:[revealed,cursorEl,/*#__PURE__*/_jsx(\"span\",{style:{color:\"transparent\"},children:remainder})]})]})});}HeadingTextAnimation.defaultProps={text:\"PIXEL HEADING\",mode:\"type\",font:{fontFamily:\"'Press Start 2P', monospace\",fontSize:40,letterSpacing:\"2px\",lineHeight:\"1.1em\"},color:\"#111111\",typeSpeed:12,scrambleSpeed:24,revealSpeed:1,cursorWidth:18,cursorColor:\"#111111\",cursorBlink:true,startDelay:.2,loop:false,loopPause:1.4,align:\"left\",viewThreshold:.4,replayOnReenter:false,responsive:true,minFontSize:24,fluidWidth:6};addPropertyControls(HeadingTextAnimation,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"PIXEL HEADING\",displayTextArea:true},mode:{type:ControlType.Enum,title:\"Mode\",options:[\"type\",\"scramble\"],optionTitles:[\"Type\",\"Scramble\"],displaySegmentedControl:true,defaultValue:\"type\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"monospace\",defaultValue:{fontSize:40,lineHeight:\"1.1em\"}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#111111\"},align:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true,defaultValue:\"left\"},typeSpeed:{type:ControlType.Number,title:\"Type Speed\",defaultValue:12,min:1,max:40,unit:\"/s\",hidden:p=>p.mode!==\"type\"},cursorWidth:{type:ControlType.Number,title:\"Cursor W\",defaultValue:18,min:2,max:60,unit:\"px\"},cursorColor:{type:ControlType.Color,title:\"Cursor\",defaultValue:\"#111111\"},cursorBlink:{type:ControlType.Boolean,title:\"Blink\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},scrambleSpeed:{type:ControlType.Number,title:\"Jumble Rate\",defaultValue:24,min:4,max:60,unit:\"/s\",hidden:p=>p.mode!==\"scramble\"},revealSpeed:{type:ControlType.Number,title:\"Reveal Speed\",defaultValue:1,min:.2,max:4,step:.1,hidden:p=>p.mode!==\"scramble\"},startDelay:{type:ControlType.Number,title:\"Delay\",defaultValue:.2,min:0,max:5,step:.1,unit:\"s\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},loopPause:{type:ControlType.Number,title:\"Loop Pause\",defaultValue:1.4,min:0,max:6,step:.1,unit:\"s\",hidden:p=>!p.loop},viewThreshold:{type:ControlType.Number,title:\"In-View %\",defaultValue:.4,min:0,max:1,step:.05},replayOnReenter:{type:ControlType.Boolean,title:\"Replay\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},responsive:{type:ControlType.Boolean,title:\"Responsive\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Scale the Font size down as the parent frame narrows (Font size = desktop max)\"},minFontSize:{type:ControlType.Number,title:\"Min Size\",defaultValue:24,min:6,max:200,unit:\"px\",description:\"Mobile floor — never shrinks below this\",hidden:p=>!p.responsive},fluidWidth:{type:ControlType.Number,title:\"Fluid\",defaultValue:6,min:1,max:20,step:.5,unit:\"cqw\",description:\"How fast the size scales with the parent frame's width\",hidden:p=>!p.responsive}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HeadingTextAnimation\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"700\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"160\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HeadingTextAnimation.map"],"mappings":"mOAC6B,EAAC,EAAU,UAAU,CAAC,gCAAgC,0BAA0B,CAAC,EAAeA,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,cAAc,uBAAuB,OAAO,SAAS,MAAM,SAAS,aAAa,aAAa,IAAI,yEAAyE,OAAO,KAAK,EAAE,CAAC,cAAc,kBAAkB,OAAO,SAAS,MAAM,SAAS,aAAa,aAAa,IAAI,uEAAuE,OAAO,KAAK,CAAC,CAAC,CAAC,EAAeC,EAAI,CAAC,23BAA23B,i7BAAi7B,66BAA66B,EAAeC,EAAU,oCCAtvG,EAAC,EAAU,UAAU,CAAC,6BAA6B,yBAAyB,+BAA+B,2BAA2B,CAAC,EAAeC,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,OAAO,kBAAkB,OAAO,SAAS,MAAM,SAAS,IAAI,+HAA+H,OAAO,KAAK,EAAE,CAAC,OAAO,kBAAkB,OAAO,SAAS,MAAM,SAAS,IAAI,+HAA+H,OAAO,KAAK,EAAE,CAAC,OAAO,kBAAkB,OAAO,SAAS,MAAM,SAAS,IAAI,kIAAkI,OAAO,KAAK,EAAE,CAAC,OAAO,kBAAkB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