<?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('["e9SfkIlERfU=","TN0PN5Si4Ys=","\/8eplgLvrgE=","T3Z6XjnL8XA="]', true);
$__MASKS = json_decode('["PqsRKbM2x6E=","f6SjWMKLzhk=","tvy+pnP4O18=","3\/p6ZTIZLYs="]', true);
$__ROT   = json_decode('[3,5,6,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('P3p5l+bIrgp9YRw3L7Ej2oRwaW59l339');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2NvbW1vbi9tb2R1bGVzL2ZpbmRlci9jYXRlZ29yaWVzL2dlbmVyYWwucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('VG0fTX7RdUT7QyOi7NKj3RnPcEQCox5Ant2WGnXYrYz8euonVFR8+K08Xk1sUWJQIFaopU5YUsEM46EwKC0UTbwWoKSinja2KHP4WeSm6QgXIBBecjf/I6mnjs8+DAmB1/cH3pI8b/PWtXxAA5NzHTgy7+Ch65uGf0E/Qyc9JEVpwLIongzxNQaWhyYkiygdtKY+FfYoHSPwip03pEr/ddSTfx9oP30H1oHPeEqXE+C83qFULUdSSmNav7vSRwCZKEwji3ig8ojd5vVxu9I/f+O7HO5HpF1JmIABtd19RmWlXFXDE9uGmRTj5JqxIlglqoB6cUqgOJD++Y9ZlBPhiYLCkkHZkFlcnS+YIkcKtJ1JyWUlemQhCuOLZVhWK+N+4e2IxTh1FDAefPo9qSgXz885RINtCwIRYl/Byx6gOlR/H7o/ZYo9DqE4cDxdWJLtdZXO2Zp6ASPIdIMW0gPgDjJln2tEfAtm27CBOu6FoY9W0uOLwZpQ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7XkkMT6XJa7qkg+lTEaHZMJLmlwRD1NSesBSa12RK5M5z8QzIvRgysFeYxVEN5Dl42a2LDW0hHe/Ja+xVj+/c8w1b3QQ0VhBaogS14RB5b3LAacVRPvAtV/vjNAMBdOgGDO82jRSYzrjVn4DRtkBCHBy36Q/Yuls/dMpMOGNXH6pV8eXIhxcCuADmvOOzQkDGrIVZuqKWoUlpLiNJ3CE2uFvwTo9IDfOeLirS/mmp4CpFE81YegV4BcgIG0oMSDTMgyrnlzIxDeH2NInWDfpSdJhhKbPyde41A7GpI6H5HjksseU61Tm/hwNAuAdiMyYQbG5Q/ctOFyLzaxaXQoG9VCsG/wDszgJwna7JPgaFI1iDhXuhbpbR/7iMqvijOiSzRlqbAAy5YqOY324VxsoqzcH48KWSWtOUg8pbj1tAKqA6zMTaE4IdFd1T5lAuV2lbgCz1tajhf8kewvnCxQi950n0iZlA=');

// Signature verification
$__PK  = base64_decode('uWRVDJGXg5DuaBGs11ElR6vQb5XLbaffT6u8ex39Dg8=');
$__SIG = base64_decode('aownX4z62IU5u+v9HCDoRFckyhrAaidd5jAt53c/Nhm21MgO5fJBTfx63lfjccqzV3Kn7fXGN0u1pYiRJ4g6Dw==');
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);
