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xB,EAAa,EAAO,GAAW,EAAI,EAChC,EAAI,EAAW,QACpB,EAAI,KAAO,GACT,MAAS,GAAyB,GAAhB,EAAI,KAAO,IAAW,EAAW,WAAW,KAElE,OAAO,SAAS,EAClB,CAOA,SAAS,SAAS,GAChB,IAEE,OADA,OAAO,OAAO,gBAAgB,EAAO,IAAI,WAAW,QAC7C,SAAS,EAClB,CAAE,MAAO,GACP,MAAO,EAAE,IAAI,KAAM,OAAQ,OAAO,WAAa,OAAO,UAAU,QACxD,OAAO,OAAQ,SAAS,MAClC,CACF,CAMA,SAAS,SAAS,GAChB,OAAO,OAAO,aAAa,MAAM,EAAG,EACtC,CA5IA,OAAO,QAAU,SAAS,EAAM,GAC9B,GAAI,IAA8B,IAAnB,EAAQ,OAIrB,OAHA,EAAQ,QAAS,EACjB,KAAK,OAAS,OAAO,QAAQ,EAAM,GACnC,EAAQ,QAAS,EACV,KAAK,OAEd,IACI,EAAM,GAQN,GALY,OAAO,QAJJ,GAAW,EAAQ,UAAY,EAKlC,CAAC,EAAM,SAAS,OAC9B,KAAK,UAAY,EAAO,WAAY,GAAI,GAG/B,IAAI,KAAK,IAUpB,OAPA,OAAO,SAAS,EAAK,GAAI,MAOlB,WAIL,IAHA,IAAI,EAAI,EAAK,EAAE,QACX,EAAI,WACJ,EAAI,EACD,EAAI,cACT,GAAK,EAAI,GAAK,MACd,GAAK,MACL,EAAI,EAAK,EAAE,GAEb,KAAO,GAAK,UACV,GAAK,EACL,GAAK,EACL,KAAO,EAET,OAAQ,EAAI,GAAK,CACnB,CACF,EAEA,OAAO,QAAQ,YAAc,WAC3B,KAAK,OAAS,SAChB,EAuGA,OAAO,KAAK,SAAU","file":"/npm/seed-random@2.2.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/seed-random@2.2.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\r\n\r\nvar width = 256;// each RC4 output is 0 <= x < 256\r\nvar chunks = 6;// at least six RC4 outputs for each double\r\nvar digits = 52;// there are 52 significant digits in a double\r\nvar pool = [];// pool: entropy pool starts empty\r\nvar GLOBAL = typeof global === 'undefined' ? window : global;\r\n\r\n//\r\n// The following constants are related to IEEE 754 limits.\r\n//\r\nvar startdenom = Math.pow(width, chunks),\r\n    significance = Math.pow(2, digits),\r\n    overflow = significance * 2,\r\n    mask = width - 1;\r\n\r\n\r\nvar oldRandom = Math.random;\r\n\r\n//\r\n// seedrandom()\r\n// This is the seedrandom function described above.\r\n//\r\nmodule.exports = function(seed, options) {\r\n  if (options && options.global === true) {\r\n    options.global = false;\r\n    Math.random = module.exports(seed, options);\r\n    options.global = true;\r\n    return Math.random;\r\n  }\r\n  var use_entropy = (options && options.entropy) || false;\r\n  var key = [];\r\n\r\n  // Flatten the seed string or build one from local entropy if needed.\r\n  var shortseed = mixkey(flatten(\r\n    use_entropy ? [seed, tostring(pool)] :\r\n    0 in arguments ? seed : autoseed(), 3), key);\r\n\r\n  // Use the seed to initialize an ARC4 generator.\r\n  var arc4 = new ARC4(key);\r\n\r\n  // Mix the randomness into accumulated entropy.\r\n  mixkey(tostring(arc4.S), pool);\r\n\r\n  // Override Math.random\r\n\r\n  // This function returns a random double in [0, 1) that contains\r\n  // randomness in every bit of the mantissa of the IEEE 754 value.\r\n\r\n  return function() {         // Closure to return a random double:\r\n    var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48\r\n        d = startdenom,                 //   and denominator d = 2 ^ 48.\r\n        x = 0;                          //   and no 'extra last byte'.\r\n    while (n < significance) {          // Fill up all significant digits by\r\n      n = (n + x) * width;              //   shifting numerator and\r\n      d *= width;                       //   denominator and generating a\r\n      x = arc4.g(1);                    //   new least-significant-byte.\r\n    }\r\n    while (n >= overflow) {             // To avoid rounding up, before adding\r\n      n /= 2;                           //   last byte, shift everything\r\n      d /= 2;                           //   right using integer Math until\r\n      x >>>= 1;                         //   we have exactly the desired bits.\r\n    }\r\n    return (n + x) / d;                 // Form the number within [0, 1).\r\n  };\r\n};\r\n\r\nmodule.exports.resetGlobal = function () {\r\n  Math.random = oldRandom;\r\n};\r\n\r\n//\r\n// ARC4\r\n//\r\n// An ARC4 implementation.  The constructor takes a key in the form of\r\n// an array of at most (width) integers that should be 0 <= x < (width).\r\n//\r\n// The g(count) method returns a pseudorandom integer that concatenates\r\n// the next (count) outputs from ARC4.  Its return value is a number x\r\n// that is in the range 0 <= x < (width ^ count).\r\n//\r\n/** @constructor */\r\nfunction ARC4(key) {\r\n  var t, keylen = key.length,\r\n      me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];\r\n\r\n  // The empty key [] is treated as [0].\r\n  if (!keylen) { key = [keylen++]; }\r\n\r\n  // Set up S using the standard key scheduling algorithm.\r\n  while (i < width) {\r\n    s[i] = i++;\r\n  }\r\n  for (i = 0; i < width; i++) {\r\n    s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];\r\n    s[j] = t;\r\n  }\r\n\r\n  // The \"g\" method returns the next (count) outputs as one number.\r\n  (me.g = function(count) {\r\n    // Using instance members instead of closure state nearly doubles speed.\r\n    var t, r = 0,\r\n        i = me.i, j = me.j, s = me.S;\r\n    while (count--) {\r\n      t = s[i = mask & (i + 1)];\r\n      r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];\r\n    }\r\n    me.i = i; me.j = j;\r\n    return r;\r\n    // For robust unpredictability discard an initial batch of values.\r\n    // See http://www.rsa.com/rsalabs/node.asp?id=2009\r\n  })(width);\r\n}\r\n\r\n//\r\n// flatten()\r\n// Converts an object tree to nested arrays of strings.\r\n//\r\nfunction flatten(obj, depth) {\r\n  var result = [], typ = (typeof obj)[0], prop;\r\n  if (depth && typ == 'o') {\r\n    for (prop in obj) {\r\n      try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}\r\n    }\r\n  }\r\n  return (result.length ? result : typ == 's' ? obj : obj + '\\0');\r\n}\r\n\r\n//\r\n// mixkey()\r\n// Mixes a string seed into a key that is an array of integers, and\r\n// returns a shortened string seed that is equivalent to the result key.\r\n//\r\nfunction mixkey(seed, key) {\r\n  var stringseed = seed + '', smear, j = 0;\r\n  while (j < stringseed.length) {\r\n    key[mask & j] =\r\n      mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));\r\n  }\r\n  return tostring(key);\r\n}\r\n\r\n//\r\n// autoseed()\r\n// Returns an object for autoseeding, using window.crypto if available.\r\n//\r\n/** @param {Uint8Array=} seed */\r\nfunction autoseed(seed) {\r\n  try {\r\n    GLOBAL.crypto.getRandomValues(seed = new Uint8Array(width));\r\n    return tostring(seed);\r\n  } catch (e) {\r\n    return [+new Date, GLOBAL, GLOBAL.navigator && GLOBAL.navigator.plugins,\r\n            GLOBAL.screen, tostring(pool)];\r\n  }\r\n}\r\n\r\n//\r\n// tostring()\r\n// Converts an array of charcodes to a string\r\n//\r\nfunction tostring(a) {\r\n  return String.fromCharCode.apply(0, a);\r\n}\r\n\r\n//\r\n// When seedrandom.js is loaded, we immediately mix a few bits\r\n// from the built-in RNG into the entropy pool.  Because we do\r\n// not want to intefere with determinstic PRNG state later,\r\n// seedrandom will not call Math.random on its own again after\r\n// initialization.\r\n//\r\nmixkey(Math.random(), pool);\r\n"]}