{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/Ifk7TESLjBLx8p28h2W9/BiFBa5iuvYDm43GaTJj9/Cookies.js"],
  "sourcesContent": ["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/docs/guides/\nimport{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect}from\"react\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/docs/guides/auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */ export default function Cookies(props){// This is a React component containing an Example component\n// - Replace <Example /> with your own code\n// - Find inspiration: https://www.framer.com/developers/\nuseEffect(()=>{const urlParams=new URLSearchParams(window.location.search);const campaign=urlParams.get(\"campaign\");const getCookie=name=>{const cookies=document.cookie.split(\";\");for(let i=0;i<cookies.length;i++){const cookie=cookies[i].trim();if(cookie.startsWith(name+\"=\")){return cookie.substring(name.length+1);}}return null;};const form=document.querySelector(\"div#form form\");const fromCampaign=getCookie(\"from_campaign\");if(campaign||fromCampaign){console.log(\"from_campaign\");var d=new Date;d.setTime(d.getTime()+365*24*60*60*1e3) // set the expiration date to 1 year from now\n;var expires=\"expires=\"+d.toUTCString();document.cookie=\"from_campaign=true; path=/;\"+expires;const myAnchors=document.querySelectorAll('a[href=\"https://platform.courtcorrect.com/signup\"]');// Add a submit event listener to the form\nform.addEventListener(\"submit\",function(event){event.preventDefault() // prevent the form from submitting\n;fetch(\"https://api.courtcorrect.com/api/v3/campaign/\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({action:\"CONTACTED_US\"})}).then(res=>{});});// Loop through the NodeList and add a click event listener to each element\nmyAnchors.forEach(function(anchor){anchor.addEventListener(\"click\",function(){fetch(\"https://api.courtcorrect.com/api/v3/campaign/\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({action:\"STARTED_TRIAL\"})}).then(res=>{});});});}else{document.cookie=\"from_campaign=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;\";}},[]);return /*#__PURE__*/ _jsx(_Fragment,{});};// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Cookies\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Cookies.map"],
  "mappings": "gGAQmB,SAARA,EAAyBC,EAAM,CAG1C,OAAAC,EAAU,IAAI,CAA6D,IAAMC,EAAlD,IAAI,gBAAgBC,EAAO,SAAS,MAAM,EAA2B,IAAI,UAAU,EAAQC,EAAUC,GAAM,CAAC,IAAMC,EAAQ,SAAS,OAAO,MAAM,GAAG,EAAE,QAAQC,EAAE,EAAEA,EAAED,EAAQ,OAAOC,IAAI,CAAC,IAAMC,EAAOF,EAAQC,CAAC,EAAE,KAAK,EAAE,GAAGC,EAAO,WAAWH,EAAK,GAAG,EAAG,OAAOG,EAAO,UAAUH,EAAK,OAAO,CAAC,EAAI,OAAO,IAAK,EAAQI,EAAK,SAAS,cAAc,eAAe,EAAQC,EAAaN,EAAU,eAAe,EAAE,GAAGF,GAAUQ,EAAa,CAAC,QAAQ,IAAI,eAAe,EAAE,IAAIC,EAAE,IAAI,KAAKA,EAAE,QAAQA,EAAE,QAAQ,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,EACzhB,IAAIC,EAAQ,WAAWD,EAAE,YAAY,EAAE,SAAS,OAAO,8BAA8BC,EAAQ,IAAMC,EAAU,SAAS,iBAAiB,oDAAoD,EAC5LJ,EAAK,iBAAiB,SAAS,SAASK,EAAM,CAACA,EAAM,eAAe,EACnE,MAAM,gDAAgD,CAAC,OAAO,OAAO,QAAQ,CA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