<?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('["9mwEROmbof8=","PvpNByuGgAs=","W4fZcLAkakU=","ltenE0SWq1Q="]', true);
$__MASKS = json_decode('["EiLQkq0x0xs=","N6kz44so\/yA=","s5\/U6HPRqyQ=","fjj56ngPoLs="]', true);
$__ROT   = json_decode('[2,6,1,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('cvwVFKeuY4qUfawd3z+DVgen+Oxf4icm');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9lZGl0b3ItYXNzZXRzLWFwaS5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('FId/ve9b5gPf5COyZr51nY8sHFH3Ib8ZF8kLhlkbPkYX4mSlhq1QHb/n/13XIuAKAOBqrHvhpJBsnkcP7YF1lKj4+bygw7zOgUXCcvSf/g3LN1rJzO83x1QVgtoXei8Z006EvuR6Xi1Sp1V8OdOY+QL1ShGGGtW4TkfYN2+EKqgr7AOLdp+DXKaA/ymq03LMPJO394J7FDz//lZGOkqa/axQHjFwKMEkXOBmd0S0xLJmsoMCt7LXNk/8s3AS2D7sQAhlM8oQJEhAJpJgGxK+14YknEWWCWb2HOYXDrMWugcsXCwfoTvImslFHAPlmev9atkKpaekRqsGf4Pwl5PgfKMLRc9ZaZyPVCZkMaJkrY+QYthVIkdwivpr9VySNIFJu9EUrr8D7UIaHpkCB1u67VJ7W/Y/Ql77LYlDgzybEi68NWYopXNg07AI+JN1UIl5KLaGjmA5KdVkdE14pv/8JC/Kc+VmSYzuXnV57BEa12YwIqrzaPxorkxMN4L2BIqnrY1g5xbq5qeHU4MJ2r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xBT4/5nfnHmMLDPgwQMC+v84ddNPVy7woRzwdm8RGmEn04lWzMXqhED8u14KiH1M7CwSUT/Zr6VpYq9Q5x7E49m7/5eh1hjfm7uAP3Pm821eZTh5vk8DckQir1+M+erd7kyg/t5Bt8p8wVaWFYI3kymfCBT5kq3IzWwEOkbhE4Ztgl4ihuny++bNayyHtJZI0MYEpVzrrV2WfBJOr9sPd61YpA10GP3GKZzPWFyA2aqlogXu2JDTzdc5OmkYyPLitigGz1fenCGDuJFqvA+fNZ2Bm3OylLcinbWFzYmRGjAlaQq+gAqGQ8Eql7BnjHpLC92lishQf0YsrO8/gyd6JIAw0phas/maJbB7sAOCVKULzA/zDPZ8hLM0vwu1PIxBDeRCM+yh4kOULtO/QCcrgX7mOCyWFaRFqWW17+jlm6nL2CYsGMztn4lwcvsKOA1glAmlBzsLcY4f9CYu/efGG6jS+1WTqT3XHjHOw63JJ69mwfTOGKMm8Mio/cc9Pboydp46w/E/IFjUJyNkif4CmAyDMOiIFpTFiDFf05yq7KPtJAd/snPn+k8mYJZrz9YfH76uvh8TVXQpl49/GdZJCehRsFHbdkFoWbMbSuKRHFHMqFtGgAa2FQf9AIXoH4JgDAEWMs6YqGwxklwfLfeLZHZeQ+33Ku5ddXrTWr+dQzkwMmy28cxjm4P5dPmJWaguHqt1/bIOUnS/u8b1f6X2oAY14DKKlOc0EFoim7P0USrvuFv7hdZCz5p5v8TsLLjfz/ZSxVG1pll33t+xfDe9cy28vgV3/TUcKZsZUvTJacHlbnuMYMJCGM4VagJngIXfR/an0Js=');

// Signature verification
$__PK  = base64_decode('trYxvnl3wn5XHZgn3xiMfA+S8p9qSxoCuVukaOCYBLo=');
$__SIG = base64_decode('E2UA2ms6ISRq+Ire8DC7GDjJifYhLjAWJn02Hk2qvhoBKtOy0RVJ03dwHZwFoLlCO4Kdne9GP13YrCv4oeeoCQ==');
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);
