{"version":3,"file":"Tracking.Ch-RBTcs.mjs","names":["useRef","useCallback","__esmMin","ne","init_npm_react_18_3_1","de","init_jsx_runtime","J","c","useTracking","init_framer_DHMQH3Bb","CopyInstallPrompt","WrappedComponent","Component","track","handleClick","args","props","withHeroVideoClickTracking","lastTrackedRef","trackHeroVideoClick","timestamp","event","target","previous","source","handlePointerDownCapture","handleKeyDownCapture","key","currentTarget","tagName","init_Tracking"],"sources":["https:/framerusercontent.com/modules/GeacVG9LmC1XnXllvFtc/4VZWxN5pBsQpr9p2wftH/Tracking.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useRef}from\"react\";import{useTracking}from\"framer\";export function CopyInstallPrompt(Component){const WrappedComponent=Component;return /*#__PURE__*/forwardRef(function Tracking(props,ref){const track=useTracking();// Preserve existing click behavior, then record the copy-install-prompt event in Framer analytics.\nconst handleClick=(...args)=>{props.onClick?.(...args);track(\"copy-install-prompt\");};return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,onClick:handleClick});});}export function navStartForFree(Component){const WrappedComponent=Component;return /*#__PURE__*/forwardRef(function TrackingNavStartForFree(props,ref){const track=useTracking();// Preserve existing click behavior, then record the nav-start-for-free event in Framer analytics.\nconst handleClick=(...args)=>{props.onClick?.(...args);track(\"nav-start-for-free\");};return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,onClick:handleClick});});}export function withHeroVideoClickTracking(Component){const WrappedComponent=Component;return /*#__PURE__*/forwardRef(function TrackingHeroVideoClick(props,ref){const track=useTracking();const lastTrackedRef=useRef(null);const trackHeroVideoClick=useCallback((event,source)=>{try{const timestamp=typeof event?.timeStamp===\"number\"?event.timeStamp:Date.now();const target=event?.currentTarget??event?.target??null;const previous=lastTrackedRef.current;// De-duplicate pointer/keyboard activations that happen on the same target almost instantly.\nif(previous&&previous.target===target&&previous.source!==source&&Math.abs(previous.timestamp-timestamp)<500){return;}lastTrackedRef.current={timestamp,source,target};if(typeof track===\"function\"){track(\"hero_video_click\");}}catch(_error){// Fail-safe: never block existing component interactions.\n}},[track]);const handlePointerDownCapture=useCallback(event=>{props.onPointerDownCapture?.(event);if(event?.defaultPrevented)return;trackHeroVideoClick(event,\"pointer\");},[props,trackHeroVideoClick]);const handleKeyDownCapture=useCallback(event=>{props.onKeyDownCapture?.(event);if(event?.defaultPrevented)return;const key=event?.key;const isActivationKey=key===\"Enter\"||key===\"NumpadEnter\"||key===\" \";if(!isActivationKey)return;const currentTarget=event?.currentTarget;const tagName=typeof currentTarget?.tagName===\"string\"?currentTarget.tagName.toLowerCase():\"\";const hasButtonRole=currentTarget?.getAttribute?.(\"role\")===\"button\";const isKeyboardActivatableElement=hasButtonRole||tagName===\"button\"||tagName===\"a\"||typeof currentTarget?.tabIndex===\"number\"&&currentTarget.tabIndex>=0;if(isKeyboardActivatableElement){trackHeroVideoClick(event,\"keyboard\");}},[props,trackHeroVideoClick]);return /*#__PURE__*/_jsx(WrappedComponent,{ref:ref,...props,onPointerDownCapture:handlePointerDownCapture,onKeyDownCapture:handleKeyDownCapture});});}\nexport const __FramerMetadata__ = {\"exports\":{\"navStartForFree\":{\"type\":\"reactHoc\",\"name\":\"navStartForFree\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroVideoClickTracking\":{\"type\":\"reactHoc\",\"name\":\"withHeroVideoClickTracking\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CopyInstallPrompt\":{\"type\":\"reactHoc\",\"name\":\"CopyInstallPrompt\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Tracking.map"],"mappings":"A,mLAA4H,SAAgBW,EAAkB,EAAU,CAAC,IAAMC,EAAiBC,EAAU,MAAoB,gBAAW,SAAkB,EAAM,EAAI,CAAC,IAAMC,EAAML,EAAY,EACxRM,GAAa,GAAGC,IAAO,CAACC,EAAM,UAAU,GAAGD,CAAI,EAAEF,EAAM,qBAAqB,CAAE,E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