{"version":3,"file":"Custom.sLtRtJGc.mjs","names":["useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/pdPOAvmGrZ2zKnijiSrn/EO62h5xIkAKEXRrmjmUB/Custom.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useRef}from\"react\";export function withOffset(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{position:\"relative\",marginTop:\"-1.5em\"}});};}export function withViewportCircle(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",width:\"150vmax\",height:\"150vmax\"}});};}export function withAspectRatioSquare(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{aspectRatio:\"1 / 1\",width:\"100%\",height:\"auto\"}});};}export function withMobileAutoplay(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const hostRef=useRef(null);const setRefs=useCallback(node=>{hostRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref&&typeof ref===\"object\"){ref.current=node;}},[ref]);useEffect(()=>{if(typeof window===\"undefined\")return;const host=hostRef.current;if(!host)return;const videoElement=host instanceof HTMLVideoElement?host:host.querySelector(\"video\");if(!videoElement)return;const isMobile=window.matchMedia(\"(max-width: 991px)\").matches||window.matchMedia(\"(hover: none) and (pointer: coarse)\").matches;videoElement.muted=true;videoElement.autoplay=isMobile;videoElement.playsInline=true;videoElement.loop=false;const tryPlay=()=>{if(!isMobile)return;const playPromise=videoElement.play();if(playPromise&&typeof playPromise.catch===\"function\"){playPromise.catch(()=>{});}};const handleEnded=()=>{videoElement.pause();try{videoElement.currentTime=0;}catch(_){}videoElement.load();};const handleTapRestart=()=>{try{videoElement.currentTime=0;}catch(_){}const playPromise=videoElement.play();if(playPromise&&typeof playPromise.catch===\"function\"){playPromise.catch(()=>{});}};tryPlay();const timeoutId=window.setTimeout(tryPlay,250);videoElement.addEventListener(\"canplay\",tryPlay);videoElement.addEventListener(\"ended\",handleEnded);videoElement.addEventListener(\"click\",handleTapRestart);videoElement.addEventListener(\"touchend\",handleTapRestart);return()=>{window.clearTimeout(timeoutId);videoElement.removeEventListener(\"canplay\",tryPlay);videoElement.removeEventListener(\"ended\",handleEnded);videoElement.removeEventListener(\"click\",handleTapRestart);videoElement.removeEventListener(\"touchend\",handleTapRestart);};},[]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props,style:{...props.style}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withAspectRatioSquare\":{\"type\":\"reactHoc\",\"name\":\"withAspectRatioSquare\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMobileAutoplay\":{\"type\":\"reactHoc\",\"name\":\"withMobileAutoplay\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOffset\":{\"type\":\"reactHoc\",\"name\":\"withOffset\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withViewportCircle\":{\"type\":\"reactHoc\",\"name\":\"withViewportCircle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Custom.map"],"mappings":"qJAAsG,SAAgB,EAAW,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,SAAS,WAAW,UAAU,QAAQ,CAAC,CAAC,CAAI,CAAC,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,IAAI,MAAM,KAAK,MAAM,UAAU,wBAAwB,MAAM,UAAU,OAAO,SAAS,CAAC,CAAC,CAAI,CAA0K,SAAgB,EAAmB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAQA,EAAO,IAAI,EAAQ,EAAQC,EAAY,GAAM,CAAC,EAAQ,QAAQ,EAAQ,OAAO,GAAM,WAAY,EAAI,CAAI,EAAW,GAAK,OAAO,GAAM,WAAU,EAAI,QAAQ,EAAM,EAAE,CAA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