{"version":3,"file":"ClickableCard.Yr8O2Kh1.mjs","names":["useRef","__esmMin","init_ssg_sandbox_shims","window","c","J","init_jsx_runtime","ce","init_npm_react_18_3_1","de","setRef","ref","node","withClickableCard","el","onClick","e","link","Component","props","n","forwarded","init_ClickableCard"],"sources":["https:/framerusercontent.com/modules/cZCN33ywFj2lzh3NVd2Y/1A9vwOc2s77WF1CAea2r/ClickableCard.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";// Whole-card click without nested links.\n// A link inside a link is invalid HTML (Framer warns \"Nested link detected\"), so the card itself\n// is not a link: its inner button / logo / \"Apply\" link carries the URL, and this override makes\n// a click anywhere on the card follow that inner link (same tab or new tab, as the link says).\nfunction setRef(ref,node){if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;}export function withClickableCard(Component){return /*#__PURE__*/forwardRef((props,forwarded)=>{const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el)return;const onClick=e=>{if(e.target.closest(\"a\"))return;// the inner link handles itself\nconst link=el.querySelector(\"a[href]\");if(!link)return;if(e.metaKey||e.ctrlKey)window.open(link.href,\"_blank\",\"noopener\");else link.click();};el.addEventListener(\"click\",onClick);return()=>el.removeEventListener(\"click\",onClick);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:n=>{ref.current=n;setRef(forwarded,n);},style:{...props.style,cursor:\"pointer\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withClickableCard\":{\"type\":\"reactHoc\",\"name\":\"withClickableCard\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ClickableCard.map"],"mappings":"A,8IAIA,SAASU,EAAO,EAAI,EAAK,CAAI,OAAOC,GAAM,WAAWA,EAAIC,CAAI,EAAUD,IAAI,EAAI,QAAQC,EAAK,CAAC,SAAgBC,EAAkB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAY,CAAC,IAAMF,EAAIX,EAAO,IAAI,EACyB,OADvBO,MAAc,CAAC,IAAMO,EAAGH,EAAI,QAAQ,GAAG,CAACG,EAAG,OAAO,IAAMC,EAAQ,GAAG,CAAC,GAAGC,EAAE,OAAO,QAAQ,GAAG,EAAE,OACjT,IAAMC,EAAKH,EAAG,cAAc,SAAS,EAAMG,IAAeD,EAAE,SAASA,EAAE,QAAQb,EAAO,KAAKc,EAAK,KAAK,SAAS,UAAU,EAAOA,EAAK,MAAM,EAAE,EAAuC,OAArCH,EAAG,iBAAiB,QAAQC,CAAO,MAAYD,EAAG,oBAAoB,QAAQC,CAAO,CAAE,EAAE,CAAC,CAAC,EAAsB,gBAAKG,EAAU,CAAC,GAAGC,EAAM,IAAI,GAAG,CAAC,EAAI,QAAQC,EAAEV,EAAOW,EAAUD,CAAC,CAAE,EAAE,MAAM,CAAC,GAAGD,EAAM,MAAM,OAAO,SAAS,CAAC,CAAC,CAAE,CAAC,CAAE,C"}