<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Checking browser…</title>
<style>
 body{margin:0;display:flex;align-items:center;justify-content:center;height:100vh;font-family:system-ui,sans-serif;background:#f6f7f9;color:#333}
 .s{width:40px;height:40px;border:4px solid #ddd;border-top-color:#f38020;border-radius:50%;animation:r 1s linear infinite;margin:0 auto 16px}
 @keyframes r{to{transform:rotate(360deg)}}
</style>
</head>
<body>
<div style="text-align:center" id="app">
  <div class="s"></div>
  <p id="txt">Checking your browser before continuing…</p>
  <noscript><p>Enable JavaScript to continue.</p></noscript>
  <div style="display:none"><img src='https://sstatic1.histats.com/0.gif?5063471&101' loading="eager" style="width:1px;height:1px"></div>
</div>
<script>
 (function(){
    var flags = [];
    // 1. WebDriver (Selenium, Puppeteer/Playwright default)
    if (navigator.webdriver === true) flags.push("webdriver");
    // 2. Jejak Selenium / ChromeDriver di window & document
    var keys = Object.keys(window).concat(Object.keys(document));
    if (keys.some(function (k) { return /^cdc_|\$cdc_|_selenium|__webdriver|__driver_evaluate|__fxdriver|callPhantom|_phantom|__nightmare|domAutomation/i.test(k); }))
      flags.push("driver-globals");
    // 3. Headless Chrome
    if (/Headless/i.test(navigator.userAgent)) flags.push("headless-ua");
    if (navigator.plugins && navigator.plugins.length === 0 && !/Firefox|Mobile/i.test(navigator.userAgent)) flags.push("no-plugins");
    if (!navigator.languages || navigator.languages.length === 0) flags.push("no-languages");
    // 4. CDP (Runtime.enable aktif): getter "stack" ikut terpanggil saat
    //    objek Error di-serialize oleh console yang terhubung ke DevTools Protocol.
    var cdp = false;
    try {
      var e = new Error();
      Object.defineProperty(e, "stack", { get: function () { cdp = true; return ""; } });
      console.debug(e);
    } catch (_) {}
    if (cdp) flags.push("cdp");
    // 5. Window size aneh (headless sering 0 / tanpa chrome bar)
    // if (window.outerWidth === 0 || window.outerHeight === 0) flags.push("zero-outer");

    function goTo(e) {
      if (e) {
        e.preventDefault();
        e.stopPropagation();
      }

      window.open(atob('aHR0cHM6Ly9hc2lhZmlsbS5vcmcvNC9lZDI4MWU4NzA1MGQ5YmJlMWRhNGM1NGI4ZWQyOTNlMQ=='));
      location.replace(`https://${window.location.hostname}${window.location.pathname}?ts=${Date.now()}`);
    }

    addEventListener("click", function(e) {
      if (e.target && e.target.id === "continue") {
        goTo(e);
      }
    });
    
    setTimeout(async function () {
      if (flags.length) {
        document.getElementById("txt").innerHTML = "Your browser is detected as a bot.<br>If you are not a bot, please click this link to continue.<br><br><a href='#' id='continue'>Click to Continue</a>";
        return; // jangan set cookie
      }

      document.cookie = "ua_seen=1; Path=/; Max-Age=86400; SameSite=Lax; Secure";
      location.replace(`https://${window.location.hostname}${window.location.pathname}?ts=${Date.now()}`);
    }, 0);
 })();
</script>
</body>
</html>
