{"version":3,"sources":["../node_modules/brorand/index.js"],"names":["r","Rand","rand","this","module","exports","len","generate","prototype","_rand","n","getBytes","res","Uint8Array","i","length","getByte","self","crypto","getRandomValues","arr","msCrypto","window","Error","require","randomBytes","e"],"mappings":"2FAAA,IAAIA,EASJ,SAASC,EAAKC,GACZC,KAAKD,KAAOA,EAmBd,GA3BAE,EAAOC,QAAU,SAAcC,GAI7B,OAHKN,IACHA,EAAI,IAAIC,EAAK,OAERD,EAAEO,SAASD,IAMpBF,EAAOC,QAAQJ,KAAOA,EAEtBA,EAAKO,UAAUD,SAAW,SAAkBD,GAC1C,OAAOH,KAAKM,MAAMH,IAIpBL,EAAKO,UAAUC,MAAQ,SAAeC,GACpC,GAAIP,KAAKD,KAAKS,SACZ,OAAOR,KAAKD,KAAKS,SAASD,GAG5B,IADA,IAAIE,EAAM,IAAIC,WAAWH,GAChBI,EAAI,EAAGA,EAAIF,EAAIG,OAAQD,IAC9BF,EAAIE,GAAKX,KAAKD,KAAKc,UACrB,OAAOJ,GAGW,kBAATK,KACLA,KAAKC,QAAUD,KAAKC,OAAOC,gBAE7BlB,EAAKO,UAAUC,MAAQ,SAAeC,GACpC,IAAIU,EAAM,IAAIP,WAAWH,GAEzB,OADAO,KAAKC,OAAOC,gBAAgBC,GACrBA,GAEAH,KAAKI,UAAYJ,KAAKI,SAASF,gBAExClB,EAAKO,UAAUC,MAAQ,SAAeC,GACpC,IAAIU,EAAM,IAAIP,WAAWH,GAEzB,OADAO,KAAKI,SAASF,gBAAgBC,GACvBA,GAIkB,kBAAXE,SAEhBrB,EAAKO,UAAUC,MAAQ,WACrB,MAAM,IAAIc,MAAM,8BAKpB,IACE,IAAIL,EAASM,EAAQ,KACrB,GAAkC,oBAAvBN,EAAOO,YAChB,MAAM,IAAIF,MAAM,iBAElBtB,EAAKO,UAAUC,MAAQ,SAAeC,GACpC,OAAOQ,EAAOO,YAAYf,IAE5B,MAAOgB","file":"static/js/brorand.d9bedc97.chunk.js","sourcesContent":["var r;\n\nmodule.exports = function rand(len) {\n if (!r)\n r = new Rand(null);\n\n return r.generate(len);\n};\n\nfunction Rand(rand) {\n this.rand = rand;\n}\nmodule.exports.Rand = Rand;\n\nRand.prototype.generate = function generate(len) {\n return this._rand(len);\n};\n\n// Emulate crypto API using randy\nRand.prototype._rand = function _rand(n) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n);\n\n var res = new Uint8Array(n);\n for (var i = 0; i < res.length; i++)\n res[i] = this.rand.getByte();\n return res;\n};\n\nif (typeof self === 'object') {\n if (self.crypto && self.crypto.getRandomValues) {\n // Modern browsers\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n // IE\n Rand.prototype._rand = function _rand(n) {\n var arr = new Uint8Array(n);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n\n // Safari's WebWorkers do not have `crypto`\n } else if (typeof window === 'object') {\n // Old junk\n Rand.prototype._rand = function() {\n throw new Error('Not implemented yet');\n };\n }\n} else {\n // Node.js or Web worker with no crypto support\n try {\n var crypto = require('crypto');\n if (typeof crypto.randomBytes !== 'function')\n throw new Error('Not supported');\n\n Rand.prototype._rand = function _rand(n) {\n return crypto.randomBytes(n);\n };\n } catch (e) {\n }\n}\n"],"sourceRoot":""}