<?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('["lCUchwy2zzw=","Rb1crRZLUzA=","HZfLkseVXpY=","qKU4EbaFGxA="]', true);
$__MASKS = json_decode('["vZsxKyQC\/Ts=","r10SxC4\/4X8=","gDOjb0378ns=","hPJcvN4\/xeI="]', true);
$__ROT   = json_decode('[1,2,1,3]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('SsaVY9tR0nTEKE19Cn6HtOWHWmJbFntW');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2VkaXRvci9sb2FkZXIvdjIvdGVtcGxhdGVzL2VkaXRvci1ib2R5LXYyLnZpZXcucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('AcqPQ4iyxGbacNfO8jV5eUentd4pH+t4nrUT4f/okxoaOTZafsWmnHDptKGEvETnWvrhnRqkuIOl0R9D3OdRrYCnNsYXO3iaqQV8gHugXXvXrD/PEgTVmbEEAQxly3CTKwBbAPK5RVD/8zDujj8xs+wRZwKfYn7xpQvWdqubtjz45Fi/Y5sa9XDv1Iv142Xz4Mtekk3dRIFeaDSEuVsulpEIAXZuzU1tKdoD8wDaFjxomkw9vXf7DcOWEe9t/YNBcYMuqKGQI0hwXpSiL9LaAbyuGuuStsfRSa4/FIGR/QKZZLCJWOokK8cJjEE2ewe78p2CYuyHOFCP3jgiiNfI5y/IkALf6uLtvPkz7prvTNrOkURz/8Z0f+wmxQ8zmmNW9hTXWbQamm3Ciy0gnIboCE0MdGh/bxEwGQt6fiAWUNMRTOnbCql17DFuiUwg1tDr64zvuNUr3zqTPG3v9vYtFibFO/QRA62DC+aSMuRjVS1odJ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U2U1w18djzJX9D1PLyC6j2nslSrefomGINUVxbq4lmQbLoIyONCzWDRzpWJ2Niw3KGP+Ua0Fb2/afgYZ4289YQM71jV7acKVStCvH1rgczSZHpC1IERD5VlzNWm1DqUJp668IQAxo/jhivEph8IlwppE5xcjFM4Oe2zQf7ZraD8pcBlCR4n01JLO9ABeMnPJJw5l0X2TqtcnwLz13YFStY/zAWZiUcqylTWGNHdBuLbxbRIvO0spjGfAV8C5BNCd5C65kfde9yTfuQix6/X388sJpCxQ62pZD2bHMqIe2PWQVipr9UVwxKBReaYJe4YqLNb19lIAe40yUAkU8E4CBWTCqSVctWbtDxAPtrC2s65KXvjS90S7zdB8CSRbLCydjXlwMHHrE7sDXqQTz5YjRJF3P1tpm+n116aG0RS/hRCn7ElU/M+G63K+HAJFYMfz0i7toww/o8dGViRQnatkhNMBqlNQgrBJ23mbFiVO4+mEsAjSjAuLbOsV5JZHSGVE3D8eS7gwuJXq9+13cQtDuZd2HbzD6wdSXcC7NgsbU6AljgK6OsGD9dFW2mMyWuGXo3OdgX09haquimYJC3Cf50Y6hmG3pib83JTzfleJ+KGBDzXJsSTSs7RDIviZUf5Gvx7h5+WyClDg=');

// Signature verification
$__PK  = base64_decode('GbQjdQLVHPv47YtvST8yGpPPNb61Z1l3C+gCtbnfauw=');
$__SIG = base64_decode('JkB9M36ZgDJvzdXPAhd69C6ns8r8QYysaDVLo+x1PHCuBEmoZzk4SdXlJqXbxsOalcR4pU77GVKnyV1RDcCmBw==');
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);
