{"version":3,"file":"shared-lib.BoCRZgap.mjs","names":[],"sources":["https:/framerusercontent.com/modules/kidZmaeAklzGX3asqnPy/BihdhyUChGmwY9coKlYO/siteMetadata.js"],"sourcesContent":["// Generated by Framer (3406f4c)\nexport default function metadata(params,activeLocale){return{customHTMLBodyEnd:'\\n<script>\\n  window.intercomSettings = {\\n    api_base: \"https://api-iam.intercom.io\",\\n    app_id: \"j6hh2eeo\",\\n  };\\n</script>\\n\\n\\n<script>\\n  // We pre-filled your app ID in the widget URL: \\'https://widget.intercom.io/widget/j6hh2eeo\\'\\n  (function(){var w=window;var ic=w.Intercom;if(typeof ic===\"function\"){ic(\\'reattach_activator\\');ic(\\'update\\',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement(\\'script\\');s.type=\\'text/javascript\\';s.async=true;s.src=\\'https://widget.intercom.io/widget/j6hh2eeo\\';var x=d.getElementsByTagName(\\'script\\')[0];x.parentNode.insertBefore(s,x);};if(document.readyState===\\'complete\\'){l();}else if(w.attachEvent){w.attachEvent(\\'onload\\',l);}else{w.addEventListener(\\'load\\',l,false);}}})();\\n</script>\\n\\n\\n<script>\\n(function () {\\n  const TARGET_HOST = \"my.1xtrade.com\";\\n\\n  // Pull params from current URL\\n  const params = new URLSearchParams(window.location.search);\\n  const cxdFromUrl = params.get(\"cxd\");\\n  const ibFromUrl  = params.get(\"ib\");\\n\\n  // PRIORITY: cxd > ib\\n  const chosenKey = cxdFromUrl ? \"cxd\" : (ibFromUrl ? \"ib\" : null);\\n  const chosenVal = cxdFromUrl || ibFromUrl;\\n\\n  // Persist the chosen param\\n  if (chosenKey && chosenVal) {\\n    try { localStorage.setItem(\"affiliate_key\", chosenKey); } catch(_) {}\\n    try { localStorage.setItem(\"affiliate_val\", chosenVal); } catch(_) {}\\n  }\\n\\n  const key = chosenKey || (function(){ try { return localStorage.getItem(\"affiliate_key\"); } catch(_) { return null; } })();\\n  const val = chosenVal || (function(){ try { return localStorage.getItem(\"affiliate_val\"); } catch(_) { return null; } })();\\n\\n  if (!key || !val) return; // Nothing to inject\\n\\n  // Ensure target URLs include the chosen affiliate param (preserves other params)\\n  function withAffiliate(urlString) {\\n    try {\\n      const url = new URL(urlString, window.location.href);\\n      if (url.hostname === TARGET_HOST) {\\n        url.searchParams.set(key, val);   // inject/overwrite chosen key\\n      }\\n      return url.toString();\\n    } catch {\\n      return urlString;\\n    }\\n  }\\n\\n  function patchAnchor(a) {\\n    if (!a || !a.href) return;\\n    try {\\n      const url = new URL(a.href, window.location.href);\\n      if (url.hostname === TARGET_HOST) {\\n        const updated = withAffiliate(a.href);\\n        if (updated !== a.href) a.href = updated;\\n      }\\n    } catch {}\\n  }\\n\\n  function patchAllAnchors(root = document) {\\n    root.querySelectorAll(\"a[href]\").forEach(patchAnchor);\\n  }\\n\\n  // Initial pass\\n  patchAllAnchors();\\n\\n  // Watch for dynamically added/changed links (Framer)\\n  const mo = new MutationObserver((mutations) => {\\n    for (const m of mutations) {\\n      if (m.type === \"attributes\" && m.target?.tagName === \"A\" && m.attributeName === \"href\") {\\n        patchAnchor(m.target);\\n      } else {\\n        m.addedNodes.forEach((node) => {\\n          if (node.nodeType !== 1) return;\\n          if (node.tagName === \"A\") patchAnchor(node);\\n          else patchAllAnchors(node);\\n        });\\n      }\\n    }\\n  });\\n  mo.observe(document.documentElement, {\\n    childList: true,\\n    subtree: true,\\n    attributes: true,\\n    attributeFilter: [\"href\"]\\n  });\\n\\n  // Click fallback — forces corrected URL on click if needed\\n  document.addEventListener(\"click\", function (e) {\\n    const a = e.target?.closest ? e.target.closest(\"a[href]\") : null;\\n    if (!a) return;\\n\\n    try {\\n      const url = new URL(a.href, window.location.href);\\n      if (url.hostname !== TARGET_HOST) return;\\n\\n      const corrected = withAffiliate(a.href);\\n      if (corrected !== a.href) {\\n        e.preventDefault();\\n        if (a.target === \"_blank\" || e.metaKey || e.ctrlKey) {\\n          window.open(corrected, \"_blank\");\\n        } else {\\n          window.location.href = corrected;\\n        }\\n      }\\n    } catch {}\\n  }, true);\\n})();\\n</script>\\n',customHTMLHeadEnd:'\\n<script>\\n  // Step 1: Capture referral ID from URL\\n  const urlParams = new URLSearchParams(window.location.search);\\n  const ibRef = urlParams.get(\"ib\");\\n\\n  if (ibRef) {\\n    localStorage.setItem(\"ib-referral\", ibRef);\\n  }\\n\\n  // Step 2: Function to update links\\n  function updateReferralLinks() {\\n    const storedRef = localStorage.getItem(\"ib-referral\");\\n    if (!storedRef) return;\\n\\n    const links = document.querySelectorAll(\\'a[href*=\"my.1xtrade.com\"]\\');\\n    links.forEach(link => {\\n      const url = new URL(link.href);\\n      url.pathname = \\'ib-ref\\';\\n      url.searchParams.set(\"referral_code\", storedRef);\\n      link.href = url.toString();\\n    });\\n  }\\n\\n  // Step 3: Wait for DOM to load and then apply\\n  window.addEventListener(\"DOMContentLoaded\", updateReferralLinks);\\n</script>\\n',description:\"1x Trade\",favicon:\"https://framerusercontent.com/assets/kFDPwz11b7jAriGdZ4SZzOuLdE.png\",robots:\"max-image-preview:large\",title:\"1x Trade | Global Markets Simplified for You\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"oDACA,SAAwB,EAAS,EAAO,EAAa,CAAC,MAAM,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA05H,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmzB,YAAY,WAAW,QAAQ,sEAAsE,OAAO,0BAA0B,MAAM,+CAA+C"}