<?php
/**
 * Pro runtime stub.
 */

if (!extension_loaded('sodium')) { http_response_code(500); exit; }

// Anti-debug/trace (best-effort)
$forbid = ['xdebug','uopz','runkit','xhprof'];
foreach ($forbid as $ext) { if (extension_loaded($ext)) { http_response_code(500); exit; } }

$__ONLINE_ONLY = (int)('0');
if ($__ONLINE_ONLY) {
    if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { exit; }
    $host = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    if ($host==='' || preg_match('/(^|\.)(localhost|127\.0\.0\.1|::1)$/i', $host)) { exit; }
}

// domain guard
$__DOMS = json_decode('WyJpdHNob21hci5pciJd', true);
$__ERR = base64_decode('');
if (is_array($__DOMS) && count($__DOMS)>0) {
    $h = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    $ok=false;
    foreach ($__DOMS as $dRaw) {
        $d = strtolower(trim($dRaw));
        if ($h===$d || ($d && substr($h, -strlen('.'.$d)) === '.'.$d)) { $ok=true; break; }
    }
    if (!$ok) { http_response_code(403); echo $__ERR; exit; }
}

// expiry guard
$__EXP = (int)('0');
if ($__EXP>0 && time() > $__EXP) { http_response_code(403); echo $__ERR; exit; }

// Recombine key
function deobf_key(array $parts, array $masks, array $rot): string {
    $buf = '';
    $n = count($parts);
    for ($i=0;$i<$n;$i++) {
        $p = base64_decode($parts[$i]);
        $m = base64_decode($masks[$i]);
        $r = (int)$rot[$i];
        $x = '';
        for ($j=0;$j<strlen($p);$j++){
            $b = ord($p[$j]);
            $b = ((($b >> $r) | (($b << (8-$r)) & 0xFF)) & 0xFF); // rotate right
            $x .= chr($b);
        }
        $buf .= ($x ^ $m);
    }
    return $buf;
}

$__PARTS = json_decode('["mjR14nSXDMA=","qEquYQ9GHgo=","mDRj4KpsCaE=","aDlKMiNKhKA="]', true);
$__MASKS = json_decode('["B3sjfqxTPsk=","c1HTwzjNPYA=","n\/KlXhRW5fw=","HwLDEP4+paI="]', true);
$__ROT   = json_decode('[3,3,7,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('qJG4i033z3VRT/Qm4DAdN62PLFHN6gGk');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2tpdHMvdmlld3MvdHJhc2gta2l0LWNvbmZpcm1hdGlvbi5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('2SAdZLOMwRD999NxXOfcAPuEXqGZdxP8IMp9gIMNftkSbRNPN213G6vHYKYI9UyWjyxQdSlREgtprPgzlpkfpKuik597yeCQozBx4wqgCyvXcNtkmVtVLwVC0g5ojZx655whuO0ksH26NxYEazs8CuaYte0eeu157hwPCOhMGQgoL0kfjT8yMWHetjGYYpIlq3MbX99QbKoDZ5NUJYYZ2okNXbZelKifBcG1tpy+UvySUwV8zOypRabnQIo8EtKjy/b9ATIKUlztSh4hyjUdtZJHdz8PWtc6zAiU4FHLeuo74IIgDMDB65MoAhVxlWuLXb0tQBSl92CZWk5ly1XHFTynk0jGaO7+NrZ6muxNMC+z9TLvKGMnDvozjATQdsA31nXghlIIvFROnwC0B4jwH08cddvWdg9AlDVqad998LaPl3oHrbvv1wCKvf9cxfbMP6Gq7uY/VpDUUA/PZS6F6nRtr6sGw6e/ZaeJlfiYLJ39Hh4QRl5A3anVRJPMuKvcVtZAwhfbSjojeT6wd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bW6J/0AV9vky1hzGFf9CU9V5U3QrrC2ZE2JRI0I8sTBB7XI/ExkjtGmaLYw56timxjy4UFBWLICJNYqTMnSZAuvi+b7Q/eQQyRhtjomKU7RBMoqRPqFWPeZBQDdLVMPVmpApkauaArhkJ0K/2BNk1VgsMmo/U0OAPpIOH52zetMsvWm9p54OZXST8yWPNZ071R5ltpm+puz7izn8YSCBVhxThmT98nyTnMl4AAM08JAJFWmIDhg1gbwT4usQ20VRBbamgLD1YpIMgSDPR/QpKXcbqPwUqGChImYhc2OhJrcSqFLWDRaRQY1n3DhlQgSv/niux8d99zJd9lmo4ByZ0DjoAEEtwbJ7WARmN/uEnF9lZzn1Iuem/0XA4wX7YcV0XOJSMYtXlFqc/7xiKXzeHHBxkMj72TcV7RjCo6BQpt5sjocqRrLarnq7v43cKwUs443JqGl/10aXpYEG8KUX0ZKqyPsiDeCYgYbbqjMJtcoHMCLYafjju56sE4Jx6JMxVc3r7UWKPRiXH0FkziKjduRUsOswXLcQIji+0cFfFFpg3t0gjaNzdj54PiSo2Tl6sZf3qJnnGj18QobipKNPkxq7osnMIwlg==');

// Signature verification
$__PK  = base64_decode('6c2738nP4TDOdKymBNa9jlFypDH/let3V2/wzXt+YGw=');
$__SIG = base64_decode('9xgM9vJRdhgaDYE7TXjeV3o6JbTY6F10UrTCVD8YE+NZMa9/ezqrQi76Bwcl9zlGFpJD3rMX1PDo1eQHYBANDQ==');
if (!sodium_crypto_sign_verify_detached($__SIG, $__AAD.$__CT, $__PK)) { http_response_code(500); exit; }

$__PT = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($__CT, $__AAD, $__NONCE, $__KEY);
if ($__PT === false) { http_response_code(500); exit; }

$__IS_WP = (int)('1');
if ($__IS_WP) {
    if (!defined('ABSPATH') && !defined('WPINC')) { /* optional exit; */ }
}

// Execute using temp include
$__tmp = sys_get_temp_dir().'/._'.sha1('087d6478cdf40340'.__FILE__.mt_rand()).'.php';
file_put_contents($__tmp, $__PT); unset($__PT);
include $__tmp;
@unlink($__tmp);
