{"version":3,"file":"Highlighted.C_HyHzrl.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/bLB9ebehAmotIKq9Rx4v/v1dqkO9AB81ds8r7PA73/Highlighted.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function withHighlightColor1(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);elements.forEach(element=>{const depth=getNestedDepth(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);markElement.setAttribute(\"data-depth\",depth.toString());});// Always show the layer, even when it has no highlighted text\n// (or a nested highlight already converted it).\nsetIsVisible(true);const handle=entries=>{entries.forEach(entry=>{const markElement=entry.target;markElement.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"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} mark {\n    --highlighted: 0;\n    background: transparent;\n}\n\n.${props.className} mark span {\n    background: linear-gradient(90deg, rgba(248, 254, 3, 1) 50%, transparent 50%) 110% 0 / 200% 100% no-repeat;\n    background-position: calc((1 - var(--highlighted)) * 120%) 0;\n    transition: background-position 0.7s;\n    color: black;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}export function withHighlightColor2(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);elements.forEach(element=>{const depth=getNestedDepth(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);markElement.setAttribute(\"data-depth\",depth.toString());});// Always show the layer, even when it has no highlighted text\n// (or a nested highlight already converted it).\nsetIsVisible(true);const handle=entries=>{entries.forEach(entry=>{const markElement=entry.target;markElement.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"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} mark {\n    --highlighted: 0;\n    background: transparent;\n}\n\n.${props.className} mark span {\n    background: linear-gradient(90deg, rgb(239 68 68) 50%, transparent 50%) 110% 0 / 200% 100% no-repeat;\n    background-position: calc((1 - var(--highlighted)) * 120%) 0;\n    transition: background-position 0.7s;\n    color: black;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}function getNestedDepth(element){let depth=0;let parent=element.parentElement;while(parent&&parent.closest(`.${element.className}`)){depth++;parent=parent.parentElement;}return depth;}\nexport const __FramerMetadata__ = {\"exports\":{\"withHighlightColor1\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor2\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Highlighted.map"],"mappings":"uIAAqH,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,EAAK,EAEqE,OAFnE,MAAc,CAAC,IAAM,EAAS,SAAS,iBAAiB,IAAI,EAAM,UAAU,qCAAqC,EAAE,EAAS,QAAQ,GAAS,CAAC,IAAM,EAAM,EAAe,CAA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