{"version":3,"file":"Text_Highlight_Effect.DQqqBSUl.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/aeWfcF6hOotuAUDcpFNl/5ijdMNReg099mw68qKeI/Text_Highlight_Effect.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function withHighlightColor1(Component){return props=>{useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);console.log(\"HighlightColor1 - Found elements:\",elements.length);elements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");element.parentNode.insertBefore(markElement,element);markElement.appendChild(element);while(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");if(!highlightedValue||parseInt(highlightedValue)===0){if(entry.isIntersecting){entry.target.style.setProperty(\"--highlighted\",\"1\");const span=entry.target.querySelector(\"span\");if(span){setTimeout(()=>{span.style.color=\"white\";},400);}}else{entry.target.style.setProperty(\"--highlighted\",\"0\");}}});};const observer=new IntersectionObserver(handle,{threshold:.1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} {\noverflow: visible !important;\n}\n\n\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(241, 157, 0, 1);\nbackground: transparent;\noverflow: visible;\ndisplay: inline;\n}\n\n\n.${props.className} mark span {\nbackground: linear-gradient(120deg, var(--highlight) 53%, transparent 53%) 110% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 110%) 0;\ntransition: background-position 1s, color 0.5s;\npadding: 3px 2px 4px;\nbox-decoration-break: clone;\n-webkit-box-decoration-break: clone;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props})]});};}export function withHighlightColor2(Component){return props=>{useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);console.log(\"HighlightColor2 - Found elements:\",elements.length);elements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");element.parentNode.insertBefore(markElement,element);markElement.appendChild(element);while(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");if(!highlightedValue||parseInt(highlightedValue)===0){if(entry.isIntersecting){entry.target.style.setProperty(\"--highlighted\",\"1\");const span=entry.target.querySelector(\"span\");if(span){setTimeout(()=>{span.style.color=\"white\";},400);}}else{entry.target.style.setProperty(\"--highlighted\",\"0\");}}});};const observer=new IntersectionObserver(handle,{threshold:.1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} {\noverflow: visible !important;\n}\n\n\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(241, 157, 0, 1);\nbackground: transparent;\noverflow: visible;\ndisplay: inline;\n}\n\n\n.${props.className} mark span {\nbackground: linear-gradient(120deg, var(--highlight) 53%, transparent 53%) 110% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 110%) 0;\ntransition: background-position 1s, color 0.5s;\nbox-decoration-break: clone;\n-webkit-box-decoration-break: clone;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props})]});};}export function withHighlightColor3(Component){return props=>{useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);console.log(\"HighlightColor3 - Found elements:\",elements.length);elements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");element.parentNode.insertBefore(markElement,element);markElement.appendChild(element);while(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");if(!highlightedValue||parseInt(highlightedValue)===0){if(entry.isIntersecting){entry.target.style.setProperty(\"--highlighted\",\"1\");const span=entry.target.querySelector(\"span\");if(span){setTimeout(()=>{span.style.color=\"white\";},400);}}else{entry.target.style.setProperty(\"--highlighted\",\"0\");}}});};const observer=new IntersectionObserver(handle,{threshold:.1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} {\noverflow: visible !important;\n}\n\n\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(35, 89, 206, 1);\nbackground: transparent;\noverflow: visible;\ndisplay: inline;\n}\n\n\n.${props.className} mark span {\nbackground: linear-gradient(120deg, var(--highlight) 53%, transparent 53%) 110% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 110%) 0;\ntransition: background-position 1s, color 0.5s;\npadding: 3px 2px 4px;\nbox-decoration-break: clone;\n-webkit-box-decoration-break: clone;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHighlightColor1\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor3\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor2\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_Highlight_Effect.map"],"mappings":"gIAA4G,SAAgB,EAAoB,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAC,IAAM,EAAS,SAAS,iBAAiB,IAAI,EAAM,UAAU,sCAAsC,CAAC,QAA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