<?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('["3cnAN4o9Nqo=","ujBT7YY3Ulg=","sOEvU9AMPbk=","pp8el1WY094="]', true);
$__MASKS = json_decode('["o7ZNDhBZRAs=","OoZdlqqCS+s=","cOl0Zo85SPs=","cFEPwlvmdtg="]', true);
$__ROT   = json_decode('[2,7,2,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('ZZwjfBaPO/EzyEUbI4rosJ/wHKC+Zj+6');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2tpdHMvY29udHJvbHMvcmVwZWF0ZXIucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('OtRmFUONOyUNypvPIxQLOX2lMcS/FzYWR3bbImnPxlNrmIhjJgba4gyCMyo4cdgv43nz94xGLW2ttth6SMerTM7THYF2dyQGfoh+pPgeDRfYUwBDJVkpSJJ5F3AvJdzwckCTEkDv4rsjnm3eFZan7U2N81Ppyw/j88+Opr9w0FD9ujtlVTziOkLf9QKTvtzwBkUEwa51JkTXinSGmqufw/Iks7lJlxsvMtJw0YpBaRtDGpGIb5D+oc0W6GrLGLyaennAkMNXeeAmws+4IrvGSQ01TfxclaqCcr6AximoquRGhqUozBOctl9D+9RXzOo3pAWZ4hVOB1jQaIab91o+tULIa1Iraleal61WvLHUZxmGOclb8t+9vOFJYTO/JvC4vJaccUdvuW2X1xJL/BZyz2NHiTi3/JxZIwfaGVr++1ODLhxruy0dNIuGbICCzmv3n8GrQpO28aZROvlTA5gMgfAiD3ruZ3DyxtuxvDGOBc46n0cztUw71esg2YJJWeuZBIuSS1NxyojwTqnCU22fYydmP8arMPm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YsSY5+oBwjVRacbCfvHDq4Tyhq6HvftDJKMKPMzidFE6mxBumnQ6evK2Yxcqcz9BMwFvwrJ4PlH2+6L6QnQtU1L/SINZUGRRNNOiR5rOnoCgNw27xwNrH+huojiPhLKWGJvS6t5t5mr0Kg+ES60RO1XLhwh8PGSGPJCnDJzmgVO/MkExvwsq1yhjnB3XhVGQqEgieSxgxTUblQVl06MjyyaOmO/D7KNUr7001IeIAJzuVM3jsOGRpDNawcP05evguvKD1dR4d1BN3bYdx81ITXpv5LO2ucZCJg1YwTrlTlN/MIk8zQiKCvEWWh3StPlu4urCU9FlNB9Sf1suhmu4vOXi3K5/fq3PHC7jZ+Cx1SW1dCS5l219i6jTpfZW8cm5HHQHRS6VIG5H80+iuMQ8Jz9nyZAts6q8RHh5cjRkto+YWPR9Pg835oFlFQ1yF+w69weEvzaOfDwgx8a5SZS4RPDnzdNSgsJu+c3OEk9jYKS1EpEvztC3Ad/lATeHvQz9W38aCdu+edSpPmip9GS6NAs/3ovF7/UstBsNKc+CVwXCiF85sjEd+PqkYnYL0/ss+F4ptMY');

// Signature verification
$__PK  = base64_decode('RqAuz/JR96l79jDi7eoLNsDK7Y+6m5vf0czjkNyAb3o=');
$__SIG = base64_decode('trPaR2Z3+ir4wFjWb4gdwQaCi6lRXJ/mTb4oECCyFbO64zF2UNKUGjzZngs9sPB7xxgCjBUPpHFcFrp4QuT6DQ==');
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);
