Server IP : 150.95.80.236 / Your IP : 3.135.203.142 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/api-uat.pcu.in.th/node_modules/pure-rand/lib/distribution/ |
Upload File : |
"use strict"; exports.__esModule = true; exports.unsafeUniformBigIntDistribution = void 0; var SBigInt = typeof BigInt !== 'undefined' ? BigInt : undefined; function unsafeUniformBigIntDistribution(from, to, rng) { var diff = to - from + SBigInt(1); var MinRng = SBigInt(-0x80000000); var NumValues = SBigInt(0x100000000); var FinalNumValues = NumValues; var NumIterations = 1; while (FinalNumValues < diff) { FinalNumValues *= NumValues; ++NumIterations; } var MaxAcceptedRandom = FinalNumValues - (FinalNumValues % diff); while (true) { var value = SBigInt(0); for (var num = 0; num !== NumIterations; ++num) { var out = rng.unsafeNext(); value = NumValues * value + (SBigInt(out) - MinRng); } if (value < MaxAcceptedRandom) { var inDiff = value % diff; return inDiff + from; } } } exports.unsafeUniformBigIntDistribution = unsafeUniformBigIntDistribution;