{"version":3,"file":"shared-lib.Dme7Tzrm.mjs","names":["useRef","useState","useMemo","__esmMin","init_npm_react_18_3_1","pe","z","_e","de","K","c","J","init_jsx_runtime","ce","RenderTarget","init_framer_DcxuU94H","withImageLoading","background","props","Component","loading","withLazyImage","withLazyMount","onCanvas","holder","show","setShow","el","io","entries","withLazyRichTextImages","children","lazyImages","node","depth","changed","out","next","child","p","kids","init_LeadsifySpeedOverrides"],"sources":["https:/framerusercontent.com/modules/wojFYexl8SPIb3a9lOzf/ifJDbYeTnKNlyEJNxxwC/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\n// withLazyRichTextImages  on a CMS rich text layer (blog post and case study body): Framer writes the images\n//                    inside the text without a loading attribute, so every image in a long post downloads with\n//                    the first screen; this marks them lazy, and the browser fetches each near the viewport\n//\n// For tickers and carousels placed on a page, use withLazyInside in LeadsifyLazyInside.tsx. Keep this file to\n// imports that Framer's typings list: smart components that use these overrides could not publish otherwise.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{cloneElement,forwardRef,isValidElement,useEffect,useMemo,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}});});}export function withLazyRichTextImages(Component){return /*#__PURE__*/forwardRef(function LeadsifyLazyRichTextImages(props,ref){const children=useMemo(()=>lazyImages(props.children,0),[props.children]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,children:children});});}function lazyImages(node,depth){if(node==null||typeof node!==\"object\"||depth>8)return node;if(Array.isArray(node)){let changed=false;const out=node.map(child=>{const next=lazyImages(child,depth+1);if(next!==child)changed=true;return next;});return changed?out:node;}if(!/*#__PURE__*/isValidElement(node))return node;const p=node.props;if(node.type===\"img\"){if(p.loading)return node;return /*#__PURE__*/cloneElement(node,{loading:\"lazy\",decoding:\"async\"});}if(p&&p.children!=null){const kids=lazyImages(p.children,depth+1);if(kids!==p.children)return /*#__PURE__*/cloneElement(node,undefined,kids);}return node;}\nexport const __FramerMetadata__ = {\"exports\":{\"withLazyImage\":{\"type\":\"reactHoc\",\"name\":\"withLazyImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLazyMount\":{\"type\":\"reactHoc\",\"name\":\"withLazyMount\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLazyRichTextImages\":{\"type\":\"reactHoc\",\"name\":\"withLazyRichTextImages\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPriorityImage\":{\"type\":\"reactHoc\",\"name\":\"withPriorityImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LeadsifySpeedOverrides.map"],"mappings":"A,8MAiBwK,SAASgB,EAAiB,EAAU,EAAQ,CAAC,MAAoB,gBAAW,SAA8B,EAAM,EAAI,CAAC,IAAMC,EAAWC,EAAM,WAAkI,MAApH,CAACD,GAAY,OAAOA,GAAa,UAAU,CAACA,EAAW,IAAyB,gBAAKE,EAAU,CAAK,MAAI,GAAGD,CAAK,CAAC,EAAuB,gBAAKC,EAAU,CAAK,MAAI,GAAGD,EAAM,WAAW,CAAC,GAAGD,EAAW,GAAGG,CAAO,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,SAAgBC,EAAc,EAAU,CAAC,OAAOL,EAAiBG,EAAU,CAAC,QAAQ,MAAM,CAAC,CAAE,CAAyH,SAAgBG,EAAc,EAAU,CAAC,MAAoB,gBAAW,SAA2B,EAAM,EAAI,CAAC,IAAMC,EAAST,EAAa,QAAQ,IAAIA,EAAa,OAAaU,EAAOxB,EAAO,IAAI,EAAO,CAACyB,EAAKC,GAASzB,EAAS,EAAK,EAA+Z,OAA7ZY,MAAc,CAAC,GAAGY,GAAMF,EAAS,OAAO,IAAMI,EAAGH,EAAO,QAAQ,GAAG,CAACG,GAAI,OAAO,qBAAuB,IAAY,CAACD,EAAQ,EAAI,EAAE,MAAO,CAAC,IAAME,EAAG,IAAI,qBAAqB,GAAS,CAAIC,EAAQ,KAAK,GAAG,EAAE,cAAc,IAAGD,EAAG,WAAW,EAAEF,EAAQ,EAAI,EAAG,EAAE,CAAC,WAAW,aAAa,CAAC,EAAiB,OAAfE,EAAG,QAAQD,CAAE,MAAYC,EAAG,WAAW,CAAE,EAAE,CAACH,EAAKF,CAAQ,CAAC,EAAK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