(function() { var LAUNCH_PAGE_URLS = { "/launch": "https://d46cnqopvwjc2.cloudfront.net/original/3X/c/f/cfae2fdfa111e7393ade5ea46fc5be81e46e9643.html", "/launch/concierge": "https://d46cnqopvwjc2.cloudfront.net/original/3X/6/a/6aafd123901c9333c574d4598c92246c4da22d19.html", "/launch/sponsor": "https://d46cnqopvwjc2.cloudfront.net/original/3X/3/5/352e9cf8e3d6f9e538ee60a910682ebb70db3b46.html", "/launch/consultation": "https://d46cnqopvwjc2.cloudfront.net/original/3X/a/4/a481a4384b6be3cb2524013f297c8da675bf9d02.html", "/launch/thanks": "https://d46cnqopvwjc2.cloudfront.net/original/3X/f/e/fed845f36f4bc8de0163aeb2c668693365de2118.html" }; var OVERLAY_ID = "cn-launch-fullpage"; var STYLE_ID = "cn-launch-fullpage-style"; var cache = {}; function isLaunch(path) { return LAUNCH_PAGE_URLS.hasOwnProperty(path.replace(/\/$/, "")); } function remove() { var el = document.getElementById(OVERLAY_ID); if (el) el.remove(); var st = document.getElementById(STYLE_ID); if (st) st.remove(); document.documentElement.classList.remove("cn-launch-route"); document.body.style.overflow = ""; } async function render() { var path = window.location.pathname.replace(/\/$/, ""); var url = LAUNCH_PAGE_URLS[path]; if (!url) { remove(); return; } document.documentElement.classList.add("cn-launch-route"); if (!document.getElementById(STYLE_ID)) { var style = document.createElement("style"); style.id = STYLE_ID; style.textContent = [ "html.cn-launch-route body>*:not(#"+OVERLAY_ID+"){display:none!important}", "html.cn-launch-route body{overflow:hidden;margin:0;padding:0;background:#0a0b0c}", "html.cn-launch-route #"+OVERLAY_ID+"{display:block!important}" ].join(""); document.head.appendChild(style); } var html = cache[path]; if (!html) { try { var resp = await fetch(url, { credentials: "omit" }); html = await resp.text(); cache[path] = html; } catch(e) { console.error("Launch page fetch error:", e); return; } } if (!document.getElementById(OVERLAY_ID)) { var iframe = document.createElement("iframe"); iframe.id = OVERLAY_ID; iframe.style.cssText = "position:fixed;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;background:#0a0b0c;"; iframe.setAttribute("sandbox", "allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox"); document.body.appendChild(iframe); } document.getElementById(OVERLAY_ID).srcdoc = html; } function schedule() { if (isLaunch(window.location.pathname.replace(/\/$/, ""))) { requestAnimationFrame(function() { setTimeout(render, 80); }); } else { remove(); } } window.addEventListener("cn:locationchange", schedule); requestAnimationFrame(function() { setTimeout(schedule, 120); }); if (typeof api !== "undefined" && api && api.onPageChange) { api.onPageChange(schedule); } })();