{"version":3,"file":"Background_Color.odd0cydJ.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/66rJmg81khjpivZl7ZNE/METcrAVW5Z7TqJGG8Ixc/Background_Color.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";/**\n * Apply to Page Wrapper - reads CMS colors and applies them globally\n */export function withCMSPageColors(Component){return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{let lastBgColor=\"\";let lastPrimaryColor=\"\";const applyColors=()=>{const pageWrapper=document.querySelector('[data-framer-name=\"Page Wrapper\"]');if(pageWrapper){const bgColor=window.getComputedStyle(pageWrapper).backgroundColor;if(bgColor&&bgColor!==\"rgba(0, 0, 0, 0)\"&&bgColor!==lastBgColor){lastBgColor=bgColor;document.documentElement.style.setProperty(\"--cms-background-color\",bgColor);document.body.style.setProperty(\"background-color\",bgColor,\"important\");}const titleElement=pageWrapper.querySelector(\"h1\");if(titleElement){const primaryColor=window.getComputedStyle(titleElement).color;if(primaryColor&&primaryColor!==\"rgba(0, 0, 0, 0)\"&&primaryColor!==lastPrimaryColor){lastPrimaryColor=primaryColor;document.documentElement.style.setProperty(\"--cms-primary-color\",primaryColor);}}}};applyColors();setTimeout(applyColors,100);const interval=setInterval(applyColors,300);return()=>{clearInterval(interval);document.documentElement.style.removeProperty(\"--cms-background-color\");document.documentElement.style.removeProperty(\"--cms-primary-color\");document.body.style.removeProperty(\"background-color\");};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}/**\n * Apply to Projects/Marquee section - colors h2 with primary color\n * Only affects h2 elements within this component\n */export function withCMSMarqueeColors(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const containerRef=useRef(null);useEffect(()=>{let lastAppliedColor=\"\";const applyMarqueeColors=()=>{const primaryColor=getComputedStyle(document.documentElement).getPropertyValue(\"--cms-primary-color\").trim();if(!primaryColor||primaryColor===lastAppliedColor)return;if(!containerRef.current)return;lastAppliedColor=primaryColor;// Only find h2 elements within this container\nconst h2s=containerRef.current.querySelectorAll(\"h2\");h2s.forEach(h2=>{const el=h2;el.style.setProperty(\"--framer-text-color\",primaryColor);el.style.setProperty(\"--extracted-1of0zx5\",primaryColor);el.style.setProperty(\"color\",primaryColor,\"important\");});// Only target spans inside h2 within this container\nconst h2Spans=containerRef.current.querySelectorAll(\"h2 span\");h2Spans.forEach(span=>{const el=span;el.style.setProperty(\"--framer-text-color\",primaryColor);el.style.setProperty(\"color\",primaryColor,\"important\");});};setTimeout(applyMarqueeColors,200);const interval=setInterval(applyMarqueeColors,300);return()=>{clearInterval(interval);};},[]);return /*#__PURE__*/_jsx(Component,{ref:containerRef,...props});});}/**\n * Apply to Footer - uses CMS colors for background and text\n */export function withCMSFooterBackground(Component){return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const layoutTemplate=document.querySelector('[data-layout-template=\"true\"]');if(layoutTemplate){layoutTemplate.style.gap=\"0\";}const framerRoot=document.querySelector(\"[data-framer-root]\");if(framerRoot){framerRoot.style.gap=\"0\";}let lastAppliedColor=\"\";const applyFooterColors=()=>{const primaryColor=getComputedStyle(document.documentElement).getPropertyValue(\"--cms-primary-color\").trim();if(!primaryColor||primaryColor===lastAppliedColor)return;lastAppliedColor=primaryColor;const footer=document.querySelector(\"footer\");if(footer){const spans=footer.querySelectorAll(\"span\");spans.forEach(span=>{span.style.color=primaryColor;});const paragraphs=footer.querySelectorAll(\"p\");paragraphs.forEach(p=>{p.style.color=primaryColor;});const allDivs=footer.querySelectorAll(\"div\");allDivs.forEach(div=>{const classList=div.className;if(classList.includes(\"framer-JCbqz\")||classList.includes(\"framer-13ddx9d\")){div.style.setProperty(\"--1c5uw64\",primaryColor);div.style.setProperty(\"--d4x99i\",primaryColor);}});}};setTimeout(applyFooterColors,200);const interval=setInterval(applyFooterColors,300);return()=>{clearInterval(interval);};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,backgroundColor:\"var(--cms-background-color, transparent)\",gap:0}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withCMSFooterBackground\":{\"type\":\"reactHoc\",\"name\":\"withCMSFooterBackground\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCMSMarqueeColors\":{\"type\":\"reactHoc\",\"name\":\"withCMSMarqueeColors\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCMSPageColors\":{\"type\":\"reactHoc\",\"name\":\"withCMSPageColors\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Background_Color.map"],"mappings":"8IAEG,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,KAAO,MAAc,CAAC,IAAI,EAAY,GAAO,EAAiB,GAAS,MAAgB,CAAC,IAAM,EAAY,SAAS,cAAc,oCAAoC,CAAC,GAAG,EAAY,CAAC,IAAM,EAAQ,EAAO,iBAAiB,EAAY,CAAC,gBAAmB,GAAS,IAAU,oBAAoB,IAAU,IAAa,EAAY,EAAQ,SAAS,gBAAgB,MAAM,YAAY,yBAAyB,EAAQ,CAAC,SAAS,KAAK,MAAM,YAAY,mBAAmB,EAAQ,YAAY,EAAE,IAAM,EAAa,EAAY,cAAc,KAAK,CAAC,GAAG,EAAa,CAAC,IAAM,EAAa,EAAO,iBAAiB,EAAa,CAAC,MAAS,GAAc,IAAe,oBAAoB,IAAe,IAAkB,EAAiB,EAAa,SAAS,gBAAgB,MAAM,YAAY,sBAAsB,EAAa,KAAM,GAAa,CAAC,WAAW,EAAY,IAAI,CAAC,IAAM,EAAS,YAAY,EAAY,IAAI,CAAC,UAAU,CAAC,cAAc,EAAS,CAAC,SAAS,gBAAgB,MAAM,eAAe,yBAAyB,CAAC,SAAS,gBAAgB,MAAM,eAAe,sBAAsB,CAAC,SAAS,KAAK,MAAM,eAAe,mBAAmB,GAAK,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,CAAC,EAAG,CAG/vC,S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