{"version":3,"file":"LazyLoadEmbed.BF0dlHs2.mjs","names":["React.useRef","React.useState","React.useCallback","__esmMin","te","ne","_e","de","H","J","init_npm_react_18_3_1","ce","RenderTarget","init_framer_BpuvUAiZ","assignRef","ref","value","withNearViewportLoad","hostRef","isReady","setIsReady","target","isCanvas","setHostRef","forwardedRef","host","observer","entries","entry","shouldRender","outerStyle","props","loadingHeight","componentStyle","Component","withNearViewportMediaLoad","init_LazyLoadEmbed"],"sources":["https:/framerusercontent.com/modules/GjZRoexlNyBp3NChNW07/e02m6UmOnR9XePuZEir7/LazyLoadEmbed.js"],"sourcesContent":["import*as React from\"react\";import{RenderTarget}from\"framer\";function assignRef(ref,value){if(typeof ref===\"function\"){ref(value);}else if(ref&&typeof ref===\"object\"){ref.current=value;}}// Defers the third-party application embed until it is close to the viewport.\n// The application wrapper becomes content-sized after loading, allowing the\n// official HighLevel embed resizer to remove nested scrolling.\nexport function withNearViewportLoad(Component){return /*#__PURE__*/React.forwardRef(function NearViewportLoad(props,forwardedRef){const hostRef=React.useRef(null);const[isReady,setIsReady]=React.useState(true);const target=RenderTarget.current();const isCanvas=target===RenderTarget.canvas||target===RenderTarget.thumbnail;const setHostRef=React.useCallback(value=>{hostRef.current=value;assignRef(forwardedRef,value);},[forwardedRef]);React.useEffect(()=>{if(isCanvas||isReady)return;const host=hostRef.current;if(!host||typeof IntersectionObserver===\"undefined\"){React.startTransition(()=>setIsReady(true));return;}const observer=new IntersectionObserver(entries=>{if(!entries.some(entry=>entry.isIntersecting))return;React.startTransition(()=>setIsReady(true));observer.disconnect();},{rootMargin:\"900px 0px\"});observer.observe(host);return()=>observer.disconnect();},[isCanvas,isReady]);const shouldRender=isCanvas||isReady;const outerStyle=props.style||{};const loadingHeight=outerStyle.height||500;const componentStyle={width:\"100%\",height:\"auto\",position:\"relative\"};return /*#__PURE__*/React.createElement(\"div\",{ref:setHostRef,style:{...outerStyle,position:\"relative\",width:outerStyle.width||\"100%\",height:shouldRender?\"auto\":loadingHeight,minHeight:shouldRender?undefined:loadingHeight,overflow:shouldRender?\"visible\":\"hidden\"},\"aria-busy\":shouldRender?undefined:\"true\",\"aria-label\":shouldRender?undefined:\"Loading application form\"},shouldRender?/*#__PURE__*/React.createElement(Component,{...props,ref:undefined,style:componentStyle}):/*#__PURE__*/React.createElement(\"div\",{style:{width:\"100%\",height:\"100%\",minHeight:\"inherit\",background:\"transparent\"}}));});}// Defers below-the-fold third-party media until it is close to the viewport.\n// The original component still renders normally on the Framer canvas.\nexport function withNearViewportMediaLoad(Component){return /*#__PURE__*/React.forwardRef(function NearViewportLoad(props,forwardedRef){const hostRef=React.useRef(null);const[isReady,setIsReady]=React.useState(false);const target=RenderTarget.current();const isCanvas=target===RenderTarget.canvas||target===RenderTarget.thumbnail;const setHostRef=React.useCallback(value=>{hostRef.current=value;assignRef(forwardedRef,value);},[forwardedRef]);React.useEffect(()=>{if(isCanvas||isReady)return;const host=hostRef.current;if(!host||typeof IntersectionObserver===\"undefined\"){React.startTransition(()=>setIsReady(true));return;}const observer=new IntersectionObserver(entries=>{if(!entries.some(entry=>entry.isIntersecting))return;React.startTransition(()=>setIsReady(true));observer.disconnect();},{rootMargin:\"900px 0px\"});observer.observe(host);return()=>observer.disconnect();},[isCanvas,isReady]);const shouldRender=isCanvas||isReady;const outerStyle=props.style||{};const componentStyle={width:\"100%\",height:\"100%\",position:\"relative\"};return /*#__PURE__*/React.createElement(\"div\",{ref:setHostRef,style:{...outerStyle,position:\"relative\",width:outerStyle.width||\"100%\",height:outerStyle.height||\"100%\",minHeight:outerStyle.minHeight||\"100%\",overflow:\"hidden\"},\"aria-busy\":shouldRender?undefined:\"true\",\"aria-label\":shouldRender?undefined:\"Loading client result video\"},shouldRender?/*#__PURE__*/React.createElement(Component,{...props,ref:undefined,title:\"Kairo client testimonial video\",\"aria-label\":\"Kairo client testimonial video\",style:componentStyle}):/*#__PURE__*/React.createElement(\"div\",{style:{width:\"100%\",height:\"100%\",minHeight:\"inherit\",background:\"transparent\"}}));});}\nexport const __FramerMetadata__ = {\"exports\":{\"withNearViewportMediaLoad\":{\"type\":\"reactHoc\",\"name\":\"withNearViewportMediaLoad\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNearViewportLoad\":{\"type\":\"reactHoc\",\"name\":\"withNearViewportLoad\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LazyLoadEmbed.map"],"mappings":"A,gMAA6D,SAASc,EAAU,EAAI,EAAM,CAAI,OAAOC,GAAM,WAAYA,EAAIC,CAAK,EAAWD,GAAK,OAAOA,GAAM,WAAU,EAAI,QAAQC,EAAO,CAG1L,SAAgBC,EAAqB,EAAU,CAAC,MAAoB,gBAAiB,SAA0B,EAAM,EAAa,CAAC,IAAMC,EAAQlB,EAAa,IAAI,EAAO,CAACmB,EAAQC,GAAYnB,EAAe,EAAI,EAAQoB,EAAOT,EAAa,QAAQ,EAAQU,EAASD,IAAST,EAAa,QAAQS,IAAST,EAAa,UAAgBW,EAAWrB,EAAkB,GAAO,CAAC,EAAQ,QAAQc,EAAMF,EAAUU,EAAaR,CAAK,CAAE,EAAE,CAACQ,CAAY,CAAC,EAAEb,MAAoB,CAAC,GAAGW,GAAUH,EAAQ,OAAO,IAAMM,EAAKP,EAAQ,QAAQ,GAAG,CAACO,GAAM,OAAO,qBAAuB,IAAY,CAACrB,MAA0BgB,EAAW,EAAI,CAAC,EAAE,MAAO,CAAC,IAAMM,EAAS,IAAI,qBAAqB,GAAS,CAAKC,EAAQ,KAAK,GAAOC,EAAM,cAAc,IAASxB,MAA0BgB,EAAW,EAAI,CAAC,EAAEM,EAAS,WAAW,EAAE,EAAE,CAAC,WAAW,WAAW,CAAC,EAAyB,OAAvBA,EAAS,QAAQD,CAAI,MAAYC,EAAS,WAAW,CAAE,EAAE,CAACJ,EAASH,CAAO,CAAC,EAAE,IAAMU,EAAaP,GAAUH,EAAcW,EAAWC,EAAM,OAAO,CAAC,EAAQ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