{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/vUJdKaIYoulUAuJa6CKS/X2iZ6dRcqWPRXuYVgL5g/FacebookWeb2App.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{ControlType}from\"framer\";import*as React from\"react\";export function FullPageRedirectWeb2App({appLink=\"https://apps.apple.com/us/developer/tappz/id1667518573\"}){const[redirectUrl,setRedirectUrl]=React.useState(\"\");React.useEffect(()=>{// Parse URL parameters from the current page\nconst urlParams=new URLSearchParams(window.location.search);// Tracker token (p0), defaulting to \"\" if not provided\nconst trackerToken=urlParams.get(\"p0\")||\"\";// Facebook data via URL parameters (p1 to p6)\nconst campaignName=urlParams.get(\"p1\")||\"\";const campaignId=urlParams.get(\"p2\")||\"\";const adsetName=urlParams.get(\"p3\")||\"\";const adsetId=urlParams.get(\"p4\")||\"\";const adName=urlParams.get(\"p5\")||\"\";const adId=urlParams.get(\"p6\")||\"\";// Automatically appended FB parameters\nconst fbclid=urlParams.get(\"fbclid\");const fbpid=urlParams.get(\"fbpid\");// Helper function to URL-encode values\nconst encodeParam=value=>encodeURIComponent(value);// Build the parameters in the format \"Name (ID)\"\nconst campaignParam=encodeParam(`${campaignName} (${campaignId})`);const adgroupParam=encodeParam(`${adsetName} (${adsetId})`);const creativeParam=encodeParam(`${adName} (${adId})`);// Construct the Adjust tracker URL\nconst baseAdjustUrl=`https://app.adjust.com/${trackerToken}`;let adjustUrl=`${baseAdjustUrl}?campaign=${campaignParam}&adgroup=${adgroupParam}&creative=${creativeParam}`;// Append fbclid and fbpid if they exist\nif(fbclid){adjustUrl+=`&fbclid=${encodeParam(fbclid)}`;}if(fbpid){adjustUrl+=`&fbpid=${encodeParam(fbpid)}`;}// If no p1-p6 or Facebook parameters are provided, use the backup link\nconst hasParams=campaignName||campaignId||adsetName||adsetId||adName||adId||fbclid||fbpid;if(!hasParams){adjustUrl=appLink// Replace with your actual backup URL\n;}// Store the URL for use when tapped\nsetRedirectUrl(adjustUrl);},[appLink]);// Trigger the redirect when the overlay is tapped\nconst handleRedirect=()=>{if(redirectUrl){window.location.href=redirectUrl;}};return /*#__PURE__*/_jsx(\"div\",{onClick:handleRedirect,style:{position:\"fixed\",top:0,left:0,width:\"100%\",height:\"100%\",cursor:\"pointer\"}});}// Default props for the component\nFullPageRedirectWeb2App.defaultProps={backupLink:\"https://apps.apple.com/us/developer/tappz/id1667518573\"};// Framer Property Controls to set the backupLink in the UI\nFullPageRedirectWeb2App.propertyControls={backupLink:{type:ControlType.String,title:\"App URL\",defaultValue:\"https://apps.apple.com/us/developer/tappz/id1667518573\"}};\nexport const __FramerMetadata__ = {\"exports\":{\"FullPageRedirectWeb2App\":{\"type\":\"reactComponent\",\"name\":\"FullPageRedirectWeb2App\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FacebookWeb2App.map"],
  "mappings": "uGAA8G,SAASA,EAAwB,CAAC,QAAAC,EAAQ,wDAAwD,EAAE,CAAC,GAAK,CAACC,EAAYC,CAAc,EAAQC,EAAS,EAAE,EAAE,OAAMC,EAAU,IAAI,CAC5R,IAAMC,EAAU,IAAI,gBAAgBC,EAAO,SAAS,MAAM,EACpDC,EAAaF,EAAU,IAAI,IAAI,GAAG,GAClCG,EAAaH,EAAU,IAAI,IAAI,GAAG,GAASI,EAAWJ,EAAU,IAAI,IAAI,GAAG,GAASK,EAAUL,EAAU,IAAI,IAAI,GAAG,GAASM,EAAQN,EAAU,IAAI,IAAI,GAAG,GAASO,EAAOP,EAAU,IAAI,IAAI,GAAG,GAASQ,EAAKR,EAAU,IAAI,IAAI,GAAG,GACjOS,EAAOT,EAAU,IAAI,QAAQ,EAAQU,EAAMV,EAAU,IAAI,OAAO,EAChEW,EAAYC,GAAO,mBAAmBA,CAAK,EAC3CC,EAAcF,EAAY,GAAGR,CAAY,KAAKC,CAAU,GAAG,EAAQU,EAAaH,EAAY,GAAGN,CAAS,KAAKC,CAAO,GAAG,EAAQS,EAAcJ,EAAY,GAAGJ,CAAM,KAAKC,CAAI,GAAG,EACnHQ,EAAU,GAAvD,0BAA0Bd,CAAY,EAAiC,aAAaW,CAAa,YAAYC,CAAY,aAAaC,CAAa,GACpKN,IAAQO,GAAW,WAAWL,EAAYF,CAAM,CAAC,IAAOC,IAAOM,GAAW,UAAUL,EAAYD,CAAK,CAAC,IACzFP,GAAcC,GAAYC,GAAWC,GAASC,GAAQC,GAAMC,GAAQC,IAAqBM,EAAUrB,GAEnHE,EAAemB,CAAS,CAAE,EAAE,CAACrB,CAAO,CAAC,EAC6DsB,EAAK,MAAM,CAAC,QAAzF,IAAI,CAAIrB,IAAaK,EAAO,SAAS,KAAKL,EAAa,EAAyD,MAAM,CAAC,SAAS,QAAQ,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,OAAO,SAAS,CAAC,CAAC,CAAE,CACzNF,EAAwB,aAAa,CAAC,WAAW,wDAAwD,EACzGA,EAAwB,iBAAiB,CAAC,WAAW,CAAC,KAAKwB,EAAY,OAAO,MAAM,UAAU,aAAa,wDAAwD,CAAC",
  "names": ["FullPageRedirectWeb2App", "appLink", "redirectUrl", "setRedirectUrl", "ye", "ue", "urlParams", "window", "trackerToken", "campaignName", "campaignId", "adsetName", "adsetId", "adName", "adId", "fbclid", "fbpid", "encodeParam", "value", "campaignParam", "adgroupParam", "creativeParam", "adjustUrl", "p", "ControlType"]
}
