{"version":3,"sources":["../node_modules/node-libs-browser/node_modules/safe-buffer/index.js","../node_modules/pbkdf2/lib/async.js","../node_modules/parse-asn1/asn1.js","../node_modules/parse-asn1/certificate.js","../node_modules/parse-asn1/fixProc.js","../node_modules/node-libs-browser/node_modules/string_decoder/lib/string_decoder.js","../node_modules/object-assign/index.js","../node_modules/parse-asn1/index.js","../node_modules/path-to-regexp/index.js","../node_modules/pbkdf2/browser.js","../node_modules/pbkdf2/lib/precondition.js","../node_modules/pbkdf2/lib/default-encoding.js","../node_modules/pbkdf2/lib/sync-browser.js","../node_modules/pbkdf2/lib/to-buffer.js"],"names":["buffer","require","Buffer","copyProps","src","dst","key","SafeBuffer","arg","encodingOrOffset","length","from","alloc","allocUnsafe","allocUnsafeSlow","module","exports","TypeError","size","fill","encoding","buf","undefined","SlowBuffer","ZERO_BUF","nextTick","checkParameters","defaultEncoding","sync","toBuffer","subtle","global","crypto","toBrowser","sha","sha1","sha256","sha384","sha512","checks","getNextTick","process","queueMicrotask","setImmediate","setTimeout","browserPbkdf2","password","salt","iterations","algo","importKey","name","then","deriveBits","hash","res","keylen","digest","callback","toLowerCase","Promise","Error","promise","out","e","resolvePromise","browser","resolve","prom","catch","checkNative","resp","asn1","certificate","RSAPrivateKey","define","this","seq","obj","RSAPublicKey","AlgorithmIdentifier","objid","null_","optional","PublicKey","use","bitstr","PrivateKeyInfo","octstr","PrivateKey","EncryptedPrivateKeyInfo","EncryptedPrivateKey","DSAPrivateKey","DSAparam","ECParameters","choice","namedCurve","ECPrivateKey","explicit","signature","asn","Time","utcTime","utctime","generalTime","gentime","AttributeTypeValue","any","SubjectPublicKeyInfo","RelativeDistinguishedName","setof","RDNSequence","seqof","Name","rdnSequence","Validity","Extension","bool","def","TBSCertificate","implicit","X509Certificate","findProc","startRegex","fullRegex","evp","ciphers","okey","decrypted","toString","match","suite","iv","cipherText","replace","cipherKey","slice","parseInt","cipher","createDecipheriv","push","update","concat","match2","tag","data","isEncoding","StringDecoder","nb","enc","nenc","retried","_normalizeEncoding","normalizeEncoding","text","utf16Text","end","utf16End","fillLast","utf8FillLast","base64Text","base64End","write","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","byte","p","r","self","utf8CheckExtraBytes","copy","i","c","charCodeAt","n","prototype","total","j","utf8CheckIncomplete","getOwnPropertySymbols","Object","hasOwnProperty","propIsEnumerable","propertyIsEnumerable","toObject","val","assign","test1","String","getOwnPropertyNames","test2","fromCharCode","map","join","test3","split","forEach","letter","keys","err","shouldUseNative","target","source","symbols","to","s","arguments","call","aesid","fixProc","compat","parseKeys","isBuffer","passphrase","subtype","ndata","stripped","type","decode","tbsCertificate","subjectPublicKeyInfo","algorithm","subjectPublicKey","subjectPrivateKey","params","pub_key","decrypt","kde","kdeparams","iters","pbkdf2Sync","curve","privateKey","priv_key","parameters","value","isarray","pathToRegexp","parse","compile","str","options","tokensToFunction","tokensToRegExp","PATH_REGEXP","RegExp","tokens","index","path","defaultDelimiter","delimiter","exec","m","escaped","offset","next","prefix","capture","group","modifier","asterisk","partial","repeat","pattern","prevText","escapeGroup","restrictBacktrack","substr","indexOf","escapeString","encodeURIComponentPretty","encodeURI","toUpperCase","matches","Array","flags","opts","encode","pretty","encodeURIComponent","token","segment","JSON","stringify","test","attachKeys","re","sensitive","strict","route","endsWithDelimiter","groups","regexpToRegexp","parts","arrayToRegexp","stringToRegexp","pbkdf2","MAX_ALLOC","Math","pow","version","md5","RIPEMD160","ZEROS","sizes","sha224","rmd160","ripemd160","Hmac","alg","saltLen","shaFunc","rmd160Func","getDigest","blocksize","ipad","opad","ipad1","ipad2","run","hmac","DK","block1","destPos","hLen","l","ceil","writeUInt32BE","T","U","k","thing","ArrayBuffer","isView"],"mappings":";yGACA,IAAIA,EAASC,EAAQ,IACjBC,EAASF,EAAOE,OAGpB,SAASC,EAAWC,EAAKC,GACvB,IAAK,IAAIC,KAAOF,EACdC,EAAIC,GAAOF,EAAIE,EAEnB,CASA,SAASC,EAAYC,EAAKC,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AAK4B,KAAKlR,EAASgR,GAElBzJ,EAAI,EAAGA,GAAK0J,EAAG1J,IAAK,CAC3BuJ,EAAOK,cAAc5J,EAAGhI,EAAKrC,QAK7B,IAHA,IAAIkU,EAAIR,EAAKD,IAAIG,EAAQF,EAAKH,OAC1BY,EAAID,EAECvJ,EAAI,EAAGA,EAAIrI,EAAYqI,IAAK,CACnCwJ,EAAIT,EAAKD,IAAIU,EAAGT,EAAKF,OACrB,IAAK,IAAIY,EAAI,EAAGA,EAAIN,EAAMM,IAAKF,EAAEE,IAAMD,EAAEC,EAC3C,CAEAF,EAAE9J,KAAKuJ,EAAIE,GACXA,GAAWC,CACb,CAEA,OAAOH,CACT,C,sBCtGA,IAAInU,EAASD,EAAQ,IAAeC,OAEpCa,EAAOC,QAAU,SAAU+T,EAAO3T,EAAU+B,GAC1C,GAAIjD,EAAOsN,SAASuH,GAClB,OAAOA,EACF,GAAqB,kBAAVA,EAChB,OAAO7U,EAAOS,KAAKoU,EAAO3T,GACrB,GAAI4T,YAAYC,OAAOF,GAC5B,OAAO7U,EAAOS,KAAKoU,EAAM/U,QAEzB,MAAM,IAAIiB,UAAUkC,EAAO,2DAE/B,C","file":"static/js/main~b58f7129.37928991.chunk.js","sourcesContent":["/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n","var Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar sync = require('./sync')\nvar toBuffer = require('./to-buffer')\n\nvar ZERO_BUF\nvar subtle = global.crypto && global.crypto.subtle\nvar toBrowser = {\n sha: 'SHA-1',\n 'sha-1': 'SHA-1',\n sha1: 'SHA-1',\n sha256: 'SHA-256',\n 'sha-256': 'SHA-256',\n sha384: 'SHA-384',\n 'sha-384': 'SHA-384',\n 'sha-512': 'SHA-512',\n sha512: 'SHA-512'\n}\nvar checks = []\nfunction checkNative (algo) {\n if (global.process && !global.process.browser) {\n return Promise.resolve(false)\n }\n if (!subtle || !subtle.importKey || !subtle.deriveBits) {\n return Promise.resolve(false)\n }\n if (checks[algo] !== undefined) {\n return checks[algo]\n }\n ZERO_BUF = ZERO_BUF || Buffer.alloc(8)\n var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)\n .then(function () {\n return true\n }).catch(function () {\n return false\n })\n checks[algo] = prom\n return prom\n}\nvar nextTick\nfunction getNextTick () {\n if (nextTick) {\n return nextTick\n }\n if (global.process && global.process.nextTick) {\n nextTick = global.process.nextTick\n } else if (global.queueMicrotask) {\n nextTick = global.queueMicrotask\n } else if (global.setImmediate) {\n nextTick = global.setImmediate\n } else {\n nextTick = global.setTimeout\n }\n return nextTick\n}\nfunction browserPbkdf2 (password, salt, iterations, length, algo) {\n return subtle.importKey(\n 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits']\n ).then(function (key) {\n return subtle.deriveBits({\n name: 'PBKDF2',\n salt: salt,\n iterations: iterations,\n hash: {\n name: algo\n }\n }, key, length << 3)\n }).then(function (res) {\n return Buffer.from(res)\n })\n}\n\nfunction resolvePromise (promise, callback) {\n promise.then(function (out) {\n getNextTick()(function () {\n callback(null, out)\n })\n }, function (e) {\n getNextTick()(function () {\n callback(e)\n })\n })\n}\nmodule.exports = function (password, salt, iterations, keylen, digest, callback) {\n if (typeof digest === 'function') {\n callback = digest\n digest = undefined\n }\n\n digest = digest || 'sha1'\n var algo = toBrowser[digest.toLowerCase()]\n\n if (!algo || typeof global.Promise !== 'function') {\n getNextTick()(function () {\n var out\n try {\n out = sync(password, salt, iterations, keylen, digest)\n } catch (e) {\n return callback(e)\n }\n callback(null, out)\n })\n return\n }\n\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')\n\n resolvePromise(checkNative(algo).then(function (resp) {\n if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)\n\n return sync(password, salt, iterations, keylen, digest)\n }), callback)\n}\n","// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js\n// Fedor, you are amazing.\n\n'use strict';\n\nvar asn1 = require('asn1.js');\n\nexports.certificate = require('./certificate');\n\nvar RSAPrivateKey = asn1.define('RSAPrivateKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('modulus')['int'](),\n\t\tthis.key('publicExponent')['int'](),\n\t\tthis.key('privateExponent')['int'](),\n\t\tthis.key('prime1')['int'](),\n\t\tthis.key('prime2')['int'](),\n\t\tthis.key('exponent1')['int'](),\n\t\tthis.key('exponent2')['int'](),\n\t\tthis.key('coefficient')['int']()\n\t);\n});\nexports.RSAPrivateKey = RSAPrivateKey;\n\nvar RSAPublicKey = asn1.define('RSAPublicKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('modulus')['int'](),\n\t\tthis.key('publicExponent')['int']()\n\t);\n});\nexports.RSAPublicKey = RSAPublicKey;\n\nvar AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').objid(),\n\t\tthis.key('none').null_().optional(),\n\t\tthis.key('curve').objid().optional(),\n\t\tthis.key('params').seq().obj(\n\t\t\tthis.key('p')['int'](),\n\t\t\tthis.key('q')['int'](),\n\t\t\tthis.key('g')['int']()\n\t\t).optional()\n\t);\n});\n\nvar PublicKey = asn1.define('SubjectPublicKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').use(AlgorithmIdentifier),\n\t\tthis.key('subjectPublicKey').bitstr()\n\t);\n});\nexports.PublicKey = PublicKey;\n\nvar PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('algorithm').use(AlgorithmIdentifier),\n\t\tthis.key('subjectPrivateKey').octstr()\n\t);\n});\nexports.PrivateKey = PrivateKeyInfo;\nvar EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').seq().obj(\n\t\t\tthis.key('id').objid(),\n\t\t\tthis.key('decrypt').seq().obj(\n\t\t\t\tthis.key('kde').seq().obj(\n\t\t\t\t\tthis.key('id').objid(),\n\t\t\t\t\tthis.key('kdeparams').seq().obj(\n\t\t\t\t\t\tthis.key('salt').octstr(),\n\t\t\t\t\t\tthis.key('iters')['int']()\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tthis.key('cipher').seq().obj(\n\t\t\t\t\tthis.key('algo').objid(),\n\t\t\t\t\tthis.key('iv').octstr()\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\tthis.key('subjectPrivateKey').octstr()\n\t);\n});\n\nexports.EncryptedPrivateKey = EncryptedPrivateKeyInfo;\n\nvar DSAPrivateKey = asn1.define('DSAPrivateKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('p')['int'](),\n\t\tthis.key('q')['int'](),\n\t\tthis.key('g')['int'](),\n\t\tthis.key('pub_key')['int'](),\n\t\tthis.key('priv_key')['int']()\n\t);\n});\nexports.DSAPrivateKey = DSAPrivateKey;\n\nexports.DSAparam = asn1.define('DSAparam', function () {\n\tthis['int']();\n});\n\nvar ECParameters = asn1.define('ECParameters', function () {\n\tthis.choice({\n\t\tnamedCurve: this.objid()\n\t});\n});\n\nvar ECPrivateKey = asn1.define('ECPrivateKey', function () {\n\tthis.seq().obj(\n\t\tthis.key('version')['int'](),\n\t\tthis.key('privateKey').octstr(),\n\t\tthis.key('parameters').optional().explicit(0).use(ECParameters),\n\t\tthis.key('publicKey').optional().explicit(1).bitstr()\n\t);\n});\nexports.ECPrivateKey = ECPrivateKey;\n\nexports.signature = asn1.define('signature', function () {\n\tthis.seq().obj(\n\t\tthis.key('r')['int'](),\n\t\tthis.key('s')['int']()\n\t);\n});\n","// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js\n// thanks to @Rantanen\n\n'use strict';\n\nvar asn = require('asn1.js');\n\nvar Time = asn.define('Time', function () {\n\tthis.choice({\n\t\tutcTime: this.utctime(),\n\t\tgeneralTime: this.gentime()\n\t});\n});\n\nvar AttributeTypeValue = asn.define('AttributeTypeValue', function () {\n\tthis.seq().obj(\n\t\tthis.key('type').objid(),\n\t\tthis.key('value').any()\n\t);\n});\n\nvar AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').objid(),\n\t\tthis.key('parameters').optional(),\n\t\tthis.key('curve').objid().optional()\n\t);\n});\n\nvar SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {\n\tthis.seq().obj(\n\t\tthis.key('algorithm').use(AlgorithmIdentifier),\n\t\tthis.key('subjectPublicKey').bitstr()\n\t);\n});\n\nvar RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {\n\tthis.setof(AttributeTypeValue);\n});\n\nvar RDNSequence = asn.define('RDNSequence', function () {\n\tthis.seqof(RelativeDistinguishedName);\n});\n\nvar Name = asn.define('Name', function () {\n\tthis.choice({\n\t\trdnSequence: this.use(RDNSequence)\n\t});\n});\n\nvar Validity = asn.define('Validity', function () {\n\tthis.seq().obj(\n\t\tthis.key('notBefore').use(Time),\n\t\tthis.key('notAfter').use(Time)\n\t);\n});\n\nvar Extension = asn.define('Extension', function () {\n\tthis.seq().obj(\n\t\tthis.key('extnID').objid(),\n\t\tthis.key('critical').bool().def(false),\n\t\tthis.key('extnValue').octstr()\n\t);\n});\n\nvar TBSCertificate = asn.define('TBSCertificate', function () {\n\tthis.seq().obj(\n\t\tthis.key('version').explicit(0)['int']().optional(),\n\t\tthis.key('serialNumber')['int'](),\n\t\tthis.key('signature').use(AlgorithmIdentifier),\n\t\tthis.key('issuer').use(Name),\n\t\tthis.key('validity').use(Validity),\n\t\tthis.key('subject').use(Name),\n\t\tthis.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),\n\t\tthis.key('issuerUniqueID').implicit(1).bitstr().optional(),\n\t\tthis.key('subjectUniqueID').implicit(2).bitstr().optional(),\n\t\tthis.key('extensions').explicit(3).seqof(Extension).optional()\n\t);\n});\n\nvar X509Certificate = asn.define('X509Certificate', function () {\n\tthis.seq().obj(\n\t\tthis.key('tbsCertificate').use(TBSCertificate),\n\t\tthis.key('signatureAlgorithm').use(AlgorithmIdentifier),\n\t\tthis.key('signatureValue').bitstr()\n\t);\n});\n\nmodule.exports = X509Certificate;\n","'use strict';\n\n// adapted from https://github.com/apatil/pemstrip\nvar findProc = /Proc-Type: 4,ENCRYPTED[\\n\\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\\n\\r]+([0-9A-z\\n\\r+/=]+)[\\n\\r]+/m;\nvar startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m;\nvar fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\\n\\r+/=]+)-----END \\1-----$/m;\nvar evp = require('evp_bytestokey');\nvar ciphers = require('browserify-aes');\nvar Buffer = require('safe-buffer').Buffer;\nmodule.exports = function (okey, password) {\n\tvar key = okey.toString();\n\tvar match = key.match(findProc);\n\tvar decrypted;\n\tif (!match) {\n\t\tvar match2 = key.match(fullRegex);\n\t\tdecrypted = Buffer.from(match2[2].replace(/[\\r\\n]/g, ''), 'base64');\n\t} else {\n\t\tvar suite = 'aes' + match[1];\n\t\tvar iv = Buffer.from(match[2], 'hex');\n\t\tvar cipherText = Buffer.from(match[3].replace(/[\\r\\n]/g, ''), 'base64');\n\t\tvar cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key;\n\t\tvar out = [];\n\t\tvar cipher = ciphers.createDecipheriv(suite, cipherKey, iv);\n\t\tout.push(cipher.update(cipherText));\n\t\tout.push(cipher['final']());\n\t\tdecrypted = Buffer.concat(out);\n\t}\n\tvar tag = key.match(startRegex)[1];\n\treturn {\n\t\ttag: tag,\n\t\tdata: decrypted\n\t};\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","'use strict';\n\nvar asn1 = require('./asn1');\nvar aesid = require('./aesid.json');\nvar fixProc = require('./fixProc');\nvar ciphers = require('browserify-aes');\nvar compat = require('pbkdf2');\nvar Buffer = require('safe-buffer').Buffer;\n\nfunction decrypt(data, password) {\n\tvar salt = data.algorithm.decrypt.kde.kdeparams.salt;\n\tvar iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10);\n\tvar algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')];\n\tvar iv = data.algorithm.decrypt.cipher.iv;\n\tvar cipherText = data.subjectPrivateKey;\n\tvar keylen = parseInt(algo.split('-')[1], 10) / 8;\n\tvar key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1');\n\tvar cipher = ciphers.createDecipheriv(algo, key, iv);\n\tvar out = [];\n\tout.push(cipher.update(cipherText));\n\tout.push(cipher['final']());\n\treturn Buffer.concat(out);\n}\n\nfunction parseKeys(buffer) {\n\tvar password;\n\tif (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {\n\t\tpassword = buffer.passphrase;\n\t\tbuffer = buffer.key;\n\t}\n\tif (typeof buffer === 'string') {\n\t\tbuffer = Buffer.from(buffer);\n\t}\n\n\tvar stripped = fixProc(buffer, password);\n\n\tvar type = stripped.tag;\n\tvar data = stripped.data;\n\tvar subtype, ndata;\n\tswitch (type) {\n\t\tcase 'CERTIFICATE':\n\t\t\tndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo;\n\t\t\t// falls through\n\t\tcase 'PUBLIC KEY':\n\t\t\tif (!ndata) {\n\t\t\t\tndata = asn1.PublicKey.decode(data, 'der');\n\t\t\t}\n\t\t\tsubtype = ndata.algorithm.algorithm.join('.');\n\t\t\tswitch (subtype) {\n\t\t\t\tcase '1.2.840.113549.1.1.1':\n\t\t\t\t\treturn asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der');\n\t\t\t\tcase '1.2.840.10045.2.1':\n\t\t\t\t\tndata.subjectPrivateKey = ndata.subjectPublicKey;\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'ec',\n\t\t\t\t\t\tdata: ndata\n\t\t\t\t\t};\n\t\t\t\tcase '1.2.840.10040.4.1':\n\t\t\t\t\tndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der');\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'dsa',\n\t\t\t\t\t\tdata: ndata.algorithm.params\n\t\t\t\t\t};\n\t\t\t\tdefault: throw new Error('unknown key id ' + subtype);\n\t\t\t}\n\t\t\t// throw new Error('unknown key type ' + type)\n\t\tcase 'ENCRYPTED PRIVATE KEY':\n\t\t\tdata = asn1.EncryptedPrivateKey.decode(data, 'der');\n\t\t\tdata = decrypt(data, password);\n\t\t\t// falls through\n\t\tcase 'PRIVATE KEY':\n\t\t\tndata = asn1.PrivateKey.decode(data, 'der');\n\t\t\tsubtype = ndata.algorithm.algorithm.join('.');\n\t\t\tswitch (subtype) {\n\t\t\t\tcase '1.2.840.113549.1.1.1':\n\t\t\t\t\treturn asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der');\n\t\t\t\tcase '1.2.840.10045.2.1':\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcurve: ndata.algorithm.curve,\n\t\t\t\t\t\tprivateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey\n\t\t\t\t\t};\n\t\t\t\tcase '1.2.840.10040.4.1':\n\t\t\t\t\tndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der');\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'dsa',\n\t\t\t\t\t\tparams: ndata.algorithm.params\n\t\t\t\t\t};\n\t\t\t\tdefault: throw new Error('unknown key id ' + subtype);\n\t\t\t}\n\t\t\t// throw new Error('unknown key type ' + type)\n\t\tcase 'RSA PUBLIC KEY':\n\t\t\treturn asn1.RSAPublicKey.decode(data, 'der');\n\t\tcase 'RSA PRIVATE KEY':\n\t\t\treturn asn1.RSAPrivateKey.decode(data, 'der');\n\t\tcase 'DSA PRIVATE KEY':\n\t\t\treturn {\n\t\t\t\ttype: 'dsa',\n\t\t\t\tparams: asn1.DSAPrivateKey.decode(data, 'der')\n\t\t\t};\n\t\tcase 'EC PRIVATE KEY':\n\t\t\tdata = asn1.ECPrivateKey.decode(data, 'der');\n\t\t\treturn {\n\t\t\t\tcurve: data.parameters.value,\n\t\t\t\tprivateKey: data.privateKey\n\t\t\t};\n\t\tdefault: throw new Error('unknown key type ' + type);\n\t}\n}\nparseKeys.signature = asn1.signature;\n\nmodule.exports = parseKeys;\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = prefix || defaultDelimiter\n var pattern = capture || group\n var prevText = prefix || (typeof tokens[tokens.length - 1] === 'string' ? tokens[tokens.length - 1] : '')\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : restrictBacktrack(delimiter, prevText))\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\nfunction restrictBacktrack(delimiter, prevText) {\n if (!prevText || prevText.indexOf(delimiter) > -1) {\n return '[^' + escapeString(delimiter) + ']+?'\n }\n\n return escapeString(prevText) + '|(?:(?!' + escapeString(prevText) + ')[^' + escapeString(delimiter) + '])+?'\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","exports.pbkdf2 = require('./lib/async')\nexports.pbkdf2Sync = require('./lib/sync')\n","var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs\n\nmodule.exports = function (iterations, keylen) {\n if (typeof iterations !== 'number') {\n throw new TypeError('Iterations not a number')\n }\n\n if (iterations < 0) {\n throw new TypeError('Bad iterations')\n }\n\n if (typeof keylen !== 'number') {\n throw new TypeError('Key length not a number')\n }\n\n if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */\n throw new TypeError('Bad key length')\n }\n}\n","var defaultEncoding\n/* istanbul ignore next */\nif (global.process && global.process.browser) {\n defaultEncoding = 'utf-8'\n} else if (global.process && global.process.version) {\n var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)\n\n defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'\n} else {\n defaultEncoding = 'utf-8'\n}\nmodule.exports = defaultEncoding\n","var md5 = require('create-hash/md5')\nvar RIPEMD160 = require('ripemd160')\nvar sha = require('sha.js')\nvar Buffer = require('safe-buffer').Buffer\n\nvar checkParameters = require('./precondition')\nvar defaultEncoding = require('./default-encoding')\nvar toBuffer = require('./to-buffer')\n\nvar ZEROS = Buffer.alloc(128)\nvar sizes = {\n md5: 16,\n sha1: 20,\n sha224: 28,\n sha256: 32,\n sha384: 48,\n sha512: 64,\n rmd160: 20,\n ripemd160: 20\n}\n\nfunction Hmac (alg, key, saltLen) {\n var hash = getDigest(alg)\n var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64\n\n if (key.length > blocksize) {\n key = hash(key)\n } else if (key.length < blocksize) {\n key = Buffer.concat([key, ZEROS], blocksize)\n }\n\n var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])\n var opad = Buffer.allocUnsafe(blocksize + sizes[alg])\n for (var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)\n ipad.copy(ipad1, 0, 0, blocksize)\n this.ipad1 = ipad1\n this.ipad2 = ipad\n this.opad = opad\n this.alg = alg\n this.blocksize = blocksize\n this.hash = hash\n this.size = sizes[alg]\n}\n\nHmac.prototype.run = function (data, ipad) {\n data.copy(ipad, this.blocksize)\n var h = this.hash(ipad)\n h.copy(this.opad, this.blocksize)\n return this.hash(this.opad)\n}\n\nfunction getDigest (alg) {\n function shaFunc (data) {\n return sha(alg).update(data).digest()\n }\n function rmd160Func (data) {\n return new RIPEMD160().update(data).digest()\n }\n\n if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func\n if (alg === 'md5') return md5\n return shaFunc\n}\n\nfunction pbkdf2 (password, salt, iterations, keylen, digest) {\n checkParameters(iterations, keylen)\n password = toBuffer(password, defaultEncoding, 'Password')\n salt = toBuffer(salt, defaultEncoding, 'Salt')\n\n digest = digest || 'sha1'\n\n var hmac = new Hmac(digest, password, salt.length)\n\n var DK = Buffer.allocUnsafe(keylen)\n var block1 = Buffer.allocUnsafe(salt.length + 4)\n salt.copy(block1, 0, 0, salt.length)\n\n var destPos = 0\n var hLen = sizes[digest]\n var l = Math.ceil(keylen / hLen)\n\n for (var i = 1; i <= l; i++) {\n block1.writeUInt32BE(i, salt.length)\n\n var T = hmac.run(block1, hmac.ipad1)\n var U = T\n\n for (var j = 1; j < iterations; j++) {\n U = hmac.run(U, hmac.ipad2)\n for (var k = 0; k < hLen; k++) T[k] ^= U[k]\n }\n\n T.copy(DK, destPos)\n destPos += hLen\n }\n\n return DK\n}\n\nmodule.exports = pbkdf2\n","var Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function (thing, encoding, name) {\n if (Buffer.isBuffer(thing)) {\n return thing\n } else if (typeof thing === 'string') {\n return Buffer.from(thing, encoding)\n } else if (ArrayBuffer.isView(thing)) {\n return Buffer.from(thing.buffer)\n } else {\n throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView')\n }\n}\n"],"sourceRoot":""}