{"version":3,"file":"shared-lib.BvQ75ZWF.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/wojFYexl8SPIb3a9lOzf/UpZmK23mavIRCCvfDjXe/LeadsifySpeedOverrides.js"],"sourcesContent":["// Leadsify speed overrides (Oct 2026).\n//\n// Framer marks an image as lazy only when it can work out where the image sits on the page. Inside components\n// that switch variants per breakpoint, and in CMS lists, it can't, so those images download straight away,\n// even far below the fold, and compete with the top of the page for bandwidth (on /blog that was over 1 MB).\n// These overrides set the browser's native loading behaviour on an image layer explicitly.\n//\n// withLazyImage      below-the-fold images: the browser fetches them when they come near the viewport\n// withPriorityImage  the one main image at the top of a page: fetched first, at high priority\n// withLazyMount      video embeds (YouTube) and other heavy components: the page first shows an empty box of the\n//                    same size, and the component (with its thumbnail) is added when it comes near the viewport\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef,useState}from\"react\";import{RenderTarget}from\"framer\";function withImageLoading(Component,loading){return /*#__PURE__*/forwardRef(function LeadsifyImageLoading(props,ref){const background=props.background;if(!background||typeof background!==\"object\"||!background.src){return /*#__PURE__*/_jsx(Component,{ref:ref,...props});}return /*#__PURE__*/_jsx(Component,{ref:ref,...props,background:{...background,...loading}});});}export function withLazyImage(Component){return withImageLoading(Component,{loading:\"lazy\"});}export function withPriorityImage(Component){return withImageLoading(Component,{loading:\"eager\",fetchPriority:\"high\"});}export function withLazyMount(Component){return /*#__PURE__*/forwardRef(function LeadsifyLazyMount(props,ref){const onCanvas=RenderTarget.current()===RenderTarget.canvas;const holder=useRef(null);const[show,setShow]=useState(false);useEffect(()=>{if(show||onCanvas)return;const el=holder.current;if(!el||typeof IntersectionObserver===\"undefined\"){setShow(true);return;}const io=new IntersectionObserver(entries=>{if(entries.some(e=>e.isIntersecting)){io.disconnect();setShow(true);}},{rootMargin:\"400px 400px\"});io.observe(el);return()=>io.disconnect();},[show,onCanvas]);if(show||onCanvas)return /*#__PURE__*/_jsx(Component,{ref:ref,...props});return /*#__PURE__*/_jsx(\"div\",{ref:holder,\"aria-hidden\":\"true\",style:{width:\"100%\",height:\"100%\",borderRadius:props.style?.borderRadius}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withLazyImage\":{\"type\":\"reactHoc\",\"name\":\"withLazyImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPriorityImage\":{\"type\":\"reactHoc\",\"name\":\"withPriorityImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLazyMount\":{\"type\":\"reactHoc\",\"name\":\"withLazyMount\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LeadsifySpeedOverrides.map"],"mappings":"wLAWoI,SAAS,EAAiB,EAAU,EAAQ,CAAC,OAAoB,EAAW,SAA8B,EAAM,EAAI,CAAC,IAAM,EAAW,EAAM,WAAkI,MAApH,CAAC,GAAY,OAAO,GAAa,UAAU,CAAC,EAAW,IAAyB,EAAK,EAAU,CAAK,MAAI,GAAG,CAAK,CAAC,EAAuB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,WAAW,CAAC,GAAG,EAAW,GAAG,CAAO,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,SAAgB,EAAc,EAAU,CAAC,OAAO,EAAiB,EAAU,CAAC,QAAQ,MAAM,CAAC,CAAE,CAAyH,SAAgB,EAAc,EAAU,CAAC,OAAoB,EAAW,SAA2B,EAAM,EAAI,CAAC,IAAM,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAa,EAAOA,EAAO,IAAI,EAAO,CAAC,EAAK,GAASC,EAAS,EAAK,EAA+Z,OAA7Z,MAAc,CAAC,GAAG,GAAM,EAAS,OAAO,IAAM,EAAG,EAAO,QAAQ,GAAG,CAAC,GAAI,OAAO,qBAAuB,IAAY,CAAC,EAAQ,EAAI,EAAE,MAAO,CAAC,IAAM,EAAG,IAAI,qBAAqB,GAAS,CAAI,EAAQ,KAAK,GAAG,EAAE,cAAc,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