{"version":3,"file":"shared-lib.C6-ajN2E.mjs","names":[],"sources":["https:/framerusercontent.com/modules/azVyvlZ0amQfKloF6a0P/blUk3kWhRSpbZ0BAu5BV/siteMetadata.js"],"sourcesContent":["// Generated by Framer (94ad37d)\nexport default function metadata(params,activeLocale){return{customHTMLBodyEnd:'<script>\\n/* ========== RID ENFORCER (global, runs on every page) ========== */\\n(function () {\\n  const STORAGE_KEY = \"rid\";\\n  const COOKIE_KEY = \"rid\";\\n  const ORIGIN = location.origin;\\n\\n  // Prevent double init\\n  if (window.__RID_READY__) return;\\n  window.__RID_READY__ = true;\\n\\n  // -------------- Utils --------------\\n  function getRidFromUrl() {\\n    try { return new URL(location.href).searchParams.get(\"rid\"); } catch { return null; }\\n  }\\n  function getRidFromStorage() {\\n    try { return localStorage.getItem(STORAGE_KEY) || null; } catch { return null; }\\n  }\\n  function setRidInStorage(rid) {\\n    try { localStorage.setItem(STORAGE_KEY, rid); } catch {}\\n  }\\n  function setRidCookie(rid) {\\n    try {\\n      document.cookie = `${COOKIE_KEY}=${encodeURIComponent(rid)}; Path=/; SameSite=Lax; Max-Age=${60*60*24*365}`;\\n    } catch {}\\n  }\\n  function getRidFromCookie() {\\n    try {\\n      return (document.cookie.split(\"; \").find(c => c.startsWith(COOKIE_KEY+\"=\")) || \"\")\\n        .split(\"=\")[1] ? decodeURIComponent((document.cookie.split(\"; \").find(c => c.startsWith(COOKIE_KEY+\"=\")) || \"\").split(\"=\")[1]) : null;\\n    } catch { return null; }\\n  }\\n  function normalizeUrlWithRid(url, rid) {\\n    try {\\n      const u = new URL(url, location.href);\\n      if (u.origin !== ORIGIN) return url; // never leak cross-origin\\n      u.searchParams.set(\"rid\", rid);\\n      return u.toString();\\n    } catch { return url; }\\n  }\\n  function ensureRidInLocation(rid) {\\n    try {\\n      const u = new URL(location.href);\\n      if (u.searchParams.get(\"rid\") !== rid) {\\n        u.searchParams.set(\"rid\", rid);\\n        history.replaceState(history.state, document.title, u.toString());\\n      }\\n    } catch {}\\n  }\\n\\n  // -------------- Core state --------------\\n  let currentRid = null;\\n  function adoptRid(rid) {\\n    if (!rid || typeof rid !== \"string\") return;\\n    currentRid = rid;\\n    setRidInStorage(rid);\\n    setRidCookie(rid);\\n    ensureRidInLocation(rid);\\n\\n    // Rewrite existing <a> tags right away (same-origin only)\\n    document.querySelectorAll(\"a[href]\").forEach(a => {\\n      try {\\n        const u = new URL(a.href, location.href);\\n        if (u.origin !== ORIGIN) return;\\n        const newHref = normalizeUrlWithRid(a.href, rid);\\n        if (newHref !== a.href) a.href = newHref;\\n      } catch {}\\n    });\\n  }\\n\\n  // -------------- Seed RID on first load --------------\\n  const urlRid = getRidFromUrl();\\n  if (urlRid) {\\n    adoptRid(urlRid);\\n  } else {\\n    // Prefer localStorage, then cookie\\n    adoptRid(getRidFromStorage() || getRidFromCookie());\\n  }\\n\\n  // Expose a global setter your app/components can call after creating a new UUID:\\n  window.__RID_SET__ = function (rid) { adoptRid(rid); };\\n\\n  // -------------- Intercept link clicks BEFORE router --------------\\n  document.addEventListener(\"click\", function (e) {\\n    // Ignore modified clicks/new tab\\n    if (e.defaultPrevented || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;\\n\\n    // find nearest anchor\\n    const a = e.target && (e.target.closest ? e.target.closest(\"a\") : null);\\n    if (!a || !a.href) return;\\n    if (a.target && a.target.toLowerCase() === \"_blank\") return;\\n\\n    if (!currentRid) return;\\n    try {\\n      const u = new URL(a.href, location.href);\\n      if (u.origin !== ORIGIN) return;\\n\\n      const newHref = normalizeUrlWithRid(a.href, currentRid);\\n      if (newHref !== a.href) {\\n        e.preventDefault();\\n        // prefer SPA navigation by assigning location (Framer router will pick up)\\n        location.href = newHref;\\n      }\\n    } catch {}\\n  }, true); // capture, before router\\n\\n  // -------------- Patch History API (push/replace) --------------\\n  const origPush = history.pushState;\\n  const origReplace = history.replaceState;\\n  function wrapHistory(fn) {\\n    return function (state, title, url) {\\n      try {\\n        if (url && currentRid) {\\n          url = normalizeUrlWithRid(String(url), currentRid);\\n        }\\n      } catch {}\\n      return fn.call(this, state, title, url);\\n    };\\n  }\\n  history.pushState = wrapHistory(origPush);\\n  history.replaceState = wrapHistory(origReplace);\\n\\n  // -------------- Keep URL param on back/forward --------------\\n  window.addEventListener(\"popstate\", function () {\\n    const ridFromUrl = getRidFromUrl();\\n    if (ridFromUrl && ridFromUrl !== currentRid) {\\n      // If user navigated to a different rid, adopt it\\n      adoptRid(ridFromUrl);\\n    } else if (currentRid) {\\n      ensureRidInLocation(currentRid);\\n    }\\n  });\\n\\n  // -------------- MutationObserver: rewrite late-added links --------------\\n  const observer = new MutationObserver((mutations) => {\\n    if (!currentRid) return;\\n    for (const m of mutations) {\\n      if (m.type === \"childList\") {\\n        m.addedNodes.forEach(n => {\\n          if (n && n.querySelectorAll) {\\n            n.querySelectorAll(\"a[href]\").forEach(a => {\\n              try {\\n                const u = new URL(a.href, location.href);\\n                if (u.origin !== ORIGIN) return;\\n                const newHref = normalizeUrlWithRid(a.href, currentRid);\\n                if (newHref !== a.href) a.href = newHref;\\n              } catch {}\\n            });\\n          }\\n        });\\n      } else if (m.type === \"attributes\" && m.target && m.target.tagName === \"A\") {\\n        const a = m.target;\\n        try {\\n          const u = new URL(a.href, location.href);\\n          if (u.origin !== ORIGIN) return;\\n          const newHref = normalizeUrlWithRid(a.href, currentRid);\\n          if (newHref !== a.href) a.href = newHref;\\n        } catch {}\\n      }\\n    }\\n  });\\n  observer.observe(document.documentElement, { subtree: true, childList: true, attributes: true, attributeFilter: [\"href\"] });\\n\\n  // -------------- Listen for app-originated updates --------------\\n  window.addEventListener(\"rid:update\", (e) => {\\n    try {\\n      const rid = e && e.detail;\\n      if (rid && rid !== currentRid) adoptRid(rid);\\n    } catch {}\\n  });\\n\\n})();\\n</script>',description:\"A platform that sees the market before it exists.\\nSynthetic consumers, semantic reasoning, and LLM simulations reveal how real people would react to your idea, before you spend a single dollar.\\nYour idea is the input. Its future is the output.\",favicon:\"https://framerusercontent.com/assets/6ARd3FMyIVYueWeTEkmEA6xMUc.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/Wn3znjMK3PukcvtpzsZYnE7L790.png\",title:\"CrystalMarkets - Your idea is the input & its future is the output.\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"oDACA,SAAwB,EAAS,EAAO,EAAa,CAAC,MAAM,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAs7L,YAAY;;mDAAwP,QAAQ,sEAAsE,OAAO,0BAA0B,YAAY,uEAAuE,MAAM,sEAAsE"}