{"version":3,"file":"GetStartedButton2.Dwtuj_Tb.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/1cLbzXMWjJG9MVAGHmST/DVVHWkoJL4YLPtynMtDz/GetStartedButton2.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function onButtonClick(){return{onClick:event=>{// Get base URL with any existing cookie parameters\nlet finalUrl=getUpdatedUrl(\"https://web.joinfizz.com\");// Extract Mixpanel distinct ID only if the function exists\nif(window.mixpanel&&typeof mixpanel.get_distinct_id===\"function\"){try{// Get current Mixpanel distinct ID (format: \"$device:uuid-value\")\nconst mixpanelFullId=mixpanel.get_distinct_id();// Extract just the UUID part (removing \"$device:\" if present)\nconst justUUID=mixpanelFullId.includes(\":\")?mixpanelFullId.split(\":\")[1]:mixpanelFullId;// Add the ID to the destination URL\nconst separator=finalUrl.includes(\"?\")?\"&\":\"?\";finalUrl=`${finalUrl}${separator}mpid=${encodeURIComponent(justUUID)}`;// Optional: Log for debugging\nconsole.log(\"Passing Mixpanel ID:\",justUUID);}catch(err){console.error(\"Error extracting Mixpanel ID:\",err);// Continue with navigation even if there's an error\n}}else{console.warn(\"Mixpanel.get_distinct_id is not available.\");}// Dynamically capture button text\nconst buttonText=event.target.innerText||\"Unnamed Button\";// Send the dynamic button name to Mixpanel only if the function exists\nif(window.mixpanel&&typeof mixpanel.track===\"function\"){mixpanel.track(\"Web Button Clicked\",{\"Button Name\":buttonText,Page:window.location.pathname});}else{console.warn(\"Mixpanel.track is not available.\");}// Navigate to the destination URL\nwindow.open(finalUrl);}};}// Helper functions remain the same\nfunction getAllCookies(){let cookies={};document.cookie.split(\"; \").forEach(cookie=>{let[key,value]=cookie.split(\"=\");cookies[key]=value;});return cookies;}function getUpdatedUrl(baseUrl){const cookies=getAllCookies();const queryParams=new URLSearchParams(cookies).toString();return queryParams?`${baseUrl}?${queryParams}`:baseUrl;}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withonButtonClick(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...onButtonClick(props)});};}withonButtonClick.displayName=\"onButtonClick\";\nexport const __FramerMetadata__ = {\"exports\":{\"onButtonClick\":{\"type\":\"override\",\"name\":\"onButtonClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withonButtonClick\":{\"type\":\"reactHoc\",\"name\":\"withonButtonClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GetStartedButton2.map"],"mappings":"yRAA2C,SAAgB,GAAe,CAAC,MAAM,CAAC,QAAQ,GAAO,CACjG,IAAI,EAAS,EAAc,4BAC3B,GAAG,EAAO,UAAU,OAAO,SAAS,iBAAkB,WAAY,GAAG,CACrE,IAAM,EAAe,SAAS,kBACxB,EAAS,EAAe,SAAS,KAAK,EAAe,MAAM,KAAK,GAAG,EACnE,EAAU,EAAS,SAAS,KAAK,IAAI,IAAI,EAAS,GAAG,IAAW,EAAU,OAAO,mBAAmB,KAC1G,QAAQ,IAAI,uBAAuB,EAAW,OAAM,EAAI,CAAC,QAAQ,MAAM,gCAAgC,EACtG,MAAM,QAAQ,KAAK,8CACpB,IAAM,EAAW,EAAM,OAAO,WAAW,iBACtC,EAAO,UAAU,OAAO,SAAS,OAAQ,WAAY,SAAS,MAAM,qBAAqB,CAAC,cAAc,EAAW,KAAK,EAAO,SAAS,SAAS,EAAQ,QAAQ,KAAK,oCACzK,EAAO,KAAK,EAAW,EAAC,AAAE,CAC1B,SAAS,GAAe,CAAC,IAAI,EAAQ,EAAE,CAAqG,OAApG,SAAS,OAAO,MAAM,MAAM,QAAQ,GAAQ,CAAC,GAAG,CAAC,EAAI,EAAM,CAAC,EAAO,MAAM,KAAK,EAAQ,GAAK,CAAO,GAAS,CAAS,UAAS,EAAc,EAAQ,CAAC,IAAM,EAAQ,IAAsB,EAAY,IAAI,gBAAgB,GAAS,WAAW,OAAO,EAAY,GAAG,EAAQ,GAAG,IAAc,CAAS,CAAmJ,SAAgB,EAAkB,EAAE,CAAC,MAAO,KAAQ,EAA+BA,GAAgDC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAc,GAAO,EAAK,iCAAkB,YAAY"}