{"version":3,"file":"Variable_hero.pXjkwEdV.mjs","names":["_jsxs","_jsx","useRef","useEffect","_jsx","__esmMin","init_npm_react_18_3_1","p","c","init_jsx_runtime","ce","de","withSchmaltzyLinks","Component","props","init_Linkstyle","variableHero","ref","isActive","elementsRef","applyBaseline","SELECTOR","weight","ACTIVE_WEIGHT","REST_WEIGHT","el","observer","toggle","targetWeight","easing","EASE_IN","EASE_OUT","DURATION","init_Variable_hero"],"sources":["https:/framerusercontent.com/modules/vGbvrkv04ecO3214BkZw/TGkG7HNjXzTNlvjaEXqn/Linkstyle.js","https:/framerusercontent.com/modules/MIcHTTdlWIJjJ4usvG4w/csP3ciEy6z5BCAiyx0ka/Variable_hero.js"],"sourcesContent":["// import type { ComponentType } from \"react\"\n// import { useEffect, useRef } from \"react\"\n// export function withSchmaltzyLinks(Component): ComponentType {\n//     return (props) => {\n//         const ref = useRef<HTMLDivElement>(null)\n//         useEffect(() => {\n//             if (!ref.current) return\n//             const links = ref.current.querySelectorAll(\"a\")\n//             links.forEach((link) => {\n//                 link.style.fontFamily = \"Schmaltzy, serif\"\n//             })\n//         }, [])\n//         return (\n//             <div ref={ref}>\n//                 <Component {...props} />\n//             </div>\n//         )\n//     }\n// }\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";export function withSchmaltzyLinks(Component){return props=>{return /*#__PURE__*/_jsxs(\"div\",{className:\"schmaltzy-links-scope\",children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .schmaltzy-links-scope a {\n                        font-family: \"Schmaltzy VF VARIABLE THIN\", sans-serif;\n                        font-variation-settings: \"wght\" 400;\n                    }\n                    .schmaltzy-links-scope a:hover {\n                        font-family: \"Schmaltzy VF VARIABLE THIN\", sans-serif !important;\n                        font-variation-settings: \"wght\" 400;\n                    }\n                `}),/*#__PURE__*/_jsx(Component,{...props})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSchmaltzyLinks\":{\"type\":\"reactHoc\",\"name\":\"withSchmaltzyLinks\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Linkstyle.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";const REST_WEIGHT=100;const ACTIVE_WEIGHT=800;const DURATION=.4;const EASE_IN=\".07,.82,.53,.91\";const EASE_OUT=\".9,.06,.58,.98\";const SELECTOR=\"h1, h2, h3, h4, h5, h6, p, span, a, li\";export function variableHero(Component){return props=>{const ref=useRef(null);const isActive=useRef(false);const elementsRef=useRef([]);const applyBaseline=()=>{if(!ref.current){elementsRef.current=[];return;}elementsRef.current=Array.from(ref.current.querySelectorAll(SELECTOR));const weight=isActive.current?ACTIVE_WEIGHT:REST_WEIGHT;elementsRef.current.forEach(el=>{if(!el.style.fontVariationSettings){el.style.fontVariationSettings=`'wght' ${weight}`;}});};useEffect(()=>{applyBaseline();const observer=new MutationObserver(applyBaseline);if(ref.current){observer.observe(ref.current,{childList:true,subtree:true});}return()=>{observer.disconnect();elementsRef.current.forEach(el=>{el.style.transition=\"\";el.style.fontVariationSettings=\"\";});};},[]);const toggle=()=>{if(elementsRef.current.length===0)return;isActive.current=!isActive.current;const targetWeight=isActive.current?ACTIVE_WEIGHT:REST_WEIGHT;const easing=isActive.current?EASE_IN:EASE_OUT;elementsRef.current.forEach(el=>{el.style.transition=`font-variation-settings ${DURATION}s cubic-bezier(${easing})`;el.style.fontVariationSettings=`'wght' ${targetWeight}`;});};return /*#__PURE__*/_jsx(\"div\",{ref:ref,onPointerEnter:e=>{if(e.pointerType===\"mouse\")toggle();},onPointerDown:e=>{if(e.pointerType!==\"mouse\")toggle();},style:{WebkitTapHighlightColor:\"transparent\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"variableHero\":{\"type\":\"reactHoc\",\"name\":\"variableHero\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n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